diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-10 15:36:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-10 15:36:45 -0400 |
commit | a0c49b6b6729723f32208acb59946d29c72539c6 (patch) | |
tree | f028c7139a95798b928d46d78bd3b23f07b6c5aa | |
parent | d55140ce3a7b36241171bd78c75a5ee85de20439 (diff) | |
parent | a85fe3fce84335f83be17a7659bfbb3a71dc2fc4 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Really fix build without CONFIG_PCI
powerpc: Fix build without CONFIG_PCI
powerpc/4xx: Fix build of PCI code on 405
powerpc/pseries: Simplify vpa deregistration functions
powerpc/pseries: Cleanup VPA registration and deregistration errors
powerpc/pseries: Fix kexec on recent firmware versions
MAINTAINERS: change maintainership of mpc5xxx
powerpc: Make KVM_GUEST default to n
powerpc/kvm: Fix build errors with older toolchains
powerpc: Lack of ibm,io-events not that important!
powerpc: Move kdump default base address to half RMO size on 64bit
powerpc/perf: Disable pagefaults during callchain stack read
ppc: Remove duplicate definition of PV_POWER7
powerpc: pseries: Fix kexec on machines with more than 4TB of RAM
powerpc: Jump label misalignment causes oops at boot
powerpc: Clean up some panic messages in prom_init
powerpc: Fix device tree claim code
powerpc: Return the_cpu_ spec from identify_cpu
powerpc: mtspr/mtmsr should take an unsigned long
-rw-r--r-- | MAINTAINERS | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/jump_label.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/kdump.h | 10 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 11 | ||||
-rw-r--r-- | arch/powerpc/kernel/iomap.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/perf_callchain.c | 20 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 14 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/dtl.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/io_event_irq.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/kexec.c | 34 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 19 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/plpar_wrappers.h | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 5 | ||||
-rw-r--r-- | arch/powerpc/sysdev/ppc4xx_pci.c | 5 |
19 files changed, 99 insertions, 77 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 51d42fbc8dc..1f8267f1a2a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -3905,9 +3905,9 @@ F: arch/powerpc/platforms/powermac/ | |||
3905 | F: drivers/macintosh/ | 3905 | F: drivers/macintosh/ |
3906 | 3906 | ||
3907 | LINUX FOR POWERPC EMBEDDED MPC5XXX | 3907 | LINUX FOR POWERPC EMBEDDED MPC5XXX |
3908 | M: Grant Likely <grant.likely@secretlab.ca> | 3908 | M: Anatolij Gustschin <agust@denx.de> |
3909 | L: linuxppc-dev@lists.ozlabs.org | 3909 | L: linuxppc-dev@lists.ozlabs.org |
3910 | T: git git://git.secretlab.ca/git/linux-2.6.git | 3910 | T: git git://git.denx.de/linux-2.6-agust.git |
3911 | S: Maintained | 3911 | S: Maintained |
3912 | F: arch/powerpc/platforms/512x/ | 3912 | F: arch/powerpc/platforms/512x/ |
3913 | F: arch/powerpc/platforms/52xx/ | 3913 | F: arch/powerpc/platforms/52xx/ |
diff --git a/arch/powerpc/include/asm/jump_label.h b/arch/powerpc/include/asm/jump_label.h index 1f780b95c0f..938986e412f 100644 --- a/arch/powerpc/include/asm/jump_label.h +++ b/arch/powerpc/include/asm/jump_label.h | |||
@@ -22,7 +22,6 @@ static __always_inline bool arch_static_branch(struct jump_label_key *key) | |||
22 | asm goto("1:\n\t" | 22 | asm goto("1:\n\t" |
23 | "nop\n\t" | 23 | "nop\n\t" |
24 | ".pushsection __jump_table, \"aw\"\n\t" | 24 | ".pushsection __jump_table, \"aw\"\n\t" |
25 | ".align 4\n\t" | ||
26 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" | 25 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" |
27 | ".popsection \n\t" | 26 | ".popsection \n\t" |
28 | : : "i" (key) : : l_yes); | 27 | : : "i" (key) : : l_yes); |
@@ -41,7 +40,6 @@ struct jump_entry { | |||
41 | jump_label_t code; | 40 | jump_label_t code; |
42 | jump_label_t target; | 41 | jump_label_t target; |
43 | jump_label_t key; | 42 | jump_label_t key; |
44 | jump_label_t pad; | ||
45 | }; | 43 | }; |
46 | 44 | ||
47 | #endif /* _ASM_POWERPC_JUMP_LABEL_H */ | 45 | #endif /* _ASM_POWERPC_JUMP_LABEL_H */ |
diff --git a/arch/powerpc/include/asm/kdump.h b/arch/powerpc/include/asm/kdump.h index 6857af58b02..bffd062adf7 100644 --- a/arch/powerpc/include/asm/kdump.h +++ b/arch/powerpc/include/asm/kdump.h | |||
@@ -3,17 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | 5 | ||
6 | /* | ||
7 | * If CONFIG_RELOCATABLE is enabled we can place the kdump kernel anywhere. | ||
8 | * To keep enough space in the RMO for the first stage kernel on 64bit, we | ||
9 | * place it at 64MB. If CONFIG_RELOCATABLE is not enabled we must place | ||
10 | * the second stage at 32MB. | ||
11 | */ | ||
12 | #if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC64) | ||
13 | #define KDUMP_KERNELBASE 0x4000000 | ||
14 | #else | ||
15 | #define KDUMP_KERNELBASE 0x2000000 | 6 | #define KDUMP_KERNELBASE 0x2000000 |
16 | #endif | ||
17 | 7 | ||
18 | /* How many bytes to reserve at zero for kdump. The reserve limit should | 8 | /* How many bytes to reserve at zero for kdump. The reserve limit should |
19 | * be greater or equal to the trampoline's end address. | 9 | * be greater or equal to the trampoline's end address. |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index e8aaf6fce38..559da199edb 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -1003,7 +1003,6 @@ | |||
1003 | #define PV_970 0x0039 | 1003 | #define PV_970 0x0039 |
1004 | #define PV_POWER5 0x003A | 1004 | #define PV_POWER5 0x003A |
1005 | #define PV_POWER5p 0x003B | 1005 | #define PV_POWER5p 0x003B |
1006 | #define PV_POWER7 0x003F | ||
1007 | #define PV_970FX 0x003C | 1006 | #define PV_970FX 0x003C |
1008 | #define PV_POWER6 0x003E | 1007 | #define PV_POWER6 0x003E |
1009 | #define PV_POWER7 0x003F | 1008 | #define PV_POWER7 0x003F |
@@ -1024,13 +1023,16 @@ | |||
1024 | #define mtmsrd(v) __mtmsrd((v), 0) | 1023 | #define mtmsrd(v) __mtmsrd((v), 0) |
1025 | #define mtmsr(v) mtmsrd(v) | 1024 | #define mtmsr(v) mtmsrd(v) |
1026 | #else | 1025 | #else |
1027 | #define mtmsr(v) asm volatile("mtmsr %0" : : "r" (v) : "memory") | 1026 | #define mtmsr(v) asm volatile("mtmsr %0" : \ |
1027 | : "r" ((unsigned long)(v)) \ | ||
1028 | : "memory") | ||
1028 | #endif | 1029 | #endif |
1029 | 1030 | ||
1030 | #define mfspr(rn) ({unsigned long rval; \ | 1031 | #define mfspr(rn) ({unsigned long rval; \ |
1031 | asm volatile("mfspr %0," __stringify(rn) \ | 1032 | asm volatile("mfspr %0," __stringify(rn) \ |
1032 | : "=r" (rval)); rval;}) | 1033 | : "=r" (rval)); rval;}) |
1033 | #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)\ | 1034 | #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : \ |
1035 | : "r" ((unsigned long)(v)) \ | ||
1034 | : "memory") | 1036 | : "memory") |
1035 | 1037 | ||
1036 | #ifdef __powerpc64__ | 1038 | #ifdef __powerpc64__ |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 9fb933248ab..fa44ff53886 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -2051,7 +2051,8 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
2051 | 2051 | ||
2052 | static struct cpu_spec the_cpu_spec; | 2052 | static struct cpu_spec the_cpu_spec; |
2053 | 2053 | ||
2054 | static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s) | 2054 | static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, |
2055 | struct cpu_spec *s) | ||
2055 | { | 2056 | { |
2056 | struct cpu_spec *t = &the_cpu_spec; | 2057 | struct cpu_spec *t = &the_cpu_spec; |
2057 | struct cpu_spec old; | 2058 | struct cpu_spec old; |
@@ -2114,6 +2115,8 @@ static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s) | |||
2114 | t->cpu_setup(offset, t); | 2115 | t->cpu_setup(offset, t); |
2115 | } | 2116 | } |
2116 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ | 2117 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ |
2118 | |||
2119 | return t; | ||
2117 | } | 2120 | } |
2118 | 2121 | ||
2119 | struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | 2122 | struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) |
@@ -2124,10 +2127,8 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |||
2124 | s = PTRRELOC(s); | 2127 | s = PTRRELOC(s); |
2125 | 2128 | ||
2126 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) { | 2129 | for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) { |
2127 | if ((pvr & s->pvr_mask) == s->pvr_value) { | 2130 | if ((pvr & s->pvr_mask) == s->pvr_value) |
2128 | setup_cpu_spec(offset, s); | 2131 | return setup_cpu_spec(offset, s); |
2129 | return s; | ||
2130 | } | ||
2131 | } | 2132 | } |
2132 | 2133 | ||
2133 | BUG(); | 2134 | BUG(); |
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 1577434f408..b25f6325fc7 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -117,6 +117,7 @@ void ioport_unmap(void __iomem *addr) | |||
117 | EXPORT_SYMBOL(ioport_map); | 117 | EXPORT_SYMBOL(ioport_map); |
118 | EXPORT_SYMBOL(ioport_unmap); | 118 | EXPORT_SYMBOL(ioport_unmap); |
119 | 119 | ||
120 | #ifdef CONFIG_PCI | ||
120 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 121 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
121 | { | 122 | { |
122 | resource_size_t start = pci_resource_start(dev, bar); | 123 | resource_size_t start = pci_resource_start(dev, bar); |
@@ -146,3 +147,4 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | |||
146 | 147 | ||
147 | EXPORT_SYMBOL(pci_iomap); | 148 | EXPORT_SYMBOL(pci_iomap); |
148 | EXPORT_SYMBOL(pci_iounmap); | 149 | EXPORT_SYMBOL(pci_iounmap); |
150 | #endif /* CONFIG_PCI */ | ||
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 6658a158995..9ce1672afb5 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -136,12 +136,16 @@ void __init reserve_crashkernel(void) | |||
136 | crashk_res.start = KDUMP_KERNELBASE; | 136 | crashk_res.start = KDUMP_KERNELBASE; |
137 | #else | 137 | #else |
138 | if (!crashk_res.start) { | 138 | if (!crashk_res.start) { |
139 | #ifdef CONFIG_PPC64 | ||
139 | /* | 140 | /* |
140 | * unspecified address, choose a region of specified size | 141 | * On 64bit we split the RMO in half but cap it at half of |
141 | * can overlap with initrd (ignoring corruption when retained) | 142 | * a small SLB (128MB) since the crash kernel needs to place |
142 | * ppc64 requires kernel and some stacks to be in first segemnt | 143 | * itself and some stacks to be in the first segment. |
143 | */ | 144 | */ |
145 | crashk_res.start = min(0x80000000ULL, (ppc64_rma_size / 2)); | ||
146 | #else | ||
144 | crashk_res.start = KDUMP_KERNELBASE; | 147 | crashk_res.start = KDUMP_KERNELBASE; |
148 | #endif | ||
145 | } | 149 | } |
146 | 150 | ||
147 | crash_base = PAGE_ALIGN(crashk_res.start); | 151 | crash_base = PAGE_ALIGN(crashk_res.start); |
diff --git a/arch/powerpc/kernel/perf_callchain.c b/arch/powerpc/kernel/perf_callchain.c index d05ae4204bb..564c1d8bdb5 100644 --- a/arch/powerpc/kernel/perf_callchain.c +++ b/arch/powerpc/kernel/perf_callchain.c | |||
@@ -154,8 +154,12 @@ static int read_user_stack_64(unsigned long __user *ptr, unsigned long *ret) | |||
154 | ((unsigned long)ptr & 7)) | 154 | ((unsigned long)ptr & 7)) |
155 | return -EFAULT; | 155 | return -EFAULT; |
156 | 156 | ||
157 | if (!__get_user_inatomic(*ret, ptr)) | 157 | pagefault_disable(); |
158 | if (!__get_user_inatomic(*ret, ptr)) { | ||
159 | pagefault_enable(); | ||
158 | return 0; | 160 | return 0; |
161 | } | ||
162 | pagefault_enable(); | ||
159 | 163 | ||
160 | return read_user_stack_slow(ptr, ret, 8); | 164 | return read_user_stack_slow(ptr, ret, 8); |
161 | } | 165 | } |
@@ -166,8 +170,12 @@ static int read_user_stack_32(unsigned int __user *ptr, unsigned int *ret) | |||
166 | ((unsigned long)ptr & 3)) | 170 | ((unsigned long)ptr & 3)) |
167 | return -EFAULT; | 171 | return -EFAULT; |
168 | 172 | ||
169 | if (!__get_user_inatomic(*ret, ptr)) | 173 | pagefault_disable(); |
174 | if (!__get_user_inatomic(*ret, ptr)) { | ||
175 | pagefault_enable(); | ||
170 | return 0; | 176 | return 0; |
177 | } | ||
178 | pagefault_enable(); | ||
171 | 179 | ||
172 | return read_user_stack_slow(ptr, ret, 4); | 180 | return read_user_stack_slow(ptr, ret, 4); |
173 | } | 181 | } |
@@ -294,11 +302,17 @@ static inline int current_is_64bit(void) | |||
294 | */ | 302 | */ |
295 | static int read_user_stack_32(unsigned int __user *ptr, unsigned int *ret) | 303 | static int read_user_stack_32(unsigned int __user *ptr, unsigned int *ret) |
296 | { | 304 | { |
305 | int rc; | ||
306 | |||
297 | if ((unsigned long)ptr > TASK_SIZE - sizeof(unsigned int) || | 307 | if ((unsigned long)ptr > TASK_SIZE - sizeof(unsigned int) || |
298 | ((unsigned long)ptr & 3)) | 308 | ((unsigned long)ptr & 3)) |
299 | return -EFAULT; | 309 | return -EFAULT; |
300 | 310 | ||
301 | return __get_user_inatomic(*ret, ptr); | 311 | pagefault_disable(); |
312 | rc = __get_user_inatomic(*ret, ptr); | ||
313 | pagefault_enable(); | ||
314 | |||
315 | return rc; | ||
302 | } | 316 | } |
303 | 317 | ||
304 | static inline void perf_callchain_user_64(struct perf_callchain_entry *entry, | 318 | static inline void perf_callchain_user_64(struct perf_callchain_entry *entry, |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index c016033ba78..a909f4e9343 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1020,7 +1020,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align) | |||
1020 | } | 1020 | } |
1021 | if (addr == 0) | 1021 | if (addr == 0) |
1022 | return 0; | 1022 | return 0; |
1023 | RELOC(alloc_bottom) = addr; | 1023 | RELOC(alloc_bottom) = addr + size; |
1024 | 1024 | ||
1025 | prom_debug(" -> %x\n", addr); | 1025 | prom_debug(" -> %x\n", addr); |
1026 | prom_debug(" alloc_bottom : %x\n", RELOC(alloc_bottom)); | 1026 | prom_debug(" alloc_bottom : %x\n", RELOC(alloc_bottom)); |
@@ -1830,11 +1830,13 @@ static void __init *make_room(unsigned long *mem_start, unsigned long *mem_end, | |||
1830 | if (room > DEVTREE_CHUNK_SIZE) | 1830 | if (room > DEVTREE_CHUNK_SIZE) |
1831 | room = DEVTREE_CHUNK_SIZE; | 1831 | room = DEVTREE_CHUNK_SIZE; |
1832 | if (room < PAGE_SIZE) | 1832 | if (room < PAGE_SIZE) |
1833 | prom_panic("No memory for flatten_device_tree (no room)"); | 1833 | prom_panic("No memory for flatten_device_tree " |
1834 | "(no room)\n"); | ||
1834 | chunk = alloc_up(room, 0); | 1835 | chunk = alloc_up(room, 0); |
1835 | if (chunk == 0) | 1836 | if (chunk == 0) |
1836 | prom_panic("No memory for flatten_device_tree (claim failed)"); | 1837 | prom_panic("No memory for flatten_device_tree " |
1837 | *mem_end = RELOC(alloc_top); | 1838 | "(claim failed)\n"); |
1839 | *mem_end = chunk + room; | ||
1838 | } | 1840 | } |
1839 | 1841 | ||
1840 | ret = (void *)*mem_start; | 1842 | ret = (void *)*mem_start; |
@@ -2042,7 +2044,7 @@ static void __init flatten_device_tree(void) | |||
2042 | 2044 | ||
2043 | /* | 2045 | /* |
2044 | * Check how much room we have between alloc top & bottom (+/- a | 2046 | * Check how much room we have between alloc top & bottom (+/- a |
2045 | * few pages), crop to 4Mb, as this is our "chuck" size | 2047 | * few pages), crop to 1MB, as this is our "chunk" size |
2046 | */ | 2048 | */ |
2047 | room = RELOC(alloc_top) - RELOC(alloc_bottom) - 0x4000; | 2049 | room = RELOC(alloc_top) - RELOC(alloc_bottom) - 0x4000; |
2048 | if (room > DEVTREE_CHUNK_SIZE) | 2050 | if (room > DEVTREE_CHUNK_SIZE) |
@@ -2053,7 +2055,7 @@ static void __init flatten_device_tree(void) | |||
2053 | mem_start = (unsigned long)alloc_up(room, PAGE_SIZE); | 2055 | mem_start = (unsigned long)alloc_up(room, PAGE_SIZE); |
2054 | if (mem_start == 0) | 2056 | if (mem_start == 0) |
2055 | prom_panic("Can't allocate initial device-tree chunk\n"); | 2057 | prom_panic("Can't allocate initial device-tree chunk\n"); |
2056 | mem_end = RELOC(alloc_top); | 2058 | mem_end = mem_start + room; |
2057 | 2059 | ||
2058 | /* Get root of tree */ | 2060 | /* Get root of tree */ |
2059 | root = call_prom("peer", 1, 1, (phandle)0); | 2061 | root = call_prom("peer", 1, 1, (phandle)0); |
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 6dd33581a22..de2950135e6 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -1251,7 +1251,7 @@ BEGIN_FTR_SECTION | |||
1251 | reg = 0 | 1251 | reg = 0 |
1252 | .rept 32 | 1252 | .rept 32 |
1253 | li r6,reg*16+VCPU_VSRS | 1253 | li r6,reg*16+VCPU_VSRS |
1254 | stxvd2x reg,r6,r3 | 1254 | STXVD2X(reg,r6,r3) |
1255 | reg = reg + 1 | 1255 | reg = reg + 1 |
1256 | .endr | 1256 | .endr |
1257 | FTR_SECTION_ELSE | 1257 | FTR_SECTION_ELSE |
@@ -1313,7 +1313,7 @@ BEGIN_FTR_SECTION | |||
1313 | reg = 0 | 1313 | reg = 0 |
1314 | .rept 32 | 1314 | .rept 32 |
1315 | li r7,reg*16+VCPU_VSRS | 1315 | li r7,reg*16+VCPU_VSRS |
1316 | lxvd2x reg,r7,r4 | 1316 | LXVD2X(reg,r7,r4) |
1317 | reg = reg + 1 | 1317 | reg = reg + 1 |
1318 | .endr | 1318 | .endr |
1319 | FTR_SECTION_ELSE | 1319 | FTR_SECTION_ELSE |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index d0af7fb2f34..b9ba86191ae 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -24,7 +24,7 @@ source "arch/powerpc/platforms/wsp/Kconfig" | |||
24 | 24 | ||
25 | config KVM_GUEST | 25 | config KVM_GUEST |
26 | bool "KVM Guest support" | 26 | bool "KVM Guest support" |
27 | default y | 27 | default n |
28 | ---help--- | 28 | ---help--- |
29 | This option enables various optimizations for running under the KVM | 29 | This option enables various optimizations for running under the KVM |
30 | hypervisor. Overhead for the kernel when not running inside KVM should | 30 | hypervisor. Overhead for the kernel when not running inside KVM should |
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c index e9190073bb9..0e865637006 100644 --- a/arch/powerpc/platforms/pseries/dtl.c +++ b/arch/powerpc/platforms/pseries/dtl.c | |||
@@ -181,7 +181,7 @@ static void dtl_stop(struct dtl *dtl) | |||
181 | 181 | ||
182 | lppaca_of(dtl->cpu).dtl_enable_mask = 0x0; | 182 | lppaca_of(dtl->cpu).dtl_enable_mask = 0x0; |
183 | 183 | ||
184 | unregister_dtl(hwcpu, __pa(dtl->buf)); | 184 | unregister_dtl(hwcpu); |
185 | } | 185 | } |
186 | 186 | ||
187 | static u64 dtl_current_index(struct dtl *dtl) | 187 | static u64 dtl_current_index(struct dtl *dtl) |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index bc0288501f1..83a3ca2fd28 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -135,7 +135,7 @@ static void pseries_mach_cpu_die(void) | |||
135 | get_lppaca()->idle = 0; | 135 | get_lppaca()->idle = 0; |
136 | 136 | ||
137 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { | 137 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { |
138 | unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); | 138 | unregister_slb_shadow(hwcpu); |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Call to start_secondary_resume() will not return. | 141 | * Call to start_secondary_resume() will not return. |
@@ -150,7 +150,7 @@ static void pseries_mach_cpu_die(void) | |||
150 | WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE); | 150 | WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE); |
151 | 151 | ||
152 | set_cpu_current_state(cpu, CPU_STATE_OFFLINE); | 152 | set_cpu_current_state(cpu, CPU_STATE_OFFLINE); |
153 | unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); | 153 | unregister_slb_shadow(hwcpu); |
154 | rtas_stop_self(); | 154 | rtas_stop_self(); |
155 | 155 | ||
156 | /* Should never get here... */ | 156 | /* Should never get here... */ |
diff --git a/arch/powerpc/platforms/pseries/io_event_irq.c b/arch/powerpc/platforms/pseries/io_event_irq.c index c829e6067d5..2c4dd1fb833 100644 --- a/arch/powerpc/platforms/pseries/io_event_irq.c +++ b/arch/powerpc/platforms/pseries/io_event_irq.c | |||
@@ -212,17 +212,15 @@ static int __init ioei_init(void) | |||
212 | struct device_node *np; | 212 | struct device_node *np; |
213 | 213 | ||
214 | ioei_check_exception_token = rtas_token("check-exception"); | 214 | ioei_check_exception_token = rtas_token("check-exception"); |
215 | if (ioei_check_exception_token == RTAS_UNKNOWN_SERVICE) { | 215 | if (ioei_check_exception_token == RTAS_UNKNOWN_SERVICE) |
216 | pr_warning("IO Event IRQ not supported on this system !\n"); | ||
217 | return -ENODEV; | 216 | return -ENODEV; |
218 | } | 217 | |
219 | np = of_find_node_by_path("/event-sources/ibm,io-events"); | 218 | np = of_find_node_by_path("/event-sources/ibm,io-events"); |
220 | if (np) { | 219 | if (np) { |
221 | request_event_sources_irqs(np, ioei_interrupt, "IO_EVENT"); | 220 | request_event_sources_irqs(np, ioei_interrupt, "IO_EVENT"); |
221 | pr_info("IBM I/O event interrupts enabled\n"); | ||
222 | of_node_put(np); | 222 | of_node_put(np); |
223 | } else { | 223 | } else { |
224 | pr_err("io_event_irq: No ibm,io-events on system! " | ||
225 | "IO Event interrupt disabled.\n"); | ||
226 | return -ENODEV; | 224 | return -ENODEV; |
227 | } | 225 | } |
228 | return 0; | 226 | return 0; |
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index 54cf3a4aa16..7d94bdc63d5 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c | |||
@@ -25,20 +25,30 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | |||
25 | { | 25 | { |
26 | /* Don't risk a hypervisor call if we're crashing */ | 26 | /* Don't risk a hypervisor call if we're crashing */ |
27 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { | 27 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { |
28 | unsigned long addr; | 28 | int ret; |
29 | int cpu = smp_processor_id(); | ||
30 | int hwcpu = hard_smp_processor_id(); | ||
29 | 31 | ||
30 | addr = __pa(get_slb_shadow()); | 32 | if (get_lppaca()->dtl_enable_mask) { |
31 | if (unregister_slb_shadow(hard_smp_processor_id(), addr)) | 33 | ret = unregister_dtl(hwcpu); |
32 | printk("SLB shadow buffer deregistration of " | 34 | if (ret) { |
33 | "cpu %u (hw_cpu_id %d) failed\n", | 35 | pr_err("WARNING: DTL deregistration for cpu " |
34 | smp_processor_id(), | 36 | "%d (hw %d) failed with %d\n", |
35 | hard_smp_processor_id()); | 37 | cpu, hwcpu, ret); |
38 | } | ||
39 | } | ||
40 | |||
41 | ret = unregister_slb_shadow(hwcpu); | ||
42 | if (ret) { | ||
43 | pr_err("WARNING: SLB shadow buffer deregistration " | ||
44 | "for cpu %d (hw %d) failed with %d\n", | ||
45 | cpu, hwcpu, ret); | ||
46 | } | ||
36 | 47 | ||
37 | addr = __pa(get_lppaca()); | 48 | ret = unregister_vpa(hwcpu); |
38 | if (unregister_vpa(hard_smp_processor_id(), addr)) { | 49 | if (ret) { |
39 | printk("VPA deregistration of cpu %u (hw_cpu_id %d) " | 50 | pr_err("WARNING: VPA deregistration for cpu %d " |
40 | "failed\n", smp_processor_id(), | 51 | "(hw %d) failed with %d\n", cpu, hwcpu, ret); |
41 | hard_smp_processor_id()); | ||
42 | } | 52 | } |
43 | } | 53 | } |
44 | } | 54 | } |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index f7205d344ef..c9a29dae8c0 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -67,9 +67,8 @@ void vpa_init(int cpu) | |||
67 | ret = register_vpa(hwcpu, addr); | 67 | ret = register_vpa(hwcpu, addr); |
68 | 68 | ||
69 | if (ret) { | 69 | if (ret) { |
70 | printk(KERN_ERR "WARNING: vpa_init: VPA registration for " | 70 | pr_err("WARNING: VPA registration for cpu %d (hw %d) of area " |
71 | "cpu %d (hw %d) of area %lx returns %ld\n", | 71 | "%lx failed with %ld\n", cpu, hwcpu, addr, ret); |
72 | cpu, hwcpu, addr, ret); | ||
73 | return; | 72 | return; |
74 | } | 73 | } |
75 | /* | 74 | /* |
@@ -80,10 +79,9 @@ void vpa_init(int cpu) | |||
80 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 79 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
81 | ret = register_slb_shadow(hwcpu, addr); | 80 | ret = register_slb_shadow(hwcpu, addr); |
82 | if (ret) | 81 | if (ret) |
83 | printk(KERN_ERR | 82 | pr_err("WARNING: SLB shadow buffer registration for " |
84 | "WARNING: vpa_init: SLB shadow buffer " | 83 | "cpu %d (hw %d) of area %lx failed with %ld\n", |
85 | "registration for cpu %d (hw %d) of area %lx " | 84 | cpu, hwcpu, addr, ret); |
86 | "returns %ld\n", cpu, hwcpu, addr, ret); | ||
87 | } | 85 | } |
88 | 86 | ||
89 | /* | 87 | /* |
@@ -100,8 +98,9 @@ void vpa_init(int cpu) | |||
100 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; | 98 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; |
101 | ret = register_dtl(hwcpu, __pa(dtl)); | 99 | ret = register_dtl(hwcpu, __pa(dtl)); |
102 | if (ret) | 100 | if (ret) |
103 | pr_warn("DTL registration failed for cpu %d (%ld)\n", | 101 | pr_err("WARNING: DTL registration of cpu %d (hw %d) " |
104 | cpu, ret); | 102 | "failed with %ld\n", smp_processor_id(), |
103 | hwcpu, ret); | ||
105 | lppaca_of(cpu).dtl_enable_mask = 2; | 104 | lppaca_of(cpu).dtl_enable_mask = 2; |
106 | } | 105 | } |
107 | } | 106 | } |
@@ -204,7 +203,7 @@ static void pSeries_lpar_hptab_clear(void) | |||
204 | unsigned long ptel; | 203 | unsigned long ptel; |
205 | } ptes[4]; | 204 | } ptes[4]; |
206 | long lpar_rc; | 205 | long lpar_rc; |
207 | int i, j; | 206 | unsigned long i, j; |
208 | 207 | ||
209 | /* Read in batches of 4, | 208 | /* Read in batches of 4, |
210 | * invalidate only valid entries not in the VRMA | 209 | * invalidate only valid entries not in the VRMA |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index 4bf21207d7d..41c24c146d6 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -53,9 +53,9 @@ static inline long vpa_call(unsigned long flags, unsigned long cpu, | |||
53 | return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa); | 53 | return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline long unregister_vpa(unsigned long cpu, unsigned long vpa) | 56 | static inline long unregister_vpa(unsigned long cpu) |
57 | { | 57 | { |
58 | return vpa_call(0x5, cpu, vpa); | 58 | return vpa_call(0x5, cpu, 0); |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline long register_vpa(unsigned long cpu, unsigned long vpa) | 61 | static inline long register_vpa(unsigned long cpu, unsigned long vpa) |
@@ -63,9 +63,9 @@ static inline long register_vpa(unsigned long cpu, unsigned long vpa) | |||
63 | return vpa_call(0x1, cpu, vpa); | 63 | return vpa_call(0x1, cpu, vpa); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline long unregister_slb_shadow(unsigned long cpu, unsigned long vpa) | 66 | static inline long unregister_slb_shadow(unsigned long cpu) |
67 | { | 67 | { |
68 | return vpa_call(0x7, cpu, vpa); | 68 | return vpa_call(0x7, cpu, 0); |
69 | } | 69 | } |
70 | 70 | ||
71 | static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) | 71 | static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) |
@@ -73,9 +73,9 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) | |||
73 | return vpa_call(0x3, cpu, vpa); | 73 | return vpa_call(0x3, cpu, vpa); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline long unregister_dtl(unsigned long cpu, unsigned long vpa) | 76 | static inline long unregister_dtl(unsigned long cpu) |
77 | { | 77 | { |
78 | return vpa_call(0x6, cpu, vpa); | 78 | return vpa_call(0x6, cpu, 0); |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline long register_dtl(unsigned long cpu, unsigned long vpa) | 81 | static inline long register_dtl(unsigned long cpu, unsigned long vpa) |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index d00e52926b7..0969fd98c4f 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -324,8 +324,9 @@ static int alloc_dispatch_logs(void) | |||
324 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; | 324 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; |
325 | ret = register_dtl(hard_smp_processor_id(), __pa(dtl)); | 325 | ret = register_dtl(hard_smp_processor_id(), __pa(dtl)); |
326 | if (ret) | 326 | if (ret) |
327 | pr_warn("DTL registration failed for boot cpu %d (%d)\n", | 327 | pr_err("WARNING: DTL registration of cpu %d (hw %d) failed " |
328 | smp_processor_id(), ret); | 328 | "with %d\n", smp_processor_id(), |
329 | hard_smp_processor_id(), ret); | ||
329 | get_paca()->lppaca_ptr->dtl_enable_mask = 2; | 330 | get_paca()->lppaca_ptr->dtl_enable_mask = 2; |
330 | 331 | ||
331 | return 0; | 332 | return 0; |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index a59ba96d2c2..dbfe96bc878 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -655,8 +655,6 @@ struct ppc4xx_pciex_hwops | |||
655 | 655 | ||
656 | static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops; | 656 | static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops; |
657 | 657 | ||
658 | #ifdef CONFIG_44x | ||
659 | |||
660 | static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port, | 658 | static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port, |
661 | unsigned int sdr_offset, | 659 | unsigned int sdr_offset, |
662 | unsigned int mask, | 660 | unsigned int mask, |
@@ -688,6 +686,7 @@ static int __init ppc4xx_pciex_port_reset_sdr(struct ppc4xx_pciex_port *port) | |||
688 | return 0; | 686 | return 0; |
689 | } | 687 | } |
690 | 688 | ||
689 | |||
691 | static void __init ppc4xx_pciex_check_link_sdr(struct ppc4xx_pciex_port *port) | 690 | static void __init ppc4xx_pciex_check_link_sdr(struct ppc4xx_pciex_port *port) |
692 | { | 691 | { |
693 | printk(KERN_INFO "PCIE%d: Checking link...\n", port->index); | 692 | printk(KERN_INFO "PCIE%d: Checking link...\n", port->index); |
@@ -718,6 +717,8 @@ static void __init ppc4xx_pciex_check_link_sdr(struct ppc4xx_pciex_port *port) | |||
718 | printk(KERN_INFO "PCIE%d: No device detected.\n", port->index); | 717 | printk(KERN_INFO "PCIE%d: No device detected.\n", port->index); |
719 | } | 718 | } |
720 | 719 | ||
720 | #ifdef CONFIG_44x | ||
721 | |||
721 | /* Check various reset bits of the 440SPe PCIe core */ | 722 | /* Check various reset bits of the 440SPe PCIe core */ |
722 | static int __init ppc440spe_pciex_check_reset(struct device_node *np) | 723 | static int __init ppc440spe_pciex_check_reset(struct device_node *np) |
723 | { | 724 | { |