aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig2
-rw-r--r--arch/powerpc/kernel/pci-common.c2
-rw-r--r--arch/powerpc/kernel/prom.c2
-rw-r--r--arch/powerpc/kernel/smp.c7
-rw-r--r--arch/powerpc/mm/fault.c8
-rw-r--r--arch/powerpc/mm/hash_utils_64.c4
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype2
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c19
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c17
-rw-r--r--arch/powerpc/sysdev/mpic.c32
-rw-r--r--arch/powerpc/xmon/nonstdio.c5
-rw-r--r--arch/powerpc/xmon/nonstdio.h3
-rw-r--r--arch/powerpc/xmon/start.c2
-rw-r--r--arch/powerpc/xmon/xmon.c2
16 files changed, 76 insertions, 35 deletions
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index fb504a714625..858f865f2d59 100644
--- a/arch/powerpc/configs/prpmc2800_defconfig
+++ b/arch/powerpc/configs/prpmc2800_defconfig
@@ -48,7 +48,7 @@ CONFIG_PPC_STD_MMU_32=y
48# CONFIG_PPC_MM_SLICES is not set 48# CONFIG_PPC_MM_SLICES is not set
49# CONFIG_SMP is not set 49# CONFIG_SMP is not set
50CONFIG_NOT_COHERENT_CACHE=y 50CONFIG_NOT_COHERENT_CACHE=y
51CONFIG_CONFIG_CHECK_CACHE_COHERENCY=y 51CONFIG_CHECK_CACHE_COHERENCY=y
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53 53
54# 54#
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 94b4a028232a..fe7d1255e11e 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -166,7 +166,7 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
166 166
167} 167}
168 168
169char __init *pcibios_setup(char *str) 169char __devinit *pcibios_setup(char *str)
170{ 170{
171 return str; 171 return str;
172} 172}
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index bdcd23d8d8b9..a38197b12d3e 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1218,7 +1218,7 @@ void of_attach_node(struct device_node *np)
1218 * a reference to the node. The memory associated with the node 1218 * a reference to the node. The memory associated with the node
1219 * is not freed until its refcount goes to zero. 1219 * is not freed until its refcount goes to zero.
1220 */ 1220 */
1221void of_detach_node(const struct device_node *np) 1221void of_detach_node(struct device_node *np)
1222{ 1222{
1223 struct device_node *parent; 1223 struct device_node *parent;
1224 1224
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index d577b71db375..087c92f2a3eb 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -284,7 +284,7 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int
284 int wait) 284 int wait)
285{ 285{
286 cpumask_t map = CPU_MASK_NONE; 286 cpumask_t map = CPU_MASK_NONE;
287 int ret = -EBUSY; 287 int ret = 0;
288 288
289 if (!cpu_online(cpu)) 289 if (!cpu_online(cpu))
290 return -EINVAL; 290 return -EINVAL;
@@ -292,6 +292,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int
292 cpu_set(cpu, map); 292 cpu_set(cpu, map);
293 if (cpu != get_cpu()) 293 if (cpu != get_cpu())
294 ret = smp_call_function_map(func,info,nonatomic,wait,map); 294 ret = smp_call_function_map(func,info,nonatomic,wait,map);
295 else {
296 local_irq_disable();
297 func(info);
298 local_irq_enable();
299 }
295 put_cpu(); 300 put_cpu();
296 return ret; 301 return ret;
297} 302}
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 3767211b3d0f..ab3546c5ac3a 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -283,7 +283,13 @@ good_area:
283 /* protection fault */ 283 /* protection fault */
284 if (error_code & DSISR_PROTFAULT) 284 if (error_code & DSISR_PROTFAULT)
285 goto bad_area; 285 goto bad_area;
286 if (!(vma->vm_flags & VM_EXEC)) 286 /*
287 * Allow execution from readable areas if the MMU does not
288 * provide separate controls over reading and executing.
289 */
290 if (!(vma->vm_flags & VM_EXEC) &&
291 (cpu_has_feature(CPU_FTR_NOEXECUTE) ||
292 !(vma->vm_flags & (VM_READ | VM_WRITE))))
287 goto bad_area; 293 goto bad_area;
288#else 294#else
289 pte_t *ptep; 295 pte_t *ptep;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 2ce9491b48d4..bc7b0cedae5e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -609,7 +609,7 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
609 mm->context.sllp = SLB_VSID_USER | mmu_psize_defs[MMU_PAGE_4K].sllp; 609 mm->context.sllp = SLB_VSID_USER | mmu_psize_defs[MMU_PAGE_4K].sllp;
610#endif /* CONFIG_PPC_MM_SLICES */ 610#endif /* CONFIG_PPC_MM_SLICES */
611 611
612#ifdef CONFIG_SPE_BASE 612#ifdef CONFIG_SPU_BASE
613 spu_flush_all_slbs(mm); 613 spu_flush_all_slbs(mm);
614#endif 614#endif
615} 615}
@@ -744,7 +744,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
744 "to 4kB pages because of " 744 "to 4kB pages because of "
745 "non-cacheable mapping\n"); 745 "non-cacheable mapping\n");
746 psize = mmu_vmalloc_psize = MMU_PAGE_4K; 746 psize = mmu_vmalloc_psize = MMU_PAGE_4K;
747#ifdef CONFIG_SPE_BASE 747#ifdef CONFIG_SPU_BASE
748 spu_flush_all_slbs(mm); 748 spu_flush_all_slbs(mm);
749#endif 749#endif
750 } 750 }
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index b8b5fde94668..e4b2aee53a73 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -215,7 +215,7 @@ config NOT_COHERENT_CACHE
215 depends on 4xx || 8xx || E200 215 depends on 4xx || 8xx || E200
216 default y 216 default y
217 217
218config CONFIG_CHECK_CACHE_COHERENCY 218config CHECK_CACHE_COHERENCY
219 bool 219 bool
220 220
221endmenu 221endmenu
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index bec772674e40..2d12f77e46bc 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -59,7 +59,7 @@ config MPC10X_BRIDGE
59config MV64X60 59config MV64X60
60 bool 60 bool
61 select PPC_INDIRECT_PCI 61 select PPC_INDIRECT_PCI
62 select CONFIG_CHECK_CACHE_COHERENCY 62 select CHECK_CACHE_COHERENCY
63 63
64config MPC10X_OPENPIC 64config MPC10X_OPENPIC
65 bool 65 bool
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 29bf83bfb1f0..8b18a1c40092 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -66,24 +66,13 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = {
66 * device-tree/ibm,hypertas-functions. Ultimately this functionality may 66 * device-tree/ibm,hypertas-functions. Ultimately this functionality may
67 * be moved into prom.c prom_init(). 67 * be moved into prom.c prom_init().
68 */ 68 */
69void __init fw_feature_init(void) 69void __init fw_feature_init(const char *hypertas, unsigned long len)
70{ 70{
71 struct device_node *dn; 71 const char *s;
72 const char *hypertas, *s; 72 int i;
73 int len, i;
74 73
75 DBG(" -> fw_feature_init()\n"); 74 DBG(" -> fw_feature_init()\n");
76 75
77 dn = of_find_node_by_path("/rtas");
78 if (dn == NULL) {
79 printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n");
80 goto out;
81 }
82
83 hypertas = of_get_property(dn, "ibm,hypertas-functions", &len);
84 if (hypertas == NULL)
85 goto out;
86
87 for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { 76 for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) {
88 for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { 77 for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) {
89 /* check value against table of strings */ 78 /* check value against table of strings */
@@ -98,7 +87,5 @@ void __init fw_feature_init(void)
98 } 87 }
99 } 88 }
100 89
101out:
102 of_node_put(dn);
103 DBG(" <- fw_feature_init()\n"); 90 DBG(" <- fw_feature_init()\n");
104} 91}
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 61e19f78b923..61136d019554 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -10,7 +10,7 @@
10#ifndef _PSERIES_PSERIES_H 10#ifndef _PSERIES_PSERIES_H
11#define _PSERIES_PSERIES_H 11#define _PSERIES_PSERIES_H
12 12
13extern void __init fw_feature_init(void); 13extern void __init fw_feature_init(const char *hypertas, unsigned long len);
14 14
15struct pt_regs; 15struct pt_regs;
16 16
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 59e69f085cb4..f0b7146a110f 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -320,8 +320,6 @@ static void __init pSeries_init_early(void)
320{ 320{
321 DBG(" -> pSeries_init_early()\n"); 321 DBG(" -> pSeries_init_early()\n");
322 322
323 fw_feature_init();
324
325 if (firmware_has_feature(FW_FEATURE_LPAR)) 323 if (firmware_has_feature(FW_FEATURE_LPAR))
326 find_udbg_vterm(); 324 find_udbg_vterm();
327 325
@@ -343,14 +341,21 @@ static int __init pSeries_probe_hypertas(unsigned long node,
343 const char *uname, int depth, 341 const char *uname, int depth,
344 void *data) 342 void *data)
345{ 343{
344 const char *hypertas;
345 unsigned long len;
346
346 if (depth != 1 || 347 if (depth != 1 ||
347 (strcmp(uname, "rtas") != 0 && strcmp(uname, "rtas@0") != 0)) 348 (strcmp(uname, "rtas") != 0 && strcmp(uname, "rtas@0") != 0))
348 return 0; 349 return 0;
350
351 hypertas = of_get_flat_dt_prop(node, "ibm,hypertas-functions", &len);
352 if (!hypertas)
353 return 1;
349 354
350 if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL) 355 powerpc_firmware_features |= FW_FEATURE_LPAR;
351 powerpc_firmware_features |= FW_FEATURE_LPAR; 356 fw_feature_init(hypertas, len);
352 357
353 return 1; 358 return 1;
354} 359}
355 360
356static int __init pSeries_probe(void) 361static int __init pSeries_probe(void)
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 75aad38179f0..74c64c0d3b71 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -877,6 +877,8 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
877 877
878 if (hw == mpic->spurious_vec) 878 if (hw == mpic->spurious_vec)
879 return -EINVAL; 879 return -EINVAL;
880 if (mpic->protected && test_bit(hw, mpic->protected))
881 return -EINVAL;
880 882
881#ifdef CONFIG_SMP 883#ifdef CONFIG_SMP
882 else if (hw >= mpic->ipi_vecs[0]) { 884 else if (hw >= mpic->ipi_vecs[0]) {
@@ -1034,6 +1036,25 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1034 if (node && of_get_property(node, "big-endian", NULL) != NULL) 1036 if (node && of_get_property(node, "big-endian", NULL) != NULL)
1035 mpic->flags |= MPIC_BIG_ENDIAN; 1037 mpic->flags |= MPIC_BIG_ENDIAN;
1036 1038
1039 /* Look for protected sources */
1040 if (node) {
1041 unsigned int psize, bits, mapsize;
1042 const u32 *psrc =
1043 of_get_property(node, "protected-sources", &psize);
1044 if (psrc) {
1045 psize /= 4;
1046 bits = intvec_top + 1;
1047 mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long);
1048 mpic->protected = alloc_bootmem(mapsize);
1049 BUG_ON(mpic->protected == NULL);
1050 memset(mpic->protected, 0, mapsize);
1051 for (i = 0; i < psize; i++) {
1052 if (psrc[i] > intvec_top)
1053 continue;
1054 __set_bit(psrc[i], mpic->protected);
1055 }
1056 }
1057 }
1037 1058
1038#ifdef CONFIG_MPIC_WEIRD 1059#ifdef CONFIG_MPIC_WEIRD
1039 mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)]; 1060 mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)];
@@ -1213,6 +1234,9 @@ void __init mpic_init(struct mpic *mpic)
1213 u32 vecpri = MPIC_VECPRI_MASK | i | 1234 u32 vecpri = MPIC_VECPRI_MASK | i |
1214 (8 << MPIC_VECPRI_PRIORITY_SHIFT); 1235 (8 << MPIC_VECPRI_PRIORITY_SHIFT);
1215 1236
1237 /* check if protected */
1238 if (mpic->protected && test_bit(i, mpic->protected))
1239 continue;
1216 /* init hw */ 1240 /* init hw */
1217 mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); 1241 mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
1218 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1242 mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
@@ -1407,6 +1431,14 @@ unsigned int mpic_get_one_irq(struct mpic *mpic)
1407 mpic_eoi(mpic); 1431 mpic_eoi(mpic);
1408 return NO_IRQ; 1432 return NO_IRQ;
1409 } 1433 }
1434 if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
1435 if (printk_ratelimit())
1436 printk(KERN_WARNING "%s: Got protected source %d !\n",
1437 mpic->name, (int)src);
1438 mpic_eoi(mpic);
1439 return NO_IRQ;
1440 }
1441
1410 return irq_linear_revmap(mpic->irqhost, src); 1442 return irq_linear_revmap(mpic->irqhost, src);
1411} 1443}
1412 1444
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c
index 78765833f4c0..bfac84fbe780 100644
--- a/arch/powerpc/xmon/nonstdio.c
+++ b/arch/powerpc/xmon/nonstdio.c
@@ -132,3 +132,8 @@ void xmon_printf(const char *format, ...)
132 va_end(args); 132 va_end(args);
133 xmon_write(xmon_outbuf, n); 133 xmon_write(xmon_outbuf, n);
134} 134}
135
136void xmon_puts(const char *str)
137{
138 xmon_write(str, strlen(str));
139}
diff --git a/arch/powerpc/xmon/nonstdio.h b/arch/powerpc/xmon/nonstdio.h
index 47cebbd2b1b1..23dd95f4599c 100644
--- a/arch/powerpc/xmon/nonstdio.h
+++ b/arch/powerpc/xmon/nonstdio.h
@@ -5,10 +5,11 @@
5 5
6extern int xmon_putchar(int c); 6extern int xmon_putchar(int c);
7extern int xmon_getchar(void); 7extern int xmon_getchar(void);
8extern void xmon_puts(const char *);
8extern char *xmon_gets(char *, int); 9extern char *xmon_gets(char *, int);
9extern void xmon_printf(const char *, ...); 10extern void xmon_printf(const char *, ...);
10extern void xmon_map_scc(void); 11extern void xmon_map_scc(void);
11extern int xmon_expect(const char *str, unsigned long timeout); 12extern int xmon_expect(const char *str, unsigned long timeout);
12extern int xmon_write(void *ptr, int nb); 13extern int xmon_write(const void *ptr, int nb);
13extern int xmon_readchar(void); 14extern int xmon_readchar(void);
14extern int xmon_read_poll(void); 15extern int xmon_read_poll(void);
diff --git a/arch/powerpc/xmon/start.c b/arch/powerpc/xmon/start.c
index 712552c4f242..8864de2af382 100644
--- a/arch/powerpc/xmon/start.c
+++ b/arch/powerpc/xmon/start.c
@@ -14,7 +14,7 @@ void xmon_map_scc(void)
14{ 14{
15} 15}
16 16
17int xmon_write(void *ptr, int nb) 17int xmon_write(const void *ptr, int nb)
18{ 18{
19 return udbg_write(ptr, nb); 19 return udbg_write(ptr, nb);
20} 20}
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 669e6566ad70..121b04d165d1 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -833,7 +833,7 @@ cmds(struct pt_regs *excp)
833 mdelay(2000); 833 mdelay(2000);
834 return cmd; 834 return cmd;
835 case '?': 835 case '?':
836 printf(help_string); 836 xmon_puts(help_string);
837 break; 837 break;
838 case 'b': 838 case 'b':
839 bpt_cmds(); 839 bpt_cmds();