diff options
author | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
commit | ee58b57100ca953da7320c285315a95db2f7053d (patch) | |
tree | 77b815a31240adc4d6326346908137fc6c2c3a96 /arch | |
parent | 6f30e8b022c8e3a722928ddb1a2ae0be852fcc0e (diff) | |
parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
150 files changed, 873 insertions, 482 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index d794384a0404..15996290fed4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -226,8 +226,8 @@ config ARCH_INIT_TASK | |||
226 | config ARCH_TASK_STRUCT_ALLOCATOR | 226 | config ARCH_TASK_STRUCT_ALLOCATOR |
227 | bool | 227 | bool |
228 | 228 | ||
229 | # Select if arch has its private alloc_thread_info() function | 229 | # Select if arch has its private alloc_thread_stack() function |
230 | config ARCH_THREAD_INFO_ALLOCATOR | 230 | config ARCH_THREAD_STACK_ALLOCATOR |
231 | bool | 231 | bool |
232 | 232 | ||
233 | # Select if arch wants to size task_struct dynamically via arch_task_struct_size: | 233 | # Select if arch wants to size task_struct dynamically via arch_task_struct_size: |
@@ -606,6 +606,9 @@ config HAVE_ARCH_HASH | |||
606 | file which provides platform-specific implementations of some | 606 | file which provides platform-specific implementations of some |
607 | functions in <linux/hash.h> or fs/namei.c. | 607 | functions in <linux/hash.h> or fs/namei.c. |
608 | 608 | ||
609 | config ISA_BUS_API | ||
610 | def_bool ISA | ||
611 | |||
609 | # | 612 | # |
610 | # ABI hall of shame | 613 | # ABI hall of shame |
611 | # | 614 | # |
diff --git a/arch/alpha/include/asm/pgalloc.h b/arch/alpha/include/asm/pgalloc.h index aab14a019c20..c2ebb6f36c9d 100644 --- a/arch/alpha/include/asm/pgalloc.h +++ b/arch/alpha/include/asm/pgalloc.h | |||
@@ -40,7 +40,7 @@ pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
40 | static inline pmd_t * | 40 | static inline pmd_t * |
41 | pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 41 | pmd_alloc_one(struct mm_struct *mm, unsigned long address) |
42 | { | 42 | { |
43 | pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 43 | pmd_t *ret = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
44 | return ret; | 44 | return ret; |
45 | } | 45 | } |
46 | 46 | ||
@@ -53,7 +53,7 @@ pmd_free(struct mm_struct *mm, pmd_t *pmd) | |||
53 | static inline pte_t * | 53 | static inline pte_t * |
54 | pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 54 | pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
55 | { | 55 | { |
56 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 56 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
57 | return pte; | 57 | return pte; |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/arch/arc/include/asm/pgalloc.h b/arch/arc/include/asm/pgalloc.h index 86ed671286df..3749234b7419 100644 --- a/arch/arc/include/asm/pgalloc.h +++ b/arch/arc/include/asm/pgalloc.h | |||
@@ -95,7 +95,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
95 | { | 95 | { |
96 | pte_t *pte; | 96 | pte_t *pte; |
97 | 97 | ||
98 | pte = (pte_t *) __get_free_pages(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO, | 98 | pte = (pte_t *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, |
99 | __get_order_pte()); | 99 | __get_order_pte()); |
100 | 100 | ||
101 | return pte; | 101 | return pte; |
@@ -107,7 +107,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
107 | pgtable_t pte_pg; | 107 | pgtable_t pte_pg; |
108 | struct page *page; | 108 | struct page *page; |
109 | 109 | ||
110 | pte_pg = (pgtable_t)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, __get_order_pte()); | 110 | pte_pg = (pgtable_t)__get_free_pages(GFP_KERNEL, __get_order_pte()); |
111 | if (!pte_pg) | 111 | if (!pte_pg) |
112 | return 0; | 112 | return 0; |
113 | memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t)); | 113 | memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t)); |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 06b6c2d695bf..414b42710a36 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -741,6 +741,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \ | |||
741 | sun7i-a20-olimex-som-evb.dtb \ | 741 | sun7i-a20-olimex-som-evb.dtb \ |
742 | sun7i-a20-olinuxino-lime.dtb \ | 742 | sun7i-a20-olinuxino-lime.dtb \ |
743 | sun7i-a20-olinuxino-lime2.dtb \ | 743 | sun7i-a20-olinuxino-lime2.dtb \ |
744 | sun7i-a20-olinuxino-lime2-emmc.dtb \ | ||
744 | sun7i-a20-olinuxino-micro.dtb \ | 745 | sun7i-a20-olinuxino-micro.dtb \ |
745 | sun7i-a20-orangepi.dtb \ | 746 | sun7i-a20-orangepi.dtb \ |
746 | sun7i-a20-orangepi-mini.dtb \ | 747 | sun7i-a20-orangepi-mini.dtb \ |
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts index d82dd6e3f9b1..5687d6b4da60 100644 --- a/arch/arm/boot/dts/am437x-sk-evm.dts +++ b/arch/arm/boot/dts/am437x-sk-evm.dts | |||
@@ -418,7 +418,7 @@ | |||
418 | status = "okay"; | 418 | status = "okay"; |
419 | pinctrl-names = "default"; | 419 | pinctrl-names = "default"; |
420 | pinctrl-0 = <&i2c0_pins>; | 420 | pinctrl-0 = <&i2c0_pins>; |
421 | clock-frequency = <400000>; | 421 | clock-frequency = <100000>; |
422 | 422 | ||
423 | tps@24 { | 423 | tps@24 { |
424 | compatible = "ti,tps65218"; | 424 | compatible = "ti,tps65218"; |
diff --git a/arch/arm/boot/dts/am57xx-idk-common.dtsi b/arch/arm/boot/dts/am57xx-idk-common.dtsi index b01a5948cdd0..0e63b9dff6e7 100644 --- a/arch/arm/boot/dts/am57xx-idk-common.dtsi +++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi | |||
@@ -60,10 +60,26 @@ | |||
60 | 60 | ||
61 | tps659038_pmic { | 61 | tps659038_pmic { |
62 | compatible = "ti,tps659038-pmic"; | 62 | compatible = "ti,tps659038-pmic"; |
63 | |||
64 | smps12-in-supply = <&vmain>; | ||
65 | smps3-in-supply = <&vmain>; | ||
66 | smps45-in-supply = <&vmain>; | ||
67 | smps6-in-supply = <&vmain>; | ||
68 | smps7-in-supply = <&vmain>; | ||
69 | smps8-in-supply = <&vmain>; | ||
70 | smps9-in-supply = <&vmain>; | ||
71 | ldo1-in-supply = <&vmain>; | ||
72 | ldo2-in-supply = <&vmain>; | ||
73 | ldo3-in-supply = <&vmain>; | ||
74 | ldo4-in-supply = <&vmain>; | ||
75 | ldo9-in-supply = <&vmain>; | ||
76 | ldoln-in-supply = <&vmain>; | ||
77 | ldousb-in-supply = <&vmain>; | ||
78 | ldortc-in-supply = <&vmain>; | ||
79 | |||
63 | regulators { | 80 | regulators { |
64 | smps12_reg: smps12 { | 81 | smps12_reg: smps12 { |
65 | /* VDD_MPU */ | 82 | /* VDD_MPU */ |
66 | vin-supply = <&vmain>; | ||
67 | regulator-name = "smps12"; | 83 | regulator-name = "smps12"; |
68 | regulator-min-microvolt = <850000>; | 84 | regulator-min-microvolt = <850000>; |
69 | regulator-max-microvolt = <1250000>; | 85 | regulator-max-microvolt = <1250000>; |
@@ -73,7 +89,6 @@ | |||
73 | 89 | ||
74 | smps3_reg: smps3 { | 90 | smps3_reg: smps3 { |
75 | /* VDD_DDR EMIF1 EMIF2 */ | 91 | /* VDD_DDR EMIF1 EMIF2 */ |
76 | vin-supply = <&vmain>; | ||
77 | regulator-name = "smps3"; | 92 | regulator-name = "smps3"; |
78 | regulator-min-microvolt = <1350000>; | 93 | regulator-min-microvolt = <1350000>; |
79 | regulator-max-microvolt = <1350000>; | 94 | regulator-max-microvolt = <1350000>; |
@@ -84,7 +99,6 @@ | |||
84 | smps45_reg: smps45 { | 99 | smps45_reg: smps45 { |
85 | /* VDD_DSPEVE on AM572 */ | 100 | /* VDD_DSPEVE on AM572 */ |
86 | /* VDD_IVA + VDD_DSP on AM571 */ | 101 | /* VDD_IVA + VDD_DSP on AM571 */ |
87 | vin-supply = <&vmain>; | ||
88 | regulator-name = "smps45"; | 102 | regulator-name = "smps45"; |
89 | regulator-min-microvolt = <850000>; | 103 | regulator-min-microvolt = <850000>; |
90 | regulator-max-microvolt = <1250000>; | 104 | regulator-max-microvolt = <1250000>; |
@@ -94,7 +108,6 @@ | |||
94 | 108 | ||
95 | smps6_reg: smps6 { | 109 | smps6_reg: smps6 { |
96 | /* VDD_GPU */ | 110 | /* VDD_GPU */ |
97 | vin-supply = <&vmain>; | ||
98 | regulator-name = "smps6"; | 111 | regulator-name = "smps6"; |
99 | regulator-min-microvolt = <850000>; | 112 | regulator-min-microvolt = <850000>; |
100 | regulator-max-microvolt = <1250000>; | 113 | regulator-max-microvolt = <1250000>; |
@@ -104,7 +117,6 @@ | |||
104 | 117 | ||
105 | smps7_reg: smps7 { | 118 | smps7_reg: smps7 { |
106 | /* VDD_CORE */ | 119 | /* VDD_CORE */ |
107 | vin-supply = <&vmain>; | ||
108 | regulator-name = "smps7"; | 120 | regulator-name = "smps7"; |
109 | regulator-min-microvolt = <850000>; | 121 | regulator-min-microvolt = <850000>; |
110 | regulator-max-microvolt = <1150000>; | 122 | regulator-max-microvolt = <1150000>; |
@@ -115,13 +127,11 @@ | |||
115 | smps8_reg: smps8 { | 127 | smps8_reg: smps8 { |
116 | /* 5728 - VDD_IVAHD */ | 128 | /* 5728 - VDD_IVAHD */ |
117 | /* 5718 - N.C. test point */ | 129 | /* 5718 - N.C. test point */ |
118 | vin-supply = <&vmain>; | ||
119 | regulator-name = "smps8"; | 130 | regulator-name = "smps8"; |
120 | }; | 131 | }; |
121 | 132 | ||
122 | smps9_reg: smps9 { | 133 | smps9_reg: smps9 { |
123 | /* VDD_3_3D */ | 134 | /* VDD_3_3D */ |
124 | vin-supply = <&vmain>; | ||
125 | regulator-name = "smps9"; | 135 | regulator-name = "smps9"; |
126 | regulator-min-microvolt = <3300000>; | 136 | regulator-min-microvolt = <3300000>; |
127 | regulator-max-microvolt = <3300000>; | 137 | regulator-max-microvolt = <3300000>; |
@@ -132,7 +142,6 @@ | |||
132 | ldo1_reg: ldo1 { | 142 | ldo1_reg: ldo1 { |
133 | /* VDDSHV8 - VSDMMC */ | 143 | /* VDDSHV8 - VSDMMC */ |
134 | /* NOTE: on rev 1.3a, data supply */ | 144 | /* NOTE: on rev 1.3a, data supply */ |
135 | vin-supply = <&vmain>; | ||
136 | regulator-name = "ldo1"; | 145 | regulator-name = "ldo1"; |
137 | regulator-min-microvolt = <1800000>; | 146 | regulator-min-microvolt = <1800000>; |
138 | regulator-max-microvolt = <3300000>; | 147 | regulator-max-microvolt = <3300000>; |
@@ -142,7 +151,6 @@ | |||
142 | 151 | ||
143 | ldo2_reg: ldo2 { | 152 | ldo2_reg: ldo2 { |
144 | /* VDDSH18V */ | 153 | /* VDDSH18V */ |
145 | vin-supply = <&vmain>; | ||
146 | regulator-name = "ldo2"; | 154 | regulator-name = "ldo2"; |
147 | regulator-min-microvolt = <1800000>; | 155 | regulator-min-microvolt = <1800000>; |
148 | regulator-max-microvolt = <1800000>; | 156 | regulator-max-microvolt = <1800000>; |
@@ -152,7 +160,6 @@ | |||
152 | 160 | ||
153 | ldo3_reg: ldo3 { | 161 | ldo3_reg: ldo3 { |
154 | /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */ | 162 | /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */ |
155 | vin-supply = <&vmain>; | ||
156 | regulator-name = "ldo3"; | 163 | regulator-name = "ldo3"; |
157 | regulator-min-microvolt = <1800000>; | 164 | regulator-min-microvolt = <1800000>; |
158 | regulator-max-microvolt = <1800000>; | 165 | regulator-max-microvolt = <1800000>; |
@@ -162,7 +169,6 @@ | |||
162 | 169 | ||
163 | ldo4_reg: ldo4 { | 170 | ldo4_reg: ldo4 { |
164 | /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/ | 171 | /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/ |
165 | vin-supply = <&vmain>; | ||
166 | regulator-name = "ldo4"; | 172 | regulator-name = "ldo4"; |
167 | regulator-min-microvolt = <1800000>; | 173 | regulator-min-microvolt = <1800000>; |
168 | regulator-max-microvolt = <1800000>; | 174 | regulator-max-microvolt = <1800000>; |
@@ -174,7 +180,6 @@ | |||
174 | 180 | ||
175 | ldo9_reg: ldo9 { | 181 | ldo9_reg: ldo9 { |
176 | /* VDD_RTC */ | 182 | /* VDD_RTC */ |
177 | vin-supply = <&vmain>; | ||
178 | regulator-name = "ldo9"; | 183 | regulator-name = "ldo9"; |
179 | regulator-min-microvolt = <840000>; | 184 | regulator-min-microvolt = <840000>; |
180 | regulator-max-microvolt = <1160000>; | 185 | regulator-max-microvolt = <1160000>; |
@@ -184,7 +189,6 @@ | |||
184 | 189 | ||
185 | ldoln_reg: ldoln { | 190 | ldoln_reg: ldoln { |
186 | /* VDDA_1V8_PLL */ | 191 | /* VDDA_1V8_PLL */ |
187 | vin-supply = <&vmain>; | ||
188 | regulator-name = "ldoln"; | 192 | regulator-name = "ldoln"; |
189 | regulator-min-microvolt = <1800000>; | 193 | regulator-min-microvolt = <1800000>; |
190 | regulator-max-microvolt = <1800000>; | 194 | regulator-max-microvolt = <1800000>; |
@@ -194,7 +198,6 @@ | |||
194 | 198 | ||
195 | ldousb_reg: ldousb { | 199 | ldousb_reg: ldousb { |
196 | /* VDDA_3V_USB: VDDA_USBHS33 */ | 200 | /* VDDA_3V_USB: VDDA_USBHS33 */ |
197 | vin-supply = <&vmain>; | ||
198 | regulator-name = "ldousb"; | 201 | regulator-name = "ldousb"; |
199 | regulator-min-microvolt = <3300000>; | 202 | regulator-min-microvolt = <3300000>; |
200 | regulator-max-microvolt = <3300000>; | 203 | regulator-max-microvolt = <3300000>; |
@@ -204,7 +207,6 @@ | |||
204 | 207 | ||
205 | ldortc_reg: ldortc { | 208 | ldortc_reg: ldortc { |
206 | /* VDDA_RTC */ | 209 | /* VDDA_RTC */ |
207 | vin-supply = <&vmain>; | ||
208 | regulator-name = "ldortc"; | 210 | regulator-name = "ldortc"; |
209 | regulator-min-microvolt = <1800000>; | 211 | regulator-min-microvolt = <1800000>; |
210 | regulator-max-microvolt = <1800000>; | 212 | regulator-max-microvolt = <1800000>; |
diff --git a/arch/arm/boot/dts/dm8148-evm.dts b/arch/arm/boot/dts/dm8148-evm.dts index cbc17b0794b1..4128fa91823c 100644 --- a/arch/arm/boot/dts/dm8148-evm.dts +++ b/arch/arm/boot/dts/dm8148-evm.dts | |||
@@ -93,6 +93,10 @@ | |||
93 | }; | 93 | }; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | &mmc1 { | ||
97 | status = "disabled"; | ||
98 | }; | ||
99 | |||
96 | &mmc2 { | 100 | &mmc2 { |
97 | pinctrl-names = "default"; | 101 | pinctrl-names = "default"; |
98 | pinctrl-0 = <&sd1_pins>; | 102 | pinctrl-0 = <&sd1_pins>; |
@@ -101,6 +105,10 @@ | |||
101 | cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; | 105 | cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; |
102 | }; | 106 | }; |
103 | 107 | ||
108 | &mmc3 { | ||
109 | status = "disabled"; | ||
110 | }; | ||
111 | |||
104 | &pincntl { | 112 | &pincntl { |
105 | sd1_pins: pinmux_sd1_pins { | 113 | sd1_pins: pinmux_sd1_pins { |
106 | pinctrl-single,pins = < | 114 | pinctrl-single,pins = < |
diff --git a/arch/arm/boot/dts/dm8148-t410.dts b/arch/arm/boot/dts/dm8148-t410.dts index 5d4313fd5a46..3f184863e0c5 100644 --- a/arch/arm/boot/dts/dm8148-t410.dts +++ b/arch/arm/boot/dts/dm8148-t410.dts | |||
@@ -45,6 +45,14 @@ | |||
45 | phy-mode = "rgmii"; | 45 | phy-mode = "rgmii"; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | &mmc1 { | ||
49 | status = "disabled"; | ||
50 | }; | ||
51 | |||
52 | &mmc2 { | ||
53 | status = "disabled"; | ||
54 | }; | ||
55 | |||
48 | &mmc3 { | 56 | &mmc3 { |
49 | pinctrl-names = "default"; | 57 | pinctrl-names = "default"; |
50 | pinctrl-0 = <&sd2_pins>; | 58 | pinctrl-0 = <&sd2_pins>; |
@@ -53,6 +61,7 @@ | |||
53 | dmas = <&edma_xbar 8 0 1 /* use SDTXEVT1 instead of MCASP0TX */ | 61 | dmas = <&edma_xbar 8 0 1 /* use SDTXEVT1 instead of MCASP0TX */ |
54 | &edma_xbar 9 0 2>; /* use SDRXEVT1 instead of MCASP0RX */ | 62 | &edma_xbar 9 0 2>; /* use SDRXEVT1 instead of MCASP0RX */ |
55 | dma-names = "tx", "rx"; | 63 | dma-names = "tx", "rx"; |
64 | non-removable; | ||
56 | }; | 65 | }; |
57 | 66 | ||
58 | &pincntl { | 67 | &pincntl { |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index f8b39a5a487a..de559f6e4fee 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
@@ -1451,6 +1451,8 @@ | |||
1451 | ti,hwmods = "gpmc"; | 1451 | ti,hwmods = "gpmc"; |
1452 | reg = <0x50000000 0x37c>; /* device IO registers */ | 1452 | reg = <0x50000000 0x37c>; /* device IO registers */ |
1453 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 1453 | interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
1454 | dmas = <&edma_xbar 4 0>; | ||
1455 | dma-names = "rxtx"; | ||
1454 | gpmc,num-cs = <8>; | 1456 | gpmc,num-cs = <8>; |
1455 | gpmc,num-waitpins = <2>; | 1457 | gpmc,num-waitpins = <2>; |
1456 | #address-cells = <2>; | 1458 | #address-cells = <2>; |
diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi index 4220eeffc65a..5e06020f450b 100644 --- a/arch/arm/boot/dts/dra74x.dtsi +++ b/arch/arm/boot/dts/dra74x.dtsi | |||
@@ -107,8 +107,8 @@ | |||
107 | reg = <0x58000000 0x80>, | 107 | reg = <0x58000000 0x80>, |
108 | <0x58004054 0x4>, | 108 | <0x58004054 0x4>, |
109 | <0x58004300 0x20>, | 109 | <0x58004300 0x20>, |
110 | <0x58005054 0x4>, | 110 | <0x58009054 0x4>, |
111 | <0x58005300 0x20>; | 111 | <0x58009300 0x20>; |
112 | reg-names = "dss", "pll1_clkctrl", "pll1", | 112 | reg-names = "dss", "pll1_clkctrl", "pll1", |
113 | "pll2_clkctrl", "pll2"; | 113 | "pll2_clkctrl", "pll2"; |
114 | 114 | ||
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi index ddfe1f558c10..fa14f77df563 100644 --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi | |||
@@ -242,7 +242,7 @@ | |||
242 | hpd-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>; | 242 | hpd-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>; |
243 | 243 | ||
244 | ports { | 244 | ports { |
245 | port0 { | 245 | port { |
246 | dp_out: endpoint { | 246 | dp_out: endpoint { |
247 | remote-endpoint = <&bridge_in>; | 247 | remote-endpoint = <&bridge_in>; |
248 | }; | 248 | }; |
@@ -485,13 +485,20 @@ | |||
485 | edid-emulation = <5>; | 485 | edid-emulation = <5>; |
486 | 486 | ||
487 | ports { | 487 | ports { |
488 | port0 { | 488 | #address-cells = <1>; |
489 | #size-cells = <0>; | ||
490 | |||
491 | port@0 { | ||
492 | reg = <0>; | ||
493 | |||
489 | bridge_out: endpoint { | 494 | bridge_out: endpoint { |
490 | remote-endpoint = <&panel_in>; | 495 | remote-endpoint = <&panel_in>; |
491 | }; | 496 | }; |
492 | }; | 497 | }; |
493 | 498 | ||
494 | port1 { | 499 | port@1 { |
500 | reg = <1>; | ||
501 | |||
495 | bridge_in: endpoint { | 502 | bridge_in: endpoint { |
496 | remote-endpoint = <&dp_out>; | 503 | remote-endpoint = <&dp_out>; |
497 | }; | 504 | }; |
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index f9d2e4f1a0e0..1de972d46a87 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts | |||
@@ -163,7 +163,7 @@ | |||
163 | hpd-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>; | 163 | hpd-gpios = <&gpx2 6 GPIO_ACTIVE_HIGH>; |
164 | 164 | ||
165 | ports { | 165 | ports { |
166 | port0 { | 166 | port { |
167 | dp_out: endpoint { | 167 | dp_out: endpoint { |
168 | remote-endpoint = <&bridge_in>; | 168 | remote-endpoint = <&bridge_in>; |
169 | }; | 169 | }; |
@@ -631,13 +631,20 @@ | |||
631 | use-external-pwm; | 631 | use-external-pwm; |
632 | 632 | ||
633 | ports { | 633 | ports { |
634 | port0 { | 634 | #address-cells = <1>; |
635 | #size-cells = <0>; | ||
636 | |||
637 | port@0 { | ||
638 | reg = <0>; | ||
639 | |||
635 | bridge_out: endpoint { | 640 | bridge_out: endpoint { |
636 | remote-endpoint = <&panel_in>; | 641 | remote-endpoint = <&panel_in>; |
637 | }; | 642 | }; |
638 | }; | 643 | }; |
639 | 644 | ||
640 | port1 { | 645 | port@1 { |
646 | reg = <1>; | ||
647 | |||
641 | bridge_in: endpoint { | 648 | bridge_in: endpoint { |
642 | remote-endpoint = <&dp_out>; | 649 | remote-endpoint = <&dp_out>; |
643 | }; | 650 | }; |
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts b/arch/arm/boot/dts/omap3-evm-37xx.dts index 76056ba92ced..ed449827c3d3 100644 --- a/arch/arm/boot/dts/omap3-evm-37xx.dts +++ b/arch/arm/boot/dts/omap3-evm-37xx.dts | |||
@@ -85,7 +85,7 @@ | |||
85 | OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ | 85 | OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ |
86 | OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ | 86 | OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ |
87 | OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ | 87 | OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ |
88 | OMAP3_CORE1_IOPAD(0x215e, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ | 88 | OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ |
89 | OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ | 89 | OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ |
90 | OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ | 90 | OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ |
91 | >; | 91 | >; |
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index 41f5d386f21f..f4f2ce46d681 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi | |||
@@ -188,6 +188,7 @@ | |||
188 | vmmc-supply = <&vmmc1>; | 188 | vmmc-supply = <&vmmc1>; |
189 | vmmc_aux-supply = <&vsim>; | 189 | vmmc_aux-supply = <&vsim>; |
190 | bus-width = <4>; | 190 | bus-width = <4>; |
191 | cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>; | ||
191 | }; | 192 | }; |
192 | 193 | ||
193 | &mmc3 { | 194 | &mmc3 { |
diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi index d6f839cab649..b6971060648a 100644 --- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi +++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi | |||
@@ -194,6 +194,12 @@ | |||
194 | OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */ | 194 | OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */ |
195 | >; | 195 | >; |
196 | }; | 196 | }; |
197 | |||
198 | mmc1_wp_pins: pinmux_mmc1_cd_pins { | ||
199 | pinctrl-single,pins = < | ||
200 | OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4) /* etk_d15.gpio_29 */ | ||
201 | >; | ||
202 | }; | ||
197 | }; | 203 | }; |
198 | 204 | ||
199 | &i2c3 { | 205 | &i2c3 { |
@@ -250,3 +256,8 @@ | |||
250 | }; | 256 | }; |
251 | }; | 257 | }; |
252 | }; | 258 | }; |
259 | |||
260 | &mmc1 { | ||
261 | pinctrl-0 = <&mmc1_pins &mmc1_wp_pins>; | ||
262 | wp-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; /* gpio_29 */ | ||
263 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index d9e2d9c6e999..2b74a81d1de2 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
@@ -288,7 +288,7 @@ | |||
288 | pinctrl-single,pins = < | 288 | pinctrl-single,pins = < |
289 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */ | 289 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */ |
290 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE1) /* ssi1_flag_tx */ | 290 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE1) /* ssi1_flag_tx */ |
291 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */ | 291 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | MUX_MODE4) /* ssi1_wake_tx (cawake) */ |
292 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE1) /* ssi1_dat_tx */ | 292 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE1) /* ssi1_dat_tx */ |
293 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE1) /* ssi1_dat_rx */ | 293 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE1) /* ssi1_dat_rx */ |
294 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE1) /* ssi1_flag_rx */ | 294 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE1) /* ssi1_flag_rx */ |
@@ -300,7 +300,7 @@ | |||
300 | modem_pins: pinmux_modem { | 300 | modem_pins: pinmux_modem { |
301 | pinctrl-single,pins = < | 301 | pinctrl-single,pins = < |
302 | OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE4) /* gpio 70 => cmt_apeslpx */ | 302 | OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE4) /* gpio 70 => cmt_apeslpx */ |
303 | OMAP3_CORE1_IOPAD(0x20e0, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio 72 => ape_rst_rq */ | 303 | OMAP3_CORE1_IOPAD(0x20e0, PIN_INPUT | MUX_MODE4) /* gpio 72 => ape_rst_rq */ |
304 | OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE4) /* gpio 73 => cmt_rst_rq */ | 304 | OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE4) /* gpio 73 => cmt_rst_rq */ |
305 | OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE4) /* gpio 74 => cmt_en */ | 305 | OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE4) /* gpio 74 => cmt_en */ |
306 | OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE4) /* gpio 75 => cmt_rst */ | 306 | OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE4) /* gpio 75 => cmt_rst */ |
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi index a00ca761675d..927b17fc4ed8 100644 --- a/arch/arm/boot/dts/omap3-n950-n9.dtsi +++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi | |||
@@ -97,7 +97,7 @@ | |||
97 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE1) /* ssi1_dat_tx */ | 97 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE1) /* ssi1_dat_tx */ |
98 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE1) /* ssi1_flag_tx */ | 98 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE1) /* ssi1_flag_tx */ |
99 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */ | 99 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */ |
100 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */ | 100 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | MUX_MODE4) /* ssi1_wake_tx (cawake) */ |
101 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE1) /* ssi1_dat_rx */ | 101 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE1) /* ssi1_dat_rx */ |
102 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE1) /* ssi1_flag_rx */ | 102 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE1) /* ssi1_flag_rx */ |
103 | OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE1) /* ssi1_rdy_rx */ | 103 | OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE1) /* ssi1_rdy_rx */ |
@@ -110,7 +110,7 @@ | |||
110 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE7) /* ssi1_dat_tx */ | 110 | OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE7) /* ssi1_dat_tx */ |
111 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE7) /* ssi1_flag_tx */ | 111 | OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE7) /* ssi1_flag_tx */ |
112 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLDOWN | MUX_MODE7) /* ssi1_rdy_tx */ | 112 | OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLDOWN | MUX_MODE7) /* ssi1_rdy_tx */ |
113 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */ | 113 | OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | MUX_MODE4) /* ssi1_wake_tx (cawake) */ |
114 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE7) /* ssi1_dat_rx */ | 114 | OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE7) /* ssi1_dat_rx */ |
115 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE7) /* ssi1_flag_rx */ | 115 | OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE7) /* ssi1_flag_rx */ |
116 | OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE4) /* ssi1_rdy_rx */ | 116 | OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE4) /* ssi1_rdy_rx */ |
@@ -120,7 +120,7 @@ | |||
120 | 120 | ||
121 | modem_pins1: pinmux_modem_core1_pins { | 121 | modem_pins1: pinmux_modem_core1_pins { |
122 | pinctrl-single,pins = < | 122 | pinctrl-single,pins = < |
123 | OMAP3_CORE1_IOPAD(0x207a, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio_34 (ape_rst_rq) */ | 123 | OMAP3_CORE1_IOPAD(0x207a, PIN_INPUT | MUX_MODE4) /* gpio_34 (ape_rst_rq) */ |
124 | OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE4) /* gpio_88 (cmt_rst_rq) */ | 124 | OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE4) /* gpio_88 (cmt_rst_rq) */ |
125 | OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE4) /* gpio_93 (cmt_apeslpx) */ | 125 | OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE4) /* gpio_93 (cmt_apeslpx) */ |
126 | >; | 126 | >; |
diff --git a/arch/arm/boot/dts/omap3-zoom3.dts b/arch/arm/boot/dts/omap3-zoom3.dts index f19170bdcc1f..c29b41dc7b95 100644 --- a/arch/arm/boot/dts/omap3-zoom3.dts +++ b/arch/arm/boot/dts/omap3-zoom3.dts | |||
@@ -98,7 +98,7 @@ | |||
98 | pinctrl-single,pins = < | 98 | pinctrl-single,pins = < |
99 | OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */ | 99 | OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */ |
100 | OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0) /* uart2_rts.uart2_rts */ | 100 | OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0) /* uart2_rts.uart2_rts */ |
101 | OMAP3_CORE1_IOPAD(0x217a, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */ | 101 | OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */ |
102 | OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */ | 102 | OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */ |
103 | >; | 103 | >; |
104 | }; | 104 | }; |
@@ -107,7 +107,7 @@ | |||
107 | pinctrl-single,pins = < | 107 | pinctrl-single,pins = < |
108 | OMAP3_CORE1_IOPAD(0x219a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */ | 108 | OMAP3_CORE1_IOPAD(0x219a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */ |
109 | OMAP3_CORE1_IOPAD(0x219c, PIN_OUTPUT | MUX_MODE0) /* uart3_rts_sd.uart3_rts_sd */ | 109 | OMAP3_CORE1_IOPAD(0x219c, PIN_OUTPUT | MUX_MODE0) /* uart3_rts_sd.uart3_rts_sd */ |
110 | OMAP3_CORE1_IOPAD(0x219e, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */ | 110 | OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */ |
111 | OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ | 111 | OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ |
112 | >; | 112 | >; |
113 | }; | 113 | }; |
@@ -125,7 +125,7 @@ | |||
125 | pinctrl-single,pins = < | 125 | pinctrl-single,pins = < |
126 | OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_clk.sdmmc3_clk */ | 126 | OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_clk.sdmmc3_clk */ |
127 | OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d4.sdmmc3_dat0 */ | 127 | OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d4.sdmmc3_dat0 */ |
128 | OMAP3630_CORE2_IOPAD(0x25e6, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */ | 128 | OMAP3630_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */ |
129 | OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d6.sdmmc3_dat2 */ | 129 | OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d6.sdmmc3_dat2 */ |
130 | OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d3.sdmmc3_dat3 */ | 130 | OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d3.sdmmc3_dat3 */ |
131 | >; | 131 | >; |
diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi index dc759a3028b7..5d5b620b7d9b 100644 --- a/arch/arm/boot/dts/omap5-board-common.dtsi +++ b/arch/arm/boot/dts/omap5-board-common.dtsi | |||
@@ -14,6 +14,29 @@ | |||
14 | display0 = &hdmi0; | 14 | display0 = &hdmi0; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | vmain: fixedregulator-vmain { | ||
18 | compatible = "regulator-fixed"; | ||
19 | regulator-name = "vmain"; | ||
20 | regulator-min-microvolt = <5000000>; | ||
21 | regulator-max-microvolt = <5000000>; | ||
22 | }; | ||
23 | |||
24 | vsys_cobra: fixedregulator-vsys_cobra { | ||
25 | compatible = "regulator-fixed"; | ||
26 | regulator-name = "vsys_cobra"; | ||
27 | vin-supply = <&vmain>; | ||
28 | regulator-min-microvolt = <5000000>; | ||
29 | regulator-max-microvolt = <5000000>; | ||
30 | }; | ||
31 | |||
32 | vdds_1v8_main: fixedregulator-vdds_1v8_main { | ||
33 | compatible = "regulator-fixed"; | ||
34 | regulator-name = "vdds_1v8_main"; | ||
35 | vin-supply = <&smps7_reg>; | ||
36 | regulator-min-microvolt = <1800000>; | ||
37 | regulator-max-microvolt = <1800000>; | ||
38 | }; | ||
39 | |||
17 | vmmcsd_fixed: fixedregulator-mmcsd { | 40 | vmmcsd_fixed: fixedregulator-mmcsd { |
18 | compatible = "regulator-fixed"; | 41 | compatible = "regulator-fixed"; |
19 | regulator-name = "vmmcsd_fixed"; | 42 | regulator-name = "vmmcsd_fixed"; |
@@ -309,7 +332,7 @@ | |||
309 | 332 | ||
310 | wlcore_irq_pin: pinmux_wlcore_irq_pin { | 333 | wlcore_irq_pin: pinmux_wlcore_irq_pin { |
311 | pinctrl-single,pins = < | 334 | pinctrl-single,pins = < |
312 | OMAP5_IOPAD(0x40, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE6) /* llia_wakereqin.gpio1_wk14 */ | 335 | OMAP5_IOPAD(0x40, PIN_INPUT_PULLUP | MUX_MODE6) /* llia_wakereqin.gpio1_wk14 */ |
313 | >; | 336 | >; |
314 | }; | 337 | }; |
315 | }; | 338 | }; |
@@ -409,6 +432,26 @@ | |||
409 | 432 | ||
410 | ti,ldo6-vibrator; | 433 | ti,ldo6-vibrator; |
411 | 434 | ||
435 | smps123-in-supply = <&vsys_cobra>; | ||
436 | smps45-in-supply = <&vsys_cobra>; | ||
437 | smps6-in-supply = <&vsys_cobra>; | ||
438 | smps7-in-supply = <&vsys_cobra>; | ||
439 | smps8-in-supply = <&vsys_cobra>; | ||
440 | smps9-in-supply = <&vsys_cobra>; | ||
441 | smps10_out2-in-supply = <&vsys_cobra>; | ||
442 | smps10_out1-in-supply = <&vsys_cobra>; | ||
443 | ldo1-in-supply = <&vsys_cobra>; | ||
444 | ldo2-in-supply = <&vsys_cobra>; | ||
445 | ldo3-in-supply = <&vdds_1v8_main>; | ||
446 | ldo4-in-supply = <&vdds_1v8_main>; | ||
447 | ldo5-in-supply = <&vsys_cobra>; | ||
448 | ldo6-in-supply = <&vdds_1v8_main>; | ||
449 | ldo7-in-supply = <&vsys_cobra>; | ||
450 | ldo8-in-supply = <&vsys_cobra>; | ||
451 | ldo9-in-supply = <&vmmcsd_fixed>; | ||
452 | ldoln-in-supply = <&vsys_cobra>; | ||
453 | ldousb-in-supply = <&vsys_cobra>; | ||
454 | |||
412 | regulators { | 455 | regulators { |
413 | smps123_reg: smps123 { | 456 | smps123_reg: smps123 { |
414 | /* VDD_OPP_MPU */ | 457 | /* VDD_OPP_MPU */ |
@@ -600,7 +643,8 @@ | |||
600 | pinctrl-0 = <&twl6040_pins>; | 643 | pinctrl-0 = <&twl6040_pins>; |
601 | 644 | ||
602 | interrupts = <GIC_SPI 119 IRQ_TYPE_NONE>; /* IRQ_SYS_2N cascaded to gic */ | 645 | interrupts = <GIC_SPI 119 IRQ_TYPE_NONE>; /* IRQ_SYS_2N cascaded to gic */ |
603 | ti,audpwron-gpio = <&gpio5 13 GPIO_ACTIVE_HIGH>; /* gpio line 141 */ | 646 | |
647 | /* audpwron gpio defined in the board specific dts */ | ||
604 | 648 | ||
605 | vio-supply = <&smps7_reg>; | 649 | vio-supply = <&smps7_reg>; |
606 | v2v1-supply = <&smps9_reg>; | 650 | v2v1-supply = <&smps9_reg>; |
diff --git a/arch/arm/boot/dts/omap5-igep0050.dts b/arch/arm/boot/dts/omap5-igep0050.dts index 46ecb1dd3b5c..f75ce02fb398 100644 --- a/arch/arm/boot/dts/omap5-igep0050.dts +++ b/arch/arm/boot/dts/omap5-igep0050.dts | |||
@@ -35,6 +35,22 @@ | |||
35 | }; | 35 | }; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* LDO4 is VPP1 - ball AD9 */ | ||
39 | &ldo4_reg { | ||
40 | regulator-min-microvolt = <2000000>; | ||
41 | regulator-max-microvolt = <2000000>; | ||
42 | }; | ||
43 | |||
44 | /* | ||
45 | * LDO7 is used for HDMI: VDDA_DSIPORTA - ball AA33, VDDA_DSIPORTC - ball AE33, | ||
46 | * VDDA_HDMI - ball AN25 | ||
47 | */ | ||
48 | &ldo7_reg { | ||
49 | status = "okay"; | ||
50 | regulator-min-microvolt = <1800000>; | ||
51 | regulator-max-microvolt = <1800000>; | ||
52 | }; | ||
53 | |||
38 | &omap5_pmx_core { | 54 | &omap5_pmx_core { |
39 | i2c4_pins: pinmux_i2c4_pins { | 55 | i2c4_pins: pinmux_i2c4_pins { |
40 | pinctrl-single,pins = < | 56 | pinctrl-single,pins = < |
@@ -52,3 +68,13 @@ | |||
52 | <&gpio7 3 0>; /* 195, SDA */ | 68 | <&gpio7 3 0>; /* 195, SDA */ |
53 | }; | 69 | }; |
54 | 70 | ||
71 | &twl6040 { | ||
72 | ti,audpwron-gpio = <&gpio5 16 GPIO_ACTIVE_HIGH>; /* gpio line 144 */ | ||
73 | }; | ||
74 | |||
75 | &twl6040_pins { | ||
76 | pinctrl-single,pins = < | ||
77 | OMAP5_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE6) /* mcspi1_somi.gpio5_144 */ | ||
78 | OMAP5_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE6) /* perslimbus2_clock.gpio5_145 */ | ||
79 | >; | ||
80 | }; | ||
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts index 60b3fbb3bf07..a51e60518eb6 100644 --- a/arch/arm/boot/dts/omap5-uevm.dts +++ b/arch/arm/boot/dts/omap5-uevm.dts | |||
@@ -51,3 +51,13 @@ | |||
51 | <&gpio9 1 GPIO_ACTIVE_HIGH>, /* TCA6424A P00, LS OE */ | 51 | <&gpio9 1 GPIO_ACTIVE_HIGH>, /* TCA6424A P00, LS OE */ |
52 | <&gpio7 1 GPIO_ACTIVE_HIGH>; /* GPIO 193, HPD */ | 52 | <&gpio7 1 GPIO_ACTIVE_HIGH>; /* GPIO 193, HPD */ |
53 | }; | 53 | }; |
54 | |||
55 | &twl6040 { | ||
56 | ti,audpwron-gpio = <&gpio5 13 GPIO_ACTIVE_HIGH>; /* gpio line 141 */ | ||
57 | }; | ||
58 | |||
59 | &twl6040_pins { | ||
60 | pinctrl-single,pins = < | ||
61 | OMAP5_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE6) /* mcspi1_somi.gpio5_141 */ | ||
62 | >; | ||
63 | }; | ||
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts b/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts index a3601e4c0a2e..b844473601d2 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | |||
@@ -136,6 +136,7 @@ | |||
136 | &gmac1 { | 136 | &gmac1 { |
137 | status = "okay"; | 137 | status = "okay"; |
138 | phy-mode = "rgmii"; | 138 | phy-mode = "rgmii"; |
139 | phy-handle = <&phy1>; | ||
139 | 140 | ||
140 | snps,reset-gpio = <&porta 0 GPIO_ACTIVE_LOW>; | 141 | snps,reset-gpio = <&porta 0 GPIO_ACTIVE_LOW>; |
141 | snps,reset-active-low; | 142 | snps,reset-active-low; |
diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index ad8ba10764a3..d294e82447a2 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi | |||
@@ -24,18 +24,21 @@ | |||
24 | compatible = "shared-dma-pool"; | 24 | compatible = "shared-dma-pool"; |
25 | reg = <0x40000000 0x01000000>; | 25 | reg = <0x40000000 0x01000000>; |
26 | no-map; | 26 | no-map; |
27 | status = "disabled"; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | gp1_reserved: rproc@41000000 { | 30 | gp1_reserved: rproc@41000000 { |
30 | compatible = "shared-dma-pool"; | 31 | compatible = "shared-dma-pool"; |
31 | reg = <0x41000000 0x01000000>; | 32 | reg = <0x41000000 0x01000000>; |
32 | no-map; | 33 | no-map; |
34 | status = "disabled"; | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | audio_reserved: rproc@42000000 { | 37 | audio_reserved: rproc@42000000 { |
36 | compatible = "shared-dma-pool"; | 38 | compatible = "shared-dma-pool"; |
37 | reg = <0x42000000 0x01000000>; | 39 | reg = <0x42000000 0x01000000>; |
38 | no-map; | 40 | no-map; |
41 | status = "disabled"; | ||
39 | }; | 42 | }; |
40 | 43 | ||
41 | dmu_reserved: rproc@43000000 { | 44 | dmu_reserved: rproc@43000000 { |
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts index 68b479b8772c..73c133f5e79c 100644 --- a/arch/arm/boot/dts/sun6i-a31s-primo81.dts +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts | |||
@@ -176,8 +176,6 @@ | |||
176 | }; | 176 | }; |
177 | 177 | ||
178 | ®_dc1sw { | 178 | ®_dc1sw { |
179 | regulator-min-microvolt = <3000000>; | ||
180 | regulator-max-microvolt = <3000000>; | ||
181 | regulator-name = "vcc-lcd"; | 179 | regulator-name = "vcc-lcd"; |
182 | }; | 180 | }; |
183 | 181 | ||
diff --git a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts index 360adfb1e9ca..d6ad6196a768 100644 --- a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +++ b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | |||
@@ -135,8 +135,6 @@ | |||
135 | 135 | ||
136 | ®_dc1sw { | 136 | ®_dc1sw { |
137 | regulator-name = "vcc-lcd-usb2"; | 137 | regulator-name = "vcc-lcd-usb2"; |
138 | regulator-min-microvolt = <3000000>; | ||
139 | regulator-max-microvolt = <3000000>; | ||
140 | }; | 138 | }; |
141 | 139 | ||
142 | ®_dc5ldo { | 140 | ®_dc5ldo { |
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index 10f49ab5328e..47195e8690b4 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig | |||
@@ -82,6 +82,7 @@ CONFIG_TOUCHSCREEN_MMS114=y | |||
82 | CONFIG_INPUT_MISC=y | 82 | CONFIG_INPUT_MISC=y |
83 | CONFIG_INPUT_MAX77693_HAPTIC=y | 83 | CONFIG_INPUT_MAX77693_HAPTIC=y |
84 | CONFIG_INPUT_MAX8997_HAPTIC=y | 84 | CONFIG_INPUT_MAX8997_HAPTIC=y |
85 | CONFIG_KEYBOARD_SAMSUNG=y | ||
85 | CONFIG_SERIAL_8250=y | 86 | CONFIG_SERIAL_8250=y |
86 | CONFIG_SERIAL_SAMSUNG=y | 87 | CONFIG_SERIAL_SAMSUNG=y |
87 | CONFIG_SERIAL_SAMSUNG_CONSOLE=y | 88 | CONFIG_SERIAL_SAMSUNG_CONSOLE=y |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 8f857564657f..8a5fff1b7f6f 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -264,6 +264,7 @@ CONFIG_KEYBOARD_TEGRA=y | |||
264 | CONFIG_KEYBOARD_SPEAR=y | 264 | CONFIG_KEYBOARD_SPEAR=y |
265 | CONFIG_KEYBOARD_ST_KEYSCAN=y | 265 | CONFIG_KEYBOARD_ST_KEYSCAN=y |
266 | CONFIG_KEYBOARD_CROS_EC=m | 266 | CONFIG_KEYBOARD_CROS_EC=m |
267 | CONFIG_KEYBOARD_SAMSUNG=m | ||
267 | CONFIG_MOUSE_PS2_ELANTECH=y | 268 | CONFIG_MOUSE_PS2_ELANTECH=y |
268 | CONFIG_MOUSE_CYAPA=m | 269 | CONFIG_MOUSE_CYAPA=m |
269 | CONFIG_MOUSE_ELAN_I2C=y | 270 | CONFIG_MOUSE_ELAN_I2C=y |
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h index 19cfab526d13..20febb368844 100644 --- a/arch/arm/include/asm/pgalloc.h +++ b/arch/arm/include/asm/pgalloc.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 30 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
31 | { | 31 | { |
32 | return (pmd_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); | 32 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); |
33 | } | 33 | } |
34 | 34 | ||
35 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | 35 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h index aeddd28b3595..92fd2c8a9af0 100644 --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h | |||
@@ -193,6 +193,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
193 | 193 | ||
194 | #define pmd_large(pmd) (pmd_val(pmd) & 2) | 194 | #define pmd_large(pmd) (pmd_val(pmd) & 2) |
195 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) | 195 | #define pmd_bad(pmd) (pmd_val(pmd) & 2) |
196 | #define pmd_present(pmd) (pmd_val(pmd)) | ||
196 | 197 | ||
197 | #define copy_pmd(pmdpd,pmdps) \ | 198 | #define copy_pmd(pmdpd,pmdps) \ |
198 | do { \ | 199 | do { \ |
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index fa70db7c714b..2a029bceaf2f 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h | |||
@@ -211,6 +211,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
211 | : !!(pmd_val(pmd) & (val))) | 211 | : !!(pmd_val(pmd) & (val))) |
212 | #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) | 212 | #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val))) |
213 | 213 | ||
214 | #define pmd_present(pmd) (pmd_isset((pmd), L_PMD_SECT_VALID)) | ||
214 | #define pmd_young(pmd) (pmd_isset((pmd), PMD_SECT_AF)) | 215 | #define pmd_young(pmd) (pmd_isset((pmd), PMD_SECT_AF)) |
215 | #define pte_special(pte) (pte_isset((pte), L_PTE_SPECIAL)) | 216 | #define pte_special(pte) (pte_isset((pte), L_PTE_SPECIAL)) |
216 | static inline pte_t pte_mkspecial(pte_t pte) | 217 | static inline pte_t pte_mkspecial(pte_t pte) |
@@ -249,10 +250,10 @@ PMD_BIT_FUNC(mkyoung, |= PMD_SECT_AF); | |||
249 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 250 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
250 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) | 251 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) |
251 | 252 | ||
252 | /* represent a notpresent pmd by zero, this is used by pmdp_invalidate */ | 253 | /* represent a notpresent pmd by faulting entry, this is used by pmdp_invalidate */ |
253 | static inline pmd_t pmd_mknotpresent(pmd_t pmd) | 254 | static inline pmd_t pmd_mknotpresent(pmd_t pmd) |
254 | { | 255 | { |
255 | return __pmd(0); | 256 | return __pmd(pmd_val(pmd) & ~L_PMD_SECT_VALID); |
256 | } | 257 | } |
257 | 258 | ||
258 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | 259 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 348caabb7625..d62204060cbe 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -182,7 +182,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
182 | #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) | 182 | #define pgd_offset_k(addr) pgd_offset(&init_mm, addr) |
183 | 183 | ||
184 | #define pmd_none(pmd) (!pmd_val(pmd)) | 184 | #define pmd_none(pmd) (!pmd_val(pmd)) |
185 | #define pmd_present(pmd) (pmd_val(pmd)) | ||
186 | 185 | ||
187 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) | 186 | static inline pte_t *pmd_page_vaddr(pmd_t pmd) |
188 | { | 187 | { |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index df90bc59bfce..861521606c6d 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -486,7 +486,7 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = { | |||
486 | 486 | ||
487 | static void smp_cross_call(const struct cpumask *target, unsigned int ipinr) | 487 | static void smp_cross_call(const struct cpumask *target, unsigned int ipinr) |
488 | { | 488 | { |
489 | trace_ipi_raise(target, ipi_types[ipinr]); | 489 | trace_ipi_raise_rcuidle(target, ipi_types[ipinr]); |
490 | __smp_cross_call(target, ipinr); | 490 | __smp_cross_call(target, ipinr); |
491 | } | 491 | } |
492 | 492 | ||
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e65aa7d11b20..20dcf6e904b2 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -61,7 +61,6 @@ config ARCH_EXYNOS4 | |||
61 | select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 | 61 | select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210 |
62 | select CPU_EXYNOS4210 | 62 | select CPU_EXYNOS4210 |
63 | select GIC_NON_BANKED | 63 | select GIC_NON_BANKED |
64 | select KEYBOARD_SAMSUNG if INPUT_KEYBOARD | ||
65 | select MIGHT_HAVE_CACHE_L2X0 | 64 | select MIGHT_HAVE_CACHE_L2X0 |
66 | help | 65 | help |
67 | Samsung EXYNOS4 (Cortex-A9) SoC based systems | 66 | Samsung EXYNOS4 (Cortex-A9) SoC based systems |
diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c index a38b16b69923..b56de4b8cdf2 100644 --- a/arch/arm/mach-imx/mach-imx6ul.c +++ b/arch/arm/mach-imx/mach-imx6ul.c | |||
@@ -46,7 +46,7 @@ static int ksz8081_phy_fixup(struct phy_device *dev) | |||
46 | static void __init imx6ul_enet_phy_init(void) | 46 | static void __init imx6ul_enet_phy_init(void) |
47 | { | 47 | { |
48 | if (IS_BUILTIN(CONFIG_PHYLIB)) | 48 | if (IS_BUILTIN(CONFIG_PHYLIB)) |
49 | phy_register_fixup_for_uid(PHY_ID_KSZ8081, 0xffffffff, | 49 | phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK, |
50 | ksz8081_phy_fixup); | 50 | ksz8081_phy_fixup); |
51 | } | 51 | } |
52 | 52 | ||
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index 5d7fb596bf4a..bf608441b357 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S | |||
@@ -43,8 +43,8 @@ | |||
43 | #define OTHERS_MASK (MODEM_IRQ_MASK | HOOK_SWITCH_MASK) | 43 | #define OTHERS_MASK (MODEM_IRQ_MASK | HOOK_SWITCH_MASK) |
44 | 44 | ||
45 | /* IRQ handler register bitmasks */ | 45 | /* IRQ handler register bitmasks */ |
46 | #define DEFERRED_FIQ_MASK (0x1 << (INT_DEFERRED_FIQ % IH2_BASE)) | 46 | #define DEFERRED_FIQ_MASK OMAP_IRQ_BIT(INT_DEFERRED_FIQ) |
47 | #define GPIO_BANK1_MASK (0x1 << INT_GPIO_BANK1) | 47 | #define GPIO_BANK1_MASK OMAP_IRQ_BIT(INT_GPIO_BANK1) |
48 | 48 | ||
49 | /* Driver buffer byte offsets */ | 49 | /* Driver buffer byte offsets */ |
50 | #define BUF_MASK (FIQ_MASK * 4) | 50 | #define BUF_MASK (FIQ_MASK * 4) |
@@ -110,7 +110,7 @@ ENTRY(qwerty_fiqin_start) | |||
110 | mov r8, #2 @ reset FIQ agreement | 110 | mov r8, #2 @ reset FIQ agreement |
111 | str r8, [r12, #IRQ_CONTROL_REG_OFFSET] | 111 | str r8, [r12, #IRQ_CONTROL_REG_OFFSET] |
112 | 112 | ||
113 | cmp r10, #INT_GPIO_BANK1 @ is it GPIO bank interrupt? | 113 | cmp r10, #(INT_GPIO_BANK1 - NR_IRQS_LEGACY) @ is it GPIO interrupt? |
114 | beq gpio @ yes - process it | 114 | beq gpio @ yes - process it |
115 | 115 | ||
116 | mov r8, #1 | 116 | mov r8, #1 |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index d1f12095f315..ec760ae2f917 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
@@ -109,7 +109,8 @@ void __init ams_delta_init_fiq(void) | |||
109 | * Since no set_type() method is provided by OMAP irq chip, | 109 | * Since no set_type() method is provided by OMAP irq chip, |
110 | * switch to edge triggered interrupt type manually. | 110 | * switch to edge triggered interrupt type manually. |
111 | */ | 111 | */ |
112 | offset = IRQ_ILR0_REG_OFFSET + INT_DEFERRED_FIQ * 0x4; | 112 | offset = IRQ_ILR0_REG_OFFSET + |
113 | ((INT_DEFERRED_FIQ - NR_IRQS_LEGACY) & 0x1f) * 0x4; | ||
113 | val = omap_readl(DEFERRED_FIQ_IH_BASE + offset) & ~(1 << 1); | 114 | val = omap_readl(DEFERRED_FIQ_IH_BASE + offset) & ~(1 << 1); |
114 | omap_writel(val, DEFERRED_FIQ_IH_BASE + offset); | 115 | omap_writel(val, DEFERRED_FIQ_IH_BASE + offset); |
115 | 116 | ||
@@ -149,7 +150,7 @@ void __init ams_delta_init_fiq(void) | |||
149 | /* | 150 | /* |
150 | * Redirect GPIO interrupts to FIQ | 151 | * Redirect GPIO interrupts to FIQ |
151 | */ | 152 | */ |
152 | offset = IRQ_ILR0_REG_OFFSET + INT_GPIO_BANK1 * 0x4; | 153 | offset = IRQ_ILR0_REG_OFFSET + (INT_GPIO_BANK1 - NR_IRQS_LEGACY) * 0x4; |
153 | val = omap_readl(OMAP_IH1_BASE + offset) | 1; | 154 | val = omap_readl(OMAP_IH1_BASE + offset) | 1; |
154 | omap_writel(val, OMAP_IH1_BASE + offset); | 155 | omap_writel(val, OMAP_IH1_BASE + offset); |
155 | } | 156 | } |
diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h index adb5e7649659..6dfc3e1210a3 100644 --- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +++ b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef __AMS_DELTA_FIQ_H | 14 | #ifndef __AMS_DELTA_FIQ_H |
15 | #define __AMS_DELTA_FIQ_H | 15 | #define __AMS_DELTA_FIQ_H |
16 | 16 | ||
17 | #include <mach/irqs.h> | ||
18 | |||
17 | /* | 19 | /* |
18 | * Interrupt number used for passing control from FIQ to IRQ. | 20 | * Interrupt number used for passing control from FIQ to IRQ. |
19 | * IRQ12, described as reserved, has been selected. | 21 | * IRQ12, described as reserved, has been selected. |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 0517f0c1581a..1a648e9dfaa0 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -17,6 +17,7 @@ config ARCH_OMAP3 | |||
17 | select PM_OPP if PM | 17 | select PM_OPP if PM |
18 | select PM if CPU_IDLE | 18 | select PM if CPU_IDLE |
19 | select SOC_HAS_OMAP2_SDRC | 19 | select SOC_HAS_OMAP2_SDRC |
20 | select ARM_ERRATA_430973 | ||
20 | 21 | ||
21 | config ARCH_OMAP4 | 22 | config ARCH_OMAP4 |
22 | bool "TI OMAP4" | 23 | bool "TI OMAP4" |
@@ -36,6 +37,7 @@ config ARCH_OMAP4 | |||
36 | select PM if CPU_IDLE | 37 | select PM if CPU_IDLE |
37 | select ARM_ERRATA_754322 | 38 | select ARM_ERRATA_754322 |
38 | select ARM_ERRATA_775420 | 39 | select ARM_ERRATA_775420 |
40 | select OMAP_INTERCONNECT | ||
39 | 41 | ||
40 | config SOC_OMAP5 | 42 | config SOC_OMAP5 |
41 | bool "TI OMAP5" | 43 | bool "TI OMAP5" |
@@ -67,6 +69,8 @@ config SOC_AM43XX | |||
67 | select HAVE_ARM_SCU | 69 | select HAVE_ARM_SCU |
68 | select GENERIC_CLOCKEVENTS_BROADCAST | 70 | select GENERIC_CLOCKEVENTS_BROADCAST |
69 | select HAVE_ARM_TWD | 71 | select HAVE_ARM_TWD |
72 | select ARM_ERRATA_754322 | ||
73 | select ARM_ERRATA_775420 | ||
70 | 74 | ||
71 | config SOC_DRA7XX | 75 | config SOC_DRA7XX |
72 | bool "TI DRA7XX" | 76 | bool "TI DRA7XX" |
@@ -240,4 +244,12 @@ endmenu | |||
240 | 244 | ||
241 | endif | 245 | endif |
242 | 246 | ||
247 | config OMAP5_ERRATA_801819 | ||
248 | bool "Errata 801819: An eviction from L1 data cache might stall indefinitely" | ||
249 | depends on SOC_OMAP5 || SOC_DRA7XX | ||
250 | help | ||
251 | A livelock can occur in the L2 cache arbitration that might prevent | ||
252 | a snoop from completing. Under certain conditions this can cause the | ||
253 | system to deadlock. | ||
254 | |||
243 | endmenu | 255 | endmenu |
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h index af2851fbcdf0..bae263fba640 100644 --- a/arch/arm/mach-omap2/omap-secure.h +++ b/arch/arm/mach-omap2/omap-secure.h | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109 | 47 | #define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109 |
48 | #define OMAP5_MON_AMBA_IF_INDEX 0x108 | 48 | #define OMAP5_MON_AMBA_IF_INDEX 0x108 |
49 | #define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107 | ||
49 | 50 | ||
50 | /* Secure PPA(Primary Protected Application) APIs */ | 51 | /* Secure PPA(Primary Protected Application) APIs */ |
51 | #define OMAP4_PPA_L2_POR_INDEX 0x23 | 52 | #define OMAP4_PPA_L2_POR_INDEX 0x23 |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index c625cc10d9f9..8cd1de914ee4 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -50,6 +50,39 @@ void __iomem *omap4_get_scu_base(void) | |||
50 | return scu_base; | 50 | return scu_base; |
51 | } | 51 | } |
52 | 52 | ||
53 | #ifdef CONFIG_OMAP5_ERRATA_801819 | ||
54 | void omap5_erratum_workaround_801819(void) | ||
55 | { | ||
56 | u32 acr, revidr; | ||
57 | u32 acr_mask; | ||
58 | |||
59 | /* REVIDR[3] indicates erratum fix available on silicon */ | ||
60 | asm volatile ("mrc p15, 0, %0, c0, c0, 6" : "=r" (revidr)); | ||
61 | if (revidr & (0x1 << 3)) | ||
62 | return; | ||
63 | |||
64 | asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr)); | ||
65 | /* | ||
66 | * BIT(27) - Disables streaming. All write-allocate lines allocate in | ||
67 | * the L1 or L2 cache. | ||
68 | * BIT(25) - Disables streaming. All write-allocate lines allocate in | ||
69 | * the L1 cache. | ||
70 | */ | ||
71 | acr_mask = (0x3 << 25) | (0x3 << 27); | ||
72 | /* do we already have it done.. if yes, skip expensive smc */ | ||
73 | if ((acr & acr_mask) == acr_mask) | ||
74 | return; | ||
75 | |||
76 | acr |= acr_mask; | ||
77 | omap_smc1(OMAP5_DRA7_MON_SET_ACR_INDEX, acr); | ||
78 | |||
79 | pr_debug("%s: ARM erratum workaround 801819 applied on CPU%d\n", | ||
80 | __func__, smp_processor_id()); | ||
81 | } | ||
82 | #else | ||
83 | static inline void omap5_erratum_workaround_801819(void) { } | ||
84 | #endif | ||
85 | |||
53 | static void omap4_secondary_init(unsigned int cpu) | 86 | static void omap4_secondary_init(unsigned int cpu) |
54 | { | 87 | { |
55 | /* | 88 | /* |
@@ -64,12 +97,15 @@ static void omap4_secondary_init(unsigned int cpu) | |||
64 | omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX, | 97 | omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX, |
65 | 4, 0, 0, 0, 0, 0); | 98 | 4, 0, 0, 0, 0, 0); |
66 | 99 | ||
67 | /* | 100 | if (soc_is_omap54xx() || soc_is_dra7xx()) { |
68 | * Configure the CNTFRQ register for the secondary cpu's which | 101 | /* |
69 | * indicates the frequency of the cpu local timers. | 102 | * Configure the CNTFRQ register for the secondary cpu's which |
70 | */ | 103 | * indicates the frequency of the cpu local timers. |
71 | if (soc_is_omap54xx() || soc_is_dra7xx()) | 104 | */ |
72 | set_cntfreq(); | 105 | set_cntfreq(); |
106 | /* Configure ACR to disable streaming WA for 801819 */ | ||
107 | omap5_erratum_workaround_801819(); | ||
108 | } | ||
73 | 109 | ||
74 | /* | 110 | /* |
75 | * Synchronise with the boot thread. | 111 | * Synchronise with the boot thread. |
@@ -218,6 +254,8 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) | |||
218 | 254 | ||
219 | if (cpu_is_omap446x()) | 255 | if (cpu_is_omap446x()) |
220 | startup_addr = omap4460_secondary_startup; | 256 | startup_addr = omap4460_secondary_startup; |
257 | if (soc_is_dra74x() || soc_is_omap54xx()) | ||
258 | omap5_erratum_workaround_801819(); | ||
221 | 259 | ||
222 | /* | 260 | /* |
223 | * Write the address of secondary startup routine into the | 261 | * Write the address of secondary startup routine into the |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 78af6d8cf2e2..daf2753de7aa 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -186,8 +186,9 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) | |||
186 | trace_state = (PWRDM_TRACE_STATES_FLAG | | 186 | trace_state = (PWRDM_TRACE_STATES_FLAG | |
187 | ((next & OMAP_POWERSTATE_MASK) << 8) | | 187 | ((next & OMAP_POWERSTATE_MASK) << 8) | |
188 | ((prev & OMAP_POWERSTATE_MASK) << 0)); | 188 | ((prev & OMAP_POWERSTATE_MASK) << 0)); |
189 | trace_power_domain_target(pwrdm->name, trace_state, | 189 | trace_power_domain_target_rcuidle(pwrdm->name, |
190 | smp_processor_id()); | 190 | trace_state, |
191 | smp_processor_id()); | ||
191 | } | 192 | } |
192 | break; | 193 | break; |
193 | default: | 194 | default: |
@@ -523,8 +524,8 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) | |||
523 | 524 | ||
524 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { | 525 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { |
525 | /* Trace the pwrdm desired target state */ | 526 | /* Trace the pwrdm desired target state */ |
526 | trace_power_domain_target(pwrdm->name, pwrst, | 527 | trace_power_domain_target_rcuidle(pwrdm->name, pwrst, |
527 | smp_processor_id()); | 528 | smp_processor_id()); |
528 | /* Program the pwrdm desired target state */ | 529 | /* Program the pwrdm desired target state */ |
529 | ret = arch_pwrdm->pwrdm_set_next_pwrst(pwrdm, pwrst); | 530 | ret = arch_pwrdm->pwrdm_set_next_pwrst(pwrdm, pwrst); |
530 | } | 531 | } |
diff --git a/arch/arm/mach-omap2/powerdomains7xx_data.c b/arch/arm/mach-omap2/powerdomains7xx_data.c index 0ec2d00f4237..eb350a673133 100644 --- a/arch/arm/mach-omap2/powerdomains7xx_data.c +++ b/arch/arm/mach-omap2/powerdomains7xx_data.c | |||
@@ -36,14 +36,7 @@ static struct powerdomain iva_7xx_pwrdm = { | |||
36 | .prcm_offs = DRA7XX_PRM_IVA_INST, | 36 | .prcm_offs = DRA7XX_PRM_IVA_INST, |
37 | .prcm_partition = DRA7XX_PRM_PARTITION, | 37 | .prcm_partition = DRA7XX_PRM_PARTITION, |
38 | .pwrsts = PWRSTS_OFF_ON, | 38 | .pwrsts = PWRSTS_OFF_ON, |
39 | .pwrsts_logic_ret = PWRSTS_OFF, | ||
40 | .banks = 4, | 39 | .banks = 4, |
41 | .pwrsts_mem_ret = { | ||
42 | [0] = PWRSTS_OFF_RET, /* hwa_mem */ | ||
43 | [1] = PWRSTS_OFF_RET, /* sl2_mem */ | ||
44 | [2] = PWRSTS_OFF_RET, /* tcm1_mem */ | ||
45 | [3] = PWRSTS_OFF_RET, /* tcm2_mem */ | ||
46 | }, | ||
47 | .pwrsts_mem_on = { | 40 | .pwrsts_mem_on = { |
48 | [0] = PWRSTS_ON, /* hwa_mem */ | 41 | [0] = PWRSTS_ON, /* hwa_mem */ |
49 | [1] = PWRSTS_ON, /* sl2_mem */ | 42 | [1] = PWRSTS_ON, /* sl2_mem */ |
@@ -76,12 +69,7 @@ static struct powerdomain ipu_7xx_pwrdm = { | |||
76 | .prcm_offs = DRA7XX_PRM_IPU_INST, | 69 | .prcm_offs = DRA7XX_PRM_IPU_INST, |
77 | .prcm_partition = DRA7XX_PRM_PARTITION, | 70 | .prcm_partition = DRA7XX_PRM_PARTITION, |
78 | .pwrsts = PWRSTS_OFF_ON, | 71 | .pwrsts = PWRSTS_OFF_ON, |
79 | .pwrsts_logic_ret = PWRSTS_OFF, | ||
80 | .banks = 2, | 72 | .banks = 2, |
81 | .pwrsts_mem_ret = { | ||
82 | [0] = PWRSTS_OFF_RET, /* aessmem */ | ||
83 | [1] = PWRSTS_OFF_RET, /* periphmem */ | ||
84 | }, | ||
85 | .pwrsts_mem_on = { | 73 | .pwrsts_mem_on = { |
86 | [0] = PWRSTS_ON, /* aessmem */ | 74 | [0] = PWRSTS_ON, /* aessmem */ |
87 | [1] = PWRSTS_ON, /* periphmem */ | 75 | [1] = PWRSTS_ON, /* periphmem */ |
@@ -95,11 +83,7 @@ static struct powerdomain dss_7xx_pwrdm = { | |||
95 | .prcm_offs = DRA7XX_PRM_DSS_INST, | 83 | .prcm_offs = DRA7XX_PRM_DSS_INST, |
96 | .prcm_partition = DRA7XX_PRM_PARTITION, | 84 | .prcm_partition = DRA7XX_PRM_PARTITION, |
97 | .pwrsts = PWRSTS_OFF_ON, | 85 | .pwrsts = PWRSTS_OFF_ON, |
98 | .pwrsts_logic_ret = PWRSTS_OFF, | ||
99 | .banks = 1, | 86 | .banks = 1, |
100 | .pwrsts_mem_ret = { | ||
101 | [0] = PWRSTS_OFF_RET, /* dss_mem */ | ||
102 | }, | ||
103 | .pwrsts_mem_on = { | 87 | .pwrsts_mem_on = { |
104 | [0] = PWRSTS_ON, /* dss_mem */ | 88 | [0] = PWRSTS_ON, /* dss_mem */ |
105 | }, | 89 | }, |
@@ -111,13 +95,8 @@ static struct powerdomain l4per_7xx_pwrdm = { | |||
111 | .name = "l4per_pwrdm", | 95 | .name = "l4per_pwrdm", |
112 | .prcm_offs = DRA7XX_PRM_L4PER_INST, | 96 | .prcm_offs = DRA7XX_PRM_L4PER_INST, |
113 | .prcm_partition = DRA7XX_PRM_PARTITION, | 97 | .prcm_partition = DRA7XX_PRM_PARTITION, |
114 | .pwrsts = PWRSTS_RET_ON, | 98 | .pwrsts = PWRSTS_ON, |
115 | .pwrsts_logic_ret = PWRSTS_RET, | ||
116 | .banks = 2, | 99 | .banks = 2, |
117 | .pwrsts_mem_ret = { | ||
118 | [0] = PWRSTS_OFF_RET, /* nonretained_bank */ | ||
119 | [1] = PWRSTS_OFF_RET, /* retained_bank */ | ||
120 | }, | ||
121 | .pwrsts_mem_on = { | 100 | .pwrsts_mem_on = { |
122 | [0] = PWRSTS_ON, /* nonretained_bank */ | 101 | [0] = PWRSTS_ON, /* nonretained_bank */ |
123 | [1] = PWRSTS_ON, /* retained_bank */ | 102 | [1] = PWRSTS_ON, /* retained_bank */ |
@@ -132,9 +111,6 @@ static struct powerdomain gpu_7xx_pwrdm = { | |||
132 | .prcm_partition = DRA7XX_PRM_PARTITION, | 111 | .prcm_partition = DRA7XX_PRM_PARTITION, |
133 | .pwrsts = PWRSTS_OFF_ON, | 112 | .pwrsts = PWRSTS_OFF_ON, |
134 | .banks = 1, | 113 | .banks = 1, |
135 | .pwrsts_mem_ret = { | ||
136 | [0] = PWRSTS_OFF_RET, /* gpu_mem */ | ||
137 | }, | ||
138 | .pwrsts_mem_on = { | 114 | .pwrsts_mem_on = { |
139 | [0] = PWRSTS_ON, /* gpu_mem */ | 115 | [0] = PWRSTS_ON, /* gpu_mem */ |
140 | }, | 116 | }, |
@@ -148,8 +124,6 @@ static struct powerdomain wkupaon_7xx_pwrdm = { | |||
148 | .prcm_partition = DRA7XX_PRM_PARTITION, | 124 | .prcm_partition = DRA7XX_PRM_PARTITION, |
149 | .pwrsts = PWRSTS_ON, | 125 | .pwrsts = PWRSTS_ON, |
150 | .banks = 1, | 126 | .banks = 1, |
151 | .pwrsts_mem_ret = { | ||
152 | }, | ||
153 | .pwrsts_mem_on = { | 127 | .pwrsts_mem_on = { |
154 | [0] = PWRSTS_ON, /* wkup_bank */ | 128 | [0] = PWRSTS_ON, /* wkup_bank */ |
155 | }, | 129 | }, |
@@ -161,15 +135,7 @@ static struct powerdomain core_7xx_pwrdm = { | |||
161 | .prcm_offs = DRA7XX_PRM_CORE_INST, | 135 | .prcm_offs = DRA7XX_PRM_CORE_INST, |
162 | .prcm_partition = DRA7XX_PRM_PARTITION, | 136 | .prcm_partition = DRA7XX_PRM_PARTITION, |
163 | .pwrsts = PWRSTS_ON, | 137 | .pwrsts = PWRSTS_ON, |
164 | .pwrsts_logic_ret = PWRSTS_RET, | ||
165 | .banks = 5, | 138 | .banks = 5, |
166 | .pwrsts_mem_ret = { | ||
167 | [0] = PWRSTS_OFF_RET, /* core_nret_bank */ | ||
168 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ | ||
169 | [2] = PWRSTS_OFF_RET, /* core_other_bank */ | ||
170 | [3] = PWRSTS_OFF_RET, /* ipu_l2ram */ | ||
171 | [4] = PWRSTS_OFF_RET, /* ipu_unicache */ | ||
172 | }, | ||
173 | .pwrsts_mem_on = { | 139 | .pwrsts_mem_on = { |
174 | [0] = PWRSTS_ON, /* core_nret_bank */ | 140 | [0] = PWRSTS_ON, /* core_nret_bank */ |
175 | [1] = PWRSTS_ON, /* core_ocmram */ | 141 | [1] = PWRSTS_ON, /* core_ocmram */ |
@@ -226,11 +192,7 @@ static struct powerdomain vpe_7xx_pwrdm = { | |||
226 | .prcm_offs = DRA7XX_PRM_VPE_INST, | 192 | .prcm_offs = DRA7XX_PRM_VPE_INST, |
227 | .prcm_partition = DRA7XX_PRM_PARTITION, | 193 | .prcm_partition = DRA7XX_PRM_PARTITION, |
228 | .pwrsts = PWRSTS_OFF_ON, | 194 | .pwrsts = PWRSTS_OFF_ON, |
229 | .pwrsts_logic_ret = PWRSTS_OFF, | ||
230 | .banks = 1, | 195 | .banks = 1, |
231 | .pwrsts_mem_ret = { | ||
232 | [0] = PWRSTS_OFF_RET, /* vpe_bank */ | ||
233 | }, | ||
234 | .pwrsts_mem_on = { | 196 | .pwrsts_mem_on = { |
235 | [0] = PWRSTS_ON, /* vpe_bank */ | 197 | [0] = PWRSTS_ON, /* vpe_bank */ |
236 | }, | 198 | }, |
@@ -260,14 +222,8 @@ static struct powerdomain l3init_7xx_pwrdm = { | |||
260 | .name = "l3init_pwrdm", | 222 | .name = "l3init_pwrdm", |
261 | .prcm_offs = DRA7XX_PRM_L3INIT_INST, | 223 | .prcm_offs = DRA7XX_PRM_L3INIT_INST, |
262 | .prcm_partition = DRA7XX_PRM_PARTITION, | 224 | .prcm_partition = DRA7XX_PRM_PARTITION, |
263 | .pwrsts = PWRSTS_RET_ON, | 225 | .pwrsts = PWRSTS_ON, |
264 | .pwrsts_logic_ret = PWRSTS_RET, | ||
265 | .banks = 3, | 226 | .banks = 3, |
266 | .pwrsts_mem_ret = { | ||
267 | [0] = PWRSTS_OFF_RET, /* gmac_bank */ | ||
268 | [1] = PWRSTS_OFF_RET, /* l3init_bank1 */ | ||
269 | [2] = PWRSTS_OFF_RET, /* l3init_bank2 */ | ||
270 | }, | ||
271 | .pwrsts_mem_on = { | 227 | .pwrsts_mem_on = { |
272 | [0] = PWRSTS_ON, /* gmac_bank */ | 228 | [0] = PWRSTS_ON, /* gmac_bank */ |
273 | [1] = PWRSTS_ON, /* l3init_bank1 */ | 229 | [1] = PWRSTS_ON, /* l3init_bank1 */ |
@@ -283,9 +239,6 @@ static struct powerdomain eve3_7xx_pwrdm = { | |||
283 | .prcm_partition = DRA7XX_PRM_PARTITION, | 239 | .prcm_partition = DRA7XX_PRM_PARTITION, |
284 | .pwrsts = PWRSTS_OFF_ON, | 240 | .pwrsts = PWRSTS_OFF_ON, |
285 | .banks = 1, | 241 | .banks = 1, |
286 | .pwrsts_mem_ret = { | ||
287 | [0] = PWRSTS_OFF_RET, /* eve3_bank */ | ||
288 | }, | ||
289 | .pwrsts_mem_on = { | 242 | .pwrsts_mem_on = { |
290 | [0] = PWRSTS_ON, /* eve3_bank */ | 243 | [0] = PWRSTS_ON, /* eve3_bank */ |
291 | }, | 244 | }, |
@@ -299,9 +252,6 @@ static struct powerdomain emu_7xx_pwrdm = { | |||
299 | .prcm_partition = DRA7XX_PRM_PARTITION, | 252 | .prcm_partition = DRA7XX_PRM_PARTITION, |
300 | .pwrsts = PWRSTS_OFF_ON, | 253 | .pwrsts = PWRSTS_OFF_ON, |
301 | .banks = 1, | 254 | .banks = 1, |
302 | .pwrsts_mem_ret = { | ||
303 | [0] = PWRSTS_OFF_RET, /* emu_bank */ | ||
304 | }, | ||
305 | .pwrsts_mem_on = { | 255 | .pwrsts_mem_on = { |
306 | [0] = PWRSTS_ON, /* emu_bank */ | 256 | [0] = PWRSTS_ON, /* emu_bank */ |
307 | }, | 257 | }, |
@@ -314,11 +264,6 @@ static struct powerdomain dsp2_7xx_pwrdm = { | |||
314 | .prcm_partition = DRA7XX_PRM_PARTITION, | 264 | .prcm_partition = DRA7XX_PRM_PARTITION, |
315 | .pwrsts = PWRSTS_OFF_ON, | 265 | .pwrsts = PWRSTS_OFF_ON, |
316 | .banks = 3, | 266 | .banks = 3, |
317 | .pwrsts_mem_ret = { | ||
318 | [0] = PWRSTS_OFF_RET, /* dsp2_edma */ | ||
319 | [1] = PWRSTS_OFF_RET, /* dsp2_l1 */ | ||
320 | [2] = PWRSTS_OFF_RET, /* dsp2_l2 */ | ||
321 | }, | ||
322 | .pwrsts_mem_on = { | 267 | .pwrsts_mem_on = { |
323 | [0] = PWRSTS_ON, /* dsp2_edma */ | 268 | [0] = PWRSTS_ON, /* dsp2_edma */ |
324 | [1] = PWRSTS_ON, /* dsp2_l1 */ | 269 | [1] = PWRSTS_ON, /* dsp2_l1 */ |
@@ -334,11 +279,6 @@ static struct powerdomain dsp1_7xx_pwrdm = { | |||
334 | .prcm_partition = DRA7XX_PRM_PARTITION, | 279 | .prcm_partition = DRA7XX_PRM_PARTITION, |
335 | .pwrsts = PWRSTS_OFF_ON, | 280 | .pwrsts = PWRSTS_OFF_ON, |
336 | .banks = 3, | 281 | .banks = 3, |
337 | .pwrsts_mem_ret = { | ||
338 | [0] = PWRSTS_OFF_RET, /* dsp1_edma */ | ||
339 | [1] = PWRSTS_OFF_RET, /* dsp1_l1 */ | ||
340 | [2] = PWRSTS_OFF_RET, /* dsp1_l2 */ | ||
341 | }, | ||
342 | .pwrsts_mem_on = { | 282 | .pwrsts_mem_on = { |
343 | [0] = PWRSTS_ON, /* dsp1_edma */ | 283 | [0] = PWRSTS_ON, /* dsp1_edma */ |
344 | [1] = PWRSTS_ON, /* dsp1_l1 */ | 284 | [1] = PWRSTS_ON, /* dsp1_l1 */ |
@@ -354,9 +294,6 @@ static struct powerdomain cam_7xx_pwrdm = { | |||
354 | .prcm_partition = DRA7XX_PRM_PARTITION, | 294 | .prcm_partition = DRA7XX_PRM_PARTITION, |
355 | .pwrsts = PWRSTS_OFF_ON, | 295 | .pwrsts = PWRSTS_OFF_ON, |
356 | .banks = 1, | 296 | .banks = 1, |
357 | .pwrsts_mem_ret = { | ||
358 | [0] = PWRSTS_OFF_RET, /* vip_bank */ | ||
359 | }, | ||
360 | .pwrsts_mem_on = { | 297 | .pwrsts_mem_on = { |
361 | [0] = PWRSTS_ON, /* vip_bank */ | 298 | [0] = PWRSTS_ON, /* vip_bank */ |
362 | }, | 299 | }, |
@@ -370,9 +307,6 @@ static struct powerdomain eve4_7xx_pwrdm = { | |||
370 | .prcm_partition = DRA7XX_PRM_PARTITION, | 307 | .prcm_partition = DRA7XX_PRM_PARTITION, |
371 | .pwrsts = PWRSTS_OFF_ON, | 308 | .pwrsts = PWRSTS_OFF_ON, |
372 | .banks = 1, | 309 | .banks = 1, |
373 | .pwrsts_mem_ret = { | ||
374 | [0] = PWRSTS_OFF_RET, /* eve4_bank */ | ||
375 | }, | ||
376 | .pwrsts_mem_on = { | 310 | .pwrsts_mem_on = { |
377 | [0] = PWRSTS_ON, /* eve4_bank */ | 311 | [0] = PWRSTS_ON, /* eve4_bank */ |
378 | }, | 312 | }, |
@@ -386,9 +320,6 @@ static struct powerdomain eve2_7xx_pwrdm = { | |||
386 | .prcm_partition = DRA7XX_PRM_PARTITION, | 320 | .prcm_partition = DRA7XX_PRM_PARTITION, |
387 | .pwrsts = PWRSTS_OFF_ON, | 321 | .pwrsts = PWRSTS_OFF_ON, |
388 | .banks = 1, | 322 | .banks = 1, |
389 | .pwrsts_mem_ret = { | ||
390 | [0] = PWRSTS_OFF_RET, /* eve2_bank */ | ||
391 | }, | ||
392 | .pwrsts_mem_on = { | 323 | .pwrsts_mem_on = { |
393 | [0] = PWRSTS_ON, /* eve2_bank */ | 324 | [0] = PWRSTS_ON, /* eve2_bank */ |
394 | }, | 325 | }, |
@@ -402,9 +333,6 @@ static struct powerdomain eve1_7xx_pwrdm = { | |||
402 | .prcm_partition = DRA7XX_PRM_PARTITION, | 333 | .prcm_partition = DRA7XX_PRM_PARTITION, |
403 | .pwrsts = PWRSTS_OFF_ON, | 334 | .pwrsts = PWRSTS_OFF_ON, |
404 | .banks = 1, | 335 | .banks = 1, |
405 | .pwrsts_mem_ret = { | ||
406 | [0] = PWRSTS_OFF_RET, /* eve1_bank */ | ||
407 | }, | ||
408 | .pwrsts_mem_on = { | 336 | .pwrsts_mem_on = { |
409 | [0] = PWRSTS_ON, /* eve1_bank */ | 337 | [0] = PWRSTS_ON, /* eve1_bank */ |
410 | }, | 338 | }, |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 5b385bb8aff9..cb9497a20fb3 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -496,8 +496,7 @@ void __init omap_init_time(void) | |||
496 | __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", | 496 | __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", |
497 | 2, "timer_sys_ck", NULL, false); | 497 | 2, "timer_sys_ck", NULL, false); |
498 | 498 | ||
499 | if (of_have_populated_dt()) | 499 | clocksource_probe(); |
500 | clocksource_probe(); | ||
501 | } | 500 | } |
502 | 501 | ||
503 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX) | 502 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX) |
@@ -505,6 +504,8 @@ void __init omap3_secure_sync32k_timer_init(void) | |||
505 | { | 504 | { |
506 | __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure", | 505 | __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure", |
507 | 2, "timer_sys_ck", NULL, false); | 506 | 2, "timer_sys_ck", NULL, false); |
507 | |||
508 | clocksource_probe(); | ||
508 | } | 509 | } |
509 | #endif /* CONFIG_ARCH_OMAP3 */ | 510 | #endif /* CONFIG_ARCH_OMAP3 */ |
510 | 511 | ||
@@ -513,6 +514,8 @@ void __init omap3_gptimer_timer_init(void) | |||
513 | { | 514 | { |
514 | __omap_sync32k_timer_init(2, "timer_sys_ck", NULL, | 515 | __omap_sync32k_timer_init(2, "timer_sys_ck", NULL, |
515 | 1, "timer_sys_ck", "ti,timer-alwon", true); | 516 | 1, "timer_sys_ck", "ti,timer-alwon", true); |
517 | |||
518 | clocksource_probe(); | ||
516 | } | 519 | } |
517 | #endif | 520 | #endif |
518 | 521 | ||
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 84baa16f4c0b..e93aa6734147 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -68,7 +68,7 @@ | |||
68 | #include <linux/platform_data/asoc-s3c.h> | 68 | #include <linux/platform_data/asoc-s3c.h> |
69 | #include <linux/platform_data/spi-s3c64xx.h> | 69 | #include <linux/platform_data/spi-s3c64xx.h> |
70 | 70 | ||
71 | static u64 samsung_device_dma_mask = DMA_BIT_MASK(32); | 71 | #define samsung_device_dma_mask (*((u64[]) { DMA_BIT_MASK(32) })) |
72 | 72 | ||
73 | /* AC97 */ | 73 | /* AC97 */ |
74 | #ifdef CONFIG_CPU_S3C2440 | 74 | #ifdef CONFIG_CPU_S3C2440 |
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 7085e322dc42..648a32c89541 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile | |||
@@ -95,7 +95,7 @@ boot := arch/arm64/boot | |||
95 | Image: vmlinux | 95 | Image: vmlinux |
96 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 96 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
97 | 97 | ||
98 | Image.%: vmlinux | 98 | Image.%: Image |
99 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 99 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
100 | 100 | ||
101 | zinstall install: | 101 | zinstall install: |
diff --git a/arch/arm64/boot/dts/lg/lg1312.dtsi b/arch/arm64/boot/dts/lg/lg1312.dtsi index 3a4e9a2ab313..fbafa24cd533 100644 --- a/arch/arm64/boot/dts/lg/lg1312.dtsi +++ b/arch/arm64/boot/dts/lg/lg1312.dtsi | |||
@@ -125,7 +125,7 @@ | |||
125 | #size-cells = <1>; | 125 | #size-cells = <1>; |
126 | #interrupts-cells = <3>; | 126 | #interrupts-cells = <3>; |
127 | 127 | ||
128 | compatible = "arm,amba-bus"; | 128 | compatible = "simple-bus"; |
129 | interrupt-parent = <&gic>; | 129 | interrupt-parent = <&gic>; |
130 | ranges; | 130 | ranges; |
131 | 131 | ||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 46f325a143b0..d7f8e06910bc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi | |||
@@ -163,7 +163,7 @@ | |||
163 | }; | 163 | }; |
164 | 164 | ||
165 | amba { | 165 | amba { |
166 | compatible = "arm,amba-bus"; | 166 | compatible = "simple-bus"; |
167 | #address-cells = <2>; | 167 | #address-cells = <2>; |
168 | #size-cells = <2>; | 168 | #size-cells = <2>; |
169 | ranges; | 169 | ranges; |
diff --git a/arch/arm64/include/asm/kgdb.h b/arch/arm64/include/asm/kgdb.h index f69f69c8120c..da84645525b9 100644 --- a/arch/arm64/include/asm/kgdb.h +++ b/arch/arm64/include/asm/kgdb.h | |||
@@ -38,25 +38,54 @@ extern int kgdb_fault_expected; | |||
38 | #endif /* !__ASSEMBLY__ */ | 38 | #endif /* !__ASSEMBLY__ */ |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * gdb is expecting the following registers layout. | 41 | * gdb remote procotol (well most versions of it) expects the following |
42 | * register layout. | ||
42 | * | 43 | * |
43 | * General purpose regs: | 44 | * General purpose regs: |
44 | * r0-r30: 64 bit | 45 | * r0-r30: 64 bit |
45 | * sp,pc : 64 bit | 46 | * sp,pc : 64 bit |
46 | * pstate : 64 bit | 47 | * pstate : 32 bit |
47 | * Total: 34 | 48 | * Total: 33 + 1 |
48 | * FPU regs: | 49 | * FPU regs: |
49 | * f0-f31: 128 bit | 50 | * f0-f31: 128 bit |
50 | * Total: 32 | ||
51 | * Extra regs | ||
52 | * fpsr & fpcr: 32 bit | 51 | * fpsr & fpcr: 32 bit |
53 | * Total: 2 | 52 | * Total: 32 + 2 |
54 | * | 53 | * |
54 | * To expand a little on the "most versions of it"... when the gdb remote | ||
55 | * protocol for AArch64 was developed it depended on a statement in the | ||
56 | * Architecture Reference Manual that claimed "SPSR_ELx is a 32-bit register". | ||
57 | * and, as a result, allocated only 32-bits for the PSTATE in the remote | ||
58 | * protocol. In fact this statement is still present in ARM DDI 0487A.i. | ||
59 | * | ||
60 | * Unfortunately "is a 32-bit register" has a very special meaning for | ||
61 | * system registers. It means that "the upper bits, bits[63:32], are | ||
62 | * RES0.". RES0 is heavily used in the ARM architecture documents as a | ||
63 | * way to leave space for future architecture changes. So to translate a | ||
64 | * little for people who don't spend their spare time reading ARM architecture | ||
65 | * manuals, what "is a 32-bit register" actually means in this context is | ||
66 | * "is a 64-bit register but one with no meaning allocated to any of the | ||
67 | * upper 32-bits... *yet*". | ||
68 | * | ||
69 | * Perhaps then we should not be surprised that this has led to some | ||
70 | * confusion. Specifically a patch, influenced by the above translation, | ||
71 | * that extended PSTATE to 64-bit was accepted into gdb-7.7 but the patch | ||
72 | * was reverted in gdb-7.8.1 and all later releases, when this was | ||
73 | * discovered to be an undocumented protocol change. | ||
74 | * | ||
75 | * So... it is *not* wrong for us to only allocate 32-bits to PSTATE | ||
76 | * here even though the kernel itself allocates 64-bits for the same | ||
77 | * state. That is because this bit of code tells the kernel how the gdb | ||
78 | * remote protocol (well most versions of it) describes the register state. | ||
79 | * | ||
80 | * Note that if you are using one of the versions of gdb that supports | ||
81 | * the gdb-7.7 version of the protocol you cannot use kgdb directly | ||
82 | * without providing a custom register description (gdb can load new | ||
83 | * protocol descriptions at runtime). | ||
55 | */ | 84 | */ |
56 | 85 | ||
57 | #define _GP_REGS 34 | 86 | #define _GP_REGS 33 |
58 | #define _FP_REGS 32 | 87 | #define _FP_REGS 32 |
59 | #define _EXTRA_REGS 2 | 88 | #define _EXTRA_REGS 3 |
60 | /* | 89 | /* |
61 | * general purpose registers size in bytes. | 90 | * general purpose registers size in bytes. |
62 | * pstate is only 4 bytes. subtract 4 bytes | 91 | * pstate is only 4 bytes. subtract 4 bytes |
diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h index ff98585d085a..d25f4f137c2a 100644 --- a/arch/arm64/include/asm/pgalloc.h +++ b/arch/arm64/include/asm/pgalloc.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #define check_pgt_cache() do { } while (0) | 27 | #define check_pgt_cache() do { } while (0) |
28 | 28 | ||
29 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO) | 29 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
30 | #define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) | 30 | #define PGD_SIZE (PTRS_PER_PGD * sizeof(pgd_t)) |
31 | 31 | ||
32 | #if CONFIG_PGTABLE_LEVELS > 2 | 32 | #if CONFIG_PGTABLE_LEVELS > 2 |
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index 433e50405274..022644704a93 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h | |||
@@ -124,6 +124,18 @@ static inline void cpu_panic_kernel(void) | |||
124 | cpu_park_loop(); | 124 | cpu_park_loop(); |
125 | } | 125 | } |
126 | 126 | ||
127 | /* | ||
128 | * If a secondary CPU enters the kernel but fails to come online, | ||
129 | * (e.g. due to mismatched features), and cannot exit the kernel, | ||
130 | * we increment cpus_stuck_in_kernel and leave the CPU in a | ||
131 | * quiesecent loop within the kernel text. The memory containing | ||
132 | * this loop must not be re-used for anything else as the 'stuck' | ||
133 | * core is executing it. | ||
134 | * | ||
135 | * This function is used to inhibit features like kexec and hibernate. | ||
136 | */ | ||
137 | bool cpus_are_stuck_in_kernel(void); | ||
138 | |||
127 | #endif /* ifndef __ASSEMBLY__ */ | 139 | #endif /* ifndef __ASSEMBLY__ */ |
128 | 140 | ||
129 | #endif /* ifndef __ASM_SMP_H */ | 141 | #endif /* ifndef __ASM_SMP_H */ |
diff --git a/arch/arm64/include/asm/spinlock.h b/arch/arm64/include/asm/spinlock.h index fc9682bfe002..e875a5a551d7 100644 --- a/arch/arm64/include/asm/spinlock.h +++ b/arch/arm64/include/asm/spinlock.h | |||
@@ -30,22 +30,53 @@ static inline void arch_spin_unlock_wait(arch_spinlock_t *lock) | |||
30 | { | 30 | { |
31 | unsigned int tmp; | 31 | unsigned int tmp; |
32 | arch_spinlock_t lockval; | 32 | arch_spinlock_t lockval; |
33 | u32 owner; | ||
34 | |||
35 | /* | ||
36 | * Ensure prior spin_lock operations to other locks have completed | ||
37 | * on this CPU before we test whether "lock" is locked. | ||
38 | */ | ||
39 | smp_mb(); | ||
40 | owner = READ_ONCE(lock->owner) << 16; | ||
33 | 41 | ||
34 | asm volatile( | 42 | asm volatile( |
35 | " sevl\n" | 43 | " sevl\n" |
36 | "1: wfe\n" | 44 | "1: wfe\n" |
37 | "2: ldaxr %w0, %2\n" | 45 | "2: ldaxr %w0, %2\n" |
46 | /* Is the lock free? */ | ||
38 | " eor %w1, %w0, %w0, ror #16\n" | 47 | " eor %w1, %w0, %w0, ror #16\n" |
39 | " cbnz %w1, 1b\n" | 48 | " cbz %w1, 3f\n" |
49 | /* Lock taken -- has there been a subsequent unlock->lock transition? */ | ||
50 | " eor %w1, %w3, %w0, lsl #16\n" | ||
51 | " cbz %w1, 1b\n" | ||
52 | /* | ||
53 | * The owner has been updated, so there was an unlock->lock | ||
54 | * transition that we missed. That means we can rely on the | ||
55 | * store-release of the unlock operation paired with the | ||
56 | * load-acquire of the lock operation to publish any of our | ||
57 | * previous stores to the new lock owner and therefore don't | ||
58 | * need to bother with the writeback below. | ||
59 | */ | ||
60 | " b 4f\n" | ||
61 | "3:\n" | ||
62 | /* | ||
63 | * Serialise against any concurrent lockers by writing back the | ||
64 | * unlocked lock value | ||
65 | */ | ||
40 | ARM64_LSE_ATOMIC_INSN( | 66 | ARM64_LSE_ATOMIC_INSN( |
41 | /* LL/SC */ | 67 | /* LL/SC */ |
42 | " stxr %w1, %w0, %2\n" | 68 | " stxr %w1, %w0, %2\n" |
43 | " cbnz %w1, 2b\n", /* Serialise against any concurrent lockers */ | ||
44 | /* LSE atomics */ | ||
45 | " nop\n" | 69 | " nop\n" |
46 | " nop\n") | 70 | " nop\n", |
71 | /* LSE atomics */ | ||
72 | " mov %w1, %w0\n" | ||
73 | " cas %w0, %w0, %2\n" | ||
74 | " eor %w1, %w1, %w0\n") | ||
75 | /* Somebody else wrote to the lock, GOTO 10 and reload the value */ | ||
76 | " cbnz %w1, 2b\n" | ||
77 | "4:" | ||
47 | : "=&r" (lockval), "=&r" (tmp), "+Q" (*lock) | 78 | : "=&r" (lockval), "=&r" (tmp), "+Q" (*lock) |
48 | : | 79 | : "r" (owner) |
49 | : "memory"); | 80 | : "memory"); |
50 | } | 81 | } |
51 | 82 | ||
@@ -148,6 +179,7 @@ static inline int arch_spin_value_unlocked(arch_spinlock_t lock) | |||
148 | 179 | ||
149 | static inline int arch_spin_is_locked(arch_spinlock_t *lock) | 180 | static inline int arch_spin_is_locked(arch_spinlock_t *lock) |
150 | { | 181 | { |
182 | smp_mb(); /* See arch_spin_unlock_wait */ | ||
151 | return !arch_spin_value_unlocked(READ_ONCE(*lock)); | 183 | return !arch_spin_value_unlocked(READ_ONCE(*lock)); |
152 | } | 184 | } |
153 | 185 | ||
diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c index f8df75d740f4..21ab5df9fa76 100644 --- a/arch/arm64/kernel/hibernate.c +++ b/arch/arm64/kernel/hibernate.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/pgtable-hwdef.h> | 34 | #include <asm/pgtable-hwdef.h> |
35 | #include <asm/sections.h> | 35 | #include <asm/sections.h> |
36 | #include <asm/smp.h> | ||
36 | #include <asm/suspend.h> | 37 | #include <asm/suspend.h> |
37 | #include <asm/virt.h> | 38 | #include <asm/virt.h> |
38 | 39 | ||
@@ -236,6 +237,11 @@ int swsusp_arch_suspend(void) | |||
236 | unsigned long flags; | 237 | unsigned long flags; |
237 | struct sleep_stack_data state; | 238 | struct sleep_stack_data state; |
238 | 239 | ||
240 | if (cpus_are_stuck_in_kernel()) { | ||
241 | pr_err("Can't hibernate: no mechanism to offline secondary CPUs.\n"); | ||
242 | return -EBUSY; | ||
243 | } | ||
244 | |||
239 | local_dbg_save(flags); | 245 | local_dbg_save(flags); |
240 | 246 | ||
241 | if (__cpu_suspend_enter(&state)) { | 247 | if (__cpu_suspend_enter(&state)) { |
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index b67531a13136..b5f063e5eff7 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c | |||
@@ -58,7 +58,17 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = { | |||
58 | { "x30", 8, offsetof(struct pt_regs, regs[30])}, | 58 | { "x30", 8, offsetof(struct pt_regs, regs[30])}, |
59 | { "sp", 8, offsetof(struct pt_regs, sp)}, | 59 | { "sp", 8, offsetof(struct pt_regs, sp)}, |
60 | { "pc", 8, offsetof(struct pt_regs, pc)}, | 60 | { "pc", 8, offsetof(struct pt_regs, pc)}, |
61 | { "pstate", 8, offsetof(struct pt_regs, pstate)}, | 61 | /* |
62 | * struct pt_regs thinks PSTATE is 64-bits wide but gdb remote | ||
63 | * protocol disagrees. Therefore we must extract only the lower | ||
64 | * 32-bits. Look for the big comment in asm/kgdb.h for more | ||
65 | * detail. | ||
66 | */ | ||
67 | { "pstate", 4, offsetof(struct pt_regs, pstate) | ||
68 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
69 | + 4 | ||
70 | #endif | ||
71 | }, | ||
62 | { "v0", 16, -1 }, | 72 | { "v0", 16, -1 }, |
63 | { "v1", 16, -1 }, | 73 | { "v1", 16, -1 }, |
64 | { "v2", 16, -1 }, | 74 | { "v2", 16, -1 }, |
@@ -128,6 +138,8 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) | |||
128 | memset((char *)gdb_regs, 0, NUMREGBYTES); | 138 | memset((char *)gdb_regs, 0, NUMREGBYTES); |
129 | thread_regs = task_pt_regs(task); | 139 | thread_regs = task_pt_regs(task); |
130 | memcpy((void *)gdb_regs, (void *)thread_regs->regs, GP_REG_BYTES); | 140 | memcpy((void *)gdb_regs, (void *)thread_regs->regs, GP_REG_BYTES); |
141 | /* Special case for PSTATE (check comments in asm/kgdb.h for details) */ | ||
142 | dbg_get_reg(33, gdb_regs + GP_REG_BYTES, thread_regs); | ||
131 | } | 143 | } |
132 | 144 | ||
133 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) | 145 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 678e0842cb3b..62ff3c0622e2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -909,3 +909,21 @@ int setup_profiling_timer(unsigned int multiplier) | |||
909 | { | 909 | { |
910 | return -EINVAL; | 910 | return -EINVAL; |
911 | } | 911 | } |
912 | |||
913 | static bool have_cpu_die(void) | ||
914 | { | ||
915 | #ifdef CONFIG_HOTPLUG_CPU | ||
916 | int any_cpu = raw_smp_processor_id(); | ||
917 | |||
918 | if (cpu_ops[any_cpu]->cpu_die) | ||
919 | return true; | ||
920 | #endif | ||
921 | return false; | ||
922 | } | ||
923 | |||
924 | bool cpus_are_stuck_in_kernel(void) | ||
925 | { | ||
926 | bool smp_spin_tables = (num_possible_cpus() > 1 && !have_cpu_die()); | ||
927 | |||
928 | return !!cpus_stuck_in_kernel || smp_spin_tables; | ||
929 | } | ||
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index f7cf463107df..2a43012616b7 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c | |||
@@ -64,8 +64,7 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom, | |||
64 | 64 | ||
65 | /* | 65 | /* |
66 | * We need to switch to kernel mode so that we can use __get_user | 66 | * We need to switch to kernel mode so that we can use __get_user |
67 | * to safely read from kernel space. Note that we now dump the | 67 | * to safely read from kernel space. |
68 | * code first, just in case the backtrace kills us. | ||
69 | */ | 68 | */ |
70 | fs = get_fs(); | 69 | fs = get_fs(); |
71 | set_fs(KERNEL_DS); | 70 | set_fs(KERNEL_DS); |
@@ -111,21 +110,12 @@ static void dump_backtrace_entry(unsigned long where) | |||
111 | print_ip_sym(where); | 110 | print_ip_sym(where); |
112 | } | 111 | } |
113 | 112 | ||
114 | static void dump_instr(const char *lvl, struct pt_regs *regs) | 113 | static void __dump_instr(const char *lvl, struct pt_regs *regs) |
115 | { | 114 | { |
116 | unsigned long addr = instruction_pointer(regs); | 115 | unsigned long addr = instruction_pointer(regs); |
117 | mm_segment_t fs; | ||
118 | char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; | 116 | char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; |
119 | int i; | 117 | int i; |
120 | 118 | ||
121 | /* | ||
122 | * We need to switch to kernel mode so that we can use __get_user | ||
123 | * to safely read from kernel space. Note that we now dump the | ||
124 | * code first, just in case the backtrace kills us. | ||
125 | */ | ||
126 | fs = get_fs(); | ||
127 | set_fs(KERNEL_DS); | ||
128 | |||
129 | for (i = -4; i < 1; i++) { | 119 | for (i = -4; i < 1; i++) { |
130 | unsigned int val, bad; | 120 | unsigned int val, bad; |
131 | 121 | ||
@@ -139,8 +129,18 @@ static void dump_instr(const char *lvl, struct pt_regs *regs) | |||
139 | } | 129 | } |
140 | } | 130 | } |
141 | printk("%sCode: %s\n", lvl, str); | 131 | printk("%sCode: %s\n", lvl, str); |
132 | } | ||
142 | 133 | ||
143 | set_fs(fs); | 134 | static void dump_instr(const char *lvl, struct pt_regs *regs) |
135 | { | ||
136 | if (!user_mode(regs)) { | ||
137 | mm_segment_t fs = get_fs(); | ||
138 | set_fs(KERNEL_DS); | ||
139 | __dump_instr(lvl, regs); | ||
140 | set_fs(fs); | ||
141 | } else { | ||
142 | __dump_instr(lvl, regs); | ||
143 | } | ||
144 | } | 144 | } |
145 | 145 | ||
146 | static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) | 146 | static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) |
diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c index b7b397802088..efcf1f7ef1e4 100644 --- a/arch/arm64/mm/context.c +++ b/arch/arm64/mm/context.c | |||
@@ -179,7 +179,7 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu) | |||
179 | &asid_generation); | 179 | &asid_generation); |
180 | flush_context(cpu); | 180 | flush_context(cpu); |
181 | 181 | ||
182 | /* We have at least 1 ASID per CPU, so this will always succeed */ | 182 | /* We have more ASIDs than CPUs, so this will always succeed */ |
183 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1); | 183 | asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1); |
184 | 184 | ||
185 | set_asid: | 185 | set_asid: |
@@ -227,8 +227,11 @@ switch_mm_fastpath: | |||
227 | static int asids_init(void) | 227 | static int asids_init(void) |
228 | { | 228 | { |
229 | asid_bits = get_cpu_asid_bits(); | 229 | asid_bits = get_cpu_asid_bits(); |
230 | /* If we end up with more CPUs than ASIDs, expect things to crash */ | 230 | /* |
231 | WARN_ON(NUM_USER_ASIDS < num_possible_cpus()); | 231 | * Expect allocation after rollover to fail if we don't have at least |
232 | * one more ASID than CPUs. ASID #0 is reserved for init_mm. | ||
233 | */ | ||
234 | WARN_ON(NUM_USER_ASIDS - 1 <= num_possible_cpus()); | ||
232 | atomic64_set(&asid_generation, ASID_FIRST_VERSION); | 235 | atomic64_set(&asid_generation, ASID_FIRST_VERSION); |
233 | asid_map = kzalloc(BITS_TO_LONGS(NUM_USER_ASIDS) * sizeof(*asid_map), | 236 | asid_map = kzalloc(BITS_TO_LONGS(NUM_USER_ASIDS) * sizeof(*asid_map), |
234 | GFP_KERNEL); | 237 | GFP_KERNEL); |
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 5954881a35ac..013e2cbe7924 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -109,7 +109,7 @@ int ptep_set_access_flags(struct vm_area_struct *vma, | |||
109 | * PTE_RDONLY is cleared by default in the asm below, so set it in | 109 | * PTE_RDONLY is cleared by default in the asm below, so set it in |
110 | * back if necessary (read-only or clean PTE). | 110 | * back if necessary (read-only or clean PTE). |
111 | */ | 111 | */ |
112 | if (!pte_write(entry) || !dirty) | 112 | if (!pte_write(entry) || !pte_sw_dirty(entry)) |
113 | pte_val(entry) |= PTE_RDONLY; | 113 | pte_val(entry) |= PTE_RDONLY; |
114 | 114 | ||
115 | /* | 115 | /* |
@@ -441,7 +441,7 @@ static int do_bad(unsigned long addr, unsigned int esr, struct pt_regs *regs) | |||
441 | return 1; | 441 | return 1; |
442 | } | 442 | } |
443 | 443 | ||
444 | static struct fault_info { | 444 | static const struct fault_info { |
445 | int (*fn)(unsigned long addr, unsigned int esr, struct pt_regs *regs); | 445 | int (*fn)(unsigned long addr, unsigned int esr, struct pt_regs *regs); |
446 | int sig; | 446 | int sig; |
447 | int code; | 447 | int code; |
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index dbd12ea8ce68..43a76b07eb32 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c | |||
@@ -71,10 +71,6 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr) | |||
71 | { | 71 | { |
72 | struct page *page = pte_page(pte); | 72 | struct page *page = pte_page(pte); |
73 | 73 | ||
74 | /* no flushing needed for anonymous pages */ | ||
75 | if (!page_mapping(page)) | ||
76 | return; | ||
77 | |||
78 | if (!test_and_set_bit(PG_dcache_clean, &page->flags)) | 74 | if (!test_and_set_bit(PG_dcache_clean, &page->flags)) |
79 | sync_icache_aliases(page_address(page), | 75 | sync_icache_aliases(page_address(page), |
80 | PAGE_SIZE << compound_order(page)); | 76 | PAGE_SIZE << compound_order(page)); |
diff --git a/arch/avr32/include/asm/pgalloc.h b/arch/avr32/include/asm/pgalloc.h index 1aba19d68c5e..db039cb368be 100644 --- a/arch/avr32/include/asm/pgalloc.h +++ b/arch/avr32/include/asm/pgalloc.h | |||
@@ -43,7 +43,7 @@ static inline void pgd_ctor(void *x) | |||
43 | */ | 43 | */ |
44 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 44 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
45 | { | 45 | { |
46 | return quicklist_alloc(QUICK_PGD, GFP_KERNEL | __GFP_REPEAT, pgd_ctor); | 46 | return quicklist_alloc(QUICK_PGD, GFP_KERNEL, pgd_ctor); |
47 | } | 47 | } |
48 | 48 | ||
49 | static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | 49 | static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
@@ -54,7 +54,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
54 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 54 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
55 | unsigned long address) | 55 | unsigned long address) |
56 | { | 56 | { |
57 | return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL); | 57 | return quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); |
58 | } | 58 | } |
59 | 59 | ||
60 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | 60 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
@@ -63,7 +63,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
63 | struct page *page; | 63 | struct page *page; |
64 | void *pg; | 64 | void *pg; |
65 | 65 | ||
66 | pg = quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL); | 66 | pg = quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); |
67 | if (!pg) | 67 | if (!pg) |
68 | return NULL; | 68 | return NULL; |
69 | 69 | ||
diff --git a/arch/cris/include/asm/pgalloc.h b/arch/cris/include/asm/pgalloc.h index 235ece437ddd..42f1affb9c2d 100644 --- a/arch/cris/include/asm/pgalloc.h +++ b/arch/cris/include/asm/pgalloc.h | |||
@@ -24,14 +24,14 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
24 | 24 | ||
25 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 25 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
26 | { | 26 | { |
27 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 27 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
28 | return pte; | 28 | return pte; |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | 31 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) |
32 | { | 32 | { |
33 | struct page *pte; | 33 | struct page *pte; |
34 | pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); | 34 | pte = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0); |
35 | if (!pte) | 35 | if (!pte) |
36 | return NULL; | 36 | return NULL; |
37 | if (!pgtable_page_ctor(pte)) { | 37 | if (!pgtable_page_ctor(pte)) { |
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 41907d25ed38..c9ed14f6c67d 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c | |||
@@ -22,7 +22,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((aligned(PAGE_SIZE))); | |||
22 | 22 | ||
23 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 23 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
24 | { | 24 | { |
25 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); | 25 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL); |
26 | if (pte) | 26 | if (pte) |
27 | clear_page(pte); | 27 | clear_page(pte); |
28 | return pte; | 28 | return pte; |
@@ -33,9 +33,9 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
33 | struct page *page; | 33 | struct page *page; |
34 | 34 | ||
35 | #ifdef CONFIG_HIGHPTE | 35 | #ifdef CONFIG_HIGHPTE |
36 | page = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT, 0); | 36 | page = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM, 0); |
37 | #else | 37 | #else |
38 | page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); | 38 | page = alloc_pages(GFP_KERNEL, 0); |
39 | #endif | 39 | #endif |
40 | if (!page) | 40 | if (!page) |
41 | return NULL; | 41 | return NULL; |
diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h index 77da3b0ae3c2..eeebf862c46c 100644 --- a/arch/hexagon/include/asm/pgalloc.h +++ b/arch/hexagon/include/asm/pgalloc.h | |||
@@ -64,7 +64,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
64 | { | 64 | { |
65 | struct page *pte; | 65 | struct page *pte; |
66 | 66 | ||
67 | pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); | 67 | pte = alloc_page(GFP_KERNEL | __GFP_ZERO); |
68 | if (!pte) | 68 | if (!pte) |
69 | return NULL; | 69 | return NULL; |
70 | if (!pgtable_page_ctor(pte)) { | 70 | if (!pgtable_page_ctor(pte)) { |
@@ -78,7 +78,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
78 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 78 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
79 | unsigned long address) | 79 | unsigned long address) |
80 | { | 80 | { |
81 | gfp_t flags = GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO; | 81 | gfp_t flags = GFP_KERNEL | __GFP_ZERO; |
82 | return (pte_t *) __get_free_page(flags); | 82 | return (pte_t *) __get_free_page(flags); |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index f80758cb7157..e109ee95e919 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -45,7 +45,7 @@ config IA64 | |||
45 | select GENERIC_SMP_IDLE_THREAD | 45 | select GENERIC_SMP_IDLE_THREAD |
46 | select ARCH_INIT_TASK | 46 | select ARCH_INIT_TASK |
47 | select ARCH_TASK_STRUCT_ALLOCATOR | 47 | select ARCH_TASK_STRUCT_ALLOCATOR |
48 | select ARCH_THREAD_INFO_ALLOCATOR | 48 | select ARCH_THREAD_STACK_ALLOCATOR |
49 | select ARCH_CLOCKSOURCE_DATA | 49 | select ARCH_CLOCKSOURCE_DATA |
50 | select GENERIC_TIME_VSYSCALL_OLD | 50 | select GENERIC_TIME_VSYSCALL_OLD |
51 | select SYSCTL_ARCH_UNALIGN_NO_WARN | 51 | select SYSCTL_ARCH_UNALIGN_NO_WARN |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index aa995b67c3f5..d1212b84fb83 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -48,15 +48,15 @@ struct thread_info { | |||
48 | #ifndef ASM_OFFSETS_C | 48 | #ifndef ASM_OFFSETS_C |
49 | /* how to get the thread information struct from C */ | 49 | /* how to get the thread information struct from C */ |
50 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) | 50 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) |
51 | #define alloc_thread_info_node(tsk, node) \ | 51 | #define alloc_thread_stack_node(tsk, node) \ |
52 | ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 52 | ((unsigned long *) ((char *) (tsk) + IA64_TASK_SIZE)) |
53 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 53 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) |
54 | #else | 54 | #else |
55 | #define current_thread_info() ((struct thread_info *) 0) | 55 | #define current_thread_info() ((struct thread_info *) 0) |
56 | #define alloc_thread_info_node(tsk, node) ((struct thread_info *) 0) | 56 | #define alloc_thread_stack_node(tsk, node) ((unsigned long *) 0) |
57 | #define task_thread_info(tsk) ((struct thread_info *) 0) | 57 | #define task_thread_info(tsk) ((struct thread_info *) 0) |
58 | #endif | 58 | #endif |
59 | #define free_thread_info(ti) /* nothing */ | 59 | #define free_thread_stack(ti) /* nothing */ |
60 | #define task_stack_page(tsk) ((void *)(tsk)) | 60 | #define task_stack_page(tsk) ((void *)(tsk)) |
61 | 61 | ||
62 | #define __HAVE_THREAD_FUNCTIONS | 62 | #define __HAVE_THREAD_FUNCTIONS |
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c index f9efe9739d3f..0eaa89f3defd 100644 --- a/arch/ia64/kernel/init_task.c +++ b/arch/ia64/kernel/init_task.c | |||
@@ -26,6 +26,7 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | |||
26 | * handled. This is done by having a special ".data..init_task" section... | 26 | * handled. This is done by having a special ".data..init_task" section... |
27 | */ | 27 | */ |
28 | #define init_thread_info init_task_mem.s.thread_info | 28 | #define init_thread_info init_task_mem.s.thread_info |
29 | #define init_stack init_task_mem.stack | ||
29 | 30 | ||
30 | union { | 31 | union { |
31 | struct { | 32 | struct { |
diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h index f9924fbcfe42..fb95aed5f428 100644 --- a/arch/m68k/include/asm/mcf_pgalloc.h +++ b/arch/m68k/include/asm/mcf_pgalloc.h | |||
@@ -14,7 +14,7 @@ extern const char bad_pmd_string[]; | |||
14 | extern inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 14 | extern inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
15 | unsigned long address) | 15 | unsigned long address) |
16 | { | 16 | { |
17 | unsigned long page = __get_free_page(GFP_DMA|__GFP_REPEAT); | 17 | unsigned long page = __get_free_page(GFP_DMA); |
18 | 18 | ||
19 | if (!page) | 19 | if (!page) |
20 | return NULL; | 20 | return NULL; |
@@ -51,7 +51,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page, | |||
51 | static inline struct page *pte_alloc_one(struct mm_struct *mm, | 51 | static inline struct page *pte_alloc_one(struct mm_struct *mm, |
52 | unsigned long address) | 52 | unsigned long address) |
53 | { | 53 | { |
54 | struct page *page = alloc_pages(GFP_DMA|__GFP_REPEAT, 0); | 54 | struct page *page = alloc_pages(GFP_DMA, 0); |
55 | pte_t *pte; | 55 | pte_t *pte; |
56 | 56 | ||
57 | if (!page) | 57 | if (!page) |
diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index 24bcba496c75..c895b987202c 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h | |||
@@ -11,7 +11,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long ad | |||
11 | { | 11 | { |
12 | pte_t *pte; | 12 | pte_t *pte; |
13 | 13 | ||
14 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 14 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
15 | if (pte) { | 15 | if (pte) { |
16 | __flush_page_to_ram(pte); | 16 | __flush_page_to_ram(pte); |
17 | flush_tlb_kernel_page(pte); | 17 | flush_tlb_kernel_page(pte); |
@@ -32,7 +32,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres | |||
32 | struct page *page; | 32 | struct page *page; |
33 | pte_t *pte; | 33 | pte_t *pte; |
34 | 34 | ||
35 | page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); | 35 | page = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0); |
36 | if(!page) | 36 | if(!page) |
37 | return NULL; | 37 | return NULL; |
38 | if (!pgtable_page_ctor(page)) { | 38 | if (!pgtable_page_ctor(page)) { |
diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h index 0931388de47f..1901f61f926f 100644 --- a/arch/m68k/include/asm/sun3_pgalloc.h +++ b/arch/m68k/include/asm/sun3_pgalloc.h | |||
@@ -37,7 +37,7 @@ do { \ | |||
37 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 37 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
38 | unsigned long address) | 38 | unsigned long address) |
39 | { | 39 | { |
40 | unsigned long page = __get_free_page(GFP_KERNEL|__GFP_REPEAT); | 40 | unsigned long page = __get_free_page(GFP_KERNEL); |
41 | 41 | ||
42 | if (!page) | 42 | if (!page) |
43 | return NULL; | 43 | return NULL; |
@@ -49,7 +49,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
49 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | 49 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
50 | unsigned long address) | 50 | unsigned long address) |
51 | { | 51 | { |
52 | struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); | 52 | struct page *page = alloc_pages(GFP_KERNEL, 0); |
53 | 53 | ||
54 | if (page == NULL) | 54 | if (page == NULL) |
55 | return NULL; | 55 | return NULL; |
diff --git a/arch/metag/include/asm/pgalloc.h b/arch/metag/include/asm/pgalloc.h index 3104df0a4822..c2caa1ee4360 100644 --- a/arch/metag/include/asm/pgalloc.h +++ b/arch/metag/include/asm/pgalloc.h | |||
@@ -42,8 +42,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
42 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 42 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
43 | unsigned long address) | 43 | unsigned long address) |
44 | { | 44 | { |
45 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | | 45 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
46 | __GFP_ZERO); | ||
47 | return pte; | 46 | return pte; |
48 | } | 47 | } |
49 | 48 | ||
@@ -51,7 +50,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
51 | unsigned long address) | 50 | unsigned long address) |
52 | { | 51 | { |
53 | struct page *pte; | 52 | struct page *pte; |
54 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO, 0); | 53 | pte = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0); |
55 | if (!pte) | 54 | if (!pte) |
56 | return NULL; | 55 | return NULL; |
57 | if (!pgtable_page_ctor(pte)) { | 56 | if (!pgtable_page_ctor(pte)) { |
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h index 61436d69775c..7c89390c0c13 100644 --- a/arch/microblaze/include/asm/pgalloc.h +++ b/arch/microblaze/include/asm/pgalloc.h | |||
@@ -116,9 +116,9 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
116 | struct page *ptepage; | 116 | struct page *ptepage; |
117 | 117 | ||
118 | #ifdef CONFIG_HIGHPTE | 118 | #ifdef CONFIG_HIGHPTE |
119 | int flags = GFP_KERNEL | __GFP_HIGHMEM | __GFP_REPEAT; | 119 | int flags = GFP_KERNEL | __GFP_HIGHMEM; |
120 | #else | 120 | #else |
121 | int flags = GFP_KERNEL | __GFP_REPEAT; | 121 | int flags = GFP_KERNEL; |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | ptepage = alloc_pages(flags, 0); | 124 | ptepage = alloc_pages(flags, 0); |
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index 4f4520e779a5..eb99fcc76088 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -239,8 +239,7 @@ __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
239 | { | 239 | { |
240 | pte_t *pte; | 240 | pte_t *pte; |
241 | if (mem_init_done) { | 241 | if (mem_init_done) { |
242 | pte = (pte_t *)__get_free_page(GFP_KERNEL | | 242 | pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
243 | __GFP_REPEAT | __GFP_ZERO); | ||
244 | } else { | 243 | } else { |
245 | pte = (pte_t *)early_get_page(); | 244 | pte = (pte_t *)early_get_page(); |
246 | if (pte) | 245 | if (pte) |
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 6733ac575da4..36a391d289aa 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h | |||
@@ -74,7 +74,7 @@ | |||
74 | #define KVM_GUEST_KUSEG 0x00000000UL | 74 | #define KVM_GUEST_KUSEG 0x00000000UL |
75 | #define KVM_GUEST_KSEG0 0x40000000UL | 75 | #define KVM_GUEST_KSEG0 0x40000000UL |
76 | #define KVM_GUEST_KSEG23 0x60000000UL | 76 | #define KVM_GUEST_KSEG23 0x60000000UL |
77 | #define KVM_GUEST_KSEGX(a) ((_ACAST32_(a)) & 0x60000000) | 77 | #define KVM_GUEST_KSEGX(a) ((_ACAST32_(a)) & 0xe0000000) |
78 | #define KVM_GUEST_CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) | 78 | #define KVM_GUEST_CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) |
79 | 79 | ||
80 | #define KVM_GUEST_CKSEG0ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG0) | 80 | #define KVM_GUEST_CKSEG0ADDR(a) (KVM_GUEST_CPHYSADDR(a) | KVM_GUEST_KSEG0) |
@@ -338,6 +338,7 @@ struct kvm_mips_tlb { | |||
338 | #define KVM_MIPS_GUEST_TLB_SIZE 64 | 338 | #define KVM_MIPS_GUEST_TLB_SIZE 64 |
339 | struct kvm_vcpu_arch { | 339 | struct kvm_vcpu_arch { |
340 | void *host_ebase, *guest_ebase; | 340 | void *host_ebase, *guest_ebase; |
341 | int (*vcpu_run)(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
341 | unsigned long host_stack; | 342 | unsigned long host_stack; |
342 | unsigned long host_gp; | 343 | unsigned long host_gp; |
343 | 344 | ||
diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index b336037e8768..93c079a1cfc8 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h | |||
@@ -69,7 +69,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
69 | { | 69 | { |
70 | pte_t *pte; | 70 | pte_t *pte; |
71 | 71 | ||
72 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, PTE_ORDER); | 72 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_ZERO, PTE_ORDER); |
73 | 73 | ||
74 | return pte; | 74 | return pte; |
75 | } | 75 | } |
@@ -79,7 +79,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
79 | { | 79 | { |
80 | struct page *pte; | 80 | struct page *pte; |
81 | 81 | ||
82 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 82 | pte = alloc_pages(GFP_KERNEL, PTE_ORDER); |
83 | if (!pte) | 83 | if (!pte) |
84 | return NULL; | 84 | return NULL; |
85 | clear_highpage(pte); | 85 | clear_highpage(pte); |
@@ -113,7 +113,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | |||
113 | { | 113 | { |
114 | pmd_t *pmd; | 114 | pmd_t *pmd; |
115 | 115 | ||
116 | pmd = (pmd_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, PMD_ORDER); | 116 | pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER); |
117 | if (pmd) | 117 | if (pmd) |
118 | pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); | 118 | pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table); |
119 | return pmd; | 119 | return pmd; |
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c index 396df6eb0a12..645c8a1982a7 100644 --- a/arch/mips/kvm/emulate.c +++ b/arch/mips/kvm/emulate.c | |||
@@ -1636,6 +1636,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc, | |||
1636 | if (index < 0) { | 1636 | if (index < 0) { |
1637 | vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK); | 1637 | vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK); |
1638 | vcpu->arch.host_cp0_badvaddr = va; | 1638 | vcpu->arch.host_cp0_badvaddr = va; |
1639 | vcpu->arch.pc = curr_pc; | ||
1639 | er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run, | 1640 | er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run, |
1640 | vcpu); | 1641 | vcpu); |
1641 | preempt_enable(); | 1642 | preempt_enable(); |
@@ -1647,6 +1648,8 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc, | |||
1647 | * invalid exception to the guest | 1648 | * invalid exception to the guest |
1648 | */ | 1649 | */ |
1649 | if (!TLB_IS_VALID(*tlb, va)) { | 1650 | if (!TLB_IS_VALID(*tlb, va)) { |
1651 | vcpu->arch.host_cp0_badvaddr = va; | ||
1652 | vcpu->arch.pc = curr_pc; | ||
1650 | er = kvm_mips_emulate_tlbinv_ld(cause, NULL, | 1653 | er = kvm_mips_emulate_tlbinv_ld(cause, NULL, |
1651 | run, vcpu); | 1654 | run, vcpu); |
1652 | preempt_enable(); | 1655 | preempt_enable(); |
@@ -1666,7 +1669,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc, | |||
1666 | cache, op, base, arch->gprs[base], offset); | 1669 | cache, op, base, arch->gprs[base], offset); |
1667 | er = EMULATE_FAIL; | 1670 | er = EMULATE_FAIL; |
1668 | preempt_enable(); | 1671 | preempt_enable(); |
1669 | goto dont_update_pc; | 1672 | goto done; |
1670 | 1673 | ||
1671 | } | 1674 | } |
1672 | 1675 | ||
@@ -1694,16 +1697,20 @@ skip_fault: | |||
1694 | kvm_err("NO-OP CACHE (cache: %#x, op: %#x, base[%d]: %#lx, offset: %#x\n", | 1697 | kvm_err("NO-OP CACHE (cache: %#x, op: %#x, base[%d]: %#lx, offset: %#x\n", |
1695 | cache, op, base, arch->gprs[base], offset); | 1698 | cache, op, base, arch->gprs[base], offset); |
1696 | er = EMULATE_FAIL; | 1699 | er = EMULATE_FAIL; |
1697 | preempt_enable(); | ||
1698 | goto dont_update_pc; | ||
1699 | } | 1700 | } |
1700 | 1701 | ||
1701 | preempt_enable(); | 1702 | preempt_enable(); |
1703 | done: | ||
1704 | /* Rollback PC only if emulation was unsuccessful */ | ||
1705 | if (er == EMULATE_FAIL) | ||
1706 | vcpu->arch.pc = curr_pc; | ||
1702 | 1707 | ||
1703 | dont_update_pc: | 1708 | dont_update_pc: |
1704 | /* Rollback PC */ | 1709 | /* |
1705 | vcpu->arch.pc = curr_pc; | 1710 | * This is for exceptions whose emulation updates the PC, so do not |
1706 | done: | 1711 | * overwrite the PC under any circumstances |
1712 | */ | ||
1713 | |||
1707 | return er; | 1714 | return er; |
1708 | } | 1715 | } |
1709 | 1716 | ||
diff --git a/arch/mips/kvm/interrupt.h b/arch/mips/kvm/interrupt.h index 4ab4bdfad703..2143884709e4 100644 --- a/arch/mips/kvm/interrupt.h +++ b/arch/mips/kvm/interrupt.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define MIPS_EXC_MAX 12 | 28 | #define MIPS_EXC_MAX 12 |
29 | /* XXXSL More to follow */ | 29 | /* XXXSL More to follow */ |
30 | 30 | ||
31 | extern char __kvm_mips_vcpu_run_end[]; | ||
31 | extern char mips32_exception[], mips32_exceptionEnd[]; | 32 | extern char mips32_exception[], mips32_exceptionEnd[]; |
32 | extern char mips32_GuestException[], mips32_GuestExceptionEnd[]; | 33 | extern char mips32_GuestException[], mips32_GuestExceptionEnd[]; |
33 | 34 | ||
diff --git a/arch/mips/kvm/locore.S b/arch/mips/kvm/locore.S index 3ef03009de5f..828fcfc1cd7f 100644 --- a/arch/mips/kvm/locore.S +++ b/arch/mips/kvm/locore.S | |||
@@ -202,6 +202,7 @@ FEXPORT(__kvm_mips_load_k0k1) | |||
202 | 202 | ||
203 | /* Jump to guest */ | 203 | /* Jump to guest */ |
204 | eret | 204 | eret |
205 | EXPORT(__kvm_mips_vcpu_run_end) | ||
205 | 206 | ||
206 | VECTOR(MIPSX(exception), unknown) | 207 | VECTOR(MIPSX(exception), unknown) |
207 | /* Find out what mode we came from and jump to the proper handler. */ | 208 | /* Find out what mode we came from and jump to the proper handler. */ |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index dc052fb5c7a2..44da5259f390 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -315,6 +315,15 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
315 | memcpy(gebase + offset, mips32_GuestException, | 315 | memcpy(gebase + offset, mips32_GuestException, |
316 | mips32_GuestExceptionEnd - mips32_GuestException); | 316 | mips32_GuestExceptionEnd - mips32_GuestException); |
317 | 317 | ||
318 | #ifdef MODULE | ||
319 | offset += mips32_GuestExceptionEnd - mips32_GuestException; | ||
320 | memcpy(gebase + offset, (char *)__kvm_mips_vcpu_run, | ||
321 | __kvm_mips_vcpu_run_end - (char *)__kvm_mips_vcpu_run); | ||
322 | vcpu->arch.vcpu_run = gebase + offset; | ||
323 | #else | ||
324 | vcpu->arch.vcpu_run = __kvm_mips_vcpu_run; | ||
325 | #endif | ||
326 | |||
318 | /* Invalidate the icache for these ranges */ | 327 | /* Invalidate the icache for these ranges */ |
319 | local_flush_icache_range((unsigned long)gebase, | 328 | local_flush_icache_range((unsigned long)gebase, |
320 | (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); | 329 | (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); |
@@ -404,7 +413,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
404 | /* Disable hardware page table walking while in guest */ | 413 | /* Disable hardware page table walking while in guest */ |
405 | htw_stop(); | 414 | htw_stop(); |
406 | 415 | ||
407 | r = __kvm_mips_vcpu_run(run, vcpu); | 416 | r = vcpu->arch.vcpu_run(run, vcpu); |
408 | 417 | ||
409 | /* Re-enable HTW before enabling interrupts */ | 418 | /* Re-enable HTW before enabling interrupts */ |
410 | htw_start(); | 419 | htw_start(); |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index 4861a78c7160..f5f90bbf019d 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -115,7 +115,7 @@ static inline unsigned long current_stack_pointer(void) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | #ifndef CONFIG_KGDB | 117 | #ifndef CONFIG_KGDB |
118 | void arch_release_thread_info(struct thread_info *ti); | 118 | void arch_release_thread_stack(unsigned long *stack); |
119 | #endif | 119 | #endif |
120 | #define get_thread_info(ti) get_task_struct((ti)->task) | 120 | #define get_thread_info(ti) get_task_struct((ti)->task) |
121 | #define put_thread_info(ti) put_task_struct((ti)->task) | 121 | #define put_thread_info(ti) put_task_struct((ti)->task) |
diff --git a/arch/mn10300/kernel/kgdb.c b/arch/mn10300/kernel/kgdb.c index 99770823451a..2d7986c386fe 100644 --- a/arch/mn10300/kernel/kgdb.c +++ b/arch/mn10300/kernel/kgdb.c | |||
@@ -397,8 +397,9 @@ static bool kgdb_arch_undo_singlestep(struct pt_regs *regs) | |||
397 | * single-step state is cleared. At this point the breakpoints should have | 397 | * single-step state is cleared. At this point the breakpoints should have |
398 | * been removed by __switch_to(). | 398 | * been removed by __switch_to(). |
399 | */ | 399 | */ |
400 | void arch_release_thread_info(struct thread_info *ti) | 400 | void arch_release_thread_stack(unsigned long *stack) |
401 | { | 401 | { |
402 | struct thread_info *ti = (void *)stack; | ||
402 | if (kgdb_sstep_thread == ti) { | 403 | if (kgdb_sstep_thread == ti) { |
403 | kgdb_sstep_thread = NULL; | 404 | kgdb_sstep_thread = NULL; |
404 | 405 | ||
diff --git a/arch/mn10300/mm/pgtable.c b/arch/mn10300/mm/pgtable.c index e77a7c728081..9577cf768875 100644 --- a/arch/mn10300/mm/pgtable.c +++ b/arch/mn10300/mm/pgtable.c | |||
@@ -63,7 +63,7 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) | |||
63 | 63 | ||
64 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 64 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
65 | { | 65 | { |
66 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); | 66 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL); |
67 | if (pte) | 67 | if (pte) |
68 | clear_page(pte); | 68 | clear_page(pte); |
69 | return pte; | 69 | return pte; |
@@ -74,9 +74,9 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
74 | struct page *pte; | 74 | struct page *pte; |
75 | 75 | ||
76 | #ifdef CONFIG_HIGHPTE | 76 | #ifdef CONFIG_HIGHPTE |
77 | pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT, 0); | 77 | pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM, 0); |
78 | #else | 78 | #else |
79 | pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); | 79 | pte = alloc_pages(GFP_KERNEL, 0); |
80 | #endif | 80 | #endif |
81 | if (!pte) | 81 | if (!pte) |
82 | return NULL; | 82 | return NULL; |
diff --git a/arch/nios2/include/asm/pgalloc.h b/arch/nios2/include/asm/pgalloc.h index 6e2985e0a7b9..bb47d08c8ef7 100644 --- a/arch/nios2/include/asm/pgalloc.h +++ b/arch/nios2/include/asm/pgalloc.h | |||
@@ -42,8 +42,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
42 | { | 42 | { |
43 | pte_t *pte; | 43 | pte_t *pte; |
44 | 44 | ||
45 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, | 45 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_ZERO, PTE_ORDER); |
46 | PTE_ORDER); | ||
47 | 46 | ||
48 | return pte; | 47 | return pte; |
49 | } | 48 | } |
@@ -53,7 +52,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
53 | { | 52 | { |
54 | struct page *pte; | 53 | struct page *pte; |
55 | 54 | ||
56 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 55 | pte = alloc_pages(GFP_KERNEL, PTE_ORDER); |
57 | if (pte) { | 56 | if (pte) { |
58 | if (!pgtable_page_ctor(pte)) { | 57 | if (!pgtable_page_ctor(pte)) { |
59 | __free_page(pte); | 58 | __free_page(pte); |
diff --git a/arch/openrisc/include/asm/pgalloc.h b/arch/openrisc/include/asm/pgalloc.h index 21484e5b9e9a..87eebd185089 100644 --- a/arch/openrisc/include/asm/pgalloc.h +++ b/arch/openrisc/include/asm/pgalloc.h | |||
@@ -77,7 +77,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
77 | unsigned long address) | 77 | unsigned long address) |
78 | { | 78 | { |
79 | struct page *pte; | 79 | struct page *pte; |
80 | pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); | 80 | pte = alloc_pages(GFP_KERNEL, 0); |
81 | if (!pte) | 81 | if (!pte) |
82 | return NULL; | 82 | return NULL; |
83 | clear_page(page_address(pte)); | 83 | clear_page(page_address(pte)); |
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index 62b08ef392be..5b2a95116e8f 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c | |||
@@ -122,7 +122,7 @@ pte_t __init_refok *pte_alloc_one_kernel(struct mm_struct *mm, | |||
122 | pte_t *pte; | 122 | pte_t *pte; |
123 | 123 | ||
124 | if (likely(mem_init_done)) { | 124 | if (likely(mem_init_done)) { |
125 | pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT); | 125 | pte = (pte_t *) __get_free_page(GFP_KERNEL); |
126 | } else { | 126 | } else { |
127 | pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); | 127 | pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); |
128 | #if 0 | 128 | #if 0 |
diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h index f2fd327dce2e..f08dda3f0995 100644 --- a/arch/parisc/include/asm/pgalloc.h +++ b/arch/parisc/include/asm/pgalloc.h | |||
@@ -63,8 +63,7 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) | |||
63 | 63 | ||
64 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 64 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) |
65 | { | 65 | { |
66 | pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, | 66 | pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL, PMD_ORDER); |
67 | PMD_ORDER); | ||
68 | if (pmd) | 67 | if (pmd) |
69 | memset(pmd, 0, PAGE_SIZE<<PMD_ORDER); | 68 | memset(pmd, 0, PAGE_SIZE<<PMD_ORDER); |
70 | return pmd; | 69 | return pmd; |
@@ -124,7 +123,7 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) | |||
124 | static inline pgtable_t | 123 | static inline pgtable_t |
125 | pte_alloc_one(struct mm_struct *mm, unsigned long address) | 124 | pte_alloc_one(struct mm_struct *mm, unsigned long address) |
126 | { | 125 | { |
127 | struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 126 | struct page *page = alloc_page(GFP_KERNEL|__GFP_ZERO); |
128 | if (!page) | 127 | if (!page) |
129 | return NULL; | 128 | return NULL; |
130 | if (!pgtable_page_ctor(page)) { | 129 | if (!pgtable_page_ctor(page)) { |
@@ -137,7 +136,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
137 | static inline pte_t * | 136 | static inline pte_t * |
138 | pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) | 137 | pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) |
139 | { | 138 | { |
140 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 139 | pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
141 | return pte; | 140 | return pte; |
142 | } | 141 | } |
143 | 142 | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 01f7464d9fea..0a9d439bcda6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -128,7 +128,7 @@ config PPC | |||
128 | select IRQ_FORCED_THREADING | 128 | select IRQ_FORCED_THREADING |
129 | select HAVE_RCU_TABLE_FREE if SMP | 129 | select HAVE_RCU_TABLE_FREE if SMP |
130 | select HAVE_SYSCALL_TRACEPOINTS | 130 | select HAVE_SYSCALL_TRACEPOINTS |
131 | select HAVE_CBPF_JIT | 131 | select HAVE_CBPF_JIT if CPU_BIG_ENDIAN |
132 | select HAVE_ARCH_JUMP_LABEL | 132 | select HAVE_ARCH_JUMP_LABEL |
133 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 133 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
134 | select ARCH_HAS_GCOV_PROFILE_ALL | 134 | select ARCH_HAS_GCOV_PROFILE_ALL |
diff --git a/arch/powerpc/include/asm/book3s/32/pgalloc.h b/arch/powerpc/include/asm/book3s/32/pgalloc.h index a2350194fc76..8e21bb492dca 100644 --- a/arch/powerpc/include/asm/book3s/32/pgalloc.h +++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h | |||
@@ -102,7 +102,6 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb, | |||
102 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, | 102 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, |
103 | unsigned long address) | 103 | unsigned long address) |
104 | { | 104 | { |
105 | tlb_flush_pgtable(tlb, address); | ||
106 | pgtable_page_dtor(table); | 105 | pgtable_page_dtor(table); |
107 | pgtable_free_tlb(tlb, page_address(table), 0); | 106 | pgtable_free_tlb(tlb, page_address(table), 0); |
108 | } | 107 | } |
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h index 290157e8d5b2..74839f24f412 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h +++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h | |||
@@ -88,6 +88,7 @@ | |||
88 | #define HPTE_R_RPN_SHIFT 12 | 88 | #define HPTE_R_RPN_SHIFT 12 |
89 | #define HPTE_R_RPN ASM_CONST(0x0ffffffffffff000) | 89 | #define HPTE_R_RPN ASM_CONST(0x0ffffffffffff000) |
90 | #define HPTE_R_PP ASM_CONST(0x0000000000000003) | 90 | #define HPTE_R_PP ASM_CONST(0x0000000000000003) |
91 | #define HPTE_R_PPP ASM_CONST(0x8000000000000003) | ||
91 | #define HPTE_R_N ASM_CONST(0x0000000000000004) | 92 | #define HPTE_R_N ASM_CONST(0x0000000000000004) |
92 | #define HPTE_R_G ASM_CONST(0x0000000000000008) | 93 | #define HPTE_R_G ASM_CONST(0x0000000000000008) |
93 | #define HPTE_R_M ASM_CONST(0x0000000000000010) | 94 | #define HPTE_R_M ASM_CONST(0x0000000000000010) |
diff --git a/arch/powerpc/include/asm/book3s/64/pgalloc.h b/arch/powerpc/include/asm/book3s/64/pgalloc.h index 488279edb1f0..cd5e7aa8cc34 100644 --- a/arch/powerpc/include/asm/book3s/64/pgalloc.h +++ b/arch/powerpc/include/asm/book3s/64/pgalloc.h | |||
@@ -41,7 +41,7 @@ extern struct kmem_cache *pgtable_cache[]; | |||
41 | pgtable_cache[(shift) - 1]; \ | 41 | pgtable_cache[(shift) - 1]; \ |
42 | }) | 42 | }) |
43 | 43 | ||
44 | #define PGALLOC_GFP GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO | 44 | #define PGALLOC_GFP GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO |
45 | 45 | ||
46 | extern pte_t *pte_fragment_alloc(struct mm_struct *, unsigned long, int); | 46 | extern pte_t *pte_fragment_alloc(struct mm_struct *, unsigned long, int); |
47 | extern void pte_fragment_free(unsigned long *, int); | 47 | extern void pte_fragment_free(unsigned long *, int); |
@@ -56,7 +56,7 @@ static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm) | |||
56 | return (pgd_t *)__get_free_page(PGALLOC_GFP); | 56 | return (pgd_t *)__get_free_page(PGALLOC_GFP); |
57 | #else | 57 | #else |
58 | struct page *page; | 58 | struct page *page; |
59 | page = alloc_pages(PGALLOC_GFP, 4); | 59 | page = alloc_pages(PGALLOC_GFP | __GFP_REPEAT, 4); |
60 | if (!page) | 60 | if (!page) |
61 | return NULL; | 61 | return NULL; |
62 | return (pgd_t *) page_address(page); | 62 | return (pgd_t *) page_address(page); |
@@ -93,8 +93,7 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | |||
93 | 93 | ||
94 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 94 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
95 | { | 95 | { |
96 | return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), | 96 | return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), GFP_KERNEL); |
97 | GFP_KERNEL|__GFP_REPEAT); | ||
98 | } | 97 | } |
99 | 98 | ||
100 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | 99 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) |
@@ -110,13 +109,17 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) | |||
110 | static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud, | 109 | static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud, |
111 | unsigned long address) | 110 | unsigned long address) |
112 | { | 111 | { |
112 | /* | ||
113 | * By now all the pud entries should be none entries. So go | ||
114 | * ahead and flush the page walk cache | ||
115 | */ | ||
116 | flush_tlb_pgtable(tlb, address); | ||
113 | pgtable_free_tlb(tlb, pud, PUD_INDEX_SIZE); | 117 | pgtable_free_tlb(tlb, pud, PUD_INDEX_SIZE); |
114 | } | 118 | } |
115 | 119 | ||
116 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 120 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
117 | { | 121 | { |
118 | return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), | 122 | return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), GFP_KERNEL); |
119 | GFP_KERNEL|__GFP_REPEAT); | ||
120 | } | 123 | } |
121 | 124 | ||
122 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | 125 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
@@ -127,6 +130,11 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | |||
127 | static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, | 130 | static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, |
128 | unsigned long address) | 131 | unsigned long address) |
129 | { | 132 | { |
133 | /* | ||
134 | * By now all the pud entries should be none entries. So go | ||
135 | * ahead and flush the page walk cache | ||
136 | */ | ||
137 | flush_tlb_pgtable(tlb, address); | ||
130 | return pgtable_free_tlb(tlb, pmd, PMD_CACHE_INDEX); | 138 | return pgtable_free_tlb(tlb, pmd, PMD_CACHE_INDEX); |
131 | } | 139 | } |
132 | 140 | ||
@@ -151,7 +159,7 @@ static inline pgtable_t pmd_pgtable(pmd_t pmd) | |||
151 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 159 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
152 | unsigned long address) | 160 | unsigned long address) |
153 | { | 161 | { |
154 | return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); | 162 | return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
155 | } | 163 | } |
156 | 164 | ||
157 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | 165 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
@@ -198,7 +206,11 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | |||
198 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, | 206 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, |
199 | unsigned long address) | 207 | unsigned long address) |
200 | { | 208 | { |
201 | tlb_flush_pgtable(tlb, address); | 209 | /* |
210 | * By now all the pud entries should be none entries. So go | ||
211 | * ahead and flush the page walk cache | ||
212 | */ | ||
213 | flush_tlb_pgtable(tlb, address); | ||
202 | pgtable_free_tlb(tlb, table, 0); | 214 | pgtable_free_tlb(tlb, table, 0); |
203 | } | 215 | } |
204 | 216 | ||
diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 937d4e247ac3..df294224e280 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h | |||
@@ -228,5 +228,20 @@ extern void radix__vmemmap_remove_mapping(unsigned long start, | |||
228 | 228 | ||
229 | extern int radix__map_kernel_page(unsigned long ea, unsigned long pa, | 229 | extern int radix__map_kernel_page(unsigned long ea, unsigned long pa, |
230 | pgprot_t flags, unsigned int psz); | 230 | pgprot_t flags, unsigned int psz); |
231 | |||
232 | static inline unsigned long radix__get_tree_size(void) | ||
233 | { | ||
234 | unsigned long rts_field; | ||
235 | /* | ||
236 | * we support 52 bits, hence 52-31 = 21, 0b10101 | ||
237 | * RTS encoding details | ||
238 | * bits 0 - 3 of rts -> bits 6 - 8 unsigned long | ||
239 | * bits 4 - 5 of rts -> bits 62 - 63 of unsigned long | ||
240 | */ | ||
241 | rts_field = (0x5UL << 5); /* 6 - 8 bits */ | ||
242 | rts_field |= (0x2UL << 61); | ||
243 | |||
244 | return rts_field; | ||
245 | } | ||
231 | #endif /* __ASSEMBLY__ */ | 246 | #endif /* __ASSEMBLY__ */ |
232 | #endif | 247 | #endif |
diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h index 13ef38828dfe..3fa94fcac628 100644 --- a/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-radix.h | |||
@@ -18,16 +18,19 @@ extern void radix__local_flush_tlb_mm(struct mm_struct *mm); | |||
18 | extern void radix__local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 18 | extern void radix__local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
19 | extern void radix___local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | 19 | extern void radix___local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
20 | unsigned long ap, int nid); | 20 | unsigned long ap, int nid); |
21 | extern void radix__local_flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr); | ||
21 | extern void radix__tlb_flush(struct mmu_gather *tlb); | 22 | extern void radix__tlb_flush(struct mmu_gather *tlb); |
22 | #ifdef CONFIG_SMP | 23 | #ifdef CONFIG_SMP |
23 | extern void radix__flush_tlb_mm(struct mm_struct *mm); | 24 | extern void radix__flush_tlb_mm(struct mm_struct *mm); |
24 | extern void radix__flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); | 25 | extern void radix__flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); |
25 | extern void radix___flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | 26 | extern void radix___flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
26 | unsigned long ap, int nid); | 27 | unsigned long ap, int nid); |
28 | extern void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr); | ||
27 | #else | 29 | #else |
28 | #define radix__flush_tlb_mm(mm) radix__local_flush_tlb_mm(mm) | 30 | #define radix__flush_tlb_mm(mm) radix__local_flush_tlb_mm(mm) |
29 | #define radix__flush_tlb_page(vma,addr) radix__local_flush_tlb_page(vma,addr) | 31 | #define radix__flush_tlb_page(vma,addr) radix__local_flush_tlb_page(vma,addr) |
30 | #define radix___flush_tlb_page(mm,addr,p,i) radix___local_flush_tlb_page(mm,addr,p,i) | 32 | #define radix___flush_tlb_page(mm,addr,p,i) radix___local_flush_tlb_page(mm,addr,p,i) |
33 | #define radix__flush_tlb_pwc(tlb, addr) radix__local_flush_tlb_pwc(tlb, addr) | ||
31 | #endif | 34 | #endif |
32 | 35 | ||
33 | #endif | 36 | #endif |
diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h index d98424ae356c..96e5769b18b0 100644 --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h +++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h | |||
@@ -72,5 +72,19 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, | |||
72 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) | 72 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) |
73 | #define flush_tlb_page(vma, addr) local_flush_tlb_page(vma, addr) | 73 | #define flush_tlb_page(vma, addr) local_flush_tlb_page(vma, addr) |
74 | #endif /* CONFIG_SMP */ | 74 | #endif /* CONFIG_SMP */ |
75 | /* | ||
76 | * flush the page walk cache for the address | ||
77 | */ | ||
78 | static inline void flush_tlb_pgtable(struct mmu_gather *tlb, unsigned long address) | ||
79 | { | ||
80 | /* | ||
81 | * Flush the page table walk cache on freeing a page table. We already | ||
82 | * have marked the upper/higher level page table entry none by now. | ||
83 | * So it is safe to flush PWC here. | ||
84 | */ | ||
85 | if (!radix_enabled()) | ||
86 | return; | ||
75 | 87 | ||
88 | radix__flush_tlb_pwc(tlb, address); | ||
89 | } | ||
76 | #endif /* _ASM_POWERPC_BOOK3S_64_TLBFLUSH_H */ | 90 | #endif /* _ASM_POWERPC_BOOK3S_64_TLBFLUSH_H */ |
diff --git a/arch/powerpc/include/asm/book3s/pgalloc.h b/arch/powerpc/include/asm/book3s/pgalloc.h index 54f591e9572e..c0a69ae92256 100644 --- a/arch/powerpc/include/asm/book3s/pgalloc.h +++ b/arch/powerpc/include/asm/book3s/pgalloc.h | |||
@@ -4,11 +4,6 @@ | |||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | 5 | ||
6 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); | 6 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); |
7 | static inline void tlb_flush_pgtable(struct mmu_gather *tlb, | ||
8 | unsigned long address) | ||
9 | { | ||
10 | |||
11 | } | ||
12 | 7 | ||
13 | #ifdef CONFIG_PPC64 | 8 | #ifdef CONFIG_PPC64 |
14 | #include <asm/book3s/64/pgalloc.h> | 9 | #include <asm/book3s/64/pgalloc.h> |
diff --git a/arch/powerpc/include/asm/nohash/64/pgalloc.h b/arch/powerpc/include/asm/nohash/64/pgalloc.h index 0c12a3bfe2ab..897d2e1c8a9b 100644 --- a/arch/powerpc/include/asm/nohash/64/pgalloc.h +++ b/arch/powerpc/include/asm/nohash/64/pgalloc.h | |||
@@ -57,8 +57,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
57 | 57 | ||
58 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 58 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
59 | { | 59 | { |
60 | return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), | 60 | return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), GFP_KERNEL); |
61 | GFP_KERNEL|__GFP_REPEAT); | ||
62 | } | 61 | } |
63 | 62 | ||
64 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | 63 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) |
@@ -88,7 +87,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
88 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 87 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
89 | unsigned long address) | 88 | unsigned long address) |
90 | { | 89 | { |
91 | return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); | 90 | return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
92 | } | 91 | } |
93 | 92 | ||
94 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | 93 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
@@ -172,7 +171,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
172 | 171 | ||
173 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | 172 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
174 | { | 173 | { |
175 | pte_fragment_fre((unsigned long *)pte, 1); | 174 | pte_fragment_free((unsigned long *)pte, 1); |
176 | } | 175 | } |
177 | 176 | ||
178 | static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | 177 | static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) |
@@ -190,8 +189,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, | |||
190 | 189 | ||
191 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 190 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
192 | { | 191 | { |
193 | return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), | 192 | return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), GFP_KERNEL); |
194 | GFP_KERNEL|__GFP_REPEAT); | ||
195 | } | 193 | } |
196 | 194 | ||
197 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | 195 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 2714a3b81d24..b5f73cb5eeb6 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c | |||
@@ -642,7 +642,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus, | |||
642 | if (pe->type & EEH_PE_VF) { | 642 | if (pe->type & EEH_PE_VF) { |
643 | eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL); | 643 | eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL); |
644 | } else { | 644 | } else { |
645 | eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); | ||
646 | pci_lock_rescan_remove(); | 645 | pci_lock_rescan_remove(); |
647 | pci_hp_remove_devices(bus); | 646 | pci_hp_remove_devices(bus); |
648 | pci_unlock_rescan_remove(); | 647 | pci_unlock_rescan_remove(); |
@@ -692,10 +691,12 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus, | |||
692 | */ | 691 | */ |
693 | edev = list_first_entry(&pe->edevs, struct eeh_dev, list); | 692 | edev = list_first_entry(&pe->edevs, struct eeh_dev, list); |
694 | eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL); | 693 | eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL); |
695 | if (pe->type & EEH_PE_VF) | 694 | if (pe->type & EEH_PE_VF) { |
696 | eeh_add_virt_device(edev, NULL); | 695 | eeh_add_virt_device(edev, NULL); |
697 | else | 696 | } else { |
697 | eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); | ||
698 | pci_hp_add_devices(bus); | 698 | pci_hp_add_devices(bus); |
699 | } | ||
699 | } else if (frozen_bus && rmv_data->removed) { | 700 | } else if (frozen_bus && rmv_data->removed) { |
700 | pr_info("EEH: Sleep 5s ahead of partial hotplug\n"); | 701 | pr_info("EEH: Sleep 5s ahead of partial hotplug\n"); |
701 | ssleep(5); | 702 | ssleep(5); |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 4c9440629128..8bcc1b457115 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -1399,11 +1399,12 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_RADIX) | |||
1399 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | 1399 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ |
1400 | 1400 | ||
1401 | mtlr r10 | 1401 | mtlr r10 |
1402 | BEGIN_MMU_FTR_SECTION | ||
1403 | b 2f | ||
1404 | END_MMU_FTR_SECTION_IFSET(MMU_FTR_RADIX) | ||
1405 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | 1402 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ |
1403 | BEGIN_MMU_FTR_SECTION | ||
1406 | beq- 2f | 1404 | beq- 2f |
1405 | FTR_SECTION_ELSE | ||
1406 | b 2f | ||
1407 | ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_RADIX) | ||
1407 | 1408 | ||
1408 | .machine push | 1409 | .machine push |
1409 | .machine "power4" | 1410 | .machine "power4" |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ccd2037c797f..6ee4b72cda42 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -719,7 +719,7 @@ unsigned char ibm_architecture_vec[] = { | |||
719 | * must match by the macro below. Update the definition if | 719 | * must match by the macro below. Update the definition if |
720 | * the structure layout changes. | 720 | * the structure layout changes. |
721 | */ | 721 | */ |
722 | #define IBM_ARCH_VEC_NRCORES_OFFSET 125 | 722 | #define IBM_ARCH_VEC_NRCORES_OFFSET 133 |
723 | W(NR_CPUS), /* number of cores supported */ | 723 | W(NR_CPUS), /* number of cores supported */ |
724 | 0, | 724 | 0, |
725 | 0, | 725 | 0, |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 30a03c03fe73..060b140f03c6 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -377,7 +377,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset, | |||
377 | 377 | ||
378 | #else | 378 | #else |
379 | BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != | 379 | BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != |
380 | offsetof(struct thread_fp_state, fpr[32][0])); | 380 | offsetof(struct thread_fp_state, fpr[32])); |
381 | 381 | ||
382 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 382 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
383 | &target->thread.fp_state, 0, -1); | 383 | &target->thread.fp_state, 0, -1); |
@@ -405,7 +405,7 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset, | |||
405 | return 0; | 405 | return 0; |
406 | #else | 406 | #else |
407 | BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != | 407 | BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != |
408 | offsetof(struct thread_fp_state, fpr[32][0])); | 408 | offsetof(struct thread_fp_state, fpr[32])); |
409 | 409 | ||
410 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 410 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
411 | &target->thread.fp_state, 0, -1); | 411 | &target->thread.fp_state, 0, -1); |
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index d873f6507f72..f8a871a72985 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -316,8 +316,8 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, | |||
316 | DBG_LOW(" -> hit\n"); | 316 | DBG_LOW(" -> hit\n"); |
317 | /* Update the HPTE */ | 317 | /* Update the HPTE */ |
318 | hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & | 318 | hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & |
319 | ~(HPTE_R_PP | HPTE_R_N)) | | 319 | ~(HPTE_R_PPP | HPTE_R_N)) | |
320 | (newpp & (HPTE_R_PP | HPTE_R_N | | 320 | (newpp & (HPTE_R_PPP | HPTE_R_N | |
321 | HPTE_R_C))); | 321 | HPTE_R_C))); |
322 | } | 322 | } |
323 | native_unlock_hpte(hptep); | 323 | native_unlock_hpte(hptep); |
@@ -385,8 +385,8 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea, | |||
385 | 385 | ||
386 | /* Update the HPTE */ | 386 | /* Update the HPTE */ |
387 | hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & | 387 | hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & |
388 | ~(HPTE_R_PP | HPTE_R_N)) | | 388 | ~(HPTE_R_PPP | HPTE_R_N)) | |
389 | (newpp & (HPTE_R_PP | HPTE_R_N))); | 389 | (newpp & (HPTE_R_PPP | HPTE_R_N))); |
390 | /* | 390 | /* |
391 | * Ensure it is out of the tlb too. Bolted entries base and | 391 | * Ensure it is out of the tlb too. Bolted entries base and |
392 | * actual page size will be same. | 392 | * actual page size will be same. |
@@ -550,7 +550,11 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | /* This works for all page sizes, and for 256M and 1T segments */ | 552 | /* This works for all page sizes, and for 256M and 1T segments */ |
553 | *ssize = hpte_v >> HPTE_V_SSIZE_SHIFT; | 553 | if (cpu_has_feature(CPU_FTR_ARCH_300)) |
554 | *ssize = hpte_r >> HPTE_R_3_0_SSIZE_SHIFT; | ||
555 | else | ||
556 | *ssize = hpte_v >> HPTE_V_SSIZE_SHIFT; | ||
557 | |||
554 | shift = mmu_psize_defs[size].shift; | 558 | shift = mmu_psize_defs[size].shift; |
555 | 559 | ||
556 | avpn = (HPTE_V_AVPN_VAL(hpte_v) & ~mmu_psize_defs[size].avpnm); | 560 | avpn = (HPTE_V_AVPN_VAL(hpte_v) & ~mmu_psize_defs[size].avpnm); |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index b2740c67e172..5b22ba0b58bc 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -201,9 +201,8 @@ unsigned long htab_convert_pte_flags(unsigned long pteflags) | |||
201 | /* | 201 | /* |
202 | * We can't allow hardware to update hpte bits. Hence always | 202 | * We can't allow hardware to update hpte bits. Hence always |
203 | * set 'R' bit and set 'C' if it is a write fault | 203 | * set 'R' bit and set 'C' if it is a write fault |
204 | * Memory coherence is always enabled | ||
205 | */ | 204 | */ |
206 | rflags |= HPTE_R_R | HPTE_R_M; | 205 | rflags |= HPTE_R_R; |
207 | 206 | ||
208 | if (pteflags & _PAGE_DIRTY) | 207 | if (pteflags & _PAGE_DIRTY) |
209 | rflags |= HPTE_R_C; | 208 | rflags |= HPTE_R_C; |
@@ -213,10 +212,15 @@ unsigned long htab_convert_pte_flags(unsigned long pteflags) | |||
213 | 212 | ||
214 | if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_TOLERANT) | 213 | if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_TOLERANT) |
215 | rflags |= HPTE_R_I; | 214 | rflags |= HPTE_R_I; |
216 | if ((pteflags & _PAGE_CACHE_CTL ) == _PAGE_NON_IDEMPOTENT) | 215 | else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_NON_IDEMPOTENT) |
217 | rflags |= (HPTE_R_I | HPTE_R_G); | 216 | rflags |= (HPTE_R_I | HPTE_R_G); |
218 | if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) | 217 | else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) |
219 | rflags |= (HPTE_R_I | HPTE_R_W); | 218 | rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M); |
219 | else | ||
220 | /* | ||
221 | * Add memory coherence if cache inhibited is not set | ||
222 | */ | ||
223 | rflags |= HPTE_R_M; | ||
220 | 224 | ||
221 | return rflags; | 225 | return rflags; |
222 | } | 226 | } |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5aac1a3f86cd..119d18611500 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -73,7 +73,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, | |||
73 | cachep = PGT_CACHE(pdshift - pshift); | 73 | cachep = PGT_CACHE(pdshift - pshift); |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | new = kmem_cache_zalloc(cachep, GFP_KERNEL|__GFP_REPEAT); | 76 | new = kmem_cache_zalloc(cachep, GFP_KERNEL); |
77 | 77 | ||
78 | BUG_ON(pshift > HUGEPD_SHIFT_MASK); | 78 | BUG_ON(pshift > HUGEPD_SHIFT_MASK); |
79 | BUG_ON((unsigned long)new & HUGEPD_SHIFT_MASK); | 79 | BUG_ON((unsigned long)new & HUGEPD_SHIFT_MASK); |
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c index 227b2a6c4544..196222227e82 100644 --- a/arch/powerpc/mm/mmu_context_book3s64.c +++ b/arch/powerpc/mm/mmu_context_book3s64.c | |||
@@ -65,7 +65,7 @@ static int radix__init_new_context(struct mm_struct *mm, int index) | |||
65 | /* | 65 | /* |
66 | * set the process table entry, | 66 | * set the process table entry, |
67 | */ | 67 | */ |
68 | rts_field = 3ull << PPC_BITLSHIFT(2); | 68 | rts_field = radix__get_tree_size(); |
69 | process_tb[index].prtb0 = cpu_to_be64(rts_field | __pa(mm->pgd) | RADIX_PGD_INDEX_SIZE); | 69 | process_tb[index].prtb0 = cpu_to_be64(rts_field | __pa(mm->pgd) | RADIX_PGD_INDEX_SIZE); |
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index c939e6e57a9e..e58707deef5c 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c | |||
@@ -160,9 +160,8 @@ redo: | |||
160 | process_tb = early_alloc_pgtable(1UL << PRTB_SIZE_SHIFT); | 160 | process_tb = early_alloc_pgtable(1UL << PRTB_SIZE_SHIFT); |
161 | /* | 161 | /* |
162 | * Fill in the process table. | 162 | * Fill in the process table. |
163 | * we support 52 bits, hence 52-28 = 24, 11000 | ||
164 | */ | 163 | */ |
165 | rts_field = 3ull << PPC_BITLSHIFT(2); | 164 | rts_field = radix__get_tree_size(); |
166 | process_tb->prtb0 = cpu_to_be64(rts_field | __pa(init_mm.pgd) | RADIX_PGD_INDEX_SIZE); | 165 | process_tb->prtb0 = cpu_to_be64(rts_field | __pa(init_mm.pgd) | RADIX_PGD_INDEX_SIZE); |
167 | /* | 166 | /* |
168 | * Fill in the partition table. We are suppose to use effective address | 167 | * Fill in the partition table. We are suppose to use effective address |
@@ -176,10 +175,8 @@ redo: | |||
176 | static void __init radix_init_partition_table(void) | 175 | static void __init radix_init_partition_table(void) |
177 | { | 176 | { |
178 | unsigned long rts_field; | 177 | unsigned long rts_field; |
179 | /* | 178 | |
180 | * we support 52 bits, hence 52-28 = 24, 11000 | 179 | rts_field = radix__get_tree_size(); |
181 | */ | ||
182 | rts_field = 3ull << PPC_BITLSHIFT(2); | ||
183 | 180 | ||
184 | BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 24), "Partition table size too large."); | 181 | BUILD_BUG_ON_MSG((PATB_SIZE_SHIFT > 24), "Partition table size too large."); |
185 | partition_tb = early_alloc_pgtable(1UL << PATB_SIZE_SHIFT); | 182 | partition_tb = early_alloc_pgtable(1UL << PATB_SIZE_SHIFT); |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index bf7bf32b54f8..7f922f557936 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -84,7 +84,7 @@ __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add | |||
84 | pte_t *pte; | 84 | pte_t *pte; |
85 | 85 | ||
86 | if (slab_is_available()) { | 86 | if (slab_is_available()) { |
87 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 87 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
88 | } else { | 88 | } else { |
89 | pte = __va(memblock_alloc(PAGE_SIZE, PAGE_SIZE)); | 89 | pte = __va(memblock_alloc(PAGE_SIZE, PAGE_SIZE)); |
90 | if (pte) | 90 | if (pte) |
@@ -97,7 +97,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
97 | { | 97 | { |
98 | struct page *ptepage; | 98 | struct page *ptepage; |
99 | 99 | ||
100 | gfp_t flags = GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO; | 100 | gfp_t flags = GFP_KERNEL | __GFP_ZERO; |
101 | 101 | ||
102 | ptepage = alloc_pages(flags, 0); | 102 | ptepage = alloc_pages(flags, 0); |
103 | if (!ptepage) | 103 | if (!ptepage) |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index e009e0604a8a..f5e8d4edb808 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -350,8 +350,7 @@ static pte_t *get_from_cache(struct mm_struct *mm) | |||
350 | static pte_t *__alloc_for_cache(struct mm_struct *mm, int kernel) | 350 | static pte_t *__alloc_for_cache(struct mm_struct *mm, int kernel) |
351 | { | 351 | { |
352 | void *ret = NULL; | 352 | void *ret = NULL; |
353 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | | 353 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); |
354 | __GFP_REPEAT | __GFP_ZERO); | ||
355 | if (!page) | 354 | if (!page) |
356 | return NULL; | 355 | return NULL; |
357 | if (!kernel && !pgtable_page_ctor(page)) { | 356 | if (!kernel && !pgtable_page_ctor(page)) { |
diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index 0fdaf93a3e09..ab2f60e812e2 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c | |||
@@ -18,16 +18,20 @@ | |||
18 | 18 | ||
19 | static DEFINE_RAW_SPINLOCK(native_tlbie_lock); | 19 | static DEFINE_RAW_SPINLOCK(native_tlbie_lock); |
20 | 20 | ||
21 | static inline void __tlbiel_pid(unsigned long pid, int set) | 21 | #define RIC_FLUSH_TLB 0 |
22 | #define RIC_FLUSH_PWC 1 | ||
23 | #define RIC_FLUSH_ALL 2 | ||
24 | |||
25 | static inline void __tlbiel_pid(unsigned long pid, int set, | ||
26 | unsigned long ric) | ||
22 | { | 27 | { |
23 | unsigned long rb,rs,ric,prs,r; | 28 | unsigned long rb,rs,prs,r; |
24 | 29 | ||
25 | rb = PPC_BIT(53); /* IS = 1 */ | 30 | rb = PPC_BIT(53); /* IS = 1 */ |
26 | rb |= set << PPC_BITLSHIFT(51); | 31 | rb |= set << PPC_BITLSHIFT(51); |
27 | rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); | 32 | rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); |
28 | prs = 1; /* process scoped */ | 33 | prs = 1; /* process scoped */ |
29 | r = 1; /* raidx format */ | 34 | r = 1; /* raidx format */ |
30 | ric = 2; /* invalidate all the caches */ | ||
31 | 35 | ||
32 | asm volatile("ptesync": : :"memory"); | 36 | asm volatile("ptesync": : :"memory"); |
33 | asm volatile(".long 0x7c000224 | (%0 << 11) | (%1 << 16) |" | 37 | asm volatile(".long 0x7c000224 | (%0 << 11) | (%1 << 16) |" |
@@ -39,25 +43,24 @@ static inline void __tlbiel_pid(unsigned long pid, int set) | |||
39 | /* | 43 | /* |
40 | * We use 128 set in radix mode and 256 set in hpt mode. | 44 | * We use 128 set in radix mode and 256 set in hpt mode. |
41 | */ | 45 | */ |
42 | static inline void _tlbiel_pid(unsigned long pid) | 46 | static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) |
43 | { | 47 | { |
44 | int set; | 48 | int set; |
45 | 49 | ||
46 | for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) { | 50 | for (set = 0; set < POWER9_TLB_SETS_RADIX ; set++) { |
47 | __tlbiel_pid(pid, set); | 51 | __tlbiel_pid(pid, set, ric); |
48 | } | 52 | } |
49 | return; | 53 | return; |
50 | } | 54 | } |
51 | 55 | ||
52 | static inline void _tlbie_pid(unsigned long pid) | 56 | static inline void _tlbie_pid(unsigned long pid, unsigned long ric) |
53 | { | 57 | { |
54 | unsigned long rb,rs,ric,prs,r; | 58 | unsigned long rb,rs,prs,r; |
55 | 59 | ||
56 | rb = PPC_BIT(53); /* IS = 1 */ | 60 | rb = PPC_BIT(53); /* IS = 1 */ |
57 | rs = pid << PPC_BITLSHIFT(31); | 61 | rs = pid << PPC_BITLSHIFT(31); |
58 | prs = 1; /* process scoped */ | 62 | prs = 1; /* process scoped */ |
59 | r = 1; /* raidx format */ | 63 | r = 1; /* raidx format */ |
60 | ric = 2; /* invalidate all the caches */ | ||
61 | 64 | ||
62 | asm volatile("ptesync": : :"memory"); | 65 | asm volatile("ptesync": : :"memory"); |
63 | asm volatile(".long 0x7c000264 | (%0 << 11) | (%1 << 16) |" | 66 | asm volatile(".long 0x7c000264 | (%0 << 11) | (%1 << 16) |" |
@@ -67,16 +70,15 @@ static inline void _tlbie_pid(unsigned long pid) | |||
67 | } | 70 | } |
68 | 71 | ||
69 | static inline void _tlbiel_va(unsigned long va, unsigned long pid, | 72 | static inline void _tlbiel_va(unsigned long va, unsigned long pid, |
70 | unsigned long ap) | 73 | unsigned long ap, unsigned long ric) |
71 | { | 74 | { |
72 | unsigned long rb,rs,ric,prs,r; | 75 | unsigned long rb,rs,prs,r; |
73 | 76 | ||
74 | rb = va & ~(PPC_BITMASK(52, 63)); | 77 | rb = va & ~(PPC_BITMASK(52, 63)); |
75 | rb |= ap << PPC_BITLSHIFT(58); | 78 | rb |= ap << PPC_BITLSHIFT(58); |
76 | rs = pid << PPC_BITLSHIFT(31); | 79 | rs = pid << PPC_BITLSHIFT(31); |
77 | prs = 1; /* process scoped */ | 80 | prs = 1; /* process scoped */ |
78 | r = 1; /* raidx format */ | 81 | r = 1; /* raidx format */ |
79 | ric = 0; /* no cluster flush yet */ | ||
80 | 82 | ||
81 | asm volatile("ptesync": : :"memory"); | 83 | asm volatile("ptesync": : :"memory"); |
82 | asm volatile(".long 0x7c000224 | (%0 << 11) | (%1 << 16) |" | 84 | asm volatile(".long 0x7c000224 | (%0 << 11) | (%1 << 16) |" |
@@ -86,16 +88,15 @@ static inline void _tlbiel_va(unsigned long va, unsigned long pid, | |||
86 | } | 88 | } |
87 | 89 | ||
88 | static inline void _tlbie_va(unsigned long va, unsigned long pid, | 90 | static inline void _tlbie_va(unsigned long va, unsigned long pid, |
89 | unsigned long ap) | 91 | unsigned long ap, unsigned long ric) |
90 | { | 92 | { |
91 | unsigned long rb,rs,ric,prs,r; | 93 | unsigned long rb,rs,prs,r; |
92 | 94 | ||
93 | rb = va & ~(PPC_BITMASK(52, 63)); | 95 | rb = va & ~(PPC_BITMASK(52, 63)); |
94 | rb |= ap << PPC_BITLSHIFT(58); | 96 | rb |= ap << PPC_BITLSHIFT(58); |
95 | rs = pid << PPC_BITLSHIFT(31); | 97 | rs = pid << PPC_BITLSHIFT(31); |
96 | prs = 1; /* process scoped */ | 98 | prs = 1; /* process scoped */ |
97 | r = 1; /* raidx format */ | 99 | r = 1; /* raidx format */ |
98 | ric = 0; /* no cluster flush yet */ | ||
99 | 100 | ||
100 | asm volatile("ptesync": : :"memory"); | 101 | asm volatile("ptesync": : :"memory"); |
101 | asm volatile(".long 0x7c000264 | (%0 << 11) | (%1 << 16) |" | 102 | asm volatile(".long 0x7c000264 | (%0 << 11) | (%1 << 16) |" |
@@ -117,25 +118,40 @@ static inline void _tlbie_va(unsigned long va, unsigned long pid, | |||
117 | */ | 118 | */ |
118 | void radix__local_flush_tlb_mm(struct mm_struct *mm) | 119 | void radix__local_flush_tlb_mm(struct mm_struct *mm) |
119 | { | 120 | { |
120 | unsigned int pid; | 121 | unsigned long pid; |
121 | 122 | ||
122 | preempt_disable(); | 123 | preempt_disable(); |
123 | pid = mm->context.id; | 124 | pid = mm->context.id; |
124 | if (pid != MMU_NO_CONTEXT) | 125 | if (pid != MMU_NO_CONTEXT) |
125 | _tlbiel_pid(pid); | 126 | _tlbiel_pid(pid, RIC_FLUSH_ALL); |
126 | preempt_enable(); | 127 | preempt_enable(); |
127 | } | 128 | } |
128 | EXPORT_SYMBOL(radix__local_flush_tlb_mm); | 129 | EXPORT_SYMBOL(radix__local_flush_tlb_mm); |
129 | 130 | ||
131 | void radix__local_flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr) | ||
132 | { | ||
133 | unsigned long pid; | ||
134 | struct mm_struct *mm = tlb->mm; | ||
135 | |||
136 | preempt_disable(); | ||
137 | |||
138 | pid = mm->context.id; | ||
139 | if (pid != MMU_NO_CONTEXT) | ||
140 | _tlbiel_pid(pid, RIC_FLUSH_PWC); | ||
141 | |||
142 | preempt_enable(); | ||
143 | } | ||
144 | EXPORT_SYMBOL(radix__local_flush_tlb_pwc); | ||
145 | |||
130 | void radix___local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | 146 | void radix___local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
131 | unsigned long ap, int nid) | 147 | unsigned long ap, int nid) |
132 | { | 148 | { |
133 | unsigned int pid; | 149 | unsigned long pid; |
134 | 150 | ||
135 | preempt_disable(); | 151 | preempt_disable(); |
136 | pid = mm ? mm->context.id : 0; | 152 | pid = mm ? mm->context.id : 0; |
137 | if (pid != MMU_NO_CONTEXT) | 153 | if (pid != MMU_NO_CONTEXT) |
138 | _tlbiel_va(vmaddr, pid, ap); | 154 | _tlbiel_va(vmaddr, pid, ap, RIC_FLUSH_TLB); |
139 | preempt_enable(); | 155 | preempt_enable(); |
140 | } | 156 | } |
141 | 157 | ||
@@ -160,7 +176,7 @@ static int mm_is_core_local(struct mm_struct *mm) | |||
160 | 176 | ||
161 | void radix__flush_tlb_mm(struct mm_struct *mm) | 177 | void radix__flush_tlb_mm(struct mm_struct *mm) |
162 | { | 178 | { |
163 | unsigned int pid; | 179 | unsigned long pid; |
164 | 180 | ||
165 | preempt_disable(); | 181 | preempt_disable(); |
166 | pid = mm->context.id; | 182 | pid = mm->context.id; |
@@ -172,20 +188,46 @@ void radix__flush_tlb_mm(struct mm_struct *mm) | |||
172 | 188 | ||
173 | if (lock_tlbie) | 189 | if (lock_tlbie) |
174 | raw_spin_lock(&native_tlbie_lock); | 190 | raw_spin_lock(&native_tlbie_lock); |
175 | _tlbie_pid(pid); | 191 | _tlbie_pid(pid, RIC_FLUSH_ALL); |
176 | if (lock_tlbie) | 192 | if (lock_tlbie) |
177 | raw_spin_unlock(&native_tlbie_lock); | 193 | raw_spin_unlock(&native_tlbie_lock); |
178 | } else | 194 | } else |
179 | _tlbiel_pid(pid); | 195 | _tlbiel_pid(pid, RIC_FLUSH_ALL); |
180 | no_context: | 196 | no_context: |
181 | preempt_enable(); | 197 | preempt_enable(); |
182 | } | 198 | } |
183 | EXPORT_SYMBOL(radix__flush_tlb_mm); | 199 | EXPORT_SYMBOL(radix__flush_tlb_mm); |
184 | 200 | ||
201 | void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr) | ||
202 | { | ||
203 | unsigned long pid; | ||
204 | struct mm_struct *mm = tlb->mm; | ||
205 | |||
206 | preempt_disable(); | ||
207 | |||
208 | pid = mm->context.id; | ||
209 | if (unlikely(pid == MMU_NO_CONTEXT)) | ||
210 | goto no_context; | ||
211 | |||
212 | if (!mm_is_core_local(mm)) { | ||
213 | int lock_tlbie = !mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE); | ||
214 | |||
215 | if (lock_tlbie) | ||
216 | raw_spin_lock(&native_tlbie_lock); | ||
217 | _tlbie_pid(pid, RIC_FLUSH_PWC); | ||
218 | if (lock_tlbie) | ||
219 | raw_spin_unlock(&native_tlbie_lock); | ||
220 | } else | ||
221 | _tlbiel_pid(pid, RIC_FLUSH_PWC); | ||
222 | no_context: | ||
223 | preempt_enable(); | ||
224 | } | ||
225 | EXPORT_SYMBOL(radix__flush_tlb_pwc); | ||
226 | |||
185 | void radix___flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | 227 | void radix___flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, |
186 | unsigned long ap, int nid) | 228 | unsigned long ap, int nid) |
187 | { | 229 | { |
188 | unsigned int pid; | 230 | unsigned long pid; |
189 | 231 | ||
190 | preempt_disable(); | 232 | preempt_disable(); |
191 | pid = mm ? mm->context.id : 0; | 233 | pid = mm ? mm->context.id : 0; |
@@ -196,11 +238,11 @@ void radix___flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | |||
196 | 238 | ||
197 | if (lock_tlbie) | 239 | if (lock_tlbie) |
198 | raw_spin_lock(&native_tlbie_lock); | 240 | raw_spin_lock(&native_tlbie_lock); |
199 | _tlbie_va(vmaddr, pid, ap); | 241 | _tlbie_va(vmaddr, pid, ap, RIC_FLUSH_TLB); |
200 | if (lock_tlbie) | 242 | if (lock_tlbie) |
201 | raw_spin_unlock(&native_tlbie_lock); | 243 | raw_spin_unlock(&native_tlbie_lock); |
202 | } else | 244 | } else |
203 | _tlbiel_va(vmaddr, pid, ap); | 245 | _tlbiel_va(vmaddr, pid, ap, RIC_FLUSH_TLB); |
204 | bail: | 246 | bail: |
205 | preempt_enable(); | 247 | preempt_enable(); |
206 | } | 248 | } |
@@ -224,7 +266,7 @@ void radix__flush_tlb_kernel_range(unsigned long start, unsigned long end) | |||
224 | 266 | ||
225 | if (lock_tlbie) | 267 | if (lock_tlbie) |
226 | raw_spin_lock(&native_tlbie_lock); | 268 | raw_spin_lock(&native_tlbie_lock); |
227 | _tlbie_pid(0); | 269 | _tlbie_pid(0, RIC_FLUSH_ALL); |
228 | if (lock_tlbie) | 270 | if (lock_tlbie) |
229 | raw_spin_unlock(&native_tlbie_lock); | 271 | raw_spin_unlock(&native_tlbie_lock); |
230 | } | 272 | } |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index b7dfc1359d01..3e8865b187de 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -927,7 +927,7 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddw_avail, | |||
927 | dn = pci_device_to_OF_node(dev); | 927 | dn = pci_device_to_OF_node(dev); |
928 | pdn = PCI_DN(dn); | 928 | pdn = PCI_DN(dn); |
929 | buid = pdn->phb->buid; | 929 | buid = pdn->phb->buid; |
930 | cfg_addr = (pdn->busno << 8) | pdn->devfn; | 930 | cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); |
931 | 931 | ||
932 | ret = rtas_call(ddw_avail[0], 3, 5, (u32 *)query, | 932 | ret = rtas_call(ddw_avail[0], 3, 5, (u32 *)query, |
933 | cfg_addr, BUID_HI(buid), BUID_LO(buid)); | 933 | cfg_addr, BUID_HI(buid), BUID_LO(buid)); |
@@ -956,7 +956,7 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail, | |||
956 | dn = pci_device_to_OF_node(dev); | 956 | dn = pci_device_to_OF_node(dev); |
957 | pdn = PCI_DN(dn); | 957 | pdn = PCI_DN(dn); |
958 | buid = pdn->phb->buid; | 958 | buid = pdn->phb->buid; |
959 | cfg_addr = (pdn->busno << 8) | pdn->devfn; | 959 | cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8)); |
960 | 960 | ||
961 | do { | 961 | do { |
962 | /* extra outputs are LIOBN and dma-addr (hi, lo) */ | 962 | /* extra outputs are LIOBN and dma-addr (hi, lo) */ |
diff --git a/arch/s390/include/asm/fpu/api.h b/arch/s390/include/asm/fpu/api.h index 5e04f3cbd320..8ae236b0f80b 100644 --- a/arch/s390/include/asm/fpu/api.h +++ b/arch/s390/include/asm/fpu/api.h | |||
@@ -22,7 +22,7 @@ static inline int test_fp_ctl(u32 fpc) | |||
22 | " la %0,0\n" | 22 | " la %0,0\n" |
23 | "1:\n" | 23 | "1:\n" |
24 | EX_TABLE(0b,1b) | 24 | EX_TABLE(0b,1b) |
25 | : "=d" (rc), "=d" (orig_fpc) | 25 | : "=d" (rc), "=&d" (orig_fpc) |
26 | : "d" (fpc), "0" (-EINVAL)); | 26 | : "d" (fpc), "0" (-EINVAL)); |
27 | return rc; | 27 | return rc; |
28 | } | 28 | } |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 37b9017c6a96..ac82e8eb936d 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -245,6 +245,7 @@ struct kvm_vcpu_stat { | |||
245 | u32 exit_stop_request; | 245 | u32 exit_stop_request; |
246 | u32 exit_validity; | 246 | u32 exit_validity; |
247 | u32 exit_instruction; | 247 | u32 exit_instruction; |
248 | u32 exit_pei; | ||
248 | u32 halt_successful_poll; | 249 | u32 halt_successful_poll; |
249 | u32 halt_attempted_poll; | 250 | u32 halt_attempted_poll; |
250 | u32 halt_poll_invalid; | 251 | u32 halt_poll_invalid; |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index f20abdb5630a..d14069d4b88d 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -2064,12 +2064,5 @@ void s390_reset_system(void) | |||
2064 | S390_lowcore.program_new_psw.addr = | 2064 | S390_lowcore.program_new_psw.addr = |
2065 | (unsigned long) s390_base_pgm_handler; | 2065 | (unsigned long) s390_base_pgm_handler; |
2066 | 2066 | ||
2067 | /* | ||
2068 | * Clear subchannel ID and number to signal new kernel that no CCW or | ||
2069 | * SCSI IPL has been done (for kexec and kdump) | ||
2070 | */ | ||
2071 | S390_lowcore.subchannel_id = 0; | ||
2072 | S390_lowcore.subchannel_nr = 0; | ||
2073 | |||
2074 | do_reset_calls(); | 2067 | do_reset_calls(); |
2075 | } | 2068 | } |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 59215c518f37..7ec63b1d920d 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
@@ -649,6 +649,8 @@ static int cpumf_pmu_commit_txn(struct pmu *pmu) | |||
649 | 649 | ||
650 | /* Performance monitoring unit for s390x */ | 650 | /* Performance monitoring unit for s390x */ |
651 | static struct pmu cpumf_pmu = { | 651 | static struct pmu cpumf_pmu = { |
652 | .task_ctx_nr = perf_sw_context, | ||
653 | .capabilities = PERF_PMU_CAP_NO_INTERRUPT, | ||
652 | .pmu_enable = cpumf_pmu_enable, | 654 | .pmu_enable = cpumf_pmu_enable, |
653 | .pmu_disable = cpumf_pmu_disable, | 655 | .pmu_disable = cpumf_pmu_disable, |
654 | .event_init = cpumf_pmu_event_init, | 656 | .event_init = cpumf_pmu_event_init, |
@@ -708,12 +710,6 @@ static int __init cpumf_pmu_init(void) | |||
708 | goto out; | 710 | goto out; |
709 | } | 711 | } |
710 | 712 | ||
711 | /* The CPU measurement counter facility does not have overflow | ||
712 | * interrupts to do sampling. Sampling must be provided by | ||
713 | * external means, for example, by timers. | ||
714 | */ | ||
715 | cpumf_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; | ||
716 | |||
717 | cpumf_pmu.attr_groups = cpumf_cf_event_group(); | 713 | cpumf_pmu.attr_groups = cpumf_cf_event_group(); |
718 | rc = perf_pmu_register(&cpumf_pmu, "cpum_cf", PERF_TYPE_RAW); | 714 | rc = perf_pmu_register(&cpumf_pmu, "cpum_cf", PERF_TYPE_RAW); |
719 | if (rc) { | 715 | if (rc) { |
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 2e6b54e4d3f9..252157181302 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -341,6 +341,8 @@ static int handle_mvpg_pei(struct kvm_vcpu *vcpu) | |||
341 | 341 | ||
342 | static int handle_partial_execution(struct kvm_vcpu *vcpu) | 342 | static int handle_partial_execution(struct kvm_vcpu *vcpu) |
343 | { | 343 | { |
344 | vcpu->stat.exit_pei++; | ||
345 | |||
344 | if (vcpu->arch.sie_block->ipa == 0xb254) /* MVPG */ | 346 | if (vcpu->arch.sie_block->ipa == 0xb254) /* MVPG */ |
345 | return handle_mvpg_pei(vcpu); | 347 | return handle_mvpg_pei(vcpu); |
346 | if (vcpu->arch.sie_block->ipa >> 8 == 0xae) /* SIGP */ | 348 | if (vcpu->arch.sie_block->ipa >> 8 == 0xae) /* SIGP */ |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 6d8ec3ac9dd8..43f2a2b80490 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -61,6 +61,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
61 | { "exit_external_request", VCPU_STAT(exit_external_request) }, | 61 | { "exit_external_request", VCPU_STAT(exit_external_request) }, |
62 | { "exit_external_interrupt", VCPU_STAT(exit_external_interrupt) }, | 62 | { "exit_external_interrupt", VCPU_STAT(exit_external_interrupt) }, |
63 | { "exit_instruction", VCPU_STAT(exit_instruction) }, | 63 | { "exit_instruction", VCPU_STAT(exit_instruction) }, |
64 | { "exit_pei", VCPU_STAT(exit_pei) }, | ||
64 | { "exit_program_interruption", VCPU_STAT(exit_program_interruption) }, | 65 | { "exit_program_interruption", VCPU_STAT(exit_program_interruption) }, |
65 | { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) }, | 66 | { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) }, |
66 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, | 67 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, |
@@ -657,7 +658,7 @@ static int kvm_s390_set_processor(struct kvm *kvm, struct kvm_device_attr *attr) | |||
657 | kvm->arch.model.cpuid = proc->cpuid; | 658 | kvm->arch.model.cpuid = proc->cpuid; |
658 | lowest_ibc = sclp.ibc >> 16 & 0xfff; | 659 | lowest_ibc = sclp.ibc >> 16 & 0xfff; |
659 | unblocked_ibc = sclp.ibc & 0xfff; | 660 | unblocked_ibc = sclp.ibc & 0xfff; |
660 | if (lowest_ibc) { | 661 | if (lowest_ibc && proc->ibc) { |
661 | if (proc->ibc > unblocked_ibc) | 662 | if (proc->ibc > unblocked_ibc) |
662 | kvm->arch.model.ibc = unblocked_ibc; | 663 | kvm->arch.model.ibc = unblocked_ibc; |
663 | else if (proc->ibc < lowest_ibc) | 664 | else if (proc->ibc < lowest_ibc) |
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c index e8b5962ac12a..e2565d2d0c32 100644 --- a/arch/s390/mm/pgalloc.c +++ b/arch/s390/mm/pgalloc.c | |||
@@ -169,7 +169,7 @@ unsigned long *page_table_alloc(struct mm_struct *mm) | |||
169 | return table; | 169 | return table; |
170 | } | 170 | } |
171 | /* Allocate a fresh page */ | 171 | /* Allocate a fresh page */ |
172 | page = alloc_page(GFP_KERNEL|__GFP_REPEAT); | 172 | page = alloc_page(GFP_KERNEL); |
173 | if (!page) | 173 | if (!page) |
174 | return NULL; | 174 | return NULL; |
175 | if (!pgtable_page_ctor(page)) { | 175 | if (!pgtable_page_ctor(page)) { |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 4324b87f9398..9f0ce0e6eeb4 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -437,7 +437,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr, | |||
437 | pgste = pgste_get_lock(ptep); | 437 | pgste = pgste_get_lock(ptep); |
438 | pgstev = pgste_val(pgste); | 438 | pgstev = pgste_val(pgste); |
439 | pte = *ptep; | 439 | pte = *ptep; |
440 | if (pte_swap(pte) && | 440 | if (!reset && pte_swap(pte) && |
441 | ((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED || | 441 | ((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED || |
442 | (pgstev & _PGSTE_GPS_ZERO))) { | 442 | (pgstev & _PGSTE_GPS_ZERO))) { |
443 | ptep_zap_swap_entry(mm, pte_to_swp_entry(pte)); | 443 | ptep_zap_swap_entry(mm, pte_to_swp_entry(pte)); |
diff --git a/arch/score/include/asm/pgalloc.h b/arch/score/include/asm/pgalloc.h index 2e067657db98..49b012d78c1a 100644 --- a/arch/score/include/asm/pgalloc.h +++ b/arch/score/include/asm/pgalloc.h | |||
@@ -42,8 +42,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
42 | { | 42 | { |
43 | pte_t *pte; | 43 | pte_t *pte; |
44 | 44 | ||
45 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, | 45 | pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_ZERO, PTE_ORDER); |
46 | PTE_ORDER); | ||
47 | 46 | ||
48 | return pte; | 47 | return pte; |
49 | } | 48 | } |
@@ -53,7 +52,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
53 | { | 52 | { |
54 | struct page *pte; | 53 | struct page *pte; |
55 | 54 | ||
56 | pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 55 | pte = alloc_pages(GFP_KERNEL, PTE_ORDER); |
57 | if (!pte) | 56 | if (!pte) |
58 | return NULL; | 57 | return NULL; |
59 | clear_highpage(pte); | 58 | clear_highpage(pte); |
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index a33673b3687d..f3f42c84c40f 100644 --- a/arch/sh/include/asm/pgalloc.h +++ b/arch/sh/include/asm/pgalloc.h | |||
@@ -34,7 +34,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
34 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 34 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
35 | unsigned long address) | 35 | unsigned long address) |
36 | { | 36 | { |
37 | return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL); | 37 | return quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); |
38 | } | 38 | } |
39 | 39 | ||
40 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | 40 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, |
@@ -43,7 +43,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
43 | struct page *page; | 43 | struct page *page; |
44 | void *pg; | 44 | void *pg; |
45 | 45 | ||
46 | pg = quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL); | 46 | pg = quicklist_alloc(QUICK_PT, GFP_KERNEL, NULL); |
47 | if (!pg) | 47 | if (!pg) |
48 | return NULL; | 48 | return NULL; |
49 | page = virt_to_page(pg); | 49 | page = virt_to_page(pg); |
diff --git a/arch/sh/mm/pgtable.c b/arch/sh/mm/pgtable.c index 26e03a1f7ca4..a62bd8696779 100644 --- a/arch/sh/mm/pgtable.c +++ b/arch/sh/mm/pgtable.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
3 | 3 | ||
4 | #define PGALLOC_GFP GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO | 4 | #define PGALLOC_GFP GFP_KERNEL | __GFP_ZERO |
5 | 5 | ||
6 | static struct kmem_cache *pgd_cachep; | 6 | static struct kmem_cache *pgd_cachep; |
7 | #if PAGETABLE_LEVELS > 2 | 7 | #if PAGETABLE_LEVELS > 2 |
diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h index 5e3187185b4a..3529f1378cd8 100644 --- a/arch/sparc/include/asm/pgalloc_64.h +++ b/arch/sparc/include/asm/pgalloc_64.h | |||
@@ -41,8 +41,7 @@ static inline void __pud_populate(pud_t *pud, pmd_t *pmd) | |||
41 | 41 | ||
42 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 42 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
43 | { | 43 | { |
44 | return kmem_cache_alloc(pgtable_cache, | 44 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); |
45 | GFP_KERNEL|__GFP_REPEAT); | ||
46 | } | 45 | } |
47 | 46 | ||
48 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | 47 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) |
@@ -52,8 +51,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud) | |||
52 | 51 | ||
53 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 52 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
54 | { | 53 | { |
55 | return kmem_cache_alloc(pgtable_cache, | 54 | return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); |
56 | GFP_KERNEL|__GFP_REPEAT); | ||
57 | } | 55 | } |
58 | 56 | ||
59 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | 57 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 14bb0d5ed3c6..aec508e37490 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -2704,8 +2704,7 @@ void __flush_tlb_all(void) | |||
2704 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 2704 | pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
2705 | unsigned long address) | 2705 | unsigned long address) |
2706 | { | 2706 | { |
2707 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | | 2707 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); |
2708 | __GFP_REPEAT | __GFP_ZERO); | ||
2709 | pte_t *pte = NULL; | 2708 | pte_t *pte = NULL; |
2710 | 2709 | ||
2711 | if (page) | 2710 | if (page) |
@@ -2717,8 +2716,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
2717 | pgtable_t pte_alloc_one(struct mm_struct *mm, | 2716 | pgtable_t pte_alloc_one(struct mm_struct *mm, |
2718 | unsigned long address) | 2717 | unsigned long address) |
2719 | { | 2718 | { |
2720 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | | 2719 | struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); |
2721 | __GFP_REPEAT | __GFP_ZERO); | ||
2722 | if (!page) | 2720 | if (!page) |
2723 | return NULL; | 2721 | return NULL; |
2724 | if (!pgtable_page_ctor(page)) { | 2722 | if (!pgtable_page_ctor(page)) { |
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index 4b7cef9e94e0..c1467ac59ce6 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
@@ -78,7 +78,7 @@ struct thread_info { | |||
78 | 78 | ||
79 | #ifndef __ASSEMBLY__ | 79 | #ifndef __ASSEMBLY__ |
80 | 80 | ||
81 | void arch_release_thread_info(struct thread_info *info); | 81 | void arch_release_thread_stack(unsigned long *stack); |
82 | 82 | ||
83 | /* How to get the thread information struct from C. */ | 83 | /* How to get the thread information struct from C. */ |
84 | register unsigned long stack_pointer __asm__("sp"); | 84 | register unsigned long stack_pointer __asm__("sp"); |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 6b705ccc9cc1..a465d8372edd 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -73,8 +73,9 @@ void arch_cpu_idle(void) | |||
73 | /* | 73 | /* |
74 | * Release a thread_info structure | 74 | * Release a thread_info structure |
75 | */ | 75 | */ |
76 | void arch_release_thread_info(struct thread_info *info) | 76 | void arch_release_thread_stack(unsigned long *stack) |
77 | { | 77 | { |
78 | struct thread_info *info = (void *)stack; | ||
78 | struct single_step_state *step_state = info->step_state; | 79 | struct single_step_state *step_state = info->step_state; |
79 | 80 | ||
80 | if (step_state) { | 81 | if (step_state) { |
diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c index 7bf2491a9c1f..c4d5bf841a7f 100644 --- a/arch/tile/mm/pgtable.c +++ b/arch/tile/mm/pgtable.c | |||
@@ -231,7 +231,7 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
231 | struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address, | 231 | struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address, |
232 | int order) | 232 | int order) |
233 | { | 233 | { |
234 | gfp_t flags = GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO; | 234 | gfp_t flags = GFP_KERNEL|__GFP_ZERO; |
235 | struct page *p; | 235 | struct page *p; |
236 | int i; | 236 | int i; |
237 | 237 | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index b2a2dff50b4e..e7437ec62710 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -204,7 +204,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | |||
204 | { | 204 | { |
205 | pte_t *pte; | 205 | pte_t *pte; |
206 | 206 | ||
207 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 207 | pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); |
208 | return pte; | 208 | return pte; |
209 | } | 209 | } |
210 | 210 | ||
@@ -212,7 +212,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
212 | { | 212 | { |
213 | struct page *pte; | 213 | struct page *pte; |
214 | 214 | ||
215 | pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 215 | pte = alloc_page(GFP_KERNEL|__GFP_ZERO); |
216 | if (!pte) | 216 | if (!pte) |
217 | return NULL; | 217 | return NULL; |
218 | if (!pgtable_page_ctor(pte)) { | 218 | if (!pgtable_page_ctor(pte)) { |
diff --git a/arch/unicore32/include/asm/pgalloc.h b/arch/unicore32/include/asm/pgalloc.h index 2e02d1356fdf..26775793c204 100644 --- a/arch/unicore32/include/asm/pgalloc.h +++ b/arch/unicore32/include/asm/pgalloc.h | |||
@@ -28,7 +28,7 @@ extern void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd); | |||
28 | #define pgd_alloc(mm) get_pgd_slow(mm) | 28 | #define pgd_alloc(mm) get_pgd_slow(mm) |
29 | #define pgd_free(mm, pgd) free_pgd_slow(mm, pgd) | 29 | #define pgd_free(mm, pgd) free_pgd_slow(mm, pgd) |
30 | 30 | ||
31 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO) | 31 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Allocate one PTE table. | 34 | * Allocate one PTE table. |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0a7b885964ba..d9a94da0c29f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -2439,6 +2439,15 @@ config PCI_CNB20LE_QUIRK | |||
2439 | 2439 | ||
2440 | source "drivers/pci/Kconfig" | 2440 | source "drivers/pci/Kconfig" |
2441 | 2441 | ||
2442 | config ISA_BUS | ||
2443 | bool "ISA-style bus support on modern systems" if EXPERT | ||
2444 | select ISA_BUS_API | ||
2445 | help | ||
2446 | Enables ISA-style drivers on modern systems. This is necessary to | ||
2447 | support PC/104 devices on X86_64 platforms. | ||
2448 | |||
2449 | If unsure, say N. | ||
2450 | |||
2442 | # x86_64 have no ISA slots, but can have ISA-style DMA. | 2451 | # x86_64 have no ISA slots, but can have ISA-style DMA. |
2443 | config ISA_DMA_API | 2452 | config ISA_DMA_API |
2444 | bool "ISA-style DMA support" if (X86_64 && EXPERT) | 2453 | bool "ISA-style DMA support" if (X86_64 && EXPERT) |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 700a9c6e6159..be8e688fa0d4 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -162,6 +162,9 @@ isoimage: $(obj)/bzImage | |||
162 | for i in lib lib64 share end ; do \ | 162 | for i in lib lib64 share end ; do \ |
163 | if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ | 163 | if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ |
164 | cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ | 164 | cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ |
165 | if [ -f /usr/$$i/syslinux/ldlinux.c32 ]; then \ | ||
166 | cp /usr/$$i/syslinux/ldlinux.c32 $(obj)/isoimage ; \ | ||
167 | fi ; \ | ||
165 | break ; \ | 168 | break ; \ |
166 | fi ; \ | 169 | fi ; \ |
167 | if [ $$i = end ] ; then exit 1 ; fi ; \ | 170 | if [ $$i = end ] ; then exit 1 ; fi ; \ |
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c index 99c4bab123cd..e30eef4f29a6 100644 --- a/arch/x86/events/intel/rapl.c +++ b/arch/x86/events/intel/rapl.c | |||
@@ -714,7 +714,7 @@ static void cleanup_rapl_pmus(void) | |||
714 | int i; | 714 | int i; |
715 | 715 | ||
716 | for (i = 0; i < rapl_pmus->maxpkg; i++) | 716 | for (i = 0; i < rapl_pmus->maxpkg; i++) |
717 | kfree(rapl_pmus->pmus + i); | 717 | kfree(rapl_pmus->pmus[i]); |
718 | kfree(rapl_pmus); | 718 | kfree(rapl_pmus); |
719 | } | 719 | } |
720 | 720 | ||
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index b2625867ebd1..874e8bd64d1d 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c | |||
@@ -2868,27 +2868,10 @@ static struct intel_uncore_type bdx_uncore_cbox = { | |||
2868 | .format_group = &hswep_uncore_cbox_format_group, | 2868 | .format_group = &hswep_uncore_cbox_format_group, |
2869 | }; | 2869 | }; |
2870 | 2870 | ||
2871 | static struct intel_uncore_type bdx_uncore_sbox = { | ||
2872 | .name = "sbox", | ||
2873 | .num_counters = 4, | ||
2874 | .num_boxes = 4, | ||
2875 | .perf_ctr_bits = 48, | ||
2876 | .event_ctl = HSWEP_S0_MSR_PMON_CTL0, | ||
2877 | .perf_ctr = HSWEP_S0_MSR_PMON_CTR0, | ||
2878 | .event_mask = HSWEP_S_MSR_PMON_RAW_EVENT_MASK, | ||
2879 | .box_ctl = HSWEP_S0_MSR_PMON_BOX_CTL, | ||
2880 | .msr_offset = HSWEP_SBOX_MSR_OFFSET, | ||
2881 | .ops = &hswep_uncore_sbox_msr_ops, | ||
2882 | .format_group = &hswep_uncore_sbox_format_group, | ||
2883 | }; | ||
2884 | |||
2885 | #define BDX_MSR_UNCORE_SBOX 3 | ||
2886 | |||
2887 | static struct intel_uncore_type *bdx_msr_uncores[] = { | 2871 | static struct intel_uncore_type *bdx_msr_uncores[] = { |
2888 | &bdx_uncore_ubox, | 2872 | &bdx_uncore_ubox, |
2889 | &bdx_uncore_cbox, | 2873 | &bdx_uncore_cbox, |
2890 | &hswep_uncore_pcu, | 2874 | &hswep_uncore_pcu, |
2891 | &bdx_uncore_sbox, | ||
2892 | NULL, | 2875 | NULL, |
2893 | }; | 2876 | }; |
2894 | 2877 | ||
@@ -2897,10 +2880,6 @@ void bdx_uncore_cpu_init(void) | |||
2897 | if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) | 2880 | if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) |
2898 | bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; | 2881 | bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; |
2899 | uncore_msr_uncores = bdx_msr_uncores; | 2882 | uncore_msr_uncores = bdx_msr_uncores; |
2900 | |||
2901 | /* BDX-DE doesn't have SBOX */ | ||
2902 | if (boot_cpu_data.x86_model == 86) | ||
2903 | uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL; | ||
2904 | } | 2883 | } |
2905 | 2884 | ||
2906 | static struct intel_uncore_type bdx_uncore_ha = { | 2885 | static struct intel_uncore_type bdx_uncore_ha = { |
diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h new file mode 100644 index 000000000000..6999f7d01a0d --- /dev/null +++ b/arch/x86/include/asm/intel-family.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #ifndef _ASM_X86_INTEL_FAMILY_H | ||
2 | #define _ASM_X86_INTEL_FAMILY_H | ||
3 | |||
4 | /* | ||
5 | * "Big Core" Processors (Branded as Core, Xeon, etc...) | ||
6 | * | ||
7 | * The "_X" parts are generally the EP and EX Xeons, or the | ||
8 | * "Extreme" ones, like Broadwell-E. | ||
9 | * | ||
10 | * Things ending in "2" are usually because we have no better | ||
11 | * name for them. There's no processor called "WESTMERE2". | ||
12 | */ | ||
13 | |||
14 | #define INTEL_FAM6_CORE_YONAH 0x0E | ||
15 | #define INTEL_FAM6_CORE2_MEROM 0x0F | ||
16 | #define INTEL_FAM6_CORE2_MEROM_L 0x16 | ||
17 | #define INTEL_FAM6_CORE2_PENRYN 0x17 | ||
18 | #define INTEL_FAM6_CORE2_DUNNINGTON 0x1D | ||
19 | |||
20 | #define INTEL_FAM6_NEHALEM 0x1E | ||
21 | #define INTEL_FAM6_NEHALEM_EP 0x1A | ||
22 | #define INTEL_FAM6_NEHALEM_EX 0x2E | ||
23 | #define INTEL_FAM6_WESTMERE 0x25 | ||
24 | #define INTEL_FAM6_WESTMERE2 0x1F | ||
25 | #define INTEL_FAM6_WESTMERE_EP 0x2C | ||
26 | #define INTEL_FAM6_WESTMERE_EX 0x2F | ||
27 | |||
28 | #define INTEL_FAM6_SANDYBRIDGE 0x2A | ||
29 | #define INTEL_FAM6_SANDYBRIDGE_X 0x2D | ||
30 | #define INTEL_FAM6_IVYBRIDGE 0x3A | ||
31 | #define INTEL_FAM6_IVYBRIDGE_X 0x3E | ||
32 | |||
33 | #define INTEL_FAM6_HASWELL_CORE 0x3C | ||
34 | #define INTEL_FAM6_HASWELL_X 0x3F | ||
35 | #define INTEL_FAM6_HASWELL_ULT 0x45 | ||
36 | #define INTEL_FAM6_HASWELL_GT3E 0x46 | ||
37 | |||
38 | #define INTEL_FAM6_BROADWELL_CORE 0x3D | ||
39 | #define INTEL_FAM6_BROADWELL_XEON_D 0x56 | ||
40 | #define INTEL_FAM6_BROADWELL_GT3E 0x47 | ||
41 | #define INTEL_FAM6_BROADWELL_X 0x4F | ||
42 | |||
43 | #define INTEL_FAM6_SKYLAKE_MOBILE 0x4E | ||
44 | #define INTEL_FAM6_SKYLAKE_DESKTOP 0x5E | ||
45 | #define INTEL_FAM6_SKYLAKE_X 0x55 | ||
46 | #define INTEL_FAM6_KABYLAKE_MOBILE 0x8E | ||
47 | #define INTEL_FAM6_KABYLAKE_DESKTOP 0x9E | ||
48 | |||
49 | /* "Small Core" Processors (Atom) */ | ||
50 | |||
51 | #define INTEL_FAM6_ATOM_PINEVIEW 0x1C | ||
52 | #define INTEL_FAM6_ATOM_LINCROFT 0x26 | ||
53 | #define INTEL_FAM6_ATOM_PENWELL 0x27 | ||
54 | #define INTEL_FAM6_ATOM_CLOVERVIEW 0x35 | ||
55 | #define INTEL_FAM6_ATOM_CEDARVIEW 0x36 | ||
56 | #define INTEL_FAM6_ATOM_SILVERMONT1 0x37 /* BayTrail/BYT / Valleyview */ | ||
57 | #define INTEL_FAM6_ATOM_SILVERMONT2 0x4D /* Avaton/Rangely */ | ||
58 | #define INTEL_FAM6_ATOM_AIRMONT 0x4C /* CherryTrail / Braswell */ | ||
59 | #define INTEL_FAM6_ATOM_MERRIFIELD1 0x4A /* Tangier */ | ||
60 | #define INTEL_FAM6_ATOM_MERRIFIELD2 0x5A /* Annidale */ | ||
61 | #define INTEL_FAM6_ATOM_GOLDMONT 0x5C | ||
62 | #define INTEL_FAM6_ATOM_DENVERTON 0x5F /* Goldmont Microserver */ | ||
63 | |||
64 | /* Xeon Phi */ | ||
65 | |||
66 | #define INTEL_FAM6_XEON_PHI_KNL 0x57 /* Knights Landing */ | ||
67 | |||
68 | #endif /* _ASM_X86_INTEL_FAMILY_H */ | ||
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 4421b5da409d..d1d1e5094c28 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -38,12 +38,11 @@ typedef u8 kprobe_opcode_t; | |||
38 | #define RELATIVECALL_OPCODE 0xe8 | 38 | #define RELATIVECALL_OPCODE 0xe8 |
39 | #define RELATIVE_ADDR_SIZE 4 | 39 | #define RELATIVE_ADDR_SIZE 4 |
40 | #define MAX_STACK_SIZE 64 | 40 | #define MAX_STACK_SIZE 64 |
41 | #define MIN_STACK_SIZE(ADDR) \ | 41 | #define CUR_STACK_SIZE(ADDR) \ |
42 | (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \ | 42 | (current_top_of_stack() - (unsigned long)(ADDR)) |
43 | THREAD_SIZE - (unsigned long)(ADDR))) \ | 43 | #define MIN_STACK_SIZE(ADDR) \ |
44 | ? (MAX_STACK_SIZE) \ | 44 | (MAX_STACK_SIZE < CUR_STACK_SIZE(ADDR) ? \ |
45 | : (((unsigned long)current_thread_info()) + \ | 45 | MAX_STACK_SIZE : CUR_STACK_SIZE(ADDR)) |
46 | THREAD_SIZE - (unsigned long)(ADDR))) | ||
47 | 46 | ||
48 | #define flush_insn_slot(p) do { } while (0) | 47 | #define flush_insn_slot(p) do { } while (0) |
49 | 48 | ||
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index e0fbe7e70dc1..69e62862b622 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/irqbypass.h> | 27 | #include <linux/irqbypass.h> |
28 | #include <linux/hyperv.h> | 28 | #include <linux/hyperv.h> |
29 | 29 | ||
30 | #include <asm/apic.h> | ||
30 | #include <asm/pvclock-abi.h> | 31 | #include <asm/pvclock-abi.h> |
31 | #include <asm/desc.h> | 32 | #include <asm/desc.h> |
32 | #include <asm/mtrr.h> | 33 | #include <asm/mtrr.h> |
@@ -1368,4 +1369,14 @@ static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) | |||
1368 | 1369 | ||
1369 | static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {} | 1370 | static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {} |
1370 | 1371 | ||
1372 | static inline int kvm_cpu_get_apicid(int mps_cpu) | ||
1373 | { | ||
1374 | #ifdef CONFIG_X86_LOCAL_APIC | ||
1375 | return __default_cpu_present_to_apicid(mps_cpu); | ||
1376 | #else | ||
1377 | WARN_ON_ONCE(1); | ||
1378 | return BAD_APICID; | ||
1379 | #endif | ||
1380 | } | ||
1381 | |||
1371 | #endif /* _ASM_X86_KVM_HOST_H */ | 1382 | #endif /* _ASM_X86_KVM_HOST_H */ |
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 7dc1d8fef7fd..b5fee97813cd 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -122,7 +122,7 @@ notrace static inline void native_write_msr(unsigned int msr, | |||
122 | "2:\n" | 122 | "2:\n" |
123 | _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_wrmsr_unsafe) | 123 | _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_wrmsr_unsafe) |
124 | : : "c" (msr), "a"(low), "d" (high) : "memory"); | 124 | : : "c" (msr), "a"(low), "d" (high) : "memory"); |
125 | if (msr_tracepoint_active(__tracepoint_read_msr)) | 125 | if (msr_tracepoint_active(__tracepoint_write_msr)) |
126 | do_trace_write_msr(msr, ((u64)high << 32 | low), 0); | 126 | do_trace_write_msr(msr, ((u64)high << 32 | low), 0); |
127 | } | 127 | } |
128 | 128 | ||
@@ -141,7 +141,7 @@ notrace static inline int native_write_msr_safe(unsigned int msr, | |||
141 | : "c" (msr), "0" (low), "d" (high), | 141 | : "c" (msr), "0" (low), "d" (high), |
142 | [fault] "i" (-EIO) | 142 | [fault] "i" (-EIO) |
143 | : "memory"); | 143 | : "memory"); |
144 | if (msr_tracepoint_active(__tracepoint_read_msr)) | 144 | if (msr_tracepoint_active(__tracepoint_write_msr)) |
145 | do_trace_write_msr(msr, ((u64)high << 32 | low), err); | 145 | do_trace_write_msr(msr, ((u64)high << 32 | low), err); |
146 | return err; | 146 | return err; |
147 | } | 147 | } |
diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h index bf7f8b55b0f9..574c23cf761a 100644 --- a/arch/x86/include/asm/pgalloc.h +++ b/arch/x86/include/asm/pgalloc.h | |||
@@ -81,7 +81,7 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
81 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) | 81 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) |
82 | { | 82 | { |
83 | struct page *page; | 83 | struct page *page; |
84 | page = alloc_pages(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO, 0); | 84 | page = alloc_pages(GFP_KERNEL | __GFP_ZERO, 0); |
85 | if (!page) | 85 | if (!page) |
86 | return NULL; | 86 | return NULL; |
87 | if (!pgtable_pmd_page_ctor(page)) { | 87 | if (!pgtable_pmd_page_ctor(page)) { |
@@ -125,7 +125,7 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | |||
125 | 125 | ||
126 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 126 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
127 | { | 127 | { |
128 | return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); | 128 | return (pud_t *)get_zeroed_page(GFP_KERNEL); |
129 | } | 129 | } |
130 | 130 | ||
131 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) | 131 | static inline void pud_free(struct mm_struct *mm, pud_t *pud) |
diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h index 7c247e7404be..0944218af9e2 100644 --- a/arch/x86/include/asm/stacktrace.h +++ b/arch/x86/include/asm/stacktrace.h | |||
@@ -14,7 +14,7 @@ extern int kstack_depth_to_print; | |||
14 | struct thread_info; | 14 | struct thread_info; |
15 | struct stacktrace_ops; | 15 | struct stacktrace_ops; |
16 | 16 | ||
17 | typedef unsigned long (*walk_stack_t)(struct thread_info *tinfo, | 17 | typedef unsigned long (*walk_stack_t)(struct task_struct *task, |
18 | unsigned long *stack, | 18 | unsigned long *stack, |
19 | unsigned long bp, | 19 | unsigned long bp, |
20 | const struct stacktrace_ops *ops, | 20 | const struct stacktrace_ops *ops, |
@@ -23,13 +23,13 @@ typedef unsigned long (*walk_stack_t)(struct thread_info *tinfo, | |||
23 | int *graph); | 23 | int *graph); |
24 | 24 | ||
25 | extern unsigned long | 25 | extern unsigned long |
26 | print_context_stack(struct thread_info *tinfo, | 26 | print_context_stack(struct task_struct *task, |
27 | unsigned long *stack, unsigned long bp, | 27 | unsigned long *stack, unsigned long bp, |
28 | const struct stacktrace_ops *ops, void *data, | 28 | const struct stacktrace_ops *ops, void *data, |
29 | unsigned long *end, int *graph); | 29 | unsigned long *end, int *graph); |
30 | 30 | ||
31 | extern unsigned long | 31 | extern unsigned long |
32 | print_context_stack_bp(struct thread_info *tinfo, | 32 | print_context_stack_bp(struct task_struct *task, |
33 | unsigned long *stack, unsigned long bp, | 33 | unsigned long *stack, unsigned long bp, |
34 | const struct stacktrace_ops *ops, void *data, | 34 | const struct stacktrace_ops *ops, void *data, |
35 | unsigned long *end, int *graph); | 35 | unsigned long *end, int *graph); |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 84e33ff5a6d5..446702ed99dc 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2588,8 +2588,8 @@ static struct resource * __init ioapic_setup_resources(void) | |||
2588 | res[num].flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 2588 | res[num].flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
2589 | snprintf(mem, IOAPIC_RESOURCE_NAME_SIZE, "IOAPIC %u", i); | 2589 | snprintf(mem, IOAPIC_RESOURCE_NAME_SIZE, "IOAPIC %u", i); |
2590 | mem += IOAPIC_RESOURCE_NAME_SIZE; | 2590 | mem += IOAPIC_RESOURCE_NAME_SIZE; |
2591 | ioapics[i].iomem_res = &res[num]; | ||
2591 | num++; | 2592 | num++; |
2592 | ioapics[i].iomem_res = res; | ||
2593 | } | 2593 | } |
2594 | 2594 | ||
2595 | ioapic_resources = res; | 2595 | ioapic_resources = res; |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index c343a54bed39..f5c69d8974e1 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -674,14 +674,14 @@ static void init_amd_bd(struct cpuinfo_x86 *c) | |||
674 | u64 value; | 674 | u64 value; |
675 | 675 | ||
676 | /* re-enable TopologyExtensions if switched off by BIOS */ | 676 | /* re-enable TopologyExtensions if switched off by BIOS */ |
677 | if ((c->x86_model >= 0x10) && (c->x86_model <= 0x1f) && | 677 | if ((c->x86_model >= 0x10) && (c->x86_model <= 0x6f) && |
678 | !cpu_has(c, X86_FEATURE_TOPOEXT)) { | 678 | !cpu_has(c, X86_FEATURE_TOPOEXT)) { |
679 | 679 | ||
680 | if (msr_set_bit(0xc0011005, 54) > 0) { | 680 | if (msr_set_bit(0xc0011005, 54) > 0) { |
681 | rdmsrl(0xc0011005, value); | 681 | rdmsrl(0xc0011005, value); |
682 | if (value & BIT_64(54)) { | 682 | if (value & BIT_64(54)) { |
683 | set_cpu_cap(c, X86_FEATURE_TOPOEXT); | 683 | set_cpu_cap(c, X86_FEATURE_TOPOEXT); |
684 | pr_info(FW_INFO "CPU: Re-enabling disabled Topology Extensions Support.\n"); | 684 | pr_info_once(FW_INFO "CPU: Re-enabling disabled Topology Extensions Support.\n"); |
685 | } | 685 | } |
686 | } | 686 | } |
687 | } | 687 | } |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 2bb25c3fe2e8..ef8017ca5ba9 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -42,16 +42,14 @@ void printk_address(unsigned long address) | |||
42 | static void | 42 | static void |
43 | print_ftrace_graph_addr(unsigned long addr, void *data, | 43 | print_ftrace_graph_addr(unsigned long addr, void *data, |
44 | const struct stacktrace_ops *ops, | 44 | const struct stacktrace_ops *ops, |
45 | struct thread_info *tinfo, int *graph) | 45 | struct task_struct *task, int *graph) |
46 | { | 46 | { |
47 | struct task_struct *task; | ||
48 | unsigned long ret_addr; | 47 | unsigned long ret_addr; |
49 | int index; | 48 | int index; |
50 | 49 | ||
51 | if (addr != (unsigned long)return_to_handler) | 50 | if (addr != (unsigned long)return_to_handler) |
52 | return; | 51 | return; |
53 | 52 | ||
54 | task = tinfo->task; | ||
55 | index = task->curr_ret_stack; | 53 | index = task->curr_ret_stack; |
56 | 54 | ||
57 | if (!task->ret_stack || index < *graph) | 55 | if (!task->ret_stack || index < *graph) |
@@ -68,7 +66,7 @@ print_ftrace_graph_addr(unsigned long addr, void *data, | |||
68 | static inline void | 66 | static inline void |
69 | print_ftrace_graph_addr(unsigned long addr, void *data, | 67 | print_ftrace_graph_addr(unsigned long addr, void *data, |
70 | const struct stacktrace_ops *ops, | 68 | const struct stacktrace_ops *ops, |
71 | struct thread_info *tinfo, int *graph) | 69 | struct task_struct *task, int *graph) |
72 | { } | 70 | { } |
73 | #endif | 71 | #endif |
74 | 72 | ||
@@ -79,10 +77,10 @@ print_ftrace_graph_addr(unsigned long addr, void *data, | |||
79 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 77 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
80 | */ | 78 | */ |
81 | 79 | ||
82 | static inline int valid_stack_ptr(struct thread_info *tinfo, | 80 | static inline int valid_stack_ptr(struct task_struct *task, |
83 | void *p, unsigned int size, void *end) | 81 | void *p, unsigned int size, void *end) |
84 | { | 82 | { |
85 | void *t = tinfo; | 83 | void *t = task_stack_page(task); |
86 | if (end) { | 84 | if (end) { |
87 | if (p < end && p >= (end-THREAD_SIZE)) | 85 | if (p < end && p >= (end-THREAD_SIZE)) |
88 | return 1; | 86 | return 1; |
@@ -93,14 +91,14 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, | |||
93 | } | 91 | } |
94 | 92 | ||
95 | unsigned long | 93 | unsigned long |
96 | print_context_stack(struct thread_info *tinfo, | 94 | print_context_stack(struct task_struct *task, |
97 | unsigned long *stack, unsigned long bp, | 95 | unsigned long *stack, unsigned long bp, |
98 | const struct stacktrace_ops *ops, void *data, | 96 | const struct stacktrace_ops *ops, void *data, |
99 | unsigned long *end, int *graph) | 97 | unsigned long *end, int *graph) |
100 | { | 98 | { |
101 | struct stack_frame *frame = (struct stack_frame *)bp; | 99 | struct stack_frame *frame = (struct stack_frame *)bp; |
102 | 100 | ||
103 | while (valid_stack_ptr(tinfo, stack, sizeof(*stack), end)) { | 101 | while (valid_stack_ptr(task, stack, sizeof(*stack), end)) { |
104 | unsigned long addr; | 102 | unsigned long addr; |
105 | 103 | ||
106 | addr = *stack; | 104 | addr = *stack; |
@@ -112,7 +110,7 @@ print_context_stack(struct thread_info *tinfo, | |||
112 | } else { | 110 | } else { |
113 | ops->address(data, addr, 0); | 111 | ops->address(data, addr, 0); |
114 | } | 112 | } |
115 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | 113 | print_ftrace_graph_addr(addr, data, ops, task, graph); |
116 | } | 114 | } |
117 | stack++; | 115 | stack++; |
118 | } | 116 | } |
@@ -121,7 +119,7 @@ print_context_stack(struct thread_info *tinfo, | |||
121 | EXPORT_SYMBOL_GPL(print_context_stack); | 119 | EXPORT_SYMBOL_GPL(print_context_stack); |
122 | 120 | ||
123 | unsigned long | 121 | unsigned long |
124 | print_context_stack_bp(struct thread_info *tinfo, | 122 | print_context_stack_bp(struct task_struct *task, |
125 | unsigned long *stack, unsigned long bp, | 123 | unsigned long *stack, unsigned long bp, |
126 | const struct stacktrace_ops *ops, void *data, | 124 | const struct stacktrace_ops *ops, void *data, |
127 | unsigned long *end, int *graph) | 125 | unsigned long *end, int *graph) |
@@ -129,7 +127,7 @@ print_context_stack_bp(struct thread_info *tinfo, | |||
129 | struct stack_frame *frame = (struct stack_frame *)bp; | 127 | struct stack_frame *frame = (struct stack_frame *)bp; |
130 | unsigned long *ret_addr = &frame->return_address; | 128 | unsigned long *ret_addr = &frame->return_address; |
131 | 129 | ||
132 | while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) { | 130 | while (valid_stack_ptr(task, ret_addr, sizeof(*ret_addr), end)) { |
133 | unsigned long addr = *ret_addr; | 131 | unsigned long addr = *ret_addr; |
134 | 132 | ||
135 | if (!__kernel_text_address(addr)) | 133 | if (!__kernel_text_address(addr)) |
@@ -139,7 +137,7 @@ print_context_stack_bp(struct thread_info *tinfo, | |||
139 | break; | 137 | break; |
140 | frame = frame->next_frame; | 138 | frame = frame->next_frame; |
141 | ret_addr = &frame->return_address; | 139 | ret_addr = &frame->return_address; |
142 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | 140 | print_ftrace_graph_addr(addr, data, ops, task, graph); |
143 | } | 141 | } |
144 | 142 | ||
145 | return (unsigned long)frame; | 143 | return (unsigned long)frame; |
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c index 464ffd69b92e..fef917e79b9d 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c | |||
@@ -61,15 +61,13 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
61 | bp = stack_frame(task, regs); | 61 | bp = stack_frame(task, regs); |
62 | 62 | ||
63 | for (;;) { | 63 | for (;;) { |
64 | struct thread_info *context; | ||
65 | void *end_stack; | 64 | void *end_stack; |
66 | 65 | ||
67 | end_stack = is_hardirq_stack(stack, cpu); | 66 | end_stack = is_hardirq_stack(stack, cpu); |
68 | if (!end_stack) | 67 | if (!end_stack) |
69 | end_stack = is_softirq_stack(stack, cpu); | 68 | end_stack = is_softirq_stack(stack, cpu); |
70 | 69 | ||
71 | context = task_thread_info(task); | 70 | bp = ops->walk_stack(task, stack, bp, ops, data, |
72 | bp = ops->walk_stack(context, stack, bp, ops, data, | ||
73 | end_stack, &graph); | 71 | end_stack, &graph); |
74 | 72 | ||
75 | /* Stop if not on irq stack */ | 73 | /* Stop if not on irq stack */ |
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 5f1c6266eb30..d558a8a49016 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -153,7 +153,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
153 | const struct stacktrace_ops *ops, void *data) | 153 | const struct stacktrace_ops *ops, void *data) |
154 | { | 154 | { |
155 | const unsigned cpu = get_cpu(); | 155 | const unsigned cpu = get_cpu(); |
156 | struct thread_info *tinfo; | ||
157 | unsigned long *irq_stack = (unsigned long *)per_cpu(irq_stack_ptr, cpu); | 156 | unsigned long *irq_stack = (unsigned long *)per_cpu(irq_stack_ptr, cpu); |
158 | unsigned long dummy; | 157 | unsigned long dummy; |
159 | unsigned used = 0; | 158 | unsigned used = 0; |
@@ -179,7 +178,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
179 | * current stack address. If the stacks consist of nested | 178 | * current stack address. If the stacks consist of nested |
180 | * exceptions | 179 | * exceptions |
181 | */ | 180 | */ |
182 | tinfo = task_thread_info(task); | ||
183 | while (!done) { | 181 | while (!done) { |
184 | unsigned long *stack_end; | 182 | unsigned long *stack_end; |
185 | enum stack_type stype; | 183 | enum stack_type stype; |
@@ -202,7 +200,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
202 | if (ops->stack(data, id) < 0) | 200 | if (ops->stack(data, id) < 0) |
203 | break; | 201 | break; |
204 | 202 | ||
205 | bp = ops->walk_stack(tinfo, stack, bp, ops, | 203 | bp = ops->walk_stack(task, stack, bp, ops, |
206 | data, stack_end, &graph); | 204 | data, stack_end, &graph); |
207 | ops->stack(data, "<EOE>"); | 205 | ops->stack(data, "<EOE>"); |
208 | /* | 206 | /* |
@@ -218,7 +216,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
218 | 216 | ||
219 | if (ops->stack(data, "IRQ") < 0) | 217 | if (ops->stack(data, "IRQ") < 0) |
220 | break; | 218 | break; |
221 | bp = ops->walk_stack(tinfo, stack, bp, | 219 | bp = ops->walk_stack(task, stack, bp, |
222 | ops, data, stack_end, &graph); | 220 | ops, data, stack_end, &graph); |
223 | /* | 221 | /* |
224 | * We link to the next stack (which would be | 222 | * We link to the next stack (which would be |
@@ -240,7 +238,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
240 | /* | 238 | /* |
241 | * This handles the process stack: | 239 | * This handles the process stack: |
242 | */ | 240 | */ |
243 | bp = ops->walk_stack(tinfo, stack, bp, ops, data, NULL, &graph); | 241 | bp = ops->walk_stack(task, stack, bp, ops, data, NULL, &graph); |
244 | put_cpu(); | 242 | put_cpu(); |
245 | } | 243 | } |
246 | EXPORT_SYMBOL(dump_trace); | 244 | EXPORT_SYMBOL(dump_trace); |
diff --git a/arch/x86/kernel/espfix_64.c b/arch/x86/kernel/espfix_64.c index 4d38416e2a7f..04f89caef9c4 100644 --- a/arch/x86/kernel/espfix_64.c +++ b/arch/x86/kernel/espfix_64.c | |||
@@ -57,7 +57,7 @@ | |||
57 | # error "Need more than one PGD for the ESPFIX hack" | 57 | # error "Need more than one PGD for the ESPFIX hack" |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO) | 60 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
61 | 61 | ||
62 | /* This contains the *bottom* address of the espfix stack */ | 62 | /* This contains the *bottom* address of the espfix stack */ |
63 | DEFINE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack); | 63 | DEFINE_PER_CPU_READ_MOSTLY(unsigned long, espfix_stack); |
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 38da8f29a9c8..c627bf8d98ad 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -130,11 +130,9 @@ void irq_ctx_init(int cpu) | |||
130 | 130 | ||
131 | void do_softirq_own_stack(void) | 131 | void do_softirq_own_stack(void) |
132 | { | 132 | { |
133 | struct thread_info *curstk; | ||
134 | struct irq_stack *irqstk; | 133 | struct irq_stack *irqstk; |
135 | u32 *isp, *prev_esp; | 134 | u32 *isp, *prev_esp; |
136 | 135 | ||
137 | curstk = current_stack(); | ||
138 | irqstk = __this_cpu_read(softirq_stack); | 136 | irqstk = __this_cpu_read(softirq_stack); |
139 | 137 | ||
140 | /* build the stack frame on the softirq stack */ | 138 | /* build the stack frame on the softirq stack */ |
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index 38cf7a741250..7847e5c0e0b5 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c | |||
@@ -961,7 +961,19 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | |||
961 | * normal page fault. | 961 | * normal page fault. |
962 | */ | 962 | */ |
963 | regs->ip = (unsigned long)cur->addr; | 963 | regs->ip = (unsigned long)cur->addr; |
964 | /* | ||
965 | * Trap flag (TF) has been set here because this fault | ||
966 | * happened where the single stepping will be done. | ||
967 | * So clear it by resetting the current kprobe: | ||
968 | */ | ||
969 | regs->flags &= ~X86_EFLAGS_TF; | ||
970 | |||
971 | /* | ||
972 | * If the TF flag was set before the kprobe hit, | ||
973 | * don't touch it: | ||
974 | */ | ||
964 | regs->flags |= kcb->kprobe_old_flags; | 975 | regs->flags |= kcb->kprobe_old_flags; |
976 | |||
965 | if (kcb->kprobe_status == KPROBE_REENTER) | 977 | if (kcb->kprobe_status == KPROBE_REENTER) |
966 | restore_previous_kprobe(kcb); | 978 | restore_previous_kprobe(kcb); |
967 | else | 979 | else |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index d1590486204a..00f03d82e69a 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -96,6 +96,12 @@ static inline void cond_local_irq_disable(struct pt_regs *regs) | |||
96 | local_irq_disable(); | 96 | local_irq_disable(); |
97 | } | 97 | } |
98 | 98 | ||
99 | /* | ||
100 | * In IST context, we explicitly disable preemption. This serves two | ||
101 | * purposes: it makes it much less likely that we would accidentally | ||
102 | * schedule in IST context and it will force a warning if we somehow | ||
103 | * manage to schedule by accident. | ||
104 | */ | ||
99 | void ist_enter(struct pt_regs *regs) | 105 | void ist_enter(struct pt_regs *regs) |
100 | { | 106 | { |
101 | if (user_mode(regs)) { | 107 | if (user_mode(regs)) { |
@@ -110,13 +116,7 @@ void ist_enter(struct pt_regs *regs) | |||
110 | rcu_nmi_enter(); | 116 | rcu_nmi_enter(); |
111 | } | 117 | } |
112 | 118 | ||
113 | /* | 119 | preempt_disable(); |
114 | * We are atomic because we're on the IST stack; or we're on | ||
115 | * x86_32, in which case we still shouldn't schedule; or we're | ||
116 | * on x86_64 and entered from user mode, in which case we're | ||
117 | * still atomic unless ist_begin_non_atomic is called. | ||
118 | */ | ||
119 | preempt_count_add(HARDIRQ_OFFSET); | ||
120 | 120 | ||
121 | /* This code is a bit fragile. Test it. */ | 121 | /* This code is a bit fragile. Test it. */ |
122 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "ist_enter didn't work"); | 122 | RCU_LOCKDEP_WARN(!rcu_is_watching(), "ist_enter didn't work"); |
@@ -124,7 +124,7 @@ void ist_enter(struct pt_regs *regs) | |||
124 | 124 | ||
125 | void ist_exit(struct pt_regs *regs) | 125 | void ist_exit(struct pt_regs *regs) |
126 | { | 126 | { |
127 | preempt_count_sub(HARDIRQ_OFFSET); | 127 | preempt_enable_no_resched(); |
128 | 128 | ||
129 | if (!user_mode(regs)) | 129 | if (!user_mode(regs)) |
130 | rcu_nmi_exit(); | 130 | rcu_nmi_exit(); |
@@ -155,7 +155,7 @@ void ist_begin_non_atomic(struct pt_regs *regs) | |||
155 | BUG_ON((unsigned long)(current_top_of_stack() - | 155 | BUG_ON((unsigned long)(current_top_of_stack() - |
156 | current_stack_pointer()) >= THREAD_SIZE); | 156 | current_stack_pointer()) >= THREAD_SIZE); |
157 | 157 | ||
158 | preempt_count_sub(HARDIRQ_OFFSET); | 158 | preempt_enable_no_resched(); |
159 | } | 159 | } |
160 | 160 | ||
161 | /** | 161 | /** |
@@ -165,7 +165,7 @@ void ist_begin_non_atomic(struct pt_regs *regs) | |||
165 | */ | 165 | */ |
166 | void ist_end_non_atomic(void) | 166 | void ist_end_non_atomic(void) |
167 | { | 167 | { |
168 | preempt_count_add(HARDIRQ_OFFSET); | 168 | preempt_disable(); |
169 | } | 169 | } |
170 | 170 | ||
171 | static nokprobe_inline int | 171 | static nokprobe_inline int |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1163e8173e5a..16ef31b87452 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -238,7 +238,9 @@ module_param(nested, int, S_IRUGO); | |||
238 | 238 | ||
239 | /* enable / disable AVIC */ | 239 | /* enable / disable AVIC */ |
240 | static int avic; | 240 | static int avic; |
241 | #ifdef CONFIG_X86_LOCAL_APIC | ||
241 | module_param(avic, int, S_IRUGO); | 242 | module_param(avic, int, S_IRUGO); |
243 | #endif | ||
242 | 244 | ||
243 | static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0); | 245 | static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0); |
244 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); | 246 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); |
@@ -981,11 +983,14 @@ static __init int svm_hardware_setup(void) | |||
981 | } else | 983 | } else |
982 | kvm_disable_tdp(); | 984 | kvm_disable_tdp(); |
983 | 985 | ||
984 | if (avic && (!npt_enabled || !boot_cpu_has(X86_FEATURE_AVIC))) | 986 | if (avic) { |
985 | avic = false; | 987 | if (!npt_enabled || |
986 | 988 | !boot_cpu_has(X86_FEATURE_AVIC) || | |
987 | if (avic) | 989 | !IS_ENABLED(CONFIG_X86_LOCAL_APIC)) |
988 | pr_info("AVIC enabled\n"); | 990 | avic = false; |
991 | else | ||
992 | pr_info("AVIC enabled\n"); | ||
993 | } | ||
989 | 994 | ||
990 | return 0; | 995 | return 0; |
991 | 996 | ||
@@ -1324,7 +1329,7 @@ free_avic: | |||
1324 | static void avic_set_running(struct kvm_vcpu *vcpu, bool is_run) | 1329 | static void avic_set_running(struct kvm_vcpu *vcpu, bool is_run) |
1325 | { | 1330 | { |
1326 | u64 entry; | 1331 | u64 entry; |
1327 | int h_physical_id = __default_cpu_present_to_apicid(vcpu->cpu); | 1332 | int h_physical_id = kvm_cpu_get_apicid(vcpu->cpu); |
1328 | struct vcpu_svm *svm = to_svm(vcpu); | 1333 | struct vcpu_svm *svm = to_svm(vcpu); |
1329 | 1334 | ||
1330 | if (!kvm_vcpu_apicv_active(vcpu)) | 1335 | if (!kvm_vcpu_apicv_active(vcpu)) |
@@ -1349,7 +1354,7 @@ static void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
1349 | { | 1354 | { |
1350 | u64 entry; | 1355 | u64 entry; |
1351 | /* ID = 0xff (broadcast), ID > 0xff (reserved) */ | 1356 | /* ID = 0xff (broadcast), ID > 0xff (reserved) */ |
1352 | int h_physical_id = __default_cpu_present_to_apicid(cpu); | 1357 | int h_physical_id = kvm_cpu_get_apicid(cpu); |
1353 | struct vcpu_svm *svm = to_svm(vcpu); | 1358 | struct vcpu_svm *svm = to_svm(vcpu); |
1354 | 1359 | ||
1355 | if (!kvm_vcpu_apicv_active(vcpu)) | 1360 | if (!kvm_vcpu_apicv_active(vcpu)) |
@@ -4236,7 +4241,7 @@ static void svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec) | |||
4236 | 4241 | ||
4237 | if (avic_vcpu_is_running(vcpu)) | 4242 | if (avic_vcpu_is_running(vcpu)) |
4238 | wrmsrl(SVM_AVIC_DOORBELL, | 4243 | wrmsrl(SVM_AVIC_DOORBELL, |
4239 | __default_cpu_present_to_apicid(vcpu->cpu)); | 4244 | kvm_cpu_get_apicid(vcpu->cpu)); |
4240 | else | 4245 | else |
4241 | kvm_vcpu_wake_up(vcpu); | 4246 | kvm_vcpu_wake_up(vcpu); |
4242 | } | 4247 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index fb93010beaa4..003618e324ce 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2072,7 +2072,8 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu) | |||
2072 | unsigned int dest; | 2072 | unsigned int dest; |
2073 | 2073 | ||
2074 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || | 2074 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || |
2075 | !irq_remapping_cap(IRQ_POSTING_CAP)) | 2075 | !irq_remapping_cap(IRQ_POSTING_CAP) || |
2076 | !kvm_vcpu_apicv_active(vcpu)) | ||
2076 | return; | 2077 | return; |
2077 | 2078 | ||
2078 | do { | 2079 | do { |
@@ -2180,7 +2181,8 @@ static void vmx_vcpu_pi_put(struct kvm_vcpu *vcpu) | |||
2180 | struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); | 2181 | struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); |
2181 | 2182 | ||
2182 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || | 2183 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || |
2183 | !irq_remapping_cap(IRQ_POSTING_CAP)) | 2184 | !irq_remapping_cap(IRQ_POSTING_CAP) || |
2185 | !kvm_vcpu_apicv_active(vcpu)) | ||
2184 | return; | 2186 | return; |
2185 | 2187 | ||
2186 | /* Set SN when the vCPU is preempted */ | 2188 | /* Set SN when the vCPU is preempted */ |
@@ -10714,7 +10716,8 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu) | |||
10714 | struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); | 10716 | struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); |
10715 | 10717 | ||
10716 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || | 10718 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || |
10717 | !irq_remapping_cap(IRQ_POSTING_CAP)) | 10719 | !irq_remapping_cap(IRQ_POSTING_CAP) || |
10720 | !kvm_vcpu_apicv_active(vcpu)) | ||
10718 | return 0; | 10721 | return 0; |
10719 | 10722 | ||
10720 | vcpu->pre_pcpu = vcpu->cpu; | 10723 | vcpu->pre_pcpu = vcpu->cpu; |
@@ -10780,7 +10783,8 @@ static void vmx_post_block(struct kvm_vcpu *vcpu) | |||
10780 | unsigned long flags; | 10783 | unsigned long flags; |
10781 | 10784 | ||
10782 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || | 10785 | if (!kvm_arch_has_assigned_device(vcpu->kvm) || |
10783 | !irq_remapping_cap(IRQ_POSTING_CAP)) | 10786 | !irq_remapping_cap(IRQ_POSTING_CAP) || |
10787 | !kvm_vcpu_apicv_active(vcpu)) | ||
10784 | return; | 10788 | return; |
10785 | 10789 | ||
10786 | do { | 10790 | do { |
@@ -10833,7 +10837,8 @@ static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, | |||
10833 | int idx, ret = -EINVAL; | 10837 | int idx, ret = -EINVAL; |
10834 | 10838 | ||
10835 | if (!kvm_arch_has_assigned_device(kvm) || | 10839 | if (!kvm_arch_has_assigned_device(kvm) || |
10836 | !irq_remapping_cap(IRQ_POSTING_CAP)) | 10840 | !irq_remapping_cap(IRQ_POSTING_CAP) || |
10841 | !kvm_vcpu_apicv_active(kvm->vcpus[0])) | ||
10837 | return 0; | 10842 | return 0; |
10838 | 10843 | ||
10839 | idx = srcu_read_lock(&kvm->irq_srcu); | 10844 | idx = srcu_read_lock(&kvm->irq_srcu); |
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 4eb287e25043..aa0ff4b02a96 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <asm/fixmap.h> | 6 | #include <asm/fixmap.h> |
7 | #include <asm/mtrr.h> | 7 | #include <asm/mtrr.h> |
8 | 8 | ||
9 | #define PGALLOC_GFP GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO | 9 | #define PGALLOC_GFP GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO |
10 | 10 | ||
11 | #ifdef CONFIG_HIGHPTE | 11 | #ifdef CONFIG_HIGHPTE |
12 | #define PGALLOC_USER_GFP __GFP_HIGHMEM | 12 | #define PGALLOC_USER_GFP __GFP_HIGHMEM |
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 6e7242be1c87..b226b3f497f1 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -139,7 +139,7 @@ int __init efi_alloc_page_tables(void) | |||
139 | if (efi_enabled(EFI_OLD_MEMMAP)) | 139 | if (efi_enabled(EFI_OLD_MEMMAP)) |
140 | return 0; | 140 | return 0; |
141 | 141 | ||
142 | gfp_mask = GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO; | 142 | gfp_mask = GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO; |
143 | efi_pgd = (pgd_t *)__get_free_page(gfp_mask); | 143 | efi_pgd = (pgd_t *)__get_free_page(gfp_mask); |
144 | if (!efi_pgd) | 144 | if (!efi_pgd) |
145 | return -ENOMEM; | 145 | return -ENOMEM; |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 478a2de543a5..67433714b791 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1113,7 +1113,7 @@ static void __init xen_cleanhighmap(unsigned long vaddr, | |||
1113 | 1113 | ||
1114 | /* NOTE: The loop is more greedy than the cleanup_highmap variant. | 1114 | /* NOTE: The loop is more greedy than the cleanup_highmap variant. |
1115 | * We include the PMD passed in on _both_ boundaries. */ | 1115 | * We include the PMD passed in on _both_ boundaries. */ |
1116 | for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PAGE_SIZE)); | 1116 | for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PTRS_PER_PMD)); |
1117 | pmd++, vaddr += PMD_SIZE) { | 1117 | pmd++, vaddr += PMD_SIZE) { |
1118 | if (pmd_none(*pmd)) | 1118 | if (pmd_none(*pmd)) |
1119 | continue; | 1119 | continue; |
@@ -1551,41 +1551,6 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
1551 | #endif | 1551 | #endif |
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | #ifdef CONFIG_X86_32 | ||
1555 | static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte) | ||
1556 | { | ||
1557 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ | ||
1558 | if (pte_val_ma(*ptep) & _PAGE_PRESENT) | ||
1559 | pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & | ||
1560 | pte_val_ma(pte)); | ||
1561 | |||
1562 | return pte; | ||
1563 | } | ||
1564 | #else /* CONFIG_X86_64 */ | ||
1565 | static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte) | ||
1566 | { | ||
1567 | unsigned long pfn; | ||
1568 | |||
1569 | if (xen_feature(XENFEAT_writable_page_tables) || | ||
1570 | xen_feature(XENFEAT_auto_translated_physmap) || | ||
1571 | xen_start_info->mfn_list >= __START_KERNEL_map) | ||
1572 | return pte; | ||
1573 | |||
1574 | /* | ||
1575 | * Pages belonging to the initial p2m list mapped outside the default | ||
1576 | * address range must be mapped read-only. This region contains the | ||
1577 | * page tables for mapping the p2m list, too, and page tables MUST be | ||
1578 | * mapped read-only. | ||
1579 | */ | ||
1580 | pfn = pte_pfn(pte); | ||
1581 | if (pfn >= xen_start_info->first_p2m_pfn && | ||
1582 | pfn < xen_start_info->first_p2m_pfn + xen_start_info->nr_p2m_frames) | ||
1583 | pte = __pte_ma(pte_val_ma(pte) & ~_PAGE_RW); | ||
1584 | |||
1585 | return pte; | ||
1586 | } | ||
1587 | #endif /* CONFIG_X86_64 */ | ||
1588 | |||
1589 | /* | 1554 | /* |
1590 | * Init-time set_pte while constructing initial pagetables, which | 1555 | * Init-time set_pte while constructing initial pagetables, which |
1591 | * doesn't allow RO page table pages to be remapped RW. | 1556 | * doesn't allow RO page table pages to be remapped RW. |
@@ -1600,13 +1565,37 @@ static pte_t __init mask_rw_pte(pte_t *ptep, pte_t pte) | |||
1600 | * so always write the PTE directly and rely on Xen trapping and | 1565 | * so always write the PTE directly and rely on Xen trapping and |
1601 | * emulating any updates as necessary. | 1566 | * emulating any updates as necessary. |
1602 | */ | 1567 | */ |
1603 | static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) | 1568 | __visible pte_t xen_make_pte_init(pteval_t pte) |
1604 | { | 1569 | { |
1605 | if (pte_mfn(pte) != INVALID_P2M_ENTRY) | 1570 | #ifdef CONFIG_X86_64 |
1606 | pte = mask_rw_pte(ptep, pte); | 1571 | unsigned long pfn; |
1607 | else | 1572 | |
1608 | pte = __pte_ma(0); | 1573 | /* |
1574 | * Pages belonging to the initial p2m list mapped outside the default | ||
1575 | * address range must be mapped read-only. This region contains the | ||
1576 | * page tables for mapping the p2m list, too, and page tables MUST be | ||
1577 | * mapped read-only. | ||
1578 | */ | ||
1579 | pfn = (pte & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
1580 | if (xen_start_info->mfn_list < __START_KERNEL_map && | ||
1581 | pfn >= xen_start_info->first_p2m_pfn && | ||
1582 | pfn < xen_start_info->first_p2m_pfn + xen_start_info->nr_p2m_frames) | ||
1583 | pte &= ~_PAGE_RW; | ||
1584 | #endif | ||
1585 | pte = pte_pfn_to_mfn(pte); | ||
1586 | return native_make_pte(pte); | ||
1587 | } | ||
1588 | PV_CALLEE_SAVE_REGS_THUNK(xen_make_pte_init); | ||
1609 | 1589 | ||
1590 | static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) | ||
1591 | { | ||
1592 | #ifdef CONFIG_X86_32 | ||
1593 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ | ||
1594 | if (pte_mfn(pte) != INVALID_P2M_ENTRY | ||
1595 | && pte_val_ma(*ptep) & _PAGE_PRESENT) | ||
1596 | pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & | ||
1597 | pte_val_ma(pte)); | ||
1598 | #endif | ||
1610 | native_set_pte(ptep, pte); | 1599 | native_set_pte(ptep, pte); |
1611 | } | 1600 | } |
1612 | 1601 | ||
@@ -2407,6 +2396,7 @@ static void __init xen_post_allocator_init(void) | |||
2407 | pv_mmu_ops.alloc_pud = xen_alloc_pud; | 2396 | pv_mmu_ops.alloc_pud = xen_alloc_pud; |
2408 | pv_mmu_ops.release_pud = xen_release_pud; | 2397 | pv_mmu_ops.release_pud = xen_release_pud; |
2409 | #endif | 2398 | #endif |
2399 | pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte); | ||
2410 | 2400 | ||
2411 | #ifdef CONFIG_X86_64 | 2401 | #ifdef CONFIG_X86_64 |
2412 | pv_mmu_ops.write_cr3 = &xen_write_cr3; | 2402 | pv_mmu_ops.write_cr3 = &xen_write_cr3; |
@@ -2455,7 +2445,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = { | |||
2455 | .pte_val = PV_CALLEE_SAVE(xen_pte_val), | 2445 | .pte_val = PV_CALLEE_SAVE(xen_pte_val), |
2456 | .pgd_val = PV_CALLEE_SAVE(xen_pgd_val), | 2446 | .pgd_val = PV_CALLEE_SAVE(xen_pgd_val), |
2457 | 2447 | ||
2458 | .make_pte = PV_CALLEE_SAVE(xen_make_pte), | 2448 | .make_pte = PV_CALLEE_SAVE(xen_make_pte_init), |
2459 | .make_pgd = PV_CALLEE_SAVE(xen_make_pgd), | 2449 | .make_pgd = PV_CALLEE_SAVE(xen_make_pgd), |
2460 | 2450 | ||
2461 | #ifdef CONFIG_X86_PAE | 2451 | #ifdef CONFIG_X86_PAE |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index cab9f766bb06..dd2a49a8aacc 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -182,7 +182,7 @@ static void * __ref alloc_p2m_page(void) | |||
182 | if (unlikely(!slab_is_available())) | 182 | if (unlikely(!slab_is_available())) |
183 | return alloc_bootmem_align(PAGE_SIZE, PAGE_SIZE); | 183 | return alloc_bootmem_align(PAGE_SIZE, PAGE_SIZE); |
184 | 184 | ||
185 | return (void *)__get_free_page(GFP_KERNEL | __GFP_REPEAT); | 185 | return (void *)__get_free_page(GFP_KERNEL); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void __ref free_p2m_page(void *p) | 188 | static void __ref free_p2m_page(void *p) |
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h index d38eb9237e64..1065bc8bcae5 100644 --- a/arch/xtensa/include/asm/pgalloc.h +++ b/arch/xtensa/include/asm/pgalloc.h | |||
@@ -44,7 +44,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
44 | pte_t *ptep; | 44 | pte_t *ptep; |
45 | int i; | 45 | int i; |
46 | 46 | ||
47 | ptep = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); | 47 | ptep = (pte_t *)__get_free_page(GFP_KERNEL); |
48 | if (!ptep) | 48 | if (!ptep) |
49 | return NULL; | 49 | return NULL; |
50 | for (i = 0; i < 1024; i++) | 50 | for (i = 0; i < 1024; i++) |