diff options
Diffstat (limited to 'arch/powerpc')
25 files changed, 187 insertions, 182 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ce5e045db305..692ac7588e20 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -121,6 +121,7 @@ config PPC | |||
121 | select HAVE_KRETPROBES | 121 | select HAVE_KRETPROBES |
122 | select HAVE_ARCH_TRACEHOOK | 122 | select HAVE_ARCH_TRACEHOOK |
123 | select HAVE_MEMBLOCK | 123 | select HAVE_MEMBLOCK |
124 | select HAVE_MEMBLOCK_NODE_MAP | ||
124 | select HAVE_DMA_ATTRS | 125 | select HAVE_DMA_ATTRS |
125 | select HAVE_DMA_API_DEBUG | 126 | select HAVE_DMA_API_DEBUG |
126 | select USE_GENERIC_SMP_HELPERS if SMP | 127 | select USE_GENERIC_SMP_HELPERS if SMP |
@@ -427,9 +428,6 @@ config ARCH_SPARSEMEM_DEFAULT | |||
427 | def_bool y | 428 | def_bool y |
428 | depends on (SMP && PPC_PSERIES) || PPC_PS3 | 429 | depends on (SMP && PPC_PSERIES) || PPC_PS3 |
429 | 430 | ||
430 | config ARCH_POPULATES_NODE_MAP | ||
431 | def_bool y | ||
432 | |||
433 | config SYS_SUPPORTS_HUGETLBFS | 431 | config SYS_SUPPORTS_HUGETLBFS |
434 | bool | 432 | bool |
435 | 433 | ||
diff --git a/arch/powerpc/boot/dts/tqm8548-bigflash.dts b/arch/powerpc/boot/dts/tqm8548-bigflash.dts index 7adab9407ebd..6e1ac50852a4 100644 --- a/arch/powerpc/boot/dts/tqm8548-bigflash.dts +++ b/arch/powerpc/boot/dts/tqm8548-bigflash.dts | |||
@@ -352,7 +352,7 @@ | |||
352 | ranges = < | 352 | ranges = < |
353 | 0 0x0 0xfc000000 0x04000000 // NOR FLASH bank 1 | 353 | 0 0x0 0xfc000000 0x04000000 // NOR FLASH bank 1 |
354 | 1 0x0 0xf8000000 0x08000000 // NOR FLASH bank 0 | 354 | 1 0x0 0xf8000000 0x08000000 // NOR FLASH bank 0 |
355 | 2 0x0 0xa3000000 0x00008000 // CAN (2 x i82527) | 355 | 2 0x0 0xa3000000 0x00008000 // CAN (2 x CC770) |
356 | 3 0x0 0xa3010000 0x00008000 // NAND FLASH | 356 | 3 0x0 0xa3010000 0x00008000 // NAND FLASH |
357 | 357 | ||
358 | >; | 358 | >; |
@@ -393,18 +393,27 @@ | |||
393 | }; | 393 | }; |
394 | 394 | ||
395 | /* Note: CAN support needs be enabled in U-Boot */ | 395 | /* Note: CAN support needs be enabled in U-Boot */ |
396 | can0@2,0 { | 396 | can@2,0 { |
397 | compatible = "intel,82527"; // Bosch CC770 | 397 | compatible = "bosch,cc770"; // Bosch CC770 |
398 | reg = <2 0x0 0x100>; | 398 | reg = <2 0x0 0x100>; |
399 | interrupts = <4 1>; | 399 | interrupts = <4 1>; |
400 | interrupt-parent = <&mpic>; | 400 | interrupt-parent = <&mpic>; |
401 | bosch,external-clock-frequency = <16000000>; | ||
402 | bosch,disconnect-rx1-input; | ||
403 | bosch,disconnect-tx1-output; | ||
404 | bosch,iso-low-speed-mux; | ||
405 | bosch,clock-out-frequency = <16000000>; | ||
401 | }; | 406 | }; |
402 | 407 | ||
403 | can1@2,100 { | 408 | can@2,100 { |
404 | compatible = "intel,82527"; // Bosch CC770 | 409 | compatible = "bosch,cc770"; // Bosch CC770 |
405 | reg = <2 0x100 0x100>; | 410 | reg = <2 0x100 0x100>; |
406 | interrupts = <4 1>; | 411 | interrupts = <4 1>; |
407 | interrupt-parent = <&mpic>; | 412 | interrupt-parent = <&mpic>; |
413 | bosch,external-clock-frequency = <16000000>; | ||
414 | bosch,disconnect-rx1-input; | ||
415 | bosch,disconnect-tx1-output; | ||
416 | bosch,iso-low-speed-mux; | ||
408 | }; | 417 | }; |
409 | 418 | ||
410 | /* Note: NAND support needs to be enabled in U-Boot */ | 419 | /* Note: NAND support needs to be enabled in U-Boot */ |
diff --git a/arch/powerpc/boot/dts/tqm8548.dts b/arch/powerpc/boot/dts/tqm8548.dts index 589860e673f6..161e75eac7f7 100644 --- a/arch/powerpc/boot/dts/tqm8548.dts +++ b/arch/powerpc/boot/dts/tqm8548.dts | |||
@@ -352,7 +352,7 @@ | |||
352 | ranges = < | 352 | ranges = < |
353 | 0 0x0 0xfc000000 0x04000000 // NOR FLASH bank 1 | 353 | 0 0x0 0xfc000000 0x04000000 // NOR FLASH bank 1 |
354 | 1 0x0 0xf8000000 0x08000000 // NOR FLASH bank 0 | 354 | 1 0x0 0xf8000000 0x08000000 // NOR FLASH bank 0 |
355 | 2 0x0 0xe3000000 0x00008000 // CAN (2 x i82527) | 355 | 2 0x0 0xe3000000 0x00008000 // CAN (2 x CC770) |
356 | 3 0x0 0xe3010000 0x00008000 // NAND FLASH | 356 | 3 0x0 0xe3010000 0x00008000 // NAND FLASH |
357 | 357 | ||
358 | >; | 358 | >; |
@@ -393,18 +393,27 @@ | |||
393 | }; | 393 | }; |
394 | 394 | ||
395 | /* Note: CAN support needs be enabled in U-Boot */ | 395 | /* Note: CAN support needs be enabled in U-Boot */ |
396 | can0@2,0 { | 396 | can@2,0 { |
397 | compatible = "intel,82527"; // Bosch CC770 | 397 | compatible = "bosch,cc770"; // Bosch CC770 |
398 | reg = <2 0x0 0x100>; | 398 | reg = <2 0x0 0x100>; |
399 | interrupts = <4 1>; | 399 | interrupts = <4 1>; |
400 | interrupt-parent = <&mpic>; | 400 | interrupt-parent = <&mpic>; |
401 | bosch,external-clock-frequency = <16000000>; | ||
402 | bosch,disconnect-rx1-input; | ||
403 | bosch,disconnect-tx1-output; | ||
404 | bosch,iso-low-speed-mux; | ||
405 | bosch,clock-out-frequency = <16000000>; | ||
401 | }; | 406 | }; |
402 | 407 | ||
403 | can1@2,100 { | 408 | can@2,100 { |
404 | compatible = "intel,82527"; // Bosch CC770 | 409 | compatible = "bosch,cc770"; // Bosch CC770 |
405 | reg = <2 0x100 0x100>; | 410 | reg = <2 0x100 0x100>; |
406 | interrupts = <4 1>; | 411 | interrupts = <4 1>; |
407 | interrupt-parent = <&mpic>; | 412 | interrupt-parent = <&mpic>; |
413 | bosch,external-clock-frequency = <16000000>; | ||
414 | bosch,disconnect-rx1-input; | ||
415 | bosch,disconnect-tx1-output; | ||
416 | bosch,iso-low-speed-mux; | ||
408 | }; | 417 | }; |
409 | 418 | ||
410 | /* Note: NAND support needs to be enabled in U-Boot */ | 419 | /* Note: NAND support needs to be enabled in U-Boot */ |
diff --git a/arch/powerpc/boot/dts/tqm8xx.dts b/arch/powerpc/boot/dts/tqm8xx.dts index f6da7ec49a8e..c3dba2518d8c 100644 --- a/arch/powerpc/boot/dts/tqm8xx.dts +++ b/arch/powerpc/boot/dts/tqm8xx.dts | |||
@@ -57,6 +57,7 @@ | |||
57 | 57 | ||
58 | ranges = < | 58 | ranges = < |
59 | 0x0 0x0 0x40000000 0x800000 | 59 | 0x0 0x0 0x40000000 0x800000 |
60 | 0x3 0x0 0xc0000000 0x200 | ||
60 | >; | 61 | >; |
61 | 62 | ||
62 | flash@0,0 { | 63 | flash@0,0 { |
@@ -67,6 +68,30 @@ | |||
67 | bank-width = <4>; | 68 | bank-width = <4>; |
68 | device-width = <2>; | 69 | device-width = <2>; |
69 | }; | 70 | }; |
71 | |||
72 | /* Note: CAN support needs be enabled in U-Boot */ | ||
73 | can@3,0 { | ||
74 | compatible = "intc,82527"; | ||
75 | reg = <3 0x0 0x80>; | ||
76 | interrupts = <8 1>; | ||
77 | interrupt-parent = <&PIC>; | ||
78 | bosch,external-clock-frequency = <16000000>; | ||
79 | bosch,disconnect-rx1-input; | ||
80 | bosch,disconnect-tx1-output; | ||
81 | bosch,iso-low-speed-mux; | ||
82 | bosch,clock-out-frequency = <16000000>; | ||
83 | }; | ||
84 | |||
85 | can@3,100 { | ||
86 | compatible = "intc,82527"; | ||
87 | reg = <3 0x100 0x80>; | ||
88 | interrupts = <8 1>; | ||
89 | interrupt-parent = <&PIC>; | ||
90 | bosch,external-clock-frequency = <16000000>; | ||
91 | bosch,disconnect-rx1-input; | ||
92 | bosch,disconnect-tx1-output; | ||
93 | bosch,iso-low-speed-mux; | ||
94 | }; | ||
70 | }; | 95 | }; |
71 | 96 | ||
72 | soc@fff00000 { | 97 | soc@fff00000 { |
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 6cdf1c0d2c8a..3b98d7354341 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig | |||
@@ -52,6 +52,8 @@ CONFIG_MTD_CFI=y | |||
52 | CONFIG_MTD_JEDECPROBE=y | 52 | CONFIG_MTD_JEDECPROBE=y |
53 | CONFIG_MTD_CFI_AMDSTD=y | 53 | CONFIG_MTD_CFI_AMDSTD=y |
54 | CONFIG_MTD_PHYSMAP_OF=y | 54 | CONFIG_MTD_PHYSMAP_OF=y |
55 | CONFIG_MTD_NAND=m | ||
56 | CONFIG_MTD_NAND_NDFC=m | ||
55 | CONFIG_MTD_UBI=m | 57 | CONFIG_MTD_UBI=m |
56 | CONFIG_MTD_UBI_GLUEBI=m | 58 | CONFIG_MTD_UBI_GLUEBI=m |
57 | CONFIG_PROC_DEVICETREE=y | 59 | CONFIG_PROC_DEVICETREE=y |
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index 33a35801f7c9..487d46ff68a1 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h | |||
@@ -29,25 +29,8 @@ static inline void setup_cputime_one_jiffy(void) { } | |||
29 | #include <asm/time.h> | 29 | #include <asm/time.h> |
30 | #include <asm/param.h> | 30 | #include <asm/param.h> |
31 | 31 | ||
32 | typedef u64 cputime_t; | 32 | typedef u64 __nocast cputime_t; |
33 | typedef u64 cputime64_t; | 33 | typedef u64 __nocast cputime64_t; |
34 | |||
35 | #define cputime_zero ((cputime_t)0) | ||
36 | #define cputime_max ((~((cputime_t)0) >> 1) - 1) | ||
37 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
38 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
39 | #define cputime_div(__a, __n) ((__a) / (__n)) | ||
40 | #define cputime_halve(__a) ((__a) >> 1) | ||
41 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
42 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
43 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
44 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
45 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
46 | |||
47 | #define cputime64_zero ((cputime64_t)0) | ||
48 | #define cputime64_add(__a, __b) ((__a) + (__b)) | ||
49 | #define cputime64_sub(__a, __b) ((__a) - (__b)) | ||
50 | #define cputime_to_cputime64(__ct) (__ct) | ||
51 | 34 | ||
52 | #ifdef __KERNEL__ | 35 | #ifdef __KERNEL__ |
53 | 36 | ||
@@ -65,7 +48,7 @@ DECLARE_PER_CPU(unsigned long, cputime_scaled_last_delta); | |||
65 | 48 | ||
66 | static inline unsigned long cputime_to_jiffies(const cputime_t ct) | 49 | static inline unsigned long cputime_to_jiffies(const cputime_t ct) |
67 | { | 50 | { |
68 | return mulhdu(ct, __cputime_jiffies_factor); | 51 | return mulhdu((__force u64) ct, __cputime_jiffies_factor); |
69 | } | 52 | } |
70 | 53 | ||
71 | /* Estimate the scaled cputime by scaling the real cputime based on | 54 | /* Estimate the scaled cputime by scaling the real cputime based on |
@@ -74,14 +57,15 @@ static inline cputime_t cputime_to_scaled(const cputime_t ct) | |||
74 | { | 57 | { |
75 | if (cpu_has_feature(CPU_FTR_SPURR) && | 58 | if (cpu_has_feature(CPU_FTR_SPURR) && |
76 | __get_cpu_var(cputime_last_delta)) | 59 | __get_cpu_var(cputime_last_delta)) |
77 | return ct * __get_cpu_var(cputime_scaled_last_delta) / | 60 | return (__force u64) ct * |
78 | __get_cpu_var(cputime_last_delta); | 61 | __get_cpu_var(cputime_scaled_last_delta) / |
62 | __get_cpu_var(cputime_last_delta); | ||
79 | return ct; | 63 | return ct; |
80 | } | 64 | } |
81 | 65 | ||
82 | static inline cputime_t jiffies_to_cputime(const unsigned long jif) | 66 | static inline cputime_t jiffies_to_cputime(const unsigned long jif) |
83 | { | 67 | { |
84 | cputime_t ct; | 68 | u64 ct; |
85 | unsigned long sec; | 69 | unsigned long sec; |
86 | 70 | ||
87 | /* have to be a little careful about overflow */ | 71 | /* have to be a little careful about overflow */ |
@@ -93,7 +77,7 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif) | |||
93 | } | 77 | } |
94 | if (sec) | 78 | if (sec) |
95 | ct += (cputime_t) sec * tb_ticks_per_sec; | 79 | ct += (cputime_t) sec * tb_ticks_per_sec; |
96 | return ct; | 80 | return (__force cputime_t) ct; |
97 | } | 81 | } |
98 | 82 | ||
99 | static inline void setup_cputime_one_jiffy(void) | 83 | static inline void setup_cputime_one_jiffy(void) |
@@ -103,7 +87,7 @@ static inline void setup_cputime_one_jiffy(void) | |||
103 | 87 | ||
104 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) | 88 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) |
105 | { | 89 | { |
106 | cputime_t ct; | 90 | u64 ct; |
107 | u64 sec; | 91 | u64 sec; |
108 | 92 | ||
109 | /* have to be a little careful about overflow */ | 93 | /* have to be a little careful about overflow */ |
@@ -114,13 +98,13 @@ static inline cputime64_t jiffies64_to_cputime64(const u64 jif) | |||
114 | do_div(ct, HZ); | 98 | do_div(ct, HZ); |
115 | } | 99 | } |
116 | if (sec) | 100 | if (sec) |
117 | ct += (cputime_t) sec * tb_ticks_per_sec; | 101 | ct += (u64) sec * tb_ticks_per_sec; |
118 | return ct; | 102 | return (__force cputime64_t) ct; |
119 | } | 103 | } |
120 | 104 | ||
121 | static inline u64 cputime64_to_jiffies64(const cputime_t ct) | 105 | static inline u64 cputime64_to_jiffies64(const cputime_t ct) |
122 | { | 106 | { |
123 | return mulhdu(ct, __cputime_jiffies_factor); | 107 | return mulhdu((__force u64) ct, __cputime_jiffies_factor); |
124 | } | 108 | } |
125 | 109 | ||
126 | /* | 110 | /* |
@@ -130,12 +114,12 @@ extern u64 __cputime_usec_factor; | |||
130 | 114 | ||
131 | static inline unsigned long cputime_to_usecs(const cputime_t ct) | 115 | static inline unsigned long cputime_to_usecs(const cputime_t ct) |
132 | { | 116 | { |
133 | return mulhdu(ct, __cputime_usec_factor); | 117 | return mulhdu((__force u64) ct, __cputime_usec_factor); |
134 | } | 118 | } |
135 | 119 | ||
136 | static inline cputime_t usecs_to_cputime(const unsigned long us) | 120 | static inline cputime_t usecs_to_cputime(const unsigned long us) |
137 | { | 121 | { |
138 | cputime_t ct; | 122 | u64 ct; |
139 | unsigned long sec; | 123 | unsigned long sec; |
140 | 124 | ||
141 | /* have to be a little careful about overflow */ | 125 | /* have to be a little careful about overflow */ |
@@ -147,9 +131,11 @@ static inline cputime_t usecs_to_cputime(const unsigned long us) | |||
147 | } | 131 | } |
148 | if (sec) | 132 | if (sec) |
149 | ct += (cputime_t) sec * tb_ticks_per_sec; | 133 | ct += (cputime_t) sec * tb_ticks_per_sec; |
150 | return ct; | 134 | return (__force cputime_t) ct; |
151 | } | 135 | } |
152 | 136 | ||
137 | #define usecs_to_cputime64(us) usecs_to_cputime(us) | ||
138 | |||
153 | /* | 139 | /* |
154 | * Convert cputime <-> seconds | 140 | * Convert cputime <-> seconds |
155 | */ | 141 | */ |
@@ -157,12 +143,12 @@ extern u64 __cputime_sec_factor; | |||
157 | 143 | ||
158 | static inline unsigned long cputime_to_secs(const cputime_t ct) | 144 | static inline unsigned long cputime_to_secs(const cputime_t ct) |
159 | { | 145 | { |
160 | return mulhdu(ct, __cputime_sec_factor); | 146 | return mulhdu((__force u64) ct, __cputime_sec_factor); |
161 | } | 147 | } |
162 | 148 | ||
163 | static inline cputime_t secs_to_cputime(const unsigned long sec) | 149 | static inline cputime_t secs_to_cputime(const unsigned long sec) |
164 | { | 150 | { |
165 | return (cputime_t) sec * tb_ticks_per_sec; | 151 | return (__force cputime_t)((u64) sec * tb_ticks_per_sec); |
166 | } | 152 | } |
167 | 153 | ||
168 | /* | 154 | /* |
@@ -170,7 +156,7 @@ static inline cputime_t secs_to_cputime(const unsigned long sec) | |||
170 | */ | 156 | */ |
171 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *p) | 157 | static inline void cputime_to_timespec(const cputime_t ct, struct timespec *p) |
172 | { | 158 | { |
173 | u64 x = ct; | 159 | u64 x = (__force u64) ct; |
174 | unsigned int frac; | 160 | unsigned int frac; |
175 | 161 | ||
176 | frac = do_div(x, tb_ticks_per_sec); | 162 | frac = do_div(x, tb_ticks_per_sec); |
@@ -182,11 +168,11 @@ static inline void cputime_to_timespec(const cputime_t ct, struct timespec *p) | |||
182 | 168 | ||
183 | static inline cputime_t timespec_to_cputime(const struct timespec *p) | 169 | static inline cputime_t timespec_to_cputime(const struct timespec *p) |
184 | { | 170 | { |
185 | cputime_t ct; | 171 | u64 ct; |
186 | 172 | ||
187 | ct = (u64) p->tv_nsec * tb_ticks_per_sec; | 173 | ct = (u64) p->tv_nsec * tb_ticks_per_sec; |
188 | do_div(ct, 1000000000); | 174 | do_div(ct, 1000000000); |
189 | return ct + (u64) p->tv_sec * tb_ticks_per_sec; | 175 | return (__force cputime_t)(ct + (u64) p->tv_sec * tb_ticks_per_sec); |
190 | } | 176 | } |
191 | 177 | ||
192 | /* | 178 | /* |
@@ -194,7 +180,7 @@ static inline cputime_t timespec_to_cputime(const struct timespec *p) | |||
194 | */ | 180 | */ |
195 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *p) | 181 | static inline void cputime_to_timeval(const cputime_t ct, struct timeval *p) |
196 | { | 182 | { |
197 | u64 x = ct; | 183 | u64 x = (__force u64) ct; |
198 | unsigned int frac; | 184 | unsigned int frac; |
199 | 185 | ||
200 | frac = do_div(x, tb_ticks_per_sec); | 186 | frac = do_div(x, tb_ticks_per_sec); |
@@ -206,11 +192,11 @@ static inline void cputime_to_timeval(const cputime_t ct, struct timeval *p) | |||
206 | 192 | ||
207 | static inline cputime_t timeval_to_cputime(const struct timeval *p) | 193 | static inline cputime_t timeval_to_cputime(const struct timeval *p) |
208 | { | 194 | { |
209 | cputime_t ct; | 195 | u64 ct; |
210 | 196 | ||
211 | ct = (u64) p->tv_usec * tb_ticks_per_sec; | 197 | ct = (u64) p->tv_usec * tb_ticks_per_sec; |
212 | do_div(ct, 1000000); | 198 | do_div(ct, 1000000); |
213 | return ct + (u64) p->tv_sec * tb_ticks_per_sec; | 199 | return (__force cputime_t)(ct + (u64) p->tv_sec * tb_ticks_per_sec); |
214 | } | 200 | } |
215 | 201 | ||
216 | /* | 202 | /* |
@@ -220,12 +206,12 @@ extern u64 __cputime_clockt_factor; | |||
220 | 206 | ||
221 | static inline unsigned long cputime_to_clock_t(const cputime_t ct) | 207 | static inline unsigned long cputime_to_clock_t(const cputime_t ct) |
222 | { | 208 | { |
223 | return mulhdu(ct, __cputime_clockt_factor); | 209 | return mulhdu((__force u64) ct, __cputime_clockt_factor); |
224 | } | 210 | } |
225 | 211 | ||
226 | static inline cputime_t clock_t_to_cputime(const unsigned long clk) | 212 | static inline cputime_t clock_t_to_cputime(const unsigned long clk) |
227 | { | 213 | { |
228 | cputime_t ct; | 214 | u64 ct; |
229 | unsigned long sec; | 215 | unsigned long sec; |
230 | 216 | ||
231 | /* have to be a little careful about overflow */ | 217 | /* have to be a little careful about overflow */ |
@@ -236,8 +222,8 @@ static inline cputime_t clock_t_to_cputime(const unsigned long clk) | |||
236 | do_div(ct, USER_HZ); | 222 | do_div(ct, USER_HZ); |
237 | } | 223 | } |
238 | if (sec) | 224 | if (sec) |
239 | ct += (cputime_t) sec * tb_ticks_per_sec; | 225 | ct += (u64) sec * tb_ticks_per_sec; |
240 | return ct; | 226 | return (__force cputime_t) ct; |
241 | } | 227 | } |
242 | 228 | ||
243 | #define cputime64_to_clock_t(ct) cputime_to_clock_t((cputime_t)(ct)) | 229 | #define cputime64_to_clock_t(ct) cputime_to_clock_t((cputime_t)(ct)) |
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index d4df013ad779..69c7377d2071 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h | |||
@@ -381,39 +381,6 @@ static inline bool kvmppc_critical_section(struct kvm_vcpu *vcpu) | |||
381 | } | 381 | } |
382 | #endif | 382 | #endif |
383 | 383 | ||
384 | static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, | ||
385 | unsigned long pte_index) | ||
386 | { | ||
387 | unsigned long rb, va_low; | ||
388 | |||
389 | rb = (v & ~0x7fUL) << 16; /* AVA field */ | ||
390 | va_low = pte_index >> 3; | ||
391 | if (v & HPTE_V_SECONDARY) | ||
392 | va_low = ~va_low; | ||
393 | /* xor vsid from AVA */ | ||
394 | if (!(v & HPTE_V_1TB_SEG)) | ||
395 | va_low ^= v >> 12; | ||
396 | else | ||
397 | va_low ^= v >> 24; | ||
398 | va_low &= 0x7ff; | ||
399 | if (v & HPTE_V_LARGE) { | ||
400 | rb |= 1; /* L field */ | ||
401 | if (cpu_has_feature(CPU_FTR_ARCH_206) && | ||
402 | (r & 0xff000)) { | ||
403 | /* non-16MB large page, must be 64k */ | ||
404 | /* (masks depend on page size) */ | ||
405 | rb |= 0x1000; /* page encoding in LP field */ | ||
406 | rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ | ||
407 | rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ | ||
408 | } | ||
409 | } else { | ||
410 | /* 4kB page */ | ||
411 | rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ | ||
412 | } | ||
413 | rb |= (v >> 54) & 0x300; /* B field */ | ||
414 | return rb; | ||
415 | } | ||
416 | |||
417 | /* Magic register values loaded into r3 and r4 before the 'sc' assembly | 384 | /* Magic register values loaded into r3 and r4 before the 'sc' assembly |
418 | * instruction for the OSI hypercalls */ | 385 | * instruction for the OSI hypercalls */ |
419 | #define OSI_SC_MAGIC_R3 0x113724FA | 386 | #define OSI_SC_MAGIC_R3 0x113724FA |
diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index e43fe42b9875..d0ac94f98f9e 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h | |||
@@ -29,4 +29,37 @@ static inline struct kvmppc_book3s_shadow_vcpu *to_svcpu(struct kvm_vcpu *vcpu) | |||
29 | 29 | ||
30 | #define SPAPR_TCE_SHIFT 12 | 30 | #define SPAPR_TCE_SHIFT 12 |
31 | 31 | ||
32 | static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r, | ||
33 | unsigned long pte_index) | ||
34 | { | ||
35 | unsigned long rb, va_low; | ||
36 | |||
37 | rb = (v & ~0x7fUL) << 16; /* AVA field */ | ||
38 | va_low = pte_index >> 3; | ||
39 | if (v & HPTE_V_SECONDARY) | ||
40 | va_low = ~va_low; | ||
41 | /* xor vsid from AVA */ | ||
42 | if (!(v & HPTE_V_1TB_SEG)) | ||
43 | va_low ^= v >> 12; | ||
44 | else | ||
45 | va_low ^= v >> 24; | ||
46 | va_low &= 0x7ff; | ||
47 | if (v & HPTE_V_LARGE) { | ||
48 | rb |= 1; /* L field */ | ||
49 | if (cpu_has_feature(CPU_FTR_ARCH_206) && | ||
50 | (r & 0xff000)) { | ||
51 | /* non-16MB large page, must be 64k */ | ||
52 | /* (masks depend on page size) */ | ||
53 | rb |= 0x1000; /* page encoding in LP field */ | ||
54 | rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */ | ||
55 | rb |= (va_low & 0xfe); /* AVAL field (P7 doesn't seem to care) */ | ||
56 | } | ||
57 | } else { | ||
58 | /* 4kB page */ | ||
59 | rb |= (va_low & 0x7ff) << 12; /* remaining 11b of VA */ | ||
60 | } | ||
61 | rb |= (v >> 54) & 0x300; /* B field */ | ||
62 | return rb; | ||
63 | } | ||
64 | |||
32 | #endif /* __ASM_KVM_BOOK3S_64_H__ */ | 65 | #endif /* __ASM_KVM_BOOK3S_64_H__ */ |
diff --git a/arch/powerpc/include/asm/memblock.h b/arch/powerpc/include/asm/memblock.h deleted file mode 100644 index 43efc345065e..000000000000 --- a/arch/powerpc/include/asm/memblock.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _ASM_POWERPC_MEMBLOCK_H | ||
2 | #define _ASM_POWERPC_MEMBLOCK_H | ||
3 | |||
4 | #include <asm/udbg.h> | ||
5 | |||
6 | #define MEMBLOCK_DBG(fmt...) udbg_printf(fmt) | ||
7 | |||
8 | #endif /* _ASM_POWERPC_MEMBLOCK_H */ | ||
diff --git a/arch/powerpc/include/asm/socket.h b/arch/powerpc/include/asm/socket.h index 866f7606da68..2fc2af8fbf59 100644 --- a/arch/powerpc/include/asm/socket.h +++ b/arch/powerpc/include/asm/socket.h | |||
@@ -69,4 +69,7 @@ | |||
69 | 69 | ||
70 | #define SO_RXQ_OVFL 40 | 70 | #define SO_RXQ_OVFL 40 |
71 | 71 | ||
72 | #define SO_WIFI_STATUS 41 | ||
73 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
74 | |||
72 | #endif /* _ASM_POWERPC_SOCKET_H */ | 75 | #endif /* _ASM_POWERPC_SOCKET_H */ |
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 8574b0e81ff1..7c66ce13da89 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c | |||
@@ -50,6 +50,12 @@ static int __init powersave_off(char *arg) | |||
50 | } | 50 | } |
51 | __setup("powersave=off", powersave_off); | 51 | __setup("powersave=off", powersave_off); |
52 | 52 | ||
53 | #if defined(CONFIG_PPC_PSERIES) && defined(CONFIG_TRACEPOINTS) | ||
54 | static const bool idle_uses_rcu = 1; | ||
55 | #else | ||
56 | static const bool idle_uses_rcu; | ||
57 | #endif | ||
58 | |||
53 | /* | 59 | /* |
54 | * The body of the idle task. | 60 | * The body of the idle task. |
55 | */ | 61 | */ |
@@ -60,7 +66,10 @@ void cpu_idle(void) | |||
60 | 66 | ||
61 | set_thread_flag(TIF_POLLING_NRFLAG); | 67 | set_thread_flag(TIF_POLLING_NRFLAG); |
62 | while (1) { | 68 | while (1) { |
63 | tick_nohz_stop_sched_tick(1); | 69 | tick_nohz_idle_enter(); |
70 | if (!idle_uses_rcu) | ||
71 | rcu_idle_enter(); | ||
72 | |||
64 | while (!need_resched() && !cpu_should_die()) { | 73 | while (!need_resched() && !cpu_should_die()) { |
65 | ppc64_runlatch_off(); | 74 | ppc64_runlatch_off(); |
66 | 75 | ||
@@ -97,7 +106,9 @@ void cpu_idle(void) | |||
97 | 106 | ||
98 | HMT_medium(); | 107 | HMT_medium(); |
99 | ppc64_runlatch_on(); | 108 | ppc64_runlatch_on(); |
100 | tick_nohz_restart_sched_tick(); | 109 | if (!idle_uses_rcu) |
110 | rcu_idle_exit(); | ||
111 | tick_nohz_idle_exit(); | ||
101 | preempt_enable_no_resched(); | 112 | preempt_enable_no_resched(); |
102 | if (cpu_should_die()) | 113 | if (cpu_should_die()) |
103 | cpu_die(); | 114 | cpu_die(); |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index ec50bb965538..c957b1202bdc 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -107,9 +107,6 @@ void __init reserve_crashkernel(void) | |||
107 | unsigned long long crash_size, crash_base; | 107 | unsigned long long crash_size, crash_base; |
108 | int ret; | 108 | int ret; |
109 | 109 | ||
110 | /* this is necessary because of memblock_phys_mem_size() */ | ||
111 | memblock_analyze(); | ||
112 | |||
113 | /* use common parsing */ | 110 | /* use common parsing */ |
114 | ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(), | 111 | ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(), |
115 | &crash_size, &crash_base); | 112 | &crash_size, &crash_base); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index fa1235b0503b..abe405dab34d 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -733,8 +733,6 @@ void __init early_init_devtree(void *params) | |||
733 | of_scan_flat_dt(early_init_dt_scan_chosen_ppc, cmd_line); | 733 | of_scan_flat_dt(early_init_dt_scan_chosen_ppc, cmd_line); |
734 | 734 | ||
735 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 735 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
736 | memblock_init(); | ||
737 | |||
738 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 736 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
739 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); | 737 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); |
740 | 738 | ||
@@ -756,20 +754,14 @@ void __init early_init_devtree(void *params) | |||
756 | early_reserve_mem(); | 754 | early_reserve_mem(); |
757 | phyp_dump_reserve_mem(); | 755 | phyp_dump_reserve_mem(); |
758 | 756 | ||
759 | limit = memory_limit; | 757 | /* |
760 | if (! limit) { | 758 | * Ensure that total memory size is page-aligned, because otherwise |
761 | phys_addr_t memsize; | 759 | * mark_bootmem() gets upset. |
762 | 760 | */ | |
763 | /* Ensure that total memory size is page-aligned, because | 761 | limit = ALIGN(memory_limit ?: memblock_phys_mem_size(), PAGE_SIZE); |
764 | * otherwise mark_bootmem() gets upset. */ | ||
765 | memblock_analyze(); | ||
766 | memsize = memblock_phys_mem_size(); | ||
767 | if ((memsize & PAGE_MASK) != memsize) | ||
768 | limit = memsize & PAGE_MASK; | ||
769 | } | ||
770 | memblock_enforce_memory_limit(limit); | 762 | memblock_enforce_memory_limit(limit); |
771 | 763 | ||
772 | memblock_analyze(); | 764 | memblock_allow_resize(); |
773 | memblock_dump_all(); | 765 | memblock_dump_all(); |
774 | 766 | ||
775 | DBG("Phys. mem: %llx\n", memblock_phys_mem_size()); | 767 | DBG("Phys. mem: %llx\n", memblock_phys_mem_size()); |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0cb137a9b038..336983da9e72 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -538,7 +538,7 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu) | |||
538 | tpaca->kvm_hstate.napping = 0; | 538 | tpaca->kvm_hstate.napping = 0; |
539 | vcpu->cpu = vc->pcpu; | 539 | vcpu->cpu = vc->pcpu; |
540 | smp_wmb(); | 540 | smp_wmb(); |
541 | #ifdef CONFIG_PPC_ICP_NATIVE | 541 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) |
542 | if (vcpu->arch.ptid) { | 542 | if (vcpu->arch.ptid) { |
543 | tpaca->cpu_start = 0x80; | 543 | tpaca->cpu_start = 0x80; |
544 | wmb(); | 544 | wmb(); |
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 3c791e1eb675..e2cfb9e1e20e 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -658,10 +658,12 @@ program_interrupt: | |||
658 | ulong cmd = kvmppc_get_gpr(vcpu, 3); | 658 | ulong cmd = kvmppc_get_gpr(vcpu, 3); |
659 | int i; | 659 | int i; |
660 | 660 | ||
661 | #ifdef CONFIG_KVM_BOOK3S_64_PR | ||
661 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { | 662 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { |
662 | r = RESUME_GUEST; | 663 | r = RESUME_GUEST; |
663 | break; | 664 | break; |
664 | } | 665 | } |
666 | #endif | ||
665 | 667 | ||
666 | run->papr_hcall.nr = cmd; | 668 | run->papr_hcall.nr = cmd; |
667 | for (i = 0; i < 9; ++i) { | 669 | for (i = 0; i < 9; ++i) { |
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index 26d20903f2bc..8c0d45a6faf7 100644 --- a/arch/powerpc/kvm/e500.c +++ b/arch/powerpc/kvm/e500.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/export.h> | ||
18 | 19 | ||
19 | #include <asm/reg.h> | 20 | #include <asm/reg.h> |
20 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 79c575d3dd63..a8b3cc7d90fe 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of_fdt.h> | 15 | #include <linux/of_fdt.h> |
16 | #include <linux/memblock.h> | 16 | #include <linux/memblock.h> |
17 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
18 | #include <linux/moduleparam.h> | ||
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
19 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
20 | #include <asm/tlb.h> | 21 | #include <asm/tlb.h> |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 60a4e4e84e8c..6157be2a7049 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -141,8 +141,7 @@ void __init MMU_init(void) | |||
141 | 141 | ||
142 | if (memblock.memory.cnt > 1) { | 142 | if (memblock.memory.cnt > 1) { |
143 | #ifndef CONFIG_WII | 143 | #ifndef CONFIG_WII |
144 | memblock.memory.cnt = 1; | 144 | memblock_enforce_memory_limit(memblock.memory.regions[0].size); |
145 | memblock_analyze(); | ||
146 | printk(KERN_WARNING "Only using first contiguous memory region"); | 145 | printk(KERN_WARNING "Only using first contiguous memory region"); |
147 | #else | 146 | #else |
148 | wii_memory_fixups(); | 147 | wii_memory_fixups(); |
@@ -165,7 +164,6 @@ void __init MMU_init(void) | |||
165 | #ifndef CONFIG_HIGHMEM | 164 | #ifndef CONFIG_HIGHMEM |
166 | total_memory = total_lowmem; | 165 | total_memory = total_lowmem; |
167 | memblock_enforce_memory_limit(total_lowmem); | 166 | memblock_enforce_memory_limit(total_lowmem); |
168 | memblock_analyze(); | ||
169 | #endif /* CONFIG_HIGHMEM */ | 167 | #endif /* CONFIG_HIGHMEM */ |
170 | } | 168 | } |
171 | 169 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 395f42d5f785..d974b79a3068 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -200,7 +200,7 @@ void __init do_init_bootmem(void) | |||
200 | unsigned long start_pfn, end_pfn; | 200 | unsigned long start_pfn, end_pfn; |
201 | start_pfn = memblock_region_memory_base_pfn(reg); | 201 | start_pfn = memblock_region_memory_base_pfn(reg); |
202 | end_pfn = memblock_region_memory_end_pfn(reg); | 202 | end_pfn = memblock_region_memory_end_pfn(reg); |
203 | add_active_range(0, start_pfn, end_pfn); | 203 | memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0); |
204 | } | 204 | } |
205 | 205 | ||
206 | /* Add all physical memory to the bootmem map, mark each area | 206 | /* Add all physical memory to the bootmem map, mark each area |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 542156637487..c0189c169bbb 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -127,45 +127,25 @@ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, | |||
127 | } | 127 | } |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * get_active_region_work_fn - A helper function for get_node_active_region | 130 | * get_node_active_region - Return active region containing pfn |
131 | * Returns datax set to the start_pfn and end_pfn if they contain | ||
132 | * the initial value of datax->start_pfn between them | ||
133 | * @start_pfn: start page(inclusive) of region to check | ||
134 | * @end_pfn: end page(exclusive) of region to check | ||
135 | * @datax: comes in with ->start_pfn set to value to search for and | ||
136 | * goes out with active range if it contains it | ||
137 | * Returns 1 if search value is in range else 0 | ||
138 | */ | ||
139 | static int __init get_active_region_work_fn(unsigned long start_pfn, | ||
140 | unsigned long end_pfn, void *datax) | ||
141 | { | ||
142 | struct node_active_region *data; | ||
143 | data = (struct node_active_region *)datax; | ||
144 | |||
145 | if (start_pfn <= data->start_pfn && end_pfn > data->start_pfn) { | ||
146 | data->start_pfn = start_pfn; | ||
147 | data->end_pfn = end_pfn; | ||
148 | return 1; | ||
149 | } | ||
150 | return 0; | ||
151 | |||
152 | } | ||
153 | |||
154 | /* | ||
155 | * get_node_active_region - Return active region containing start_pfn | ||
156 | * Active range returned is empty if none found. | 131 | * Active range returned is empty if none found. |
157 | * @start_pfn: The page to return the region for. | 132 | * @pfn: The page to return the region for |
158 | * @node_ar: Returned set to the active region containing start_pfn | 133 | * @node_ar: Returned set to the active region containing @pfn |
159 | */ | 134 | */ |
160 | static void __init get_node_active_region(unsigned long start_pfn, | 135 | static void __init get_node_active_region(unsigned long pfn, |
161 | struct node_active_region *node_ar) | 136 | struct node_active_region *node_ar) |
162 | { | 137 | { |
163 | int nid = early_pfn_to_nid(start_pfn); | 138 | unsigned long start_pfn, end_pfn; |
139 | int i, nid; | ||
164 | 140 | ||
165 | node_ar->nid = nid; | 141 | for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) { |
166 | node_ar->start_pfn = start_pfn; | 142 | if (pfn >= start_pfn && pfn < end_pfn) { |
167 | node_ar->end_pfn = start_pfn; | 143 | node_ar->nid = nid; |
168 | work_with_active_regions(nid, get_active_region_work_fn, node_ar); | 144 | node_ar->start_pfn = start_pfn; |
145 | node_ar->end_pfn = end_pfn; | ||
146 | break; | ||
147 | } | ||
148 | } | ||
169 | } | 149 | } |
170 | 150 | ||
171 | static void map_cpu_to_node(int cpu, int node) | 151 | static void map_cpu_to_node(int cpu, int node) |
@@ -710,9 +690,7 @@ static void __init parse_drconf_memory(struct device_node *memory) | |||
710 | node_set_online(nid); | 690 | node_set_online(nid); |
711 | sz = numa_enforce_memory_limit(base, size); | 691 | sz = numa_enforce_memory_limit(base, size); |
712 | if (sz) | 692 | if (sz) |
713 | add_active_range(nid, base >> PAGE_SHIFT, | 693 | memblock_set_node(base, sz, nid); |
714 | (base >> PAGE_SHIFT) | ||
715 | + (sz >> PAGE_SHIFT)); | ||
716 | } while (--ranges); | 694 | } while (--ranges); |
717 | } | 695 | } |
718 | } | 696 | } |
@@ -802,8 +780,7 @@ new_range: | |||
802 | continue; | 780 | continue; |
803 | } | 781 | } |
804 | 782 | ||
805 | add_active_range(nid, start >> PAGE_SHIFT, | 783 | memblock_set_node(start, size, nid); |
806 | (start >> PAGE_SHIFT) + (size >> PAGE_SHIFT)); | ||
807 | 784 | ||
808 | if (--ranges) | 785 | if (--ranges) |
809 | goto new_range; | 786 | goto new_range; |
@@ -839,7 +816,8 @@ static void __init setup_nonnuma(void) | |||
839 | end_pfn = memblock_region_memory_end_pfn(reg); | 816 | end_pfn = memblock_region_memory_end_pfn(reg); |
840 | 817 | ||
841 | fake_numa_create_new_node(end_pfn, &nid); | 818 | fake_numa_create_new_node(end_pfn, &nid); |
842 | add_active_range(nid, start_pfn, end_pfn); | 819 | memblock_set_node(PFN_PHYS(start_pfn), |
820 | PFN_PHYS(end_pfn - start_pfn), nid); | ||
843 | node_set_online(nid); | 821 | node_set_online(nid); |
844 | } | 822 | } |
845 | } | 823 | } |
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c index b2c65c660852..df32a838dcfa 100644 --- a/arch/powerpc/mm/tlb_nohash.c +++ b/arch/powerpc/mm/tlb_nohash.c | |||
@@ -615,7 +615,6 @@ static void __early_init_mmu(int boot_cpu) | |||
615 | 615 | ||
616 | /* limit memory so we dont have linear faults */ | 616 | /* limit memory so we dont have linear faults */ |
617 | memblock_enforce_memory_limit(linear_map_top); | 617 | memblock_enforce_memory_limit(linear_map_top); |
618 | memblock_analyze(); | ||
619 | 618 | ||
620 | patch_exception(0x1c0, exc_data_tlb_miss_bolted_book3e); | 619 | patch_exception(0x1c0, exc_data_tlb_miss_bolted_book3e); |
621 | patch_exception(0x1e0, exc_instruction_tlb_miss_bolted_book3e); | 620 | patch_exception(0x1e0, exc_instruction_tlb_miss_bolted_book3e); |
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 1b5dc1a2e145..6d8dadf19f0b 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c | |||
@@ -79,24 +79,19 @@ void __init wii_memory_fixups(void) | |||
79 | BUG_ON(memblock.memory.cnt != 2); | 79 | BUG_ON(memblock.memory.cnt != 2); |
80 | BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); | 80 | BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); |
81 | 81 | ||
82 | p[0].size = _ALIGN_DOWN(p[0].size, PAGE_SIZE); | 82 | /* trim unaligned tail */ |
83 | p[1].size = _ALIGN_DOWN(p[1].size, PAGE_SIZE); | 83 | memblock_remove(ALIGN(p[1].base + p[1].size, PAGE_SIZE), |
84 | (phys_addr_t)ULLONG_MAX); | ||
84 | 85 | ||
85 | wii_hole_start = p[0].base + p[0].size; | 86 | /* determine hole, add & reserve them */ |
87 | wii_hole_start = ALIGN(p[0].base + p[0].size, PAGE_SIZE); | ||
86 | wii_hole_size = p[1].base - wii_hole_start; | 88 | wii_hole_size = p[1].base - wii_hole_start; |
87 | 89 | memblock_add(wii_hole_start, wii_hole_size); | |
88 | pr_info("MEM1: <%08llx %08llx>\n", p[0].base, p[0].size); | ||
89 | pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size); | ||
90 | pr_info("MEM2: <%08llx %08llx>\n", p[1].base, p[1].size); | ||
91 | |||
92 | p[0].size += wii_hole_size + p[1].size; | ||
93 | |||
94 | memblock.memory.cnt = 1; | ||
95 | memblock_analyze(); | ||
96 | |||
97 | /* reserve the hole */ | ||
98 | memblock_reserve(wii_hole_start, wii_hole_size); | 90 | memblock_reserve(wii_hole_start, wii_hole_size); |
99 | 91 | ||
92 | BUG_ON(memblock.memory.cnt != 1); | ||
93 | __memblock_dump_all(); | ||
94 | |||
100 | /* allow ioremapping the address space in the hole */ | 95 | /* allow ioremapping the address space in the hole */ |
101 | __allow_ioremap_reserved = 1; | 96 | __allow_ioremap_reserved = 1; |
102 | } | 97 | } |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index ea0acbd8966d..8fc62586a973 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -563,7 +563,8 @@ static void yield_shared_processor(void) | |||
563 | static void iseries_shared_idle(void) | 563 | static void iseries_shared_idle(void) |
564 | { | 564 | { |
565 | while (1) { | 565 | while (1) { |
566 | tick_nohz_stop_sched_tick(1); | 566 | tick_nohz_idle_enter(); |
567 | rcu_idle_enter(); | ||
567 | while (!need_resched() && !hvlpevent_is_pending()) { | 568 | while (!need_resched() && !hvlpevent_is_pending()) { |
568 | local_irq_disable(); | 569 | local_irq_disable(); |
569 | ppc64_runlatch_off(); | 570 | ppc64_runlatch_off(); |
@@ -577,7 +578,8 @@ static void iseries_shared_idle(void) | |||
577 | } | 578 | } |
578 | 579 | ||
579 | ppc64_runlatch_on(); | 580 | ppc64_runlatch_on(); |
580 | tick_nohz_restart_sched_tick(); | 581 | rcu_idle_exit(); |
582 | tick_nohz_idle_exit(); | ||
581 | 583 | ||
582 | if (hvlpevent_is_pending()) | 584 | if (hvlpevent_is_pending()) |
583 | process_iSeries_events(); | 585 | process_iSeries_events(); |
@@ -593,7 +595,8 @@ static void iseries_dedicated_idle(void) | |||
593 | set_thread_flag(TIF_POLLING_NRFLAG); | 595 | set_thread_flag(TIF_POLLING_NRFLAG); |
594 | 596 | ||
595 | while (1) { | 597 | while (1) { |
596 | tick_nohz_stop_sched_tick(1); | 598 | tick_nohz_idle_enter(); |
599 | rcu_idle_enter(); | ||
597 | if (!need_resched()) { | 600 | if (!need_resched()) { |
598 | while (!need_resched()) { | 601 | while (!need_resched()) { |
599 | ppc64_runlatch_off(); | 602 | ppc64_runlatch_off(); |
@@ -610,7 +613,8 @@ static void iseries_dedicated_idle(void) | |||
610 | } | 613 | } |
611 | 614 | ||
612 | ppc64_runlatch_on(); | 615 | ppc64_runlatch_on(); |
613 | tick_nohz_restart_sched_tick(); | 616 | rcu_idle_exit(); |
617 | tick_nohz_idle_exit(); | ||
614 | preempt_enable_no_resched(); | 618 | preempt_enable_no_resched(); |
615 | schedule(); | 619 | schedule(); |
616 | preempt_disable(); | 620 | preempt_disable(); |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 72714ad27842..8bd6ba542691 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -319,7 +319,6 @@ static int __init ps3_mm_add_memory(void) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | memblock_add(start_addr, map.r1.size); | 321 | memblock_add(start_addr, map.r1.size); |
322 | memblock_analyze(); | ||
323 | 322 | ||
324 | result = online_pages(start_pfn, nr_pages); | 323 | result = online_pages(start_pfn, nr_pages); |
325 | 324 | ||
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index dc36ea6c7727..948e0e3b3547 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -556,6 +556,8 @@ void __trace_hcall_entry(unsigned long opcode, unsigned long *args) | |||
556 | (*depth)++; | 556 | (*depth)++; |
557 | preempt_disable(); | 557 | preempt_disable(); |
558 | trace_hcall_entry(opcode, args); | 558 | trace_hcall_entry(opcode, args); |
559 | if (opcode == H_CEDE) | ||
560 | rcu_idle_enter(); | ||
559 | (*depth)--; | 561 | (*depth)--; |
560 | 562 | ||
561 | out: | 563 | out: |
@@ -576,6 +578,8 @@ void __trace_hcall_exit(long opcode, unsigned long retval, | |||
576 | goto out; | 578 | goto out; |
577 | 579 | ||
578 | (*depth)++; | 580 | (*depth)++; |
581 | if (opcode == H_CEDE) | ||
582 | rcu_idle_exit(); | ||
579 | trace_hcall_exit(opcode, retval, retbuf); | 583 | trace_hcall_exit(opcode, retval, retbuf); |
580 | preempt_enable(); | 584 | preempt_enable(); |
581 | (*depth)--; | 585 | (*depth)--; |