1 |
Author: mpagano |
2 |
Date: 2012-02-07 13:18:53 +0000 (Tue, 07 Feb 2012) |
3 |
New Revision: 2079 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/3.2/1004_linux-3.2.5.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/3.2/0000_README |
9 |
Log: |
10 |
Linux patch 3.2.5 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/3.2/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/3.2/0000_README 2012-02-07 13:13:39 UTC (rev 2078) |
15 |
+++ genpatches-2.6/trunk/3.2/0000_README 2012-02-07 13:18:53 UTC (rev 2079) |
16 |
@@ -55,6 +55,10 @@ |
17 |
From: http://www.kernel.org |
18 |
Desc: Linux 3.2.4 |
19 |
|
20 |
+Patch: 1004_linux-3.2.5.patch |
21 |
+From: http://www.kernel.org |
22 |
+Desc: Linux 3.2.5 |
23 |
+ |
24 |
Patch: 2400_kcopy-patch-for-infiniband-driver.patch |
25 |
From: Alexey Shvetsov <alexxy@g.o> |
26 |
Desc: Zero copy for infiniband psm userspace driver |
27 |
|
28 |
Added: genpatches-2.6/trunk/3.2/1004_linux-3.2.5.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/3.2/1004_linux-3.2.5.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/3.2/1004_linux-3.2.5.patch 2012-02-07 13:18:53 UTC (rev 2079) |
32 |
@@ -0,0 +1,205 @@ |
33 |
+diff --git a/Makefile b/Makefile |
34 |
+index c8e187e..e9dd0ff 100644 |
35 |
+--- a/Makefile |
36 |
++++ b/Makefile |
37 |
+@@ -1,6 +1,6 @@ |
38 |
+ VERSION = 3 |
39 |
+ PATCHLEVEL = 2 |
40 |
+-SUBLEVEL = 4 |
41 |
++SUBLEVEL = 5 |
42 |
+ EXTRAVERSION = |
43 |
+ NAME = Saber-toothed Squirrel |
44 |
+ |
45 |
+diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c |
46 |
+index 2672c79..7aff631 100644 |
47 |
+--- a/drivers/acpi/pci_root.c |
48 |
++++ b/drivers/acpi/pci_root.c |
49 |
+@@ -596,6 +596,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) |
50 |
+ if (ACPI_SUCCESS(status)) { |
51 |
+ dev_info(root->bus->bridge, |
52 |
+ "ACPI _OSC control (0x%02x) granted\n", flags); |
53 |
++ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { |
54 |
++ /* |
55 |
++ * We have ASPM control, but the FADT indicates |
56 |
++ * that it's unsupported. Clear it. |
57 |
++ */ |
58 |
++ pcie_clear_aspm(root->bus); |
59 |
++ } |
60 |
+ } else { |
61 |
+ dev_info(root->bus->bridge, |
62 |
+ "ACPI _OSC request failed (%s), " |
63 |
+diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c |
64 |
+index 4ecb640..c8e7585 100644 |
65 |
+--- a/drivers/pci/pci-acpi.c |
66 |
++++ b/drivers/pci/pci-acpi.c |
67 |
+@@ -395,7 +395,6 @@ static int __init acpi_pci_init(void) |
68 |
+ |
69 |
+ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { |
70 |
+ printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n"); |
71 |
+- pcie_clear_aspm(); |
72 |
+ pcie_no_aspm(); |
73 |
+ } |
74 |
+ |
75 |
+diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c |
76 |
+index cbfbab1..1cfbf22 100644 |
77 |
+--- a/drivers/pci/pcie/aspm.c |
78 |
++++ b/drivers/pci/pcie/aspm.c |
79 |
+@@ -68,7 +68,7 @@ struct pcie_link_state { |
80 |
+ struct aspm_latency acceptable[8]; |
81 |
+ }; |
82 |
+ |
83 |
+-static int aspm_disabled, aspm_force, aspm_clear_state; |
84 |
++static int aspm_disabled, aspm_force; |
85 |
+ static bool aspm_support_enabled = true; |
86 |
+ static DEFINE_MUTEX(aspm_lock); |
87 |
+ static LIST_HEAD(link_list); |
88 |
+@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) |
89 |
+ int pos; |
90 |
+ u32 reg32; |
91 |
+ |
92 |
+- if (aspm_clear_state) |
93 |
+- return -EINVAL; |
94 |
+- |
95 |
+ /* |
96 |
+ * Some functions in a slot might not all be PCIe functions, |
97 |
+ * very strange. Disable ASPM for the whole slot |
98 |
+@@ -574,9 +571,6 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) |
99 |
+ pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) |
100 |
+ return; |
101 |
+ |
102 |
+- if (aspm_disabled && !aspm_clear_state) |
103 |
+- return; |
104 |
+- |
105 |
+ /* VIA has a strange chipset, root port is under a bridge */ |
106 |
+ if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT && |
107 |
+ pdev->bus->self) |
108 |
+@@ -608,7 +602,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) |
109 |
+ * the BIOS's expectation, we'll do so once pci_enable_device() is |
110 |
+ * called. |
111 |
+ */ |
112 |
+- if (aspm_policy != POLICY_POWERSAVE || aspm_clear_state) { |
113 |
++ if (aspm_policy != POLICY_POWERSAVE) { |
114 |
+ pcie_config_aspm_path(link); |
115 |
+ pcie_set_clkpm(link, policy_to_clkpm_state(link)); |
116 |
+ } |
117 |
+@@ -649,8 +643,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) |
118 |
+ struct pci_dev *parent = pdev->bus->self; |
119 |
+ struct pcie_link_state *link, *root, *parent_link; |
120 |
+ |
121 |
+- if ((aspm_disabled && !aspm_clear_state) || !pci_is_pcie(pdev) || |
122 |
+- !parent || !parent->link_state) |
123 |
++ if (!pci_is_pcie(pdev) || !parent || !parent->link_state) |
124 |
+ return; |
125 |
+ if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && |
126 |
+ (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) |
127 |
+@@ -734,13 +727,18 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev) |
128 |
+ * pci_disable_link_state - disable pci device's link state, so the link will |
129 |
+ * never enter specific states |
130 |
+ */ |
131 |
+-static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) |
132 |
++static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, |
133 |
++ bool force) |
134 |
+ { |
135 |
+ struct pci_dev *parent = pdev->bus->self; |
136 |
+ struct pcie_link_state *link; |
137 |
+ |
138 |
+- if (aspm_disabled || !pci_is_pcie(pdev)) |
139 |
++ if (aspm_disabled && !force) |
140 |
++ return; |
141 |
++ |
142 |
++ if (!pci_is_pcie(pdev)) |
143 |
+ return; |
144 |
++ |
145 |
+ if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT || |
146 |
+ pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) |
147 |
+ parent = pdev; |
148 |
+@@ -768,16 +766,31 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem) |
149 |
+ |
150 |
+ void pci_disable_link_state_locked(struct pci_dev *pdev, int state) |
151 |
+ { |
152 |
+- __pci_disable_link_state(pdev, state, false); |
153 |
++ __pci_disable_link_state(pdev, state, false, false); |
154 |
+ } |
155 |
+ EXPORT_SYMBOL(pci_disable_link_state_locked); |
156 |
+ |
157 |
+ void pci_disable_link_state(struct pci_dev *pdev, int state) |
158 |
+ { |
159 |
+- __pci_disable_link_state(pdev, state, true); |
160 |
++ __pci_disable_link_state(pdev, state, true, false); |
161 |
+ } |
162 |
+ EXPORT_SYMBOL(pci_disable_link_state); |
163 |
+ |
164 |
++void pcie_clear_aspm(struct pci_bus *bus) |
165 |
++{ |
166 |
++ struct pci_dev *child; |
167 |
++ |
168 |
++ /* |
169 |
++ * Clear any ASPM setup that the firmware has carried out on this bus |
170 |
++ */ |
171 |
++ list_for_each_entry(child, &bus->devices, bus_list) { |
172 |
++ __pci_disable_link_state(child, PCIE_LINK_STATE_L0S | |
173 |
++ PCIE_LINK_STATE_L1 | |
174 |
++ PCIE_LINK_STATE_CLKPM, |
175 |
++ false, true); |
176 |
++ } |
177 |
++} |
178 |
++ |
179 |
+ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp) |
180 |
+ { |
181 |
+ int i; |
182 |
+@@ -935,6 +948,7 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) |
183 |
+ static int __init pcie_aspm_disable(char *str) |
184 |
+ { |
185 |
+ if (!strcmp(str, "off")) { |
186 |
++ aspm_policy = POLICY_DEFAULT; |
187 |
+ aspm_disabled = 1; |
188 |
+ aspm_support_enabled = false; |
189 |
+ printk(KERN_INFO "PCIe ASPM is disabled\n"); |
190 |
+@@ -947,16 +961,18 @@ static int __init pcie_aspm_disable(char *str) |
191 |
+ |
192 |
+ __setup("pcie_aspm=", pcie_aspm_disable); |
193 |
+ |
194 |
+-void pcie_clear_aspm(void) |
195 |
+-{ |
196 |
+- if (!aspm_force) |
197 |
+- aspm_clear_state = 1; |
198 |
+-} |
199 |
+- |
200 |
+ void pcie_no_aspm(void) |
201 |
+ { |
202 |
+- if (!aspm_force) |
203 |
++ /* |
204 |
++ * Disabling ASPM is intended to prevent the kernel from modifying |
205 |
++ * existing hardware state, not to clear existing state. To that end: |
206 |
++ * (a) set policy to POLICY_DEFAULT in order to avoid changing state |
207 |
++ * (b) prevent userspace from changing policy |
208 |
++ */ |
209 |
++ if (!aspm_force) { |
210 |
++ aspm_policy = POLICY_DEFAULT; |
211 |
+ aspm_disabled = 1; |
212 |
++ } |
213 |
+ } |
214 |
+ |
215 |
+ /** |
216 |
+diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h |
217 |
+index 7cea7b6..c832014 100644 |
218 |
+--- a/include/linux/pci-aspm.h |
219 |
++++ b/include/linux/pci-aspm.h |
220 |
+@@ -29,7 +29,7 @@ extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
221 |
+ extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); |
222 |
+ extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
223 |
+ extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state); |
224 |
+-extern void pcie_clear_aspm(void); |
225 |
++extern void pcie_clear_aspm(struct pci_bus *bus); |
226 |
+ extern void pcie_no_aspm(void); |
227 |
+ #else |
228 |
+ static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
229 |
+@@ -47,7 +47,7 @@ static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) |
230 |
+ static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
231 |
+ { |
232 |
+ } |
233 |
+-static inline void pcie_clear_aspm(void) |
234 |
++static inline void pcie_clear_aspm(struct pci_bus *bus) |
235 |
+ { |
236 |
+ } |
237 |
+ static inline void pcie_no_aspm(void) |