aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 14:17:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 14:17:35 -0400
commitdc79747019b43c28d1f50aad69b8039f8d8db301 (patch)
tree4e85f1e41a6df5e5ab0866901d29d2d08efdf426 /arch
parent0f760f13012322c81714812d852429fe23b16dcf (diff)
parent7bd02a20d5fcb69e1623c3bf2b68959fe7a77fa4 (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
Diffstat (limited to 'arch')
-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
-rw-r--r--arch/ppc/syslib/mv64x60.c15
17 files changed, 84 insertions, 42 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();
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
2362DECLARE_MUTEX(mv64xxx_hs_lock); 2363static DEFINE_MUTEX(mv64xxx_hs_lock);
2363 2364
2364static ssize_t 2365static ssize_t
2365mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) 2366mv64xxx_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}