diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-14 12:24:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-14 12:24:00 -0400 |
commit | 83bd6998b04fc1bb7280b14f16b2bdbdc07c914b (patch) | |
tree | af1bbe2bac5752b69b1ac58bf5d822c735da439b /arch/sparc | |
parent | e7250b8ae3870f37f660c2f65cafcaba85e3bfd3 (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge commit 'v2.6.27-rc6' into timers/hpet
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/Makefile | 8 | ||||
-rw-r--r-- | arch/sparc/boot/Makefile | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/ebus_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/ebus_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/futex_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/irq_64.h | 7 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_device.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform.h | 23 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform_32.h | 24 | ||||
-rw-r--r-- | arch/sparc/include/asm/of_platform_64.h | 25 | ||||
-rw-r--r-- | arch/sparc/include/asm/parport.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_32.h | 20 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace_64.h | 39 | ||||
-rw-r--r-- | arch/sparc/include/asm/sbus_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/sbus_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 25 | ||||
-rw-r--r-- | arch/sparc/kernel/ioport.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device.c | 19 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4d_smp.c | 16 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/time.c | 2 |
21 files changed, 124 insertions, 121 deletions
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 6668e6037af6..9592889a6fd0 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
@@ -52,20 +52,24 @@ endif | |||
52 | export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o | 52 | export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o |
53 | 53 | ||
54 | # Default target | 54 | # Default target |
55 | all: image | 55 | all: zImage |
56 | 56 | ||
57 | boot := arch/sparc/boot | 57 | boot := arch/sparc/boot |
58 | 58 | ||
59 | image tftpboot.img: vmlinux | 59 | image zImage tftpboot.img: vmlinux |
60 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 60 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
61 | 61 | ||
62 | archclean: | 62 | archclean: |
63 | $(Q)$(MAKE) $(clean)=$(boot) | 63 | $(Q)$(MAKE) $(clean)=$(boot) |
64 | 64 | ||
65 | # This is the image used for packaging | ||
66 | KBUILD_IMAGE := $(boot)/zImage | ||
67 | |||
65 | CLEAN_FILES += arch/$(ARCH)/boot/System.map | 68 | CLEAN_FILES += arch/$(ARCH)/boot/System.map |
66 | 69 | ||
67 | # Don't use tabs in echo arguments. | 70 | # Don't use tabs in echo arguments. |
68 | define archhelp | 71 | define archhelp |
69 | echo '* image - kernel image ($(boot)/image)' | 72 | echo '* image - kernel image ($(boot)/image)' |
73 | echo '* zImage - stripped kernel image ($(boot)/zImage)' | ||
70 | echo ' tftpboot.img - image prepared for tftp' | 74 | echo ' tftpboot.img - image prepared for tftp' |
71 | endef | 75 | endef |
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile index 22d331e1e941..3e77a9f52248 100644 --- a/arch/sparc/boot/Makefile +++ b/arch/sparc/boot/Makefile | |||
@@ -19,6 +19,9 @@ quiet_cmd_sysmap = SYSMAP $(obj)/System.map | |||
19 | cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap | 19 | cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap |
20 | quiet_cmd_image = LD $@ | 20 | quiet_cmd_image = LD $@ |
21 | cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@ | 21 | cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@ |
22 | quiet_cmd_strip = STRIP $@ | ||
23 | cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start $(obj)/image -o $@ | ||
24 | |||
22 | 25 | ||
23 | define rule_image | 26 | define rule_image |
24 | $(if $($(quiet)cmd_image), \ | 27 | $(if $($(quiet)cmd_image), \ |
@@ -49,6 +52,9 @@ LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \ | |||
49 | $(obj)/image: $(obj)/btfix.o FORCE | 52 | $(obj)/image: $(obj)/btfix.o FORCE |
50 | $(call if_changed_rule,image) | 53 | $(call if_changed_rule,image) |
51 | 54 | ||
55 | $(obj)/zImage: $(obj)/image | ||
56 | $(call if_changed,strip) | ||
57 | |||
52 | $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE | 58 | $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE |
53 | $(call if_changed,elftoaout) | 59 | $(call if_changed,elftoaout) |
54 | $(call if_changed,piggy) | 60 | $(call if_changed,piggy) |
diff --git a/arch/sparc/include/asm/ebus_32.h b/arch/sparc/include/asm/ebus_32.h index 29cb7dfc6b79..f91f0b267ce1 100644 --- a/arch/sparc/include/asm/ebus_32.h +++ b/arch/sparc/include/asm/ebus_32.h | |||
@@ -12,9 +12,9 @@ | |||
12 | #ifndef _LINUX_IOPORT_H | 12 | #ifndef _LINUX_IOPORT_H |
13 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
14 | #endif | 14 | #endif |
15 | #include <linux/of_device.h> | ||
15 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
16 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
17 | #include <asm/of_device.h> | ||
18 | 18 | ||
19 | struct linux_ebus_child { | 19 | struct linux_ebus_child { |
20 | struct linux_ebus_child *next; | 20 | struct linux_ebus_child *next; |
diff --git a/arch/sparc/include/asm/ebus_64.h b/arch/sparc/include/asm/ebus_64.h index fcc62b97ced5..14c6a111f60c 100644 --- a/arch/sparc/include/asm/ebus_64.h +++ b/arch/sparc/include/asm/ebus_64.h | |||
@@ -8,9 +8,10 @@ | |||
8 | #ifndef __SPARC64_EBUS_H | 8 | #ifndef __SPARC64_EBUS_H |
9 | #define __SPARC64_EBUS_H | 9 | #define __SPARC64_EBUS_H |
10 | 10 | ||
11 | #include <linux/of_device.h> | ||
12 | |||
11 | #include <asm/oplib.h> | 13 | #include <asm/oplib.h> |
12 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
13 | #include <asm/of_device.h> | ||
14 | 15 | ||
15 | struct linux_ebus_child { | 16 | struct linux_ebus_child { |
16 | struct linux_ebus_child *next; | 17 | struct linux_ebus_child *next; |
diff --git a/arch/sparc/include/asm/futex_64.h b/arch/sparc/include/asm/futex_64.h index d8378935ae90..47f95839dc69 100644 --- a/arch/sparc/include/asm/futex_64.h +++ b/arch/sparc/include/asm/futex_64.h | |||
@@ -59,7 +59,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
59 | __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); | 59 | __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); |
60 | break; | 60 | break; |
61 | case FUTEX_OP_ANDN: | 61 | case FUTEX_OP_ANDN: |
62 | __futex_cas_op("and\t%2, %4, %1", ret, oldval, uaddr, oparg); | 62 | __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); |
63 | break; | 63 | break; |
64 | case FUTEX_OP_XOR: | 64 | case FUTEX_OP_XOR: |
65 | __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); | 65 | __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 0bb9bf531745..e3dd9303643d 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -90,4 +90,11 @@ static inline unsigned long get_softint(void) | |||
90 | return retval; | 90 | return retval; |
91 | } | 91 | } |
92 | 92 | ||
93 | void __trigger_all_cpu_backtrace(void); | ||
94 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | ||
95 | |||
96 | extern void *hardirq_stack[NR_CPUS]; | ||
97 | extern void *softirq_stack[NR_CPUS]; | ||
98 | #define __ARCH_HAS_DO_SOFTIRQ | ||
99 | |||
93 | #endif | 100 | #endif |
diff --git a/arch/sparc/include/asm/of_device.h b/arch/sparc/include/asm/of_device.h index e5f5aedc2293..bba777a416d3 100644 --- a/arch/sparc/include/asm/of_device.h +++ b/arch/sparc/include/asm/of_device.h | |||
@@ -30,8 +30,7 @@ struct of_device | |||
30 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | 30 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); |
31 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); | 31 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); |
32 | 32 | ||
33 | /* These are just here during the transition */ | 33 | /* This is just here during the transition */ |
34 | #include <linux/of_device.h> | ||
35 | #include <linux/of_platform.h> | 34 | #include <linux/of_platform.h> |
36 | 35 | ||
37 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
diff --git a/arch/sparc/include/asm/of_platform.h b/arch/sparc/include/asm/of_platform.h index aa699775ffba..2348ab90a57c 100644 --- a/arch/sparc/include/asm/of_platform.h +++ b/arch/sparc/include/asm/of_platform.h | |||
@@ -1,8 +1,21 @@ | |||
1 | #ifndef ___ASM_SPARC_OF_PLATFORM_H | 1 | #ifndef ___ASM_SPARC_OF_PLATFORM_H |
2 | #define ___ASM_SPARC_OF_PLATFORM_H | 2 | #define ___ASM_SPARC_OF_PLATFORM_H |
3 | #if defined(__sparc__) && defined(__arch64__) | 3 | /* |
4 | #include <asm/of_platform_64.h> | 4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. |
5 | #else | 5 | * <benh@kernel.crashing.org> |
6 | #include <asm/of_platform_32.h> | 6 | * Modified for Sparc by merging parts of asm/of_device.h |
7 | #endif | 7 | * by Stephen Rothwell |
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | extern struct bus_type ebus_bus_type; | ||
17 | extern struct bus_type sbus_bus_type; | ||
18 | |||
19 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
20 | |||
8 | #endif | 21 | #endif |
diff --git a/arch/sparc/include/asm/of_platform_32.h b/arch/sparc/include/asm/of_platform_32.h deleted file mode 100644 index 723f7c9b7411..000000000000 --- a/arch/sparc/include/asm/of_platform_32.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _ASM_SPARC_OF_PLATFORM_H | ||
2 | #define _ASM_SPARC_OF_PLATFORM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
5 | * <benh@kernel.crashing.org> | ||
6 | * Modified for Sparc by merging parts of asm/of_device.h | ||
7 | * by Stephen Rothwell | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | /* This is just here during the transition */ | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | extern struct bus_type ebus_bus_type; | ||
20 | extern struct bus_type sbus_bus_type; | ||
21 | |||
22 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
23 | |||
24 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ | ||
diff --git a/arch/sparc/include/asm/of_platform_64.h b/arch/sparc/include/asm/of_platform_64.h deleted file mode 100644 index 4f66a5f6342d..000000000000 --- a/arch/sparc/include/asm/of_platform_64.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_SPARC64_OF_PLATFORM_H | ||
2 | #define _ASM_SPARC64_OF_PLATFORM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
5 | * <benh@kernel.crashing.org> | ||
6 | * Modified for Sparc by merging parts of asm/of_device.h | ||
7 | * by Stephen Rothwell | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | /* This is just here during the transition */ | ||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | extern struct bus_type isa_bus_type; | ||
20 | extern struct bus_type ebus_bus_type; | ||
21 | extern struct bus_type sbus_bus_type; | ||
22 | |||
23 | #define of_bus_type of_platform_bus_type /* for compatibility */ | ||
24 | |||
25 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ | ||
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 7818b2523b8d..d9830621c906 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -6,9 +6,10 @@ | |||
6 | #ifndef _ASM_SPARC64_PARPORT_H | 6 | #ifndef _ASM_SPARC64_PARPORT_H |
7 | #define _ASM_SPARC64_PARPORT_H 1 | 7 | #define _ASM_SPARC64_PARPORT_H 1 |
8 | 8 | ||
9 | #include <linux/of_device.h> | ||
10 | |||
9 | #include <asm/ebus.h> | 11 | #include <asm/ebus.h> |
10 | #include <asm/ns87303.h> | 12 | #include <asm/ns87303.h> |
11 | #include <asm/of_device.h> | ||
12 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
13 | 14 | ||
14 | #define PARPORT_PC_MAX_PORTS PARPORT_MAX | 15 | #define PARPORT_PC_MAX_PORTS PARPORT_MAX |
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h index d43c88b86834..d409c4f21a5c 100644 --- a/arch/sparc/include/asm/ptrace_32.h +++ b/arch/sparc/include/asm/ptrace_32.h | |||
@@ -40,16 +40,6 @@ struct pt_regs { | |||
40 | #define UREG_FP UREG_I6 | 40 | #define UREG_FP UREG_I6 |
41 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
42 | 42 | ||
43 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
44 | { | ||
45 | return (regs->psr & PSR_SYSCALL); | ||
46 | } | ||
47 | |||
48 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
49 | { | ||
50 | return (regs->psr &= ~PSR_SYSCALL); | ||
51 | } | ||
52 | |||
53 | /* A register window */ | 43 | /* A register window */ |
54 | struct reg_window { | 44 | struct reg_window { |
55 | unsigned long locals[8]; | 45 | unsigned long locals[8]; |
@@ -72,6 +62,16 @@ struct sparc_stackf { | |||
72 | 62 | ||
73 | #ifdef __KERNEL__ | 63 | #ifdef __KERNEL__ |
74 | 64 | ||
65 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
66 | { | ||
67 | return (regs->psr & PSR_SYSCALL); | ||
68 | } | ||
69 | |||
70 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
71 | { | ||
72 | return (regs->psr &= ~PSR_SYSCALL); | ||
73 | } | ||
74 | |||
75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) | 75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) |
76 | #define instruction_pointer(regs) ((regs)->pc) | 76 | #define instruction_pointer(regs) ((regs)->pc) |
77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h index ec6d45c84cd0..06e4914c13f4 100644 --- a/arch/sparc/include/asm/ptrace_64.h +++ b/arch/sparc/include/asm/ptrace_64.h | |||
@@ -37,21 +37,6 @@ struct pt_regs { | |||
37 | unsigned int magic; | 37 | unsigned int magic; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static inline int pt_regs_trap_type(struct pt_regs *regs) | ||
41 | { | ||
42 | return regs->magic & 0x1ff; | ||
43 | } | ||
44 | |||
45 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
46 | { | ||
47 | return (regs->tstate & TSTATE_SYSCALL); | ||
48 | } | ||
49 | |||
50 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
51 | { | ||
52 | return (regs->tstate &= ~TSTATE_SYSCALL); | ||
53 | } | ||
54 | |||
55 | struct pt_regs32 { | 40 | struct pt_regs32 { |
56 | unsigned int psr; | 41 | unsigned int psr; |
57 | unsigned int pc; | 42 | unsigned int pc; |
@@ -128,15 +113,30 @@ struct sparc_trapf { | |||
128 | 113 | ||
129 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
130 | 115 | ||
116 | static inline int pt_regs_trap_type(struct pt_regs *regs) | ||
117 | { | ||
118 | return regs->magic & 0x1ff; | ||
119 | } | ||
120 | |||
121 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
122 | { | ||
123 | return (regs->tstate & TSTATE_SYSCALL); | ||
124 | } | ||
125 | |||
126 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
127 | { | ||
128 | return (regs->tstate &= ~TSTATE_SYSCALL); | ||
129 | } | ||
130 | |||
131 | struct global_reg_snapshot { | 131 | struct global_reg_snapshot { |
132 | unsigned long tstate; | 132 | unsigned long tstate; |
133 | unsigned long tpc; | 133 | unsigned long tpc; |
134 | unsigned long tnpc; | 134 | unsigned long tnpc; |
135 | unsigned long o7; | 135 | unsigned long o7; |
136 | unsigned long i7; | 136 | unsigned long i7; |
137 | unsigned long rpc; | ||
137 | struct thread_info *thread; | 138 | struct thread_info *thread; |
138 | unsigned long pad1; | 139 | unsigned long pad1; |
139 | unsigned long pad2; | ||
140 | }; | 140 | }; |
141 | 141 | ||
142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | 142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE |
@@ -154,7 +154,6 @@ extern unsigned long profile_pc(struct pt_regs *); | |||
154 | #define profile_pc(regs) instruction_pointer(regs) | 154 | #define profile_pc(regs) instruction_pointer(regs) |
155 | #endif | 155 | #endif |
156 | extern void show_regs(struct pt_regs *); | 156 | extern void show_regs(struct pt_regs *); |
157 | extern void __show_regs(struct pt_regs *); | ||
158 | #endif | 157 | #endif |
159 | 158 | ||
160 | #else /* __ASSEMBLY__ */ | 159 | #else /* __ASSEMBLY__ */ |
@@ -315,9 +314,9 @@ extern void __show_regs(struct pt_regs *); | |||
315 | #define GR_SNAP_TNPC 0x10 | 314 | #define GR_SNAP_TNPC 0x10 |
316 | #define GR_SNAP_O7 0x18 | 315 | #define GR_SNAP_O7 0x18 |
317 | #define GR_SNAP_I7 0x20 | 316 | #define GR_SNAP_I7 0x20 |
318 | #define GR_SNAP_THREAD 0x28 | 317 | #define GR_SNAP_RPC 0x28 |
319 | #define GR_SNAP_PAD1 0x30 | 318 | #define GR_SNAP_THREAD 0x30 |
320 | #define GR_SNAP_PAD2 0x38 | 319 | #define GR_SNAP_PAD1 0x38 |
321 | 320 | ||
322 | #endif /* __KERNEL__ */ | 321 | #endif /* __KERNEL__ */ |
323 | 322 | ||
diff --git a/arch/sparc/include/asm/sbus_32.h b/arch/sparc/include/asm/sbus_32.h index 77b5d3aadc99..a7b4fa21931d 100644 --- a/arch/sparc/include/asm/sbus_32.h +++ b/arch/sparc/include/asm/sbus_32.h | |||
@@ -9,10 +9,10 @@ | |||
9 | 9 | ||
10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
11 | #include <linux/ioport.h> | 11 | #include <linux/ioport.h> |
12 | #include <linux/of_device.h> | ||
12 | 13 | ||
13 | #include <asm/oplib.h> | 14 | #include <asm/oplib.h> |
14 | #include <asm/prom.h> | 15 | #include <asm/prom.h> |
15 | #include <asm/of_device.h> | ||
16 | #include <asm/scatterlist.h> | 16 | #include <asm/scatterlist.h> |
17 | 17 | ||
18 | /* We scan which devices are on the SBus using the PROM node device | 18 | /* We scan which devices are on the SBus using the PROM node device |
diff --git a/arch/sparc/include/asm/sbus_64.h b/arch/sparc/include/asm/sbus_64.h index 0e16b6dd7e96..b606c14343fb 100644 --- a/arch/sparc/include/asm/sbus_64.h +++ b/arch/sparc/include/asm/sbus_64.h | |||
@@ -8,10 +8,10 @@ | |||
8 | 8 | ||
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/of_device.h> | ||
11 | 12 | ||
12 | #include <asm/oplib.h> | 13 | #include <asm/oplib.h> |
13 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
14 | #include <asm/of_device.h> | ||
15 | #include <asm/iommu.h> | 15 | #include <asm/iommu.h> |
16 | #include <asm/scatterlist.h> | 16 | #include <asm/scatterlist.h> |
17 | 17 | ||
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 7201752cf934..a8180e546a48 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -50,27 +50,24 @@ struct seq_file; | |||
50 | void smp_bogo(struct seq_file *); | 50 | void smp_bogo(struct seq_file *); |
51 | void smp_info(struct seq_file *); | 51 | void smp_info(struct seq_file *); |
52 | 52 | ||
53 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) | 53 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) |
54 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) | 54 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) |
55 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) | 55 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) |
56 | BTFIXUPDEF_BLACKBOX(load_current) | 56 | BTFIXUPDEF_BLACKBOX(load_current) |
57 | 57 | ||
58 | #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) | 58 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) |
59 | 59 | ||
60 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } | 60 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, cpu_online_map, 0, 0, 0, 0); } |
61 | static inline void xc1(smpfunc_t func, unsigned long arg1) | 61 | static inline void xc1(smpfunc_t func, unsigned long arg1) |
62 | { smp_cross_call(func, arg1, 0, 0, 0, 0); } | 62 | { smp_cross_call(func, cpu_online_map, arg1, 0, 0, 0); } |
63 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) | 63 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) |
64 | { smp_cross_call(func, arg1, arg2, 0, 0, 0); } | 64 | { smp_cross_call(func, cpu_online_map, arg1, arg2, 0, 0); } |
65 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 65 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
66 | unsigned long arg3) | 66 | unsigned long arg3) |
67 | { smp_cross_call(func, arg1, arg2, arg3, 0, 0); } | 67 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, 0); } |
68 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 68 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
69 | unsigned long arg3, unsigned long arg4) | 69 | unsigned long arg3, unsigned long arg4) |
70 | { smp_cross_call(func, arg1, arg2, arg3, arg4, 0); } | 70 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, arg4); } |
71 | static inline void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, | ||
72 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | ||
73 | { smp_cross_call(func, arg1, arg2, arg3, arg4, arg5); } | ||
74 | 71 | ||
75 | static inline int smp_call_function(void (*func)(void *info), void *info, int wait) | 72 | static inline int smp_call_function(void (*func)(void *info), void *info, int wait) |
76 | { | 73 | { |
@@ -78,6 +75,14 @@ static inline int smp_call_function(void (*func)(void *info), void *info, int wa | |||
78 | return 0; | 75 | return 0; |
79 | } | 76 | } |
80 | 77 | ||
78 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | ||
79 | void *info, int wait) | ||
80 | { | ||
81 | smp_cross_call((smpfunc_t)func, cpumask_of_cpu(cpuid), | ||
82 | (unsigned long) info, 0, 0, 0); | ||
83 | return 0; | ||
84 | } | ||
85 | |||
81 | static inline int cpu_logical_map(int cpu) | 86 | static inline int cpu_logical_map(int cpu) |
82 | { | 87 | { |
83 | return cpu; | 88 | return cpu; |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 487960919f1f..2a8a847764d8 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -36,12 +36,12 @@ | |||
36 | #include <linux/pci.h> /* struct pci_dev */ | 36 | #include <linux/pci.h> /* struct pci_dev */ |
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/scatterlist.h> | 38 | #include <linux/scatterlist.h> |
39 | #include <linux/of_device.h> | ||
39 | 40 | ||
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
41 | #include <asm/vaddrs.h> | 42 | #include <asm/vaddrs.h> |
42 | #include <asm/oplib.h> | 43 | #include <asm/oplib.h> |
43 | #include <asm/prom.h> | 44 | #include <asm/prom.h> |
44 | #include <asm/of_device.h> | ||
45 | #include <asm/sbus.h> | 45 | #include <asm/sbus.h> |
46 | #include <asm/page.h> | 46 | #include <asm/page.h> |
47 | #include <asm/pgalloc.h> | 47 | #include <asm/pgalloc.h> |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index cc4c235c4f59..c481d45f97b7 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -70,7 +70,7 @@ struct of_bus { | |||
70 | int *addrc, int *sizec); | 70 | int *addrc, int *sizec); |
71 | int (*map)(u32 *addr, const u32 *range, | 71 | int (*map)(u32 *addr, const u32 *range, |
72 | int na, int ns, int pna); | 72 | int na, int ns, int pna); |
73 | unsigned int (*get_flags)(const u32 *addr); | 73 | unsigned long (*get_flags)(const u32 *addr, unsigned long); |
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* | 76 | /* |
@@ -130,8 +130,10 @@ static int of_bus_default_map(u32 *addr, const u32 *range, | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | static unsigned int of_bus_default_get_flags(const u32 *addr) | 133 | static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long flags) |
134 | { | 134 | { |
135 | if (flags) | ||
136 | return flags; | ||
135 | return IORESOURCE_MEM; | 137 | return IORESOURCE_MEM; |
136 | } | 138 | } |
137 | 139 | ||
@@ -194,17 +196,21 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, | |||
194 | return 0; | 196 | return 0; |
195 | } | 197 | } |
196 | 198 | ||
197 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | 199 | static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) |
198 | { | 200 | { |
199 | unsigned int flags = 0; | ||
200 | u32 w = addr[0]; | 201 | u32 w = addr[0]; |
201 | 202 | ||
203 | /* For PCI, we override whatever child busses may have used. */ | ||
204 | flags = 0; | ||
202 | switch((w >> 24) & 0x03) { | 205 | switch((w >> 24) & 0x03) { |
203 | case 0x01: | 206 | case 0x01: |
204 | flags |= IORESOURCE_IO; | 207 | flags |= IORESOURCE_IO; |
208 | break; | ||
209 | |||
205 | case 0x02: /* 32 bits */ | 210 | case 0x02: /* 32 bits */ |
206 | case 0x03: /* 64 bits */ | 211 | case 0x03: /* 64 bits */ |
207 | flags |= IORESOURCE_MEM; | 212 | flags |= IORESOURCE_MEM; |
213 | break; | ||
208 | } | 214 | } |
209 | if (w & 0x40000000) | 215 | if (w & 0x40000000) |
210 | flags |= IORESOURCE_PREFETCH; | 216 | flags |= IORESOURCE_PREFETCH; |
@@ -362,10 +368,11 @@ static void __init build_device_resources(struct of_device *op, | |||
362 | int pna, pns; | 368 | int pna, pns; |
363 | 369 | ||
364 | size = of_read_addr(reg + na, ns); | 370 | size = of_read_addr(reg + na, ns); |
365 | flags = bus->get_flags(reg); | ||
366 | 371 | ||
367 | memcpy(addr, reg, na * 4); | 372 | memcpy(addr, reg, na * 4); |
368 | 373 | ||
374 | flags = bus->get_flags(reg, 0); | ||
375 | |||
369 | /* If the immediate parent has no ranges property to apply, | 376 | /* If the immediate parent has no ranges property to apply, |
370 | * just use a 1<->1 mapping. | 377 | * just use a 1<->1 mapping. |
371 | */ | 378 | */ |
@@ -393,6 +400,8 @@ static void __init build_device_resources(struct of_device *op, | |||
393 | dna, dns, pna)) | 400 | dna, dns, pna)) |
394 | break; | 401 | break; |
395 | 402 | ||
403 | flags = pbus->get_flags(addr, flags); | ||
404 | |||
396 | dna = pna; | 405 | dna = pna; |
397 | dns = pns; | 406 | dns = pns; |
398 | dbus = pbus; | 407 | dbus = pbus; |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index dfde77ff0848..69596402a500 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -262,8 +262,9 @@ static struct smp_funcall { | |||
262 | static DEFINE_SPINLOCK(cross_call_lock); | 262 | static DEFINE_SPINLOCK(cross_call_lock); |
263 | 263 | ||
264 | /* Cross calls must be serialized, at least currently. */ | 264 | /* Cross calls must be serialized, at least currently. */ |
265 | void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 265 | static void smp4d_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, |
266 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 266 | unsigned long arg2, unsigned long arg3, |
267 | unsigned long arg4) | ||
267 | { | 268 | { |
268 | if(smp_processors_ready) { | 269 | if(smp_processors_ready) { |
269 | register int high = smp_highest_cpu; | 270 | register int high = smp_highest_cpu; |
@@ -278,7 +279,7 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
278 | register unsigned long a2 asm("i2") = arg2; | 279 | register unsigned long a2 asm("i2") = arg2; |
279 | register unsigned long a3 asm("i3") = arg3; | 280 | register unsigned long a3 asm("i3") = arg3; |
280 | register unsigned long a4 asm("i4") = arg4; | 281 | register unsigned long a4 asm("i4") = arg4; |
281 | register unsigned long a5 asm("i5") = arg5; | 282 | register unsigned long a5 asm("i5") = 0; |
282 | 283 | ||
283 | __asm__ __volatile__( | 284 | __asm__ __volatile__( |
284 | "std %0, [%6]\n\t" | 285 | "std %0, [%6]\n\t" |
@@ -290,11 +291,10 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
290 | 291 | ||
291 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 292 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
292 | { | 293 | { |
293 | cpumask_t mask; | ||
294 | register int i; | 294 | register int i; |
295 | 295 | ||
296 | mask = cpumask_of_cpu(hard_smp4d_processor_id()); | 296 | cpu_clear(smp_processor_id(), mask); |
297 | cpus_andnot(mask, cpu_online_map, mask); | 297 | cpus_and(mask, cpu_online_map, mask); |
298 | for(i = 0; i <= high; i++) { | 298 | for(i = 0; i <= high; i++) { |
299 | if (cpu_isset(i, mask)) { | 299 | if (cpu_isset(i, mask)) { |
300 | ccall_info.processors_in[i] = 0; | 300 | ccall_info.processors_in[i] = 0; |
@@ -309,12 +309,16 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
309 | 309 | ||
310 | i = 0; | 310 | i = 0; |
311 | do { | 311 | do { |
312 | if (!cpu_isset(i, mask)) | ||
313 | continue; | ||
312 | while(!ccall_info.processors_in[i]) | 314 | while(!ccall_info.processors_in[i]) |
313 | barrier(); | 315 | barrier(); |
314 | } while(++i <= high); | 316 | } while(++i <= high); |
315 | 317 | ||
316 | i = 0; | 318 | i = 0; |
317 | do { | 319 | do { |
320 | if (!cpu_isset(i, mask)) | ||
321 | continue; | ||
318 | while(!ccall_info.processors_out[i]) | 322 | while(!ccall_info.processors_out[i]) |
319 | barrier(); | 323 | barrier(); |
320 | } while(++i <= high); | 324 | } while(++i <= high); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 406ac1abc83a..a14a76ac7f36 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -244,9 +244,9 @@ static struct smp_funcall { | |||
244 | static DEFINE_SPINLOCK(cross_call_lock); | 244 | static DEFINE_SPINLOCK(cross_call_lock); |
245 | 245 | ||
246 | /* Cross calls must be serialized, at least currently. */ | 246 | /* Cross calls must be serialized, at least currently. */ |
247 | static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | 247 | static void smp4m_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, |
248 | unsigned long arg2, unsigned long arg3, | 248 | unsigned long arg2, unsigned long arg3, |
249 | unsigned long arg4, unsigned long arg5) | 249 | unsigned long arg4) |
250 | { | 250 | { |
251 | register int ncpus = SUN4M_NCPUS; | 251 | register int ncpus = SUN4M_NCPUS; |
252 | unsigned long flags; | 252 | unsigned long flags; |
@@ -259,14 +259,14 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
259 | ccall_info.arg2 = arg2; | 259 | ccall_info.arg2 = arg2; |
260 | ccall_info.arg3 = arg3; | 260 | ccall_info.arg3 = arg3; |
261 | ccall_info.arg4 = arg4; | 261 | ccall_info.arg4 = arg4; |
262 | ccall_info.arg5 = arg5; | 262 | ccall_info.arg5 = 0; |
263 | 263 | ||
264 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 264 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
265 | { | 265 | { |
266 | cpumask_t mask = cpu_online_map; | ||
267 | register int i; | 266 | register int i; |
268 | 267 | ||
269 | cpu_clear(smp_processor_id(), mask); | 268 | cpu_clear(smp_processor_id(), mask); |
269 | cpus_and(mask, cpu_online_map, mask); | ||
270 | for(i = 0; i < ncpus; i++) { | 270 | for(i = 0; i < ncpus; i++) { |
271 | if (cpu_isset(i, mask)) { | 271 | if (cpu_isset(i, mask)) { |
272 | ccall_info.processors_in[i] = 0; | 272 | ccall_info.processors_in[i] = 0; |
@@ -284,12 +284,16 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
284 | 284 | ||
285 | i = 0; | 285 | i = 0; |
286 | do { | 286 | do { |
287 | if (!cpu_isset(i, mask)) | ||
288 | continue; | ||
287 | while(!ccall_info.processors_in[i]) | 289 | while(!ccall_info.processors_in[i]) |
288 | barrier(); | 290 | barrier(); |
289 | } while(++i < ncpus); | 291 | } while(++i < ncpus); |
290 | 292 | ||
291 | i = 0; | 293 | i = 0; |
292 | do { | 294 | do { |
295 | if (!cpu_isset(i, mask)) | ||
296 | continue; | ||
293 | while(!ccall_info.processors_out[i]) | 297 | while(!ccall_info.processors_out[i]) |
294 | barrier(); | 298 | barrier(); |
295 | } while(++i < ncpus); | 299 | } while(++i < ncpus); |
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index ab3dd0b257d3..0762f5db1924 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/profile.h> | 30 | #include <linux/profile.h> |
31 | #include <linux/of_device.h> | ||
31 | 32 | ||
32 | #include <asm/oplib.h> | 33 | #include <asm/oplib.h> |
33 | #include <asm/timer.h> | 34 | #include <asm/timer.h> |
@@ -40,7 +41,6 @@ | |||
40 | #include <asm/sun4paddr.h> | 41 | #include <asm/sun4paddr.h> |
41 | #include <asm/page.h> | 42 | #include <asm/page.h> |
42 | #include <asm/pcic.h> | 43 | #include <asm/pcic.h> |
43 | #include <asm/of_device.h> | ||
44 | #include <asm/irq_regs.h> | 44 | #include <asm/irq_regs.h> |
45 | 45 | ||
46 | #include "irq.h" | 46 | #include "irq.h" |