diff options
Diffstat (limited to 'arch')
332 files changed, 3682 insertions, 1998 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 135c674eaf9e..d39dc9b95a2c 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
| @@ -16,8 +16,8 @@ config ALPHA | |||
| 16 | select ARCH_WANT_IPC_PARSE_VERSION | 16 | select ARCH_WANT_IPC_PARSE_VERSION |
| 17 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 17 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
| 18 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 18 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
| 19 | select GENERIC_CLOCKEVENTS | ||
| 19 | select GENERIC_SMP_IDLE_THREAD | 20 | select GENERIC_SMP_IDLE_THREAD |
| 20 | select GENERIC_CMOS_UPDATE | ||
| 21 | select GENERIC_STRNCPY_FROM_USER | 21 | select GENERIC_STRNCPY_FROM_USER |
| 22 | select GENERIC_STRNLEN_USER | 22 | select GENERIC_STRNLEN_USER |
| 23 | select HAVE_MOD_ARCH_SPECIFIC | 23 | select HAVE_MOD_ARCH_SPECIFIC |
| @@ -488,6 +488,20 @@ config VGA_HOSE | |||
| 488 | which always have multiple hoses, and whose consoles support it. | 488 | which always have multiple hoses, and whose consoles support it. |
| 489 | 489 | ||
| 490 | 490 | ||
| 491 | config ALPHA_QEMU | ||
| 492 | bool "Run under QEMU emulation" | ||
| 493 | depends on !ALPHA_GENERIC | ||
| 494 | ---help--- | ||
| 495 | Assume the presence of special features supported by QEMU PALcode | ||
| 496 | that reduce the overhead of system emulation. | ||
| 497 | |||
| 498 | Generic kernels will auto-detect QEMU. But when building a | ||
| 499 | system-specific kernel, the assumption is that we want to | ||
| 500 | elimiate as many runtime tests as possible. | ||
| 501 | |||
| 502 | If unsure, say N. | ||
| 503 | |||
| 504 | |||
| 491 | config ALPHA_SRM | 505 | config ALPHA_SRM |
| 492 | bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME | 506 | bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME |
| 493 | depends on TTY | 507 | depends on TTY |
| @@ -572,6 +586,30 @@ config NUMA | |||
| 572 | Access). This option is for configuring high-end multiprocessor | 586 | Access). This option is for configuring high-end multiprocessor |
| 573 | server machines. If in doubt, say N. | 587 | server machines. If in doubt, say N. |
| 574 | 588 | ||
| 589 | config ALPHA_WTINT | ||
| 590 | bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC | ||
| 591 | default y if ALPHA_QEMU | ||
| 592 | default n if ALPHA_EV5 || ALPHA_EV56 || (ALPHA_EV4 && !ALPHA_LCA) | ||
| 593 | default n if !ALPHA_SRM && !ALPHA_GENERIC | ||
| 594 | default y if SMP | ||
| 595 | ---help--- | ||
| 596 | The Wait for Interrupt (WTINT) PALcall attempts to place the CPU | ||
| 597 | to sleep until the next interrupt. This may reduce the power | ||
| 598 | consumed, and the heat produced by the computer. However, it has | ||
| 599 | the side effect of making the cycle counter unreliable as a timing | ||
| 600 | device across the sleep. | ||
| 601 | |||
| 602 | For emulation under QEMU, definitely say Y here, as we have other | ||
| 603 | mechanisms for measuring time than the cycle counter. | ||
| 604 | |||
| 605 | For EV4 (but not LCA), EV5 and EV56 systems, or for systems running | ||
| 606 | MILO, sleep mode is not supported so you might as well say N here. | ||
| 607 | |||
| 608 | For SMP systems we cannot use the cycle counter for timing anyway, | ||
| 609 | so you might as well say Y here. | ||
| 610 | |||
| 611 | If unsure, say N. | ||
| 612 | |||
| 575 | config NODES_SHIFT | 613 | config NODES_SHIFT |
| 576 | int | 614 | int |
| 577 | default "7" | 615 | default "7" |
| @@ -613,9 +651,41 @@ config VERBOSE_MCHECK_ON | |||
| 613 | 651 | ||
| 614 | Take the default (1) unless you want more control or more info. | 652 | Take the default (1) unless you want more control or more info. |
| 615 | 653 | ||
| 654 | choice | ||
| 655 | prompt "Timer interrupt frequency (HZ)?" | ||
| 656 | default HZ_128 if ALPHA_QEMU | ||
| 657 | default HZ_1200 if ALPHA_RAWHIDE | ||
| 658 | default HZ_1024 | ||
| 659 | ---help--- | ||
| 660 | The frequency at which timer interrupts occur. A high frequency | ||
| 661 | minimizes latency, whereas a low frequency minimizes overhead of | ||
| 662 | process accounting. The later effect is especially significant | ||
| 663 | when being run under QEMU. | ||
| 664 | |||
| 665 | Note that some Alpha hardware cannot change the interrupt frequency | ||
| 666 | of the timer. If unsure, say 1024 (or 1200 for Rawhide). | ||
| 667 | |||
| 668 | config HZ_32 | ||
| 669 | bool "32 Hz" | ||
| 670 | config HZ_64 | ||
| 671 | bool "64 Hz" | ||
| 672 | config HZ_128 | ||
| 673 | bool "128 Hz" | ||
| 674 | config HZ_256 | ||
| 675 | bool "256 Hz" | ||
| 676 | config HZ_1024 | ||
| 677 | bool "1024 Hz" | ||
| 678 | config HZ_1200 | ||
| 679 | bool "1200 Hz" | ||
| 680 | endchoice | ||
| 681 | |||
| 616 | config HZ | 682 | config HZ |
| 617 | int | 683 | int |
| 618 | default 1200 if ALPHA_RAWHIDE | 684 | default 32 if HZ_32 |
| 685 | default 64 if HZ_64 | ||
| 686 | default 128 if HZ_128 | ||
| 687 | default 256 if HZ_256 | ||
| 688 | default 1200 if HZ_1200 | ||
| 619 | default 1024 | 689 | default 1024 |
| 620 | 690 | ||
| 621 | source "drivers/pci/Kconfig" | 691 | source "drivers/pci/Kconfig" |
diff --git a/arch/alpha/include/asm/machvec.h b/arch/alpha/include/asm/machvec.h index 72dbf2359270..75cb3641ed2f 100644 --- a/arch/alpha/include/asm/machvec.h +++ b/arch/alpha/include/asm/machvec.h | |||
| @@ -33,6 +33,7 @@ struct alpha_machine_vector | |||
| 33 | 33 | ||
| 34 | int nr_irqs; | 34 | int nr_irqs; |
| 35 | int rtc_port; | 35 | int rtc_port; |
| 36 | int rtc_boot_cpu_only; | ||
| 36 | unsigned int max_asn; | 37 | unsigned int max_asn; |
| 37 | unsigned long max_isa_dma_address; | 38 | unsigned long max_isa_dma_address; |
| 38 | unsigned long irq_probe_mask; | 39 | unsigned long irq_probe_mask; |
| @@ -95,9 +96,6 @@ struct alpha_machine_vector | |||
| 95 | 96 | ||
| 96 | struct _alpha_agp_info *(*agp_info)(void); | 97 | struct _alpha_agp_info *(*agp_info)(void); |
| 97 | 98 | ||
| 98 | unsigned int (*rtc_get_time)(struct rtc_time *); | ||
| 99 | int (*rtc_set_time)(struct rtc_time *); | ||
| 100 | |||
| 101 | const char *vector_name; | 99 | const char *vector_name; |
| 102 | 100 | ||
| 103 | /* NUMA information */ | 101 | /* NUMA information */ |
| @@ -126,13 +124,19 @@ extern struct alpha_machine_vector alpha_mv; | |||
| 126 | 124 | ||
| 127 | #ifdef CONFIG_ALPHA_GENERIC | 125 | #ifdef CONFIG_ALPHA_GENERIC |
| 128 | extern int alpha_using_srm; | 126 | extern int alpha_using_srm; |
| 127 | extern int alpha_using_qemu; | ||
| 129 | #else | 128 | #else |
| 130 | #ifdef CONFIG_ALPHA_SRM | 129 | # ifdef CONFIG_ALPHA_SRM |
| 131 | #define alpha_using_srm 1 | 130 | # define alpha_using_srm 1 |
| 132 | #else | 131 | # else |
| 133 | #define alpha_using_srm 0 | 132 | # define alpha_using_srm 0 |
| 134 | #endif | 133 | # endif |
| 134 | # ifdef CONFIG_ALPHA_QEMU | ||
| 135 | # define alpha_using_qemu 1 | ||
| 136 | # else | ||
| 137 | # define alpha_using_qemu 0 | ||
| 138 | # endif | ||
| 135 | #endif /* GENERIC */ | 139 | #endif /* GENERIC */ |
| 136 | 140 | ||
| 137 | #endif | 141 | #endif /* __KERNEL__ */ |
| 138 | #endif /* __ALPHA_MACHVEC_H */ | 142 | #endif /* __ALPHA_MACHVEC_H */ |
diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h index 6fcd2b5b08f0..5422a47646fc 100644 --- a/arch/alpha/include/asm/pal.h +++ b/arch/alpha/include/asm/pal.h | |||
| @@ -89,6 +89,7 @@ __CALL_PAL_W1(wrmces, unsigned long); | |||
| 89 | __CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long); | 89 | __CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long); |
| 90 | __CALL_PAL_W1(wrusp, unsigned long); | 90 | __CALL_PAL_W1(wrusp, unsigned long); |
| 91 | __CALL_PAL_W1(wrvptptr, unsigned long); | 91 | __CALL_PAL_W1(wrvptptr, unsigned long); |
| 92 | __CALL_PAL_RW1(wtint, unsigned long, unsigned long); | ||
| 92 | 93 | ||
| 93 | /* | 94 | /* |
| 94 | * TB routines.. | 95 | * TB routines.. |
| @@ -111,5 +112,75 @@ __CALL_PAL_W1(wrvptptr, unsigned long); | |||
| 111 | #define tbiap() __tbi(-1, /* no second argument */) | 112 | #define tbiap() __tbi(-1, /* no second argument */) |
| 112 | #define tbia() __tbi(-2, /* no second argument */) | 113 | #define tbia() __tbi(-2, /* no second argument */) |
| 113 | 114 | ||
| 115 | /* | ||
| 116 | * QEMU Cserv routines.. | ||
| 117 | */ | ||
| 118 | |||
| 119 | static inline unsigned long | ||
| 120 | qemu_get_walltime(void) | ||
| 121 | { | ||
| 122 | register unsigned long v0 __asm__("$0"); | ||
| 123 | register unsigned long a0 __asm__("$16") = 3; | ||
| 124 | |||
| 125 | asm("call_pal %2 # cserve get_time" | ||
| 126 | : "=r"(v0), "+r"(a0) | ||
| 127 | : "i"(PAL_cserve) | ||
| 128 | : "$17", "$18", "$19", "$20", "$21"); | ||
| 129 | |||
| 130 | return v0; | ||
| 131 | } | ||
| 132 | |||
| 133 | static inline unsigned long | ||
| 134 | qemu_get_alarm(void) | ||
| 135 | { | ||
| 136 | register unsigned long v0 __asm__("$0"); | ||
| 137 | register unsigned long a0 __asm__("$16") = 4; | ||
| 138 | |||
| 139 | asm("call_pal %2 # cserve get_alarm" | ||
| 140 | : "=r"(v0), "+r"(a0) | ||
| 141 | : "i"(PAL_cserve) | ||
| 142 | : "$17", "$18", "$19", "$20", "$21"); | ||
| 143 | |||
| 144 | return v0; | ||
| 145 | } | ||
| 146 | |||
| 147 | static inline void | ||
| 148 | qemu_set_alarm_rel(unsigned long expire) | ||
| 149 | { | ||
| 150 | register unsigned long a0 __asm__("$16") = 5; | ||
| 151 | register unsigned long a1 __asm__("$17") = expire; | ||
| 152 | |||
| 153 | asm volatile("call_pal %2 # cserve set_alarm_rel" | ||
| 154 | : "+r"(a0), "+r"(a1) | ||
| 155 | : "i"(PAL_cserve) | ||
| 156 | : "$0", "$18", "$19", "$20", "$21"); | ||
| 157 | } | ||
| 158 | |||
| 159 | static inline void | ||
| 160 | qemu_set_alarm_abs(unsigned long expire) | ||
| 161 | { | ||
| 162 | register unsigned long a0 __asm__("$16") = 6; | ||
| 163 | register unsigned long a1 __asm__("$17") = expire; | ||
| 164 | |||
| 165 | asm volatile("call_pal %2 # cserve set_alarm_abs" | ||
| 166 | : "+r"(a0), "+r"(a1) | ||
| 167 | : "i"(PAL_cserve) | ||
| 168 | : "$0", "$18", "$19", "$20", "$21"); | ||
| 169 | } | ||
| 170 | |||
| 171 | static inline unsigned long | ||
| 172 | qemu_get_vmtime(void) | ||
| 173 | { | ||
| 174 | register unsigned long v0 __asm__("$0"); | ||
| 175 | register unsigned long a0 __asm__("$16") = 7; | ||
| 176 | |||
| 177 | asm("call_pal %2 # cserve get_time" | ||
| 178 | : "=r"(v0), "+r"(a0) | ||
| 179 | : "i"(PAL_cserve) | ||
| 180 | : "$17", "$18", "$19", "$20", "$21"); | ||
| 181 | |||
| 182 | return v0; | ||
| 183 | } | ||
| 184 | |||
| 114 | #endif /* !__ASSEMBLY__ */ | 185 | #endif /* !__ASSEMBLY__ */ |
| 115 | #endif /* __ALPHA_PAL_H */ | 186 | #endif /* __ALPHA_PAL_H */ |
diff --git a/arch/alpha/include/asm/rtc.h b/arch/alpha/include/asm/rtc.h index d70408d36677..f71c3b0ed360 100644 --- a/arch/alpha/include/asm/rtc.h +++ b/arch/alpha/include/asm/rtc.h | |||
| @@ -1,12 +1 @@ | |||
| 1 | #ifndef _ALPHA_RTC_H | ||
| 2 | #define _ALPHA_RTC_H | ||
| 3 | |||
| 4 | #if defined(CONFIG_ALPHA_MARVEL) && defined(CONFIG_SMP) \ | ||
| 5 | || defined(CONFIG_ALPHA_GENERIC) | ||
| 6 | # define get_rtc_time alpha_mv.rtc_get_time | ||
| 7 | # define set_rtc_time alpha_mv.rtc_set_time | ||
| 8 | #endif | ||
| 9 | |||
| 10 | #include <asm-generic/rtc.h> | #include <asm-generic/rtc.h> | |
| 11 | |||
| 12 | #endif | ||
diff --git a/arch/alpha/include/asm/string.h b/arch/alpha/include/asm/string.h index b02b8a282940..c2911f591704 100644 --- a/arch/alpha/include/asm/string.h +++ b/arch/alpha/include/asm/string.h | |||
| @@ -22,15 +22,27 @@ extern void * __memcpy(void *, const void *, size_t); | |||
| 22 | 22 | ||
| 23 | #define __HAVE_ARCH_MEMSET | 23 | #define __HAVE_ARCH_MEMSET |
| 24 | extern void * __constant_c_memset(void *, unsigned long, size_t); | 24 | extern void * __constant_c_memset(void *, unsigned long, size_t); |
| 25 | extern void * ___memset(void *, int, size_t); | ||
| 25 | extern void * __memset(void *, int, size_t); | 26 | extern void * __memset(void *, int, size_t); |
| 26 | extern void * memset(void *, int, size_t); | 27 | extern void * memset(void *, int, size_t); |
| 27 | 28 | ||
| 28 | #define memset(s, c, n) \ | 29 | /* For gcc 3.x, we cannot have the inline function named "memset" because |
| 29 | (__builtin_constant_p(c) \ | 30 | the __builtin_memset will attempt to resolve to the inline as well, |
| 30 | ? (__builtin_constant_p(n) && (c) == 0 \ | 31 | leading to a "sorry" about unimplemented recursive inlining. */ |
| 31 | ? __builtin_memset((s),0,(n)) \ | 32 | extern inline void *__memset(void *s, int c, size_t n) |
| 32 | : __constant_c_memset((s),0x0101010101010101UL*(unsigned char)(c),(n))) \ | 33 | { |
| 33 | : __memset((s),(c),(n))) | 34 | if (__builtin_constant_p(c)) { |
| 35 | if (__builtin_constant_p(n)) { | ||
| 36 | return __builtin_memset(s, c, n); | ||
| 37 | } else { | ||
| 38 | unsigned long c8 = (c & 0xff) * 0x0101010101010101UL; | ||
| 39 | return __constant_c_memset(s, c8, n); | ||
| 40 | } | ||
| 41 | } | ||
| 42 | return ___memset(s, c, n); | ||
| 43 | } | ||
| 44 | |||
| 45 | #define memset __memset | ||
| 34 | 46 | ||
| 35 | #define __HAVE_ARCH_STRCPY | 47 | #define __HAVE_ARCH_STRCPY |
| 36 | extern char * strcpy(char *,const char *); | 48 | extern char * strcpy(char *,const char *); |
diff --git a/arch/alpha/include/uapi/asm/pal.h b/arch/alpha/include/uapi/asm/pal.h index 3c0ce08e5f59..dfc8140b9088 100644 --- a/arch/alpha/include/uapi/asm/pal.h +++ b/arch/alpha/include/uapi/asm/pal.h | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | #define PAL_rdusp 58 | 46 | #define PAL_rdusp 58 |
| 47 | #define PAL_whami 60 | 47 | #define PAL_whami 60 |
| 48 | #define PAL_retsys 61 | 48 | #define PAL_retsys 61 |
| 49 | #define PAL_wtint 62 | ||
| 49 | #define PAL_rti 63 | 50 | #define PAL_rti 63 |
| 50 | 51 | ||
| 51 | 52 | ||
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index 84ec46b38f7d..0d54650e78fc 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile | |||
| @@ -16,6 +16,7 @@ obj-$(CONFIG_PCI) += pci.o pci_iommu.o pci-sysfs.o | |||
| 16 | obj-$(CONFIG_SRM_ENV) += srm_env.o | 16 | obj-$(CONFIG_SRM_ENV) += srm_env.o |
| 17 | obj-$(CONFIG_MODULES) += module.o | 17 | obj-$(CONFIG_MODULES) += module.o |
| 18 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o | 18 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o |
| 19 | obj-$(CONFIG_RTC_DRV_ALPHA) += rtc.o | ||
| 19 | 20 | ||
| 20 | ifdef CONFIG_ALPHA_GENERIC | 21 | ifdef CONFIG_ALPHA_GENERIC |
| 21 | 22 | ||
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index 89566b346c0f..f4c7ab6f43b0 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
| @@ -40,6 +40,7 @@ EXPORT_SYMBOL(strrchr); | |||
| 40 | EXPORT_SYMBOL(memmove); | 40 | EXPORT_SYMBOL(memmove); |
| 41 | EXPORT_SYMBOL(__memcpy); | 41 | EXPORT_SYMBOL(__memcpy); |
| 42 | EXPORT_SYMBOL(__memset); | 42 | EXPORT_SYMBOL(__memset); |
| 43 | EXPORT_SYMBOL(___memset); | ||
| 43 | EXPORT_SYMBOL(__memsetw); | 44 | EXPORT_SYMBOL(__memsetw); |
| 44 | EXPORT_SYMBOL(__constant_c_memset); | 45 | EXPORT_SYMBOL(__constant_c_memset); |
| 45 | EXPORT_SYMBOL(copy_page); | 46 | EXPORT_SYMBOL(copy_page); |
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 28e4429596f3..1c8625cb0e25 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
| @@ -66,21 +66,7 @@ do_entInt(unsigned long type, unsigned long vector, | |||
| 66 | break; | 66 | break; |
| 67 | case 1: | 67 | case 1: |
| 68 | old_regs = set_irq_regs(regs); | 68 | old_regs = set_irq_regs(regs); |
| 69 | #ifdef CONFIG_SMP | ||
| 70 | { | ||
| 71 | long cpu; | ||
| 72 | |||
| 73 | smp_percpu_timer_interrupt(regs); | ||
| 74 | cpu = smp_processor_id(); | ||
| 75 | if (cpu != boot_cpuid) { | ||
| 76 | kstat_incr_irqs_this_cpu(RTC_IRQ, irq_to_desc(RTC_IRQ)); | ||
| 77 | } else { | ||
| 78 | handle_irq(RTC_IRQ); | ||
| 79 | } | ||
| 80 | } | ||
| 81 | #else | ||
| 82 | handle_irq(RTC_IRQ); | 69 | handle_irq(RTC_IRQ); |
| 83 | #endif | ||
| 84 | set_irq_regs(old_regs); | 70 | set_irq_regs(old_regs); |
| 85 | return; | 71 | return; |
| 86 | case 2: | 72 | case 2: |
| @@ -228,7 +214,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr, | |||
| 228 | */ | 214 | */ |
| 229 | 215 | ||
| 230 | struct irqaction timer_irqaction = { | 216 | struct irqaction timer_irqaction = { |
| 231 | .handler = timer_interrupt, | 217 | .handler = rtc_timer_interrupt, |
| 232 | .name = "timer", | 218 | .name = "timer", |
| 233 | }; | 219 | }; |
| 234 | 220 | ||
diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h index 7fa62488bd16..f54bdf658cd0 100644 --- a/arch/alpha/kernel/machvec_impl.h +++ b/arch/alpha/kernel/machvec_impl.h | |||
| @@ -43,10 +43,7 @@ | |||
| 43 | #define CAT1(x,y) x##y | 43 | #define CAT1(x,y) x##y |
| 44 | #define CAT(x,y) CAT1(x,y) | 44 | #define CAT(x,y) CAT1(x,y) |
| 45 | 45 | ||
| 46 | #define DO_DEFAULT_RTC \ | 46 | #define DO_DEFAULT_RTC .rtc_port = 0x70 |
| 47 | .rtc_port = 0x70, \ | ||
| 48 | .rtc_get_time = common_get_rtc_time, \ | ||
| 49 | .rtc_set_time = common_set_rtc_time | ||
| 50 | 47 | ||
| 51 | #define DO_EV4_MMU \ | 48 | #define DO_EV4_MMU \ |
| 52 | .max_asn = EV4_MAX_ASN, \ | 49 | .max_asn = EV4_MAX_ASN, \ |
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index d821b17047e0..c52e7f0ee5f6 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c | |||
| @@ -83,6 +83,8 @@ struct alpha_pmu_t { | |||
| 83 | long pmc_left[3]; | 83 | long pmc_left[3]; |
| 84 | /* Subroutine for allocation of PMCs. Enforces constraints. */ | 84 | /* Subroutine for allocation of PMCs. Enforces constraints. */ |
| 85 | int (*check_constraints)(struct perf_event **, unsigned long *, int); | 85 | int (*check_constraints)(struct perf_event **, unsigned long *, int); |
| 86 | /* Subroutine for checking validity of a raw event for this PMU. */ | ||
| 87 | int (*raw_event_valid)(u64 config); | ||
| 86 | }; | 88 | }; |
| 87 | 89 | ||
| 88 | /* | 90 | /* |
| @@ -203,6 +205,12 @@ success: | |||
| 203 | } | 205 | } |
| 204 | 206 | ||
| 205 | 207 | ||
| 208 | static int ev67_raw_event_valid(u64 config) | ||
| 209 | { | ||
| 210 | return config >= EV67_CYCLES && config < EV67_LAST_ET; | ||
| 211 | }; | ||
| 212 | |||
| 213 | |||
| 206 | static const struct alpha_pmu_t ev67_pmu = { | 214 | static const struct alpha_pmu_t ev67_pmu = { |
| 207 | .event_map = ev67_perfmon_event_map, | 215 | .event_map = ev67_perfmon_event_map, |
| 208 | .max_events = ARRAY_SIZE(ev67_perfmon_event_map), | 216 | .max_events = ARRAY_SIZE(ev67_perfmon_event_map), |
| @@ -211,7 +219,8 @@ static const struct alpha_pmu_t ev67_pmu = { | |||
| 211 | .pmc_count_mask = {EV67_PCTR_0_COUNT_MASK, EV67_PCTR_1_COUNT_MASK, 0}, | 219 | .pmc_count_mask = {EV67_PCTR_0_COUNT_MASK, EV67_PCTR_1_COUNT_MASK, 0}, |
| 212 | .pmc_max_period = {(1UL<<20) - 1, (1UL<<20) - 1, 0}, | 220 | .pmc_max_period = {(1UL<<20) - 1, (1UL<<20) - 1, 0}, |
| 213 | .pmc_left = {16, 4, 0}, | 221 | .pmc_left = {16, 4, 0}, |
| 214 | .check_constraints = ev67_check_constraints | 222 | .check_constraints = ev67_check_constraints, |
| 223 | .raw_event_valid = ev67_raw_event_valid, | ||
| 215 | }; | 224 | }; |
| 216 | 225 | ||
| 217 | 226 | ||
| @@ -609,7 +618,9 @@ static int __hw_perf_event_init(struct perf_event *event) | |||
| 609 | } else if (attr->type == PERF_TYPE_HW_CACHE) { | 618 | } else if (attr->type == PERF_TYPE_HW_CACHE) { |
| 610 | return -EOPNOTSUPP; | 619 | return -EOPNOTSUPP; |
| 611 | } else if (attr->type == PERF_TYPE_RAW) { | 620 | } else if (attr->type == PERF_TYPE_RAW) { |
| 612 | ev = attr->config & 0xff; | 621 | if (!alpha_pmu->raw_event_valid(attr->config)) |
| 622 | return -EINVAL; | ||
| 623 | ev = attr->config; | ||
| 613 | } else { | 624 | } else { |
| 614 | return -EOPNOTSUPP; | 625 | return -EOPNOTSUPP; |
| 615 | } | 626 | } |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index f2360a74e5d5..1941a07b5811 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
| @@ -46,6 +46,23 @@ | |||
| 46 | void (*pm_power_off)(void) = machine_power_off; | 46 | void (*pm_power_off)(void) = machine_power_off; |
| 47 | EXPORT_SYMBOL(pm_power_off); | 47 | EXPORT_SYMBOL(pm_power_off); |
| 48 | 48 | ||
| 49 | #ifdef CONFIG_ALPHA_WTINT | ||
| 50 | /* | ||
| 51 | * Sleep the CPU. | ||
| 52 | * EV6, LCA45 and QEMU know how to power down, skipping N timer interrupts. | ||
| 53 | */ | ||
| 54 | void arch_cpu_idle(void) | ||
| 55 | { | ||
| 56 | wtint(0); | ||
| 57 | local_irq_enable(); | ||
| 58 | } | ||
| 59 | |||
| 60 | void arch_cpu_idle_dead(void) | ||
| 61 | { | ||
| 62 | wtint(INT_MAX); | ||
| 63 | } | ||
| 64 | #endif /* ALPHA_WTINT */ | ||
| 65 | |||
| 49 | struct halt_info { | 66 | struct halt_info { |
| 50 | int mode; | 67 | int mode; |
| 51 | char *restart_cmd; | 68 | char *restart_cmd; |
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index d3e52d3fd592..da2d6ec9c370 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h | |||
| @@ -135,17 +135,15 @@ extern void unregister_srm_console(void); | |||
| 135 | /* smp.c */ | 135 | /* smp.c */ |
| 136 | extern void setup_smp(void); | 136 | extern void setup_smp(void); |
| 137 | extern void handle_ipi(struct pt_regs *); | 137 | extern void handle_ipi(struct pt_regs *); |
| 138 | extern void smp_percpu_timer_interrupt(struct pt_regs *); | ||
| 139 | 138 | ||
| 140 | /* bios32.c */ | 139 | /* bios32.c */ |
| 141 | /* extern void reset_for_srm(void); */ | 140 | /* extern void reset_for_srm(void); */ |
| 142 | 141 | ||
| 143 | /* time.c */ | 142 | /* time.c */ |
| 144 | extern irqreturn_t timer_interrupt(int irq, void *dev); | 143 | extern irqreturn_t rtc_timer_interrupt(int irq, void *dev); |
| 144 | extern void init_clockevent(void); | ||
| 145 | extern void common_init_rtc(void); | 145 | extern void common_init_rtc(void); |
| 146 | extern unsigned long est_cycle_freq; | 146 | extern unsigned long est_cycle_freq; |
| 147 | extern unsigned int common_get_rtc_time(struct rtc_time *time); | ||
| 148 | extern int common_set_rtc_time(struct rtc_time *time); | ||
| 149 | 147 | ||
| 150 | /* smc37c93x.c */ | 148 | /* smc37c93x.c */ |
| 151 | extern void SMC93x_Init(void); | 149 | extern void SMC93x_Init(void); |
diff --git a/arch/alpha/kernel/rtc.c b/arch/alpha/kernel/rtc.c new file mode 100644 index 000000000000..c8d284d8521f --- /dev/null +++ b/arch/alpha/kernel/rtc.c | |||
| @@ -0,0 +1,323 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/alpha/kernel/rtc.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds | ||
| 5 | * | ||
| 6 | * This file contains date handling. | ||
| 7 | */ | ||
| 8 | #include <linux/errno.h> | ||
| 9 | #include <linux/init.h> | ||
| 10 | #include <linux/kernel.h> | ||
| 11 | #include <linux/param.h> | ||
| 12 | #include <linux/string.h> | ||
| 13 | #include <linux/mc146818rtc.h> | ||
| 14 | #include <linux/bcd.h> | ||
| 15 | #include <linux/rtc.h> | ||
| 16 | #include <linux/platform_device.h> | ||
| 17 | |||
| 18 | #include <asm/rtc.h> | ||
| 19 | |||
| 20 | #include "proto.h" | ||
| 21 | |||
| 22 | |||
| 23 | /* | ||
| 24 | * Support for the RTC device. | ||
| 25 | * | ||
| 26 | * We don't want to use the rtc-cmos driver, because we don't want to support | ||
| 27 | * alarms, as that would be indistinguishable from timer interrupts. | ||
| 28 | * | ||
| 29 | * Further, generic code is really, really tied to a 1900 epoch. This is | ||
| 30 | * true in __get_rtc_time as well as the users of struct rtc_time e.g. | ||
| 31 | * rtc_tm_to_time. Thankfully all of the other epochs in use are later | ||
| 32 | * than 1900, and so it's easy to adjust. | ||
| 33 | */ | ||
| 34 | |||
| 35 | static unsigned long rtc_epoch; | ||
| 36 | |||
| 37 | static int __init | ||
| 38 | specifiy_epoch(char *str) | ||
| 39 | { | ||
| 40 | unsigned long epoch = simple_strtoul(str, NULL, 0); | ||
| 41 | if (epoch < 1900) | ||
| 42 | printk("Ignoring invalid user specified epoch %lu\n", epoch); | ||
| 43 | else | ||
| 44 | rtc_epoch = epoch; | ||
| 45 | return 1; | ||
| 46 | } | ||
| 47 | __setup("epoch=", specifiy_epoch); | ||
| 48 | |||
| 49 | static void __init | ||
| 50 | init_rtc_epoch(void) | ||
| 51 | { | ||
| 52 | int epoch, year, ctrl; | ||
| 53 | |||
| 54 | if (rtc_epoch != 0) { | ||
| 55 | /* The epoch was specified on the command-line. */ | ||
| 56 | return; | ||
| 57 | } | ||
| 58 | |||
| 59 | /* Detect the epoch in use on this computer. */ | ||
| 60 | ctrl = CMOS_READ(RTC_CONTROL); | ||
| 61 | year = CMOS_READ(RTC_YEAR); | ||
| 62 | if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | ||
| 63 | year = bcd2bin(year); | ||
| 64 | |||
| 65 | /* PC-like is standard; used for year >= 70 */ | ||
| 66 | epoch = 1900; | ||
| 67 | if (year < 20) { | ||
| 68 | epoch = 2000; | ||
| 69 | } else if (year >= 20 && year < 48) { | ||
| 70 | /* NT epoch */ | ||
| 71 | epoch = 1980; | ||
| 72 | } else if (year >= 48 && year < 70) { | ||
| 73 | /* Digital UNIX epoch */ | ||
| 74 | epoch = 1952; | ||
| 75 | } | ||
| 76 | rtc_epoch = epoch; | ||
| 77 | |||
| 78 | printk(KERN_INFO "Using epoch %d for rtc year %d\n", epoch, year); | ||
| 79 | } | ||
| 80 | |||
| 81 | static int | ||
| 82 | alpha_rtc_read_time(struct device *dev, struct rtc_time *tm) | ||
| 83 | { | ||
| 84 | __get_rtc_time(tm); | ||
| 85 | |||
| 86 | /* Adjust for non-default epochs. It's easier to depend on the | ||
| 87 | generic __get_rtc_time and adjust the epoch here than create | ||
| 88 | a copy of __get_rtc_time with the edits we need. */ | ||
| 89 | if (rtc_epoch != 1900) { | ||
| 90 | int year = tm->tm_year; | ||
| 91 | /* Undo the century adjustment made in __get_rtc_time. */ | ||
| 92 | if (year >= 100) | ||
| 93 | year -= 100; | ||
| 94 | year += rtc_epoch - 1900; | ||
| 95 | /* Redo the century adjustment with the epoch in place. */ | ||
| 96 | if (year <= 69) | ||
| 97 | year += 100; | ||
| 98 | tm->tm_year = year; | ||
| 99 | } | ||
| 100 | |||
| 101 | return rtc_valid_tm(tm); | ||
| 102 | } | ||
| 103 | |||
| 104 | static int | ||
| 105 | alpha_rtc_set_time(struct device *dev, struct rtc_time *tm) | ||
| 106 | { | ||
| 107 | struct rtc_time xtm; | ||
| 108 | |||
| 109 | if (rtc_epoch != 1900) { | ||
| 110 | xtm = *tm; | ||
| 111 | xtm.tm_year -= rtc_epoch - 1900; | ||
| 112 | tm = &xtm; | ||
| 113 | } | ||
| 114 | |||
| 115 | return __set_rtc_time(tm); | ||
| 116 | } | ||
| 117 | |||
| 118 | static int | ||
| 119 | alpha_rtc_set_mmss(struct device *dev, unsigned long nowtime) | ||
| 120 | { | ||
| 121 | int retval = 0; | ||
| 122 | int real_seconds, real_minutes, cmos_minutes; | ||
| 123 | unsigned char save_control, save_freq_select; | ||
| 124 | |||
| 125 | /* Note: This code only updates minutes and seconds. Comments | ||
| 126 | indicate this was to avoid messing with unknown time zones, | ||
| 127 | and with the epoch nonsense described above. In order for | ||
| 128 | this to work, the existing clock cannot be off by more than | ||
| 129 | 15 minutes. | ||
| 130 | |||
| 131 | ??? This choice is may be out of date. The x86 port does | ||
| 132 | not have problems with timezones, and the epoch processing has | ||
| 133 | now been fixed in alpha_set_rtc_time. | ||
| 134 | |||
| 135 | In either case, one can always force a full rtc update with | ||
| 136 | the userland hwclock program, so surely 15 minute accuracy | ||
| 137 | is no real burden. */ | ||
| 138 | |||
| 139 | /* In order to set the CMOS clock precisely, we have to be called | ||
| 140 | 500 ms after the second nowtime has started, because when | ||
| 141 | nowtime is written into the registers of the CMOS clock, it will | ||
| 142 | jump to the next second precisely 500 ms later. Check the Motorola | ||
| 143 | MC146818A or Dallas DS12887 data sheet for details. */ | ||
| 144 | |||
| 145 | /* irq are locally disabled here */ | ||
| 146 | spin_lock(&rtc_lock); | ||
| 147 | /* Tell the clock it's being set */ | ||
| 148 | save_control = CMOS_READ(RTC_CONTROL); | ||
| 149 | CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); | ||
| 150 | |||
| 151 | /* Stop and reset prescaler */ | ||
| 152 | save_freq_select = CMOS_READ(RTC_FREQ_SELECT); | ||
| 153 | CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); | ||
| 154 | |||
| 155 | cmos_minutes = CMOS_READ(RTC_MINUTES); | ||
| 156 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | ||
| 157 | cmos_minutes = bcd2bin(cmos_minutes); | ||
| 158 | |||
| 159 | real_seconds = nowtime % 60; | ||
| 160 | real_minutes = nowtime / 60; | ||
| 161 | if (((abs(real_minutes - cmos_minutes) + 15) / 30) & 1) { | ||
| 162 | /* correct for half hour time zone */ | ||
| 163 | real_minutes += 30; | ||
| 164 | } | ||
| 165 | real_minutes %= 60; | ||
| 166 | |||
| 167 | if (abs(real_minutes - cmos_minutes) < 30) { | ||
| 168 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | ||
| 169 | real_seconds = bin2bcd(real_seconds); | ||
| 170 | real_minutes = bin2bcd(real_minutes); | ||
| 171 | } | ||
| 172 | CMOS_WRITE(real_seconds,RTC_SECONDS); | ||
| 173 | CMOS_WRITE(real_minutes,RTC_MINUTES); | ||
| 174 | } else { | ||
| 175 | printk_once(KERN_NOTICE | ||
| 176 | "set_rtc_mmss: can't update from %d to %d\n", | ||
| 177 | cmos_minutes, real_minutes); | ||
| 178 | retval = -1; | ||
| 179 | } | ||
| 180 | |||
| 181 | /* The following flags have to be released exactly in this order, | ||
| 182 | * otherwise the DS12887 (popular MC146818A clone with integrated | ||
| 183 | * battery and quartz) will not reset the oscillator and will not | ||
| 184 | * update precisely 500 ms later. You won't find this mentioned in | ||
| 185 | * the Dallas Semiconductor data sheets, but who believes data | ||
| 186 | * sheets anyway ... -- Markus Kuhn | ||
| 187 | */ | ||
| 188 | CMOS_WRITE(save_control, RTC_CONTROL); | ||
| 189 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); | ||
| 190 | spin_unlock(&rtc_lock); | ||
| 191 | |||
| 192 | return retval; | ||
| 193 | } | ||
| 194 | |||
| 195 | static int | ||
| 196 | alpha_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) | ||
| 197 | { | ||
| 198 | switch (cmd) { | ||
| 199 | case RTC_EPOCH_READ: | ||
| 200 | return put_user(rtc_epoch, (unsigned long __user *)arg); | ||
| 201 | case RTC_EPOCH_SET: | ||
| 202 | if (arg < 1900) | ||
| 203 | return -EINVAL; | ||
| 204 | rtc_epoch = arg; | ||
| 205 | return 0; | ||
| 206 | default: | ||
| 207 | return -ENOIOCTLCMD; | ||
| 208 | } | ||
| 209 | } | ||
| 210 | |||
| 211 | static const struct rtc_class_ops alpha_rtc_ops = { | ||
| 212 | .read_time = alpha_rtc_read_time, | ||
| 213 | .set_time = alpha_rtc_set_time, | ||
| 214 | .set_mmss = alpha_rtc_set_mmss, | ||
| 215 | .ioctl = alpha_rtc_ioctl, | ||
| 216 | }; | ||
| 217 | |||
| 218 | /* | ||
| 219 | * Similarly, except do the actual CMOS access on the boot cpu only. | ||
| 220 | * This requires marshalling the data across an interprocessor call. | ||
| 221 | */ | ||
| 222 | |||
| 223 | #if defined(CONFIG_SMP) && \ | ||
| 224 | (defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_MARVEL)) | ||
| 225 | # define HAVE_REMOTE_RTC 1 | ||
| 226 | |||
| 227 | union remote_data { | ||
| 228 | struct rtc_time *tm; | ||
| 229 | unsigned long now; | ||
| 230 | long retval; | ||
| 231 | }; | ||
| 232 | |||
| 233 | static void | ||
| 234 | do_remote_read(void *data) | ||
| 235 | { | ||
| 236 | union remote_data *x = data; | ||
| 237 | x->retval = alpha_rtc_read_time(NULL, x->tm); | ||
| 238 | } | ||
| 239 | |||
| 240 | static int | ||
| 241 | remote_read_time(struct device *dev, struct rtc_time *tm) | ||
| 242 | { | ||
| 243 | union remote_data x; | ||
| 244 | if (smp_processor_id() != boot_cpuid) { | ||
| 245 | x.tm = tm; | ||
| 246 | smp_call_function_single(boot_cpuid, do_remote_read, &x, 1); | ||
| 247 | return x.retval; | ||
| 248 | } | ||
| 249 | return alpha_rtc_read_time(NULL, tm); | ||
| 250 | } | ||
| 251 | |||
| 252 | static void | ||
| 253 | do_remote_set(void *data) | ||
| 254 | { | ||
| 255 | union remote_data *x = data; | ||
| 256 | x->retval = alpha_rtc_set_time(NULL, x->tm); | ||
| 257 | } | ||
| 258 | |||
| 259 | static int | ||
| 260 | remote_set_time(struct device *dev, struct rtc_time *tm) | ||
| 261 | { | ||
| 262 | union remote_data x; | ||
| 263 | if (smp_processor_id() != boot_cpuid) { | ||
| 264 | x.tm = tm; | ||
| 265 | smp_call_function_single(boot_cpuid, do_remote_set, &x, 1); | ||
| 266 | return x.retval; | ||
| 267 | } | ||
| 268 | return alpha_rtc_set_time(NULL, tm); | ||
| 269 | } | ||
| 270 | |||
| 271 | static void | ||
| 272 | do_remote_mmss(void *data) | ||
| 273 | { | ||
| 274 | union remote_data *x = data; | ||
| 275 | x->retval = alpha_rtc_set_mmss(NULL, x->now); | ||
| 276 | } | ||
| 277 | |||
| 278 | static int | ||
| 279 | remote_set_mmss(struct device *dev, unsigned long now) | ||
| 280 | { | ||
| 281 | union remote_data x; | ||
| 282 | if (smp_processor_id() != boot_cpuid) { | ||
| 283 | x.now = now; | ||
| 284 | smp_call_function_single(boot_cpuid, do_remote_mmss, &x, 1); | ||
| 285 | return x.retval; | ||
| 286 | } | ||
| 287 | return alpha_rtc_set_mmss(NULL, now); | ||
| 288 | } | ||
| 289 | |||
| 290 | static const struct rtc_class_ops remote_rtc_ops = { | ||
| 291 | .read_time = remote_read_time, | ||
| 292 | .set_time = remote_set_time, | ||
| 293 | .set_mmss = remote_set_mmss, | ||
| 294 | .ioctl = alpha_rtc_ioctl, | ||
| 295 | }; | ||
| 296 | #endif | ||
| 297 | |||
| 298 | static int __init | ||
| 299 | alpha_rtc_init(void) | ||
| 300 | { | ||
| 301 | const struct rtc_class_ops *ops; | ||
| 302 | struct platform_device *pdev; | ||
| 303 | struct rtc_device *rtc; | ||
| 304 | const char *name; | ||
| 305 | |||
| 306 | init_rtc_epoch(); | ||
| 307 | name = "rtc-alpha"; | ||
| 308 | ops = &alpha_rtc_ops; | ||
| 309 | |||
| 310 | #ifdef HAVE_REMOTE_RTC | ||
| 311 | if (alpha_mv.rtc_boot_cpu_only) | ||
| 312 | ops = &remote_rtc_ops; | ||
| 313 | #endif | ||
| 314 | |||
| 315 | pdev = platform_device_register_simple(name, -1, NULL, 0); | ||
| 316 | rtc = devm_rtc_device_register(&pdev->dev, name, ops, THIS_MODULE); | ||
| 317 | if (IS_ERR(rtc)) | ||
| 318 | return PTR_ERR(rtc); | ||
| 319 | |||
| 320 | platform_set_drvdata(pdev, rtc); | ||
| 321 | return 0; | ||
| 322 | } | ||
| 323 | device_initcall(alpha_rtc_init); | ||
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 9e3107cc5ebb..b20af76f12c1 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
| @@ -115,10 +115,17 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE; | |||
| 115 | 115 | ||
| 116 | #ifdef CONFIG_ALPHA_GENERIC | 116 | #ifdef CONFIG_ALPHA_GENERIC |
| 117 | struct alpha_machine_vector alpha_mv; | 117 | struct alpha_machine_vector alpha_mv; |
| 118 | #endif | ||
| 119 | |||
| 120 | #ifndef alpha_using_srm | ||
| 118 | int alpha_using_srm; | 121 | int alpha_using_srm; |
| 119 | EXPORT_SYMBOL(alpha_using_srm); | 122 | EXPORT_SYMBOL(alpha_using_srm); |
| 120 | #endif | 123 | #endif |
| 121 | 124 | ||
| 125 | #ifndef alpha_using_qemu | ||
| 126 | int alpha_using_qemu; | ||
| 127 | #endif | ||
| 128 | |||
| 122 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, | 129 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, |
| 123 | unsigned long); | 130 | unsigned long); |
| 124 | static struct alpha_machine_vector *get_sysvec_byname(const char *); | 131 | static struct alpha_machine_vector *get_sysvec_byname(const char *); |
| @@ -529,11 +536,15 @@ setup_arch(char **cmdline_p) | |||
| 529 | atomic_notifier_chain_register(&panic_notifier_list, | 536 | atomic_notifier_chain_register(&panic_notifier_list, |
| 530 | &alpha_panic_block); | 537 | &alpha_panic_block); |
| 531 | 538 | ||
| 532 | #ifdef CONFIG_ALPHA_GENERIC | 539 | #ifndef alpha_using_srm |
| 533 | /* Assume that we've booted from SRM if we haven't booted from MILO. | 540 | /* Assume that we've booted from SRM if we haven't booted from MILO. |
| 534 | Detect the later by looking for "MILO" in the system serial nr. */ | 541 | Detect the later by looking for "MILO" in the system serial nr. */ |
| 535 | alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; | 542 | alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; |
| 536 | #endif | 543 | #endif |
| 544 | #ifndef alpha_using_qemu | ||
| 545 | /* Similarly, look for QEMU. */ | ||
| 546 | alpha_using_qemu = strstr((const char *)hwrpb->ssn, "QEMU") != 0; | ||
| 547 | #endif | ||
| 537 | 548 | ||
| 538 | /* If we are using SRM, we want to allow callbacks | 549 | /* If we are using SRM, we want to allow callbacks |
| 539 | as early as possible, so do this NOW, and then | 550 | as early as possible, so do this NOW, and then |
| @@ -1207,6 +1218,7 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1207 | char *systype_name; | 1218 | char *systype_name; |
| 1208 | char *sysvariation_name; | 1219 | char *sysvariation_name; |
| 1209 | int nr_processors; | 1220 | int nr_processors; |
| 1221 | unsigned long timer_freq; | ||
| 1210 | 1222 | ||
| 1211 | cpu_index = (unsigned) (cpu->type - 1); | 1223 | cpu_index = (unsigned) (cpu->type - 1); |
| 1212 | cpu_name = "Unknown"; | 1224 | cpu_name = "Unknown"; |
| @@ -1218,6 +1230,12 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1218 | 1230 | ||
| 1219 | nr_processors = get_nr_processors(cpu, hwrpb->nr_processors); | 1231 | nr_processors = get_nr_processors(cpu, hwrpb->nr_processors); |
| 1220 | 1232 | ||
| 1233 | #if CONFIG_HZ == 1024 || CONFIG_HZ == 1200 | ||
| 1234 | timer_freq = (100UL * hwrpb->intr_freq) / 4096; | ||
| 1235 | #else | ||
| 1236 | timer_freq = 100UL * CONFIG_HZ; | ||
| 1237 | #endif | ||
| 1238 | |||
| 1221 | seq_printf(f, "cpu\t\t\t: Alpha\n" | 1239 | seq_printf(f, "cpu\t\t\t: Alpha\n" |
| 1222 | "cpu model\t\t: %s\n" | 1240 | "cpu model\t\t: %s\n" |
| 1223 | "cpu variation\t\t: %ld\n" | 1241 | "cpu variation\t\t: %ld\n" |
| @@ -1243,8 +1261,7 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1243 | (char*)hwrpb->ssn, | 1261 | (char*)hwrpb->ssn, |
| 1244 | est_cycle_freq ? : hwrpb->cycle_freq, | 1262 | est_cycle_freq ? : hwrpb->cycle_freq, |
| 1245 | est_cycle_freq ? "est." : "", | 1263 | est_cycle_freq ? "est." : "", |
| 1246 | hwrpb->intr_freq / 4096, | 1264 | timer_freq / 100, timer_freq % 100, |
| 1247 | (100 * hwrpb->intr_freq / 4096) % 100, | ||
| 1248 | hwrpb->pagesize, | 1265 | hwrpb->pagesize, |
| 1249 | hwrpb->pa_bits, | 1266 | hwrpb->pa_bits, |
| 1250 | hwrpb->max_asn, | 1267 | hwrpb->max_asn, |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 9dbbcb3b9146..99ac36d5de4e 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
| @@ -138,9 +138,11 @@ smp_callin(void) | |||
| 138 | 138 | ||
| 139 | /* Get our local ticker going. */ | 139 | /* Get our local ticker going. */ |
| 140 | smp_setup_percpu_timer(cpuid); | 140 | smp_setup_percpu_timer(cpuid); |
| 141 | init_clockevent(); | ||
| 141 | 142 | ||
| 142 | /* Call platform-specific callin, if specified */ | 143 | /* Call platform-specific callin, if specified */ |
| 143 | if (alpha_mv.smp_callin) alpha_mv.smp_callin(); | 144 | if (alpha_mv.smp_callin) |
| 145 | alpha_mv.smp_callin(); | ||
| 144 | 146 | ||
| 145 | /* All kernel threads share the same mm context. */ | 147 | /* All kernel threads share the same mm context. */ |
| 146 | atomic_inc(&init_mm.mm_count); | 148 | atomic_inc(&init_mm.mm_count); |
| @@ -498,35 +500,6 @@ smp_cpus_done(unsigned int max_cpus) | |||
| 498 | ((bogosum + 2500) / (5000/HZ)) % 100); | 500 | ((bogosum + 2500) / (5000/HZ)) % 100); |
| 499 | } | 501 | } |
| 500 | 502 | ||
| 501 | |||
| 502 | void | ||
| 503 | smp_percpu_timer_interrupt(struct pt_regs *regs) | ||
| 504 | { | ||
| 505 | struct pt_regs *old_regs; | ||
| 506 | int cpu = smp_processor_id(); | ||
| 507 | unsigned long user = user_mode(regs); | ||
| 508 | struct cpuinfo_alpha *data = &cpu_data[cpu]; | ||
| 509 | |||
| 510 | old_regs = set_irq_regs(regs); | ||
| 511 | |||
| 512 | /* Record kernel PC. */ | ||
| 513 | profile_tick(CPU_PROFILING); | ||
| 514 | |||
| 515 | if (!--data->prof_counter) { | ||
| 516 | /* We need to make like a normal interrupt -- otherwise | ||
| 517 | timer interrupts ignore the global interrupt lock, | ||
| 518 | which would be a Bad Thing. */ | ||
| 519 | irq_enter(); | ||
| 520 | |||
| 521 | update_process_times(user); | ||
| 522 | |||
| 523 | data->prof_counter = data->prof_multiplier; | ||
| 524 | |||
| 525 | irq_exit(); | ||
| 526 | } | ||
| 527 | set_irq_regs(old_regs); | ||
| 528 | } | ||
| 529 | |||
| 530 | int | 503 | int |
| 531 | setup_profiling_timer(unsigned int multiplier) | 504 | setup_profiling_timer(unsigned int multiplier) |
| 532 | { | 505 | { |
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index 5a0af11b3a61..608f2a7fa0a3 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c | |||
| @@ -224,8 +224,6 @@ struct alpha_machine_vector jensen_mv __initmv = { | |||
| 224 | .machine_check = jensen_machine_check, | 224 | .machine_check = jensen_machine_check, |
| 225 | .max_isa_dma_address = ALPHA_MAX_ISA_DMA_ADDRESS, | 225 | .max_isa_dma_address = ALPHA_MAX_ISA_DMA_ADDRESS, |
| 226 | .rtc_port = 0x170, | 226 | .rtc_port = 0x170, |
| 227 | .rtc_get_time = common_get_rtc_time, | ||
| 228 | .rtc_set_time = common_set_rtc_time, | ||
| 229 | 227 | ||
| 230 | .nr_irqs = 16, | 228 | .nr_irqs = 16, |
| 231 | .device_interrupt = jensen_device_interrupt, | 229 | .device_interrupt = jensen_device_interrupt, |
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index c92e389ff219..f21d61fab678 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <asm/hwrpb.h> | 22 | #include <asm/hwrpb.h> |
| 23 | #include <asm/tlbflush.h> | 23 | #include <asm/tlbflush.h> |
| 24 | #include <asm/vga.h> | 24 | #include <asm/vga.h> |
| 25 | #include <asm/rtc.h> | ||
| 26 | 25 | ||
| 27 | #include "proto.h" | 26 | #include "proto.h" |
| 28 | #include "err_impl.h" | 27 | #include "err_impl.h" |
| @@ -400,57 +399,6 @@ marvel_init_rtc(void) | |||
| 400 | init_rtc_irq(); | 399 | init_rtc_irq(); |
| 401 | } | 400 | } |
| 402 | 401 | ||
| 403 | struct marvel_rtc_time { | ||
| 404 | struct rtc_time *time; | ||
| 405 | int retval; | ||
| 406 | }; | ||
| 407 | |||
| 408 | #ifdef CONFIG_SMP | ||
| 409 | static void | ||
| 410 | smp_get_rtc_time(void *data) | ||
| 411 | { | ||
| 412 | struct marvel_rtc_time *mrt = data; | ||
| 413 | mrt->retval = __get_rtc_time(mrt->time); | ||
| 414 | } | ||
| 415 | |||
| 416 | static void | ||
| 417 | smp_set_rtc_time(void *data) | ||
| 418 | { | ||
| 419 | struct marvel_rtc_time *mrt = data; | ||
| 420 | mrt->retval = __set_rtc_time(mrt->time); | ||
| 421 | } | ||
| 422 | #endif | ||
| 423 | |||
| 424 | static unsigned int | ||
| 425 | marvel_get_rtc_time(struct rtc_time *time) | ||
| 426 | { | ||
| 427 | #ifdef CONFIG_SMP | ||
| 428 | struct marvel_rtc_time mrt; | ||
| 429 | |||
| 430 | if (smp_processor_id() != boot_cpuid) { | ||
| 431 | mrt.time = time; | ||
| 432 | smp_call_function_single(boot_cpuid, smp_get_rtc_time, &mrt, 1); | ||
| 433 | return mrt.retval; | ||
| 434 | } | ||
| 435 | #endif | ||
| 436 | return __get_rtc_time(time); | ||
| 437 | } | ||
| 438 | |||
| 439 | static int | ||
| 440 | marvel_set_rtc_time(struct rtc_time *time) | ||
| 441 | { | ||
| 442 | #ifdef CONFIG_SMP | ||
| 443 | struct marvel_rtc_time mrt; | ||
| 444 | |||
| 445 | if (smp_processor_id() != boot_cpuid) { | ||
| 446 | mrt.time = time; | ||
| 447 | smp_call_function_single(boot_cpuid, smp_set_rtc_time, &mrt, 1); | ||
| 448 | return mrt.retval; | ||
| 449 | } | ||
| 450 | #endif | ||
| 451 | return __set_rtc_time(time); | ||
| 452 | } | ||
| 453 | |||
| 454 | static void | 402 | static void |
| 455 | marvel_smp_callin(void) | 403 | marvel_smp_callin(void) |
| 456 | { | 404 | { |
| @@ -492,8 +440,7 @@ struct alpha_machine_vector marvel_ev7_mv __initmv = { | |||
| 492 | .vector_name = "MARVEL/EV7", | 440 | .vector_name = "MARVEL/EV7", |
| 493 | DO_EV7_MMU, | 441 | DO_EV7_MMU, |
| 494 | .rtc_port = 0x70, | 442 | .rtc_port = 0x70, |
| 495 | .rtc_get_time = marvel_get_rtc_time, | 443 | .rtc_boot_cpu_only = 1, |
| 496 | .rtc_set_time = marvel_set_rtc_time, | ||
| 497 | DO_MARVEL_IO, | 444 | DO_MARVEL_IO, |
| 498 | .machine_check = marvel_machine_check, | 445 | .machine_check = marvel_machine_check, |
| 499 | .max_isa_dma_address = ALPHA_MAX_ISA_DMA_ADDRESS, | 446 | .max_isa_dma_address = ALPHA_MAX_ISA_DMA_ADDRESS, |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index ea3395036556..ee39cee8064c 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
| @@ -3,13 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds | 4 | * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds |
| 5 | * | 5 | * |
| 6 | * This file contains the PC-specific time handling details: | 6 | * This file contains the clocksource time handling. |
| 7 | * reading the RTC at bootup, etc.. | ||
| 8 | * 1994-07-02 Alan Modra | ||
| 9 | * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime | ||
| 10 | * 1995-03-26 Markus Kuhn | ||
| 11 | * fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887 | ||
| 12 | * precision CMOS clock update | ||
| 13 | * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 | 7 | * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 |
| 14 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | 8 | * "A Kernel Model for Precision Timekeeping" by Dave Mills |
| 15 | * 1997-01-09 Adrian Sun | 9 | * 1997-01-09 Adrian Sun |
| @@ -21,9 +15,6 @@ | |||
| 21 | * 1999-04-16 Thorsten Kranzkowski (dl8bcu@gmx.net) | 15 | * 1999-04-16 Thorsten Kranzkowski (dl8bcu@gmx.net) |
| 22 | * fixed algorithm in do_gettimeofday() for calculating the precise time | 16 | * fixed algorithm in do_gettimeofday() for calculating the precise time |
| 23 | * from processor cycle counter (now taking lost_ticks into account) | 17 | * from processor cycle counter (now taking lost_ticks into account) |
| 24 | * 2000-08-13 Jan-Benedict Glaw <jbglaw@lug-owl.de> | ||
| 25 | * Fixed time_init to be aware of epoches != 1900. This prevents | ||
| 26 | * booting up in 2048 for me;) Code is stolen from rtc.c. | ||
| 27 | * 2003-06-03 R. Scott Bailey <scott.bailey@eds.com> | 18 | * 2003-06-03 R. Scott Bailey <scott.bailey@eds.com> |
| 28 | * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM | 19 | * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM |
| 29 | */ | 20 | */ |
| @@ -46,40 +37,19 @@ | |||
| 46 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
| 47 | #include <asm/io.h> | 38 | #include <asm/io.h> |
| 48 | #include <asm/hwrpb.h> | 39 | #include <asm/hwrpb.h> |
| 49 | #include <asm/rtc.h> | ||
| 50 | 40 | ||
| 51 | #include <linux/mc146818rtc.h> | 41 | #include <linux/mc146818rtc.h> |
| 52 | #include <linux/time.h> | 42 | #include <linux/time.h> |
| 53 | #include <linux/timex.h> | 43 | #include <linux/timex.h> |
| 54 | #include <linux/clocksource.h> | 44 | #include <linux/clocksource.h> |
| 45 | #include <linux/clockchips.h> | ||
| 55 | 46 | ||
| 56 | #include "proto.h" | 47 | #include "proto.h" |
| 57 | #include "irq_impl.h" | 48 | #include "irq_impl.h" |
| 58 | 49 | ||
| 59 | static int set_rtc_mmss(unsigned long); | ||
| 60 | |||
| 61 | DEFINE_SPINLOCK(rtc_lock); | 50 | DEFINE_SPINLOCK(rtc_lock); |
| 62 | EXPORT_SYMBOL(rtc_lock); | 51 | EXPORT_SYMBOL(rtc_lock); |
| 63 | 52 | ||
| 64 | #define TICK_SIZE (tick_nsec / 1000) | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Shift amount by which scaled_ticks_per_cycle is scaled. Shifting | ||
| 68 | * by 48 gives us 16 bits for HZ while keeping the accuracy good even | ||
| 69 | * for large CPU clock rates. | ||
| 70 | */ | ||
| 71 | #define FIX_SHIFT 48 | ||
| 72 | |||
| 73 | /* lump static variables together for more efficient access: */ | ||
| 74 | static struct { | ||
| 75 | /* cycle counter last time it got invoked */ | ||
| 76 | __u32 last_time; | ||
| 77 | /* ticks/cycle * 2^48 */ | ||
| 78 | unsigned long scaled_ticks_per_cycle; | ||
| 79 | /* partial unused tick */ | ||
| 80 | unsigned long partial_tick; | ||
| 81 | } state; | ||
| 82 | |||
| 83 | unsigned long est_cycle_freq; | 53 | unsigned long est_cycle_freq; |
| 84 | 54 | ||
| 85 | #ifdef CONFIG_IRQ_WORK | 55 | #ifdef CONFIG_IRQ_WORK |
| @@ -108,109 +78,156 @@ static inline __u32 rpcc(void) | |||
| 108 | return __builtin_alpha_rpcc(); | 78 | return __builtin_alpha_rpcc(); |
| 109 | } | 79 | } |
| 110 | 80 | ||
| 111 | int update_persistent_clock(struct timespec now) | ||
| 112 | { | ||
| 113 | return set_rtc_mmss(now.tv_sec); | ||
| 114 | } | ||
| 115 | 81 | ||
| 116 | void read_persistent_clock(struct timespec *ts) | 82 | |
| 83 | /* | ||
| 84 | * The RTC as a clock_event_device primitive. | ||
| 85 | */ | ||
| 86 | |||
| 87 | static DEFINE_PER_CPU(struct clock_event_device, cpu_ce); | ||
| 88 | |||
| 89 | irqreturn_t | ||
| 90 | rtc_timer_interrupt(int irq, void *dev) | ||
| 117 | { | 91 | { |
| 118 | unsigned int year, mon, day, hour, min, sec, epoch; | 92 | int cpu = smp_processor_id(); |
| 119 | 93 | struct clock_event_device *ce = &per_cpu(cpu_ce, cpu); | |
| 120 | sec = CMOS_READ(RTC_SECONDS); | ||
| 121 | min = CMOS_READ(RTC_MINUTES); | ||
| 122 | hour = CMOS_READ(RTC_HOURS); | ||
| 123 | day = CMOS_READ(RTC_DAY_OF_MONTH); | ||
| 124 | mon = CMOS_READ(RTC_MONTH); | ||
| 125 | year = CMOS_READ(RTC_YEAR); | ||
| 126 | |||
| 127 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | ||
| 128 | sec = bcd2bin(sec); | ||
| 129 | min = bcd2bin(min); | ||
| 130 | hour = bcd2bin(hour); | ||
| 131 | day = bcd2bin(day); | ||
| 132 | mon = bcd2bin(mon); | ||
| 133 | year = bcd2bin(year); | ||
| 134 | } | ||
| 135 | 94 | ||
| 136 | /* PC-like is standard; used for year >= 70 */ | 95 | /* Don't run the hook for UNUSED or SHUTDOWN. */ |
| 137 | epoch = 1900; | 96 | if (likely(ce->mode == CLOCK_EVT_MODE_PERIODIC)) |
| 138 | if (year < 20) | 97 | ce->event_handler(ce); |
| 139 | epoch = 2000; | ||
| 140 | else if (year >= 20 && year < 48) | ||
| 141 | /* NT epoch */ | ||
| 142 | epoch = 1980; | ||
| 143 | else if (year >= 48 && year < 70) | ||
| 144 | /* Digital UNIX epoch */ | ||
| 145 | epoch = 1952; | ||
| 146 | 98 | ||
| 147 | printk(KERN_INFO "Using epoch = %d\n", epoch); | 99 | if (test_irq_work_pending()) { |
| 100 | clear_irq_work_pending(); | ||
| 101 | irq_work_run(); | ||
| 102 | } | ||
| 148 | 103 | ||
| 149 | if ((year += epoch) < 1970) | 104 | return IRQ_HANDLED; |
| 150 | year += 100; | 105 | } |
| 151 | 106 | ||
| 152 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); | 107 | static void |
| 153 | ts->tv_nsec = 0; | 108 | rtc_ce_set_mode(enum clock_event_mode mode, struct clock_event_device *ce) |
| 109 | { | ||
| 110 | /* The mode member of CE is updated in generic code. | ||
| 111 | Since we only support periodic events, nothing to do. */ | ||
| 112 | } | ||
| 113 | |||
| 114 | static int | ||
| 115 | rtc_ce_set_next_event(unsigned long evt, struct clock_event_device *ce) | ||
| 116 | { | ||
| 117 | /* This hook is for oneshot mode, which we don't support. */ | ||
| 118 | return -EINVAL; | ||
| 154 | } | 119 | } |
| 155 | 120 | ||
| 121 | static void __init | ||
| 122 | init_rtc_clockevent(void) | ||
| 123 | { | ||
| 124 | int cpu = smp_processor_id(); | ||
| 125 | struct clock_event_device *ce = &per_cpu(cpu_ce, cpu); | ||
| 126 | |||
| 127 | *ce = (struct clock_event_device){ | ||
| 128 | .name = "rtc", | ||
| 129 | .features = CLOCK_EVT_FEAT_PERIODIC, | ||
| 130 | .rating = 100, | ||
| 131 | .cpumask = cpumask_of(cpu), | ||
| 132 | .set_mode = rtc_ce_set_mode, | ||
| 133 | .set_next_event = rtc_ce_set_next_event, | ||
| 134 | }; | ||
| 156 | 135 | ||
| 136 | clockevents_config_and_register(ce, CONFIG_HZ, 0, 0); | ||
| 137 | } | ||
| 157 | 138 | ||
| 139 | |||
| 158 | /* | 140 | /* |
| 159 | * timer_interrupt() needs to keep up the real-time clock, | 141 | * The QEMU clock as a clocksource primitive. |
| 160 | * as well as call the "xtime_update()" routine every clocktick | ||
| 161 | */ | 142 | */ |
| 162 | irqreturn_t timer_interrupt(int irq, void *dev) | 143 | |
| 144 | static cycle_t | ||
| 145 | qemu_cs_read(struct clocksource *cs) | ||
| 163 | { | 146 | { |
| 164 | unsigned long delta; | 147 | return qemu_get_vmtime(); |
| 165 | __u32 now; | 148 | } |
| 166 | long nticks; | ||
| 167 | 149 | ||
| 168 | #ifndef CONFIG_SMP | 150 | static struct clocksource qemu_cs = { |
| 169 | /* Not SMP, do kernel PC profiling here. */ | 151 | .name = "qemu", |
| 170 | profile_tick(CPU_PROFILING); | 152 | .rating = 400, |
| 171 | #endif | 153 | .read = qemu_cs_read, |
| 154 | .mask = CLOCKSOURCE_MASK(64), | ||
| 155 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 156 | .max_idle_ns = LONG_MAX | ||
| 157 | }; | ||
| 172 | 158 | ||
| 173 | /* | ||
| 174 | * Calculate how many ticks have passed since the last update, | ||
| 175 | * including any previous partial leftover. Save any resulting | ||
| 176 | * fraction for the next pass. | ||
| 177 | */ | ||
| 178 | now = rpcc(); | ||
| 179 | delta = now - state.last_time; | ||
| 180 | state.last_time = now; | ||
| 181 | delta = delta * state.scaled_ticks_per_cycle + state.partial_tick; | ||
| 182 | state.partial_tick = delta & ((1UL << FIX_SHIFT) - 1); | ||
| 183 | nticks = delta >> FIX_SHIFT; | ||
| 184 | 159 | ||
| 185 | if (nticks) | 160 | /* |
| 186 | xtime_update(nticks); | 161 | * The QEMU alarm as a clock_event_device primitive. |
| 162 | */ | ||
| 187 | 163 | ||
| 188 | if (test_irq_work_pending()) { | 164 | static void |
| 189 | clear_irq_work_pending(); | 165 | qemu_ce_set_mode(enum clock_event_mode mode, struct clock_event_device *ce) |
| 190 | irq_work_run(); | 166 | { |
| 191 | } | 167 | /* The mode member of CE is updated for us in generic code. |
| 168 | Just make sure that the event is disabled. */ | ||
| 169 | qemu_set_alarm_abs(0); | ||
| 170 | } | ||
| 192 | 171 | ||
| 193 | #ifndef CONFIG_SMP | 172 | static int |
| 194 | while (nticks--) | 173 | qemu_ce_set_next_event(unsigned long evt, struct clock_event_device *ce) |
| 195 | update_process_times(user_mode(get_irq_regs())); | 174 | { |
| 196 | #endif | 175 | qemu_set_alarm_rel(evt); |
| 176 | return 0; | ||
| 177 | } | ||
| 197 | 178 | ||
| 179 | static irqreturn_t | ||
| 180 | qemu_timer_interrupt(int irq, void *dev) | ||
| 181 | { | ||
| 182 | int cpu = smp_processor_id(); | ||
| 183 | struct clock_event_device *ce = &per_cpu(cpu_ce, cpu); | ||
| 184 | |||
| 185 | ce->event_handler(ce); | ||
| 198 | return IRQ_HANDLED; | 186 | return IRQ_HANDLED; |
| 199 | } | 187 | } |
| 200 | 188 | ||
| 189 | static void __init | ||
| 190 | init_qemu_clockevent(void) | ||
| 191 | { | ||
| 192 | int cpu = smp_processor_id(); | ||
| 193 | struct clock_event_device *ce = &per_cpu(cpu_ce, cpu); | ||
| 194 | |||
| 195 | *ce = (struct clock_event_device){ | ||
| 196 | .name = "qemu", | ||
| 197 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
| 198 | .rating = 400, | ||
| 199 | .cpumask = cpumask_of(cpu), | ||
| 200 | .set_mode = qemu_ce_set_mode, | ||
| 201 | .set_next_event = qemu_ce_set_next_event, | ||
| 202 | }; | ||
| 203 | |||
| 204 | clockevents_config_and_register(ce, NSEC_PER_SEC, 1000, LONG_MAX); | ||
| 205 | } | ||
| 206 | |||
| 207 | |||
| 201 | void __init | 208 | void __init |
| 202 | common_init_rtc(void) | 209 | common_init_rtc(void) |
| 203 | { | 210 | { |
| 204 | unsigned char x; | 211 | unsigned char x, sel = 0; |
| 205 | 212 | ||
| 206 | /* Reset periodic interrupt frequency. */ | 213 | /* Reset periodic interrupt frequency. */ |
| 207 | x = CMOS_READ(RTC_FREQ_SELECT) & 0x3f; | 214 | #if CONFIG_HZ == 1024 || CONFIG_HZ == 1200 |
| 208 | /* Test includes known working values on various platforms | 215 | x = CMOS_READ(RTC_FREQ_SELECT) & 0x3f; |
| 209 | where 0x26 is wrong; we refuse to change those. */ | 216 | /* Test includes known working values on various platforms |
| 210 | if (x != 0x26 && x != 0x25 && x != 0x19 && x != 0x06) { | 217 | where 0x26 is wrong; we refuse to change those. */ |
| 211 | printk("Setting RTC_FREQ to 1024 Hz (%x)\n", x); | 218 | if (x != 0x26 && x != 0x25 && x != 0x19 && x != 0x06) { |
| 212 | CMOS_WRITE(0x26, RTC_FREQ_SELECT); | 219 | sel = RTC_REF_CLCK_32KHZ + 6; |
| 213 | } | 220 | } |
| 221 | #elif CONFIG_HZ == 256 || CONFIG_HZ == 128 || CONFIG_HZ == 64 || CONFIG_HZ == 32 | ||
| 222 | sel = RTC_REF_CLCK_32KHZ + __builtin_ffs(32768 / CONFIG_HZ); | ||
| 223 | #else | ||
| 224 | # error "Unknown HZ from arch/alpha/Kconfig" | ||
| 225 | #endif | ||
| 226 | if (sel) { | ||
| 227 | printk(KERN_INFO "Setting RTC_FREQ to %d Hz (%x)\n", | ||
| 228 | CONFIG_HZ, sel); | ||
| 229 | CMOS_WRITE(sel, RTC_FREQ_SELECT); | ||
| 230 | } | ||
| 214 | 231 | ||
| 215 | /* Turn on periodic interrupts. */ | 232 | /* Turn on periodic interrupts. */ |
| 216 | x = CMOS_READ(RTC_CONTROL); | 233 | x = CMOS_READ(RTC_CONTROL); |
| @@ -233,16 +250,37 @@ common_init_rtc(void) | |||
| 233 | init_rtc_irq(); | 250 | init_rtc_irq(); |
| 234 | } | 251 | } |
| 235 | 252 | ||
| 236 | unsigned int common_get_rtc_time(struct rtc_time *time) | 253 | |
| 237 | { | 254 | #ifndef CONFIG_ALPHA_WTINT |
| 238 | return __get_rtc_time(time); | 255 | /* |
| 239 | } | 256 | * The RPCC as a clocksource primitive. |
| 257 | * | ||
| 258 | * While we have free-running timecounters running on all CPUs, and we make | ||
| 259 | * a half-hearted attempt in init_rtc_rpcc_info to sync the timecounter | ||
| 260 | * with the wall clock, that initialization isn't kept up-to-date across | ||
| 261 | * different time counters in SMP mode. Therefore we can only use this | ||
| 262 | * method when there's only one CPU enabled. | ||
| 263 | * | ||
| 264 | * When using the WTINT PALcall, the RPCC may shift to a lower frequency, | ||
| 265 | * or stop altogether, while waiting for the interrupt. Therefore we cannot | ||
| 266 | * use this method when WTINT is in use. | ||
| 267 | */ | ||
| 240 | 268 | ||
| 241 | int common_set_rtc_time(struct rtc_time *time) | 269 | static cycle_t read_rpcc(struct clocksource *cs) |
| 242 | { | 270 | { |
| 243 | return __set_rtc_time(time); | 271 | return rpcc(); |
| 244 | } | 272 | } |
| 245 | 273 | ||
| 274 | static struct clocksource clocksource_rpcc = { | ||
| 275 | .name = "rpcc", | ||
| 276 | .rating = 300, | ||
| 277 | .read = read_rpcc, | ||
| 278 | .mask = CLOCKSOURCE_MASK(32), | ||
| 279 | .flags = CLOCK_SOURCE_IS_CONTINUOUS | ||
| 280 | }; | ||
| 281 | #endif /* ALPHA_WTINT */ | ||
| 282 | |||
| 283 | |||
| 246 | /* Validate a computed cycle counter result against the known bounds for | 284 | /* Validate a computed cycle counter result against the known bounds for |
| 247 | the given processor core. There's too much brokenness in the way of | 285 | the given processor core. There's too much brokenness in the way of |
| 248 | timing hardware for any one method to work everywhere. :-( | 286 | timing hardware for any one method to work everywhere. :-( |
| @@ -353,33 +391,6 @@ rpcc_after_update_in_progress(void) | |||
| 353 | return rpcc(); | 391 | return rpcc(); |
| 354 | } | 392 | } |
| 355 | 393 | ||
| 356 | #ifndef CONFIG_SMP | ||
| 357 | /* Until and unless we figure out how to get cpu cycle counters | ||
| 358 | in sync and keep them there, we can't use the rpcc. */ | ||
| 359 | static cycle_t read_rpcc(struct clocksource *cs) | ||
| 360 | { | ||
| 361 | cycle_t ret = (cycle_t)rpcc(); | ||
| 362 | return ret; | ||
| 363 | } | ||
| 364 | |||
| 365 | static struct clocksource clocksource_rpcc = { | ||
| 366 | .name = "rpcc", | ||
| 367 | .rating = 300, | ||
| 368 | .read = read_rpcc, | ||
| 369 | .mask = CLOCKSOURCE_MASK(32), | ||
| 370 | .flags = CLOCK_SOURCE_IS_CONTINUOUS | ||
| 371 | }; | ||
| 372 | |||
| 373 | static inline void register_rpcc_clocksource(long cycle_freq) | ||
| 374 | { | ||
| 375 | clocksource_register_hz(&clocksource_rpcc, cycle_freq); | ||
| 376 | } | ||
| 377 | #else /* !CONFIG_SMP */ | ||
| 378 | static inline void register_rpcc_clocksource(long cycle_freq) | ||
| 379 | { | ||
| 380 | } | ||
| 381 | #endif /* !CONFIG_SMP */ | ||
| 382 | |||
| 383 | void __init | 394 | void __init |
| 384 | time_init(void) | 395 | time_init(void) |
| 385 | { | 396 | { |
| @@ -387,6 +398,15 @@ time_init(void) | |||
| 387 | unsigned long cycle_freq, tolerance; | 398 | unsigned long cycle_freq, tolerance; |
| 388 | long diff; | 399 | long diff; |
| 389 | 400 | ||
| 401 | if (alpha_using_qemu) { | ||
| 402 | clocksource_register_hz(&qemu_cs, NSEC_PER_SEC); | ||
| 403 | init_qemu_clockevent(); | ||
| 404 | |||
| 405 | timer_irqaction.handler = qemu_timer_interrupt; | ||
| 406 | init_rtc_irq(); | ||
| 407 | return; | ||
| 408 | } | ||
| 409 | |||
| 390 | /* Calibrate CPU clock -- attempt #1. */ | 410 | /* Calibrate CPU clock -- attempt #1. */ |
| 391 | if (!est_cycle_freq) | 411 | if (!est_cycle_freq) |
| 392 | est_cycle_freq = validate_cc_value(calibrate_cc_with_pit()); | 412 | est_cycle_freq = validate_cc_value(calibrate_cc_with_pit()); |
| @@ -421,100 +441,25 @@ time_init(void) | |||
| 421 | "and unable to estimate a proper value!\n"); | 441 | "and unable to estimate a proper value!\n"); |
| 422 | } | 442 | } |
| 423 | 443 | ||
| 424 | /* From John Bowman <bowman@math.ualberta.ca>: allow the values | 444 | /* See above for restrictions on using clocksource_rpcc. */ |
| 425 | to settle, as the Update-In-Progress bit going low isn't good | 445 | #ifndef CONFIG_ALPHA_WTINT |
| 426 | enough on some hardware. 2ms is our guess; we haven't found | 446 | if (hwrpb->nr_processors == 1) |
| 427 | bogomips yet, but this is close on a 500Mhz box. */ | 447 | clocksource_register_hz(&clocksource_rpcc, cycle_freq); |
| 428 | __delay(1000000); | 448 | #endif |
| 429 | |||
| 430 | |||
| 431 | if (HZ > (1<<16)) { | ||
| 432 | extern void __you_loose (void); | ||
| 433 | __you_loose(); | ||
| 434 | } | ||
| 435 | |||
| 436 | register_rpcc_clocksource(cycle_freq); | ||
| 437 | |||
| 438 | state.last_time = cc1; | ||
| 439 | state.scaled_ticks_per_cycle | ||
| 440 | = ((unsigned long) HZ << FIX_SHIFT) / cycle_freq; | ||
| 441 | state.partial_tick = 0L; | ||
| 442 | 449 | ||
| 443 | /* Startup the timer source. */ | 450 | /* Startup the timer source. */ |
| 444 | alpha_mv.init_rtc(); | 451 | alpha_mv.init_rtc(); |
| 452 | init_rtc_clockevent(); | ||
| 445 | } | 453 | } |
| 446 | 454 | ||
| 447 | /* | 455 | /* Initialize the clock_event_device for secondary cpus. */ |
| 448 | * In order to set the CMOS clock precisely, set_rtc_mmss has to be | 456 | #ifdef CONFIG_SMP |
| 449 | * called 500 ms after the second nowtime has started, because when | 457 | void __init |
| 450 | * nowtime is written into the registers of the CMOS clock, it will | 458 | init_clockevent(void) |
| 451 | * jump to the next second precisely 500 ms later. Check the Motorola | ||
| 452 | * MC146818A or Dallas DS12887 data sheet for details. | ||
| 453 | * | ||
| 454 | * BUG: This routine does not handle hour overflow properly; it just | ||
| 455 | * sets the minutes. Usually you won't notice until after reboot! | ||
| 456 | */ | ||
| 457 | |||
| 458 | |||
| 459 | static int | ||
| 460 | set_rtc_mmss(unsigned long nowtime) | ||
| 461 | { | 459 | { |
| 462 | int retval = 0; | 460 | if (alpha_using_qemu) |
| 463 | int real_seconds, real_minutes, cmos_minutes; | 461 | init_qemu_clockevent(); |
| 464 | unsigned char save_control, save_freq_select; | 462 | else |
| 465 | 463 | init_rtc_clockevent(); | |
| 466 | /* irq are locally disabled here */ | ||
| 467 | spin_lock(&rtc_lock); | ||
| 468 | /* Tell the clock it's being set */ | ||
| 469 | save_control = CMOS_READ(RTC_CONTROL); | ||
| 470 | CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); | ||
| 471 | |||
| 472 | /* Stop and reset prescaler */ | ||
| 473 | save_freq_select = CMOS_READ(RTC_FREQ_SELECT); | ||
| 474 | CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); | ||
| 475 | |||
| 476 | cmos_minutes = CMOS_READ(RTC_MINUTES); | ||
| 477 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | ||
| 478 | cmos_minutes = bcd2bin(cmos_minutes); | ||
| 479 | |||
| 480 | /* | ||
| 481 | * since we're only adjusting minutes and seconds, | ||
| 482 | * don't interfere with hour overflow. This avoids | ||
| 483 | * messing with unknown time zones but requires your | ||
| 484 | * RTC not to be off by more than 15 minutes | ||
| 485 | */ | ||
| 486 | real_seconds = nowtime % 60; | ||
| 487 | real_minutes = nowtime / 60; | ||
| 488 | if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1) { | ||
| 489 | /* correct for half hour time zone */ | ||
| 490 | real_minutes += 30; | ||
| 491 | } | ||
| 492 | real_minutes %= 60; | ||
| 493 | |||
| 494 | if (abs(real_minutes - cmos_minutes) < 30) { | ||
| 495 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | ||
| 496 | real_seconds = bin2bcd(real_seconds); | ||
| 497 | real_minutes = bin2bcd(real_minutes); | ||
| 498 | } | ||
| 499 | CMOS_WRITE(real_seconds,RTC_SECONDS); | ||
| 500 | CMOS_WRITE(real_minutes,RTC_MINUTES); | ||
| 501 | } else { | ||
| 502 | printk_once(KERN_NOTICE | ||
| 503 | "set_rtc_mmss: can't update from %d to %d\n", | ||
| 504 | cmos_minutes, real_minutes); | ||
| 505 | retval = -1; | ||
| 506 | } | ||
| 507 | |||
| 508 | /* The following flags have to be released exactly in this order, | ||
| 509 | * otherwise the DS12887 (popular MC146818A clone with integrated | ||
| 510 | * battery and quartz) will not reset the oscillator and will not | ||
| 511 | * update precisely 500 ms later. You won't find this mentioned in | ||
| 512 | * the Dallas Semiconductor data sheets, but who believes data | ||
| 513 | * sheets anyway ... -- Markus Kuhn | ||
| 514 | */ | ||
| 515 | CMOS_WRITE(save_control, RTC_CONTROL); | ||
| 516 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); | ||
| 517 | spin_unlock(&rtc_lock); | ||
| 518 | |||
| 519 | return retval; | ||
| 520 | } | 464 | } |
| 465 | #endif | ||
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index bd0665cdc840..9c4c189eb22f 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
| @@ -241,6 +241,21 @@ do_entIF(unsigned long type, struct pt_regs *regs) | |||
| 241 | (const char *)(data[1] | (long)data[2] << 32), | 241 | (const char *)(data[1] | (long)data[2] << 32), |
| 242 | data[0]); | 242 | data[0]); |
| 243 | } | 243 | } |
| 244 | #ifdef CONFIG_ALPHA_WTINT | ||
| 245 | if (type == 4) { | ||
| 246 | /* If CALL_PAL WTINT is totally unsupported by the | ||
| 247 | PALcode, e.g. MILO, "emulate" it by overwriting | ||
| 248 | the insn. */ | ||
| 249 | unsigned int *pinsn | ||
| 250 | = (unsigned int *) regs->pc - 1; | ||
| 251 | if (*pinsn == PAL_wtint) { | ||
| 252 | *pinsn = 0x47e01400; /* mov 0,$0 */ | ||
| 253 | imb(); | ||
| 254 | regs->r0 = 0; | ||
| 255 | return; | ||
| 256 | } | ||
| 257 | } | ||
| 258 | #endif /* ALPHA_WTINT */ | ||
| 244 | die_if_kernel((type == 1 ? "Kernel Bug" : "Instruction fault"), | 259 | die_if_kernel((type == 1 ? "Kernel Bug" : "Instruction fault"), |
| 245 | regs, type, NULL); | 260 | regs, type, NULL); |
| 246 | } | 261 | } |
diff --git a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c index ffb19b7da999..ff3c10721caf 100644 --- a/arch/alpha/lib/csum_partial_copy.c +++ b/arch/alpha/lib/csum_partial_copy.c | |||
| @@ -130,7 +130,7 @@ csum_partial_cfu_aligned(const unsigned long __user *src, unsigned long *dst, | |||
| 130 | *dst = word | tmp; | 130 | *dst = word | tmp; |
| 131 | checksum += carry; | 131 | checksum += carry; |
| 132 | } | 132 | } |
| 133 | if (err) *errp = err; | 133 | if (err && errp) *errp = err; |
| 134 | return checksum; | 134 | return checksum; |
| 135 | } | 135 | } |
| 136 | 136 | ||
| @@ -185,7 +185,7 @@ csum_partial_cfu_dest_aligned(const unsigned long __user *src, | |||
| 185 | *dst = word | tmp; | 185 | *dst = word | tmp; |
| 186 | checksum += carry; | 186 | checksum += carry; |
| 187 | } | 187 | } |
| 188 | if (err) *errp = err; | 188 | if (err && errp) *errp = err; |
| 189 | return checksum; | 189 | return checksum; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| @@ -242,7 +242,7 @@ csum_partial_cfu_src_aligned(const unsigned long __user *src, | |||
| 242 | stq_u(partial_dest | second_dest, dst); | 242 | stq_u(partial_dest | second_dest, dst); |
| 243 | out: | 243 | out: |
| 244 | checksum += carry; | 244 | checksum += carry; |
| 245 | if (err) *errp = err; | 245 | if (err && errp) *errp = err; |
| 246 | return checksum; | 246 | return checksum; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| @@ -325,7 +325,7 @@ csum_partial_cfu_unaligned(const unsigned long __user * src, | |||
| 325 | stq_u(partial_dest | word | second_dest, dst); | 325 | stq_u(partial_dest | word | second_dest, dst); |
| 326 | checksum += carry; | 326 | checksum += carry; |
| 327 | } | 327 | } |
| 328 | if (err) *errp = err; | 328 | if (err && errp) *errp = err; |
| 329 | return checksum; | 329 | return checksum; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| @@ -339,7 +339,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len, | |||
| 339 | 339 | ||
| 340 | if (len) { | 340 | if (len) { |
| 341 | if (!access_ok(VERIFY_READ, src, len)) { | 341 | if (!access_ok(VERIFY_READ, src, len)) { |
| 342 | *errp = -EFAULT; | 342 | if (errp) *errp = -EFAULT; |
| 343 | memset(dst, 0, len); | 343 | memset(dst, 0, len); |
| 344 | return sum; | 344 | return sum; |
| 345 | } | 345 | } |
diff --git a/arch/alpha/lib/ev6-memset.S b/arch/alpha/lib/ev6-memset.S index d8b94e1c7fca..356bb2fdd705 100644 --- a/arch/alpha/lib/ev6-memset.S +++ b/arch/alpha/lib/ev6-memset.S | |||
| @@ -30,14 +30,15 @@ | |||
| 30 | .set noat | 30 | .set noat |
| 31 | .set noreorder | 31 | .set noreorder |
| 32 | .text | 32 | .text |
| 33 | .globl memset | ||
| 33 | .globl __memset | 34 | .globl __memset |
| 35 | .globl ___memset | ||
| 34 | .globl __memsetw | 36 | .globl __memsetw |
| 35 | .globl __constant_c_memset | 37 | .globl __constant_c_memset |
| 36 | .globl memset | ||
| 37 | 38 | ||
| 38 | .ent __memset | 39 | .ent ___memset |
| 39 | .align 5 | 40 | .align 5 |
| 40 | __memset: | 41 | ___memset: |
| 41 | .frame $30,0,$26,0 | 42 | .frame $30,0,$26,0 |
| 42 | .prologue 0 | 43 | .prologue 0 |
| 43 | 44 | ||
| @@ -227,7 +228,7 @@ end_b: | |||
| 227 | nop | 228 | nop |
| 228 | nop | 229 | nop |
| 229 | ret $31,($26),1 # L0 : | 230 | ret $31,($26),1 # L0 : |
| 230 | .end __memset | 231 | .end ___memset |
| 231 | 232 | ||
| 232 | /* | 233 | /* |
| 233 | * This is the original body of code, prior to replication and | 234 | * This is the original body of code, prior to replication and |
| @@ -594,4 +595,5 @@ end_w: | |||
| 594 | 595 | ||
| 595 | .end __memsetw | 596 | .end __memsetw |
| 596 | 597 | ||
| 597 | memset = __memset | 598 | memset = ___memset |
| 599 | __memset = ___memset | ||
diff --git a/arch/alpha/lib/memset.S b/arch/alpha/lib/memset.S index 311b8cfc6914..76ccc6d1f364 100644 --- a/arch/alpha/lib/memset.S +++ b/arch/alpha/lib/memset.S | |||
| @@ -19,11 +19,13 @@ | |||
| 19 | .text | 19 | .text |
| 20 | .globl memset | 20 | .globl memset |
| 21 | .globl __memset | 21 | .globl __memset |
| 22 | .globl ___memset | ||
| 22 | .globl __memsetw | 23 | .globl __memsetw |
| 23 | .globl __constant_c_memset | 24 | .globl __constant_c_memset |
| 24 | .ent __memset | 25 | |
| 26 | .ent ___memset | ||
| 25 | .align 5 | 27 | .align 5 |
| 26 | __memset: | 28 | ___memset: |
| 27 | .frame $30,0,$26,0 | 29 | .frame $30,0,$26,0 |
| 28 | .prologue 0 | 30 | .prologue 0 |
| 29 | 31 | ||
| @@ -103,7 +105,7 @@ within_one_quad: | |||
| 103 | 105 | ||
| 104 | end: | 106 | end: |
| 105 | ret $31,($26),1 /* E1 */ | 107 | ret $31,($26),1 /* E1 */ |
| 106 | .end __memset | 108 | .end ___memset |
| 107 | 109 | ||
| 108 | .align 5 | 110 | .align 5 |
| 109 | .ent __memsetw | 111 | .ent __memsetw |
| @@ -121,4 +123,5 @@ __memsetw: | |||
| 121 | 123 | ||
| 122 | .end __memsetw | 124 | .end __memsetw |
| 123 | 125 | ||
| 124 | memset = __memset | 126 | memset = ___memset |
| 127 | __memset = ___memset | ||
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 2ee0c9bfd032..9063ae6553cc 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | config ARC | 9 | config ARC |
| 10 | def_bool y | 10 | def_bool y |
| 11 | select BUILDTIME_EXTABLE_SORT | ||
| 11 | select CLONE_BACKWARDS | 12 | select CLONE_BACKWARDS |
| 12 | # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev | 13 | # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev |
| 13 | select DEVTMPFS if !INITRAMFS_SOURCE="" | 14 | select DEVTMPFS if !INITRAMFS_SOURCE="" |
diff --git a/arch/arc/include/uapi/asm/unistd.h b/arch/arc/include/uapi/asm/unistd.h index 6f30484f34b7..68125dd766c6 100644 --- a/arch/arc/include/uapi/asm/unistd.h +++ b/arch/arc/include/uapi/asm/unistd.h | |||
| @@ -8,6 +8,9 @@ | |||
| 8 | 8 | ||
| 9 | /******** no-legacy-syscalls-ABI *******/ | 9 | /******** no-legacy-syscalls-ABI *******/ |
| 10 | 10 | ||
| 11 | #ifndef _UAPI_ASM_ARC_UNISTD_H | ||
| 12 | #define _UAPI_ASM_ARC_UNISTD_H | ||
| 13 | |||
| 11 | #define __ARCH_WANT_SYS_EXECVE | 14 | #define __ARCH_WANT_SYS_EXECVE |
| 12 | #define __ARCH_WANT_SYS_CLONE | 15 | #define __ARCH_WANT_SYS_CLONE |
| 13 | #define __ARCH_WANT_SYS_VFORK | 16 | #define __ARCH_WANT_SYS_VFORK |
| @@ -32,3 +35,5 @@ __SYSCALL(__NR_arc_gettls, sys_arc_gettls) | |||
| 32 | /* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */ | 35 | /* Generic syscall (fs/filesystems.c - lost in asm-generic/unistd.h */ |
| 33 | #define __NR_sysfs (__NR_arch_specific_syscall + 3) | 36 | #define __NR_sysfs (__NR_arch_specific_syscall + 3) |
| 34 | __SYSCALL(__NR_sysfs, sys_sysfs) | 37 | __SYSCALL(__NR_sysfs, sys_sysfs) |
| 38 | |||
| 39 | #endif | ||
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index e46d81f70979..63177e4cb66d 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c | |||
| @@ -79,9 +79,9 @@ static int arc_pmu_cache_event(u64 config) | |||
| 79 | cache_result = (config >> 16) & 0xff; | 79 | cache_result = (config >> 16) & 0xff; |
| 80 | if (cache_type >= PERF_COUNT_HW_CACHE_MAX) | 80 | if (cache_type >= PERF_COUNT_HW_CACHE_MAX) |
| 81 | return -EINVAL; | 81 | return -EINVAL; |
| 82 | if (cache_type >= PERF_COUNT_HW_CACHE_OP_MAX) | 82 | if (cache_op >= PERF_COUNT_HW_CACHE_OP_MAX) |
| 83 | return -EINVAL; | 83 | return -EINVAL; |
| 84 | if (cache_type >= PERF_COUNT_HW_CACHE_RESULT_MAX) | 84 | if (cache_result >= PERF_COUNT_HW_CACHE_RESULT_MAX) |
| 85 | return -EINVAL; | 85 | return -EINVAL; |
| 86 | 86 | ||
| 87 | ret = arc_pmu_cache_map[cache_type][cache_op][cache_result]; | 87 | ret = arc_pmu_cache_map[cache_type][cache_op][cache_result]; |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 214b698cefea..c1f1a7eee953 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -25,7 +25,7 @@ config ARM | |||
| 25 | select HARDIRQS_SW_RESEND | 25 | select HARDIRQS_SW_RESEND |
| 26 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 26 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
| 27 | select HAVE_ARCH_KGDB | 27 | select HAVE_ARCH_KGDB |
| 28 | select HAVE_ARCH_SECCOMP_FILTER | 28 | select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT) |
| 29 | select HAVE_ARCH_TRACEHOOK | 29 | select HAVE_ARCH_TRACEHOOK |
| 30 | select HAVE_BPF_JIT | 30 | select HAVE_BPF_JIT |
| 31 | select HAVE_CONTEXT_TRACKING | 31 | select HAVE_CONTEXT_TRACKING |
| @@ -1496,6 +1496,7 @@ config HAVE_ARM_ARCH_TIMER | |||
| 1496 | bool "Architected timer support" | 1496 | bool "Architected timer support" |
| 1497 | depends on CPU_V7 | 1497 | depends on CPU_V7 |
| 1498 | select ARM_ARCH_TIMER | 1498 | select ARM_ARCH_TIMER |
| 1499 | select GENERIC_CLOCKEVENTS | ||
| 1499 | help | 1500 | help |
| 1500 | This option enables support for the ARM architected timer | 1501 | This option enables support for the ARM architected timer |
| 1501 | 1502 | ||
| @@ -1719,7 +1720,6 @@ config AEABI | |||
| 1719 | config OABI_COMPAT | 1720 | config OABI_COMPAT |
| 1720 | bool "Allow old ABI binaries to run with this kernel (EXPERIMENTAL)" | 1721 | bool "Allow old ABI binaries to run with this kernel (EXPERIMENTAL)" |
| 1721 | depends on AEABI && !THUMB2_KERNEL | 1722 | depends on AEABI && !THUMB2_KERNEL |
| 1722 | default y | ||
| 1723 | help | 1723 | help |
| 1724 | This option preserves the old syscall interface along with the | 1724 | This option preserves the old syscall interface along with the |
| 1725 | new (ARM EABI) one. It also provides a compatibility layer to | 1725 | new (ARM EABI) one. It also provides a compatibility layer to |
| @@ -1727,11 +1727,16 @@ config OABI_COMPAT | |||
| 1727 | in memory differs between the legacy ABI and the new ARM EABI | 1727 | in memory differs between the legacy ABI and the new ARM EABI |
| 1728 | (only for non "thumb" binaries). This option adds a tiny | 1728 | (only for non "thumb" binaries). This option adds a tiny |
| 1729 | overhead to all syscalls and produces a slightly larger kernel. | 1729 | overhead to all syscalls and produces a slightly larger kernel. |
| 1730 | |||
| 1731 | The seccomp filter system will not be available when this is | ||
| 1732 | selected, since there is no way yet to sensibly distinguish | ||
| 1733 | between calling conventions during filtering. | ||
| 1734 | |||
| 1730 | If you know you'll be using only pure EABI user space then you | 1735 | If you know you'll be using only pure EABI user space then you |
| 1731 | can say N here. If this option is not selected and you attempt | 1736 | can say N here. If this option is not selected and you attempt |
| 1732 | to execute a legacy ABI binary then the result will be | 1737 | to execute a legacy ABI binary then the result will be |
| 1733 | UNPREDICTABLE (in fact it can be predicted that it won't work | 1738 | UNPREDICTABLE (in fact it can be predicted that it won't work |
| 1734 | at all). If in doubt say Y. | 1739 | at all). If in doubt say N. |
| 1735 | 1740 | ||
| 1736 | config ARCH_HAS_HOLES_MEMORYMODEL | 1741 | config ARCH_HAS_HOLES_MEMORYMODEL |
| 1737 | bool | 1742 | bool |
diff --git a/arch/arm/boot/dts/am335x-base0033.dts b/arch/arm/boot/dts/am335x-base0033.dts index b4f95c2bbf74..72a9b3fc4251 100644 --- a/arch/arm/boot/dts/am335x-base0033.dts +++ b/arch/arm/boot/dts/am335x-base0033.dts | |||
| @@ -13,4 +13,83 @@ | |||
| 13 | / { | 13 | / { |
| 14 | model = "IGEP COM AM335x on AQUILA Expansion"; | 14 | model = "IGEP COM AM335x on AQUILA Expansion"; |
| 15 | compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; | 15 | compatible = "isee,am335x-base0033", "isee,am335x-igep0033", "ti,am33xx"; |
| 16 | |||
| 17 | hdmi { | ||
| 18 | compatible = "ti,tilcdc,slave"; | ||
| 19 | i2c = <&i2c0>; | ||
| 20 | pinctrl-names = "default", "off"; | ||
| 21 | pinctrl-0 = <&nxp_hdmi_pins>; | ||
| 22 | pinctrl-1 = <&nxp_hdmi_off_pins>; | ||
| 23 | status = "okay"; | ||
| 24 | }; | ||
| 25 | |||
| 26 | leds_base { | ||
| 27 | pinctrl-names = "default"; | ||
| 28 | pinctrl-0 = <&leds_base_pins>; | ||
| 29 | |||
| 30 | compatible = "gpio-leds"; | ||
| 31 | |||
| 32 | led@0 { | ||
| 33 | label = "base:red:user"; | ||
| 34 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; /* gpio1_21 */ | ||
| 35 | default-state = "off"; | ||
| 36 | }; | ||
| 37 | |||
| 38 | led@1 { | ||
| 39 | label = "base:green:user"; | ||
| 40 | gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; /* gpio2_0 */ | ||
| 41 | default-state = "off"; | ||
| 42 | }; | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | |||
| 46 | &am33xx_pinmux { | ||
| 47 | nxp_hdmi_pins: pinmux_nxp_hdmi_pins { | ||
| 48 | pinctrl-single,pins = < | ||
| 49 | 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ | ||
| 50 | 0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0 */ | ||
| 51 | 0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1 */ | ||
| 52 | 0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2 */ | ||
| 53 | 0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3 */ | ||
| 54 | 0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4 */ | ||
| 55 | 0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5 */ | ||
| 56 | 0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6 */ | ||
| 57 | 0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7 */ | ||
| 58 | 0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8 */ | ||
| 59 | 0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9 */ | ||
| 60 | 0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10 */ | ||
| 61 | 0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11 */ | ||
| 62 | 0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12 */ | ||
| 63 | 0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13 */ | ||
| 64 | 0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14 */ | ||
| 65 | 0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15 */ | ||
| 66 | 0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync */ | ||
| 67 | 0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync */ | ||
| 68 | 0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk */ | ||
| 69 | 0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en */ | ||
| 70 | >; | ||
| 71 | }; | ||
| 72 | nxp_hdmi_off_pins: pinmux_nxp_hdmi_off_pins { | ||
| 73 | pinctrl-single,pins = < | ||
| 74 | 0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */ | ||
| 75 | >; | ||
| 76 | }; | ||
| 77 | |||
| 78 | leds_base_pins: pinmux_leds_base_pins { | ||
| 79 | pinctrl-single,pins = < | ||
| 80 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ | ||
| 81 | 0x88 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn3.gpio2_0 */ | ||
| 82 | >; | ||
| 83 | }; | ||
| 84 | }; | ||
| 85 | |||
| 86 | &lcdc { | ||
| 87 | status = "okay"; | ||
| 88 | }; | ||
| 89 | |||
| 90 | &i2c0 { | ||
| 91 | eeprom: eeprom@50 { | ||
| 92 | compatible = "at,24c256"; | ||
| 93 | reg = <0x50>; | ||
| 94 | }; | ||
| 16 | }; | 95 | }; |
diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi b/arch/arm/boot/dts/am335x-igep0033.dtsi index 619624479311..7063311a58d9 100644 --- a/arch/arm/boot/dts/am335x-igep0033.dtsi +++ b/arch/arm/boot/dts/am335x-igep0033.dtsi | |||
| @@ -199,6 +199,35 @@ | |||
| 199 | pinctrl-0 = <&uart0_pins>; | 199 | pinctrl-0 = <&uart0_pins>; |
| 200 | }; | 200 | }; |
| 201 | 201 | ||
| 202 | &usb { | ||
| 203 | status = "okay"; | ||
| 204 | |||
| 205 | control@44e10000 { | ||
| 206 | status = "okay"; | ||
| 207 | }; | ||
| 208 | |||
| 209 | usb-phy@47401300 { | ||
| 210 | status = "okay"; | ||
| 211 | }; | ||
| 212 | |||
| 213 | usb-phy@47401b00 { | ||
| 214 | status = "okay"; | ||
| 215 | }; | ||
| 216 | |||
| 217 | usb@47401000 { | ||
| 218 | status = "okay"; | ||
| 219 | }; | ||
| 220 | |||
| 221 | usb@47401800 { | ||
| 222 | status = "okay"; | ||
| 223 | dr_mode = "host"; | ||
| 224 | }; | ||
| 225 | |||
| 226 | dma-controller@07402000 { | ||
| 227 | status = "okay"; | ||
| 228 | }; | ||
| 229 | }; | ||
| 230 | |||
| 202 | #include "tps65910.dtsi" | 231 | #include "tps65910.dtsi" |
| 203 | 232 | ||
| 204 | &tps { | 233 | &tps { |
diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts index e99dfaf70052..03fcbf0a88a8 100644 --- a/arch/arm/boot/dts/am3517-evm.dts +++ b/arch/arm/boot/dts/am3517-evm.dts | |||
| @@ -7,11 +7,11 @@ | |||
| 7 | */ | 7 | */ |
| 8 | /dts-v1/; | 8 | /dts-v1/; |
| 9 | 9 | ||
| 10 | #include "omap34xx.dtsi" | 10 | #include "am3517.dtsi" |
| 11 | 11 | ||
| 12 | / { | 12 | / { |
| 13 | model = "TI AM3517 EVM (AM3517/05)"; | 13 | model = "TI AM3517 EVM (AM3517/05 TMDSEVM3517)"; |
| 14 | compatible = "ti,am3517-evm", "ti,omap3"; | 14 | compatible = "ti,am3517-evm", "ti,am3517", "ti,omap3"; |
| 15 | 15 | ||
| 16 | memory { | 16 | memory { |
| 17 | device_type = "memory"; | 17 | device_type = "memory"; |
diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi new file mode 100644 index 000000000000..2fbe02faa8b1 --- /dev/null +++ b/arch/arm/boot/dts/am3517.dtsi | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * Device Tree Source for am3517 SoC | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public License | ||
| 7 | * version 2. This program is licensed "as is" without any warranty of any | ||
| 8 | * kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include "omap3.dtsi" | ||
| 12 | |||
| 13 | / { | ||
| 14 | aliases { | ||
| 15 | serial3 = &uart4; | ||
| 16 | }; | ||
| 17 | |||
| 18 | ocp { | ||
| 19 | am35x_otg_hs: am35x_otg_hs@5c040000 { | ||
| 20 | compatible = "ti,omap3-musb"; | ||
| 21 | ti,hwmods = "am35x_otg_hs"; | ||
| 22 | status = "disabled"; | ||
| 23 | reg = <0x5c040000 0x1000>; | ||
| 24 | interrupts = <71>; | ||
| 25 | interrupt-names = "mc"; | ||
| 26 | }; | ||
| 27 | |||
| 28 | davinci_emac: ethernet@0x5c000000 { | ||
| 29 | compatible = "ti,am3517-emac"; | ||
| 30 | ti,hwmods = "davinci_emac"; | ||
| 31 | status = "disabled"; | ||
| 32 | reg = <0x5c000000 0x30000>; | ||
| 33 | interrupts = <67 68 69 70>; | ||
| 34 | ti,davinci-ctrl-reg-offset = <0x10000>; | ||
| 35 | ti,davinci-ctrl-mod-reg-offset = <0>; | ||
| 36 | ti,davinci-ctrl-ram-offset = <0x20000>; | ||
| 37 | ti,davinci-ctrl-ram-size = <0x2000>; | ||
| 38 | ti,davinci-rmii-en = /bits/ 8 <1>; | ||
| 39 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
| 40 | }; | ||
| 41 | |||
| 42 | davinci_mdio: ethernet@0x5c030000 { | ||
| 43 | compatible = "ti,davinci_mdio"; | ||
| 44 | ti,hwmods = "davinci_mdio"; | ||
| 45 | status = "disabled"; | ||
| 46 | reg = <0x5c030000 0x1000>; | ||
| 47 | bus_freq = <1000000>; | ||
| 48 | #address-cells = <1>; | ||
| 49 | #size-cells = <0>; | ||
| 50 | }; | ||
| 51 | |||
| 52 | uart4: serial@4809e000 { | ||
| 53 | compatible = "ti,omap3-uart"; | ||
| 54 | ti,hwmods = "uart4"; | ||
| 55 | status = "disabled"; | ||
| 56 | reg = <0x4809e000 0x400>; | ||
| 57 | interrupts = <84>; | ||
| 58 | dmas = <&sdma 55 &sdma 54>; | ||
| 59 | dma-names = "tx", "rx"; | ||
| 60 | clock-frequency = <48000000>; | ||
| 61 | }; | ||
| 62 | }; | ||
| 63 | }; | ||
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 90ce29dbe119..08a56bcfc724 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts | |||
| @@ -99,22 +99,22 @@ | |||
| 99 | spi-max-frequency = <50000000>; | 99 | spi-max-frequency = <50000000>; |
| 100 | }; | 100 | }; |
| 101 | }; | 101 | }; |
| 102 | }; | ||
| 102 | 103 | ||
| 103 | pcie-controller { | 104 | pcie-controller { |
| 105 | status = "okay"; | ||
| 106 | /* | ||
| 107 | * The two PCIe units are accessible through | ||
| 108 | * both standard PCIe slots and mini-PCIe | ||
| 109 | * slots on the board. | ||
| 110 | */ | ||
| 111 | pcie@1,0 { | ||
| 112 | /* Port 0, Lane 0 */ | ||
| 113 | status = "okay"; | ||
| 114 | }; | ||
| 115 | pcie@2,0 { | ||
| 116 | /* Port 1, Lane 0 */ | ||
| 104 | status = "okay"; | 117 | status = "okay"; |
| 105 | /* | ||
| 106 | * The two PCIe units are accessible through | ||
| 107 | * both standard PCIe slots and mini-PCIe | ||
| 108 | * slots on the board. | ||
| 109 | */ | ||
| 110 | pcie@1,0 { | ||
| 111 | /* Port 0, Lane 0 */ | ||
| 112 | status = "okay"; | ||
| 113 | }; | ||
| 114 | pcie@2,0 { | ||
| 115 | /* Port 1, Lane 0 */ | ||
| 116 | status = "okay"; | ||
| 117 | }; | ||
| 118 | }; | 118 | }; |
| 119 | }; | 119 | }; |
| 120 | }; | 120 | }; |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 00d6a798c705..7f10f627ae5b 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | 118 | ||
| 119 | coherency-fabric@20200 { | 119 | coherency-fabric@20200 { |
| 120 | compatible = "marvell,coherency-fabric"; | 120 | compatible = "marvell,coherency-fabric"; |
| 121 | reg = <0x20200 0xb0>, <0x21810 0x1c>; | 121 | reg = <0x20200 0xb0>, <0x21010 0x1c>; |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | serial@12000 { | 124 | serial@12000 { |
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index 3f5e6121c730..98335fb34b7a 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | /* | 47 | /* |
| 48 | * MV78230 has 2 PCIe units Gen2.0: One unit can be | 48 | * MV78230 has 2 PCIe units Gen2.0: One unit can be |
| 49 | * configured as x4 or quad x1 lanes. One unit is | 49 | * configured as x4 or quad x1 lanes. One unit is |
| 50 | * x4/x1. | 50 | * x1 only. |
| 51 | */ | 51 | */ |
| 52 | pcie-controller { | 52 | pcie-controller { |
| 53 | compatible = "marvell,armada-xp-pcie"; | 53 | compatible = "marvell,armada-xp-pcie"; |
| @@ -62,10 +62,10 @@ | |||
| 62 | 62 | ||
| 63 | ranges = | 63 | ranges = |
| 64 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | 64 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ |
| 65 | 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ | ||
| 66 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ | 65 | 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ |
| 67 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | 66 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ |
| 68 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | 67 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ |
| 68 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | ||
| 69 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | 69 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ |
| 70 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | 70 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ |
| 71 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | 71 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ |
| @@ -74,8 +74,8 @@ | |||
| 74 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | 74 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ |
| 75 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | 75 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ |
| 76 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | 76 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ |
| 77 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | 77 | 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ |
| 78 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>; | 78 | 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */>; |
| 79 | 79 | ||
| 80 | pcie@1,0 { | 80 | pcie@1,0 { |
| 81 | device_type = "pci"; | 81 | device_type = "pci"; |
| @@ -145,20 +145,20 @@ | |||
| 145 | status = "disabled"; | 145 | status = "disabled"; |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | pcie@9,0 { | 148 | pcie@5,0 { |
| 149 | device_type = "pci"; | 149 | device_type = "pci"; |
| 150 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | 150 | assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; |
| 151 | reg = <0x4800 0 0 0 0>; | 151 | reg = <0x2800 0 0 0 0>; |
| 152 | #address-cells = <3>; | 152 | #address-cells = <3>; |
| 153 | #size-cells = <2>; | 153 | #size-cells = <2>; |
| 154 | #interrupt-cells = <1>; | 154 | #interrupt-cells = <1>; |
| 155 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | 155 | ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 |
| 156 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | 156 | 0x81000000 0 0 0x81000000 0x5 0 1 0>; |
| 157 | interrupt-map-mask = <0 0 0 0>; | 157 | interrupt-map-mask = <0 0 0 0>; |
| 158 | interrupt-map = <0 0 0 0 &mpic 99>; | 158 | interrupt-map = <0 0 0 0 &mpic 62>; |
| 159 | marvell,pcie-port = <2>; | 159 | marvell,pcie-port = <1>; |
| 160 | marvell,pcie-lane = <0>; | 160 | marvell,pcie-lane = <0>; |
| 161 | clocks = <&gateclk 26>; | 161 | clocks = <&gateclk 9>; |
| 162 | status = "disabled"; | 162 | status = "disabled"; |
| 163 | }; | 163 | }; |
| 164 | }; | 164 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 3e9fd1353f89..66609684d41b 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | /* | 48 | /* |
| 49 | * MV78260 has 3 PCIe units Gen2.0: Two units can be | 49 | * MV78260 has 3 PCIe units Gen2.0: Two units can be |
| 50 | * configured as x4 or quad x1 lanes. One unit is | 50 | * configured as x4 or quad x1 lanes. One unit is |
| 51 | * x4/x1. | 51 | * x4 only. |
| 52 | */ | 52 | */ |
| 53 | pcie-controller { | 53 | pcie-controller { |
| 54 | compatible = "marvell,armada-xp-pcie"; | 54 | compatible = "marvell,armada-xp-pcie"; |
| @@ -68,7 +68,9 @@ | |||
| 68 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ | 68 | 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ |
| 69 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ | 69 | 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ |
| 70 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ | 70 | 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ |
| 71 | 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */ | 71 | 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */ |
| 72 | 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */ | ||
| 73 | 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */ | ||
| 72 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ | 74 | 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ |
| 73 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ | 75 | 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ |
| 74 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ | 76 | 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ |
| @@ -77,10 +79,18 @@ | |||
| 77 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ | 79 | 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ |
| 78 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ | 80 | 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ |
| 79 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ | 81 | 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ |
| 80 | 0x82000000 0x9 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ | 82 | |
| 81 | 0x81000000 0x9 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ | 83 | 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ |
| 82 | 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ | 84 | 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ |
| 83 | 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; | 85 | 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */ |
| 86 | 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */ | ||
| 87 | 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */ | ||
| 88 | 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */ | ||
| 89 | 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */ | ||
| 90 | 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */ | ||
| 91 | |||
| 92 | 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ | ||
| 93 | 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>; | ||
| 84 | 94 | ||
| 85 | pcie@1,0 { | 95 | pcie@1,0 { |
| 86 | device_type = "pci"; | 96 | device_type = "pci"; |
| @@ -106,8 +116,8 @@ | |||
| 106 | #address-cells = <3>; | 116 | #address-cells = <3>; |
| 107 | #size-cells = <2>; | 117 | #size-cells = <2>; |
| 108 | #interrupt-cells = <1>; | 118 | #interrupt-cells = <1>; |
| 109 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 | 119 | ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 |
| 110 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; | 120 | 0x81000000 0 0 0x81000000 0x2 0 1 0>; |
| 111 | interrupt-map-mask = <0 0 0 0>; | 121 | interrupt-map-mask = <0 0 0 0>; |
| 112 | interrupt-map = <0 0 0 0 &mpic 59>; | 122 | interrupt-map = <0 0 0 0 &mpic 59>; |
| 113 | marvell,pcie-port = <0>; | 123 | marvell,pcie-port = <0>; |
| @@ -150,37 +160,88 @@ | |||
| 150 | status = "disabled"; | 160 | status = "disabled"; |
| 151 | }; | 161 | }; |
| 152 | 162 | ||
| 153 | pcie@9,0 { | 163 | pcie@5,0 { |
| 154 | device_type = "pci"; | 164 | device_type = "pci"; |
| 155 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | 165 | assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; |
| 156 | reg = <0x4800 0 0 0 0>; | 166 | reg = <0x2800 0 0 0 0>; |
| 157 | #address-cells = <3>; | 167 | #address-cells = <3>; |
| 158 | #size-cells = <2>; | 168 | #size-cells = <2>; |
| 159 | #interrupt-cells = <1>; | 169 | #interrupt-cells = <1>; |
| 160 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | 170 | ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 |
| 161 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | 171 | 0x81000000 0 0 0x81000000 0x5 0 1 0>; |
| 162 | interrupt-map-mask = <0 0 0 0>; | 172 | interrupt-map-mask = <0 0 0 0>; |
| 163 | interrupt-map = <0 0 0 0 &mpic 99>; | 173 | interrupt-map = <0 0 0 0 &mpic 62>; |
| 164 | marvell,pcie-port = <2>; | 174 | marvell,pcie-port = <1>; |
| 165 | marvell,pcie-lane = <0>; | 175 | marvell,pcie-lane = <0>; |
| 166 | clocks = <&gateclk 26>; | 176 | clocks = <&gateclk 9>; |
| 167 | status = "disabled"; | 177 | status = "disabled"; |
| 168 | }; | 178 | }; |
| 169 | 179 | ||
| 170 | pcie@10,0 { | 180 | pcie@6,0 { |
| 171 | device_type = "pci"; | 181 | device_type = "pci"; |
| 172 | assigned-addresses = <0x82000800 0 0x82000 0 0x2000>; | 182 | assigned-addresses = <0x82000800 0 0x84000 0 0x2000>; |
| 173 | reg = <0x5000 0 0 0 0>; | 183 | reg = <0x3000 0 0 0 0>; |
| 174 | #address-cells = <3>; | 184 | #address-cells = <3>; |
| 175 | #size-cells = <2>; | 185 | #size-cells = <2>; |
| 176 | #interrupt-cells = <1>; | 186 | #interrupt-cells = <1>; |
| 177 | ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0 | 187 | ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0 |
| 178 | 0x81000000 0 0 0x81000000 0xa 0 1 0>; | 188 | 0x81000000 0 0 0x81000000 0x6 0 1 0>; |
| 179 | interrupt-map-mask = <0 0 0 0>; | 189 | interrupt-map-mask = <0 0 0 0>; |
| 180 | interrupt-map = <0 0 0 0 &mpic 103>; | 190 | interrupt-map = <0 0 0 0 &mpic 63>; |
| 181 | marvell,pcie-port = <3>; | 191 | marvell,pcie-port = <1>; |
| 192 | marvell,pcie-lane = <1>; | ||
| 193 | clocks = <&gateclk 10>; | ||
| 194 | status = "disabled"; | ||
| 195 | }; | ||
| 196 | |||
| 197 | pcie@7,0 { | ||
| 198 | device_type = "pci"; | ||
| 199 | assigned-addresses = <0x82000800 0 0x88000 0 0x2000>; | ||
| 200 | reg = <0x3800 0 0 0 0>; | ||
| 201 | #address-cells = <3>; | ||
| 202 | #size-cells = <2>; | ||
| 203 | #interrupt-cells = <1>; | ||
| 204 | ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0 | ||
| 205 | 0x81000000 0 0 0x81000000 0x7 0 1 0>; | ||
| 206 | interrupt-map-mask = <0 0 0 0>; | ||
| 207 | interrupt-map = <0 0 0 0 &mpic 64>; | ||
| 208 | marvell,pcie-port = <1>; | ||
| 209 | marvell,pcie-lane = <2>; | ||
| 210 | clocks = <&gateclk 11>; | ||
| 211 | status = "disabled"; | ||
| 212 | }; | ||
| 213 | |||
| 214 | pcie@8,0 { | ||
| 215 | device_type = "pci"; | ||
| 216 | assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>; | ||
| 217 | reg = <0x4000 0 0 0 0>; | ||
| 218 | #address-cells = <3>; | ||
| 219 | #size-cells = <2>; | ||
| 220 | #interrupt-cells = <1>; | ||
| 221 | ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0 | ||
| 222 | 0x81000000 0 0 0x81000000 0x8 0 1 0>; | ||
| 223 | interrupt-map-mask = <0 0 0 0>; | ||
| 224 | interrupt-map = <0 0 0 0 &mpic 65>; | ||
| 225 | marvell,pcie-port = <1>; | ||
| 226 | marvell,pcie-lane = <3>; | ||
| 227 | clocks = <&gateclk 12>; | ||
| 228 | status = "disabled"; | ||
| 229 | }; | ||
| 230 | |||
| 231 | pcie@9,0 { | ||
| 232 | device_type = "pci"; | ||
| 233 | assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; | ||
| 234 | reg = <0x4800 0 0 0 0>; | ||
| 235 | #address-cells = <3>; | ||
| 236 | #size-cells = <2>; | ||
| 237 | #interrupt-cells = <1>; | ||
| 238 | ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0 | ||
| 239 | 0x81000000 0 0 0x81000000 0x9 0 1 0>; | ||
| 240 | interrupt-map-mask = <0 0 0 0>; | ||
| 241 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
| 242 | marvell,pcie-port = <2>; | ||
| 182 | marvell,pcie-lane = <0>; | 243 | marvell,pcie-lane = <0>; |
| 183 | clocks = <&gateclk 27>; | 244 | clocks = <&gateclk 26>; |
| 184 | status = "disabled"; | 245 | status = "disabled"; |
| 185 | }; | 246 | }; |
| 186 | }; | 247 | }; |
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi index 2347e9563cef..6801106fa1f8 100644 --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi | |||
| @@ -11,6 +11,10 @@ | |||
| 11 | #include <dt-bindings/interrupt-controller/irq.h> | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
| 12 | 12 | ||
| 13 | / { | 13 | / { |
| 14 | aliases { | ||
| 15 | serial4 = &usart3; | ||
| 16 | }; | ||
| 17 | |||
| 14 | ahb { | 18 | ahb { |
| 15 | apb { | 19 | apb { |
| 16 | pinctrl@fffff400 { | 20 | pinctrl@fffff400 { |
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 1e12aeff403b..aa537ed13f0a 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi | |||
| @@ -85,6 +85,8 @@ | |||
| 85 | reg = <0x7e205000 0x1000>; | 85 | reg = <0x7e205000 0x1000>; |
| 86 | interrupts = <2 21>; | 86 | interrupts = <2 21>; |
| 87 | clocks = <&clk_i2c>; | 87 | clocks = <&clk_i2c>; |
| 88 | #address-cells = <1>; | ||
| 89 | #size-cells = <0>; | ||
| 88 | status = "disabled"; | 90 | status = "disabled"; |
| 89 | }; | 91 | }; |
| 90 | 92 | ||
| @@ -93,6 +95,8 @@ | |||
| 93 | reg = <0x7e804000 0x1000>; | 95 | reg = <0x7e804000 0x1000>; |
| 94 | interrupts = <2 21>; | 96 | interrupts = <2 21>; |
| 95 | clocks = <&clk_i2c>; | 97 | clocks = <&clk_i2c>; |
| 98 | #address-cells = <1>; | ||
| 99 | #size-cells = <0>; | ||
| 96 | status = "disabled"; | 100 | status = "disabled"; |
| 97 | }; | 101 | }; |
| 98 | 102 | ||
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index dc259e8b8a73..9b186ac06c8b 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi | |||
| @@ -27,6 +27,13 @@ | |||
| 27 | i2c2_bus: i2c2-bus { | 27 | i2c2_bus: i2c2-bus { |
| 28 | samsung,pin-pud = <0>; | 28 | samsung,pin-pud = <0>; |
| 29 | }; | 29 | }; |
| 30 | |||
| 31 | max77686_irq: max77686-irq { | ||
| 32 | samsung,pins = "gpx3-2"; | ||
| 33 | samsung,pin-function = <0>; | ||
| 34 | samsung,pin-pud = <0>; | ||
| 35 | samsung,pin-drv = <0>; | ||
| 36 | }; | ||
| 30 | }; | 37 | }; |
| 31 | 38 | ||
| 32 | i2c@12C60000 { | 39 | i2c@12C60000 { |
| @@ -35,6 +42,11 @@ | |||
| 35 | 42 | ||
| 36 | max77686@09 { | 43 | max77686@09 { |
| 37 | compatible = "maxim,max77686"; | 44 | compatible = "maxim,max77686"; |
| 45 | interrupt-parent = <&gpx3>; | ||
| 46 | interrupts = <2 0>; | ||
| 47 | pinctrl-names = "default"; | ||
| 48 | pinctrl-0 = <&max77686_irq>; | ||
| 49 | wakeup-source; | ||
| 38 | reg = <0x09>; | 50 | reg = <0x09>; |
| 39 | 51 | ||
| 40 | voltage-regulators { | 52 | voltage-regulators { |
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 59154dc15fe4..fb28b2ecb1db 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi | |||
| @@ -161,7 +161,7 @@ | |||
| 161 | clocks = <&clks 197>, <&clks 3>, | 161 | clocks = <&clks 197>, <&clks 3>, |
| 162 | <&clks 197>, <&clks 107>, | 162 | <&clks 197>, <&clks 107>, |
| 163 | <&clks 0>, <&clks 118>, | 163 | <&clks 0>, <&clks 118>, |
| 164 | <&clks 62>, <&clks 139>, | 164 | <&clks 0>, <&clks 139>, |
| 165 | <&clks 0>; | 165 | <&clks 0>; |
| 166 | clock-names = "core", "rxtx0", | 166 | clock-names = "core", "rxtx0", |
| 167 | "rxtx1", "rxtx2", | 167 | "rxtx1", "rxtx2", |
diff --git a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi index 9c18adf788f7..f577b7df9a29 100644 --- a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi +++ b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi | |||
| @@ -44,8 +44,8 @@ | |||
| 44 | gpmc,wr-access-ns = <186>; | 44 | gpmc,wr-access-ns = <186>; |
| 45 | gpmc,cycle2cycle-samecsen; | 45 | gpmc,cycle2cycle-samecsen; |
| 46 | gpmc,cycle2cycle-diffcsen; | 46 | gpmc,cycle2cycle-diffcsen; |
| 47 | vmmc-supply = <&vddvario>; | 47 | vddvario-supply = <&vddvario>; |
| 48 | vmmc_aux-supply = <&vdd33a>; | 48 | vdd33a-supply = <&vdd33a>; |
| 49 | reg-io-width = <4>; | 49 | reg-io-width = <4>; |
| 50 | smsc,save-mac-address; | 50 | smsc,save-mac-address; |
| 51 | }; | 51 | }; |
diff --git a/arch/arm/boot/dts/omap-zoom-common.dtsi b/arch/arm/boot/dts/omap-zoom-common.dtsi index b0ee342598f0..68221fab978d 100644 --- a/arch/arm/boot/dts/omap-zoom-common.dtsi +++ b/arch/arm/boot/dts/omap-zoom-common.dtsi | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * they probably share the same GPIO IRQ | 13 | * they probably share the same GPIO IRQ |
| 14 | * REVISIT: Add timing support from slls644g.pdf | 14 | * REVISIT: Add timing support from slls644g.pdf |
| 15 | */ | 15 | */ |
| 16 | 8250@3,0 { | 16 | uart@3,0 { |
| 17 | compatible = "ns16550a"; | 17 | compatible = "ns16550a"; |
| 18 | reg = <3 0 0x100>; | 18 | reg = <3 0 0x100>; |
| 19 | bank-width = <2>; | 19 | bank-width = <2>; |
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index a2bfcde858a6..d0c5b37e248c 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <dt-bindings/gpio/gpio.h> | 11 | #include <dt-bindings/gpio/gpio.h> |
| 12 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 12 | #include <dt-bindings/pinctrl/omap.h> | 13 | #include <dt-bindings/pinctrl/omap.h> |
| 13 | 14 | ||
| 14 | #include "skeleton.dtsi" | 15 | #include "skeleton.dtsi" |
| @@ -21,6 +22,8 @@ | |||
| 21 | serial0 = &uart1; | 22 | serial0 = &uart1; |
| 22 | serial1 = &uart2; | 23 | serial1 = &uart2; |
| 23 | serial2 = &uart3; | 24 | serial2 = &uart3; |
| 25 | i2c0 = &i2c1; | ||
| 26 | i2c1 = &i2c2; | ||
| 24 | }; | 27 | }; |
| 25 | 28 | ||
| 26 | cpus { | 29 | cpus { |
| @@ -53,6 +56,28 @@ | |||
| 53 | ranges; | 56 | ranges; |
| 54 | ti,hwmods = "l3_main"; | 57 | ti,hwmods = "l3_main"; |
| 55 | 58 | ||
| 59 | aes: aes@480a6000 { | ||
| 60 | compatible = "ti,omap2-aes"; | ||
| 61 | ti,hwmods = "aes"; | ||
| 62 | reg = <0x480a6000 0x50>; | ||
| 63 | dmas = <&sdma 9 &sdma 10>; | ||
| 64 | dma-names = "tx", "rx"; | ||
| 65 | }; | ||
| 66 | |||
| 67 | hdq1w: 1w@480b2000 { | ||
| 68 | compatible = "ti,omap2420-1w"; | ||
| 69 | ti,hwmods = "hdq1w"; | ||
| 70 | reg = <0x480b2000 0x1000>; | ||
| 71 | interrupts = <58>; | ||
| 72 | }; | ||
| 73 | |||
| 74 | mailbox: mailbox@48094000 { | ||
| 75 | compatible = "ti,omap2-mailbox"; | ||
| 76 | ti,hwmods = "mailbox"; | ||
| 77 | reg = <0x48094000 0x200>; | ||
| 78 | interrupts = <26>; | ||
| 79 | }; | ||
| 80 | |||
| 56 | intc: interrupt-controller@1 { | 81 | intc: interrupt-controller@1 { |
| 57 | compatible = "ti,omap2-intc"; | 82 | compatible = "ti,omap2-intc"; |
| 58 | interrupt-controller; | 83 | interrupt-controller; |
| @@ -63,6 +88,7 @@ | |||
| 63 | 88 | ||
| 64 | sdma: dma-controller@48056000 { | 89 | sdma: dma-controller@48056000 { |
| 65 | compatible = "ti,omap2430-sdma", "ti,omap2420-sdma"; | 90 | compatible = "ti,omap2430-sdma", "ti,omap2420-sdma"; |
| 91 | ti,hwmods = "dma"; | ||
| 66 | reg = <0x48056000 0x1000>; | 92 | reg = <0x48056000 0x1000>; |
| 67 | interrupts = <12>, | 93 | interrupts = <12>, |
| 68 | <13>, | 94 | <13>, |
| @@ -73,21 +99,91 @@ | |||
| 73 | #dma-requests = <64>; | 99 | #dma-requests = <64>; |
| 74 | }; | 100 | }; |
| 75 | 101 | ||
| 102 | i2c1: i2c@48070000 { | ||
| 103 | compatible = "ti,omap2-i2c"; | ||
| 104 | ti,hwmods = "i2c1"; | ||
| 105 | reg = <0x48070000 0x80>; | ||
| 106 | #address-cells = <1>; | ||
| 107 | #size-cells = <0>; | ||
| 108 | interrupts = <56>; | ||
| 109 | dmas = <&sdma 27 &sdma 28>; | ||
| 110 | dma-names = "tx", "rx"; | ||
| 111 | }; | ||
| 112 | |||
| 113 | i2c2: i2c@48072000 { | ||
| 114 | compatible = "ti,omap2-i2c"; | ||
| 115 | ti,hwmods = "i2c2"; | ||
| 116 | reg = <0x48072000 0x80>; | ||
| 117 | #address-cells = <1>; | ||
| 118 | #size-cells = <0>; | ||
| 119 | interrupts = <57>; | ||
| 120 | dmas = <&sdma 29 &sdma 30>; | ||
| 121 | dma-names = "tx", "rx"; | ||
| 122 | }; | ||
| 123 | |||
| 124 | mcspi1: mcspi@48098000 { | ||
| 125 | compatible = "ti,omap2-mcspi"; | ||
| 126 | ti,hwmods = "mcspi1"; | ||
| 127 | reg = <0x48098000 0x100>; | ||
| 128 | interrupts = <65>; | ||
| 129 | dmas = <&sdma 35 &sdma 36 &sdma 37 &sdma 38 | ||
| 130 | &sdma 39 &sdma 40 &sdma 41 &sdma 42>; | ||
| 131 | dma-names = "tx0", "rx0", "tx1", "rx1", | ||
| 132 | "tx2", "rx2", "tx3", "rx3"; | ||
| 133 | }; | ||
| 134 | |||
| 135 | mcspi2: mcspi@4809a000 { | ||
| 136 | compatible = "ti,omap2-mcspi"; | ||
| 137 | ti,hwmods = "mcspi2"; | ||
| 138 | reg = <0x4809a000 0x100>; | ||
| 139 | interrupts = <66>; | ||
| 140 | dmas = <&sdma 43 &sdma 44 &sdma 45 &sdma 46>; | ||
| 141 | dma-names = "tx0", "rx0", "tx1", "rx1"; | ||
| 142 | }; | ||
| 143 | |||
| 144 | rng: rng@480a0000 { | ||
| 145 | compatible = "ti,omap2-rng"; | ||
| 146 | ti,hwmods = "rng"; | ||
| 147 | reg = <0x480a0000 0x50>; | ||
| 148 | interrupts = <36>; | ||
| 149 | }; | ||
| 150 | |||
| 151 | sham: sham@480a4000 { | ||
| 152 | compatible = "ti,omap2-sham"; | ||
| 153 | ti,hwmods = "sham"; | ||
| 154 | reg = <0x480a4000 0x64>; | ||
| 155 | interrupts = <51>; | ||
| 156 | dmas = <&sdma 13>; | ||
| 157 | dma-names = "rx"; | ||
| 158 | }; | ||
| 159 | |||
| 76 | uart1: serial@4806a000 { | 160 | uart1: serial@4806a000 { |
| 77 | compatible = "ti,omap2-uart"; | 161 | compatible = "ti,omap2-uart"; |
| 78 | ti,hwmods = "uart1"; | 162 | ti,hwmods = "uart1"; |
| 163 | reg = <0x4806a000 0x2000>; | ||
| 164 | interrupts = <72>; | ||
| 165 | dmas = <&sdma 49 &sdma 50>; | ||
| 166 | dma-names = "tx", "rx"; | ||
| 79 | clock-frequency = <48000000>; | 167 | clock-frequency = <48000000>; |
| 80 | }; | 168 | }; |
| 81 | 169 | ||
| 82 | uart2: serial@4806c000 { | 170 | uart2: serial@4806c000 { |
| 83 | compatible = "ti,omap2-uart"; | 171 | compatible = "ti,omap2-uart"; |
| 84 | ti,hwmods = "uart2"; | 172 | ti,hwmods = "uart2"; |
| 173 | reg = <0x4806c000 0x400>; | ||
| 174 | interrupts = <73>; | ||
| 175 | dmas = <&sdma 51 &sdma 52>; | ||
| 176 | dma-names = "tx", "rx"; | ||
| 85 | clock-frequency = <48000000>; | 177 | clock-frequency = <48000000>; |
| 86 | }; | 178 | }; |
| 87 | 179 | ||
| 88 | uart3: serial@4806e000 { | 180 | uart3: serial@4806e000 { |
| 89 | compatible = "ti,omap2-uart"; | 181 | compatible = "ti,omap2-uart"; |
| 90 | ti,hwmods = "uart3"; | 182 | ti,hwmods = "uart3"; |
| 183 | reg = <0x4806e000 0x400>; | ||
| 184 | interrupts = <74>; | ||
| 185 | dmas = <&sdma 53 &sdma 54>; | ||
| 186 | dma-names = "tx", "rx"; | ||
| 91 | clock-frequency = <48000000>; | 187 | clock-frequency = <48000000>; |
| 92 | }; | 188 | }; |
| 93 | 189 | ||
diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi index c8f9c55169ea..60c605de22dd 100644 --- a/arch/arm/boot/dts/omap2420.dtsi +++ b/arch/arm/boot/dts/omap2420.dtsi | |||
| @@ -114,6 +114,15 @@ | |||
| 114 | dma-names = "tx", "rx"; | 114 | dma-names = "tx", "rx"; |
| 115 | }; | 115 | }; |
| 116 | 116 | ||
| 117 | msdi1: mmc@4809c000 { | ||
| 118 | compatible = "ti,omap2420-mmc"; | ||
| 119 | ti,hwmods = "msdi1"; | ||
| 120 | reg = <0x4809c000 0x80>; | ||
| 121 | interrupts = <83>; | ||
| 122 | dmas = <&sdma 61 &sdma 62>; | ||
| 123 | dma-names = "tx", "rx"; | ||
| 124 | }; | ||
| 125 | |||
| 117 | timer1: timer@48028000 { | 126 | timer1: timer@48028000 { |
| 118 | compatible = "ti,omap2420-timer"; | 127 | compatible = "ti,omap2420-timer"; |
| 119 | reg = <0x48028000 0x400>; | 128 | reg = <0x48028000 0x400>; |
| @@ -121,5 +130,19 @@ | |||
| 121 | ti,hwmods = "timer1"; | 130 | ti,hwmods = "timer1"; |
| 122 | ti,timer-alwon; | 131 | ti,timer-alwon; |
| 123 | }; | 132 | }; |
| 133 | |||
| 134 | wd_timer2: wdt@48022000 { | ||
| 135 | compatible = "ti,omap2-wdt"; | ||
| 136 | ti,hwmods = "wd_timer2"; | ||
| 137 | reg = <0x48022000 0x80>; | ||
| 138 | }; | ||
| 124 | }; | 139 | }; |
| 125 | }; | 140 | }; |
| 141 | |||
| 142 | &i2c1 { | ||
| 143 | compatible = "ti,omap2420-i2c"; | ||
| 144 | }; | ||
| 145 | |||
| 146 | &i2c2 { | ||
| 147 | compatible = "ti,omap2420-i2c"; | ||
| 148 | }; | ||
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi index c535a5a2b27f..d624345666f5 100644 --- a/arch/arm/boot/dts/omap2430.dtsi +++ b/arch/arm/boot/dts/omap2430.dtsi | |||
| @@ -175,6 +175,25 @@ | |||
| 175 | dma-names = "tx", "rx"; | 175 | dma-names = "tx", "rx"; |
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | mmc1: mmc@4809c000 { | ||
| 179 | compatible = "ti,omap2-hsmmc"; | ||
| 180 | reg = <0x4809c000 0x200>; | ||
| 181 | interrupts = <83>; | ||
| 182 | ti,hwmods = "mmc1"; | ||
| 183 | ti,dual-volt; | ||
| 184 | dmas = <&sdma 61>, <&sdma 62>; | ||
| 185 | dma-names = "tx", "rx"; | ||
| 186 | }; | ||
| 187 | |||
| 188 | mmc2: mmc@480b4000 { | ||
| 189 | compatible = "ti,omap2-hsmmc"; | ||
| 190 | reg = <0x480b4000 0x200>; | ||
| 191 | interrupts = <86>; | ||
| 192 | ti,hwmods = "mmc2"; | ||
| 193 | dmas = <&sdma 47>, <&sdma 48>; | ||
| 194 | dma-names = "tx", "rx"; | ||
| 195 | }; | ||
| 196 | |||
| 178 | timer1: timer@49018000 { | 197 | timer1: timer@49018000 { |
| 179 | compatible = "ti,omap2420-timer"; | 198 | compatible = "ti,omap2420-timer"; |
| 180 | reg = <0x49018000 0x400>; | 199 | reg = <0x49018000 0x400>; |
| @@ -182,5 +201,35 @@ | |||
| 182 | ti,hwmods = "timer1"; | 201 | ti,hwmods = "timer1"; |
| 183 | ti,timer-alwon; | 202 | ti,timer-alwon; |
| 184 | }; | 203 | }; |
| 204 | |||
| 205 | mcspi3: mcspi@480b8000 { | ||
| 206 | compatible = "ti,omap2-mcspi"; | ||
| 207 | ti,hwmods = "mcspi3"; | ||
| 208 | reg = <0x480b8000 0x100>; | ||
| 209 | interrupts = <91>; | ||
| 210 | dmas = <&sdma 15 &sdma 16 &sdma 23 &sdma 24>; | ||
| 211 | dma-names = "tx0", "rx0", "tx1", "rx1"; | ||
| 212 | }; | ||
| 213 | |||
| 214 | usb_otg_hs: usb_otg_hs@480ac000 { | ||
| 215 | compatible = "ti,omap2-musb"; | ||
| 216 | ti,hwmods = "usb_otg_hs"; | ||
| 217 | reg = <0x480ac000 0x1000>; | ||
| 218 | interrupts = <93>; | ||
| 219 | }; | ||
| 220 | |||
| 221 | wd_timer2: wdt@49016000 { | ||
| 222 | compatible = "ti,omap2-wdt"; | ||
| 223 | ti,hwmods = "wd_timer2"; | ||
| 224 | reg = <0x49016000 0x80>; | ||
| 225 | }; | ||
| 185 | }; | 226 | }; |
| 186 | }; | 227 | }; |
| 228 | |||
| 229 | &i2c1 { | ||
| 230 | compatible = "ti,omap2430-i2c"; | ||
| 231 | }; | ||
| 232 | |||
| 233 | &i2c2 { | ||
| 234 | compatible = "ti,omap2430-i2c"; | ||
| 235 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 31a632f7effb..df33a50bc070 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts | |||
| @@ -215,3 +215,10 @@ | |||
| 215 | &usbhsehci { | 215 | &usbhsehci { |
| 216 | phys = <0 &hsusb2_phy>; | 216 | phys = <0 &hsusb2_phy>; |
| 217 | }; | 217 | }; |
| 218 | |||
| 219 | &vaux2 { | ||
| 220 | regulator-name = "usb_1v8"; | ||
| 221 | regulator-min-microvolt = <1800000>; | ||
| 222 | regulator-max-microvolt = <1800000>; | ||
| 223 | regulator-always-on; | ||
| 224 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index fa532aaacc68..3ba4a625ea5b 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
| @@ -61,6 +61,14 @@ | |||
| 61 | vcc-supply = <&hsusb2_power>; | 61 | vcc-supply = <&hsusb2_power>; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | sound { | ||
| 65 | compatible = "ti,omap-twl4030"; | ||
| 66 | ti,model = "omap3beagle"; | ||
| 67 | |||
| 68 | ti,mcbsp = <&mcbsp2>; | ||
| 69 | ti,codec = <&twl_audio>; | ||
| 70 | }; | ||
| 71 | |||
| 64 | gpio_keys { | 72 | gpio_keys { |
| 65 | compatible = "gpio-keys"; | 73 | compatible = "gpio-keys"; |
| 66 | 74 | ||
| @@ -120,6 +128,12 @@ | |||
| 120 | reg = <0x48>; | 128 | reg = <0x48>; |
| 121 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | 129 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ |
| 122 | interrupt-parent = <&intc>; | 130 | interrupt-parent = <&intc>; |
| 131 | |||
| 132 | twl_audio: audio { | ||
| 133 | compatible = "ti,twl4030-audio"; | ||
| 134 | codec { | ||
| 135 | }; | ||
| 136 | }; | ||
| 123 | }; | 137 | }; |
| 124 | }; | 138 | }; |
| 125 | 139 | ||
| @@ -178,3 +192,10 @@ | |||
| 178 | mode = <3>; | 192 | mode = <3>; |
| 179 | power = <50>; | 193 | power = <50>; |
| 180 | }; | 194 | }; |
| 195 | |||
| 196 | &vaux2 { | ||
| 197 | regulator-name = "vdd_ehci"; | ||
| 198 | regulator-min-microvolt = <1800000>; | ||
| 199 | regulator-max-microvolt = <1800000>; | ||
| 200 | regulator-always-on; | ||
| 201 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index ba1e58b7b7e3..165aaf7591ba 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Device Tree Source for IGEP Technology devices | 2 | * Common device tree for IGEP boards based on AM/DM37x |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
| 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
| @@ -10,7 +10,7 @@ | |||
| 10 | */ | 10 | */ |
| 11 | /dts-v1/; | 11 | /dts-v1/; |
| 12 | 12 | ||
| 13 | #include "omap34xx.dtsi" | 13 | #include "omap36xx.dtsi" |
| 14 | 14 | ||
| 15 | / { | 15 | / { |
| 16 | memory { | 16 | memory { |
| @@ -24,6 +24,25 @@ | |||
| 24 | ti,mcbsp = <&mcbsp2>; | 24 | ti,mcbsp = <&mcbsp2>; |
| 25 | ti,codec = <&twl_audio>; | 25 | ti,codec = <&twl_audio>; |
| 26 | }; | 26 | }; |
| 27 | |||
| 28 | vdd33: regulator-vdd33 { | ||
| 29 | compatible = "regulator-fixed"; | ||
| 30 | regulator-name = "vdd33"; | ||
| 31 | regulator-always-on; | ||
| 32 | }; | ||
| 33 | |||
| 34 | lbee1usjyc_vmmc: lbee1usjyc_vmmc { | ||
| 35 | pinctrl-names = "default"; | ||
| 36 | pinctrl-0 = <&lbee1usjyc_pins>; | ||
| 37 | compatible = "regulator-fixed"; | ||
| 38 | regulator-name = "regulator-lbee1usjyc"; | ||
| 39 | regulator-min-microvolt = <3300000>; | ||
| 40 | regulator-max-microvolt = <3300000>; | ||
| 41 | gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>; /* gpio_138 WIFI_PDN */ | ||
| 42 | startup-delay-us = <10000>; | ||
| 43 | enable-active-high; | ||
| 44 | vin-supply = <&vdd33>; | ||
| 45 | }; | ||
| 27 | }; | 46 | }; |
| 28 | 47 | ||
| 29 | &omap3_pmx_core { | 48 | &omap3_pmx_core { |
| @@ -48,6 +67,15 @@ | |||
| 48 | >; | 67 | >; |
| 49 | }; | 68 | }; |
| 50 | 69 | ||
| 70 | /* WiFi/BT combo */ | ||
| 71 | lbee1usjyc_pins: pinmux_lbee1usjyc_pins { | ||
| 72 | pinctrl-single,pins = < | ||
| 73 | 0x136 (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat5.gpio_137 */ | ||
| 74 | 0x138 (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat6.gpio_138 */ | ||
| 75 | 0x13a (PIN_OUTPUT | MUX_MODE4) /* sdmmc2_dat7.gpio_139 */ | ||
| 76 | >; | ||
| 77 | }; | ||
| 78 | |||
| 51 | mcbsp2_pins: pinmux_mcbsp2_pins { | 79 | mcbsp2_pins: pinmux_mcbsp2_pins { |
| 52 | pinctrl-single,pins = < | 80 | pinctrl-single,pins = < |
| 53 | 0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ | 81 | 0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ |
| @@ -65,10 +93,17 @@ | |||
| 65 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ | 93 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ |
| 66 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ | 94 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ |
| 67 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ | 95 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ |
| 68 | 0x120 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat4.sdmmc1_dat4 */ | 96 | >; |
| 69 | 0x122 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat5.sdmmc1_dat5 */ | 97 | }; |
| 70 | 0x124 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat6.sdmmc1_dat6 */ | 98 | |
| 71 | 0x126 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat7.sdmmc1_dat7 */ | 99 | mmc2_pins: pinmux_mmc2_pins { |
| 100 | pinctrl-single,pins = < | ||
| 101 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ | ||
| 102 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ | ||
| 103 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ | ||
| 104 | 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ | ||
| 105 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ | ||
| 106 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ | ||
| 72 | >; | 107 | >; |
| 73 | }; | 108 | }; |
| 74 | 109 | ||
| @@ -78,10 +113,33 @@ | |||
| 78 | >; | 113 | >; |
| 79 | }; | 114 | }; |
| 80 | 115 | ||
| 116 | i2c1_pins: pinmux_i2c1_pins { | ||
| 117 | pinctrl-single,pins = < | ||
| 118 | 0x18a (PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */ | ||
| 119 | 0x18c (PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */ | ||
| 120 | >; | ||
| 121 | }; | ||
| 122 | |||
| 123 | i2c2_pins: pinmux_i2c2_pins { | ||
| 124 | pinctrl-single,pins = < | ||
| 125 | 0x18e (PIN_INPUT | MUX_MODE0) /* i2c2_scl.i2c2_scl */ | ||
| 126 | 0x190 (PIN_INPUT | MUX_MODE0) /* i2c2_sda.i2c2_sda */ | ||
| 127 | >; | ||
| 128 | }; | ||
| 129 | |||
| 130 | i2c3_pins: pinmux_i2c3_pins { | ||
| 131 | pinctrl-single,pins = < | ||
| 132 | 0x192 (PIN_INPUT | MUX_MODE0) /* i2c3_scl.i2c3_scl */ | ||
| 133 | 0x194 (PIN_INPUT | MUX_MODE0) /* i2c3_sda.i2c3_sda */ | ||
| 134 | >; | ||
| 135 | }; | ||
| 136 | |||
| 81 | leds_pins: pinmux_leds_pins { }; | 137 | leds_pins: pinmux_leds_pins { }; |
| 82 | }; | 138 | }; |
| 83 | 139 | ||
| 84 | &i2c1 { | 140 | &i2c1 { |
| 141 | pinctrl-names = "default"; | ||
| 142 | pinctrl-0 = <&i2c1_pins>; | ||
| 85 | clock-frequency = <2600000>; | 143 | clock-frequency = <2600000>; |
| 86 | 144 | ||
| 87 | twl: twl@48 { | 145 | twl: twl@48 { |
| @@ -101,9 +159,16 @@ | |||
| 101 | #include "twl4030_omap3.dtsi" | 159 | #include "twl4030_omap3.dtsi" |
| 102 | 160 | ||
| 103 | &i2c2 { | 161 | &i2c2 { |
| 162 | pinctrl-names = "default"; | ||
| 163 | pinctrl-0 = <&i2c2_pins>; | ||
| 104 | clock-frequency = <400000>; | 164 | clock-frequency = <400000>; |
| 105 | }; | 165 | }; |
| 106 | 166 | ||
| 167 | &i2c3 { | ||
| 168 | pinctrl-names = "default"; | ||
| 169 | pinctrl-0 = <&i2c3_pins>; | ||
| 170 | }; | ||
| 171 | |||
| 107 | &mcbsp2 { | 172 | &mcbsp2 { |
| 108 | pinctrl-names = "default"; | 173 | pinctrl-names = "default"; |
| 109 | pinctrl-0 = <&mcbsp2_pins>; | 174 | pinctrl-0 = <&mcbsp2_pins>; |
| @@ -114,11 +179,15 @@ | |||
| 114 | pinctrl-0 = <&mmc1_pins>; | 179 | pinctrl-0 = <&mmc1_pins>; |
| 115 | vmmc-supply = <&vmmc1>; | 180 | vmmc-supply = <&vmmc1>; |
| 116 | vmmc_aux-supply = <&vsim>; | 181 | vmmc_aux-supply = <&vsim>; |
| 117 | bus-width = <8>; | 182 | bus-width = <4>; |
| 118 | }; | 183 | }; |
| 119 | 184 | ||
| 120 | &mmc2 { | 185 | &mmc2 { |
| 121 | status = "disabled"; | 186 | pinctrl-names = "default"; |
| 187 | pinctrl-0 = <&mmc2_pins>; | ||
| 188 | vmmc-supply = <&lbee1usjyc_vmmc>; | ||
| 189 | bus-width = <4>; | ||
| 190 | non-removable; | ||
| 122 | }; | 191 | }; |
| 123 | 192 | ||
| 124 | &mmc3 { | 193 | &mmc3 { |
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index d5cc79267250..1c7e74d2d2bc 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Device Tree Source for IGEPv2 board | 2 | * Device Tree Source for IGEPv2 Rev. (TI OMAP AM/DM37x) |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
| 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
| @@ -13,7 +13,7 @@ | |||
| 13 | #include "omap-gpmc-smsc911x.dtsi" | 13 | #include "omap-gpmc-smsc911x.dtsi" |
| 14 | 14 | ||
| 15 | / { | 15 | / { |
| 16 | model = "IGEPv2"; | 16 | model = "IGEPv2 (TI OMAP AM/DM37x)"; |
| 17 | compatible = "isee,omap3-igep0020", "ti,omap3"; | 17 | compatible = "isee,omap3-igep0020", "ti,omap3"; |
| 18 | 18 | ||
| 19 | leds { | 19 | leds { |
| @@ -67,6 +67,8 @@ | |||
| 67 | pinctrl-names = "default"; | 67 | pinctrl-names = "default"; |
| 68 | pinctrl-0 = < | 68 | pinctrl-0 = < |
| 69 | &hsusbb1_pins | 69 | &hsusbb1_pins |
| 70 | &tfp410_pins | ||
| 71 | &dss_pins | ||
| 70 | >; | 72 | >; |
| 71 | 73 | ||
| 72 | hsusbb1_pins: pinmux_hsusbb1_pins { | 74 | hsusbb1_pins: pinmux_hsusbb1_pins { |
| @@ -85,6 +87,45 @@ | |||
| 85 | 0x5ba (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d7.hsusb1_data3 */ | 87 | 0x5ba (PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d7.hsusb1_data3 */ |
| 86 | >; | 88 | >; |
| 87 | }; | 89 | }; |
| 90 | |||
| 91 | tfp410_pins: tfp410_dvi_pins { | ||
| 92 | pinctrl-single,pins = < | ||
| 93 | 0x196 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ | ||
| 94 | >; | ||
| 95 | }; | ||
| 96 | |||
| 97 | dss_pins: pinmux_dss_dvi_pins { | ||
| 98 | pinctrl-single,pins = < | ||
| 99 | 0x0a4 (PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ | ||
| 100 | 0x0a6 (PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ | ||
| 101 | 0x0a8 (PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */ | ||
| 102 | 0x0aa (PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */ | ||
| 103 | 0x0ac (PIN_OUTPUT | MUX_MODE0) /* dss_data0.dss_data0 */ | ||
| 104 | 0x0ae (PIN_OUTPUT | MUX_MODE0) /* dss_data1.dss_data1 */ | ||
| 105 | 0x0b0 (PIN_OUTPUT | MUX_MODE0) /* dss_data2.dss_data2 */ | ||
| 106 | 0x0b2 (PIN_OUTPUT | MUX_MODE0) /* dss_data3.dss_data3 */ | ||
| 107 | 0x0b4 (PIN_OUTPUT | MUX_MODE0) /* dss_data4.dss_data4 */ | ||
| 108 | 0x0b6 (PIN_OUTPUT | MUX_MODE0) /* dss_data5.dss_data5 */ | ||
| 109 | 0x0b8 (PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */ | ||
| 110 | 0x0ba (PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */ | ||
| 111 | 0x0bc (PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */ | ||
| 112 | 0x0be (PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */ | ||
| 113 | 0x0c0 (PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */ | ||
| 114 | 0x0c2 (PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */ | ||
| 115 | 0x0c4 (PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */ | ||
| 116 | 0x0c6 (PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */ | ||
| 117 | 0x0c8 (PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */ | ||
| 118 | 0x0ca (PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ | ||
| 119 | 0x0cc (PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */ | ||
| 120 | 0x0ce (PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */ | ||
| 121 | 0x0d0 (PIN_OUTPUT | MUX_MODE0) /* dss_data18.dss_data18 */ | ||
| 122 | 0x0d2 (PIN_OUTPUT | MUX_MODE0) /* dss_data19.dss_data19 */ | ||
| 123 | 0x0d4 (PIN_OUTPUT | MUX_MODE0) /* dss_data20.dss_data20 */ | ||
| 124 | 0x0d6 (PIN_OUTPUT | MUX_MODE0) /* dss_data21.dss_data21 */ | ||
| 125 | 0x0d8 (PIN_OUTPUT | MUX_MODE0) /* dss_data22.dss_data22 */ | ||
| 126 | 0x0da (PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */ | ||
| 127 | >; | ||
| 128 | }; | ||
| 88 | }; | 129 | }; |
| 89 | 130 | ||
| 90 | &leds_pins { | 131 | &leds_pins { |
| @@ -174,3 +215,8 @@ | |||
| 174 | &usbhsehci { | 215 | &usbhsehci { |
| 175 | phys = <&hsusb1_phy>; | 216 | phys = <&hsusb1_phy>; |
| 176 | }; | 217 | }; |
| 218 | |||
| 219 | &vpll2 { | ||
| 220 | /* Needed for DSS */ | ||
| 221 | regulator-name = "vdds_dsi"; | ||
| 222 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts index 525e6d9b0978..02a23f8a3384 100644 --- a/arch/arm/boot/dts/omap3-igep0030.dts +++ b/arch/arm/boot/dts/omap3-igep0030.dts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Device Tree Source for IGEP COM Module | 2 | * Device Tree Source for IGEP COM MODULE (TI OMAP AM/DM37x) |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> | 4 | * Copyright (C) 2012 Javier Martinez Canillas <javier@collabora.co.uk> |
| 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> | 5 | * Copyright (C) 2012 Enric Balletbo i Serra <eballetbo@gmail.com> |
| @@ -12,7 +12,7 @@ | |||
| 12 | #include "omap3-igep.dtsi" | 12 | #include "omap3-igep.dtsi" |
| 13 | 13 | ||
| 14 | / { | 14 | / { |
| 15 | model = "IGEP COM Module"; | 15 | model = "IGEP COM MODULE (TI OMAP AM/DM37x)"; |
| 16 | compatible = "isee,omap3-igep0030", "ti,omap3"; | 16 | compatible = "isee,omap3-igep0030", "ti,omap3"; |
| 17 | 17 | ||
| 18 | leds { | 18 | leds { |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index c4f20bfe4cce..6fc85f963530 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | /dts-v1/; | 10 | /dts-v1/; |
| 11 | 11 | ||
| 12 | #include "omap34xx.dtsi" | 12 | #include "omap34xx-hs.dtsi" |
| 13 | 13 | ||
| 14 | / { | 14 | / { |
| 15 | model = "Nokia N900"; | 15 | model = "Nokia N900"; |
| @@ -125,6 +125,21 @@ | |||
| 125 | >; | 125 | >; |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | mmc2_pins: pinmux_mmc2_pins { | ||
| 129 | pinctrl-single,pins = < | ||
| 130 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */ | ||
| 131 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */ | ||
| 132 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */ | ||
| 133 | 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */ | ||
| 134 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */ | ||
| 135 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */ | ||
| 136 | 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat4 */ | ||
| 137 | 0x136 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat5 */ | ||
| 138 | 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat6 */ | ||
| 139 | 0x13a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat7 */ | ||
| 140 | >; | ||
| 141 | }; | ||
| 142 | |||
| 128 | display_pins: pinmux_display_pins { | 143 | display_pins: pinmux_display_pins { |
| 129 | pinctrl-single,pins = < | 144 | pinctrl-single,pins = < |
| 130 | 0x0d4 (PIN_OUTPUT | MUX_MODE4) /* RX51_LCD_RESET_GPIO */ | 145 | 0x0d4 (PIN_OUTPUT | MUX_MODE4) /* RX51_LCD_RESET_GPIO */ |
| @@ -358,8 +373,14 @@ | |||
| 358 | cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */ | 373 | cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */ |
| 359 | }; | 374 | }; |
| 360 | 375 | ||
| 376 | /* most boards use vaux3, only some old versions use vmmc2 instead */ | ||
| 361 | &mmc2 { | 377 | &mmc2 { |
| 362 | status = "disabled"; | 378 | pinctrl-names = "default"; |
| 379 | pinctrl-0 = <&mmc2_pins>; | ||
| 380 | vmmc-supply = <&vaux3>; | ||
| 381 | vmmc_aux-supply = <&vsim>; | ||
| 382 | bus-width = <8>; | ||
| 383 | non-removable; | ||
| 363 | }; | 384 | }; |
| 364 | 385 | ||
| 365 | &mmc3 { | 386 | &mmc3 { |
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi index 94eb77d3b9dd..5c26c184f2c1 100644 --- a/arch/arm/boot/dts/omap3-n950-n9.dtsi +++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include "omap36xx.dtsi" | 11 | #include "omap36xx-hs.dtsi" |
| 12 | 12 | ||
| 13 | / { | 13 | / { |
| 14 | cpus { | 14 | cpus { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index f3a0c26ed0c2..daabf99d402a 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
| @@ -82,6 +82,13 @@ | |||
| 82 | ranges; | 82 | ranges; |
| 83 | ti,hwmods = "l3_main"; | 83 | ti,hwmods = "l3_main"; |
| 84 | 84 | ||
| 85 | aes: aes@480c5000 { | ||
| 86 | compatible = "ti,omap3-aes"; | ||
| 87 | ti,hwmods = "aes"; | ||
| 88 | reg = <0x480c5000 0x50>; | ||
| 89 | interrupts = <0>; | ||
| 90 | }; | ||
| 91 | |||
| 85 | counter32k: counter@48320000 { | 92 | counter32k: counter@48320000 { |
| 86 | compatible = "ti,omap-counter32k"; | 93 | compatible = "ti,omap-counter32k"; |
| 87 | reg = <0x48320000 0x20>; | 94 | reg = <0x48320000 0x20>; |
| @@ -260,6 +267,13 @@ | |||
| 260 | ti,hwmods = "i2c3"; | 267 | ti,hwmods = "i2c3"; |
| 261 | }; | 268 | }; |
| 262 | 269 | ||
| 270 | mailbox: mailbox@48094000 { | ||
| 271 | compatible = "ti,omap3-mailbox"; | ||
| 272 | ti,hwmods = "mailbox"; | ||
| 273 | reg = <0x48094000 0x200>; | ||
| 274 | interrupts = <26>; | ||
| 275 | }; | ||
| 276 | |||
| 263 | mcspi1: spi@48098000 { | 277 | mcspi1: spi@48098000 { |
| 264 | compatible = "ti,omap2-mcspi"; | 278 | compatible = "ti,omap2-mcspi"; |
| 265 | reg = <0x48098000 0x100>; | 279 | reg = <0x48098000 0x100>; |
| @@ -357,6 +371,13 @@ | |||
| 357 | dma-names = "tx", "rx"; | 371 | dma-names = "tx", "rx"; |
| 358 | }; | 372 | }; |
| 359 | 373 | ||
| 374 | mmu_isp: mmu@480bd400 { | ||
| 375 | compatible = "ti,omap3-mmu-isp"; | ||
| 376 | ti,hwmods = "mmu_isp"; | ||
| 377 | reg = <0x480bd400 0x80>; | ||
| 378 | interrupts = <8>; | ||
| 379 | }; | ||
| 380 | |||
| 360 | wdt2: wdt@48314000 { | 381 | wdt2: wdt@48314000 { |
| 361 | compatible = "ti,omap3-wdt"; | 382 | compatible = "ti,omap3-wdt"; |
| 362 | reg = <0x48314000 0x80>; | 383 | reg = <0x48314000 0x80>; |
| @@ -442,6 +463,27 @@ | |||
| 442 | dma-names = "tx", "rx"; | 463 | dma-names = "tx", "rx"; |
| 443 | }; | 464 | }; |
| 444 | 465 | ||
| 466 | sham: sham@480c3000 { | ||
| 467 | compatible = "ti,omap3-sham"; | ||
| 468 | ti,hwmods = "sham"; | ||
| 469 | reg = <0x480c3000 0x64>; | ||
| 470 | interrupts = <49>; | ||
| 471 | }; | ||
| 472 | |||
| 473 | smartreflex_core: smartreflex@480cb000 { | ||
| 474 | compatible = "ti,omap3-smartreflex-core"; | ||
| 475 | ti,hwmods = "smartreflex_core"; | ||
| 476 | reg = <0x480cb000 0x400>; | ||
| 477 | interrupts = <19>; | ||
| 478 | }; | ||
| 479 | |||
| 480 | smartreflex_mpu_iva: smartreflex@480c9000 { | ||
| 481 | compatible = "ti,omap3-smartreflex-iva"; | ||
| 482 | ti,hwmods = "smartreflex_mpu_iva"; | ||
| 483 | reg = <0x480c9000 0x400>; | ||
| 484 | interrupts = <18>; | ||
| 485 | }; | ||
| 486 | |||
| 445 | timer1: timer@48318000 { | 487 | timer1: timer@48318000 { |
| 446 | compatible = "ti,omap3430-timer"; | 488 | compatible = "ti,omap3430-timer"; |
| 447 | reg = <0x48318000 0x400>; | 489 | reg = <0x48318000 0x400>; |
diff --git a/arch/arm/boot/dts/omap34xx-hs.dtsi b/arch/arm/boot/dts/omap34xx-hs.dtsi new file mode 100644 index 000000000000..1ff626489546 --- /dev/null +++ b/arch/arm/boot/dts/omap34xx-hs.dtsi | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* Disabled modules for secure omaps */ | ||
| 2 | |||
| 3 | #include "omap34xx.dtsi" | ||
| 4 | |||
| 5 | /* Secure omaps have some devices inaccessible depending on the firmware */ | ||
| 6 | &aes { | ||
| 7 | status = "disabled"; | ||
| 8 | }; | ||
| 9 | |||
| 10 | &sham { | ||
| 11 | status = "disabled"; | ||
| 12 | }; | ||
| 13 | |||
| 14 | &timer12 { | ||
| 15 | status = "disabled"; | ||
| 16 | }; | ||
diff --git a/arch/arm/boot/dts/omap36xx-hs.dtsi b/arch/arm/boot/dts/omap36xx-hs.dtsi new file mode 100644 index 000000000000..2c7febb0e016 --- /dev/null +++ b/arch/arm/boot/dts/omap36xx-hs.dtsi | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* Disabled modules for secure omaps */ | ||
| 2 | |||
| 3 | #include "omap36xx.dtsi" | ||
| 4 | |||
| 5 | /* Secure omaps have some devices inaccessible depending on the firmware */ | ||
| 6 | &aes { | ||
| 7 | status = "disabled"; | ||
| 8 | }; | ||
| 9 | |||
| 10 | &sham { | ||
| 11 | status = "disabled"; | ||
| 12 | }; | ||
| 13 | |||
| 14 | &timer12 { | ||
| 15 | status = "disabled"; | ||
| 16 | }; | ||
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 298e85020e1b..88c6a05cab41 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi | |||
| @@ -246,15 +246,6 @@ | |||
| 246 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ | 246 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ |
| 247 | >; | 247 | >; |
| 248 | }; | 248 | }; |
| 249 | }; | ||
| 250 | |||
| 251 | &omap4_pmx_wkup { | ||
| 252 | led_wkgpio_pins: pinmux_leds_wkpins { | ||
| 253 | pinctrl-single,pins = < | ||
| 254 | 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */ | ||
| 255 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ | ||
| 256 | >; | ||
| 257 | }; | ||
| 258 | 249 | ||
| 259 | /* | 250 | /* |
| 260 | * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP | 251 | * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP |
| @@ -274,7 +265,7 @@ | |||
| 274 | pinctrl-single,pins = < | 265 | pinctrl-single,pins = < |
| 275 | 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */ | 266 | 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */ |
| 276 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | 267 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ |
| 277 | 0x108 (PIN_OUTPUT | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ | 268 | 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ |
| 278 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ | 269 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ |
| 279 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ | 270 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ |
| 280 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ | 271 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ |
| @@ -284,6 +275,15 @@ | |||
| 284 | }; | 275 | }; |
| 285 | }; | 276 | }; |
| 286 | 277 | ||
| 278 | &omap4_pmx_wkup { | ||
| 279 | led_wkgpio_pins: pinmux_leds_wkpins { | ||
| 280 | pinctrl-single,pins = < | ||
| 281 | 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */ | ||
| 282 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ | ||
| 283 | >; | ||
| 284 | }; | ||
| 285 | }; | ||
| 286 | |||
| 287 | &i2c1 { | 287 | &i2c1 { |
| 288 | pinctrl-names = "default"; | 288 | pinctrl-names = "default"; |
| 289 | pinctrl-0 = <&i2c1_pins>; | 289 | pinctrl-0 = <&i2c1_pins>; |
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 5fc3f43c5a81..dbc81fb6ef03 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts | |||
| @@ -300,12 +300,12 @@ | |||
| 300 | wl12xx_pins: pinmux_wl12xx_pins { | 300 | wl12xx_pins: pinmux_wl12xx_pins { |
| 301 | pinctrl-single,pins = < | 301 | pinctrl-single,pins = < |
| 302 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | 302 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ |
| 303 | 0x108 (PIN_OUTPUT | MUX_MODE3) /* sdmmc5_clk.sdmmc5_clk */ | 303 | 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ |
| 304 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_cmd.sdmmc5_cmd */ | 304 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ |
| 305 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat0.sdmmc5_dat0 */ | 305 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ |
| 306 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat1.sdmmc5_dat1 */ | 306 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ |
| 307 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat2.sdmmc5_dat2 */ | 307 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */ |
| 308 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat3.sdmmc5_dat3 */ | 308 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */ |
| 309 | >; | 309 | >; |
| 310 | }; | 310 | }; |
| 311 | }; | 311 | }; |
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 6d09b8d42fdd..f936476c2753 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi | |||
| @@ -245,14 +245,14 @@ | |||
| 245 | 245 | ||
| 246 | mpu_periph_clk: mpu_periph_clk { | 246 | mpu_periph_clk: mpu_periph_clk { |
| 247 | #clock-cells = <0>; | 247 | #clock-cells = <0>; |
| 248 | compatible = "altr,socfpga-gate-clk"; | 248 | compatible = "altr,socfpga-perip-clk"; |
| 249 | clocks = <&mpuclk>; | 249 | clocks = <&mpuclk>; |
| 250 | fixed-divider = <4>; | 250 | fixed-divider = <4>; |
| 251 | }; | 251 | }; |
| 252 | 252 | ||
| 253 | mpu_l2_ram_clk: mpu_l2_ram_clk { | 253 | mpu_l2_ram_clk: mpu_l2_ram_clk { |
| 254 | #clock-cells = <0>; | 254 | #clock-cells = <0>; |
| 255 | compatible = "altr,socfpga-gate-clk"; | 255 | compatible = "altr,socfpga-perip-clk"; |
| 256 | clocks = <&mpuclk>; | 256 | clocks = <&mpuclk>; |
| 257 | fixed-divider = <2>; | 257 | fixed-divider = <2>; |
| 258 | }; | 258 | }; |
| @@ -266,8 +266,9 @@ | |||
| 266 | 266 | ||
| 267 | l3_main_clk: l3_main_clk { | 267 | l3_main_clk: l3_main_clk { |
| 268 | #clock-cells = <0>; | 268 | #clock-cells = <0>; |
| 269 | compatible = "altr,socfpga-gate-clk"; | 269 | compatible = "altr,socfpga-perip-clk"; |
| 270 | clocks = <&mainclk>; | 270 | clocks = <&mainclk>; |
| 271 | fixed-divider = <1>; | ||
| 271 | }; | 272 | }; |
| 272 | 273 | ||
| 273 | l3_mp_clk: l3_mp_clk { | 274 | l3_mp_clk: l3_mp_clk { |
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index c1751a64889a..7f5878c2784a 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi | |||
| @@ -193,7 +193,10 @@ | |||
| 193 | pio: pinctrl@01c20800 { | 193 | pio: pinctrl@01c20800 { |
| 194 | compatible = "allwinner,sun6i-a31-pinctrl"; | 194 | compatible = "allwinner,sun6i-a31-pinctrl"; |
| 195 | reg = <0x01c20800 0x400>; | 195 | reg = <0x01c20800 0x400>; |
| 196 | interrupts = <0 11 1>, <0 15 1>, <0 16 1>, <0 17 1>; | 196 | interrupts = <0 11 4>, |
| 197 | <0 15 4>, | ||
| 198 | <0 16 4>, | ||
| 199 | <0 17 4>; | ||
| 197 | clocks = <&apb1_gates 5>; | 200 | clocks = <&apb1_gates 5>; |
| 198 | gpio-controller; | 201 | gpio-controller; |
| 199 | interrupt-controller; | 202 | interrupt-controller; |
| @@ -212,11 +215,11 @@ | |||
| 212 | timer@01c20c00 { | 215 | timer@01c20c00 { |
| 213 | compatible = "allwinner,sun4i-timer"; | 216 | compatible = "allwinner,sun4i-timer"; |
| 214 | reg = <0x01c20c00 0xa0>; | 217 | reg = <0x01c20c00 0xa0>; |
| 215 | interrupts = <0 18 1>, | 218 | interrupts = <0 18 4>, |
| 216 | <0 19 1>, | 219 | <0 19 4>, |
| 217 | <0 20 1>, | 220 | <0 20 4>, |
| 218 | <0 21 1>, | 221 | <0 21 4>, |
| 219 | <0 22 1>; | 222 | <0 22 4>; |
| 220 | clocks = <&osc24M>; | 223 | clocks = <&osc24M>; |
| 221 | }; | 224 | }; |
| 222 | 225 | ||
| @@ -228,7 +231,7 @@ | |||
| 228 | uart0: serial@01c28000 { | 231 | uart0: serial@01c28000 { |
| 229 | compatible = "snps,dw-apb-uart"; | 232 | compatible = "snps,dw-apb-uart"; |
| 230 | reg = <0x01c28000 0x400>; | 233 | reg = <0x01c28000 0x400>; |
| 231 | interrupts = <0 0 1>; | 234 | interrupts = <0 0 4>; |
| 232 | reg-shift = <2>; | 235 | reg-shift = <2>; |
| 233 | reg-io-width = <4>; | 236 | reg-io-width = <4>; |
| 234 | clocks = <&apb2_gates 16>; | 237 | clocks = <&apb2_gates 16>; |
| @@ -238,7 +241,7 @@ | |||
| 238 | uart1: serial@01c28400 { | 241 | uart1: serial@01c28400 { |
| 239 | compatible = "snps,dw-apb-uart"; | 242 | compatible = "snps,dw-apb-uart"; |
| 240 | reg = <0x01c28400 0x400>; | 243 | reg = <0x01c28400 0x400>; |
| 241 | interrupts = <0 1 1>; | 244 | interrupts = <0 1 4>; |
| 242 | reg-shift = <2>; | 245 | reg-shift = <2>; |
| 243 | reg-io-width = <4>; | 246 | reg-io-width = <4>; |
| 244 | clocks = <&apb2_gates 17>; | 247 | clocks = <&apb2_gates 17>; |
| @@ -248,7 +251,7 @@ | |||
| 248 | uart2: serial@01c28800 { | 251 | uart2: serial@01c28800 { |
| 249 | compatible = "snps,dw-apb-uart"; | 252 | compatible = "snps,dw-apb-uart"; |
| 250 | reg = <0x01c28800 0x400>; | 253 | reg = <0x01c28800 0x400>; |
| 251 | interrupts = <0 2 1>; | 254 | interrupts = <0 2 4>; |
| 252 | reg-shift = <2>; | 255 | reg-shift = <2>; |
| 253 | reg-io-width = <4>; | 256 | reg-io-width = <4>; |
| 254 | clocks = <&apb2_gates 18>; | 257 | clocks = <&apb2_gates 18>; |
| @@ -258,7 +261,7 @@ | |||
| 258 | uart3: serial@01c28c00 { | 261 | uart3: serial@01c28c00 { |
| 259 | compatible = "snps,dw-apb-uart"; | 262 | compatible = "snps,dw-apb-uart"; |
| 260 | reg = <0x01c28c00 0x400>; | 263 | reg = <0x01c28c00 0x400>; |
| 261 | interrupts = <0 3 1>; | 264 | interrupts = <0 3 4>; |
| 262 | reg-shift = <2>; | 265 | reg-shift = <2>; |
| 263 | reg-io-width = <4>; | 266 | reg-io-width = <4>; |
| 264 | clocks = <&apb2_gates 19>; | 267 | clocks = <&apb2_gates 19>; |
| @@ -268,7 +271,7 @@ | |||
| 268 | uart4: serial@01c29000 { | 271 | uart4: serial@01c29000 { |
| 269 | compatible = "snps,dw-apb-uart"; | 272 | compatible = "snps,dw-apb-uart"; |
| 270 | reg = <0x01c29000 0x400>; | 273 | reg = <0x01c29000 0x400>; |
| 271 | interrupts = <0 4 1>; | 274 | interrupts = <0 4 4>; |
| 272 | reg-shift = <2>; | 275 | reg-shift = <2>; |
| 273 | reg-io-width = <4>; | 276 | reg-io-width = <4>; |
| 274 | clocks = <&apb2_gates 20>; | 277 | clocks = <&apb2_gates 20>; |
| @@ -278,7 +281,7 @@ | |||
| 278 | uart5: serial@01c29400 { | 281 | uart5: serial@01c29400 { |
| 279 | compatible = "snps,dw-apb-uart"; | 282 | compatible = "snps,dw-apb-uart"; |
| 280 | reg = <0x01c29400 0x400>; | 283 | reg = <0x01c29400 0x400>; |
| 281 | interrupts = <0 5 1>; | 284 | interrupts = <0 5 4>; |
| 282 | reg-shift = <2>; | 285 | reg-shift = <2>; |
| 283 | reg-io-width = <4>; | 286 | reg-io-width = <4>; |
| 284 | clocks = <&apb2_gates 21>; | 287 | clocks = <&apb2_gates 21>; |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index e46cfedde74c..367611a0730b 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
| @@ -170,7 +170,7 @@ | |||
| 170 | emac: ethernet@01c0b000 { | 170 | emac: ethernet@01c0b000 { |
| 171 | compatible = "allwinner,sun4i-emac"; | 171 | compatible = "allwinner,sun4i-emac"; |
| 172 | reg = <0x01c0b000 0x1000>; | 172 | reg = <0x01c0b000 0x1000>; |
| 173 | interrupts = <0 55 1>; | 173 | interrupts = <0 55 4>; |
| 174 | clocks = <&ahb_gates 17>; | 174 | clocks = <&ahb_gates 17>; |
| 175 | status = "disabled"; | 175 | status = "disabled"; |
| 176 | }; | 176 | }; |
| @@ -186,7 +186,7 @@ | |||
| 186 | pio: pinctrl@01c20800 { | 186 | pio: pinctrl@01c20800 { |
| 187 | compatible = "allwinner,sun7i-a20-pinctrl"; | 187 | compatible = "allwinner,sun7i-a20-pinctrl"; |
| 188 | reg = <0x01c20800 0x400>; | 188 | reg = <0x01c20800 0x400>; |
| 189 | interrupts = <0 28 1>; | 189 | interrupts = <0 28 4>; |
| 190 | clocks = <&apb0_gates 5>; | 190 | clocks = <&apb0_gates 5>; |
| 191 | gpio-controller; | 191 | gpio-controller; |
| 192 | interrupt-controller; | 192 | interrupt-controller; |
| @@ -251,12 +251,12 @@ | |||
| 251 | timer@01c20c00 { | 251 | timer@01c20c00 { |
| 252 | compatible = "allwinner,sun4i-timer"; | 252 | compatible = "allwinner,sun4i-timer"; |
| 253 | reg = <0x01c20c00 0x90>; | 253 | reg = <0x01c20c00 0x90>; |
| 254 | interrupts = <0 22 1>, | 254 | interrupts = <0 22 4>, |
| 255 | <0 23 1>, | 255 | <0 23 4>, |
| 256 | <0 24 1>, | 256 | <0 24 4>, |
| 257 | <0 25 1>, | 257 | <0 25 4>, |
| 258 | <0 67 1>, | 258 | <0 67 4>, |
| 259 | <0 68 1>; | 259 | <0 68 4>; |
| 260 | clocks = <&osc24M>; | 260 | clocks = <&osc24M>; |
| 261 | }; | 261 | }; |
| 262 | 262 | ||
| @@ -273,7 +273,7 @@ | |||
| 273 | uart0: serial@01c28000 { | 273 | uart0: serial@01c28000 { |
| 274 | compatible = "snps,dw-apb-uart"; | 274 | compatible = "snps,dw-apb-uart"; |
| 275 | reg = <0x01c28000 0x400>; | 275 | reg = <0x01c28000 0x400>; |
| 276 | interrupts = <0 1 1>; | 276 | interrupts = <0 1 4>; |
| 277 | reg-shift = <2>; | 277 | reg-shift = <2>; |
| 278 | reg-io-width = <4>; | 278 | reg-io-width = <4>; |
| 279 | clocks = <&apb1_gates 16>; | 279 | clocks = <&apb1_gates 16>; |
| @@ -283,7 +283,7 @@ | |||
| 283 | uart1: serial@01c28400 { | 283 | uart1: serial@01c28400 { |
| 284 | compatible = "snps,dw-apb-uart"; | 284 | compatible = "snps,dw-apb-uart"; |
| 285 | reg = <0x01c28400 0x400>; | 285 | reg = <0x01c28400 0x400>; |
| 286 | interrupts = <0 2 1>; | 286 | interrupts = <0 2 4>; |
| 287 | reg-shift = <2>; | 287 | reg-shift = <2>; |
| 288 | reg-io-width = <4>; | 288 | reg-io-width = <4>; |
| 289 | clocks = <&apb1_gates 17>; | 289 | clocks = <&apb1_gates 17>; |
| @@ -293,7 +293,7 @@ | |||
| 293 | uart2: serial@01c28800 { | 293 | uart2: serial@01c28800 { |
| 294 | compatible = "snps,dw-apb-uart"; | 294 | compatible = "snps,dw-apb-uart"; |
| 295 | reg = <0x01c28800 0x400>; | 295 | reg = <0x01c28800 0x400>; |
| 296 | interrupts = <0 3 1>; | 296 | interrupts = <0 3 4>; |
| 297 | reg-shift = <2>; | 297 | reg-shift = <2>; |
| 298 | reg-io-width = <4>; | 298 | reg-io-width = <4>; |
| 299 | clocks = <&apb1_gates 18>; | 299 | clocks = <&apb1_gates 18>; |
| @@ -303,7 +303,7 @@ | |||
| 303 | uart3: serial@01c28c00 { | 303 | uart3: serial@01c28c00 { |
| 304 | compatible = "snps,dw-apb-uart"; | 304 | compatible = "snps,dw-apb-uart"; |
| 305 | reg = <0x01c28c00 0x400>; | 305 | reg = <0x01c28c00 0x400>; |
| 306 | interrupts = <0 4 1>; | 306 | interrupts = <0 4 4>; |
| 307 | reg-shift = <2>; | 307 | reg-shift = <2>; |
| 308 | reg-io-width = <4>; | 308 | reg-io-width = <4>; |
| 309 | clocks = <&apb1_gates 19>; | 309 | clocks = <&apb1_gates 19>; |
| @@ -313,7 +313,7 @@ | |||
| 313 | uart4: serial@01c29000 { | 313 | uart4: serial@01c29000 { |
| 314 | compatible = "snps,dw-apb-uart"; | 314 | compatible = "snps,dw-apb-uart"; |
| 315 | reg = <0x01c29000 0x400>; | 315 | reg = <0x01c29000 0x400>; |
| 316 | interrupts = <0 17 1>; | 316 | interrupts = <0 17 4>; |
| 317 | reg-shift = <2>; | 317 | reg-shift = <2>; |
| 318 | reg-io-width = <4>; | 318 | reg-io-width = <4>; |
| 319 | clocks = <&apb1_gates 20>; | 319 | clocks = <&apb1_gates 20>; |
| @@ -323,7 +323,7 @@ | |||
| 323 | uart5: serial@01c29400 { | 323 | uart5: serial@01c29400 { |
| 324 | compatible = "snps,dw-apb-uart"; | 324 | compatible = "snps,dw-apb-uart"; |
| 325 | reg = <0x01c29400 0x400>; | 325 | reg = <0x01c29400 0x400>; |
| 326 | interrupts = <0 18 1>; | 326 | interrupts = <0 18 4>; |
| 327 | reg-shift = <2>; | 327 | reg-shift = <2>; |
| 328 | reg-io-width = <4>; | 328 | reg-io-width = <4>; |
| 329 | clocks = <&apb1_gates 21>; | 329 | clocks = <&apb1_gates 21>; |
| @@ -333,7 +333,7 @@ | |||
| 333 | uart6: serial@01c29800 { | 333 | uart6: serial@01c29800 { |
| 334 | compatible = "snps,dw-apb-uart"; | 334 | compatible = "snps,dw-apb-uart"; |
| 335 | reg = <0x01c29800 0x400>; | 335 | reg = <0x01c29800 0x400>; |
| 336 | interrupts = <0 19 1>; | 336 | interrupts = <0 19 4>; |
| 337 | reg-shift = <2>; | 337 | reg-shift = <2>; |
| 338 | reg-io-width = <4>; | 338 | reg-io-width = <4>; |
| 339 | clocks = <&apb1_gates 22>; | 339 | clocks = <&apb1_gates 22>; |
| @@ -343,7 +343,7 @@ | |||
| 343 | uart7: serial@01c29c00 { | 343 | uart7: serial@01c29c00 { |
| 344 | compatible = "snps,dw-apb-uart"; | 344 | compatible = "snps,dw-apb-uart"; |
| 345 | reg = <0x01c29c00 0x400>; | 345 | reg = <0x01c29c00 0x400>; |
| 346 | interrupts = <0 20 1>; | 346 | interrupts = <0 20 4>; |
| 347 | reg-shift = <2>; | 347 | reg-shift = <2>; |
| 348 | reg-io-width = <4>; | 348 | reg-io-width = <4>; |
| 349 | clocks = <&apb1_gates 23>; | 349 | clocks = <&apb1_gates 23>; |
| @@ -353,7 +353,7 @@ | |||
| 353 | i2c0: i2c@01c2ac00 { | 353 | i2c0: i2c@01c2ac00 { |
| 354 | compatible = "allwinner,sun4i-i2c"; | 354 | compatible = "allwinner,sun4i-i2c"; |
| 355 | reg = <0x01c2ac00 0x400>; | 355 | reg = <0x01c2ac00 0x400>; |
| 356 | interrupts = <0 7 1>; | 356 | interrupts = <0 7 4>; |
| 357 | clocks = <&apb1_gates 0>; | 357 | clocks = <&apb1_gates 0>; |
| 358 | clock-frequency = <100000>; | 358 | clock-frequency = <100000>; |
| 359 | status = "disabled"; | 359 | status = "disabled"; |
| @@ -362,7 +362,7 @@ | |||
| 362 | i2c1: i2c@01c2b000 { | 362 | i2c1: i2c@01c2b000 { |
| 363 | compatible = "allwinner,sun4i-i2c"; | 363 | compatible = "allwinner,sun4i-i2c"; |
| 364 | reg = <0x01c2b000 0x400>; | 364 | reg = <0x01c2b000 0x400>; |
| 365 | interrupts = <0 8 1>; | 365 | interrupts = <0 8 4>; |
| 366 | clocks = <&apb1_gates 1>; | 366 | clocks = <&apb1_gates 1>; |
| 367 | clock-frequency = <100000>; | 367 | clock-frequency = <100000>; |
| 368 | status = "disabled"; | 368 | status = "disabled"; |
| @@ -371,7 +371,7 @@ | |||
| 371 | i2c2: i2c@01c2b400 { | 371 | i2c2: i2c@01c2b400 { |
| 372 | compatible = "allwinner,sun4i-i2c"; | 372 | compatible = "allwinner,sun4i-i2c"; |
| 373 | reg = <0x01c2b400 0x400>; | 373 | reg = <0x01c2b400 0x400>; |
| 374 | interrupts = <0 9 1>; | 374 | interrupts = <0 9 4>; |
| 375 | clocks = <&apb1_gates 2>; | 375 | clocks = <&apb1_gates 2>; |
| 376 | clock-frequency = <100000>; | 376 | clock-frequency = <100000>; |
| 377 | status = "disabled"; | 377 | status = "disabled"; |
| @@ -380,7 +380,7 @@ | |||
| 380 | i2c3: i2c@01c2b800 { | 380 | i2c3: i2c@01c2b800 { |
| 381 | compatible = "allwinner,sun4i-i2c"; | 381 | compatible = "allwinner,sun4i-i2c"; |
| 382 | reg = <0x01c2b800 0x400>; | 382 | reg = <0x01c2b800 0x400>; |
| 383 | interrupts = <0 88 1>; | 383 | interrupts = <0 88 4>; |
| 384 | clocks = <&apb1_gates 3>; | 384 | clocks = <&apb1_gates 3>; |
| 385 | clock-frequency = <100000>; | 385 | clock-frequency = <100000>; |
| 386 | status = "disabled"; | 386 | status = "disabled"; |
| @@ -389,7 +389,7 @@ | |||
| 389 | i2c4: i2c@01c2bc00 { | 389 | i2c4: i2c@01c2bc00 { |
| 390 | compatible = "allwinner,sun4i-i2c"; | 390 | compatible = "allwinner,sun4i-i2c"; |
| 391 | reg = <0x01c2bc00 0x400>; | 391 | reg = <0x01c2bc00 0x400>; |
| 392 | interrupts = <0 89 1>; | 392 | interrupts = <0 89 4>; |
| 393 | clocks = <&apb1_gates 15>; | 393 | clocks = <&apb1_gates 15>; |
| 394 | clock-frequency = <100000>; | 394 | clock-frequency = <100000>; |
| 395 | status = "disabled"; | 395 | status = "disabled"; |
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 8e1a0245907f..41bca32409fc 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c | |||
| @@ -404,7 +404,7 @@ static irqreturn_t dma_irq_handler(int irq, void *data) | |||
| 404 | BIT(slot)); | 404 | BIT(slot)); |
| 405 | if (edma_cc[ctlr]->intr_data[channel].callback) | 405 | if (edma_cc[ctlr]->intr_data[channel].callback) |
| 406 | edma_cc[ctlr]->intr_data[channel].callback( | 406 | edma_cc[ctlr]->intr_data[channel].callback( |
| 407 | channel, DMA_COMPLETE, | 407 | channel, EDMA_DMA_COMPLETE, |
| 408 | edma_cc[ctlr]->intr_data[channel].data); | 408 | edma_cc[ctlr]->intr_data[channel].data); |
| 409 | } | 409 | } |
| 410 | } while (sh_ipr); | 410 | } while (sh_ipr); |
| @@ -459,7 +459,7 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data) | |||
| 459 | callback) { | 459 | callback) { |
| 460 | edma_cc[ctlr]->intr_data[k]. | 460 | edma_cc[ctlr]->intr_data[k]. |
| 461 | callback(k, | 461 | callback(k, |
| 462 | DMA_CC_ERROR, | 462 | EDMA_DMA_CC_ERROR, |
| 463 | edma_cc[ctlr]->intr_data | 463 | edma_cc[ctlr]->intr_data |
| 464 | [k].data); | 464 | [k].data); |
| 465 | } | 465 | } |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4a5903e04827..c1df4e9db140 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
| @@ -69,6 +69,7 @@ CONFIG_KS8851=y | |||
| 69 | CONFIG_SMSC911X=y | 69 | CONFIG_SMSC911X=y |
| 70 | CONFIG_STMMAC_ETH=y | 70 | CONFIG_STMMAC_ETH=y |
| 71 | CONFIG_MDIO_SUN4I=y | 71 | CONFIG_MDIO_SUN4I=y |
| 72 | CONFIG_TI_CPSW=y | ||
| 72 | CONFIG_KEYBOARD_SPEAR=y | 73 | CONFIG_KEYBOARD_SPEAR=y |
| 73 | CONFIG_SERIO_AMBAKMI=y | 74 | CONFIG_SERIO_AMBAKMI=y |
| 74 | CONFIG_SERIAL_8250=y | 75 | CONFIG_SERIAL_8250=y |
| @@ -133,12 +134,14 @@ CONFIG_USB_GPIO_VBUS=y | |||
| 133 | CONFIG_USB_ISP1301=y | 134 | CONFIG_USB_ISP1301=y |
| 134 | CONFIG_USB_MXS_PHY=y | 135 | CONFIG_USB_MXS_PHY=y |
| 135 | CONFIG_MMC=y | 136 | CONFIG_MMC=y |
| 137 | CONFIG_MMC_BLOCK_MINORS=16 | ||
| 136 | CONFIG_MMC_ARMMMCI=y | 138 | CONFIG_MMC_ARMMMCI=y |
| 137 | CONFIG_MMC_SDHCI=y | 139 | CONFIG_MMC_SDHCI=y |
| 138 | CONFIG_MMC_SDHCI_PLTFM=y | 140 | CONFIG_MMC_SDHCI_PLTFM=y |
| 139 | CONFIG_MMC_SDHCI_ESDHC_IMX=y | 141 | CONFIG_MMC_SDHCI_ESDHC_IMX=y |
| 140 | CONFIG_MMC_SDHCI_TEGRA=y | 142 | CONFIG_MMC_SDHCI_TEGRA=y |
| 141 | CONFIG_MMC_SDHCI_SPEAR=y | 143 | CONFIG_MMC_SDHCI_SPEAR=y |
| 144 | CONFIG_MMC_SDHCI_BCM_KONA=y | ||
| 142 | CONFIG_MMC_OMAP=y | 145 | CONFIG_MMC_OMAP=y |
| 143 | CONFIG_MMC_OMAP_HS=y | 146 | CONFIG_MMC_OMAP_HS=y |
| 144 | CONFIG_EDAC=y | 147 | CONFIG_EDAC=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 98a50c309b90..bfa80a11e8c7 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
| @@ -173,6 +173,7 @@ CONFIG_MFD_PALMAS=y | |||
| 173 | CONFIG_MFD_TPS65217=y | 173 | CONFIG_MFD_TPS65217=y |
| 174 | CONFIG_MFD_TPS65910=y | 174 | CONFIG_MFD_TPS65910=y |
| 175 | CONFIG_TWL6040_CORE=y | 175 | CONFIG_TWL6040_CORE=y |
| 176 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | ||
| 176 | CONFIG_REGULATOR_PALMAS=y | 177 | CONFIG_REGULATOR_PALMAS=y |
| 177 | CONFIG_REGULATOR_TPS65023=y | 178 | CONFIG_REGULATOR_TPS65023=y |
| 178 | CONFIG_REGULATOR_TPS6507X=y | 179 | CONFIG_REGULATOR_TPS6507X=y |
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index d57a85badb5e..3e2259b60236 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig | |||
| @@ -12,6 +12,9 @@ CONFIG_NET=y | |||
| 12 | CONFIG_PACKET=y | 12 | CONFIG_PACKET=y |
| 13 | CONFIG_UNIX=y | 13 | CONFIG_UNIX=y |
| 14 | CONFIG_INET=y | 14 | CONFIG_INET=y |
| 15 | CONFIG_IP_PNP=y | ||
| 16 | CONFIG_IP_PNP_DHCP=y | ||
| 17 | CONFIG_IP_PNP_BOOTP=y | ||
| 15 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 18 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
| 16 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 19 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
| 17 | # CONFIG_INET_XFRM_MODE_BEET is not set | 20 | # CONFIG_INET_XFRM_MODE_BEET is not set |
| @@ -58,4 +61,8 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y | |||
| 58 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | 61 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y |
| 59 | CONFIG_COMMON_CLK_DEBUG=y | 62 | CONFIG_COMMON_CLK_DEBUG=y |
| 60 | # CONFIG_IOMMU_SUPPORT is not set | 63 | # CONFIG_IOMMU_SUPPORT is not set |
| 64 | CONFIG_TMPFS=y | ||
| 65 | CONFIG_NFS_FS=y | ||
| 66 | CONFIG_ROOT_NFS=y | ||
| 61 | CONFIG_NLS=y | 67 | CONFIG_NLS=y |
| 68 | CONFIG_PRINTK_TIME=y | ||
diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index ac632cc38f24..c6ebc184bf68 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig | |||
| @@ -22,6 +22,7 @@ CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8" | |||
| 22 | CONFIG_CPU_FREQ=y | 22 | CONFIG_CPU_FREQ=y |
| 23 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 23 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
| 24 | CONFIG_CPU_IDLE=y | 24 | CONFIG_CPU_IDLE=y |
| 25 | CONFIG_ARM_U8500_CPUIDLE=y | ||
| 25 | CONFIG_VFP=y | 26 | CONFIG_VFP=y |
| 26 | CONFIG_NEON=y | 27 | CONFIG_NEON=y |
| 27 | CONFIG_PM_RUNTIME=y | 28 | CONFIG_PM_RUNTIME=y |
| @@ -109,6 +110,8 @@ CONFIG_EXT2_FS_SECURITY=y | |||
| 109 | CONFIG_EXT3_FS=y | 110 | CONFIG_EXT3_FS=y |
| 110 | CONFIG_EXT4_FS=y | 111 | CONFIG_EXT4_FS=y |
| 111 | CONFIG_VFAT_FS=y | 112 | CONFIG_VFAT_FS=y |
| 113 | CONFIG_DEVTMPFS=y | ||
| 114 | CONFIG_DEVTMPFS_MOUNT=y | ||
| 112 | CONFIG_TMPFS=y | 115 | CONFIG_TMPFS=y |
| 113 | CONFIG_TMPFS_POSIX_ACL=y | 116 | CONFIG_TMPFS_POSIX_ACL=y |
| 114 | # CONFIG_MISC_FILESYSTEMS is not set | 117 | # CONFIG_MISC_FILESYSTEMS is not set |
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h index 9b28f1243bdc..240b29ef17db 100644 --- a/arch/arm/include/asm/hardware/iop3xx-adma.h +++ b/arch/arm/include/asm/hardware/iop3xx-adma.h | |||
| @@ -393,36 +393,6 @@ static inline int iop_chan_zero_sum_slot_count(size_t len, int src_cnt, | |||
| 393 | return slot_cnt; | 393 | return slot_cnt; |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc) | ||
| 397 | { | ||
| 398 | return 0; | ||
| 399 | } | ||
| 400 | |||
| 401 | static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, | ||
| 402 | struct iop_adma_chan *chan) | ||
| 403 | { | ||
| 404 | union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; | ||
| 405 | |||
| 406 | switch (chan->device->id) { | ||
| 407 | case DMA0_ID: | ||
| 408 | case DMA1_ID: | ||
| 409 | return hw_desc.dma->dest_addr; | ||
| 410 | case AAU_ID: | ||
| 411 | return hw_desc.aau->dest_addr; | ||
| 412 | default: | ||
| 413 | BUG(); | ||
| 414 | } | ||
| 415 | return 0; | ||
| 416 | } | ||
| 417 | |||
| 418 | |||
| 419 | static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc, | ||
| 420 | struct iop_adma_chan *chan) | ||
| 421 | { | ||
| 422 | BUG(); | ||
| 423 | return 0; | ||
| 424 | } | ||
| 425 | |||
| 426 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, | 396 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, |
| 427 | struct iop_adma_chan *chan) | 397 | struct iop_adma_chan *chan) |
| 428 | { | 398 | { |
diff --git a/arch/arm/include/asm/hardware/iop_adma.h b/arch/arm/include/asm/hardware/iop_adma.h index 122f86d8c991..250760e08103 100644 --- a/arch/arm/include/asm/hardware/iop_adma.h +++ b/arch/arm/include/asm/hardware/iop_adma.h | |||
| @@ -82,8 +82,6 @@ struct iop_adma_chan { | |||
| 82 | * @slot_cnt: total slots used in an transaction (group of operations) | 82 | * @slot_cnt: total slots used in an transaction (group of operations) |
| 83 | * @slots_per_op: number of slots per operation | 83 | * @slots_per_op: number of slots per operation |
| 84 | * @idx: pool index | 84 | * @idx: pool index |
| 85 | * @unmap_src_cnt: number of xor sources | ||
| 86 | * @unmap_len: transaction bytecount | ||
| 87 | * @tx_list: list of descriptors that are associated with one operation | 85 | * @tx_list: list of descriptors that are associated with one operation |
| 88 | * @async_tx: support for the async_tx api | 86 | * @async_tx: support for the async_tx api |
| 89 | * @group_list: list of slots that make up a multi-descriptor transaction | 87 | * @group_list: list of slots that make up a multi-descriptor transaction |
| @@ -99,8 +97,6 @@ struct iop_adma_desc_slot { | |||
| 99 | u16 slot_cnt; | 97 | u16 slot_cnt; |
| 100 | u16 slots_per_op; | 98 | u16 slots_per_op; |
| 101 | u16 idx; | 99 | u16 idx; |
| 102 | u16 unmap_src_cnt; | ||
| 103 | size_t unmap_len; | ||
| 104 | struct list_head tx_list; | 100 | struct list_head tx_list; |
| 105 | struct dma_async_tx_descriptor async_tx; | 101 | struct dma_async_tx_descriptor async_tx; |
| 106 | union { | 102 | union { |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 4dd21457ef9d..6976b03e5213 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
| @@ -100,23 +100,19 @@ | |||
| 100 | #define TASK_UNMAPPED_BASE UL(0x00000000) | 100 | #define TASK_UNMAPPED_BASE UL(0x00000000) |
| 101 | #endif | 101 | #endif |
| 102 | 102 | ||
| 103 | #ifndef PHYS_OFFSET | ||
| 104 | #define PHYS_OFFSET UL(CONFIG_DRAM_BASE) | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #ifndef END_MEM | 103 | #ifndef END_MEM |
| 108 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) | 104 | #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) |
| 109 | #endif | 105 | #endif |
| 110 | 106 | ||
| 111 | #ifndef PAGE_OFFSET | 107 | #ifndef PAGE_OFFSET |
| 112 | #define PAGE_OFFSET (PHYS_OFFSET) | 108 | #define PAGE_OFFSET PLAT_PHYS_OFFSET |
| 113 | #endif | 109 | #endif |
| 114 | 110 | ||
| 115 | /* | 111 | /* |
| 116 | * The module can be at any place in ram in nommu mode. | 112 | * The module can be at any place in ram in nommu mode. |
| 117 | */ | 113 | */ |
| 118 | #define MODULES_END (END_MEM) | 114 | #define MODULES_END (END_MEM) |
| 119 | #define MODULES_VADDR (PHYS_OFFSET) | 115 | #define MODULES_VADDR PAGE_OFFSET |
| 120 | 116 | ||
| 121 | #define XIP_VIRT_ADDR(physaddr) (physaddr) | 117 | #define XIP_VIRT_ADDR(physaddr) (physaddr) |
| 122 | 118 | ||
| @@ -157,6 +153,16 @@ | |||
| 157 | #endif | 153 | #endif |
| 158 | #define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1) | 154 | #define ARCH_PGD_MASK ((1 << ARCH_PGD_SHIFT) - 1) |
| 159 | 155 | ||
| 156 | /* | ||
| 157 | * PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical | ||
| 158 | * memory. This is used for XIP and NoMMU kernels, or by kernels which | ||
| 159 | * have their own mach/memory.h. Assembly code must always use | ||
| 160 | * PLAT_PHYS_OFFSET and not PHYS_OFFSET. | ||
| 161 | */ | ||
| 162 | #ifndef PLAT_PHYS_OFFSET | ||
| 163 | #define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
| 164 | #endif | ||
| 165 | |||
| 160 | #ifndef __ASSEMBLY__ | 166 | #ifndef __ASSEMBLY__ |
| 161 | 167 | ||
| 162 | /* | 168 | /* |
| @@ -226,12 +232,21 @@ static inline phys_addr_t __virt_to_phys(unsigned long x) | |||
| 226 | static inline unsigned long __phys_to_virt(phys_addr_t x) | 232 | static inline unsigned long __phys_to_virt(phys_addr_t x) |
| 227 | { | 233 | { |
| 228 | unsigned long t; | 234 | unsigned long t; |
| 229 | __pv_stub(x, t, "sub", __PV_BITS_31_24); | 235 | |
| 236 | /* | ||
| 237 | * 'unsigned long' cast discard upper word when | ||
| 238 | * phys_addr_t is 64 bit, and makes sure that inline | ||
| 239 | * assembler expression receives 32 bit argument | ||
| 240 | * in place where 'r' 32 bit operand is expected. | ||
| 241 | */ | ||
| 242 | __pv_stub((unsigned long) x, t, "sub", __PV_BITS_31_24); | ||
| 230 | return t; | 243 | return t; |
| 231 | } | 244 | } |
| 232 | 245 | ||
| 233 | #else | 246 | #else |
| 234 | 247 | ||
| 248 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | ||
| 249 | |||
| 235 | static inline phys_addr_t __virt_to_phys(unsigned long x) | 250 | static inline phys_addr_t __virt_to_phys(unsigned long x) |
| 236 | { | 251 | { |
| 237 | return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET; | 252 | return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET; |
| @@ -244,17 +259,6 @@ static inline unsigned long __phys_to_virt(phys_addr_t x) | |||
| 244 | 259 | ||
| 245 | #endif | 260 | #endif |
| 246 | #endif | 261 | #endif |
| 247 | #endif /* __ASSEMBLY__ */ | ||
| 248 | |||
| 249 | #ifndef PHYS_OFFSET | ||
| 250 | #ifdef PLAT_PHYS_OFFSET | ||
| 251 | #define PHYS_OFFSET PLAT_PHYS_OFFSET | ||
| 252 | #else | ||
| 253 | #define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | ||
| 254 | #endif | ||
| 255 | #endif | ||
| 256 | |||
| 257 | #ifndef __ASSEMBLY__ | ||
| 258 | 262 | ||
| 259 | /* | 263 | /* |
| 260 | * PFNs are used to describe any physical page; this means | 264 | * PFNs are used to describe any physical page; this means |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index be956dbf6bae..1571d126e9dd 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
| @@ -61,7 +61,7 @@ extern void __pgd_error(const char *file, int line, pgd_t); | |||
| 61 | * mapping to be mapped at. This is particularly important for | 61 | * mapping to be mapped at. This is particularly important for |
| 62 | * non-high vector CPUs. | 62 | * non-high vector CPUs. |
| 63 | */ | 63 | */ |
| 64 | #define FIRST_USER_ADDRESS PAGE_SIZE | 64 | #define FIRST_USER_ADDRESS (PAGE_SIZE * 2) |
| 65 | 65 | ||
| 66 | /* | 66 | /* |
| 67 | * Use TASK_SIZE as the ceiling argument for free_pgtables() and | 67 | * Use TASK_SIZE as the ceiling argument for free_pgtables() and |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 14235ba64a90..716249cc2ee1 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
| @@ -68,7 +68,7 @@ ENTRY(stext) | |||
| 68 | 68 | ||
| 69 | #ifdef CONFIG_ARM_MPU | 69 | #ifdef CONFIG_ARM_MPU |
| 70 | /* Calculate the size of a region covering just the kernel */ | 70 | /* Calculate the size of a region covering just the kernel */ |
| 71 | ldr r5, =PHYS_OFFSET @ Region start: PHYS_OFFSET | 71 | ldr r5, =PLAT_PHYS_OFFSET @ Region start: PHYS_OFFSET |
| 72 | ldr r6, =(_end) @ Cover whole kernel | 72 | ldr r6, =(_end) @ Cover whole kernel |
| 73 | sub r6, r6, r5 @ Minimum size of region to map | 73 | sub r6, r6, r5 @ Minimum size of region to map |
| 74 | clz r6, r6 @ Region size must be 2^N... | 74 | clz r6, r6 @ Region size must be 2^N... |
| @@ -213,7 +213,7 @@ ENTRY(__setup_mpu) | |||
| 213 | set_region_nr r0, #MPU_RAM_REGION | 213 | set_region_nr r0, #MPU_RAM_REGION |
| 214 | isb | 214 | isb |
| 215 | /* Full access from PL0, PL1, shared for CONFIG_SMP, cacheable */ | 215 | /* Full access from PL0, PL1, shared for CONFIG_SMP, cacheable */ |
| 216 | ldr r0, =PHYS_OFFSET @ RAM starts at PHYS_OFFSET | 216 | ldr r0, =PLAT_PHYS_OFFSET @ RAM starts at PHYS_OFFSET |
| 217 | ldr r5,=(MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL) | 217 | ldr r5,=(MPU_AP_PL1RW_PL0RW | MPU_RGN_NORMAL) |
| 218 | 218 | ||
| 219 | setup_region r0, r5, r6, MPU_DATA_SIDE @ PHYS_OFFSET, shared, enabled | 219 | setup_region r0, r5, r6, MPU_DATA_SIDE @ PHYS_OFFSET, shared, enabled |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 7801866e626a..32f317e5828a 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
| @@ -110,7 +110,7 @@ ENTRY(stext) | |||
| 110 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) | 110 | sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) |
| 111 | add r8, r8, r4 @ PHYS_OFFSET | 111 | add r8, r8, r4 @ PHYS_OFFSET |
| 112 | #else | 112 | #else |
| 113 | ldr r8, =PHYS_OFFSET @ always constant in this case | 113 | ldr r8, =PLAT_PHYS_OFFSET @ always constant in this case |
| 114 | #endif | 114 | #endif |
| 115 | 115 | ||
| 116 | /* | 116 | /* |
| @@ -508,6 +508,7 @@ __fixup_smp: | |||
| 508 | teq r0, #0x0 @ '0' on actual UP A9 hardware | 508 | teq r0, #0x0 @ '0' on actual UP A9 hardware |
| 509 | beq __fixup_smp_on_up @ So its an A9 UP | 509 | beq __fixup_smp_on_up @ So its an A9 UP |
| 510 | ldr r0, [r0, #4] @ read SCU Config | 510 | ldr r0, [r0, #4] @ read SCU Config |
| 511 | ARM_BE8(rev r0, r0) @ byteswap if big endian | ||
| 511 | and r0, r0, #0x3 @ number of CPUs | 512 | and r0, r0, #0x3 @ number of CPUs |
| 512 | teq r0, #0x0 @ is 1? | 513 | teq r0, #0x0 @ is 1? |
| 513 | movne pc, lr | 514 | movne pc, lr |
| @@ -644,7 +645,11 @@ ARM_BE8(rev16 ip, ip) | |||
| 644 | bcc 1b | 645 | bcc 1b |
| 645 | bx lr | 646 | bx lr |
| 646 | #else | 647 | #else |
| 648 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
| 649 | moveq r0, #0x00004000 @ set bit 22, mov to mvn instruction | ||
| 650 | #else | ||
| 647 | moveq r0, #0x400000 @ set bit 22, mov to mvn instruction | 651 | moveq r0, #0x400000 @ set bit 22, mov to mvn instruction |
| 652 | #endif | ||
| 648 | b 2f | 653 | b 2f |
| 649 | 1: ldr ip, [r7, r3] | 654 | 1: ldr ip, [r7, r3] |
| 650 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 655 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
| @@ -653,7 +658,7 @@ ARM_BE8(rev16 ip, ip) | |||
| 653 | tst ip, #0x000f0000 @ check the rotation field | 658 | tst ip, #0x000f0000 @ check the rotation field |
| 654 | orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 | 659 | orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 |
| 655 | biceq ip, ip, #0x00004000 @ clear bit 22 | 660 | biceq ip, ip, #0x00004000 @ clear bit 22 |
| 656 | orreq ip, ip, r0, lsl #24 @ mask in offset bits 7-0 | 661 | orreq ip, ip, r0 @ mask in offset bits 7-0 |
| 657 | #else | 662 | #else |
| 658 | bic ip, ip, #0x000000ff | 663 | bic ip, ip, #0x000000ff |
| 659 | tst ip, #0xf00 @ check the rotation field | 664 | tst ip, #0xf00 @ check the rotation field |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 57221e349a7c..f0d180d8b29f 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
| @@ -14,11 +14,12 @@ | |||
| 14 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
| 15 | #include <asm/mmu_context.h> | 15 | #include <asm/mmu_context.h> |
| 16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
| 17 | #include <asm/fncpy.h> | ||
| 17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
| 18 | #include <asm/smp_plat.h> | 19 | #include <asm/smp_plat.h> |
| 19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
| 20 | 21 | ||
| 21 | extern const unsigned char relocate_new_kernel[]; | 22 | extern void relocate_new_kernel(void); |
| 22 | extern const unsigned int relocate_new_kernel_size; | 23 | extern const unsigned int relocate_new_kernel_size; |
| 23 | 24 | ||
| 24 | extern unsigned long kexec_start_address; | 25 | extern unsigned long kexec_start_address; |
| @@ -142,6 +143,8 @@ void machine_kexec(struct kimage *image) | |||
| 142 | { | 143 | { |
| 143 | unsigned long page_list; | 144 | unsigned long page_list; |
| 144 | unsigned long reboot_code_buffer_phys; | 145 | unsigned long reboot_code_buffer_phys; |
| 146 | unsigned long reboot_entry = (unsigned long)relocate_new_kernel; | ||
| 147 | unsigned long reboot_entry_phys; | ||
| 145 | void *reboot_code_buffer; | 148 | void *reboot_code_buffer; |
| 146 | 149 | ||
| 147 | /* | 150 | /* |
| @@ -168,16 +171,16 @@ void machine_kexec(struct kimage *image) | |||
| 168 | 171 | ||
| 169 | 172 | ||
| 170 | /* copy our kernel relocation code to the control code page */ | 173 | /* copy our kernel relocation code to the control code page */ |
| 171 | memcpy(reboot_code_buffer, | 174 | reboot_entry = fncpy(reboot_code_buffer, |
| 172 | relocate_new_kernel, relocate_new_kernel_size); | 175 | reboot_entry, |
| 176 | relocate_new_kernel_size); | ||
| 177 | reboot_entry_phys = (unsigned long)reboot_entry + | ||
| 178 | (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer); | ||
| 173 | 179 | ||
| 174 | |||
| 175 | flush_icache_range((unsigned long) reboot_code_buffer, | ||
| 176 | (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); | ||
| 177 | printk(KERN_INFO "Bye!\n"); | 180 | printk(KERN_INFO "Bye!\n"); |
| 178 | 181 | ||
| 179 | if (kexec_reinit) | 182 | if (kexec_reinit) |
| 180 | kexec_reinit(); | 183 | kexec_reinit(); |
| 181 | 184 | ||
| 182 | soft_restart(reboot_code_buffer_phys); | 185 | soft_restart(reboot_entry_phys); |
| 183 | } | 186 | } |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94f6b05f9e24..92f7b15dd221 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -404,6 +404,7 @@ EXPORT_SYMBOL(dump_fpu); | |||
| 404 | unsigned long get_wchan(struct task_struct *p) | 404 | unsigned long get_wchan(struct task_struct *p) |
| 405 | { | 405 | { |
| 406 | struct stackframe frame; | 406 | struct stackframe frame; |
| 407 | unsigned long stack_page; | ||
| 407 | int count = 0; | 408 | int count = 0; |
| 408 | if (!p || p == current || p->state == TASK_RUNNING) | 409 | if (!p || p == current || p->state == TASK_RUNNING) |
| 409 | return 0; | 410 | return 0; |
| @@ -412,9 +413,11 @@ unsigned long get_wchan(struct task_struct *p) | |||
| 412 | frame.sp = thread_saved_sp(p); | 413 | frame.sp = thread_saved_sp(p); |
| 413 | frame.lr = 0; /* recovered from the stack */ | 414 | frame.lr = 0; /* recovered from the stack */ |
| 414 | frame.pc = thread_saved_pc(p); | 415 | frame.pc = thread_saved_pc(p); |
| 416 | stack_page = (unsigned long)task_stack_page(p); | ||
| 415 | do { | 417 | do { |
| 416 | int ret = unwind_frame(&frame); | 418 | if (frame.sp < stack_page || |
| 417 | if (ret < 0) | 419 | frame.sp >= stack_page + THREAD_SIZE || |
| 420 | unwind_frame(&frame) < 0) | ||
| 418 | return 0; | 421 | return 0; |
| 419 | if (!in_sched_functions(frame.pc)) | 422 | if (!in_sched_functions(frame.pc)) |
| 420 | return frame.pc; | 423 | return frame.pc; |
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index d0cdedf4864d..95858966d84e 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
| @@ -2,10 +2,12 @@ | |||
| 2 | * relocate_kernel.S - put the kernel image in place to boot | 2 | * relocate_kernel.S - put the kernel image in place to boot |
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | #include <linux/linkage.h> | ||
| 5 | #include <asm/kexec.h> | 6 | #include <asm/kexec.h> |
| 6 | 7 | ||
| 7 | .globl relocate_new_kernel | 8 | .align 3 /* not needed for this code, but keeps fncpy() happy */ |
| 8 | relocate_new_kernel: | 9 | |
| 10 | ENTRY(relocate_new_kernel) | ||
| 9 | 11 | ||
| 10 | ldr r0,kexec_indirection_page | 12 | ldr r0,kexec_indirection_page |
| 11 | ldr r1,kexec_start_address | 13 | ldr r1,kexec_start_address |
| @@ -79,6 +81,8 @@ kexec_mach_type: | |||
| 79 | kexec_boot_atags: | 81 | kexec_boot_atags: |
| 80 | .long 0x0 | 82 | .long 0x0 |
| 81 | 83 | ||
| 84 | ENDPROC(relocate_new_kernel) | ||
| 85 | |||
| 82 | relocate_new_kernel_end: | 86 | relocate_new_kernel_end: |
| 83 | 87 | ||
| 84 | .globl relocate_new_kernel_size | 88 | .globl relocate_new_kernel_size |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 6a1b8a81b1ae..987a7f5bce5f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -873,8 +873,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 873 | machine_desc = mdesc; | 873 | machine_desc = mdesc; |
| 874 | machine_name = mdesc->name; | 874 | machine_name = mdesc->name; |
| 875 | 875 | ||
| 876 | setup_dma_zone(mdesc); | ||
| 877 | |||
| 878 | if (mdesc->reboot_mode != REBOOT_HARD) | 876 | if (mdesc->reboot_mode != REBOOT_HARD) |
| 879 | reboot_mode = mdesc->reboot_mode; | 877 | reboot_mode = mdesc->reboot_mode; |
| 880 | 878 | ||
| @@ -892,6 +890,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 892 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); | 890 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); |
| 893 | 891 | ||
| 894 | early_paging_init(mdesc, lookup_processor_type(read_cpuid_id())); | 892 | early_paging_init(mdesc, lookup_processor_type(read_cpuid_id())); |
| 893 | setup_dma_zone(mdesc); | ||
| 895 | sanity_check_meminfo(); | 894 | sanity_check_meminfo(); |
| 896 | arm_memblock_init(&meminfo, mdesc); | 895 | arm_memblock_init(&meminfo, mdesc); |
| 897 | 896 | ||
diff --git a/arch/arm/kernel/sigreturn_codes.S b/arch/arm/kernel/sigreturn_codes.S index 3c5d0f2170fd..b84d0cb13682 100644 --- a/arch/arm/kernel/sigreturn_codes.S +++ b/arch/arm/kernel/sigreturn_codes.S | |||
| @@ -30,6 +30,27 @@ | |||
| 30 | * snippets. | 30 | * snippets. |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | /* | ||
| 34 | * In CPU_THUMBONLY case kernel arm opcodes are not allowed. | ||
| 35 | * Note in this case codes skips those instructions but it uses .org | ||
| 36 | * directive to keep correct layout of sigreturn_codes array. | ||
| 37 | */ | ||
| 38 | #ifndef CONFIG_CPU_THUMBONLY | ||
| 39 | #define ARM_OK(code...) code | ||
| 40 | #else | ||
| 41 | #define ARM_OK(code...) | ||
| 42 | #endif | ||
| 43 | |||
| 44 | .macro arm_slot n | ||
| 45 | .org sigreturn_codes + 12 * (\n) | ||
| 46 | ARM_OK( .arm ) | ||
| 47 | .endm | ||
| 48 | |||
| 49 | .macro thumb_slot n | ||
| 50 | .org sigreturn_codes + 12 * (\n) + 8 | ||
| 51 | .thumb | ||
| 52 | .endm | ||
| 53 | |||
| 33 | #if __LINUX_ARM_ARCH__ <= 4 | 54 | #if __LINUX_ARM_ARCH__ <= 4 |
| 34 | /* | 55 | /* |
| 35 | * Note we manually set minimally required arch that supports | 56 | * Note we manually set minimally required arch that supports |
| @@ -45,26 +66,27 @@ | |||
| 45 | .global sigreturn_codes | 66 | .global sigreturn_codes |
| 46 | .type sigreturn_codes, #object | 67 | .type sigreturn_codes, #object |
| 47 | 68 | ||
| 48 | .arm | 69 | .align |
| 49 | 70 | ||
| 50 | sigreturn_codes: | 71 | sigreturn_codes: |
| 51 | 72 | ||
| 52 | /* ARM sigreturn syscall code snippet */ | 73 | /* ARM sigreturn syscall code snippet */ |
| 53 | mov r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) | 74 | arm_slot 0 |
| 54 | swi #(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE) | 75 | ARM_OK( mov r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) ) |
| 76 | ARM_OK( swi #(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE) ) | ||
| 55 | 77 | ||
| 56 | /* Thumb sigreturn syscall code snippet */ | 78 | /* Thumb sigreturn syscall code snippet */ |
| 57 | .thumb | 79 | thumb_slot 0 |
| 58 | movs r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) | 80 | movs r7, #(__NR_sigreturn - __NR_SYSCALL_BASE) |
| 59 | swi #0 | 81 | swi #0 |
| 60 | 82 | ||
| 61 | /* ARM sigreturn_rt syscall code snippet */ | 83 | /* ARM sigreturn_rt syscall code snippet */ |
| 62 | .arm | 84 | arm_slot 1 |
| 63 | mov r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) | 85 | ARM_OK( mov r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) ) |
| 64 | swi #(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE) | 86 | ARM_OK( swi #(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE) ) |
| 65 | 87 | ||
| 66 | /* Thumb sigreturn_rt syscall code snippet */ | 88 | /* Thumb sigreturn_rt syscall code snippet */ |
| 67 | .thumb | 89 | thumb_slot 1 |
| 68 | movs r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) | 90 | movs r7, #(__NR_rt_sigreturn - __NR_SYSCALL_BASE) |
| 69 | swi #0 | 91 | swi #0 |
| 70 | 92 | ||
| @@ -74,7 +96,7 @@ sigreturn_codes: | |||
| 74 | * it is thumb case or not, so we need additional | 96 | * it is thumb case or not, so we need additional |
| 75 | * word after real last entry. | 97 | * word after real last entry. |
| 76 | */ | 98 | */ |
| 77 | .arm | 99 | arm_slot 2 |
| 78 | .space 4 | 100 | .space 4 |
| 79 | 101 | ||
| 80 | .size sigreturn_codes, . - sigreturn_codes | 102 | .size sigreturn_codes, . - sigreturn_codes |
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 00f79e59985b..af4e8c8a5422 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c | |||
| @@ -31,7 +31,7 @@ int notrace unwind_frame(struct stackframe *frame) | |||
| 31 | high = ALIGN(low, THREAD_SIZE); | 31 | high = ALIGN(low, THREAD_SIZE); |
| 32 | 32 | ||
| 33 | /* check current frame pointer is within bounds */ | 33 | /* check current frame pointer is within bounds */ |
| 34 | if (fp < (low + 12) || fp + 4 >= high) | 34 | if (fp < low + 12 || fp > high - 4) |
| 35 | return -EINVAL; | 35 | return -EINVAL; |
| 36 | 36 | ||
| 37 | /* restore the registers from the stack frame */ | 37 | /* restore the registers from the stack frame */ |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 6125f259b7b5..7940241f0576 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -509,9 +509,10 @@ static inline int | |||
| 509 | __do_cache_op(unsigned long start, unsigned long end) | 509 | __do_cache_op(unsigned long start, unsigned long end) |
| 510 | { | 510 | { |
| 511 | int ret; | 511 | int ret; |
| 512 | unsigned long chunk = PAGE_SIZE; | ||
| 513 | 512 | ||
| 514 | do { | 513 | do { |
| 514 | unsigned long chunk = min(PAGE_SIZE, end - start); | ||
| 515 | |||
| 515 | if (signal_pending(current)) { | 516 | if (signal_pending(current)) { |
| 516 | struct thread_info *ti = current_thread_info(); | 517 | struct thread_info *ti = current_thread_info(); |
| 517 | 518 | ||
| @@ -856,7 +857,7 @@ static void __init kuser_init(void *vectors) | |||
| 856 | memcpy(vectors + 0xfe0, vectors + 0xfe8, 4); | 857 | memcpy(vectors + 0xfe0, vectors + 0xfe8, 4); |
| 857 | } | 858 | } |
| 858 | #else | 859 | #else |
| 859 | static void __init kuser_init(void *vectors) | 860 | static inline void __init kuser_init(void *vectors) |
| 860 | { | 861 | { |
| 861 | } | 862 | } |
| 862 | #endif | 863 | #endif |
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 371958370de4..580906989db1 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
| @@ -334,6 +334,17 @@ out: | |||
| 334 | return err; | 334 | return err; |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | static phys_addr_t kvm_kaddr_to_phys(void *kaddr) | ||
| 338 | { | ||
| 339 | if (!is_vmalloc_addr(kaddr)) { | ||
| 340 | BUG_ON(!virt_addr_valid(kaddr)); | ||
| 341 | return __pa(kaddr); | ||
| 342 | } else { | ||
| 343 | return page_to_phys(vmalloc_to_page(kaddr)) + | ||
| 344 | offset_in_page(kaddr); | ||
| 345 | } | ||
| 346 | } | ||
| 347 | |||
| 337 | /** | 348 | /** |
| 338 | * create_hyp_mappings - duplicate a kernel virtual address range in Hyp mode | 349 | * create_hyp_mappings - duplicate a kernel virtual address range in Hyp mode |
| 339 | * @from: The virtual kernel start address of the range | 350 | * @from: The virtual kernel start address of the range |
| @@ -345,16 +356,27 @@ out: | |||
| 345 | */ | 356 | */ |
| 346 | int create_hyp_mappings(void *from, void *to) | 357 | int create_hyp_mappings(void *from, void *to) |
| 347 | { | 358 | { |
| 348 | unsigned long phys_addr = virt_to_phys(from); | 359 | phys_addr_t phys_addr; |
| 360 | unsigned long virt_addr; | ||
| 349 | unsigned long start = KERN_TO_HYP((unsigned long)from); | 361 | unsigned long start = KERN_TO_HYP((unsigned long)from); |
| 350 | unsigned long end = KERN_TO_HYP((unsigned long)to); | 362 | unsigned long end = KERN_TO_HYP((unsigned long)to); |
| 351 | 363 | ||
| 352 | /* Check for a valid kernel memory mapping */ | 364 | start = start & PAGE_MASK; |
| 353 | if (!virt_addr_valid(from) || !virt_addr_valid(to - 1)) | 365 | end = PAGE_ALIGN(end); |
| 354 | return -EINVAL; | ||
| 355 | 366 | ||
| 356 | return __create_hyp_mappings(hyp_pgd, start, end, | 367 | for (virt_addr = start; virt_addr < end; virt_addr += PAGE_SIZE) { |
| 357 | __phys_to_pfn(phys_addr), PAGE_HYP); | 368 | int err; |
| 369 | |||
| 370 | phys_addr = kvm_kaddr_to_phys(from + virt_addr - start); | ||
| 371 | err = __create_hyp_mappings(hyp_pgd, virt_addr, | ||
| 372 | virt_addr + PAGE_SIZE, | ||
| 373 | __phys_to_pfn(phys_addr), | ||
| 374 | PAGE_HYP); | ||
| 375 | if (err) | ||
| 376 | return err; | ||
| 377 | } | ||
| 378 | |||
| 379 | return 0; | ||
| 358 | } | 380 | } |
| 359 | 381 | ||
| 360 | /** | 382 | /** |
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index e0c68d5bb7dc..52886b89706c 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h | |||
| @@ -10,7 +10,7 @@ UNWIND( .fnstart ) | |||
| 10 | and r3, r0, #31 @ Get bit offset | 10 | and r3, r0, #31 @ Get bit offset |
| 11 | mov r0, r0, lsr #5 | 11 | mov r0, r0, lsr #5 |
| 12 | add r1, r1, r0, lsl #2 @ Get word offset | 12 | add r1, r1, r0, lsl #2 @ Get word offset |
| 13 | #if __LINUX_ARM_ARCH__ >= 7 | 13 | #if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP) |
| 14 | .arch_extension mp | 14 | .arch_extension mp |
| 15 | ALT_SMP(W(pldw) [r1]) | 15 | ALT_SMP(W(pldw) [r1]) |
| 16 | ALT_UP(W(nop)) | 16 | ALT_UP(W(nop)) |
diff --git a/arch/arm/lib/delay-loop.S b/arch/arm/lib/delay-loop.S index 36b668d8e121..bc1033b897b4 100644 --- a/arch/arm/lib/delay-loop.S +++ b/arch/arm/lib/delay-loop.S | |||
| @@ -40,6 +40,7 @@ ENTRY(__loop_const_udelay) @ 0 <= r0 <= 0x7fffff06 | |||
| 40 | /* | 40 | /* |
| 41 | * loops = r0 * HZ * loops_per_jiffy / 1000000 | 41 | * loops = r0 * HZ * loops_per_jiffy / 1000000 |
| 42 | */ | 42 | */ |
| 43 | .align 3 | ||
| 43 | 44 | ||
| 44 | @ Delay routine | 45 | @ Delay routine |
| 45 | ENTRY(__loop_delay) | 46 | ENTRY(__loop_delay) |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index f607deb40f4d..bc7b363a3083 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
| @@ -174,7 +174,6 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev) | |||
| 174 | static struct clock_event_device clkevt = { | 174 | static struct clock_event_device clkevt = { |
| 175 | .name = "at91_tick", | 175 | .name = "at91_tick", |
| 176 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 176 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
| 177 | .shift = 32, | ||
| 178 | .rating = 150, | 177 | .rating = 150, |
| 179 | .set_next_event = clkevt32k_next_event, | 178 | .set_next_event = clkevt32k_next_event, |
| 180 | .set_mode = clkevt32k_mode, | 179 | .set_mode = clkevt32k_mode, |
| @@ -265,11 +264,9 @@ void __init at91rm9200_timer_init(void) | |||
| 265 | at91_st_write(AT91_ST_RTMR, 1); | 264 | at91_st_write(AT91_ST_RTMR, 1); |
| 266 | 265 | ||
| 267 | /* Setup timer clockevent, with minimum of two ticks (important!!) */ | 266 | /* Setup timer clockevent, with minimum of two ticks (important!!) */ |
| 268 | clkevt.mult = div_sc(AT91_SLOW_CLOCK, NSEC_PER_SEC, clkevt.shift); | ||
| 269 | clkevt.max_delta_ns = clockevent_delta2ns(AT91_ST_ALMV, &clkevt); | ||
| 270 | clkevt.min_delta_ns = clockevent_delta2ns(2, &clkevt) + 1; | ||
| 271 | clkevt.cpumask = cpumask_of(0); | 267 | clkevt.cpumask = cpumask_of(0); |
| 272 | clockevents_register_device(&clkevt); | 268 | clockevents_config_and_register(&clkevt, AT91_SLOW_CLOCK, |
| 269 | 2, AT91_ST_ALMV); | ||
| 273 | 270 | ||
| 274 | /* register clocksource */ | 271 | /* register clocksource */ |
| 275 | clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); | 272 | clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); |
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 3ed190ce062b..c5101dcb4fb0 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
| @@ -16,7 +16,11 @@ | |||
| 16 | #include <mach/at91_ramc.h> | 16 | #include <mach/at91_ramc.h> |
| 17 | #include <mach/at91rm9200_sdramc.h> | 17 | #include <mach/at91rm9200_sdramc.h> |
| 18 | 18 | ||
| 19 | #ifdef CONFIG_PM | ||
| 19 | extern void at91_pm_set_standby(void (*at91_standby)(void)); | 20 | extern void at91_pm_set_standby(void (*at91_standby)(void)); |
| 21 | #else | ||
| 22 | static inline void at91_pm_set_standby(void (*at91_standby)(void)) { } | ||
| 23 | #endif | ||
| 20 | 24 | ||
| 21 | /* | 25 | /* |
| 22 | * The AT91RM9200 goes into self-refresh mode with this command, and will | 26 | * The AT91RM9200 goes into self-refresh mode with this command, and will |
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c index 3ea86428ee09..a28873fe3049 100644 --- a/arch/arm/mach-at91/sama5d3.c +++ b/arch/arm/mach-at91/sama5d3.c | |||
| @@ -95,19 +95,19 @@ static struct clk twi0_clk = { | |||
| 95 | .name = "twi0_clk", | 95 | .name = "twi0_clk", |
| 96 | .pid = SAMA5D3_ID_TWI0, | 96 | .pid = SAMA5D3_ID_TWI0, |
| 97 | .type = CLK_TYPE_PERIPHERAL, | 97 | .type = CLK_TYPE_PERIPHERAL, |
| 98 | .div = AT91_PMC_PCR_DIV2, | 98 | .div = AT91_PMC_PCR_DIV8, |
| 99 | }; | 99 | }; |
| 100 | static struct clk twi1_clk = { | 100 | static struct clk twi1_clk = { |
| 101 | .name = "twi1_clk", | 101 | .name = "twi1_clk", |
| 102 | .pid = SAMA5D3_ID_TWI1, | 102 | .pid = SAMA5D3_ID_TWI1, |
| 103 | .type = CLK_TYPE_PERIPHERAL, | 103 | .type = CLK_TYPE_PERIPHERAL, |
| 104 | .div = AT91_PMC_PCR_DIV2, | 104 | .div = AT91_PMC_PCR_DIV8, |
| 105 | }; | 105 | }; |
| 106 | static struct clk twi2_clk = { | 106 | static struct clk twi2_clk = { |
| 107 | .name = "twi2_clk", | 107 | .name = "twi2_clk", |
| 108 | .pid = SAMA5D3_ID_TWI2, | 108 | .pid = SAMA5D3_ID_TWI2, |
| 109 | .type = CLK_TYPE_PERIPHERAL, | 109 | .type = CLK_TYPE_PERIPHERAL, |
| 110 | .div = AT91_PMC_PCR_DIV2, | 110 | .div = AT91_PMC_PCR_DIV8, |
| 111 | }; | 111 | }; |
| 112 | static struct clk mmc0_clk = { | 112 | static struct clk mmc0_clk = { |
| 113 | .name = "mci0_clk", | 113 | .name = "mci0_clk", |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index c46eccbbd512..78829c513fdc 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
| @@ -487,7 +487,7 @@ int __init da8xx_register_emac(void) | |||
| 487 | 487 | ||
| 488 | static struct resource da830_mcasp1_resources[] = { | 488 | static struct resource da830_mcasp1_resources[] = { |
| 489 | { | 489 | { |
| 490 | .name = "mcasp1", | 490 | .name = "mpu", |
| 491 | .start = DAVINCI_DA830_MCASP1_REG_BASE, | 491 | .start = DAVINCI_DA830_MCASP1_REG_BASE, |
| 492 | .end = DAVINCI_DA830_MCASP1_REG_BASE + (SZ_1K * 12) - 1, | 492 | .end = DAVINCI_DA830_MCASP1_REG_BASE + (SZ_1K * 12) - 1, |
| 493 | .flags = IORESOURCE_MEM, | 493 | .flags = IORESOURCE_MEM, |
| @@ -515,7 +515,7 @@ static struct platform_device da830_mcasp1_device = { | |||
| 515 | 515 | ||
| 516 | static struct resource da850_mcasp_resources[] = { | 516 | static struct resource da850_mcasp_resources[] = { |
| 517 | { | 517 | { |
| 518 | .name = "mcasp", | 518 | .name = "mpu", |
| 519 | .start = DAVINCI_DA8XX_MCASP0_REG_BASE, | 519 | .start = DAVINCI_DA8XX_MCASP0_REG_BASE, |
| 520 | .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1, | 520 | .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1, |
| 521 | .flags = IORESOURCE_MEM, | 521 | .flags = IORESOURCE_MEM, |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index ef9ff1fb6f52..6117fc644188 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
| @@ -641,6 +641,7 @@ static struct platform_device dm355_edma_device = { | |||
| 641 | 641 | ||
| 642 | static struct resource dm355_asp1_resources[] = { | 642 | static struct resource dm355_asp1_resources[] = { |
| 643 | { | 643 | { |
| 644 | .name = "mpu", | ||
| 644 | .start = DAVINCI_ASP1_BASE, | 645 | .start = DAVINCI_ASP1_BASE, |
| 645 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, | 646 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, |
| 646 | .flags = IORESOURCE_MEM, | 647 | .flags = IORESOURCE_MEM, |
| @@ -906,7 +907,7 @@ static struct davinci_gpio_platform_data dm355_gpio_platform_data = { | |||
| 906 | int __init dm355_gpio_register(void) | 907 | int __init dm355_gpio_register(void) |
| 907 | { | 908 | { |
| 908 | return davinci_gpio_register(dm355_gpio_resources, | 909 | return davinci_gpio_register(dm355_gpio_resources, |
| 909 | sizeof(dm355_gpio_resources), | 910 | ARRAY_SIZE(dm355_gpio_resources), |
| 910 | &dm355_gpio_platform_data); | 911 | &dm355_gpio_platform_data); |
| 911 | } | 912 | } |
| 912 | /*----------------------------------------------------------------------*/ | 913 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 1511a0680f9a..d7c6f85d3fc9 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
| @@ -720,7 +720,7 @@ static struct davinci_gpio_platform_data dm365_gpio_platform_data = { | |||
| 720 | int __init dm365_gpio_register(void) | 720 | int __init dm365_gpio_register(void) |
| 721 | { | 721 | { |
| 722 | return davinci_gpio_register(dm365_gpio_resources, | 722 | return davinci_gpio_register(dm365_gpio_resources, |
| 723 | sizeof(dm365_gpio_resources), | 723 | ARRAY_SIZE(dm365_gpio_resources), |
| 724 | &dm365_gpio_platform_data); | 724 | &dm365_gpio_platform_data); |
| 725 | } | 725 | } |
| 726 | 726 | ||
| @@ -942,6 +942,7 @@ static struct platform_device dm365_edma_device = { | |||
| 942 | 942 | ||
| 943 | static struct resource dm365_asp_resources[] = { | 943 | static struct resource dm365_asp_resources[] = { |
| 944 | { | 944 | { |
| 945 | .name = "mpu", | ||
| 945 | .start = DAVINCI_DM365_ASP0_BASE, | 946 | .start = DAVINCI_DM365_ASP0_BASE, |
| 946 | .end = DAVINCI_DM365_ASP0_BASE + SZ_8K - 1, | 947 | .end = DAVINCI_DM365_ASP0_BASE + SZ_8K - 1, |
| 947 | .flags = IORESOURCE_MEM, | 948 | .flags = IORESOURCE_MEM, |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 143a3217e8ef..3ce47997bb46 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
| @@ -572,6 +572,7 @@ static struct platform_device dm644x_edma_device = { | |||
| 572 | /* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */ | 572 | /* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */ |
| 573 | static struct resource dm644x_asp_resources[] = { | 573 | static struct resource dm644x_asp_resources[] = { |
| 574 | { | 574 | { |
| 575 | .name = "mpu", | ||
| 575 | .start = DAVINCI_ASP0_BASE, | 576 | .start = DAVINCI_ASP0_BASE, |
| 576 | .end = DAVINCI_ASP0_BASE + SZ_8K - 1, | 577 | .end = DAVINCI_ASP0_BASE + SZ_8K - 1, |
| 577 | .flags = IORESOURCE_MEM, | 578 | .flags = IORESOURCE_MEM, |
| @@ -792,7 +793,7 @@ static struct davinci_gpio_platform_data dm644_gpio_platform_data = { | |||
| 792 | int __init dm644x_gpio_register(void) | 793 | int __init dm644x_gpio_register(void) |
| 793 | { | 794 | { |
| 794 | return davinci_gpio_register(dm644_gpio_resources, | 795 | return davinci_gpio_register(dm644_gpio_resources, |
| 795 | sizeof(dm644_gpio_resources), | 796 | ARRAY_SIZE(dm644_gpio_resources), |
| 796 | &dm644_gpio_platform_data); | 797 | &dm644_gpio_platform_data); |
| 797 | } | 798 | } |
| 798 | /*----------------------------------------------------------------------*/ | 799 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 2a73f299c1d0..0e81fea65e7f 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
| @@ -621,7 +621,7 @@ static struct platform_device dm646x_edma_device = { | |||
| 621 | 621 | ||
| 622 | static struct resource dm646x_mcasp0_resources[] = { | 622 | static struct resource dm646x_mcasp0_resources[] = { |
| 623 | { | 623 | { |
| 624 | .name = "mcasp0", | 624 | .name = "mpu", |
| 625 | .start = DAVINCI_DM646X_MCASP0_REG_BASE, | 625 | .start = DAVINCI_DM646X_MCASP0_REG_BASE, |
| 626 | .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1, | 626 | .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1, |
| 627 | .flags = IORESOURCE_MEM, | 627 | .flags = IORESOURCE_MEM, |
| @@ -641,7 +641,7 @@ static struct resource dm646x_mcasp0_resources[] = { | |||
| 641 | 641 | ||
| 642 | static struct resource dm646x_mcasp1_resources[] = { | 642 | static struct resource dm646x_mcasp1_resources[] = { |
| 643 | { | 643 | { |
| 644 | .name = "mcasp1", | 644 | .name = "mpu", |
| 645 | .start = DAVINCI_DM646X_MCASP1_REG_BASE, | 645 | .start = DAVINCI_DM646X_MCASP1_REG_BASE, |
| 646 | .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1, | 646 | .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1, |
| 647 | .flags = IORESOURCE_MEM, | 647 | .flags = IORESOURCE_MEM, |
| @@ -769,7 +769,7 @@ static struct davinci_gpio_platform_data dm646x_gpio_platform_data = { | |||
| 769 | int __init dm646x_gpio_register(void) | 769 | int __init dm646x_gpio_register(void) |
| 770 | { | 770 | { |
| 771 | return davinci_gpio_register(dm646x_gpio_resources, | 771 | return davinci_gpio_register(dm646x_gpio_resources, |
| 772 | sizeof(dm646x_gpio_resources), | 772 | ARRAY_SIZE(dm646x_gpio_resources), |
| 773 | &dm646x_gpio_platform_data); | 773 | &dm646x_gpio_platform_data); |
| 774 | } | 774 | } |
| 775 | /*----------------------------------------------------------------------*/ | 775 | /*----------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index 2739ca2c1334..e0091685fd48 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
| 18 | #include <video/vga.h> | ||
| 18 | 19 | ||
| 19 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
| 20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
| @@ -196,6 +197,8 @@ void __init footbridge_map_io(void) | |||
| 196 | iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc)); | 197 | iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc)); |
| 197 | pci_map_io_early(__phys_to_pfn(DC21285_PCI_IO)); | 198 | pci_map_io_early(__phys_to_pfn(DC21285_PCI_IO)); |
| 198 | } | 199 | } |
| 200 | |||
| 201 | vga_base = PCIMEM_BASE; | ||
| 199 | } | 202 | } |
| 200 | 203 | ||
| 201 | void footbridge_restart(enum reboot_mode mode, const char *cmd) | 204 | void footbridge_restart(enum reboot_mode mode, const char *cmd) |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 3490a24f969e..7c2fdae9a38b 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
| 21 | #include <video/vga.h> | ||
| 22 | 21 | ||
| 23 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
| 24 | #include <asm/mach/pci.h> | 23 | #include <asm/mach/pci.h> |
| @@ -291,7 +290,6 @@ void __init dc21285_preinit(void) | |||
| 291 | int cfn_mode; | 290 | int cfn_mode; |
| 292 | 291 | ||
| 293 | pcibios_min_mem = 0x81000000; | 292 | pcibios_min_mem = 0x81000000; |
| 294 | vga_base = PCIMEM_BASE; | ||
| 295 | 293 | ||
| 296 | mem_size = (unsigned int)high_memory - PAGE_OFFSET; | 294 | mem_size = (unsigned int)high_memory - PAGE_OFFSET; |
| 297 | for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1) | 295 | for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1) |
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c index b08243500e2e..1a7235fb52ac 100644 --- a/arch/arm/mach-footbridge/ebsa285.c +++ b/arch/arm/mach-footbridge/ebsa285.c | |||
| @@ -30,21 +30,24 @@ static const struct { | |||
| 30 | const char *name; | 30 | const char *name; |
| 31 | const char *trigger; | 31 | const char *trigger; |
| 32 | } ebsa285_leds[] = { | 32 | } ebsa285_leds[] = { |
| 33 | { "ebsa285:amber", "heartbeat", }, | 33 | { "ebsa285:amber", "cpu0", }, |
| 34 | { "ebsa285:green", "cpu0", }, | 34 | { "ebsa285:green", "heartbeat", }, |
| 35 | { "ebsa285:red",}, | 35 | { "ebsa285:red",}, |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | static unsigned char hw_led_state; | ||
| 39 | |||
| 38 | static void ebsa285_led_set(struct led_classdev *cdev, | 40 | static void ebsa285_led_set(struct led_classdev *cdev, |
| 39 | enum led_brightness b) | 41 | enum led_brightness b) |
| 40 | { | 42 | { |
| 41 | struct ebsa285_led *led = container_of(cdev, | 43 | struct ebsa285_led *led = container_of(cdev, |
| 42 | struct ebsa285_led, cdev); | 44 | struct ebsa285_led, cdev); |
| 43 | 45 | ||
| 44 | if (b != LED_OFF) | 46 | if (b == LED_OFF) |
| 45 | *XBUS_LEDS |= led->mask; | 47 | hw_led_state |= led->mask; |
| 46 | else | 48 | else |
| 47 | *XBUS_LEDS &= ~led->mask; | 49 | hw_led_state &= ~led->mask; |
| 50 | *XBUS_LEDS = hw_led_state; | ||
| 48 | } | 51 | } |
| 49 | 52 | ||
| 50 | static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) | 53 | static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) |
| @@ -52,18 +55,19 @@ static enum led_brightness ebsa285_led_get(struct led_classdev *cdev) | |||
| 52 | struct ebsa285_led *led = container_of(cdev, | 55 | struct ebsa285_led *led = container_of(cdev, |
| 53 | struct ebsa285_led, cdev); | 56 | struct ebsa285_led, cdev); |
| 54 | 57 | ||
| 55 | return (*XBUS_LEDS & led->mask) ? LED_FULL : LED_OFF; | 58 | return hw_led_state & led->mask ? LED_OFF : LED_FULL; |
| 56 | } | 59 | } |
| 57 | 60 | ||
| 58 | static int __init ebsa285_leds_init(void) | 61 | static int __init ebsa285_leds_init(void) |
| 59 | { | 62 | { |
| 60 | int i; | 63 | int i; |
| 61 | 64 | ||
| 62 | if (machine_is_ebsa285()) | 65 | if (!machine_is_ebsa285()) |
| 63 | return -ENODEV; | 66 | return -ENODEV; |
| 64 | 67 | ||
| 65 | /* 3 LEDS All ON */ | 68 | /* 3 LEDS all off */ |
| 66 | *XBUS_LEDS |= XBUS_LED_AMBER | XBUS_LED_GREEN | XBUS_LED_RED; | 69 | hw_led_state = XBUS_LED_AMBER | XBUS_LED_GREEN | XBUS_LED_RED; |
| 70 | *XBUS_LEDS = hw_led_state; | ||
| 67 | 71 | ||
| 68 | for (i = 0; i < ARRAY_SIZE(ebsa285_leds); i++) { | 72 | for (i = 0; i < ARRAY_SIZE(ebsa285_leds); i++) { |
| 69 | struct ebsa285_led *led; | 73 | struct ebsa285_led *led; |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index b3d7e5634b83..bd3bf66ce344 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
| @@ -17,12 +17,15 @@ | |||
| 17 | #include <linux/clkdev.h> | 17 | #include <linux/clkdev.h> |
| 18 | #include <linux/clocksource.h> | 18 | #include <linux/clocksource.h> |
| 19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
| 20 | #include <linux/input.h> | ||
| 20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 21 | #include <linux/irqchip.h> | 22 | #include <linux/irqchip.h> |
| 23 | #include <linux/mailbox.h> | ||
| 22 | #include <linux/of.h> | 24 | #include <linux/of.h> |
| 23 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
| 24 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
| 25 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
| 28 | #include <linux/reboot.h> | ||
| 26 | #include <linux/amba/bus.h> | 29 | #include <linux/amba/bus.h> |
| 27 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
| 28 | 31 | ||
| @@ -130,6 +133,24 @@ static struct platform_device highbank_cpuidle_device = { | |||
| 130 | .name = "cpuidle-calxeda", | 133 | .name = "cpuidle-calxeda", |
| 131 | }; | 134 | }; |
| 132 | 135 | ||
| 136 | static int hb_keys_notifier(struct notifier_block *nb, unsigned long event, void *data) | ||
| 137 | { | ||
| 138 | u32 key = *(u32 *)data; | ||
| 139 | |||
| 140 | if (event != 0x1000) | ||
| 141 | return 0; | ||
| 142 | |||
| 143 | if (key == KEY_POWER) | ||
| 144 | orderly_poweroff(false); | ||
| 145 | else if (key == 0xffff) | ||
| 146 | ctrl_alt_del(); | ||
| 147 | |||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | static struct notifier_block hb_keys_nb = { | ||
| 151 | .notifier_call = hb_keys_notifier, | ||
| 152 | }; | ||
| 153 | |||
| 133 | static void __init highbank_init(void) | 154 | static void __init highbank_init(void) |
| 134 | { | 155 | { |
| 135 | struct device_node *np; | 156 | struct device_node *np; |
| @@ -145,6 +166,8 @@ static void __init highbank_init(void) | |||
| 145 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); | 166 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); |
| 146 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); | 167 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); |
| 147 | 168 | ||
| 169 | pl320_ipc_register_notifier(&hb_keys_nb); | ||
| 170 | |||
| 148 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 171 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 149 | 172 | ||
| 150 | if (psci_ops.cpu_suspend) | 173 | if (psci_ops.cpu_suspend) |
diff --git a/arch/arm/mach-iop13xx/include/mach/adma.h b/arch/arm/mach-iop13xx/include/mach/adma.h index 6d3782d85a9f..a86fd0ed7757 100644 --- a/arch/arm/mach-iop13xx/include/mach/adma.h +++ b/arch/arm/mach-iop13xx/include/mach/adma.h | |||
| @@ -218,20 +218,6 @@ iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op) | |||
| 218 | #define iop_chan_pq_slot_count iop_chan_xor_slot_count | 218 | #define iop_chan_pq_slot_count iop_chan_xor_slot_count |
| 219 | #define iop_chan_pq_zero_sum_slot_count iop_chan_xor_slot_count | 219 | #define iop_chan_pq_zero_sum_slot_count iop_chan_xor_slot_count |
| 220 | 220 | ||
| 221 | static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc, | ||
| 222 | struct iop_adma_chan *chan) | ||
| 223 | { | ||
| 224 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
| 225 | return hw_desc->dest_addr; | ||
| 226 | } | ||
| 227 | |||
| 228 | static inline u32 iop_desc_get_qdest_addr(struct iop_adma_desc_slot *desc, | ||
| 229 | struct iop_adma_chan *chan) | ||
| 230 | { | ||
| 231 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
| 232 | return hw_desc->q_dest_addr; | ||
| 233 | } | ||
| 234 | |||
| 235 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, | 221 | static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc, |
| 236 | struct iop_adma_chan *chan) | 222 | struct iop_adma_chan *chan) |
| 237 | { | 223 | { |
| @@ -350,18 +336,6 @@ iop_desc_init_pq(struct iop_adma_desc_slot *desc, int src_cnt, | |||
| 350 | hw_desc->desc_ctrl = u_desc_ctrl.value; | 336 | hw_desc->desc_ctrl = u_desc_ctrl.value; |
| 351 | } | 337 | } |
| 352 | 338 | ||
| 353 | static inline int iop_desc_is_pq(struct iop_adma_desc_slot *desc) | ||
| 354 | { | ||
| 355 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | ||
| 356 | union { | ||
| 357 | u32 value; | ||
| 358 | struct iop13xx_adma_desc_ctrl field; | ||
| 359 | } u_desc_ctrl; | ||
| 360 | |||
| 361 | u_desc_ctrl.value = hw_desc->desc_ctrl; | ||
| 362 | return u_desc_ctrl.field.pq_xfer_en; | ||
| 363 | } | ||
| 364 | |||
| 365 | static inline void | 339 | static inline void |
| 366 | iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt, | 340 | iop_desc_init_pq_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt, |
| 367 | unsigned long flags) | 341 | unsigned long flags) |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 1f25f3e99c05..adcef406ff0a 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
| @@ -19,11 +19,11 @@ secure-common = omap-smc.o omap-secure.o | |||
| 19 | 19 | ||
| 20 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) | 20 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) |
| 21 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) | 21 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) |
| 22 | obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) | 22 | obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common) |
| 23 | obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) | 23 | obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) |
| 24 | obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common) | 24 | obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common) |
| 25 | obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) | 25 | obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) |
| 26 | obj-$(CONFIG_SOC_DRA7XX) += prm44xx.o $(hwmod-common) $(secure-common) | 26 | obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common) |
| 27 | 27 | ||
| 28 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) | 28 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) |
| 29 | obj-y += mcbsp.o | 29 | obj-y += mcbsp.o |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 19f1652e94cf..8d972ff18c56 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
| @@ -131,6 +131,24 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)") | |||
| 131 | .dt_compat = omap3_gp_boards_compat, | 131 | .dt_compat = omap3_gp_boards_compat, |
| 132 | .restart = omap3xxx_restart, | 132 | .restart = omap3xxx_restart, |
| 133 | MACHINE_END | 133 | MACHINE_END |
| 134 | |||
| 135 | static const char *am3517_boards_compat[] __initdata = { | ||
| 136 | "ti,am3517", | ||
| 137 | NULL, | ||
| 138 | }; | ||
| 139 | |||
| 140 | DT_MACHINE_START(AM3517_DT, "Generic AM3517 (Flattened Device Tree)") | ||
| 141 | .reserve = omap_reserve, | ||
| 142 | .map_io = omap3_map_io, | ||
| 143 | .init_early = am35xx_init_early, | ||
| 144 | .init_irq = omap_intc_of_init, | ||
| 145 | .handle_irq = omap3_intc_handle_irq, | ||
| 146 | .init_machine = omap_generic_init, | ||
| 147 | .init_late = omap3_init_late, | ||
| 148 | .init_time = omap3_gptimer_timer_init, | ||
| 149 | .dt_compat = am3517_boards_compat, | ||
| 150 | .restart = omap3xxx_restart, | ||
| 151 | MACHINE_END | ||
| 134 | #endif | 152 | #endif |
| 135 | 153 | ||
| 136 | #ifdef CONFIG_SOC_AM33XX | 154 | #ifdef CONFIG_SOC_AM33XX |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index f7644febee81..e30ef6797c63 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
| @@ -299,7 +299,6 @@ struct omap_sdrc_params; | |||
| 299 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 299 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
| 300 | struct omap_sdrc_params *sdrc_cs1); | 300 | struct omap_sdrc_params *sdrc_cs1); |
| 301 | struct omap2_hsmmc_info; | 301 | struct omap2_hsmmc_info; |
| 302 | extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers); | ||
| 303 | extern void omap_reserve(void); | 302 | extern void omap_reserve(void); |
| 304 | 303 | ||
| 305 | struct omap_hwmod; | 304 | struct omap_hwmod; |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index a4e536b11ec9..58347bb874a0 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | #include "soc.h" | 33 | #include "soc.h" |
| 34 | #include "iomap.h" | 34 | #include "iomap.h" |
| 35 | #include "mux.h" | ||
| 36 | #include "control.h" | 35 | #include "control.h" |
| 37 | #include "display.h" | 36 | #include "display.h" |
| 38 | #include "prm.h" | 37 | #include "prm.h" |
| @@ -102,90 +101,13 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { | |||
| 102 | { "dss_hdmi", "omapdss_hdmi", -1 }, | 101 | { "dss_hdmi", "omapdss_hdmi", -1 }, |
| 103 | }; | 102 | }; |
| 104 | 103 | ||
| 105 | static void __init omap4_tpd12s015_mux_pads(void) | ||
| 106 | { | ||
| 107 | omap_mux_init_signal("hdmi_cec", | ||
| 108 | OMAP_PIN_INPUT_PULLUP); | ||
| 109 | omap_mux_init_signal("hdmi_ddc_scl", | ||
| 110 | OMAP_PIN_INPUT_PULLUP); | ||
| 111 | omap_mux_init_signal("hdmi_ddc_sda", | ||
| 112 | OMAP_PIN_INPUT_PULLUP); | ||
| 113 | } | ||
| 114 | |||
| 115 | static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | ||
| 116 | { | ||
| 117 | u32 reg; | ||
| 118 | u16 control_i2c_1; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and | ||
| 122 | * HDMI_DDC_SCL_PULLUPRESX (bit 24) are set to disable | ||
| 123 | * internal pull up resistor. | ||
| 124 | */ | ||
| 125 | if (flags & OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP) { | ||
| 126 | control_i2c_1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_1; | ||
| 127 | reg = omap4_ctrl_pad_readl(control_i2c_1); | ||
| 128 | reg |= (OMAP4_HDMI_DDC_SDA_PULLUPRESX_MASK | | ||
| 129 | OMAP4_HDMI_DDC_SCL_PULLUPRESX_MASK); | ||
| 130 | omap4_ctrl_pad_writel(reg, control_i2c_1); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | ||
| 135 | { | ||
| 136 | u32 enable_mask, enable_shift; | ||
| 137 | u32 pipd_mask, pipd_shift; | ||
| 138 | u32 reg; | ||
| 139 | |||
| 140 | if (dsi_id == 0) { | ||
| 141 | enable_mask = OMAP4_DSI1_LANEENABLE_MASK; | ||
| 142 | enable_shift = OMAP4_DSI1_LANEENABLE_SHIFT; | ||
| 143 | pipd_mask = OMAP4_DSI1_PIPD_MASK; | ||
| 144 | pipd_shift = OMAP4_DSI1_PIPD_SHIFT; | ||
| 145 | } else if (dsi_id == 1) { | ||
| 146 | enable_mask = OMAP4_DSI2_LANEENABLE_MASK; | ||
| 147 | enable_shift = OMAP4_DSI2_LANEENABLE_SHIFT; | ||
| 148 | pipd_mask = OMAP4_DSI2_PIPD_MASK; | ||
| 149 | pipd_shift = OMAP4_DSI2_PIPD_SHIFT; | ||
| 150 | } else { | ||
| 151 | return -ENODEV; | ||
| 152 | } | ||
| 153 | |||
| 154 | reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); | ||
| 155 | |||
| 156 | reg &= ~enable_mask; | ||
| 157 | reg &= ~pipd_mask; | ||
| 158 | |||
| 159 | reg |= (lanes << enable_shift) & enable_mask; | ||
| 160 | reg |= (lanes << pipd_shift) & pipd_mask; | ||
| 161 | |||
| 162 | omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); | ||
| 163 | |||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 167 | int __init omap_hdmi_init(enum omap_hdmi_flags flags) | ||
| 168 | { | ||
| 169 | if (cpu_is_omap44xx()) { | ||
| 170 | omap4_hdmi_mux_pads(flags); | ||
| 171 | omap4_tpd12s015_mux_pads(); | ||
| 172 | } | ||
| 173 | |||
| 174 | return 0; | ||
| 175 | } | ||
| 176 | |||
| 177 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 104 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) |
| 178 | { | 105 | { |
| 179 | if (cpu_is_omap44xx()) | ||
| 180 | return omap4_dsi_mux_pads(dsi_id, lane_mask); | ||
| 181 | |||
| 182 | return 0; | 106 | return 0; |
| 183 | } | 107 | } |
| 184 | 108 | ||
| 185 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) | 109 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) |
| 186 | { | 110 | { |
| 187 | if (cpu_is_omap44xx()) | ||
| 188 | omap4_dsi_mux_pads(dsi_id, 0); | ||
| 189 | } | 111 | } |
| 190 | 112 | ||
| 191 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) | 113 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) |
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index 365bfd3d9c68..dadccc91488c 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c | |||
| @@ -223,7 +223,7 @@ void __init omap_4430sdp_display_init_of(void) | |||
| 223 | static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { | 223 | static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { |
| 224 | .name = "dvi", | 224 | .name = "dvi", |
| 225 | .source = "tfp410.0", | 225 | .source = "tfp410.0", |
| 226 | .i2c_bus_num = 3, | 226 | .i2c_bus_num = 2, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static struct platform_device omap3_igep2_dvi_connector_device = { | 229 | static struct platform_device omap3_igep2_dvi_connector_device = { |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 81de56251955..d24926e6340f 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
| @@ -1502,6 +1502,22 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, | |||
| 1502 | } | 1502 | } |
| 1503 | 1503 | ||
| 1504 | /* | 1504 | /* |
| 1505 | * For some GPMC devices we still need to rely on the bootloader | ||
| 1506 | * timings because the devices can be connected via FPGA. So far | ||
| 1507 | * the list is smc91x on the omap2 SDP boards, and 8250 on zooms. | ||
| 1508 | * REVISIT: Add timing support from slls644g.pdf and from the | ||
| 1509 | * lan91c96 manual. | ||
| 1510 | */ | ||
| 1511 | if (of_device_is_compatible(child, "ns16550a") || | ||
| 1512 | of_device_is_compatible(child, "smsc,lan91c94") || | ||
| 1513 | of_device_is_compatible(child, "smsc,lan91c111")) { | ||
| 1514 | dev_warn(&pdev->dev, | ||
| 1515 | "%s using bootloader timings on CS%d\n", | ||
| 1516 | child->name, cs); | ||
| 1517 | goto no_timings; | ||
| 1518 | } | ||
| 1519 | |||
| 1520 | /* | ||
| 1505 | * FIXME: gpmc_cs_request() will map the CS to an arbitary | 1521 | * FIXME: gpmc_cs_request() will map the CS to an arbitary |
| 1506 | * location in the gpmc address space. When booting with | 1522 | * location in the gpmc address space. When booting with |
| 1507 | * device-tree we want the NOR flash to be mapped to the | 1523 | * device-tree we want the NOR flash to be mapped to the |
| @@ -1529,6 +1545,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, | |||
| 1529 | gpmc_read_timings_dt(child, &gpmc_t); | 1545 | gpmc_read_timings_dt(child, &gpmc_t); |
| 1530 | gpmc_cs_set_timings(cs, &gpmc_t); | 1546 | gpmc_cs_set_timings(cs, &gpmc_t); |
| 1531 | 1547 | ||
| 1548 | no_timings: | ||
| 1532 | if (of_platform_device_create(child, NULL, &pdev->dev)) | 1549 | if (of_platform_device_create(child, NULL, &pdev->dev)) |
| 1533 | return 0; | 1550 | return 0; |
| 1534 | 1551 | ||
| @@ -1541,42 +1558,6 @@ err: | |||
| 1541 | return ret; | 1558 | return ret; |
| 1542 | } | 1559 | } |
| 1543 | 1560 | ||
| 1544 | /* | ||
| 1545 | * REVISIT: Add timing support from slls644g.pdf | ||
| 1546 | */ | ||
| 1547 | static int gpmc_probe_8250(struct platform_device *pdev, | ||
| 1548 | struct device_node *child) | ||
| 1549 | { | ||
| 1550 | struct resource res; | ||
| 1551 | unsigned long base; | ||
| 1552 | int ret, cs; | ||
| 1553 | |||
| 1554 | if (of_property_read_u32(child, "reg", &cs) < 0) { | ||
| 1555 | dev_err(&pdev->dev, "%s has no 'reg' property\n", | ||
| 1556 | child->full_name); | ||
| 1557 | return -ENODEV; | ||
| 1558 | } | ||
| 1559 | |||
| 1560 | if (of_address_to_resource(child, 0, &res) < 0) { | ||
| 1561 | dev_err(&pdev->dev, "%s has malformed 'reg' property\n", | ||
| 1562 | child->full_name); | ||
| 1563 | return -ENODEV; | ||
| 1564 | } | ||
| 1565 | |||
| 1566 | ret = gpmc_cs_request(cs, resource_size(&res), &base); | ||
| 1567 | if (ret < 0) { | ||
| 1568 | dev_err(&pdev->dev, "cannot request GPMC CS %d\n", cs); | ||
| 1569 | return ret; | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | if (of_platform_device_create(child, NULL, &pdev->dev)) | ||
| 1573 | return 0; | ||
| 1574 | |||
| 1575 | dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name); | ||
| 1576 | |||
| 1577 | return -ENODEV; | ||
| 1578 | } | ||
| 1579 | |||
| 1580 | static int gpmc_probe_dt(struct platform_device *pdev) | 1561 | static int gpmc_probe_dt(struct platform_device *pdev) |
| 1581 | { | 1562 | { |
| 1582 | int ret; | 1563 | int ret; |
| @@ -1618,10 +1599,9 @@ static int gpmc_probe_dt(struct platform_device *pdev) | |||
| 1618 | else if (of_node_cmp(child->name, "onenand") == 0) | 1599 | else if (of_node_cmp(child->name, "onenand") == 0) |
| 1619 | ret = gpmc_probe_onenand_child(pdev, child); | 1600 | ret = gpmc_probe_onenand_child(pdev, child); |
| 1620 | else if (of_node_cmp(child->name, "ethernet") == 0 || | 1601 | else if (of_node_cmp(child->name, "ethernet") == 0 || |
| 1621 | of_node_cmp(child->name, "nor") == 0) | 1602 | of_node_cmp(child->name, "nor") == 0 || |
| 1603 | of_node_cmp(child->name, "uart") == 0) | ||
| 1622 | ret = gpmc_probe_generic_child(pdev, child); | 1604 | ret = gpmc_probe_generic_child(pdev, child); |
| 1623 | else if (of_node_cmp(child->name, "8250") == 0) | ||
| 1624 | ret = gpmc_probe_8250(pdev, child); | ||
| 1625 | 1605 | ||
| 1626 | if (WARN(ret < 0, "%s: probing gpmc child %s failed\n", | 1606 | if (WARN(ret < 0, "%s: probing gpmc child %s failed\n", |
| 1627 | __func__, child->full_name)) | 1607 | __func__, child->full_name)) |
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h index 8cc7d331437d..3e97c6c8ecf1 100644 --- a/arch/arm/mach-omap2/omap-secure.h +++ b/arch/arm/mach-omap2/omap-secure.h | |||
| @@ -76,6 +76,13 @@ static inline void omap_barrier_reserve_memblock(void) | |||
| 76 | { } | 76 | { } |
| 77 | #endif | 77 | #endif |
| 78 | 78 | ||
| 79 | #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER | ||
| 79 | void set_cntfreq(void); | 80 | void set_cntfreq(void); |
| 81 | #else | ||
| 82 | static inline void set_cntfreq(void) | ||
| 83 | { | ||
| 84 | } | ||
| 85 | #endif | ||
| 86 | |||
| 80 | #endif /* __ASSEMBLER__ */ | 87 | #endif /* __ASSEMBLER__ */ |
| 81 | #endif /* OMAP_ARCH_OMAP_SECURE_H */ | 88 | #endif /* OMAP_ARCH_OMAP_SECURE_H */ |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 57911430324e..b39efd46abf9 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
| @@ -35,7 +35,6 @@ | |||
| 35 | #include "iomap.h" | 35 | #include "iomap.h" |
| 36 | #include "common.h" | 36 | #include "common.h" |
| 37 | #include "mmc.h" | 37 | #include "mmc.h" |
| 38 | #include "hsmmc.h" | ||
| 39 | #include "prminst44xx.h" | 38 | #include "prminst44xx.h" |
| 40 | #include "prcm_mpu44xx.h" | 39 | #include "prcm_mpu44xx.h" |
| 41 | #include "omap4-sar-layout.h" | 40 | #include "omap4-sar-layout.h" |
| @@ -284,59 +283,3 @@ skip_errata_init: | |||
| 284 | omap_wakeupgen_init(); | 283 | omap_wakeupgen_init(); |
| 285 | irqchip_init(); | 284 | irqchip_init(); |
| 286 | } | 285 | } |
| 287 | |||
| 288 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
| 289 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | ||
| 290 | { | ||
| 291 | int irq = 0; | ||
| 292 | struct platform_device *pdev = container_of(dev, | ||
| 293 | struct platform_device, dev); | ||
| 294 | struct omap_mmc_platform_data *pdata = dev->platform_data; | ||
| 295 | |||
| 296 | /* Setting MMC1 Card detect Irq */ | ||
| 297 | if (pdev->id == 0) { | ||
| 298 | irq = twl6030_mmc_card_detect_config(); | ||
| 299 | if (irq < 0) { | ||
| 300 | dev_err(dev, "%s: Error card detect config(%d)\n", | ||
| 301 | __func__, irq); | ||
| 302 | return irq; | ||
| 303 | } | ||
| 304 | pdata->slots[0].card_detect_irq = irq; | ||
| 305 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; | ||
| 306 | } | ||
| 307 | return 0; | ||
| 308 | } | ||
| 309 | |||
| 310 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | ||
| 311 | { | ||
| 312 | struct omap_mmc_platform_data *pdata; | ||
| 313 | |||
| 314 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ | ||
| 315 | if (!dev) { | ||
| 316 | pr_err("Failed %s\n", __func__); | ||
| 317 | return; | ||
| 318 | } | ||
| 319 | pdata = dev->platform_data; | ||
| 320 | pdata->init = omap4_twl6030_hsmmc_late_init; | ||
| 321 | } | ||
| 322 | |||
| 323 | int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) | ||
| 324 | { | ||
| 325 | struct omap2_hsmmc_info *c; | ||
| 326 | |||
| 327 | omap_hsmmc_init(controllers); | ||
| 328 | for (c = controllers; c->mmc; c++) { | ||
| 329 | /* pdev can be null if CONFIG_MMC_OMAP_HS is not set */ | ||
| 330 | if (!c->pdev) | ||
| 331 | continue; | ||
| 332 | omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev); | ||
| 333 | } | ||
| 334 | |||
| 335 | return 0; | ||
| 336 | } | ||
| 337 | #else | ||
| 338 | int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) | ||
| 339 | { | ||
| 340 | return 0; | ||
| 341 | } | ||
| 342 | #endif | ||
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 53f0735817bb..e0a398cf28d8 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -183,6 +183,10 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
| 183 | odbfd_exit1: | 183 | odbfd_exit1: |
| 184 | kfree(hwmods); | 184 | kfree(hwmods); |
| 185 | odbfd_exit: | 185 | odbfd_exit: |
| 186 | /* if data/we are at fault.. load up a fail handler */ | ||
| 187 | if (ret) | ||
| 188 | pdev->dev.pm_domain = &omap_device_fail_pm_domain; | ||
| 189 | |||
| 186 | return ret; | 190 | return ret; |
| 187 | } | 191 | } |
| 188 | 192 | ||
| @@ -604,6 +608,19 @@ static int _od_runtime_resume(struct device *dev) | |||
| 604 | 608 | ||
| 605 | return pm_generic_runtime_resume(dev); | 609 | return pm_generic_runtime_resume(dev); |
| 606 | } | 610 | } |
| 611 | |||
| 612 | static int _od_fail_runtime_suspend(struct device *dev) | ||
| 613 | { | ||
| 614 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
| 615 | return -ENODEV; | ||
| 616 | } | ||
| 617 | |||
| 618 | static int _od_fail_runtime_resume(struct device *dev) | ||
| 619 | { | ||
| 620 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
| 621 | return -ENODEV; | ||
| 622 | } | ||
| 623 | |||
| 607 | #endif | 624 | #endif |
| 608 | 625 | ||
| 609 | #ifdef CONFIG_SUSPEND | 626 | #ifdef CONFIG_SUSPEND |
| @@ -657,6 +674,13 @@ static int _od_resume_noirq(struct device *dev) | |||
| 657 | #define _od_resume_noirq NULL | 674 | #define _od_resume_noirq NULL |
| 658 | #endif | 675 | #endif |
| 659 | 676 | ||
| 677 | struct dev_pm_domain omap_device_fail_pm_domain = { | ||
| 678 | .ops = { | ||
| 679 | SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend, | ||
| 680 | _od_fail_runtime_resume, NULL) | ||
| 681 | } | ||
| 682 | }; | ||
| 683 | |||
| 660 | struct dev_pm_domain omap_device_pm_domain = { | 684 | struct dev_pm_domain omap_device_pm_domain = { |
| 661 | .ops = { | 685 | .ops = { |
| 662 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 686 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h index 17ca1aec2710..78c02b355179 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include "omap_hwmod.h" | 29 | #include "omap_hwmod.h" |
| 30 | 30 | ||
| 31 | extern struct dev_pm_domain omap_device_pm_domain; | 31 | extern struct dev_pm_domain omap_device_pm_domain; |
| 32 | extern struct dev_pm_domain omap_device_fail_pm_domain; | ||
| 32 | 33 | ||
| 33 | /* omap_device._state values */ | 34 | /* omap_device._state values */ |
| 34 | #define OMAP_DEVICE_STATE_UNKNOWN 0 | 35 | #define OMAP_DEVICE_STATE_UNKNOWN 0 |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e3f0ecaf87dd..8a1b5e0bad40 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -399,7 +399,7 @@ static int _set_clockactivity(struct omap_hwmod *oh, u8 clockact, u32 *v) | |||
| 399 | } | 399 | } |
| 400 | 400 | ||
| 401 | /** | 401 | /** |
| 402 | * _set_softreset: set OCP_SYSCONFIG.CLOCKACTIVITY bits in @v | 402 | * _set_softreset: set OCP_SYSCONFIG.SOFTRESET bit in @v |
| 403 | * @oh: struct omap_hwmod * | 403 | * @oh: struct omap_hwmod * |
| 404 | * @v: pointer to register contents to modify | 404 | * @v: pointer to register contents to modify |
| 405 | * | 405 | * |
| @@ -427,6 +427,36 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) | |||
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | /** | 429 | /** |
| 430 | * _clear_softreset: clear OCP_SYSCONFIG.SOFTRESET bit in @v | ||
| 431 | * @oh: struct omap_hwmod * | ||
| 432 | * @v: pointer to register contents to modify | ||
| 433 | * | ||
| 434 | * Clear the SOFTRESET bit in @v for hwmod @oh. Returns -EINVAL upon | ||
| 435 | * error or 0 upon success. | ||
| 436 | */ | ||
| 437 | static int _clear_softreset(struct omap_hwmod *oh, u32 *v) | ||
| 438 | { | ||
| 439 | u32 softrst_mask; | ||
| 440 | |||
| 441 | if (!oh->class->sysc || | ||
| 442 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) | ||
| 443 | return -EINVAL; | ||
| 444 | |||
| 445 | if (!oh->class->sysc->sysc_fields) { | ||
| 446 | WARN(1, | ||
| 447 | "omap_hwmod: %s: sysc_fields absent for sysconfig class\n", | ||
| 448 | oh->name); | ||
| 449 | return -EINVAL; | ||
| 450 | } | ||
| 451 | |||
| 452 | softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); | ||
| 453 | |||
| 454 | *v &= ~softrst_mask; | ||
| 455 | |||
| 456 | return 0; | ||
| 457 | } | ||
| 458 | |||
| 459 | /** | ||
| 430 | * _wait_softreset_complete - wait for an OCP softreset to complete | 460 | * _wait_softreset_complete - wait for an OCP softreset to complete |
| 431 | * @oh: struct omap_hwmod * to wait on | 461 | * @oh: struct omap_hwmod * to wait on |
| 432 | * | 462 | * |
| @@ -785,6 +815,7 @@ static int _init_interface_clks(struct omap_hwmod *oh) | |||
| 785 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", | 815 | pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", |
| 786 | oh->name, os->clk); | 816 | oh->name, os->clk); |
| 787 | ret = -EINVAL; | 817 | ret = -EINVAL; |
| 818 | continue; | ||
| 788 | } | 819 | } |
| 789 | os->_clk = c; | 820 | os->_clk = c; |
| 790 | /* | 821 | /* |
| @@ -821,6 +852,7 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
| 821 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", | 852 | pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", |
| 822 | oh->name, oc->clk); | 853 | oh->name, oc->clk); |
| 823 | ret = -EINVAL; | 854 | ret = -EINVAL; |
| 855 | continue; | ||
| 824 | } | 856 | } |
| 825 | oc->_clk = c; | 857 | oc->_clk = c; |
| 826 | /* | 858 | /* |
| @@ -1911,6 +1943,12 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
| 1911 | ret = _set_softreset(oh, &v); | 1943 | ret = _set_softreset(oh, &v); |
| 1912 | if (ret) | 1944 | if (ret) |
| 1913 | goto dis_opt_clks; | 1945 | goto dis_opt_clks; |
| 1946 | |||
| 1947 | _write_sysconfig(v, oh); | ||
| 1948 | ret = _clear_softreset(oh, &v); | ||
| 1949 | if (ret) | ||
| 1950 | goto dis_opt_clks; | ||
| 1951 | |||
| 1914 | _write_sysconfig(v, oh); | 1952 | _write_sysconfig(v, oh); |
| 1915 | 1953 | ||
| 1916 | if (oh->class->sysc->srst_udelay) | 1954 | if (oh->class->sysc->srst_udelay) |
| @@ -2326,38 +2364,80 @@ static int _shutdown(struct omap_hwmod *oh) | |||
| 2326 | return 0; | 2364 | return 0; |
| 2327 | } | 2365 | } |
| 2328 | 2366 | ||
| 2367 | static int of_dev_find_hwmod(struct device_node *np, | ||
| 2368 | struct omap_hwmod *oh) | ||
| 2369 | { | ||
| 2370 | int count, i, res; | ||
| 2371 | const char *p; | ||
| 2372 | |||
| 2373 | count = of_property_count_strings(np, "ti,hwmods"); | ||
| 2374 | if (count < 1) | ||
| 2375 | return -ENODEV; | ||
| 2376 | |||
| 2377 | for (i = 0; i < count; i++) { | ||
| 2378 | res = of_property_read_string_index(np, "ti,hwmods", | ||
| 2379 | i, &p); | ||
| 2380 | if (res) | ||
| 2381 | continue; | ||
| 2382 | if (!strcmp(p, oh->name)) { | ||
| 2383 | pr_debug("omap_hwmod: dt %s[%i] uses hwmod %s\n", | ||
| 2384 | np->name, i, oh->name); | ||
| 2385 | return i; | ||
| 2386 | } | ||
| 2387 | } | ||
| 2388 | |||
| 2389 | return -ENODEV; | ||
| 2390 | } | ||
| 2391 | |||
| 2329 | /** | 2392 | /** |
| 2330 | * of_dev_hwmod_lookup - look up needed hwmod from dt blob | 2393 | * of_dev_hwmod_lookup - look up needed hwmod from dt blob |
| 2331 | * @np: struct device_node * | 2394 | * @np: struct device_node * |
| 2332 | * @oh: struct omap_hwmod * | 2395 | * @oh: struct omap_hwmod * |
| 2396 | * @index: index of the entry found | ||
| 2397 | * @found: struct device_node * found or NULL | ||
| 2333 | * | 2398 | * |
| 2334 | * Parse the dt blob and find out needed hwmod. Recursive function is | 2399 | * Parse the dt blob and find out needed hwmod. Recursive function is |
| 2335 | * implemented to take care hierarchical dt blob parsing. | 2400 | * implemented to take care hierarchical dt blob parsing. |
| 2336 | * Return: The device node on success or NULL on failure. | 2401 | * Return: Returns 0 on success, -ENODEV when not found. |
| 2337 | */ | 2402 | */ |
| 2338 | static struct device_node *of_dev_hwmod_lookup(struct device_node *np, | 2403 | static int of_dev_hwmod_lookup(struct device_node *np, |
| 2339 | struct omap_hwmod *oh) | 2404 | struct omap_hwmod *oh, |
| 2405 | int *index, | ||
| 2406 | struct device_node **found) | ||
| 2340 | { | 2407 | { |
| 2341 | struct device_node *np0 = NULL, *np1 = NULL; | 2408 | struct device_node *np0 = NULL; |
| 2342 | const char *p; | 2409 | int res; |
| 2410 | |||
| 2411 | res = of_dev_find_hwmod(np, oh); | ||
| 2412 | if (res >= 0) { | ||
| 2413 | *found = np; | ||
| 2414 | *index = res; | ||
| 2415 | return 0; | ||
| 2416 | } | ||
| 2343 | 2417 | ||
| 2344 | for_each_child_of_node(np, np0) { | 2418 | for_each_child_of_node(np, np0) { |
| 2345 | if (of_find_property(np0, "ti,hwmods", NULL)) { | 2419 | struct device_node *fc; |
| 2346 | p = of_get_property(np0, "ti,hwmods", NULL); | 2420 | int i; |
| 2347 | if (!strcmp(p, oh->name)) | 2421 | |
| 2348 | return np0; | 2422 | res = of_dev_hwmod_lookup(np0, oh, &i, &fc); |
| 2349 | np1 = of_dev_hwmod_lookup(np0, oh); | 2423 | if (res == 0) { |
| 2350 | if (np1) | 2424 | *found = fc; |
| 2351 | return np1; | 2425 | *index = i; |
| 2426 | return 0; | ||
| 2352 | } | 2427 | } |
| 2353 | } | 2428 | } |
| 2354 | return NULL; | 2429 | |
| 2430 | *found = NULL; | ||
| 2431 | *index = 0; | ||
| 2432 | |||
| 2433 | return -ENODEV; | ||
| 2355 | } | 2434 | } |
| 2356 | 2435 | ||
| 2357 | /** | 2436 | /** |
| 2358 | * _init_mpu_rt_base - populate the virtual address for a hwmod | 2437 | * _init_mpu_rt_base - populate the virtual address for a hwmod |
| 2359 | * @oh: struct omap_hwmod * to locate the virtual address | 2438 | * @oh: struct omap_hwmod * to locate the virtual address |
| 2360 | * @data: (unused, caller should pass NULL) | 2439 | * @data: (unused, caller should pass NULL) |
| 2440 | * @index: index of the reg entry iospace in device tree | ||
| 2361 | * @np: struct device_node * of the IP block's device node in the DT data | 2441 | * @np: struct device_node * of the IP block's device node in the DT data |
| 2362 | * | 2442 | * |
| 2363 | * Cache the virtual address used by the MPU to access this IP block's | 2443 | * Cache the virtual address used by the MPU to access this IP block's |
| @@ -2368,7 +2448,7 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np, | |||
| 2368 | * -ENXIO on absent or invalid register target address space. | 2448 | * -ENXIO on absent or invalid register target address space. |
| 2369 | */ | 2449 | */ |
| 2370 | static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | 2450 | static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, |
| 2371 | struct device_node *np) | 2451 | int index, struct device_node *np) |
| 2372 | { | 2452 | { |
| 2373 | struct omap_hwmod_addr_space *mem; | 2453 | struct omap_hwmod_addr_space *mem; |
| 2374 | void __iomem *va_start = NULL; | 2454 | void __iomem *va_start = NULL; |
| @@ -2390,13 +2470,17 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | |||
| 2390 | if (!np) | 2470 | if (!np) |
| 2391 | return -ENXIO; | 2471 | return -ENXIO; |
| 2392 | 2472 | ||
| 2393 | va_start = of_iomap(np, oh->mpu_rt_idx); | 2473 | va_start = of_iomap(np, index + oh->mpu_rt_idx); |
| 2394 | } else { | 2474 | } else { |
| 2395 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | 2475 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); |
| 2396 | } | 2476 | } |
| 2397 | 2477 | ||
| 2398 | if (!va_start) { | 2478 | if (!va_start) { |
| 2399 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | 2479 | if (mem) |
| 2480 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | ||
| 2481 | else | ||
| 2482 | pr_err("omap_hwmod: %s: Missing dt reg%i for %s\n", | ||
| 2483 | oh->name, index, np->full_name); | ||
| 2400 | return -ENXIO; | 2484 | return -ENXIO; |
| 2401 | } | 2485 | } |
| 2402 | 2486 | ||
| @@ -2422,17 +2506,29 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, | |||
| 2422 | */ | 2506 | */ |
| 2423 | static int __init _init(struct omap_hwmod *oh, void *data) | 2507 | static int __init _init(struct omap_hwmod *oh, void *data) |
| 2424 | { | 2508 | { |
| 2425 | int r; | 2509 | int r, index; |
| 2426 | struct device_node *np = NULL; | 2510 | struct device_node *np = NULL; |
| 2427 | 2511 | ||
| 2428 | if (oh->_state != _HWMOD_STATE_REGISTERED) | 2512 | if (oh->_state != _HWMOD_STATE_REGISTERED) |
| 2429 | return 0; | 2513 | return 0; |
| 2430 | 2514 | ||
| 2431 | if (of_have_populated_dt()) | 2515 | if (of_have_populated_dt()) { |
| 2432 | np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); | 2516 | struct device_node *bus; |
| 2517 | |||
| 2518 | bus = of_find_node_by_name(NULL, "ocp"); | ||
| 2519 | if (!bus) | ||
| 2520 | return -ENODEV; | ||
| 2521 | |||
| 2522 | r = of_dev_hwmod_lookup(bus, oh, &index, &np); | ||
| 2523 | if (r) | ||
| 2524 | pr_debug("omap_hwmod: %s missing dt data\n", oh->name); | ||
| 2525 | else if (np && index) | ||
| 2526 | pr_warn("omap_hwmod: %s using broken dt data from %s\n", | ||
| 2527 | oh->name, np->name); | ||
| 2528 | } | ||
| 2433 | 2529 | ||
| 2434 | if (oh->class->sysc) { | 2530 | if (oh->class->sysc) { |
| 2435 | r = _init_mpu_rt_base(oh, NULL, np); | 2531 | r = _init_mpu_rt_base(oh, NULL, index, np); |
| 2436 | if (r < 0) { | 2532 | if (r < 0) { |
| 2437 | WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", | 2533 | WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", |
| 2438 | oh->name); | 2534 | oh->name); |
| @@ -3169,6 +3265,11 @@ int omap_hwmod_softreset(struct omap_hwmod *oh) | |||
| 3169 | goto error; | 3265 | goto error; |
| 3170 | _write_sysconfig(v, oh); | 3266 | _write_sysconfig(v, oh); |
| 3171 | 3267 | ||
| 3268 | ret = _clear_softreset(oh, &v); | ||
| 3269 | if (ret) | ||
| 3270 | goto error; | ||
| 3271 | _write_sysconfig(v, oh); | ||
| 3272 | |||
| 3172 | error: | 3273 | error: |
| 3173 | return ret; | 3274 | return ret; |
| 3174 | } | 3275 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 9e56fabd7fa3..d33742908f97 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -1943,7 +1943,8 @@ static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { | |||
| 1943 | .syss_offs = 0x0014, | 1943 | .syss_offs = 0x0014, |
| 1944 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | 1944 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 1945 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | | 1945 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
| 1946 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | 1946 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 1947 | SYSS_HAS_RESET_STATUS), | ||
| 1947 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 1948 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1948 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | 1949 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1949 | .sysc_fields = &omap_hwmod_sysc_type1, | 1950 | .sysc_fields = &omap_hwmod_sysc_type1, |
| @@ -2021,15 +2022,7 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { | |||
| 2021 | * hence HWMOD_SWSUP_MSTANDBY | 2022 | * hence HWMOD_SWSUP_MSTANDBY |
| 2022 | */ | 2023 | */ |
| 2023 | 2024 | ||
| 2024 | /* | 2025 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
| 2025 | * During system boot; If the hwmod framework resets the module | ||
| 2026 | * the module will have smart idle settings; which can lead to deadlock | ||
| 2027 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
| 2028 | * Use HWMOD_INIT_NO_RESET. | ||
| 2029 | */ | ||
| 2030 | |||
| 2031 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
| 2032 | HWMOD_INIT_NO_RESET, | ||
| 2033 | }; | 2026 | }; |
| 2034 | 2027 | ||
| 2035 | /* | 2028 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 1e5b12cb8246..3318cae96e7d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
| @@ -2937,7 +2937,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { | |||
| 2937 | .sysc_offs = 0x0010, | 2937 | .sysc_offs = 0x0010, |
| 2938 | .syss_offs = 0x0014, | 2938 | .syss_offs = 0x0014, |
| 2939 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | 2939 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | |
| 2940 | SYSC_HAS_SOFTRESET), | 2940 | SYSC_HAS_SOFTRESET | SYSC_HAS_RESET_STATUS), |
| 2941 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 2941 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 2942 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 2942 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
| 2943 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | 2943 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
| @@ -3001,15 +3001,7 @@ static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { | |||
| 3001 | * hence HWMOD_SWSUP_MSTANDBY | 3001 | * hence HWMOD_SWSUP_MSTANDBY |
| 3002 | */ | 3002 | */ |
| 3003 | 3003 | ||
| 3004 | /* | 3004 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
| 3005 | * During system boot; If the hwmod framework resets the module | ||
| 3006 | * the module will have smart idle settings; which can lead to deadlock | ||
| 3007 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
| 3008 | * Use HWMOD_INIT_NO_RESET. | ||
| 3009 | */ | ||
| 3010 | |||
| 3011 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
| 3012 | HWMOD_INIT_NO_RESET, | ||
| 3013 | }; | 3005 | }; |
| 3014 | 3006 | ||
| 3015 | /* | 3007 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index 9e08d6994a0b..e297d6231c3a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c | |||
| @@ -1544,7 +1544,8 @@ static struct omap_hwmod_class_sysconfig omap54xx_usb_host_hs_sysc = { | |||
| 1544 | .rev_offs = 0x0000, | 1544 | .rev_offs = 0x0000, |
| 1545 | .sysc_offs = 0x0010, | 1545 | .sysc_offs = 0x0010, |
| 1546 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | | 1546 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | |
| 1547 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | 1547 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 1548 | SYSC_HAS_RESET_STATUS), | ||
| 1548 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 1549 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1549 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 1550 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
| 1550 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | 1551 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
| @@ -1598,15 +1599,7 @@ static struct omap_hwmod omap54xx_usb_host_hs_hwmod = { | |||
| 1598 | * hence HWMOD_SWSUP_MSTANDBY | 1599 | * hence HWMOD_SWSUP_MSTANDBY |
| 1599 | */ | 1600 | */ |
| 1600 | 1601 | ||
| 1601 | /* | 1602 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
| 1602 | * During system boot; If the hwmod framework resets the module | ||
| 1603 | * the module will have smart idle settings; which can lead to deadlock | ||
| 1604 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
| 1605 | * Use HWMOD_INIT_NO_RESET. | ||
| 1606 | */ | ||
| 1607 | |||
| 1608 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
| 1609 | HWMOD_INIT_NO_RESET, | ||
| 1610 | .main_clk = "l3init_60m_fclk", | 1603 | .main_clk = "l3init_60m_fclk", |
| 1611 | .prcm = { | 1604 | .prcm = { |
| 1612 | .omap4 = { | 1605 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 10c71450cf63..39f020c982e8 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
| @@ -139,6 +139,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | |||
| 139 | 139 | ||
| 140 | static struct pdata_init pdata_quirks[] __initdata = { | 140 | static struct pdata_init pdata_quirks[] __initdata = { |
| 141 | #ifdef CONFIG_ARCH_OMAP3 | 141 | #ifdef CONFIG_ARCH_OMAP3 |
| 142 | { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, | ||
| 142 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, | 143 | { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, |
| 143 | { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, | 144 | { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, |
| 144 | { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, | 145 | { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 93b80e5da8d4..1f3770a8a728 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
| @@ -120,7 +120,7 @@ static void omap3_save_secure_ram_context(void) | |||
| 120 | * will hang the system. | 120 | * will hang the system. |
| 121 | */ | 121 | */ |
| 122 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 122 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
| 123 | ret = _omap_save_secure_sram((u32 *) | 123 | ret = _omap_save_secure_sram((u32 *)(unsigned long) |
| 124 | __pa(omap3_secure_ram_storage)); | 124 | __pa(omap3_secure_ram_storage)); |
| 125 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); | 125 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); |
| 126 | /* Following is for error tracking, it should not happen */ | 126 | /* Following is for error tracking, it should not happen */ |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index e233dfcbc186..93a2a6e4260f 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
| @@ -128,7 +128,8 @@ skip_voltdm: | |||
| 128 | for (i = 0; i < pwrdm->banks; i++) | 128 | for (i = 0; i < pwrdm->banks; i++) |
| 129 | pwrdm->ret_mem_off_counter[i] = 0; | 129 | pwrdm->ret_mem_off_counter[i] = 0; |
| 130 | 130 | ||
| 131 | arch_pwrdm->pwrdm_wait_transition(pwrdm); | 131 | if (arch_pwrdm && arch_pwrdm->pwrdm_wait_transition) |
| 132 | arch_pwrdm->pwrdm_wait_transition(pwrdm); | ||
| 132 | pwrdm->state = pwrdm_read_pwrst(pwrdm); | 133 | pwrdm->state = pwrdm_read_pwrst(pwrdm); |
| 133 | pwrdm->state_counter[pwrdm->state] = 1; | 134 | pwrdm->state_counter[pwrdm->state] = 1; |
| 134 | 135 | ||
diff --git a/arch/arm/mach-omap2/prm44xx_54xx.h b/arch/arm/mach-omap2/prm44xx_54xx.h index 7a976065e138..8d95aa543ef5 100644 --- a/arch/arm/mach-omap2/prm44xx_54xx.h +++ b/arch/arm/mach-omap2/prm44xx_54xx.h | |||
| @@ -43,7 +43,7 @@ extern void omap4_prm_vcvp_write(u32 val, u8 offset); | |||
| 43 | extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); | 43 | extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); |
| 44 | 44 | ||
| 45 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ | 45 | #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ |
| 46 | defined(CONFIG_SOC_DRA7XX) | 46 | defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX) |
| 47 | void omap44xx_prm_reconfigure_io_chain(void); | 47 | void omap44xx_prm_reconfigure_io_chain(void); |
| 48 | #else | 48 | #else |
| 49 | static inline void omap44xx_prm_reconfigure_io_chain(void) | 49 | static inline void omap44xx_prm_reconfigure_io_chain(void) |
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 0d5dd646f61f..263b15249b5b 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #include <mach/regs-ost.h> | 14 | #include <mach/regs-ost.h> |
| 15 | #include <mach/reset.h> | 15 | #include <mach/reset.h> |
| 16 | #include <mach/smemc.h> | ||
| 16 | 17 | ||
| 17 | unsigned int reset_status; | 18 | unsigned int reset_status; |
| 18 | EXPORT_SYMBOL(reset_status); | 19 | EXPORT_SYMBOL(reset_status); |
| @@ -81,6 +82,12 @@ static void do_hw_reset(void) | |||
| 81 | writel_relaxed(OSSR_M3, OSSR); | 82 | writel_relaxed(OSSR_M3, OSSR); |
| 82 | /* ... in 100 ms */ | 83 | /* ... in 100 ms */ |
| 83 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); | 84 | writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); |
| 85 | /* | ||
| 86 | * SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71) | ||
| 87 | * we put SDRAM into self-refresh to prevent that | ||
| 88 | */ | ||
| 89 | while (1) | ||
| 90 | writel_relaxed(MDREFR_SLFRSH, MDREFR); | ||
| 84 | } | 91 | } |
| 85 | 92 | ||
| 86 | void pxa_restart(enum reboot_mode mode, const char *cmd) | 93 | void pxa_restart(enum reboot_mode mode, const char *cmd) |
| @@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd) | |||
| 104 | break; | 111 | break; |
| 105 | } | 112 | } |
| 106 | } | 113 | } |
| 107 | |||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 0206b915a6f6..ef5557b807ed 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
| @@ -425,57 +425,57 @@ static struct platform_device tosa_power_device = { | |||
| 425 | * Tosa Keyboard | 425 | * Tosa Keyboard |
| 426 | */ | 426 | */ |
| 427 | static const uint32_t tosakbd_keymap[] = { | 427 | static const uint32_t tosakbd_keymap[] = { |
| 428 | KEY(0, 2, KEY_W), | 428 | KEY(0, 1, KEY_W), |
| 429 | KEY(0, 6, KEY_K), | 429 | KEY(0, 5, KEY_K), |
| 430 | KEY(0, 7, KEY_BACKSPACE), | 430 | KEY(0, 6, KEY_BACKSPACE), |
| 431 | KEY(0, 8, KEY_P), | 431 | KEY(0, 7, KEY_P), |
| 432 | KEY(1, 1, KEY_Q), | 432 | KEY(1, 0, KEY_Q), |
| 433 | KEY(1, 2, KEY_E), | 433 | KEY(1, 1, KEY_E), |
| 434 | KEY(1, 3, KEY_T), | 434 | KEY(1, 2, KEY_T), |
| 435 | KEY(1, 4, KEY_Y), | 435 | KEY(1, 3, KEY_Y), |
| 436 | KEY(1, 6, KEY_O), | 436 | KEY(1, 5, KEY_O), |
| 437 | KEY(1, 7, KEY_I), | 437 | KEY(1, 6, KEY_I), |
| 438 | KEY(1, 8, KEY_COMMA), | 438 | KEY(1, 7, KEY_COMMA), |
| 439 | KEY(2, 1, KEY_A), | 439 | KEY(2, 0, KEY_A), |
| 440 | KEY(2, 2, KEY_D), | 440 | KEY(2, 1, KEY_D), |
| 441 | KEY(2, 3, KEY_G), | 441 | KEY(2, 2, KEY_G), |
| 442 | KEY(2, 4, KEY_U), | 442 | KEY(2, 3, KEY_U), |
| 443 | KEY(2, 6, KEY_L), | 443 | KEY(2, 5, KEY_L), |
| 444 | KEY(2, 7, KEY_ENTER), | 444 | KEY(2, 6, KEY_ENTER), |
| 445 | KEY(2, 8, KEY_DOT), | 445 | KEY(2, 7, KEY_DOT), |
| 446 | KEY(3, 1, KEY_Z), | 446 | KEY(3, 0, KEY_Z), |
| 447 | KEY(3, 2, KEY_C), | 447 | KEY(3, 1, KEY_C), |
| 448 | KEY(3, 3, KEY_V), | 448 | KEY(3, 2, KEY_V), |
| 449 | KEY(3, 4, KEY_J), | 449 | KEY(3, 3, KEY_J), |
| 450 | KEY(3, 5, TOSA_KEY_ADDRESSBOOK), | 450 | KEY(3, 4, TOSA_KEY_ADDRESSBOOK), |
| 451 | KEY(3, 6, TOSA_KEY_CANCEL), | 451 | KEY(3, 5, TOSA_KEY_CANCEL), |
| 452 | KEY(3, 7, TOSA_KEY_CENTER), | 452 | KEY(3, 6, TOSA_KEY_CENTER), |
| 453 | KEY(3, 8, TOSA_KEY_OK), | 453 | KEY(3, 7, TOSA_KEY_OK), |
| 454 | KEY(3, 9, KEY_LEFTSHIFT), | 454 | KEY(3, 8, KEY_LEFTSHIFT), |
| 455 | KEY(4, 1, KEY_S), | 455 | KEY(4, 0, KEY_S), |
| 456 | KEY(4, 2, KEY_R), | 456 | KEY(4, 1, KEY_R), |
| 457 | KEY(4, 3, KEY_B), | 457 | KEY(4, 2, KEY_B), |
| 458 | KEY(4, 4, KEY_N), | 458 | KEY(4, 3, KEY_N), |
| 459 | KEY(4, 5, TOSA_KEY_CALENDAR), | 459 | KEY(4, 4, TOSA_KEY_CALENDAR), |
| 460 | KEY(4, 6, TOSA_KEY_HOMEPAGE), | 460 | KEY(4, 5, TOSA_KEY_HOMEPAGE), |
| 461 | KEY(4, 7, KEY_LEFTCTRL), | 461 | KEY(4, 6, KEY_LEFTCTRL), |
| 462 | KEY(4, 8, TOSA_KEY_LIGHT), | 462 | KEY(4, 7, TOSA_KEY_LIGHT), |
| 463 | KEY(4, 10, KEY_RIGHTSHIFT), | 463 | KEY(4, 9, KEY_RIGHTSHIFT), |
| 464 | KEY(5, 1, KEY_TAB), | 464 | KEY(5, 0, KEY_TAB), |
| 465 | KEY(5, 2, KEY_SLASH), | 465 | KEY(5, 1, KEY_SLASH), |
| 466 | KEY(5, 3, KEY_H), | 466 | KEY(5, 2, KEY_H), |
| 467 | KEY(5, 4, KEY_M), | 467 | KEY(5, 3, KEY_M), |
| 468 | KEY(5, 5, TOSA_KEY_MENU), | 468 | KEY(5, 4, TOSA_KEY_MENU), |
| 469 | KEY(5, 7, KEY_UP), | 469 | KEY(5, 6, KEY_UP), |
| 470 | KEY(5, 11, TOSA_KEY_FN), | 470 | KEY(5, 10, TOSA_KEY_FN), |
| 471 | KEY(6, 1, KEY_X), | 471 | KEY(6, 0, KEY_X), |
| 472 | KEY(6, 2, KEY_F), | 472 | KEY(6, 1, KEY_F), |
| 473 | KEY(6, 3, KEY_SPACE), | 473 | KEY(6, 2, KEY_SPACE), |
| 474 | KEY(6, 4, KEY_APOSTROPHE), | 474 | KEY(6, 3, KEY_APOSTROPHE), |
| 475 | KEY(6, 5, TOSA_KEY_MAIL), | 475 | KEY(6, 4, TOSA_KEY_MAIL), |
| 476 | KEY(6, 6, KEY_LEFT), | 476 | KEY(6, 5, KEY_LEFT), |
| 477 | KEY(6, 7, KEY_DOWN), | 477 | KEY(6, 6, KEY_DOWN), |
| 478 | KEY(6, 8, KEY_RIGHT), | 478 | KEY(6, 7, KEY_RIGHT), |
| 479 | }; | 479 | }; |
| 480 | 480 | ||
| 481 | static struct matrix_keymap_data tosakbd_keymap_data = { | 481 | static struct matrix_keymap_data tosakbd_keymap_data = { |
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index 037100a1563a..aee77f06f887 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig | |||
| @@ -10,6 +10,7 @@ config ARCH_SOCFPGA | |||
| 10 | select GENERIC_CLOCKEVENTS | 10 | select GENERIC_CLOCKEVENTS |
| 11 | select GPIO_PL061 if GPIOLIB | 11 | select GPIO_PL061 if GPIOLIB |
| 12 | select HAVE_ARM_SCU | 12 | select HAVE_ARM_SCU |
| 13 | select HAVE_ARM_TWD if SMP | ||
| 13 | select HAVE_SMP | 14 | select HAVE_SMP |
| 14 | select MFD_SYSCON | 15 | select MFD_SYSCON |
| 15 | select SPARSE_IRQ | 16 | select SPARSE_IRQ |
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index d4639c506622..3a9c1f1c219d 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c | |||
| @@ -198,10 +198,12 @@ void __init tegra_init_fuse(void) | |||
| 198 | switch (tegra_chip_id) { | 198 | switch (tegra_chip_id) { |
| 199 | case TEGRA20: | 199 | case TEGRA20: |
| 200 | tegra20_fuse_init_randomness(); | 200 | tegra20_fuse_init_randomness(); |
| 201 | break; | ||
| 201 | case TEGRA30: | 202 | case TEGRA30: |
| 202 | case TEGRA114: | 203 | case TEGRA114: |
| 203 | default: | 204 | default: |
| 204 | tegra30_fuse_init_randomness(); | 205 | tegra30_fuse_init_randomness(); |
| 206 | break; | ||
| 205 | } | 207 | } |
| 206 | 208 | ||
| 207 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", | 209 | pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n", |
| @@ -209,13 +211,3 @@ void __init tegra_init_fuse(void) | |||
| 209 | tegra_sku_id, tegra_cpu_process_id, | 211 | tegra_sku_id, tegra_cpu_process_id, |
| 210 | tegra_core_process_id); | 212 | tegra_core_process_id); |
| 211 | } | 213 | } |
| 212 | |||
| 213 | unsigned long long tegra_chip_uid(void) | ||
| 214 | { | ||
| 215 | unsigned long long lo, hi; | ||
| 216 | |||
| 217 | lo = tegra_fuse_readl(FUSE_UID_LOW); | ||
| 218 | hi = tegra_fuse_readl(FUSE_UID_HIGH); | ||
| 219 | return (hi << 32ull) | lo; | ||
| 220 | } | ||
| 221 | EXPORT_SYMBOL(tegra_chip_uid); | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 2e85c1e72535..12c7e5c03ea4 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -140,6 +140,10 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
| 140 | /* Requires call-back bindings. */ | 140 | /* Requires call-back bindings. */ |
| 141 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), | 141 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), |
| 142 | /* Requires DMA bindings. */ | 142 | /* Requires DMA bindings. */ |
| 143 | OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), | ||
| 144 | OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), | ||
| 145 | OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), | ||
| 146 | OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), | ||
| 143 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, | 147 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, |
| 144 | "ux500-msp-i2s.0", &msp0_platform_data), | 148 | "ux500-msp-i2s.0", &msp0_platform_data), |
| 145 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, | 149 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, |
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 033d34dcbd3f..c26ef5b92ca7 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c | |||
| @@ -53,6 +53,11 @@ | |||
| 53 | #define A15_BX_ADDR0 0x68 | 53 | #define A15_BX_ADDR0 0x68 |
| 54 | #define A7_BX_ADDR0 0x78 | 54 | #define A7_BX_ADDR0 0x78 |
| 55 | 55 | ||
| 56 | /* SPC CPU/cluster reset statue */ | ||
| 57 | #define STANDBYWFI_STAT 0x3c | ||
| 58 | #define STANDBYWFI_STAT_A15_CPU_MASK(cpu) (1 << (cpu)) | ||
| 59 | #define STANDBYWFI_STAT_A7_CPU_MASK(cpu) (1 << (3 + (cpu))) | ||
| 60 | |||
| 56 | /* SPC system config interface registers */ | 61 | /* SPC system config interface registers */ |
| 57 | #define SYSCFG_WDATA 0x70 | 62 | #define SYSCFG_WDATA 0x70 |
| 58 | #define SYSCFG_RDATA 0x74 | 63 | #define SYSCFG_RDATA 0x74 |
| @@ -213,6 +218,41 @@ void ve_spc_powerdown(u32 cluster, bool enable) | |||
| 213 | writel_relaxed(enable, info->baseaddr + pwdrn_reg); | 218 | writel_relaxed(enable, info->baseaddr + pwdrn_reg); |
| 214 | } | 219 | } |
| 215 | 220 | ||
| 221 | static u32 standbywfi_cpu_mask(u32 cpu, u32 cluster) | ||
| 222 | { | ||
| 223 | return cluster_is_a15(cluster) ? | ||
| 224 | STANDBYWFI_STAT_A15_CPU_MASK(cpu) | ||
| 225 | : STANDBYWFI_STAT_A7_CPU_MASK(cpu); | ||
| 226 | } | ||
| 227 | |||
| 228 | /** | ||
| 229 | * ve_spc_cpu_in_wfi(u32 cpu, u32 cluster) | ||
| 230 | * | ||
| 231 | * @cpu: mpidr[7:0] bitfield describing CPU affinity level within cluster | ||
| 232 | * @cluster: mpidr[15:8] bitfield describing cluster affinity level | ||
| 233 | * | ||
| 234 | * @return: non-zero if and only if the specified CPU is in WFI | ||
| 235 | * | ||
| 236 | * Take care when interpreting the result of this function: a CPU might | ||
| 237 | * be in WFI temporarily due to idle, and is not necessarily safely | ||
| 238 | * parked. | ||
| 239 | */ | ||
| 240 | int ve_spc_cpu_in_wfi(u32 cpu, u32 cluster) | ||
| 241 | { | ||
| 242 | int ret; | ||
| 243 | u32 mask = standbywfi_cpu_mask(cpu, cluster); | ||
| 244 | |||
| 245 | if (cluster >= MAX_CLUSTERS) | ||
| 246 | return 1; | ||
| 247 | |||
| 248 | ret = readl_relaxed(info->baseaddr + STANDBYWFI_STAT); | ||
| 249 | |||
| 250 | pr_debug("%s: PCFGREG[0x%X] = 0x%08X, mask = 0x%X\n", | ||
| 251 | __func__, STANDBYWFI_STAT, ret, mask); | ||
| 252 | |||
| 253 | return ret & mask; | ||
| 254 | } | ||
| 255 | |||
| 216 | static int ve_spc_get_performance(int cluster, u32 *freq) | 256 | static int ve_spc_get_performance(int cluster, u32 *freq) |
| 217 | { | 257 | { |
| 218 | struct ve_spc_opp *opps = info->opps[cluster]; | 258 | struct ve_spc_opp *opps = info->opps[cluster]; |
diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-vexpress/spc.h index dbd44c3720f9..793d065243b9 100644 --- a/arch/arm/mach-vexpress/spc.h +++ b/arch/arm/mach-vexpress/spc.h | |||
| @@ -20,5 +20,6 @@ void ve_spc_global_wakeup_irq(bool set); | |||
| 20 | void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set); | 20 | void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set); |
| 21 | void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr); | 21 | void ve_spc_set_resume_addr(u32 cluster, u32 cpu, u32 addr); |
| 22 | void ve_spc_powerdown(u32 cluster, bool enable); | 22 | void ve_spc_powerdown(u32 cluster, bool enable); |
| 23 | int ve_spc_cpu_in_wfi(u32 cpu, u32 cluster); | ||
| 23 | 24 | ||
| 24 | #endif | 25 | #endif |
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c index 05a364c5077a..29e7785a54bc 100644 --- a/arch/arm/mach-vexpress/tc2_pm.c +++ b/arch/arm/mach-vexpress/tc2_pm.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #include <linux/delay.h> | ||
| 15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| @@ -32,11 +33,17 @@ | |||
| 32 | #include "spc.h" | 33 | #include "spc.h" |
| 33 | 34 | ||
| 34 | /* SCC conf registers */ | 35 | /* SCC conf registers */ |
| 36 | #define RESET_CTRL 0x018 | ||
| 37 | #define RESET_A15_NCORERESET(cpu) (1 << (2 + (cpu))) | ||
| 38 | #define RESET_A7_NCORERESET(cpu) (1 << (16 + (cpu))) | ||
| 39 | |||
| 35 | #define A15_CONF 0x400 | 40 | #define A15_CONF 0x400 |
| 36 | #define A7_CONF 0x500 | 41 | #define A7_CONF 0x500 |
| 37 | #define SYS_INFO 0x700 | 42 | #define SYS_INFO 0x700 |
| 38 | #define SPC_BASE 0xb00 | 43 | #define SPC_BASE 0xb00 |
| 39 | 44 | ||
| 45 | static void __iomem *scc; | ||
| 46 | |||
| 40 | /* | 47 | /* |
| 41 | * We can't use regular spinlocks. In the switcher case, it is possible | 48 | * We can't use regular spinlocks. In the switcher case, it is possible |
| 42 | * for an outbound CPU to call power_down() after its inbound counterpart | 49 | * for an outbound CPU to call power_down() after its inbound counterpart |
| @@ -190,6 +197,55 @@ static void tc2_pm_power_down(void) | |||
| 190 | tc2_pm_down(0); | 197 | tc2_pm_down(0); |
| 191 | } | 198 | } |
| 192 | 199 | ||
| 200 | static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster) | ||
| 201 | { | ||
| 202 | u32 mask = cluster ? | ||
| 203 | RESET_A7_NCORERESET(cpu) | ||
| 204 | : RESET_A15_NCORERESET(cpu); | ||
| 205 | |||
| 206 | return !(readl_relaxed(scc + RESET_CTRL) & mask); | ||
| 207 | } | ||
| 208 | |||
| 209 | #define POLL_MSEC 10 | ||
| 210 | #define TIMEOUT_MSEC 1000 | ||
| 211 | |||
| 212 | static int tc2_pm_power_down_finish(unsigned int cpu, unsigned int cluster) | ||
| 213 | { | ||
| 214 | unsigned tries; | ||
| 215 | |||
| 216 | pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); | ||
| 217 | BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); | ||
| 218 | |||
| 219 | for (tries = 0; tries < TIMEOUT_MSEC / POLL_MSEC; ++tries) { | ||
| 220 | /* | ||
| 221 | * Only examine the hardware state if the target CPU has | ||
| 222 | * caught up at least as far as tc2_pm_down(): | ||
| 223 | */ | ||
| 224 | if (ACCESS_ONCE(tc2_pm_use_count[cpu][cluster]) == 0) { | ||
| 225 | pr_debug("%s(cpu=%u, cluster=%u): RESET_CTRL = 0x%08X\n", | ||
| 226 | __func__, cpu, cluster, | ||
| 227 | readl_relaxed(scc + RESET_CTRL)); | ||
| 228 | |||
| 229 | /* | ||
| 230 | * We need the CPU to reach WFI, but the power | ||
| 231 | * controller may put the cluster in reset and | ||
| 232 | * power it off as soon as that happens, before | ||
| 233 | * we have a chance to see STANDBYWFI. | ||
| 234 | * | ||
| 235 | * So we need to check for both conditions: | ||
| 236 | */ | ||
| 237 | if (tc2_core_in_reset(cpu, cluster) || | ||
| 238 | ve_spc_cpu_in_wfi(cpu, cluster)) | ||
| 239 | return 0; /* success: the CPU is halted */ | ||
| 240 | } | ||
| 241 | |||
| 242 | /* Otherwise, wait and retry: */ | ||
| 243 | msleep(POLL_MSEC); | ||
| 244 | } | ||
| 245 | |||
| 246 | return -ETIMEDOUT; /* timeout */ | ||
| 247 | } | ||
| 248 | |||
| 193 | static void tc2_pm_suspend(u64 residency) | 249 | static void tc2_pm_suspend(u64 residency) |
| 194 | { | 250 | { |
| 195 | unsigned int mpidr, cpu, cluster; | 251 | unsigned int mpidr, cpu, cluster; |
| @@ -232,10 +288,11 @@ static void tc2_pm_powered_up(void) | |||
| 232 | } | 288 | } |
| 233 | 289 | ||
| 234 | static const struct mcpm_platform_ops tc2_pm_power_ops = { | 290 | static const struct mcpm_platform_ops tc2_pm_power_ops = { |
| 235 | .power_up = tc2_pm_power_up, | 291 | .power_up = tc2_pm_power_up, |
| 236 | .power_down = tc2_pm_power_down, | 292 | .power_down = tc2_pm_power_down, |
| 237 | .suspend = tc2_pm_suspend, | 293 | .power_down_finish = tc2_pm_power_down_finish, |
| 238 | .powered_up = tc2_pm_powered_up, | 294 | .suspend = tc2_pm_suspend, |
| 295 | .powered_up = tc2_pm_powered_up, | ||
| 239 | }; | 296 | }; |
| 240 | 297 | ||
| 241 | static bool __init tc2_pm_usage_count_init(void) | 298 | static bool __init tc2_pm_usage_count_init(void) |
| @@ -269,7 +326,6 @@ static void __naked tc2_pm_power_up_setup(unsigned int affinity_level) | |||
| 269 | static int __init tc2_pm_init(void) | 326 | static int __init tc2_pm_init(void) |
| 270 | { | 327 | { |
| 271 | int ret, irq; | 328 | int ret, irq; |
| 272 | void __iomem *scc; | ||
| 273 | u32 a15_cluster_id, a7_cluster_id, sys_info; | 329 | u32 a15_cluster_id, a7_cluster_id, sys_info; |
| 274 | struct device_node *np; | 330 | struct device_node *np; |
| 275 | 331 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 79f8b39801a8..f61a5707823a 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | * | 9 | * |
| 10 | * DMA uncached mapping support. | 10 | * DMA uncached mapping support. |
| 11 | */ | 11 | */ |
| 12 | #include <linux/bootmem.h> | ||
| 12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 14 | #include <linux/gfp.h> | 15 | #include <linux/gfp.h> |
| @@ -157,6 +158,44 @@ struct dma_map_ops arm_coherent_dma_ops = { | |||
| 157 | }; | 158 | }; |
| 158 | EXPORT_SYMBOL(arm_coherent_dma_ops); | 159 | EXPORT_SYMBOL(arm_coherent_dma_ops); |
| 159 | 160 | ||
| 161 | static int __dma_supported(struct device *dev, u64 mask, bool warn) | ||
| 162 | { | ||
| 163 | unsigned long max_dma_pfn; | ||
| 164 | |||
| 165 | /* | ||
| 166 | * If the mask allows for more memory than we can address, | ||
| 167 | * and we actually have that much memory, then we must | ||
| 168 | * indicate that DMA to this device is not supported. | ||
| 169 | */ | ||
| 170 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
| 171 | mask > (dma_addr_t)~0 && | ||
| 172 | dma_to_pfn(dev, ~0) < max_pfn) { | ||
| 173 | if (warn) { | ||
| 174 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | ||
| 175 | mask); | ||
| 176 | dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n"); | ||
| 177 | } | ||
| 178 | return 0; | ||
| 179 | } | ||
| 180 | |||
| 181 | max_dma_pfn = min(max_pfn, arm_dma_pfn_limit); | ||
| 182 | |||
| 183 | /* | ||
| 184 | * Translate the device's DMA mask to a PFN limit. This | ||
| 185 | * PFN number includes the page which we can DMA to. | ||
| 186 | */ | ||
| 187 | if (dma_to_pfn(dev, mask) < max_dma_pfn) { | ||
| 188 | if (warn) | ||
| 189 | dev_warn(dev, "Coherent DMA mask %#llx (pfn %#lx-%#lx) covers a smaller range of system memory than the DMA zone pfn 0x0-%#lx\n", | ||
| 190 | mask, | ||
| 191 | dma_to_pfn(dev, 0), dma_to_pfn(dev, mask) + 1, | ||
| 192 | max_dma_pfn + 1); | ||
| 193 | return 0; | ||
| 194 | } | ||
| 195 | |||
| 196 | return 1; | ||
| 197 | } | ||
| 198 | |||
| 160 | static u64 get_coherent_dma_mask(struct device *dev) | 199 | static u64 get_coherent_dma_mask(struct device *dev) |
| 161 | { | 200 | { |
| 162 | u64 mask = (u64)DMA_BIT_MASK(32); | 201 | u64 mask = (u64)DMA_BIT_MASK(32); |
| @@ -173,32 +212,8 @@ static u64 get_coherent_dma_mask(struct device *dev) | |||
| 173 | return 0; | 212 | return 0; |
| 174 | } | 213 | } |
| 175 | 214 | ||
| 176 | /* | 215 | if (!__dma_supported(dev, mask, true)) |
| 177 | * If the mask allows for more memory than we can address, | ||
| 178 | * and we actually have that much memory, then fail the | ||
| 179 | * allocation. | ||
| 180 | */ | ||
| 181 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
| 182 | mask > (dma_addr_t)~0 && | ||
| 183 | dma_to_pfn(dev, ~0) > arm_dma_pfn_limit) { | ||
| 184 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | ||
| 185 | mask); | ||
| 186 | dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n"); | ||
| 187 | return 0; | ||
| 188 | } | ||
| 189 | |||
| 190 | /* | ||
| 191 | * Now check that the mask, when translated to a PFN, | ||
| 192 | * fits within the allowable addresses which we can | ||
| 193 | * allocate. | ||
| 194 | */ | ||
| 195 | if (dma_to_pfn(dev, mask) < arm_dma_pfn_limit) { | ||
| 196 | dev_warn(dev, "Coherent DMA mask %#llx (pfn %#lx-%#lx) covers a smaller range of system memory than the DMA zone pfn 0x0-%#lx\n", | ||
| 197 | mask, | ||
| 198 | dma_to_pfn(dev, 0), dma_to_pfn(dev, mask) + 1, | ||
| 199 | arm_dma_pfn_limit + 1); | ||
| 200 | return 0; | 216 | return 0; |
| 201 | } | ||
| 202 | } | 217 | } |
| 203 | 218 | ||
| 204 | return mask; | 219 | return mask; |
| @@ -1027,28 +1042,7 @@ void arm_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
| 1027 | */ | 1042 | */ |
| 1028 | int dma_supported(struct device *dev, u64 mask) | 1043 | int dma_supported(struct device *dev, u64 mask) |
| 1029 | { | 1044 | { |
| 1030 | unsigned long limit; | 1045 | return __dma_supported(dev, mask, false); |
| 1031 | |||
| 1032 | /* | ||
| 1033 | * If the mask allows for more memory than we can address, | ||
| 1034 | * and we actually have that much memory, then we must | ||
| 1035 | * indicate that DMA to this device is not supported. | ||
| 1036 | */ | ||
| 1037 | if (sizeof(mask) != sizeof(dma_addr_t) && | ||
| 1038 | mask > (dma_addr_t)~0 && | ||
| 1039 | dma_to_pfn(dev, ~0) > arm_dma_pfn_limit) | ||
| 1040 | return 0; | ||
| 1041 | |||
| 1042 | /* | ||
| 1043 | * Translate the device's DMA mask to a PFN limit. This | ||
| 1044 | * PFN number includes the page which we can DMA to. | ||
| 1045 | */ | ||
| 1046 | limit = dma_to_pfn(dev, mask); | ||
| 1047 | |||
| 1048 | if (limit < arm_dma_pfn_limit) | ||
| 1049 | return 0; | ||
| 1050 | |||
| 1051 | return 1; | ||
| 1052 | } | 1046 | } |
| 1053 | EXPORT_SYMBOL(dma_supported); | 1047 | EXPORT_SYMBOL(dma_supported); |
| 1054 | 1048 | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 3e8f106ee5fe..1f7b19a47060 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
| @@ -229,7 +229,7 @@ void __init setup_dma_zone(const struct machine_desc *mdesc) | |||
| 229 | #ifdef CONFIG_ZONE_DMA | 229 | #ifdef CONFIG_ZONE_DMA |
| 230 | if (mdesc->dma_zone_size) { | 230 | if (mdesc->dma_zone_size) { |
| 231 | arm_dma_zone_size = mdesc->dma_zone_size; | 231 | arm_dma_zone_size = mdesc->dma_zone_size; |
| 232 | arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1; | 232 | arm_dma_limit = __pv_phys_offset + arm_dma_zone_size - 1; |
| 233 | } else | 233 | } else |
| 234 | arm_dma_limit = 0xffffffff; | 234 | arm_dma_limit = 0xffffffff; |
| 235 | arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT; | 235 | arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT; |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index d27158c38eb0..5e85ed371364 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
| @@ -146,7 +146,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
| 146 | 146 | ||
| 147 | info.flags = VM_UNMAPPED_AREA_TOPDOWN; | 147 | info.flags = VM_UNMAPPED_AREA_TOPDOWN; |
| 148 | info.length = len; | 148 | info.length = len; |
| 149 | info.low_limit = PAGE_SIZE; | 149 | info.low_limit = FIRST_USER_ADDRESS; |
| 150 | info.high_limit = mm->mmap_base; | 150 | info.high_limit = mm->mmap_base; |
| 151 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; | 151 | info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; |
| 152 | info.align_offset = pgoff << PAGE_SHIFT; | 152 | info.align_offset = pgoff << PAGE_SHIFT; |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 78eeeca78f5a..580ef2de82d7 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
| @@ -558,8 +558,8 @@ static void __init build_mem_type_table(void) | |||
| 558 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; | 558 | mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; |
| 559 | break; | 559 | break; |
| 560 | } | 560 | } |
| 561 | printk("Memory policy: ECC %sabled, Data cache %s\n", | 561 | pr_info("Memory policy: %sData cache %s\n", |
| 562 | ecc_mask ? "en" : "dis", cp->policy); | 562 | ecc_mask ? "ECC enabled, " : "", cp->policy); |
| 563 | 563 | ||
| 564 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | 564 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { |
| 565 | struct mem_type *t = &mem_types[i]; | 565 | struct mem_type *t = &mem_types[i]; |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 5c668b7a31f9..55764a7ef1f0 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
| 19 | #include <asm/cputype.h> | 19 | #include <asm/cputype.h> |
| 20 | #include <asm/mpu.h> | 20 | #include <asm/mpu.h> |
| 21 | #include <asm/procinfo.h> | ||
| 21 | 22 | ||
| 22 | #include "mm.h" | 23 | #include "mm.h" |
| 23 | 24 | ||
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 0acb089d0f70..1046b373d1ae 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
| @@ -87,7 +87,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
| 87 | init_pud = pud_offset(init_pgd, 0); | 87 | init_pud = pud_offset(init_pgd, 0); |
| 88 | init_pmd = pmd_offset(init_pud, 0); | 88 | init_pmd = pmd_offset(init_pud, 0); |
| 89 | init_pte = pte_offset_map(init_pmd, 0); | 89 | init_pte = pte_offset_map(init_pmd, 0); |
| 90 | set_pte_ext(new_pte, *init_pte, 0); | 90 | set_pte_ext(new_pte + 0, init_pte[0], 0); |
| 91 | set_pte_ext(new_pte + 1, init_pte[1], 0); | ||
| 91 | pte_unmap(init_pte); | 92 | pte_unmap(init_pte); |
| 92 | pte_unmap(new_pte); | 93 | pte_unmap(new_pte); |
| 93 | } | 94 | } |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 60920f62fdf5..bd1781979a39 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -92,7 +92,7 @@ ENDPROC(cpu_v7_dcache_clean_area) | |||
| 92 | 92 | ||
| 93 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 93 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
| 94 | .globl cpu_v7_suspend_size | 94 | .globl cpu_v7_suspend_size |
| 95 | .equ cpu_v7_suspend_size, 4 * 8 | 95 | .equ cpu_v7_suspend_size, 4 * 9 |
| 96 | #ifdef CONFIG_ARM_CPU_SUSPEND | 96 | #ifdef CONFIG_ARM_CPU_SUSPEND |
| 97 | ENTRY(cpu_v7_do_suspend) | 97 | ENTRY(cpu_v7_do_suspend) |
| 98 | stmfd sp!, {r4 - r10, lr} | 98 | stmfd sp!, {r4 - r10, lr} |
| @@ -101,13 +101,17 @@ ENTRY(cpu_v7_do_suspend) | |||
| 101 | stmia r0!, {r4 - r5} | 101 | stmia r0!, {r4 - r5} |
| 102 | #ifdef CONFIG_MMU | 102 | #ifdef CONFIG_MMU |
| 103 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 103 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
| 104 | #ifdef CONFIG_ARM_LPAE | ||
| 105 | mrrc p15, 1, r5, r7, c2 @ TTB 1 | ||
| 106 | #else | ||
| 104 | mrc p15, 0, r7, c2, c0, 1 @ TTB 1 | 107 | mrc p15, 0, r7, c2, c0, 1 @ TTB 1 |
| 108 | #endif | ||
| 105 | mrc p15, 0, r11, c2, c0, 2 @ TTB control register | 109 | mrc p15, 0, r11, c2, c0, 2 @ TTB control register |
| 106 | #endif | 110 | #endif |
| 107 | mrc p15, 0, r8, c1, c0, 0 @ Control register | 111 | mrc p15, 0, r8, c1, c0, 0 @ Control register |
| 108 | mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register | 112 | mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register |
| 109 | mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control | 113 | mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control |
| 110 | stmia r0, {r6 - r11} | 114 | stmia r0, {r5 - r11} |
| 111 | ldmfd sp!, {r4 - r10, pc} | 115 | ldmfd sp!, {r4 - r10, pc} |
| 112 | ENDPROC(cpu_v7_do_suspend) | 116 | ENDPROC(cpu_v7_do_suspend) |
| 113 | 117 | ||
| @@ -118,16 +122,19 @@ ENTRY(cpu_v7_do_resume) | |||
| 118 | ldmia r0!, {r4 - r5} | 122 | ldmia r0!, {r4 - r5} |
| 119 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID | 123 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID |
| 120 | mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID | 124 | mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID |
| 121 | ldmia r0, {r6 - r11} | 125 | ldmia r0, {r5 - r11} |
| 122 | #ifdef CONFIG_MMU | 126 | #ifdef CONFIG_MMU |
| 123 | mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs | 127 | mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs |
| 124 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 128 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
| 125 | #ifndef CONFIG_ARM_LPAE | 129 | #ifdef CONFIG_ARM_LPAE |
| 130 | mcrr p15, 0, r1, ip, c2 @ TTB 0 | ||
| 131 | mcrr p15, 1, r5, r7, c2 @ TTB 1 | ||
| 132 | #else | ||
| 126 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) | 133 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) |
| 127 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) | 134 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) |
| 128 | #endif | ||
| 129 | mcr p15, 0, r1, c2, c0, 0 @ TTB 0 | 135 | mcr p15, 0, r1, c2, c0, 0 @ TTB 0 |
| 130 | mcr p15, 0, r7, c2, c0, 1 @ TTB 1 | 136 | mcr p15, 0, r7, c2, c0, 1 @ TTB 1 |
| 137 | #endif | ||
| 131 | mcr p15, 0, r11, c2, c0, 2 @ TTB control register | 138 | mcr p15, 0, r11, c2, c0, 2 @ TTB control register |
| 132 | ldr r4, =PRRR @ PRRR | 139 | ldr r4, =PRRR @ PRRR |
| 133 | ldr r5, =NMRR @ NMRR | 140 | ldr r5, =NMRR @ NMRR |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index fb92abb91628..2861b155485a 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
| @@ -336,8 +336,11 @@ static inline void __omap_dm_timer_enable_posted(struct omap_dm_timer *timer) | |||
| 336 | if (timer->posted) | 336 | if (timer->posted) |
| 337 | return; | 337 | return; |
| 338 | 338 | ||
| 339 | if (timer->errata & OMAP_TIMER_ERRATA_I103_I767) | 339 | if (timer->errata & OMAP_TIMER_ERRATA_I103_I767) { |
| 340 | timer->posted = OMAP_TIMER_NONPOSTED; | ||
| 341 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, 0, 0); | ||
| 340 | return; | 342 | return; |
| 343 | } | ||
| 341 | 344 | ||
| 342 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, | 345 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, |
| 343 | OMAP_TIMER_CTRL_POSTED, 0); | 346 | OMAP_TIMER_CTRL_POSTED, 0); |
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 23732cdff551..b31ee1b275b0 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c | |||
| @@ -25,8 +25,9 @@ struct xen_p2m_entry { | |||
| 25 | struct rb_node rbnode_phys; | 25 | struct rb_node rbnode_phys; |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | rwlock_t p2m_lock; | 28 | static rwlock_t p2m_lock; |
| 29 | struct rb_root phys_to_mach = RB_ROOT; | 29 | struct rb_root phys_to_mach = RB_ROOT; |
| 30 | EXPORT_SYMBOL_GPL(phys_to_mach); | ||
| 30 | static struct rb_root mach_to_phys = RB_ROOT; | 31 | static struct rb_root mach_to_phys = RB_ROOT; |
| 31 | 32 | ||
| 32 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) | 33 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) |
| @@ -200,7 +201,7 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
| 200 | } | 201 | } |
| 201 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); | 202 | EXPORT_SYMBOL_GPL(__set_phys_to_machine); |
| 202 | 203 | ||
| 203 | int p2m_init(void) | 204 | static int p2m_init(void) |
| 204 | { | 205 | { |
| 205 | rwlock_init(&p2m_lock); | 206 | rwlock_init(&p2m_lock); |
| 206 | return 0; | 207 | return 0; |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 88c8b6c1341a..6d4dd22ee4b7 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
| @@ -159,8 +159,7 @@ config NR_CPUS | |||
| 159 | range 2 32 | 159 | range 2 32 |
| 160 | depends on SMP | 160 | depends on SMP |
| 161 | # These have to remain sorted largest to smallest | 161 | # These have to remain sorted largest to smallest |
| 162 | default "8" if ARCH_XGENE | 162 | default "8" |
| 163 | default "4" | ||
| 164 | 163 | ||
| 165 | config HOTPLUG_CPU | 164 | config HOTPLUG_CPU |
| 166 | bool "Support for hot-pluggable CPUs" | 165 | bool "Support for hot-pluggable CPUs" |
diff --git a/arch/arm64/boot/dts/foundation-v8.dts b/arch/arm64/boot/dts/foundation-v8.dts index 84fcc5018284..519c4b2c0687 100644 --- a/arch/arm64/boot/dts/foundation-v8.dts +++ b/arch/arm64/boot/dts/foundation-v8.dts | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | /dts-v1/; | 7 | /dts-v1/; |
| 8 | 8 | ||
| 9 | /memreserve/ 0x80000000 0x00010000; | ||
| 10 | |||
| 9 | / { | 11 | / { |
| 10 | model = "Foundation-v8A"; | 12 | model = "Foundation-v8A"; |
| 11 | compatible = "arm,foundation-aarch64", "arm,vexpress"; | 13 | compatible = "arm,foundation-aarch64", "arm,vexpress"; |
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 4cc813eddacb..572769727227 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
| @@ -229,7 +229,7 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t prot | |||
| 229 | extern void __iounmap(volatile void __iomem *addr); | 229 | extern void __iounmap(volatile void __iomem *addr); |
| 230 | extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); | 230 | extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); |
| 231 | 231 | ||
| 232 | #define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) | 232 | #define PROT_DEFAULT (pgprot_default | PTE_DIRTY) |
| 233 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) | 233 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) |
| 234 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) | 234 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) |
| 235 | #define PROT_NORMAL (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL)) | 235 | #define PROT_NORMAL (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL)) |
diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h index aa11943b8502..b2fcfbc51ecc 100644 --- a/arch/arm64/include/asm/irqflags.h +++ b/arch/arm64/include/asm/irqflags.h | |||
| @@ -56,6 +56,9 @@ static inline void arch_local_irq_disable(void) | |||
| 56 | #define local_fiq_enable() asm("msr daifclr, #1" : : : "memory") | 56 | #define local_fiq_enable() asm("msr daifclr, #1" : : : "memory") |
| 57 | #define local_fiq_disable() asm("msr daifset, #1" : : : "memory") | 57 | #define local_fiq_disable() asm("msr daifset, #1" : : : "memory") |
| 58 | 58 | ||
| 59 | #define local_async_enable() asm("msr daifclr, #4" : : : "memory") | ||
| 60 | #define local_async_disable() asm("msr daifset, #4" : : : "memory") | ||
| 61 | |||
| 59 | /* | 62 | /* |
| 60 | * Save the current interrupt enable state. | 63 | * Save the current interrupt enable state. |
| 61 | */ | 64 | */ |
diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index 755f86143320..b1d2e26c3c88 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | * Section | 43 | * Section |
| 44 | */ | 44 | */ |
| 45 | #define PMD_SECT_VALID (_AT(pmdval_t, 1) << 0) | 45 | #define PMD_SECT_VALID (_AT(pmdval_t, 1) << 0) |
| 46 | #define PMD_SECT_PROT_NONE (_AT(pmdval_t, 1) << 2) | 46 | #define PMD_SECT_PROT_NONE (_AT(pmdval_t, 1) << 58) |
| 47 | #define PMD_SECT_USER (_AT(pmdval_t, 1) << 6) /* AP[1] */ | 47 | #define PMD_SECT_USER (_AT(pmdval_t, 1) << 6) /* AP[1] */ |
| 48 | #define PMD_SECT_RDONLY (_AT(pmdval_t, 1) << 7) /* AP[2] */ | 48 | #define PMD_SECT_RDONLY (_AT(pmdval_t, 1) << 7) /* AP[2] */ |
| 49 | #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) | 49 | #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 17bd3af0a117..7f2b60affbb4 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -25,10 +25,11 @@ | |||
| 25 | * Software defined PTE bits definition. | 25 | * Software defined PTE bits definition. |
| 26 | */ | 26 | */ |
| 27 | #define PTE_VALID (_AT(pteval_t, 1) << 0) | 27 | #define PTE_VALID (_AT(pteval_t, 1) << 0) |
| 28 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 2) /* only when !PTE_VALID */ | 28 | #define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */ |
| 29 | #define PTE_FILE (_AT(pteval_t, 1) << 3) /* only when !pte_present() */ | ||
| 30 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) | 29 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) |
| 31 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) | 30 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) |
| 31 | /* bit 57 for PMD_SECT_SPLITTING */ | ||
| 32 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ | ||
| 32 | 33 | ||
| 33 | /* | 34 | /* |
| 34 | * VMALLOC and SPARSEMEM_VMEMMAP ranges. | 35 | * VMALLOC and SPARSEMEM_VMEMMAP ranges. |
| @@ -254,7 +255,7 @@ static inline int has_transparent_hugepage(void) | |||
| 254 | #define pgprot_noncached(prot) \ | 255 | #define pgprot_noncached(prot) \ |
| 255 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE)) | 256 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE)) |
| 256 | #define pgprot_writecombine(prot) \ | 257 | #define pgprot_writecombine(prot) \ |
| 257 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_GRE)) | 258 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) |
| 258 | #define pgprot_dmacoherent(prot) \ | 259 | #define pgprot_dmacoherent(prot) \ |
| 259 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) | 260 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) |
| 260 | #define __HAVE_PHYS_MEM_ACCESS_PROT | 261 | #define __HAVE_PHYS_MEM_ACCESS_PROT |
| @@ -357,18 +358,20 @@ extern pgd_t idmap_pg_dir[PTRS_PER_PGD]; | |||
| 357 | 358 | ||
| 358 | /* | 359 | /* |
| 359 | * Encode and decode a swap entry: | 360 | * Encode and decode a swap entry: |
| 360 | * bits 0, 2: present (must both be zero) | 361 | * bits 0-1: present (must be zero) |
| 361 | * bit 3: PTE_FILE | 362 | * bit 2: PTE_FILE |
| 362 | * bits 4-8: swap type | 363 | * bits 3-8: swap type |
| 363 | * bits 9-63: swap offset | 364 | * bits 9-57: swap offset |
| 364 | */ | 365 | */ |
| 365 | #define __SWP_TYPE_SHIFT 4 | 366 | #define __SWP_TYPE_SHIFT 3 |
| 366 | #define __SWP_TYPE_BITS 6 | 367 | #define __SWP_TYPE_BITS 6 |
| 368 | #define __SWP_OFFSET_BITS 49 | ||
| 367 | #define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1) | 369 | #define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1) |
| 368 | #define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT) | 370 | #define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT) |
| 371 | #define __SWP_OFFSET_MASK ((1UL << __SWP_OFFSET_BITS) - 1) | ||
| 369 | 372 | ||
| 370 | #define __swp_type(x) (((x).val >> __SWP_TYPE_SHIFT) & __SWP_TYPE_MASK) | 373 | #define __swp_type(x) (((x).val >> __SWP_TYPE_SHIFT) & __SWP_TYPE_MASK) |
| 371 | #define __swp_offset(x) ((x).val >> __SWP_OFFSET_SHIFT) | 374 | #define __swp_offset(x) (((x).val >> __SWP_OFFSET_SHIFT) & __SWP_OFFSET_MASK) |
| 372 | #define __swp_entry(type,offset) ((swp_entry_t) { ((type) << __SWP_TYPE_SHIFT) | ((offset) << __SWP_OFFSET_SHIFT) }) | 375 | #define __swp_entry(type,offset) ((swp_entry_t) { ((type) << __SWP_TYPE_SHIFT) | ((offset) << __SWP_OFFSET_SHIFT) }) |
| 373 | 376 | ||
| 374 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 377 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
| @@ -382,15 +385,15 @@ extern pgd_t idmap_pg_dir[PTRS_PER_PGD]; | |||
| 382 | 385 | ||
| 383 | /* | 386 | /* |
| 384 | * Encode and decode a file entry: | 387 | * Encode and decode a file entry: |
| 385 | * bits 0, 2: present (must both be zero) | 388 | * bits 0-1: present (must be zero) |
| 386 | * bit 3: PTE_FILE | 389 | * bit 2: PTE_FILE |
| 387 | * bits 4-63: file offset / PAGE_SIZE | 390 | * bits 3-57: file offset / PAGE_SIZE |
| 388 | */ | 391 | */ |
| 389 | #define pte_file(pte) (pte_val(pte) & PTE_FILE) | 392 | #define pte_file(pte) (pte_val(pte) & PTE_FILE) |
| 390 | #define pte_to_pgoff(x) (pte_val(x) >> 4) | 393 | #define pte_to_pgoff(x) (pte_val(x) >> 3) |
| 391 | #define pgoff_to_pte(x) __pte(((x) << 4) | PTE_FILE) | 394 | #define pgoff_to_pte(x) __pte(((x) << 3) | PTE_FILE) |
| 392 | 395 | ||
| 393 | #define PTE_FILE_MAX_BITS 60 | 396 | #define PTE_FILE_MAX_BITS 55 |
| 394 | 397 | ||
| 395 | extern int kern_addr_valid(unsigned long addr); | 398 | extern int kern_addr_valid(unsigned long addr); |
| 396 | 399 | ||
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 6a0a9b132d7a..4ae68579031d 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c | |||
| @@ -248,7 +248,8 @@ static int brk_handler(unsigned long addr, unsigned int esr, | |||
| 248 | int aarch32_break_handler(struct pt_regs *regs) | 248 | int aarch32_break_handler(struct pt_regs *regs) |
| 249 | { | 249 | { |
| 250 | siginfo_t info; | 250 | siginfo_t info; |
| 251 | unsigned int instr; | 251 | u32 arm_instr; |
| 252 | u16 thumb_instr; | ||
| 252 | bool bp = false; | 253 | bool bp = false; |
| 253 | void __user *pc = (void __user *)instruction_pointer(regs); | 254 | void __user *pc = (void __user *)instruction_pointer(regs); |
| 254 | 255 | ||
| @@ -257,18 +258,21 @@ int aarch32_break_handler(struct pt_regs *regs) | |||
| 257 | 258 | ||
| 258 | if (compat_thumb_mode(regs)) { | 259 | if (compat_thumb_mode(regs)) { |
| 259 | /* get 16-bit Thumb instruction */ | 260 | /* get 16-bit Thumb instruction */ |
| 260 | get_user(instr, (u16 __user *)pc); | 261 | get_user(thumb_instr, (u16 __user *)pc); |
| 261 | if (instr == AARCH32_BREAK_THUMB2_LO) { | 262 | thumb_instr = le16_to_cpu(thumb_instr); |
| 263 | if (thumb_instr == AARCH32_BREAK_THUMB2_LO) { | ||
| 262 | /* get second half of 32-bit Thumb-2 instruction */ | 264 | /* get second half of 32-bit Thumb-2 instruction */ |
| 263 | get_user(instr, (u16 __user *)(pc + 2)); | 265 | get_user(thumb_instr, (u16 __user *)(pc + 2)); |
| 264 | bp = instr == AARCH32_BREAK_THUMB2_HI; | 266 | thumb_instr = le16_to_cpu(thumb_instr); |
| 267 | bp = thumb_instr == AARCH32_BREAK_THUMB2_HI; | ||
| 265 | } else { | 268 | } else { |
| 266 | bp = instr == AARCH32_BREAK_THUMB; | 269 | bp = thumb_instr == AARCH32_BREAK_THUMB; |
| 267 | } | 270 | } |
| 268 | } else { | 271 | } else { |
| 269 | /* 32-bit ARM instruction */ | 272 | /* 32-bit ARM instruction */ |
| 270 | get_user(instr, (u32 __user *)pc); | 273 | get_user(arm_instr, (u32 __user *)pc); |
| 271 | bp = (instr & ~0xf0000000) == AARCH32_BREAK_ARM; | 274 | arm_instr = le32_to_cpu(arm_instr); |
| 275 | bp = (arm_instr & ~0xf0000000) == AARCH32_BREAK_ARM; | ||
| 272 | } | 276 | } |
| 273 | 277 | ||
| 274 | if (!bp) | 278 | if (!bp) |
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index e1166145ca29..4d2c6f3f0c41 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S | |||
| @@ -309,15 +309,12 @@ el1_irq: | |||
| 309 | #ifdef CONFIG_TRACE_IRQFLAGS | 309 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 310 | bl trace_hardirqs_off | 310 | bl trace_hardirqs_off |
| 311 | #endif | 311 | #endif |
| 312 | #ifdef CONFIG_PREEMPT | 312 | |
| 313 | get_thread_info tsk | ||
| 314 | ldr w24, [tsk, #TI_PREEMPT] // get preempt count | ||
| 315 | add w0, w24, #1 // increment it | ||
| 316 | str w0, [tsk, #TI_PREEMPT] | ||
| 317 | #endif | ||
| 318 | irq_handler | 313 | irq_handler |
| 314 | |||
| 319 | #ifdef CONFIG_PREEMPT | 315 | #ifdef CONFIG_PREEMPT |
| 320 | str w24, [tsk, #TI_PREEMPT] // restore preempt count | 316 | get_thread_info tsk |
| 317 | ldr w24, [tsk, #TI_PREEMPT] // restore preempt count | ||
| 321 | cbnz w24, 1f // preempt count != 0 | 318 | cbnz w24, 1f // preempt count != 0 |
| 322 | ldr x0, [tsk, #TI_FLAGS] // get flags | 319 | ldr x0, [tsk, #TI_FLAGS] // get flags |
| 323 | tbz x0, #TIF_NEED_RESCHED, 1f // needs rescheduling? | 320 | tbz x0, #TIF_NEED_RESCHED, 1f // needs rescheduling? |
| @@ -507,22 +504,10 @@ el0_irq_naked: | |||
| 507 | #ifdef CONFIG_TRACE_IRQFLAGS | 504 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 508 | bl trace_hardirqs_off | 505 | bl trace_hardirqs_off |
| 509 | #endif | 506 | #endif |
| 510 | get_thread_info tsk | 507 | |
| 511 | #ifdef CONFIG_PREEMPT | ||
| 512 | ldr w24, [tsk, #TI_PREEMPT] // get preempt count | ||
| 513 | add w23, w24, #1 // increment it | ||
| 514 | str w23, [tsk, #TI_PREEMPT] | ||
| 515 | #endif | ||
| 516 | irq_handler | 508 | irq_handler |
| 517 | #ifdef CONFIG_PREEMPT | 509 | get_thread_info tsk |
| 518 | ldr w0, [tsk, #TI_PREEMPT] | 510 | |
| 519 | str w24, [tsk, #TI_PREEMPT] | ||
| 520 | cmp w0, w23 | ||
| 521 | b.eq 1f | ||
| 522 | mov x1, #0 | ||
| 523 | str x1, [x1] // BUG | ||
| 524 | 1: | ||
| 525 | #endif | ||
| 526 | #ifdef CONFIG_TRACE_IRQFLAGS | 511 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 527 | bl trace_hardirqs_on | 512 | bl trace_hardirqs_on |
| 528 | #endif | 513 | #endif |
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 7009387348b7..c68cca5c3523 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
| @@ -282,8 +282,9 @@ ENDPROC(secondary_holding_pen) | |||
| 282 | * be used where CPUs are brought online dynamically by the kernel. | 282 | * be used where CPUs are brought online dynamically by the kernel. |
| 283 | */ | 283 | */ |
| 284 | ENTRY(secondary_entry) | 284 | ENTRY(secondary_entry) |
| 285 | bl __calc_phys_offset // x2=phys offset | ||
| 286 | bl el2_setup // Drop to EL1 | 285 | bl el2_setup // Drop to EL1 |
| 286 | bl __calc_phys_offset // x24=PHYS_OFFSET, x28=PHYS_OFFSET-PAGE_OFFSET | ||
| 287 | bl set_cpu_boot_mode_flag | ||
| 287 | b secondary_startup | 288 | b secondary_startup |
| 288 | ENDPROC(secondary_entry) | 289 | ENDPROC(secondary_entry) |
| 289 | 290 | ||
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index fecdbf7de82e..6777a2192b83 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
| @@ -636,28 +636,27 @@ static int compat_gpr_get(struct task_struct *target, | |||
| 636 | 636 | ||
| 637 | for (i = 0; i < num_regs; ++i) { | 637 | for (i = 0; i < num_regs; ++i) { |
| 638 | unsigned int idx = start + i; | 638 | unsigned int idx = start + i; |
| 639 | void *reg; | 639 | compat_ulong_t reg; |
| 640 | 640 | ||
| 641 | switch (idx) { | 641 | switch (idx) { |
| 642 | case 15: | 642 | case 15: |
| 643 | reg = (void *)&task_pt_regs(target)->pc; | 643 | reg = task_pt_regs(target)->pc; |
| 644 | break; | 644 | break; |
| 645 | case 16: | 645 | case 16: |
| 646 | reg = (void *)&task_pt_regs(target)->pstate; | 646 | reg = task_pt_regs(target)->pstate; |
| 647 | break; | 647 | break; |
| 648 | case 17: | 648 | case 17: |
| 649 | reg = (void *)&task_pt_regs(target)->orig_x0; | 649 | reg = task_pt_regs(target)->orig_x0; |
| 650 | break; | 650 | break; |
| 651 | default: | 651 | default: |
| 652 | reg = (void *)&task_pt_regs(target)->regs[idx]; | 652 | reg = task_pt_regs(target)->regs[idx]; |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | ret = copy_to_user(ubuf, reg, sizeof(compat_ulong_t)); | 655 | ret = copy_to_user(ubuf, ®, sizeof(reg)); |
| 656 | |||
| 657 | if (ret) | 656 | if (ret) |
| 658 | break; | 657 | break; |
| 659 | else | 658 | |
| 660 | ubuf += sizeof(compat_ulong_t); | 659 | ubuf += sizeof(reg); |
| 661 | } | 660 | } |
| 662 | 661 | ||
| 663 | return ret; | 662 | return ret; |
| @@ -685,28 +684,28 @@ static int compat_gpr_set(struct task_struct *target, | |||
| 685 | 684 | ||
| 686 | for (i = 0; i < num_regs; ++i) { | 685 | for (i = 0; i < num_regs; ++i) { |
| 687 | unsigned int idx = start + i; | 686 | unsigned int idx = start + i; |
| 688 | void *reg; | 687 | compat_ulong_t reg; |
| 688 | |||
| 689 | ret = copy_from_user(®, ubuf, sizeof(reg)); | ||
| 690 | if (ret) | ||
| 691 | return ret; | ||
| 692 | |||
| 693 | ubuf += sizeof(reg); | ||
| 689 | 694 | ||
| 690 | switch (idx) { | 695 | switch (idx) { |
| 691 | case 15: | 696 | case 15: |
| 692 | reg = (void *)&newregs.pc; | 697 | newregs.pc = reg; |
| 693 | break; | 698 | break; |
| 694 | case 16: | 699 | case 16: |
| 695 | reg = (void *)&newregs.pstate; | 700 | newregs.pstate = reg; |
| 696 | break; | 701 | break; |
| 697 | case 17: | 702 | case 17: |
| 698 | reg = (void *)&newregs.orig_x0; | 703 | newregs.orig_x0 = reg; |
| 699 | break; | 704 | break; |
| 700 | default: | 705 | default: |
| 701 | reg = (void *)&newregs.regs[idx]; | 706 | newregs.regs[idx] = reg; |
| 702 | } | 707 | } |
| 703 | 708 | ||
| 704 | ret = copy_from_user(reg, ubuf, sizeof(compat_ulong_t)); | ||
| 705 | |||
| 706 | if (ret) | ||
| 707 | goto out; | ||
| 708 | else | ||
| 709 | ubuf += sizeof(compat_ulong_t); | ||
| 710 | } | 709 | } |
| 711 | 710 | ||
| 712 | if (valid_user_regs(&newregs.user_regs)) | 711 | if (valid_user_regs(&newregs.user_regs)) |
| @@ -714,7 +713,6 @@ static int compat_gpr_set(struct task_struct *target, | |||
| 714 | else | 713 | else |
| 715 | ret = -EINVAL; | 714 | ret = -EINVAL; |
| 716 | 715 | ||
| 717 | out: | ||
| 718 | return ret; | 716 | return ret; |
| 719 | } | 717 | } |
| 720 | 718 | ||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 0bc5e4cbc017..bd9bbd0e44ed 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
| @@ -205,6 +205,11 @@ u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; | |||
| 205 | 205 | ||
| 206 | void __init setup_arch(char **cmdline_p) | 206 | void __init setup_arch(char **cmdline_p) |
| 207 | { | 207 | { |
| 208 | /* | ||
| 209 | * Unmask asynchronous aborts early to catch possible system errors. | ||
| 210 | */ | ||
| 211 | local_async_enable(); | ||
| 212 | |||
| 208 | setup_processor(); | 213 | setup_processor(); |
| 209 | 214 | ||
| 210 | setup_machine_fdt(__fdt_pointer); | 215 | setup_machine_fdt(__fdt_pointer); |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index a5aeefab03c3..a0c2ca602cf8 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
| @@ -160,6 +160,7 @@ asmlinkage void secondary_start_kernel(void) | |||
| 160 | 160 | ||
| 161 | local_irq_enable(); | 161 | local_irq_enable(); |
| 162 | local_fiq_enable(); | 162 | local_fiq_enable(); |
| 163 | local_async_enable(); | ||
| 163 | 164 | ||
| 164 | /* | 165 | /* |
| 165 | * OK, it's off to the idle thread for us | 166 | * OK, it's off to the idle thread for us |
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 421b99fd635d..0f7fec52c7f8 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S | |||
| @@ -111,12 +111,12 @@ ENTRY(__cpu_setup) | |||
| 111 | bl __flush_dcache_all | 111 | bl __flush_dcache_all |
| 112 | mov lr, x28 | 112 | mov lr, x28 |
| 113 | ic iallu // I+BTB cache invalidate | 113 | ic iallu // I+BTB cache invalidate |
| 114 | tlbi vmalle1is // invalidate I + D TLBs | ||
| 114 | dsb sy | 115 | dsb sy |
| 115 | 116 | ||
| 116 | mov x0, #3 << 20 | 117 | mov x0, #3 << 20 |
| 117 | msr cpacr_el1, x0 // Enable FP/ASIMD | 118 | msr cpacr_el1, x0 // Enable FP/ASIMD |
| 118 | msr mdscr_el1, xzr // Reset mdscr_el1 | 119 | msr mdscr_el1, xzr // Reset mdscr_el1 |
| 119 | tlbi vmalle1is // invalidate I + D TLBs | ||
| 120 | /* | 120 | /* |
| 121 | * Memory region attributes for LPAE: | 121 | * Memory region attributes for LPAE: |
| 122 | * | 122 | * |
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 7b1f2cd85400..1f121497b517 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
| @@ -298,8 +298,10 @@ static int __init set_abdac_rate(struct platform_device *pdev) | |||
| 298 | */ | 298 | */ |
| 299 | retval = clk_round_rate(pll1, | 299 | retval = clk_round_rate(pll1, |
| 300 | CONFIG_BOARD_FAVR32_ABDAC_RATE * 256 * 16); | 300 | CONFIG_BOARD_FAVR32_ABDAC_RATE * 256 * 16); |
| 301 | if (retval < 0) | 301 | if (retval <= 0) { |
| 302 | retval = -EINVAL; | ||
| 302 | goto out_abdac; | 303 | goto out_abdac; |
| 304 | } | ||
| 303 | 305 | ||
| 304 | retval = clk_set_rate(pll1, retval); | 306 | retval = clk_set_rate(pll1, retval); |
| 305 | if (retval != 0) | 307 | if (retval != 0) |
diff --git a/arch/avr32/boot/u-boot/head.S b/arch/avr32/boot/u-boot/head.S index 4488fa27fe94..2ffc298f061b 100644 --- a/arch/avr32/boot/u-boot/head.S +++ b/arch/avr32/boot/u-boot/head.S | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | #include <asm/setup.h> | 10 | #include <asm/setup.h> |
| 11 | #include <asm/thread_info.h> | ||
| 12 | #include <asm/sysreg.h> | ||
| 11 | 13 | ||
| 12 | /* | 14 | /* |
| 13 | * The kernel is loaded where we want it to be and all caches | 15 | * The kernel is loaded where we want it to be and all caches |
| @@ -20,11 +22,6 @@ | |||
| 20 | .section .init.text,"ax" | 22 | .section .init.text,"ax" |
| 21 | .global _start | 23 | .global _start |
| 22 | _start: | 24 | _start: |
| 23 | /* Check if the boot loader actually provided a tag table */ | ||
| 24 | lddpc r0, magic_number | ||
| 25 | cp.w r12, r0 | ||
| 26 | brne no_tag_table | ||
| 27 | |||
| 28 | /* Initialize .bss */ | 25 | /* Initialize .bss */ |
| 29 | lddpc r2, bss_start_addr | 26 | lddpc r2, bss_start_addr |
| 30 | lddpc r3, end_addr | 27 | lddpc r3, end_addr |
| @@ -34,6 +31,25 @@ _start: | |||
| 34 | cp r2, r3 | 31 | cp r2, r3 |
| 35 | brlo 1b | 32 | brlo 1b |
| 36 | 33 | ||
| 34 | /* Initialize status register */ | ||
| 35 | lddpc r0, init_sr | ||
| 36 | mtsr SYSREG_SR, r0 | ||
| 37 | |||
| 38 | /* Set initial stack pointer */ | ||
| 39 | lddpc sp, stack_addr | ||
| 40 | sub sp, -THREAD_SIZE | ||
| 41 | |||
| 42 | #ifdef CONFIG_FRAME_POINTER | ||
| 43 | /* Mark last stack frame */ | ||
| 44 | mov lr, 0 | ||
| 45 | mov r7, 0 | ||
| 46 | #endif | ||
| 47 | |||
| 48 | /* Check if the boot loader actually provided a tag table */ | ||
| 49 | lddpc r0, magic_number | ||
| 50 | cp.w r12, r0 | ||
| 51 | brne no_tag_table | ||
| 52 | |||
| 37 | /* | 53 | /* |
| 38 | * Save the tag table address for later use. This must be done | 54 | * Save the tag table address for later use. This must be done |
| 39 | * _after_ .bss has been initialized... | 55 | * _after_ .bss has been initialized... |
| @@ -53,8 +69,15 @@ bss_start_addr: | |||
| 53 | .long __bss_start | 69 | .long __bss_start |
| 54 | end_addr: | 70 | end_addr: |
| 55 | .long _end | 71 | .long _end |
| 72 | init_sr: | ||
| 73 | .long 0x007f0000 /* Supervisor mode, everything masked */ | ||
| 74 | stack_addr: | ||
| 75 | .long init_thread_union | ||
| 76 | panic_addr: | ||
| 77 | .long panic | ||
| 56 | 78 | ||
| 57 | no_tag_table: | 79 | no_tag_table: |
| 58 | sub r12, pc, (. - 2f) | 80 | sub r12, pc, (. - 2f) |
| 59 | bral panic | 81 | /* branch to panic() which can be far away with that construct */ |
| 82 | lddpc pc, panic_addr | ||
| 60 | 2: .asciz "Boot loader didn't provide correct magic number\n" | 83 | 2: .asciz "Boot loader didn't provide correct magic number\n" |
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index d5aff36ade92..4733e38e7ae6 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig | |||
| @@ -59,7 +59,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 59 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 59 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 60 | # CONFIG_FW_LOADER is not set | 60 | # CONFIG_FW_LOADER is not set |
| 61 | CONFIG_MTD=y | 61 | CONFIG_MTD=y |
| 62 | CONFIG_MTD_PARTITIONS=y | ||
| 63 | CONFIG_MTD_CMDLINE_PARTS=y | 62 | CONFIG_MTD_CMDLINE_PARTS=y |
| 64 | CONFIG_MTD_CHAR=y | 63 | CONFIG_MTD_CHAR=y |
| 65 | CONFIG_MTD_BLOCK=y | 64 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig index 4abcf435d599..1be0ee31bd91 100644 --- a/arch/avr32/configs/atngw100_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100_evklcd100_defconfig | |||
| @@ -61,7 +61,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 61 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 61 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 62 | # CONFIG_FW_LOADER is not set | 62 | # CONFIG_FW_LOADER is not set |
| 63 | CONFIG_MTD=y | 63 | CONFIG_MTD=y |
| 64 | CONFIG_MTD_PARTITIONS=y | ||
| 65 | CONFIG_MTD_CMDLINE_PARTS=y | 64 | CONFIG_MTD_CMDLINE_PARTS=y |
| 66 | CONFIG_MTD_CHAR=y | 65 | CONFIG_MTD_CHAR=y |
| 67 | CONFIG_MTD_BLOCK=y | 66 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig index 18f3fa0470ff..796e536f7bc4 100644 --- a/arch/avr32/configs/atngw100_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100_evklcd101_defconfig | |||
| @@ -60,7 +60,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 60 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 60 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 61 | # CONFIG_FW_LOADER is not set | 61 | # CONFIG_FW_LOADER is not set |
| 62 | CONFIG_MTD=y | 62 | CONFIG_MTD=y |
| 63 | CONFIG_MTD_PARTITIONS=y | ||
| 64 | CONFIG_MTD_CMDLINE_PARTS=y | 63 | CONFIG_MTD_CMDLINE_PARTS=y |
| 65 | CONFIG_MTD_CHAR=y | 64 | CONFIG_MTD_CHAR=y |
| 66 | CONFIG_MTD_BLOCK=y | 65 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100_mrmt_defconfig b/arch/avr32/configs/atngw100_mrmt_defconfig index 06e389cfcd12..9a57da44eb6f 100644 --- a/arch/avr32/configs/atngw100_mrmt_defconfig +++ b/arch/avr32/configs/atngw100_mrmt_defconfig | |||
| @@ -48,7 +48,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 48 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 48 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 49 | # CONFIG_FW_LOADER is not set | 49 | # CONFIG_FW_LOADER is not set |
| 50 | CONFIG_MTD=y | 50 | CONFIG_MTD=y |
| 51 | CONFIG_MTD_PARTITIONS=y | ||
| 52 | CONFIG_MTD_CMDLINE_PARTS=y | 51 | CONFIG_MTD_CMDLINE_PARTS=y |
| 53 | CONFIG_MTD_CHAR=y | 52 | CONFIG_MTD_CHAR=y |
| 54 | CONFIG_MTD_BLOCK=y | 53 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100mkii_defconfig b/arch/avr32/configs/atngw100mkii_defconfig index 2518a1368d7c..97fe1b399b06 100644 --- a/arch/avr32/configs/atngw100mkii_defconfig +++ b/arch/avr32/configs/atngw100mkii_defconfig | |||
| @@ -59,7 +59,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 59 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 59 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 60 | # CONFIG_FW_LOADER is not set | 60 | # CONFIG_FW_LOADER is not set |
| 61 | CONFIG_MTD=y | 61 | CONFIG_MTD=y |
| 62 | CONFIG_MTD_PARTITIONS=y | ||
| 63 | CONFIG_MTD_CMDLINE_PARTS=y | 62 | CONFIG_MTD_CMDLINE_PARTS=y |
| 64 | CONFIG_MTD_CHAR=y | 63 | CONFIG_MTD_CHAR=y |
| 65 | CONFIG_MTD_BLOCK=y | 64 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig index 245ef6bd0fa6..a176d24467e9 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig | |||
| @@ -62,7 +62,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 62 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 62 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 63 | # CONFIG_FW_LOADER is not set | 63 | # CONFIG_FW_LOADER is not set |
| 64 | CONFIG_MTD=y | 64 | CONFIG_MTD=y |
| 65 | CONFIG_MTD_PARTITIONS=y | ||
| 66 | CONFIG_MTD_CMDLINE_PARTS=y | 65 | CONFIG_MTD_CMDLINE_PARTS=y |
| 67 | CONFIG_MTD_CHAR=y | 66 | CONFIG_MTD_CHAR=y |
| 68 | CONFIG_MTD_BLOCK=y | 67 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig index fa6cbac6e418..d1bf6dcfc47d 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig | |||
| @@ -61,7 +61,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 61 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 61 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 62 | # CONFIG_FW_LOADER is not set | 62 | # CONFIG_FW_LOADER is not set |
| 63 | CONFIG_MTD=y | 63 | CONFIG_MTD=y |
| 64 | CONFIG_MTD_PARTITIONS=y | ||
| 65 | CONFIG_MTD_CMDLINE_PARTS=y | 64 | CONFIG_MTD_CMDLINE_PARTS=y |
| 66 | CONFIG_MTD_CHAR=y | 65 | CONFIG_MTD_CHAR=y |
| 67 | CONFIG_MTD_BLOCK=y | 66 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index bbd5131021a5..2813dd2b9138 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
| @@ -53,7 +53,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 53 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 53 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 54 | # CONFIG_FW_LOADER is not set | 54 | # CONFIG_FW_LOADER is not set |
| 55 | CONFIG_MTD=y | 55 | CONFIG_MTD=y |
| 56 | CONFIG_MTD_PARTITIONS=y | ||
| 57 | CONFIG_MTD_CMDLINE_PARTS=y | 56 | CONFIG_MTD_CMDLINE_PARTS=y |
| 58 | CONFIG_MTD_CHAR=y | 57 | CONFIG_MTD_CHAR=y |
| 59 | CONFIG_MTD_BLOCK=y | 58 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig index c1cd726f9012..f8ff3a3baad4 100644 --- a/arch/avr32/configs/atstk1003_defconfig +++ b/arch/avr32/configs/atstk1003_defconfig | |||
| @@ -42,7 +42,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 42 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 42 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 43 | # CONFIG_FW_LOADER is not set | 43 | # CONFIG_FW_LOADER is not set |
| 44 | CONFIG_MTD=y | 44 | CONFIG_MTD=y |
| 45 | CONFIG_MTD_PARTITIONS=y | ||
| 46 | CONFIG_MTD_CMDLINE_PARTS=y | 45 | CONFIG_MTD_CMDLINE_PARTS=y |
| 47 | CONFIG_MTD_CHAR=y | 46 | CONFIG_MTD_CHAR=y |
| 48 | CONFIG_MTD_BLOCK=y | 47 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig index 754ae56b2767..992228e54e38 100644 --- a/arch/avr32/configs/atstk1004_defconfig +++ b/arch/avr32/configs/atstk1004_defconfig | |||
| @@ -42,7 +42,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 42 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 42 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 43 | # CONFIG_FW_LOADER is not set | 43 | # CONFIG_FW_LOADER is not set |
| 44 | CONFIG_MTD=y | 44 | CONFIG_MTD=y |
| 45 | CONFIG_MTD_PARTITIONS=y | ||
| 46 | CONFIG_MTD_CMDLINE_PARTS=y | 45 | CONFIG_MTD_CMDLINE_PARTS=y |
| 47 | CONFIG_MTD_CHAR=y | 46 | CONFIG_MTD_CHAR=y |
| 48 | CONFIG_MTD_BLOCK=y | 47 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig index 58589d8cc0ac..b8e698b0d1fa 100644 --- a/arch/avr32/configs/atstk1006_defconfig +++ b/arch/avr32/configs/atstk1006_defconfig | |||
| @@ -54,7 +54,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 54 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 54 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 55 | # CONFIG_FW_LOADER is not set | 55 | # CONFIG_FW_LOADER is not set |
| 56 | CONFIG_MTD=y | 56 | CONFIG_MTD=y |
| 57 | CONFIG_MTD_PARTITIONS=y | ||
| 58 | CONFIG_MTD_CMDLINE_PARTS=y | 57 | CONFIG_MTD_CMDLINE_PARTS=y |
| 59 | CONFIG_MTD_CHAR=y | 58 | CONFIG_MTD_CHAR=y |
| 60 | CONFIG_MTD_BLOCK=y | 59 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig index c90fbf6d35bc..07bed3f7eb5e 100644 --- a/arch/avr32/configs/favr-32_defconfig +++ b/arch/avr32/configs/favr-32_defconfig | |||
| @@ -58,7 +58,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 59 | # CONFIG_FW_LOADER is not set | 59 | # CONFIG_FW_LOADER is not set |
| 60 | CONFIG_MTD=y | 60 | CONFIG_MTD=y |
| 61 | CONFIG_MTD_PARTITIONS=y | ||
| 62 | CONFIG_MTD_CMDLINE_PARTS=y | 61 | CONFIG_MTD_CMDLINE_PARTS=y |
| 63 | CONFIG_MTD_CHAR=y | 62 | CONFIG_MTD_CHAR=y |
| 64 | CONFIG_MTD_BLOCK=y | 63 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig index ba7c31e269cb..18db853386c8 100644 --- a/arch/avr32/configs/hammerhead_defconfig +++ b/arch/avr32/configs/hammerhead_defconfig | |||
| @@ -58,7 +58,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 59 | # CONFIG_FW_LOADER is not set | 59 | # CONFIG_FW_LOADER is not set |
| 60 | CONFIG_MTD=y | 60 | CONFIG_MTD=y |
| 61 | CONFIG_MTD_PARTITIONS=y | ||
| 62 | CONFIG_MTD_CMDLINE_PARTS=y | 61 | CONFIG_MTD_CMDLINE_PARTS=y |
| 63 | CONFIG_MTD_CHAR=y | 62 | CONFIG_MTD_CHAR=y |
| 64 | CONFIG_MTD_BLOCK=y | 63 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig index 65de4431108c..91df6b2986be 100644 --- a/arch/avr32/configs/merisc_defconfig +++ b/arch/avr32/configs/merisc_defconfig | |||
| @@ -46,7 +46,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 46 | # CONFIG_FW_LOADER is not set | 46 | # CONFIG_FW_LOADER is not set |
| 47 | CONFIG_MTD=y | 47 | CONFIG_MTD=y |
| 48 | CONFIG_MTD_CONCAT=y | 48 | CONFIG_MTD_CONCAT=y |
| 49 | CONFIG_MTD_PARTITIONS=y | ||
| 50 | CONFIG_MTD_CHAR=y | 49 | CONFIG_MTD_CHAR=y |
| 51 | CONFIG_MTD_BLOCK=y | 50 | CONFIG_MTD_BLOCK=y |
| 52 | CONFIG_MTD_CFI=y | 51 | CONFIG_MTD_CFI=y |
diff --git a/arch/avr32/configs/mimc200_defconfig b/arch/avr32/configs/mimc200_defconfig index 0a8bfdc420e0..d630e089dd32 100644 --- a/arch/avr32/configs/mimc200_defconfig +++ b/arch/avr32/configs/mimc200_defconfig | |||
| @@ -49,7 +49,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
| 49 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 49 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 50 | # CONFIG_FW_LOADER is not set | 50 | # CONFIG_FW_LOADER is not set |
| 51 | CONFIG_MTD=y | 51 | CONFIG_MTD=y |
| 52 | CONFIG_MTD_PARTITIONS=y | ||
| 53 | CONFIG_MTD_CMDLINE_PARTS=y | 52 | CONFIG_MTD_CMDLINE_PARTS=y |
| 54 | CONFIG_MTD_CHAR=y | 53 | CONFIG_MTD_CHAR=y |
| 55 | CONFIG_MTD_BLOCK=y | 54 | CONFIG_MTD_BLOCK=y |
diff --git a/arch/avr32/include/asm/kprobes.h b/arch/avr32/include/asm/kprobes.h index 996cb656474e..45f563ed73fd 100644 --- a/arch/avr32/include/asm/kprobes.h +++ b/arch/avr32/include/asm/kprobes.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | typedef u16 kprobe_opcode_t; | 16 | typedef u16 kprobe_opcode_t; |
| 17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ | 17 | #define BREAKPOINT_INSTRUCTION 0xd673 /* breakpoint */ |
| 18 | #define MAX_INSN_SIZE 2 | 18 | #define MAX_INSN_SIZE 2 |
| 19 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | ||
| 19 | 20 | ||
| 20 | #define kretprobe_blacklist_size 0 | 21 | #define kretprobe_blacklist_size 0 |
| 21 | 22 | ||
| @@ -26,6 +27,19 @@ struct arch_specific_insn { | |||
| 26 | kprobe_opcode_t insn[MAX_INSN_SIZE]; | 27 | kprobe_opcode_t insn[MAX_INSN_SIZE]; |
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 30 | struct prev_kprobe { | ||
| 31 | struct kprobe *kp; | ||
| 32 | unsigned int status; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* per-cpu kprobe control block */ | ||
| 36 | struct kprobe_ctlblk { | ||
| 37 | unsigned int kprobe_status; | ||
| 38 | struct prev_kprobe prev_kprobe; | ||
| 39 | struct pt_regs jprobe_saved_regs; | ||
| 40 | char jprobes_stack[MAX_STACK_SIZE]; | ||
| 41 | }; | ||
| 42 | |||
| 29 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | 43 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
| 30 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 44 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
| 31 | unsigned long val, void *data); | 45 | unsigned long val, void *data); |
diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild index 3b85eaddf525..08d8a3d76ea8 100644 --- a/arch/avr32/include/uapi/asm/Kbuild +++ b/arch/avr32/include/uapi/asm/Kbuild | |||
| @@ -2,35 +2,35 @@ | |||
| 2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
| 3 | 3 | ||
| 4 | header-y += auxvec.h | 4 | header-y += auxvec.h |
| 5 | header-y += bitsperlong.h | ||
| 6 | header-y += byteorder.h | 5 | header-y += byteorder.h |
| 7 | header-y += cachectl.h | 6 | header-y += cachectl.h |
| 8 | header-y += errno.h | ||
| 9 | header-y += fcntl.h | ||
| 10 | header-y += ioctl.h | ||
| 11 | header-y += ioctls.h | ||
| 12 | header-y += ipcbuf.h | ||
| 13 | header-y += kvm_para.h | ||
| 14 | header-y += mman.h | ||
| 15 | header-y += msgbuf.h | 7 | header-y += msgbuf.h |
| 16 | header-y += param.h | 8 | header-y += param.h |
| 17 | header-y += poll.h | ||
| 18 | header-y += posix_types.h | 9 | header-y += posix_types.h |
| 19 | header-y += ptrace.h | 10 | header-y += ptrace.h |
| 20 | header-y += resource.h | ||
| 21 | header-y += sembuf.h | 11 | header-y += sembuf.h |
| 22 | header-y += setup.h | 12 | header-y += setup.h |
| 23 | header-y += shmbuf.h | 13 | header-y += shmbuf.h |
| 24 | header-y += sigcontext.h | 14 | header-y += sigcontext.h |
| 25 | header-y += siginfo.h | ||
| 26 | header-y += signal.h | 15 | header-y += signal.h |
| 27 | header-y += socket.h | 16 | header-y += socket.h |
| 28 | header-y += sockios.h | 17 | header-y += sockios.h |
| 29 | header-y += stat.h | 18 | header-y += stat.h |
| 30 | header-y += statfs.h | ||
| 31 | header-y += swab.h | 19 | header-y += swab.h |
| 32 | header-y += termbits.h | 20 | header-y += termbits.h |
| 33 | header-y += termios.h | 21 | header-y += termios.h |
| 34 | header-y += types.h | 22 | header-y += types.h |
| 35 | header-y += unistd.h | 23 | header-y += unistd.h |
| 24 | generic-y += bitsperlong.h | ||
| 25 | generic-y += errno.h | ||
| 26 | generic-y += fcntl.h | ||
| 27 | generic-y += ioctl.h | ||
| 28 | generic-y += ioctls.h | ||
| 29 | generic-y += ipcbuf.h | ||
| 30 | generic-y += kvm_para.h | ||
| 31 | generic-y += mman.h | ||
| 36 | generic-y += param.h | 32 | generic-y += param.h |
| 33 | generic-y += poll.h | ||
| 34 | generic-y += resource.h | ||
| 35 | generic-y += siginfo.h | ||
| 36 | generic-y += statfs.h | ||
diff --git a/arch/avr32/include/uapi/asm/auxvec.h b/arch/avr32/include/uapi/asm/auxvec.h index d5dd435bf8f4..4f02da3ffefa 100644 --- a/arch/avr32/include/uapi/asm/auxvec.h +++ b/arch/avr32/include/uapi/asm/auxvec.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #ifndef __ASM_AVR32_AUXVEC_H | 1 | #ifndef _UAPI__ASM_AVR32_AUXVEC_H |
| 2 | #define __ASM_AVR32_AUXVEC_H | 2 | #define _UAPI__ASM_AVR32_AUXVEC_H |
| 3 | 3 | ||
| 4 | #endif /* __ASM_AVR32_AUXVEC_H */ | 4 | #endif /* _UAPI__ASM_AVR32_AUXVEC_H */ |
diff --git a/arch/avr32/include/uapi/asm/bitsperlong.h b/arch/avr32/include/uapi/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b2..000000000000 --- a/arch/avr32/include/uapi/asm/bitsperlong.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/avr32/include/uapi/asm/byteorder.h b/arch/avr32/include/uapi/asm/byteorder.h index 50abc21619a8..71242f0d39c6 100644 --- a/arch/avr32/include/uapi/asm/byteorder.h +++ b/arch/avr32/include/uapi/asm/byteorder.h | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * AVR32 endian-conversion functions. | 2 | * AVR32 endian-conversion functions. |
| 3 | */ | 3 | */ |
| 4 | #ifndef __ASM_AVR32_BYTEORDER_H | 4 | #ifndef _UAPI__ASM_AVR32_BYTEORDER_H |
| 5 | #define __ASM_AVR32_BYTEORDER_H | 5 | #define _UAPI__ASM_AVR32_BYTEORDER_H |
| 6 | 6 | ||
| 7 | #include <linux/byteorder/big_endian.h> | 7 | #include <linux/byteorder/big_endian.h> |
| 8 | 8 | ||
| 9 | #endif /* __ASM_AVR32_BYTEORDER_H */ | 9 | #endif /* _UAPI__ASM_AVR32_BYTEORDER_H */ |
diff --git a/arch/avr32/include/uapi/asm/cachectl.h b/arch/avr32/include/uapi/asm/cachectl.h index 4faf1ce60061..573a9584dd57 100644 --- a/arch/avr32/include/uapi/asm/cachectl.h +++ b/arch/avr32/include/uapi/asm/cachectl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_CACHECTL_H | 1 | #ifndef _UAPI__ASM_AVR32_CACHECTL_H |
| 2 | #define __ASM_AVR32_CACHECTL_H | 2 | #define _UAPI__ASM_AVR32_CACHECTL_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * Operations that can be performed through the cacheflush system call | 5 | * Operations that can be performed through the cacheflush system call |
| @@ -8,4 +8,4 @@ | |||
| 8 | /* Clean the data cache, then invalidate the icache */ | 8 | /* Clean the data cache, then invalidate the icache */ |
| 9 | #define CACHE_IFLUSH 0 | 9 | #define CACHE_IFLUSH 0 |
| 10 | 10 | ||
| 11 | #endif /* __ASM_AVR32_CACHECTL_H */ | 11 | #endif /* _UAPI__ASM_AVR32_CACHECTL_H */ |
diff --git a/arch/avr32/include/uapi/asm/errno.h b/arch/avr32/include/uapi/asm/errno.h deleted file mode 100644 index 558a7249f06d..000000000000 --- a/arch/avr32/include/uapi/asm/errno.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_ERRNO_H | ||
| 2 | #define __ASM_AVR32_ERRNO_H | ||
| 3 | |||
| 4 | #include <asm-generic/errno.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_ERRNO_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/fcntl.h b/arch/avr32/include/uapi/asm/fcntl.h deleted file mode 100644 index 14c0c4402b11..000000000000 --- a/arch/avr32/include/uapi/asm/fcntl.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_FCNTL_H | ||
| 2 | #define __ASM_AVR32_FCNTL_H | ||
| 3 | |||
| 4 | #include <asm-generic/fcntl.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_FCNTL_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/ioctl.h b/arch/avr32/include/uapi/asm/ioctl.h deleted file mode 100644 index c8472c1398ef..000000000000 --- a/arch/avr32/include/uapi/asm/ioctl.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_IOCTL_H | ||
| 2 | #define __ASM_AVR32_IOCTL_H | ||
| 3 | |||
| 4 | #include <asm-generic/ioctl.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_IOCTL_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/ioctls.h b/arch/avr32/include/uapi/asm/ioctls.h deleted file mode 100644 index 909cf66feaf5..000000000000 --- a/arch/avr32/include/uapi/asm/ioctls.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_IOCTLS_H | ||
| 2 | #define __ASM_AVR32_IOCTLS_H | ||
| 3 | |||
| 4 | #include <asm-generic/ioctls.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_IOCTLS_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/ipcbuf.h b/arch/avr32/include/uapi/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d0..000000000000 --- a/arch/avr32/include/uapi/asm/ipcbuf.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/avr32/include/uapi/asm/kvm_para.h b/arch/avr32/include/uapi/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b957..000000000000 --- a/arch/avr32/include/uapi/asm/kvm_para.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm-generic/kvm_para.h> | ||
diff --git a/arch/avr32/include/uapi/asm/mman.h b/arch/avr32/include/uapi/asm/mman.h deleted file mode 100644 index 8eebf89f5ab1..000000000000 --- a/arch/avr32/include/uapi/asm/mman.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm-generic/mman.h> | ||
diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h index ac18bc4da7f7..9eae6effad14 100644 --- a/arch/avr32/include/uapi/asm/msgbuf.h +++ b/arch/avr32/include/uapi/asm/msgbuf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_MSGBUF_H | 1 | #ifndef _UAPI__ASM_AVR32_MSGBUF_H |
| 2 | #define __ASM_AVR32_MSGBUF_H | 2 | #define _UAPI__ASM_AVR32_MSGBUF_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * The msqid64_ds structure for i386 architecture. | 5 | * The msqid64_ds structure for i386 architecture. |
| @@ -28,4 +28,4 @@ struct msqid64_ds { | |||
| 28 | unsigned long __unused5; | 28 | unsigned long __unused5; |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | #endif /* __ASM_AVR32_MSGBUF_H */ | 31 | #endif /* _UAPI__ASM_AVR32_MSGBUF_H */ |
diff --git a/arch/avr32/include/uapi/asm/poll.h b/arch/avr32/include/uapi/asm/poll.h deleted file mode 100644 index c98509d3149e..000000000000 --- a/arch/avr32/include/uapi/asm/poll.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm-generic/poll.h> | ||
diff --git a/arch/avr32/include/uapi/asm/posix_types.h b/arch/avr32/include/uapi/asm/posix_types.h index 9ba9e749b3f3..5b813a8abf09 100644 --- a/arch/avr32/include/uapi/asm/posix_types.h +++ b/arch/avr32/include/uapi/asm/posix_types.h | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #ifndef __ASM_AVR32_POSIX_TYPES_H | 8 | #ifndef _UAPI__ASM_AVR32_POSIX_TYPES_H |
| 9 | #define __ASM_AVR32_POSIX_TYPES_H | 9 | #define _UAPI__ASM_AVR32_POSIX_TYPES_H |
| 10 | 10 | ||
| 11 | /* | 11 | /* |
| 12 | * This file is generally used by user-level software, so you need to | 12 | * This file is generally used by user-level software, so you need to |
| @@ -34,4 +34,4 @@ typedef unsigned short __kernel_old_dev_t; | |||
| 34 | 34 | ||
| 35 | #include <asm-generic/posix_types.h> | 35 | #include <asm-generic/posix_types.h> |
| 36 | 36 | ||
| 37 | #endif /* __ASM_AVR32_POSIX_TYPES_H */ | 37 | #endif /* _UAPI__ASM_AVR32_POSIX_TYPES_H */ |
diff --git a/arch/avr32/include/uapi/asm/resource.h b/arch/avr32/include/uapi/asm/resource.h deleted file mode 100644 index c6dd101472b1..000000000000 --- a/arch/avr32/include/uapi/asm/resource.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_RESOURCE_H | ||
| 2 | #define __ASM_AVR32_RESOURCE_H | ||
| 3 | |||
| 4 | #include <asm-generic/resource.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_RESOURCE_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h index e472216e0c97..6c6f7cf1e75a 100644 --- a/arch/avr32/include/uapi/asm/sembuf.h +++ b/arch/avr32/include/uapi/asm/sembuf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_SEMBUF_H | 1 | #ifndef _UAPI__ASM_AVR32_SEMBUF_H |
| 2 | #define __ASM_AVR32_SEMBUF_H | 2 | #define _UAPI__ASM_AVR32_SEMBUF_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * The semid64_ds structure for AVR32 architecture. | 5 | * The semid64_ds structure for AVR32 architecture. |
| @@ -22,4 +22,4 @@ struct semid64_ds { | |||
| 22 | unsigned long __unused4; | 22 | unsigned long __unused4; |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | #endif /* __ASM_AVR32_SEMBUF_H */ | 25 | #endif /* _UAPI__ASM_AVR32_SEMBUF_H */ |
diff --git a/arch/avr32/include/uapi/asm/setup.h b/arch/avr32/include/uapi/asm/setup.h index e58aa9356faf..a654df7dba46 100644 --- a/arch/avr32/include/uapi/asm/setup.h +++ b/arch/avr32/include/uapi/asm/setup.h | |||
| @@ -13,5 +13,4 @@ | |||
| 13 | 13 | ||
| 14 | #define COMMAND_LINE_SIZE 256 | 14 | #define COMMAND_LINE_SIZE 256 |
| 15 | 15 | ||
| 16 | |||
| 17 | #endif /* _UAPI__ASM_AVR32_SETUP_H__ */ | 16 | #endif /* _UAPI__ASM_AVR32_SETUP_H__ */ |
diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h index c62fba41739a..b94cf8b60b73 100644 --- a/arch/avr32/include/uapi/asm/shmbuf.h +++ b/arch/avr32/include/uapi/asm/shmbuf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_SHMBUF_H | 1 | #ifndef _UAPI__ASM_AVR32_SHMBUF_H |
| 2 | #define __ASM_AVR32_SHMBUF_H | 2 | #define _UAPI__ASM_AVR32_SHMBUF_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * The shmid64_ds structure for i386 architecture. | 5 | * The shmid64_ds structure for i386 architecture. |
| @@ -39,4 +39,4 @@ struct shminfo64 { | |||
| 39 | unsigned long __unused4; | 39 | unsigned long __unused4; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | #endif /* __ASM_AVR32_SHMBUF_H */ | 42 | #endif /* _UAPI__ASM_AVR32_SHMBUF_H */ |
diff --git a/arch/avr32/include/uapi/asm/sigcontext.h b/arch/avr32/include/uapi/asm/sigcontext.h index e04062b5f39f..27e56bf6377f 100644 --- a/arch/avr32/include/uapi/asm/sigcontext.h +++ b/arch/avr32/include/uapi/asm/sigcontext.h | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #ifndef __ASM_AVR32_SIGCONTEXT_H | 8 | #ifndef _UAPI__ASM_AVR32_SIGCONTEXT_H |
| 9 | #define __ASM_AVR32_SIGCONTEXT_H | 9 | #define _UAPI__ASM_AVR32_SIGCONTEXT_H |
| 10 | 10 | ||
| 11 | struct sigcontext { | 11 | struct sigcontext { |
| 12 | unsigned long oldmask; | 12 | unsigned long oldmask; |
| @@ -31,4 +31,4 @@ struct sigcontext { | |||
| 31 | unsigned long r0; | 31 | unsigned long r0; |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | #endif /* __ASM_AVR32_SIGCONTEXT_H */ | 34 | #endif /* _UAPI__ASM_AVR32_SIGCONTEXT_H */ |
diff --git a/arch/avr32/include/uapi/asm/siginfo.h b/arch/avr32/include/uapi/asm/siginfo.h deleted file mode 100644 index 5ee93f40a8a8..000000000000 --- a/arch/avr32/include/uapi/asm/siginfo.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef _AVR32_SIGINFO_H | ||
| 2 | #define _AVR32_SIGINFO_H | ||
| 3 | |||
| 4 | #include <asm-generic/siginfo.h> | ||
| 5 | |||
| 6 | #endif | ||
diff --git a/arch/avr32/include/uapi/asm/signal.h b/arch/avr32/include/uapi/asm/signal.h index 1b77a93eff50..ffe8c770cafd 100644 --- a/arch/avr32/include/uapi/asm/signal.h +++ b/arch/avr32/include/uapi/asm/signal.h | |||
| @@ -118,5 +118,4 @@ typedef struct sigaltstack { | |||
| 118 | size_t ss_size; | 118 | size_t ss_size; |
| 119 | } stack_t; | 119 | } stack_t; |
| 120 | 120 | ||
| 121 | |||
| 122 | #endif /* _UAPI__ASM_AVR32_SIGNAL_H */ | 121 | #endif /* _UAPI__ASM_AVR32_SIGNAL_H */ |
diff --git a/arch/avr32/include/uapi/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h index 439936421434..cbf902e4cd9e 100644 --- a/arch/avr32/include/uapi/asm/socket.h +++ b/arch/avr32/include/uapi/asm/socket.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_SOCKET_H | 1 | #ifndef _UAPI__ASM_AVR32_SOCKET_H |
| 2 | #define __ASM_AVR32_SOCKET_H | 2 | #define _UAPI__ASM_AVR32_SOCKET_H |
| 3 | 3 | ||
| 4 | #include <asm/sockios.h> | 4 | #include <asm/sockios.h> |
| 5 | 5 | ||
| @@ -78,4 +78,4 @@ | |||
| 78 | 78 | ||
| 79 | #define SO_MAX_PACING_RATE 47 | 79 | #define SO_MAX_PACING_RATE 47 |
| 80 | 80 | ||
| 81 | #endif /* __ASM_AVR32_SOCKET_H */ | 81 | #endif /* _UAPI__ASM_AVR32_SOCKET_H */ |
diff --git a/arch/avr32/include/uapi/asm/sockios.h b/arch/avr32/include/uapi/asm/sockios.h index 0802d742f97d..d04785453532 100644 --- a/arch/avr32/include/uapi/asm/sockios.h +++ b/arch/avr32/include/uapi/asm/sockios.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_SOCKIOS_H | 1 | #ifndef _UAPI__ASM_AVR32_SOCKIOS_H |
| 2 | #define __ASM_AVR32_SOCKIOS_H | 2 | #define _UAPI__ASM_AVR32_SOCKIOS_H |
| 3 | 3 | ||
| 4 | /* Socket-level I/O control calls. */ | 4 | /* Socket-level I/O control calls. */ |
| 5 | #define FIOSETOWN 0x8901 | 5 | #define FIOSETOWN 0x8901 |
| @@ -10,4 +10,4 @@ | |||
| 10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | 10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ |
| 11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | 11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ |
| 12 | 12 | ||
| 13 | #endif /* __ASM_AVR32_SOCKIOS_H */ | 13 | #endif /* _UAPI__ASM_AVR32_SOCKIOS_H */ |
diff --git a/arch/avr32/include/uapi/asm/stat.h b/arch/avr32/include/uapi/asm/stat.h index e72881e10230..c06acef7fce7 100644 --- a/arch/avr32/include/uapi/asm/stat.h +++ b/arch/avr32/include/uapi/asm/stat.h | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #ifndef __ASM_AVR32_STAT_H | 8 | #ifndef _UAPI__ASM_AVR32_STAT_H |
| 9 | #define __ASM_AVR32_STAT_H | 9 | #define _UAPI__ASM_AVR32_STAT_H |
| 10 | 10 | ||
| 11 | struct __old_kernel_stat { | 11 | struct __old_kernel_stat { |
| 12 | unsigned short st_dev; | 12 | unsigned short st_dev; |
| @@ -76,4 +76,4 @@ struct stat64 { | |||
| 76 | unsigned long __unused2; | 76 | unsigned long __unused2; |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | #endif /* __ASM_AVR32_STAT_H */ | 79 | #endif /* _UAPI__ASM_AVR32_STAT_H */ |
diff --git a/arch/avr32/include/uapi/asm/statfs.h b/arch/avr32/include/uapi/asm/statfs.h deleted file mode 100644 index 2961bd18c50e..000000000000 --- a/arch/avr32/include/uapi/asm/statfs.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #ifndef __ASM_AVR32_STATFS_H | ||
| 2 | #define __ASM_AVR32_STATFS_H | ||
| 3 | |||
| 4 | #include <asm-generic/statfs.h> | ||
| 5 | |||
| 6 | #endif /* __ASM_AVR32_STATFS_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/swab.h b/arch/avr32/include/uapi/asm/swab.h index 14cc737bbca6..1a03549e7dc5 100644 --- a/arch/avr32/include/uapi/asm/swab.h +++ b/arch/avr32/include/uapi/asm/swab.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * AVR32 byteswapping functions. | 2 | * AVR32 byteswapping functions. |
| 3 | */ | 3 | */ |
| 4 | #ifndef __ASM_AVR32_SWAB_H | 4 | #ifndef _UAPI__ASM_AVR32_SWAB_H |
| 5 | #define __ASM_AVR32_SWAB_H | 5 | #define _UAPI__ASM_AVR32_SWAB_H |
| 6 | 6 | ||
| 7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
| 8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
| @@ -32,4 +32,4 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 val) | |||
| 32 | #define __arch_swab32 __arch_swab32 | 32 | #define __arch_swab32 __arch_swab32 |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #endif /* __ASM_AVR32_SWAB_H */ | 35 | #endif /* _UAPI__ASM_AVR32_SWAB_H */ |
diff --git a/arch/avr32/include/uapi/asm/termbits.h b/arch/avr32/include/uapi/asm/termbits.h index 366adc5ebb10..32789ccb38f8 100644 --- a/arch/avr32/include/uapi/asm/termbits.h +++ b/arch/avr32/include/uapi/asm/termbits.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_AVR32_TERMBITS_H | 1 | #ifndef _UAPI__ASM_AVR32_TERMBITS_H |
| 2 | #define __ASM_AVR32_TERMBITS_H | 2 | #define _UAPI__ASM_AVR32_TERMBITS_H |
| 3 | 3 | ||
| 4 | #include <linux/posix_types.h> | 4 | #include <linux/posix_types.h> |
| 5 | 5 | ||
| @@ -193,4 +193,4 @@ struct ktermios { | |||
| 193 | #define TCSADRAIN 1 | 193 | #define TCSADRAIN 1 |
| 194 | #define TCSAFLUSH 2 | 194 | #define TCSAFLUSH 2 |
| 195 | 195 | ||
| 196 | #endif /* __ASM_AVR32_TERMBITS_H */ | 196 | #endif /* _UAPI__ASM_AVR32_TERMBITS_H */ |
diff --git a/arch/avr32/include/uapi/asm/termios.h b/arch/avr32/include/uapi/asm/termios.h index b8ef8ea63352..c8a0081556c4 100644 --- a/arch/avr32/include/uapi/asm/termios.h +++ b/arch/avr32/include/uapi/asm/termios.h | |||
| @@ -46,5 +46,4 @@ struct termio { | |||
| 46 | 46 | ||
| 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
| 48 | 48 | ||
| 49 | |||
| 50 | #endif /* _UAPI__ASM_AVR32_TERMIOS_H */ | 49 | #endif /* _UAPI__ASM_AVR32_TERMIOS_H */ |
diff --git a/arch/avr32/include/uapi/asm/types.h b/arch/avr32/include/uapi/asm/types.h index bb34ad349dfc..7c986c4e99b5 100644 --- a/arch/avr32/include/uapi/asm/types.h +++ b/arch/avr32/include/uapi/asm/types.h | |||
| @@ -5,4 +5,9 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #ifndef _UAPI__ASM_AVR32_TYPES_H | ||
| 9 | #define _UAPI__ASM_AVR32_TYPES_H | ||
| 10 | |||
| 8 | #include <asm-generic/int-ll64.h> | 11 | #include <asm-generic/int-ll64.h> |
| 12 | |||
| 13 | #endif /* _UAPI__ASM_AVR32_TYPES_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h index 3eaa68753adb..8822bf46ddc6 100644 --- a/arch/avr32/include/uapi/asm/unistd.h +++ b/arch/avr32/include/uapi/asm/unistd.h | |||
| @@ -301,5 +301,4 @@ | |||
| 301 | #define __NR_eventfd 281 | 301 | #define __NR_eventfd 281 |
| 302 | #define __NR_setns 283 | 302 | #define __NR_setns 283 |
| 303 | 303 | ||
| 304 | |||
| 305 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ | 304 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ |
diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S index 9899d3cc6f03..7301f4806bbe 100644 --- a/arch/avr32/kernel/entry-avr32b.S +++ b/arch/avr32/kernel/entry-avr32b.S | |||
| @@ -401,9 +401,10 @@ handle_critical: | |||
| 401 | /* We should never get here... */ | 401 | /* We should never get here... */ |
| 402 | bad_return: | 402 | bad_return: |
| 403 | sub r12, pc, (. - 1f) | 403 | sub r12, pc, (. - 1f) |
| 404 | bral panic | 404 | lddpc pc, 2f |
| 405 | .align 2 | 405 | .align 2 |
| 406 | 1: .asciz "Return from critical exception!" | 406 | 1: .asciz "Return from critical exception!" |
| 407 | 2: .long panic | ||
| 407 | 408 | ||
| 408 | .align 1 | 409 | .align 1 |
| 409 | do_bus_error_write: | 410 | do_bus_error_write: |
diff --git a/arch/avr32/kernel/head.S b/arch/avr32/kernel/head.S index 6163bd0acb95..59eae6dfbed2 100644 --- a/arch/avr32/kernel/head.S +++ b/arch/avr32/kernel/head.S | |||
| @@ -10,33 +10,13 @@ | |||
| 10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
| 11 | 11 | ||
| 12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
| 13 | #include <asm/thread_info.h> | ||
| 14 | #include <asm/sysreg.h> | ||
| 15 | 13 | ||
| 16 | .section .init.text,"ax" | 14 | .section .init.text,"ax" |
| 17 | .global kernel_entry | 15 | .global kernel_entry |
| 18 | kernel_entry: | 16 | kernel_entry: |
| 19 | /* Initialize status register */ | ||
| 20 | lddpc r0, init_sr | ||
| 21 | mtsr SYSREG_SR, r0 | ||
| 22 | |||
| 23 | /* Set initial stack pointer */ | ||
| 24 | lddpc sp, stack_addr | ||
| 25 | sub sp, -THREAD_SIZE | ||
| 26 | |||
| 27 | #ifdef CONFIG_FRAME_POINTER | ||
| 28 | /* Mark last stack frame */ | ||
| 29 | mov lr, 0 | ||
| 30 | mov r7, 0 | ||
| 31 | #endif | ||
| 32 | |||
| 33 | /* Start the show */ | 17 | /* Start the show */ |
| 34 | lddpc pc, kernel_start_addr | 18 | lddpc pc, kernel_start_addr |
| 35 | 19 | ||
| 36 | .align 2 | 20 | .align 2 |
| 37 | init_sr: | ||
| 38 | .long 0x007f0000 /* Supervisor mode, everything masked */ | ||
| 39 | stack_addr: | ||
| 40 | .long init_thread_union | ||
| 41 | kernel_start_addr: | 21 | kernel_start_addr: |
| 42 | .long start_kernel | 22 | .long start_kernel |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 12f828ad5058..d0f771be9e96 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
| @@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
| 59 | static struct irqaction timer_irqaction = { | 59 | static struct irqaction timer_irqaction = { |
| 60 | .handler = timer_interrupt, | 60 | .handler = timer_interrupt, |
| 61 | /* Oprofile uses the same irq as the timer, so allow it to be shared */ | 61 | /* Oprofile uses the same irq as the timer, so allow it to be shared */ |
| 62 | .flags = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED, | 62 | .flags = IRQF_TIMER | IRQF_SHARED, |
| 63 | .name = "avr32_comparator", | 63 | .name = "avr32_comparator", |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
diff --git a/arch/avr32/mach-at32ap/pm.c b/arch/avr32/mach-at32ap/pm.c index 32d680eb6f48..db190842b80c 100644 --- a/arch/avr32/mach-at32ap/pm.c +++ b/arch/avr32/mach-at32ap/pm.c | |||
| @@ -181,7 +181,7 @@ static const struct platform_suspend_ops avr32_pm_ops = { | |||
| 181 | .enter = avr32_pm_enter, | 181 | .enter = avr32_pm_enter, |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | static unsigned long avr32_pm_offset(void *symbol) | 184 | static unsigned long __init avr32_pm_offset(void *symbol) |
| 185 | { | 185 | { |
| 186 | extern u8 pm_exception[]; | 186 | extern u8 pm_exception[]; |
| 187 | 187 | ||
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index d43daf192b21..4c530a82fc46 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
| @@ -1992,7 +1992,7 @@ sba_connect_bus(struct pci_bus *bus) | |||
| 1992 | if (PCI_CONTROLLER(bus)->iommu) | 1992 | if (PCI_CONTROLLER(bus)->iommu) |
| 1993 | return; | 1993 | return; |
| 1994 | 1994 | ||
| 1995 | handle = PCI_CONTROLLER(bus)->acpi_handle; | 1995 | handle = acpi_device_handle(PCI_CONTROLLER(bus)->companion); |
| 1996 | if (!handle) | 1996 | if (!handle) |
| 1997 | return; | 1997 | return; |
| 1998 | 1998 | ||
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h index 80775f55f03f..71fbaaa495cc 100644 --- a/arch/ia64/include/asm/pci.h +++ b/arch/ia64/include/asm/pci.h | |||
| @@ -95,7 +95,7 @@ struct iospace_resource { | |||
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | struct pci_controller { | 97 | struct pci_controller { |
| 98 | void *acpi_handle; | 98 | struct acpi_device *companion; |
| 99 | void *iommu; | 99 | void *iommu; |
| 100 | int segment; | 100 | int segment; |
| 101 | int node; /* nearest node with memory or -1 for global allocation */ | 101 | int node; /* nearest node with memory or -1 for global allocation */ |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 5a9ff1c3c3e9..cb592773c78b 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
| @@ -2166,12 +2166,6 @@ static const struct file_operations pfm_file_ops = { | |||
| 2166 | .flush = pfm_flush | 2166 | .flush = pfm_flush |
| 2167 | }; | 2167 | }; |
| 2168 | 2168 | ||
| 2169 | static int | ||
| 2170 | pfmfs_delete_dentry(const struct dentry *dentry) | ||
| 2171 | { | ||
| 2172 | return 1; | ||
| 2173 | } | ||
| 2174 | |||
| 2175 | static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) | 2169 | static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) |
| 2176 | { | 2170 | { |
| 2177 | return dynamic_dname(dentry, buffer, buflen, "pfm:[%lu]", | 2171 | return dynamic_dname(dentry, buffer, buflen, "pfm:[%lu]", |
| @@ -2179,7 +2173,7 @@ static char *pfmfs_dname(struct dentry *dentry, char *buffer, int buflen) | |||
| 2179 | } | 2173 | } |
| 2180 | 2174 | ||
| 2181 | static const struct dentry_operations pfmfs_dentry_operations = { | 2175 | static const struct dentry_operations pfmfs_dentry_operations = { |
| 2182 | .d_delete = pfmfs_delete_dentry, | 2176 | .d_delete = always_delete_dentry, |
| 2183 | .d_dname = pfmfs_dname, | 2177 | .d_dname = pfmfs_dname, |
| 2184 | }; | 2178 | }; |
| 2185 | 2179 | ||
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 2326790b7d8b..9e4938d8ca4d 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -436,9 +436,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | |||
| 436 | if (!controller) | 436 | if (!controller) |
| 437 | return NULL; | 437 | return NULL; |
| 438 | 438 | ||
| 439 | controller->acpi_handle = device->handle; | 439 | controller->companion = device; |
| 440 | 440 | ||
| 441 | pxm = acpi_get_pxm(controller->acpi_handle); | 441 | pxm = acpi_get_pxm(device->handle); |
| 442 | #ifdef CONFIG_NUMA | 442 | #ifdef CONFIG_NUMA |
| 443 | if (pxm >= 0) | 443 | if (pxm >= 0) |
| 444 | controller->node = pxm_to_node(pxm); | 444 | controller->node = pxm_to_node(pxm); |
| @@ -489,7 +489,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | |||
| 489 | { | 489 | { |
| 490 | struct pci_controller *controller = bridge->bus->sysdata; | 490 | struct pci_controller *controller = bridge->bus->sysdata; |
| 491 | 491 | ||
| 492 | ACPI_HANDLE_SET(&bridge->dev, controller->acpi_handle); | 492 | ACPI_COMPANION_SET(&bridge->dev, controller->companion); |
| 493 | return 0; | 493 | return 0; |
| 494 | } | 494 | } |
| 495 | 495 | ||
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index b1725398b5af..0640739cc20c 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c | |||
| @@ -132,7 +132,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus) | |||
| 132 | struct acpi_resource_vendor_typed *vendor; | 132 | struct acpi_resource_vendor_typed *vendor; |
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | handle = PCI_CONTROLLER(bus)->acpi_handle; | 135 | handle = acpi_device_handle(PCI_CONTROLLER(bus)->companion); |
| 136 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, | 136 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, |
| 137 | &sn_uuid, &buffer); | 137 | &sn_uuid, &buffer); |
| 138 | if (ACPI_FAILURE(status)) { | 138 | if (ACPI_FAILURE(status)) { |
| @@ -360,7 +360,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, | |||
| 360 | acpi_status status; | 360 | acpi_status status; |
| 361 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 361 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
| 362 | 362 | ||
| 363 | rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; | 363 | rootbus_handle = acpi_device_handle(PCI_CONTROLLER(dev)->companion); |
| 364 | status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, | 364 | status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, |
| 365 | &segment); | 365 | &segment); |
| 366 | if (ACPI_SUCCESS(status)) { | 366 | if (ACPI_SUCCESS(status)) { |
diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig index ec1b014952b6..acacd348df89 100644 --- a/arch/parisc/configs/c3000_defconfig +++ b/arch/parisc/configs/c3000_defconfig | |||
| @@ -50,7 +50,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
| 50 | CONFIG_IDE=y | 50 | CONFIG_IDE=y |
| 51 | CONFIG_BLK_DEV_IDECD=y | 51 | CONFIG_BLK_DEV_IDECD=y |
| 52 | CONFIG_BLK_DEV_NS87415=y | 52 | CONFIG_BLK_DEV_NS87415=y |
| 53 | CONFIG_BLK_DEV_SIIMAGE=m | 53 | CONFIG_PATA_SIL680=m |
| 54 | CONFIG_SCSI=y | 54 | CONFIG_SCSI=y |
| 55 | CONFIG_BLK_DEV_SD=y | 55 | CONFIG_BLK_DEV_SD=y |
| 56 | CONFIG_CHR_DEV_ST=y | 56 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig index e1c8d2015c89..8249ac9d9cfc 100644 --- a/arch/parisc/configs/c8000_defconfig +++ b/arch/parisc/configs/c8000_defconfig | |||
| @@ -20,7 +20,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y | |||
| 20 | CONFIG_MODVERSIONS=y | 20 | CONFIG_MODVERSIONS=y |
| 21 | CONFIG_BLK_DEV_INTEGRITY=y | 21 | CONFIG_BLK_DEV_INTEGRITY=y |
| 22 | CONFIG_PA8X00=y | 22 | CONFIG_PA8X00=y |
| 23 | CONFIG_MLONGCALLS=y | ||
| 24 | CONFIG_64BIT=y | 23 | CONFIG_64BIT=y |
| 25 | CONFIG_SMP=y | 24 | CONFIG_SMP=y |
| 26 | CONFIG_PREEMPT=y | 25 | CONFIG_PREEMPT=y |
| @@ -81,8 +80,6 @@ CONFIG_IDE=y | |||
| 81 | CONFIG_BLK_DEV_IDECD=y | 80 | CONFIG_BLK_DEV_IDECD=y |
| 82 | CONFIG_BLK_DEV_PLATFORM=y | 81 | CONFIG_BLK_DEV_PLATFORM=y |
| 83 | CONFIG_BLK_DEV_GENERIC=y | 82 | CONFIG_BLK_DEV_GENERIC=y |
| 84 | CONFIG_BLK_DEV_SIIMAGE=y | ||
| 85 | CONFIG_SCSI=y | ||
| 86 | CONFIG_BLK_DEV_SD=y | 83 | CONFIG_BLK_DEV_SD=y |
| 87 | CONFIG_CHR_DEV_ST=m | 84 | CONFIG_CHR_DEV_ST=m |
| 88 | CONFIG_BLK_DEV_SR=m | 85 | CONFIG_BLK_DEV_SR=m |
| @@ -94,6 +91,8 @@ CONFIG_SCSI_FC_ATTRS=y | |||
| 94 | CONFIG_SCSI_SAS_LIBSAS=m | 91 | CONFIG_SCSI_SAS_LIBSAS=m |
| 95 | CONFIG_ISCSI_TCP=m | 92 | CONFIG_ISCSI_TCP=m |
| 96 | CONFIG_ISCSI_BOOT_SYSFS=m | 93 | CONFIG_ISCSI_BOOT_SYSFS=m |
| 94 | CONFIG_ATA=y | ||
| 95 | CONFIG_PATA_SIL680=y | ||
| 97 | CONFIG_FUSION=y | 96 | CONFIG_FUSION=y |
| 98 | CONFIG_FUSION_SPI=y | 97 | CONFIG_FUSION_SPI=y |
| 99 | CONFIG_FUSION_SAS=y | 98 | CONFIG_FUSION_SAS=y |
| @@ -114,9 +113,8 @@ CONFIG_INPUT_FF_MEMLESS=m | |||
| 114 | # CONFIG_KEYBOARD_ATKBD is not set | 113 | # CONFIG_KEYBOARD_ATKBD is not set |
| 115 | # CONFIG_KEYBOARD_HIL_OLD is not set | 114 | # CONFIG_KEYBOARD_HIL_OLD is not set |
| 116 | # CONFIG_KEYBOARD_HIL is not set | 115 | # CONFIG_KEYBOARD_HIL is not set |
| 117 | CONFIG_MOUSE_PS2=m | 116 | # CONFIG_MOUSE_PS2 is not set |
| 118 | CONFIG_INPUT_MISC=y | 117 | CONFIG_INPUT_MISC=y |
| 119 | CONFIG_INPUT_CM109=m | ||
| 120 | CONFIG_SERIO_SERPORT=m | 118 | CONFIG_SERIO_SERPORT=m |
| 121 | CONFIG_SERIO_PARKBD=m | 119 | CONFIG_SERIO_PARKBD=m |
| 122 | CONFIG_SERIO_GSCPS2=m | 120 | CONFIG_SERIO_GSCPS2=m |
| @@ -167,34 +165,6 @@ CONFIG_SND_VERBOSE_PRINTK=y | |||
| 167 | CONFIG_SND_AD1889=m | 165 | CONFIG_SND_AD1889=m |
| 168 | # CONFIG_SND_USB is not set | 166 | # CONFIG_SND_USB is not set |
| 169 | # CONFIG_SND_GSC is not set | 167 | # CONFIG_SND_GSC is not set |
| 170 | CONFIG_HID_A4TECH=m | ||
| 171 | CONFIG_HID_APPLE=m | ||
| 172 | CONFIG_HID_BELKIN=m | ||
| 173 | CONFIG_HID_CHERRY=m | ||
| 174 | CONFIG_HID_CHICONY=m | ||
| 175 | CONFIG_HID_CYPRESS=m | ||
| 176 | CONFIG_HID_DRAGONRISE=m | ||
| 177 | CONFIG_HID_EZKEY=m | ||
| 178 | CONFIG_HID_KYE=m | ||
| 179 | CONFIG_HID_GYRATION=m | ||
| 180 | CONFIG_HID_TWINHAN=m | ||
| 181 | CONFIG_HID_KENSINGTON=m | ||
| 182 | CONFIG_HID_LOGITECH=m | ||
| 183 | CONFIG_HID_LOGITECH_DJ=m | ||
| 184 | CONFIG_HID_MICROSOFT=m | ||
| 185 | CONFIG_HID_MONTEREY=m | ||
| 186 | CONFIG_HID_NTRIG=m | ||
| 187 | CONFIG_HID_ORTEK=m | ||
| 188 | CONFIG_HID_PANTHERLORD=m | ||
| 189 | CONFIG_HID_PETALYNX=m | ||
| 190 | CONFIG_HID_SAMSUNG=m | ||
| 191 | CONFIG_HID_SUNPLUS=m | ||
| 192 | CONFIG_HID_GREENASIA=m | ||
| 193 | CONFIG_HID_SMARTJOYPLUS=m | ||
| 194 | CONFIG_HID_TOPSEED=m | ||
| 195 | CONFIG_HID_THRUSTMASTER=m | ||
| 196 | CONFIG_HID_ZEROPLUS=m | ||
| 197 | CONFIG_USB_HID=m | ||
| 198 | CONFIG_USB=y | 168 | CONFIG_USB=y |
| 199 | CONFIG_USB_OHCI_HCD=y | 169 | CONFIG_USB_OHCI_HCD=y |
| 200 | CONFIG_USB_STORAGE=y | 170 | CONFIG_USB_STORAGE=y |
diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/configs/generic-64bit_defconfig index 5874cebee077..28c1b5de044e 100644 --- a/arch/parisc/configs/generic-64bit_defconfig +++ b/arch/parisc/configs/generic-64bit_defconfig | |||
| @@ -24,7 +24,6 @@ CONFIG_MODVERSIONS=y | |||
| 24 | CONFIG_BLK_DEV_INTEGRITY=y | 24 | CONFIG_BLK_DEV_INTEGRITY=y |
| 25 | # CONFIG_IOSCHED_DEADLINE is not set | 25 | # CONFIG_IOSCHED_DEADLINE is not set |
| 26 | CONFIG_PA8X00=y | 26 | CONFIG_PA8X00=y |
| 27 | CONFIG_MLONGCALLS=y | ||
| 28 | CONFIG_64BIT=y | 27 | CONFIG_64BIT=y |
| 29 | CONFIG_SMP=y | 28 | CONFIG_SMP=y |
| 30 | # CONFIG_COMPACTION is not set | 29 | # CONFIG_COMPACTION is not set |
| @@ -68,7 +67,6 @@ CONFIG_IDE_GD=m | |||
| 68 | CONFIG_IDE_GD_ATAPI=y | 67 | CONFIG_IDE_GD_ATAPI=y |
| 69 | CONFIG_BLK_DEV_IDECD=m | 68 | CONFIG_BLK_DEV_IDECD=m |
| 70 | CONFIG_BLK_DEV_NS87415=y | 69 | CONFIG_BLK_DEV_NS87415=y |
| 71 | CONFIG_BLK_DEV_SIIMAGE=y | ||
| 72 | # CONFIG_SCSI_PROC_FS is not set | 70 | # CONFIG_SCSI_PROC_FS is not set |
| 73 | CONFIG_BLK_DEV_SD=y | 71 | CONFIG_BLK_DEV_SD=y |
| 74 | CONFIG_BLK_DEV_SR=y | 72 | CONFIG_BLK_DEV_SR=y |
| @@ -82,6 +80,7 @@ CONFIG_SCSI_ZALON=y | |||
| 82 | CONFIG_SCSI_QLA_ISCSI=m | 80 | CONFIG_SCSI_QLA_ISCSI=m |
| 83 | CONFIG_SCSI_DH=y | 81 | CONFIG_SCSI_DH=y |
| 84 | CONFIG_ATA=y | 82 | CONFIG_ATA=y |
| 83 | CONFIG_PATA_SIL680=y | ||
| 85 | CONFIG_ATA_GENERIC=y | 84 | CONFIG_ATA_GENERIC=y |
| 86 | CONFIG_MD=y | 85 | CONFIG_MD=y |
| 87 | CONFIG_MD_LINEAR=m | 86 | CONFIG_MD_LINEAR=m |
| @@ -162,7 +161,7 @@ CONFIG_SLIP_MODE_SLIP6=y | |||
| 162 | CONFIG_INPUT_EVDEV=y | 161 | CONFIG_INPUT_EVDEV=y |
| 163 | # CONFIG_KEYBOARD_HIL_OLD is not set | 162 | # CONFIG_KEYBOARD_HIL_OLD is not set |
| 164 | # CONFIG_KEYBOARD_HIL is not set | 163 | # CONFIG_KEYBOARD_HIL is not set |
| 165 | # CONFIG_INPUT_MOUSE is not set | 164 | # CONFIG_MOUSE_PS2 is not set |
| 166 | CONFIG_INPUT_MISC=y | 165 | CONFIG_INPUT_MISC=y |
| 167 | CONFIG_SERIO_SERPORT=m | 166 | CONFIG_SERIO_SERPORT=m |
| 168 | # CONFIG_HP_SDC is not set | 167 | # CONFIG_HP_SDC is not set |
| @@ -216,32 +215,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y | |||
| 216 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | 215 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y |
| 217 | CONFIG_LOGO=y | 216 | CONFIG_LOGO=y |
| 218 | # CONFIG_LOGO_LINUX_MONO is not set | 217 | # CONFIG_LOGO_LINUX_MONO is not set |
| 219 | CONFIG_HID=m | ||
| 220 | CONFIG_HIDRAW=y | 218 | CONFIG_HIDRAW=y |
| 221 | CONFIG_HID_DRAGONRISE=m | ||
| 222 | CONFIG_DRAGONRISE_FF=y | ||
| 223 | CONFIG_HID_KYE=m | ||
| 224 | CONFIG_HID_GYRATION=m | ||
| 225 | CONFIG_HID_TWINHAN=m | ||
| 226 | CONFIG_LOGITECH_FF=y | ||
| 227 | CONFIG_LOGIRUMBLEPAD2_FF=y | ||
| 228 | CONFIG_HID_NTRIG=m | ||
| 229 | CONFIG_HID_PANTHERLORD=m | ||
| 230 | CONFIG_PANTHERLORD_FF=y | ||
| 231 | CONFIG_HID_PETALYNX=m | ||
| 232 | CONFIG_HID_SAMSUNG=m | ||
| 233 | CONFIG_HID_SONY=m | ||
| 234 | CONFIG_HID_SUNPLUS=m | ||
| 235 | CONFIG_HID_GREENASIA=m | ||
| 236 | CONFIG_GREENASIA_FF=y | ||
| 237 | CONFIG_HID_SMARTJOYPLUS=m | ||
| 238 | CONFIG_SMARTJOYPLUS_FF=y | ||
| 239 | CONFIG_HID_TOPSEED=m | ||
| 240 | CONFIG_HID_THRUSTMASTER=m | ||
| 241 | CONFIG_THRUSTMASTER_FF=y | ||
| 242 | CONFIG_HID_ZEROPLUS=m | ||
| 243 | CONFIG_ZEROPLUS_FF=y | ||
| 244 | CONFIG_USB_HID=m | ||
| 245 | CONFIG_HID_PID=y | 219 | CONFIG_HID_PID=y |
| 246 | CONFIG_USB_HIDDEV=y | 220 | CONFIG_USB_HIDDEV=y |
| 247 | CONFIG_USB=y | 221 | CONFIG_USB=y |
| @@ -251,13 +225,8 @@ CONFIG_USB_DYNAMIC_MINORS=y | |||
| 251 | CONFIG_USB_MON=m | 225 | CONFIG_USB_MON=m |
| 252 | CONFIG_USB_WUSB_CBAF=m | 226 | CONFIG_USB_WUSB_CBAF=m |
| 253 | CONFIG_USB_XHCI_HCD=m | 227 | CONFIG_USB_XHCI_HCD=m |
| 254 | CONFIG_USB_EHCI_HCD=m | 228 | CONFIG_USB_EHCI_HCD=y |
| 255 | CONFIG_USB_OHCI_HCD=m | 229 | CONFIG_USB_OHCI_HCD=y |
| 256 | CONFIG_USB_R8A66597_HCD=m | ||
| 257 | CONFIG_USB_ACM=m | ||
| 258 | CONFIG_USB_PRINTER=m | ||
| 259 | CONFIG_USB_WDM=m | ||
| 260 | CONFIG_USB_TMC=m | ||
| 261 | CONFIG_NEW_LEDS=y | 230 | CONFIG_NEW_LEDS=y |
| 262 | CONFIG_LEDS_CLASS=y | 231 | CONFIG_LEDS_CLASS=y |
| 263 | CONFIG_LEDS_TRIGGERS=y | 232 | CONFIG_LEDS_TRIGGERS=y |
diff --git a/arch/parisc/include/asm/serial.h b/arch/parisc/include/asm/serial.h index d7e3cc60dbc3..77e9b67c87ee 100644 --- a/arch/parisc/include/asm/serial.h +++ b/arch/parisc/include/asm/serial.h | |||
| @@ -6,5 +6,3 @@ | |||
| 6 | * This is used for 16550-compatible UARTs | 6 | * This is used for 16550-compatible UARTs |
| 7 | */ | 7 | */ |
| 8 | #define BASE_BAUD ( 1843200 / 16 ) | 8 | #define BASE_BAUD ( 1843200 / 16 ) |
| 9 | |||
| 10 | #define SERIAL_PORT_DFNS | ||
diff --git a/arch/parisc/include/asm/socket.h b/arch/parisc/include/asm/socket.h new file mode 100644 index 000000000000..748016cb122d --- /dev/null +++ b/arch/parisc/include/asm/socket.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef _ASM_SOCKET_H | ||
| 2 | #define _ASM_SOCKET_H | ||
| 3 | |||
| 4 | #include <uapi/asm/socket.h> | ||
| 5 | |||
| 6 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | ||
| 7 | * have to define SOCK_NONBLOCK to a different value here. | ||
| 8 | */ | ||
| 9 | #define SOCK_NONBLOCK 0x40000000 | ||
| 10 | |||
| 11 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 63f4dd0b49c2..4006964d8e12 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
| @@ -4,14 +4,11 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * User space memory access functions | 5 | * User space memory access functions |
| 6 | */ | 6 | */ |
| 7 | #include <asm/processor.h> | ||
| 8 | #include <asm/page.h> | 7 | #include <asm/page.h> |
| 9 | #include <asm/cache.h> | 8 | #include <asm/cache.h> |
| 10 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
| 11 | #include <asm-generic/uaccess-unaligned.h> | 10 | #include <asm-generic/uaccess-unaligned.h> |
| 12 | 11 | ||
| 13 | #include <linux/sched.h> | ||
| 14 | |||
| 15 | #define VERIFY_READ 0 | 12 | #define VERIFY_READ 0 |
| 16 | #define VERIFY_WRITE 1 | 13 | #define VERIFY_WRITE 1 |
| 17 | 14 | ||
| @@ -36,43 +33,12 @@ extern int __get_user_bad(void); | |||
| 36 | extern int __put_kernel_bad(void); | 33 | extern int __put_kernel_bad(void); |
| 37 | extern int __put_user_bad(void); | 34 | extern int __put_user_bad(void); |
| 38 | 35 | ||
| 39 | 36 | static inline long access_ok(int type, const void __user * addr, | |
| 40 | /* | 37 | unsigned long size) |
| 41 | * Test whether a block of memory is a valid user space address. | ||
| 42 | * Returns 0 if the range is valid, nonzero otherwise. | ||
| 43 | */ | ||
| 44 | static inline int __range_not_ok(unsigned long addr, unsigned long size, | ||
| 45 | unsigned long limit) | ||
| 46 | { | 38 | { |
| 47 | unsigned long __newaddr = addr + size; | 39 | return 1; |
| 48 | return (__newaddr < addr || __newaddr > limit || size > limit); | ||
| 49 | } | 40 | } |
| 50 | 41 | ||
| 51 | /** | ||
| 52 | * access_ok: - Checks if a user space pointer is valid | ||
| 53 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that | ||
| 54 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe | ||
| 55 | * to write to a block, it is always safe to read from it. | ||
| 56 | * @addr: User space pointer to start of block to check | ||
| 57 | * @size: Size of block to check | ||
| 58 | * | ||
| 59 | * Context: User context only. This function may sleep. | ||
| 60 | * | ||
| 61 | * Checks if a pointer to a block of memory in user space is valid. | ||
| 62 | * | ||
| 63 | * Returns true (nonzero) if the memory block may be valid, false (zero) | ||
| 64 | * if it is definitely invalid. | ||
| 65 | * | ||
| 66 | * Note that, depending on architecture, this function probably just | ||
| 67 | * checks that the pointer is in the user space range - after calling | ||
| 68 | * this function, memory access functions may still return -EFAULT. | ||
| 69 | */ | ||
| 70 | #define access_ok(type, addr, size) \ | ||
| 71 | ( __chk_user_ptr(addr), \ | ||
| 72 | !__range_not_ok((unsigned long) (__force void *) (addr), \ | ||
| 73 | size, user_addr_max()) \ | ||
| 74 | ) | ||
| 75 | |||
| 76 | #define put_user __put_user | 42 | #define put_user __put_user |
| 77 | #define get_user __get_user | 43 | #define get_user __get_user |
| 78 | 44 | ||
| @@ -253,11 +219,7 @@ extern long lstrnlen_user(const char __user *,long); | |||
| 253 | /* | 219 | /* |
| 254 | * Complex access routines -- macros | 220 | * Complex access routines -- macros |
| 255 | */ | 221 | */ |
| 256 | #ifdef CONFIG_COMPAT | 222 | #define user_addr_max() (~0UL) |
| 257 | #define user_addr_max() (TASK_SIZE) | ||
| 258 | #else | ||
| 259 | #define user_addr_max() (DEFAULT_TASK_SIZE) | ||
| 260 | #endif | ||
| 261 | 223 | ||
| 262 | #define strnlen_user lstrnlen_user | 224 | #define strnlen_user lstrnlen_user |
| 263 | #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) | 225 | #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL) |
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index 7c614d01f1fa..f33113a6141e 100644 --- a/arch/parisc/include/uapi/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _UAPI_ASM_SOCKET_H |
| 2 | #define _ASM_SOCKET_H | 2 | #define _UAPI_ASM_SOCKET_H |
| 3 | 3 | ||
| 4 | #include <asm/sockios.h> | 4 | #include <asm/sockios.h> |
| 5 | 5 | ||
| @@ -77,9 +77,4 @@ | |||
| 77 | 77 | ||
| 78 | #define SO_MAX_PACING_RATE 0x4048 | 78 | #define SO_MAX_PACING_RATE 0x4048 |
| 79 | 79 | ||
| 80 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | 80 | #endif /* _UAPI_ASM_SOCKET_H */ |
| 81 | * have to define SOCK_NONBLOCK to a different value here. | ||
| 82 | */ | ||
| 83 | #define SOCK_NONBLOCK 0x40000000 | ||
| 84 | |||
| 85 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 06cb3992907e..608716f8496b 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
| @@ -36,6 +36,9 @@ | |||
| 36 | * HP PARISC Hardware Database | 36 | * HP PARISC Hardware Database |
| 37 | * Access to this database is only possible during bootup | 37 | * Access to this database is only possible during bootup |
| 38 | * so don't reference this table after starting the init process | 38 | * so don't reference this table after starting the init process |
| 39 | * | ||
| 40 | * NOTE: Product names which are listed here and ends with a '?' | ||
| 41 | * are guessed. If you know the correct name, please let us know. | ||
| 39 | */ | 42 | */ |
| 40 | 43 | ||
| 41 | static struct hp_hardware hp_hardware_list[] = { | 44 | static struct hp_hardware hp_hardware_list[] = { |
| @@ -222,7 +225,7 @@ static struct hp_hardware hp_hardware_list[] = { | |||
| 222 | {HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"}, | 225 | {HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"}, |
| 223 | {HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"}, | 226 | {HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"}, |
| 224 | {HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"}, | 227 | {HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"}, |
| 225 | {HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+? (rp5470)"}, | 228 | {HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+ (rp5470)?"}, |
| 226 | {HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"}, | 229 | {HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"}, |
| 227 | {HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"}, | 230 | {HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"}, |
| 228 | {HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"}, | 231 | {HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"}, |
| @@ -276,9 +279,11 @@ static struct hp_hardware hp_hardware_list[] = { | |||
| 276 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, | 279 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, |
| 277 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, | 280 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, |
| 278 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"}, | 281 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"}, |
| 282 | {HPHW_NPROC,0x88B,0x4,0x91,"Crestone Peak Fast?"}, | ||
| 279 | {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"}, | 283 | {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"}, |
| 280 | {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"}, | 284 | {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"}, |
| 281 | {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"}, | 285 | {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"}, |
| 286 | {HPHW_NPROC,0x892,0x4,0x91,"Mt. Hamilton Slow Mako+?"}, | ||
| 282 | {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"}, | 287 | {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"}, |
| 283 | {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"}, | 288 | {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"}, |
| 284 | {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"}, | 289 | {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"}, |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index d2d58258aea6..d4dc588c0dc1 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
| @@ -41,9 +41,7 @@ END(boot_args) | |||
| 41 | .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ | 41 | .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ |
| 42 | .import $global$ /* forward declaration */ | 42 | .import $global$ /* forward declaration */ |
| 43 | #endif /*!CONFIG_64BIT*/ | 43 | #endif /*!CONFIG_64BIT*/ |
| 44 | .export _stext,data /* Kernel want it this way! */ | 44 | ENTRY(parisc_kernel_start) |
| 45 | _stext: | ||
| 46 | ENTRY(stext) | ||
| 47 | .proc | 45 | .proc |
| 48 | .callinfo | 46 | .callinfo |
| 49 | 47 | ||
| @@ -347,7 +345,7 @@ smp_slave_stext: | |||
| 347 | .procend | 345 | .procend |
| 348 | #endif /* CONFIG_SMP */ | 346 | #endif /* CONFIG_SMP */ |
| 349 | 347 | ||
| 350 | ENDPROC(stext) | 348 | ENDPROC(parisc_kernel_start) |
| 351 | 349 | ||
| 352 | #ifndef CONFIG_64BIT | 350 | #ifndef CONFIG_64BIT |
| 353 | .section .data..read_mostly | 351 | .section .data..read_mostly |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 5dfd248e3f1a..0d3a9d4927b5 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
| @@ -61,8 +61,15 @@ static int get_offset(struct address_space *mapping) | |||
| 61 | return (unsigned long) mapping >> 8; | 61 | return (unsigned long) mapping >> 8; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static unsigned long get_shared_area(struct address_space *mapping, | 64 | static unsigned long shared_align_offset(struct file *filp, unsigned long pgoff) |
| 65 | unsigned long addr, unsigned long len, unsigned long pgoff) | 65 | { |
| 66 | struct address_space *mapping = filp ? filp->f_mapping : NULL; | ||
| 67 | |||
| 68 | return (get_offset(mapping) + pgoff) << PAGE_SHIFT; | ||
| 69 | } | ||
| 70 | |||
| 71 | static unsigned long get_shared_area(struct file *filp, unsigned long addr, | ||
| 72 | unsigned long len, unsigned long pgoff) | ||
| 66 | { | 73 | { |
| 67 | struct vm_unmapped_area_info info; | 74 | struct vm_unmapped_area_info info; |
| 68 | 75 | ||
| @@ -71,7 +78,7 @@ static unsigned long get_shared_area(struct address_space *mapping, | |||
| 71 | info.low_limit = PAGE_ALIGN(addr); | 78 | info.low_limit = PAGE_ALIGN(addr); |
| 72 | info.high_limit = TASK_SIZE; | 79 | info.high_limit = TASK_SIZE; |
| 73 | info.align_mask = PAGE_MASK & (SHMLBA - 1); | 80 | info.align_mask = PAGE_MASK & (SHMLBA - 1); |
| 74 | info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT; | 81 | info.align_offset = shared_align_offset(filp, pgoff); |
| 75 | return vm_unmapped_area(&info); | 82 | return vm_unmapped_area(&info); |
| 76 | } | 83 | } |
| 77 | 84 | ||
| @@ -82,20 +89,18 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
| 82 | return -ENOMEM; | 89 | return -ENOMEM; |
| 83 | if (flags & MAP_FIXED) { | 90 | if (flags & MAP_FIXED) { |
| 84 | if ((flags & MAP_SHARED) && | 91 | if ((flags & MAP_SHARED) && |
| 85 | (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)) | 92 | (addr - shared_align_offset(filp, pgoff)) & (SHMLBA - 1)) |
| 86 | return -EINVAL; | 93 | return -EINVAL; |
| 87 | return addr; | 94 | return addr; |
| 88 | } | 95 | } |
| 89 | if (!addr) | 96 | if (!addr) |
| 90 | addr = TASK_UNMAPPED_BASE; | 97 | addr = TASK_UNMAPPED_BASE; |
| 91 | 98 | ||
| 92 | if (filp) { | 99 | if (filp || (flags & MAP_SHARED)) |
| 93 | addr = get_shared_area(filp->f_mapping, addr, len, pgoff); | 100 | addr = get_shared_area(filp, addr, len, pgoff); |
| 94 | } else if(flags & MAP_SHARED) { | 101 | else |
| 95 | addr = get_shared_area(NULL, addr, len, pgoff); | ||
| 96 | } else { | ||
| 97 | addr = get_unshared_area(addr, len); | 102 | addr = get_unshared_area(addr, len); |
| 98 | } | 103 | |
| 99 | return addr; | 104 | return addr; |
| 100 | } | 105 | } |
| 101 | 106 | ||
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 76ed62ed785b..ddd988b267a9 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c | |||
| @@ -168,7 +168,7 @@ void unwind_table_remove(struct unwind_table *table) | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | /* Called from setup_arch to import the kernel unwind info */ | 170 | /* Called from setup_arch to import the kernel unwind info */ |
| 171 | int unwind_init(void) | 171 | int __init unwind_init(void) |
| 172 | { | 172 | { |
| 173 | long start, stop; | 173 | long start, stop; |
| 174 | register unsigned long gp __asm__ ("r27"); | 174 | register unsigned long gp __asm__ ("r27"); |
| @@ -233,7 +233,6 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
| 233 | e = find_unwind_entry(info->ip); | 233 | e = find_unwind_entry(info->ip); |
| 234 | if (e == NULL) { | 234 | if (e == NULL) { |
| 235 | unsigned long sp; | 235 | unsigned long sp; |
| 236 | extern char _stext[], _etext[]; | ||
| 237 | 236 | ||
| 238 | dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); | 237 | dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); |
| 239 | 238 | ||
| @@ -281,8 +280,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
| 281 | break; | 280 | break; |
| 282 | info->prev_ip = tmp; | 281 | info->prev_ip = tmp; |
| 283 | sp = info->prev_sp; | 282 | sp = info->prev_sp; |
| 284 | } while (info->prev_ip < (unsigned long)_stext || | 283 | } while (!kernel_text_address(info->prev_ip)); |
| 285 | info->prev_ip > (unsigned long)_etext); | ||
| 286 | 284 | ||
| 287 | info->rp = 0; | 285 | info->rp = 0; |
| 288 | 286 | ||
| @@ -435,9 +433,8 @@ unsigned long return_address(unsigned int level) | |||
| 435 | do { | 433 | do { |
| 436 | if (unwind_once(&info) < 0 || info.ip == 0) | 434 | if (unwind_once(&info) < 0 || info.ip == 0) |
| 437 | return 0; | 435 | return 0; |
| 438 | if (!__kernel_text_address(info.ip)) { | 436 | if (!kernel_text_address(info.ip)) |
| 439 | return 0; | 437 | return 0; |
| 440 | } | ||
| 441 | } while (info.ip && level--); | 438 | } while (info.ip && level--); |
| 442 | 439 | ||
| 443 | return info.ip; | 440 | return info.ip; |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 4bb095a2f6fc..0dacc5ca555a 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
| @@ -6,24 +6,19 @@ | |||
| 6 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> | 6 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> |
| 7 | * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> | 7 | * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> |
| 8 | * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> | 8 | * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> |
| 9 | * Copyright (C) 2006 Helge Deller <deller@gmx.de> | 9 | * Copyright (C) 2006-2013 Helge Deller <deller@gmx.de> |
| 10 | * | 10 | */ |
| 11 | * | 11 | |
| 12 | * This program is free software; you can redistribute it and/or modify | 12 | /* |
| 13 | * it under the terms of the GNU General Public License as published by | 13 | * Put page table entries (swapper_pg_dir) as the first thing in .bss. This |
| 14 | * the Free Software Foundation; either version 2 of the License, or | 14 | * will ensure that it has .bss alignment (PAGE_SIZE). |
| 15 | * (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 25 | */ | 15 | */ |
| 16 | #define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \ | ||
| 17 | *(.data..vm0.pgd) \ | ||
| 18 | *(.data..vm0.pte) | ||
| 19 | |||
| 26 | #include <asm-generic/vmlinux.lds.h> | 20 | #include <asm-generic/vmlinux.lds.h> |
| 21 | |||
| 27 | /* needed for the processor specific cache alignment size */ | 22 | /* needed for the processor specific cache alignment size */ |
| 28 | #include <asm/cache.h> | 23 | #include <asm/cache.h> |
| 29 | #include <asm/page.h> | 24 | #include <asm/page.h> |
| @@ -39,7 +34,7 @@ OUTPUT_FORMAT("elf64-hppa-linux") | |||
| 39 | OUTPUT_ARCH(hppa:hppa2.0w) | 34 | OUTPUT_ARCH(hppa:hppa2.0w) |
| 40 | #endif | 35 | #endif |
| 41 | 36 | ||
| 42 | ENTRY(_stext) | 37 | ENTRY(parisc_kernel_start) |
| 43 | #ifndef CONFIG_64BIT | 38 | #ifndef CONFIG_64BIT |
| 44 | jiffies = jiffies_64 + 4; | 39 | jiffies = jiffies_64 + 4; |
| 45 | #else | 40 | #else |
| @@ -49,11 +44,29 @@ SECTIONS | |||
| 49 | { | 44 | { |
| 50 | . = KERNEL_BINARY_TEXT_START; | 45 | . = KERNEL_BINARY_TEXT_START; |
| 51 | 46 | ||
| 47 | __init_begin = .; | ||
| 48 | HEAD_TEXT_SECTION | ||
| 49 | INIT_TEXT_SECTION(8) | ||
| 50 | |||
| 51 | . = ALIGN(PAGE_SIZE); | ||
| 52 | INIT_DATA_SECTION(PAGE_SIZE) | ||
| 53 | /* we have to discard exit text and such at runtime, not link time */ | ||
| 54 | .exit.text : | ||
| 55 | { | ||
| 56 | EXIT_TEXT | ||
| 57 | } | ||
| 58 | .exit.data : | ||
| 59 | { | ||
| 60 | EXIT_DATA | ||
| 61 | } | ||
| 62 | PERCPU_SECTION(8) | ||
| 63 | . = ALIGN(PAGE_SIZE); | ||
| 64 | __init_end = .; | ||
| 65 | /* freed after init ends here */ | ||
| 66 | |||
| 52 | _text = .; /* Text and read-only data */ | 67 | _text = .; /* Text and read-only data */ |
| 53 | .head ALIGN(16) : { | 68 | _stext = .; |
| 54 | HEAD_TEXT | 69 | .text ALIGN(PAGE_SIZE) : { |
| 55 | } = 0 | ||
| 56 | .text ALIGN(16) : { | ||
| 57 | TEXT_TEXT | 70 | TEXT_TEXT |
| 58 | SCHED_TEXT | 71 | SCHED_TEXT |
| 59 | LOCK_TEXT | 72 | LOCK_TEXT |
| @@ -68,21 +81,28 @@ SECTIONS | |||
| 68 | *(.lock.text) /* out-of-line lock text */ | 81 | *(.lock.text) /* out-of-line lock text */ |
| 69 | *(.gnu.warning) | 82 | *(.gnu.warning) |
| 70 | } | 83 | } |
| 71 | /* End of text section */ | 84 | . = ALIGN(PAGE_SIZE); |
| 72 | _etext = .; | 85 | _etext = .; |
| 86 | /* End of text section */ | ||
| 73 | 87 | ||
| 74 | /* Start of data section */ | 88 | /* Start of data section */ |
| 75 | _sdata = .; | 89 | _sdata = .; |
| 76 | 90 | ||
| 77 | RODATA | 91 | RO_DATA_SECTION(8) |
| 78 | 92 | ||
| 79 | /* writeable */ | 93 | #ifdef CONFIG_64BIT |
| 80 | /* Make sure this is page aligned so | 94 | . = ALIGN(16); |
| 81 | * that we can properly leave these | 95 | /* Linkage tables */ |
| 82 | * as writable | 96 | .opd : { |
| 83 | */ | 97 | *(.opd) |
| 84 | . = ALIGN(PAGE_SIZE); | 98 | } PROVIDE (__gp = .); |
| 85 | data_start = .; | 99 | .plt : { |
| 100 | *(.plt) | ||
| 101 | } | ||
| 102 | .dlt : { | ||
| 103 | *(.dlt) | ||
| 104 | } | ||
| 105 | #endif | ||
| 86 | 106 | ||
| 87 | /* unwind info */ | 107 | /* unwind info */ |
| 88 | .PARISC.unwind : { | 108 | .PARISC.unwind : { |
| @@ -91,7 +111,15 @@ SECTIONS | |||
| 91 | __stop___unwind = .; | 111 | __stop___unwind = .; |
| 92 | } | 112 | } |
| 93 | 113 | ||
| 94 | EXCEPTION_TABLE(16) | 114 | /* writeable */ |
| 115 | /* Make sure this is page aligned so | ||
| 116 | * that we can properly leave these | ||
| 117 | * as writable | ||
| 118 | */ | ||
| 119 | . = ALIGN(PAGE_SIZE); | ||
| 120 | data_start = .; | ||
| 121 | |||
| 122 | EXCEPTION_TABLE(8) | ||
| 95 | NOTES | 123 | NOTES |
| 96 | 124 | ||
| 97 | /* Data */ | 125 | /* Data */ |
| @@ -107,54 +135,8 @@ SECTIONS | |||
| 107 | _edata = .; | 135 | _edata = .; |
| 108 | 136 | ||
| 109 | /* BSS */ | 137 | /* BSS */ |
| 110 | __bss_start = .; | 138 | BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 8) |
| 111 | /* page table entries need to be PAGE_SIZE aligned */ | ||
| 112 | . = ALIGN(PAGE_SIZE); | ||
| 113 | .data..vmpages : { | ||
| 114 | *(.data..vm0.pmd) | ||
| 115 | *(.data..vm0.pgd) | ||
| 116 | *(.data..vm0.pte) | ||
| 117 | } | ||
| 118 | .bss : { | ||
| 119 | *(.bss) | ||
| 120 | *(COMMON) | ||
| 121 | } | ||
| 122 | __bss_stop = .; | ||
| 123 | |||
| 124 | #ifdef CONFIG_64BIT | ||
| 125 | . = ALIGN(16); | ||
| 126 | /* Linkage tables */ | ||
| 127 | .opd : { | ||
| 128 | *(.opd) | ||
| 129 | } PROVIDE (__gp = .); | ||
| 130 | .plt : { | ||
| 131 | *(.plt) | ||
| 132 | } | ||
| 133 | .dlt : { | ||
| 134 | *(.dlt) | ||
| 135 | } | ||
| 136 | #endif | ||
| 137 | 139 | ||
| 138 | /* reserve space for interrupt stack by aligning __init* to 16k */ | ||
| 139 | . = ALIGN(16384); | ||
| 140 | __init_begin = .; | ||
| 141 | INIT_TEXT_SECTION(16384) | ||
| 142 | . = ALIGN(PAGE_SIZE); | ||
| 143 | INIT_DATA_SECTION(16) | ||
| 144 | /* we have to discard exit text and such at runtime, not link time */ | ||
| 145 | .exit.text : | ||
| 146 | { | ||
| 147 | EXIT_TEXT | ||
| 148 | } | ||
| 149 | .exit.data : | ||
| 150 | { | ||
| 151 | EXIT_DATA | ||
| 152 | } | ||
| 153 | |||
| 154 | PERCPU_SECTION(L1_CACHE_BYTES) | ||
| 155 | . = ALIGN(PAGE_SIZE); | ||
| 156 | __init_end = .; | ||
| 157 | /* freed after init ends here */ | ||
| 158 | _end = . ; | 140 | _end = . ; |
| 159 | 141 | ||
| 160 | STABS_DEBUG | 142 | STABS_DEBUG |
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index b5507ec06b84..413dc1769299 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
| @@ -161,7 +161,7 @@ static inline void prefetch_dst(const void *addr) | |||
| 161 | /* Copy from a not-aligned src to an aligned dst, using shifts. Handles 4 words | 161 | /* Copy from a not-aligned src to an aligned dst, using shifts. Handles 4 words |
| 162 | * per loop. This code is derived from glibc. | 162 | * per loop. This code is derived from glibc. |
| 163 | */ | 163 | */ |
| 164 | static inline unsigned long copy_dstaligned(unsigned long dst, | 164 | static noinline unsigned long copy_dstaligned(unsigned long dst, |
| 165 | unsigned long src, unsigned long len) | 165 | unsigned long src, unsigned long len) |
| 166 | { | 166 | { |
| 167 | /* gcc complains that a2 and a3 may be uninitialized, but actually | 167 | /* gcc complains that a2 and a3 may be uninitialized, but actually |
| @@ -276,7 +276,7 @@ handle_store_error: | |||
| 276 | /* Returns PA_MEMCPY_OK, PA_MEMCPY_LOAD_ERROR or PA_MEMCPY_STORE_ERROR. | 276 | /* Returns PA_MEMCPY_OK, PA_MEMCPY_LOAD_ERROR or PA_MEMCPY_STORE_ERROR. |
| 277 | * In case of an access fault the faulty address can be read from the per_cpu | 277 | * In case of an access fault the faulty address can be read from the per_cpu |
| 278 | * exception data struct. */ | 278 | * exception data struct. */ |
| 279 | static unsigned long pa_memcpy_internal(void *dstp, const void *srcp, | 279 | static noinline unsigned long pa_memcpy_internal(void *dstp, const void *srcp, |
| 280 | unsigned long len) | 280 | unsigned long len) |
| 281 | { | 281 | { |
| 282 | register unsigned long src, dst, t1, t2, t3; | 282 | register unsigned long src, dst, t1, t2, t3; |
| @@ -529,7 +529,7 @@ long probe_kernel_read(void *dst, const void *src, size_t size) | |||
| 529 | { | 529 | { |
| 530 | unsigned long addr = (unsigned long)src; | 530 | unsigned long addr = (unsigned long)src; |
| 531 | 531 | ||
| 532 | if (size < 0 || addr < PAGE_SIZE) | 532 | if (addr < PAGE_SIZE) |
| 533 | return -EFAULT; | 533 | return -EFAULT; |
| 534 | 534 | ||
| 535 | /* check for I/O space F_EXTEND(0xfff00000) access as well? */ | 535 | /* check for I/O space F_EXTEND(0xfff00000) access as well? */ |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 7584a5df0fa4..9d08c71a967e 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
| @@ -282,16 +282,34 @@ bad_area: | |||
| 282 | #endif | 282 | #endif |
| 283 | switch (code) { | 283 | switch (code) { |
| 284 | case 15: /* Data TLB miss fault/Data page fault */ | 284 | case 15: /* Data TLB miss fault/Data page fault */ |
| 285 | /* send SIGSEGV when outside of vma */ | ||
| 286 | if (!vma || | ||
| 287 | address < vma->vm_start || address > vma->vm_end) { | ||
| 288 | si.si_signo = SIGSEGV; | ||
| 289 | si.si_code = SEGV_MAPERR; | ||
| 290 | break; | ||
| 291 | } | ||
| 292 | |||
| 293 | /* send SIGSEGV for wrong permissions */ | ||
| 294 | if ((vma->vm_flags & acc_type) != acc_type) { | ||
| 295 | si.si_signo = SIGSEGV; | ||
| 296 | si.si_code = SEGV_ACCERR; | ||
| 297 | break; | ||
| 298 | } | ||
| 299 | |||
| 300 | /* probably address is outside of mapped file */ | ||
| 301 | /* fall through */ | ||
| 285 | case 17: /* NA data TLB miss / page fault */ | 302 | case 17: /* NA data TLB miss / page fault */ |
| 286 | case 18: /* Unaligned access - PCXS only */ | 303 | case 18: /* Unaligned access - PCXS only */ |
| 287 | si.si_signo = SIGBUS; | 304 | si.si_signo = SIGBUS; |
| 288 | si.si_code = BUS_ADRERR; | 305 | si.si_code = (code == 18) ? BUS_ADRALN : BUS_ADRERR; |
| 289 | break; | 306 | break; |
| 290 | case 16: /* Non-access instruction TLB miss fault */ | 307 | case 16: /* Non-access instruction TLB miss fault */ |
| 291 | case 26: /* PCXL: Data memory access rights trap */ | 308 | case 26: /* PCXL: Data memory access rights trap */ |
| 292 | default: | 309 | default: |
| 293 | si.si_signo = SIGSEGV; | 310 | si.si_signo = SIGSEGV; |
| 294 | si.si_code = SEGV_MAPERR; | 311 | si.si_code = (code == 26) ? SEGV_ACCERR : SEGV_MAPERR; |
| 312 | break; | ||
| 295 | } | 313 | } |
| 296 | si.si_errno = 0; | 314 | si.si_errno = 0; |
| 297 | si.si_addr = (void __user *) address; | 315 | si.si_addr = (void __user *) address; |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b0f96c0e6316..96f8168cf4ec 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <asm/sections.h> | 32 | #include <asm/sections.h> |
| 33 | 33 | ||
| 34 | extern int data_start; | 34 | extern int data_start; |
| 35 | extern void parisc_kernel_start(void); /* Kernel entry point in head.S */ | ||
| 35 | 36 | ||
| 36 | #if PT_NLEVELS == 3 | 37 | #if PT_NLEVELS == 3 |
| 37 | /* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout | 38 | /* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout |
| @@ -324,8 +325,9 @@ static void __init setup_bootmem(void) | |||
| 324 | reserve_bootmem_node(NODE_DATA(0), 0UL, | 325 | reserve_bootmem_node(NODE_DATA(0), 0UL, |
| 325 | (unsigned long)(PAGE0->mem_free + | 326 | (unsigned long)(PAGE0->mem_free + |
| 326 | PDC_CONSOLE_IO_IODC_SIZE), BOOTMEM_DEFAULT); | 327 | PDC_CONSOLE_IO_IODC_SIZE), BOOTMEM_DEFAULT); |
| 327 | reserve_bootmem_node(NODE_DATA(0), __pa((unsigned long)_text), | 328 | reserve_bootmem_node(NODE_DATA(0), __pa(KERNEL_BINARY_TEXT_START), |
| 328 | (unsigned long)(_end - _text), BOOTMEM_DEFAULT); | 329 | (unsigned long)(_end - KERNEL_BINARY_TEXT_START), |
| 330 | BOOTMEM_DEFAULT); | ||
| 329 | reserve_bootmem_node(NODE_DATA(0), (bootmap_start_pfn << PAGE_SHIFT), | 331 | reserve_bootmem_node(NODE_DATA(0), (bootmap_start_pfn << PAGE_SHIFT), |
| 330 | ((bootmap_pfn - bootmap_start_pfn) << PAGE_SHIFT), | 332 | ((bootmap_pfn - bootmap_start_pfn) << PAGE_SHIFT), |
| 331 | BOOTMEM_DEFAULT); | 333 | BOOTMEM_DEFAULT); |
| @@ -378,6 +380,17 @@ static void __init setup_bootmem(void) | |||
| 378 | request_resource(&sysram_resources[0], &pdcdata_resource); | 380 | request_resource(&sysram_resources[0], &pdcdata_resource); |
| 379 | } | 381 | } |
| 380 | 382 | ||
| 383 | static int __init parisc_text_address(unsigned long vaddr) | ||
| 384 | { | ||
| 385 | static unsigned long head_ptr __initdata; | ||
| 386 | |||
| 387 | if (!head_ptr) | ||
| 388 | head_ptr = PAGE_MASK & (unsigned long) | ||
| 389 | dereference_function_descriptor(&parisc_kernel_start); | ||
| 390 | |||
| 391 | return core_kernel_text(vaddr) || vaddr == head_ptr; | ||
| 392 | } | ||
| 393 | |||
| 381 | static void __init map_pages(unsigned long start_vaddr, | 394 | static void __init map_pages(unsigned long start_vaddr, |
| 382 | unsigned long start_paddr, unsigned long size, | 395 | unsigned long start_paddr, unsigned long size, |
| 383 | pgprot_t pgprot, int force) | 396 | pgprot_t pgprot, int force) |
| @@ -466,7 +479,7 @@ static void __init map_pages(unsigned long start_vaddr, | |||
| 466 | */ | 479 | */ |
| 467 | if (force) | 480 | if (force) |
| 468 | pte = __mk_pte(address, pgprot); | 481 | pte = __mk_pte(address, pgprot); |
| 469 | else if (core_kernel_text(vaddr) && | 482 | else if (parisc_text_address(vaddr) && |
| 470 | address != fv_addr) | 483 | address != fv_addr) |
| 471 | pte = __mk_pte(address, PAGE_KERNEL_EXEC); | 484 | pte = __mk_pte(address, PAGE_KERNEL_EXEC); |
| 472 | else | 485 | else |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 607acf54a425..0f4344e6fbca 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
| @@ -75,8 +75,10 @@ LDEMULATION := lppc | |||
| 75 | GNUTARGET := powerpcle | 75 | GNUTARGET := powerpcle |
| 76 | MULTIPLEWORD := -mno-multiple | 76 | MULTIPLEWORD := -mno-multiple |
| 77 | else | 77 | else |
| 78 | ifeq ($(call cc-option-yn,-mbig-endian),y) | ||
| 78 | override CC += -mbig-endian | 79 | override CC += -mbig-endian |
| 79 | override AS += -mbig-endian | 80 | override AS += -mbig-endian |
| 81 | endif | ||
| 80 | override LD += -EB | 82 | override LD += -EB |
| 81 | LDEMULATION := ppc | 83 | LDEMULATION := ppc |
| 82 | GNUTARGET := powerpc | 84 | GNUTARGET := powerpc |
| @@ -111,6 +113,7 @@ endif | |||
| 111 | endif | 113 | endif |
| 112 | 114 | ||
| 113 | CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc | 115 | CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc |
| 116 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) | ||
| 114 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) | 117 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) |
| 115 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) | 118 | CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) |
| 116 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) | 119 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) |
| @@ -127,7 +130,12 @@ CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5) | |||
| 127 | CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) | 130 | CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6) |
| 128 | CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) | 131 | CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7) |
| 129 | 132 | ||
| 133 | # Altivec option not allowed with e500mc64 in GCC. | ||
| 134 | ifeq ($(CONFIG_ALTIVEC),y) | ||
| 135 | E5500_CPU := -mcpu=powerpc64 | ||
| 136 | else | ||
| 130 | E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) | 137 | E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) |
| 138 | endif | ||
| 131 | CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) | 139 | CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) |
| 132 | CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) | 140 | CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) |
| 133 | 141 | ||
diff --git a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi index 4c617bf8cdb2..4f6e48277c46 100644 --- a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi | |||
| @@ -223,13 +223,13 @@ | |||
| 223 | reg = <0xe2000 0x1000>; | 223 | reg = <0xe2000 0x1000>; |
| 224 | }; | 224 | }; |
| 225 | 225 | ||
| 226 | /include/ "qoriq-dma-0.dtsi" | 226 | /include/ "elo3-dma-0.dtsi" |
| 227 | dma@100300 { | 227 | dma@100300 { |
| 228 | fsl,iommu-parent = <&pamu0>; | 228 | fsl,iommu-parent = <&pamu0>; |
| 229 | fsl,liodn-reg = <&guts 0x580>; /* DMA1LIODNR */ | 229 | fsl,liodn-reg = <&guts 0x580>; /* DMA1LIODNR */ |
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | /include/ "qoriq-dma-1.dtsi" | 232 | /include/ "elo3-dma-1.dtsi" |
| 233 | dma@101300 { | 233 | dma@101300 { |
| 234 | fsl,iommu-parent = <&pamu0>; | 234 | fsl,iommu-parent = <&pamu0>; |
| 235 | fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */ | 235 | fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */ |
diff --git a/arch/powerpc/boot/dts/fsl/elo3-dma-0.dtsi b/arch/powerpc/boot/dts/fsl/elo3-dma-0.dtsi new file mode 100644 index 000000000000..3c210e0d5201 --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/elo3-dma-0.dtsi | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* | ||
| 2 | * QorIQ Elo3 DMA device tree stub [ controller @ offset 0x100000 ] | ||
| 3 | * | ||
| 4 | * Copyright 2013 Freescale Semiconductor Inc. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions are met: | ||
| 8 | * * Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * * Redistributions in binary form must reproduce the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer in the | ||
| 12 | * documentation and/or other materials provided with the distribution. | ||
| 13 | * * Neither the name of Freescale Semiconductor nor the | ||
| 14 | * names of its contributors may be used to endorse or promote products | ||
| 15 | * derived from this software without specific prior written permission. | ||
| 16 | * | ||
| 17 | * | ||
| 18 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
| 19 | * GNU General Public License ("GPL") as published by the Free Software | ||
| 20 | * Foundation, either version 2 of that License or (at your option) any | ||
| 21 | * later version. | ||
| 22 | * | ||
| 23 | * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY | ||
| 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 25 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 26 | * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY | ||
| 27 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| 28 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 30 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 33 | */ | ||
| 34 | |||
| 35 | dma0: dma@100300 { | ||
| 36 | #address-cells = <1>; | ||
| 37 | #size-cells = <1>; | ||
| 38 | compatible = "fsl,elo3-dma"; | ||
| 39 | reg = <0x100300 0x4>, | ||
| 40 | <0x100600 0x4>; | ||
| 41 | ranges = <0x0 0x100100 0x500>; | ||
| 42 | dma-channel@0 { | ||
| 43 | compatible = "fsl,eloplus-dma-channel"; | ||
| 44 | reg = <0x0 0x80>; | ||
| 45 | interrupts = <28 2 0 0>; | ||
| 46 | }; | ||
| 47 | dma-channel@80 { | ||
| 48 | compatible = "fsl,eloplus-dma-channel"; | ||
| 49 | reg = <0x80 0x80>; | ||
| 50 | interrupts = <29 2 0 0>; | ||
| 51 | }; | ||
| 52 | dma-channel@100 { | ||
| 53 | compatible = "fsl,eloplus-dma-channel"; | ||
| 54 | reg = <0x100 0x80>; | ||
| 55 | interrupts = <30 2 0 0>; | ||
| 56 | }; | ||
| 57 | dma-channel@180 { | ||
| 58 | compatible = "fsl,eloplus-dma-channel"; | ||
| 59 | reg = <0x180 0x80>; | ||
| 60 | interrupts = <31 2 0 0>; | ||
| 61 | }; | ||
| 62 | dma-channel@300 { | ||
| 63 | compatible = "fsl,eloplus-dma-channel"; | ||
| 64 | reg = <0x300 0x80>; | ||
| 65 | interrupts = <76 2 0 0>; | ||
| 66 | }; | ||
| 67 | dma-channel@380 { | ||
| 68 | compatible = "fsl,eloplus-dma-channel"; | ||
| 69 | reg = <0x380 0x80>; | ||
| 70 | interrupts = <77 2 0 0>; | ||
| 71 | }; | ||
| 72 | dma-channel@400 { | ||
| 73 | compatible = "fsl,eloplus-dma-channel"; | ||
| 74 | reg = <0x400 0x80>; | ||
| 75 | interrupts = <78 2 0 0>; | ||
| 76 | }; | ||
| 77 | dma-channel@480 { | ||
| 78 | compatible = "fsl,eloplus-dma-channel"; | ||
| 79 | reg = <0x480 0x80>; | ||
| 80 | interrupts = <79 2 0 0>; | ||
| 81 | }; | ||
| 82 | }; | ||
diff --git a/arch/powerpc/boot/dts/fsl/elo3-dma-1.dtsi b/arch/powerpc/boot/dts/fsl/elo3-dma-1.dtsi new file mode 100644 index 000000000000..cccf3bb38224 --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/elo3-dma-1.dtsi | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* | ||
| 2 | * QorIQ Elo3 DMA device tree stub [ controller @ offset 0x101000 ] | ||
| 3 | * | ||
| 4 | * Copyright 2013 Freescale Semiconductor Inc. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions are met: | ||
| 8 | * * Redistributions of source code must retain the above copyright | ||
| 9 | * notice, this list of conditions and the following disclaimer. | ||
| 10 | * * Redistributions in binary form must reproduce the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer in the | ||
| 12 | * documentation and/or other materials provided with the distribution. | ||
| 13 | * * Neither the name of Freescale Semiconductor nor the | ||
| 14 | * names of its contributors may be used to endorse or promote products | ||
| 15 | * derived from this software without specific prior written permission. | ||
| 16 | * | ||
| 17 | * | ||
| 18 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
| 19 | * GNU General Public License ("GPL") as published by the Free Software | ||
| 20 | * Foundation, either version 2 of that License or (at your option) any | ||
| 21 | * later version. | ||
| 22 | * | ||
| 23 | * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY | ||
| 24 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 25 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 26 | * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY | ||
| 27 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| 28 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 29 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 30 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 32 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 33 | */ | ||
| 34 | |||
| 35 | dma1: dma@101300 { | ||
| 36 | #address-cells = <1>; | ||
| 37 | #size-cells = <1>; | ||
| 38 | compatible = "fsl,elo3-dma"; | ||
| 39 | reg = <0x101300 0x4>, | ||
| 40 | <0x101600 0x4>; | ||
| 41 | ranges = <0x0 0x101100 0x500>; | ||
| 42 | dma-channel@0 { | ||
| 43 | compatible = "fsl,eloplus-dma-channel"; | ||
| 44 | reg = <0x0 0x80>; | ||
| 45 | interrupts = <32 2 0 0>; | ||
| 46 | }; | ||
| 47 | dma-channel@80 { | ||
| 48 | compatible = "fsl,eloplus-dma-channel"; | ||
| 49 | reg = <0x80 0x80>; | ||
| 50 | interrupts = <33 2 0 0>; | ||
| 51 | }; | ||
| 52 | dma-channel@100 { | ||
| 53 | compatible = "fsl,eloplus-dma-channel"; | ||
| 54 | reg = <0x100 0x80>; | ||
| 55 | interrupts = <34 2 0 0>; | ||
| 56 | }; | ||
| 57 | dma-channel@180 { | ||
| 58 | compatible = "fsl,eloplus-dma-channel"; | ||
| 59 | reg = <0x180 0x80>; | ||
| 60 | interrupts = <35 2 0 0>; | ||
| 61 | }; | ||
| 62 | dma-channel@300 { | ||
| 63 | compatible = "fsl,eloplus-dma-channel"; | ||
| 64 | reg = <0x300 0x80>; | ||
| 65 | interrupts = <80 2 0 0>; | ||
| 66 | }; | ||
| 67 | dma-channel@380 { | ||
| 68 | compatible = "fsl,eloplus-dma-channel"; | ||
| 69 | reg = <0x380 0x80>; | ||
| 70 | interrupts = <81 2 0 0>; | ||
| 71 | }; | ||
| 72 | dma-channel@400 { | ||
| 73 | compatible = "fsl,eloplus-dma-channel"; | ||
| 74 | reg = <0x400 0x80>; | ||
| 75 | interrupts = <82 2 0 0>; | ||
| 76 | }; | ||
| 77 | dma-channel@480 { | ||
| 78 | compatible = "fsl,eloplus-dma-channel"; | ||
| 79 | reg = <0x480 0x80>; | ||
| 80 | interrupts = <83 2 0 0>; | ||
| 81 | }; | ||
| 82 | }; | ||
diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi index 510afa362de1..4143a9733cd0 100644 --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | |||
| @@ -387,8 +387,8 @@ | |||
| 387 | reg = <0xea000 0x4000>; | 387 | reg = <0xea000 0x4000>; |
| 388 | }; | 388 | }; |
| 389 | 389 | ||
| 390 | /include/ "qoriq-dma-0.dtsi" | 390 | /include/ "elo3-dma-0.dtsi" |
| 391 | /include/ "qoriq-dma-1.dtsi" | 391 | /include/ "elo3-dma-1.dtsi" |
| 392 | 392 | ||
| 393 | /include/ "qoriq-espi-0.dtsi" | 393 | /include/ "qoriq-espi-0.dtsi" |
| 394 | spi@110000 { | 394 | spi@110000 { |
diff --git a/arch/powerpc/boot/dts/mpc5121.dtsi b/arch/powerpc/boot/dts/mpc5121.dtsi index bd14c00e5146..2d7cb04ac962 100644 --- a/arch/powerpc/boot/dts/mpc5121.dtsi +++ b/arch/powerpc/boot/dts/mpc5121.dtsi | |||
| @@ -77,7 +77,6 @@ | |||
| 77 | compatible = "fsl,mpc5121-immr"; | 77 | compatible = "fsl,mpc5121-immr"; |
| 78 | #address-cells = <1>; | 78 | #address-cells = <1>; |
| 79 | #size-cells = <1>; | 79 | #size-cells = <1>; |
| 80 | #interrupt-cells = <2>; | ||
| 81 | ranges = <0x0 0x80000000 0x400000>; | 80 | ranges = <0x0 0x80000000 0x400000>; |
| 82 | reg = <0x80000000 0x400000>; | 81 | reg = <0x80000000 0x400000>; |
| 83 | bus-frequency = <66000000>; /* 66 MHz ips bus */ | 82 | bus-frequency = <66000000>; /* 66 MHz ips bus */ |
diff --git a/arch/powerpc/boot/dts/xcalibur1501.dts b/arch/powerpc/boot/dts/xcalibur1501.dts index cc00f4ddd9a7..c409cbafb126 100644 --- a/arch/powerpc/boot/dts/xcalibur1501.dts +++ b/arch/powerpc/boot/dts/xcalibur1501.dts | |||
| @@ -637,14 +637,14 @@ | |||
| 637 | tlu@2f000 { | 637 | tlu@2f000 { |
| 638 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 638 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 639 | reg = <0x2f000 0x1000>; | 639 | reg = <0x2f000 0x1000>; |
| 640 | interupts = <61 2 >; | 640 | interrupts = <61 2>; |
| 641 | interrupt-parent = <&mpic>; | 641 | interrupt-parent = <&mpic>; |
| 642 | }; | 642 | }; |
| 643 | 643 | ||
| 644 | tlu@15000 { | 644 | tlu@15000 { |
| 645 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 645 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 646 | reg = <0x15000 0x1000>; | 646 | reg = <0x15000 0x1000>; |
| 647 | interupts = <75 2>; | 647 | interrupts = <75 2>; |
| 648 | interrupt-parent = <&mpic>; | 648 | interrupt-parent = <&mpic>; |
| 649 | }; | 649 | }; |
| 650 | }; | 650 | }; |
diff --git a/arch/powerpc/boot/dts/xpedite5301.dts b/arch/powerpc/boot/dts/xpedite5301.dts index 53c1c6a9752f..04cb410da48b 100644 --- a/arch/powerpc/boot/dts/xpedite5301.dts +++ b/arch/powerpc/boot/dts/xpedite5301.dts | |||
| @@ -547,14 +547,14 @@ | |||
| 547 | tlu@2f000 { | 547 | tlu@2f000 { |
| 548 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 548 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 549 | reg = <0x2f000 0x1000>; | 549 | reg = <0x2f000 0x1000>; |
| 550 | interupts = <61 2 >; | 550 | interrupts = <61 2>; |
| 551 | interrupt-parent = <&mpic>; | 551 | interrupt-parent = <&mpic>; |
| 552 | }; | 552 | }; |
| 553 | 553 | ||
| 554 | tlu@15000 { | 554 | tlu@15000 { |
| 555 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 555 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 556 | reg = <0x15000 0x1000>; | 556 | reg = <0x15000 0x1000>; |
| 557 | interupts = <75 2>; | 557 | interrupts = <75 2>; |
| 558 | interrupt-parent = <&mpic>; | 558 | interrupt-parent = <&mpic>; |
| 559 | }; | 559 | }; |
| 560 | }; | 560 | }; |
diff --git a/arch/powerpc/boot/dts/xpedite5330.dts b/arch/powerpc/boot/dts/xpedite5330.dts index 215225983150..73f8620f1ce7 100644 --- a/arch/powerpc/boot/dts/xpedite5330.dts +++ b/arch/powerpc/boot/dts/xpedite5330.dts | |||
| @@ -583,14 +583,14 @@ | |||
| 583 | tlu@2f000 { | 583 | tlu@2f000 { |
| 584 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 584 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 585 | reg = <0x2f000 0x1000>; | 585 | reg = <0x2f000 0x1000>; |
| 586 | interupts = <61 2 >; | 586 | interrupts = <61 2>; |
| 587 | interrupt-parent = <&mpic>; | 587 | interrupt-parent = <&mpic>; |
| 588 | }; | 588 | }; |
| 589 | 589 | ||
| 590 | tlu@15000 { | 590 | tlu@15000 { |
| 591 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 591 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 592 | reg = <0x15000 0x1000>; | 592 | reg = <0x15000 0x1000>; |
| 593 | interupts = <75 2>; | 593 | interrupts = <75 2>; |
| 594 | interrupt-parent = <&mpic>; | 594 | interrupt-parent = <&mpic>; |
| 595 | }; | 595 | }; |
| 596 | }; | 596 | }; |
diff --git a/arch/powerpc/boot/dts/xpedite5370.dts b/arch/powerpc/boot/dts/xpedite5370.dts index 11dbda10d756..cd0ea2b99362 100644 --- a/arch/powerpc/boot/dts/xpedite5370.dts +++ b/arch/powerpc/boot/dts/xpedite5370.dts | |||
| @@ -545,14 +545,14 @@ | |||
| 545 | tlu@2f000 { | 545 | tlu@2f000 { |
| 546 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 546 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 547 | reg = <0x2f000 0x1000>; | 547 | reg = <0x2f000 0x1000>; |
| 548 | interupts = <61 2 >; | 548 | interrupts = <61 2>; |
| 549 | interrupt-parent = <&mpic>; | 549 | interrupt-parent = <&mpic>; |
| 550 | }; | 550 | }; |
| 551 | 551 | ||
| 552 | tlu@15000 { | 552 | tlu@15000 { |
| 553 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; | 553 | compatible = "fsl,mpc8572-tlu", "fsl_tlu"; |
| 554 | reg = <0x15000 0x1000>; | 554 | reg = <0x15000 0x1000>; |
| 555 | interupts = <75 2>; | 555 | interrupts = <75 2>; |
| 556 | interrupt-parent = <&mpic>; | 556 | interrupt-parent = <&mpic>; |
| 557 | }; | 557 | }; |
| 558 | }; | 558 | }; |
diff --git a/arch/powerpc/boot/util.S b/arch/powerpc/boot/util.S index 5143228e3e5f..6636b1d7821b 100644 --- a/arch/powerpc/boot/util.S +++ b/arch/powerpc/boot/util.S | |||
| @@ -71,18 +71,32 @@ udelay: | |||
| 71 | add r4,r4,r5 | 71 | add r4,r4,r5 |
| 72 | addi r4,r4,-1 | 72 | addi r4,r4,-1 |
| 73 | divw r4,r4,r5 /* BUS ticks */ | 73 | divw r4,r4,r5 /* BUS ticks */ |
| 74 | #ifdef CONFIG_8xx | ||
| 75 | 1: mftbu r5 | ||
| 76 | mftb r6 | ||
| 77 | mftbu r7 | ||
| 78 | #else | ||
| 74 | 1: mfspr r5, SPRN_TBRU | 79 | 1: mfspr r5, SPRN_TBRU |
| 75 | mfspr r6, SPRN_TBRL | 80 | mfspr r6, SPRN_TBRL |
| 76 | mfspr r7, SPRN_TBRU | 81 | mfspr r7, SPRN_TBRU |
| 82 | #endif | ||
| 77 | cmpw 0,r5,r7 | 83 | cmpw 0,r5,r7 |
| 78 | bne 1b /* Get [synced] base time */ | 84 | bne 1b /* Get [synced] base time */ |
| 79 | addc r9,r6,r4 /* Compute end time */ | 85 | addc r9,r6,r4 /* Compute end time */ |
| 80 | addze r8,r5 | 86 | addze r8,r5 |
| 87 | #ifdef CONFIG_8xx | ||
| 88 | 2: mftbu r5 | ||
| 89 | #else | ||
| 81 | 2: mfspr r5, SPRN_TBRU | 90 | 2: mfspr r5, SPRN_TBRU |
| 91 | #endif | ||
| 82 | cmpw 0,r5,r8 | 92 | cmpw 0,r5,r8 |
| 83 | blt 2b | 93 | blt 2b |
| 84 | bgt 3f | 94 | bgt 3f |
| 95 | #ifdef CONFIG_8xx | ||
| 96 | mftb r6 | ||
| 97 | #else | ||
| 85 | mfspr r6, SPRN_TBRL | 98 | mfspr r6, SPRN_TBRL |
| 99 | #endif | ||
| 86 | cmpw 0,r6,r9 | 100 | cmpw 0,r6,r9 |
| 87 | blt 2b | 101 | blt 2b |
| 88 | 3: blr | 102 | 3: blr |
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig index 69b57daf402e..0b88c7b30bb9 100644 --- a/arch/powerpc/configs/52xx/cm5200_defconfig +++ b/arch/powerpc/configs/52xx/cm5200_defconfig | |||
| @@ -12,7 +12,6 @@ CONFIG_EXPERT=y | |||
| 12 | CONFIG_PPC_MPC52xx=y | 12 | CONFIG_PPC_MPC52xx=y |
| 13 | CONFIG_PPC_MPC5200_SIMPLE=y | 13 | CONFIG_PPC_MPC5200_SIMPLE=y |
| 14 | # CONFIG_PPC_PMAC is not set | 14 | # CONFIG_PPC_PMAC is not set |
| 15 | CONFIG_PPC_BESTCOMM=y | ||
| 16 | CONFIG_SPARSE_IRQ=y | 15 | CONFIG_SPARSE_IRQ=y |
| 17 | CONFIG_PM=y | 16 | CONFIG_PM=y |
| 18 | # CONFIG_PCI is not set | 17 | # CONFIG_PCI is not set |
| @@ -71,6 +70,8 @@ CONFIG_USB_DEVICEFS=y | |||
| 71 | CONFIG_USB_OHCI_HCD=y | 70 | CONFIG_USB_OHCI_HCD=y |
| 72 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | 71 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y |
| 73 | CONFIG_USB_STORAGE=y | 72 | CONFIG_USB_STORAGE=y |
| 73 | CONFIG_DMADEVICES=y | ||
| 74 | CONFIG_PPC_BESTCOMM=y | ||
| 74 | CONFIG_EXT2_FS=y | 75 | CONFIG_EXT2_FS=y |
| 75 | CONFIG_EXT3_FS=y | 76 | CONFIG_EXT3_FS=y |
| 76 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 77 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig index f3638ae0a627..104a332e79ab 100644 --- a/arch/powerpc/configs/52xx/lite5200b_defconfig +++ b/arch/powerpc/configs/52xx/lite5200b_defconfig | |||
| @@ -15,7 +15,6 @@ CONFIG_PPC_MPC52xx=y | |||
| 15 | CONFIG_PPC_MPC5200_SIMPLE=y | 15 | CONFIG_PPC_MPC5200_SIMPLE=y |
| 16 | CONFIG_PPC_LITE5200=y | 16 | CONFIG_PPC_LITE5200=y |
| 17 | # CONFIG_PPC_PMAC is not set | 17 | # CONFIG_PPC_PMAC is not set |
| 18 | CONFIG_PPC_BESTCOMM=y | ||
| 19 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
| 20 | CONFIG_HIGH_RES_TIMERS=y | 19 | CONFIG_HIGH_RES_TIMERS=y |
| 21 | CONFIG_SPARSE_IRQ=y | 20 | CONFIG_SPARSE_IRQ=y |
| @@ -59,6 +58,8 @@ CONFIG_I2C_CHARDEV=y | |||
| 59 | CONFIG_I2C_MPC=y | 58 | CONFIG_I2C_MPC=y |
| 60 | # CONFIG_HWMON is not set | 59 | # CONFIG_HWMON is not set |
| 61 | CONFIG_VIDEO_OUTPUT_CONTROL=m | 60 | CONFIG_VIDEO_OUTPUT_CONTROL=m |
| 61 | CONFIG_DMADEVICES=y | ||
| 62 | CONFIG_PPC_BESTCOMM=y | ||
| 62 | CONFIG_EXT2_FS=y | 63 | CONFIG_EXT2_FS=y |
| 63 | CONFIG_EXT3_FS=y | 64 | CONFIG_EXT3_FS=y |
| 64 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 65 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index 0c7de9620ea6..0d13ad7e4478 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
| @@ -12,7 +12,6 @@ CONFIG_EXPERT=y | |||
| 12 | CONFIG_PPC_MPC52xx=y | 12 | CONFIG_PPC_MPC52xx=y |
| 13 | CONFIG_PPC_MPC5200_SIMPLE=y | 13 | CONFIG_PPC_MPC5200_SIMPLE=y |
| 14 | # CONFIG_PPC_PMAC is not set | 14 | # CONFIG_PPC_PMAC is not set |
| 15 | CONFIG_PPC_BESTCOMM=y | ||
| 16 | CONFIG_SPARSE_IRQ=y | 15 | CONFIG_SPARSE_IRQ=y |
| 17 | CONFIG_PM=y | 16 | CONFIG_PM=y |
| 18 | # CONFIG_PCI is not set | 17 | # CONFIG_PCI is not set |
| @@ -84,6 +83,8 @@ CONFIG_LEDS_TRIGGERS=y | |||
| 84 | CONFIG_LEDS_TRIGGER_TIMER=y | 83 | CONFIG_LEDS_TRIGGER_TIMER=y |
| 85 | CONFIG_RTC_CLASS=y | 84 | CONFIG_RTC_CLASS=y |
| 86 | CONFIG_RTC_DRV_DS1307=y | 85 | CONFIG_RTC_DRV_DS1307=y |
| 86 | CONFIG_DMADEVICES=y | ||
| 87 | CONFIG_PPC_BESTCOMM=y | ||
| 87 | CONFIG_EXT2_FS=y | 88 | CONFIG_EXT2_FS=y |
| 88 | CONFIG_EXT3_FS=y | 89 | CONFIG_EXT3_FS=y |
| 89 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 90 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig index 22e719575c60..430aa182fa1c 100644 --- a/arch/powerpc/configs/52xx/pcm030_defconfig +++ b/arch/powerpc/configs/52xx/pcm030_defconfig | |||
| @@ -21,7 +21,6 @@ CONFIG_MODULE_UNLOAD=y | |||
| 21 | CONFIG_PPC_MPC52xx=y | 21 | CONFIG_PPC_MPC52xx=y |
| 22 | CONFIG_PPC_MPC5200_SIMPLE=y | 22 | CONFIG_PPC_MPC5200_SIMPLE=y |
| 23 | # CONFIG_PPC_PMAC is not set | 23 | # CONFIG_PPC_PMAC is not set |
| 24 | CONFIG_PPC_BESTCOMM=y | ||
| 25 | CONFIG_NO_HZ=y | 24 | CONFIG_NO_HZ=y |
| 26 | CONFIG_HIGH_RES_TIMERS=y | 25 | CONFIG_HIGH_RES_TIMERS=y |
| 27 | CONFIG_HZ_100=y | 26 | CONFIG_HZ_100=y |
| @@ -87,6 +86,8 @@ CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | |||
| 87 | CONFIG_USB_STORAGE=m | 86 | CONFIG_USB_STORAGE=m |
| 88 | CONFIG_RTC_CLASS=y | 87 | CONFIG_RTC_CLASS=y |
| 89 | CONFIG_RTC_DRV_PCF8563=m | 88 | CONFIG_RTC_DRV_PCF8563=m |
| 89 | CONFIG_DMADEVICES=y | ||
| 90 | CONFIG_PPC_BESTCOMM=y | ||
| 90 | CONFIG_EXT2_FS=m | 91 | CONFIG_EXT2_FS=m |
| 91 | CONFIG_EXT3_FS=m | 92 | CONFIG_EXT3_FS=m |
| 92 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 93 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig index 716a37be16e3..7af4c5bb7c63 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig | |||
| @@ -17,7 +17,6 @@ CONFIG_PPC_MPC52xx=y | |||
| 17 | CONFIG_PPC_MPC5200_SIMPLE=y | 17 | CONFIG_PPC_MPC5200_SIMPLE=y |
| 18 | CONFIG_PPC_MPC5200_BUGFIX=y | 18 | CONFIG_PPC_MPC5200_BUGFIX=y |
| 19 | # CONFIG_PPC_PMAC is not set | 19 | # CONFIG_PPC_PMAC is not set |
| 20 | CONFIG_PPC_BESTCOMM=y | ||
| 21 | CONFIG_PM=y | 20 | CONFIG_PM=y |
| 22 | # CONFIG_PCI is not set | 21 | # CONFIG_PCI is not set |
| 23 | CONFIG_NET=y | 22 | CONFIG_NET=y |
| @@ -86,6 +85,8 @@ CONFIG_USB_STORAGE=y | |||
| 86 | CONFIG_RTC_CLASS=y | 85 | CONFIG_RTC_CLASS=y |
| 87 | CONFIG_RTC_DRV_DS1307=y | 86 | CONFIG_RTC_DRV_DS1307=y |
| 88 | CONFIG_RTC_DRV_DS1374=y | 87 | CONFIG_RTC_DRV_DS1374=y |
| 88 | CONFIG_DMADEVICES=y | ||
| 89 | CONFIG_PPC_BESTCOMM=y | ||
| 89 | CONFIG_EXT2_FS=y | 90 | CONFIG_EXT2_FS=y |
| 90 | CONFIG_EXT3_FS=y | 91 | CONFIG_EXT3_FS=y |
| 91 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 92 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 6640a35bebb7..8b682d1cf4d6 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig | |||
| @@ -15,7 +15,6 @@ CONFIG_PPC_MEDIA5200=y | |||
| 15 | CONFIG_PPC_MPC5200_BUGFIX=y | 15 | CONFIG_PPC_MPC5200_BUGFIX=y |
| 16 | CONFIG_PPC_MPC5200_LPBFIFO=m | 16 | CONFIG_PPC_MPC5200_LPBFIFO=m |
| 17 | # CONFIG_PPC_PMAC is not set | 17 | # CONFIG_PPC_PMAC is not set |
| 18 | CONFIG_PPC_BESTCOMM=y | ||
| 19 | CONFIG_SIMPLE_GPIO=y | 18 | CONFIG_SIMPLE_GPIO=y |
| 20 | CONFIG_NO_HZ=y | 19 | CONFIG_NO_HZ=y |
| 21 | CONFIG_HIGH_RES_TIMERS=y | 20 | CONFIG_HIGH_RES_TIMERS=y |
| @@ -125,6 +124,8 @@ CONFIG_RTC_CLASS=y | |||
| 125 | CONFIG_RTC_DRV_DS1307=y | 124 | CONFIG_RTC_DRV_DS1307=y |
| 126 | CONFIG_RTC_DRV_DS1374=y | 125 | CONFIG_RTC_DRV_DS1374=y |
| 127 | CONFIG_RTC_DRV_PCF8563=m | 126 | CONFIG_RTC_DRV_PCF8563=m |
| 127 | CONFIG_DMADEVICES=y | ||
| 128 | CONFIG_PPC_BESTCOMM=y | ||
| 128 | CONFIG_EXT2_FS=y | 129 | CONFIG_EXT2_FS=y |
| 129 | CONFIG_EXT3_FS=y | 130 | CONFIG_EXT3_FS=y |
| 130 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 131 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index bd8a6f71944f..cec044a3ff69 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
| @@ -2,7 +2,6 @@ CONFIG_PPC64=y | |||
| 2 | CONFIG_ALTIVEC=y | 2 | CONFIG_ALTIVEC=y |
| 3 | CONFIG_SMP=y | 3 | CONFIG_SMP=y |
| 4 | CONFIG_NR_CPUS=2 | 4 | CONFIG_NR_CPUS=2 |
| 5 | CONFIG_EXPERIMENTAL=y | ||
| 6 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
| 7 | CONFIG_NO_HZ=y | 6 | CONFIG_NO_HZ=y |
| 8 | CONFIG_HIGH_RES_TIMERS=y | 7 | CONFIG_HIGH_RES_TIMERS=y |
| @@ -45,8 +44,9 @@ CONFIG_INET_AH=y | |||
| 45 | CONFIG_INET_ESP=y | 44 | CONFIG_INET_ESP=y |
| 46 | # CONFIG_IPV6 is not set | 45 | # CONFIG_IPV6 is not set |
| 47 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 46 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| 47 | CONFIG_DEVTMPFS=y | ||
| 48 | CONFIG_DEVTMPFS_MOUNT=y | ||
| 48 | CONFIG_MTD=y | 49 | CONFIG_MTD=y |
| 49 | CONFIG_MTD_CHAR=y | ||
| 50 | CONFIG_MTD_BLOCK=y | 50 | CONFIG_MTD_BLOCK=y |
| 51 | CONFIG_MTD_SLRAM=y | 51 | CONFIG_MTD_SLRAM=y |
| 52 | CONFIG_MTD_PHRAM=y | 52 | CONFIG_MTD_PHRAM=y |
| @@ -88,7 +88,6 @@ CONFIG_BLK_DEV_DM=y | |||
| 88 | CONFIG_DM_CRYPT=y | 88 | CONFIG_DM_CRYPT=y |
| 89 | CONFIG_NETDEVICES=y | 89 | CONFIG_NETDEVICES=y |
| 90 | CONFIG_DUMMY=y | 90 | CONFIG_DUMMY=y |
| 91 | CONFIG_MII=y | ||
| 92 | CONFIG_TIGON3=y | 91 | CONFIG_TIGON3=y |
| 93 | CONFIG_E1000=y | 92 | CONFIG_E1000=y |
| 94 | CONFIG_PASEMI_MAC=y | 93 | CONFIG_PASEMI_MAC=y |
| @@ -174,8 +173,8 @@ CONFIG_NLS_CODEPAGE_437=y | |||
| 174 | CONFIG_NLS_ISO8859_1=y | 173 | CONFIG_NLS_ISO8859_1=y |
| 175 | CONFIG_CRC_CCITT=y | 174 | CONFIG_CRC_CCITT=y |
| 176 | CONFIG_PRINTK_TIME=y | 175 | CONFIG_PRINTK_TIME=y |
| 177 | CONFIG_MAGIC_SYSRQ=y | ||
| 178 | CONFIG_DEBUG_FS=y | 176 | CONFIG_DEBUG_FS=y |
| 177 | CONFIG_MAGIC_SYSRQ=y | ||
| 179 | CONFIG_DEBUG_KERNEL=y | 178 | CONFIG_DEBUG_KERNEL=y |
| 180 | CONFIG_DETECT_HUNG_TASK=y | 179 | CONFIG_DETECT_HUNG_TASK=y |
| 181 | # CONFIG_SCHED_DEBUG is not set | 180 | # CONFIG_SCHED_DEBUG is not set |
diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs/pseries_le_defconfig new file mode 100644 index 000000000000..62771e0adb7c --- /dev/null +++ b/arch/powerpc/configs/pseries_le_defconfig | |||
| @@ -0,0 +1,352 @@ | |||
| 1 | CONFIG_PPC64=y | ||
| 2 | CONFIG_ALTIVEC=y | ||
| 3 | CONFIG_VSX=y | ||
| 4 | CONFIG_SMP=y | ||
| 5 | CONFIG_NR_CPUS=2048 | ||
| 6 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
| 7 | CONFIG_SYSVIPC=y | ||
| 8 | CONFIG_POSIX_MQUEUE=y | ||
| 9 | CONFIG_AUDIT=y | ||
| 10 | CONFIG_AUDITSYSCALL=y | ||
| 11 | CONFIG_IRQ_DOMAIN_DEBUG=y | ||
| 12 | CONFIG_NO_HZ=y | ||
| 13 | CONFIG_HIGH_RES_TIMERS=y | ||
| 14 | CONFIG_TASKSTATS=y | ||
| 15 | CONFIG_TASK_DELAY_ACCT=y | ||
| 16 | CONFIG_TASK_XACCT=y | ||
| 17 | CONFIG_TASK_IO_ACCOUNTING=y | ||
| 18 | CONFIG_IKCONFIG=y | ||
| 19 | CONFIG_IKCONFIG_PROC=y | ||
| 20 | CONFIG_CGROUPS=y | ||
| 21 | CONFIG_CGROUP_FREEZER=y | ||
| 22 | CONFIG_CGROUP_DEVICE=y | ||
| 23 | CONFIG_CPUSETS=y | ||
| 24 | CONFIG_CGROUP_CPUACCT=y | ||
| 25 | CONFIG_BLK_DEV_INITRD=y | ||
| 26 | # CONFIG_COMPAT_BRK is not set | ||
| 27 | CONFIG_PROFILING=y | ||
| 28 | CONFIG_OPROFILE=y | ||
| 29 | CONFIG_KPROBES=y | ||
| 30 | CONFIG_JUMP_LABEL=y | ||
| 31 | CONFIG_MODULES=y | ||
| 32 | CONFIG_MODULE_UNLOAD=y | ||
| 33 | CONFIG_MODVERSIONS=y | ||
| 34 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
| 35 | CONFIG_PARTITION_ADVANCED=y | ||
| 36 | CONFIG_PPC_SPLPAR=y | ||
| 37 | CONFIG_SCANLOG=m | ||
| 38 | CONFIG_PPC_SMLPAR=y | ||
| 39 | CONFIG_DTL=y | ||
| 40 | # CONFIG_PPC_PMAC is not set | ||
| 41 | CONFIG_RTAS_FLASH=m | ||
| 42 | CONFIG_IBMEBUS=y | ||
| 43 | CONFIG_HZ_100=y | ||
| 44 | CONFIG_BINFMT_MISC=m | ||
| 45 | CONFIG_PPC_TRANSACTIONAL_MEM=y | ||
| 46 | CONFIG_KEXEC=y | ||
| 47 | CONFIG_IRQ_ALL_CPUS=y | ||
| 48 | CONFIG_MEMORY_HOTPLUG=y | ||
| 49 | CONFIG_MEMORY_HOTREMOVE=y | ||
| 50 | CONFIG_CMA=y | ||
| 51 | CONFIG_PPC_64K_PAGES=y | ||
| 52 | CONFIG_PPC_SUBPAGE_PROT=y | ||
| 53 | CONFIG_SCHED_SMT=y | ||
| 54 | CONFIG_HOTPLUG_PCI=y | ||
| 55 | CONFIG_HOTPLUG_PCI_RPA=m | ||
| 56 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | ||
| 57 | CONFIG_PACKET=y | ||
| 58 | CONFIG_UNIX=y | ||
| 59 | CONFIG_XFRM_USER=m | ||
| 60 | CONFIG_NET_KEY=m | ||
| 61 | CONFIG_INET=y | ||
| 62 | CONFIG_IP_MULTICAST=y | ||
| 63 | CONFIG_NET_IPIP=y | ||
| 64 | CONFIG_SYN_COOKIES=y | ||
| 65 | CONFIG_INET_AH=m | ||
| 66 | CONFIG_INET_ESP=m | ||
| 67 | CONFIG_INET_IPCOMP=m | ||
| 68 | # CONFIG_IPV6 is not set | ||
| 69 | CONFIG_NETFILTER=y | ||
| 70 | CONFIG_NF_CONNTRACK=m | ||
| 71 | CONFIG_NF_CONNTRACK_EVENTS=y | ||
| 72 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
| 73 | CONFIG_NF_CONNTRACK_FTP=m | ||
| 74 | CONFIG_NF_CONNTRACK_IRC=m | ||
| 75 | CONFIG_NF_CONNTRACK_TFTP=m | ||
| 76 | CONFIG_NF_CT_NETLINK=m | ||
| 77 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
| 78 | CONFIG_NETFILTER_XT_TARGET_CONNMARK=m | ||
| 79 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
| 80 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
| 81 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
| 82 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
| 83 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
| 84 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
| 85 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
| 86 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
| 87 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
| 88 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
| 89 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
| 90 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
| 91 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
| 92 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
| 93 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | ||
| 94 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
| 95 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
| 96 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
| 97 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
| 98 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
| 99 | CONFIG_NETFILTER_XT_MATCH_OWNER=m | ||
| 100 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
| 101 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
| 102 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
| 103 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m | ||
| 104 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
| 105 | CONFIG_NETFILTER_XT_MATCH_RECENT=m | ||
| 106 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
| 107 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
| 108 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
| 109 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
| 110 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
| 111 | CONFIG_NETFILTER_XT_MATCH_TIME=m | ||
| 112 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
| 113 | CONFIG_NF_CONNTRACK_IPV4=m | ||
| 114 | CONFIG_IP_NF_IPTABLES=m | ||
| 115 | CONFIG_IP_NF_MATCH_AH=m | ||
| 116 | CONFIG_IP_NF_MATCH_ECN=m | ||
| 117 | CONFIG_IP_NF_MATCH_TTL=m | ||
| 118 | CONFIG_IP_NF_FILTER=m | ||
| 119 | CONFIG_IP_NF_TARGET_REJECT=m | ||
| 120 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 121 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 122 | CONFIG_DEVTMPFS=y | ||
| 123 | CONFIG_DEVTMPFS_MOUNT=y | ||
| 124 | CONFIG_PROC_DEVICETREE=y | ||
| 125 | CONFIG_PARPORT=m | ||
| 126 | CONFIG_PARPORT_PC=m | ||
| 127 | CONFIG_BLK_DEV_FD=m | ||
| 128 | CONFIG_BLK_DEV_LOOP=y | ||
| 129 | CONFIG_BLK_DEV_NBD=m | ||
| 130 | CONFIG_BLK_DEV_RAM=y | ||
| 131 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
| 132 | CONFIG_VIRTIO_BLK=m | ||
| 133 | CONFIG_IDE=y | ||
| 134 | CONFIG_BLK_DEV_IDECD=y | ||
| 135 | CONFIG_BLK_DEV_GENERIC=y | ||
| 136 | CONFIG_BLK_DEV_AMD74XX=y | ||
| 137 | CONFIG_BLK_DEV_SD=y | ||
| 138 | CONFIG_CHR_DEV_ST=y | ||
| 139 | CONFIG_BLK_DEV_SR=y | ||
| 140 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
| 141 | CONFIG_CHR_DEV_SG=y | ||
| 142 | CONFIG_SCSI_MULTI_LUN=y | ||
| 143 | CONFIG_SCSI_CONSTANTS=y | ||
| 144 | CONFIG_SCSI_FC_ATTRS=y | ||
| 145 | CONFIG_SCSI_CXGB3_ISCSI=m | ||
| 146 | CONFIG_SCSI_CXGB4_ISCSI=m | ||
| 147 | CONFIG_SCSI_BNX2_ISCSI=m | ||
| 148 | CONFIG_BE2ISCSI=m | ||
| 149 | CONFIG_SCSI_MPT2SAS=m | ||
| 150 | CONFIG_SCSI_IBMVSCSI=y | ||
| 151 | CONFIG_SCSI_IBMVFC=m | ||
| 152 | CONFIG_SCSI_SYM53C8XX_2=y | ||
| 153 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 | ||
| 154 | CONFIG_SCSI_IPR=y | ||
| 155 | CONFIG_SCSI_QLA_FC=m | ||
| 156 | CONFIG_SCSI_QLA_ISCSI=m | ||
| 157 | CONFIG_SCSI_LPFC=m | ||
| 158 | CONFIG_SCSI_VIRTIO=m | ||
| 159 | CONFIG_SCSI_DH=m | ||
| 160 | CONFIG_SCSI_DH_RDAC=m | ||
| 161 | CONFIG_SCSI_DH_ALUA=m | ||
| 162 | CONFIG_ATA=y | ||
| 163 | # CONFIG_ATA_SFF is not set | ||
| 164 | CONFIG_MD=y | ||
| 165 | CONFIG_BLK_DEV_MD=y | ||
| 166 | CONFIG_MD_LINEAR=y | ||
| 167 | CONFIG_MD_RAID0=y | ||
| 168 | CONFIG_MD_RAID1=y | ||
| 169 | CONFIG_MD_RAID10=m | ||
| 170 | CONFIG_MD_RAID456=m | ||
| 171 | CONFIG_MD_MULTIPATH=m | ||
| 172 | CONFIG_MD_FAULTY=m | ||
| 173 | CONFIG_BLK_DEV_DM=y | ||
| 174 | CONFIG_DM_CRYPT=m | ||
| 175 | CONFIG_DM_SNAPSHOT=m | ||
| 176 | CONFIG_DM_MIRROR=m | ||
| 177 | CONFIG_DM_ZERO=m | ||
| 178 | CONFIG_DM_MULTIPATH=m | ||
| 179 | CONFIG_DM_MULTIPATH_QL=m | ||
| 180 | CONFIG_DM_MULTIPATH_ST=m | ||
| 181 | CONFIG_DM_UEVENT=y | ||
| 182 | CONFIG_BONDING=m | ||
| 183 | CONFIG_DUMMY=m | ||
| 184 | CONFIG_NETCONSOLE=y | ||
| 185 | CONFIG_NETPOLL_TRAP=y | ||
| 186 | CONFIG_TUN=m | ||
| 187 | CONFIG_VIRTIO_NET=m | ||
| 188 | CONFIG_VORTEX=y | ||
| 189 | CONFIG_ACENIC=m | ||
| 190 | CONFIG_ACENIC_OMIT_TIGON_I=y | ||
| 191 | CONFIG_PCNET32=y | ||
| 192 | CONFIG_TIGON3=y | ||
| 193 | CONFIG_CHELSIO_T1=m | ||
| 194 | CONFIG_BE2NET=m | ||
| 195 | CONFIG_S2IO=m | ||
| 196 | CONFIG_IBMVETH=y | ||
| 197 | CONFIG_EHEA=y | ||
| 198 | CONFIG_E100=y | ||
| 199 | CONFIG_E1000=y | ||
| 200 | CONFIG_E1000E=y | ||
| 201 | CONFIG_IXGB=m | ||
| 202 | CONFIG_IXGBE=m | ||
| 203 | CONFIG_MLX4_EN=m | ||
| 204 | CONFIG_MYRI10GE=m | ||
| 205 | CONFIG_QLGE=m | ||
| 206 | CONFIG_NETXEN_NIC=m | ||
| 207 | CONFIG_PPP=m | ||
| 208 | CONFIG_PPP_BSDCOMP=m | ||
| 209 | CONFIG_PPP_DEFLATE=m | ||
| 210 | CONFIG_PPPOE=m | ||
| 211 | CONFIG_PPP_ASYNC=m | ||
| 212 | CONFIG_PPP_SYNC_TTY=m | ||
| 213 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
| 214 | CONFIG_INPUT_EVDEV=m | ||
| 215 | CONFIG_INPUT_MISC=y | ||
| 216 | CONFIG_INPUT_PCSPKR=m | ||
| 217 | # CONFIG_SERIO_SERPORT is not set | ||
| 218 | CONFIG_SERIAL_8250=y | ||
| 219 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 220 | CONFIG_SERIAL_ICOM=m | ||
| 221 | CONFIG_SERIAL_JSM=m | ||
| 222 | CONFIG_HVC_CONSOLE=y | ||
| 223 | CONFIG_HVC_RTAS=y | ||
| 224 | CONFIG_HVCS=m | ||
| 225 | CONFIG_VIRTIO_CONSOLE=m | ||
| 226 | CONFIG_IBM_BSR=m | ||
| 227 | CONFIG_GEN_RTC=y | ||
| 228 | CONFIG_RAW_DRIVER=y | ||
| 229 | CONFIG_MAX_RAW_DEVS=1024 | ||
| 230 | CONFIG_FB=y | ||
| 231 | CONFIG_FIRMWARE_EDID=y | ||
| 232 | CONFIG_FB_OF=y | ||
| 233 | CONFIG_FB_MATROX=y | ||
| 234 | CONFIG_FB_MATROX_MILLENIUM=y | ||
| 235 | CONFIG_FB_MATROX_MYSTIQUE=y | ||
| 236 | CONFIG_FB_MATROX_G=y | ||
| 237 | CONFIG_FB_RADEON=y | ||
| 238 | CONFIG_FB_IBM_GXT4500=y | ||
| 239 | CONFIG_LCD_PLATFORM=m | ||
| 240 | # CONFIG_VGA_CONSOLE is not set | ||
| 241 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 242 | CONFIG_LOGO=y | ||
| 243 | CONFIG_HID_GYRATION=y | ||
| 244 | CONFIG_HID_PANTHERLORD=y | ||
| 245 | CONFIG_HID_PETALYNX=y | ||
| 246 | CONFIG_HID_SAMSUNG=y | ||
| 247 | CONFIG_HID_SUNPLUS=y | ||
| 248 | CONFIG_USB_HIDDEV=y | ||
| 249 | CONFIG_USB=y | ||
| 250 | CONFIG_USB_MON=m | ||
| 251 | CONFIG_USB_EHCI_HCD=y | ||
| 252 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | ||
| 253 | CONFIG_USB_OHCI_HCD=y | ||
| 254 | CONFIG_USB_STORAGE=m | ||
| 255 | CONFIG_INFINIBAND=m | ||
| 256 | CONFIG_INFINIBAND_USER_MAD=m | ||
| 257 | CONFIG_INFINIBAND_USER_ACCESS=m | ||
| 258 | CONFIG_INFINIBAND_MTHCA=m | ||
| 259 | CONFIG_INFINIBAND_EHCA=m | ||
| 260 | CONFIG_INFINIBAND_CXGB3=m | ||
| 261 | CONFIG_INFINIBAND_CXGB4=m | ||
| 262 | CONFIG_MLX4_INFINIBAND=m | ||
| 263 | CONFIG_INFINIBAND_IPOIB=m | ||
| 264 | CONFIG_INFINIBAND_IPOIB_CM=y | ||
| 265 | CONFIG_INFINIBAND_SRP=m | ||
| 266 | CONFIG_INFINIBAND_ISER=m | ||
| 267 | CONFIG_VIRTIO_PCI=m | ||
| 268 | CONFIG_VIRTIO_BALLOON=m | ||
| 269 | CONFIG_EXT2_FS=y | ||
| 270 | CONFIG_EXT2_FS_XATTR=y | ||
| 271 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
| 272 | CONFIG_EXT2_FS_SECURITY=y | ||
| 273 | CONFIG_EXT2_FS_XIP=y | ||
| 274 | CONFIG_EXT3_FS=y | ||
| 275 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
| 276 | CONFIG_EXT3_FS_SECURITY=y | ||
| 277 | CONFIG_EXT4_FS=y | ||
| 278 | CONFIG_EXT4_FS_POSIX_ACL=y | ||
| 279 | CONFIG_EXT4_FS_SECURITY=y | ||
| 280 | CONFIG_REISERFS_FS=y | ||
| 281 | CONFIG_REISERFS_FS_XATTR=y | ||
| 282 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
| 283 | CONFIG_REISERFS_FS_SECURITY=y | ||
| 284 | CONFIG_JFS_FS=m | ||
| 285 | CONFIG_JFS_POSIX_ACL=y | ||
| 286 | CONFIG_JFS_SECURITY=y | ||
| 287 | CONFIG_XFS_FS=m | ||
| 288 | CONFIG_XFS_POSIX_ACL=y | ||
| 289 | CONFIG_BTRFS_FS=m | ||
| 290 | CONFIG_BTRFS_FS_POSIX_ACL=y | ||
| 291 | CONFIG_NILFS2_FS=m | ||
| 292 | CONFIG_AUTOFS4_FS=m | ||
| 293 | CONFIG_FUSE_FS=m | ||
| 294 | CONFIG_ISO9660_FS=y | ||
| 295 | CONFIG_UDF_FS=m | ||
| 296 | CONFIG_MSDOS_FS=y | ||
| 297 | CONFIG_VFAT_FS=y | ||
| 298 | CONFIG_PROC_KCORE=y | ||
| 299 | CONFIG_TMPFS=y | ||
| 300 | CONFIG_TMPFS_POSIX_ACL=y | ||
| 301 | CONFIG_HUGETLBFS=y | ||
| 302 | CONFIG_CRAMFS=m | ||
| 303 | CONFIG_SQUASHFS=m | ||
| 304 | CONFIG_SQUASHFS_XATTR=y | ||
| 305 | CONFIG_SQUASHFS_LZO=y | ||
| 306 | CONFIG_SQUASHFS_XZ=y | ||
| 307 | CONFIG_PSTORE=y | ||
| 308 | CONFIG_NFS_FS=y | ||
| 309 | CONFIG_NFS_V3_ACL=y | ||
| 310 | CONFIG_NFS_V4=y | ||
| 311 | CONFIG_NFSD=m | ||
| 312 | CONFIG_NFSD_V3_ACL=y | ||
| 313 | CONFIG_NFSD_V4=y | ||
| 314 | CONFIG_CIFS=m | ||
| 315 | CONFIG_CIFS_XATTR=y | ||
| 316 | CONFIG_CIFS_POSIX=y | ||
| 317 | CONFIG_NLS_DEFAULT="utf8" | ||
| 318 | CONFIG_NLS_CODEPAGE_437=y | ||
| 319 | CONFIG_NLS_ASCII=y | ||
| 320 | CONFIG_NLS_ISO8859_1=y | ||
| 321 | CONFIG_NLS_UTF8=y | ||
| 322 | CONFIG_CRC_T10DIF=y | ||
| 323 | CONFIG_MAGIC_SYSRQ=y | ||
| 324 | CONFIG_DEBUG_KERNEL=y | ||
| 325 | CONFIG_DEBUG_STACK_USAGE=y | ||
| 326 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
| 327 | CONFIG_LOCKUP_DETECTOR=y | ||
| 328 | CONFIG_LATENCYTOP=y | ||
| 329 | CONFIG_SCHED_TRACER=y | ||
| 330 | CONFIG_BLK_DEV_IO_TRACE=y | ||
| 331 | CONFIG_CODE_PATCHING_SELFTEST=y | ||
| 332 | CONFIG_FTR_FIXUP_SELFTEST=y | ||
| 333 | CONFIG_MSI_BITMAP_SELFTEST=y | ||
| 334 | CONFIG_XMON=y | ||
| 335 | CONFIG_CRYPTO_TEST=m | ||
| 336 | CONFIG_CRYPTO_PCBC=m | ||
| 337 | CONFIG_CRYPTO_HMAC=y | ||
| 338 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
| 339 | CONFIG_CRYPTO_TGR192=m | ||
| 340 | CONFIG_CRYPTO_WP512=m | ||
| 341 | CONFIG_CRYPTO_ANUBIS=m | ||
| 342 | CONFIG_CRYPTO_BLOWFISH=m | ||
| 343 | CONFIG_CRYPTO_CAST6=m | ||
| 344 | CONFIG_CRYPTO_KHAZAD=m | ||
| 345 | CONFIG_CRYPTO_SALSA20=m | ||
| 346 | CONFIG_CRYPTO_SERPENT=m | ||
| 347 | CONFIG_CRYPTO_TEA=m | ||
| 348 | CONFIG_CRYPTO_TWOFISH=m | ||
| 349 | CONFIG_CRYPTO_LZO=m | ||
| 350 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
| 351 | CONFIG_CRYPTO_DEV_NX=y | ||
| 352 | CONFIG_CRYPTO_DEV_NX_ENCRYPT=m | ||
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index cc0655a702a7..935b5e7a1436 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | extern unsigned long randomize_et_dyn(unsigned long base); | 31 | extern unsigned long randomize_et_dyn(unsigned long base); |
| 32 | #define ELF_ET_DYN_BASE (randomize_et_dyn(0x20000000)) | 32 | #define ELF_ET_DYN_BASE (randomize_et_dyn(0x20000000)) |
| 33 | 33 | ||
| 34 | #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0) | ||
| 35 | |||
| 34 | /* | 36 | /* |
| 35 | * Our registers are always unsigned longs, whether we're a 32 bit | 37 | * Our registers are always unsigned longs, whether we're a 32 bit |
| 36 | * process or 64 bit, on either a 64 bit or 32 bit kernel. | 38 | * process or 64 bit, on either a 64 bit or 32 bit kernel. |
| @@ -86,6 +88,8 @@ typedef elf_vrregset_t elf_fpxregset_t; | |||
| 86 | #ifdef __powerpc64__ | 88 | #ifdef __powerpc64__ |
| 87 | # define SET_PERSONALITY(ex) \ | 89 | # define SET_PERSONALITY(ex) \ |
| 88 | do { \ | 90 | do { \ |
| 91 | if (((ex).e_flags & 0x3) == 2) \ | ||
| 92 | set_thread_flag(TIF_ELF2ABI); \ | ||
| 89 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ | 93 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
| 90 | set_thread_flag(TIF_32BIT); \ | 94 | set_thread_flag(TIF_32BIT); \ |
| 91 | else \ | 95 | else \ |
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index 0c7f2bfcf134..d8b600b3f058 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
| @@ -403,6 +403,8 @@ static inline unsigned long cmo_get_page_size(void) | |||
| 403 | extern long pSeries_enable_reloc_on_exc(void); | 403 | extern long pSeries_enable_reloc_on_exc(void); |
| 404 | extern long pSeries_disable_reloc_on_exc(void); | 404 | extern long pSeries_disable_reloc_on_exc(void); |
| 405 | 405 | ||
| 406 | extern long pseries_big_endian_exceptions(void); | ||
| 407 | |||
| 406 | #else | 408 | #else |
| 407 | 409 | ||
| 408 | #define pSeries_enable_reloc_on_exc() do {} while (0) | 410 | #define pSeries_enable_reloc_on_exc() do {} while (0) |
diff --git a/arch/powerpc/include/asm/pgalloc-32.h b/arch/powerpc/include/asm/pgalloc-32.h index 27b2386f738a..842846c1b711 100644 --- a/arch/powerpc/include/asm/pgalloc-32.h +++ b/arch/powerpc/include/asm/pgalloc-32.h | |||
| @@ -84,10 +84,8 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb, | |||
| 84 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, | 84 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, |
| 85 | unsigned long address) | 85 | unsigned long address) |
| 86 | { | 86 | { |
| 87 | struct page *page = page_address(table); | ||
| 88 | |||
| 89 | tlb_flush_pgtable(tlb, address); | 87 | tlb_flush_pgtable(tlb, address); |
| 90 | pgtable_page_dtor(page); | 88 | pgtable_page_dtor(table); |
| 91 | pgtable_free_tlb(tlb, page, 0); | 89 | pgtable_free_tlb(tlb, page_address(table), 0); |
| 92 | } | 90 | } |
| 93 | #endif /* _ASM_POWERPC_PGALLOC_32_H */ | 91 | #endif /* _ASM_POWERPC_PGALLOC_32_H */ |
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h index 16cb92d215d2..4b0be20fcbfd 100644 --- a/arch/powerpc/include/asm/pgalloc-64.h +++ b/arch/powerpc/include/asm/pgalloc-64.h | |||
| @@ -16,6 +16,7 @@ struct vmemmap_backing { | |||
| 16 | unsigned long phys; | 16 | unsigned long phys; |
| 17 | unsigned long virt_addr; | 17 | unsigned long virt_addr; |
| 18 | }; | 18 | }; |
| 19 | extern struct vmemmap_backing *vmemmap_list; | ||
| 19 | 20 | ||
| 20 | /* | 21 | /* |
| 21 | * Functions that deal with pagetables that could be at any level of | 22 | * Functions that deal with pagetables that could be at any level of |
| @@ -147,11 +148,9 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb, | |||
| 147 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, | 148 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, |
| 148 | unsigned long address) | 149 | unsigned long address) |
| 149 | { | 150 | { |
| 150 | struct page *page = page_address(table); | ||
| 151 | |||
| 152 | tlb_flush_pgtable(tlb, address); | 151 | tlb_flush_pgtable(tlb, address); |
| 153 | pgtable_page_dtor(page); | 152 | pgtable_page_dtor(table); |
| 154 | pgtable_free_tlb(tlb, page, 0); | 153 | pgtable_free_tlb(tlb, page_address(table), 0); |
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | #else /* if CONFIG_PPC_64K_PAGES */ | 156 | #else /* if CONFIG_PPC_64K_PAGES */ |
diff --git a/arch/powerpc/include/asm/plpar_wrappers.h b/arch/powerpc/include/asm/plpar_wrappers.h index a63b045e707c..12c32c5f533d 100644 --- a/arch/powerpc/include/asm/plpar_wrappers.h +++ b/arch/powerpc/include/asm/plpar_wrappers.h | |||
| @@ -287,6 +287,32 @@ static inline long disable_reloc_on_exceptions(void) { | |||
| 287 | return plpar_set_mode(0, 3, 0, 0); | 287 | return plpar_set_mode(0, 3, 0, 0); |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | /* | ||
| 291 | * Take exceptions in big endian mode on this partition | ||
| 292 | * | ||
| 293 | * Note: this call has a partition wide scope and can take a while to complete. | ||
| 294 | * If it returns H_LONG_BUSY_* it should be retried periodically until it | ||
| 295 | * returns H_SUCCESS. | ||
| 296 | */ | ||
| 297 | static inline long enable_big_endian_exceptions(void) | ||
| 298 | { | ||
| 299 | /* mflags = 0: big endian exceptions */ | ||
| 300 | return plpar_set_mode(0, 4, 0, 0); | ||
| 301 | } | ||
| 302 | |||
| 303 | /* | ||
| 304 | * Take exceptions in little endian mode on this partition | ||
| 305 | * | ||
| 306 | * Note: this call has a partition wide scope and can take a while to complete. | ||
| 307 | * If it returns H_LONG_BUSY_* it should be retried periodically until it | ||
| 308 | * returns H_SUCCESS. | ||
| 309 | */ | ||
| 310 | static inline long enable_little_endian_exceptions(void) | ||
| 311 | { | ||
| 312 | /* mflags = 1: little endian exceptions */ | ||
| 313 | return plpar_set_mode(1, 4, 0, 0); | ||
| 314 | } | ||
| 315 | |||
| 290 | static inline long plapr_set_ciabr(unsigned long ciabr) | 316 | static inline long plapr_set_ciabr(unsigned long ciabr) |
| 291 | { | 317 | { |
| 292 | return plpar_set_mode(0, 1, ciabr, 0); | 318 | return plpar_set_mode(0, 1, ciabr, 0); |
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 3c1acc31a092..f595b98079ee 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h | |||
| @@ -366,6 +366,8 @@ BEGIN_FTR_SECTION_NESTED(96); \ | |||
| 366 | cmpwi dest,0; \ | 366 | cmpwi dest,0; \ |
| 367 | beq- 90b; \ | 367 | beq- 90b; \ |
| 368 | END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96) | 368 | END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96) |
| 369 | #elif defined(CONFIG_8xx) | ||
| 370 | #define MFTB(dest) mftb dest | ||
| 369 | #else | 371 | #else |
| 370 | #define MFTB(dest) mfspr dest, SPRN_TBRL | 372 | #define MFTB(dest) mfspr dest, SPRN_TBRL |
| 371 | #endif | 373 | #endif |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 5c45787d551e..fa8388ed94c5 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
| @@ -1174,12 +1174,19 @@ | |||
| 1174 | 1174 | ||
| 1175 | #else /* __powerpc64__ */ | 1175 | #else /* __powerpc64__ */ |
| 1176 | 1176 | ||
| 1177 | #if defined(CONFIG_8xx) | ||
| 1178 | #define mftbl() ({unsigned long rval; \ | ||
| 1179 | asm volatile("mftbl %0" : "=r" (rval)); rval;}) | ||
| 1180 | #define mftbu() ({unsigned long rval; \ | ||
| 1181 | asm volatile("mftbu %0" : "=r" (rval)); rval;}) | ||
| 1182 | #else | ||
| 1177 | #define mftbl() ({unsigned long rval; \ | 1183 | #define mftbl() ({unsigned long rval; \ |
| 1178 | asm volatile("mfspr %0, %1" : "=r" (rval) : \ | 1184 | asm volatile("mfspr %0, %1" : "=r" (rval) : \ |
| 1179 | "i" (SPRN_TBRL)); rval;}) | 1185 | "i" (SPRN_TBRL)); rval;}) |
| 1180 | #define mftbu() ({unsigned long rval; \ | 1186 | #define mftbu() ({unsigned long rval; \ |
| 1181 | asm volatile("mfspr %0, %1" : "=r" (rval) : \ | 1187 | asm volatile("mfspr %0, %1" : "=r" (rval) : \ |
| 1182 | "i" (SPRN_TBRU)); rval;}) | 1188 | "i" (SPRN_TBRU)); rval;}) |
| 1189 | #endif | ||
| 1183 | #endif /* !__powerpc64__ */ | 1190 | #endif /* !__powerpc64__ */ |
| 1184 | 1191 | ||
| 1185 | #define mttbl(v) asm volatile("mttbl %0":: "r"(v)) | 1192 | #define mttbl(v) asm volatile("mttbl %0":: "r"(v)) |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 98da78e0c2c0..084e0807db98 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
| @@ -33,6 +33,7 @@ extern int boot_cpuid; | |||
| 33 | extern int spinning_secondaries; | 33 | extern int spinning_secondaries; |
| 34 | 34 | ||
| 35 | extern void cpu_die(void); | 35 | extern void cpu_die(void); |
| 36 | extern int cpu_to_chip_id(int cpu); | ||
| 36 | 37 | ||
| 37 | #ifdef CONFIG_SMP | 38 | #ifdef CONFIG_SMP |
| 38 | 39 | ||
| @@ -112,7 +113,6 @@ static inline struct cpumask *cpu_core_mask(int cpu) | |||
| 112 | } | 113 | } |
| 113 | 114 | ||
| 114 | extern int cpu_to_core_id(int cpu); | 115 | extern int cpu_to_core_id(int cpu); |
| 115 | extern int cpu_to_chip_id(int cpu); | ||
| 116 | 116 | ||
| 117 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. | 117 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. |
| 118 | * | 118 | * |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 8fd6cf6dcee8..9854c564ac52 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
| @@ -105,6 +105,9 @@ static inline struct thread_info *current_thread_info(void) | |||
| 105 | #define TIF_EMULATE_STACK_STORE 16 /* Is an instruction emulation | 105 | #define TIF_EMULATE_STACK_STORE 16 /* Is an instruction emulation |
| 106 | for stack store? */ | 106 | for stack store? */ |
| 107 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 107 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
| 108 | #if defined(CONFIG_PPC64) | ||
| 109 | #define TIF_ELF2ABI 18 /* function descriptors must die! */ | ||
| 110 | #endif | ||
| 108 | 111 | ||
| 109 | /* as above, but as bit values */ | 112 | /* as above, but as bit values */ |
| 110 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 113 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
| @@ -183,6 +186,12 @@ static inline bool test_thread_local_flags(unsigned int flags) | |||
| 183 | #define is_32bit_task() (1) | 186 | #define is_32bit_task() (1) |
| 184 | #endif | 187 | #endif |
| 185 | 188 | ||
| 189 | #if defined(CONFIG_PPC64) | ||
| 190 | #define is_elf2_task() (test_thread_flag(TIF_ELF2ABI)) | ||
| 191 | #else | ||
| 192 | #define is_elf2_task() (0) | ||
| 193 | #endif | ||
| 194 | |||
| 186 | #endif /* !__ASSEMBLY__ */ | 195 | #endif /* !__ASSEMBLY__ */ |
| 187 | 196 | ||
| 188 | #endif /* __KERNEL__ */ | 197 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/timex.h b/arch/powerpc/include/asm/timex.h index 18908caa1f3b..2cf846edb3fc 100644 --- a/arch/powerpc/include/asm/timex.h +++ b/arch/powerpc/include/asm/timex.h | |||
| @@ -29,7 +29,11 @@ static inline cycles_t get_cycles(void) | |||
| 29 | ret = 0; | 29 | ret = 0; |
| 30 | 30 | ||
| 31 | __asm__ __volatile__( | 31 | __asm__ __volatile__( |
| 32 | #ifdef CONFIG_8xx | ||
| 33 | "97: mftb %0\n" | ||
| 34 | #else | ||
| 32 | "97: mfspr %0, %2\n" | 35 | "97: mfspr %0, %2\n" |
| 36 | #endif | ||
| 33 | "99:\n" | 37 | "99:\n" |
| 34 | ".section __ftr_fixup,\"a\"\n" | 38 | ".section __ftr_fixup,\"a\"\n" |
| 35 | ".align 2\n" | 39 | ".align 2\n" |
| @@ -41,7 +45,11 @@ static inline cycles_t get_cycles(void) | |||
| 41 | " .long 0\n" | 45 | " .long 0\n" |
| 42 | " .long 0\n" | 46 | " .long 0\n" |
| 43 | ".previous" | 47 | ".previous" |
| 48 | #ifdef CONFIG_8xx | ||
| 49 | : "=r" (ret) : "i" (CPU_FTR_601)); | ||
| 50 | #else | ||
| 44 | : "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL)); | 51 | : "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL)); |
| 52 | #endif | ||
| 45 | return ret; | 53 | return ret; |
| 46 | #endif | 54 | #endif |
| 47 | } | 55 | } |
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 671302065347..4bd687d5e7aa 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
| @@ -686,6 +686,15 @@ void eeh_save_bars(struct eeh_dev *edev) | |||
| 686 | 686 | ||
| 687 | for (i = 0; i < 16; i++) | 687 | for (i = 0; i < 16; i++) |
| 688 | eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]); | 688 | eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]); |
| 689 | |||
| 690 | /* | ||
| 691 | * For PCI bridges including root port, we need enable bus | ||
| 692 | * master explicitly. Otherwise, it can't fetch IODA table | ||
| 693 | * entries correctly. So we cache the bit in advance so that | ||
| 694 | * we can restore it after reset, either PHB range or PE range. | ||
| 695 | */ | ||
| 696 | if (edev->mode & EEH_DEV_BRIDGE) | ||
| 697 | edev->config_space[1] |= PCI_COMMAND_MASTER; | ||
| 689 | } | 698 | } |
| 690 | 699 | ||
| 691 | /** | 700 | /** |
diff --git a/arch/powerpc/kernel/eeh_event.c b/arch/powerpc/kernel/eeh_event.c index d27c5afc90ae..72d748b56c86 100644 --- a/arch/powerpc/kernel/eeh_event.c +++ b/arch/powerpc/kernel/eeh_event.c | |||
| @@ -74,8 +74,13 @@ static int eeh_event_handler(void * dummy) | |||
| 74 | pe = event->pe; | 74 | pe = event->pe; |
| 75 | if (pe) { | 75 | if (pe) { |
| 76 | eeh_pe_state_mark(pe, EEH_PE_RECOVERING); | 76 | eeh_pe_state_mark(pe, EEH_PE_RECOVERING); |
| 77 | pr_info("EEH: Detected PCI bus error on PHB#%d-PE#%x\n", | 77 | if (pe->type & EEH_PE_PHB) |
| 78 | pe->phb->global_number, pe->addr); | 78 | pr_info("EEH: Detected error on PHB#%d\n", |
| 79 | pe->phb->global_number); | ||
| 80 | else | ||
| 81 | pr_info("EEH: Detected PCI bus error on " | ||
| 82 | "PHB#%d-PE#%x\n", | ||
| 83 | pe->phb->global_number, pe->addr); | ||
| 79 | eeh_handle_event(pe); | 84 | eeh_handle_event(pe); |
| 80 | eeh_pe_state_clear(pe, EEH_PE_RECOVERING); | 85 | eeh_pe_state_clear(pe, EEH_PE_RECOVERING); |
| 81 | } else { | 86 | } else { |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index e1ec57e87b3b..75d4f7340da8 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/ftrace.h> | 18 | #include <linux/ftrace.h> |
| 19 | 19 | ||
| 20 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
| 21 | #include <asm/pgalloc.h> | ||
| 21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
| 22 | #include <asm/sections.h> | 23 | #include <asm/sections.h> |
| 23 | 24 | ||
| @@ -75,6 +76,17 @@ void arch_crash_save_vmcoreinfo(void) | |||
| 75 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 76 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
| 76 | VMCOREINFO_SYMBOL(contig_page_data); | 77 | VMCOREINFO_SYMBOL(contig_page_data); |
| 77 | #endif | 78 | #endif |
| 79 | #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) | ||
| 80 | VMCOREINFO_SYMBOL(vmemmap_list); | ||
| 81 | VMCOREINFO_SYMBOL(mmu_vmemmap_psize); | ||
| 82 | VMCOREINFO_SYMBOL(mmu_psize_defs); | ||
| 83 | VMCOREINFO_STRUCT_SIZE(vmemmap_backing); | ||
| 84 | VMCOREINFO_OFFSET(vmemmap_backing, list); | ||
| 85 | VMCOREINFO_OFFSET(vmemmap_backing, phys); | ||
| 86 | VMCOREINFO_OFFSET(vmemmap_backing, virt_addr); | ||
| 87 | VMCOREINFO_STRUCT_SIZE(mmu_psize_def); | ||
| 88 | VMCOREINFO_OFFSET(mmu_psize_def, shift); | ||
| 89 | #endif | ||
| 78 | } | 90 | } |
| 79 | 91 | ||
| 80 | /* | 92 | /* |
| @@ -136,7 +148,7 @@ void __init reserve_crashkernel(void) | |||
| 136 | * a small SLB (128MB) since the crash kernel needs to place | 148 | * a small SLB (128MB) since the crash kernel needs to place |
| 137 | * itself and some stacks to be in the first segment. | 149 | * itself and some stacks to be in the first segment. |
| 138 | */ | 150 | */ |
| 139 | crashk_res.start = min(0x80000000ULL, (ppc64_rma_size / 2)); | 151 | crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2)); |
| 140 | #else | 152 | #else |
| 141 | crashk_res.start = KDUMP_KERNELBASE; | 153 | crashk_res.start = KDUMP_KERNELBASE; |
| 142 | #endif | 154 | #endif |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index e59caf874d05..64bf8db12b15 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
| @@ -246,8 +246,8 @@ _GLOBAL(__bswapdi2) | |||
| 246 | or r3,r7,r9 | 246 | or r3,r7,r9 |
| 247 | blr | 247 | blr |
| 248 | 248 | ||
| 249 | #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) | ||
| 250 | 249 | ||
| 250 | #ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX | ||
| 251 | _GLOBAL(rmci_on) | 251 | _GLOBAL(rmci_on) |
| 252 | sync | 252 | sync |
| 253 | isync | 253 | isync |
| @@ -277,6 +277,9 @@ _GLOBAL(rmci_off) | |||
| 277 | isync | 277 | isync |
| 278 | sync | 278 | sync |
| 279 | blr | 279 | blr |
| 280 | #endif /* CONFIG_PPC_EARLY_DEBUG_BOOTX */ | ||
| 281 | |||
| 282 | #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) | ||
| 280 | 283 | ||
| 281 | /* | 284 | /* |
| 282 | * Do an IO access in real mode | 285 | * Do an IO access in real mode |
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index fd82c289ab1c..28b898e68185 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c | |||
| @@ -210,7 +210,7 @@ static void __init nvram_print_partitions(char * label) | |||
| 210 | printk(KERN_WARNING "--------%s---------\n", label); | 210 | printk(KERN_WARNING "--------%s---------\n", label); |
| 211 | printk(KERN_WARNING "indx\t\tsig\tchks\tlen\tname\n"); | 211 | printk(KERN_WARNING "indx\t\tsig\tchks\tlen\tname\n"); |
| 212 | list_for_each_entry(tmp_part, &nvram_partitions, partition) { | 212 | list_for_each_entry(tmp_part, &nvram_partitions, partition) { |
| 213 | printk(KERN_WARNING "%4d \t%02x\t%02x\t%d\t%12s\n", | 213 | printk(KERN_WARNING "%4d \t%02x\t%02x\t%d\t%12.12s\n", |
| 214 | tmp_part->index, tmp_part->header.signature, | 214 | tmp_part->index, tmp_part->header.signature, |
| 215 | tmp_part->header.checksum, tmp_part->header.length, | 215 | tmp_part->header.checksum, tmp_part->header.length, |
| 216 | tmp_part->header.name); | 216 | tmp_part->header.name); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 75c2d1009985..3386d8ab7eb0 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
| @@ -858,17 +858,21 @@ void show_regs(struct pt_regs * regs) | |||
| 858 | printk("MSR: "REG" ", regs->msr); | 858 | printk("MSR: "REG" ", regs->msr); |
| 859 | printbits(regs->msr, msr_bits); | 859 | printbits(regs->msr, msr_bits); |
| 860 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); | 860 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); |
| 861 | #ifdef CONFIG_PPC64 | ||
| 862 | printk("SOFTE: %ld\n", regs->softe); | ||
| 863 | #endif | ||
| 864 | trap = TRAP(regs); | 861 | trap = TRAP(regs); |
| 865 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) | 862 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) |
| 866 | printk("CFAR: "REG"\n", regs->orig_gpr3); | 863 | printk("CFAR: "REG" ", regs->orig_gpr3); |
| 867 | if (trap == 0x300 || trap == 0x600) | 864 | if (trap == 0x200 || trap == 0x300 || trap == 0x600) |
| 868 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | 865 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
| 869 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | 866 | printk("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr); |
| 870 | #else | 867 | #else |
| 871 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); | 868 | printk("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr); |
| 869 | #endif | ||
| 870 | #ifdef CONFIG_PPC64 | ||
| 871 | printk("SOFTE: %ld ", regs->softe); | ||
| 872 | #endif | ||
| 873 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | ||
| 874 | if (MSR_TM_ACTIVE(regs->msr)) | ||
| 875 | printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch); | ||
| 872 | #endif | 876 | #endif |
| 873 | 877 | ||
| 874 | for (i = 0; i < 32; i++) { | 878 | for (i = 0; i < 32; i++) { |
| @@ -887,9 +891,6 @@ void show_regs(struct pt_regs * regs) | |||
| 887 | printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); | 891 | printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); |
| 888 | printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); | 892 | printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); |
| 889 | #endif | 893 | #endif |
| 890 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | ||
| 891 | printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch); | ||
| 892 | #endif | ||
| 893 | show_stack(current, (unsigned long *) regs->gpr[1]); | 894 | show_stack(current, (unsigned long *) regs->gpr[1]); |
| 894 | if (!user_mode(regs)) | 895 | if (!user_mode(regs)) |
| 895 | show_instructions(regs); | 896 | show_instructions(regs); |
| @@ -1086,25 +1087,45 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) | |||
| 1086 | regs->msr = MSR_USER; | 1087 | regs->msr = MSR_USER; |
| 1087 | #else | 1088 | #else |
| 1088 | if (!is_32bit_task()) { | 1089 | if (!is_32bit_task()) { |
| 1089 | unsigned long entry, toc; | 1090 | unsigned long entry; |
| 1090 | 1091 | ||
| 1091 | /* start is a relocated pointer to the function descriptor for | 1092 | if (is_elf2_task()) { |
| 1092 | * the elf _start routine. The first entry in the function | 1093 | /* Look ma, no function descriptors! */ |
| 1093 | * descriptor is the entry address of _start and the second | 1094 | entry = start; |
| 1094 | * entry is the TOC value we need to use. | ||
| 1095 | */ | ||
| 1096 | __get_user(entry, (unsigned long __user *)start); | ||
| 1097 | __get_user(toc, (unsigned long __user *)start+1); | ||
| 1098 | 1095 | ||
| 1099 | /* Check whether the e_entry function descriptor entries | 1096 | /* |
| 1100 | * need to be relocated before we can use them. | 1097 | * Ulrich says: |
| 1101 | */ | 1098 | * The latest iteration of the ABI requires that when |
| 1102 | if (load_addr != 0) { | 1099 | * calling a function (at its global entry point), |
| 1103 | entry += load_addr; | 1100 | * the caller must ensure r12 holds the entry point |
| 1104 | toc += load_addr; | 1101 | * address (so that the function can quickly |
| 1102 | * establish addressability). | ||
| 1103 | */ | ||
| 1104 | regs->gpr[12] = start; | ||
| 1105 | /* Make sure that's restored on entry to userspace. */ | ||
| 1106 | set_thread_flag(TIF_RESTOREALL); | ||
| 1107 | } else { | ||
| 1108 | unsigned long toc; | ||
| 1109 | |||
| 1110 | /* start is a relocated pointer to the function | ||
| 1111 | * descriptor for the elf _start routine. The first | ||
| 1112 | * entry in the function descriptor is the entry | ||
| 1113 | * address of _start and the second entry is the TOC | ||
| 1114 | * value we need to use. | ||
| 1115 | */ | ||
| 1116 | __get_user(entry, (unsigned long __user *)start); | ||
| 1117 | __get_user(toc, (unsigned long __user *)start+1); | ||
| 1118 | |||
| 1119 | /* Check whether the e_entry function descriptor entries | ||
| 1120 | * need to be relocated before we can use them. | ||
| 1121 | */ | ||
| 1122 | if (load_addr != 0) { | ||
| 1123 | entry += load_addr; | ||
| 1124 | toc += load_addr; | ||
| 1125 | } | ||
| 1126 | regs->gpr[2] = toc; | ||
| 1105 | } | 1127 | } |
| 1106 | regs->nip = entry; | 1128 | regs->nip = entry; |
| 1107 | regs->gpr[2] = toc; | ||
| 1108 | regs->msr = MSR_USER64; | 1129 | regs->msr = MSR_USER64; |
| 1109 | } else { | 1130 | } else { |
| 1110 | regs->nip = start; | 1131 | regs->nip = start; |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f3a47098fb8e..fa0ad8aafbcc 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
| @@ -777,6 +777,26 @@ int of_get_ibm_chip_id(struct device_node *np) | |||
| 777 | return -1; | 777 | return -1; |
| 778 | } | 778 | } |
| 779 | 779 | ||
| 780 | /** | ||
| 781 | * cpu_to_chip_id - Return the cpus chip-id | ||
| 782 | * @cpu: The logical cpu number. | ||
| 783 | * | ||
| 784 | * Return the value of the ibm,chip-id property corresponding to the given | ||
| 785 | * logical cpu number. If the chip-id can not be found, returns -1. | ||
| 786 | */ | ||
| 787 | int cpu_to_chip_id(int cpu) | ||
| 788 | { | ||
| 789 | struct device_node *np; | ||
| 790 | |||
| 791 | np = of_get_cpu_node(cpu, NULL); | ||
| 792 | if (!np) | ||
| 793 | return -1; | ||
| 794 | |||
| 795 | of_node_put(np); | ||
| 796 | return of_get_ibm_chip_id(np); | ||
| 797 | } | ||
| 798 | EXPORT_SYMBOL(cpu_to_chip_id); | ||
| 799 | |||
| 780 | #ifdef CONFIG_PPC_PSERIES | 800 | #ifdef CONFIG_PPC_PSERIES |
| 781 | /* | 801 | /* |
| 782 | * Fix up the uninitialized fields in a new device node: | 802 | * Fix up the uninitialized fields in a new device node: |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 749778e0a69d..68027bfa5f8e 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
| @@ -445,6 +445,12 @@ static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame, | |||
| 445 | #endif /* CONFIG_ALTIVEC */ | 445 | #endif /* CONFIG_ALTIVEC */ |
| 446 | if (copy_fpr_to_user(&frame->mc_fregs, current)) | 446 | if (copy_fpr_to_user(&frame->mc_fregs, current)) |
| 447 | return 1; | 447 | return 1; |
| 448 | |||
| 449 | /* | ||
| 450 | * Clear the MSR VSX bit to indicate there is no valid state attached | ||
| 451 | * to this context, except in the specific case below where we set it. | ||
| 452 | */ | ||
| 453 | msr &= ~MSR_VSX; | ||
| 448 | #ifdef CONFIG_VSX | 454 | #ifdef CONFIG_VSX |
| 449 | /* | 455 | /* |
| 450 | * Copy VSR 0-31 upper half from thread_struct to local | 456 | * Copy VSR 0-31 upper half from thread_struct to local |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index b3c615764c9b..42991045349f 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
| @@ -122,6 +122,12 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
| 122 | flush_fp_to_thread(current); | 122 | flush_fp_to_thread(current); |
| 123 | /* copy fpr regs and fpscr */ | 123 | /* copy fpr regs and fpscr */ |
| 124 | err |= copy_fpr_to_user(&sc->fp_regs, current); | 124 | err |= copy_fpr_to_user(&sc->fp_regs, current); |
| 125 | |||
| 126 | /* | ||
| 127 | * Clear the MSR VSX bit to indicate there is no valid state attached | ||
| 128 | * to this context, except in the specific case below where we set it. | ||
| 129 | */ | ||
| 130 | msr &= ~MSR_VSX; | ||
| 125 | #ifdef CONFIG_VSX | 131 | #ifdef CONFIG_VSX |
| 126 | /* | 132 | /* |
| 127 | * Copy VSX low doubleword to local buffer for formatting, | 133 | * Copy VSX low doubleword to local buffer for formatting, |
| @@ -701,12 +707,6 @@ badframe: | |||
| 701 | int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, | 707 | int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, |
| 702 | sigset_t *set, struct pt_regs *regs) | 708 | sigset_t *set, struct pt_regs *regs) |
| 703 | { | 709 | { |
| 704 | /* Handler is *really* a pointer to the function descriptor for | ||
| 705 | * the signal routine. The first entry in the function | ||
| 706 | * descriptor is the entry address of signal and the second | ||
| 707 | * entry is the TOC value we need to use. | ||
| 708 | */ | ||
| 709 | func_descr_t __user *funct_desc_ptr; | ||
| 710 | struct rt_sigframe __user *frame; | 710 | struct rt_sigframe __user *frame; |
| 711 | unsigned long newsp = 0; | 711 | unsigned long newsp = 0; |
| 712 | long err = 0; | 712 | long err = 0; |
| @@ -766,19 +766,32 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, | |||
| 766 | goto badframe; | 766 | goto badframe; |
| 767 | regs->link = (unsigned long) &frame->tramp[0]; | 767 | regs->link = (unsigned long) &frame->tramp[0]; |
| 768 | } | 768 | } |
| 769 | funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; | ||
| 770 | 769 | ||
| 771 | /* Allocate a dummy caller frame for the signal handler. */ | 770 | /* Allocate a dummy caller frame for the signal handler. */ |
| 772 | newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE; | 771 | newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE; |
| 773 | err |= put_user(regs->gpr[1], (unsigned long __user *)newsp); | 772 | err |= put_user(regs->gpr[1], (unsigned long __user *)newsp); |
| 774 | 773 | ||
| 775 | /* Set up "regs" so we "return" to the signal handler. */ | 774 | /* Set up "regs" so we "return" to the signal handler. */ |
| 776 | err |= get_user(regs->nip, &funct_desc_ptr->entry); | 775 | if (is_elf2_task()) { |
| 776 | regs->nip = (unsigned long) ka->sa.sa_handler; | ||
| 777 | regs->gpr[12] = regs->nip; | ||
| 778 | } else { | ||
| 779 | /* Handler is *really* a pointer to the function descriptor for | ||
| 780 | * the signal routine. The first entry in the function | ||
| 781 | * descriptor is the entry address of signal and the second | ||
| 782 | * entry is the TOC value we need to use. | ||
| 783 | */ | ||
| 784 | func_descr_t __user *funct_desc_ptr = | ||
| 785 | (func_descr_t __user *) ka->sa.sa_handler; | ||
| 786 | |||
| 787 | err |= get_user(regs->nip, &funct_desc_ptr->entry); | ||
| 788 | err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); | ||
| 789 | } | ||
| 790 | |||
| 777 | /* enter the signal handler in native-endian mode */ | 791 | /* enter the signal handler in native-endian mode */ |
| 778 | regs->msr &= ~MSR_LE; | 792 | regs->msr &= ~MSR_LE; |
| 779 | regs->msr |= (MSR_KERNEL & MSR_LE); | 793 | regs->msr |= (MSR_KERNEL & MSR_LE); |
| 780 | regs->gpr[1] = newsp; | 794 | regs->gpr[1] = newsp; |
| 781 | err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); | ||
| 782 | regs->gpr[3] = signr; | 795 | regs->gpr[3] = signr; |
| 783 | regs->result = 0; | 796 | regs->result = 0; |
| 784 | if (ka->sa.sa_flags & SA_SIGINFO) { | 797 | if (ka->sa.sa_flags & SA_SIGINFO) { |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 930cd8af3503..a3b64f3bf9a2 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
| @@ -597,22 +597,6 @@ out: | |||
| 597 | return id; | 597 | return id; |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | /* Return the value of the chip-id property corresponding | ||
| 601 | * to the given logical cpu. | ||
| 602 | */ | ||
| 603 | int cpu_to_chip_id(int cpu) | ||
| 604 | { | ||
| 605 | struct device_node *np; | ||
| 606 | |||
| 607 | np = of_get_cpu_node(cpu, NULL); | ||
| 608 | if (!np) | ||
| 609 | return -1; | ||
| 610 | |||
| 611 | of_node_put(np); | ||
| 612 | return of_get_ibm_chip_id(np); | ||
| 613 | } | ||
| 614 | EXPORT_SYMBOL(cpu_to_chip_id); | ||
| 615 | |||
| 616 | /* Helper routines for cpu to core mapping */ | 600 | /* Helper routines for cpu to core mapping */ |
| 617 | int cpu_core_index_of_thread(int cpu) | 601 | int cpu_core_index_of_thread(int cpu) |
| 618 | { | 602 | { |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 192b051df97e..b3b144121cc9 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -213,8 +213,6 @@ static u64 scan_dispatch_log(u64 stop_tb) | |||
| 213 | if (i == be64_to_cpu(vpa->dtl_idx)) | 213 | if (i == be64_to_cpu(vpa->dtl_idx)) |
| 214 | return 0; | 214 | return 0; |
| 215 | while (i < be64_to_cpu(vpa->dtl_idx)) { | 215 | while (i < be64_to_cpu(vpa->dtl_idx)) { |
| 216 | if (dtl_consumer) | ||
| 217 | dtl_consumer(dtl, i); | ||
| 218 | dtb = be64_to_cpu(dtl->timebase); | 216 | dtb = be64_to_cpu(dtl->timebase); |
| 219 | tb_delta = be32_to_cpu(dtl->enqueue_to_dispatch_time) + | 217 | tb_delta = be32_to_cpu(dtl->enqueue_to_dispatch_time) + |
| 220 | be32_to_cpu(dtl->ready_to_enqueue_time); | 218 | be32_to_cpu(dtl->ready_to_enqueue_time); |
| @@ -227,6 +225,8 @@ static u64 scan_dispatch_log(u64 stop_tb) | |||
| 227 | } | 225 | } |
| 228 | if (dtb > stop_tb) | 226 | if (dtb > stop_tb) |
| 229 | break; | 227 | break; |
| 228 | if (dtl_consumer) | ||
| 229 | dtl_consumer(dtl, i); | ||
| 230 | stolen += tb_delta; | 230 | stolen += tb_delta; |
| 231 | ++i; | 231 | ++i; |
| 232 | ++dtl; | 232 | ++dtl; |
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index 6b1f2a6d5517..6b2b69616e77 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S | |||
| @@ -232,9 +232,15 @@ __do_get_tspec: | |||
| 232 | lwz r6,(CFG_TB_ORIG_STAMP+4)(r9) | 232 | lwz r6,(CFG_TB_ORIG_STAMP+4)(r9) |
| 233 | 233 | ||
| 234 | /* Get a stable TB value */ | 234 | /* Get a stable TB value */ |
| 235 | #ifdef CONFIG_8xx | ||
| 236 | 2: mftbu r3 | ||
| 237 | mftbl r4 | ||
| 238 | mftbu r0 | ||
| 239 | #else | ||
| 235 | 2: mfspr r3, SPRN_TBRU | 240 | 2: mfspr r3, SPRN_TBRU |
| 236 | mfspr r4, SPRN_TBRL | 241 | mfspr r4, SPRN_TBRL |
| 237 | mfspr r0, SPRN_TBRU | 242 | mfspr r0, SPRN_TBRU |
| 243 | #endif | ||
| 238 | cmplw cr0,r3,r0 | 244 | cmplw cr0,r3,r0 |
| 239 | bne- 2b | 245 | bne- 2b |
| 240 | 246 | ||
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 45ea281e9a21..542c6f422e4d 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S | |||
| @@ -142,6 +142,13 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) | |||
| 142 | /* Size of CR reg in DWARF unwind info. */ | 142 | /* Size of CR reg in DWARF unwind info. */ |
| 143 | #define CRSIZE 4 | 143 | #define CRSIZE 4 |
| 144 | 144 | ||
| 145 | /* Offset of CR reg within a full word. */ | ||
| 146 | #ifdef __LITTLE_ENDIAN__ | ||
| 147 | #define CROFF 0 | ||
| 148 | #else | ||
| 149 | #define CROFF (RSIZE - CRSIZE) | ||
| 150 | #endif | ||
| 151 | |||
| 145 | /* This is the offset of the VMX reg pointer. */ | 152 | /* This is the offset of the VMX reg pointer. */ |
| 146 | #define VREGS 48*RSIZE+33*8 | 153 | #define VREGS 48*RSIZE+33*8 |
| 147 | 154 | ||
| @@ -181,7 +188,14 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) | |||
| 181 | rsave (31, 31*RSIZE); \ | 188 | rsave (31, 31*RSIZE); \ |
| 182 | rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ | 189 | rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ |
| 183 | rsave (65, 36*RSIZE); /* lr */ \ | 190 | rsave (65, 36*RSIZE); /* lr */ \ |
| 184 | rsave (70, 38*RSIZE + (RSIZE - CRSIZE)) /* cr */ | 191 | rsave (68, 38*RSIZE + CROFF); /* cr fields */ \ |
| 192 | rsave (69, 38*RSIZE + CROFF); \ | ||
| 193 | rsave (70, 38*RSIZE + CROFF); \ | ||
| 194 | rsave (71, 38*RSIZE + CROFF); \ | ||
| 195 | rsave (72, 38*RSIZE + CROFF); \ | ||
| 196 | rsave (73, 38*RSIZE + CROFF); \ | ||
| 197 | rsave (74, 38*RSIZE + CROFF); \ | ||
| 198 | rsave (75, 38*RSIZE + CROFF) | ||
| 185 | 199 | ||
| 186 | /* Describe where the FP regs are saved. */ | 200 | /* Describe where the FP regs are saved. */ |
| 187 | #define EH_FRAME_FP \ | 201 | #define EH_FRAME_FP \ |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index e7d0c88f621a..76a64821f4a2 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
| @@ -1419,7 +1419,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
| 1419 | 1419 | ||
| 1420 | /* needed to ensure proper operation of coherent allocations | 1420 | /* needed to ensure proper operation of coherent allocations |
| 1421 | * later, in case driver doesn't set it explicitly */ | 1421 | * later, in case driver doesn't set it explicitly */ |
| 1422 | dma_set_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); | 1422 | dma_coerce_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); |
| 1423 | } | 1423 | } |
| 1424 | 1424 | ||
| 1425 | /* register with generic device framework */ | 1425 | /* register with generic device framework */ |
diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c index 6936547018b8..c5f734e20b0f 100644 --- a/arch/powerpc/mm/gup.c +++ b/arch/powerpc/mm/gup.c | |||
| @@ -123,6 +123,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
| 123 | struct mm_struct *mm = current->mm; | 123 | struct mm_struct *mm = current->mm; |
| 124 | unsigned long addr, len, end; | 124 | unsigned long addr, len, end; |
| 125 | unsigned long next; | 125 | unsigned long next; |
| 126 | unsigned long flags; | ||
| 126 | pgd_t *pgdp; | 127 | pgd_t *pgdp; |
| 127 | int nr = 0; | 128 | int nr = 0; |
| 128 | 129 | ||
| @@ -156,7 +157,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
| 156 | * So long as we atomically load page table pointers versus teardown, | 157 | * So long as we atomically load page table pointers versus teardown, |
| 157 | * we can follow the address down to the the page and take a ref on it. | 158 | * we can follow the address down to the the page and take a ref on it. |
| 158 | */ | 159 | */ |
| 159 | local_irq_disable(); | 160 | local_irq_save(flags); |
| 160 | 161 | ||
| 161 | pgdp = pgd_offset(mm, addr); | 162 | pgdp = pgd_offset(mm, addr); |
| 162 | do { | 163 | do { |
| @@ -179,7 +180,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
| 179 | break; | 180 | break; |
| 180 | } while (pgdp++, addr = next, addr != end); | 181 | } while (pgdp++, addr = next, addr != end); |
| 181 | 182 | ||
| 182 | local_irq_enable(); | 183 | local_irq_restore(flags); |
| 183 | 184 | ||
| 184 | return nr; | 185 | return nr; |
| 185 | } | 186 | } |
diff --git a/arch/powerpc/mm/hugetlbpage-book3e.c b/arch/powerpc/mm/hugetlbpage-book3e.c index 3bc700655fc8..74551b5e41e5 100644 --- a/arch/powerpc/mm/hugetlbpage-book3e.c +++ b/arch/powerpc/mm/hugetlbpage-book3e.c | |||
| @@ -117,6 +117,5 @@ void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | |||
| 117 | struct hstate *hstate = hstate_file(vma->vm_file); | 117 | struct hstate *hstate = hstate_file(vma->vm_file); |
| 118 | unsigned long tsize = huge_page_shift(hstate) - 10; | 118 | unsigned long tsize = huge_page_shift(hstate) - 10; |
| 119 | 119 | ||
| 120 | __flush_tlb_page(vma ? vma->vm_mm : NULL, vmaddr, tsize, 0); | 120 | __flush_tlb_page(vma->vm_mm, vmaddr, tsize, 0); |
| 121 | |||
| 122 | } | 121 | } |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 3e99c149271a..7ce9cf3b6988 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
| @@ -258,7 +258,7 @@ static bool slice_scan_available(unsigned long addr, | |||
| 258 | slice = GET_HIGH_SLICE_INDEX(addr); | 258 | slice = GET_HIGH_SLICE_INDEX(addr); |
| 259 | *boundary_addr = (slice + end) ? | 259 | *boundary_addr = (slice + end) ? |
| 260 | ((slice + end) << SLICE_HIGH_SHIFT) : SLICE_LOW_TOP; | 260 | ((slice + end) << SLICE_HIGH_SHIFT) : SLICE_LOW_TOP; |
| 261 | return !!(available.high_slices & (1u << slice)); | 261 | return !!(available.high_slices & (1ul << slice)); |
| 262 | } | 262 | } |
| 263 | } | 263 | } |
| 264 | 264 | ||
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c index 41cd68dee681..358d74303138 100644 --- a/arch/powerpc/mm/tlb_nohash.c +++ b/arch/powerpc/mm/tlb_nohash.c | |||
| @@ -305,7 +305,7 @@ void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr, | |||
| 305 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) | 305 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) |
| 306 | { | 306 | { |
| 307 | #ifdef CONFIG_HUGETLB_PAGE | 307 | #ifdef CONFIG_HUGETLB_PAGE |
| 308 | if (is_vm_hugetlb_page(vma)) | 308 | if (vma && is_vm_hugetlb_page(vma)) |
| 309 | flush_hugetlb_page(vma, vmaddr); | 309 | flush_hugetlb_page(vma, vmaddr); |
| 310 | #endif | 310 | #endif |
| 311 | 311 | ||
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index c2a566fb8bb8..bca2465a9c34 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
| @@ -403,3 +403,28 @@ config PPC_DOORBELL | |||
| 403 | default n | 403 | default n |
| 404 | 404 | ||
| 405 | endmenu | 405 | endmenu |
| 406 | |||
| 407 | choice | ||
| 408 | prompt "Endianness selection" | ||
| 409 | default CPU_BIG_ENDIAN | ||
| 410 | help | ||
| 411 | This option selects whether a big endian or little endian kernel will | ||
| 412 | be built. | ||
| 413 | |||
| 414 | config CPU_BIG_ENDIAN | ||
| 415 | bool "Build big endian kernel" | ||
| 416 | help | ||
| 417 | Build a big endian kernel. | ||
| 418 | |||
| 419 | If unsure, select this option. | ||
| 420 | |||
| 421 | config CPU_LITTLE_ENDIAN | ||
| 422 | bool "Build little endian kernel" | ||
| 423 | help | ||
| 424 | Build a little endian kernel. | ||
| 425 | |||
| 426 | Note that if cross compiling a little endian kernel, | ||
| 427 | CROSS_COMPILE must point to a toolchain capable of targeting | ||
| 428 | little endian powerpc. | ||
| 429 | |||
| 430 | endchoice | ||
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 084cdfa40682..2c6d173842b2 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
| @@ -720,6 +720,7 @@ static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb, | |||
| 720 | tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE; | 720 | tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE; |
| 721 | } | 721 | } |
| 722 | iommu_init_table(tbl, phb->hose->node); | 722 | iommu_init_table(tbl, phb->hose->node); |
| 723 | iommu_register_group(tbl, pci_domain_nr(pe->pbus), pe->pe_number); | ||
| 723 | 724 | ||
| 724 | if (pe->pdev) | 725 | if (pe->pdev) |
| 725 | set_iommu_table_base(&pe->pdev->dev, tbl); | 726 | set_iommu_table_base(&pe->pdev->dev, tbl); |
diff --git a/arch/powerpc/platforms/powernv/rng.c b/arch/powerpc/platforms/powernv/rng.c index 8844628915dc..1cb160dc1609 100644 --- a/arch/powerpc/platforms/powernv/rng.c +++ b/arch/powerpc/platforms/powernv/rng.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
| 20 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
| 21 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
| 22 | #include <asm/smp.h> | ||
| 22 | 23 | ||
| 23 | 24 | ||
| 24 | struct powernv_rng { | 25 | struct powernv_rng { |
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 7fbc25b1813f..ccb633e077b1 100644 --- a/arch/powerpc/platforms/pseries/eeh_pseries.c +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c | |||
| @@ -189,8 +189,9 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag) | |||
| 189 | struct eeh_dev *edev; | 189 | struct eeh_dev *edev; |
| 190 | struct eeh_pe pe; | 190 | struct eeh_pe pe; |
| 191 | struct pci_dn *pdn = PCI_DN(dn); | 191 | struct pci_dn *pdn = PCI_DN(dn); |
| 192 | const u32 *class_code, *vendor_id, *device_id; | 192 | const __be32 *classp, *vendorp, *devicep; |
| 193 | const u32 *regs; | 193 | u32 class_code; |
| 194 | const __be32 *regs; | ||
| 194 | u32 pcie_flags; | 195 | u32 pcie_flags; |
| 195 | int enable = 0; | 196 | int enable = 0; |
| 196 | int ret; | 197 | int ret; |
| @@ -201,22 +202,24 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag) | |||
| 201 | return NULL; | 202 | return NULL; |
| 202 | 203 | ||
| 203 | /* Retrieve class/vendor/device IDs */ | 204 | /* Retrieve class/vendor/device IDs */ |
| 204 | class_code = of_get_property(dn, "class-code", NULL); | 205 | classp = of_get_property(dn, "class-code", NULL); |
| 205 | vendor_id = of_get_property(dn, "vendor-id", NULL); | 206 | vendorp = of_get_property(dn, "vendor-id", NULL); |
| 206 | device_id = of_get_property(dn, "device-id", NULL); | 207 | devicep = of_get_property(dn, "device-id", NULL); |
| 207 | 208 | ||
| 208 | /* Skip for bad OF node or PCI-ISA bridge */ | 209 | /* Skip for bad OF node or PCI-ISA bridge */ |
| 209 | if (!class_code || !vendor_id || !device_id) | 210 | if (!classp || !vendorp || !devicep) |
| 210 | return NULL; | 211 | return NULL; |
| 211 | if (dn->type && !strcmp(dn->type, "isa")) | 212 | if (dn->type && !strcmp(dn->type, "isa")) |
| 212 | return NULL; | 213 | return NULL; |
| 213 | 214 | ||
| 215 | class_code = of_read_number(classp, 1); | ||
| 216 | |||
| 214 | /* | 217 | /* |
| 215 | * Update class code and mode of eeh device. We need | 218 | * Update class code and mode of eeh device. We need |
| 216 | * correctly reflects that current device is root port | 219 | * correctly reflects that current device is root port |
| 217 | * or PCIe switch downstream port. | 220 | * or PCIe switch downstream port. |
| 218 | */ | 221 | */ |
| 219 | edev->class_code = *class_code; | 222 | edev->class_code = class_code; |
| 220 | edev->pcie_cap = pseries_eeh_find_cap(dn, PCI_CAP_ID_EXP); | 223 | edev->pcie_cap = pseries_eeh_find_cap(dn, PCI_CAP_ID_EXP); |
| 221 | edev->mode &= 0xFFFFFF00; | 224 | edev->mode &= 0xFFFFFF00; |
| 222 | if ((edev->class_code >> 8) == PCI_CLASS_BRIDGE_PCI) { | 225 | if ((edev->class_code >> 8) == PCI_CLASS_BRIDGE_PCI) { |
| @@ -243,12 +246,12 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag) | |||
| 243 | /* Initialize the fake PE */ | 246 | /* Initialize the fake PE */ |
| 244 | memset(&pe, 0, sizeof(struct eeh_pe)); | 247 | memset(&pe, 0, sizeof(struct eeh_pe)); |
| 245 | pe.phb = edev->phb; | 248 | pe.phb = edev->phb; |
| 246 | pe.config_addr = regs[0]; | 249 | pe.config_addr = of_read_number(regs, 1); |
| 247 | 250 | ||
| 248 | /* Enable EEH on the device */ | 251 | /* Enable EEH on the device */ |
| 249 | ret = eeh_ops->set_option(&pe, EEH_OPT_ENABLE); | 252 | ret = eeh_ops->set_option(&pe, EEH_OPT_ENABLE); |
| 250 | if (!ret) { | 253 | if (!ret) { |
| 251 | edev->config_addr = regs[0]; | 254 | edev->config_addr = of_read_number(regs, 1); |
| 252 | /* Retrieve PE address */ | 255 | /* Retrieve PE address */ |
| 253 | edev->pe_config_addr = eeh_ops->get_pe_addr(&pe); | 256 | edev->pe_config_addr = eeh_ops->get_pe_addr(&pe); |
| 254 | pe.addr = edev->pe_config_addr; | 257 | pe.addr = edev->pe_config_addr; |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 356bc75ca74f..4fca3def9db9 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
| @@ -245,6 +245,23 @@ static void pSeries_lpar_hptab_clear(void) | |||
| 245 | &(ptes[j].pteh), &(ptes[j].ptel)); | 245 | &(ptes[j].pteh), &(ptes[j].ptel)); |
| 246 | } | 246 | } |
| 247 | } | 247 | } |
| 248 | |||
| 249 | #ifdef __LITTLE_ENDIAN__ | ||
| 250 | /* Reset exceptions to big endian */ | ||
| 251 | if (firmware_has_feature(FW_FEATURE_SET_MODE)) { | ||
| 252 | long rc; | ||
| 253 | |||
| 254 | rc = pseries_big_endian_exceptions(); | ||
| 255 | /* | ||
| 256 | * At this point it is unlikely panic() will get anything | ||
| 257 | * out to the user, but at least this will stop us from | ||
| 258 | * continuing on further and creating an even more | ||
| 259 | * difficult to debug situation. | ||
| 260 | */ | ||
| 261 | if (rc) | ||
| 262 | panic("Could not enable big endian exceptions"); | ||
| 263 | } | ||
| 264 | #endif | ||
| 248 | } | 265 | } |
| 249 | 266 | ||
| 250 | /* | 267 | /* |
diff --git a/arch/powerpc/platforms/pseries/rng.c b/arch/powerpc/platforms/pseries/rng.c index a702f1c08242..72a102758d4e 100644 --- a/arch/powerpc/platforms/pseries/rng.c +++ b/arch/powerpc/platforms/pseries/rng.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
| 14 | #include <asm/archrandom.h> | 14 | #include <asm/archrandom.h> |
| 15 | #include <asm/machdep.h> | 15 | #include <asm/machdep.h> |
| 16 | #include <asm/plpar_wrappers.h> | ||
| 16 | 17 | ||
| 17 | 18 | ||
| 18 | static int pseries_get_random_long(unsigned long *v) | 19 | static int pseries_get_random_long(unsigned long *v) |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 1f97e2b87a62..c1f190858701 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -442,6 +442,32 @@ static void pSeries_machine_kexec(struct kimage *image) | |||
| 442 | } | 442 | } |
| 443 | #endif | 443 | #endif |
| 444 | 444 | ||
| 445 | #ifdef __LITTLE_ENDIAN__ | ||
| 446 | long pseries_big_endian_exceptions(void) | ||
| 447 | { | ||
| 448 | long rc; | ||
| 449 | |||
| 450 | while (1) { | ||
| 451 | rc = enable_big_endian_exceptions(); | ||
| 452 | if (!H_IS_LONG_BUSY(rc)) | ||
| 453 | return rc; | ||
| 454 | mdelay(get_longbusy_msecs(rc)); | ||
| 455 | } | ||
| 456 | } | ||
| 457 | |||
| 458 | static long pseries_little_endian_exceptions(void) | ||
| 459 | { | ||
| 460 | long rc; | ||
| 461 | |||
| 462 | while (1) { | ||
| 463 | rc = enable_little_endian_exceptions(); | ||
| 464 | if (!H_IS_LONG_BUSY(rc)) | ||
| 465 | return rc; | ||
| 466 | mdelay(get_longbusy_msecs(rc)); | ||
| 467 | } | ||
| 468 | } | ||
| 469 | #endif | ||
| 470 | |||
| 445 | static void __init pSeries_setup_arch(void) | 471 | static void __init pSeries_setup_arch(void) |
| 446 | { | 472 | { |
| 447 | panic_timeout = 10; | 473 | panic_timeout = 10; |
| @@ -698,6 +724,22 @@ static int __init pSeries_probe(void) | |||
| 698 | /* Now try to figure out if we are running on LPAR */ | 724 | /* Now try to figure out if we are running on LPAR */ |
| 699 | of_scan_flat_dt(pseries_probe_fw_features, NULL); | 725 | of_scan_flat_dt(pseries_probe_fw_features, NULL); |
| 700 | 726 | ||
| 727 | #ifdef __LITTLE_ENDIAN__ | ||
| 728 | if (firmware_has_feature(FW_FEATURE_SET_MODE)) { | ||
| 729 | long rc; | ||
| 730 | /* | ||
| 731 | * Tell the hypervisor that we want our exceptions to | ||
| 732 | * be taken in little endian mode. If this fails we don't | ||
| 733 | * want to use BUG() because it will trigger an exception. | ||
| 734 | */ | ||
| 735 | rc = pseries_little_endian_exceptions(); | ||
| 736 | if (rc) { | ||
| 737 | ppc_md.progress("H_SET_MODE LE exception fail", 0); | ||
| 738 | panic("Could not enable little endian exceptions"); | ||
| 739 | } | ||
| 740 | } | ||
| 741 | #endif | ||
| 742 | |||
| 701 | if (firmware_has_feature(FW_FEATURE_LPAR)) | 743 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
| 702 | hpte_init_lpar(); | 744 | hpte_init_lpar(); |
| 703 | else | 745 | else |
diff --git a/arch/powerpc/platforms/wsp/chroma.c b/arch/powerpc/platforms/wsp/chroma.c index 8ef53bc2e70e..aaa46b353715 100644 --- a/arch/powerpc/platforms/wsp/chroma.c +++ b/arch/powerpc/platforms/wsp/chroma.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
| 17 | #include <linux/time.h> | 17 | #include <linux/time.h> |
| 18 | #include <linux/of_fdt.h> | ||
| 18 | 19 | ||
| 19 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
| 20 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/wsp/h8.c b/arch/powerpc/platforms/wsp/h8.c index d18e6cc19df3..a3c87f395750 100644 --- a/arch/powerpc/platforms/wsp/h8.c +++ b/arch/powerpc/platforms/wsp/h8.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 11 | #include <linux/of.h> | 11 | #include <linux/of.h> |
| 12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
| 13 | #include <linux/of_address.h> | ||
| 13 | 14 | ||
| 14 | #include "wsp.h" | 15 | #include "wsp.h" |
| 15 | 16 | ||
diff --git a/arch/powerpc/platforms/wsp/ics.c b/arch/powerpc/platforms/wsp/ics.c index 2d3b1dd9571d..9cd92e645028 100644 --- a/arch/powerpc/platforms/wsp/ics.c +++ b/arch/powerpc/platforms/wsp/ics.c | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
| 19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <linux/of_address.h> | ||
| 22 | #include <linux/of_irq.h> | ||
| 21 | 23 | ||
| 22 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| 23 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/wsp/opb_pic.c b/arch/powerpc/platforms/wsp/opb_pic.c index cb565bf93650..3f6729807938 100644 --- a/arch/powerpc/platforms/wsp/opb_pic.c +++ b/arch/powerpc/platforms/wsp/opb_pic.c | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/time.h> | 17 | #include <linux/time.h> |
| 18 | #include <linux/of_address.h> | ||
| 19 | #include <linux/of_irq.h> | ||
| 18 | 20 | ||
| 19 | #include <asm/reg_a2.h> | 21 | #include <asm/reg_a2.h> |
| 20 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/wsp/psr2.c b/arch/powerpc/platforms/wsp/psr2.c index 508ec8282b96..a87b414c766a 100644 --- a/arch/powerpc/platforms/wsp/psr2.c +++ b/arch/powerpc/platforms/wsp/psr2.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
| 17 | #include <linux/time.h> | 17 | #include <linux/time.h> |
| 18 | #include <linux/of_fdt.h> | ||
| 18 | 19 | ||
| 19 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
| 20 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
diff --git a/arch/powerpc/platforms/wsp/scom_wsp.c b/arch/powerpc/platforms/wsp/scom_wsp.c index 8928507affea..6538b4de34fc 100644 --- a/arch/powerpc/platforms/wsp/scom_wsp.c +++ b/arch/powerpc/platforms/wsp/scom_wsp.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
| 15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #include <linux/of_address.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/cputhreads.h> | 19 | #include <asm/cputhreads.h> |
| 19 | #include <asm/reg_a2.h> | 20 | #include <asm/reg_a2.h> |
diff --git a/arch/powerpc/platforms/wsp/wsp.c b/arch/powerpc/platforms/wsp/wsp.c index ddb6efe88914..58cd1f00e1ef 100644 --- a/arch/powerpc/platforms/wsp/wsp.c +++ b/arch/powerpc/platforms/wsp/wsp.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
| 14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
| 15 | #include <linux/time.h> | 15 | #include <linux/time.h> |
| 16 | #include <linux/of_address.h> | ||
| 16 | 17 | ||
| 17 | #include <asm/scom.h> | 18 | #include <asm/scom.h> |
| 18 | 19 | ||
diff --git a/arch/powerpc/sysdev/ppc4xx_ocm.c b/arch/powerpc/sysdev/ppc4xx_ocm.c index b7c43453236d..85d9e37f5ccb 100644 --- a/arch/powerpc/sysdev/ppc4xx_ocm.c +++ b/arch/powerpc/sysdev/ppc4xx_ocm.c | |||
| @@ -339,7 +339,7 @@ void *ppc4xx_ocm_alloc(phys_addr_t *phys, int size, int align, | |||
| 339 | if (IS_ERR_VALUE(offset)) | 339 | if (IS_ERR_VALUE(offset)) |
| 340 | continue; | 340 | continue; |
| 341 | 341 | ||
| 342 | ocm_blk = kzalloc(sizeof(struct ocm_block *), GFP_KERNEL); | 342 | ocm_blk = kzalloc(sizeof(struct ocm_block), GFP_KERNEL); |
| 343 | if (!ocm_blk) { | 343 | if (!ocm_blk) { |
| 344 | printk(KERN_ERR "PPC4XX OCM: could not allocate ocm block"); | 344 | printk(KERN_ERR "PPC4XX OCM: could not allocate ocm block"); |
| 345 | rh_free(ocm_reg->rh, offset); | 345 | rh_free(ocm_reg->rh, offset); |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 314fced4fc14..1e1a03d2d19f 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
| @@ -101,7 +101,7 @@ config S390 | |||
| 101 | select GENERIC_CPU_DEVICES if !SMP | 101 | select GENERIC_CPU_DEVICES if !SMP |
| 102 | select GENERIC_FIND_FIRST_BIT | 102 | select GENERIC_FIND_FIRST_BIT |
| 103 | select GENERIC_SMP_IDLE_THREAD | 103 | select GENERIC_SMP_IDLE_THREAD |
| 104 | select GENERIC_TIME_VSYSCALL_OLD | 104 | select GENERIC_TIME_VSYSCALL |
| 105 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB | 105 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB |
| 106 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 | 106 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 |
| 107 | select HAVE_ARCH_SECCOMP_FILTER | 107 | select HAVE_ARCH_SECCOMP_FILTER |
| @@ -347,14 +347,14 @@ config SMP | |||
| 347 | Even if you don't know what to do here, say Y. | 347 | Even if you don't know what to do here, say Y. |
| 348 | 348 | ||
| 349 | config NR_CPUS | 349 | config NR_CPUS |
| 350 | int "Maximum number of CPUs (2-64)" | 350 | int "Maximum number of CPUs (2-256)" |
| 351 | range 2 64 | 351 | range 2 256 |
| 352 | depends on SMP | 352 | depends on SMP |
| 353 | default "32" if !64BIT | 353 | default "32" if !64BIT |
| 354 | default "64" if 64BIT | 354 | default "64" if 64BIT |
| 355 | help | 355 | help |
| 356 | This allows you to specify the maximum number of CPUs which this | 356 | This allows you to specify the maximum number of CPUs which this |
| 357 | kernel will support. The maximum supported value is 64 and the | 357 | kernel will support. The maximum supported value is 256 and the |
| 358 | minimum value which makes sense is 2. | 358 | minimum value which makes sense is 2. |
| 359 | 359 | ||
| 360 | This is purely to save memory - each supported CPU adds | 360 | This is purely to save memory - each supported CPU adds |
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index 46cae138ece2..b3feabd39f31 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c | |||
| @@ -35,7 +35,6 @@ static u8 *ctrblk; | |||
| 35 | static char keylen_flag; | 35 | static char keylen_flag; |
| 36 | 36 | ||
| 37 | struct s390_aes_ctx { | 37 | struct s390_aes_ctx { |
| 38 | u8 iv[AES_BLOCK_SIZE]; | ||
| 39 | u8 key[AES_MAX_KEY_SIZE]; | 38 | u8 key[AES_MAX_KEY_SIZE]; |
| 40 | long enc; | 39 | long enc; |
| 41 | long dec; | 40 | long dec; |
| @@ -56,8 +55,7 @@ struct pcc_param { | |||
| 56 | 55 | ||
| 57 | struct s390_xts_ctx { | 56 | struct s390_xts_ctx { |
| 58 | u8 key[32]; | 57 | u8 key[32]; |
| 59 | u8 xts_param[16]; | 58 | u8 pcc_key[32]; |
| 60 | struct pcc_param pcc; | ||
| 61 | long enc; | 59 | long enc; |
| 62 | long dec; | 60 | long dec; |
| 63 | int key_len; | 61 | int key_len; |
| @@ -441,30 +439,36 @@ static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, | |||
| 441 | return aes_set_key(tfm, in_key, key_len); | 439 | return aes_set_key(tfm, in_key, key_len); |
| 442 | } | 440 | } |
| 443 | 441 | ||
| 444 | static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, void *param, | 442 | static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, |
| 445 | struct blkcipher_walk *walk) | 443 | struct blkcipher_walk *walk) |
| 446 | { | 444 | { |
| 445 | struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); | ||
| 447 | int ret = blkcipher_walk_virt(desc, walk); | 446 | int ret = blkcipher_walk_virt(desc, walk); |
| 448 | unsigned int nbytes = walk->nbytes; | 447 | unsigned int nbytes = walk->nbytes; |
| 448 | struct { | ||
| 449 | u8 iv[AES_BLOCK_SIZE]; | ||
| 450 | u8 key[AES_MAX_KEY_SIZE]; | ||
| 451 | } param; | ||
| 449 | 452 | ||
| 450 | if (!nbytes) | 453 | if (!nbytes) |
| 451 | goto out; | 454 | goto out; |
| 452 | 455 | ||
| 453 | memcpy(param, walk->iv, AES_BLOCK_SIZE); | 456 | memcpy(param.iv, walk->iv, AES_BLOCK_SIZE); |
| 457 | memcpy(param.key, sctx->key, sctx->key_len); | ||
| 454 | do { | 458 | do { |
| 455 | /* only use complete blocks */ | 459 | /* only use complete blocks */ |
| 456 | unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); | 460 | unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); |
| 457 | u8 *out = walk->dst.virt.addr; | 461 | u8 *out = walk->dst.virt.addr; |
| 458 | u8 *in = walk->src.virt.addr; | 462 | u8 *in = walk->src.virt.addr; |
| 459 | 463 | ||
| 460 | ret = crypt_s390_kmc(func, param, out, in, n); | 464 | ret = crypt_s390_kmc(func, ¶m, out, in, n); |
| 461 | if (ret < 0 || ret != n) | 465 | if (ret < 0 || ret != n) |
| 462 | return -EIO; | 466 | return -EIO; |
| 463 | 467 | ||
| 464 | nbytes &= AES_BLOCK_SIZE - 1; | 468 | nbytes &= AES_BLOCK_SIZE - 1; |
| 465 | ret = blkcipher_walk_done(desc, walk, nbytes); | 469 | ret = blkcipher_walk_done(desc, walk, nbytes); |
| 466 | } while ((nbytes = walk->nbytes)); | 470 | } while ((nbytes = walk->nbytes)); |
| 467 | memcpy(walk->iv, param, AES_BLOCK_SIZE); | 471 | memcpy(walk->iv, param.iv, AES_BLOCK_SIZE); |
| 468 | 472 | ||
| 469 | out: | 473 | out: |
| 470 | return ret; | 474 | return ret; |
| @@ -481,7 +485,7 @@ static int cbc_aes_encrypt(struct blkcipher_desc *desc, | |||
| 481 | return fallback_blk_enc(desc, dst, src, nbytes); | 485 | return fallback_blk_enc(desc, dst, src, nbytes); |
| 482 | 486 | ||
| 483 | blkcipher_walk_init(&walk, dst, src, nbytes); | 487 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 484 | return cbc_aes_crypt(desc, sctx->enc, sctx->iv, &walk); | 488 | return cbc_aes_crypt(desc, sctx->enc, &walk); |
| 485 | } | 489 | } |
| 486 | 490 | ||
| 487 | static int cbc_aes_decrypt(struct blkcipher_desc *desc, | 491 | static int cbc_aes_decrypt(struct blkcipher_desc *desc, |
| @@ -495,7 +499,7 @@ static int cbc_aes_decrypt(struct blkcipher_desc *desc, | |||
| 495 | return fallback_blk_dec(desc, dst, src, nbytes); | 499 | return fallback_blk_dec(desc, dst, src, nbytes); |
| 496 | 500 | ||
| 497 | blkcipher_walk_init(&walk, dst, src, nbytes); | 501 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 498 | return cbc_aes_crypt(desc, sctx->dec, sctx->iv, &walk); | 502 | return cbc_aes_crypt(desc, sctx->dec, &walk); |
| 499 | } | 503 | } |
| 500 | 504 | ||
| 501 | static struct crypto_alg cbc_aes_alg = { | 505 | static struct crypto_alg cbc_aes_alg = { |
| @@ -586,7 +590,7 @@ static int xts_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, | |||
| 586 | xts_ctx->enc = KM_XTS_128_ENCRYPT; | 590 | xts_ctx->enc = KM_XTS_128_ENCRYPT; |
| 587 | xts_ctx->dec = KM_XTS_128_DECRYPT; | 591 | xts_ctx->dec = KM_XTS_128_DECRYPT; |
| 588 | memcpy(xts_ctx->key + 16, in_key, 16); | 592 | memcpy(xts_ctx->key + 16, in_key, 16); |
| 589 | memcpy(xts_ctx->pcc.key + 16, in_key + 16, 16); | 593 | memcpy(xts_ctx->pcc_key + 16, in_key + 16, 16); |
| 590 | break; | 594 | break; |
| 591 | case 48: | 595 | case 48: |
| 592 | xts_ctx->enc = 0; | 596 | xts_ctx->enc = 0; |
| @@ -597,7 +601,7 @@ static int xts_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, | |||
| 597 | xts_ctx->enc = KM_XTS_256_ENCRYPT; | 601 | xts_ctx->enc = KM_XTS_256_ENCRYPT; |
| 598 | xts_ctx->dec = KM_XTS_256_DECRYPT; | 602 | xts_ctx->dec = KM_XTS_256_DECRYPT; |
| 599 | memcpy(xts_ctx->key, in_key, 32); | 603 | memcpy(xts_ctx->key, in_key, 32); |
| 600 | memcpy(xts_ctx->pcc.key, in_key + 32, 32); | 604 | memcpy(xts_ctx->pcc_key, in_key + 32, 32); |
| 601 | break; | 605 | break; |
| 602 | default: | 606 | default: |
| 603 | *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; | 607 | *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; |
| @@ -616,29 +620,33 @@ static int xts_aes_crypt(struct blkcipher_desc *desc, long func, | |||
| 616 | unsigned int nbytes = walk->nbytes; | 620 | unsigned int nbytes = walk->nbytes; |
| 617 | unsigned int n; | 621 | unsigned int n; |
| 618 | u8 *in, *out; | 622 | u8 *in, *out; |
| 619 | void *param; | 623 | struct pcc_param pcc_param; |
| 624 | struct { | ||
| 625 | u8 key[32]; | ||
| 626 | u8 init[16]; | ||
| 627 | } xts_param; | ||
| 620 | 628 | ||
| 621 | if (!nbytes) | 629 | if (!nbytes) |
| 622 | goto out; | 630 | goto out; |
| 623 | 631 | ||
| 624 | memset(xts_ctx->pcc.block, 0, sizeof(xts_ctx->pcc.block)); | 632 | memset(pcc_param.block, 0, sizeof(pcc_param.block)); |
| 625 | memset(xts_ctx->pcc.bit, 0, sizeof(xts_ctx->pcc.bit)); | 633 | memset(pcc_param.bit, 0, sizeof(pcc_param.bit)); |
| 626 | memset(xts_ctx->pcc.xts, 0, sizeof(xts_ctx->pcc.xts)); | 634 | memset(pcc_param.xts, 0, sizeof(pcc_param.xts)); |
| 627 | memcpy(xts_ctx->pcc.tweak, walk->iv, sizeof(xts_ctx->pcc.tweak)); | 635 | memcpy(pcc_param.tweak, walk->iv, sizeof(pcc_param.tweak)); |
| 628 | param = xts_ctx->pcc.key + offset; | 636 | memcpy(pcc_param.key, xts_ctx->pcc_key, 32); |
| 629 | ret = crypt_s390_pcc(func, param); | 637 | ret = crypt_s390_pcc(func, &pcc_param.key[offset]); |
| 630 | if (ret < 0) | 638 | if (ret < 0) |
| 631 | return -EIO; | 639 | return -EIO; |
| 632 | 640 | ||
| 633 | memcpy(xts_ctx->xts_param, xts_ctx->pcc.xts, 16); | 641 | memcpy(xts_param.key, xts_ctx->key, 32); |
| 634 | param = xts_ctx->key + offset; | 642 | memcpy(xts_param.init, pcc_param.xts, 16); |
| 635 | do { | 643 | do { |
| 636 | /* only use complete blocks */ | 644 | /* only use complete blocks */ |
| 637 | n = nbytes & ~(AES_BLOCK_SIZE - 1); | 645 | n = nbytes & ~(AES_BLOCK_SIZE - 1); |
| 638 | out = walk->dst.virt.addr; | 646 | out = walk->dst.virt.addr; |
| 639 | in = walk->src.virt.addr; | 647 | in = walk->src.virt.addr; |
| 640 | 648 | ||
| 641 | ret = crypt_s390_km(func, param, out, in, n); | 649 | ret = crypt_s390_km(func, &xts_param.key[offset], out, in, n); |
| 642 | if (ret < 0 || ret != n) | 650 | if (ret < 0 || ret != n) |
| 643 | return -EIO; | 651 | return -EIO; |
| 644 | 652 | ||
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 316c8503a3b4..114258eeaacd 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
| @@ -48,33 +48,21 @@ static inline void clear_page(void *page) | |||
| 48 | : "memory", "cc"); | 48 | : "memory", "cc"); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | /* | ||
| 52 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to | ||
| 53 | * bypass caches when copying a page. Especially when copying huge pages | ||
| 54 | * this keeps L1 and L2 data caches alive. | ||
| 55 | */ | ||
| 51 | static inline void copy_page(void *to, void *from) | 56 | static inline void copy_page(void *to, void *from) |
| 52 | { | 57 | { |
| 53 | if (MACHINE_HAS_MVPG) { | 58 | register void *reg2 asm ("2") = to; |
| 54 | register unsigned long reg0 asm ("0") = 0; | 59 | register unsigned long reg3 asm ("3") = 0x1000; |
| 55 | asm volatile( | 60 | register void *reg4 asm ("4") = from; |
| 56 | " mvpg %0,%1" | 61 | register unsigned long reg5 asm ("5") = 0xb0001000; |
| 57 | : : "a" (to), "a" (from), "d" (reg0) | 62 | asm volatile( |
| 58 | : "memory", "cc"); | 63 | " mvcl 2,4" |
| 59 | } else | 64 | : "+d" (reg2), "+d" (reg3), "+d" (reg4), "+d" (reg5) |
| 60 | asm volatile( | 65 | : : "memory", "cc"); |
| 61 | " mvc 0(256,%0),0(%1)\n" | ||
| 62 | " mvc 256(256,%0),256(%1)\n" | ||
| 63 | " mvc 512(256,%0),512(%1)\n" | ||
| 64 | " mvc 768(256,%0),768(%1)\n" | ||
| 65 | " mvc 1024(256,%0),1024(%1)\n" | ||
| 66 | " mvc 1280(256,%0),1280(%1)\n" | ||
| 67 | " mvc 1536(256,%0),1536(%1)\n" | ||
| 68 | " mvc 1792(256,%0),1792(%1)\n" | ||
| 69 | " mvc 2048(256,%0),2048(%1)\n" | ||
| 70 | " mvc 2304(256,%0),2304(%1)\n" | ||
| 71 | " mvc 2560(256,%0),2560(%1)\n" | ||
| 72 | " mvc 2816(256,%0),2816(%1)\n" | ||
| 73 | " mvc 3072(256,%0),3072(%1)\n" | ||
| 74 | " mvc 3328(256,%0),3328(%1)\n" | ||
| 75 | " mvc 3584(256,%0),3584(%1)\n" | ||
| 76 | " mvc 3840(256,%0),3840(%1)\n" | ||
| 77 | : : "a" (to), "a" (from) : "memory"); | ||
| 78 | } | 66 | } |
| 79 | 67 | ||
| 80 | #define clear_user_page(page, vaddr, pg) clear_page(page) | 68 | #define clear_user_page(page, vaddr, pg) clear_page(page) |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 30ef748bc161..2f390956c7c1 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | #include <asm/chpid.h> | 10 | #include <asm/chpid.h> |
| 11 | #include <asm/cpu.h> | ||
| 11 | 12 | ||
| 12 | #define SCLP_CHP_INFO_MASK_SIZE 32 | 13 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
| 13 | 14 | ||
| @@ -37,7 +38,7 @@ struct sclp_cpu_info { | |||
| 37 | unsigned int standby; | 38 | unsigned int standby; |
| 38 | unsigned int combined; | 39 | unsigned int combined; |
| 39 | int has_cpu_type; | 40 | int has_cpu_type; |
| 40 | struct sclp_cpu_entry cpu[255]; | 41 | struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1]; |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | int sclp_get_cpu_info(struct sclp_cpu_info *info); | 44 | int sclp_get_cpu_info(struct sclp_cpu_info *info); |
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h index a73eb2e1e918..bc9746a7d47c 100644 --- a/arch/s390/include/asm/vdso.h +++ b/arch/s390/include/asm/vdso.h | |||
| @@ -26,8 +26,9 @@ struct vdso_data { | |||
| 26 | __u64 wtom_clock_nsec; /* 0x28 */ | 26 | __u64 wtom_clock_nsec; /* 0x28 */ |
| 27 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ | 27 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ |
| 28 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ | 28 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ |
| 29 | __u32 ectg_available; | 29 | __u32 ectg_available; /* ECTG instruction present 0x38 */ |
| 30 | __u32 ntp_mult; /* NTP adjusted multiplier 0x3C */ | 30 | __u32 tk_mult; /* Mult. used for xtime_nsec 0x3c */ |
| 31 | __u32 tk_shift; /* Shift used for xtime_nsec 0x40 */ | ||
| 31 | }; | 32 | }; |
| 32 | 33 | ||
| 33 | struct vdso_per_cpu_data { | 34 | struct vdso_per_cpu_data { |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 2416138ebd3e..e4c99a183651 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
| @@ -65,12 +65,14 @@ int main(void) | |||
| 65 | DEFINE(__VDSO_WTOM_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); | 65 | DEFINE(__VDSO_WTOM_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); |
| 66 | DEFINE(__VDSO_TIMEZONE, offsetof(struct vdso_data, tz_minuteswest)); | 66 | DEFINE(__VDSO_TIMEZONE, offsetof(struct vdso_data, tz_minuteswest)); |
| 67 | DEFINE(__VDSO_ECTG_OK, offsetof(struct vdso_data, ectg_available)); | 67 | DEFINE(__VDSO_ECTG_OK, offsetof(struct vdso_data, ectg_available)); |
| 68 | DEFINE(__VDSO_NTP_MULT, offsetof(struct vdso_data, ntp_mult)); | 68 | DEFINE(__VDSO_TK_MULT, offsetof(struct vdso_data, tk_mult)); |
| 69 | DEFINE(__VDSO_TK_SHIFT, offsetof(struct vdso_data, tk_shift)); | ||
| 69 | DEFINE(__VDSO_ECTG_BASE, offsetof(struct vdso_per_cpu_data, ectg_timer_base)); | 70 | DEFINE(__VDSO_ECTG_BASE, offsetof(struct vdso_per_cpu_data, ectg_timer_base)); |
| 70 | DEFINE(__VDSO_ECTG_USER, offsetof(struct vdso_per_cpu_data, ectg_user_time)); | 71 | DEFINE(__VDSO_ECTG_USER, offsetof(struct vdso_per_cpu_data, ectg_user_time)); |
| 71 | /* constants used by the vdso */ | 72 | /* constants used by the vdso */ |
| 72 | DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME); | 73 | DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME); |
| 73 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); | 74 | DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); |
| 75 | DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID); | ||
| 74 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); | 76 | DEFINE(__CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); |
| 75 | BLANK(); | 77 | BLANK(); |
| 76 | /* idle data offsets */ | 78 | /* idle data offsets */ |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 6e2442978409..95e7ba0fbb7e 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
| @@ -194,7 +194,7 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) | |||
| 194 | return -EINVAL; | 194 | return -EINVAL; |
| 195 | 195 | ||
| 196 | /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ | 196 | /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ |
| 197 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 197 | regs->psw.mask = (regs->psw.mask & ~(PSW_MASK_USER | PSW_MASK_RI)) | |
| 198 | (__u64)(user_sregs.regs.psw.mask & PSW32_MASK_USER) << 32 | | 198 | (__u64)(user_sregs.regs.psw.mask & PSW32_MASK_USER) << 32 | |
| 199 | (__u64)(user_sregs.regs.psw.mask & PSW32_MASK_RI) << 32 | | 199 | (__u64)(user_sregs.regs.psw.mask & PSW32_MASK_RI) << 32 | |
| 200 | (__u64)(user_sregs.regs.psw.addr & PSW32_ADDR_AMODE); | 200 | (__u64)(user_sregs.regs.psw.addr & PSW32_ADDR_AMODE); |
diff --git a/arch/s390/kernel/pgm_check.S b/arch/s390/kernel/pgm_check.S index 4a460c44e17e..813ec7260878 100644 --- a/arch/s390/kernel/pgm_check.S +++ b/arch/s390/kernel/pgm_check.S | |||
| @@ -78,7 +78,7 @@ PGM_CHECK_DEFAULT /* 34 */ | |||
| 78 | PGM_CHECK_DEFAULT /* 35 */ | 78 | PGM_CHECK_DEFAULT /* 35 */ |
| 79 | PGM_CHECK_DEFAULT /* 36 */ | 79 | PGM_CHECK_DEFAULT /* 36 */ |
| 80 | PGM_CHECK_DEFAULT /* 37 */ | 80 | PGM_CHECK_DEFAULT /* 37 */ |
| 81 | PGM_CHECK_DEFAULT /* 38 */ | 81 | PGM_CHECK_64BIT(do_dat_exception) /* 38 */ |
| 82 | PGM_CHECK_64BIT(do_dat_exception) /* 39 */ | 82 | PGM_CHECK_64BIT(do_dat_exception) /* 39 */ |
| 83 | PGM_CHECK_64BIT(do_dat_exception) /* 3a */ | 83 | PGM_CHECK_64BIT(do_dat_exception) /* 3a */ |
| 84 | PGM_CHECK_64BIT(do_dat_exception) /* 3b */ | 84 | PGM_CHECK_64BIT(do_dat_exception) /* 3b */ |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index fb535874a246..d8fd508ccd1e 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
| @@ -94,7 +94,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
| 94 | return -EINVAL; | 94 | return -EINVAL; |
| 95 | 95 | ||
| 96 | /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ | 96 | /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ |
| 97 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 97 | regs->psw.mask = (regs->psw.mask & ~(PSW_MASK_USER | PSW_MASK_RI)) | |
| 98 | (user_sregs.regs.psw.mask & (PSW_MASK_USER | PSW_MASK_RI)); | 98 | (user_sregs.regs.psw.mask & (PSW_MASK_USER | PSW_MASK_RI)); |
| 99 | /* Check for invalid user address space control. */ | 99 | /* Check for invalid user address space control. */ |
| 100 | if ((regs->psw.mask & PSW_MASK_ASC) == PSW_ASC_HOME) | 100 | if ((regs->psw.mask & PSW_MASK_ASC) == PSW_ASC_HOME) |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 064c3082ab33..dd95f1631621 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
| @@ -108,20 +108,10 @@ static void fixup_clock_comparator(unsigned long long delta) | |||
| 108 | set_clock_comparator(S390_lowcore.clock_comparator); | 108 | set_clock_comparator(S390_lowcore.clock_comparator); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | static int s390_next_ktime(ktime_t expires, | 111 | static int s390_next_event(unsigned long delta, |
| 112 | struct clock_event_device *evt) | 112 | struct clock_event_device *evt) |
| 113 | { | 113 | { |
| 114 | struct timespec ts; | 114 | S390_lowcore.clock_comparator = get_tod_clock() + delta; |
| 115 | u64 nsecs; | ||
| 116 | |||
| 117 | ts.tv_sec = ts.tv_nsec = 0; | ||
| 118 | monotonic_to_bootbased(&ts); | ||
| 119 | nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); | ||
| 120 | do_div(nsecs, 125); | ||
| 121 | S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); | ||
| 122 | /* Program the maximum value if we have an overflow (== year 2042) */ | ||
| 123 | if (unlikely(S390_lowcore.clock_comparator < sched_clock_base_cc)) | ||
| 124 | S390_lowcore.clock_comparator = -1ULL; | ||
| 125 | set_clock_comparator(S390_lowcore.clock_comparator); | 115 | set_clock_comparator(S390_lowcore.clock_comparator); |
| 126 | return 0; | 116 | return 0; |
| 127 | } | 117 | } |
| @@ -146,15 +136,14 @@ void init_cpu_timer(void) | |||
| 146 | cpu = smp_processor_id(); | 136 | cpu = smp_processor_id(); |
| 147 | cd = &per_cpu(comparators, cpu); | 137 | cd = &per_cpu(comparators, cpu); |
| 148 | cd->name = "comparator"; | 138 | cd->name = "comparator"; |
| 149 | cd->features = CLOCK_EVT_FEAT_ONESHOT | | 139 | cd->features = CLOCK_EVT_FEAT_ONESHOT; |
| 150 | CLOCK_EVT_FEAT_KTIME; | ||
| 151 | cd->mult = 16777; | 140 | cd->mult = 16777; |
| 152 | cd->shift = 12; | 141 | cd->shift = 12; |
| 153 | cd->min_delta_ns = 1; | 142 | cd->min_delta_ns = 1; |
| 154 | cd->max_delta_ns = LONG_MAX; | 143 | cd->max_delta_ns = LONG_MAX; |
| 155 | cd->rating = 400; | 144 | cd->rating = 400; |
| 156 | cd->cpumask = cpumask_of(cpu); | 145 | cd->cpumask = cpumask_of(cpu); |
| 157 | cd->set_next_ktime = s390_next_ktime; | 146 | cd->set_next_event = s390_next_event; |
| 158 | cd->set_mode = s390_set_mode; | 147 | cd->set_mode = s390_set_mode; |
| 159 | 148 | ||
| 160 | clockevents_register_device(cd); | 149 | clockevents_register_device(cd); |
| @@ -221,21 +210,30 @@ struct clocksource * __init clocksource_default_clock(void) | |||
| 221 | return &clocksource_tod; | 210 | return &clocksource_tod; |
| 222 | } | 211 | } |
| 223 | 212 | ||
| 224 | void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, | 213 | void update_vsyscall(struct timekeeper *tk) |
| 225 | struct clocksource *clock, u32 mult) | ||
| 226 | { | 214 | { |
| 227 | if (clock != &clocksource_tod) | 215 | u64 nsecps; |
| 216 | |||
| 217 | if (tk->clock != &clocksource_tod) | ||
| 228 | return; | 218 | return; |
| 229 | 219 | ||
| 230 | /* Make userspace gettimeofday spin until we're done. */ | 220 | /* Make userspace gettimeofday spin until we're done. */ |
| 231 | ++vdso_data->tb_update_count; | 221 | ++vdso_data->tb_update_count; |
| 232 | smp_wmb(); | 222 | smp_wmb(); |
| 233 | vdso_data->xtime_tod_stamp = clock->cycle_last; | 223 | vdso_data->xtime_tod_stamp = tk->clock->cycle_last; |
| 234 | vdso_data->xtime_clock_sec = wall_time->tv_sec; | 224 | vdso_data->xtime_clock_sec = tk->xtime_sec; |
| 235 | vdso_data->xtime_clock_nsec = wall_time->tv_nsec; | 225 | vdso_data->xtime_clock_nsec = tk->xtime_nsec; |
| 236 | vdso_data->wtom_clock_sec = wtm->tv_sec; | 226 | vdso_data->wtom_clock_sec = |
| 237 | vdso_data->wtom_clock_nsec = wtm->tv_nsec; | 227 | tk->xtime_sec + tk->wall_to_monotonic.tv_sec; |
| 238 | vdso_data->ntp_mult = mult; | 228 | vdso_data->wtom_clock_nsec = tk->xtime_nsec + |
| 229 | + (tk->wall_to_monotonic.tv_nsec << tk->shift); | ||
| 230 | nsecps = (u64) NSEC_PER_SEC << tk->shift; | ||
| 231 | while (vdso_data->wtom_clock_nsec >= nsecps) { | ||
| 232 | vdso_data->wtom_clock_nsec -= nsecps; | ||
| 233 | vdso_data->wtom_clock_sec++; | ||
| 234 | } | ||
| 235 | vdso_data->tk_mult = tk->mult; | ||
| 236 | vdso_data->tk_shift = tk->shift; | ||
| 239 | smp_wmb(); | 237 | smp_wmb(); |
| 240 | ++vdso_data->tb_update_count; | 238 | ++vdso_data->tb_update_count; |
| 241 | } | 239 | } |
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index a84476f2a9bb..613649096783 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c | |||
| @@ -125,7 +125,7 @@ int vdso_alloc_per_cpu(struct _lowcore *lowcore) | |||
| 125 | psal[i] = 0x80000000; | 125 | psal[i] = 0x80000000; |
| 126 | 126 | ||
| 127 | lowcore->paste[4] = (u32)(addr_t) psal; | 127 | lowcore->paste[4] = (u32)(addr_t) psal; |
| 128 | psal[0] = 0x20000000; | 128 | psal[0] = 0x02000000; |
| 129 | psal[2] = (u32)(addr_t) aste; | 129 | psal[2] = (u32)(addr_t) aste; |
| 130 | *(unsigned long *) (aste + 2) = segment_table + | 130 | *(unsigned long *) (aste + 2) = segment_table + |
| 131 | _ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT; | 131 | _ASCE_TABLE_LENGTH + _ASCE_USER_BITS + _ASCE_TYPE_SEGMENT; |
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index b2224e0b974c..65fc3979c2f1 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
| @@ -38,25 +38,21 @@ __kernel_clock_gettime: | |||
| 38 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 38 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 39 | brc 3,2f | 39 | brc 3,2f |
| 40 | ahi %r0,-1 | 40 | ahi %r0,-1 |
| 41 | 2: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ | 41 | 2: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 42 | lr %r2,%r0 | 42 | lr %r2,%r0 |
| 43 | l %r0,__VDSO_NTP_MULT(%r5) | 43 | l %r0,__VDSO_TK_MULT(%r5) |
| 44 | ltr %r1,%r1 | 44 | ltr %r1,%r1 |
| 45 | mr %r0,%r0 | 45 | mr %r0,%r0 |
| 46 | jnm 3f | 46 | jnm 3f |
| 47 | a %r0,__VDSO_NTP_MULT(%r5) | 47 | a %r0,__VDSO_TK_MULT(%r5) |
| 48 | 3: alr %r0,%r2 | 48 | 3: alr %r0,%r2 |
| 49 | srdl %r0,12 | 49 | al %r0,__VDSO_WTOM_NSEC(%r5) |
| 50 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | ||
| 51 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | ||
| 52 | brc 12,4f | ||
| 53 | ahi %r0,1 | ||
| 54 | 4: l %r2,__VDSO_XTIME_SEC+4(%r5) | ||
| 55 | al %r0,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic */ | ||
| 56 | al %r1,__VDSO_WTOM_NSEC+4(%r5) | 50 | al %r1,__VDSO_WTOM_NSEC+4(%r5) |
| 57 | brc 12,5f | 51 | brc 12,5f |
| 58 | ahi %r0,1 | 52 | ahi %r0,1 |
| 59 | 5: al %r2,__VDSO_WTOM_SEC+4(%r5) | 53 | 5: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
| 54 | srdl %r0,0(%r2) /* >> tk->shift */ | ||
| 55 | l %r2,__VDSO_WTOM_SEC+4(%r5) | ||
| 60 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 56 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
| 61 | jne 1b | 57 | jne 1b |
| 62 | basr %r5,0 | 58 | basr %r5,0 |
| @@ -86,20 +82,21 @@ __kernel_clock_gettime: | |||
| 86 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 82 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 87 | brc 3,12f | 83 | brc 3,12f |
| 88 | ahi %r0,-1 | 84 | ahi %r0,-1 |
| 89 | 12: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ | 85 | 12: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 90 | lr %r2,%r0 | 86 | lr %r2,%r0 |
| 91 | l %r0,__VDSO_NTP_MULT(%r5) | 87 | l %r0,__VDSO_TK_MULT(%r5) |
| 92 | ltr %r1,%r1 | 88 | ltr %r1,%r1 |
| 93 | mr %r0,%r0 | 89 | mr %r0,%r0 |
| 94 | jnm 13f | 90 | jnm 13f |
| 95 | a %r0,__VDSO_NTP_MULT(%r5) | 91 | a %r0,__VDSO_TK_MULT(%r5) |
| 96 | 13: alr %r0,%r2 | 92 | 13: alr %r0,%r2 |
| 97 | srdl %r0,12 | 93 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
| 98 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | ||
| 99 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | 94 | al %r1,__VDSO_XTIME_NSEC+4(%r5) |
| 100 | brc 12,14f | 95 | brc 12,14f |
| 101 | ahi %r0,1 | 96 | ahi %r0,1 |
| 102 | 14: l %r2,__VDSO_XTIME_SEC+4(%r5) | 97 | 14: l %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
| 98 | srdl %r0,0(%r2) /* >> tk->shift */ | ||
| 99 | l %r2,__VDSO_XTIME_SEC+4(%r5) | ||
| 103 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 100 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
| 104 | jne 11b | 101 | jne 11b |
| 105 | basr %r5,0 | 102 | basr %r5,0 |
diff --git a/arch/s390/kernel/vdso32/gettimeofday.S b/arch/s390/kernel/vdso32/gettimeofday.S index 2d3633175e3b..fd621a950f7c 100644 --- a/arch/s390/kernel/vdso32/gettimeofday.S +++ b/arch/s390/kernel/vdso32/gettimeofday.S | |||
| @@ -35,15 +35,14 @@ __kernel_gettimeofday: | |||
| 35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 36 | brc 3,3f | 36 | brc 3,3f |
| 37 | ahi %r0,-1 | 37 | ahi %r0,-1 |
| 38 | 3: ms %r0,__VDSO_NTP_MULT(%r5) /* cyc2ns(clock,cycle_delta) */ | 38 | 3: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 39 | st %r0,24(%r15) | 39 | st %r0,24(%r15) |
| 40 | l %r0,__VDSO_NTP_MULT(%r5) | 40 | l %r0,__VDSO_TK_MULT(%r5) |
| 41 | ltr %r1,%r1 | 41 | ltr %r1,%r1 |
| 42 | mr %r0,%r0 | 42 | mr %r0,%r0 |
| 43 | jnm 4f | 43 | jnm 4f |
| 44 | a %r0,__VDSO_NTP_MULT(%r5) | 44 | a %r0,__VDSO_TK_MULT(%r5) |
| 45 | 4: al %r0,24(%r15) | 45 | 4: al %r0,24(%r15) |
| 46 | srdl %r0,12 | ||
| 47 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 46 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
| 48 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | 47 | al %r1,__VDSO_XTIME_NSEC+4(%r5) |
| 49 | brc 12,5f | 48 | brc 12,5f |
| @@ -51,6 +50,8 @@ __kernel_gettimeofday: | |||
| 51 | 5: mvc 24(4,%r15),__VDSO_XTIME_SEC+4(%r5) | 50 | 5: mvc 24(4,%r15),__VDSO_XTIME_SEC+4(%r5) |
| 52 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 51 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
| 53 | jne 1b | 52 | jne 1b |
| 53 | l %r4,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | ||
| 54 | srdl %r0,0(%r4) /* >> tk->shift */ | ||
| 54 | l %r4,24(%r15) /* get tv_sec from stack */ | 55 | l %r4,24(%r15) /* get tv_sec from stack */ |
| 55 | basr %r5,0 | 56 | basr %r5,0 |
| 56 | 6: ltr %r0,%r0 | 57 | 6: ltr %r0,%r0 |
diff --git a/arch/s390/kernel/vdso64/clock_getres.S b/arch/s390/kernel/vdso64/clock_getres.S index 176e1f75f9aa..34deba7c7ed1 100644 --- a/arch/s390/kernel/vdso64/clock_getres.S +++ b/arch/s390/kernel/vdso64/clock_getres.S | |||
| @@ -23,7 +23,9 @@ __kernel_clock_getres: | |||
| 23 | je 0f | 23 | je 0f |
| 24 | cghi %r2,__CLOCK_MONOTONIC | 24 | cghi %r2,__CLOCK_MONOTONIC |
| 25 | je 0f | 25 | je 0f |
| 26 | cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 26 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID |
| 27 | je 0f | ||
| 28 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ | ||
| 27 | jne 2f | 29 | jne 2f |
| 28 | larl %r5,_vdso_data | 30 | larl %r5,_vdso_data |
| 29 | icm %r0,15,__LC_ECTG_OK(%r5) | 31 | icm %r0,15,__LC_ECTG_OK(%r5) |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index d46c95ed5f19..91940ed33a4a 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
| @@ -22,7 +22,9 @@ __kernel_clock_gettime: | |||
| 22 | larl %r5,_vdso_data | 22 | larl %r5,_vdso_data |
| 23 | cghi %r2,__CLOCK_REALTIME | 23 | cghi %r2,__CLOCK_REALTIME |
| 24 | je 4f | 24 | je 4f |
| 25 | cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 25 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID |
| 26 | je 9f | ||
| 27 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ | ||
| 26 | je 9f | 28 | je 9f |
| 27 | cghi %r2,__CLOCK_MONOTONIC | 29 | cghi %r2,__CLOCK_MONOTONIC |
| 28 | jne 12f | 30 | jne 12f |
| @@ -34,14 +36,13 @@ __kernel_clock_gettime: | |||
| 34 | tmll %r4,0x0001 /* pending update ? loop */ | 36 | tmll %r4,0x0001 /* pending update ? loop */ |
| 35 | jnz 0b | 37 | jnz 0b |
| 36 | stck 48(%r15) /* Store TOD clock */ | 38 | stck 48(%r15) /* Store TOD clock */ |
| 39 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | ||
| 40 | lg %r0,__VDSO_WTOM_SEC(%r5) | ||
| 37 | lg %r1,48(%r15) | 41 | lg %r1,48(%r15) |
| 38 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 42 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 39 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ | 43 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 40 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 44 | alg %r1,__VDSO_WTOM_NSEC(%r5) |
| 41 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 45 | srlg %r1,%r1,0(%r2) /* >> tk->shift */ |
| 42 | lg %r0,__VDSO_XTIME_SEC(%r5) | ||
| 43 | alg %r1,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic */ | ||
| 44 | alg %r0,__VDSO_WTOM_SEC(%r5) | ||
| 45 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ | 46 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ |
| 46 | jne 0b | 47 | jne 0b |
| 47 | larl %r5,13f | 48 | larl %r5,13f |
| @@ -62,12 +63,13 @@ __kernel_clock_gettime: | |||
| 62 | tmll %r4,0x0001 /* pending update ? loop */ | 63 | tmll %r4,0x0001 /* pending update ? loop */ |
| 63 | jnz 5b | 64 | jnz 5b |
| 64 | stck 48(%r15) /* Store TOD clock */ | 65 | stck 48(%r15) /* Store TOD clock */ |
| 66 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | ||
| 65 | lg %r1,48(%r15) | 67 | lg %r1,48(%r15) |
| 66 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 68 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 67 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ | 69 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 68 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 70 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
| 69 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 71 | srlg %r1,%r1,0(%r2) /* >> tk->shift */ |
| 70 | lg %r0,__VDSO_XTIME_SEC(%r5) | 72 | lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */ |
| 71 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ | 73 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ |
| 72 | jne 5b | 74 | jne 5b |
| 73 | larl %r5,13f | 75 | larl %r5,13f |
diff --git a/arch/s390/kernel/vdso64/gettimeofday.S b/arch/s390/kernel/vdso64/gettimeofday.S index 36ee674722ec..d0860d1d0ccc 100644 --- a/arch/s390/kernel/vdso64/gettimeofday.S +++ b/arch/s390/kernel/vdso64/gettimeofday.S | |||
| @@ -31,12 +31,13 @@ __kernel_gettimeofday: | |||
| 31 | stck 48(%r15) /* Store TOD clock */ | 31 | stck 48(%r15) /* Store TOD clock */ |
| 32 | lg %r1,48(%r15) | 32 | lg %r1,48(%r15) |
| 33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 34 | msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ | 34 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 35 | srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ | 35 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
| 36 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime.tv_nsec */ | 36 | lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */ |
| 37 | lg %r0,__VDSO_XTIME_SEC(%r5) /* xtime.tv_sec */ | ||
| 38 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ | 37 | clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ |
| 39 | jne 0b | 38 | jne 0b |
| 39 | lgf %r5,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | ||
| 40 | srlg %r1,%r1,0(%r5) /* >> tk->shift */ | ||
| 40 | larl %r5,5f | 41 | larl %r5,5f |
| 41 | 2: clg %r1,0(%r5) | 42 | 2: clg %r1,0(%r5) |
| 42 | jl 3f | 43 | jl 3f |
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 97e03caf7825..dbdab3e7a1a6 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
| @@ -78,11 +78,14 @@ static size_t copy_in_kernel(size_t count, void __user *to, | |||
| 78 | * contains the (negative) exception code. | 78 | * contains the (negative) exception code. |
| 79 | */ | 79 | */ |
| 80 | #ifdef CONFIG_64BIT | 80 | #ifdef CONFIG_64BIT |
| 81 | |||
| 81 | static unsigned long follow_table(struct mm_struct *mm, | 82 | static unsigned long follow_table(struct mm_struct *mm, |
| 82 | unsigned long address, int write) | 83 | unsigned long address, int write) |
| 83 | { | 84 | { |
| 84 | unsigned long *table = (unsigned long *)__pa(mm->pgd); | 85 | unsigned long *table = (unsigned long *)__pa(mm->pgd); |
| 85 | 86 | ||
| 87 | if (unlikely(address > mm->context.asce_limit - 1)) | ||
| 88 | return -0x38UL; | ||
| 86 | switch (mm->context.asce_bits & _ASCE_TYPE_MASK) { | 89 | switch (mm->context.asce_bits & _ASCE_TYPE_MASK) { |
| 87 | case _ASCE_TYPE_REGION1: | 90 | case _ASCE_TYPE_REGION1: |
| 88 | table = table + ((address >> 53) & 0x7ff); | 91 | table = table + ((address >> 53) & 0x7ff); |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 48d92bbe62e9..36e658a4291c 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
| @@ -33,12 +33,11 @@ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas | |||
| 33 | 33 | ||
| 34 | HEADER_ARCH := $(SUBARCH) | 34 | HEADER_ARCH := $(SUBARCH) |
| 35 | 35 | ||
| 36 | # Additional ARCH settings for x86 | 36 | ifneq ($(filter $(SUBARCH),x86 x86_64 i386),) |
| 37 | ifeq ($(SUBARCH),i386) | 37 | HEADER_ARCH := x86 |
| 38 | HEADER_ARCH := x86 | ||
| 39 | endif | 38 | endif |
| 40 | ifeq ($(SUBARCH),x86_64) | 39 | |
| 41 | HEADER_ARCH := x86 | 40 | ifdef CONFIG_64BIT |
| 42 | KBUILD_CFLAGS += -mcmodel=large | 41 | KBUILD_CFLAGS += -mcmodel=large |
| 43 | endif | 42 | endif |
| 44 | 43 | ||
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 4d6fdf68edf3..799d7e413bf5 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
| @@ -19,7 +19,7 @@ struct stack_frame { | |||
| 19 | unsigned long return_address; | 19 | unsigned long return_address; |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | static void print_stack_trace(unsigned long *sp, unsigned long bp) | 22 | static void do_stack_trace(unsigned long *sp, unsigned long bp) |
| 23 | { | 23 | { |
| 24 | int reliable; | 24 | int reliable; |
| 25 | unsigned long addr; | 25 | unsigned long addr; |
| @@ -94,5 +94,5 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
| 94 | } | 94 | } |
| 95 | printk(KERN_CONT "\n"); | 95 | printk(KERN_CONT "\n"); |
| 96 | 96 | ||
| 97 | print_stack_trace(sp, bp); | 97 | do_stack_trace(sp, bp); |
| 98 | } | 98 | } |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 41250fb33985..57d021507120 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y) | |||
| 31 | 31 | ||
| 32 | KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return | 32 | KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return |
| 33 | 33 | ||
| 34 | # Don't autogenerate MMX or SSE instructions | ||
| 35 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 36 | |||
| 34 | # Never want PIC in a 32-bit kernel, prevent breakage with GCC built | 37 | # Never want PIC in a 32-bit kernel, prevent breakage with GCC built |
| 35 | # with nonstandard options | 38 | # with nonstandard options |
| 36 | KBUILD_CFLAGS += -fno-pic | 39 | KBUILD_CFLAGS += -fno-pic |
| @@ -57,8 +60,11 @@ else | |||
| 57 | KBUILD_AFLAGS += -m64 | 60 | KBUILD_AFLAGS += -m64 |
| 58 | KBUILD_CFLAGS += -m64 | 61 | KBUILD_CFLAGS += -m64 |
| 59 | 62 | ||
| 63 | # Don't autogenerate MMX or SSE instructions | ||
| 64 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 65 | |||
| 60 | # Use -mpreferred-stack-boundary=3 if supported. | 66 | # Use -mpreferred-stack-boundary=3 if supported. |
| 61 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3) | 67 | KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) |
| 62 | 68 | ||
| 63 | # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) | 69 | # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) |
| 64 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 70 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index dce69a256896..d9c11956fce0 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
| @@ -53,18 +53,18 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE | |||
| 53 | 53 | ||
| 54 | # How to compile the 16-bit code. Note we always compile for -march=i386, | 54 | # How to compile the 16-bit code. Note we always compile for -march=i386, |
| 55 | # that way we can complain to the user if the CPU is insufficient. | 55 | # that way we can complain to the user if the CPU is insufficient. |
| 56 | KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ | 56 | KBUILD_CFLAGS := $(USERINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \ |
| 57 | -DDISABLE_BRANCH_PROFILING \ | 57 | -DDISABLE_BRANCH_PROFILING \ |
| 58 | -Wall -Wstrict-prototypes \ | 58 | -Wall -Wstrict-prototypes \ |
| 59 | -march=i386 -mregparm=3 \ | 59 | -march=i386 -mregparm=3 \ |
| 60 | -include $(srctree)/$(src)/code16gcc.h \ | 60 | -include $(srctree)/$(src)/code16gcc.h \ |
| 61 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ | 61 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ |
| 62 | -mno-mmx -mno-sse \ | ||
| 62 | $(call cc-option, -ffreestanding) \ | 63 | $(call cc-option, -ffreestanding) \ |
| 63 | $(call cc-option, -fno-toplevel-reorder,\ | 64 | $(call cc-option, -fno-toplevel-reorder,\ |
| 64 | $(call cc-option, -fno-unit-at-a-time)) \ | 65 | $(call cc-option, -fno-unit-at-a-time)) \ |
| 65 | $(call cc-option, -fno-stack-protector) \ | 66 | $(call cc-option, -fno-stack-protector) \ |
| 66 | $(call cc-option, -mpreferred-stack-boundary=2) | 67 | $(call cc-option, -mpreferred-stack-boundary=2) |
| 67 | KBUILD_CFLAGS += $(call cc-option, -m32) | ||
| 68 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 68 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
| 69 | GCOV_PROFILE := n | 69 | GCOV_PROFILE := n |
| 70 | 70 | ||
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index dcd90df10ab4..c8a6792e7842 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
| @@ -13,6 +13,7 @@ KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING | |||
| 13 | cflags-$(CONFIG_X86_32) := -march=i386 | 13 | cflags-$(CONFIG_X86_32) := -march=i386 |
| 14 | cflags-$(CONFIG_X86_64) := -mcmodel=small | 14 | cflags-$(CONFIG_X86_64) := -mcmodel=small |
| 15 | KBUILD_CFLAGS += $(cflags-y) | 15 | KBUILD_CFLAGS += $(cflags-y) |
| 16 | KBUILD_CFLAGS += -mno-mmx -mno-sse | ||
| 16 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) | 17 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) |
| 17 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) | 18 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
| 18 | 19 | ||
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 7d6ba9db1be9..e0fc24db234a 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile | |||
| @@ -3,8 +3,9 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | avx_supported := $(call as-instr,vpxor %xmm0$(comma)%xmm0$(comma)%xmm0,yes,no) | 5 | avx_supported := $(call as-instr,vpxor %xmm0$(comma)%xmm0$(comma)%xmm0,yes,no) |
| 6 | avx2_supported := $(call as-instr,vpgatherdd %ymm0$(comma)(%eax$(comma)%ymm1\ | ||
| 7 | $(comma)4)$(comma)%ymm2,yes,no) | ||
| 6 | 8 | ||
| 7 | obj-$(CONFIG_CRYPTO_ABLK_HELPER_X86) += ablk_helper.o | ||
| 8 | obj-$(CONFIG_CRYPTO_GLUE_HELPER_X86) += glue_helper.o | 9 | obj-$(CONFIG_CRYPTO_GLUE_HELPER_X86) += glue_helper.o |
| 9 | 10 | ||
| 10 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o | 11 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o |
diff --git a/arch/x86/crypto/ablk_helper.c b/arch/x86/crypto/ablk_helper.c deleted file mode 100644 index 43282fe04a8b..000000000000 --- a/arch/x86/crypto/ablk_helper.c +++ /dev/null | |||
| @@ -1,149 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Shared async block cipher helpers | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
| 5 | * | ||
| 6 | * Based on aesni-intel_glue.c by: | ||
| 7 | * Copyright (C) 2008, Intel Corp. | ||
| 8 | * Author: Huang Ying <ying.huang@intel.com> | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 23 | * USA | ||
| 24 | * | ||
| 25 | */ | ||
| 26 | |||
| 27 | #include <linux/kernel.h> | ||
| 28 | #include <linux/crypto.h> | ||
| 29 | #include <linux/init.h> | ||
| 30 | #include <linux/module.h> | ||
| 31 | #include <crypto/algapi.h> | ||
| 32 | #include <crypto/cryptd.h> | ||
| 33 | #include <asm/i387.h> | ||
| 34 | #include <asm/crypto/ablk_helper.h> | ||
| 35 | |||
| 36 | int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, | ||
| 37 | unsigned int key_len) | ||
| 38 | { | ||
| 39 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 40 | struct crypto_ablkcipher *child = &ctx->cryptd_tfm->base; | ||
| 41 | int err; | ||
| 42 | |||
| 43 | crypto_ablkcipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); | ||
| 44 | crypto_ablkcipher_set_flags(child, crypto_ablkcipher_get_flags(tfm) | ||
| 45 | & CRYPTO_TFM_REQ_MASK); | ||
| 46 | err = crypto_ablkcipher_setkey(child, key, key_len); | ||
| 47 | crypto_ablkcipher_set_flags(tfm, crypto_ablkcipher_get_flags(child) | ||
| 48 | & CRYPTO_TFM_RES_MASK); | ||
| 49 | return err; | ||
| 50 | } | ||
| 51 | EXPORT_SYMBOL_GPL(ablk_set_key); | ||
| 52 | |||
| 53 | int __ablk_encrypt(struct ablkcipher_request *req) | ||
| 54 | { | ||
| 55 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 56 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 57 | struct blkcipher_desc desc; | ||
| 58 | |||
| 59 | desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); | ||
| 60 | desc.info = req->info; | ||
| 61 | desc.flags = 0; | ||
| 62 | |||
| 63 | return crypto_blkcipher_crt(desc.tfm)->encrypt( | ||
| 64 | &desc, req->dst, req->src, req->nbytes); | ||
| 65 | } | ||
| 66 | EXPORT_SYMBOL_GPL(__ablk_encrypt); | ||
| 67 | |||
| 68 | int ablk_encrypt(struct ablkcipher_request *req) | ||
| 69 | { | ||
| 70 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 71 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 72 | |||
| 73 | if (!irq_fpu_usable()) { | ||
| 74 | struct ablkcipher_request *cryptd_req = | ||
| 75 | ablkcipher_request_ctx(req); | ||
| 76 | |||
| 77 | memcpy(cryptd_req, req, sizeof(*req)); | ||
| 78 | ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); | ||
| 79 | |||
| 80 | return crypto_ablkcipher_encrypt(cryptd_req); | ||
| 81 | } else { | ||
| 82 | return __ablk_encrypt(req); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | EXPORT_SYMBOL_GPL(ablk_encrypt); | ||
| 86 | |||
| 87 | int ablk_decrypt(struct ablkcipher_request *req) | ||
| 88 | { | ||
| 89 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | ||
| 90 | struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); | ||
| 91 | |||
| 92 | if (!irq_fpu_usable()) { | ||
| 93 | struct ablkcipher_request *cryptd_req = | ||
| 94 | ablkcipher_request_ctx(req); | ||
| 95 | |||
| 96 | memcpy(cryptd_req, req, sizeof(*req)); | ||
| 97 | ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); | ||
| 98 | |||
| 99 | return crypto_ablkcipher_decrypt(cryptd_req); | ||
| 100 | } else { | ||
| 101 | struct blkcipher_desc desc; | ||
| 102 | |||
| 103 | desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); | ||
| 104 | desc.info = req->info; | ||
| 105 | desc.flags = 0; | ||
| 106 | |||
| 107 | return crypto_blkcipher_crt(desc.tfm)->decrypt( | ||
| 108 | &desc, req->dst, req->src, req->nbytes); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | EXPORT_SYMBOL_GPL(ablk_decrypt); | ||
| 112 | |||
| 113 | void ablk_exit(struct crypto_tfm *tfm) | ||
| 114 | { | ||
| 115 | struct async_helper_ctx *ctx = crypto_tfm_ctx(tfm); | ||
| 116 | |||
| 117 | cryptd_free_ablkcipher(ctx->cryptd_tfm); | ||
| 118 | } | ||
| 119 | EXPORT_SYMBOL_GPL(ablk_exit); | ||
| 120 | |||
| 121 | int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name) | ||
| 122 | { | ||
| 123 | struct async_helper_ctx *ctx = crypto_tfm_ctx(tfm); | ||
| 124 | struct cryptd_ablkcipher *cryptd_tfm; | ||
| 125 | |||
| 126 | cryptd_tfm = cryptd_alloc_ablkcipher(drv_name, 0, 0); | ||
| 127 | if (IS_ERR(cryptd_tfm)) | ||
| 128 | return PTR_ERR(cryptd_tfm); | ||
| 129 | |||
| 130 | ctx->cryptd_tfm = cryptd_tfm; | ||
| 131 | tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request) + | ||
| 132 | crypto_ablkcipher_reqsize(&cryptd_tfm->base); | ||
| 133 | |||
| 134 | return 0; | ||
| 135 | } | ||
| 136 | EXPORT_SYMBOL_GPL(ablk_init_common); | ||
| 137 | |||
| 138 | int ablk_init(struct crypto_tfm *tfm) | ||
| 139 | { | ||
| 140 | char drv_name[CRYPTO_MAX_ALG_NAME]; | ||
| 141 | |||
| 142 | snprintf(drv_name, sizeof(drv_name), "__driver-%s", | ||
| 143 | crypto_tfm_alg_driver_name(tfm)); | ||
| 144 | |||
| 145 | return ablk_init_common(tfm, drv_name); | ||
| 146 | } | ||
| 147 | EXPORT_SYMBOL_GPL(ablk_init); | ||
| 148 | |||
| 149 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index f80e668785c0..835488b745ee 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <asm/cpu_device_id.h> | 34 | #include <asm/cpu_device_id.h> |
| 35 | #include <asm/i387.h> | 35 | #include <asm/i387.h> |
| 36 | #include <asm/crypto/aes.h> | 36 | #include <asm/crypto/aes.h> |
| 37 | #include <asm/crypto/ablk_helper.h> | 37 | #include <crypto/ablk_helper.h> |
| 38 | #include <crypto/scatterwalk.h> | 38 | #include <crypto/scatterwalk.h> |
| 39 | #include <crypto/internal/aead.h> | 39 | #include <crypto/internal/aead.h> |
| 40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
diff --git a/arch/x86/crypto/camellia_aesni_avx2_glue.c b/arch/x86/crypto/camellia_aesni_avx2_glue.c index 414fe5d7946b..4209a76fcdaa 100644 --- a/arch/x86/crypto/camellia_aesni_avx2_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx2_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -21,7 +22,6 @@ | |||
| 21 | #include <asm/xcr.h> | 22 | #include <asm/xcr.h> |
| 22 | #include <asm/xsave.h> | 23 | #include <asm/xsave.h> |
| 23 | #include <asm/crypto/camellia.h> | 24 | #include <asm/crypto/camellia.h> |
| 24 | #include <asm/crypto/ablk_helper.h> | ||
| 25 | #include <asm/crypto/glue_helper.h> | 25 | #include <asm/crypto/glue_helper.h> |
| 26 | 26 | ||
| 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 | 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c index 37fd0c0a81ea..87a041a10f4a 100644 --- a/arch/x86/crypto/camellia_aesni_avx_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -21,7 +22,6 @@ | |||
| 21 | #include <asm/xcr.h> | 22 | #include <asm/xcr.h> |
| 22 | #include <asm/xsave.h> | 23 | #include <asm/xsave.h> |
| 23 | #include <asm/crypto/camellia.h> | 24 | #include <asm/crypto/camellia.h> |
| 24 | #include <asm/crypto/ablk_helper.h> | ||
| 25 | #include <asm/crypto/glue_helper.h> | 25 | #include <asm/crypto/glue_helper.h> |
| 26 | 26 | ||
| 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 | 27 | #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c index c6631813dc11..e6a3700489b9 100644 --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c | |||
| @@ -26,13 +26,13 @@ | |||
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | #include <linux/crypto.h> | 27 | #include <linux/crypto.h> |
| 28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
| 29 | #include <crypto/ablk_helper.h> | ||
| 29 | #include <crypto/algapi.h> | 30 | #include <crypto/algapi.h> |
| 30 | #include <crypto/cast5.h> | 31 | #include <crypto/cast5.h> |
| 31 | #include <crypto/cryptd.h> | 32 | #include <crypto/cryptd.h> |
| 32 | #include <crypto/ctr.h> | 33 | #include <crypto/ctr.h> |
| 33 | #include <asm/xcr.h> | 34 | #include <asm/xcr.h> |
| 34 | #include <asm/xsave.h> | 35 | #include <asm/xsave.h> |
| 35 | #include <asm/crypto/ablk_helper.h> | ||
| 36 | #include <asm/crypto/glue_helper.h> | 36 | #include <asm/crypto/glue_helper.h> |
| 37 | 37 | ||
| 38 | #define CAST5_PARALLEL_BLOCKS 16 | 38 | #define CAST5_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x86/crypto/cast6_avx_glue.c index 8d0dfb86a559..09f3677393e4 100644 --- a/arch/x86/crypto/cast6_avx_glue.c +++ b/arch/x86/crypto/cast6_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/cast6.h> | 33 | #include <crypto/cast6.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -37,7 +38,6 @@ | |||
| 37 | #include <crypto/xts.h> | 38 | #include <crypto/xts.h> |
| 38 | #include <asm/xcr.h> | 39 | #include <asm/xcr.h> |
| 39 | #include <asm/xsave.h> | 40 | #include <asm/xsave.h> |
| 40 | #include <asm/crypto/ablk_helper.h> | ||
| 41 | #include <asm/crypto/glue_helper.h> | 41 | #include <asm/crypto/glue_helper.h> |
| 42 | 42 | ||
| 43 | #define CAST6_PARALLEL_BLOCKS 8 | 43 | #define CAST6_PARALLEL_BLOCKS 8 |
diff --git a/arch/x86/crypto/serpent_avx2_glue.c b/arch/x86/crypto/serpent_avx2_glue.c index 23aabc6c20a5..2fae489b1524 100644 --- a/arch/x86/crypto/serpent_avx2_glue.c +++ b/arch/x86/crypto/serpent_avx2_glue.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/crypto.h> | 15 | #include <linux/crypto.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <crypto/ablk_helper.h> | ||
| 17 | #include <crypto/algapi.h> | 18 | #include <crypto/algapi.h> |
| 18 | #include <crypto/ctr.h> | 19 | #include <crypto/ctr.h> |
| 19 | #include <crypto/lrw.h> | 20 | #include <crypto/lrw.h> |
| @@ -22,7 +23,6 @@ | |||
| 22 | #include <asm/xcr.h> | 23 | #include <asm/xcr.h> |
| 23 | #include <asm/xsave.h> | 24 | #include <asm/xsave.h> |
| 24 | #include <asm/crypto/serpent-avx.h> | 25 | #include <asm/crypto/serpent-avx.h> |
| 25 | #include <asm/crypto/ablk_helper.h> | ||
| 26 | #include <asm/crypto/glue_helper.h> | 26 | #include <asm/crypto/glue_helper.h> |
| 27 | 27 | ||
| 28 | #define SERPENT_AVX2_PARALLEL_BLOCKS 16 | 28 | #define SERPENT_AVX2_PARALLEL_BLOCKS 16 |
diff --git a/arch/x86/crypto/serpent_avx_glue.c b/arch/x86/crypto/serpent_avx_glue.c index 9ae83cf8d21e..ff4870870972 100644 --- a/arch/x86/crypto/serpent_avx_glue.c +++ b/arch/x86/crypto/serpent_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/serpent.h> | 33 | #include <crypto/serpent.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -38,7 +39,6 @@ | |||
| 38 | #include <asm/xcr.h> | 39 | #include <asm/xcr.h> |
| 39 | #include <asm/xsave.h> | 40 | #include <asm/xsave.h> |
| 40 | #include <asm/crypto/serpent-avx.h> | 41 | #include <asm/crypto/serpent-avx.h> |
| 41 | #include <asm/crypto/ablk_helper.h> | ||
| 42 | #include <asm/crypto/glue_helper.h> | 42 | #include <asm/crypto/glue_helper.h> |
| 43 | 43 | ||
| 44 | /* 8-way parallel cipher functions */ | 44 | /* 8-way parallel cipher functions */ |
diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c index 97a356ece24d..8c95f8637306 100644 --- a/arch/x86/crypto/serpent_sse2_glue.c +++ b/arch/x86/crypto/serpent_sse2_glue.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/crypto.h> | 35 | #include <linux/crypto.h> |
| 36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
| 37 | #include <crypto/ablk_helper.h> | ||
| 37 | #include <crypto/algapi.h> | 38 | #include <crypto/algapi.h> |
| 38 | #include <crypto/serpent.h> | 39 | #include <crypto/serpent.h> |
| 39 | #include <crypto/cryptd.h> | 40 | #include <crypto/cryptd.h> |
| @@ -42,7 +43,6 @@ | |||
| 42 | #include <crypto/lrw.h> | 43 | #include <crypto/lrw.h> |
| 43 | #include <crypto/xts.h> | 44 | #include <crypto/xts.h> |
| 44 | #include <asm/crypto/serpent-sse2.h> | 45 | #include <asm/crypto/serpent-sse2.h> |
| 45 | #include <asm/crypto/ablk_helper.h> | ||
| 46 | #include <asm/crypto/glue_helper.h> | 46 | #include <asm/crypto/glue_helper.h> |
| 47 | 47 | ||
| 48 | static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src) | 48 | static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src) |
diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c index 50226c4b86ed..f248546da1ca 100644 --- a/arch/x86/crypto/sha256_ssse3_glue.c +++ b/arch/x86/crypto/sha256_ssse3_glue.c | |||
| @@ -281,7 +281,7 @@ static int __init sha256_ssse3_mod_init(void) | |||
| 281 | /* allow AVX to override SSSE3, it's a little faster */ | 281 | /* allow AVX to override SSSE3, it's a little faster */ |
| 282 | if (avx_usable()) { | 282 | if (avx_usable()) { |
| 283 | #ifdef CONFIG_AS_AVX2 | 283 | #ifdef CONFIG_AS_AVX2 |
| 284 | if (boot_cpu_has(X86_FEATURE_AVX2)) | 284 | if (boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_BMI2)) |
| 285 | sha256_transform_asm = sha256_transform_rorx; | 285 | sha256_transform_asm = sha256_transform_rorx; |
| 286 | else | 286 | else |
| 287 | #endif | 287 | #endif |
| @@ -319,4 +319,4 @@ MODULE_LICENSE("GPL"); | |||
| 319 | MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm, Supplemental SSE3 accelerated"); | 319 | MODULE_DESCRIPTION("SHA256 Secure Hash Algorithm, Supplemental SSE3 accelerated"); |
| 320 | 320 | ||
| 321 | MODULE_ALIAS("sha256"); | 321 | MODULE_ALIAS("sha256"); |
| 322 | MODULE_ALIAS("sha384"); | 322 | MODULE_ALIAS("sha224"); |
diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c index a62ba541884e..4e3c665be129 100644 --- a/arch/x86/crypto/twofish_avx_glue.c +++ b/arch/x86/crypto/twofish_avx_glue.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/crypto.h> | 29 | #include <linux/crypto.h> |
| 30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
| 31 | #include <crypto/ablk_helper.h> | ||
| 31 | #include <crypto/algapi.h> | 32 | #include <crypto/algapi.h> |
| 32 | #include <crypto/twofish.h> | 33 | #include <crypto/twofish.h> |
| 33 | #include <crypto/cryptd.h> | 34 | #include <crypto/cryptd.h> |
| @@ -39,7 +40,6 @@ | |||
| 39 | #include <asm/xcr.h> | 40 | #include <asm/xcr.h> |
| 40 | #include <asm/xsave.h> | 41 | #include <asm/xsave.h> |
| 41 | #include <asm/crypto/twofish.h> | 42 | #include <asm/crypto/twofish.h> |
| 42 | #include <asm/crypto/ablk_helper.h> | ||
| 43 | #include <asm/crypto/glue_helper.h> | 43 | #include <asm/crypto/glue_helper.h> |
| 44 | #include <crypto/scatterwalk.h> | 44 | #include <crypto/scatterwalk.h> |
| 45 | #include <linux/workqueue.h> | 45 | #include <linux/workqueue.h> |
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h index da31c8b8a92d..b17f4f48ecd7 100644 --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h | |||
| @@ -77,7 +77,7 @@ static inline void atomic_sub(int i, atomic_t *v) | |||
| 77 | */ | 77 | */ |
| 78 | static inline int atomic_sub_and_test(int i, atomic_t *v) | 78 | static inline int atomic_sub_and_test(int i, atomic_t *v) |
| 79 | { | 79 | { |
| 80 | GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, i, "%0", "e"); | 80 | GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, "er", i, "%0", "e"); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | /** | 83 | /** |
| @@ -141,7 +141,7 @@ static inline int atomic_inc_and_test(atomic_t *v) | |||
| 141 | */ | 141 | */ |
| 142 | static inline int atomic_add_negative(int i, atomic_t *v) | 142 | static inline int atomic_add_negative(int i, atomic_t *v) |
| 143 | { | 143 | { |
| 144 | GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, i, "%0", "s"); | 144 | GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter, "er", i, "%0", "s"); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | /** | 147 | /** |
diff --git a/arch/x86/include/asm/atomic64_64.h b/arch/x86/include/asm/atomic64_64.h index 3f065c985aee..46e9052bbd28 100644 --- a/arch/x86/include/asm/atomic64_64.h +++ b/arch/x86/include/asm/atomic64_64.h | |||
| @@ -72,7 +72,7 @@ static inline void atomic64_sub(long i, atomic64_t *v) | |||
| 72 | */ | 72 | */ |
| 73 | static inline int atomic64_sub_and_test(long i, atomic64_t *v) | 73 | static inline int atomic64_sub_and_test(long i, atomic64_t *v) |
| 74 | { | 74 | { |
| 75 | GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, i, "%0", "e"); | 75 | GEN_BINARY_RMWcc(LOCK_PREFIX "subq", v->counter, "er", i, "%0", "e"); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| @@ -138,7 +138,7 @@ static inline int atomic64_inc_and_test(atomic64_t *v) | |||
| 138 | */ | 138 | */ |
| 139 | static inline int atomic64_add_negative(long i, atomic64_t *v) | 139 | static inline int atomic64_add_negative(long i, atomic64_t *v) |
| 140 | { | 140 | { |
| 141 | GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, i, "%0", "s"); | 141 | GEN_BINARY_RMWcc(LOCK_PREFIX "addq", v->counter, "er", i, "%0", "s"); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | /** | 144 | /** |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 6d76d0935989..9fc1af74dc83 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
| @@ -205,7 +205,7 @@ static inline void change_bit(long nr, volatile unsigned long *addr) | |||
| 205 | */ | 205 | */ |
| 206 | static inline int test_and_set_bit(long nr, volatile unsigned long *addr) | 206 | static inline int test_and_set_bit(long nr, volatile unsigned long *addr) |
| 207 | { | 207 | { |
| 208 | GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, nr, "%0", "c"); | 208 | GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, "Ir", nr, "%0", "c"); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | /** | 211 | /** |
| @@ -251,7 +251,7 @@ static inline int __test_and_set_bit(long nr, volatile unsigned long *addr) | |||
| 251 | */ | 251 | */ |
| 252 | static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) | 252 | static inline int test_and_clear_bit(long nr, volatile unsigned long *addr) |
| 253 | { | 253 | { |
| 254 | GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, nr, "%0", "c"); | 254 | GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, "Ir", nr, "%0", "c"); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | /** | 257 | /** |
| @@ -304,7 +304,7 @@ static inline int __test_and_change_bit(long nr, volatile unsigned long *addr) | |||
| 304 | */ | 304 | */ |
| 305 | static inline int test_and_change_bit(long nr, volatile unsigned long *addr) | 305 | static inline int test_and_change_bit(long nr, volatile unsigned long *addr) |
| 306 | { | 306 | { |
| 307 | GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, nr, "%0", "c"); | 307 | GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, "Ir", nr, "%0", "c"); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) | 310 | static __always_inline int constant_test_bit(long nr, const volatile unsigned long *addr) |
diff --git a/arch/x86/include/asm/crypto/ablk_helper.h b/arch/x86/include/asm/crypto/ablk_helper.h deleted file mode 100644 index 4f93df50c23e..000000000000 --- a/arch/x86/include/asm/crypto/ablk_helper.h +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Shared async block cipher helpers | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _CRYPTO_ABLK_HELPER_H | ||
| 6 | #define _CRYPTO_ABLK_HELPER_H | ||
| 7 | |||
| 8 | #include <linux/crypto.h> | ||
| 9 | #include <linux/kernel.h> | ||
| 10 | #include <crypto/cryptd.h> | ||
| 11 | |||
| 12 | struct async_helper_ctx { | ||
| 13 | struct cryptd_ablkcipher *cryptd_tfm; | ||
| 14 | }; | ||
| 15 | |||
| 16 | extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, | ||
| 17 | unsigned int key_len); | ||
| 18 | |||
| 19 | extern int __ablk_encrypt(struct ablkcipher_request *req); | ||
| 20 | |||
| 21 | extern int ablk_encrypt(struct ablkcipher_request *req); | ||
| 22 | |||
| 23 | extern int ablk_decrypt(struct ablkcipher_request *req); | ||
| 24 | |||
| 25 | extern void ablk_exit(struct crypto_tfm *tfm); | ||
| 26 | |||
| 27 | extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name); | ||
| 28 | |||
| 29 | extern int ablk_init(struct crypto_tfm *tfm); | ||
| 30 | |||
| 31 | #endif /* _CRYPTO_ABLK_HELPER_H */ | ||
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h index 5b23e605e707..4ad6560847b1 100644 --- a/arch/x86/include/asm/local.h +++ b/arch/x86/include/asm/local.h | |||
| @@ -52,7 +52,7 @@ static inline void local_sub(long i, local_t *l) | |||
| 52 | */ | 52 | */ |
| 53 | static inline int local_sub_and_test(long i, local_t *l) | 53 | static inline int local_sub_and_test(long i, local_t *l) |
| 54 | { | 54 | { |
| 55 | GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, i, "%0", "e"); | 55 | GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, "er", i, "%0", "e"); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | /** | 58 | /** |
| @@ -92,7 +92,7 @@ static inline int local_inc_and_test(local_t *l) | |||
| 92 | */ | 92 | */ |
| 93 | static inline int local_add_negative(long i, local_t *l) | 93 | static inline int local_add_negative(long i, local_t *l) |
| 94 | { | 94 | { |
| 95 | GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, i, "%0", "s"); | 95 | GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, "er", i, "%0", "s"); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | /** | 98 | /** |
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 7d7443283a9d..947b5c417e83 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
| @@ -15,7 +15,7 @@ struct pci_sysdata { | |||
| 15 | int domain; /* PCI domain */ | 15 | int domain; /* PCI domain */ |
| 16 | int node; /* NUMA node */ | 16 | int node; /* NUMA node */ |
| 17 | #ifdef CONFIG_ACPI | 17 | #ifdef CONFIG_ACPI |
| 18 | void *acpi; /* ACPI-specific data */ | 18 | struct acpi_device *companion; /* ACPI companion device */ |
| 19 | #endif | 19 | #endif |
| 20 | #ifdef CONFIG_X86_64 | 20 | #ifdef CONFIG_X86_64 |
| 21 | void *iommu; /* IOMMU private data */ | 21 | void *iommu; /* IOMMU private data */ |
diff --git a/arch/x86/include/asm/rmwcc.h b/arch/x86/include/asm/rmwcc.h index 1ff990f1de8e..8f7866a5b9a4 100644 --- a/arch/x86/include/asm/rmwcc.h +++ b/arch/x86/include/asm/rmwcc.h | |||
| @@ -16,8 +16,8 @@ cc_label: \ | |||
| 16 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ | 16 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ |
| 17 | __GEN_RMWcc(op " " arg0, var, cc) | 17 | __GEN_RMWcc(op " " arg0, var, cc) |
| 18 | 18 | ||
| 19 | #define GEN_BINARY_RMWcc(op, var, val, arg0, cc) \ | 19 | #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
| 20 | __GEN_RMWcc(op " %1, " arg0, var, cc, "er" (val)) | 20 | __GEN_RMWcc(op " %1, " arg0, var, cc, vcon (val)) |
| 21 | 21 | ||
| 22 | #else /* !CC_HAVE_ASM_GOTO */ | 22 | #else /* !CC_HAVE_ASM_GOTO */ |
| 23 | 23 | ||
| @@ -33,8 +33,8 @@ do { \ | |||
| 33 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ | 33 | #define GEN_UNARY_RMWcc(op, var, arg0, cc) \ |
| 34 | __GEN_RMWcc(op " " arg0, var, cc) | 34 | __GEN_RMWcc(op " " arg0, var, cc) |
| 35 | 35 | ||
| 36 | #define GEN_BINARY_RMWcc(op, var, val, arg0, cc) \ | 36 | #define GEN_BINARY_RMWcc(op, var, vcon, val, arg0, cc) \ |
| 37 | __GEN_RMWcc(op " %2, " arg0, var, cc, "er" (val)) | 37 | __GEN_RMWcc(op " %2, " arg0, var, cc, vcon (val)) |
| 38 | 38 | ||
| 39 | #endif /* CC_HAVE_ASM_GOTO */ | 39 | #endif /* CC_HAVE_ASM_GOTO */ |
| 40 | 40 | ||
diff --git a/arch/x86/include/asm/simd.h b/arch/x86/include/asm/simd.h new file mode 100644 index 000000000000..ee80b92f0096 --- /dev/null +++ b/arch/x86/include/asm/simd.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | |||
| 2 | #include <asm/i387.h> | ||
| 3 | |||
| 4 | /* | ||
| 5 | * may_use_simd - whether it is allowable at this time to issue SIMD | ||
| 6 | * instructions or access the SIMD register file | ||
| 7 | */ | ||
| 8 | static __must_check inline bool may_use_simd(void) | ||
| 9 | { | ||
| 10 | return irq_fpu_usable(); | ||
| 11 | } | ||
diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/arch/x86/include/asm/trace/irq_vectors.h index 2874df24e7a4..4cab890007a7 100644 --- a/arch/x86/include/asm/trace/irq_vectors.h +++ b/arch/x86/include/asm/trace/irq_vectors.h | |||
| @@ -72,6 +72,17 @@ DEFINE_IRQ_VECTOR_EVENT(x86_platform_ipi); | |||
| 72 | DEFINE_IRQ_VECTOR_EVENT(irq_work); | 72 | DEFINE_IRQ_VECTOR_EVENT(irq_work); |
| 73 | 73 | ||
| 74 | /* | 74 | /* |
| 75 | * We must dis-allow sampling irq_work_exit() because perf event sampling | ||
| 76 | * itself can cause irq_work, which would lead to an infinite loop; | ||
| 77 | * | ||
| 78 | * 1) irq_work_exit happens | ||
| 79 | * 2) generates perf sample | ||
| 80 | * 3) generates irq_work | ||
| 81 | * 4) goto 1 | ||
| 82 | */ | ||
| 83 | TRACE_EVENT_PERF_PERM(irq_work_exit, is_sampling_event(p_event) ? -EPERM : 0); | ||
| 84 | |||
| 85 | /* | ||
| 75 | * call_function - called when entering/exiting a call function interrupt | 86 | * call_function - called when entering/exiting a call function interrupt |
| 76 | * vector handler | 87 | * vector handler |
| 77 | */ | 88 | */ |
diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h index b93e09a0fa21..37813b5ddc37 100644 --- a/arch/x86/include/uapi/asm/msr-index.h +++ b/arch/x86/include/uapi/asm/msr-index.h | |||
| @@ -147,6 +147,8 @@ | |||
| 147 | #define MSR_PP1_ENERGY_STATUS 0x00000641 | 147 | #define MSR_PP1_ENERGY_STATUS 0x00000641 |
| 148 | #define MSR_PP1_POLICY 0x00000642 | 148 | #define MSR_PP1_POLICY 0x00000642 |
| 149 | 149 | ||
| 150 | #define MSR_CORE_C1_RES 0x00000660 | ||
| 151 | |||
| 150 | #define MSR_AMD64_MC0_MASK 0xc0010044 | 152 | #define MSR_AMD64_MC0_MASK 0xc0010044 |
| 151 | 153 | ||
| 152 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) | 154 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 96f958d8cd45..bc4a088f9023 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
| @@ -330,8 +330,8 @@ static struct pci_device_id intel_stolen_ids[] __initdata = { | |||
| 330 | INTEL_I915GM_IDS(gen3_stolen_size), | 330 | INTEL_I915GM_IDS(gen3_stolen_size), |
| 331 | INTEL_I945G_IDS(gen3_stolen_size), | 331 | INTEL_I945G_IDS(gen3_stolen_size), |
| 332 | INTEL_I945GM_IDS(gen3_stolen_size), | 332 | INTEL_I945GM_IDS(gen3_stolen_size), |
| 333 | INTEL_VLV_M_IDS(gen3_stolen_size), | 333 | INTEL_VLV_M_IDS(gen6_stolen_size), |
| 334 | INTEL_VLV_D_IDS(gen3_stolen_size), | 334 | INTEL_VLV_D_IDS(gen6_stolen_size), |
| 335 | INTEL_PINEVIEW_IDS(gen3_stolen_size), | 335 | INTEL_PINEVIEW_IDS(gen3_stolen_size), |
| 336 | INTEL_I965G_IDS(gen3_stolen_size), | 336 | INTEL_I965G_IDS(gen3_stolen_size), |
| 337 | INTEL_G33_IDS(gen3_stolen_size), | 337 | INTEL_G33_IDS(gen3_stolen_size), |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index da3c599584a3..c752cb43e52f 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -558,6 +558,17 @@ void native_machine_shutdown(void) | |||
| 558 | { | 558 | { |
| 559 | /* Stop the cpus and apics */ | 559 | /* Stop the cpus and apics */ |
| 560 | #ifdef CONFIG_X86_IO_APIC | 560 | #ifdef CONFIG_X86_IO_APIC |
| 561 | /* | ||
| 562 | * Disabling IO APIC before local APIC is a workaround for | ||
| 563 | * erratum AVR31 in "Intel Atom Processor C2000 Product Family | ||
| 564 | * Specification Update". In this situation, interrupts that target | ||
| 565 | * a Logical Processor whose Local APIC is either in the process of | ||
| 566 | * being hardware disabled or software disabled are neither delivered | ||
| 567 | * nor discarded. When this erratum occurs, the processor may hang. | ||
| 568 | * | ||
| 569 | * Even without the erratum, it still makes sense to quiet IO APIC | ||
| 570 | * before disabling Local APIC. | ||
| 571 | */ | ||
| 561 | disable_IO_APIC(); | 572 | disable_IO_APIC(); |
| 562 | #endif | 573 | #endif |
| 563 | 574 | ||
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 5439117d5c4c..dec48bfaddb8 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -143,6 +143,8 @@ static inline int kvm_apic_id(struct kvm_lapic *apic) | |||
| 143 | return (kvm_apic_get_reg(apic, APIC_ID) >> 24) & 0xff; | 143 | return (kvm_apic_get_reg(apic, APIC_ID) >> 24) & 0xff; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | #define KVM_X2APIC_CID_BITS 0 | ||
| 147 | |||
| 146 | static void recalculate_apic_map(struct kvm *kvm) | 148 | static void recalculate_apic_map(struct kvm *kvm) |
| 147 | { | 149 | { |
| 148 | struct kvm_apic_map *new, *old = NULL; | 150 | struct kvm_apic_map *new, *old = NULL; |
| @@ -180,7 +182,8 @@ static void recalculate_apic_map(struct kvm *kvm) | |||
| 180 | if (apic_x2apic_mode(apic)) { | 182 | if (apic_x2apic_mode(apic)) { |
| 181 | new->ldr_bits = 32; | 183 | new->ldr_bits = 32; |
| 182 | new->cid_shift = 16; | 184 | new->cid_shift = 16; |
| 183 | new->cid_mask = new->lid_mask = 0xffff; | 185 | new->cid_mask = (1 << KVM_X2APIC_CID_BITS) - 1; |
| 186 | new->lid_mask = 0xffff; | ||
| 184 | } else if (kvm_apic_sw_enabled(apic) && | 187 | } else if (kvm_apic_sw_enabled(apic) && |
| 185 | !new->cid_mask /* flat mode */ && | 188 | !new->cid_mask /* flat mode */ && |
| 186 | kvm_apic_get_reg(apic, APIC_DFR) == APIC_DFR_CLUSTER) { | 189 | kvm_apic_get_reg(apic, APIC_DFR) == APIC_DFR_CLUSTER) { |
| @@ -841,7 +844,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic) | |||
| 841 | ASSERT(apic != NULL); | 844 | ASSERT(apic != NULL); |
| 842 | 845 | ||
| 843 | /* if initial count is 0, current count should also be 0 */ | 846 | /* if initial count is 0, current count should also be 0 */ |
| 844 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0) | 847 | if (kvm_apic_get_reg(apic, APIC_TMICT) == 0 || |
| 848 | apic->lapic_timer.period == 0) | ||
| 845 | return 0; | 849 | return 0; |
| 846 | 850 | ||
| 847 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); | 851 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); |
| @@ -1691,7 +1695,6 @@ static void apic_sync_pv_eoi_from_guest(struct kvm_vcpu *vcpu, | |||
| 1691 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) | 1695 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) |
| 1692 | { | 1696 | { |
| 1693 | u32 data; | 1697 | u32 data; |
| 1694 | void *vapic; | ||
| 1695 | 1698 | ||
| 1696 | if (test_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention)) | 1699 | if (test_bit(KVM_APIC_PV_EOI_PENDING, &vcpu->arch.apic_attention)) |
| 1697 | apic_sync_pv_eoi_from_guest(vcpu, vcpu->arch.apic); | 1700 | apic_sync_pv_eoi_from_guest(vcpu, vcpu->arch.apic); |
| @@ -1699,9 +1702,8 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu) | |||
| 1699 | if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) | 1702 | if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention)) |
| 1700 | return; | 1703 | return; |
| 1701 | 1704 | ||
| 1702 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); | 1705 | kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, |
| 1703 | data = *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)); | 1706 | sizeof(u32)); |
| 1704 | kunmap_atomic(vapic); | ||
| 1705 | 1707 | ||
| 1706 | apic_set_tpr(vcpu->arch.apic, data & 0xff); | 1708 | apic_set_tpr(vcpu->arch.apic, data & 0xff); |
| 1707 | } | 1709 | } |
| @@ -1737,7 +1739,6 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) | |||
| 1737 | u32 data, tpr; | 1739 | u32 data, tpr; |
| 1738 | int max_irr, max_isr; | 1740 | int max_irr, max_isr; |
| 1739 | struct kvm_lapic *apic = vcpu->arch.apic; | 1741 | struct kvm_lapic *apic = vcpu->arch.apic; |
| 1740 | void *vapic; | ||
| 1741 | 1742 | ||
| 1742 | apic_sync_pv_eoi_to_guest(vcpu, apic); | 1743 | apic_sync_pv_eoi_to_guest(vcpu, apic); |
| 1743 | 1744 | ||
| @@ -1753,18 +1754,24 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) | |||
| 1753 | max_isr = 0; | 1754 | max_isr = 0; |
| 1754 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); | 1755 | data = (tpr & 0xff) | ((max_isr & 0xf0) << 8) | (max_irr << 24); |
| 1755 | 1756 | ||
| 1756 | vapic = kmap_atomic(vcpu->arch.apic->vapic_page); | 1757 | kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, |
| 1757 | *(u32 *)(vapic + offset_in_page(vcpu->arch.apic->vapic_addr)) = data; | 1758 | sizeof(u32)); |
| 1758 | kunmap_atomic(vapic); | ||
| 1759 | } | 1759 | } |
| 1760 | 1760 | ||
| 1761 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) | 1761 | int kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr) |
| 1762 | { | 1762 | { |
| 1763 | vcpu->arch.apic->vapic_addr = vapic_addr; | 1763 | if (vapic_addr) { |
| 1764 | if (vapic_addr) | 1764 | if (kvm_gfn_to_hva_cache_init(vcpu->kvm, |
| 1765 | &vcpu->arch.apic->vapic_cache, | ||
| 1766 | vapic_addr, sizeof(u32))) | ||
| 1767 | return -EINVAL; | ||
| 1765 | __set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); | 1768 | __set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); |
| 1766 | else | 1769 | } else { |
| 1767 | __clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); | 1770 | __clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); |
| 1771 | } | ||
| 1772 | |||
| 1773 | vcpu->arch.apic->vapic_addr = vapic_addr; | ||
| 1774 | return 0; | ||
| 1768 | } | 1775 | } |
| 1769 | 1776 | ||
| 1770 | int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) | 1777 | int kvm_x2apic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data) |
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index c730ac9fe801..c8b0d0d2da5c 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h | |||
| @@ -34,7 +34,7 @@ struct kvm_lapic { | |||
| 34 | */ | 34 | */ |
| 35 | void *regs; | 35 | void *regs; |
| 36 | gpa_t vapic_addr; | 36 | gpa_t vapic_addr; |
| 37 | struct page *vapic_page; | 37 | struct gfn_to_hva_cache vapic_cache; |
| 38 | unsigned long pending_events; | 38 | unsigned long pending_events; |
| 39 | unsigned int sipi_vector; | 39 | unsigned int sipi_vector; |
| 40 | }; | 40 | }; |
| @@ -76,7 +76,7 @@ void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data); | |||
| 76 | void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset); | 76 | void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset); |
| 77 | void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector); | 77 | void kvm_apic_set_eoi_accelerated(struct kvm_vcpu *vcpu, int vector); |
| 78 | 78 | ||
| 79 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); | 79 | int kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); |
| 80 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); | 80 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); |
| 81 | void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu); | 81 | void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu); |
| 82 | 82 | ||
diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c index daff69e21150..1185fe7a7f47 100644 --- a/arch/x86/kvm/mmu_audit.c +++ b/arch/x86/kvm/mmu_audit.c | |||
| @@ -296,4 +296,4 @@ static struct kernel_param_ops audit_param_ops = { | |||
| 296 | .get = param_get_bool, | 296 | .get = param_get_bool, |
| 297 | }; | 297 | }; |
| 298 | 298 | ||
| 299 | module_param_cb(mmu_audit, &audit_param_ops, &mmu_audit, 0644); | 299 | arch_param_cb(mmu_audit, &audit_param_ops, &mmu_audit, 0644); |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 21ef1ba184ae..5d004da1e35d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -3214,8 +3214,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, | |||
| 3214 | r = -EFAULT; | 3214 | r = -EFAULT; |
| 3215 | if (copy_from_user(&va, argp, sizeof va)) | 3215 | if (copy_from_user(&va, argp, sizeof va)) |
| 3216 | goto out; | 3216 | goto out; |
| 3217 | r = 0; | 3217 | r = kvm_lapic_set_vapic_addr(vcpu, va.vapic_addr); |
| 3218 | kvm_lapic_set_vapic_addr(vcpu, va.vapic_addr); | ||
| 3219 | break; | 3218 | break; |
| 3220 | } | 3219 | } |
| 3221 | case KVM_X86_SETUP_MCE: { | 3220 | case KVM_X86_SETUP_MCE: { |
| @@ -5739,36 +5738,6 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu) | |||
| 5739 | !kvm_event_needs_reinjection(vcpu); | 5738 | !kvm_event_needs_reinjection(vcpu); |
| 5740 | } | 5739 | } |
| 5741 | 5740 | ||
| 5742 | static int vapic_enter(struct kvm_vcpu *vcpu) | ||
| 5743 | { | ||
| 5744 | struct kvm_lapic *apic = vcpu->arch.apic; | ||
| 5745 | struct page *page; | ||
| 5746 | |||
| 5747 | if (!apic || !apic->vapic_addr) | ||
| 5748 | return 0; | ||
| 5749 | |||
| 5750 | page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); | ||
| 5751 | if (is_error_page(page)) | ||
| 5752 | return -EFAULT; | ||
| 5753 | |||
| 5754 | vcpu->arch.apic->vapic_page = page; | ||
| 5755 | return 0; | ||
| 5756 | } | ||
| 5757 | |||
| 5758 | static void vapic_exit(struct kvm_vcpu *vcpu) | ||
| 5759 | { | ||
| 5760 | struct kvm_lapic *apic = vcpu->arch.apic; | ||
| 5761 | int idx; | ||
| 5762 | |||
| 5763 | if (!apic || !apic->vapic_addr) | ||
| 5764 | return; | ||
| 5765 | |||
| 5766 | idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
| 5767 | kvm_release_page_dirty(apic->vapic_page); | ||
| 5768 | mark_page_dirty(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); | ||
| 5769 | srcu_read_unlock(&vcpu->kvm->srcu, idx); | ||
| 5770 | } | ||
| 5771 | |||
| 5772 | static void update_cr8_intercept(struct kvm_vcpu *vcpu) | 5741 | static void update_cr8_intercept(struct kvm_vcpu *vcpu) |
| 5773 | { | 5742 | { |
| 5774 | int max_irr, tpr; | 5743 | int max_irr, tpr; |
| @@ -6069,11 +6038,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 6069 | struct kvm *kvm = vcpu->kvm; | 6038 | struct kvm *kvm = vcpu->kvm; |
| 6070 | 6039 | ||
| 6071 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); | 6040 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); |
| 6072 | r = vapic_enter(vcpu); | ||
| 6073 | if (r) { | ||
| 6074 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); | ||
| 6075 | return r; | ||
| 6076 | } | ||
| 6077 | 6041 | ||
| 6078 | r = 1; | 6042 | r = 1; |
| 6079 | while (r > 0) { | 6043 | while (r > 0) { |
| @@ -6132,8 +6096,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 6132 | 6096 | ||
| 6133 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); | 6097 | srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); |
| 6134 | 6098 | ||
| 6135 | vapic_exit(vcpu); | ||
| 6136 | |||
| 6137 | return r; | 6099 | return r; |
| 6138 | } | 6100 | } |
| 6139 | 6101 | ||
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index a7cccb6d7fec..c96314abd144 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
| @@ -61,6 +61,7 @@ void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | |||
| 61 | #if PAGETABLE_LEVELS > 2 | 61 | #if PAGETABLE_LEVELS > 2 |
| 62 | void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | 62 | void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) |
| 63 | { | 63 | { |
| 64 | struct page *page = virt_to_page(pmd); | ||
| 64 | paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); | 65 | paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT); |
| 65 | /* | 66 | /* |
| 66 | * NOTE! For PAE, any changes to the top page-directory-pointer-table | 67 | * NOTE! For PAE, any changes to the top page-directory-pointer-table |
| @@ -69,7 +70,8 @@ void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) | |||
| 69 | #ifdef CONFIG_X86_PAE | 70 | #ifdef CONFIG_X86_PAE |
| 70 | tlb->need_flush_all = 1; | 71 | tlb->need_flush_all = 1; |
| 71 | #endif | 72 | #endif |
| 72 | tlb_remove_page(tlb, virt_to_page(pmd)); | 73 | pgtable_pmd_page_dtor(page); |
| 74 | tlb_remove_page(tlb, page); | ||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | #if PAGETABLE_LEVELS > 3 | 77 | #if PAGETABLE_LEVELS > 3 |
| @@ -209,7 +211,7 @@ static int preallocate_pmds(pmd_t *pmds[]) | |||
| 209 | if (!pmd) | 211 | if (!pmd) |
| 210 | failed = true; | 212 | failed = true; |
| 211 | if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { | 213 | if (pmd && !pgtable_pmd_page_ctor(virt_to_page(pmd))) { |
| 212 | free_page((unsigned long)pmds[i]); | 214 | free_page((unsigned long)pmd); |
| 213 | pmd = NULL; | 215 | pmd = NULL; |
| 214 | failed = true; | 216 | failed = true; |
| 215 | } | 217 | } |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 7fb24e53d4c8..4f25ec077552 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -518,7 +518,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | |||
| 518 | sd = &info->sd; | 518 | sd = &info->sd; |
| 519 | sd->domain = domain; | 519 | sd->domain = domain; |
| 520 | sd->node = node; | 520 | sd->node = node; |
| 521 | sd->acpi = device->handle; | 521 | sd->companion = device; |
| 522 | /* | 522 | /* |
| 523 | * Maybe the desired pci bus has been already scanned. In such case | 523 | * Maybe the desired pci bus has been already scanned. In such case |
| 524 | * it is unnecessary to scan the pci bus with the given domain,busnum. | 524 | * it is unnecessary to scan the pci bus with the given domain,busnum. |
| @@ -589,7 +589,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | |||
| 589 | { | 589 | { |
| 590 | struct pci_sysdata *sd = bridge->bus->sysdata; | 590 | struct pci_sysdata *sd = bridge->bus->sysdata; |
| 591 | 591 | ||
| 592 | ACPI_HANDLE_SET(&bridge->dev, sd->acpi); | 592 | ACPI_COMPANION_SET(&bridge->dev, sd->companion); |
| 593 | return 0; | 593 | return 0; |
| 594 | } | 594 | } |
| 595 | 595 | ||
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c index 6599a0027b76..81b506d5befd 100644 --- a/arch/x86/platform/efi/early_printk.c +++ b/arch/x86/platform/efi/early_printk.c | |||
| @@ -142,7 +142,7 @@ early_efi_write(struct console *con, const char *str, unsigned int num) | |||
| 142 | efi_y += font->height; | 142 | efi_y += font->height; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | if (efi_y + font->height >= si->lfb_height) { | 145 | if (efi_y + font->height > si->lfb_height) { |
| 146 | u32 i; | 146 | u32 i; |
| 147 | 147 | ||
| 148 | efi_y -= font->height; | 148 | efi_y -= font->height; |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 92c02344a060..cceb813044ef 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
| @@ -690,13 +690,6 @@ void __init efi_init(void) | |||
| 690 | 690 | ||
| 691 | set_bit(EFI_MEMMAP, &x86_efi_facility); | 691 | set_bit(EFI_MEMMAP, &x86_efi_facility); |
| 692 | 692 | ||
| 693 | #ifdef CONFIG_X86_32 | ||
| 694 | if (efi_is_native()) { | ||
| 695 | x86_platform.get_wallclock = efi_get_time; | ||
| 696 | x86_platform.set_wallclock = efi_set_rtc_mmss; | ||
| 697 | } | ||
| 698 | #endif | ||
| 699 | |||
| 700 | #if EFI_DEBUG | 693 | #if EFI_DEBUG |
| 701 | print_efi_memmap(); | 694 | print_efi_memmap(); |
| 702 | #endif | 695 | #endif |
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index 0f92173a12b6..efe4d7220397 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
| @@ -1070,12 +1070,13 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | |||
| 1070 | unsigned long status; | 1070 | unsigned long status; |
| 1071 | 1071 | ||
| 1072 | bcp = &per_cpu(bau_control, cpu); | 1072 | bcp = &per_cpu(bau_control, cpu); |
| 1073 | stat = bcp->statp; | ||
| 1074 | stat->s_enters++; | ||
| 1075 | 1073 | ||
| 1076 | if (bcp->nobau) | 1074 | if (bcp->nobau) |
| 1077 | return cpumask; | 1075 | return cpumask; |
| 1078 | 1076 | ||
| 1077 | stat = bcp->statp; | ||
| 1078 | stat->s_enters++; | ||
| 1079 | |||
| 1079 | if (bcp->busy) { | 1080 | if (bcp->busy) { |
| 1080 | descriptor_status = | 1081 | descriptor_status = |
| 1081 | read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0); | 1082 | read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0); |
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index 88692871823f..9cac82588cbc 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile | |||
| @@ -73,9 +73,10 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \ | |||
| 73 | -march=i386 -mregparm=3 \ | 73 | -march=i386 -mregparm=3 \ |
| 74 | -include $(srctree)/$(src)/../../boot/code16gcc.h \ | 74 | -include $(srctree)/$(src)/../../boot/code16gcc.h \ |
| 75 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ | 75 | -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ |
| 76 | -mno-mmx -mno-sse \ | ||
| 76 | $(call cc-option, -ffreestanding) \ | 77 | $(call cc-option, -ffreestanding) \ |
| 77 | $(call cc-option, -fno-toplevel-reorder,\ | 78 | $(call cc-option, -fno-toplevel-reorder,\ |
| 78 | $(call cc-option, -fno-unit-at-a-time)) \ | 79 | $(call cc-option, -fno-unit-at-a-time)) \ |
| 79 | $(call cc-option, -fno-stack-protector) \ | 80 | $(call cc-option, -fno-stack-protector) \ |
| 80 | $(call cc-option, -mpreferred-stack-boundary=2) | 81 | $(call cc-option, -mpreferred-stack-boundary=2) |
| 81 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 82 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
