diff options
Diffstat (limited to 'arch')
107 files changed, 873 insertions, 568 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 56a4df952fb0..22e58a99f38b 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -477,7 +477,7 @@ config ALPHA_BROKEN_IRQ_MASK | |||
477 | 477 | ||
478 | config VGA_HOSE | 478 | config VGA_HOSE |
479 | bool | 479 | bool |
480 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL || ALPHA_TSUNAMI | 480 | depends on VGA_CONSOLE && (ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL || ALPHA_TSUNAMI) |
481 | default y | 481 | default y |
482 | help | 482 | help |
483 | Support VGA on an arbitrary hose; needed for several platforms | 483 | Support VGA on an arbitrary hose; needed for several platforms |
diff --git a/arch/alpha/include/asm/rtc.h b/arch/alpha/include/asm/rtc.h index 1f7fba671ae6..d70408d36677 100644 --- a/arch/alpha/include/asm/rtc.h +++ b/arch/alpha/include/asm/rtc.h | |||
@@ -1,14 +1,10 @@ | |||
1 | #ifndef _ALPHA_RTC_H | 1 | #ifndef _ALPHA_RTC_H |
2 | #define _ALPHA_RTC_H | 2 | #define _ALPHA_RTC_H |
3 | 3 | ||
4 | #if defined(CONFIG_ALPHA_GENERIC) | 4 | #if defined(CONFIG_ALPHA_MARVEL) && defined(CONFIG_SMP) \ |
5 | || defined(CONFIG_ALPHA_GENERIC) | ||
5 | # define get_rtc_time alpha_mv.rtc_get_time | 6 | # define get_rtc_time alpha_mv.rtc_get_time |
6 | # define set_rtc_time alpha_mv.rtc_set_time | 7 | # define set_rtc_time alpha_mv.rtc_set_time |
7 | #else | ||
8 | # if defined(CONFIG_ALPHA_MARVEL) && defined(CONFIG_SMP) | ||
9 | # define get_rtc_time marvel_get_rtc_time | ||
10 | # define set_rtc_time marvel_set_rtc_time | ||
11 | # endif | ||
12 | #endif | 8 | #endif |
13 | 9 | ||
14 | #include <asm-generic/rtc.h> | 10 | #include <asm-generic/rtc.h> |
diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c index 5e7c28f92f19..61893d7bdda5 100644 --- a/arch/alpha/kernel/core_tsunami.c +++ b/arch/alpha/kernel/core_tsunami.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <asm/core_tsunami.h> | 11 | #include <asm/core_tsunami.h> |
12 | #undef __EXTERN_INLINE | 12 | #undef __EXTERN_INLINE |
13 | 13 | ||
14 | #include <linux/module.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
16 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 14a4b6a7cf59..407accc80877 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c | |||
@@ -317,7 +317,7 @@ marvel_init_irq(void) | |||
317 | } | 317 | } |
318 | 318 | ||
319 | static int | 319 | static int |
320 | marvel_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 320 | marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
321 | { | 321 | { |
322 | struct pci_controller *hose = dev->sysdata; | 322 | struct pci_controller *hose = dev->sysdata; |
323 | struct io7_port *io7_port = hose->sysdata; | 323 | struct io7_port *io7_port = hose->sysdata; |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf006d40342c..36586dba6fa6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1186,6 +1186,15 @@ if !MMU | |||
1186 | source "arch/arm/Kconfig-nommu" | 1186 | source "arch/arm/Kconfig-nommu" |
1187 | endif | 1187 | endif |
1188 | 1188 | ||
1189 | config ARM_ERRATA_326103 | ||
1190 | bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" | ||
1191 | depends on CPU_V6 | ||
1192 | help | ||
1193 | Executing a SWP instruction to read-only memory does not set bit 11 | ||
1194 | of the FSR on the ARM 1136 prior to r1p0. This causes the kernel to | ||
1195 | treat the access as a read, preventing a COW from occurring and | ||
1196 | causing the faulting task to livelock. | ||
1197 | |||
1189 | config ARM_ERRATA_411920 | 1198 | config ARM_ERRATA_411920 |
1190 | bool "ARM errata: Invalidation of the Instruction Cache operation can fail" | 1199 | bool "ARM errata: Invalidation of the Instruction Cache operation can fail" |
1191 | depends on CPU_V6 || CPU_V6K | 1200 | depends on CPU_V6 || CPU_V6K |
diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/msm8660-surf.dts index 15ded0deaa79..45bc4bb04e57 100644 --- a/arch/arm/boot/dts/msm8660-surf.dts +++ b/arch/arm/boot/dts/msm8660-surf.dts | |||
@@ -10,7 +10,7 @@ | |||
10 | intc: interrupt-controller@02080000 { | 10 | intc: interrupt-controller@02080000 { |
11 | compatible = "qcom,msm-8660-qgic"; | 11 | compatible = "qcom,msm-8660-qgic"; |
12 | interrupt-controller; | 12 | interrupt-controller; |
13 | #interrupt-cells = <1>; | 13 | #interrupt-cells = <3>; |
14 | reg = < 0x02080000 0x1000 >, | 14 | reg = < 0x02080000 0x1000 >, |
15 | < 0x02081000 0x1000 >; | 15 | < 0x02081000 0x1000 >; |
16 | }; | 16 | }; |
@@ -19,6 +19,6 @@ | |||
19 | compatible = "qcom,msm-hsuart", "qcom,msm-uart"; | 19 | compatible = "qcom,msm-hsuart", "qcom,msm-uart"; |
20 | reg = <0x19c40000 0x1000>, | 20 | reg = <0x19c40000 0x1000>, |
21 | <0x19c00000 0x1000>; | 21 | <0x19c00000 0x1000>; |
22 | interrupts = <195>; | 22 | interrupts = <0 195 0x0>; |
23 | }; | 23 | }; |
24 | }; | 24 | }; |
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts index 0b32925f2147..e2fe3195c0d1 100644 --- a/arch/arm/boot/dts/versatile-ab.dts +++ b/arch/arm/boot/dts/versatile-ab.dts | |||
@@ -173,7 +173,7 @@ | |||
173 | mmc@5000 { | 173 | mmc@5000 { |
174 | compatible = "arm,primecell"; | 174 | compatible = "arm,primecell"; |
175 | reg = < 0x5000 0x1000>; | 175 | reg = < 0x5000 0x1000>; |
176 | interrupts = <22>; | 176 | interrupts = <22 34>; |
177 | }; | 177 | }; |
178 | kmi@6000 { | 178 | kmi@6000 { |
179 | compatible = "arm,pl050", "arm,primecell"; | 179 | compatible = "arm,pl050", "arm,primecell"; |
diff --git a/arch/arm/boot/dts/versatile-pb.dts b/arch/arm/boot/dts/versatile-pb.dts index 166461073b78..7e8175269064 100644 --- a/arch/arm/boot/dts/versatile-pb.dts +++ b/arch/arm/boot/dts/versatile-pb.dts | |||
@@ -41,7 +41,7 @@ | |||
41 | mmc@b000 { | 41 | mmc@b000 { |
42 | compatible = "arm,primecell"; | 42 | compatible = "arm,primecell"; |
43 | reg = <0xb000 0x1000>; | 43 | reg = <0xb000 0x1000>; |
44 | interrupts = <23>; | 44 | interrupts = <23 34>; |
45 | }; | 45 | }; |
46 | }; | 46 | }; |
47 | }; | 47 | }; |
diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig index 42da9183acc8..082175c54e7c 100644 --- a/arch/arm/configs/mini2440_defconfig +++ b/arch/arm/configs/mini2440_defconfig | |||
@@ -14,6 +14,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y | |||
14 | # CONFIG_BLK_DEV_BSG is not set | 14 | # CONFIG_BLK_DEV_BSG is not set |
15 | CONFIG_BLK_DEV_INTEGRITY=y | 15 | CONFIG_BLK_DEV_INTEGRITY=y |
16 | CONFIG_ARCH_S3C24XX=y | 16 | CONFIG_ARCH_S3C24XX=y |
17 | # CONFIG_CPU_S3C2410 is not set | ||
18 | CONFIG_CPU_S3C2440=y | ||
17 | CONFIG_S3C_ADC=y | 19 | CONFIG_S3C_ADC=y |
18 | CONFIG_S3C24XX_PWM=y | 20 | CONFIG_S3C24XX_PWM=y |
19 | CONFIG_MACH_MINI2440=y | 21 | CONFIG_MACH_MINI2440=y |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index d4c24d412a8d..0f04d84582e1 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -118,6 +118,13 @@ extern void iwmmxt_task_switch(struct thread_info *); | |||
118 | extern void vfp_sync_hwstate(struct thread_info *); | 118 | extern void vfp_sync_hwstate(struct thread_info *); |
119 | extern void vfp_flush_hwstate(struct thread_info *); | 119 | extern void vfp_flush_hwstate(struct thread_info *); |
120 | 120 | ||
121 | struct user_vfp; | ||
122 | struct user_vfp_exc; | ||
123 | |||
124 | extern int vfp_preserve_user_clear_hwstate(struct user_vfp __user *, | ||
125 | struct user_vfp_exc __user *); | ||
126 | extern int vfp_restore_user_hwstate(struct user_vfp __user *, | ||
127 | struct user_vfp_exc __user *); | ||
121 | #endif | 128 | #endif |
122 | 129 | ||
123 | /* | 130 | /* |
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h index 60843eb0f61c..73409e6c0251 100644 --- a/arch/arm/include/asm/tls.h +++ b/arch/arm/include/asm/tls.h | |||
@@ -7,6 +7,8 @@ | |||
7 | 7 | ||
8 | .macro set_tls_v6k, tp, tmp1, tmp2 | 8 | .macro set_tls_v6k, tp, tmp1, tmp2 |
9 | mcr p15, 0, \tp, c13, c0, 3 @ set TLS register | 9 | mcr p15, 0, \tp, c13, c0, 3 @ set TLS register |
10 | mov \tmp1, #0 | ||
11 | mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register | ||
10 | .endm | 12 | .endm |
11 | 13 | ||
12 | .macro set_tls_v6, tp, tmp1, tmp2 | 14 | .macro set_tls_v6, tp, tmp1, tmp2 |
@@ -15,6 +17,8 @@ | |||
15 | mov \tmp2, #0xffff0fff | 17 | mov \tmp2, #0xffff0fff |
16 | tst \tmp1, #HWCAP_TLS @ hardware TLS available? | 18 | tst \tmp1, #HWCAP_TLS @ hardware TLS available? |
17 | mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register | 19 | mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register |
20 | movne \tmp1, #0 | ||
21 | mcrne p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register | ||
18 | streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 | 22 | streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 |
19 | .endm | 23 | .endm |
20 | 24 | ||
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 71ccdbfed662..8349d4e97e2b 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -155,10 +155,10 @@ static bool migrate_one_irq(struct irq_desc *desc) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | c = irq_data_get_irq_chip(d); | 157 | c = irq_data_get_irq_chip(d); |
158 | if (c->irq_set_affinity) | 158 | if (!c->irq_set_affinity) |
159 | c->irq_set_affinity(d, affinity, true); | ||
160 | else | ||
161 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); | 159 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); |
160 | else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) | ||
161 | cpumask_copy(d->affinity, affinity); | ||
162 | 162 | ||
163 | return ret; | 163 | return ret; |
164 | } | 164 | } |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 80abafb9bf33..9650c143afc1 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -906,27 +906,14 @@ long arch_ptrace(struct task_struct *child, long request, | |||
906 | return ret; | 906 | return ret; |
907 | } | 907 | } |
908 | 908 | ||
909 | #ifdef __ARMEB__ | ||
910 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB | ||
911 | #else | ||
912 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARM | ||
913 | #endif | ||
914 | |||
915 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | 909 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) |
916 | { | 910 | { |
917 | unsigned long ip; | 911 | unsigned long ip; |
918 | 912 | ||
919 | /* | 913 | if (why) |
920 | * Save IP. IP is used to denote syscall entry/exit: | ||
921 | * IP = 0 -> entry, = 1 -> exit | ||
922 | */ | ||
923 | ip = regs->ARM_ip; | ||
924 | regs->ARM_ip = why; | ||
925 | |||
926 | if (!ip) | ||
927 | audit_syscall_exit(regs); | 914 | audit_syscall_exit(regs); |
928 | else | 915 | else |
929 | audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, | 916 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, |
930 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | 917 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); |
931 | 918 | ||
932 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 919 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
@@ -936,6 +923,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
936 | 923 | ||
937 | current_thread_info()->syscall = scno; | 924 | current_thread_info()->syscall = scno; |
938 | 925 | ||
926 | /* | ||
927 | * IP is used to denote syscall entry/exit: | ||
928 | * IP = 0 -> entry, =1 -> exit | ||
929 | */ | ||
930 | ip = regs->ARM_ip; | ||
931 | regs->ARM_ip = why; | ||
932 | |||
939 | /* the 0x80 provides a way for the tracing parent to distinguish | 933 | /* the 0x80 provides a way for the tracing parent to distinguish |
940 | between a syscall stop and SIGTRAP delivery */ | 934 | between a syscall stop and SIGTRAP delivery */ |
941 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 935 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 7cb532fc8aa4..d68d1b694680 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -180,44 +180,23 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) | |||
180 | 180 | ||
181 | static int preserve_vfp_context(struct vfp_sigframe __user *frame) | 181 | static int preserve_vfp_context(struct vfp_sigframe __user *frame) |
182 | { | 182 | { |
183 | struct thread_info *thread = current_thread_info(); | ||
184 | struct vfp_hard_struct *h = &thread->vfpstate.hard; | ||
185 | const unsigned long magic = VFP_MAGIC; | 183 | const unsigned long magic = VFP_MAGIC; |
186 | const unsigned long size = VFP_STORAGE_SIZE; | 184 | const unsigned long size = VFP_STORAGE_SIZE; |
187 | int err = 0; | 185 | int err = 0; |
188 | 186 | ||
189 | vfp_sync_hwstate(thread); | ||
190 | __put_user_error(magic, &frame->magic, err); | 187 | __put_user_error(magic, &frame->magic, err); |
191 | __put_user_error(size, &frame->size, err); | 188 | __put_user_error(size, &frame->size, err); |
192 | 189 | ||
193 | /* | 190 | if (err) |
194 | * Copy the floating point registers. There can be unused | 191 | return -EFAULT; |
195 | * registers see asm/hwcap.h for details. | ||
196 | */ | ||
197 | err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs, | ||
198 | sizeof(h->fpregs)); | ||
199 | /* | ||
200 | * Copy the status and control register. | ||
201 | */ | ||
202 | __put_user_error(h->fpscr, &frame->ufp.fpscr, err); | ||
203 | |||
204 | /* | ||
205 | * Copy the exception registers. | ||
206 | */ | ||
207 | __put_user_error(h->fpexc, &frame->ufp_exc.fpexc, err); | ||
208 | __put_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); | ||
209 | __put_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); | ||
210 | 192 | ||
211 | return err ? -EFAULT : 0; | 193 | return vfp_preserve_user_clear_hwstate(&frame->ufp, &frame->ufp_exc); |
212 | } | 194 | } |
213 | 195 | ||
214 | static int restore_vfp_context(struct vfp_sigframe __user *frame) | 196 | static int restore_vfp_context(struct vfp_sigframe __user *frame) |
215 | { | 197 | { |
216 | struct thread_info *thread = current_thread_info(); | ||
217 | struct vfp_hard_struct *h = &thread->vfpstate.hard; | ||
218 | unsigned long magic; | 198 | unsigned long magic; |
219 | unsigned long size; | 199 | unsigned long size; |
220 | unsigned long fpexc; | ||
221 | int err = 0; | 200 | int err = 0; |
222 | 201 | ||
223 | __get_user_error(magic, &frame->magic, err); | 202 | __get_user_error(magic, &frame->magic, err); |
@@ -228,33 +207,7 @@ static int restore_vfp_context(struct vfp_sigframe __user *frame) | |||
228 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) | 207 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) |
229 | return -EINVAL; | 208 | return -EINVAL; |
230 | 209 | ||
231 | vfp_flush_hwstate(thread); | 210 | return vfp_restore_user_hwstate(&frame->ufp, &frame->ufp_exc); |
232 | |||
233 | /* | ||
234 | * Copy the floating point registers. There can be unused | ||
235 | * registers see asm/hwcap.h for details. | ||
236 | */ | ||
237 | err |= __copy_from_user(&h->fpregs, &frame->ufp.fpregs, | ||
238 | sizeof(h->fpregs)); | ||
239 | /* | ||
240 | * Copy the status and control register. | ||
241 | */ | ||
242 | __get_user_error(h->fpscr, &frame->ufp.fpscr, err); | ||
243 | |||
244 | /* | ||
245 | * Sanitise and restore the exception registers. | ||
246 | */ | ||
247 | __get_user_error(fpexc, &frame->ufp_exc.fpexc, err); | ||
248 | /* Ensure the VFP is enabled. */ | ||
249 | fpexc |= FPEXC_EN; | ||
250 | /* Ensure FPINST2 is invalid and the exception flag is cleared. */ | ||
251 | fpexc &= ~(FPEXC_EX | FPEXC_FP2V); | ||
252 | h->fpexc = fpexc; | ||
253 | |||
254 | __get_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); | ||
255 | __get_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); | ||
256 | |||
257 | return err ? -EFAULT : 0; | ||
258 | } | 211 | } |
259 | 212 | ||
260 | #endif | 213 | #endif |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index addbbe8028c2..8f4644659777 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -251,8 +251,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
251 | struct mm_struct *mm = &init_mm; | 251 | struct mm_struct *mm = &init_mm; |
252 | unsigned int cpu = smp_processor_id(); | 252 | unsigned int cpu = smp_processor_id(); |
253 | 253 | ||
254 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
255 | |||
256 | /* | 254 | /* |
257 | * All kernel threads share the same mm context; grab a | 255 | * All kernel threads share the same mm context; grab a |
258 | * reference and switch to it. | 256 | * reference and switch to it. |
@@ -264,6 +262,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
264 | enter_lazy_tlb(mm, current); | 262 | enter_lazy_tlb(mm, current); |
265 | local_flush_tlb_all(); | 263 | local_flush_tlb_all(); |
266 | 264 | ||
265 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
266 | |||
267 | cpu_init(); | 267 | cpu_init(); |
268 | preempt_disable(); | 268 | preempt_disable(); |
269 | trace_hardirqs_off(); | 269 | trace_hardirqs_off(); |
@@ -510,10 +510,6 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
510 | local_fiq_disable(); | 510 | local_fiq_disable(); |
511 | local_irq_disable(); | 511 | local_irq_disable(); |
512 | 512 | ||
513 | #ifdef CONFIG_HOTPLUG_CPU | ||
514 | platform_cpu_kill(cpu); | ||
515 | #endif | ||
516 | |||
517 | while (1) | 513 | while (1) |
518 | cpu_relax(); | 514 | cpu_relax(); |
519 | } | 515 | } |
@@ -576,17 +572,25 @@ void smp_send_reschedule(int cpu) | |||
576 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); | 572 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); |
577 | } | 573 | } |
578 | 574 | ||
575 | #ifdef CONFIG_HOTPLUG_CPU | ||
576 | static void smp_kill_cpus(cpumask_t *mask) | ||
577 | { | ||
578 | unsigned int cpu; | ||
579 | for_each_cpu(cpu, mask) | ||
580 | platform_cpu_kill(cpu); | ||
581 | } | ||
582 | #else | ||
583 | static void smp_kill_cpus(cpumask_t *mask) { } | ||
584 | #endif | ||
585 | |||
579 | void smp_send_stop(void) | 586 | void smp_send_stop(void) |
580 | { | 587 | { |
581 | unsigned long timeout; | 588 | unsigned long timeout; |
589 | struct cpumask mask; | ||
582 | 590 | ||
583 | if (num_online_cpus() > 1) { | 591 | cpumask_copy(&mask, cpu_online_mask); |
584 | struct cpumask mask; | 592 | cpumask_clear_cpu(smp_processor_id(), &mask); |
585 | cpumask_copy(&mask, cpu_online_mask); | 593 | smp_cross_call(&mask, IPI_CPU_STOP); |
586 | cpumask_clear_cpu(smp_processor_id(), &mask); | ||
587 | |||
588 | smp_cross_call(&mask, IPI_CPU_STOP); | ||
589 | } | ||
590 | 594 | ||
591 | /* Wait up to one second for other CPUs to stop */ | 595 | /* Wait up to one second for other CPUs to stop */ |
592 | timeout = USEC_PER_SEC; | 596 | timeout = USEC_PER_SEC; |
@@ -595,6 +599,8 @@ void smp_send_stop(void) | |||
595 | 599 | ||
596 | if (num_online_cpus() > 1) | 600 | if (num_online_cpus() > 1) |
597 | pr_warning("SMP: failed to stop secondary CPUs\n"); | 601 | pr_warning("SMP: failed to stop secondary CPUs\n"); |
602 | |||
603 | smp_kill_cpus(&mask); | ||
598 | } | 604 | } |
599 | 605 | ||
600 | /* | 606 | /* |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index d2b177905cdb..76cbb055dd05 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -115,7 +115,7 @@ int kernel_execve(const char *filename, | |||
115 | "Ir" (THREAD_START_SP - sizeof(regs)), | 115 | "Ir" (THREAD_START_SP - sizeof(regs)), |
116 | "r" (®s), | 116 | "r" (®s), |
117 | "Ir" (sizeof(regs)) | 117 | "Ir" (sizeof(regs)) |
118 | : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); | 118 | : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); |
119 | 119 | ||
120 | out: | 120 | out: |
121 | return ret; | 121 | return ret; |
diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index df54c2a92225..6efd1e5919fd 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c | |||
@@ -497,25 +497,25 @@ static struct clk exynos4_init_clocks_off[] = { | |||
497 | .ctrlbit = (1 << 3), | 497 | .ctrlbit = (1 << 3), |
498 | }, { | 498 | }, { |
499 | .name = "hsmmc", | 499 | .name = "hsmmc", |
500 | .devname = "s3c-sdhci.0", | 500 | .devname = "exynos4-sdhci.0", |
501 | .parent = &exynos4_clk_aclk_133.clk, | 501 | .parent = &exynos4_clk_aclk_133.clk, |
502 | .enable = exynos4_clk_ip_fsys_ctrl, | 502 | .enable = exynos4_clk_ip_fsys_ctrl, |
503 | .ctrlbit = (1 << 5), | 503 | .ctrlbit = (1 << 5), |
504 | }, { | 504 | }, { |
505 | .name = "hsmmc", | 505 | .name = "hsmmc", |
506 | .devname = "s3c-sdhci.1", | 506 | .devname = "exynos4-sdhci.1", |
507 | .parent = &exynos4_clk_aclk_133.clk, | 507 | .parent = &exynos4_clk_aclk_133.clk, |
508 | .enable = exynos4_clk_ip_fsys_ctrl, | 508 | .enable = exynos4_clk_ip_fsys_ctrl, |
509 | .ctrlbit = (1 << 6), | 509 | .ctrlbit = (1 << 6), |
510 | }, { | 510 | }, { |
511 | .name = "hsmmc", | 511 | .name = "hsmmc", |
512 | .devname = "s3c-sdhci.2", | 512 | .devname = "exynos4-sdhci.2", |
513 | .parent = &exynos4_clk_aclk_133.clk, | 513 | .parent = &exynos4_clk_aclk_133.clk, |
514 | .enable = exynos4_clk_ip_fsys_ctrl, | 514 | .enable = exynos4_clk_ip_fsys_ctrl, |
515 | .ctrlbit = (1 << 7), | 515 | .ctrlbit = (1 << 7), |
516 | }, { | 516 | }, { |
517 | .name = "hsmmc", | 517 | .name = "hsmmc", |
518 | .devname = "s3c-sdhci.3", | 518 | .devname = "exynos4-sdhci.3", |
519 | .parent = &exynos4_clk_aclk_133.clk, | 519 | .parent = &exynos4_clk_aclk_133.clk, |
520 | .enable = exynos4_clk_ip_fsys_ctrl, | 520 | .enable = exynos4_clk_ip_fsys_ctrl, |
521 | .ctrlbit = (1 << 8), | 521 | .ctrlbit = (1 << 8), |
@@ -1202,7 +1202,7 @@ static struct clksrc_clk exynos4_clk_sclk_uart3 = { | |||
1202 | static struct clksrc_clk exynos4_clk_sclk_mmc0 = { | 1202 | static struct clksrc_clk exynos4_clk_sclk_mmc0 = { |
1203 | .clk = { | 1203 | .clk = { |
1204 | .name = "sclk_mmc", | 1204 | .name = "sclk_mmc", |
1205 | .devname = "s3c-sdhci.0", | 1205 | .devname = "exynos4-sdhci.0", |
1206 | .parent = &exynos4_clk_dout_mmc0.clk, | 1206 | .parent = &exynos4_clk_dout_mmc0.clk, |
1207 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1207 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1208 | .ctrlbit = (1 << 0), | 1208 | .ctrlbit = (1 << 0), |
@@ -1213,7 +1213,7 @@ static struct clksrc_clk exynos4_clk_sclk_mmc0 = { | |||
1213 | static struct clksrc_clk exynos4_clk_sclk_mmc1 = { | 1213 | static struct clksrc_clk exynos4_clk_sclk_mmc1 = { |
1214 | .clk = { | 1214 | .clk = { |
1215 | .name = "sclk_mmc", | 1215 | .name = "sclk_mmc", |
1216 | .devname = "s3c-sdhci.1", | 1216 | .devname = "exynos4-sdhci.1", |
1217 | .parent = &exynos4_clk_dout_mmc1.clk, | 1217 | .parent = &exynos4_clk_dout_mmc1.clk, |
1218 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1218 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1219 | .ctrlbit = (1 << 4), | 1219 | .ctrlbit = (1 << 4), |
@@ -1224,7 +1224,7 @@ static struct clksrc_clk exynos4_clk_sclk_mmc1 = { | |||
1224 | static struct clksrc_clk exynos4_clk_sclk_mmc2 = { | 1224 | static struct clksrc_clk exynos4_clk_sclk_mmc2 = { |
1225 | .clk = { | 1225 | .clk = { |
1226 | .name = "sclk_mmc", | 1226 | .name = "sclk_mmc", |
1227 | .devname = "s3c-sdhci.2", | 1227 | .devname = "exynos4-sdhci.2", |
1228 | .parent = &exynos4_clk_dout_mmc2.clk, | 1228 | .parent = &exynos4_clk_dout_mmc2.clk, |
1229 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1229 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1230 | .ctrlbit = (1 << 8), | 1230 | .ctrlbit = (1 << 8), |
@@ -1235,7 +1235,7 @@ static struct clksrc_clk exynos4_clk_sclk_mmc2 = { | |||
1235 | static struct clksrc_clk exynos4_clk_sclk_mmc3 = { | 1235 | static struct clksrc_clk exynos4_clk_sclk_mmc3 = { |
1236 | .clk = { | 1236 | .clk = { |
1237 | .name = "sclk_mmc", | 1237 | .name = "sclk_mmc", |
1238 | .devname = "s3c-sdhci.3", | 1238 | .devname = "exynos4-sdhci.3", |
1239 | .parent = &exynos4_clk_dout_mmc3.clk, | 1239 | .parent = &exynos4_clk_dout_mmc3.clk, |
1240 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1240 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1241 | .ctrlbit = (1 << 12), | 1241 | .ctrlbit = (1 << 12), |
@@ -1340,10 +1340,10 @@ static struct clk_lookup exynos4_clk_lookup[] = { | |||
1340 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos4_clk_sclk_uart1.clk), | 1340 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos4_clk_sclk_uart1.clk), |
1341 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos4_clk_sclk_uart2.clk), | 1341 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos4_clk_sclk_uart2.clk), |
1342 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos4_clk_sclk_uart3.clk), | 1342 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos4_clk_sclk_uart3.clk), |
1343 | CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &exynos4_clk_sclk_mmc0.clk), | 1343 | CLKDEV_INIT("exynos4-sdhci.0", "mmc_busclk.2", &exynos4_clk_sclk_mmc0.clk), |
1344 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk), | 1344 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk), |
1345 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk), | 1345 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk), |
1346 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk), | 1346 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk), |
1347 | CLKDEV_INIT("exynos4-fb.0", "lcd", &exynos4_clk_fimd0), | 1347 | CLKDEV_INIT("exynos4-fb.0", "lcd", &exynos4_clk_fimd0), |
1348 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0), | 1348 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0), |
1349 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1), | 1349 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1), |
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index d013982d0f8e..5cd7a8b8868c 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -455,25 +455,25 @@ static struct clk exynos5_init_clocks_off[] = { | |||
455 | .ctrlbit = (1 << 20), | 455 | .ctrlbit = (1 << 20), |
456 | }, { | 456 | }, { |
457 | .name = "hsmmc", | 457 | .name = "hsmmc", |
458 | .devname = "s3c-sdhci.0", | 458 | .devname = "exynos4-sdhci.0", |
459 | .parent = &exynos5_clk_aclk_200.clk, | 459 | .parent = &exynos5_clk_aclk_200.clk, |
460 | .enable = exynos5_clk_ip_fsys_ctrl, | 460 | .enable = exynos5_clk_ip_fsys_ctrl, |
461 | .ctrlbit = (1 << 12), | 461 | .ctrlbit = (1 << 12), |
462 | }, { | 462 | }, { |
463 | .name = "hsmmc", | 463 | .name = "hsmmc", |
464 | .devname = "s3c-sdhci.1", | 464 | .devname = "exynos4-sdhci.1", |
465 | .parent = &exynos5_clk_aclk_200.clk, | 465 | .parent = &exynos5_clk_aclk_200.clk, |
466 | .enable = exynos5_clk_ip_fsys_ctrl, | 466 | .enable = exynos5_clk_ip_fsys_ctrl, |
467 | .ctrlbit = (1 << 13), | 467 | .ctrlbit = (1 << 13), |
468 | }, { | 468 | }, { |
469 | .name = "hsmmc", | 469 | .name = "hsmmc", |
470 | .devname = "s3c-sdhci.2", | 470 | .devname = "exynos4-sdhci.2", |
471 | .parent = &exynos5_clk_aclk_200.clk, | 471 | .parent = &exynos5_clk_aclk_200.clk, |
472 | .enable = exynos5_clk_ip_fsys_ctrl, | 472 | .enable = exynos5_clk_ip_fsys_ctrl, |
473 | .ctrlbit = (1 << 14), | 473 | .ctrlbit = (1 << 14), |
474 | }, { | 474 | }, { |
475 | .name = "hsmmc", | 475 | .name = "hsmmc", |
476 | .devname = "s3c-sdhci.3", | 476 | .devname = "exynos4-sdhci.3", |
477 | .parent = &exynos5_clk_aclk_200.clk, | 477 | .parent = &exynos5_clk_aclk_200.clk, |
478 | .enable = exynos5_clk_ip_fsys_ctrl, | 478 | .enable = exynos5_clk_ip_fsys_ctrl, |
479 | .ctrlbit = (1 << 15), | 479 | .ctrlbit = (1 << 15), |
@@ -813,7 +813,7 @@ static struct clksrc_clk exynos5_clk_sclk_uart3 = { | |||
813 | static struct clksrc_clk exynos5_clk_sclk_mmc0 = { | 813 | static struct clksrc_clk exynos5_clk_sclk_mmc0 = { |
814 | .clk = { | 814 | .clk = { |
815 | .name = "sclk_mmc", | 815 | .name = "sclk_mmc", |
816 | .devname = "s3c-sdhci.0", | 816 | .devname = "exynos4-sdhci.0", |
817 | .parent = &exynos5_clk_dout_mmc0.clk, | 817 | .parent = &exynos5_clk_dout_mmc0.clk, |
818 | .enable = exynos5_clksrc_mask_fsys_ctrl, | 818 | .enable = exynos5_clksrc_mask_fsys_ctrl, |
819 | .ctrlbit = (1 << 0), | 819 | .ctrlbit = (1 << 0), |
@@ -824,7 +824,7 @@ static struct clksrc_clk exynos5_clk_sclk_mmc0 = { | |||
824 | static struct clksrc_clk exynos5_clk_sclk_mmc1 = { | 824 | static struct clksrc_clk exynos5_clk_sclk_mmc1 = { |
825 | .clk = { | 825 | .clk = { |
826 | .name = "sclk_mmc", | 826 | .name = "sclk_mmc", |
827 | .devname = "s3c-sdhci.1", | 827 | .devname = "exynos4-sdhci.1", |
828 | .parent = &exynos5_clk_dout_mmc1.clk, | 828 | .parent = &exynos5_clk_dout_mmc1.clk, |
829 | .enable = exynos5_clksrc_mask_fsys_ctrl, | 829 | .enable = exynos5_clksrc_mask_fsys_ctrl, |
830 | .ctrlbit = (1 << 4), | 830 | .ctrlbit = (1 << 4), |
@@ -835,7 +835,7 @@ static struct clksrc_clk exynos5_clk_sclk_mmc1 = { | |||
835 | static struct clksrc_clk exynos5_clk_sclk_mmc2 = { | 835 | static struct clksrc_clk exynos5_clk_sclk_mmc2 = { |
836 | .clk = { | 836 | .clk = { |
837 | .name = "sclk_mmc", | 837 | .name = "sclk_mmc", |
838 | .devname = "s3c-sdhci.2", | 838 | .devname = "exynos4-sdhci.2", |
839 | .parent = &exynos5_clk_dout_mmc2.clk, | 839 | .parent = &exynos5_clk_dout_mmc2.clk, |
840 | .enable = exynos5_clksrc_mask_fsys_ctrl, | 840 | .enable = exynos5_clksrc_mask_fsys_ctrl, |
841 | .ctrlbit = (1 << 8), | 841 | .ctrlbit = (1 << 8), |
@@ -846,7 +846,7 @@ static struct clksrc_clk exynos5_clk_sclk_mmc2 = { | |||
846 | static struct clksrc_clk exynos5_clk_sclk_mmc3 = { | 846 | static struct clksrc_clk exynos5_clk_sclk_mmc3 = { |
847 | .clk = { | 847 | .clk = { |
848 | .name = "sclk_mmc", | 848 | .name = "sclk_mmc", |
849 | .devname = "s3c-sdhci.3", | 849 | .devname = "exynos4-sdhci.3", |
850 | .parent = &exynos5_clk_dout_mmc3.clk, | 850 | .parent = &exynos5_clk_dout_mmc3.clk, |
851 | .enable = exynos5_clksrc_mask_fsys_ctrl, | 851 | .enable = exynos5_clksrc_mask_fsys_ctrl, |
852 | .ctrlbit = (1 << 12), | 852 | .ctrlbit = (1 << 12), |
@@ -990,10 +990,10 @@ static struct clk_lookup exynos5_clk_lookup[] = { | |||
990 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos5_clk_sclk_uart1.clk), | 990 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos5_clk_sclk_uart1.clk), |
991 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos5_clk_sclk_uart2.clk), | 991 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos5_clk_sclk_uart2.clk), |
992 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos5_clk_sclk_uart3.clk), | 992 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos5_clk_sclk_uart3.clk), |
993 | CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &exynos5_clk_sclk_mmc0.clk), | 993 | CLKDEV_INIT("exynos4-sdhci.0", "mmc_busclk.2", &exynos5_clk_sclk_mmc0.clk), |
994 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), | 994 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), |
995 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), | 995 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), |
996 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), | 996 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), |
997 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), | 997 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), |
998 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), | 998 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), |
999 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), | 999 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 8614aab47cc0..5ccd6e80a607 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -326,6 +326,11 @@ static void __init exynos4_map_io(void) | |||
326 | s3c_fimc_setname(2, "exynos4-fimc"); | 326 | s3c_fimc_setname(2, "exynos4-fimc"); |
327 | s3c_fimc_setname(3, "exynos4-fimc"); | 327 | s3c_fimc_setname(3, "exynos4-fimc"); |
328 | 328 | ||
329 | s3c_sdhci_setname(0, "exynos4-sdhci"); | ||
330 | s3c_sdhci_setname(1, "exynos4-sdhci"); | ||
331 | s3c_sdhci_setname(2, "exynos4-sdhci"); | ||
332 | s3c_sdhci_setname(3, "exynos4-sdhci"); | ||
333 | |||
329 | /* The I2C bus controllers are directly compatible with s3c2440 */ | 334 | /* The I2C bus controllers are directly compatible with s3c2440 */ |
330 | s3c_i2c0_setname("s3c2440-i2c"); | 335 | s3c_i2c0_setname("s3c2440-i2c"); |
331 | s3c_i2c1_setname("s3c2440-i2c"); | 336 | s3c_i2c1_setname("s3c2440-i2c"); |
@@ -344,6 +349,11 @@ static void __init exynos5_map_io(void) | |||
344 | s3c_device_i2c0.resource[1].start = EXYNOS5_IRQ_IIC; | 349 | s3c_device_i2c0.resource[1].start = EXYNOS5_IRQ_IIC; |
345 | s3c_device_i2c0.resource[1].end = EXYNOS5_IRQ_IIC; | 350 | s3c_device_i2c0.resource[1].end = EXYNOS5_IRQ_IIC; |
346 | 351 | ||
352 | s3c_sdhci_setname(0, "exynos4-sdhci"); | ||
353 | s3c_sdhci_setname(1, "exynos4-sdhci"); | ||
354 | s3c_sdhci_setname(2, "exynos4-sdhci"); | ||
355 | s3c_sdhci_setname(3, "exynos4-sdhci"); | ||
356 | |||
347 | /* The I2C bus controllers are directly compatible with s3c2440 */ | 357 | /* The I2C bus controllers are directly compatible with s3c2440 */ |
348 | s3c_i2c0_setname("s3c2440-i2c"); | 358 | s3c_i2c0_setname("s3c2440-i2c"); |
349 | s3c_i2c1_setname("s3c2440-i2c"); | 359 | s3c_i2c1_setname("s3c2440-i2c"); |
@@ -537,7 +547,9 @@ void __init exynos5_init_irq(void) | |||
537 | { | 547 | { |
538 | int irq; | 548 | int irq; |
539 | 549 | ||
540 | gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | 550 | #ifdef CONFIG_OF |
551 | of_irq_init(exynos4_dt_irq_match); | ||
552 | #endif | ||
541 | 553 | ||
542 | for (irq = 0; irq < EXYNOS5_MAX_COMBINER_NR; irq++) { | 554 | for (irq = 0; irq < EXYNOS5_MAX_COMBINER_NR; irq++) { |
543 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | 555 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), |
diff --git a/arch/arm/mach-exynos/dev-dwmci.c b/arch/arm/mach-exynos/dev-dwmci.c index b025db4bf602..79035018fb74 100644 --- a/arch/arm/mach-exynos/dev-dwmci.c +++ b/arch/arm/mach-exynos/dev-dwmci.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/ioport.h> | ||
19 | #include <linux/mmc/dw_mmc.h> | 20 | #include <linux/mmc/dw_mmc.h> |
20 | 21 | ||
21 | #include <plat/devs.h> | 22 | #include <plat/devs.h> |
@@ -33,16 +34,8 @@ static int exynos4_dwmci_init(u32 slot_id, irq_handler_t handler, void *data) | |||
33 | } | 34 | } |
34 | 35 | ||
35 | static struct resource exynos4_dwmci_resource[] = { | 36 | static struct resource exynos4_dwmci_resource[] = { |
36 | [0] = { | 37 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_DWMCI, SZ_4K), |
37 | .start = EXYNOS4_PA_DWMCI, | 38 | [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_DWMCI), |
38 | .end = EXYNOS4_PA_DWMCI + SZ_4K - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }, | ||
41 | [1] = { | ||
42 | .start = IRQ_DWMCI, | ||
43 | .end = IRQ_DWMCI, | ||
44 | .flags = IORESOURCE_IRQ, | ||
45 | } | ||
46 | }; | 39 | }; |
47 | 40 | ||
48 | static struct dw_mci_board exynos4_dwci_pdata = { | 41 | static struct dw_mci_board exynos4_dwci_pdata = { |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index b4f1f902ce6d..ed90aef404c3 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -112,6 +112,7 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { | |||
112 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | | 112 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | |
113 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | 113 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | |
114 | MMC_CAP_ERASE), | 114 | MMC_CAP_ERASE), |
115 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
115 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 116 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
116 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | 117 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, |
117 | }; | 118 | }; |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 7ebf79c2ab34..cb2b027f09a6 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -747,6 +747,7 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { | |||
747 | .max_width = 8, | 747 | .max_width = 8, |
748 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | | 748 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | |
749 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 749 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
750 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
750 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 751 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
751 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | 752 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, |
752 | }; | 753 | }; |
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 962e71169750..fb3496a52ef4 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/irqdomain.h> | 17 | #include <linux/irqdomain.h> |
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | ||
20 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
21 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
22 | 23 | ||
@@ -49,10 +50,22 @@ static void __init msm8x60_map_io(void) | |||
49 | msm_map_msm8x60_io(); | 50 | msm_map_msm8x60_io(); |
50 | } | 51 | } |
51 | 52 | ||
53 | #ifdef CONFIG_OF | ||
54 | static struct of_device_id msm_dt_gic_match[] __initdata = { | ||
55 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, | ||
56 | {} | ||
57 | }; | ||
58 | #endif | ||
59 | |||
52 | static void __init msm8x60_init_irq(void) | 60 | static void __init msm8x60_init_irq(void) |
53 | { | 61 | { |
54 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, | 62 | if (!of_have_populated_dt()) |
55 | (void *)MSM_QGIC_CPU_BASE); | 63 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
64 | (void *)MSM_QGIC_CPU_BASE); | ||
65 | #ifdef CONFIG_OF | ||
66 | else | ||
67 | of_irq_init(msm_dt_gic_match); | ||
68 | #endif | ||
56 | 69 | ||
57 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ | 70 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ |
58 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); | 71 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); |
@@ -73,16 +86,8 @@ static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { | |||
73 | {} | 86 | {} |
74 | }; | 87 | }; |
75 | 88 | ||
76 | static struct of_device_id msm_dt_gic_match[] __initdata = { | ||
77 | { .compatible = "qcom,msm-8660-qgic", }, | ||
78 | {} | ||
79 | }; | ||
80 | |||
81 | static void __init msm8x60_dt_init(void) | 89 | static void __init msm8x60_dt_init(void) |
82 | { | 90 | { |
83 | irq_domain_generate_simple(msm_dt_gic_match, MSM8X60_QGIC_DIST_PHYS, | ||
84 | GIC_SPI_START); | ||
85 | |||
86 | if (of_machine_is_compatible("qcom,msm8660-surf")) { | 91 | if (of_machine_is_compatible("qcom,msm8660-surf")) { |
87 | printk(KERN_INFO "Init surf UART registers\n"); | 92 | printk(KERN_INFO "Init surf UART registers\n"); |
88 | msm8x60_init_uart12dm(); | 93 | msm8x60_init_uart12dm(); |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h index c54cef25895c..cbf51ae81855 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | * bit 23 - Input/Output (PXA2xx specific) | 18 | * bit 23 - Input/Output (PXA2xx specific) |
19 | * bit 24 - Wakeup Enable(PXA2xx specific) | 19 | * bit 24 - Wakeup Enable(PXA2xx specific) |
20 | * bit 25 - Keep Output (PXA2xx specific) | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #define MFP_DIR_IN (0x0 << 23) | 23 | #define MFP_DIR_IN (0x0 << 23) |
@@ -25,6 +26,12 @@ | |||
25 | #define MFP_DIR(x) (((x) >> 23) & 0x1) | 26 | #define MFP_DIR(x) (((x) >> 23) & 0x1) |
26 | 27 | ||
27 | #define MFP_LPM_CAN_WAKEUP (0x1 << 24) | 28 | #define MFP_LPM_CAN_WAKEUP (0x1 << 24) |
29 | |||
30 | /* | ||
31 | * MFP_LPM_KEEP_OUTPUT must be specified for pins that need to | ||
32 | * retain their last output level (low or high). | ||
33 | * Note: MFP_LPM_KEEP_OUTPUT has no effect on pins configured for input. | ||
34 | */ | ||
28 | #define MFP_LPM_KEEP_OUTPUT (0x1 << 25) | 35 | #define MFP_LPM_KEEP_OUTPUT (0x1 << 25) |
29 | 36 | ||
30 | #define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE) | 37 | #define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE) |
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index b0a842887780..ef0426a159d4 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 33 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
34 | #define GPLR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5)) | 34 | #define GPLR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5)) |
35 | #define GPDR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5) + 0x0c) | 35 | #define GPDR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5) + 0x0c) |
36 | #define GPSR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5) + 0x18) | ||
37 | #define GPCR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5) + 0x24) | ||
36 | 38 | ||
37 | #define PWER_WE35 (1 << 24) | 39 | #define PWER_WE35 (1 << 24) |
38 | 40 | ||
@@ -348,6 +350,7 @@ static inline void pxa27x_mfp_init(void) {} | |||
348 | #ifdef CONFIG_PM | 350 | #ifdef CONFIG_PM |
349 | static unsigned long saved_gafr[2][4]; | 351 | static unsigned long saved_gafr[2][4]; |
350 | static unsigned long saved_gpdr[4]; | 352 | static unsigned long saved_gpdr[4]; |
353 | static unsigned long saved_gplr[4]; | ||
351 | static unsigned long saved_pgsr[4]; | 354 | static unsigned long saved_pgsr[4]; |
352 | 355 | ||
353 | static int pxa2xx_mfp_suspend(void) | 356 | static int pxa2xx_mfp_suspend(void) |
@@ -366,14 +369,26 @@ static int pxa2xx_mfp_suspend(void) | |||
366 | } | 369 | } |
367 | 370 | ||
368 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { | 371 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { |
369 | |||
370 | saved_gafr[0][i] = GAFR_L(i); | 372 | saved_gafr[0][i] = GAFR_L(i); |
371 | saved_gafr[1][i] = GAFR_U(i); | 373 | saved_gafr[1][i] = GAFR_U(i); |
372 | saved_gpdr[i] = GPDR(i * 32); | 374 | saved_gpdr[i] = GPDR(i * 32); |
375 | saved_gplr[i] = GPLR(i * 32); | ||
373 | saved_pgsr[i] = PGSR(i); | 376 | saved_pgsr[i] = PGSR(i); |
374 | 377 | ||
375 | GPDR(i * 32) = gpdr_lpm[i]; | 378 | GPSR(i * 32) = PGSR(i); |
379 | GPCR(i * 32) = ~PGSR(i); | ||
380 | } | ||
381 | |||
382 | /* set GPDR bits taking into account MFP_LPM_KEEP_OUTPUT */ | ||
383 | for (i = 0; i < pxa_last_gpio; i++) { | ||
384 | if ((gpdr_lpm[gpio_to_bank(i)] & GPIO_bit(i)) || | ||
385 | ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) && | ||
386 | (saved_gpdr[gpio_to_bank(i)] & GPIO_bit(i)))) | ||
387 | GPDR(i) |= GPIO_bit(i); | ||
388 | else | ||
389 | GPDR(i) &= ~GPIO_bit(i); | ||
376 | } | 390 | } |
391 | |||
377 | return 0; | 392 | return 0; |
378 | } | 393 | } |
379 | 394 | ||
@@ -384,6 +399,8 @@ static void pxa2xx_mfp_resume(void) | |||
384 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { | 399 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { |
385 | GAFR_L(i) = saved_gafr[0][i]; | 400 | GAFR_L(i) = saved_gafr[0][i]; |
386 | GAFR_U(i) = saved_gafr[1][i]; | 401 | GAFR_U(i) = saved_gafr[1][i]; |
402 | GPSR(i * 32) = saved_gplr[i]; | ||
403 | GPCR(i * 32) = ~saved_gplr[i]; | ||
387 | GPDR(i * 32) = saved_gpdr[i]; | 404 | GPDR(i * 32) = saved_gpdr[i]; |
388 | PGSR(i) = saved_pgsr[i]; | 405 | PGSR(i) = saved_pgsr[i]; |
389 | } | 406 | } |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 6bce78edce7a..4726c246dcdc 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -421,8 +421,11 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
421 | pxa_register_device(&pxa27x_device_i2c_power, info); | 421 | pxa_register_device(&pxa27x_device_i2c_power, info); |
422 | } | 422 | } |
423 | 423 | ||
424 | static struct pxa_gpio_platform_data pxa27x_gpio_info __initdata = { | ||
425 | .gpio_set_wake = gpio_set_wake, | ||
426 | }; | ||
427 | |||
424 | static struct platform_device *devices[] __initdata = { | 428 | static struct platform_device *devices[] __initdata = { |
425 | &pxa_device_gpio, | ||
426 | &pxa27x_device_udc, | 429 | &pxa27x_device_udc, |
427 | &pxa_device_pmu, | 430 | &pxa_device_pmu, |
428 | &pxa_device_i2s, | 431 | &pxa_device_i2s, |
@@ -458,6 +461,7 @@ static int __init pxa27x_init(void) | |||
458 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 461 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
459 | register_syscore_ops(&pxa2xx_clock_syscore_ops); | 462 | register_syscore_ops(&pxa2xx_clock_syscore_ops); |
460 | 463 | ||
464 | pxa_register_device(&pxa_device_gpio, &pxa27x_gpio_info); | ||
461 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 465 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
462 | } | 466 | } |
463 | 467 | ||
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 0f3a327ebcaa..b34287ab5afd 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -111,10 +111,6 @@ config S3C24XX_SETUP_TS | |||
111 | help | 111 | help |
112 | Compile in platform device definition for Samsung TouchScreen. | 112 | Compile in platform device definition for Samsung TouchScreen. |
113 | 113 | ||
114 | # cpu-specific sections | ||
115 | |||
116 | if CPU_S3C2410 | ||
117 | |||
118 | config S3C2410_DMA | 114 | config S3C2410_DMA |
119 | bool | 115 | bool |
120 | depends on S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442) | 116 | depends on S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442) |
@@ -127,6 +123,10 @@ config S3C2410_PM | |||
127 | help | 123 | help |
128 | Power Management code common to S3C2410 and better | 124 | Power Management code common to S3C2410 and better |
129 | 125 | ||
126 | # cpu-specific sections | ||
127 | |||
128 | if CPU_S3C2410 | ||
129 | |||
130 | config S3C24XX_SIMTEC_NOR | 130 | config S3C24XX_SIMTEC_NOR |
131 | bool | 131 | bool |
132 | help | 132 | help |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index a8933de3d627..32395664e879 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/mmc/host.h> | ||
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | 30 | ||
30 | #include <asm/hardware/vic.h> | 31 | #include <asm/hardware/vic.h> |
@@ -765,6 +766,7 @@ static void __init goni_pmic_init(void) | |||
765 | /* MoviNAND */ | 766 | /* MoviNAND */ |
766 | static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { | 767 | static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { |
767 | .max_width = 4, | 768 | .max_width = 4, |
769 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
768 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 770 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
769 | }; | 771 | }; |
770 | 772 | ||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 7c524b4e415d..16be4c56abe3 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -306,7 +306,7 @@ void sa11x0_register_irda(struct irda_platform_data *irda) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | static struct resource sa1100_rtc_resources[] = { | 308 | static struct resource sa1100_rtc_resources[] = { |
309 | DEFINE_RES_MEM(0x90010000, 0x9001003f), | 309 | DEFINE_RES_MEM(0x90010000, 0x40), |
310 | DEFINE_RES_IRQ_NAMED(IRQ_RTC1Hz, "rtc 1Hz"), | 310 | DEFINE_RES_IRQ_NAMED(IRQ_RTC1Hz, "rtc 1Hz"), |
311 | DEFINE_RES_IRQ_NAMED(IRQ_RTCAlrm, "rtc alarm"), | 311 | DEFINE_RES_IRQ_NAMED(IRQ_RTCAlrm, "rtc alarm"), |
312 | }; | 312 | }; |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 1621ad07d284..33339745d432 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -1667,8 +1667,10 @@ void __init u300_init_irq(void) | |||
1667 | 1667 | ||
1668 | for (i = 0; i < U300_VIC_IRQS_END; i++) | 1668 | for (i = 0; i < U300_VIC_IRQS_END; i++) |
1669 | set_bit(i, (unsigned long *) &mask[0]); | 1669 | set_bit(i, (unsigned long *) &mask[0]); |
1670 | vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]); | 1670 | vic_init((void __iomem *) U300_INTCON0_VBASE, IRQ_U300_INTCON0_START, |
1671 | vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]); | 1671 | mask[0], mask[0]); |
1672 | vic_init((void __iomem *) U300_INTCON1_VBASE, IRQ_U300_INTCON1_START, | ||
1673 | mask[1], mask[1]); | ||
1672 | } | 1674 | } |
1673 | 1675 | ||
1674 | 1676 | ||
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c index a38f80238ea9..cb04bd6ab3e7 100644 --- a/arch/arm/mach-u300/i2c.c +++ b/arch/arm/mach-u300/i2c.c | |||
@@ -146,9 +146,6 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
146 | .min_uV = 1800000, | 146 | .min_uV = 1800000, |
147 | .max_uV = 1800000, | 147 | .max_uV = 1800000, |
148 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 148 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
149 | .valid_ops_mask = | ||
150 | REGULATOR_CHANGE_VOLTAGE | | ||
151 | REGULATOR_CHANGE_STATUS, | ||
152 | .always_on = 1, | 149 | .always_on = 1, |
153 | .boot_on = 1, | 150 | .boot_on = 1, |
154 | }, | 151 | }, |
@@ -160,9 +157,6 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
160 | .min_uV = 2500000, | 157 | .min_uV = 2500000, |
161 | .max_uV = 2500000, | 158 | .max_uV = 2500000, |
162 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 159 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
163 | .valid_ops_mask = | ||
164 | REGULATOR_CHANGE_VOLTAGE | | ||
165 | REGULATOR_CHANGE_STATUS, | ||
166 | .always_on = 1, | 160 | .always_on = 1, |
167 | .boot_on = 1, | 161 | .boot_on = 1, |
168 | }, | 162 | }, |
@@ -230,8 +224,7 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
230 | .max_uV = 1800000, | 224 | .max_uV = 1800000, |
231 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 225 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
232 | .valid_ops_mask = | 226 | .valid_ops_mask = |
233 | REGULATOR_CHANGE_VOLTAGE | | 227 | REGULATOR_CHANGE_VOLTAGE, |
234 | REGULATOR_CHANGE_STATUS, | ||
235 | .always_on = 1, | 228 | .always_on = 1, |
236 | .boot_on = 1, | 229 | .boot_on = 1, |
237 | }, | 230 | }, |
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index ee78a26707eb..ec09c1e07b1a 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
@@ -12,101 +12,101 @@ | |||
12 | #ifndef __MACH_IRQS_H | 12 | #ifndef __MACH_IRQS_H |
13 | #define __MACH_IRQS_H | 13 | #define __MACH_IRQS_H |
14 | 14 | ||
15 | #define IRQ_U300_INTCON0_START 0 | 15 | #define IRQ_U300_INTCON0_START 1 |
16 | #define IRQ_U300_INTCON1_START 32 | 16 | #define IRQ_U300_INTCON1_START 33 |
17 | /* These are on INTCON0 - 30 lines */ | 17 | /* These are on INTCON0 - 30 lines */ |
18 | #define IRQ_U300_IRQ0_EXT 0 | 18 | #define IRQ_U300_IRQ0_EXT 1 |
19 | #define IRQ_U300_IRQ1_EXT 1 | 19 | #define IRQ_U300_IRQ1_EXT 2 |
20 | #define IRQ_U300_DMA 2 | 20 | #define IRQ_U300_DMA 3 |
21 | #define IRQ_U300_VIDEO_ENC_0 3 | 21 | #define IRQ_U300_VIDEO_ENC_0 4 |
22 | #define IRQ_U300_VIDEO_ENC_1 4 | 22 | #define IRQ_U300_VIDEO_ENC_1 5 |
23 | #define IRQ_U300_AAIF_RX 5 | 23 | #define IRQ_U300_AAIF_RX 6 |
24 | #define IRQ_U300_AAIF_TX 6 | 24 | #define IRQ_U300_AAIF_TX 7 |
25 | #define IRQ_U300_AAIF_VGPIO 7 | 25 | #define IRQ_U300_AAIF_VGPIO 8 |
26 | #define IRQ_U300_AAIF_WAKEUP 8 | 26 | #define IRQ_U300_AAIF_WAKEUP 9 |
27 | #define IRQ_U300_PCM_I2S0_FRAME 9 | 27 | #define IRQ_U300_PCM_I2S0_FRAME 10 |
28 | #define IRQ_U300_PCM_I2S0_FIFO 10 | 28 | #define IRQ_U300_PCM_I2S0_FIFO 11 |
29 | #define IRQ_U300_PCM_I2S1_FRAME 11 | 29 | #define IRQ_U300_PCM_I2S1_FRAME 12 |
30 | #define IRQ_U300_PCM_I2S1_FIFO 12 | 30 | #define IRQ_U300_PCM_I2S1_FIFO 13 |
31 | #define IRQ_U300_XGAM_GAMCON 13 | 31 | #define IRQ_U300_XGAM_GAMCON 14 |
32 | #define IRQ_U300_XGAM_CDI 14 | 32 | #define IRQ_U300_XGAM_CDI 15 |
33 | #define IRQ_U300_XGAM_CDICON 15 | 33 | #define IRQ_U300_XGAM_CDICON 16 |
34 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | 34 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) |
35 | /* MMIACC not used on the DB3210 or DB3350 chips */ | 35 | /* MMIACC not used on the DB3210 or DB3350 chips */ |
36 | #define IRQ_U300_XGAM_MMIACC 16 | 36 | #define IRQ_U300_XGAM_MMIACC 17 |
37 | #endif | 37 | #endif |
38 | #define IRQ_U300_XGAM_PDI 17 | 38 | #define IRQ_U300_XGAM_PDI 18 |
39 | #define IRQ_U300_XGAM_PDICON 18 | 39 | #define IRQ_U300_XGAM_PDICON 19 |
40 | #define IRQ_U300_XGAM_GAMEACC 19 | 40 | #define IRQ_U300_XGAM_GAMEACC 20 |
41 | #define IRQ_U300_XGAM_MCIDCT 20 | 41 | #define IRQ_U300_XGAM_MCIDCT 21 |
42 | #define IRQ_U300_APEX 21 | 42 | #define IRQ_U300_APEX 22 |
43 | #define IRQ_U300_UART0 22 | 43 | #define IRQ_U300_UART0 23 |
44 | #define IRQ_U300_SPI 23 | 44 | #define IRQ_U300_SPI 24 |
45 | #define IRQ_U300_TIMER_APP_OS 24 | 45 | #define IRQ_U300_TIMER_APP_OS 25 |
46 | #define IRQ_U300_TIMER_APP_DD 25 | 46 | #define IRQ_U300_TIMER_APP_DD 26 |
47 | #define IRQ_U300_TIMER_APP_GP1 26 | 47 | #define IRQ_U300_TIMER_APP_GP1 27 |
48 | #define IRQ_U300_TIMER_APP_GP2 27 | 48 | #define IRQ_U300_TIMER_APP_GP2 28 |
49 | #define IRQ_U300_TIMER_OS 28 | 49 | #define IRQ_U300_TIMER_OS 29 |
50 | #define IRQ_U300_TIMER_MS 29 | 50 | #define IRQ_U300_TIMER_MS 30 |
51 | #define IRQ_U300_KEYPAD_KEYBF 30 | 51 | #define IRQ_U300_KEYPAD_KEYBF 31 |
52 | #define IRQ_U300_KEYPAD_KEYBR 31 | 52 | #define IRQ_U300_KEYPAD_KEYBR 32 |
53 | /* These are on INTCON1 - 32 lines */ | 53 | /* These are on INTCON1 - 32 lines */ |
54 | #define IRQ_U300_GPIO_PORT0 32 | 54 | #define IRQ_U300_GPIO_PORT0 33 |
55 | #define IRQ_U300_GPIO_PORT1 33 | 55 | #define IRQ_U300_GPIO_PORT1 34 |
56 | #define IRQ_U300_GPIO_PORT2 34 | 56 | #define IRQ_U300_GPIO_PORT2 35 |
57 | 57 | ||
58 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) || \ | 58 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) || \ |
59 | defined(CONFIG_MACH_U300_BS335) | 59 | defined(CONFIG_MACH_U300_BS335) |
60 | /* These are for DB3150, DB3200 and DB3350 */ | 60 | /* These are for DB3150, DB3200 and DB3350 */ |
61 | #define IRQ_U300_WDOG 35 | 61 | #define IRQ_U300_WDOG 36 |
62 | #define IRQ_U300_EVHIST 36 | 62 | #define IRQ_U300_EVHIST 37 |
63 | #define IRQ_U300_MSPRO 37 | 63 | #define IRQ_U300_MSPRO 38 |
64 | #define IRQ_U300_MMCSD_MCIINTR0 38 | 64 | #define IRQ_U300_MMCSD_MCIINTR0 39 |
65 | #define IRQ_U300_MMCSD_MCIINTR1 39 | 65 | #define IRQ_U300_MMCSD_MCIINTR1 40 |
66 | #define IRQ_U300_I2C0 40 | 66 | #define IRQ_U300_I2C0 41 |
67 | #define IRQ_U300_I2C1 41 | 67 | #define IRQ_U300_I2C1 42 |
68 | #define IRQ_U300_RTC 42 | 68 | #define IRQ_U300_RTC 43 |
69 | #define IRQ_U300_NFIF 43 | 69 | #define IRQ_U300_NFIF 44 |
70 | #define IRQ_U300_NFIF2 44 | 70 | #define IRQ_U300_NFIF2 45 |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | /* DB3150 and DB3200 have only 45 IRQs */ | 73 | /* DB3150 and DB3200 have only 45 IRQs */ |
74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | 74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) |
75 | #define U300_VIC_IRQS_END 45 | 75 | #define U300_VIC_IRQS_END 46 |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /* The DB3350-specific interrupt lines */ | 78 | /* The DB3350-specific interrupt lines */ |
79 | #ifdef CONFIG_MACH_U300_BS335 | 79 | #ifdef CONFIG_MACH_U300_BS335 |
80 | #define IRQ_U300_ISP_F0 45 | 80 | #define IRQ_U300_ISP_F0 46 |
81 | #define IRQ_U300_ISP_F1 46 | 81 | #define IRQ_U300_ISP_F1 47 |
82 | #define IRQ_U300_ISP_F2 47 | 82 | #define IRQ_U300_ISP_F2 48 |
83 | #define IRQ_U300_ISP_F3 48 | 83 | #define IRQ_U300_ISP_F3 49 |
84 | #define IRQ_U300_ISP_F4 49 | 84 | #define IRQ_U300_ISP_F4 50 |
85 | #define IRQ_U300_GPIO_PORT3 50 | 85 | #define IRQ_U300_GPIO_PORT3 51 |
86 | #define IRQ_U300_SYSCON_PLL_LOCK 51 | 86 | #define IRQ_U300_SYSCON_PLL_LOCK 52 |
87 | #define IRQ_U300_UART1 52 | 87 | #define IRQ_U300_UART1 53 |
88 | #define IRQ_U300_GPIO_PORT4 53 | 88 | #define IRQ_U300_GPIO_PORT4 54 |
89 | #define IRQ_U300_GPIO_PORT5 54 | 89 | #define IRQ_U300_GPIO_PORT5 55 |
90 | #define IRQ_U300_GPIO_PORT6 55 | 90 | #define IRQ_U300_GPIO_PORT6 56 |
91 | #define U300_VIC_IRQS_END 56 | 91 | #define U300_VIC_IRQS_END 57 |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | /* The DB3210-specific interrupt lines */ | 94 | /* The DB3210-specific interrupt lines */ |
95 | #ifdef CONFIG_MACH_U300_BS365 | 95 | #ifdef CONFIG_MACH_U300_BS365 |
96 | #define IRQ_U300_GPIO_PORT3 35 | 96 | #define IRQ_U300_GPIO_PORT3 36 |
97 | #define IRQ_U300_GPIO_PORT4 36 | 97 | #define IRQ_U300_GPIO_PORT4 37 |
98 | #define IRQ_U300_WDOG 37 | 98 | #define IRQ_U300_WDOG 38 |
99 | #define IRQ_U300_EVHIST 38 | 99 | #define IRQ_U300_EVHIST 39 |
100 | #define IRQ_U300_MSPRO 39 | 100 | #define IRQ_U300_MSPRO 40 |
101 | #define IRQ_U300_MMCSD_MCIINTR0 40 | 101 | #define IRQ_U300_MMCSD_MCIINTR0 41 |
102 | #define IRQ_U300_MMCSD_MCIINTR1 41 | 102 | #define IRQ_U300_MMCSD_MCIINTR1 42 |
103 | #define IRQ_U300_I2C0 42 | 103 | #define IRQ_U300_I2C0 43 |
104 | #define IRQ_U300_I2C1 43 | 104 | #define IRQ_U300_I2C1 44 |
105 | #define IRQ_U300_RTC 44 | 105 | #define IRQ_U300_RTC 45 |
106 | #define IRQ_U300_NFIF 45 | 106 | #define IRQ_U300_NFIF 46 |
107 | #define IRQ_U300_NFIF2 46 | 107 | #define IRQ_U300_NFIF2 47 |
108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 | 108 | #define IRQ_U300_SYSCON_PLL_LOCK 48 |
109 | #define U300_VIC_IRQS_END 48 | 109 | #define U300_VIC_IRQS_END 49 |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | /* Maximum 8*7 GPIO lines */ | 112 | /* Maximum 8*7 GPIO lines */ |
@@ -117,6 +117,6 @@ | |||
117 | #define IRQ_U300_GPIO_END (U300_VIC_IRQS_END) | 117 | #define IRQ_U300_GPIO_END (U300_VIC_IRQS_END) |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | #define NR_IRQS (IRQ_U300_GPIO_END) | 120 | #define NR_IRQS (IRQ_U300_GPIO_END - IRQ_U300_INTCON0_START) |
121 | 121 | ||
122 | #endif | 122 | #endif |
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c index 2b2d51caf9d8..0127490218cd 100644 --- a/arch/arm/mach-ux500/mbox-db5500.c +++ b/arch/arm/mach-ux500/mbox-db5500.c | |||
@@ -168,7 +168,7 @@ static ssize_t mbox_read_fifo(struct device *dev, | |||
168 | return sprintf(buf, "0x%X\n", mbox_value); | 168 | return sprintf(buf, "0x%X\n", mbox_value); |
169 | } | 169 | } |
170 | 170 | ||
171 | static DEVICE_ATTR(fifo, S_IWUGO | S_IRUGO, mbox_read_fifo, mbox_write_fifo); | 171 | static DEVICE_ATTR(fifo, S_IWUSR | S_IRUGO, mbox_read_fifo, mbox_write_fifo); |
172 | 172 | ||
173 | static int mbox_show(struct seq_file *s, void *data) | 173 | static int mbox_show(struct seq_file *s, void *data) |
174 | { | 174 | { |
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S index ff1f7cc11f87..80741992a9fc 100644 --- a/arch/arm/mm/abort-ev6.S +++ b/arch/arm/mm/abort-ev6.S | |||
@@ -26,18 +26,23 @@ ENTRY(v6_early_abort) | |||
26 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 26 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
27 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 27 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
28 | /* | 28 | /* |
29 | * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR (erratum 326103). | 29 | * Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR. |
30 | * The test below covers all the write situations, including Java bytecodes | ||
31 | */ | 30 | */ |
32 | bic r1, r1, #1 << 11 @ clear bit 11 of FSR | 31 | #ifdef CONFIG_ARM_ERRATA_326103 |
32 | ldr ip, =0x4107b36 | ||
33 | mrc p15, 0, r3, c0, c0, 0 @ get processor id | ||
34 | teq ip, r3, lsr #4 @ r0 ARM1136? | ||
35 | bne do_DataAbort | ||
33 | tst r5, #PSR_J_BIT @ Java? | 36 | tst r5, #PSR_J_BIT @ Java? |
37 | tsteq r5, #PSR_T_BIT @ Thumb? | ||
34 | bne do_DataAbort | 38 | bne do_DataAbort |
35 | do_thumb_abort fsr=r1, pc=r4, psr=r5, tmp=r3 | 39 | bic r1, r1, #1 << 11 @ clear bit 11 of FSR |
36 | ldreq r3, [r4] @ read aborted ARM instruction | 40 | ldr r3, [r4] @ read aborted ARM instruction |
37 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 41 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
38 | reveq r3, r3 | 42 | rev r3, r3 |
39 | #endif | 43 | #endif |
40 | do_ldrd_abort tmp=ip, insn=r3 | 44 | do_ldrd_abort tmp=ip, insn=r3 |
41 | tst r3, #1 << 20 @ L = 0 -> write | 45 | tst r3, #1 << 20 @ L = 0 -> write |
42 | orreq r1, r1, #1 << 11 @ yes. | 46 | orreq r1, r1, #1 << 11 @ yes. |
47 | #endif | ||
43 | b do_DataAbort | 48 | b do_DataAbort |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index a53fd2aaa2f4..2a8e380501e8 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -32,6 +32,7 @@ static void __iomem *l2x0_base; | |||
32 | static DEFINE_RAW_SPINLOCK(l2x0_lock); | 32 | static DEFINE_RAW_SPINLOCK(l2x0_lock); |
33 | static u32 l2x0_way_mask; /* Bitmask of active ways */ | 33 | static u32 l2x0_way_mask; /* Bitmask of active ways */ |
34 | static u32 l2x0_size; | 34 | static u32 l2x0_size; |
35 | static unsigned long sync_reg_offset = L2X0_CACHE_SYNC; | ||
35 | 36 | ||
36 | struct l2x0_regs l2x0_saved_regs; | 37 | struct l2x0_regs l2x0_saved_regs; |
37 | 38 | ||
@@ -61,12 +62,7 @@ static inline void cache_sync(void) | |||
61 | { | 62 | { |
62 | void __iomem *base = l2x0_base; | 63 | void __iomem *base = l2x0_base; |
63 | 64 | ||
64 | #ifdef CONFIG_PL310_ERRATA_753970 | 65 | writel_relaxed(0, base + sync_reg_offset); |
65 | /* write to an unmmapped register */ | ||
66 | writel_relaxed(0, base + L2X0_DUMMY_REG); | ||
67 | #else | ||
68 | writel_relaxed(0, base + L2X0_CACHE_SYNC); | ||
69 | #endif | ||
70 | cache_wait(base + L2X0_CACHE_SYNC, 1); | 66 | cache_wait(base + L2X0_CACHE_SYNC, 1); |
71 | } | 67 | } |
72 | 68 | ||
@@ -85,10 +81,13 @@ static inline void l2x0_inv_line(unsigned long addr) | |||
85 | } | 81 | } |
86 | 82 | ||
87 | #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) | 83 | #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915) |
84 | static inline void debug_writel(unsigned long val) | ||
85 | { | ||
86 | if (outer_cache.set_debug) | ||
87 | outer_cache.set_debug(val); | ||
88 | } | ||
88 | 89 | ||
89 | #define debug_writel(val) outer_cache.set_debug(val) | 90 | static void pl310_set_debug(unsigned long val) |
90 | |||
91 | static void l2x0_set_debug(unsigned long val) | ||
92 | { | 91 | { |
93 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); | 92 | writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL); |
94 | } | 93 | } |
@@ -98,7 +97,7 @@ static inline void debug_writel(unsigned long val) | |||
98 | { | 97 | { |
99 | } | 98 | } |
100 | 99 | ||
101 | #define l2x0_set_debug NULL | 100 | #define pl310_set_debug NULL |
102 | #endif | 101 | #endif |
103 | 102 | ||
104 | #ifdef CONFIG_PL310_ERRATA_588369 | 103 | #ifdef CONFIG_PL310_ERRATA_588369 |
@@ -331,6 +330,11 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
331 | else | 330 | else |
332 | ways = 8; | 331 | ways = 8; |
333 | type = "L310"; | 332 | type = "L310"; |
333 | #ifdef CONFIG_PL310_ERRATA_753970 | ||
334 | /* Unmapped register. */ | ||
335 | sync_reg_offset = L2X0_DUMMY_REG; | ||
336 | #endif | ||
337 | outer_cache.set_debug = pl310_set_debug; | ||
334 | break; | 338 | break; |
335 | case L2X0_CACHE_ID_PART_L210: | 339 | case L2X0_CACHE_ID_PART_L210: |
336 | ways = (aux >> 13) & 0xf; | 340 | ways = (aux >> 13) & 0xf; |
@@ -379,7 +383,6 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask) | |||
379 | outer_cache.flush_all = l2x0_flush_all; | 383 | outer_cache.flush_all = l2x0_flush_all; |
380 | outer_cache.inv_all = l2x0_inv_all; | 384 | outer_cache.inv_all = l2x0_inv_all; |
381 | outer_cache.disable = l2x0_disable; | 385 | outer_cache.disable = l2x0_disable; |
382 | outer_cache.set_debug = l2x0_set_debug; | ||
383 | 386 | ||
384 | printk(KERN_INFO "%s cache controller enabled\n", type); | 387 | printk(KERN_INFO "%s cache controller enabled\n", type); |
385 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", | 388 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n", |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 595079fa9d1d..8f5813bbffb5 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -293,11 +293,11 @@ EXPORT_SYMBOL(pfn_valid); | |||
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | #ifndef CONFIG_SPARSEMEM | 295 | #ifndef CONFIG_SPARSEMEM |
296 | static void arm_memory_present(void) | 296 | static void __init arm_memory_present(void) |
297 | { | 297 | { |
298 | } | 298 | } |
299 | #else | 299 | #else |
300 | static void arm_memory_present(void) | 300 | static void __init arm_memory_present(void) |
301 | { | 301 | { |
302 | struct memblock_region *reg; | 302 | struct memblock_region *reg; |
303 | 303 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b86f8933ff91..2c7cf2f9c837 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -618,8 +618,8 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr, | |||
618 | } | 618 | } |
619 | } | 619 | } |
620 | 620 | ||
621 | static void alloc_init_pud(pgd_t *pgd, unsigned long addr, unsigned long end, | 621 | static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr, |
622 | unsigned long phys, const struct mem_type *type) | 622 | unsigned long end, unsigned long phys, const struct mem_type *type) |
623 | { | 623 | { |
624 | pud_t *pud = pud_offset(pgd, addr); | 624 | pud_t *pud = pud_offset(pgd, addr); |
625 | unsigned long next; | 625 | unsigned long next; |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index ecdb3da0dea9..c58d896cd5c3 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -916,6 +916,13 @@ void omap_start_dma(int lch) | |||
916 | l |= OMAP_DMA_CCR_BUFFERING_DISABLE; | 916 | l |= OMAP_DMA_CCR_BUFFERING_DISABLE; |
917 | l |= OMAP_DMA_CCR_EN; | 917 | l |= OMAP_DMA_CCR_EN; |
918 | 918 | ||
919 | /* | ||
920 | * As dma_write() uses IO accessors which are weakly ordered, there | ||
921 | * is no guarantee that data in coherent DMA memory will be visible | ||
922 | * to the DMA device. Add a memory barrier here to ensure that any | ||
923 | * such data is visible prior to enabling DMA. | ||
924 | */ | ||
925 | mb(); | ||
919 | p->dma_write(l, CCR, lch); | 926 | p->dma_write(l, CCR, lch); |
920 | 927 | ||
921 | dma_chan[lch].flags |= OMAP_DMA_ACTIVE; | 928 | dma_chan[lch].flags |= OMAP_DMA_ACTIVE; |
@@ -965,6 +972,13 @@ void omap_stop_dma(int lch) | |||
965 | p->dma_write(l, CCR, lch); | 972 | p->dma_write(l, CCR, lch); |
966 | } | 973 | } |
967 | 974 | ||
975 | /* | ||
976 | * Ensure that data transferred by DMA is visible to any access | ||
977 | * after DMA has been disabled. This is important for coherent | ||
978 | * DMA regions. | ||
979 | */ | ||
980 | mb(); | ||
981 | |||
968 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 982 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
969 | int next_lch, cur_lch = lch; | 983 | int next_lch, cur_lch = lch; |
970 | char dma_chan_link_map[dma_lch_count]; | 984 | char dma_chan_link_map[dma_lch_count]; |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 317e246ffc56..e834c5ef437c 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #ifndef __PLAT_S3C_SDHCI_H | 18 | #ifndef __PLAT_S3C_SDHCI_H |
19 | #define __PLAT_S3C_SDHCI_H __FILE__ | 19 | #define __PLAT_S3C_SDHCI_H __FILE__ |
20 | 20 | ||
21 | #include <plat/devs.h> | ||
22 | |||
21 | struct platform_device; | 23 | struct platform_device; |
22 | struct mmc_host; | 24 | struct mmc_host; |
23 | struct mmc_card; | 25 | struct mmc_card; |
@@ -356,4 +358,30 @@ static inline void exynos4_default_sdhci3(void) { } | |||
356 | 358 | ||
357 | #endif /* CONFIG_EXYNOS4_SETUP_SDHCI */ | 359 | #endif /* CONFIG_EXYNOS4_SETUP_SDHCI */ |
358 | 360 | ||
361 | static inline void s3c_sdhci_setname(int id, char *name) | ||
362 | { | ||
363 | switch (id) { | ||
364 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
365 | case 0: | ||
366 | s3c_device_hsmmc0.name = name; | ||
367 | break; | ||
368 | #endif | ||
369 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
370 | case 1: | ||
371 | s3c_device_hsmmc1.name = name; | ||
372 | break; | ||
373 | #endif | ||
374 | #ifdef CONFIG_S3C_DEV_HSMMC2 | ||
375 | case 2: | ||
376 | s3c_device_hsmmc2.name = name; | ||
377 | break; | ||
378 | #endif | ||
379 | #ifdef CONFIG_S3C_DEV_HSMMC3 | ||
380 | case 3: | ||
381 | s3c_device_hsmmc3.name = name; | ||
382 | break; | ||
383 | #endif | ||
384 | } | ||
385 | } | ||
386 | |||
359 | #endif /* __PLAT_S3C_SDHCI_H */ | 387 | #endif /* __PLAT_S3C_SDHCI_H */ |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 858748eaa144..bc683b8219b5 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/uaccess.h> | ||
21 | #include <linux/user.h> | ||
20 | 22 | ||
21 | #include <asm/cp15.h> | 23 | #include <asm/cp15.h> |
22 | #include <asm/cputype.h> | 24 | #include <asm/cputype.h> |
@@ -529,6 +531,103 @@ void vfp_flush_hwstate(struct thread_info *thread) | |||
529 | } | 531 | } |
530 | 532 | ||
531 | /* | 533 | /* |
534 | * Save the current VFP state into the provided structures and prepare | ||
535 | * for entry into a new function (signal handler). | ||
536 | */ | ||
537 | int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp, | ||
538 | struct user_vfp_exc __user *ufp_exc) | ||
539 | { | ||
540 | struct thread_info *thread = current_thread_info(); | ||
541 | struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; | ||
542 | int err = 0; | ||
543 | |||
544 | /* Ensure that the saved hwstate is up-to-date. */ | ||
545 | vfp_sync_hwstate(thread); | ||
546 | |||
547 | /* | ||
548 | * Copy the floating point registers. There can be unused | ||
549 | * registers see asm/hwcap.h for details. | ||
550 | */ | ||
551 | err |= __copy_to_user(&ufp->fpregs, &hwstate->fpregs, | ||
552 | sizeof(hwstate->fpregs)); | ||
553 | /* | ||
554 | * Copy the status and control register. | ||
555 | */ | ||
556 | __put_user_error(hwstate->fpscr, &ufp->fpscr, err); | ||
557 | |||
558 | /* | ||
559 | * Copy the exception registers. | ||
560 | */ | ||
561 | __put_user_error(hwstate->fpexc, &ufp_exc->fpexc, err); | ||
562 | __put_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); | ||
563 | __put_user_error(hwstate->fpinst2, &ufp_exc->fpinst2, err); | ||
564 | |||
565 | if (err) | ||
566 | return -EFAULT; | ||
567 | |||
568 | /* Ensure that VFP is disabled. */ | ||
569 | vfp_flush_hwstate(thread); | ||
570 | |||
571 | /* | ||
572 | * As per the PCS, clear the length and stride bits for function | ||
573 | * entry. | ||
574 | */ | ||
575 | hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); | ||
576 | |||
577 | /* | ||
578 | * Disable VFP in the hwstate so that we can detect if it gets | ||
579 | * used. | ||
580 | */ | ||
581 | hwstate->fpexc &= ~FPEXC_EN; | ||
582 | return 0; | ||
583 | } | ||
584 | |||
585 | /* Sanitise and restore the current VFP state from the provided structures. */ | ||
586 | int vfp_restore_user_hwstate(struct user_vfp __user *ufp, | ||
587 | struct user_vfp_exc __user *ufp_exc) | ||
588 | { | ||
589 | struct thread_info *thread = current_thread_info(); | ||
590 | struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; | ||
591 | unsigned long fpexc; | ||
592 | int err = 0; | ||
593 | |||
594 | /* | ||
595 | * If VFP has been used, then disable it to avoid corrupting | ||
596 | * the new thread state. | ||
597 | */ | ||
598 | if (hwstate->fpexc & FPEXC_EN) | ||
599 | vfp_flush_hwstate(thread); | ||
600 | |||
601 | /* | ||
602 | * Copy the floating point registers. There can be unused | ||
603 | * registers see asm/hwcap.h for details. | ||
604 | */ | ||
605 | err |= __copy_from_user(&hwstate->fpregs, &ufp->fpregs, | ||
606 | sizeof(hwstate->fpregs)); | ||
607 | /* | ||
608 | * Copy the status and control register. | ||
609 | */ | ||
610 | __get_user_error(hwstate->fpscr, &ufp->fpscr, err); | ||
611 | |||
612 | /* | ||
613 | * Sanitise and restore the exception registers. | ||
614 | */ | ||
615 | __get_user_error(fpexc, &ufp_exc->fpexc, err); | ||
616 | |||
617 | /* Ensure the VFP is enabled. */ | ||
618 | fpexc |= FPEXC_EN; | ||
619 | |||
620 | /* Ensure FPINST2 is invalid and the exception flag is cleared. */ | ||
621 | fpexc &= ~(FPEXC_EX | FPEXC_FP2V); | ||
622 | hwstate->fpexc = fpexc; | ||
623 | |||
624 | __get_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); | ||
625 | __get_user_error(hwstate->fpinst2, &ufp_exc->fpinst2, err); | ||
626 | |||
627 | return err ? -EFAULT : 0; | ||
628 | } | ||
629 | |||
630 | /* | ||
532 | * VFP hardware can lose all context when a CPU goes offline. | 631 | * VFP hardware can lose all context when a CPU goes offline. |
533 | * As we will be running in SMP mode with CPU hotplug, we will save the | 632 | * As we will be running in SMP mode with CPU hotplug, we will save the |
534 | * hardware state at every thread switch. We clear our held state when | 633 | * hardware state at every thread switch. We clear our held state when |
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 1633a6f306c0..85038f54354d 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -38,7 +38,7 @@ static struct platform_device rtc_device = { | |||
38 | .name = "rtc-bfin", | 38 | .name = "rtc-bfin", |
39 | .id = -1, | 39 | .id = -1, |
40 | }; | 40 | }; |
41 | #endif | 41 | #endif /* CONFIG_RTC_DRV_BFIN */ |
42 | 42 | ||
43 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 43 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
44 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 44 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
@@ -100,7 +100,7 @@ static struct platform_device bfin_uart0_device = { | |||
100 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | 100 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ |
101 | }, | 101 | }, |
102 | }; | 102 | }; |
103 | #endif | 103 | #endif /* CONFIG_SERIAL_BFIN_UART0 */ |
104 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 104 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
105 | static struct resource bfin_uart1_resources[] = { | 105 | static struct resource bfin_uart1_resources[] = { |
106 | { | 106 | { |
@@ -148,7 +148,7 @@ static struct platform_device bfin_uart1_device = { | |||
148 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | 148 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ |
149 | }, | 149 | }, |
150 | }; | 150 | }; |
151 | #endif | 151 | #endif /* CONFIG_SERIAL_BFIN_UART1 */ |
152 | #ifdef CONFIG_SERIAL_BFIN_UART2 | 152 | #ifdef CONFIG_SERIAL_BFIN_UART2 |
153 | static struct resource bfin_uart2_resources[] = { | 153 | static struct resource bfin_uart2_resources[] = { |
154 | { | 154 | { |
@@ -196,8 +196,8 @@ static struct platform_device bfin_uart2_device = { | |||
196 | .platform_data = &bfin_uart2_peripherals, /* Passed to driver */ | 196 | .platform_data = &bfin_uart2_peripherals, /* Passed to driver */ |
197 | }, | 197 | }, |
198 | }; | 198 | }; |
199 | #endif | 199 | #endif /* CONFIG_SERIAL_BFIN_UART2 */ |
200 | #endif | 200 | #endif /* CONFIG_SERIAL_BFIN */ |
201 | 201 | ||
202 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 202 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
203 | #ifdef CONFIG_BFIN_SIR0 | 203 | #ifdef CONFIG_BFIN_SIR0 |
@@ -224,7 +224,7 @@ static struct platform_device bfin_sir0_device = { | |||
224 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), | 224 | .num_resources = ARRAY_SIZE(bfin_sir0_resources), |
225 | .resource = bfin_sir0_resources, | 225 | .resource = bfin_sir0_resources, |
226 | }; | 226 | }; |
227 | #endif | 227 | #endif /* CONFIG_BFIN_SIR0 */ |
228 | #ifdef CONFIG_BFIN_SIR1 | 228 | #ifdef CONFIG_BFIN_SIR1 |
229 | static struct resource bfin_sir1_resources[] = { | 229 | static struct resource bfin_sir1_resources[] = { |
230 | { | 230 | { |
@@ -249,7 +249,7 @@ static struct platform_device bfin_sir1_device = { | |||
249 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), | 249 | .num_resources = ARRAY_SIZE(bfin_sir1_resources), |
250 | .resource = bfin_sir1_resources, | 250 | .resource = bfin_sir1_resources, |
251 | }; | 251 | }; |
252 | #endif | 252 | #endif /* CONFIG_BFIN_SIR1 */ |
253 | #ifdef CONFIG_BFIN_SIR2 | 253 | #ifdef CONFIG_BFIN_SIR2 |
254 | static struct resource bfin_sir2_resources[] = { | 254 | static struct resource bfin_sir2_resources[] = { |
255 | { | 255 | { |
@@ -274,8 +274,8 @@ static struct platform_device bfin_sir2_device = { | |||
274 | .num_resources = ARRAY_SIZE(bfin_sir2_resources), | 274 | .num_resources = ARRAY_SIZE(bfin_sir2_resources), |
275 | .resource = bfin_sir2_resources, | 275 | .resource = bfin_sir2_resources, |
276 | }; | 276 | }; |
277 | #endif | 277 | #endif /* CONFIG_BFIN_SIR2 */ |
278 | #endif | 278 | #endif /* CONFIG_BFIN_SIR */ |
279 | 279 | ||
280 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 280 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
281 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | 281 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
@@ -311,7 +311,7 @@ static struct platform_device bfin_sport0_uart_device = { | |||
311 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | 311 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ |
312 | }, | 312 | }, |
313 | }; | 313 | }; |
314 | #endif | 314 | #endif /* CONFIG_SERIAL_BFIN_SPORT0_UART */ |
315 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | 315 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART |
316 | static struct resource bfin_sport1_uart_resources[] = { | 316 | static struct resource bfin_sport1_uart_resources[] = { |
317 | { | 317 | { |
@@ -345,7 +345,7 @@ static struct platform_device bfin_sport1_uart_device = { | |||
345 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | 345 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ |
346 | }, | 346 | }, |
347 | }; | 347 | }; |
348 | #endif | 348 | #endif /* CONFIG_SERIAL_BFIN_SPORT1_UART */ |
349 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | 349 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART |
350 | static struct resource bfin_sport2_uart_resources[] = { | 350 | static struct resource bfin_sport2_uart_resources[] = { |
351 | { | 351 | { |
@@ -379,7 +379,7 @@ static struct platform_device bfin_sport2_uart_device = { | |||
379 | .platform_data = &bfin_sport2_peripherals, /* Passed to driver */ | 379 | .platform_data = &bfin_sport2_peripherals, /* Passed to driver */ |
380 | }, | 380 | }, |
381 | }; | 381 | }; |
382 | #endif | 382 | #endif /* CONFIG_SERIAL_BFIN_SPORT2_UART */ |
383 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | 383 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART |
384 | static struct resource bfin_sport3_uart_resources[] = { | 384 | static struct resource bfin_sport3_uart_resources[] = { |
385 | { | 385 | { |
@@ -413,8 +413,8 @@ static struct platform_device bfin_sport3_uart_device = { | |||
413 | .platform_data = &bfin_sport3_peripherals, /* Passed to driver */ | 413 | .platform_data = &bfin_sport3_peripherals, /* Passed to driver */ |
414 | }, | 414 | }, |
415 | }; | 415 | }; |
416 | #endif | 416 | #endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */ |
417 | #endif | 417 | #endif /* CONFIG_SERIAL_BFIN_SPORT */ |
418 | 418 | ||
419 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | 419 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
420 | static unsigned short bfin_can_peripherals[] = { | 420 | static unsigned short bfin_can_peripherals[] = { |
@@ -452,7 +452,7 @@ static struct platform_device bfin_can_device = { | |||
452 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ | 452 | .platform_data = &bfin_can_peripherals, /* Passed to driver */ |
453 | }, | 453 | }, |
454 | }; | 454 | }; |
455 | #endif | 455 | #endif /* CONFIG_CAN_BFIN */ |
456 | 456 | ||
457 | /* | 457 | /* |
458 | * USB-LAN EzExtender board | 458 | * USB-LAN EzExtender board |
@@ -488,7 +488,7 @@ static struct platform_device smc91x_device = { | |||
488 | .platform_data = &smc91x_info, | 488 | .platform_data = &smc91x_info, |
489 | }, | 489 | }, |
490 | }; | 490 | }; |
491 | #endif | 491 | #endif /* CONFIG_SMC91X */ |
492 | 492 | ||
493 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) | 493 | #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) |
494 | /* all SPI peripherals info goes here */ | 494 | /* all SPI peripherals info goes here */ |
@@ -518,7 +518,8 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
518 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 518 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
519 | .enable_dma = 0, /* use dma transfer with this chip*/ | 519 | .enable_dma = 0, /* use dma transfer with this chip*/ |
520 | }; | 520 | }; |
521 | #endif | 521 | #endif /* CONFIG_MTD_M25P80 */ |
522 | #endif /* CONFIG_SPI_BFIN5XX */ | ||
522 | 523 | ||
523 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) | 524 | #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) |
524 | #include <linux/spi/ad7879.h> | 525 | #include <linux/spi/ad7879.h> |
@@ -535,7 +536,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
535 | .gpio_export = 1, /* Export GPIO to gpiolib */ | 536 | .gpio_export = 1, /* Export GPIO to gpiolib */ |
536 | .gpio_base = -1, /* Dynamic allocation */ | 537 | .gpio_base = -1, /* Dynamic allocation */ |
537 | }; | 538 | }; |
538 | #endif | 539 | #endif /* CONFIG_TOUCHSCREEN_AD7879 */ |
539 | 540 | ||
540 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 541 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
541 | #include <asm/bfin-lq035q1.h> | 542 | #include <asm/bfin-lq035q1.h> |
@@ -564,7 +565,7 @@ static struct platform_device bfin_lq035q1_device = { | |||
564 | .platform_data = &bfin_lq035q1_data, | 565 | .platform_data = &bfin_lq035q1_data, |
565 | }, | 566 | }, |
566 | }; | 567 | }; |
567 | #endif | 568 | #endif /* CONFIG_FB_BFIN_LQ035Q1 */ |
568 | 569 | ||
569 | static struct spi_board_info bf538_spi_board_info[] __initdata = { | 570 | static struct spi_board_info bf538_spi_board_info[] __initdata = { |
570 | #if defined(CONFIG_MTD_M25P80) \ | 571 | #if defined(CONFIG_MTD_M25P80) \ |
@@ -579,7 +580,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
579 | .controller_data = &spi_flash_chip_info, | 580 | .controller_data = &spi_flash_chip_info, |
580 | .mode = SPI_MODE_3, | 581 | .mode = SPI_MODE_3, |
581 | }, | 582 | }, |
582 | #endif | 583 | #endif /* CONFIG_MTD_M25P80 */ |
583 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | 584 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
584 | { | 585 | { |
585 | .modalias = "ad7879", | 586 | .modalias = "ad7879", |
@@ -590,7 +591,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
590 | .chip_select = 1, | 591 | .chip_select = 1, |
591 | .mode = SPI_CPHA | SPI_CPOL, | 592 | .mode = SPI_CPHA | SPI_CPOL, |
592 | }, | 593 | }, |
593 | #endif | 594 | #endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */ |
594 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 595 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
595 | { | 596 | { |
596 | .modalias = "bfin-lq035q1-spi", | 597 | .modalias = "bfin-lq035q1-spi", |
@@ -599,7 +600,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
599 | .chip_select = 2, | 600 | .chip_select = 2, |
600 | .mode = SPI_CPHA | SPI_CPOL, | 601 | .mode = SPI_CPHA | SPI_CPOL, |
601 | }, | 602 | }, |
602 | #endif | 603 | #endif /* CONFIG_FB_BFIN_LQ035Q1 */ |
603 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 604 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
604 | { | 605 | { |
605 | .modalias = "spidev", | 606 | .modalias = "spidev", |
@@ -607,7 +608,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
607 | .bus_num = 0, | 608 | .bus_num = 0, |
608 | .chip_select = 1, | 609 | .chip_select = 1, |
609 | }, | 610 | }, |
610 | #endif | 611 | #endif /* CONFIG_SPI_SPIDEV */ |
611 | }; | 612 | }; |
612 | 613 | ||
613 | /* SPI (0) */ | 614 | /* SPI (0) */ |
@@ -716,8 +717,6 @@ static struct platform_device bf538_spi_master2 = { | |||
716 | }, | 717 | }, |
717 | }; | 718 | }; |
718 | 719 | ||
719 | #endif /* spi master and devices */ | ||
720 | |||
721 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 720 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
722 | static struct resource bfin_twi0_resource[] = { | 721 | static struct resource bfin_twi0_resource[] = { |
723 | [0] = { | 722 | [0] = { |
@@ -759,8 +758,8 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
759 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), | 758 | .num_resources = ARRAY_SIZE(bfin_twi1_resource), |
760 | .resource = bfin_twi1_resource, | 759 | .resource = bfin_twi1_resource, |
761 | }; | 760 | }; |
762 | #endif | 761 | #endif /* CONFIG_BF542 */ |
763 | #endif | 762 | #endif /* CONFIG_I2C_BLACKFIN_TWI */ |
764 | 763 | ||
765 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 764 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
766 | #include <linux/gpio_keys.h> | 765 | #include <linux/gpio_keys.h> |
diff --git a/arch/mips/ath79/dev-wmac.c b/arch/mips/ath79/dev-wmac.c index e21507052066..9c717bf98ffe 100644 --- a/arch/mips/ath79/dev-wmac.c +++ b/arch/mips/ath79/dev-wmac.c | |||
@@ -58,8 +58,8 @@ static void __init ar913x_wmac_setup(void) | |||
58 | 58 | ||
59 | static int ar933x_wmac_reset(void) | 59 | static int ar933x_wmac_reset(void) |
60 | { | 60 | { |
61 | ath79_device_reset_clear(AR933X_RESET_WMAC); | ||
62 | ath79_device_reset_set(AR933X_RESET_WMAC); | 61 | ath79_device_reset_set(AR933X_RESET_WMAC); |
62 | ath79_device_reset_clear(AR933X_RESET_WMAC); | ||
63 | 63 | ||
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
diff --git a/arch/mips/include/asm/mach-jz4740/irq.h b/arch/mips/include/asm/mach-jz4740/irq.h index a865c983c70a..5ad1a9c113c6 100644 --- a/arch/mips/include/asm/mach-jz4740/irq.h +++ b/arch/mips/include/asm/mach-jz4740/irq.h | |||
@@ -45,7 +45,7 @@ | |||
45 | #define JZ4740_IRQ_LCD JZ4740_IRQ(30) | 45 | #define JZ4740_IRQ_LCD JZ4740_IRQ(30) |
46 | 46 | ||
47 | /* 2nd-level interrupts */ | 47 | /* 2nd-level interrupts */ |
48 | #define JZ4740_IRQ_DMA(x) (JZ4740_IRQ(32) + (X)) | 48 | #define JZ4740_IRQ_DMA(x) (JZ4740_IRQ(32) + (x)) |
49 | 49 | ||
50 | #define JZ4740_IRQ_INTC_GPIO(x) (JZ4740_IRQ_GPIO0 - (x)) | 50 | #define JZ4740_IRQ_INTC_GPIO(x) (JZ4740_IRQ_GPIO0 - (x)) |
51 | #define JZ4740_IRQ_GPIO(x) (JZ4740_IRQ(48) + (x)) | 51 | #define JZ4740_IRQ_GPIO(x) (JZ4740_IRQ(48) + (x)) |
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 73c0d45798de..9b02cfba7449 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -37,12 +37,6 @@ extern void tlbmiss_handler_setup_pgd(unsigned long pgd); | |||
37 | write_c0_xcontext((unsigned long) smp_processor_id() << 51); \ | 37 | write_c0_xcontext((unsigned long) smp_processor_id() << 51); \ |
38 | } while (0) | 38 | } while (0) |
39 | 39 | ||
40 | |||
41 | static inline unsigned long get_current_pgd(void) | ||
42 | { | ||
43 | return PHYS_TO_XKSEG_CACHED((read_c0_context() >> 11) & ~0xfffUL); | ||
44 | } | ||
45 | |||
46 | #else /* CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/ | 40 | #else /* CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/ |
47 | 41 | ||
48 | /* | 42 | /* |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 185ca00c4c84..d5a338a1739c 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -257,11 +257,8 @@ asmlinkage int sys_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
257 | return -EFAULT; | 257 | return -EFAULT; |
258 | sigdelsetmask(&newset, ~_BLOCKABLE); | 258 | sigdelsetmask(&newset, ~_BLOCKABLE); |
259 | 259 | ||
260 | spin_lock_irq(¤t->sighand->siglock); | ||
261 | current->saved_sigmask = current->blocked; | 260 | current->saved_sigmask = current->blocked; |
262 | current->blocked = newset; | 261 | set_current_blocked(&newset); |
263 | recalc_sigpending(); | ||
264 | spin_unlock_irq(¤t->sighand->siglock); | ||
265 | 262 | ||
266 | current->state = TASK_INTERRUPTIBLE; | 263 | current->state = TASK_INTERRUPTIBLE; |
267 | schedule(); | 264 | schedule(); |
@@ -286,11 +283,8 @@ asmlinkage int sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
286 | return -EFAULT; | 283 | return -EFAULT; |
287 | sigdelsetmask(&newset, ~_BLOCKABLE); | 284 | sigdelsetmask(&newset, ~_BLOCKABLE); |
288 | 285 | ||
289 | spin_lock_irq(¤t->sighand->siglock); | ||
290 | current->saved_sigmask = current->blocked; | 286 | current->saved_sigmask = current->blocked; |
291 | current->blocked = newset; | 287 | set_current_blocked(&newset); |
292 | recalc_sigpending(); | ||
293 | spin_unlock_irq(¤t->sighand->siglock); | ||
294 | 288 | ||
295 | current->state = TASK_INTERRUPTIBLE; | 289 | current->state = TASK_INTERRUPTIBLE; |
296 | schedule(); | 290 | schedule(); |
@@ -362,10 +356,7 @@ asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
362 | goto badframe; | 356 | goto badframe; |
363 | 357 | ||
364 | sigdelsetmask(&blocked, ~_BLOCKABLE); | 358 | sigdelsetmask(&blocked, ~_BLOCKABLE); |
365 | spin_lock_irq(¤t->sighand->siglock); | 359 | set_current_blocked(&blocked); |
366 | current->blocked = blocked; | ||
367 | recalc_sigpending(); | ||
368 | spin_unlock_irq(¤t->sighand->siglock); | ||
369 | 360 | ||
370 | sig = restore_sigcontext(®s, &frame->sf_sc); | 361 | sig = restore_sigcontext(®s, &frame->sf_sc); |
371 | if (sig < 0) | 362 | if (sig < 0) |
@@ -401,10 +392,7 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
401 | goto badframe; | 392 | goto badframe; |
402 | 393 | ||
403 | sigdelsetmask(&set, ~_BLOCKABLE); | 394 | sigdelsetmask(&set, ~_BLOCKABLE); |
404 | spin_lock_irq(¤t->sighand->siglock); | 395 | set_current_blocked(&set); |
405 | current->blocked = set; | ||
406 | recalc_sigpending(); | ||
407 | spin_unlock_irq(¤t->sighand->siglock); | ||
408 | 396 | ||
409 | sig = restore_sigcontext(®s, &frame->rs_uc.uc_mcontext); | 397 | sig = restore_sigcontext(®s, &frame->rs_uc.uc_mcontext); |
410 | if (sig < 0) | 398 | if (sig < 0) |
@@ -580,12 +568,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
580 | if (ret) | 568 | if (ret) |
581 | return ret; | 569 | return ret; |
582 | 570 | ||
583 | spin_lock_irq(¤t->sighand->siglock); | 571 | block_sigmask(ka, sig); |
584 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | ||
585 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
586 | sigaddset(¤t->blocked, sig); | ||
587 | recalc_sigpending(); | ||
588 | spin_unlock_irq(¤t->sighand->siglock); | ||
589 | 572 | ||
590 | return ret; | 573 | return ret; |
591 | } | 574 | } |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 06b5da392e24..ac3b8d89aae5 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -290,11 +290,8 @@ asmlinkage int sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
290 | return -EFAULT; | 290 | return -EFAULT; |
291 | sigdelsetmask(&newset, ~_BLOCKABLE); | 291 | sigdelsetmask(&newset, ~_BLOCKABLE); |
292 | 292 | ||
293 | spin_lock_irq(¤t->sighand->siglock); | ||
294 | current->saved_sigmask = current->blocked; | 293 | current->saved_sigmask = current->blocked; |
295 | current->blocked = newset; | 294 | set_current_blocked(&newset); |
296 | recalc_sigpending(); | ||
297 | spin_unlock_irq(¤t->sighand->siglock); | ||
298 | 295 | ||
299 | current->state = TASK_INTERRUPTIBLE; | 296 | current->state = TASK_INTERRUPTIBLE; |
300 | schedule(); | 297 | schedule(); |
@@ -318,11 +315,8 @@ asmlinkage int sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
318 | return -EFAULT; | 315 | return -EFAULT; |
319 | sigdelsetmask(&newset, ~_BLOCKABLE); | 316 | sigdelsetmask(&newset, ~_BLOCKABLE); |
320 | 317 | ||
321 | spin_lock_irq(¤t->sighand->siglock); | ||
322 | current->saved_sigmask = current->blocked; | 318 | current->saved_sigmask = current->blocked; |
323 | current->blocked = newset; | 319 | set_current_blocked(&newset); |
324 | recalc_sigpending(); | ||
325 | spin_unlock_irq(¤t->sighand->siglock); | ||
326 | 320 | ||
327 | current->state = TASK_INTERRUPTIBLE; | 321 | current->state = TASK_INTERRUPTIBLE; |
328 | schedule(); | 322 | schedule(); |
@@ -488,10 +482,7 @@ asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
488 | goto badframe; | 482 | goto badframe; |
489 | 483 | ||
490 | sigdelsetmask(&blocked, ~_BLOCKABLE); | 484 | sigdelsetmask(&blocked, ~_BLOCKABLE); |
491 | spin_lock_irq(¤t->sighand->siglock); | 485 | set_current_blocked(&blocked); |
492 | current->blocked = blocked; | ||
493 | recalc_sigpending(); | ||
494 | spin_unlock_irq(¤t->sighand->siglock); | ||
495 | 486 | ||
496 | sig = restore_sigcontext32(®s, &frame->sf_sc); | 487 | sig = restore_sigcontext32(®s, &frame->sf_sc); |
497 | if (sig < 0) | 488 | if (sig < 0) |
@@ -529,10 +520,7 @@ asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
529 | goto badframe; | 520 | goto badframe; |
530 | 521 | ||
531 | sigdelsetmask(&set, ~_BLOCKABLE); | 522 | sigdelsetmask(&set, ~_BLOCKABLE); |
532 | spin_lock_irq(¤t->sighand->siglock); | 523 | set_current_blocked(&set); |
533 | current->blocked = set; | ||
534 | recalc_sigpending(); | ||
535 | spin_unlock_irq(¤t->sighand->siglock); | ||
536 | 524 | ||
537 | sig = restore_sigcontext32(®s, &frame->rs_uc.uc_mcontext); | 525 | sig = restore_sigcontext32(®s, &frame->rs_uc.uc_mcontext); |
538 | if (sig < 0) | 526 | if (sig < 0) |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index ae29e894ab8d..86eb4b04631c 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -93,11 +93,8 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
93 | sigset_from_compat(&newset, &uset); | 93 | sigset_from_compat(&newset, &uset); |
94 | sigdelsetmask(&newset, ~_BLOCKABLE); | 94 | sigdelsetmask(&newset, ~_BLOCKABLE); |
95 | 95 | ||
96 | spin_lock_irq(¤t->sighand->siglock); | ||
97 | current->saved_sigmask = current->blocked; | 96 | current->saved_sigmask = current->blocked; |
98 | current->blocked = newset; | 97 | set_current_blocked(&newset); |
99 | recalc_sigpending(); | ||
100 | spin_unlock_irq(¤t->sighand->siglock); | ||
101 | 98 | ||
102 | current->state = TASK_INTERRUPTIBLE; | 99 | current->state = TASK_INTERRUPTIBLE; |
103 | schedule(); | 100 | schedule(); |
@@ -121,10 +118,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
121 | goto badframe; | 118 | goto badframe; |
122 | 119 | ||
123 | sigdelsetmask(&set, ~_BLOCKABLE); | 120 | sigdelsetmask(&set, ~_BLOCKABLE); |
124 | spin_lock_irq(¤t->sighand->siglock); | 121 | set_current_blocked(&set); |
125 | current->blocked = set; | ||
126 | recalc_sigpending(); | ||
127 | spin_unlock_irq(¤t->sighand->siglock); | ||
128 | 122 | ||
129 | sig = restore_sigcontext(®s, &frame->rs_uc.uc_mcontext); | 123 | sig = restore_sigcontext(®s, &frame->rs_uc.uc_mcontext); |
130 | if (sig < 0) | 124 | if (sig < 0) |
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 4f004596a6e7..0b3393381a81 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
@@ -104,7 +104,7 @@ static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp) | |||
104 | 104 | ||
105 | static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp) | 105 | static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp) |
106 | { | 106 | { |
107 | if (!tty->count) { | 107 | if (tty->count == 1) { |
108 | del_timer_sync(&pdc_console_timer); | 108 | del_timer_sync(&pdc_console_timer); |
109 | tty_port_tty_set(&tty_port, NULL); | 109 | tty_port_tty_set(&tty_port, NULL); |
110 | } | 110 | } |
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 548da3aa0a30..d58fc4e4149c 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
@@ -288,13 +288,6 @@ label##_hv: \ | |||
288 | /* Exception addition: Hard disable interrupts */ | 288 | /* Exception addition: Hard disable interrupts */ |
289 | #define DISABLE_INTS SOFT_DISABLE_INTS(r10,r11) | 289 | #define DISABLE_INTS SOFT_DISABLE_INTS(r10,r11) |
290 | 290 | ||
291 | /* Exception addition: Keep interrupt state */ | ||
292 | #define ENABLE_INTS \ | ||
293 | ld r11,PACAKMSR(r13); \ | ||
294 | ld r12,_MSR(r1); \ | ||
295 | rlwimi r11,r12,0,MSR_EE; \ | ||
296 | mtmsrd r11,1 | ||
297 | |||
298 | #define ADD_NVGPRS \ | 291 | #define ADD_NVGPRS \ |
299 | bl .save_nvgprs | 292 | bl .save_nvgprs |
300 | 293 | ||
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index e648af92ced1..0e40843a1c6e 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -18,10 +18,6 @@ | |||
18 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | 20 | ||
21 | /* Define a way to iterate across irqs. */ | ||
22 | #define for_each_irq(i) \ | ||
23 | for ((i) = 0; (i) < NR_IRQS; ++(i)) | ||
24 | |||
25 | extern atomic_t ppc_n_lost_interrupts; | 21 | extern atomic_t ppc_n_lost_interrupts; |
26 | 22 | ||
27 | /* This number is used when no interrupt has been assigned */ | 23 | /* This number is used when no interrupt has been assigned */ |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index f8a7a1a1a9f4..fc6015027a86 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -767,16 +767,6 @@ do_work: | |||
767 | SOFT_DISABLE_INTS(r3,r4) | 767 | SOFT_DISABLE_INTS(r3,r4) |
768 | 1: bl .preempt_schedule_irq | 768 | 1: bl .preempt_schedule_irq |
769 | 769 | ||
770 | /* Hard-disable interrupts again (and update PACA) */ | ||
771 | #ifdef CONFIG_PPC_BOOK3E | ||
772 | wrteei 0 | ||
773 | #else | ||
774 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
775 | mtmsrd r10,1 | ||
776 | #endif /* CONFIG_PPC_BOOK3E */ | ||
777 | li r0,PACA_IRQ_HARD_DIS | ||
778 | stb r0,PACAIRQHAPPENED(r13) | ||
779 | |||
780 | /* Re-test flags and eventually loop */ | 770 | /* Re-test flags and eventually loop */ |
781 | clrrdi r9,r1,THREAD_SHIFT | 771 | clrrdi r9,r1,THREAD_SHIFT |
782 | ld r4,TI_FLAGS(r9) | 772 | ld r4,TI_FLAGS(r9) |
@@ -787,14 +777,6 @@ do_work: | |||
787 | user_work: | 777 | user_work: |
788 | #endif /* CONFIG_PREEMPT */ | 778 | #endif /* CONFIG_PREEMPT */ |
789 | 779 | ||
790 | /* Enable interrupts */ | ||
791 | #ifdef CONFIG_PPC_BOOK3E | ||
792 | wrteei 1 | ||
793 | #else | ||
794 | ori r10,r10,MSR_EE | ||
795 | mtmsrd r10,1 | ||
796 | #endif /* CONFIG_PPC_BOOK3E */ | ||
797 | |||
798 | andi. r0,r4,_TIF_NEED_RESCHED | 780 | andi. r0,r4,_TIF_NEED_RESCHED |
799 | beq 1f | 781 | beq 1f |
800 | bl .restore_interrupts | 782 | bl .restore_interrupts |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index cb705fdbb458..8f880bc77c56 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -768,8 +768,8 @@ alignment_common: | |||
768 | std r3,_DAR(r1) | 768 | std r3,_DAR(r1) |
769 | std r4,_DSISR(r1) | 769 | std r4,_DSISR(r1) |
770 | bl .save_nvgprs | 770 | bl .save_nvgprs |
771 | DISABLE_INTS | ||
771 | addi r3,r1,STACK_FRAME_OVERHEAD | 772 | addi r3,r1,STACK_FRAME_OVERHEAD |
772 | ENABLE_INTS | ||
773 | bl .alignment_exception | 773 | bl .alignment_exception |
774 | b .ret_from_except | 774 | b .ret_from_except |
775 | 775 | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 5ec1b2354ca6..c6c6f3b7f8cd 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -260,11 +260,17 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
260 | * if they are currently disabled. This is typically called before | 260 | * if they are currently disabled. This is typically called before |
261 | * schedule() or do_signal() when returning to userspace. We do it | 261 | * schedule() or do_signal() when returning to userspace. We do it |
262 | * in C to avoid the burden of dealing with lockdep etc... | 262 | * in C to avoid the burden of dealing with lockdep etc... |
263 | * | ||
264 | * NOTE: This is called with interrupts hard disabled but not marked | ||
265 | * as such in paca->irq_happened, so we need to resync this. | ||
263 | */ | 266 | */ |
264 | void restore_interrupts(void) | 267 | void restore_interrupts(void) |
265 | { | 268 | { |
266 | if (irqs_disabled()) | 269 | if (irqs_disabled()) { |
270 | local_paca->irq_happened |= PACA_IRQ_HARD_DIS; | ||
267 | local_irq_enable(); | 271 | local_irq_enable(); |
272 | } else | ||
273 | __hard_irq_enable(); | ||
268 | } | 274 | } |
269 | 275 | ||
270 | #endif /* CONFIG_PPC64 */ | 276 | #endif /* CONFIG_PPC64 */ |
@@ -330,14 +336,10 @@ void migrate_irqs(void) | |||
330 | 336 | ||
331 | alloc_cpumask_var(&mask, GFP_KERNEL); | 337 | alloc_cpumask_var(&mask, GFP_KERNEL); |
332 | 338 | ||
333 | for_each_irq(irq) { | 339 | for_each_irq_desc(irq, desc) { |
334 | struct irq_data *data; | 340 | struct irq_data *data; |
335 | struct irq_chip *chip; | 341 | struct irq_chip *chip; |
336 | 342 | ||
337 | desc = irq_to_desc(irq); | ||
338 | if (!desc) | ||
339 | continue; | ||
340 | |||
341 | data = irq_desc_get_irq_data(desc); | 343 | data = irq_desc_get_irq_data(desc); |
342 | if (irqd_is_per_cpu(data)) | 344 | if (irqd_is_per_cpu(data)) |
343 | continue; | 345 | continue; |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index c957b1202bdc..5df777794403 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -23,14 +23,11 @@ | |||
23 | 23 | ||
24 | void machine_kexec_mask_interrupts(void) { | 24 | void machine_kexec_mask_interrupts(void) { |
25 | unsigned int i; | 25 | unsigned int i; |
26 | struct irq_desc *desc; | ||
26 | 27 | ||
27 | for_each_irq(i) { | 28 | for_each_irq_desc(i, desc) { |
28 | struct irq_desc *desc = irq_to_desc(i); | ||
29 | struct irq_chip *chip; | 29 | struct irq_chip *chip; |
30 | 30 | ||
31 | if (!desc) | ||
32 | continue; | ||
33 | |||
34 | chip = irq_desc_get_chip(desc); | 31 | chip = irq_desc_get_chip(desc); |
35 | if (!chip) | 32 | if (!chip) |
36 | continue; | 33 | continue; |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6aa0c663e247..158972341a2d 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -248,7 +248,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
248 | addr, regs->nip, regs->link, code); | 248 | addr, regs->nip, regs->link, code); |
249 | } | 249 | } |
250 | 250 | ||
251 | if (!arch_irq_disabled_regs(regs)) | 251 | if (arch_irqs_disabled() && !arch_irq_disabled_regs(regs)) |
252 | local_irq_enable(); | 252 | local_irq_enable(); |
253 | 253 | ||
254 | memset(&info, 0, sizeof(info)); | 254 | memset(&info, 0, sizeof(info)); |
@@ -1019,7 +1019,9 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
1019 | return; | 1019 | return; |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | local_irq_enable(); | 1022 | /* We restore the interrupt state now */ |
1023 | if (!arch_irq_disabled_regs(regs)) | ||
1024 | local_irq_enable(); | ||
1023 | 1025 | ||
1024 | #ifdef CONFIG_MATH_EMULATION | 1026 | #ifdef CONFIG_MATH_EMULATION |
1025 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, | 1027 | /* (reason & REASON_ILLEGAL) would be the obvious thing here, |
@@ -1069,6 +1071,10 @@ void alignment_exception(struct pt_regs *regs) | |||
1069 | { | 1071 | { |
1070 | int sig, code, fixed = 0; | 1072 | int sig, code, fixed = 0; |
1071 | 1073 | ||
1074 | /* We restore the interrupt state now */ | ||
1075 | if (!arch_irq_disabled_regs(regs)) | ||
1076 | local_irq_enable(); | ||
1077 | |||
1072 | /* we don't implement logging of alignment exceptions */ | 1078 | /* we don't implement logging of alignment exceptions */ |
1073 | if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) | 1079 | if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) |
1074 | fixed = fix_alignment(regs); | 1080 | fixed = fix_alignment(regs); |
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index af1ab5e9a691..5c3cf2d04e41 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h | |||
@@ -48,7 +48,13 @@ | |||
48 | /* | 48 | /* |
49 | * Assembly helpers from arch/powerpc/net/bpf_jit.S: | 49 | * Assembly helpers from arch/powerpc/net/bpf_jit.S: |
50 | */ | 50 | */ |
51 | extern u8 sk_load_word[], sk_load_half[], sk_load_byte[], sk_load_byte_msh[]; | 51 | #define DECLARE_LOAD_FUNC(func) \ |
52 | extern u8 func[], func##_negative_offset[], func##_positive_offset[] | ||
53 | |||
54 | DECLARE_LOAD_FUNC(sk_load_word); | ||
55 | DECLARE_LOAD_FUNC(sk_load_half); | ||
56 | DECLARE_LOAD_FUNC(sk_load_byte); | ||
57 | DECLARE_LOAD_FUNC(sk_load_byte_msh); | ||
52 | 58 | ||
53 | #define FUNCTION_DESCR_SIZE 24 | 59 | #define FUNCTION_DESCR_SIZE 24 |
54 | 60 | ||
diff --git a/arch/powerpc/net/bpf_jit_64.S b/arch/powerpc/net/bpf_jit_64.S index ff4506e85cce..55ba3855a97f 100644 --- a/arch/powerpc/net/bpf_jit_64.S +++ b/arch/powerpc/net/bpf_jit_64.S | |||
@@ -31,14 +31,13 @@ | |||
31 | * then branch directly to slow_path_XXX if required. (In fact, could | 31 | * then branch directly to slow_path_XXX if required. (In fact, could |
32 | * load a spare GPR with the address of slow_path_generic and pass size | 32 | * load a spare GPR with the address of slow_path_generic and pass size |
33 | * as an argument, making the call site a mtlr, li and bllr.) | 33 | * as an argument, making the call site a mtlr, li and bllr.) |
34 | * | ||
35 | * Technically, the "is addr < 0" check is unnecessary & slowing down | ||
36 | * the ABS path, as it's statically checked on generation. | ||
37 | */ | 34 | */ |
38 | .globl sk_load_word | 35 | .globl sk_load_word |
39 | sk_load_word: | 36 | sk_load_word: |
40 | cmpdi r_addr, 0 | 37 | cmpdi r_addr, 0 |
41 | blt bpf_error | 38 | blt bpf_slow_path_word_neg |
39 | .globl sk_load_word_positive_offset | ||
40 | sk_load_word_positive_offset: | ||
42 | /* Are we accessing past headlen? */ | 41 | /* Are we accessing past headlen? */ |
43 | subi r_scratch1, r_HL, 4 | 42 | subi r_scratch1, r_HL, 4 |
44 | cmpd r_scratch1, r_addr | 43 | cmpd r_scratch1, r_addr |
@@ -51,7 +50,9 @@ sk_load_word: | |||
51 | .globl sk_load_half | 50 | .globl sk_load_half |
52 | sk_load_half: | 51 | sk_load_half: |
53 | cmpdi r_addr, 0 | 52 | cmpdi r_addr, 0 |
54 | blt bpf_error | 53 | blt bpf_slow_path_half_neg |
54 | .globl sk_load_half_positive_offset | ||
55 | sk_load_half_positive_offset: | ||
55 | subi r_scratch1, r_HL, 2 | 56 | subi r_scratch1, r_HL, 2 |
56 | cmpd r_scratch1, r_addr | 57 | cmpd r_scratch1, r_addr |
57 | blt bpf_slow_path_half | 58 | blt bpf_slow_path_half |
@@ -61,7 +62,9 @@ sk_load_half: | |||
61 | .globl sk_load_byte | 62 | .globl sk_load_byte |
62 | sk_load_byte: | 63 | sk_load_byte: |
63 | cmpdi r_addr, 0 | 64 | cmpdi r_addr, 0 |
64 | blt bpf_error | 65 | blt bpf_slow_path_byte_neg |
66 | .globl sk_load_byte_positive_offset | ||
67 | sk_load_byte_positive_offset: | ||
65 | cmpd r_HL, r_addr | 68 | cmpd r_HL, r_addr |
66 | ble bpf_slow_path_byte | 69 | ble bpf_slow_path_byte |
67 | lbzx r_A, r_D, r_addr | 70 | lbzx r_A, r_D, r_addr |
@@ -69,22 +72,20 @@ sk_load_byte: | |||
69 | 72 | ||
70 | /* | 73 | /* |
71 | * BPF_S_LDX_B_MSH: ldxb 4*([offset]&0xf) | 74 | * BPF_S_LDX_B_MSH: ldxb 4*([offset]&0xf) |
72 | * r_addr is the offset value, already known positive | 75 | * r_addr is the offset value |
73 | */ | 76 | */ |
74 | .globl sk_load_byte_msh | 77 | .globl sk_load_byte_msh |
75 | sk_load_byte_msh: | 78 | sk_load_byte_msh: |
79 | cmpdi r_addr, 0 | ||
80 | blt bpf_slow_path_byte_msh_neg | ||
81 | .globl sk_load_byte_msh_positive_offset | ||
82 | sk_load_byte_msh_positive_offset: | ||
76 | cmpd r_HL, r_addr | 83 | cmpd r_HL, r_addr |
77 | ble bpf_slow_path_byte_msh | 84 | ble bpf_slow_path_byte_msh |
78 | lbzx r_X, r_D, r_addr | 85 | lbzx r_X, r_D, r_addr |
79 | rlwinm r_X, r_X, 2, 32-4-2, 31-2 | 86 | rlwinm r_X, r_X, 2, 32-4-2, 31-2 |
80 | blr | 87 | blr |
81 | 88 | ||
82 | bpf_error: | ||
83 | /* Entered with cr0 = lt */ | ||
84 | li r3, 0 | ||
85 | /* Generated code will 'blt epilogue', returning 0. */ | ||
86 | blr | ||
87 | |||
88 | /* Call out to skb_copy_bits: | 89 | /* Call out to skb_copy_bits: |
89 | * We'll need to back up our volatile regs first; we have | 90 | * We'll need to back up our volatile regs first; we have |
90 | * local variable space at r1+(BPF_PPC_STACK_BASIC). | 91 | * local variable space at r1+(BPF_PPC_STACK_BASIC). |
@@ -136,3 +137,84 @@ bpf_slow_path_byte_msh: | |||
136 | lbz r_X, BPF_PPC_STACK_BASIC+(2*8)(r1) | 137 | lbz r_X, BPF_PPC_STACK_BASIC+(2*8)(r1) |
137 | rlwinm r_X, r_X, 2, 32-4-2, 31-2 | 138 | rlwinm r_X, r_X, 2, 32-4-2, 31-2 |
138 | blr | 139 | blr |
140 | |||
141 | /* Call out to bpf_internal_load_pointer_neg_helper: | ||
142 | * We'll need to back up our volatile regs first; we have | ||
143 | * local variable space at r1+(BPF_PPC_STACK_BASIC). | ||
144 | * Allocate a new stack frame here to remain ABI-compliant in | ||
145 | * stashing LR. | ||
146 | */ | ||
147 | #define sk_negative_common(SIZE) \ | ||
148 | mflr r0; \ | ||
149 | std r0, 16(r1); \ | ||
150 | /* R3 goes in parameter space of caller's frame */ \ | ||
151 | std r_skb, (BPF_PPC_STACKFRAME+48)(r1); \ | ||
152 | std r_A, (BPF_PPC_STACK_BASIC+(0*8))(r1); \ | ||
153 | std r_X, (BPF_PPC_STACK_BASIC+(1*8))(r1); \ | ||
154 | stdu r1, -BPF_PPC_SLOWPATH_FRAME(r1); \ | ||
155 | /* R3 = r_skb, as passed */ \ | ||
156 | mr r4, r_addr; \ | ||
157 | li r5, SIZE; \ | ||
158 | bl bpf_internal_load_pointer_neg_helper; \ | ||
159 | /* R3 != 0 on success */ \ | ||
160 | addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \ | ||
161 | ld r0, 16(r1); \ | ||
162 | ld r_A, (BPF_PPC_STACK_BASIC+(0*8))(r1); \ | ||
163 | ld r_X, (BPF_PPC_STACK_BASIC+(1*8))(r1); \ | ||
164 | mtlr r0; \ | ||
165 | cmpldi r3, 0; \ | ||
166 | beq bpf_error_slow; /* cr0 = EQ */ \ | ||
167 | mr r_addr, r3; \ | ||
168 | ld r_skb, (BPF_PPC_STACKFRAME+48)(r1); \ | ||
169 | /* Great success! */ | ||
170 | |||
171 | bpf_slow_path_word_neg: | ||
172 | lis r_scratch1,-32 /* SKF_LL_OFF */ | ||
173 | cmpd r_addr, r_scratch1 /* addr < SKF_* */ | ||
174 | blt bpf_error /* cr0 = LT */ | ||
175 | .globl sk_load_word_negative_offset | ||
176 | sk_load_word_negative_offset: | ||
177 | sk_negative_common(4) | ||
178 | lwz r_A, 0(r_addr) | ||
179 | blr | ||
180 | |||
181 | bpf_slow_path_half_neg: | ||
182 | lis r_scratch1,-32 /* SKF_LL_OFF */ | ||
183 | cmpd r_addr, r_scratch1 /* addr < SKF_* */ | ||
184 | blt bpf_error /* cr0 = LT */ | ||
185 | .globl sk_load_half_negative_offset | ||
186 | sk_load_half_negative_offset: | ||
187 | sk_negative_common(2) | ||
188 | lhz r_A, 0(r_addr) | ||
189 | blr | ||
190 | |||
191 | bpf_slow_path_byte_neg: | ||
192 | lis r_scratch1,-32 /* SKF_LL_OFF */ | ||
193 | cmpd r_addr, r_scratch1 /* addr < SKF_* */ | ||
194 | blt bpf_error /* cr0 = LT */ | ||
195 | .globl sk_load_byte_negative_offset | ||
196 | sk_load_byte_negative_offset: | ||
197 | sk_negative_common(1) | ||
198 | lbz r_A, 0(r_addr) | ||
199 | blr | ||
200 | |||
201 | bpf_slow_path_byte_msh_neg: | ||
202 | lis r_scratch1,-32 /* SKF_LL_OFF */ | ||
203 | cmpd r_addr, r_scratch1 /* addr < SKF_* */ | ||
204 | blt bpf_error /* cr0 = LT */ | ||
205 | .globl sk_load_byte_msh_negative_offset | ||
206 | sk_load_byte_msh_negative_offset: | ||
207 | sk_negative_common(1) | ||
208 | lbz r_X, 0(r_addr) | ||
209 | rlwinm r_X, r_X, 2, 32-4-2, 31-2 | ||
210 | blr | ||
211 | |||
212 | bpf_error_slow: | ||
213 | /* fabricate a cr0 = lt */ | ||
214 | li r_scratch1, -1 | ||
215 | cmpdi r_scratch1, 0 | ||
216 | bpf_error: | ||
217 | /* Entered with cr0 = lt */ | ||
218 | li r3, 0 | ||
219 | /* Generated code will 'blt epilogue', returning 0. */ | ||
220 | blr | ||
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 73619d3aeb6c..2dc8b1484845 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c | |||
@@ -127,6 +127,9 @@ static void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx) | |||
127 | PPC_BLR(); | 127 | PPC_BLR(); |
128 | } | 128 | } |
129 | 129 | ||
130 | #define CHOOSE_LOAD_FUNC(K, func) \ | ||
131 | ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset) | ||
132 | |||
130 | /* Assemble the body code between the prologue & epilogue. */ | 133 | /* Assemble the body code between the prologue & epilogue. */ |
131 | static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, | 134 | static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, |
132 | struct codegen_context *ctx, | 135 | struct codegen_context *ctx, |
@@ -391,21 +394,16 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, | |||
391 | 394 | ||
392 | /*** Absolute loads from packet header/data ***/ | 395 | /*** Absolute loads from packet header/data ***/ |
393 | case BPF_S_LD_W_ABS: | 396 | case BPF_S_LD_W_ABS: |
394 | func = sk_load_word; | 397 | func = CHOOSE_LOAD_FUNC(K, sk_load_word); |
395 | goto common_load; | 398 | goto common_load; |
396 | case BPF_S_LD_H_ABS: | 399 | case BPF_S_LD_H_ABS: |
397 | func = sk_load_half; | 400 | func = CHOOSE_LOAD_FUNC(K, sk_load_half); |
398 | goto common_load; | 401 | goto common_load; |
399 | case BPF_S_LD_B_ABS: | 402 | case BPF_S_LD_B_ABS: |
400 | func = sk_load_byte; | 403 | func = CHOOSE_LOAD_FUNC(K, sk_load_byte); |
401 | common_load: | 404 | common_load: |
402 | /* | 405 | /* Load from [K]. */ |
403 | * Load from [K]. Reference with the (negative) | ||
404 | * SKF_NET_OFF/SKF_LL_OFF offsets is unsupported. | ||
405 | */ | ||
406 | ctx->seen |= SEEN_DATAREF; | 406 | ctx->seen |= SEEN_DATAREF; |
407 | if ((int)K < 0) | ||
408 | return -ENOTSUPP; | ||
409 | PPC_LI64(r_scratch1, func); | 407 | PPC_LI64(r_scratch1, func); |
410 | PPC_MTLR(r_scratch1); | 408 | PPC_MTLR(r_scratch1); |
411 | PPC_LI32(r_addr, K); | 409 | PPC_LI32(r_addr, K); |
@@ -429,7 +427,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, | |||
429 | common_load_ind: | 427 | common_load_ind: |
430 | /* | 428 | /* |
431 | * Load from [X + K]. Negative offsets are tested for | 429 | * Load from [X + K]. Negative offsets are tested for |
432 | * in the helper functions, and result in a 'ret 0'. | 430 | * in the helper functions. |
433 | */ | 431 | */ |
434 | ctx->seen |= SEEN_DATAREF | SEEN_XREG; | 432 | ctx->seen |= SEEN_DATAREF | SEEN_XREG; |
435 | PPC_LI64(r_scratch1, func); | 433 | PPC_LI64(r_scratch1, func); |
@@ -443,13 +441,7 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, | |||
443 | break; | 441 | break; |
444 | 442 | ||
445 | case BPF_S_LDX_B_MSH: | 443 | case BPF_S_LDX_B_MSH: |
446 | /* | 444 | func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh); |
447 | * x86 version drops packet (RET 0) when K<0, whereas | ||
448 | * interpreter does allow K<0 (__load_pointer, special | ||
449 | * ancillary data). common_load returns ENOTSUPP if K<0, | ||
450 | * so we fall back to interpreter & filter works. | ||
451 | */ | ||
452 | func = sk_load_byte_msh; | ||
453 | goto common_load; | 445 | goto common_load; |
454 | break; | 446 | break; |
455 | 447 | ||
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index d09f3e8e6867..85825b5401e5 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -114,7 +114,7 @@ static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) | |||
114 | pr_devel("axon_msi: woff %x roff %x msi %x\n", | 114 | pr_devel("axon_msi: woff %x roff %x msi %x\n", |
115 | write_offset, msic->read_offset, msi); | 115 | write_offset, msic->read_offset, msi); |
116 | 116 | ||
117 | if (msi < NR_IRQS && irq_get_chip_data(msi) == msic) { | 117 | if (msi < nr_irqs && irq_get_chip_data(msi) == msic) { |
118 | generic_handle_irq(msi); | 118 | generic_handle_irq(msi); |
119 | msic->fifo_virt[idx] = cpu_to_le32(0xffffffff); | 119 | msic->fifo_virt[idx] = cpu_to_le32(0xffffffff); |
120 | } else { | 120 | } else { |
@@ -276,9 +276,6 @@ static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
276 | if (rc) | 276 | if (rc) |
277 | return rc; | 277 | return rc; |
278 | 278 | ||
279 | /* We rely on being able to stash a virq in a u16 */ | ||
280 | BUILD_BUG_ON(NR_IRQS > 65536); | ||
281 | |||
282 | list_for_each_entry(entry, &dev->msi_list, list) { | 279 | list_for_each_entry(entry, &dev->msi_list, list) { |
283 | virq = irq_create_direct_mapping(msic->irq_domain); | 280 | virq = irq_create_direct_mapping(msic->irq_domain); |
284 | if (virq == NO_IRQ) { | 281 | if (virq == NO_IRQ) { |
@@ -392,7 +389,8 @@ static int axon_msi_probe(struct platform_device *device) | |||
392 | } | 389 | } |
393 | memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES); | 390 | memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES); |
394 | 391 | ||
395 | msic->irq_domain = irq_domain_add_nomap(dn, 0, &msic_host_ops, msic); | 392 | /* We rely on being able to stash a virq in a u16, so limit irqs to < 65536 */ |
393 | msic->irq_domain = irq_domain_add_nomap(dn, 65536, &msic_host_ops, msic); | ||
396 | if (!msic->irq_domain) { | 394 | if (!msic->irq_domain) { |
397 | printk(KERN_ERR "axon_msi: couldn't allocate irq_domain for %s\n", | 395 | printk(KERN_ERR "axon_msi: couldn't allocate irq_domain for %s\n", |
398 | dn->full_name); | 396 | dn->full_name); |
diff --git a/arch/powerpc/platforms/cell/beat_interrupt.c b/arch/powerpc/platforms/cell/beat_interrupt.c index f9a48af335cb..8c6dc42ecf65 100644 --- a/arch/powerpc/platforms/cell/beat_interrupt.c +++ b/arch/powerpc/platforms/cell/beat_interrupt.c | |||
@@ -248,6 +248,6 @@ void beatic_deinit_IRQ(void) | |||
248 | { | 248 | { |
249 | int i; | 249 | int i; |
250 | 250 | ||
251 | for (i = 1; i < NR_IRQS; i++) | 251 | for (i = 1; i < nr_irqs; i++) |
252 | beat_destruct_irq_plug(i); | 252 | beat_destruct_irq_plug(i); |
253 | } | 253 | } |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 66ad93de1d55..c4e630576ff2 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -57,9 +57,9 @@ static int max_real_irqs; | |||
57 | 57 | ||
58 | static DEFINE_RAW_SPINLOCK(pmac_pic_lock); | 58 | static DEFINE_RAW_SPINLOCK(pmac_pic_lock); |
59 | 59 | ||
60 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 60 | /* The max irq number this driver deals with is 128; see max_irqs */ |
61 | static unsigned long ppc_lost_interrupts[NR_MASK_WORDS]; | 61 | static DECLARE_BITMAP(ppc_lost_interrupts, 128); |
62 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 62 | static DECLARE_BITMAP(ppc_cached_irq_mask, 128); |
63 | static int pmac_irq_cascade = -1; | 63 | static int pmac_irq_cascade = -1; |
64 | static struct irq_domain *pmac_pic_host; | 64 | static struct irq_domain *pmac_pic_host; |
65 | 65 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index aadbe4f6d537..178a5f300bc9 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -30,9 +30,9 @@ config PPC_SPLPAR | |||
30 | two or more partitions. | 30 | two or more partitions. |
31 | 31 | ||
32 | config EEH | 32 | config EEH |
33 | bool "PCI Extended Error Handling (EEH)" if EXPERT | 33 | bool |
34 | depends on PPC_PSERIES && PCI | 34 | depends on PPC_PSERIES && PCI |
35 | default y if !EXPERT | 35 | default y |
36 | 36 | ||
37 | config PSERIES_MSI | 37 | config PSERIES_MSI |
38 | bool | 38 | bool |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index d3be961e2ae7..10386b676d87 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
@@ -51,8 +51,7 @@ | |||
51 | static intctl_cpm2_t __iomem *cpm2_intctl; | 51 | static intctl_cpm2_t __iomem *cpm2_intctl; |
52 | 52 | ||
53 | static struct irq_domain *cpm2_pic_host; | 53 | static struct irq_domain *cpm2_pic_host; |
54 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 54 | static unsigned long ppc_cached_irq_mask[2]; /* 2 32-bit registers */ |
55 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | ||
56 | 55 | ||
57 | static const u_char irq_to_siureg[] = { | 56 | static const u_char irq_to_siureg[] = { |
58 | 1, 1, 1, 1, 1, 1, 1, 1, | 57 | 1, 1, 1, 1, 1, 1, 1, 1, |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index d5f5416be310..b724622c3a0b 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
@@ -18,69 +18,45 @@ | |||
18 | extern int cpm_get_irq(struct pt_regs *regs); | 18 | extern int cpm_get_irq(struct pt_regs *regs); |
19 | 19 | ||
20 | static struct irq_domain *mpc8xx_pic_host; | 20 | static struct irq_domain *mpc8xx_pic_host; |
21 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 21 | static unsigned long mpc8xx_cached_irq_mask; |
22 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | ||
23 | static sysconf8xx_t __iomem *siu_reg; | 22 | static sysconf8xx_t __iomem *siu_reg; |
24 | 23 | ||
25 | int cpm_get_irq(struct pt_regs *regs); | 24 | static inline unsigned long mpc8xx_irqd_to_bit(struct irq_data *d) |
25 | { | ||
26 | return 0x80000000 >> irqd_to_hwirq(d); | ||
27 | } | ||
26 | 28 | ||
27 | static void mpc8xx_unmask_irq(struct irq_data *d) | 29 | static void mpc8xx_unmask_irq(struct irq_data *d) |
28 | { | 30 | { |
29 | int bit, word; | 31 | mpc8xx_cached_irq_mask |= mpc8xx_irqd_to_bit(d); |
30 | unsigned int irq_nr = (unsigned int)irqd_to_hwirq(d); | 32 | out_be32(&siu_reg->sc_simask, mpc8xx_cached_irq_mask); |
31 | |||
32 | bit = irq_nr & 0x1f; | ||
33 | word = irq_nr >> 5; | ||
34 | |||
35 | ppc_cached_irq_mask[word] |= (1 << (31-bit)); | ||
36 | out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]); | ||
37 | } | 33 | } |
38 | 34 | ||
39 | static void mpc8xx_mask_irq(struct irq_data *d) | 35 | static void mpc8xx_mask_irq(struct irq_data *d) |
40 | { | 36 | { |
41 | int bit, word; | 37 | mpc8xx_cached_irq_mask &= ~mpc8xx_irqd_to_bit(d); |
42 | unsigned int irq_nr = (unsigned int)irqd_to_hwirq(d); | 38 | out_be32(&siu_reg->sc_simask, mpc8xx_cached_irq_mask); |
43 | |||
44 | bit = irq_nr & 0x1f; | ||
45 | word = irq_nr >> 5; | ||
46 | |||
47 | ppc_cached_irq_mask[word] &= ~(1 << (31-bit)); | ||
48 | out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]); | ||
49 | } | 39 | } |
50 | 40 | ||
51 | static void mpc8xx_ack(struct irq_data *d) | 41 | static void mpc8xx_ack(struct irq_data *d) |
52 | { | 42 | { |
53 | int bit; | 43 | out_be32(&siu_reg->sc_sipend, mpc8xx_irqd_to_bit(d)); |
54 | unsigned int irq_nr = (unsigned int)irqd_to_hwirq(d); | ||
55 | |||
56 | bit = irq_nr & 0x1f; | ||
57 | out_be32(&siu_reg->sc_sipend, 1 << (31-bit)); | ||
58 | } | 44 | } |
59 | 45 | ||
60 | static void mpc8xx_end_irq(struct irq_data *d) | 46 | static void mpc8xx_end_irq(struct irq_data *d) |
61 | { | 47 | { |
62 | int bit, word; | 48 | mpc8xx_cached_irq_mask |= mpc8xx_irqd_to_bit(d); |
63 | unsigned int irq_nr = (unsigned int)irqd_to_hwirq(d); | 49 | out_be32(&siu_reg->sc_simask, mpc8xx_cached_irq_mask); |
64 | |||
65 | bit = irq_nr & 0x1f; | ||
66 | word = irq_nr >> 5; | ||
67 | |||
68 | ppc_cached_irq_mask[word] |= (1 << (31-bit)); | ||
69 | out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]); | ||
70 | } | 50 | } |
71 | 51 | ||
72 | static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type) | 52 | static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type) |
73 | { | 53 | { |
74 | if (flow_type & IRQ_TYPE_EDGE_FALLING) { | 54 | /* only external IRQ senses are programmable */ |
75 | irq_hw_number_t hw = (unsigned int)irqd_to_hwirq(d); | 55 | if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !(irqd_to_hwirq(d) & 1)) { |
76 | unsigned int siel = in_be32(&siu_reg->sc_siel); | 56 | unsigned int siel = in_be32(&siu_reg->sc_siel); |
77 | 57 | siel |= mpc8xx_irqd_to_bit(d); | |
78 | /* only external IRQ senses are programmable */ | 58 | out_be32(&siu_reg->sc_siel, siel); |
79 | if ((hw & 1) == 0) { | 59 | __irq_set_handler_locked(d->irq, handle_edge_irq); |
80 | siel |= (0x80000000 >> hw); | ||
81 | out_be32(&siu_reg->sc_siel, siel); | ||
82 | __irq_set_handler_locked(d->irq, handle_edge_irq); | ||
83 | } | ||
84 | } | 60 | } |
85 | return 0; | 61 | return 0; |
86 | } | 62 | } |
@@ -132,6 +108,9 @@ static int mpc8xx_pic_host_xlate(struct irq_domain *h, struct device_node *ct, | |||
132 | IRQ_TYPE_EDGE_FALLING, | 108 | IRQ_TYPE_EDGE_FALLING, |
133 | }; | 109 | }; |
134 | 110 | ||
111 | if (intspec[0] > 0x1f) | ||
112 | return 0; | ||
113 | |||
135 | *out_hwirq = intspec[0]; | 114 | *out_hwirq = intspec[0]; |
136 | if (intsize > 1 && intspec[1] < 4) | 115 | if (intsize > 1 && intspec[1] < 4) |
137 | *out_flags = map_pic_senses[intspec[1]]; | 116 | *out_flags = map_pic_senses[intspec[1]]; |
diff --git a/arch/powerpc/sysdev/scom.c b/arch/powerpc/sysdev/scom.c index 49a3ece1c6b3..702256a1ca11 100644 --- a/arch/powerpc/sysdev/scom.c +++ b/arch/powerpc/sysdev/scom.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | #include <asm/debug.h> | ||
25 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
26 | #include <asm/scom.h> | 27 | #include <asm/scom.h> |
27 | 28 | ||
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index ea5e204e3450..cd1d18db92c6 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
@@ -188,6 +188,7 @@ void xics_migrate_irqs_away(void) | |||
188 | { | 188 | { |
189 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); | 189 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); |
190 | unsigned int irq, virq; | 190 | unsigned int irq, virq; |
191 | struct irq_desc *desc; | ||
191 | 192 | ||
192 | /* If we used to be the default server, move to the new "boot_cpuid" */ | 193 | /* If we used to be the default server, move to the new "boot_cpuid" */ |
193 | if (hw_cpu == xics_default_server) | 194 | if (hw_cpu == xics_default_server) |
@@ -202,8 +203,7 @@ void xics_migrate_irqs_away(void) | |||
202 | /* Allow IPIs again... */ | 203 | /* Allow IPIs again... */ |
203 | icp_ops->set_priority(DEFAULT_PRIORITY); | 204 | icp_ops->set_priority(DEFAULT_PRIORITY); |
204 | 205 | ||
205 | for_each_irq(virq) { | 206 | for_each_irq_desc(virq, desc) { |
206 | struct irq_desc *desc; | ||
207 | struct irq_chip *chip; | 207 | struct irq_chip *chip; |
208 | long server; | 208 | long server; |
209 | unsigned long flags; | 209 | unsigned long flags; |
@@ -212,9 +212,8 @@ void xics_migrate_irqs_away(void) | |||
212 | /* We can't set affinity on ISA interrupts */ | 212 | /* We can't set affinity on ISA interrupts */ |
213 | if (virq < NUM_ISA_INTERRUPTS) | 213 | if (virq < NUM_ISA_INTERRUPTS) |
214 | continue; | 214 | continue; |
215 | desc = irq_to_desc(virq); | ||
216 | /* We only need to migrate enabled IRQS */ | 215 | /* We only need to migrate enabled IRQS */ |
217 | if (!desc || !desc->action) | 216 | if (!desc->action) |
218 | continue; | 217 | continue; |
219 | if (desc->irq_data.domain != xics_host) | 218 | if (desc->irq_data.domain != xics_host) |
220 | continue; | 219 | continue; |
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h index 37f2f4a55231..f4c1c20bcdf6 100644 --- a/arch/sh/include/asm/atomic.h +++ b/arch/sh/include/asm/atomic.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <asm/cmpxchg.h> | 12 | #include <asm/cmpxchg.h> |
13 | 13 | ||
14 | #define ATOMIC_INIT(i) ( (atomic_t) { (i) } ) | 14 | #define ATOMIC_INIT(i) { (i) } |
15 | 15 | ||
16 | #define atomic_read(v) (*(volatile int *)&(v)->counter) | 16 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
17 | #define atomic_set(v,i) ((v)->counter = (i)) | 17 | #define atomic_set(v,i) ((v)->counter = (i)) |
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c index 324eef93c900..e99b104d967a 100644 --- a/arch/sh/mm/fault_32.c +++ b/arch/sh/mm/fault_32.c | |||
@@ -86,7 +86,7 @@ static noinline int vmalloc_fault(unsigned long address) | |||
86 | pte_t *pte_k; | 86 | pte_t *pte_k; |
87 | 87 | ||
88 | /* Make sure we are in vmalloc/module/P3 area: */ | 88 | /* Make sure we are in vmalloc/module/P3 area: */ |
89 | if (!(address >= VMALLOC_START && address < P3_ADDR_MAX)) | 89 | if (!(address >= P3SEG && address < P3_ADDR_MAX)) |
90 | return -1; | 90 | return -1; |
91 | 91 | ||
92 | /* | 92 | /* |
diff --git a/arch/tile/include/asm/pci.h b/arch/tile/include/asm/pci.h index 5d5a635530bd..32e6cbe8dff3 100644 --- a/arch/tile/include/asm/pci.h +++ b/arch/tile/include/asm/pci.h | |||
@@ -47,8 +47,8 @@ struct pci_controller { | |||
47 | */ | 47 | */ |
48 | #define PCI_DMA_BUS_IS_PHYS 1 | 48 | #define PCI_DMA_BUS_IS_PHYS 1 |
49 | 49 | ||
50 | int __devinit tile_pci_init(void); | 50 | int __init tile_pci_init(void); |
51 | int __devinit pcibios_init(void); | 51 | int __init pcibios_init(void); |
52 | 52 | ||
53 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {} | 53 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {} |
54 | 54 | ||
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index a1bb59eecc18..b56d12bf5900 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -141,7 +141,7 @@ static int __devinit tile_init_irqs(int controller_id, | |||
141 | * | 141 | * |
142 | * Returns the number of controllers discovered. | 142 | * Returns the number of controllers discovered. |
143 | */ | 143 | */ |
144 | int __devinit tile_pci_init(void) | 144 | int __init tile_pci_init(void) |
145 | { | 145 | { |
146 | int i; | 146 | int i; |
147 | 147 | ||
@@ -287,7 +287,7 @@ static void __devinit fixup_read_and_payload_sizes(void) | |||
287 | * The controllers have been set up by the time we get here, by a call to | 287 | * The controllers have been set up by the time we get here, by a call to |
288 | * tile_pci_init. | 288 | * tile_pci_init. |
289 | */ | 289 | */ |
290 | int __devinit pcibios_init(void) | 290 | int __init pcibios_init(void) |
291 | { | 291 | { |
292 | int i; | 292 | int i; |
293 | 293 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1d14cc6b79ad..c9866b0b77d8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -81,7 +81,7 @@ config X86 | |||
81 | select CLKEVT_I8253 | 81 | select CLKEVT_I8253 |
82 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 82 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
83 | select GENERIC_IOMAP | 83 | select GENERIC_IOMAP |
84 | select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC | 84 | select DCACHE_WORD_ACCESS |
85 | 85 | ||
86 | config INSTRUCTION_DECODER | 86 | config INSTRUCTION_DECODER |
87 | def_bool (KPROBES || PERF_EVENTS) | 87 | def_bool (KPROBES || PERF_EVENTS) |
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index a0559930a180..c85e3ac99bba 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -33,6 +33,9 @@ | |||
33 | __HEAD | 33 | __HEAD |
34 | ENTRY(startup_32) | 34 | ENTRY(startup_32) |
35 | #ifdef CONFIG_EFI_STUB | 35 | #ifdef CONFIG_EFI_STUB |
36 | jmp preferred_addr | ||
37 | |||
38 | .balign 0x10 | ||
36 | /* | 39 | /* |
37 | * We don't need the return address, so set up the stack so | 40 | * We don't need the return address, so set up the stack so |
38 | * efi_main() can find its arugments. | 41 | * efi_main() can find its arugments. |
@@ -41,12 +44,17 @@ ENTRY(startup_32) | |||
41 | 44 | ||
42 | call efi_main | 45 | call efi_main |
43 | cmpl $0, %eax | 46 | cmpl $0, %eax |
44 | je preferred_addr | ||
45 | movl %eax, %esi | 47 | movl %eax, %esi |
46 | call 1f | 48 | jne 2f |
47 | 1: | 49 | 1: |
50 | /* EFI init failed, so hang. */ | ||
51 | hlt | ||
52 | jmp 1b | ||
53 | 2: | ||
54 | call 3f | ||
55 | 3: | ||
48 | popl %eax | 56 | popl %eax |
49 | subl $1b, %eax | 57 | subl $3b, %eax |
50 | subl BP_pref_address(%esi), %eax | 58 | subl BP_pref_address(%esi), %eax |
51 | add BP_code32_start(%esi), %eax | 59 | add BP_code32_start(%esi), %eax |
52 | leal preferred_addr(%eax), %eax | 60 | leal preferred_addr(%eax), %eax |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 558d76ce23bc..87e03a13d8e3 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -200,18 +200,28 @@ ENTRY(startup_64) | |||
200 | * entire text+data+bss and hopefully all of memory. | 200 | * entire text+data+bss and hopefully all of memory. |
201 | */ | 201 | */ |
202 | #ifdef CONFIG_EFI_STUB | 202 | #ifdef CONFIG_EFI_STUB |
203 | pushq %rsi | 203 | /* |
204 | * The entry point for the PE/COFF executable is 0x210, so only | ||
205 | * legacy boot loaders will execute this jmp. | ||
206 | */ | ||
207 | jmp preferred_addr | ||
208 | |||
209 | .org 0x210 | ||
204 | mov %rcx, %rdi | 210 | mov %rcx, %rdi |
205 | mov %rdx, %rsi | 211 | mov %rdx, %rsi |
206 | call efi_main | 212 | call efi_main |
207 | popq %rsi | ||
208 | cmpq $0,%rax | ||
209 | je preferred_addr | ||
210 | movq %rax,%rsi | 213 | movq %rax,%rsi |
211 | call 1f | 214 | cmpq $0,%rax |
215 | jne 2f | ||
212 | 1: | 216 | 1: |
217 | /* EFI init failed, so hang. */ | ||
218 | hlt | ||
219 | jmp 1b | ||
220 | 2: | ||
221 | call 3f | ||
222 | 3: | ||
213 | popq %rax | 223 | popq %rax |
214 | subq $1b, %rax | 224 | subq $3b, %rax |
215 | subq BP_pref_address(%rsi), %rax | 225 | subq BP_pref_address(%rsi), %rax |
216 | add BP_code32_start(%esi), %eax | 226 | add BP_code32_start(%esi), %eax |
217 | leaq preferred_addr(%rax), %rax | 227 | leaq preferred_addr(%rax), %rax |
diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c index d3c0b0277666..fb7117a4ade1 100644 --- a/arch/x86/boot/compressed/relocs.c +++ b/arch/x86/boot/compressed/relocs.c | |||
@@ -403,13 +403,11 @@ static void print_absolute_symbols(void) | |||
403 | for (i = 0; i < ehdr.e_shnum; i++) { | 403 | for (i = 0; i < ehdr.e_shnum; i++) { |
404 | struct section *sec = &secs[i]; | 404 | struct section *sec = &secs[i]; |
405 | char *sym_strtab; | 405 | char *sym_strtab; |
406 | Elf32_Sym *sh_symtab; | ||
407 | int j; | 406 | int j; |
408 | 407 | ||
409 | if (sec->shdr.sh_type != SHT_SYMTAB) { | 408 | if (sec->shdr.sh_type != SHT_SYMTAB) { |
410 | continue; | 409 | continue; |
411 | } | 410 | } |
412 | sh_symtab = sec->symtab; | ||
413 | sym_strtab = sec->link->strtab; | 411 | sym_strtab = sec->link->strtab; |
414 | for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) { | 412 | for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) { |
415 | Elf32_Sym *sym; | 413 | Elf32_Sym *sym; |
diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index ed549767a231..24443a332083 100644 --- a/arch/x86/boot/tools/build.c +++ b/arch/x86/boot/tools/build.c | |||
@@ -205,8 +205,13 @@ int main(int argc, char ** argv) | |||
205 | put_unaligned_le32(file_sz, &buf[pe_header + 0x50]); | 205 | put_unaligned_le32(file_sz, &buf[pe_header + 0x50]); |
206 | 206 | ||
207 | #ifdef CONFIG_X86_32 | 207 | #ifdef CONFIG_X86_32 |
208 | /* Address of entry point */ | 208 | /* |
209 | put_unaligned_le32(i, &buf[pe_header + 0x28]); | 209 | * Address of entry point. |
210 | * | ||
211 | * The EFI stub entry point is +16 bytes from the start of | ||
212 | * the .text section. | ||
213 | */ | ||
214 | put_unaligned_le32(i + 16, &buf[pe_header + 0x28]); | ||
210 | 215 | ||
211 | /* .text size */ | 216 | /* .text size */ |
212 | put_unaligned_le32(file_sz, &buf[pe_header + 0xb0]); | 217 | put_unaligned_le32(file_sz, &buf[pe_header + 0xb0]); |
@@ -217,9 +222,11 @@ int main(int argc, char ** argv) | |||
217 | /* | 222 | /* |
218 | * Address of entry point. startup_32 is at the beginning and | 223 | * Address of entry point. startup_32 is at the beginning and |
219 | * the 64-bit entry point (startup_64) is always 512 bytes | 224 | * the 64-bit entry point (startup_64) is always 512 bytes |
220 | * after. | 225 | * after. The EFI stub entry point is 16 bytes after that, as |
226 | * the first instruction allows legacy loaders to jump over | ||
227 | * the EFI stub initialisation | ||
221 | */ | 228 | */ |
222 | put_unaligned_le32(i + 512, &buf[pe_header + 0x28]); | 229 | put_unaligned_le32(i + 528, &buf[pe_header + 0x28]); |
223 | 230 | ||
224 | /* .text size */ | 231 | /* .text size */ |
225 | put_unaligned_le32(file_sz, &buf[pe_header + 0xc0]); | 232 | put_unaligned_le32(file_sz, &buf[pe_header + 0xc0]); |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 4824fb45560f..07b3a68d2d29 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -294,8 +294,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
294 | 294 | ||
295 | /* OK, This is the point of no return */ | 295 | /* OK, This is the point of no return */ |
296 | set_personality(PER_LINUX); | 296 | set_personality(PER_LINUX); |
297 | set_thread_flag(TIF_IA32); | 297 | set_personality_ia32(false); |
298 | current->mm->context.ia32_compat = 1; | ||
299 | 298 | ||
300 | setup_new_exec(bprm); | 299 | setup_new_exec(bprm); |
301 | 300 | ||
diff --git a/arch/x86/include/asm/posix_types.h b/arch/x86/include/asm/posix_types.h index 3427b7798dbc..7ef7c3020e5c 100644 --- a/arch/x86/include/asm/posix_types.h +++ b/arch/x86/include/asm/posix_types.h | |||
@@ -7,9 +7,9 @@ | |||
7 | #else | 7 | #else |
8 | # ifdef __i386__ | 8 | # ifdef __i386__ |
9 | # include "posix_types_32.h" | 9 | # include "posix_types_32.h" |
10 | # elif defined(__LP64__) | 10 | # elif defined(__ILP32__) |
11 | # include "posix_types_64.h" | ||
12 | # else | ||
13 | # include "posix_types_x32.h" | 11 | # include "posix_types_x32.h" |
12 | # else | ||
13 | # include "posix_types_64.h" | ||
14 | # endif | 14 | # endif |
15 | #endif | 15 | #endif |
diff --git a/arch/x86/include/asm/sigcontext.h b/arch/x86/include/asm/sigcontext.h index 4a085383af27..5ca71c065eef 100644 --- a/arch/x86/include/asm/sigcontext.h +++ b/arch/x86/include/asm/sigcontext.h | |||
@@ -257,7 +257,7 @@ struct sigcontext { | |||
257 | __u64 oldmask; | 257 | __u64 oldmask; |
258 | __u64 cr2; | 258 | __u64 cr2; |
259 | struct _fpstate __user *fpstate; /* zero when no FPU context */ | 259 | struct _fpstate __user *fpstate; /* zero when no FPU context */ |
260 | #ifndef __LP64__ | 260 | #ifdef __ILP32__ |
261 | __u32 __fpstate_pad; | 261 | __u32 __fpstate_pad; |
262 | #endif | 262 | #endif |
263 | __u64 reserved1[8]; | 263 | __u64 reserved1[8]; |
diff --git a/arch/x86/include/asm/siginfo.h b/arch/x86/include/asm/siginfo.h index fc1aa5535646..34c47b3341c0 100644 --- a/arch/x86/include/asm/siginfo.h +++ b/arch/x86/include/asm/siginfo.h | |||
@@ -2,7 +2,13 @@ | |||
2 | #define _ASM_X86_SIGINFO_H | 2 | #define _ASM_X86_SIGINFO_H |
3 | 3 | ||
4 | #ifdef __x86_64__ | 4 | #ifdef __x86_64__ |
5 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 5 | # ifdef __ILP32__ /* x32 */ |
6 | typedef long long __kernel_si_clock_t __attribute__((aligned(4))); | ||
7 | # define __ARCH_SI_CLOCK_T __kernel_si_clock_t | ||
8 | # define __ARCH_SI_ATTRIBUTES __attribute__((aligned(8))) | ||
9 | # else /* x86-64 */ | ||
10 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
11 | # endif | ||
6 | #endif | 12 | #endif |
7 | 13 | ||
8 | #include <asm-generic/siginfo.h> | 14 | #include <asm-generic/siginfo.h> |
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h index 37cdc9d99bb1..4437001d8e3d 100644 --- a/arch/x86/include/asm/unistd.h +++ b/arch/x86/include/asm/unistd.h | |||
@@ -63,10 +63,10 @@ | |||
63 | #else | 63 | #else |
64 | # ifdef __i386__ | 64 | # ifdef __i386__ |
65 | # include <asm/unistd_32.h> | 65 | # include <asm/unistd_32.h> |
66 | # elif defined(__LP64__) | 66 | # elif defined(__ILP32__) |
67 | # include <asm/unistd_64.h> | ||
68 | # else | ||
69 | # include <asm/unistd_x32.h> | 67 | # include <asm/unistd_x32.h> |
68 | # else | ||
69 | # include <asm/unistd_64.h> | ||
70 | # endif | 70 | # endif |
71 | #endif | 71 | #endif |
72 | 72 | ||
diff --git a/arch/x86/include/asm/word-at-a-time.h b/arch/x86/include/asm/word-at-a-time.h index 6fe6767b7124..e58f03b206c3 100644 --- a/arch/x86/include/asm/word-at-a-time.h +++ b/arch/x86/include/asm/word-at-a-time.h | |||
@@ -43,4 +43,37 @@ static inline unsigned long has_zero(unsigned long a) | |||
43 | return ((a - REPEAT_BYTE(0x01)) & ~a) & REPEAT_BYTE(0x80); | 43 | return ((a - REPEAT_BYTE(0x01)) & ~a) & REPEAT_BYTE(0x80); |
44 | } | 44 | } |
45 | 45 | ||
46 | /* | ||
47 | * Load an unaligned word from kernel space. | ||
48 | * | ||
49 | * In the (very unlikely) case of the word being a page-crosser | ||
50 | * and the next page not being mapped, take the exception and | ||
51 | * return zeroes in the non-existing part. | ||
52 | */ | ||
53 | static inline unsigned long load_unaligned_zeropad(const void *addr) | ||
54 | { | ||
55 | unsigned long ret, dummy; | ||
56 | |||
57 | asm( | ||
58 | "1:\tmov %2,%0\n" | ||
59 | "2:\n" | ||
60 | ".section .fixup,\"ax\"\n" | ||
61 | "3:\t" | ||
62 | "lea %2,%1\n\t" | ||
63 | "and %3,%1\n\t" | ||
64 | "mov (%1),%0\n\t" | ||
65 | "leal %2,%%ecx\n\t" | ||
66 | "andl %4,%%ecx\n\t" | ||
67 | "shll $3,%%ecx\n\t" | ||
68 | "shr %%cl,%0\n\t" | ||
69 | "jmp 2b\n" | ||
70 | ".previous\n" | ||
71 | _ASM_EXTABLE(1b, 3b) | ||
72 | :"=&r" (ret),"=&c" (dummy) | ||
73 | :"m" (*(unsigned long *)addr), | ||
74 | "i" (-sizeof(unsigned long)), | ||
75 | "i" (sizeof(unsigned long)-1)); | ||
76 | return ret; | ||
77 | } | ||
78 | |||
46 | #endif /* _ASM_WORD_AT_A_TIME_H */ | 79 | #endif /* _ASM_WORD_AT_A_TIME_H */ |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index baaca8defec8..764b66a4cf89 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -195,6 +195,5 @@ extern struct x86_msi_ops x86_msi; | |||
195 | 195 | ||
196 | extern void x86_init_noop(void); | 196 | extern void x86_init_noop(void); |
197 | extern void x86_init_uint_noop(unsigned int unused); | 197 | extern void x86_init_uint_noop(unsigned int unused); |
198 | extern void x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node); | ||
199 | 198 | ||
200 | #endif | 199 | #endif |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 103b6ab368d3..146a49c763a4 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -24,6 +24,10 @@ unsigned long acpi_realmode_flags; | |||
24 | static char temp_stack[4096]; | 24 | static char temp_stack[4096]; |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | asmlinkage void acpi_enter_s3(void) | ||
28 | { | ||
29 | acpi_enter_sleep_state(3, wake_sleep_flags); | ||
30 | } | ||
27 | /** | 31 | /** |
28 | * acpi_suspend_lowlevel - save kernel state | 32 | * acpi_suspend_lowlevel - save kernel state |
29 | * | 33 | * |
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h index 416d4be13fef..d68677a2a010 100644 --- a/arch/x86/kernel/acpi/sleep.h +++ b/arch/x86/kernel/acpi/sleep.h | |||
@@ -3,12 +3,16 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <asm/trampoline.h> | 5 | #include <asm/trampoline.h> |
6 | #include <linux/linkage.h> | ||
6 | 7 | ||
7 | extern unsigned long saved_video_mode; | 8 | extern unsigned long saved_video_mode; |
8 | extern long saved_magic; | 9 | extern long saved_magic; |
9 | 10 | ||
10 | extern int wakeup_pmode_return; | 11 | extern int wakeup_pmode_return; |
11 | 12 | ||
13 | extern u8 wake_sleep_flags; | ||
14 | extern asmlinkage void acpi_enter_s3(void); | ||
15 | |||
12 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); | 16 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); |
13 | extern void wakeup_long64(void); | 17 | extern void wakeup_long64(void); |
14 | 18 | ||
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index 13ab720573e3..72610839f03b 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S | |||
@@ -74,9 +74,7 @@ restore_registers: | |||
74 | ENTRY(do_suspend_lowlevel) | 74 | ENTRY(do_suspend_lowlevel) |
75 | call save_processor_state | 75 | call save_processor_state |
76 | call save_registers | 76 | call save_registers |
77 | pushl $3 | 77 | call acpi_enter_s3 |
78 | call acpi_enter_sleep_state | ||
79 | addl $4, %esp | ||
80 | 78 | ||
81 | # In case of S3 failure, we'll emerge here. Jump | 79 | # In case of S3 failure, we'll emerge here. Jump |
82 | # to ret_point to recover | 80 | # to ret_point to recover |
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index 8ea5164cbd04..014d1d28c397 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S | |||
@@ -71,9 +71,7 @@ ENTRY(do_suspend_lowlevel) | |||
71 | movq %rsi, saved_rsi | 71 | movq %rsi, saved_rsi |
72 | 72 | ||
73 | addq $8, %rsp | 73 | addq $8, %rsp |
74 | movl $3, %edi | 74 | call acpi_enter_s3 |
75 | xorl %eax, %eax | ||
76 | call acpi_enter_sleep_state | ||
77 | /* in case something went wrong, restore the machine status and go on */ | 75 | /* in case something went wrong, restore the machine status and go on */ |
78 | jmp resume_point | 76 | jmp resume_point |
79 | 77 | ||
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 11544d8f1e97..edc24480469f 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1637,9 +1637,11 @@ static int __init apic_verify(void) | |||
1637 | mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; | 1637 | mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; |
1638 | 1638 | ||
1639 | /* The BIOS may have set up the APIC at some other address */ | 1639 | /* The BIOS may have set up the APIC at some other address */ |
1640 | rdmsr(MSR_IA32_APICBASE, l, h); | 1640 | if (boot_cpu_data.x86 >= 6) { |
1641 | if (l & MSR_IA32_APICBASE_ENABLE) | 1641 | rdmsr(MSR_IA32_APICBASE, l, h); |
1642 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; | 1642 | if (l & MSR_IA32_APICBASE_ENABLE) |
1643 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; | ||
1644 | } | ||
1643 | 1645 | ||
1644 | pr_info("Found and enabled local APIC!\n"); | 1646 | pr_info("Found and enabled local APIC!\n"); |
1645 | return 0; | 1647 | return 0; |
@@ -1657,13 +1659,15 @@ int __init apic_force_enable(unsigned long addr) | |||
1657 | * MSR. This can only be done in software for Intel P6 or later | 1659 | * MSR. This can only be done in software for Intel P6 or later |
1658 | * and AMD K7 (Model > 1) or later. | 1660 | * and AMD K7 (Model > 1) or later. |
1659 | */ | 1661 | */ |
1660 | rdmsr(MSR_IA32_APICBASE, l, h); | 1662 | if (boot_cpu_data.x86 >= 6) { |
1661 | if (!(l & MSR_IA32_APICBASE_ENABLE)) { | 1663 | rdmsr(MSR_IA32_APICBASE, l, h); |
1662 | pr_info("Local APIC disabled by BIOS -- reenabling.\n"); | 1664 | if (!(l & MSR_IA32_APICBASE_ENABLE)) { |
1663 | l &= ~MSR_IA32_APICBASE_BASE; | 1665 | pr_info("Local APIC disabled by BIOS -- reenabling.\n"); |
1664 | l |= MSR_IA32_APICBASE_ENABLE | addr; | 1666 | l &= ~MSR_IA32_APICBASE_BASE; |
1665 | wrmsr(MSR_IA32_APICBASE, l, h); | 1667 | l |= MSR_IA32_APICBASE_ENABLE | addr; |
1666 | enabled_via_apicbase = 1; | 1668 | wrmsr(MSR_IA32_APICBASE, l, h); |
1669 | enabled_via_apicbase = 1; | ||
1670 | } | ||
1667 | } | 1671 | } |
1668 | return apic_verify(); | 1672 | return apic_verify(); |
1669 | } | 1673 | } |
@@ -2209,10 +2213,12 @@ static void lapic_resume(void) | |||
2209 | * FIXME! This will be wrong if we ever support suspend on | 2213 | * FIXME! This will be wrong if we ever support suspend on |
2210 | * SMP! We'll need to do this as part of the CPU restore! | 2214 | * SMP! We'll need to do this as part of the CPU restore! |
2211 | */ | 2215 | */ |
2212 | rdmsr(MSR_IA32_APICBASE, l, h); | 2216 | if (boot_cpu_data.x86 >= 6) { |
2213 | l &= ~MSR_IA32_APICBASE_BASE; | 2217 | rdmsr(MSR_IA32_APICBASE, l, h); |
2214 | l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; | 2218 | l &= ~MSR_IA32_APICBASE_BASE; |
2215 | wrmsr(MSR_IA32_APICBASE, l, h); | 2219 | l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; |
2220 | wrmsr(MSR_IA32_APICBASE, l, h); | ||
2221 | } | ||
2216 | } | 2222 | } |
2217 | 2223 | ||
2218 | maxlvt = lapic_get_maxlvt(); | 2224 | maxlvt = lapic_get_maxlvt(); |
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c index 899803e03214..23e75422e013 100644 --- a/arch/x86/kernel/apic/apic_numachip.c +++ b/arch/x86/kernel/apic/apic_numachip.c | |||
@@ -207,8 +207,11 @@ static void __init map_csrs(void) | |||
207 | 207 | ||
208 | static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) | 208 | static void fixup_cpu_id(struct cpuinfo_x86 *c, int node) |
209 | { | 209 | { |
210 | c->phys_proc_id = node; | 210 | |
211 | per_cpu(cpu_llc_id, smp_processor_id()) = node; | 211 | if (c->phys_proc_id != node) { |
212 | c->phys_proc_id = node; | ||
213 | per_cpu(cpu_llc_id, smp_processor_id()) = node; | ||
214 | } | ||
212 | } | 215 | } |
213 | 216 | ||
214 | static int __init numachip_system_init(void) | 217 | static int __init numachip_system_init(void) |
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c index 8a778db45e3a..991e315f4227 100644 --- a/arch/x86/kernel/apic/x2apic_phys.c +++ b/arch/x86/kernel/apic/x2apic_phys.c | |||
@@ -24,6 +24,12 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
24 | { | 24 | { |
25 | if (x2apic_phys) | 25 | if (x2apic_phys) |
26 | return x2apic_enabled(); | 26 | return x2apic_enabled(); |
27 | else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) && | ||
28 | (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) && | ||
29 | x2apic_enabled()) { | ||
30 | printk(KERN_DEBUG "System requires x2apic physical mode\n"); | ||
31 | return 1; | ||
32 | } | ||
27 | else | 33 | else |
28 | return 0; | 34 | return 0; |
29 | } | 35 | } |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 0a44b90602b0..146bb6218eec 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -26,7 +26,8 @@ | |||
26 | * contact AMD for precise details and a CPU swap. | 26 | * contact AMD for precise details and a CPU swap. |
27 | * | 27 | * |
28 | * See http://www.multimania.com/poulot/k6bug.html | 28 | * See http://www.multimania.com/poulot/k6bug.html |
29 | * http://www.amd.com/K6/k6docs/revgd.html | 29 | * and section 2.6.2 of "AMD-K6 Processor Revision Guide - Model 6" |
30 | * (Publication # 21266 Issue Date: August 1998) | ||
30 | * | 31 | * |
31 | * The following test is erm.. interesting. AMD neglected to up | 32 | * The following test is erm.. interesting. AMD neglected to up |
32 | * the chip setting when fixing the bug but they also tweaked some | 33 | * the chip setting when fixing the bug but they also tweaked some |
@@ -94,7 +95,6 @@ static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c) | |||
94 | "system stability may be impaired when more than 32 MB are used.\n"); | 95 | "system stability may be impaired when more than 32 MB are used.\n"); |
95 | else | 96 | else |
96 | printk(KERN_CONT "probably OK (after B9730xxxx).\n"); | 97 | printk(KERN_CONT "probably OK (after B9730xxxx).\n"); |
97 | printk(KERN_INFO "Please see http://membres.lycos.fr/poulot/k6bug.html\n"); | ||
98 | } | 98 | } |
99 | 99 | ||
100 | /* K6 with old style WHCR */ | 100 | /* K6 with old style WHCR */ |
@@ -353,10 +353,11 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c) | |||
353 | node = per_cpu(cpu_llc_id, cpu); | 353 | node = per_cpu(cpu_llc_id, cpu); |
354 | 354 | ||
355 | /* | 355 | /* |
356 | * If core numbers are inconsistent, it's likely a multi-fabric platform, | 356 | * On multi-fabric platform (e.g. Numascale NumaChip) a |
357 | * so invoke platform-specific handler | 357 | * platform-specific handler needs to be called to fixup some |
358 | * IDs of the CPU. | ||
358 | */ | 359 | */ |
359 | if (c->phys_proc_id != node) | 360 | if (x86_cpuinit.fixup_cpu_id) |
360 | x86_cpuinit.fixup_cpu_id(c, node); | 361 | x86_cpuinit.fixup_cpu_id(c, node); |
361 | 362 | ||
362 | if (!node_online(node)) { | 363 | if (!node_online(node)) { |
@@ -579,6 +580,24 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
579 | } | 580 | } |
580 | } | 581 | } |
581 | 582 | ||
583 | /* re-enable TopologyExtensions if switched off by BIOS */ | ||
584 | if ((c->x86 == 0x15) && | ||
585 | (c->x86_model >= 0x10) && (c->x86_model <= 0x1f) && | ||
586 | !cpu_has(c, X86_FEATURE_TOPOEXT)) { | ||
587 | u64 val; | ||
588 | |||
589 | if (!rdmsrl_amd_safe(0xc0011005, &val)) { | ||
590 | val |= 1ULL << 54; | ||
591 | wrmsrl_amd_safe(0xc0011005, val); | ||
592 | rdmsrl(0xc0011005, val); | ||
593 | if (val & (1ULL << 54)) { | ||
594 | set_cpu_cap(c, X86_FEATURE_TOPOEXT); | ||
595 | printk(KERN_INFO FW_INFO "CPU: Re-enabling " | ||
596 | "disabled Topology Extensions Support\n"); | ||
597 | } | ||
598 | } | ||
599 | } | ||
600 | |||
582 | cpu_detect_cache_sizes(c); | 601 | cpu_detect_cache_sizes(c); |
583 | 602 | ||
584 | /* Multi core CPU? */ | 603 | /* Multi core CPU? */ |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 67e258362a3d..cf79302198a6 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1163,15 +1163,6 @@ static void dbg_restore_debug_regs(void) | |||
1163 | #endif /* ! CONFIG_KGDB */ | 1163 | #endif /* ! CONFIG_KGDB */ |
1164 | 1164 | ||
1165 | /* | 1165 | /* |
1166 | * Prints an error where the NUMA and configured core-number mismatch and the | ||
1167 | * platform didn't override this to fix it up | ||
1168 | */ | ||
1169 | void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node) | ||
1170 | { | ||
1171 | pr_err("NUMA core number %d differs from configured core number %d\n", node, c->phys_proc_id); | ||
1172 | } | ||
1173 | |||
1174 | /* | ||
1175 | * cpu_init() initializes state that is per-CPU. Some data is already | 1166 | * cpu_init() initializes state that is per-CPU. Some data is already |
1176 | * initialized (naturally) in the bootstrap process, such as the GDT | 1167 | * initialized (naturally) in the bootstrap process, such as the GDT |
1177 | * and IDT. We reload them nevertheless, this function acts as a | 1168 | * and IDT. We reload them nevertheless, this function acts as a |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 73d08ed98a64..b8f3653dddbc 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -433,14 +433,14 @@ int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu, unsigned slot, | |||
433 | /* check if @slot is already used or the index is already disabled */ | 433 | /* check if @slot is already used or the index is already disabled */ |
434 | ret = amd_get_l3_disable_slot(nb, slot); | 434 | ret = amd_get_l3_disable_slot(nb, slot); |
435 | if (ret >= 0) | 435 | if (ret >= 0) |
436 | return -EINVAL; | 436 | return -EEXIST; |
437 | 437 | ||
438 | if (index > nb->l3_cache.indices) | 438 | if (index > nb->l3_cache.indices) |
439 | return -EINVAL; | 439 | return -EINVAL; |
440 | 440 | ||
441 | /* check whether the other slot has disabled the same index already */ | 441 | /* check whether the other slot has disabled the same index already */ |
442 | if (index == amd_get_l3_disable_slot(nb, !slot)) | 442 | if (index == amd_get_l3_disable_slot(nb, !slot)) |
443 | return -EINVAL; | 443 | return -EEXIST; |
444 | 444 | ||
445 | amd_l3_disable_index(nb, cpu, slot, index); | 445 | amd_l3_disable_index(nb, cpu, slot, index); |
446 | 446 | ||
@@ -468,8 +468,8 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf, | |||
468 | err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val); | 468 | err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val); |
469 | if (err) { | 469 | if (err) { |
470 | if (err == -EEXIST) | 470 | if (err == -EEXIST) |
471 | printk(KERN_WARNING "L3 disable slot %d in use!\n", | 471 | pr_warning("L3 slot %d in use/index already disabled!\n", |
472 | slot); | 472 | slot); |
473 | return err; | 473 | return err; |
474 | } | 474 | } |
475 | return count; | 475 | return count; |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 7734bcbb5a3a..2d6e6498c176 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -235,6 +235,7 @@ int init_fpu(struct task_struct *tsk) | |||
235 | if (tsk_used_math(tsk)) { | 235 | if (tsk_used_math(tsk)) { |
236 | if (HAVE_HWFP && tsk == current) | 236 | if (HAVE_HWFP && tsk == current) |
237 | unlazy_fpu(tsk); | 237 | unlazy_fpu(tsk); |
238 | tsk->thread.fpu.last_cpu = ~0; | ||
238 | return 0; | 239 | return 0; |
239 | } | 240 | } |
240 | 241 | ||
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 73465aab28f8..8a2ce8fd41c0 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -82,11 +82,6 @@ static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig) | |||
82 | { | 82 | { |
83 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 83 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
84 | 84 | ||
85 | if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) { | ||
86 | pr_warning("CPU%d: family %d not supported\n", cpu, c->x86); | ||
87 | return -1; | ||
88 | } | ||
89 | |||
90 | csig->rev = c->microcode; | 85 | csig->rev = c->microcode; |
91 | pr_info("CPU%d: patch_level=0x%08x\n", cpu, csig->rev); | 86 | pr_info("CPU%d: patch_level=0x%08x\n", cpu, csig->rev); |
92 | 87 | ||
@@ -380,6 +375,13 @@ static struct microcode_ops microcode_amd_ops = { | |||
380 | 375 | ||
381 | struct microcode_ops * __init init_amd_microcode(void) | 376 | struct microcode_ops * __init init_amd_microcode(void) |
382 | { | 377 | { |
378 | struct cpuinfo_x86 *c = &cpu_data(0); | ||
379 | |||
380 | if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) { | ||
381 | pr_warning("AMD CPU family 0x%x not supported\n", c->x86); | ||
382 | return NULL; | ||
383 | } | ||
384 | |||
383 | patch = (void *)get_zeroed_page(GFP_KERNEL); | 385 | patch = (void *)get_zeroed_page(GFP_KERNEL); |
384 | if (!patch) | 386 | if (!patch) |
385 | return NULL; | 387 | return NULL; |
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 87a0f8688301..c9bda6d6035c 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -419,10 +419,8 @@ static int mc_device_add(struct device *dev, struct subsys_interface *sif) | |||
419 | if (err) | 419 | if (err) |
420 | return err; | 420 | return err; |
421 | 421 | ||
422 | if (microcode_init_cpu(cpu) == UCODE_ERROR) { | 422 | if (microcode_init_cpu(cpu) == UCODE_ERROR) |
423 | sysfs_remove_group(&dev->kobj, &mc_attr_group); | ||
424 | return -EINVAL; | 423 | return -EINVAL; |
425 | } | ||
426 | 424 | ||
427 | return err; | 425 | return err; |
428 | } | 426 | } |
@@ -528,11 +526,11 @@ static int __init microcode_init(void) | |||
528 | microcode_ops = init_intel_microcode(); | 526 | microcode_ops = init_intel_microcode(); |
529 | else if (c->x86_vendor == X86_VENDOR_AMD) | 527 | else if (c->x86_vendor == X86_VENDOR_AMD) |
530 | microcode_ops = init_amd_microcode(); | 528 | microcode_ops = init_amd_microcode(); |
531 | 529 | else | |
532 | if (!microcode_ops) { | ||
533 | pr_err("no support for this CPU vendor\n"); | 530 | pr_err("no support for this CPU vendor\n"); |
531 | |||
532 | if (!microcode_ops) | ||
534 | return -ENODEV; | 533 | return -ENODEV; |
535 | } | ||
536 | 534 | ||
537 | microcode_pdev = platform_device_register_simple("microcode", -1, | 535 | microcode_pdev = platform_device_register_simple("microcode", -1, |
538 | NULL, 0); | 536 | NULL, 0); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 733ca39f367e..43d8b48b23e6 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -423,6 +423,7 @@ void set_personality_ia32(bool x32) | |||
423 | current_thread_info()->status |= TS_COMPAT; | 423 | current_thread_info()->status |= TS_COMPAT; |
424 | } | 424 | } |
425 | } | 425 | } |
426 | EXPORT_SYMBOL_GPL(set_personality_ia32); | ||
426 | 427 | ||
427 | unsigned long get_wchan(struct task_struct *p) | 428 | unsigned long get_wchan(struct task_struct *p) |
428 | { | 429 | { |
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 71f4727da373..5a98aa272184 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void) | |||
185 | #endif | 185 | #endif |
186 | rc = -EINVAL; | 186 | rc = -EINVAL; |
187 | if (pcpu_chosen_fc != PCPU_FC_PAGE) { | 187 | if (pcpu_chosen_fc != PCPU_FC_PAGE) { |
188 | const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE; | ||
189 | const size_t dyn_size = PERCPU_MODULE_RESERVE + | 188 | const size_t dyn_size = PERCPU_MODULE_RESERVE + |
190 | PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; | 189 | PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE; |
190 | size_t atom_size; | ||
191 | 191 | ||
192 | /* | ||
193 | * On 64bit, use PMD_SIZE for atom_size so that embedded | ||
194 | * percpu areas are aligned to PMD. This, in the future, | ||
195 | * can also allow using PMD mappings in vmalloc area. Use | ||
196 | * PAGE_SIZE on 32bit as vmalloc space is highly contended | ||
197 | * and large vmalloc area allocs can easily fail. | ||
198 | */ | ||
199 | #ifdef CONFIG_X86_64 | ||
200 | atom_size = PMD_SIZE; | ||
201 | #else | ||
202 | atom_size = PAGE_SIZE; | ||
203 | #endif | ||
192 | rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, | 204 | rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, |
193 | dyn_size, atom_size, | 205 | dyn_size, atom_size, |
194 | pcpu_cpu_distance, | 206 | pcpu_cpu_distance, |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index e9f265fd79ae..9cf71d0b2d37 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -93,7 +93,6 @@ struct x86_init_ops x86_init __initdata = { | |||
93 | struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = { | 93 | struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = { |
94 | .early_percpu_clock_init = x86_init_noop, | 94 | .early_percpu_clock_init = x86_init_noop, |
95 | .setup_percpu_clockev = setup_secondary_APIC_clock, | 95 | .setup_percpu_clockev = setup_secondary_APIC_clock, |
96 | .fixup_cpu_id = x86_default_fixup_cpu_id, | ||
97 | }; | 96 | }; |
98 | 97 | ||
99 | static void default_nmi_init(void) { }; | 98 | static void default_nmi_init(void) { }; |
diff --git a/arch/x86/platform/geode/net5501.c b/arch/x86/platform/geode/net5501.c index 66d377e334f7..646e3b5b4bb6 100644 --- a/arch/x86/platform/geode/net5501.c +++ b/arch/x86/platform/geode/net5501.c | |||
@@ -63,7 +63,7 @@ static struct gpio_led net5501_leds[] = { | |||
63 | .name = "net5501:1", | 63 | .name = "net5501:1", |
64 | .gpio = 6, | 64 | .gpio = 6, |
65 | .default_trigger = "default-on", | 65 | .default_trigger = "default-on", |
66 | .active_low = 1, | 66 | .active_low = 0, |
67 | }, | 67 | }, |
68 | }; | 68 | }; |
69 | 69 | ||
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index e0a37233c0af..e31bcd8f2eee 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -805,7 +805,7 @@ void intel_scu_devices_create(void) | |||
805 | } else | 805 | } else |
806 | i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1); | 806 | i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1); |
807 | } | 807 | } |
808 | intel_scu_notifier_post(SCU_AVAILABLE, 0L); | 808 | intel_scu_notifier_post(SCU_AVAILABLE, NULL); |
809 | } | 809 | } |
810 | EXPORT_SYMBOL_GPL(intel_scu_devices_create); | 810 | EXPORT_SYMBOL_GPL(intel_scu_devices_create); |
811 | 811 | ||
@@ -814,7 +814,7 @@ void intel_scu_devices_destroy(void) | |||
814 | { | 814 | { |
815 | int i; | 815 | int i; |
816 | 816 | ||
817 | intel_scu_notifier_post(SCU_DOWN, 0L); | 817 | intel_scu_notifier_post(SCU_DOWN, NULL); |
818 | 818 | ||
819 | for (i = 0; i < ipc_next_dev; i++) | 819 | for (i = 0; i < ipc_next_dev; i++) |
820 | platform_device_del(ipc_devs[i]); | 820 | platform_device_del(ipc_devs[i]); |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 4f51bebac02c..95dccce8e979 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <asm/stackprotector.h> | 63 | #include <asm/stackprotector.h> |
64 | #include <asm/hypervisor.h> | 64 | #include <asm/hypervisor.h> |
65 | #include <asm/mwait.h> | 65 | #include <asm/mwait.h> |
66 | #include <asm/pci_x86.h> | ||
66 | 67 | ||
67 | #ifdef CONFIG_ACPI | 68 | #ifdef CONFIG_ACPI |
68 | #include <linux/acpi.h> | 69 | #include <linux/acpi.h> |
@@ -261,7 +262,8 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, | |||
261 | 262 | ||
262 | static bool __init xen_check_mwait(void) | 263 | static bool __init xen_check_mwait(void) |
263 | { | 264 | { |
264 | #ifdef CONFIG_ACPI | 265 | #if defined(CONFIG_ACPI) && !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) && \ |
266 | !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE) | ||
265 | struct xen_platform_op op = { | 267 | struct xen_platform_op op = { |
266 | .cmd = XENPF_set_processor_pminfo, | 268 | .cmd = XENPF_set_processor_pminfo, |
267 | .u.set_pminfo.id = -1, | 269 | .u.set_pminfo.id = -1, |
@@ -349,7 +351,6 @@ static void __init xen_init_cpuid_mask(void) | |||
349 | /* Xen will set CR4.OSXSAVE if supported and not disabled by force */ | 351 | /* Xen will set CR4.OSXSAVE if supported and not disabled by force */ |
350 | if ((cx & xsave_mask) != xsave_mask) | 352 | if ((cx & xsave_mask) != xsave_mask) |
351 | cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ | 353 | cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ |
352 | |||
353 | if (xen_check_mwait()) | 354 | if (xen_check_mwait()) |
354 | cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32)); | 355 | cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32)); |
355 | } | 356 | } |
@@ -809,9 +810,40 @@ static void xen_io_delay(void) | |||
809 | } | 810 | } |
810 | 811 | ||
811 | #ifdef CONFIG_X86_LOCAL_APIC | 812 | #ifdef CONFIG_X86_LOCAL_APIC |
813 | static unsigned long xen_set_apic_id(unsigned int x) | ||
814 | { | ||
815 | WARN_ON(1); | ||
816 | return x; | ||
817 | } | ||
818 | static unsigned int xen_get_apic_id(unsigned long x) | ||
819 | { | ||
820 | return ((x)>>24) & 0xFFu; | ||
821 | } | ||
812 | static u32 xen_apic_read(u32 reg) | 822 | static u32 xen_apic_read(u32 reg) |
813 | { | 823 | { |
814 | return 0; | 824 | struct xen_platform_op op = { |
825 | .cmd = XENPF_get_cpuinfo, | ||
826 | .interface_version = XENPF_INTERFACE_VERSION, | ||
827 | .u.pcpu_info.xen_cpuid = 0, | ||
828 | }; | ||
829 | int ret = 0; | ||
830 | |||
831 | /* Shouldn't need this as APIC is turned off for PV, and we only | ||
832 | * get called on the bootup processor. But just in case. */ | ||
833 | if (!xen_initial_domain() || smp_processor_id()) | ||
834 | return 0; | ||
835 | |||
836 | if (reg == APIC_LVR) | ||
837 | return 0x10; | ||
838 | |||
839 | if (reg != APIC_ID) | ||
840 | return 0; | ||
841 | |||
842 | ret = HYPERVISOR_dom0_op(&op); | ||
843 | if (ret) | ||
844 | return 0; | ||
845 | |||
846 | return op.u.pcpu_info.apic_id << 24; | ||
815 | } | 847 | } |
816 | 848 | ||
817 | static void xen_apic_write(u32 reg, u32 val) | 849 | static void xen_apic_write(u32 reg, u32 val) |
@@ -849,6 +881,8 @@ static void set_xen_basic_apic_ops(void) | |||
849 | apic->icr_write = xen_apic_icr_write; | 881 | apic->icr_write = xen_apic_icr_write; |
850 | apic->wait_icr_idle = xen_apic_wait_icr_idle; | 882 | apic->wait_icr_idle = xen_apic_wait_icr_idle; |
851 | apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle; | 883 | apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle; |
884 | apic->set_apic_id = xen_set_apic_id; | ||
885 | apic->get_apic_id = xen_get_apic_id; | ||
852 | } | 886 | } |
853 | 887 | ||
854 | #endif | 888 | #endif |
@@ -1365,8 +1399,10 @@ asmlinkage void __init xen_start_kernel(void) | |||
1365 | /* Make sure ACS will be enabled */ | 1399 | /* Make sure ACS will be enabled */ |
1366 | pci_request_acs(); | 1400 | pci_request_acs(); |
1367 | } | 1401 | } |
1368 | 1402 | #ifdef CONFIG_PCI | |
1369 | 1403 | /* PCI BIOS service won't work from a PV guest. */ | |
1404 | pci_probe &= ~PCI_PROBE_BIOS; | ||
1405 | #endif | ||
1370 | xen_raw_console_write("about to get started...\n"); | 1406 | xen_raw_console_write("about to get started...\n"); |
1371 | 1407 | ||
1372 | xen_setup_runstate_info(0); | 1408 | xen_setup_runstate_info(0); |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index b8e279479a6b..69f5857660ac 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) | |||
353 | { | 353 | { |
354 | if (val & _PAGE_PRESENT) { | 354 | if (val & _PAGE_PRESENT) { |
355 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; | 355 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
356 | unsigned long pfn = mfn_to_pfn(mfn); | ||
357 | |||
356 | pteval_t flags = val & PTE_FLAGS_MASK; | 358 | pteval_t flags = val & PTE_FLAGS_MASK; |
357 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; | 359 | if (unlikely(pfn == ~0)) |
360 | val = flags & ~_PAGE_PRESENT; | ||
361 | else | ||
362 | val = ((pteval_t)pfn << PAGE_SHIFT) | flags; | ||
358 | } | 363 | } |
359 | 364 | ||
360 | return val; | 365 | return val; |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 5fac6919b957..0503c0c493a9 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -178,6 +178,7 @@ static void __init xen_fill_possible_map(void) | |||
178 | static void __init xen_filter_cpu_maps(void) | 178 | static void __init xen_filter_cpu_maps(void) |
179 | { | 179 | { |
180 | int i, rc; | 180 | int i, rc; |
181 | unsigned int subtract = 0; | ||
181 | 182 | ||
182 | if (!xen_initial_domain()) | 183 | if (!xen_initial_domain()) |
183 | return; | 184 | return; |
@@ -192,8 +193,22 @@ static void __init xen_filter_cpu_maps(void) | |||
192 | } else { | 193 | } else { |
193 | set_cpu_possible(i, false); | 194 | set_cpu_possible(i, false); |
194 | set_cpu_present(i, false); | 195 | set_cpu_present(i, false); |
196 | subtract++; | ||
195 | } | 197 | } |
196 | } | 198 | } |
199 | #ifdef CONFIG_HOTPLUG_CPU | ||
200 | /* This is akin to using 'nr_cpus' on the Linux command line. | ||
201 | * Which is OK as when we use 'dom0_max_vcpus=X' we can only | ||
202 | * have up to X, while nr_cpu_ids is greater than X. This | ||
203 | * normally is not a problem, except when CPU hotplugging | ||
204 | * is involved and then there might be more than X CPUs | ||
205 | * in the guest - which will not work as there is no | ||
206 | * hypercall to expand the max number of VCPUs an already | ||
207 | * running guest has. So cap it up to X. */ | ||
208 | if (subtract) | ||
209 | nr_cpu_ids = nr_cpu_ids - subtract; | ||
210 | #endif | ||
211 | |||
197 | } | 212 | } |
198 | 213 | ||
199 | static void __init xen_smp_prepare_boot_cpu(void) | 214 | static void __init xen_smp_prepare_boot_cpu(void) |
diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S index 79d7362ad6d1..3e45aa000718 100644 --- a/arch/x86/xen/xen-asm.S +++ b/arch/x86/xen/xen-asm.S | |||
@@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct) | |||
96 | 96 | ||
97 | /* check for unmasked and pending */ | 97 | /* check for unmasked and pending */ |
98 | cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending | 98 | cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending |
99 | jz 1f | 99 | jnz 1f |
100 | 2: call check_events | 100 | 2: call check_events |
101 | 1: | 101 | 1: |
102 | ENDPATCH(xen_restore_fl_direct) | 102 | ENDPATCH(xen_restore_fl_direct) |
diff --git a/arch/xtensa/include/asm/hardirq.h b/arch/xtensa/include/asm/hardirq.h index 26664cef8f11..91695a135498 100644 --- a/arch/xtensa/include/asm/hardirq.h +++ b/arch/xtensa/include/asm/hardirq.h | |||
@@ -11,9 +11,6 @@ | |||
11 | #ifndef _XTENSA_HARDIRQ_H | 11 | #ifndef _XTENSA_HARDIRQ_H |
12 | #define _XTENSA_HARDIRQ_H | 12 | #define _XTENSA_HARDIRQ_H |
13 | 13 | ||
14 | void ack_bad_irq(unsigned int irq); | ||
15 | #define ack_bad_irq ack_bad_irq | ||
16 | |||
17 | #include <asm-generic/hardirq.h> | 14 | #include <asm-generic/hardirq.h> |
18 | 15 | ||
19 | #endif /* _XTENSA_HARDIRQ_H */ | 16 | #endif /* _XTENSA_HARDIRQ_H */ |
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h index d04cd3a625fa..4beb43c087d3 100644 --- a/arch/xtensa/include/asm/io.h +++ b/arch/xtensa/include/asm/io.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <linux/bug.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | 19 | ||
19 | #include <linux/types.h> | 20 | #include <linux/types.h> |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index b69b000349fc..d78869a00b11 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -496,6 +496,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
496 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 496 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
497 | 497 | ||
498 | if (signr > 0) { | 498 | if (signr > 0) { |
499 | int ret; | ||
499 | 500 | ||
500 | /* Are we from a system call? */ | 501 | /* Are we from a system call? */ |
501 | 502 | ||