diff options
28 files changed, 108 insertions, 52 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fdc9d4dbf85b..377a7a595b08 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1540,7 +1540,6 @@ config HIGHMEM | |||
| 1540 | config HIGHPTE | 1540 | config HIGHPTE |
| 1541 | bool "Allocate 2nd-level pagetables from highmem" | 1541 | bool "Allocate 2nd-level pagetables from highmem" |
| 1542 | depends on HIGHMEM | 1542 | depends on HIGHMEM |
| 1543 | depends on !OUTER_CACHE | ||
| 1544 | 1543 | ||
| 1545 | config HW_PERF_EVENTS | 1544 | config HW_PERF_EVENTS |
| 1546 | bool "Enable hardware performance counter support for perf events" | 1545 | bool "Enable hardware performance counter support for perf events" |
| @@ -2012,6 +2011,8 @@ source "kernel/power/Kconfig" | |||
| 2012 | 2011 | ||
| 2013 | config ARCH_SUSPEND_POSSIBLE | 2012 | config ARCH_SUSPEND_POSSIBLE |
| 2014 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 | 2013 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 |
| 2014 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | ||
| 2015 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | ||
| 2015 | def_bool y | 2016 | def_bool y |
| 2016 | 2017 | ||
| 2017 | endmenu | 2018 | endmenu |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 494224a9b459..03d01d783e3b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -63,17 +63,6 @@ config DEBUG_USER | |||
| 63 | 8 - SIGSEGV faults | 63 | 8 - SIGSEGV faults |
| 64 | 16 - SIGBUS faults | 64 | 16 - SIGBUS faults |
| 65 | 65 | ||
| 66 | config DEBUG_ERRORS | ||
| 67 | bool "Verbose kernel error messages" | ||
| 68 | depends on DEBUG_KERNEL | ||
| 69 | help | ||
| 70 | This option controls verbose debugging information which can be | ||
| 71 | printed when the kernel detects an internal error. This debugging | ||
| 72 | information is useful to kernel hackers when tracking down problems, | ||
| 73 | but mostly meaningless to other people. It's safe to say Y unless | ||
| 74 | you are concerned with the code size or don't want to see these | ||
| 75 | messages. | ||
| 76 | |||
| 77 | config DEBUG_STACK_USAGE | 66 | config DEBUG_STACK_USAGE |
| 78 | bool "Enable stack utilization instrumentation" | 67 | bool "Enable stack utilization instrumentation" |
| 79 | depends on DEBUG_KERNEL | 68 | depends on DEBUG_KERNEL |
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index e7521bca2c35..6ea9b6f3607a 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
| @@ -16,5 +16,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
| 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
| 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
| 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
| 19 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
| 20 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 19 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
diff --git a/arch/arm/include/asm/thread_notify.h b/arch/arm/include/asm/thread_notify.h index c4391ba20350..1dc980675894 100644 --- a/arch/arm/include/asm/thread_notify.h +++ b/arch/arm/include/asm/thread_notify.h | |||
| @@ -43,6 +43,7 @@ static inline void thread_notify(unsigned long rc, struct thread_info *thread) | |||
| 43 | #define THREAD_NOTIFY_FLUSH 0 | 43 | #define THREAD_NOTIFY_FLUSH 0 |
| 44 | #define THREAD_NOTIFY_EXIT 1 | 44 | #define THREAD_NOTIFY_EXIT 1 |
| 45 | #define THREAD_NOTIFY_SWITCH 2 | 45 | #define THREAD_NOTIFY_SWITCH 2 |
| 46 | #define THREAD_NOTIFY_COPY 3 | ||
| 46 | 47 | ||
| 47 | #endif | 48 | #endif |
| 48 | #endif | 49 | #endif |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 74554f1742d7..8d95446150a3 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
| @@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o | |||
| 29 | obj-$(CONFIG_ARTHUR) += arthur.o | 29 | obj-$(CONFIG_ARTHUR) += arthur.o |
| 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
| 31 | obj-$(CONFIG_PCI) += bios32.o isa.o | 31 | obj-$(CONFIG_PCI) += bios32.o isa.o |
| 32 | obj-$(CONFIG_PM) += sleep.o | 32 | obj-$(CONFIG_PM_SLEEP) += sleep.o |
| 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o | 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o |
| 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
| 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index d4a0da1e48f4..9b05c6a0dcea 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
| @@ -40,15 +40,22 @@ EXPORT_SYMBOL(elf_check_arch); | |||
| 40 | void elf_set_personality(const struct elf32_hdr *x) | 40 | void elf_set_personality(const struct elf32_hdr *x) |
| 41 | { | 41 | { |
| 42 | unsigned int eflags = x->e_flags; | 42 | unsigned int eflags = x->e_flags; |
| 43 | unsigned int personality = PER_LINUX_32BIT; | 43 | unsigned int personality = current->personality & ~PER_MASK; |
| 44 | |||
| 45 | /* | ||
| 46 | * We only support Linux ELF executables, so always set the | ||
| 47 | * personality to LINUX. | ||
| 48 | */ | ||
| 49 | personality |= PER_LINUX; | ||
| 44 | 50 | ||
| 45 | /* | 51 | /* |
| 46 | * APCS-26 is only valid for OABI executables | 52 | * APCS-26 is only valid for OABI executables |
| 47 | */ | 53 | */ |
| 48 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { | 54 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN && |
| 49 | if (eflags & EF_ARM_APCS_26) | 55 | (eflags & EF_ARM_APCS_26)) |
| 50 | personality = PER_LINUX; | 56 | personality &= ~ADDR_LIMIT_32BIT; |
| 51 | } | 57 | else |
| 58 | personality |= ADDR_LIMIT_32BIT; | ||
| 52 | 59 | ||
| 53 | set_personality(personality); | 60 | set_personality(personality); |
| 54 | 61 | ||
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 8dbc126f7152..87acc25d7a3e 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
| @@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info) | |||
| 868 | */ | 868 | */ |
| 869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); | 869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); |
| 870 | isb(); | 870 | isb(); |
| 871 | |||
| 872 | /* | ||
| 873 | * Clear any configured vector-catch events before | ||
| 874 | * enabling monitor mode. | ||
| 875 | */ | ||
| 876 | asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0)); | ||
| 877 | isb(); | ||
| 871 | } | 878 | } |
| 872 | 879 | ||
| 873 | if (enable_monitor_mode()) | 880 | if (enable_monitor_mode()) |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 69cfee0fe00f..979da3947f42 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
| @@ -221,7 +221,7 @@ again: | |||
| 221 | prev_raw_count &= armpmu->max_period; | 221 | prev_raw_count &= armpmu->max_period; |
| 222 | 222 | ||
| 223 | if (overflow) | 223 | if (overflow) |
| 224 | delta = armpmu->max_period - prev_raw_count + new_raw_count; | 224 | delta = armpmu->max_period - prev_raw_count + new_raw_count + 1; |
| 225 | else | 225 | else |
| 226 | delta = new_raw_count - prev_raw_count; | 226 | delta = new_raw_count - prev_raw_count; |
| 227 | 227 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94bbedbed639..5e1e54197227 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -372,6 +372,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
| 372 | if (clone_flags & CLONE_SETTLS) | 372 | if (clone_flags & CLONE_SETTLS) |
| 373 | thread->tp_value = regs->ARM_r3; | 373 | thread->tp_value = regs->ARM_r3; |
| 374 | 374 | ||
| 375 | thread_notify(THREAD_NOTIFY_COPY, thread); | ||
| 376 | |||
| 375 | return 0; | 377 | return 0; |
| 376 | } | 378 | } |
| 377 | 379 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f0000e188c8c..3b54ad19d489 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
| 410 | struct thread_info *thread = current_thread_info(); | 410 | struct thread_info *thread = current_thread_info(); |
| 411 | siginfo_t info; | 411 | siginfo_t info; |
| 412 | 412 | ||
| 413 | if (current->personality != PER_LINUX && | 413 | if ((current->personality & PER_MASK) != PER_LINUX && |
| 414 | current->personality != PER_LINUX_32BIT && | ||
| 415 | thread->exec_domain->handler) { | 414 | thread->exec_domain->handler) { |
| 416 | thread->exec_domain->handler(n, regs); | 415 | thread->exec_domain->handler(n, regs); |
| 417 | return regs->ARM_r0; | 416 | return regs->ARM_r0; |
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h index ee8b02ed8011..7bfb827f3fe3 100644 --- a/arch/arm/mach-mmp/include/mach/gpio.h +++ b/arch/arm/mach-mmp/include/mach/gpio.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
| 11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) | 11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) |
| 12 | 12 | ||
| 13 | #define NR_BUILTIN_GPIO (192) | 13 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM |
| 14 | 14 | ||
| 15 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 15 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
| 16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) | 16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 4621067c7720..713be155a44d 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
| @@ -8,6 +8,15 @@ | |||
| 8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) | 8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) |
| 9 | #define MFP_DRIVE_FAST (0x3 << 13) | 9 | #define MFP_DRIVE_FAST (0x3 << 13) |
| 10 | 10 | ||
| 11 | #undef MFP_CFG | ||
| 12 | #undef MFP_CFG_DRV | ||
| 13 | |||
| 14 | #define MFP_CFG(pin, af) \ | ||
| 15 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM) | ||
| 16 | |||
| 17 | #define MFP_CFG_DRV(pin, af, drv) \ | ||
| 18 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv) | ||
| 19 | |||
| 11 | /* GPIO */ | 20 | /* GPIO */ |
| 12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) | 21 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) |
| 13 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) | 22 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) |
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index b024a8b37439..c4639502efca 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
| @@ -99,11 +99,24 @@ | |||
| 99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | 99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) |
| 100 | 100 | ||
| 101 | 101 | ||
| 102 | #define NR_BUILTIN_GPIO 128 | 102 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM |
| 103 | 103 | ||
| 104 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 104 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
| 105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | 105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) |
| 106 | #define irq_to_gpio(irq) IRQ_TO_GPIO(irq) | 106 | |
| 107 | static inline int irq_to_gpio(unsigned int irq) | ||
| 108 | { | ||
| 109 | int gpio; | ||
| 110 | |||
| 111 | if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1) | ||
| 112 | return irq - IRQ_GPIO0; | ||
| 113 | |||
| 114 | gpio = irq - PXA_GPIO_IRQ_BASE; | ||
| 115 | if (gpio >= 2 && gpio < NR_BUILTIN_GPIO) | ||
| 116 | return gpio; | ||
| 117 | |||
| 118 | return -1; | ||
| 119 | } | ||
| 107 | 120 | ||
| 108 | #ifdef CONFIG_CPU_PXA26x | 121 | #ifdef CONFIG_CPU_PXA26x |
| 109 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | 122 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index a4285fc00878..038402404e39 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
| @@ -93,9 +93,6 @@ | |||
| 93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | 93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) |
| 94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) | 94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) |
| 95 | 95 | ||
| 96 | #define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE) | ||
| 97 | #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) | ||
| 98 | |||
| 99 | /* | 96 | /* |
| 100 | * The following interrupts are for board specific purposes. Since | 97 | * The following interrupts are for board specific purposes. Since |
| 101 | * the kernel can only run on one machine at a time, we can re-use | 98 | * the kernel can only run on one machine at a time, we can re-use |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 6bde5956358d..a4af8c52d7ee 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -285,7 +285,7 @@ static inline void pxa25x_init_pm(void) {} | |||
| 285 | 285 | ||
| 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) | 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) |
| 287 | { | 287 | { |
| 288 | int gpio = IRQ_TO_GPIO(d->irq); | 288 | int gpio = irq_to_gpio(d->irq); |
| 289 | uint32_t mask = 0; | 289 | uint32_t mask = 0; |
| 290 | 290 | ||
| 291 | if (gpio >= 0 && gpio < 85) | 291 | if (gpio >= 0 && gpio < 85) |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 1cb5d0f9723f..909756eaf4b7 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -345,7 +345,7 @@ static inline void pxa27x_init_pm(void) {} | |||
| 345 | */ | 345 | */ |
| 346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) | 346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) |
| 347 | { | 347 | { |
| 348 | int gpio = IRQ_TO_GPIO(d->irq); | 348 | int gpio = irq_to_gpio(d->irq); |
| 349 | uint32_t mask; | 349 | uint32_t mask; |
| 350 | 350 | ||
| 351 | if (gpio >= 0 && gpio < 128) | 351 | if (gpio >= 0 && gpio < 128) |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index afe209e1e1f8..74be05f3e03a 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 10 | #include <linux/personality.h> | ||
| 10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
| 11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
| 12 | #include <asm/system.h> | 13 | #include <asm/system.h> |
| @@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
| 82 | mm->cached_hole_size = 0; | 83 | mm->cached_hole_size = 0; |
| 83 | } | 84 | } |
| 84 | /* 8 bits of randomness in 20 address space bits */ | 85 | /* 8 bits of randomness in 20 address space bits */ |
| 85 | if (current->flags & PF_RANDOMIZE) | 86 | if ((current->flags & PF_RANDOMIZE) && |
| 87 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
| 86 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; | 88 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; |
| 87 | 89 | ||
| 88 | full_search: | 90 | full_search: |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index b46eb21f05c7..bf8a1d1cccb6 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
| @@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
| 390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
| 391 | .globl cpu_arm920_suspend_size | 391 | .globl cpu_arm920_suspend_size |
| 392 | .equ cpu_arm920_suspend_size, 4 * 3 | 392 | .equ cpu_arm920_suspend_size, 4 * 3 |
| 393 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM_SLEEP |
| 394 | ENTRY(cpu_arm920_do_suspend) | 394 | ENTRY(cpu_arm920_do_suspend) |
| 395 | stmfd sp!, {r4 - r7, lr} | 395 | stmfd sp!, {r4 - r7, lr} |
| 396 | mrc p15, 0, r4, c13, c0, 0 @ PID | 396 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 6a4bdb2c94a7..0ed85d930c09 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
| @@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
| 404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
| 405 | .globl cpu_arm926_suspend_size | 405 | .globl cpu_arm926_suspend_size |
| 406 | .equ cpu_arm926_suspend_size, 4 * 3 | 406 | .equ cpu_arm926_suspend_size, 4 * 3 |
| 407 | #ifdef CONFIG_PM | 407 | #ifdef CONFIG_PM_SLEEP |
| 408 | ENTRY(cpu_arm926_do_suspend) | 408 | ENTRY(cpu_arm926_do_suspend) |
| 409 | stmfd sp!, {r4 - r7, lr} | 409 | stmfd sp!, {r4 - r7, lr} |
| 410 | mrc p15, 0, r4, c13, c0, 0 @ PID | 410 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 74483d1977fe..184a9c997e36 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
| @@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext) | |||
| 171 | 171 | ||
| 172 | .globl cpu_sa1100_suspend_size | 172 | .globl cpu_sa1100_suspend_size |
| 173 | .equ cpu_sa1100_suspend_size, 4*4 | 173 | .equ cpu_sa1100_suspend_size, 4*4 |
| 174 | #ifdef CONFIG_PM | 174 | #ifdef CONFIG_PM_SLEEP |
| 175 | ENTRY(cpu_sa1100_do_suspend) | 175 | ENTRY(cpu_sa1100_do_suspend) |
| 176 | stmfd sp!, {r4 - r7, lr} | 176 | stmfd sp!, {r4 - r7, lr} |
| 177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID | 177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index bfa0c9f611c5..7c99cb4c8e4f 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
| @@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext) | |||
| 124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ | 124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ |
| 125 | .globl cpu_v6_suspend_size | 125 | .globl cpu_v6_suspend_size |
| 126 | .equ cpu_v6_suspend_size, 4 * 8 | 126 | .equ cpu_v6_suspend_size, 4 * 8 |
| 127 | #ifdef CONFIG_PM | 127 | #ifdef CONFIG_PM_SLEEP |
| 128 | ENTRY(cpu_v6_do_suspend) | 128 | ENTRY(cpu_v6_do_suspend) |
| 129 | stmfd sp!, {r4 - r11, lr} | 129 | stmfd sp!, {r4 - r11, lr} |
| 130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index c35618e42f6f..babfba09c89f 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -211,7 +211,7 @@ cpu_v7_name: | |||
| 211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
| 212 | .globl cpu_v7_suspend_size | 212 | .globl cpu_v7_suspend_size |
| 213 | .equ cpu_v7_suspend_size, 4 * 8 | 213 | .equ cpu_v7_suspend_size, 4 * 8 |
| 214 | #ifdef CONFIG_PM | 214 | #ifdef CONFIG_PM_SLEEP |
| 215 | ENTRY(cpu_v7_do_suspend) | 215 | ENTRY(cpu_v7_do_suspend) |
| 216 | stmfd sp!, {r4 - r11, lr} | 216 | stmfd sp!, {r4 - r11, lr} |
| 217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 63d8b2044e84..596213699f37 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
| @@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
| 417 | 417 | ||
| 418 | .globl cpu_xsc3_suspend_size | 418 | .globl cpu_xsc3_suspend_size |
| 419 | .equ cpu_xsc3_suspend_size, 4 * 8 | 419 | .equ cpu_xsc3_suspend_size, 4 * 8 |
| 420 | #ifdef CONFIG_PM | 420 | #ifdef CONFIG_PM_SLEEP |
| 421 | ENTRY(cpu_xsc3_do_suspend) | 421 | ENTRY(cpu_xsc3_do_suspend) |
| 422 | stmfd sp!, {r4 - r10, lr} | 422 | stmfd sp!, {r4 - r10, lr} |
| 423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 086038cd86ab..ce233bcbf506 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
| @@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext) | |||
| 518 | 518 | ||
| 519 | .globl cpu_xscale_suspend_size | 519 | .globl cpu_xscale_suspend_size |
| 520 | .equ cpu_xscale_suspend_size, 4 * 7 | 520 | .equ cpu_xscale_suspend_size, 4 * 7 |
| 521 | #ifdef CONFIG_PM | 521 | #ifdef CONFIG_PM_SLEEP |
| 522 | ENTRY(cpu_xscale_do_suspend) | 522 | ENTRY(cpu_xscale_do_suspend) |
| 523 | stmfd sp!, {r4 - r10, lr} | 523 | stmfd sp!, {r4 - r10, lr} |
| 524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index bbf3da012afd..f74695075e64 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
| @@ -78,6 +78,14 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
| 78 | put_cpu(); | 78 | put_cpu(); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static void vfp_thread_copy(struct thread_info *thread) | ||
| 82 | { | ||
| 83 | struct thread_info *parent = current_thread_info(); | ||
| 84 | |||
| 85 | vfp_sync_hwstate(parent); | ||
| 86 | thread->vfpstate = parent->vfpstate; | ||
| 87 | } | ||
| 88 | |||
| 81 | /* | 89 | /* |
| 82 | * When this function is called with the following 'cmd's, the following | 90 | * When this function is called with the following 'cmd's, the following |
| 83 | * is true while this function is being run: | 91 | * is true while this function is being run: |
| @@ -104,12 +112,17 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
| 104 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | 112 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) |
| 105 | { | 113 | { |
| 106 | struct thread_info *thread = v; | 114 | struct thread_info *thread = v; |
| 115 | u32 fpexc; | ||
| 116 | #ifdef CONFIG_SMP | ||
| 117 | unsigned int cpu; | ||
| 118 | #endif | ||
| 107 | 119 | ||
| 108 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { | 120 | switch (cmd) { |
| 109 | u32 fpexc = fmrx(FPEXC); | 121 | case THREAD_NOTIFY_SWITCH: |
| 122 | fpexc = fmrx(FPEXC); | ||
| 110 | 123 | ||
| 111 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
| 112 | unsigned int cpu = thread->cpu; | 125 | cpu = thread->cpu; |
| 113 | 126 | ||
| 114 | /* | 127 | /* |
| 115 | * On SMP, if VFP is enabled, save the old state in | 128 | * On SMP, if VFP is enabled, save the old state in |
| @@ -134,13 +147,20 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
| 134 | * old state. | 147 | * old state. |
| 135 | */ | 148 | */ |
| 136 | fmxr(FPEXC, fpexc & ~FPEXC_EN); | 149 | fmxr(FPEXC, fpexc & ~FPEXC_EN); |
| 137 | return NOTIFY_DONE; | 150 | break; |
| 138 | } | ||
| 139 | 151 | ||
| 140 | if (cmd == THREAD_NOTIFY_FLUSH) | 152 | case THREAD_NOTIFY_FLUSH: |
| 141 | vfp_thread_flush(thread); | 153 | vfp_thread_flush(thread); |
| 142 | else | 154 | break; |
| 155 | |||
| 156 | case THREAD_NOTIFY_EXIT: | ||
| 143 | vfp_thread_exit(thread); | 157 | vfp_thread_exit(thread); |
| 158 | break; | ||
| 159 | |||
| 160 | case THREAD_NOTIFY_COPY: | ||
| 161 | vfp_thread_copy(thread); | ||
| 162 | break; | ||
| 163 | } | ||
| 144 | 164 | ||
| 145 | return NOTIFY_DONE; | 165 | return NOTIFY_DONE; |
| 146 | } | 166 | } |
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c index 453c54c97612..4c3e94c0ae85 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/drivers/pcmcia/pxa2xx_balloon3.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | 25 | ||
| 26 | #include <mach/balloon3.h> | 26 | #include <mach/balloon3.h> |
| 27 | 27 | ||
| 28 | #include <asm/mach-types.h> | ||
| 29 | |||
| 28 | #include "soc_common.h" | 30 | #include "soc_common.h" |
| 29 | 31 | ||
| 30 | /* | 32 | /* |
| @@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void) | |||
| 127 | { | 129 | { |
| 128 | int ret; | 130 | int ret; |
| 129 | 131 | ||
| 132 | if (!machine_is_balloon3()) | ||
| 133 | return -ENODEV; | ||
| 134 | |||
| 130 | balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | 135 | balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); |
| 131 | if (!balloon3_pcmcia_device) | 136 | if (!balloon3_pcmcia_device) |
| 132 | return -ENOMEM; | 137 | return -ENOMEM; |
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c index b7e596620db1..b829e655457b 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/drivers/pcmcia/pxa2xx_trizeps4.c | |||
| @@ -69,15 +69,15 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 69 | for (i = 0; i < ARRAY_SIZE(irqs); i++) { | 69 | for (i = 0; i < ARRAY_SIZE(irqs); i++) { |
| 70 | if (irqs[i].sock != skt->nr) | 70 | if (irqs[i].sock != skt->nr) |
| 71 | continue; | 71 | continue; |
| 72 | if (gpio_request(IRQ_TO_GPIO(irqs[i].irq), irqs[i].str) < 0) { | 72 | if (gpio_request(irq_to_gpio(irqs[i].irq), irqs[i].str) < 0) { |
| 73 | pr_err("%s: sock %d unable to request gpio %d\n", | 73 | pr_err("%s: sock %d unable to request gpio %d\n", |
| 74 | __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq)); | 74 | __func__, skt->nr, irq_to_gpio(irqs[i].irq)); |
| 75 | ret = -EBUSY; | 75 | ret = -EBUSY; |
| 76 | goto error; | 76 | goto error; |
| 77 | } | 77 | } |
| 78 | if (gpio_direction_input(IRQ_TO_GPIO(irqs[i].irq)) < 0) { | 78 | if (gpio_direction_input(irq_to_gpio(irqs[i].irq)) < 0) { |
| 79 | pr_err("%s: sock %d unable to set input gpio %d\n", | 79 | pr_err("%s: sock %d unable to set input gpio %d\n", |
| 80 | __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq)); | 80 | __func__, skt->nr, irq_to_gpio(irqs[i].irq)); |
| 81 | ret = -EINVAL; | 81 | ret = -EINVAL; |
| 82 | goto error; | 82 | goto error; |
| 83 | } | 83 | } |
| @@ -86,7 +86,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 86 | 86 | ||
| 87 | error: | 87 | error: |
| 88 | for (; i >= 0; i--) { | 88 | for (; i >= 0; i--) { |
| 89 | gpio_free(IRQ_TO_GPIO(irqs[i].irq)); | 89 | gpio_free(irq_to_gpio(irqs[i].irq)); |
| 90 | } | 90 | } |
| 91 | return (ret); | 91 | return (ret); |
| 92 | } | 92 | } |
| @@ -97,7 +97,7 @@ static void trizeps_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | |||
| 97 | /* free allocated gpio's */ | 97 | /* free allocated gpio's */ |
| 98 | gpio_free(GPIO_PRDY); | 98 | gpio_free(GPIO_PRDY); |
| 99 | for (i = 0; i < ARRAY_SIZE(irqs); i++) | 99 | for (i = 0; i < ARRAY_SIZE(irqs); i++) |
| 100 | gpio_free(IRQ_TO_GPIO(irqs[i].irq)); | 100 | gpio_free(irq_to_gpio(irqs[i].irq)); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static unsigned long trizeps_pcmcia_status[2]; | 103 | static unsigned long trizeps_pcmcia_status[2]; |
| @@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void) | |||
| 226 | { | 226 | { |
| 227 | int ret; | 227 | int ret; |
| 228 | 228 | ||
| 229 | if (!machine_is_trizeps4() && !machine_is_trizeps4wl()) | ||
| 230 | return -ENODEV; | ||
| 231 | |||
| 229 | trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | 232 | trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); |
| 230 | if (!trizeps_pcmcia_device) | 233 | if (!trizeps_pcmcia_device) |
| 231 | return -ENOMEM; | 234 | return -ENOMEM; |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index a2e5b5100ab4..0f4e8c942f9e 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
| @@ -1648,7 +1648,9 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data) | |||
| 1648 | 1648 | ||
| 1649 | switch (val) { | 1649 | switch (val) { |
| 1650 | case CPUFREQ_PRECHANGE: | 1650 | case CPUFREQ_PRECHANGE: |
| 1651 | if (!fbi->overlay[0].usage && !fbi->overlay[1].usage) | 1651 | #ifdef CONFIG_FB_PXA_OVERLAY |
| 1652 | if (!(fbi->overlay[0].usage || fbi->overlay[1].usage)) | ||
| 1653 | #endif | ||
| 1652 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); | 1654 | set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); |
| 1653 | break; | 1655 | break; |
| 1654 | 1656 | ||
