diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-22 14:17:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-22 14:17:35 -0400 |
commit | dc79747019b43c28d1f50aad69b8039f8d8db301 (patch) | |
tree | 4e85f1e41a6df5e5ab0866901d29d2d08efdf426 | |
parent | 0f760f13012322c81714812d852429fe23b16dcf (diff) | |
parent | 7bd02a20d5fcb69e1623c3bf2b68959fe7a77fa4 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Clean up duplicate includes in drivers/macintosh/
[POWERPC] Quiet section mismatch warning on pcibios_setup
[POWERPC] init and exit markings for hvc_iseries
[POWERPC] Quiet section mismatch in hvc_rtas.c
[POWERPC] Constify of_platform_driver match_table
[POWERPC] hvcs: Make some things static and const
[POWERPC] Constify of_platform_driver name
[POWERPC] MPIC protected sources
[POWERPC] of_detach_node()'s device node argument cannot be const
[POWERPC] Fix ARCH=ppc builds
[POWERPC] mv64x60: Use mutex instead of semaphore
[POWERPC] Allow smp_call_function_single() to current cpu
[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC
[POWERPC] Fix future firmware feature fixups function failure
[POWERPC] fix showing xmon help
[POWERPC] Make xmon_write accept a const buffer
[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.
[POWERPC] cell: CONFIG_SPE_BASE is a typo
26 files changed, 101 insertions, 56 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 |
50 | CONFIG_NOT_COHERENT_CACHE=y | 50 | CONFIG_NOT_COHERENT_CACHE=y |
51 | CONFIG_CONFIG_CHECK_CACHE_COHERENCY=y | 51 | CONFIG_CHECK_CACHE_COHERENCY=y |
52 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 52 | CONFIG_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 | ||
169 | char __init *pcibios_setup(char *str) | 169 | char __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 | */ |
1221 | void of_detach_node(const struct device_node *np) | 1221 | void 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 | ||
218 | config CONFIG_CHECK_CACHE_COHERENCY | 218 | config CHECK_CACHE_COHERENCY |
219 | bool | 219 | bool |
220 | 220 | ||
221 | endmenu | 221 | endmenu |
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 | |||
59 | config MV64X60 | 59 | config 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 | ||
64 | config MPC10X_OPENPIC | 64 | config 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 | */ |
69 | void __init fw_feature_init(void) | 69 | void __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 | ||
101 | out: | ||
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 | ||
13 | extern void __init fw_feature_init(void); | 13 | extern void __init fw_feature_init(const char *hypertas, unsigned long len); |
14 | 14 | ||
15 | struct pt_regs; | 15 | struct 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 | ||
356 | static int __init pSeries_probe(void) | 361 | static 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 | |||
136 | void 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 | ||
6 | extern int xmon_putchar(int c); | 6 | extern int xmon_putchar(int c); |
7 | extern int xmon_getchar(void); | 7 | extern int xmon_getchar(void); |
8 | extern void xmon_puts(const char *); | ||
8 | extern char *xmon_gets(char *, int); | 9 | extern char *xmon_gets(char *, int); |
9 | extern void xmon_printf(const char *, ...); | 10 | extern void xmon_printf(const char *, ...); |
10 | extern void xmon_map_scc(void); | 11 | extern void xmon_map_scc(void); |
11 | extern int xmon_expect(const char *str, unsigned long timeout); | 12 | extern int xmon_expect(const char *str, unsigned long timeout); |
12 | extern int xmon_write(void *ptr, int nb); | 13 | extern int xmon_write(const void *ptr, int nb); |
13 | extern int xmon_readchar(void); | 14 | extern int xmon_readchar(void); |
14 | extern int xmon_read_poll(void); | 15 | extern 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 | ||
17 | int xmon_write(void *ptr, int nb) | 17 | int 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(); |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 032f4b7f4225..d212b1c418a9 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mutex.h> | ||
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
18 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
19 | #include <linux/mv643xx.h> | 20 | #include <linux/mv643xx.h> |
@@ -2359,7 +2360,7 @@ mv64460_chip_specific_init(struct mv64x60_handle *bh, | |||
2359 | /* Export the hotswap register via sysfs for enum event monitoring */ | 2360 | /* Export the hotswap register via sysfs for enum event monitoring */ |
2360 | #define VAL_LEN_MAX 11 /* 32-bit hex or dec stringified number + '\n' */ | 2361 | #define VAL_LEN_MAX 11 /* 32-bit hex or dec stringified number + '\n' */ |
2361 | 2362 | ||
2362 | DECLARE_MUTEX(mv64xxx_hs_lock); | 2363 | static DEFINE_MUTEX(mv64xxx_hs_lock); |
2363 | 2364 | ||
2364 | static ssize_t | 2365 | static ssize_t |
2365 | mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) | 2366 | mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) |
@@ -2372,14 +2373,14 @@ mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) | |||
2372 | if (count < VAL_LEN_MAX) | 2373 | if (count < VAL_LEN_MAX) |
2373 | return -EINVAL; | 2374 | return -EINVAL; |
2374 | 2375 | ||
2375 | if (down_interruptible(&mv64xxx_hs_lock)) | 2376 | if (mutex_lock_interruptible(&mv64xxx_hs_lock)) |
2376 | return -ERESTARTSYS; | 2377 | return -ERESTARTSYS; |
2377 | save_exclude = mv64x60_pci_exclude_bridge; | 2378 | save_exclude = mv64x60_pci_exclude_bridge; |
2378 | mv64x60_pci_exclude_bridge = 0; | 2379 | mv64x60_pci_exclude_bridge = 0; |
2379 | early_read_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), | 2380 | early_read_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), |
2380 | MV64360_PCICFG_CPCI_HOTSWAP, &v); | 2381 | MV64360_PCICFG_CPCI_HOTSWAP, &v); |
2381 | mv64x60_pci_exclude_bridge = save_exclude; | 2382 | mv64x60_pci_exclude_bridge = save_exclude; |
2382 | up(&mv64xxx_hs_lock); | 2383 | mutex_unlock(&mv64xxx_hs_lock); |
2383 | 2384 | ||
2384 | return sprintf(buf, "0x%08x\n", v); | 2385 | return sprintf(buf, "0x%08x\n", v); |
2385 | } | 2386 | } |
@@ -2396,14 +2397,14 @@ mv64xxx_hs_reg_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | |||
2396 | return -EINVAL; | 2397 | return -EINVAL; |
2397 | 2398 | ||
2398 | if (sscanf(buf, "%i", &v) == 1) { | 2399 | if (sscanf(buf, "%i", &v) == 1) { |
2399 | if (down_interruptible(&mv64xxx_hs_lock)) | 2400 | if (mutex_lock_interruptible(&mv64xxx_hs_lock)) |
2400 | return -ERESTARTSYS; | 2401 | return -ERESTARTSYS; |
2401 | save_exclude = mv64x60_pci_exclude_bridge; | 2402 | save_exclude = mv64x60_pci_exclude_bridge; |
2402 | mv64x60_pci_exclude_bridge = 0; | 2403 | mv64x60_pci_exclude_bridge = 0; |
2403 | early_write_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), | 2404 | early_write_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), |
2404 | MV64360_PCICFG_CPCI_HOTSWAP, v); | 2405 | MV64360_PCICFG_CPCI_HOTSWAP, v); |
2405 | mv64x60_pci_exclude_bridge = save_exclude; | 2406 | mv64x60_pci_exclude_bridge = save_exclude; |
2406 | up(&mv64xxx_hs_lock); | 2407 | mutex_unlock(&mv64xxx_hs_lock); |
2407 | } | 2408 | } |
2408 | else | 2409 | else |
2409 | count = -EINVAL; | 2410 | count = -EINVAL; |
@@ -2433,10 +2434,10 @@ mv64xxx_hs_reg_valid_show(struct device *dev, struct device_attribute *attr, | |||
2433 | pdev = container_of(dev, struct platform_device, dev); | 2434 | pdev = container_of(dev, struct platform_device, dev); |
2434 | pdp = (struct mv64xxx_pdata *)pdev->dev.platform_data; | 2435 | pdp = (struct mv64xxx_pdata *)pdev->dev.platform_data; |
2435 | 2436 | ||
2436 | if (down_interruptible(&mv64xxx_hs_lock)) | 2437 | if (mutex_lock_interruptible(&mv64xxx_hs_lock)) |
2437 | return -ERESTARTSYS; | 2438 | return -ERESTARTSYS; |
2438 | v = pdp->hs_reg_valid; | 2439 | v = pdp->hs_reg_valid; |
2439 | up(&mv64xxx_hs_lock); | 2440 | mutex_unlock(&mv64xxx_hs_lock); |
2440 | 2441 | ||
2441 | return sprintf(buf, "%i\n", v); | 2442 | return sprintf(buf, "%i\n", v); |
2442 | } | 2443 | } |
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index b37f1d5a5be6..a08f8f981c11 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c | |||
@@ -472,7 +472,7 @@ static void hvc_handle_event(struct HvLpEvent *event) | |||
472 | } | 472 | } |
473 | } | 473 | } |
474 | 474 | ||
475 | static int send_open(HvLpIndex remoteLp, void *sem) | 475 | static int __init send_open(HvLpIndex remoteLp, void *sem) |
476 | { | 476 | { |
477 | return HvCallEvent_signalLpEventFast(remoteLp, | 477 | return HvCallEvent_signalLpEventFast(remoteLp, |
478 | HvLpEvent_Type_VirtualIo, | 478 | HvLpEvent_Type_VirtualIo, |
@@ -484,7 +484,7 @@ static int send_open(HvLpIndex remoteLp, void *sem) | |||
484 | 0, 0, 0, 0); | 484 | 0, 0, 0, 0); |
485 | } | 485 | } |
486 | 486 | ||
487 | static int hvc_vio_init(void) | 487 | static int __init hvc_vio_init(void) |
488 | { | 488 | { |
489 | atomic_t wait_flag; | 489 | atomic_t wait_flag; |
490 | int rc; | 490 | int rc; |
@@ -552,14 +552,14 @@ static int hvc_vio_init(void) | |||
552 | } | 552 | } |
553 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ | 553 | module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ |
554 | 554 | ||
555 | static void hvc_vio_exit(void) | 555 | static void __exit hvc_vio_exit(void) |
556 | { | 556 | { |
557 | vio_unregister_driver(&hvc_vio_driver); | 557 | vio_unregister_driver(&hvc_vio_driver); |
558 | } | 558 | } |
559 | module_exit(hvc_vio_exit); | 559 | module_exit(hvc_vio_exit); |
560 | 560 | ||
561 | /* the device tree order defines our numbering */ | 561 | /* the device tree order defines our numbering */ |
562 | static int hvc_find_vtys(void) | 562 | static int __init hvc_find_vtys(void) |
563 | { | 563 | { |
564 | struct device_node *vty; | 564 | struct device_node *vty; |
565 | int num_found = 0; | 565 | int num_found = 0; |
diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c index 4b97eaf18602..bb09413d5a21 100644 --- a/drivers/char/hvc_rtas.c +++ b/drivers/char/hvc_rtas.c | |||
@@ -115,7 +115,7 @@ static void __exit hvc_rtas_exit(void) | |||
115 | module_exit(hvc_rtas_exit); | 115 | module_exit(hvc_rtas_exit); |
116 | 116 | ||
117 | /* This will happen prior to module init. There is no tty at this time? */ | 117 | /* This will happen prior to module init. There is no tty at this time? */ |
118 | static int hvc_rtas_console_init(void) | 118 | static int __init hvc_rtas_console_init(void) |
119 | { | 119 | { |
120 | rtascons_put_char_token = rtas_token("put-term-char"); | 120 | rtascons_put_char_token = rtas_token("put-term-char"); |
121 | if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE) | 121 | if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE) |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 17f96e04266f..69d8866de783 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -210,9 +210,9 @@ static struct ktermios hvcs_tty_termios = { | |||
210 | static int hvcs_parm_num_devs = -1; | 210 | static int hvcs_parm_num_devs = -1; |
211 | module_param(hvcs_parm_num_devs, int, 0); | 211 | module_param(hvcs_parm_num_devs, int, 0); |
212 | 212 | ||
213 | char hvcs_driver_name[] = "hvcs"; | 213 | static const char hvcs_driver_name[] = "hvcs"; |
214 | char hvcs_device_node[] = "hvcs"; | 214 | static const char hvcs_device_node[] = "hvcs"; |
215 | char hvcs_driver_string[] | 215 | static const char hvcs_driver_string[] |
216 | = "IBM hvcs (Hypervisor Virtual Console Server) Driver"; | 216 | = "IBM hvcs (Hypervisor Virtual Console Server) Driver"; |
217 | 217 | ||
218 | /* Status of partner info rescan triggered via sysfs. */ | 218 | /* Status of partner info rescan triggered via sysfs. */ |
@@ -1092,7 +1092,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address, | |||
1092 | * NOTICE: Do NOT hold either the hvcs_struct.lock or hvcs_structs_lock when | 1092 | * NOTICE: Do NOT hold either the hvcs_struct.lock or hvcs_structs_lock when |
1093 | * calling this function or you will get deadlock. | 1093 | * calling this function or you will get deadlock. |
1094 | */ | 1094 | */ |
1095 | struct hvcs_struct *hvcs_get_by_index(int index) | 1095 | static struct hvcs_struct *hvcs_get_by_index(int index) |
1096 | { | 1096 | { |
1097 | struct hvcs_struct *hvcsd = NULL; | 1097 | struct hvcs_struct *hvcsd = NULL; |
1098 | unsigned long flags; | 1098 | unsigned long flags; |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 4177ff004753..2c21d4f25cc8 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/pmac_feature.h> | 31 | #include <asm/pmac_feature.h> |
32 | #include <asm/dbdma.h> | 32 | #include <asm/dbdma.h> |
33 | #include <asm/dbdma.h> | ||
34 | #include <asm/macio.h> | 33 | #include <asm/macio.h> |
35 | #include <asm/keylargo.h> | 34 | #include <asm/keylargo.h> |
36 | 35 | ||
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 3c45142c40b2..b01985498460 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -1316,7 +1316,7 @@ static struct of_device_id m8xx_pcmcia_match[] = { | |||
1316 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); | 1316 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); |
1317 | 1317 | ||
1318 | static struct of_platform_driver m8xx_pcmcia_driver = { | 1318 | static struct of_platform_driver m8xx_pcmcia_driver = { |
1319 | .name = (char *)driver_name, | 1319 | .name = driver_name, |
1320 | .match_table = m8xx_pcmcia_match, | 1320 | .match_table = m8xx_pcmcia_match, |
1321 | .probe = m8xx_probe, | 1321 | .probe = m8xx_probe, |
1322 | .remove = m8xx_remove, | 1322 | .remove = m8xx_remove, |
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 2ffb06abe881..262db6b8da73 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -296,6 +296,9 @@ struct mpic | |||
296 | unsigned int dcr_base; | 296 | unsigned int dcr_base; |
297 | #endif | 297 | #endif |
298 | 298 | ||
299 | /* Protected sources */ | ||
300 | unsigned long *protected; | ||
301 | |||
299 | #ifdef CONFIG_MPIC_WEIRD | 302 | #ifdef CONFIG_MPIC_WEIRD |
300 | /* Pointer to HW info array */ | 303 | /* Pointer to HW info array */ |
301 | u32 *hw_set; | 304 | u32 *hw_set; |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 6e391c9894ce..672083787a1d 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -139,7 +139,7 @@ extern unsigned long __init of_get_flat_dt_root(void); | |||
139 | 139 | ||
140 | /* For updating the device tree at runtime */ | 140 | /* For updating the device tree at runtime */ |
141 | extern void of_attach_node(struct device_node *); | 141 | extern void of_attach_node(struct device_node *); |
142 | extern void of_detach_node(const struct device_node *); | 142 | extern void of_detach_node(struct device_node *); |
143 | 143 | ||
144 | /* Other Prototypes */ | 144 | /* Other Prototypes */ |
145 | extern void finish_device_tree(void); | 145 | extern void finish_device_tree(void); |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index f1311a8f310f..cc45780421ca 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -54,6 +54,7 @@ extern void show_regs(struct pt_regs * regs); | |||
54 | extern void flush_instruction_cache(void); | 54 | extern void flush_instruction_cache(void); |
55 | extern void hard_reset_now(void); | 55 | extern void hard_reset_now(void); |
56 | extern void poweroff_now(void); | 56 | extern void poweroff_now(void); |
57 | extern int set_dabr(unsigned long dabr); | ||
57 | #ifdef CONFIG_6xx | 58 | #ifdef CONFIG_6xx |
58 | extern long _get_L2CR(void); | 59 | extern long _get_L2CR(void); |
59 | extern long _get_L3CR(void); | 60 | extern long _get_L3CR(void); |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 5fd44e63fb26..448f70b30a0c 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -31,8 +31,8 @@ extern struct bus_type of_platform_bus_type; | |||
31 | */ | 31 | */ |
32 | struct of_platform_driver | 32 | struct of_platform_driver |
33 | { | 33 | { |
34 | char *name; | 34 | const char *name; |
35 | struct of_device_id *match_table; | 35 | const struct of_device_id *match_table; |
36 | struct module *owner; | 36 | struct module *owner; |
37 | 37 | ||
38 | int (*probe)(struct of_device* dev, | 38 | int (*probe)(struct of_device* dev, |