diff options
Diffstat (limited to 'arch')
283 files changed, 2248 insertions, 2141 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 22ebfb2be0e4..1b704ee54bf3 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile | |||
@@ -108,20 +108,9 @@ $(boot)/vmlinux.gz: vmlinux | |||
108 | bootimage bootpfile bootpzfile: vmlinux | 108 | bootimage bootpfile bootpzfile: vmlinux |
109 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 109 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
110 | 110 | ||
111 | |||
112 | prepare: include/asm-$(ARCH)/asm_offsets.h | ||
113 | |||
114 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
115 | include/config/MARKER | ||
116 | |||
117 | include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
118 | $(call filechk,gen-asm-offsets) | ||
119 | |||
120 | archclean: | 111 | archclean: |
121 | $(Q)$(MAKE) $(clean)=$(boot) | 112 | $(Q)$(MAKE) $(clean)=$(boot) |
122 | 113 | ||
123 | CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h | ||
124 | |||
125 | define archhelp | 114 | define archhelp |
126 | echo '* boot - Compressed kernel image (arch/alpha/boot/vmlinux.gz)' | 115 | echo '* boot - Compressed kernel image (arch/alpha/boot/vmlinux.gz)' |
127 | echo ' bootimage - SRM bootable image (arch/alpha/boot/bootimage)' | 116 | echo ' bootimage - SRM bootable image (arch/alpha/boot/bootimage)' |
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index fc5ef90c4fc9..24ae9a366073 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
@@ -185,15 +185,6 @@ EXPORT_SYMBOL(smp_num_cpus); | |||
185 | EXPORT_SYMBOL(smp_call_function); | 185 | EXPORT_SYMBOL(smp_call_function); |
186 | EXPORT_SYMBOL(smp_call_function_on_cpu); | 186 | EXPORT_SYMBOL(smp_call_function_on_cpu); |
187 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 187 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
188 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
189 | EXPORT_SYMBOL(_raw_spin_unlock); | ||
190 | EXPORT_SYMBOL(debug_spin_lock); | ||
191 | EXPORT_SYMBOL(debug_spin_trylock); | ||
192 | #endif | ||
193 | #ifdef CONFIG_DEBUG_RWLOCK | ||
194 | EXPORT_SYMBOL(_raw_write_lock); | ||
195 | EXPORT_SYMBOL(_raw_read_lock); | ||
196 | #endif | ||
197 | EXPORT_SYMBOL(cpu_present_mask); | 188 | EXPORT_SYMBOL(cpu_present_mask); |
198 | #endif /* CONFIG_SMP */ | 189 | #endif /* CONFIG_SMP */ |
199 | 190 | ||
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index f0927ee53f29..76cc0cb5fc2e 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | 7 | #include <linux/config.h> |
8 | #include <asm/asm_offsets.h> | 8 | #include <asm/asm-offsets.h> |
9 | #include <asm/thread_info.h> | 9 | #include <asm/thread_info.h> |
10 | #include <asm/pal.h> | 10 | #include <asm/pal.h> |
11 | #include <asm/errno.h> | 11 | #include <asm/errno.h> |
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S index 4ca2e404708a..0905721fcbca 100644 --- a/arch/alpha/kernel/head.S +++ b/arch/alpha/kernel/head.S | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <asm/system.h> | 11 | #include <asm/system.h> |
12 | #include <asm/asm_offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | 13 | ||
14 | .globl swapper_pg_dir | 14 | .globl swapper_pg_dir |
15 | .globl _stext | 15 | .globl _stext |
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c index fc271e316a38..aac6d4b22f7a 100644 --- a/arch/alpha/kernel/module.c +++ b/arch/alpha/kernel/module.c | |||
@@ -47,7 +47,7 @@ module_free(struct module *mod, void *module_region) | |||
47 | 47 | ||
48 | struct got_entry { | 48 | struct got_entry { |
49 | struct got_entry *next; | 49 | struct got_entry *next; |
50 | Elf64_Addr r_offset; | 50 | Elf64_Sxword r_addend; |
51 | int got_offset; | 51 | int got_offset; |
52 | }; | 52 | }; |
53 | 53 | ||
@@ -57,14 +57,14 @@ process_reloc_for_got(Elf64_Rela *rela, | |||
57 | { | 57 | { |
58 | unsigned long r_sym = ELF64_R_SYM (rela->r_info); | 58 | unsigned long r_sym = ELF64_R_SYM (rela->r_info); |
59 | unsigned long r_type = ELF64_R_TYPE (rela->r_info); | 59 | unsigned long r_type = ELF64_R_TYPE (rela->r_info); |
60 | Elf64_Addr r_offset = rela->r_offset; | 60 | Elf64_Sxword r_addend = rela->r_addend; |
61 | struct got_entry *g; | 61 | struct got_entry *g; |
62 | 62 | ||
63 | if (r_type != R_ALPHA_LITERAL) | 63 | if (r_type != R_ALPHA_LITERAL) |
64 | return; | 64 | return; |
65 | 65 | ||
66 | for (g = chains + r_sym; g ; g = g->next) | 66 | for (g = chains + r_sym; g ; g = g->next) |
67 | if (g->r_offset == r_offset) { | 67 | if (g->r_addend == r_addend) { |
68 | if (g->got_offset == 0) { | 68 | if (g->got_offset == 0) { |
69 | g->got_offset = *poffset; | 69 | g->got_offset = *poffset; |
70 | *poffset += 8; | 70 | *poffset += 8; |
@@ -74,7 +74,7 @@ process_reloc_for_got(Elf64_Rela *rela, | |||
74 | 74 | ||
75 | g = kmalloc (sizeof (*g), GFP_KERNEL); | 75 | g = kmalloc (sizeof (*g), GFP_KERNEL); |
76 | g->next = chains[r_sym].next; | 76 | g->next = chains[r_sym].next; |
77 | g->r_offset = r_offset; | 77 | g->r_addend = r_addend; |
78 | g->got_offset = *poffset; | 78 | g->got_offset = *poffset; |
79 | *poffset += 8; | 79 | *poffset += 8; |
80 | chains[r_sym].next = g; | 80 | chains[r_sym].next = g; |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 167fd89f8707..0636116210d2 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -974,6 +974,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
974 | size_t size; | 974 | size_t size; |
975 | long timeout; | 975 | long timeout; |
976 | int ret = -EINVAL; | 976 | int ret = -EINVAL; |
977 | struct fdtable *fdt; | ||
977 | 978 | ||
978 | timeout = MAX_SCHEDULE_TIMEOUT; | 979 | timeout = MAX_SCHEDULE_TIMEOUT; |
979 | if (tvp) { | 980 | if (tvp) { |
@@ -995,7 +996,8 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
995 | } | 996 | } |
996 | } | 997 | } |
997 | 998 | ||
998 | if (n < 0 || n > current->files->max_fdset) | 999 | fdt = files_fdtable(current->files); |
1000 | if (n < 0 || n > fdt->max_fdset) | ||
999 | goto out_nofds; | 1001 | goto out_nofds; |
1000 | 1002 | ||
1001 | /* | 1003 | /* |
@@ -1152,8 +1154,7 @@ osf_usleep_thread(struct timeval32 __user *sleep, struct timeval32 __user *remai | |||
1152 | 1154 | ||
1153 | ticks = timeval_to_jiffies(&tmp); | 1155 | ticks = timeval_to_jiffies(&tmp); |
1154 | 1156 | ||
1155 | current->state = TASK_INTERRUPTIBLE; | 1157 | ticks = schedule_timeout_interruptible(ticks); |
1156 | ticks = schedule_timeout(ticks); | ||
1157 | 1158 | ||
1158 | if (remain) { | 1159 | if (remain) { |
1159 | jiffies_to_timeval(ticks, &tmp); | 1160 | jiffies_to_timeval(ticks, &tmp); |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index e211aa7404e6..da0be3465791 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -989,175 +989,3 @@ flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | |||
989 | 989 | ||
990 | preempt_enable(); | 990 | preempt_enable(); |
991 | } | 991 | } |
992 | |||
993 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
994 | void | ||
995 | _raw_spin_unlock(spinlock_t * lock) | ||
996 | { | ||
997 | mb(); | ||
998 | lock->lock = 0; | ||
999 | |||
1000 | lock->on_cpu = -1; | ||
1001 | lock->previous = NULL; | ||
1002 | lock->task = NULL; | ||
1003 | lock->base_file = "none"; | ||
1004 | lock->line_no = 0; | ||
1005 | } | ||
1006 | |||
1007 | void | ||
1008 | debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no) | ||
1009 | { | ||
1010 | long tmp; | ||
1011 | long stuck; | ||
1012 | void *inline_pc = __builtin_return_address(0); | ||
1013 | unsigned long started = jiffies; | ||
1014 | int printed = 0; | ||
1015 | int cpu = smp_processor_id(); | ||
1016 | |||
1017 | stuck = 1L << 30; | ||
1018 | try_again: | ||
1019 | |||
1020 | /* Use sub-sections to put the actual loop at the end | ||
1021 | of this object file's text section so as to perfect | ||
1022 | branch prediction. */ | ||
1023 | __asm__ __volatile__( | ||
1024 | "1: ldl_l %0,%1\n" | ||
1025 | " subq %2,1,%2\n" | ||
1026 | " blbs %0,2f\n" | ||
1027 | " or %0,1,%0\n" | ||
1028 | " stl_c %0,%1\n" | ||
1029 | " beq %0,3f\n" | ||
1030 | "4: mb\n" | ||
1031 | ".subsection 2\n" | ||
1032 | "2: ldl %0,%1\n" | ||
1033 | " subq %2,1,%2\n" | ||
1034 | "3: blt %2,4b\n" | ||
1035 | " blbs %0,2b\n" | ||
1036 | " br 1b\n" | ||
1037 | ".previous" | ||
1038 | : "=r" (tmp), "=m" (lock->lock), "=r" (stuck) | ||
1039 | : "m" (lock->lock), "2" (stuck) : "memory"); | ||
1040 | |||
1041 | if (stuck < 0) { | ||
1042 | printk(KERN_WARNING | ||
1043 | "%s:%d spinlock stuck in %s at %p(%d)" | ||
1044 | " owner %s at %p(%d) %s:%d\n", | ||
1045 | base_file, line_no, | ||
1046 | current->comm, inline_pc, cpu, | ||
1047 | lock->task->comm, lock->previous, | ||
1048 | lock->on_cpu, lock->base_file, lock->line_no); | ||
1049 | stuck = 1L << 36; | ||
1050 | printed = 1; | ||
1051 | goto try_again; | ||
1052 | } | ||
1053 | |||
1054 | /* Exiting. Got the lock. */ | ||
1055 | lock->on_cpu = cpu; | ||
1056 | lock->previous = inline_pc; | ||
1057 | lock->task = current; | ||
1058 | lock->base_file = base_file; | ||
1059 | lock->line_no = line_no; | ||
1060 | |||
1061 | if (printed) { | ||
1062 | printk(KERN_WARNING | ||
1063 | "%s:%d spinlock grabbed in %s at %p(%d) %ld ticks\n", | ||
1064 | base_file, line_no, current->comm, inline_pc, | ||
1065 | cpu, jiffies - started); | ||
1066 | } | ||
1067 | } | ||
1068 | |||
1069 | int | ||
1070 | debug_spin_trylock(spinlock_t * lock, const char *base_file, int line_no) | ||
1071 | { | ||
1072 | int ret; | ||
1073 | if ((ret = !test_and_set_bit(0, lock))) { | ||
1074 | lock->on_cpu = smp_processor_id(); | ||
1075 | lock->previous = __builtin_return_address(0); | ||
1076 | lock->task = current; | ||
1077 | } else { | ||
1078 | lock->base_file = base_file; | ||
1079 | lock->line_no = line_no; | ||
1080 | } | ||
1081 | return ret; | ||
1082 | } | ||
1083 | #endif /* CONFIG_DEBUG_SPINLOCK */ | ||
1084 | |||
1085 | #ifdef CONFIG_DEBUG_RWLOCK | ||
1086 | void _raw_write_lock(rwlock_t * lock) | ||
1087 | { | ||
1088 | long regx, regy; | ||
1089 | int stuck_lock, stuck_reader; | ||
1090 | void *inline_pc = __builtin_return_address(0); | ||
1091 | |||
1092 | try_again: | ||
1093 | |||
1094 | stuck_lock = 1<<30; | ||
1095 | stuck_reader = 1<<30; | ||
1096 | |||
1097 | __asm__ __volatile__( | ||
1098 | "1: ldl_l %1,%0\n" | ||
1099 | " blbs %1,6f\n" | ||
1100 | " blt %1,8f\n" | ||
1101 | " mov 1,%1\n" | ||
1102 | " stl_c %1,%0\n" | ||
1103 | " beq %1,6f\n" | ||
1104 | "4: mb\n" | ||
1105 | ".subsection 2\n" | ||
1106 | "6: blt %3,4b # debug\n" | ||
1107 | " subl %3,1,%3 # debug\n" | ||
1108 | " ldl %1,%0\n" | ||
1109 | " blbs %1,6b\n" | ||
1110 | "8: blt %4,4b # debug\n" | ||
1111 | " subl %4,1,%4 # debug\n" | ||
1112 | " ldl %1,%0\n" | ||
1113 | " blt %1,8b\n" | ||
1114 | " br 1b\n" | ||
1115 | ".previous" | ||
1116 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy), | ||
1117 | "=&r" (stuck_lock), "=&r" (stuck_reader) | ||
1118 | : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); | ||
1119 | |||
1120 | if (stuck_lock < 0) { | ||
1121 | printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc); | ||
1122 | goto try_again; | ||
1123 | } | ||
1124 | if (stuck_reader < 0) { | ||
1125 | printk(KERN_WARNING "write_lock stuck on readers at %p\n", | ||
1126 | inline_pc); | ||
1127 | goto try_again; | ||
1128 | } | ||
1129 | } | ||
1130 | |||
1131 | void _raw_read_lock(rwlock_t * lock) | ||
1132 | { | ||
1133 | long regx; | ||
1134 | int stuck_lock; | ||
1135 | void *inline_pc = __builtin_return_address(0); | ||
1136 | |||
1137 | try_again: | ||
1138 | |||
1139 | stuck_lock = 1<<30; | ||
1140 | |||
1141 | __asm__ __volatile__( | ||
1142 | "1: ldl_l %1,%0;" | ||
1143 | " blbs %1,6f;" | ||
1144 | " subl %1,2,%1;" | ||
1145 | " stl_c %1,%0;" | ||
1146 | " beq %1,6f;" | ||
1147 | "4: mb\n" | ||
1148 | ".subsection 2\n" | ||
1149 | "6: ldl %1,%0;" | ||
1150 | " blt %2,4b # debug\n" | ||
1151 | " subl %2,1,%2 # debug\n" | ||
1152 | " blbs %1,6b;" | ||
1153 | " br 1b\n" | ||
1154 | ".previous" | ||
1155 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock) | ||
1156 | : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); | ||
1157 | |||
1158 | if (stuck_lock < 0) { | ||
1159 | printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc); | ||
1160 | goto try_again; | ||
1161 | } | ||
1162 | } | ||
1163 | #endif /* CONFIG_DEBUG_RWLOCK */ | ||
diff --git a/arch/alpha/lib/dbg_stackcheck.S b/arch/alpha/lib/dbg_stackcheck.S index cc5ce3a5fcad..3c1f3e6522e5 100644 --- a/arch/alpha/lib/dbg_stackcheck.S +++ b/arch/alpha/lib/dbg_stackcheck.S | |||
@@ -5,7 +5,7 @@ | |||
5 | * Verify that we have not overflowed the stack. Oops if we have. | 5 | * Verify that we have not overflowed the stack. Oops if we have. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <asm/asm_offsets.h> | 8 | #include <asm/asm-offsets.h> |
9 | 9 | ||
10 | .text | 10 | .text |
11 | .set noat | 11 | .set noat |
diff --git a/arch/alpha/lib/dbg_stackkill.S b/arch/alpha/lib/dbg_stackkill.S index e09f2ae1e09e..e9f6a9dcf2b7 100644 --- a/arch/alpha/lib/dbg_stackkill.S +++ b/arch/alpha/lib/dbg_stackkill.S | |||
@@ -6,7 +6,7 @@ | |||
6 | * uninitialized local variables in the act. | 6 | * uninitialized local variables in the act. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/asm_offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | 10 | ||
11 | .text | 11 | .text |
12 | .set noat | 12 | .set noat |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0f2899b4159d..11fff042aa81 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -326,8 +326,8 @@ config SMP | |||
326 | processor machines. On a single processor machine, the kernel will | 326 | processor machines. On a single processor machine, the kernel will |
327 | run faster if you say N here. | 327 | run faster if you say N here. |
328 | 328 | ||
329 | See also the <file:Documentation/smp.tex>, | 329 | See also the <file:Documentation/smp.txt>, |
330 | <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>, | 330 | <file:Documentation/i386/IO-APIC.txt>, |
331 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at | 331 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at |
332 | <http://www.linuxdoc.org/docs.html#howto>. | 332 | <http://www.linuxdoc.org/docs.html#howto>. |
333 | 333 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 67f1453ade05..e625ac66f49b 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -178,7 +178,7 @@ endif | |||
178 | prepare: maketools include/asm-arm/.arch | 178 | prepare: maketools include/asm-arm/.arch |
179 | 179 | ||
180 | .PHONY: maketools FORCE | 180 | .PHONY: maketools FORCE |
181 | maketools: include/asm-arm/constants.h include/linux/version.h FORCE | 181 | maketools: include/linux/version.h FORCE |
182 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h | 182 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h |
183 | 183 | ||
184 | # Convert bzImage to zImage | 184 | # Convert bzImage to zImage |
@@ -190,7 +190,7 @@ zImage Image xipImage bootpImage uImage: vmlinux | |||
190 | zinstall install: vmlinux | 190 | zinstall install: vmlinux |
191 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 191 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
192 | 192 | ||
193 | CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \ | 193 | CLEAN_FILES += include/asm-arm/mach-types.h \ |
194 | include/asm-arm/arch include/asm-arm/.arch | 194 | include/asm-arm/arch include/asm-arm/.arch |
195 | 195 | ||
196 | # We use MRPROPER_FILES and CLEAN_FILES now | 196 | # We use MRPROPER_FILES and CLEAN_FILES now |
@@ -201,11 +201,6 @@ archclean: | |||
201 | bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage | 201 | bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage |
202 | i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 202 | i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
203 | 203 | ||
204 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
205 | include/asm-arm/.arch | ||
206 | |||
207 | include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
208 | $(call filechk,gen-asm-offsets) | ||
209 | 204 | ||
210 | define archhelp | 205 | define archhelp |
211 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 206 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index afef21273963..648cfff93138 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/linkage.h> | 3 | #include <linux/linkage.h> |
4 | 4 | ||
5 | #include <asm/assembler.h> | 5 | #include <asm/assembler.h> |
6 | #include <asm/constants.h> | 6 | #include <asm/asm-offsets.h> |
7 | #include <asm/errno.h> | 7 | #include <asm/errno.h> |
8 | #include <asm/thread_info.h> | 8 | #include <asm/thread_info.h> |
9 | 9 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 1155cf07c871..539626351348 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/procinfo.h> | 21 | #include <asm/procinfo.h> |
22 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
23 | #include <asm/constants.h> | 23 | #include <asm/asm-offsets.h> |
24 | #include <asm/thread_info.h> | 24 | #include <asm/thread_info.h> |
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | 26 | ||
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index 8f74e24536ba..24c7b0477a09 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/constants.h> | 20 | #include <asm/asm-offsets.h> |
21 | 21 | ||
22 | #define MMX_WR0 (0x00) | 22 | #define MMX_WR0 (0x00) |
23 | #define MMX_WR1 (0x08) | 23 | #define MMX_WR1 (0x08) |
diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S index 4c38abdbe497..68117968482b 100644 --- a/arch/arm/lib/copy_page.S +++ b/arch/arm/lib/copy_page.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
14 | #include <asm/constants.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | #define COPY_COUNT (PAGE_SZ/64 PLD( -1 )) | 16 | #define COPY_COUNT (PAGE_SZ/64 PLD( -1 )) |
17 | 17 | ||
diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S index 46a2dc962e9d..333bca292de9 100644 --- a/arch/arm/lib/csumpartialcopyuser.S +++ b/arch/arm/lib/csumpartialcopyuser.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
15 | #include <asm/errno.h> | 15 | #include <asm/errno.h> |
16 | #include <asm/constants.h> | 16 | #include <asm/asm-offsets.h> |
17 | 17 | ||
18 | .text | 18 | .text |
19 | 19 | ||
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 64aa6f4fe5e4..d204018070a4 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
@@ -26,7 +26,7 @@ | |||
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. |
27 | * Note also that it is intended that __get_user_bad is not global. | 27 | * Note also that it is intended that __get_user_bad is not global. |
28 | */ | 28 | */ |
29 | #include <asm/constants.h> | 29 | #include <asm/asm-offsets.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | 32 | ||
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index b09398d95aac..4593e9c07f05 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S | |||
@@ -26,7 +26,7 @@ | |||
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 |
27 | * Note also that it is intended that __put_user_bad is not global. | 27 | * Note also that it is intended that __put_user_bad is not global. |
28 | */ | 28 | */ |
29 | #include <asm/constants.h> | 29 | #include <asm/asm-offsets.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | 32 | ||
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index 8ccffba0018f..366a9bde3d8b 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/arch/corgi.h> | 22 | #include <asm/arch/corgi.h> |
23 | #include <asm/arch/pxa-regs.h> | 23 | #include <asm/arch/pxa-regs.h> |
24 | 24 | ||
25 | static spinlock_t corgi_ssp_lock = SPIN_LOCK_UNLOCKED; | 25 | static DEFINE_SPINLOCK(corgi_ssp_lock); |
26 | static struct ssp_dev corgi_ssp_dev; | 26 | static struct ssp_dev corgi_ssp_dev; |
27 | static struct ssp_state corgi_ssp_state; | 27 | static struct ssp_state corgi_ssp_state; |
28 | 28 | ||
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index 4664bd11adc1..0077937a7ab8 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | #include <asm/mach/irq.h> | 31 | #include <asm/mach/irq.h> |
32 | 32 | #include <asm/arch/fb.h> | |
33 | #include <asm/hardware.h> | 33 | #include <asm/hardware.h> |
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -103,6 +103,15 @@ struct platform_device s3c_device_lcd = { | |||
103 | 103 | ||
104 | EXPORT_SYMBOL(s3c_device_lcd); | 104 | EXPORT_SYMBOL(s3c_device_lcd); |
105 | 105 | ||
106 | static struct s3c2410fb_mach_info s3c2410fb_info; | ||
107 | |||
108 | void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info) | ||
109 | { | ||
110 | memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info)); | ||
111 | s3c_device_lcd.dev.platform_data = &s3c2410fb_info; | ||
112 | } | ||
113 | EXPORT_SYMBOL(set_s3c2410fb_info); | ||
114 | |||
106 | /* NAND Controller */ | 115 | /* NAND Controller */ |
107 | 116 | ||
108 | static struct resource s3c_nand_resource[] = { | 117 | static struct resource s3c_nand_resource[] = { |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index ea4fb1a97a50..6ff1889fbd21 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -45,6 +45,9 @@ | |||
45 | 45 | ||
46 | //#include <asm/debug-ll.h> | 46 | //#include <asm/debug-ll.h> |
47 | #include <asm/arch/regs-serial.h> | 47 | #include <asm/arch/regs-serial.h> |
48 | #include <asm/arch/regs-lcd.h> | ||
49 | |||
50 | #include <asm/arch/fb.h> | ||
48 | 51 | ||
49 | #include <linux/serial_core.h> | 52 | #include <linux/serial_core.h> |
50 | 53 | ||
@@ -88,6 +91,48 @@ static struct s3c2410_uartcfg h1940_uartcfgs[] = { | |||
88 | 91 | ||
89 | 92 | ||
90 | 93 | ||
94 | /** | ||
95 | * Set lcd on or off | ||
96 | **/ | ||
97 | static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = { | ||
98 | .fixed_syncs= 1, | ||
99 | .regs={ | ||
100 | .lcdcon1= S3C2410_LCDCON1_TFT16BPP | \ | ||
101 | S3C2410_LCDCON1_TFT | \ | ||
102 | S3C2410_LCDCON1_CLKVAL(0x0C), | ||
103 | |||
104 | .lcdcon2= S3C2410_LCDCON2_VBPD(7) | \ | ||
105 | S3C2410_LCDCON2_LINEVAL(319) | \ | ||
106 | S3C2410_LCDCON2_VFPD(6) | \ | ||
107 | S3C2410_LCDCON2_VSPW(0), | ||
108 | |||
109 | .lcdcon3= S3C2410_LCDCON3_HBPD(19) | \ | ||
110 | S3C2410_LCDCON3_HOZVAL(239) | \ | ||
111 | S3C2410_LCDCON3_HFPD(7), | ||
112 | |||
113 | .lcdcon4= S3C2410_LCDCON4_MVAL(0) | \ | ||
114 | S3C2410_LCDCON4_HSPW(3), | ||
115 | |||
116 | .lcdcon5= S3C2410_LCDCON5_FRM565 | \ | ||
117 | S3C2410_LCDCON5_INVVLINE | \ | ||
118 | S3C2410_LCDCON5_HWSWP, | ||
119 | }, | ||
120 | .lpcsel= 0x02, | ||
121 | .gpccon= 0xaa940659, | ||
122 | .gpccon_mask= 0xffffffff, | ||
123 | .gpcup= 0x0000ffff, | ||
124 | .gpcup_mask= 0xffffffff, | ||
125 | .gpdcon= 0xaa84aaa0, | ||
126 | .gpdcon_mask= 0xffffffff, | ||
127 | .gpdup= 0x0000faff, | ||
128 | .gpdup_mask= 0xffffffff, | ||
129 | |||
130 | .width= 240, | ||
131 | .height= 320, | ||
132 | .xres= {240,240,240}, | ||
133 | .yres= {320,320,320}, | ||
134 | .bpp= {16,16,16}, | ||
135 | }; | ||
91 | 136 | ||
92 | static struct platform_device *h1940_devices[] __initdata = { | 137 | static struct platform_device *h1940_devices[] __initdata = { |
93 | &s3c_device_usb, | 138 | &s3c_device_usb, |
@@ -116,6 +161,11 @@ void __init h1940_init_irq(void) | |||
116 | 161 | ||
117 | } | 162 | } |
118 | 163 | ||
164 | void __init h1940_init(void) | ||
165 | { | ||
166 | set_s3c2410fb_info(&h1940_lcdcfg); | ||
167 | } | ||
168 | |||
119 | MACHINE_START(H1940, "IPAQ-H1940") | 169 | MACHINE_START(H1940, "IPAQ-H1940") |
120 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 170 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
121 | .phys_ram = S3C2410_SDRAM_PA, | 171 | .phys_ram = S3C2410_SDRAM_PA, |
@@ -124,5 +174,6 @@ MACHINE_START(H1940, "IPAQ-H1940") | |||
124 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 174 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
125 | .map_io = h1940_map_io, | 175 | .map_io = h1940_map_io, |
126 | .init_irq = h1940_init_irq, | 176 | .init_irq = h1940_init_irq, |
177 | .init_machine = h1940_init, | ||
127 | .timer = &s3c24xx_timer, | 178 | .timer = &s3c24xx_timer, |
128 | MACHINE_END | 179 | MACHINE_END |
diff --git a/arch/arm/mm/copypage-v3.S b/arch/arm/mm/copypage-v3.S index 4940f1908316..3c58ebbf0359 100644 --- a/arch/arm/mm/copypage-v3.S +++ b/arch/arm/mm/copypage-v3.S | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
15 | #include <asm/constants.h> | 15 | #include <asm/asm-offsets.h> |
16 | 16 | ||
17 | .text | 17 | .text |
18 | .align 5 | 18 | .align 5 |
diff --git a/arch/arm/mm/copypage-v4wb.S b/arch/arm/mm/copypage-v4wb.S index b94c345ceb94..83117354b1cd 100644 --- a/arch/arm/mm/copypage-v4wb.S +++ b/arch/arm/mm/copypage-v4wb.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/constants.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | .text | 16 | .text |
17 | .align 5 | 17 | .align 5 |
diff --git a/arch/arm/mm/copypage-v4wt.S b/arch/arm/mm/copypage-v4wt.S index 976793937a93..e1f2af28d549 100644 --- a/arch/arm/mm/copypage-v4wt.S +++ b/arch/arm/mm/copypage-v4wt.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/constants.h> | 17 | #include <asm/asm-offsets.h> |
18 | 18 | ||
19 | .text | 19 | .text |
20 | .align 5 | 20 | .align 5 |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 5c0ae5260d1c..1d739d282a45 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <asm/assembler.h> | 30 | #include <asm/assembler.h> |
31 | #include <asm/constants.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
33 | #include <asm/procinfo.h> | 33 | #include <asm/procinfo.h> |
34 | #include <asm/ptrace.h> | 34 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index d69389c4d4ba..9b725665b5c7 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <asm/assembler.h> | 30 | #include <asm/assembler.h> |
31 | #include <asm/constants.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
33 | #include <asm/procinfo.h> | 33 | #include <asm/procinfo.h> |
34 | #include <asm/ptrace.h> | 34 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 747ed963e1df..37b70fa21c76 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/config.h> | 17 | #include <linux/config.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <asm/assembler.h> | 19 | #include <asm/assembler.h> |
20 | #include <asm/constants.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | #include <asm/procinfo.h> | 22 | #include <asm/procinfo.h> |
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 248110c9cf13..931b690d1be2 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/config.h> | 17 | #include <linux/config.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <asm/assembler.h> | 19 | #include <asm/assembler.h> |
20 | #include <asm/constants.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | #include <asm/procinfo.h> | 22 | #include <asm/procinfo.h> |
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 189ef6a71ba1..d0f1bbb48f6c 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
16 | #include <asm/constants.h> | 16 | #include <asm/asm-offsets.h> |
17 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
18 | #include <asm/procinfo.h> | 18 | #include <asm/procinfo.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 57cfa6a2f54f..c69c9de32391 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <asm/assembler.h> | 35 | #include <asm/assembler.h> |
36 | #include <asm/constants.h> | 36 | #include <asm/asm-offsets.h> |
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/procinfo.h> | 38 | #include <asm/procinfo.h> |
39 | #include <asm/ptrace.h> | 39 | #include <asm/ptrace.h> |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 9137fe563599..7cfc2604a1ee 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -4,7 +4,7 @@ | |||
4 | * VMA_VM_FLAGS | 4 | * VMA_VM_FLAGS |
5 | * VM_EXEC | 5 | * VM_EXEC |
6 | */ | 6 | */ |
7 | #include <asm/constants.h> | 7 | #include <asm/asm-offsets.h> |
8 | #include <asm/thread_info.h> | 8 | #include <asm/thread_info.h> |
9 | 9 | ||
10 | /* | 10 | /* |
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index 360cae905692..34f7e7d3f419 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/assembler.h> | 17 | #include <asm/assembler.h> |
18 | #include <asm/constants.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/procinfo.h> | 19 | #include <asm/procinfo.h> |
20 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index d447cd5f3dd9..ca14f80d5ab4 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/linkage.h> | 20 | #include <linux/linkage.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <asm/assembler.h> | 22 | #include <asm/assembler.h> |
23 | #include <asm/constants.h> | 23 | #include <asm/asm-offsets.h> |
24 | #include <asm/procinfo.h> | 24 | #include <asm/procinfo.h> |
25 | #include <asm/hardware.h> | 25 | #include <asm/hardware.h> |
26 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 139a38670c5d..eb34823c9dbf 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
14 | #include <asm/constants.h> | 14 | #include <asm/asm-offsets.h> |
15 | #include <asm/procinfo.h> | 15 | #include <asm/procinfo.h> |
16 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
17 | 17 | ||
diff --git a/arch/arm/mm/tlb-v3.S b/arch/arm/mm/tlb-v3.S index 44b0daeaff9b..c10786ec8e0a 100644 --- a/arch/arm/mm/tlb-v3.S +++ b/arch/arm/mm/tlb-v3.S | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <asm/constants.h> | 16 | #include <asm/asm-offsets.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | #include "proc-macros.S" | 18 | #include "proc-macros.S" |
19 | 19 | ||
diff --git a/arch/arm/mm/tlb-v4.S b/arch/arm/mm/tlb-v4.S index db82ee468248..d6c94457c2b9 100644 --- a/arch/arm/mm/tlb-v4.S +++ b/arch/arm/mm/tlb-v4.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/constants.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
19 | #include "proc-macros.S" | 19 | #include "proc-macros.S" |
20 | 20 | ||
diff --git a/arch/arm/mm/tlb-v4wb.S b/arch/arm/mm/tlb-v4wb.S index 7908d5f1f130..cb829ca7845d 100644 --- a/arch/arm/mm/tlb-v4wb.S +++ b/arch/arm/mm/tlb-v4wb.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/constants.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
19 | #include "proc-macros.S" | 19 | #include "proc-macros.S" |
20 | 20 | ||
diff --git a/arch/arm/mm/tlb-v4wbi.S b/arch/arm/mm/tlb-v4wbi.S index efbe94bbe1a7..60cfc4a25dd5 100644 --- a/arch/arm/mm/tlb-v4wbi.S +++ b/arch/arm/mm/tlb-v4wbi.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/constants.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
19 | #include "proc-macros.S" | 19 | #include "proc-macros.S" |
20 | 20 | ||
diff --git a/arch/arm/mm/tlb-v6.S b/arch/arm/mm/tlb-v6.S index 99ed26e78adf..6f76b89ef46e 100644 --- a/arch/arm/mm/tlb-v6.S +++ b/arch/arm/mm/tlb-v6.S | |||
@@ -11,7 +11,7 @@ | |||
11 | * These assume a split I/D TLB. | 11 | * These assume a split I/D TLB. |
12 | */ | 12 | */ |
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <asm/constants.h> | 14 | #include <asm/asm-offsets.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
17 | #include "proc-macros.S" | 17 | #include "proc-macros.S" |
diff --git a/arch/arm/nwfpe/entry26.S b/arch/arm/nwfpe/entry26.S index 0ed38b0913db..51940a96d6a6 100644 --- a/arch/arm/nwfpe/entry26.S +++ b/arch/arm/nwfpe/entry26.S | |||
@@ -20,7 +20,7 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <asm/constants.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | /* This is the kernel's entry point into the floating point emulator. | 25 | /* This is the kernel's entry point into the floating point emulator. |
26 | It is called from the kernel with code similar to this: | 26 | It is called from the kernel with code similar to this: |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index e73c8deca592..6f17187ab32a 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <asm/constants.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/vfpmacros.h> | 21 | #include <asm/vfpmacros.h> |
22 | 22 | ||
23 | .globl do_vfp | 23 | .globl do_vfp |
diff --git a/arch/arm26/Makefile b/arch/arm26/Makefile index e9cb8ef4f3fb..844a9e46886e 100644 --- a/arch/arm26/Makefile +++ b/arch/arm26/Makefile | |||
@@ -49,10 +49,6 @@ all: zImage | |||
49 | 49 | ||
50 | boot := arch/arm26/boot | 50 | boot := arch/arm26/boot |
51 | 51 | ||
52 | prepare: include/asm-$(ARCH)/asm_offsets.h | ||
53 | CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h | ||
54 | |||
55 | |||
56 | .PHONY: maketools FORCE | 52 | .PHONY: maketools FORCE |
57 | maketools: FORCE | 53 | maketools: FORCE |
58 | 54 | ||
@@ -94,12 +90,6 @@ zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall | |||
94 | fi; \ | 90 | fi; \ |
95 | ) | 91 | ) |
96 | 92 | ||
97 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
98 | include/config/MARKER | ||
99 | |||
100 | include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
101 | $(call filechk,gen-asm-offsets) | ||
102 | |||
103 | define archhelp | 93 | define archhelp |
104 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 94 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' |
105 | echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' | 95 | echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' |
diff --git a/arch/arm26/kernel/entry.S b/arch/arm26/kernel/entry.S index a231dd88d0e1..6d910ea43d34 100644 --- a/arch/arm26/kernel/entry.S +++ b/arch/arm26/kernel/entry.S | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | 11 | ||
12 | #include <asm/assembler.h> | 12 | #include <asm/assembler.h> |
13 | #include <asm/asm_offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/errno.h> | 14 | #include <asm/errno.h> |
15 | #include <asm/hardware.h> | 15 | #include <asm/hardware.h> |
16 | #include <asm/sysirq.h> | 16 | #include <asm/sysirq.h> |
diff --git a/arch/arm26/lib/copy_page.S b/arch/arm26/lib/copy_page.S index 2d79ee12ea1f..c7511a2739d3 100644 --- a/arch/arm26/lib/copy_page.S +++ b/arch/arm26/lib/copy_page.S | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
14 | #include <asm/asm_offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | .text | 16 | .text |
17 | .align 5 | 17 | .align 5 |
diff --git a/arch/arm26/lib/csumpartialcopyuser.S b/arch/arm26/lib/csumpartialcopyuser.S index 5b821188e479..261dd154c1a4 100644 --- a/arch/arm26/lib/csumpartialcopyuser.S +++ b/arch/arm26/lib/csumpartialcopyuser.S | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | #include <asm/assembler.h> | 12 | #include <asm/assembler.h> |
13 | #include <asm/errno.h> | 13 | #include <asm/errno.h> |
14 | #include <asm/asm_offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | .text | 16 | .text |
17 | 17 | ||
diff --git a/arch/arm26/lib/getuser.S b/arch/arm26/lib/getuser.S index e6d59b334851..2b1de7fbfe1f 100644 --- a/arch/arm26/lib/getuser.S +++ b/arch/arm26/lib/getuser.S | |||
@@ -26,7 +26,7 @@ | |||
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000. |
27 | * Note also that it is intended that __get_user_bad is not global. | 27 | * Note also that it is intended that __get_user_bad is not global. |
28 | */ | 28 | */ |
29 | #include <asm/asm_offsets.h> | 29 | #include <asm/asm-offsets.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | 32 | ||
diff --git a/arch/arm26/lib/putuser.S b/arch/arm26/lib/putuser.S index 87588cbe46ae..46c7f15f9f2d 100644 --- a/arch/arm26/lib/putuser.S +++ b/arch/arm26/lib/putuser.S | |||
@@ -26,7 +26,7 @@ | |||
26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 | 26 | * Note that ADDR_LIMIT is either 0 or 0xc0000000 |
27 | * Note also that it is intended that __put_user_bad is not global. | 27 | * Note also that it is intended that __put_user_bad is not global. |
28 | */ | 28 | */ |
29 | #include <asm/asm_offsets.h> | 29 | #include <asm/asm-offsets.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | 32 | ||
diff --git a/arch/arm26/mm/proc-funcs.S b/arch/arm26/mm/proc-funcs.S index c3d4cd3f457e..f9fca524c57a 100644 --- a/arch/arm26/mm/proc-funcs.S +++ b/arch/arm26/mm/proc-funcs.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <asm/assembler.h> | 16 | #include <asm/assembler.h> |
17 | #include <asm/asm_offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/procinfo.h> | 18 | #include <asm/procinfo.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | 20 | ||
diff --git a/arch/arm26/nwfpe/entry.S b/arch/arm26/nwfpe/entry.S index 7d6dfaad80c2..e6312000d9f8 100644 --- a/arch/arm26/nwfpe/entry.S +++ b/arch/arm26/nwfpe/entry.S | |||
@@ -20,7 +20,7 @@ | |||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <asm/asm_offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | /* This is the kernel's entry point into the floating point emulator. | 25 | /* This is the kernel's entry point into the floating point emulator. |
26 | It is called from the kernel with code similar to this: | 26 | It is called from the kernel with code similar to this: |
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index 90ca8730b120..a00043a91f16 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -107,8 +107,7 @@ archclean: | |||
107 | rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img | 107 | rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img |
108 | rm -rf $(LD_SCRIPT).tmp | 108 | rm -rf $(LD_SCRIPT).tmp |
109 | 109 | ||
110 | prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch \ | 110 | prepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch |
111 | include/asm-$(ARCH)/$(SARCH)/offset.h | ||
112 | 111 | ||
113 | # Create some links to make all tools happy | 112 | # Create some links to make all tools happy |
114 | $(SRC_ARCH)/.links: | 113 | $(SRC_ARCH)/.links: |
@@ -120,6 +119,7 @@ $(SRC_ARCH)/.links: | |||
120 | @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib | 119 | @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib |
121 | @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch | 120 | @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch |
122 | @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S | 121 | @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S |
122 | @ln -sfn $(SRC_ARCH)/$(SARCH)/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c | ||
123 | @touch $@ | 123 | @touch $@ |
124 | 124 | ||
125 | # Create link to sub arch includes | 125 | # Create link to sub arch includes |
@@ -128,9 +128,3 @@ $(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) | |||
128 | @rm -f include/asm-$(ARCH)/arch | 128 | @rm -f include/asm-$(ARCH)/arch |
129 | @ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch | 129 | @ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch |
130 | @touch $@ | 130 | @touch $@ |
131 | |||
132 | arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
133 | include/config/MARKER | ||
134 | |||
135 | include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s | ||
136 | $(call filechk,gen-asm-offsets) | ||
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index c0163bf94a50..c808005e8457 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -270,7 +270,7 @@ | |||
270 | #include <asm/arch/sv_addr_ag.h> | 270 | #include <asm/arch/sv_addr_ag.h> |
271 | #include <asm/errno.h> | 271 | #include <asm/errno.h> |
272 | #include <asm/thread_info.h> | 272 | #include <asm/thread_info.h> |
273 | #include <asm/arch/offset.h> | 273 | #include <asm/asm-offsets.h> |
274 | #include <asm/page.h> | 274 | #include <asm/page.h> |
275 | #include <asm/pgtable.h> | 275 | #include <asm/pgtable.h> |
276 | 276 | ||
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index a8ed55e5b403..3bd8503fec68 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/unistd.h> | 23 | #include <asm/unistd.h> |
24 | #include <asm/errno.h> | 24 | #include <asm/errno.h> |
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | #include <asm/arch/offset.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | #include <asm/arch/hwregs/asm/reg_map_asm.h> | 28 | #include <asm/arch/hwregs/asm/reg_map_asm.h> |
29 | #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h> | 29 | #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h> |
diff --git a/arch/frv/kernel/asm-offsets.c b/arch/frv/kernel/asm-offsets.c new file mode 100644 index 000000000000..9e263112a6e2 --- /dev/null +++ b/arch/frv/kernel/asm-offsets.c | |||
@@ -0,0 +1 @@ | |||
/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */ | |||
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index c9b80cffd71d..40b3f56f3666 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile | |||
@@ -61,12 +61,6 @@ archmrproper: | |||
61 | archclean: | 61 | archclean: |
62 | $(Q)$(MAKE) $(clean)=$(boot) | 62 | $(Q)$(MAKE) $(clean)=$(boot) |
63 | 63 | ||
64 | prepare: include/asm-$(ARCH)/asm-offsets.h | ||
65 | |||
66 | include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \ | ||
67 | include/asm include/linux/version.h | ||
68 | $(call filechk,gen-asm-offsets) | ||
69 | |||
70 | vmlinux.srec vmlinux.bin: vmlinux | 64 | vmlinux.srec vmlinux.bin: vmlinux |
71 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 65 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
72 | 66 | ||
@@ -74,5 +68,3 @@ define archhelp | |||
74 | echo 'vmlinux.bin - Create raw binary' | 68 | echo 'vmlinux.bin - Create raw binary' |
75 | echo 'vmlinux.srec - Create srec binary' | 69 | echo 'vmlinux.srec - Create srec binary' |
76 | endef | 70 | endef |
77 | |||
78 | CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h | ||
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index bf7c9ba709f3..09951990a622 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -156,15 +156,6 @@ install: vmlinux | |||
156 | install kernel_install: | 156 | install kernel_install: |
157 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install | 157 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install |
158 | 158 | ||
159 | prepare: include/asm-$(ARCH)/asm_offsets.h | ||
160 | CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h | ||
161 | |||
162 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
163 | include/config/MARKER | ||
164 | |||
165 | include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
166 | $(call filechk,gen-asm-offsets) | ||
167 | |||
168 | archclean: | 159 | archclean: |
169 | $(Q)$(MAKE) $(clean)=arch/i386/boot | 160 | $(Q)$(MAKE) $(clean)=arch/i386/boot |
170 | 161 | ||
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 0587477c99f2..92f669470142 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S | |||
@@ -97,6 +97,7 @@ | |||
97 | #define PARAM_VESAPM_OFF 0x30 | 97 | #define PARAM_VESAPM_OFF 0x30 |
98 | #define PARAM_LFB_PAGES 0x32 | 98 | #define PARAM_LFB_PAGES 0x32 |
99 | #define PARAM_VESA_ATTRIB 0x34 | 99 | #define PARAM_VESA_ATTRIB 0x34 |
100 | #define PARAM_CAPABILITIES 0x36 | ||
100 | 101 | ||
101 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ | 102 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ |
102 | #ifdef CONFIG_VIDEO_RETAIN | 103 | #ifdef CONFIG_VIDEO_RETAIN |
@@ -233,6 +234,10 @@ mopar_gr: | |||
233 | movw 18(%di), %ax | 234 | movw 18(%di), %ax |
234 | movl %eax, %fs:(PARAM_LFB_SIZE) | 235 | movl %eax, %fs:(PARAM_LFB_SIZE) |
235 | 236 | ||
237 | # store mode capabilities | ||
238 | movl 10(%di), %eax | ||
239 | movl %eax, %fs:(PARAM_CAPABILITIES) | ||
240 | |||
236 | # switching the DAC to 8-bit is for <= 8 bpp only | 241 | # switching the DAC to 8-bit is for <= 8 bpp only |
237 | movw %fs:(PARAM_LFB_DEPTH), %ax | 242 | movw %fs:(PARAM_LFB_DEPTH), %ax |
238 | cmpw $8, %ax | 243 | cmpw $8, %ax |
@@ -1944,7 +1949,7 @@ store_edid: | |||
1944 | movw $0x4f15, %ax # do VBE/DDC | 1949 | movw $0x4f15, %ax # do VBE/DDC |
1945 | movw $0x01, %bx | 1950 | movw $0x01, %bx |
1946 | movw $0x00, %cx | 1951 | movw $0x00, %cx |
1947 | movw $0x01, %dx | 1952 | movw $0x00, %dx |
1948 | movw $0x140, %di | 1953 | movw $0x140, %di |
1949 | int $0x10 | 1954 | int $0x10 |
1950 | 1955 | ||
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 44d886c745ec..7c74fe0dc93c 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S | |||
@@ -304,12 +304,6 @@ ret_point: | |||
304 | call restore_processor_state | 304 | call restore_processor_state |
305 | ret | 305 | ret |
306 | 306 | ||
307 | ENTRY(do_suspend_lowlevel_s4bios) | ||
308 | call save_processor_state | ||
309 | call save_registers | ||
310 | call acpi_enter_sleep_state_s4bios | ||
311 | ret | ||
312 | |||
313 | ALIGN | 307 | ALIGN |
314 | # saved registers | 308 | # saved registers |
315 | saved_gdt: .long 0,0 | 309 | saved_gdt: .long 0,0 |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 46ce9b248f55..9ad43be9a01f 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -151,7 +151,7 @@ static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | 154 | static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) |
155 | { | 155 | { |
156 | char *v = c->x86_vendor_id; | 156 | char *v = c->x86_vendor_id; |
157 | int i; | 157 | int i; |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 0480ca9e9e57..e437fb367498 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/desc.h> | 17 | #include <asm/desc.h> |
18 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/asm_offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | 22 | ||
23 | /* | 23 | /* |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 889eda2d7b17..35d3ce26a544 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -573,8 +573,7 @@ static int balanced_irq(void *unused) | |||
573 | } | 573 | } |
574 | 574 | ||
575 | for ( ; ; ) { | 575 | for ( ; ; ) { |
576 | set_current_state(TASK_INTERRUPTIBLE); | 576 | time_remaining = schedule_timeout_interruptible(time_remaining); |
577 | time_remaining = schedule_timeout(time_remaining); | ||
578 | try_to_freeze(); | 577 | try_to_freeze(); |
579 | if (time_after(jiffies, | 578 | if (time_after(jiffies, |
580 | prev_balance_time+balanced_irq_interval)) { | 579 | prev_balance_time+balanced_irq_interval)) { |
@@ -1634,9 +1633,9 @@ void disable_IO_APIC(void) | |||
1634 | clear_IO_APIC(); | 1633 | clear_IO_APIC(); |
1635 | 1634 | ||
1636 | /* | 1635 | /* |
1637 | * If the i82559 is routed through an IOAPIC | 1636 | * If the i8259 is routed through an IOAPIC |
1638 | * Put that IOAPIC in virtual wire mode | 1637 | * Put that IOAPIC in virtual wire mode |
1639 | * so legacy interrups can be delivered. | 1638 | * so legacy interrupts can be delivered. |
1640 | */ | 1639 | */ |
1641 | pin = find_isa_irq_pin(0, mp_ExtINT); | 1640 | pin = find_isa_irq_pin(0, mp_ExtINT); |
1642 | if (pin != -1) { | 1641 | if (pin != -1) { |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index cafaeffe3818..15949fd08109 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -122,8 +122,8 @@ static int MP_valid_apicid(int apicid, int version) | |||
122 | 122 | ||
123 | static void __init MP_processor_info (struct mpc_config_processor *m) | 123 | static void __init MP_processor_info (struct mpc_config_processor *m) |
124 | { | 124 | { |
125 | int ver, apicid, cpu, found_bsp = 0; | 125 | int ver, apicid; |
126 | physid_mask_t tmp; | 126 | physid_mask_t phys_cpu; |
127 | 127 | ||
128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
129 | return; | 129 | return; |
@@ -181,7 +181,6 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
182 | Dprintk(" Bootup CPU\n"); | 182 | Dprintk(" Bootup CPU\n"); |
183 | boot_cpu_physical_apicid = m->mpc_apicid; | 183 | boot_cpu_physical_apicid = m->mpc_apicid; |
184 | found_bsp = 1; | ||
185 | } | 184 | } |
186 | 185 | ||
187 | if (num_processors >= NR_CPUS) { | 186 | if (num_processors >= NR_CPUS) { |
@@ -195,29 +194,26 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
195 | " Processor ignored.\n", maxcpus); | 194 | " Processor ignored.\n", maxcpus); |
196 | return; | 195 | return; |
197 | } | 196 | } |
198 | num_processors++; | ||
199 | ver = m->mpc_apicver; | 197 | ver = m->mpc_apicver; |
200 | 198 | ||
201 | if (!MP_valid_apicid(apicid, ver)) { | 199 | if (!MP_valid_apicid(apicid, ver)) { |
202 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", | 200 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", |
203 | m->mpc_apicid, MAX_APICS); | 201 | m->mpc_apicid, MAX_APICS); |
204 | --num_processors; | ||
205 | return; | 202 | return; |
206 | } | 203 | } |
207 | 204 | ||
208 | if (found_bsp) | 205 | cpu_set(num_processors, cpu_possible_map); |
209 | cpu = 0; | 206 | num_processors++; |
210 | else | 207 | phys_cpu = apicid_to_cpu_present(apicid); |
211 | cpu = num_processors - 1; | 208 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); |
212 | cpu_set(cpu, cpu_possible_map); | 209 | |
213 | tmp = apicid_to_cpu_present(apicid); | ||
214 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); | ||
215 | |||
216 | /* | 210 | /* |
217 | * Validate version | 211 | * Validate version |
218 | */ | 212 | */ |
219 | if (ver == 0x0) { | 213 | if (ver == 0x0) { |
220 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid); | 214 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! " |
215 | "fixing up to 0x10. (tell your hw vendor)\n", | ||
216 | m->mpc_apicid); | ||
221 | ver = 0x10; | 217 | ver = 0x10; |
222 | } | 218 | } |
223 | apic_version[m->mpc_apicid] = ver; | 219 | apic_version[m->mpc_apicid] = ver; |
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 340980203b09..7b6368bf8974 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -694,17 +694,22 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
694 | __attribute__((regparm(3))) | 694 | __attribute__((regparm(3))) |
695 | int do_syscall_trace(struct pt_regs *regs, int entryexit) | 695 | int do_syscall_trace(struct pt_regs *regs, int entryexit) |
696 | { | 696 | { |
697 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU), ret = 0; | 697 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU); |
698 | /* With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall | 698 | /* |
699 | * interception. */ | 699 | * With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall |
700 | * interception | ||
701 | */ | ||
700 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); | 702 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); |
703 | int ret = 0; | ||
701 | 704 | ||
702 | /* do the secure computing check first */ | 705 | /* do the secure computing check first */ |
703 | secure_computing(regs->orig_eax); | 706 | if (!entryexit) |
707 | secure_computing(regs->orig_eax); | ||
704 | 708 | ||
705 | if (unlikely(current->audit_context)) { | 709 | if (unlikely(current->audit_context)) { |
706 | if (entryexit) | 710 | if (entryexit) |
707 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | 711 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), |
712 | regs->eax); | ||
708 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only | 713 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only |
709 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is | 714 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is |
710 | * not used, entry.S will call us only on syscall exit, not | 715 | * not used, entry.S will call us only on syscall exit, not |
@@ -738,7 +743,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
738 | /* the 0x80 provides a way for the tracing parent to distinguish | 743 | /* the 0x80 provides a way for the tracing parent to distinguish |
739 | between a syscall stop and SIGTRAP delivery */ | 744 | between a syscall stop and SIGTRAP delivery */ |
740 | /* Note that the debugger could change the result of test_thread_flag!*/ | 745 | /* Note that the debugger could change the result of test_thread_flag!*/ |
741 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); | 746 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80:0)); |
742 | 747 | ||
743 | /* | 748 | /* |
744 | * this isn't the same as continuing with a signal, but it will do | 749 | * this isn't the same as continuing with a signal, but it will do |
@@ -750,7 +755,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
750 | current->exit_code = 0; | 755 | current->exit_code = 0; |
751 | } | 756 | } |
752 | ret = is_sysemu; | 757 | ret = is_sysemu; |
753 | out: | 758 | out: |
754 | if (unlikely(current->audit_context) && !entryexit) | 759 | if (unlikely(current->audit_context) && !entryexit) |
755 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, | 760 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, |
756 | regs->ebx, regs->ecx, regs->edx, regs->esi); | 761 | regs->ebx, regs->ecx, regs->edx, regs->esi); |
@@ -759,6 +764,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
759 | 764 | ||
760 | regs->orig_eax = -1; /* force skip of syscall restarting */ | 765 | regs->orig_eax = -1; /* force skip of syscall restarting */ |
761 | if (unlikely(current->audit_context)) | 766 | if (unlikely(current->audit_context)) |
762 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | 767 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), |
768 | regs->eax); | ||
763 | return 1; | 769 | return 1; |
764 | } | 770 | } |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index a659d274914c..f3d808451d25 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -139,6 +139,7 @@ struct sys_desc_table_struct { | |||
139 | unsigned char table[0]; | 139 | unsigned char table[0]; |
140 | }; | 140 | }; |
141 | struct edid_info edid_info; | 141 | struct edid_info edid_info; |
142 | EXPORT_SYMBOL_GPL(edid_info); | ||
142 | struct ist_info ist_info; | 143 | struct ist_info ist_info; |
143 | #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \ | 144 | #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \ |
144 | defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) | 145 | defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) |
@@ -1299,7 +1300,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1299 | */ | 1300 | */ |
1300 | static void __init register_memory(void) | 1301 | static void __init register_memory(void) |
1301 | { | 1302 | { |
1302 | unsigned long gapstart, gapsize; | 1303 | unsigned long gapstart, gapsize, round; |
1303 | unsigned long long last; | 1304 | unsigned long long last; |
1304 | int i; | 1305 | int i; |
1305 | 1306 | ||
@@ -1344,14 +1345,14 @@ static void __init register_memory(void) | |||
1344 | } | 1345 | } |
1345 | 1346 | ||
1346 | /* | 1347 | /* |
1347 | * Start allocating dynamic PCI memory a bit into the gap, | 1348 | * See how much we want to round up: start off with |
1348 | * aligned up to the nearest megabyte. | 1349 | * rounding to the next 1MB area. |
1349 | * | ||
1350 | * Question: should we try to pad it up a bit (do something | ||
1351 | * like " + (gapsize >> 3)" in there too?). We now have the | ||
1352 | * technology. | ||
1353 | */ | 1350 | */ |
1354 | pci_mem_start = (gapstart + 0xfffff) & ~0xfffff; | 1351 | round = 0x100000; |
1352 | while ((gapsize >> 4) > round) | ||
1353 | round += round; | ||
1354 | /* Fun with two's complement */ | ||
1355 | pci_mem_start = (gapstart + round) & -round; | ||
1355 | 1356 | ||
1356 | printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n", | 1357 | printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n", |
1357 | pci_mem_start, gapstart, gapsize); | 1358 | pci_mem_start, gapstart, gapsize); |
diff --git a/arch/i386/kernel/sigframe.h b/arch/i386/kernel/sigframe.h index d21b14f5c25c..0b2221711dad 100644 --- a/arch/i386/kernel/sigframe.h +++ b/arch/i386/kernel/sigframe.h | |||
@@ -1,6 +1,6 @@ | |||
1 | struct sigframe | 1 | struct sigframe |
2 | { | 2 | { |
3 | char *pretcode; | 3 | char __user *pretcode; |
4 | int sig; | 4 | int sig; |
5 | struct sigcontext sc; | 5 | struct sigcontext sc; |
6 | struct _fpstate fpstate; | 6 | struct _fpstate fpstate; |
@@ -10,10 +10,10 @@ struct sigframe | |||
10 | 10 | ||
11 | struct rt_sigframe | 11 | struct rt_sigframe |
12 | { | 12 | { |
13 | char *pretcode; | 13 | char __user *pretcode; |
14 | int sig; | 14 | int sig; |
15 | struct siginfo *pinfo; | 15 | struct siginfo __user *pinfo; |
16 | void *puc; | 16 | void __user *puc; |
17 | struct siginfo info; | 17 | struct siginfo info; |
18 | struct ucontext uc; | 18 | struct ucontext uc; |
19 | struct _fpstate fpstate; | 19 | struct _fpstate fpstate; |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 5e4893d2b9f2..c70cd2a08304 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1330,8 +1330,7 @@ void __cpu_die(unsigned int cpu) | |||
1330 | printk ("CPU %d is now offline\n", cpu); | 1330 | printk ("CPU %d is now offline\n", cpu); |
1331 | return; | 1331 | return; |
1332 | } | 1332 | } |
1333 | current->state = TASK_UNINTERRUPTIBLE; | 1333 | msleep(100); |
1334 | schedule_timeout(HZ/10); | ||
1335 | } | 1334 | } |
1336 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); | 1335 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); |
1337 | } | 1336 | } |
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index eefea7c55008..2883a4d4f01f 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -329,8 +329,7 @@ EXPORT_SYMBOL(get_cmos_time); | |||
329 | 329 | ||
330 | static void sync_cmos_clock(unsigned long dummy); | 330 | static void sync_cmos_clock(unsigned long dummy); |
331 | 331 | ||
332 | static struct timer_list sync_cmos_timer = | 332 | static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0); |
333 | TIMER_INITIALIZER(sync_cmos_clock, 0, 0); | ||
334 | 333 | ||
335 | static void sync_cmos_clock(unsigned long dummy) | 334 | static void sync_cmos_clock(unsigned long dummy) |
336 | { | 335 | { |
diff --git a/arch/i386/kernel/vsyscall-sigreturn.S b/arch/i386/kernel/vsyscall-sigreturn.S index 68afa50dd7cf..fadb5bc3c374 100644 --- a/arch/i386/kernel/vsyscall-sigreturn.S +++ b/arch/i386/kernel/vsyscall-sigreturn.S | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/unistd.h> | 9 | #include <asm/unistd.h> |
10 | #include <asm/asm_offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | 11 | ||
12 | 12 | ||
13 | /* XXX | 13 | /* XXX |
diff --git a/arch/i386/kernel/vsyscall.lds.S b/arch/i386/kernel/vsyscall.lds.S index a7977707c8e5..98699ca6e52d 100644 --- a/arch/i386/kernel/vsyscall.lds.S +++ b/arch/i386/kernel/vsyscall.lds.S | |||
@@ -3,7 +3,7 @@ | |||
3 | * object prelinked to its virtual address, and with only one read-only | 3 | * object prelinked to its virtual address, and with only one read-only |
4 | * segment (that fits in one page). This script controls its layout. | 4 | * segment (that fits in one page). This script controls its layout. |
5 | */ | 5 | */ |
6 | #include <asm/asm_offsets.h> | 6 | #include <asm/asm-offsets.h> |
7 | 7 | ||
8 | SECTIONS | 8 | SECTIONS |
9 | { | 9 | { |
diff --git a/arch/i386/power/swsusp.S b/arch/i386/power/swsusp.S index c4105286ff26..c893b897217f 100644 --- a/arch/i386/power/swsusp.S +++ b/arch/i386/power/swsusp.S | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/asm_offsets.h> | 15 | #include <asm/asm-offsets.h> |
16 | 16 | ||
17 | .text | 17 | .text |
18 | 18 | ||
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index f9bd88ada708..7ed678cf5e41 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -82,25 +82,18 @@ unwcheck: vmlinux | |||
82 | archclean: | 82 | archclean: |
83 | $(Q)$(MAKE) $(clean)=$(boot) | 83 | $(Q)$(MAKE) $(clean)=$(boot) |
84 | 84 | ||
85 | CLEAN_FILES += include/asm-ia64/.offsets.h.stamp vmlinux.gz bootloader | 85 | prepare: include/asm-ia64/.offsets.h.stamp |
86 | |||
87 | MRPROPER_FILES += include/asm-ia64/offsets.h | ||
88 | |||
89 | prepare: include/asm-ia64/offsets.h | ||
90 | |||
91 | arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER | ||
92 | |||
93 | include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s | ||
94 | $(call filechk,gen-asm-offsets) | ||
95 | |||
96 | arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp | ||
97 | 86 | ||
98 | include/asm-ia64/.offsets.h.stamp: | 87 | include/asm-ia64/.offsets.h.stamp: |
99 | mkdir -p include/asm-ia64 | 88 | mkdir -p include/asm-ia64 |
100 | [ -s include/asm-ia64/offsets.h ] \ | 89 | [ -s include/asm-ia64/asm-offsets.h ] \ |
101 | || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/offsets.h | 90 | || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/asm-offsets.h |
102 | touch $@ | 91 | touch $@ |
103 | 92 | ||
93 | |||
94 | |||
95 | CLEAN_FILES += vmlinux.gz bootloader include/asm-ia64/.offsets.h.stamp | ||
96 | |||
104 | boot: lib/lib.a vmlinux | 97 | boot: lib/lib.a vmlinux |
105 | $(Q)$(MAKE) $(build)=$(boot) $@ | 98 | $(Q)$(MAKE) $(build)=$(boot) $@ |
106 | 99 | ||
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S index 0708edb06cc4..494fad6bf376 100644 --- a/arch/ia64/ia32/ia32_entry.S +++ b/arch/ia64/ia32/ia32_entry.S | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <asm/asmmacro.h> | 1 | #include <asm/asmmacro.h> |
2 | #include <asm/ia32.h> | 2 | #include <asm/ia32.h> |
3 | #include <asm/offsets.h> | 3 | #include <asm/asm-offsets.h> |
4 | #include <asm/signal.h> | 4 | #include <asm/signal.h> |
5 | #include <asm/thread_info.h> | 5 | #include <asm/thread_info.h> |
6 | 6 | ||
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 3c8821024509..ba0b6a1f429f 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <asm/cache.h> | 37 | #include <asm/cache.h> |
38 | #include <asm/errno.h> | 38 | #include <asm/errno.h> |
39 | #include <asm/kregs.h> | 39 | #include <asm/kregs.h> |
40 | #include <asm/offsets.h> | 40 | #include <asm/asm-offsets.h> |
41 | #include <asm/pgtable.h> | 41 | #include <asm/pgtable.h> |
42 | #include <asm/percpu.h> | 42 | #include <asm/percpu.h> |
43 | #include <asm/processor.h> | 43 | #include <asm/processor.h> |
@@ -470,6 +470,29 @@ ENTRY(load_switch_stack) | |||
470 | br.cond.sptk.many b7 | 470 | br.cond.sptk.many b7 |
471 | END(load_switch_stack) | 471 | END(load_switch_stack) |
472 | 472 | ||
473 | GLOBAL_ENTRY(prefetch_stack) | ||
474 | add r14 = -IA64_SWITCH_STACK_SIZE, sp | ||
475 | add r15 = IA64_TASK_THREAD_KSP_OFFSET, in0 | ||
476 | ;; | ||
477 | ld8 r16 = [r15] // load next's stack pointer | ||
478 | lfetch.fault.excl [r14], 128 | ||
479 | ;; | ||
480 | lfetch.fault.excl [r14], 128 | ||
481 | lfetch.fault [r16], 128 | ||
482 | ;; | ||
483 | lfetch.fault.excl [r14], 128 | ||
484 | lfetch.fault [r16], 128 | ||
485 | ;; | ||
486 | lfetch.fault.excl [r14], 128 | ||
487 | lfetch.fault [r16], 128 | ||
488 | ;; | ||
489 | lfetch.fault.excl [r14], 128 | ||
490 | lfetch.fault [r16], 128 | ||
491 | ;; | ||
492 | lfetch.fault [r16], 128 | ||
493 | br.ret.sptk.many rp | ||
494 | END(prefetch_switch_stack) | ||
495 | |||
473 | GLOBAL_ENTRY(execve) | 496 | GLOBAL_ENTRY(execve) |
474 | mov r15=__NR_execve // put syscall number in place | 497 | mov r15=__NR_execve // put syscall number in place |
475 | break __BREAK_SYSCALL | 498 | break __BREAK_SYSCALL |
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 7d7684a369d3..2ddbac6f4999 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/asmmacro.h> | 15 | #include <asm/asmmacro.h> |
16 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
17 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/percpu.h> | 18 | #include <asm/percpu.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/sal.h> | 20 | #include <asm/sal.h> |
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S index 86948ce63e43..86064ca98952 100644 --- a/arch/ia64/kernel/gate.S +++ b/arch/ia64/kernel/gate.S | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <asm/asmmacro.h> | 11 | #include <asm/asmmacro.h> |
12 | #include <asm/errno.h> | 12 | #include <asm/errno.h> |
13 | #include <asm/offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/sigcontext.h> | 14 | #include <asm/sigcontext.h> |
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 8d3a9291b47f..bfe65b2e8621 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/fpu.h> | 25 | #include <asm/fpu.h> |
26 | #include <asm/kregs.h> | 26 | #include <asm/kregs.h> |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <asm/offsets.h> | 28 | #include <asm/asm-offsets.h> |
29 | #include <asm/pal.h> | 29 | #include <asm/pal.h> |
30 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
31 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 3bb3a13c4047..3ba8384cb43d 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <asm/break.h> | 44 | #include <asm/break.h> |
45 | #include <asm/ia32.h> | 45 | #include <asm/ia32.h> |
46 | #include <asm/kregs.h> | 46 | #include <asm/kregs.h> |
47 | #include <asm/offsets.h> | 47 | #include <asm/asm-offsets.h> |
48 | #include <asm/pgtable.h> | 48 | #include <asm/pgtable.h> |
49 | #include <asm/processor.h> | 49 | #include <asm/processor.h> |
50 | #include <asm/ptrace.h> | 50 | #include <asm/ptrace.h> |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 4ebbf3974381..8d484204a3ff 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -491,12 +491,7 @@ init_handler_platform (pal_min_state_area_t *ms, | |||
491 | unw_init_from_interruption(&info, current, pt, sw); | 491 | unw_init_from_interruption(&info, current, pt, sw); |
492 | ia64_do_show_stack(&info, NULL); | 492 | ia64_do_show_stack(&info, NULL); |
493 | 493 | ||
494 | #ifdef CONFIG_SMP | 494 | if (read_trylock(&tasklist_lock)) { |
495 | /* read_trylock() would be handy... */ | ||
496 | if (!tasklist_lock.write_lock) | ||
497 | read_lock(&tasklist_lock); | ||
498 | #endif | ||
499 | { | ||
500 | struct task_struct *g, *t; | 495 | struct task_struct *g, *t; |
501 | do_each_thread (g, t) { | 496 | do_each_thread (g, t) { |
502 | if (t == current) | 497 | if (t == current) |
@@ -506,10 +501,6 @@ init_handler_platform (pal_min_state_area_t *ms, | |||
506 | show_stack(t, NULL); | 501 | show_stack(t, NULL); |
507 | } while_each_thread (g, t); | 502 | } while_each_thread (g, t); |
508 | } | 503 | } |
509 | #ifdef CONFIG_SMP | ||
510 | if (!tasklist_lock.write_lock) | ||
511 | read_unlock(&tasklist_lock); | ||
512 | #endif | ||
513 | 504 | ||
514 | printk("\nINIT dump complete. Please reboot now.\n"); | 505 | printk("\nINIT dump complete. Please reboot now.\n"); |
515 | while (1); /* hang city if no debugger */ | 506 | while (1); /* hang city if no debugger */ |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f1201ac8a116..1650353e3f77 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/pagemap.h> | 38 | #include <linux/pagemap.h> |
39 | #include <linux/mount.h> | 39 | #include <linux/mount.h> |
40 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
41 | #include <linux/rcupdate.h> | ||
41 | 42 | ||
42 | #include <asm/errno.h> | 43 | #include <asm/errno.h> |
43 | #include <asm/intrinsics.h> | 44 | #include <asm/intrinsics.h> |
@@ -496,7 +497,7 @@ typedef struct { | |||
496 | static pfm_stats_t pfm_stats[NR_CPUS]; | 497 | static pfm_stats_t pfm_stats[NR_CPUS]; |
497 | static pfm_session_t pfm_sessions; /* global sessions information */ | 498 | static pfm_session_t pfm_sessions; /* global sessions information */ |
498 | 499 | ||
499 | static spinlock_t pfm_alt_install_check = SPIN_LOCK_UNLOCKED; | 500 | static DEFINE_SPINLOCK(pfm_alt_install_check); |
500 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; | 501 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; |
501 | 502 | ||
502 | static struct proc_dir_entry *perfmon_dir; | 503 | static struct proc_dir_entry *perfmon_dir; |
@@ -2217,15 +2218,17 @@ static void | |||
2217 | pfm_free_fd(int fd, struct file *file) | 2218 | pfm_free_fd(int fd, struct file *file) |
2218 | { | 2219 | { |
2219 | struct files_struct *files = current->files; | 2220 | struct files_struct *files = current->files; |
2221 | struct fdtable *fdt = files_fdtable(files); | ||
2220 | 2222 | ||
2221 | /* | 2223 | /* |
2222 | * there ie no fd_uninstall(), so we do it here | 2224 | * there ie no fd_uninstall(), so we do it here |
2223 | */ | 2225 | */ |
2224 | spin_lock(&files->file_lock); | 2226 | spin_lock(&files->file_lock); |
2225 | files->fd[fd] = NULL; | 2227 | rcu_assign_pointer(fdt->fd[fd], NULL); |
2226 | spin_unlock(&files->file_lock); | 2228 | spin_unlock(&files->file_lock); |
2227 | 2229 | ||
2228 | if (file) put_filp(file); | 2230 | if (file) |
2231 | put_filp(file); | ||
2229 | put_unused_fd(fd); | 2232 | put_unused_fd(fd); |
2230 | } | 2233 | } |
2231 | 2234 | ||
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index d0c2c114a459..e5c6d3c0a8e9 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c | |||
@@ -130,7 +130,7 @@ struct net_device *xpnet_device; | |||
130 | */ | 130 | */ |
131 | static u64 xpnet_broadcast_partitions; | 131 | static u64 xpnet_broadcast_partitions; |
132 | /* protect above */ | 132 | /* protect above */ |
133 | static spinlock_t xpnet_broadcast_lock = SPIN_LOCK_UNLOCKED; | 133 | static DEFINE_SPINLOCK(xpnet_broadcast_lock); |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Since the Block Transfer Engine (BTE) is being used for the transfer | 136 | * Since the Block Transfer Engine (BTE) is being used for the transfer |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 7622d4ec5f08..1ef3987ebc6a 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -242,8 +242,8 @@ config SMP | |||
242 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power | 242 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power |
243 | Management" code will be disabled if you say Y here. | 243 | Management" code will be disabled if you say Y here. |
244 | 244 | ||
245 | See also the <file:Documentation/smp.tex>, | 245 | See also the <file:Documentation/smp.txt>, |
246 | <file:Documentation/smp.txt> and the SMP-HOWTO available at | 246 | and the SMP-HOWTO available at |
247 | <http://www.linuxdoc.org/docs.html#howto>. | 247 | <http://www.linuxdoc.org/docs.html#howto>. |
248 | 248 | ||
249 | If you don't know what to do here, say N. | 249 | If you don't know what to do here, say N. |
diff --git a/arch/m32r/kernel/asm-offsets.c b/arch/m32r/kernel/asm-offsets.c new file mode 100644 index 000000000000..9e263112a6e2 --- /dev/null +++ b/arch/m32r/kernel/asm-offsets.c | |||
@@ -0,0 +1 @@ | |||
/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */ | |||
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 48b187f2d2b3..a4576ac7e870 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -892,7 +892,6 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num, | |||
892 | int try) | 892 | int try) |
893 | { | 893 | { |
894 | spinlock_t *ipilock; | 894 | spinlock_t *ipilock; |
895 | unsigned long flags = 0; | ||
896 | volatile unsigned long *ipicr_addr; | 895 | volatile unsigned long *ipicr_addr; |
897 | unsigned long ipicr_val; | 896 | unsigned long ipicr_val; |
898 | unsigned long my_physid_mask; | 897 | unsigned long my_physid_mask; |
@@ -916,50 +915,27 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num, | |||
916 | * write IPICRi (send IPIi) | 915 | * write IPICRi (send IPIi) |
917 | * unlock ipi_lock[i] | 916 | * unlock ipi_lock[i] |
918 | */ | 917 | */ |
918 | spin_lock(ipilock); | ||
919 | __asm__ __volatile__ ( | 919 | __asm__ __volatile__ ( |
920 | ";; LOCK ipi_lock[i] \n\t" | 920 | ";; CHECK IPICRi == 0 \n\t" |
921 | ".fillinsn \n" | 921 | ".fillinsn \n" |
922 | "1: \n\t" | 922 | "1: \n\t" |
923 | "mvfc %1, psw \n\t" | 923 | "ld %0, @%1 \n\t" |
924 | "clrpsw #0x40 -> nop \n\t" | 924 | "and %0, %4 \n\t" |
925 | DCACHE_CLEAR("r4", "r5", "%2") | 925 | "beqz %0, 2f \n\t" |
926 | "lock r4, @%2 \n\t" | 926 | "bnez %3, 3f \n\t" |
927 | "addi r4, #-1 \n\t" | ||
928 | "unlock r4, @%2 \n\t" | ||
929 | "mvtc %1, psw \n\t" | ||
930 | "bnez r4, 2f \n\t" | ||
931 | LOCK_SECTION_START(".balign 4 \n\t") | ||
932 | ".fillinsn \n" | ||
933 | "2: \n\t" | ||
934 | "ld r4, @%2 \n\t" | ||
935 | "blez r4, 2b \n\t" | ||
936 | "bra 1b \n\t" | 927 | "bra 1b \n\t" |
937 | LOCK_SECTION_END | ||
938 | ";; CHECK IPICRi == 0 \n\t" | ||
939 | ".fillinsn \n" | ||
940 | "3: \n\t" | ||
941 | "ld %0, @%3 \n\t" | ||
942 | "and %0, %6 \n\t" | ||
943 | "beqz %0, 4f \n\t" | ||
944 | "bnez %5, 5f \n\t" | ||
945 | "bra 3b \n\t" | ||
946 | ";; WRITE IPICRi (send IPIi) \n\t" | 928 | ";; WRITE IPICRi (send IPIi) \n\t" |
947 | ".fillinsn \n" | 929 | ".fillinsn \n" |
948 | "4: \n\t" | 930 | "2: \n\t" |
949 | "st %4, @%3 \n\t" | 931 | "st %2, @%1 \n\t" |
950 | ";; UNLOCK ipi_lock[i] \n\t" | ||
951 | ".fillinsn \n" | 932 | ".fillinsn \n" |
952 | "5: \n\t" | 933 | "3: \n\t" |
953 | "ldi r4, #1 \n\t" | ||
954 | "st r4, @%2 \n\t" | ||
955 | : "=&r"(ipicr_val) | 934 | : "=&r"(ipicr_val) |
956 | : "r"(flags), "r"(&ipilock->slock), "r"(ipicr_addr), | 935 | : "r"(ipicr_addr), "r"(mask), "r"(try), "r"(my_physid_mask) |
957 | "r"(mask), "r"(try), "r"(my_physid_mask) | 936 | : "memory" |
958 | : "memory", "r4" | ||
959 | #ifdef CONFIG_CHIP_M32700_TS1 | ||
960 | , "r5" | ||
961 | #endif /* CONFIG_CHIP_M32700_TS1 */ | ||
962 | ); | 937 | ); |
938 | spin_unlock(ipilock); | ||
963 | 939 | ||
964 | return ipicr_val; | 940 | return ipicr_val; |
965 | } | 941 | } |
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index 466e7407afc7..34d826d10f1b 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
@@ -113,14 +113,5 @@ else | |||
113 | bzip2 -1c vmlinux >vmlinux.bz2 | 113 | bzip2 -1c vmlinux >vmlinux.bz2 |
114 | endif | 114 | endif |
115 | 115 | ||
116 | prepare: include/asm-$(ARCH)/offsets.h | ||
117 | CLEAN_FILES += include/asm-$(ARCH)/offsets.h | ||
118 | |||
119 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
120 | include/config/MARKER | ||
121 | |||
122 | include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
123 | $(call filechk,gen-asm-offsets) | ||
124 | |||
125 | archclean: | 116 | archclean: |
126 | rm -f vmlinux.gz vmlinux.bz2 | 117 | rm -f vmlinux.gz vmlinux.bz2 |
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index cb5d93630467..bd5d134e9f12 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c | |||
@@ -63,7 +63,7 @@ void __init amiga_init_sound(void) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | static void nosound( unsigned long ignored ); | 65 | static void nosound( unsigned long ignored ); |
66 | static struct timer_list sound_timer = TIMER_INITIALIZER(nosound, 0, 0); | 66 | static DEFINE_TIMER(sound_timer, nosound, 0, 0); |
67 | 67 | ||
68 | void amiga_mksound( unsigned int hz, unsigned int ticks ) | 68 | void amiga_mksound( unsigned int hz, unsigned int ticks ) |
69 | { | 69 | { |
diff --git a/arch/m68k/fpsp040/skeleton.S b/arch/m68k/fpsp040/skeleton.S index dbc1255a5e99..9571a21d6ad4 100644 --- a/arch/m68k/fpsp040/skeleton.S +++ b/arch/m68k/fpsp040/skeleton.S | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/linkage.h> | 41 | #include <linux/linkage.h> |
42 | #include <asm/entry.h> | 42 | #include <asm/entry.h> |
43 | #include <asm/offsets.h> | 43 | #include <asm/asm-offsets.h> |
44 | 44 | ||
45 | |SKELETON idnt 2,1 | Motorola 040 Floating Point Software Package | 45 | |SKELETON idnt 2,1 | Motorola 040 Floating Point Software Package |
46 | 46 | ||
diff --git a/arch/m68k/ifpsp060/iskeleton.S b/arch/m68k/ifpsp060/iskeleton.S index 803a6ecdda81..4ba2c74da93d 100644 --- a/arch/m68k/ifpsp060/iskeleton.S +++ b/arch/m68k/ifpsp060/iskeleton.S | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #include <linux/linkage.h> | 37 | #include <linux/linkage.h> |
38 | #include <asm/entry.h> | 38 | #include <asm/entry.h> |
39 | #include <asm/offsets.h> | 39 | #include <asm/asm-offsets.h> |
40 | 40 | ||
41 | 41 | ||
42 | |################################ | 42 | |################################ |
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index e964015a31dc..23ca60a45552 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <asm/traps.h> | 42 | #include <asm/traps.h> |
43 | #include <asm/unistd.h> | 43 | #include <asm/unistd.h> |
44 | 44 | ||
45 | #include <asm/offsets.h> | 45 | #include <asm/asm-offsets.h> |
46 | 46 | ||
47 | .globl system_call, buserr, trap | 47 | .globl system_call, buserr, trap |
48 | .globl resume, ret_from_exception | 48 | .globl resume, ret_from_exception |
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 7cd6de17c20d..d4336d846df1 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S | |||
@@ -263,7 +263,7 @@ | |||
263 | #include <asm/entry.h> | 263 | #include <asm/entry.h> |
264 | #include <asm/pgtable.h> | 264 | #include <asm/pgtable.h> |
265 | #include <asm/page.h> | 265 | #include <asm/page.h> |
266 | #include <asm/offsets.h> | 266 | #include <asm/asm-offsets.h> |
267 | 267 | ||
268 | #ifdef CONFIG_MAC | 268 | #ifdef CONFIG_MAC |
269 | 269 | ||
diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index 44c5cd2ad6a8..8f0640847ad2 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c | |||
@@ -56,8 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ); | |||
56 | /* | 56 | /* |
57 | * our timer to start/continue/stop the bell | 57 | * our timer to start/continue/stop the bell |
58 | */ | 58 | */ |
59 | static struct timer_list mac_sound_timer = | 59 | static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0); |
60 | TIMER_INITIALIZER(mac_nosound, 0, 0); | ||
61 | 60 | ||
62 | /* | 61 | /* |
63 | * Sort of initialize the sound chip (called from mac_mksound on the first | 62 | * Sort of initialize the sound chip (called from mac_mksound on the first |
diff --git a/arch/m68k/math-emu/fp_emu.h b/arch/m68k/math-emu/fp_emu.h index 1d6edc975d89..c1ecfef7886a 100644 --- a/arch/m68k/math-emu/fp_emu.h +++ b/arch/m68k/math-emu/fp_emu.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define _FP_EMU_H | 39 | #define _FP_EMU_H |
40 | 40 | ||
41 | #ifdef __ASSEMBLY__ | 41 | #ifdef __ASSEMBLY__ |
42 | #include <asm/offsets.h> | 42 | #include <asm/asm-offsets.h> |
43 | #endif | 43 | #endif |
44 | #include <asm/math-emu.h> | 44 | #include <asm/math-emu.h> |
45 | 45 | ||
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 7ce5e55b2401..b8fdf191b8f6 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
@@ -102,21 +102,11 @@ CFLAGS += -DUTS_SYSNAME=\"uClinux\" | |||
102 | 102 | ||
103 | head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o | 103 | head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o |
104 | 104 | ||
105 | CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \ | ||
106 | arch/$(ARCH)/kernel/asm-offsets.s | ||
107 | |||
108 | core-y += arch/m68knommu/kernel/ \ | 105 | core-y += arch/m68knommu/kernel/ \ |
109 | arch/m68knommu/mm/ \ | 106 | arch/m68knommu/mm/ \ |
110 | $(CLASSDIR) \ | 107 | $(CLASSDIR) \ |
111 | arch/m68knommu/platform/$(PLATFORM)/ | 108 | arch/m68knommu/platform/$(PLATFORM)/ |
112 | libs-y += arch/m68knommu/lib/ | 109 | libs-y += arch/m68knommu/lib/ |
113 | 110 | ||
114 | prepare: include/asm-$(ARCH)/asm-offsets.h | ||
115 | |||
116 | archclean: | 111 | archclean: |
117 | $(Q)$(MAKE) $(clean)=arch/m68knommu/boot | 112 | $(Q)$(MAKE) $(clean)=arch/m68knommu/boot |
118 | |||
119 | include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \ | ||
120 | include/asm include/linux/version.h \ | ||
121 | include/config/MARKER | ||
122 | $(call filechk,gen-asm-offsets) | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 8d76eb1ff291..0eb71ac303af 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -154,6 +154,13 @@ config TANBAC_TB0226 | |||
154 | The TANBAC Mbase(TB0226) is a MIPS-based platform manufactured by TANBAC. | 154 | The TANBAC Mbase(TB0226) is a MIPS-based platform manufactured by TANBAC. |
155 | Please refer to <http://www.tanbac.co.jp/> about Mbase. | 155 | Please refer to <http://www.tanbac.co.jp/> about Mbase. |
156 | 156 | ||
157 | config TANBAC_TB0287 | ||
158 | bool "Support for TANBAC Mini-ITX DIMM base(TB0287)" | ||
159 | depends on TANBAC_TB022X | ||
160 | help | ||
161 | The TANBAC Mini-ITX DIMM base(TB0287) is a MIPS-based platform manufactured by TANBAC. | ||
162 | Please refer to <http://www.tanbac.co.jp/> about Mini-ITX DIMM base. | ||
163 | |||
157 | config VICTOR_MPC30X | 164 | config VICTOR_MPC30X |
158 | bool "Support for Victor MP-C303/304" | 165 | bool "Support for Victor MP-C303/304" |
159 | depends on MACH_VR41XX | 166 | depends on MACH_VR41XX |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index b0fdaee8d8d9..346e803f153b 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -720,38 +720,7 @@ archclean: | |||
720 | @$(MAKE) $(clean)=arch/mips/boot | 720 | @$(MAKE) $(clean)=arch/mips/boot |
721 | @$(MAKE) $(clean)=arch/mips/lasat | 721 | @$(MAKE) $(clean)=arch/mips/lasat |
722 | 722 | ||
723 | # Generate <asm/offset.h | 723 | |
724 | # | 724 | CLEAN_FILES += vmlinux.32 \ |
725 | # The default rule is suffering from funny problems on MIPS so we using our | ||
726 | # own ... | ||
727 | # | ||
728 | # --------------------------------------------------------------------------- | ||
729 | |||
730 | define filechk_gen-asm-offset.h | ||
731 | (set -e; \ | ||
732 | echo "#ifndef _ASM_OFFSET_H"; \ | ||
733 | echo "#define _ASM_OFFSET_H"; \ | ||
734 | echo "/*"; \ | ||
735 | echo " * DO NOT MODIFY."; \ | ||
736 | echo " *"; \ | ||
737 | echo " * This file was generated by arch/$(ARCH)/Makefile"; \ | ||
738 | echo " *"; \ | ||
739 | echo " */"; \ | ||
740 | echo ""; \ | ||
741 | sed -ne "/^@@@/s///p"; \ | ||
742 | echo "#endif /* _ASM_OFFSET_H */" ) | ||
743 | endef | ||
744 | |||
745 | prepare: include/asm-$(ARCH)/offset.h | ||
746 | |||
747 | arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \ | ||
748 | include/config/MARKER | ||
749 | |||
750 | include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s | ||
751 | $(call filechk,gen-asm-offset.h) | ||
752 | |||
753 | CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \ | ||
754 | include/asm-$(ARCH)/offset.h \ | ||
755 | vmlinux.32 \ | ||
756 | vmlinux.64 \ | 725 | vmlinux.64 \ |
757 | vmlinux.ecoff | 726 | vmlinux.ecoff |
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig new file mode 100644 index 000000000000..17b9f2f65ba0 --- /dev/null +++ b/arch/mips/configs/tb0287_defconfig | |||
@@ -0,0 +1,1041 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.13-mm1 | ||
4 | # Thu Sep 1 22:58:34 2005 | ||
5 | # | ||
6 | CONFIG_MIPS=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | CONFIG_CLEAN_COMPILE=y | ||
13 | CONFIG_BROKEN_ON_SMP=y | ||
14 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
15 | |||
16 | # | ||
17 | # General setup | ||
18 | # | ||
19 | CONFIG_LOCALVERSION="" | ||
20 | CONFIG_LOCALVERSION_AUTO=y | ||
21 | CONFIG_SWAP=y | ||
22 | CONFIG_SYSVIPC=y | ||
23 | # CONFIG_POSIX_MQUEUE is not set | ||
24 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
25 | CONFIG_SYSCTL=y | ||
26 | # CONFIG_AUDIT is not set | ||
27 | # CONFIG_HOTPLUG is not set | ||
28 | CONFIG_KOBJECT_UEVENT=y | ||
29 | # CONFIG_IKCONFIG is not set | ||
30 | CONFIG_INITRAMFS_SOURCE="" | ||
31 | CONFIG_EMBEDDED=y | ||
32 | CONFIG_KALLSYMS=y | ||
33 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
34 | CONFIG_PRINTK=y | ||
35 | CONFIG_BUG=y | ||
36 | CONFIG_BASE_FULL=y | ||
37 | CONFIG_FUTEX=y | ||
38 | CONFIG_EPOLL=y | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SHMEM=y | ||
41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
42 | CONFIG_CC_ALIGN_LABELS=0 | ||
43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
45 | # CONFIG_TINY_SHMEM is not set | ||
46 | CONFIG_BASE_SMALL=0 | ||
47 | |||
48 | # | ||
49 | # Loadable module support | ||
50 | # | ||
51 | CONFIG_MODULES=y | ||
52 | CONFIG_MODULE_UNLOAD=y | ||
53 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
54 | CONFIG_OBSOLETE_MODPARM=y | ||
55 | CONFIG_MODVERSIONS=y | ||
56 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
57 | CONFIG_KMOD=y | ||
58 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
59 | CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y | ||
60 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
61 | CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y | ||
62 | |||
63 | # | ||
64 | # Kernel type | ||
65 | # | ||
66 | CONFIG_32BIT=y | ||
67 | # CONFIG_64BIT is not set | ||
68 | |||
69 | # | ||
70 | # Machine selection | ||
71 | # | ||
72 | # CONFIG_MACH_JAZZ is not set | ||
73 | CONFIG_MACH_VR41XX=y | ||
74 | # CONFIG_NEC_CMBVR4133 is not set | ||
75 | # CONFIG_CASIO_E55 is not set | ||
76 | # CONFIG_IBM_WORKPAD is not set | ||
77 | CONFIG_TANBAC_TB022X=y | ||
78 | # CONFIG_TANBAC_TB0226 is not set | ||
79 | CONFIG_TANBAC_TB0287=y | ||
80 | # CONFIG_VICTOR_MPC30X is not set | ||
81 | # CONFIG_ZAO_CAPCELLA is not set | ||
82 | CONFIG_PCI_VR41XX=y | ||
83 | # CONFIG_VRC4173 is not set | ||
84 | # CONFIG_TOSHIBA_JMR3927 is not set | ||
85 | # CONFIG_MIPS_COBALT is not set | ||
86 | # CONFIG_MACH_DECSTATION is not set | ||
87 | # CONFIG_MIPS_EV64120 is not set | ||
88 | # CONFIG_MIPS_EV96100 is not set | ||
89 | # CONFIG_MIPS_IVR is not set | ||
90 | # CONFIG_LASAT is not set | ||
91 | # CONFIG_MIPS_ITE8172 is not set | ||
92 | # CONFIG_MIPS_ATLAS is not set | ||
93 | # CONFIG_MIPS_MALTA is not set | ||
94 | # CONFIG_MIPS_SEAD is not set | ||
95 | # CONFIG_MOMENCO_OCELOT is not set | ||
96 | # CONFIG_MOMENCO_OCELOT_G is not set | ||
97 | # CONFIG_MOMENCO_OCELOT_C is not set | ||
98 | # CONFIG_MOMENCO_OCELOT_3 is not set | ||
99 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | ||
100 | # CONFIG_PMC_YOSEMITE is not set | ||
101 | # CONFIG_DDB5074 is not set | ||
102 | # CONFIG_DDB5476 is not set | ||
103 | # CONFIG_DDB5477 is not set | ||
104 | # CONFIG_QEMU is not set | ||
105 | # CONFIG_SGI_IP22 is not set | ||
106 | # CONFIG_SGI_IP27 is not set | ||
107 | # CONFIG_SGI_IP32 is not set | ||
108 | # CONFIG_SOC_AU1X00 is not set | ||
109 | # CONFIG_SIBYTE_SB1xxx_SOC is not set | ||
110 | # CONFIG_SNI_RM200_PCI is not set | ||
111 | # CONFIG_TOSHIBA_RBTX4927 is not set | ||
112 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
113 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
114 | CONFIG_HAVE_DEC_LOCK=y | ||
115 | CONFIG_DMA_NONCOHERENT=y | ||
116 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
117 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
118 | CONFIG_IRQ_CPU=y | ||
119 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | ||
120 | |||
121 | # | ||
122 | # CPU selection | ||
123 | # | ||
124 | # CONFIG_CPU_MIPS32 is not set | ||
125 | # CONFIG_CPU_MIPS64 is not set | ||
126 | # CONFIG_CPU_R3000 is not set | ||
127 | # CONFIG_CPU_TX39XX is not set | ||
128 | CONFIG_CPU_VR41XX=y | ||
129 | # CONFIG_CPU_R4300 is not set | ||
130 | # CONFIG_CPU_R4X00 is not set | ||
131 | # CONFIG_CPU_TX49XX is not set | ||
132 | # CONFIG_CPU_R5000 is not set | ||
133 | # CONFIG_CPU_R5432 is not set | ||
134 | # CONFIG_CPU_R6000 is not set | ||
135 | # CONFIG_CPU_NEVADA is not set | ||
136 | # CONFIG_CPU_R8000 is not set | ||
137 | # CONFIG_CPU_R10000 is not set | ||
138 | # CONFIG_CPU_RM7000 is not set | ||
139 | # CONFIG_CPU_RM9000 is not set | ||
140 | # CONFIG_CPU_SB1 is not set | ||
141 | CONFIG_PAGE_SIZE_4KB=y | ||
142 | # CONFIG_PAGE_SIZE_8KB is not set | ||
143 | # CONFIG_PAGE_SIZE_16KB is not set | ||
144 | # CONFIG_PAGE_SIZE_64KB is not set | ||
145 | # CONFIG_CPU_ADVANCED is not set | ||
146 | CONFIG_CPU_HAS_SYNC=y | ||
147 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
148 | CONFIG_SELECT_MEMORY_MODEL=y | ||
149 | CONFIG_FLATMEM_MANUAL=y | ||
150 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
151 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
152 | CONFIG_FLATMEM=y | ||
153 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
154 | # CONFIG_SPARSEMEM_STATIC is not set | ||
155 | # CONFIG_PREEMPT is not set | ||
156 | |||
157 | # | ||
158 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | ||
159 | # | ||
160 | CONFIG_HW_HAS_PCI=y | ||
161 | CONFIG_PCI=y | ||
162 | # CONFIG_PCI_LEGACY_PROC is not set | ||
163 | CONFIG_MMU=y | ||
164 | |||
165 | # | ||
166 | # PCCARD (PCMCIA/CardBus) support | ||
167 | # | ||
168 | # CONFIG_PCCARD is not set | ||
169 | |||
170 | # | ||
171 | # PCI Hotplug Support | ||
172 | # | ||
173 | # CONFIG_HOTPLUG_PCI is not set | ||
174 | |||
175 | # | ||
176 | # Executable file formats | ||
177 | # | ||
178 | CONFIG_BINFMT_ELF=y | ||
179 | # CONFIG_BINFMT_MISC is not set | ||
180 | CONFIG_TRAD_SIGNALS=y | ||
181 | |||
182 | # | ||
183 | # Networking | ||
184 | # | ||
185 | CONFIG_NET=y | ||
186 | |||
187 | # | ||
188 | # Networking options | ||
189 | # | ||
190 | CONFIG_PACKET=y | ||
191 | # CONFIG_PACKET_MMAP is not set | ||
192 | CONFIG_UNIX=y | ||
193 | CONFIG_XFRM=y | ||
194 | CONFIG_XFRM_USER=m | ||
195 | # CONFIG_NET_KEY is not set | ||
196 | CONFIG_INET=y | ||
197 | CONFIG_IP_MULTICAST=y | ||
198 | CONFIG_IP_ADVANCED_ROUTER=y | ||
199 | CONFIG_ASK_IP_FIB_HASH=y | ||
200 | # CONFIG_IP_FIB_TRIE is not set | ||
201 | CONFIG_IP_FIB_HASH=y | ||
202 | CONFIG_IP_MULTIPLE_TABLES=y | ||
203 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
204 | # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set | ||
205 | CONFIG_IP_ROUTE_VERBOSE=y | ||
206 | CONFIG_IP_PNP=y | ||
207 | # CONFIG_IP_PNP_DHCP is not set | ||
208 | CONFIG_IP_PNP_BOOTP=y | ||
209 | # CONFIG_IP_PNP_RARP is not set | ||
210 | CONFIG_NET_IPIP=m | ||
211 | CONFIG_NET_IPGRE=m | ||
212 | # CONFIG_NET_IPGRE_BROADCAST is not set | ||
213 | # CONFIG_IP_MROUTE is not set | ||
214 | # CONFIG_ARPD is not set | ||
215 | CONFIG_SYN_COOKIES=y | ||
216 | # CONFIG_INET_AH is not set | ||
217 | # CONFIG_INET_ESP is not set | ||
218 | # CONFIG_INET_IPCOMP is not set | ||
219 | CONFIG_INET_TUNNEL=m | ||
220 | CONFIG_INET_DIAG=y | ||
221 | CONFIG_INET_TCP_DIAG=y | ||
222 | CONFIG_TCP_CONG_ADVANCED=y | ||
223 | |||
224 | # | ||
225 | # TCP congestion control | ||
226 | # | ||
227 | CONFIG_TCP_CONG_BIC=y | ||
228 | CONFIG_TCP_CONG_WESTWOOD=m | ||
229 | CONFIG_TCP_CONG_HTCP=m | ||
230 | # CONFIG_TCP_CONG_HSTCP is not set | ||
231 | # CONFIG_TCP_CONG_HYBLA is not set | ||
232 | # CONFIG_TCP_CONG_VEGAS is not set | ||
233 | # CONFIG_TCP_CONG_SCALABLE is not set | ||
234 | # CONFIG_IPV6 is not set | ||
235 | # CONFIG_NETFILTER is not set | ||
236 | |||
237 | # | ||
238 | # DCCP Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_IP_DCCP is not set | ||
241 | |||
242 | # | ||
243 | # SCTP Configuration (EXPERIMENTAL) | ||
244 | # | ||
245 | # CONFIG_IP_SCTP is not set | ||
246 | # CONFIG_ATM is not set | ||
247 | # CONFIG_BRIDGE is not set | ||
248 | # CONFIG_VLAN_8021Q is not set | ||
249 | # CONFIG_DECNET is not set | ||
250 | # CONFIG_LLC2 is not set | ||
251 | # CONFIG_IPX is not set | ||
252 | # CONFIG_ATALK is not set | ||
253 | # CONFIG_X25 is not set | ||
254 | # CONFIG_LAPB is not set | ||
255 | # CONFIG_NET_DIVERT is not set | ||
256 | # CONFIG_ECONET is not set | ||
257 | # CONFIG_WAN_ROUTER is not set | ||
258 | # CONFIG_NET_SCHED is not set | ||
259 | # CONFIG_NET_CLS_ROUTE is not set | ||
260 | |||
261 | # | ||
262 | # Network testing | ||
263 | # | ||
264 | # CONFIG_NET_PKTGEN is not set | ||
265 | # CONFIG_NETFILTER_NETLINK is not set | ||
266 | # CONFIG_HAMRADIO is not set | ||
267 | # CONFIG_IRDA is not set | ||
268 | # CONFIG_BT is not set | ||
269 | # CONFIG_IEEE80211 is not set | ||
270 | |||
271 | # | ||
272 | # Device Drivers | ||
273 | # | ||
274 | |||
275 | # | ||
276 | # Generic Driver Options | ||
277 | # | ||
278 | CONFIG_STANDALONE=y | ||
279 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
280 | # CONFIG_FW_LOADER is not set | ||
281 | |||
282 | # | ||
283 | # Memory Technology Devices (MTD) | ||
284 | # | ||
285 | # CONFIG_MTD is not set | ||
286 | |||
287 | # | ||
288 | # Parallel port support | ||
289 | # | ||
290 | # CONFIG_PARPORT is not set | ||
291 | |||
292 | # | ||
293 | # Plug and Play support | ||
294 | # | ||
295 | |||
296 | # | ||
297 | # Block devices | ||
298 | # | ||
299 | # CONFIG_BLK_DEV_FD is not set | ||
300 | # CONFIG_BLK_CPQ_DA is not set | ||
301 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
302 | # CONFIG_BLK_DEV_DAC960 is not set | ||
303 | # CONFIG_BLK_DEV_UMEM is not set | ||
304 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
305 | CONFIG_BLK_DEV_LOOP=m | ||
306 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
307 | CONFIG_BLK_DEV_NBD=m | ||
308 | # CONFIG_BLK_DEV_SX8 is not set | ||
309 | # CONFIG_BLK_DEV_UB is not set | ||
310 | CONFIG_BLK_DEV_RAM=y | ||
311 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
312 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
313 | # CONFIG_BLK_DEV_INITRD is not set | ||
314 | # CONFIG_LBD is not set | ||
315 | # CONFIG_CDROM_PKTCDVD is not set | ||
316 | |||
317 | # | ||
318 | # IO Schedulers | ||
319 | # | ||
320 | CONFIG_IOSCHED_NOOP=y | ||
321 | CONFIG_IOSCHED_AS=y | ||
322 | CONFIG_IOSCHED_DEADLINE=y | ||
323 | CONFIG_IOSCHED_CFQ=y | ||
324 | # CONFIG_ATA_OVER_ETH is not set | ||
325 | |||
326 | # | ||
327 | # ATA/ATAPI/MFM/RLL support | ||
328 | # | ||
329 | CONFIG_IDE=y | ||
330 | CONFIG_BLK_DEV_IDE=y | ||
331 | |||
332 | # | ||
333 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
334 | # | ||
335 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
336 | CONFIG_BLK_DEV_IDEDISK=y | ||
337 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
338 | # CONFIG_BLK_DEV_IDECD is not set | ||
339 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
340 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
341 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
342 | # CONFIG_IDE_TASK_IOCTL is not set | ||
343 | |||
344 | # | ||
345 | # IDE chipset support/bugfixes | ||
346 | # | ||
347 | CONFIG_IDE_GENERIC=y | ||
348 | CONFIG_BLK_DEV_IDEPCI=y | ||
349 | # CONFIG_IDEPCI_SHARE_IRQ is not set | ||
350 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
351 | # CONFIG_BLK_DEV_GENERIC is not set | ||
352 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
353 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
354 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
355 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
356 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
357 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
358 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
359 | # CONFIG_BLK_DEV_CMD64X is not set | ||
360 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
361 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
362 | # CONFIG_BLK_DEV_CS5520 is not set | ||
363 | # CONFIG_BLK_DEV_CS5530 is not set | ||
364 | # CONFIG_BLK_DEV_HPT34X is not set | ||
365 | # CONFIG_BLK_DEV_HPT366 is not set | ||
366 | # CONFIG_BLK_DEV_SC1200 is not set | ||
367 | # CONFIG_BLK_DEV_PIIX is not set | ||
368 | # CONFIG_BLK_DEV_IT821X is not set | ||
369 | # CONFIG_BLK_DEV_NS87415 is not set | ||
370 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
371 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
372 | # CONFIG_BLK_DEV_SVWKS is not set | ||
373 | CONFIG_BLK_DEV_SIIMAGE=y | ||
374 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
375 | # CONFIG_BLK_DEV_TRM290 is not set | ||
376 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
377 | # CONFIG_IDE_ARM is not set | ||
378 | CONFIG_BLK_DEV_IDEDMA=y | ||
379 | # CONFIG_IDEDMA_IVB is not set | ||
380 | # CONFIG_IDEDMA_AUTO is not set | ||
381 | # CONFIG_BLK_DEV_HD is not set | ||
382 | |||
383 | # | ||
384 | # SCSI device support | ||
385 | # | ||
386 | # CONFIG_RAID_ATTRS is not set | ||
387 | CONFIG_SCSI=y | ||
388 | CONFIG_SCSI_PROC_FS=y | ||
389 | |||
390 | # | ||
391 | # SCSI support type (disk, tape, CD-ROM) | ||
392 | # | ||
393 | CONFIG_BLK_DEV_SD=y | ||
394 | # CONFIG_CHR_DEV_ST is not set | ||
395 | # CONFIG_CHR_DEV_OSST is not set | ||
396 | # CONFIG_BLK_DEV_SR is not set | ||
397 | # CONFIG_CHR_DEV_SG is not set | ||
398 | # CONFIG_CHR_DEV_SCH is not set | ||
399 | |||
400 | # | ||
401 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
402 | # | ||
403 | # CONFIG_SCSI_MULTI_LUN is not set | ||
404 | # CONFIG_SCSI_CONSTANTS is not set | ||
405 | # CONFIG_SCSI_LOGGING is not set | ||
406 | |||
407 | # | ||
408 | # SCSI Transport Attributes | ||
409 | # | ||
410 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
411 | # CONFIG_SCSI_FC_ATTRS is not set | ||
412 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
413 | |||
414 | # | ||
415 | # SCSI low-level drivers | ||
416 | # | ||
417 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
418 | # CONFIG_SCSI_3W_9XXX is not set | ||
419 | # CONFIG_SCSI_ARCMSR is not set | ||
420 | # CONFIG_SCSI_ACARD is not set | ||
421 | # CONFIG_SCSI_AACRAID is not set | ||
422 | # CONFIG_SCSI_AIC7XXX is not set | ||
423 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
424 | # CONFIG_SCSI_AIC79XX is not set | ||
425 | # CONFIG_SCSI_DPT_I2O is not set | ||
426 | # CONFIG_MEGARAID_NEWGEN is not set | ||
427 | # CONFIG_MEGARAID_LEGACY is not set | ||
428 | # CONFIG_SCSI_SATA is not set | ||
429 | # CONFIG_SCSI_BUSLOGIC is not set | ||
430 | # CONFIG_SCSI_DMX3191D is not set | ||
431 | # CONFIG_SCSI_EATA is not set | ||
432 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
433 | # CONFIG_SCSI_GDTH is not set | ||
434 | # CONFIG_SCSI_IPS is not set | ||
435 | # CONFIG_SCSI_INITIO is not set | ||
436 | # CONFIG_SCSI_INIA100 is not set | ||
437 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
438 | # CONFIG_SCSI_IPR is not set | ||
439 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
440 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
441 | CONFIG_SCSI_QLA2XXX=y | ||
442 | # CONFIG_SCSI_QLA21XX is not set | ||
443 | # CONFIG_SCSI_QLA22XX is not set | ||
444 | # CONFIG_SCSI_QLA2300 is not set | ||
445 | # CONFIG_SCSI_QLA2322 is not set | ||
446 | # CONFIG_SCSI_QLA6312 is not set | ||
447 | # CONFIG_SCSI_QLA24XX is not set | ||
448 | # CONFIG_SCSI_LPFC is not set | ||
449 | # CONFIG_SCSI_DC395x is not set | ||
450 | # CONFIG_SCSI_DC390T is not set | ||
451 | # CONFIG_SCSI_NSP32 is not set | ||
452 | # CONFIG_SCSI_DEBUG is not set | ||
453 | |||
454 | # | ||
455 | # Multi-device support (RAID and LVM) | ||
456 | # | ||
457 | # CONFIG_MD is not set | ||
458 | |||
459 | # | ||
460 | # Fusion MPT device support | ||
461 | # | ||
462 | # CONFIG_FUSION is not set | ||
463 | # CONFIG_FUSION_SPI is not set | ||
464 | # CONFIG_FUSION_FC is not set | ||
465 | |||
466 | # | ||
467 | # IEEE 1394 (FireWire) support | ||
468 | # | ||
469 | CONFIG_IEEE1394=m | ||
470 | |||
471 | # | ||
472 | # Subsystem Options | ||
473 | # | ||
474 | # CONFIG_IEEE1394_VERBOSEDEBUG is not set | ||
475 | # CONFIG_IEEE1394_OUI_DB is not set | ||
476 | CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y | ||
477 | CONFIG_IEEE1394_CONFIG_ROM_IP1394=y | ||
478 | # CONFIG_IEEE1394_EXPORT_FULL_API is not set | ||
479 | |||
480 | # | ||
481 | # Device Drivers | ||
482 | # | ||
483 | |||
484 | # | ||
485 | # Texas Instruments PCILynx requires I2C | ||
486 | # | ||
487 | CONFIG_IEEE1394_OHCI1394=m | ||
488 | |||
489 | # | ||
490 | # Protocol Drivers | ||
491 | # | ||
492 | CONFIG_IEEE1394_VIDEO1394=m | ||
493 | CONFIG_IEEE1394_SBP2=m | ||
494 | # CONFIG_IEEE1394_SBP2_PHYS_DMA is not set | ||
495 | CONFIG_IEEE1394_ETH1394=m | ||
496 | CONFIG_IEEE1394_DV1394=m | ||
497 | CONFIG_IEEE1394_RAWIO=m | ||
498 | CONFIG_IEEE1394_CMP=m | ||
499 | CONFIG_IEEE1394_AMDTP=m | ||
500 | |||
501 | # | ||
502 | # I2O device support | ||
503 | # | ||
504 | # CONFIG_I2O is not set | ||
505 | |||
506 | # | ||
507 | # Network device support | ||
508 | # | ||
509 | CONFIG_NETDEVICES=y | ||
510 | CONFIG_DUMMY=m | ||
511 | # CONFIG_BONDING is not set | ||
512 | # CONFIG_EQUALIZER is not set | ||
513 | # CONFIG_TUN is not set | ||
514 | |||
515 | # | ||
516 | # ARCnet devices | ||
517 | # | ||
518 | # CONFIG_ARCNET is not set | ||
519 | |||
520 | # | ||
521 | # PHY device support | ||
522 | # | ||
523 | # CONFIG_PHYLIB is not set | ||
524 | |||
525 | # | ||
526 | # Ethernet (10 or 100Mbit) | ||
527 | # | ||
528 | CONFIG_NET_ETHERNET=y | ||
529 | CONFIG_MII=y | ||
530 | # CONFIG_HAPPYMEAL is not set | ||
531 | # CONFIG_SUNGEM is not set | ||
532 | # CONFIG_NET_VENDOR_3COM is not set | ||
533 | |||
534 | # | ||
535 | # Tulip family network device support | ||
536 | # | ||
537 | # CONFIG_NET_TULIP is not set | ||
538 | # CONFIG_HP100 is not set | ||
539 | # CONFIG_NET_PCI is not set | ||
540 | |||
541 | # | ||
542 | # Ethernet (1000 Mbit) | ||
543 | # | ||
544 | # CONFIG_ACENIC is not set | ||
545 | # CONFIG_DL2K is not set | ||
546 | # CONFIG_E1000 is not set | ||
547 | # CONFIG_NS83820 is not set | ||
548 | # CONFIG_HAMACHI is not set | ||
549 | # CONFIG_YELLOWFIN is not set | ||
550 | CONFIG_R8169=y | ||
551 | # CONFIG_R8169_NAPI is not set | ||
552 | # CONFIG_SIS190 is not set | ||
553 | # CONFIG_SKGE is not set | ||
554 | # CONFIG_SKY2 is not set | ||
555 | # CONFIG_SK98LIN is not set | ||
556 | # CONFIG_TIGON3 is not set | ||
557 | # CONFIG_BNX2 is not set | ||
558 | |||
559 | # | ||
560 | # Ethernet (10000 Mbit) | ||
561 | # | ||
562 | # CONFIG_CHELSIO_T1 is not set | ||
563 | # CONFIG_IXGB is not set | ||
564 | # CONFIG_S2IO is not set | ||
565 | |||
566 | # | ||
567 | # Token Ring devices | ||
568 | # | ||
569 | # CONFIG_TR is not set | ||
570 | |||
571 | # | ||
572 | # Wireless LAN (non-hamradio) | ||
573 | # | ||
574 | # CONFIG_NET_RADIO is not set | ||
575 | |||
576 | # | ||
577 | # Wan interfaces | ||
578 | # | ||
579 | # CONFIG_WAN is not set | ||
580 | # CONFIG_FDDI is not set | ||
581 | # CONFIG_HIPPI is not set | ||
582 | # CONFIG_PPP is not set | ||
583 | # CONFIG_SLIP is not set | ||
584 | # CONFIG_NET_FC is not set | ||
585 | # CONFIG_SHAPER is not set | ||
586 | # CONFIG_NETCONSOLE is not set | ||
587 | # CONFIG_KGDBOE is not set | ||
588 | # CONFIG_NETPOLL is not set | ||
589 | # CONFIG_NETPOLL_RX is not set | ||
590 | # CONFIG_NETPOLL_TRAP is not set | ||
591 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
592 | |||
593 | # | ||
594 | # ISDN subsystem | ||
595 | # | ||
596 | # CONFIG_ISDN is not set | ||
597 | |||
598 | # | ||
599 | # Telephony Support | ||
600 | # | ||
601 | # CONFIG_PHONE is not set | ||
602 | |||
603 | # | ||
604 | # Input device support | ||
605 | # | ||
606 | CONFIG_INPUT=y | ||
607 | |||
608 | # | ||
609 | # Userland interfaces | ||
610 | # | ||
611 | # CONFIG_INPUT_MOUSEDEV is not set | ||
612 | # CONFIG_INPUT_JOYDEV is not set | ||
613 | # CONFIG_INPUT_TSDEV is not set | ||
614 | # CONFIG_INPUT_EVDEV is not set | ||
615 | # CONFIG_INPUT_EVBUG is not set | ||
616 | |||
617 | # | ||
618 | # Input Device Drivers | ||
619 | # | ||
620 | # CONFIG_INPUT_KEYBOARD is not set | ||
621 | # CONFIG_INPUT_MOUSE is not set | ||
622 | # CONFIG_INPUT_JOYSTICK is not set | ||
623 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
624 | # CONFIG_INPUT_MISC is not set | ||
625 | |||
626 | # | ||
627 | # Hardware I/O ports | ||
628 | # | ||
629 | # CONFIG_SERIO is not set | ||
630 | # CONFIG_GAMEPORT is not set | ||
631 | |||
632 | # | ||
633 | # Character devices | ||
634 | # | ||
635 | CONFIG_VT=y | ||
636 | CONFIG_VT_CONSOLE=y | ||
637 | CONFIG_HW_CONSOLE=y | ||
638 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
639 | |||
640 | # | ||
641 | # Serial drivers | ||
642 | # | ||
643 | # CONFIG_SERIAL_8250 is not set | ||
644 | |||
645 | # | ||
646 | # Non-8250 serial port support | ||
647 | # | ||
648 | CONFIG_SERIAL_CORE=y | ||
649 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
650 | CONFIG_SERIAL_VR41XX=y | ||
651 | CONFIG_SERIAL_VR41XX_CONSOLE=y | ||
652 | # CONFIG_SERIAL_JSM is not set | ||
653 | CONFIG_UNIX98_PTYS=y | ||
654 | CONFIG_LEGACY_PTYS=y | ||
655 | CONFIG_LEGACY_PTY_COUNT=256 | ||
656 | |||
657 | # | ||
658 | # IPMI | ||
659 | # | ||
660 | # CONFIG_IPMI_HANDLER is not set | ||
661 | |||
662 | # | ||
663 | # Watchdog Cards | ||
664 | # | ||
665 | # CONFIG_WATCHDOG is not set | ||
666 | # CONFIG_RTC is not set | ||
667 | # CONFIG_GEN_RTC is not set | ||
668 | # CONFIG_RTC_VR41XX is not set | ||
669 | # CONFIG_DTLK is not set | ||
670 | # CONFIG_R3964 is not set | ||
671 | # CONFIG_APPLICOM is not set | ||
672 | # CONFIG_TANBAC_TB0219 is not set | ||
673 | |||
674 | # | ||
675 | # Ftape, the floppy tape device driver | ||
676 | # | ||
677 | # CONFIG_DRM is not set | ||
678 | CONFIG_GPIO_VR41XX=y | ||
679 | # CONFIG_RAW_DRIVER is not set | ||
680 | |||
681 | # | ||
682 | # TPM devices | ||
683 | # | ||
684 | # CONFIG_TCG_TPM is not set | ||
685 | |||
686 | # | ||
687 | # I2C support | ||
688 | # | ||
689 | # CONFIG_I2C is not set | ||
690 | |||
691 | # | ||
692 | # Dallas's 1-wire bus | ||
693 | # | ||
694 | # CONFIG_W1 is not set | ||
695 | |||
696 | # | ||
697 | # Hardware Monitoring support | ||
698 | # | ||
699 | # CONFIG_HWMON is not set | ||
700 | # CONFIG_HWMON_VID is not set | ||
701 | |||
702 | # | ||
703 | # Misc devices | ||
704 | # | ||
705 | |||
706 | # | ||
707 | # Multimedia Capabilities Port drivers | ||
708 | # | ||
709 | |||
710 | # | ||
711 | # Multimedia devices | ||
712 | # | ||
713 | # CONFIG_VIDEO_DEV is not set | ||
714 | |||
715 | # | ||
716 | # Digital Video Broadcasting Devices | ||
717 | # | ||
718 | # CONFIG_DVB is not set | ||
719 | |||
720 | # | ||
721 | # Graphics support | ||
722 | # | ||
723 | # CONFIG_FB is not set | ||
724 | |||
725 | # | ||
726 | # Console display driver support | ||
727 | # | ||
728 | # CONFIG_VGA_CONSOLE is not set | ||
729 | CONFIG_DUMMY_CONSOLE=y | ||
730 | |||
731 | # | ||
732 | # Speakup console speech | ||
733 | # | ||
734 | # CONFIG_SPEAKUP is not set | ||
735 | |||
736 | # | ||
737 | # Sound | ||
738 | # | ||
739 | # CONFIG_SOUND is not set | ||
740 | |||
741 | # | ||
742 | # USB support | ||
743 | # | ||
744 | CONFIG_USB_ARCH_HAS_HCD=y | ||
745 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
746 | CONFIG_USB=m | ||
747 | # CONFIG_USB_DEBUG is not set | ||
748 | |||
749 | # | ||
750 | # Miscellaneous USB options | ||
751 | # | ||
752 | # CONFIG_USB_DEVICEFS is not set | ||
753 | # CONFIG_USB_BANDWIDTH is not set | ||
754 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
755 | # CONFIG_USB_OTG is not set | ||
756 | |||
757 | # | ||
758 | # USB Host Controller Drivers | ||
759 | # | ||
760 | CONFIG_USB_EHCI_HCD=m | ||
761 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
762 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
763 | # CONFIG_USB_ISP116X_HCD is not set | ||
764 | CONFIG_USB_OHCI_HCD=m | ||
765 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
766 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
767 | # CONFIG_USB_UHCI_HCD is not set | ||
768 | # CONFIG_USB_SL811_HCD is not set | ||
769 | |||
770 | # | ||
771 | # USB Device Class drivers | ||
772 | # | ||
773 | # CONFIG_USB_BLUETOOTH_TTY is not set | ||
774 | # CONFIG_USB_ACM is not set | ||
775 | # CONFIG_USB_PRINTER is not set | ||
776 | |||
777 | # | ||
778 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
779 | # | ||
780 | CONFIG_USB_STORAGE=m | ||
781 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
782 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
783 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
784 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
785 | # CONFIG_USB_STORAGE_DPCM is not set | ||
786 | # CONFIG_USB_STORAGE_USBAT is not set | ||
787 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
788 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
789 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
790 | |||
791 | # | ||
792 | # USB Input Devices | ||
793 | # | ||
794 | CONFIG_USB_HID=m | ||
795 | CONFIG_USB_HIDINPUT=y | ||
796 | # CONFIG_HID_FF is not set | ||
797 | # CONFIG_USB_HIDDEV is not set | ||
798 | |||
799 | # | ||
800 | # USB HID Boot Protocol drivers | ||
801 | # | ||
802 | # CONFIG_USB_KBD is not set | ||
803 | # CONFIG_USB_MOUSE is not set | ||
804 | # CONFIG_USB_AIPTEK is not set | ||
805 | # CONFIG_USB_WACOM is not set | ||
806 | # CONFIG_USB_ACECAD is not set | ||
807 | # CONFIG_USB_KBTAB is not set | ||
808 | # CONFIG_USB_POWERMATE is not set | ||
809 | # CONFIG_USB_MTOUCH is not set | ||
810 | # CONFIG_USB_ITMTOUCH is not set | ||
811 | # CONFIG_USB_EGALAX is not set | ||
812 | # CONFIG_USB_YEALINK is not set | ||
813 | # CONFIG_USB_XPAD is not set | ||
814 | # CONFIG_USB_ATI_REMOTE is not set | ||
815 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
816 | # CONFIG_USB_APPLETOUCH is not set | ||
817 | |||
818 | # | ||
819 | # USB Imaging devices | ||
820 | # | ||
821 | # CONFIG_USB_MDC800 is not set | ||
822 | # CONFIG_USB_MICROTEK is not set | ||
823 | |||
824 | # | ||
825 | # USB Multimedia devices | ||
826 | # | ||
827 | # CONFIG_USB_DABUSB is not set | ||
828 | |||
829 | # | ||
830 | # Video4Linux support is needed for USB Multimedia device support | ||
831 | # | ||
832 | |||
833 | # | ||
834 | # USB Network Adapters | ||
835 | # | ||
836 | # CONFIG_USB_CATC is not set | ||
837 | # CONFIG_USB_KAWETH is not set | ||
838 | # CONFIG_USB_PEGASUS is not set | ||
839 | # CONFIG_USB_RTL8150 is not set | ||
840 | # CONFIG_USB_USBNET is not set | ||
841 | CONFIG_USB_MON=y | ||
842 | |||
843 | # | ||
844 | # USB port drivers | ||
845 | # | ||
846 | |||
847 | # | ||
848 | # USB Serial Converter support | ||
849 | # | ||
850 | # CONFIG_USB_SERIAL is not set | ||
851 | |||
852 | # | ||
853 | # USB Miscellaneous drivers | ||
854 | # | ||
855 | # CONFIG_USB_EMI62 is not set | ||
856 | # CONFIG_USB_EMI26 is not set | ||
857 | # CONFIG_USB_AUERSWALD is not set | ||
858 | # CONFIG_USB_RIO500 is not set | ||
859 | # CONFIG_USB_LEGOTOWER is not set | ||
860 | # CONFIG_USB_LCD is not set | ||
861 | # CONFIG_USB_LED is not set | ||
862 | # CONFIG_USB_CYTHERM is not set | ||
863 | # CONFIG_USB_GOTEMP is not set | ||
864 | # CONFIG_USB_PHIDGETKIT is not set | ||
865 | # CONFIG_USB_PHIDGETSERVO is not set | ||
866 | # CONFIG_USB_IDMOUSE is not set | ||
867 | # CONFIG_USB_SISUSBVGA is not set | ||
868 | # CONFIG_USB_LD is not set | ||
869 | |||
870 | # | ||
871 | # USB DSL modem support | ||
872 | # | ||
873 | |||
874 | # | ||
875 | # USB Gadget Support | ||
876 | # | ||
877 | # CONFIG_USB_GADGET is not set | ||
878 | |||
879 | # | ||
880 | # MMC/SD Card support | ||
881 | # | ||
882 | # CONFIG_MMC is not set | ||
883 | |||
884 | # | ||
885 | # InfiniBand support | ||
886 | # | ||
887 | # CONFIG_INFINIBAND is not set | ||
888 | |||
889 | # | ||
890 | # SN Devices | ||
891 | # | ||
892 | |||
893 | # | ||
894 | # Distributed Lock Manager | ||
895 | # | ||
896 | # CONFIG_DLM is not set | ||
897 | |||
898 | # | ||
899 | # File systems | ||
900 | # | ||
901 | CONFIG_EXT2_FS=y | ||
902 | # CONFIG_EXT2_FS_XATTR is not set | ||
903 | # CONFIG_EXT2_FS_XIP is not set | ||
904 | # CONFIG_EXT3_FS is not set | ||
905 | # CONFIG_REISER4_FS is not set | ||
906 | # CONFIG_REISERFS_FS is not set | ||
907 | # CONFIG_JFS_FS is not set | ||
908 | # CONFIG_FS_POSIX_ACL is not set | ||
909 | |||
910 | # | ||
911 | # XFS support | ||
912 | # | ||
913 | CONFIG_XFS_FS=y | ||
914 | # CONFIG_XFS_RT is not set | ||
915 | CONFIG_XFS_QUOTA=y | ||
916 | # CONFIG_XFS_SECURITY is not set | ||
917 | CONFIG_XFS_POSIX_ACL=y | ||
918 | # CONFIG_OCFS2_FS is not set | ||
919 | # CONFIG_MINIX_FS is not set | ||
920 | CONFIG_ROMFS_FS=m | ||
921 | CONFIG_INOTIFY=y | ||
922 | # CONFIG_QUOTA is not set | ||
923 | CONFIG_QUOTACTL=y | ||
924 | # CONFIG_DNOTIFY is not set | ||
925 | # CONFIG_AUTOFS_FS is not set | ||
926 | CONFIG_AUTOFS4_FS=y | ||
927 | # CONFIG_FUSE_FS is not set | ||
928 | |||
929 | # | ||
930 | # CD-ROM/DVD Filesystems | ||
931 | # | ||
932 | # CONFIG_ISO9660_FS is not set | ||
933 | # CONFIG_UDF_FS is not set | ||
934 | |||
935 | # | ||
936 | # DOS/FAT/NT Filesystems | ||
937 | # | ||
938 | # CONFIG_MSDOS_FS is not set | ||
939 | # CONFIG_VFAT_FS is not set | ||
940 | # CONFIG_NTFS_FS is not set | ||
941 | |||
942 | # | ||
943 | # Pseudo filesystems | ||
944 | # | ||
945 | CONFIG_PROC_FS=y | ||
946 | CONFIG_PROC_KCORE=y | ||
947 | CONFIG_SYSFS=y | ||
948 | CONFIG_TMPFS=y | ||
949 | # CONFIG_HUGETLB_PAGE is not set | ||
950 | CONFIG_RAMFS=y | ||
951 | # CONFIG_CONFIGFS_FS is not set | ||
952 | # CONFIG_RELAYFS_FS is not set | ||
953 | |||
954 | # | ||
955 | # Miscellaneous filesystems | ||
956 | # | ||
957 | # CONFIG_ADFS_FS is not set | ||
958 | # CONFIG_AFFS_FS is not set | ||
959 | # CONFIG_ASFS_FS is not set | ||
960 | # CONFIG_HFS_FS is not set | ||
961 | # CONFIG_HFSPLUS_FS is not set | ||
962 | # CONFIG_BEFS_FS is not set | ||
963 | # CONFIG_BFS_FS is not set | ||
964 | # CONFIG_EFS_FS is not set | ||
965 | CONFIG_CRAMFS=m | ||
966 | # CONFIG_VXFS_FS is not set | ||
967 | # CONFIG_HPFS_FS is not set | ||
968 | # CONFIG_QNX4FS_FS is not set | ||
969 | # CONFIG_SYSV_FS is not set | ||
970 | # CONFIG_UFS_FS is not set | ||
971 | |||
972 | # | ||
973 | # Network File Systems | ||
974 | # | ||
975 | CONFIG_NFS_FS=y | ||
976 | CONFIG_NFS_V3=y | ||
977 | # CONFIG_NFS_V3_ACL is not set | ||
978 | # CONFIG_NFS_V4 is not set | ||
979 | # CONFIG_NFS_DIRECTIO is not set | ||
980 | # CONFIG_NFSD is not set | ||
981 | CONFIG_ROOT_NFS=y | ||
982 | CONFIG_LOCKD=y | ||
983 | CONFIG_LOCKD_V4=y | ||
984 | CONFIG_NFS_COMMON=y | ||
985 | CONFIG_SUNRPC=y | ||
986 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
987 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
988 | # CONFIG_SMB_FS is not set | ||
989 | # CONFIG_CIFS is not set | ||
990 | # CONFIG_NCP_FS is not set | ||
991 | # CONFIG_CODA_FS is not set | ||
992 | # CONFIG_AFS_FS is not set | ||
993 | # CONFIG_9P_FS is not set | ||
994 | |||
995 | # | ||
996 | # Partition Types | ||
997 | # | ||
998 | # CONFIG_PARTITION_ADVANCED is not set | ||
999 | CONFIG_MSDOS_PARTITION=y | ||
1000 | |||
1001 | # | ||
1002 | # Native Language Support | ||
1003 | # | ||
1004 | # CONFIG_NLS is not set | ||
1005 | |||
1006 | # | ||
1007 | # Kernel hacking | ||
1008 | # | ||
1009 | # CONFIG_PRINTK_TIME is not set | ||
1010 | # CONFIG_DEBUG_KERNEL is not set | ||
1011 | CONFIG_LOG_BUF_SHIFT=14 | ||
1012 | CONFIG_CROSSCOMPILE=y | ||
1013 | CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" | ||
1014 | |||
1015 | # | ||
1016 | # Security options | ||
1017 | # | ||
1018 | CONFIG_KEYS=y | ||
1019 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
1020 | # CONFIG_SECURITY is not set | ||
1021 | |||
1022 | # | ||
1023 | # Cryptographic options | ||
1024 | # | ||
1025 | # CONFIG_CRYPTO is not set | ||
1026 | |||
1027 | # | ||
1028 | # Hardware crypto devices | ||
1029 | # | ||
1030 | |||
1031 | # | ||
1032 | # Library routines | ||
1033 | # | ||
1034 | # CONFIG_CRC_CCITT is not set | ||
1035 | # CONFIG_CRC16 is not set | ||
1036 | CONFIG_CRC32=y | ||
1037 | # CONFIG_LIBCRC32C is not set | ||
1038 | CONFIG_ZLIB_INFLATE=m | ||
1039 | CONFIG_GENERIC_HARDIRQS=y | ||
1040 | CONFIG_GENERIC_IRQ_PROBE=y | ||
1041 | CONFIG_ISA_DMA_API=y | ||
diff --git a/arch/mips/kernel/genrtc.c b/arch/mips/kernel/genrtc.c index 288bf51ad4ec..71416e7bbbaa 100644 --- a/arch/mips/kernel/genrtc.c +++ b/arch/mips/kernel/genrtc.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/rtc.h> | 14 | #include <asm/rtc.h> |
15 | #include <asm/time.h> | 15 | #include <asm/time.h> |
16 | 16 | ||
17 | static spinlock_t mips_rtc_lock = SPIN_LOCK_UNLOCKED; | 17 | static DEFINE_SPINLOCK(mips_rtc_lock); |
18 | 18 | ||
19 | unsigned int get_rtc_time(struct rtc_time *time) | 19 | unsigned int get_rtc_time(struct rtc_time *time) |
20 | { | 20 | { |
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index 7eec7568bfea..447759201d1d 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -31,7 +31,7 @@ void disable_8259A_irq(unsigned int irq); | |||
31 | * moves to arch independent land | 31 | * moves to arch independent land |
32 | */ | 32 | */ |
33 | 33 | ||
34 | spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED; | 34 | spinlock_t DEFINE_SPINLOCK(i8259A_lock); |
35 | 35 | ||
36 | static void end_8259A_irq (unsigned int irq) | 36 | static void end_8259A_irq (unsigned int irq) |
37 | { | 37 | { |
diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c index 4cd3d38a22c2..3cdc22346f4c 100644 --- a/arch/mips/kernel/irixioctl.c +++ b/arch/mips/kernel/irixioctl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/syscalls.h> | 14 | #include <linux/syscalls.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
16 | #include <linux/file.h> | 16 | #include <linux/file.h> |
17 | #include <linux/rcupdate.h> | ||
17 | 18 | ||
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
19 | #include <asm/ioctl.h> | 20 | #include <asm/ioctl.h> |
@@ -33,7 +34,7 @@ static struct tty_struct *get_tty(int fd) | |||
33 | struct file *filp; | 34 | struct file *filp; |
34 | struct tty_struct *ttyp = NULL; | 35 | struct tty_struct *ttyp = NULL; |
35 | 36 | ||
36 | spin_lock(¤t->files->file_lock); | 37 | rcu_read_lock(); |
37 | filp = fcheck(fd); | 38 | filp = fcheck(fd); |
38 | if(filp && filp->private_data) { | 39 | if(filp && filp->private_data) { |
39 | ttyp = (struct tty_struct *) filp->private_data; | 40 | ttyp = (struct tty_struct *) filp->private_data; |
@@ -41,7 +42,7 @@ static struct tty_struct *get_tty(int fd) | |||
41 | if(ttyp->magic != TTY_MAGIC) | 42 | if(ttyp->magic != TTY_MAGIC) |
42 | ttyp =NULL; | 43 | ttyp =NULL; |
43 | } | 44 | } |
44 | spin_unlock(¤t->files->file_lock); | 45 | rcu_read_unlock(); |
45 | return ttyp; | 46 | return ttyp; |
46 | } | 47 | } |
47 | 48 | ||
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 4c114ae21793..eff89322ba50 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c | |||
@@ -440,18 +440,6 @@ struct irix5_siginfo { | |||
440 | } stuff; | 440 | } stuff; |
441 | }; | 441 | }; |
442 | 442 | ||
443 | static inline unsigned long timespectojiffies(struct timespec *value) | ||
444 | { | ||
445 | unsigned long sec = (unsigned) value->tv_sec; | ||
446 | long nsec = value->tv_nsec; | ||
447 | |||
448 | if (sec > (LONG_MAX / HZ)) | ||
449 | return LONG_MAX; | ||
450 | nsec += 1000000000L / HZ - 1; | ||
451 | nsec /= 1000000000L / HZ; | ||
452 | return HZ * sec + nsec; | ||
453 | } | ||
454 | |||
455 | asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, | 443 | asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, |
456 | struct timespec *tp) | 444 | struct timespec *tp) |
457 | { | 445 | { |
@@ -489,14 +477,13 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info, | |||
489 | error = -EINVAL; | 477 | error = -EINVAL; |
490 | goto out; | 478 | goto out; |
491 | } | 479 | } |
492 | expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec); | 480 | expire = timespec_to_jiffies(tp) + (tp->tv_sec||tp->tv_nsec); |
493 | } | 481 | } |
494 | 482 | ||
495 | while(1) { | 483 | while(1) { |
496 | long tmp = 0; | 484 | long tmp = 0; |
497 | 485 | ||
498 | current->state = TASK_INTERRUPTIBLE; | 486 | expire = schedule_timeout_interruptible(expire); |
499 | expire = schedule_timeout(expire); | ||
500 | 487 | ||
501 | for (i=0; i<=4; i++) | 488 | for (i=0; i<=4; i++) |
502 | tmp |= (current->pending.signal.sig[i] & kset.sig[i]); | 489 | tmp |= (current->pending.signal.sig[i] & kset.sig[i]); |
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S index f83c31f720c4..ac68e68339db 100644 --- a/arch/mips/kernel/r2300_fpu.S +++ b/arch/mips/kernel/r2300_fpu.S | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/errno.h> | 15 | #include <asm/errno.h> |
16 | #include <asm/fpregdef.h> | 16 | #include <asm/fpregdef.h> |
17 | #include <asm/mipsregs.h> | 17 | #include <asm/mipsregs.h> |
18 | #include <asm/offset.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/regdef.h> | 19 | #include <asm/regdef.h> |
20 | 20 | ||
21 | #define EX(a,b) \ | 21 | #define EX(a,b) \ |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index f10019640ee9..0d9c4a32a9c2 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/cachectl.h> | 15 | #include <asm/cachectl.h> |
16 | #include <asm/fpregdef.h> | 16 | #include <asm/fpregdef.h> |
17 | #include <asm/mipsregs.h> | 17 | #include <asm/mipsregs.h> |
18 | #include <asm/offset.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/regdef.h> | 20 | #include <asm/regdef.h> |
21 | #include <asm/stackframe.h> | 21 | #include <asm/stackframe.h> |
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index aba665bcb386..1a14c6b18829 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/errno.h> | 17 | #include <asm/errno.h> |
18 | #include <asm/fpregdef.h> | 18 | #include <asm/fpregdef.h> |
19 | #include <asm/mipsregs.h> | 19 | #include <asm/mipsregs.h> |
20 | #include <asm/offset.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/regdef.h> | 21 | #include <asm/regdef.h> |
22 | 22 | ||
23 | .macro EX insn, reg, src | 23 | .macro EX insn, reg, src |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index e02b7722ccb8..d2afbd19a9c8 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/cachectl.h> | 15 | #include <asm/cachectl.h> |
16 | #include <asm/fpregdef.h> | 16 | #include <asm/fpregdef.h> |
17 | #include <asm/mipsregs.h> | 17 | #include <asm/mipsregs.h> |
18 | #include <asm/offset.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/pgtable-bits.h> | 20 | #include <asm/pgtable-bits.h> |
21 | #include <asm/regdef.h> | 21 | #include <asm/regdef.h> |
diff --git a/arch/mips/kernel/r6000_fpu.S b/arch/mips/kernel/r6000_fpu.S index d8d3b13fe57f..43cda53f5af6 100644 --- a/arch/mips/kernel/r6000_fpu.S +++ b/arch/mips/kernel/r6000_fpu.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/asm.h> | 13 | #include <asm/asm.h> |
14 | #include <asm/fpregdef.h> | 14 | #include <asm/fpregdef.h> |
15 | #include <asm/mipsregs.h> | 15 | #include <asm/mipsregs.h> |
16 | #include <asm/offset.h> | 16 | #include <asm/asm-offsets.h> |
17 | #include <asm/regdef.h> | 17 | #include <asm/regdef.h> |
18 | 18 | ||
19 | .set noreorder | 19 | .set noreorder |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 344f2e29eb61..17b5030fb6ea 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
21 | #include <asm/war.h> | 21 | #include <asm/war.h> |
22 | #include <asm/offset.h> | 22 | #include <asm/asm-offsets.h> |
23 | 23 | ||
24 | /* Highest syscall used of any syscall flavour */ | 24 | /* Highest syscall used of any syscall flavour */ |
25 | #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls | 25 | #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 32efb888160a..ffb22a2068bf 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/mipsregs.h> | 14 | #include <asm/mipsregs.h> |
15 | #include <asm/regdef.h> | 15 | #include <asm/regdef.h> |
16 | #include <asm/stackframe.h> | 16 | #include <asm/stackframe.h> |
17 | #include <asm/offset.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/sysmips.h> | 18 | #include <asm/sysmips.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index ae2a1312d4ef..21e3e13a4b44 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/cachectl.h> | 31 | #include <asm/cachectl.h> |
32 | #include <asm/cacheflush.h> | 32 | #include <asm/cacheflush.h> |
33 | #include <asm/ipc.h> | 33 | #include <asm/ipc.h> |
34 | #include <asm/offset.h> | 34 | #include <asm/asm-offsets.h> |
35 | #include <asm/signal.h> | 35 | #include <asm/signal.h> |
36 | #include <asm/sim.h> | 36 | #include <asm/sim.h> |
37 | #include <asm/shmparam.h> | 37 | #include <asm/shmparam.h> |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index b46595462717..4de155699c4f 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -1032,8 +1032,7 @@ bad: | |||
1032 | 1032 | ||
1033 | asmlinkage int irix_sginap(int ticks) | 1033 | asmlinkage int irix_sginap(int ticks) |
1034 | { | 1034 | { |
1035 | current->state = TASK_INTERRUPTIBLE; | 1035 | schedule_timeout_interruptible(ticks); |
1036 | schedule_timeout(ticks); | ||
1037 | return 0; | 1036 | return 0; |
1038 | } | 1037 | } |
1039 | 1038 | ||
diff --git a/arch/mips/lib-32/memset.S b/arch/mips/lib-32/memset.S index ad9ff4071ce9..1981485bd48b 100644 --- a/arch/mips/lib-32/memset.S +++ b/arch/mips/lib-32/memset.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | 12 | ||
13 | #define EX(insn,reg,addr,handler) \ | 13 | #define EX(insn,reg,addr,handler) \ |
diff --git a/arch/mips/lib-64/memset.S b/arch/mips/lib-64/memset.S index 242f1976cfaf..e2c42c85113b 100644 --- a/arch/mips/lib-64/memset.S +++ b/arch/mips/lib-64/memset.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | 12 | ||
13 | #define EX(insn,reg,addr,handler) \ | 13 | #define EX(insn,reg,addr,handler) \ |
diff --git a/arch/mips/lib/dec_and_lock.c b/arch/mips/lib/dec_and_lock.c index e44e9579bd36..fd82c84a93b7 100644 --- a/arch/mips/lib/dec_and_lock.c +++ b/arch/mips/lib/dec_and_lock.c | |||
@@ -20,14 +20,7 @@ | |||
20 | * has a cmpxchg, and where atomic->value is an int holding | 20 | * has a cmpxchg, and where atomic->value is an int holding |
21 | * the value of the atomic (i.e. the high bits aren't used | 21 | * the value of the atomic (i.e. the high bits aren't used |
22 | * for a lock or anything like that). | 22 | * for a lock or anything like that). |
23 | * | ||
24 | * N.B. ATOMIC_DEC_AND_LOCK gets defined in include/linux/spinlock.h | ||
25 | * if spinlocks are empty and thus atomic_dec_and_lock is defined | ||
26 | * to be atomic_dec_and_test - in that case we don't need it | ||
27 | * defined here as well. | ||
28 | */ | 23 | */ |
29 | |||
30 | #ifndef ATOMIC_DEC_AND_LOCK | ||
31 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | 24 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) |
32 | { | 25 | { |
33 | int counter; | 26 | int counter; |
@@ -52,4 +45,3 @@ int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | |||
52 | } | 45 | } |
53 | 46 | ||
54 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 47 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
55 | #endif /* ATOMIC_DEC_AND_LOCK */ | ||
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index 90ee8d43261f..a78865f76547 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <asm/asm.h> | 16 | #include <asm/asm.h> |
17 | #include <asm/offset.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/regdef.h> | 18 | #include <asm/regdef.h> |
19 | 19 | ||
20 | #define dst a0 | 20 | #define dst a0 |
diff --git a/arch/mips/lib/strlen_user.S b/arch/mips/lib/strlen_user.S index 07660e86c99d..eca558d83a37 100644 --- a/arch/mips/lib/strlen_user.S +++ b/arch/mips/lib/strlen_user.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (c) 1999 Silicon Graphics, Inc. | 7 | * Copyright (c) 1999 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | 12 | ||
13 | #define EX(insn,reg,addr,handler) \ | 13 | #define EX(insn,reg,addr,handler) \ |
diff --git a/arch/mips/lib/strncpy_user.S b/arch/mips/lib/strncpy_user.S index 14bed17c1648..d16c76fbfac7 100644 --- a/arch/mips/lib/strncpy_user.S +++ b/arch/mips/lib/strncpy_user.S | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | 12 | ||
13 | #define EX(insn,reg,addr,handler) \ | 13 | #define EX(insn,reg,addr,handler) \ |
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index 6e7a8eed4de8..c0ea15194a0e 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (c) 1999 Silicon Graphics, Inc. | 7 | * Copyright (c) 1999 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
12 | 12 | ||
13 | #define EX(insn,reg,addr,handler) \ | 13 | #define EX(insn,reg,addr,handler) \ |
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index c53e4cb359ba..83d81c9cdc2b 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -48,6 +48,7 @@ obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o | |||
48 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o | 48 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o |
49 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o | 49 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o |
50 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o | 50 | obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o |
51 | obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o | ||
51 | obj-$(CONFIG_TOSHIBA_JMR3927) += fixup-jmr3927.o pci-jmr3927.o | 52 | obj-$(CONFIG_TOSHIBA_JMR3927) += fixup-jmr3927.o pci-jmr3927.o |
52 | obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o ops-tx4927.o | 53 | obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o ops-tx4927.o |
53 | obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o | 54 | obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o |
diff --git a/arch/mips/pci/fixup-tb0287.c b/arch/mips/pci/fixup-tb0287.c new file mode 100644 index 000000000000..8436d7f1fdb2 --- /dev/null +++ b/arch/mips/pci/fixup-tb0287.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups. | ||
3 | * | ||
4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/pci.h> | ||
22 | |||
23 | #include <asm/vr41xx/tb0287.h> | ||
24 | |||
25 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
26 | { | ||
27 | unsigned char bus; | ||
28 | int irq = -1; | ||
29 | |||
30 | bus = dev->bus->number; | ||
31 | if (bus == 0) { | ||
32 | switch (slot) { | ||
33 | case 16: | ||
34 | irq = TB0287_SM501_IRQ; | ||
35 | break; | ||
36 | case 17: | ||
37 | irq = TB0287_SIL680A_IRQ; | ||
38 | break; | ||
39 | default: | ||
40 | break; | ||
41 | } | ||
42 | } else if (bus == 1) { | ||
43 | switch (PCI_SLOT(dev->devfn)) { | ||
44 | case 0: | ||
45 | irq = TB0287_PCI_SLOT_IRQ; | ||
46 | break; | ||
47 | case 2: | ||
48 | case 3: | ||
49 | irq = TB0287_RTL8110_IRQ; | ||
50 | break; | ||
51 | default: | ||
52 | break; | ||
53 | } | ||
54 | } else if (bus > 1) { | ||
55 | irq = TB0287_PCI_SLOT_IRQ; | ||
56 | } | ||
57 | |||
58 | return irq; | ||
59 | } | ||
60 | |||
61 | /* Do platform specific device initialization at pci_enable_device() time */ | ||
62 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
63 | { | ||
64 | return 0; | ||
65 | } | ||
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 0403d2fcb85e..3b339b1cce13 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -100,15 +100,7 @@ kernel_install: vmlinux | |||
100 | 100 | ||
101 | install: kernel_install modules_install | 101 | install: kernel_install modules_install |
102 | 102 | ||
103 | prepare: include/asm-parisc/offsets.h | 103 | CLEAN_FILES += lifimage |
104 | |||
105 | arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
106 | include/config/MARKER | ||
107 | |||
108 | include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s | ||
109 | $(call filechk,gen-asm-offsets) | ||
110 | |||
111 | CLEAN_FILES += lifimage include/asm-parisc/offsets.h | ||
112 | MRPROPER_FILES += palo.conf | 104 | MRPROPER_FILES += palo.conf |
113 | 105 | ||
114 | define archhelp | 106 | define archhelp |
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S index 2680a1c0fa77..aaaf3306c05a 100644 --- a/arch/parisc/hpux/gate.S +++ b/arch/parisc/hpux/gate.S | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/assembly.h> | 11 | #include <asm/assembly.h> |
12 | #include <asm/offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | #include <asm/unistd.h> | 13 | #include <asm/unistd.h> |
14 | #include <asm/errno.h> | 14 | #include <asm/errno.h> |
15 | 15 | ||
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S index 1aa936dfe147..0b0c3a66b1be 100644 --- a/arch/parisc/hpux/wrappers.S +++ b/arch/parisc/hpux/wrappers.S | |||
@@ -24,7 +24,7 @@ | |||
24 | #warning PA64 support needs more work...did first cut | 24 | #warning PA64 support needs more work...did first cut |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <asm/offsets.h> | 27 | #include <asm/asm-offsets.h> |
28 | #include <asm/assembly.h> | 28 | #include <asm/assembly.h> |
29 | #include <asm/signal.h> | 29 | #include <asm/signal.h> |
30 | 30 | ||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index ee58d37dbb27..be0f07f2fa58 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | 25 | #include <linux/config.h> |
26 | #include <asm/offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | /* we have the following possibilities to act on an interruption: | 28 | /* we have the following possibilities to act on an interruption: |
29 | * - handle in assembly and use shadowed registers only | 29 | * - handle in assembly and use shadowed registers only |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index ddf7e914f15e..28405edf8448 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/autoconf.h> /* for CONFIG_SMP */ | 15 | #include <linux/autoconf.h> /* for CONFIG_SMP */ |
16 | 16 | ||
17 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/psw.h> | 18 | #include <asm/psw.h> |
19 | #include <asm/pdc.h> | 19 | #include <asm/pdc.h> |
20 | 20 | ||
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 4fc04501d5e5..46b759385115 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <linux/kallsyms.h> | 47 | #include <linux/kallsyms.h> |
48 | 48 | ||
49 | #include <asm/io.h> | 49 | #include <asm/io.h> |
50 | #include <asm/offsets.h> | 50 | #include <asm/asm-offsets.h> |
51 | #include <asm/pdc.h> | 51 | #include <asm/pdc.h> |
52 | #include <asm/pdc_chassis.h> | 52 | #include <asm/pdc_chassis.h> |
53 | #include <asm/pgalloc.h> | 53 | #include <asm/pgalloc.h> |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index c07db9dff7cd..f3428e5e86fb 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
25 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
26 | #include <asm/offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | /* PSW bits we allow the debugger to modify */ | 28 | /* PSW bits we allow the debugger to modify */ |
29 | #define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) | 29 | #define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 55d71c15e1f7..0224651fd8f1 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
34 | #include <asm/cacheflush.h> | 34 | #include <asm/cacheflush.h> |
35 | #include <asm/offsets.h> | 35 | #include <asm/asm-offsets.h> |
36 | 36 | ||
37 | #ifdef CONFIG_COMPAT | 37 | #ifdef CONFIG_COMPAT |
38 | #include <linux/compat.h> | 38 | #include <linux/compat.h> |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 32ea701f4d20..8c7a7185cd3b 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * sorry about the wall, puffin.. | 7 | * sorry about the wall, puffin.. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm/offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/unistd.h> | 11 | #include <asm/unistd.h> |
12 | #include <asm/errno.h> | 12 | #include <asm/errno.h> |
13 | #include <asm/psw.h> | 13 | #include <asm/psw.h> |
diff --git a/arch/parisc/lib/Makefile b/arch/parisc/lib/Makefile index 7bf705676297..5f2e6904d14a 100644 --- a/arch/parisc/lib/Makefile +++ b/arch/parisc/lib/Makefile | |||
@@ -5,5 +5,3 @@ | |||
5 | lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o | 5 | lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o |
6 | 6 | ||
7 | obj-y := iomap.o | 7 | obj-y := iomap.o |
8 | |||
9 | lib-$(CONFIG_SMP) += debuglocks.o | ||
diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c index 2de182f6fe8a..90f400b10282 100644 --- a/arch/parisc/lib/bitops.c +++ b/arch/parisc/lib/bitops.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <asm/atomic.h> | 13 | #include <asm/atomic.h> |
14 | 14 | ||
15 | #ifdef CONFIG_SMP | 15 | #ifdef CONFIG_SMP |
16 | spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { | 16 | raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { |
17 | [0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED | 17 | [0 ... (ATOMIC_HASH_SIZE-1)] = __RAW_SPIN_LOCK_UNLOCKED |
18 | }; | 18 | }; |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/arch/parisc/lib/debuglocks.c b/arch/parisc/lib/debuglocks.c deleted file mode 100644 index 1b33fe6e5b7a..000000000000 --- a/arch/parisc/lib/debuglocks.c +++ /dev/null | |||
@@ -1,277 +0,0 @@ | |||
1 | /* | ||
2 | * Debugging versions of SMP locking primitives. | ||
3 | * | ||
4 | * Copyright (C) 2004 Thibaut VARENE <varenet@parisc-linux.org> | ||
5 | * | ||
6 | * Some code stollen from alpha & sparc64 ;) | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | * We use pdc_printf() throughout the file for all output messages, to avoid | ||
23 | * losing messages because of disabled interrupts. Since we're using these | ||
24 | * messages for debugging purposes, it makes sense not to send them to the | ||
25 | * linux console. | ||
26 | */ | ||
27 | |||
28 | |||
29 | #include <linux/config.h> | ||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/sched.h> | ||
32 | #include <linux/spinlock.h> | ||
33 | #include <linux/hardirq.h> /* in_interrupt() */ | ||
34 | #include <asm/system.h> | ||
35 | #include <asm/hardirq.h> /* in_interrupt() */ | ||
36 | #include <asm/pdc.h> | ||
37 | |||
38 | #undef INIT_STUCK | ||
39 | #define INIT_STUCK 1L << 30 | ||
40 | |||
41 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
42 | |||
43 | |||
44 | void _dbg_spin_lock(spinlock_t * lock, const char *base_file, int line_no) | ||
45 | { | ||
46 | volatile unsigned int *a; | ||
47 | long stuck = INIT_STUCK; | ||
48 | void *inline_pc = __builtin_return_address(0); | ||
49 | unsigned long started = jiffies; | ||
50 | int printed = 0; | ||
51 | int cpu = smp_processor_id(); | ||
52 | |||
53 | try_again: | ||
54 | |||
55 | /* Do the actual locking */ | ||
56 | /* <T-Bone> ggg: we can't get stuck on the outter loop? | ||
57 | * <ggg> T-Bone: We can hit the outer loop | ||
58 | * alot if multiple CPUs are constantly racing for a lock | ||
59 | * and the backplane is NOT fair about which CPU sees | ||
60 | * the update first. But it won't hang since every failed | ||
61 | * attempt will drop us back into the inner loop and | ||
62 | * decrement `stuck'. | ||
63 | * <ggg> K-class and some of the others are NOT fair in the HW | ||
64 | * implementation so we could see false positives. | ||
65 | * But fixing the lock contention is easier than | ||
66 | * fixing the HW to be fair. | ||
67 | * <tausq> __ldcw() returns 1 if we get the lock; otherwise we | ||
68 | * spin until the value of the lock changes, or we time out. | ||
69 | */ | ||
70 | mb(); | ||
71 | a = __ldcw_align(lock); | ||
72 | while (stuck && (__ldcw(a) == 0)) | ||
73 | while ((*a == 0) && --stuck); | ||
74 | mb(); | ||
75 | |||
76 | if (unlikely(stuck <= 0)) { | ||
77 | pdc_printf( | ||
78 | "%s:%d: spin_lock(%s/%p) stuck in %s at %p(%d)" | ||
79 | " owned by %s:%d in %s at %p(%d)\n", | ||
80 | base_file, line_no, lock->module, lock, | ||
81 | current->comm, inline_pc, cpu, | ||
82 | lock->bfile, lock->bline, lock->task->comm, | ||
83 | lock->previous, lock->oncpu); | ||
84 | stuck = INIT_STUCK; | ||
85 | printed = 1; | ||
86 | goto try_again; | ||
87 | } | ||
88 | |||
89 | /* Exiting. Got the lock. */ | ||
90 | lock->oncpu = cpu; | ||
91 | lock->previous = inline_pc; | ||
92 | lock->task = current; | ||
93 | lock->bfile = (char *)base_file; | ||
94 | lock->bline = line_no; | ||
95 | |||
96 | if (unlikely(printed)) { | ||
97 | pdc_printf( | ||
98 | "%s:%d: spin_lock grabbed in %s at %p(%d) %ld ticks\n", | ||
99 | base_file, line_no, current->comm, inline_pc, | ||
100 | cpu, jiffies - started); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | void _dbg_spin_unlock(spinlock_t * lock, const char *base_file, int line_no) | ||
105 | { | ||
106 | CHECK_LOCK(lock); | ||
107 | volatile unsigned int *a; | ||
108 | mb(); | ||
109 | a = __ldcw_align(lock); | ||
110 | if (unlikely((*a != 0) && lock->babble)) { | ||
111 | lock->babble--; | ||
112 | pdc_printf( | ||
113 | "%s:%d: spin_unlock(%s:%p) not locked\n", | ||
114 | base_file, line_no, lock->module, lock); | ||
115 | } | ||
116 | *a = 1; | ||
117 | mb(); | ||
118 | } | ||
119 | |||
120 | int _dbg_spin_trylock(spinlock_t * lock, const char *base_file, int line_no) | ||
121 | { | ||
122 | int ret; | ||
123 | volatile unsigned int *a; | ||
124 | mb(); | ||
125 | a = __ldcw_align(lock); | ||
126 | ret = (__ldcw(a) != 0); | ||
127 | mb(); | ||
128 | if (ret) { | ||
129 | lock->oncpu = smp_processor_id(); | ||
130 | lock->previous = __builtin_return_address(0); | ||
131 | lock->task = current; | ||
132 | } else { | ||
133 | lock->bfile = (char *)base_file; | ||
134 | lock->bline = line_no; | ||
135 | } | ||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | #endif /* CONFIG_DEBUG_SPINLOCK */ | ||
140 | |||
141 | #ifdef CONFIG_DEBUG_RWLOCK | ||
142 | |||
143 | /* Interrupts trouble detailed explanation, thx Grant: | ||
144 | * | ||
145 | * o writer (wants to modify data) attempts to acquire the rwlock | ||
146 | * o He gets the write lock. | ||
147 | * o Interupts are still enabled, we take an interrupt with the | ||
148 | * write still holding the lock. | ||
149 | * o interrupt handler tries to acquire the rwlock for read. | ||
150 | * o deadlock since the writer can't release it at this point. | ||
151 | * | ||
152 | * In general, any use of spinlocks that competes between "base" | ||
153 | * level and interrupt level code will risk deadlock. Interrupts | ||
154 | * need to be disabled in the base level routines to avoid it. | ||
155 | * Or more precisely, only the IRQ the base level routine | ||
156 | * is competing with for the lock. But it's more efficient/faster | ||
157 | * to just disable all interrupts on that CPU to guarantee | ||
158 | * once it gets the lock it can release it quickly too. | ||
159 | */ | ||
160 | |||
161 | void _dbg_write_lock(rwlock_t *rw, const char *bfile, int bline) | ||
162 | { | ||
163 | void *inline_pc = __builtin_return_address(0); | ||
164 | unsigned long started = jiffies; | ||
165 | long stuck = INIT_STUCK; | ||
166 | int printed = 0; | ||
167 | int cpu = smp_processor_id(); | ||
168 | |||
169 | if(unlikely(in_interrupt())) { /* acquiring write lock in interrupt context, bad idea */ | ||
170 | pdc_printf("write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline); | ||
171 | BUG(); | ||
172 | } | ||
173 | |||
174 | /* Note: if interrupts are disabled (which is most likely), the printk | ||
175 | will never show on the console. We might need a polling method to flush | ||
176 | the dmesg buffer anyhow. */ | ||
177 | |||
178 | retry: | ||
179 | _raw_spin_lock(&rw->lock); | ||
180 | |||
181 | if(rw->counter != 0) { | ||
182 | /* this basically never happens */ | ||
183 | _raw_spin_unlock(&rw->lock); | ||
184 | |||
185 | stuck--; | ||
186 | if ((unlikely(stuck <= 0)) && (rw->counter < 0)) { | ||
187 | pdc_printf( | ||
188 | "%s:%d: write_lock stuck on writer" | ||
189 | " in %s at %p(%d) %ld ticks\n", | ||
190 | bfile, bline, current->comm, inline_pc, | ||
191 | cpu, jiffies - started); | ||
192 | stuck = INIT_STUCK; | ||
193 | printed = 1; | ||
194 | } | ||
195 | else if (unlikely(stuck <= 0)) { | ||
196 | pdc_printf( | ||
197 | "%s:%d: write_lock stuck on reader" | ||
198 | " in %s at %p(%d) %ld ticks\n", | ||
199 | bfile, bline, current->comm, inline_pc, | ||
200 | cpu, jiffies - started); | ||
201 | stuck = INIT_STUCK; | ||
202 | printed = 1; | ||
203 | } | ||
204 | |||
205 | while(rw->counter != 0); | ||
206 | |||
207 | goto retry; | ||
208 | } | ||
209 | |||
210 | /* got it. now leave without unlocking */ | ||
211 | rw->counter = -1; /* remember we are locked */ | ||
212 | |||
213 | if (unlikely(printed)) { | ||
214 | pdc_printf( | ||
215 | "%s:%d: write_lock grabbed in %s at %p(%d) %ld ticks\n", | ||
216 | bfile, bline, current->comm, inline_pc, | ||
217 | cpu, jiffies - started); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | int _dbg_write_trylock(rwlock_t *rw, const char *bfile, int bline) | ||
222 | { | ||
223 | #if 0 | ||
224 | void *inline_pc = __builtin_return_address(0); | ||
225 | int cpu = smp_processor_id(); | ||
226 | #endif | ||
227 | |||
228 | if(unlikely(in_interrupt())) { /* acquiring write lock in interrupt context, bad idea */ | ||
229 | pdc_printf("write_lock caller: %s:%d, IRQs enabled,\n", bfile, bline); | ||
230 | BUG(); | ||
231 | } | ||
232 | |||
233 | /* Note: if interrupts are disabled (which is most likely), the printk | ||
234 | will never show on the console. We might need a polling method to flush | ||
235 | the dmesg buffer anyhow. */ | ||
236 | |||
237 | _raw_spin_lock(&rw->lock); | ||
238 | |||
239 | if(rw->counter != 0) { | ||
240 | /* this basically never happens */ | ||
241 | _raw_spin_unlock(&rw->lock); | ||
242 | return 0; | ||
243 | } | ||
244 | |||
245 | /* got it. now leave without unlocking */ | ||
246 | rw->counter = -1; /* remember we are locked */ | ||
247 | #if 0 | ||
248 | pdc_printf("%s:%d: try write_lock grabbed in %s at %p(%d)\n", | ||
249 | bfile, bline, current->comm, inline_pc, cpu); | ||
250 | #endif | ||
251 | return 1; | ||
252 | } | ||
253 | |||
254 | void _dbg_read_lock(rwlock_t * rw, const char *bfile, int bline) | ||
255 | { | ||
256 | #if 0 | ||
257 | void *inline_pc = __builtin_return_address(0); | ||
258 | unsigned long started = jiffies; | ||
259 | int cpu = smp_processor_id(); | ||
260 | #endif | ||
261 | unsigned long flags; | ||
262 | |||
263 | local_irq_save(flags); | ||
264 | _raw_spin_lock(&rw->lock); | ||
265 | |||
266 | rw->counter++; | ||
267 | #if 0 | ||
268 | pdc_printf( | ||
269 | "%s:%d: read_lock grabbed in %s at %p(%d) %ld ticks\n", | ||
270 | bfile, bline, current->comm, inline_pc, | ||
271 | cpu, jiffies - started); | ||
272 | #endif | ||
273 | _raw_spin_unlock(&rw->lock); | ||
274 | local_irq_restore(flags); | ||
275 | } | ||
276 | |||
277 | #endif /* CONFIG_DEBUG_RWLOCK */ | ||
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S index 134f0cd240f5..1b91612ed964 100644 --- a/arch/parisc/lib/fixup.S +++ b/arch/parisc/lib/fixup.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * Fixup routines for kernel exception handling. | 20 | * Fixup routines for kernel exception handling. |
21 | */ | 21 | */ |
22 | #include <linux/config.h> | 22 | #include <linux/config.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | #include <asm/assembly.h> | 24 | #include <asm/assembly.h> |
25 | #include <asm/errno.h> | 25 | #include <asm/errno.h> |
26 | 26 | ||
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index 89fe0ceeaa40..2ca9ec7ec3a7 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c | |||
@@ -1380,7 +1380,7 @@ static void cs_nosound(unsigned long xx) | |||
1380 | spin_unlock_irqrestore(&cs4218_lock, flags); | 1380 | spin_unlock_irqrestore(&cs4218_lock, flags); |
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | static struct timer_list beep_timer = TIMER_INITIALIZER(cs_nosound, 0, 0); | 1383 | static DEFINE_TIMER(beep_timer, cs_nosound, 0, 0); |
1384 | }; | 1384 | }; |
1385 | 1385 | ||
1386 | static void cs_mksound(unsigned int hz, unsigned int ticks) | 1386 | static void cs_mksound(unsigned int hz, unsigned int ticks) |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 6ab7e5ea5fcf..347ea284140b 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -265,6 +265,15 @@ config PPC601_SYNC_FIX | |||
265 | 265 | ||
266 | If in doubt, say Y here. | 266 | If in doubt, say Y here. |
267 | 267 | ||
268 | config HOTPLUG_CPU | ||
269 | bool "Support for enabling/disabling CPUs" | ||
270 | depends on SMP && HOTPLUG && EXPERIMENTAL && PPC_PMAC | ||
271 | ---help--- | ||
272 | Say Y here to be able to disable and re-enable individual | ||
273 | CPUs at runtime on SMP machines. | ||
274 | |||
275 | Say N if you are unsure. | ||
276 | |||
268 | source arch/ppc/platforms/4xx/Kconfig | 277 | source arch/ppc/platforms/4xx/Kconfig |
269 | source arch/ppc/platforms/85xx/Kconfig | 278 | source arch/ppc/platforms/85xx/Kconfig |
270 | 279 | ||
@@ -499,11 +508,6 @@ config WINCEPT | |||
499 | MPC821 PowerPC, introduced in 1998 and designed to be used in | 508 | MPC821 PowerPC, introduced in 1998 and designed to be used in |
500 | thin-client machines. Say Y to support it directly. | 509 | thin-client machines. Say Y to support it directly. |
501 | 510 | ||
502 | Be aware that PCI buses can only function when SYS board is plugged | ||
503 | into the PIB (Platform IO Board) board from Freescale which provide | ||
504 | 3 PCI slots. The PIBs PCI initialization is the bootloader's | ||
505 | responsiblilty. | ||
506 | |||
507 | endchoice | 511 | endchoice |
508 | 512 | ||
509 | choice | 513 | choice |
@@ -680,6 +684,11 @@ config MPC834x_SYS | |||
680 | help | 684 | help |
681 | This option enables support for the MPC 834x SYS evaluation board. | 685 | This option enables support for the MPC 834x SYS evaluation board. |
682 | 686 | ||
687 | Be aware that PCI buses can only function when SYS board is plugged | ||
688 | into the PIB (Platform IO Board) board from Freescale which provide | ||
689 | 3 PCI slots. The PIBs PCI initialization is the bootloader's | ||
690 | responsiblilty. | ||
691 | |||
683 | config EV64360 | 692 | config EV64360 |
684 | bool "Marvell-EV64360BP" | 693 | bool "Marvell-EV64360BP" |
685 | help | 694 | help |
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index d1b6e6dcb504..6dd7b50e0669 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile | |||
@@ -21,13 +21,14 @@ CC := $(CC) -m32 | |||
21 | endif | 21 | endif |
22 | 22 | ||
23 | LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic | 23 | LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic |
24 | CPPFLAGS += -Iarch/$(ARCH) -Iinclude3 | 24 | # The -Iarch/$(ARCH)/include is temporary while we are merging |
25 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | ||
25 | AFLAGS += -Iarch/$(ARCH) | 26 | AFLAGS += -Iarch/$(ARCH) |
26 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ | 27 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ |
27 | -ffixed-r2 -mmultiple | 28 | -ffixed-r2 -mmultiple |
28 | CPP = $(CC) -E $(CFLAGS) | 29 | CPP = $(CC) -E $(CFLAGS) |
29 | # Temporary hack until we have migrated to asm-powerpc | 30 | # Temporary hack until we have migrated to asm-powerpc |
30 | LINUXINCLUDE += -Iinclude3 | 31 | LINUXINCLUDE += -Iarch/$(ARCH)/include |
31 | 32 | ||
32 | CHECKFLAGS += -D__powerpc__ | 33 | CHECKFLAGS += -D__powerpc__ |
33 | 34 | ||
@@ -103,21 +104,16 @@ endef | |||
103 | 104 | ||
104 | archclean: | 105 | archclean: |
105 | $(Q)$(MAKE) $(clean)=arch/ppc/boot | 106 | $(Q)$(MAKE) $(clean)=arch/ppc/boot |
106 | $(Q)rm -rf include3 | 107 | # Temporary hack until we have migrated to asm-powerpc |
108 | $(Q)rm -rf arch/$(ARCH)/include | ||
107 | 109 | ||
108 | prepare: include/asm-$(ARCH)/offsets.h checkbin | 110 | prepare: checkbin |
109 | |||
110 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
111 | include/config/MARKER | ||
112 | |||
113 | include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
114 | $(call filechk,gen-asm-offsets) | ||
115 | 111 | ||
116 | # Temporary hack until we have migrated to asm-powerpc | 112 | # Temporary hack until we have migrated to asm-powerpc |
117 | include/asm: include3/asm | 113 | include/asm: arch/$(ARCH)/include/asm |
118 | include3/asm: | 114 | arch/$(ARCH)/include/asm: |
119 | $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi | 115 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi |
120 | $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm | 116 | $(Q)ln -fsn $(srctree)/include/asm-powerpc arch/$(ARCH)/include/asm |
121 | 117 | ||
122 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 118 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
123 | # to stdout and these checks are run even on install targets. | 119 | # to stdout and these checks are run even on install targets. |
@@ -143,7 +139,5 @@ checkbin: | |||
143 | false ; \ | 139 | false ; \ |
144 | fi | 140 | fi |
145 | 141 | ||
146 | CLEAN_FILES += include/asm-$(ARCH)/offsets.h \ | 142 | CLEAN_FILES += $(TOUT) |
147 | arch/$(ARCH)/kernel/asm-offsets.s \ | ||
148 | $(TOUT) | ||
149 | 143 | ||
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index 9017c547a6f6..26818bbb6cff 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c | |||
@@ -23,7 +23,7 @@ static int shift; | |||
23 | 23 | ||
24 | unsigned long serial_init(int chan, void *ignored) | 24 | unsigned long serial_init(int chan, void *ignored) |
25 | { | 25 | { |
26 | unsigned long com_port; | 26 | unsigned long com_port, base_baud; |
27 | unsigned char lcr, dlm; | 27 | unsigned char lcr, dlm; |
28 | 28 | ||
29 | /* We need to find out which type io we're expecting. If it's | 29 | /* We need to find out which type io we're expecting. If it's |
@@ -43,6 +43,8 @@ unsigned long serial_init(int chan, void *ignored) | |||
43 | 43 | ||
44 | /* How far apart the registers are. */ | 44 | /* How far apart the registers are. */ |
45 | shift = rs_table[chan].iomem_reg_shift; | 45 | shift = rs_table[chan].iomem_reg_shift; |
46 | /* Base baud.. */ | ||
47 | base_baud = rs_table[chan].baud_base; | ||
46 | 48 | ||
47 | /* save the LCR */ | 49 | /* save the LCR */ |
48 | lcr = inb(com_port + (UART_LCR << shift)); | 50 | lcr = inb(com_port + (UART_LCR << shift)); |
@@ -62,9 +64,9 @@ unsigned long serial_init(int chan, void *ignored) | |||
62 | else { | 64 | else { |
63 | /* Input clock. */ | 65 | /* Input clock. */ |
64 | outb(com_port + (UART_DLL << shift), | 66 | outb(com_port + (UART_DLL << shift), |
65 | (BASE_BAUD / SERIAL_BAUD) & 0xFF); | 67 | (base_baud / SERIAL_BAUD) & 0xFF); |
66 | outb(com_port + (UART_DLM << shift), | 68 | outb(com_port + (UART_DLM << shift), |
67 | (BASE_BAUD / SERIAL_BAUD) >> 8); | 69 | (base_baud / SERIAL_BAUD) >> 8); |
68 | /* 8 data, 1 stop, no parity */ | 70 | /* 8 data, 1 stop, no parity */ |
69 | outb(com_port + (UART_LCR << shift), 0x03); | 71 | outb(com_port + (UART_LCR << shift), 0x03); |
70 | /* RTS/DTR */ | 72 | /* RTS/DTR */ |
diff --git a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S index 47e641455bc5..c96c9f80521e 100644 --- a/arch/ppc/boot/common/util.S +++ b/arch/ppc/boot/common/util.S | |||
@@ -252,7 +252,7 @@ _GLOBAL(flush_instruction_cache) | |||
252 | 1: dcbf r0,r3 # Flush the data cache | 252 | 1: dcbf r0,r3 # Flush the data cache |
253 | icbi r0,r3 # Invalidate the instruction cache | 253 | icbi r0,r3 # Invalidate the instruction cache |
254 | addi r3,r3,0x10 # Increment by one cache line | 254 | addi r3,r3,0x10 # Increment by one cache line |
255 | cmplwi cr0,r3,r4 # Are we at the end yet? | 255 | cmplw cr0,r3,r4 # Are we at the end yet? |
256 | blt 1b # No, keep flushing and invalidating | 256 | blt 1b # No, keep flushing and invalidating |
257 | #else | 257 | #else |
258 | /* Enable, invalidate and then disable the L1 icache/dcache. */ | 258 | /* Enable, invalidate and then disable the L1 icache/dcache. */ |
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index b1457a8a9c0f..1fb92f16acd6 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile | |||
@@ -15,8 +15,9 @@ extra-y += vmlinux.lds | |||
15 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ | 15 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ |
16 | process.o signal.o ptrace.o align.o \ | 16 | process.o signal.o ptrace.o align.o \ |
17 | semaphore.o syscalls.o setup.o \ | 17 | semaphore.o syscalls.o setup.o \ |
18 | cputable.o ppc_htab.o perfmon.o | 18 | cputable.o ppc_htab.o |
19 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o | 19 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o |
20 | obj-$(CONFIG_E500) += perfmon.o | ||
20 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o | 21 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o |
21 | obj-$(CONFIG_POWER4) += cpu_setup_power4.o | 22 | obj-$(CONFIG_POWER4) += cpu_setup_power4.o |
22 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o | 23 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o |
diff --git a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S index bd037caa4055..ba396438ede3 100644 --- a/arch/ppc/kernel/cpu_setup_6xx.S +++ b/arch/ppc/kernel/cpu_setup_6xx.S | |||
@@ -12,10 +12,9 @@ | |||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/ppc_asm.h> | ||
16 | #include <asm/cputable.h> | 15 | #include <asm/cputable.h> |
17 | #include <asm/ppc_asm.h> | 16 | #include <asm/ppc_asm.h> |
18 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
19 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
20 | 19 | ||
21 | _GLOBAL(__setup_cpu_601) | 20 | _GLOBAL(__setup_cpu_601) |
diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S index f2ea1a990f17..7e4fbb653724 100644 --- a/arch/ppc/kernel/cpu_setup_power4.S +++ b/arch/ppc/kernel/cpu_setup_power4.S | |||
@@ -14,8 +14,7 @@ | |||
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/ppc_asm.h> | 15 | #include <asm/ppc_asm.h> |
16 | #include <asm/cputable.h> | 16 | #include <asm/cputable.h> |
17 | #include <asm/ppc_asm.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/offsets.h> | ||
19 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
20 | 19 | ||
21 | _GLOBAL(__970_cpu_preinit) | 20 | _GLOBAL(__970_cpu_preinit) |
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index e0c631cf96b0..b566d982806c 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c | |||
@@ -393,7 +393,7 @@ EXPORT_SYMBOL(__dma_sync); | |||
393 | * __dma_sync_page() implementation for systems using highmem. | 393 | * __dma_sync_page() implementation for systems using highmem. |
394 | * In this case, each page of a buffer must be kmapped/kunmapped | 394 | * In this case, each page of a buffer must be kmapped/kunmapped |
395 | * in order to have a virtual address for __dma_sync(). This must | 395 | * in order to have a virtual address for __dma_sync(). This must |
396 | * not sleep so kmap_atmomic()/kunmap_atomic() are used. | 396 | * not sleep so kmap_atomic()/kunmap_atomic() are used. |
397 | * | 397 | * |
398 | * Note: yes, it is possible and correct to have a buffer extend | 398 | * Note: yes, it is possible and correct to have a buffer extend |
399 | * beyond the first page. | 399 | * beyond the first page. |
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index cb83045e2edf..03d4886869f3 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/cputable.h> | 29 | #include <asm/cputable.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/ppc_asm.h> | 31 | #include <asm/ppc_asm.h> |
32 | #include <asm/offsets.h> | 32 | #include <asm/asm-offsets.h> |
33 | #include <asm/unistd.h> | 33 | #include <asm/unistd.h> |
34 | 34 | ||
35 | #undef SHOW_SYSCALLS | 35 | #undef SHOW_SYSCALLS |
diff --git a/arch/ppc/kernel/fpu.S b/arch/ppc/kernel/fpu.S index 6189b26f640f..665d7d34304c 100644 --- a/arch/ppc/kernel/fpu.S +++ b/arch/ppc/kernel/fpu.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/ppc_asm.h> | 20 | #include <asm/ppc_asm.h> |
21 | #include <asm/offsets.h> | 21 | #include <asm/asm-offsets.h> |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * This task wants to use the FPU now. | 24 | * This task wants to use the FPU now. |
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index a931d773715f..1960fb8c259c 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/cache.h> | 31 | #include <asm/cache.h> |
32 | #include <asm/thread_info.h> | 32 | #include <asm/thread_info.h> |
33 | #include <asm/ppc_asm.h> | 33 | #include <asm/ppc_asm.h> |
34 | #include <asm/offsets.h> | 34 | #include <asm/asm-offsets.h> |
35 | 35 | ||
36 | #ifdef CONFIG_APUS | 36 | #ifdef CONFIG_APUS |
37 | #include <asm/amigappc.h> | 37 | #include <asm/amigappc.h> |
@@ -1023,23 +1023,21 @@ __secondary_start_gemini: | |||
1023 | andc r4,r4,r3 | 1023 | andc r4,r4,r3 |
1024 | mtspr SPRN_HID0,r4 | 1024 | mtspr SPRN_HID0,r4 |
1025 | sync | 1025 | sync |
1026 | bl gemini_prom_init | ||
1027 | b __secondary_start | 1026 | b __secondary_start |
1028 | #endif /* CONFIG_GEMINI */ | 1027 | #endif /* CONFIG_GEMINI */ |
1029 | .globl __secondary_start_psurge | 1028 | |
1030 | __secondary_start_psurge: | 1029 | .globl __secondary_start_pmac_0 |
1031 | li r24,1 /* cpu # */ | 1030 | __secondary_start_pmac_0: |
1032 | b __secondary_start_psurge99 | 1031 | /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */ |
1033 | .globl __secondary_start_psurge2 | 1032 | li r24,0 |
1034 | __secondary_start_psurge2: | 1033 | b 1f |
1035 | li r24,2 /* cpu # */ | 1034 | li r24,1 |
1036 | b __secondary_start_psurge99 | 1035 | b 1f |
1037 | .globl __secondary_start_psurge3 | 1036 | li r24,2 |
1038 | __secondary_start_psurge3: | 1037 | b 1f |
1039 | li r24,3 /* cpu # */ | 1038 | li r24,3 |
1040 | b __secondary_start_psurge99 | 1039 | 1: |
1041 | __secondary_start_psurge99: | 1040 | /* on powersurge, we come in here with IR=0 and DR=1, and DBAT 0 |
1042 | /* we come in here with IR=0 and DR=1, and DBAT 0 | ||
1043 | set to map the 0xf0000000 - 0xffffffff region */ | 1041 | set to map the 0xf0000000 - 0xffffffff region */ |
1044 | mfmsr r0 | 1042 | mfmsr r0 |
1045 | rlwinm r0,r0,0,28,26 /* clear DR (0x10) */ | 1043 | rlwinm r0,r0,0,28,26 /* clear DR (0x10) */ |
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 9e68e32edb60..599245b0407e 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/cputable.h> | 40 | #include <asm/cputable.h> |
41 | #include <asm/thread_info.h> | 41 | #include <asm/thread_info.h> |
42 | #include <asm/ppc_asm.h> | 42 | #include <asm/ppc_asm.h> |
43 | #include <asm/offsets.h> | 43 | #include <asm/asm-offsets.h> |
44 | #include "head_booke.h" | 44 | #include "head_booke.h" |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index ca9518b96c6e..8562b807b37c 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/cputable.h> | 40 | #include <asm/cputable.h> |
41 | #include <asm/thread_info.h> | 41 | #include <asm/thread_info.h> |
42 | #include <asm/ppc_asm.h> | 42 | #include <asm/ppc_asm.h> |
43 | #include <asm/offsets.h> | 43 | #include <asm/asm-offsets.h> |
44 | 44 | ||
45 | /* As with the other PowerPC ports, it is expected that when code | 45 | /* As with the other PowerPC ports, it is expected that when code |
46 | * execution begins here, the following registers contain valid, yet | 46 | * execution begins here, the following registers contain valid, yet |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index eb18cadb3755..cb1a3a54a026 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | #include <asm/ppc_asm.h> | 32 | #include <asm/ppc_asm.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | 34 | ||
35 | /* Macro to make the code more readable. */ | 35 | /* Macro to make the code more readable. */ |
36 | #ifdef CONFIG_8xx_CPU6 | 36 | #ifdef CONFIG_8xx_CPU6 |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 4028f4c7d978..8e52e8408316 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <asm/cputable.h> | 41 | #include <asm/cputable.h> |
42 | #include <asm/thread_info.h> | 42 | #include <asm/thread_info.h> |
43 | #include <asm/ppc_asm.h> | 43 | #include <asm/ppc_asm.h> |
44 | #include <asm/offsets.h> | 44 | #include <asm/asm-offsets.h> |
45 | #include "head_booke.h" | 45 | #include "head_booke.h" |
46 | 46 | ||
47 | /* As with the other PowerPC ports, it is expected that when code | 47 | /* As with the other PowerPC ports, it is expected that when code |
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c index 53547b6de45b..fba29c876b62 100644 --- a/arch/ppc/kernel/idle.c +++ b/arch/ppc/kernel/idle.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/sysctl.h> | 24 | #include <linux/sysctl.h> |
25 | #include <linux/cpu.h> | ||
25 | 26 | ||
26 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
@@ -35,6 +36,7 @@ | |||
35 | void default_idle(void) | 36 | void default_idle(void) |
36 | { | 37 | { |
37 | void (*powersave)(void); | 38 | void (*powersave)(void); |
39 | int cpu = smp_processor_id(); | ||
38 | 40 | ||
39 | powersave = ppc_md.power_save; | 41 | powersave = ppc_md.power_save; |
40 | 42 | ||
@@ -44,7 +46,7 @@ void default_idle(void) | |||
44 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
45 | else { | 47 | else { |
46 | set_thread_flag(TIF_POLLING_NRFLAG); | 48 | set_thread_flag(TIF_POLLING_NRFLAG); |
47 | while (!need_resched()) | 49 | while (!need_resched() && !cpu_is_offline(cpu)) |
48 | barrier(); | 50 | barrier(); |
49 | clear_thread_flag(TIF_POLLING_NRFLAG); | 51 | clear_thread_flag(TIF_POLLING_NRFLAG); |
50 | } | 52 | } |
@@ -52,6 +54,8 @@ void default_idle(void) | |||
52 | } | 54 | } |
53 | if (need_resched()) | 55 | if (need_resched()) |
54 | schedule(); | 56 | schedule(); |
57 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | ||
58 | cpu_die(); | ||
55 | } | 59 | } |
56 | 60 | ||
57 | /* | 61 | /* |
diff --git a/arch/ppc/kernel/idle_6xx.S b/arch/ppc/kernel/idle_6xx.S index 25d009c75f7b..1a2194cf6828 100644 --- a/arch/ppc/kernel/idle_6xx.S +++ b/arch/ppc/kernel/idle_6xx.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
22 | #include <asm/ppc_asm.h> | 22 | #include <asm/ppc_asm.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
26 | 26 | ||
diff --git a/arch/ppc/kernel/idle_power4.S b/arch/ppc/kernel/idle_power4.S index 73a58ff03900..cc0d535365cd 100644 --- a/arch/ppc/kernel/idle_power4.S +++ b/arch/ppc/kernel/idle_power4.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
22 | #include <asm/ppc_asm.h> | 22 | #include <asm/ppc_asm.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
26 | 26 | ||
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index ce71b4a01585..90d917d2e856 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/mmu.h> | 23 | #include <asm/mmu.h> |
24 | #include <asm/ppc_asm.h> | 24 | #include <asm/ppc_asm.h> |
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | #include <asm/offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | .text | 28 | .text |
29 | 29 | ||
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index e70b587b9e51..726fe7ce1747 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c | |||
@@ -45,6 +45,7 @@ cpumask_t cpu_online_map; | |||
45 | cpumask_t cpu_possible_map; | 45 | cpumask_t cpu_possible_map; |
46 | int smp_hw_index[NR_CPUS]; | 46 | int smp_hw_index[NR_CPUS]; |
47 | struct thread_info *secondary_ti; | 47 | struct thread_info *secondary_ti; |
48 | static struct task_struct *idle_tasks[NR_CPUS]; | ||
48 | 49 | ||
49 | EXPORT_SYMBOL(cpu_online_map); | 50 | EXPORT_SYMBOL(cpu_online_map); |
50 | EXPORT_SYMBOL(cpu_possible_map); | 51 | EXPORT_SYMBOL(cpu_possible_map); |
@@ -286,7 +287,8 @@ static void __devinit smp_store_cpu_info(int id) | |||
286 | 287 | ||
287 | void __init smp_prepare_cpus(unsigned int max_cpus) | 288 | void __init smp_prepare_cpus(unsigned int max_cpus) |
288 | { | 289 | { |
289 | int num_cpus, i; | 290 | int num_cpus, i, cpu; |
291 | struct task_struct *p; | ||
290 | 292 | ||
291 | /* Fixup boot cpu */ | 293 | /* Fixup boot cpu */ |
292 | smp_store_cpu_info(smp_processor_id()); | 294 | smp_store_cpu_info(smp_processor_id()); |
@@ -308,6 +310,17 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
308 | 310 | ||
309 | if (smp_ops->space_timers) | 311 | if (smp_ops->space_timers) |
310 | smp_ops->space_timers(num_cpus); | 312 | smp_ops->space_timers(num_cpus); |
313 | |||
314 | for_each_cpu(cpu) { | ||
315 | if (cpu == smp_processor_id()) | ||
316 | continue; | ||
317 | /* create a process for the processor */ | ||
318 | p = fork_idle(cpu); | ||
319 | if (IS_ERR(p)) | ||
320 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
321 | p->thread_info->cpu = cpu; | ||
322 | idle_tasks[cpu] = p; | ||
323 | } | ||
311 | } | 324 | } |
312 | 325 | ||
313 | void __devinit smp_prepare_boot_cpu(void) | 326 | void __devinit smp_prepare_boot_cpu(void) |
@@ -334,12 +347,17 @@ int __devinit start_secondary(void *unused) | |||
334 | set_dec(tb_ticks_per_jiffy); | 347 | set_dec(tb_ticks_per_jiffy); |
335 | cpu_callin_map[cpu] = 1; | 348 | cpu_callin_map[cpu] = 1; |
336 | 349 | ||
337 | printk("CPU %i done callin...\n", cpu); | 350 | printk("CPU %d done callin...\n", cpu); |
338 | smp_ops->setup_cpu(cpu); | 351 | smp_ops->setup_cpu(cpu); |
339 | printk("CPU %i done setup...\n", cpu); | 352 | printk("CPU %d done setup...\n", cpu); |
340 | local_irq_enable(); | ||
341 | smp_ops->take_timebase(); | 353 | smp_ops->take_timebase(); |
342 | printk("CPU %i done timebase take...\n", cpu); | 354 | printk("CPU %d done timebase take...\n", cpu); |
355 | |||
356 | spin_lock(&call_lock); | ||
357 | cpu_set(cpu, cpu_online_map); | ||
358 | spin_unlock(&call_lock); | ||
359 | |||
360 | local_irq_enable(); | ||
343 | 361 | ||
344 | cpu_idle(); | 362 | cpu_idle(); |
345 | return 0; | 363 | return 0; |
@@ -347,17 +365,11 @@ int __devinit start_secondary(void *unused) | |||
347 | 365 | ||
348 | int __cpu_up(unsigned int cpu) | 366 | int __cpu_up(unsigned int cpu) |
349 | { | 367 | { |
350 | struct task_struct *p; | ||
351 | char buf[32]; | 368 | char buf[32]; |
352 | int c; | 369 | int c; |
353 | 370 | ||
354 | /* create a process for the processor */ | 371 | secondary_ti = idle_tasks[cpu]->thread_info; |
355 | /* only regs.msr is actually used, and 0 is OK for it */ | 372 | mb(); |
356 | p = fork_idle(cpu); | ||
357 | if (IS_ERR(p)) | ||
358 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
359 | secondary_ti = p->thread_info; | ||
360 | p->thread_info->cpu = cpu; | ||
361 | 373 | ||
362 | /* | 374 | /* |
363 | * There was a cache flush loop here to flush the cache | 375 | * There was a cache flush loop here to flush the cache |
@@ -389,7 +401,11 @@ int __cpu_up(unsigned int cpu) | |||
389 | printk("Processor %d found.\n", cpu); | 401 | printk("Processor %d found.\n", cpu); |
390 | 402 | ||
391 | smp_ops->give_timebase(); | 403 | smp_ops->give_timebase(); |
392 | cpu_set(cpu, cpu_online_map); | 404 | |
405 | /* Wait until cpu puts itself in the online map */ | ||
406 | while (!cpu_online(cpu)) | ||
407 | cpu_relax(); | ||
408 | |||
393 | return 0; | 409 | return 0; |
394 | } | 410 | } |
395 | 411 | ||
diff --git a/arch/ppc/kernel/swsusp.S b/arch/ppc/kernel/swsusp.S index 55148bb88d39..69773cc1a85f 100644 --- a/arch/ppc/kernel/swsusp.S +++ b/arch/ppc/kernel/swsusp.S | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <asm/cputable.h> | 5 | #include <asm/cputable.h> |
6 | #include <asm/thread_info.h> | 6 | #include <asm/thread_info.h> |
7 | #include <asm/ppc_asm.h> | 7 | #include <asm/ppc_asm.h> |
8 | #include <asm/offsets.h> | 8 | #include <asm/asm-offsets.h> |
9 | 9 | ||
10 | 10 | ||
11 | /* | 11 | /* |
diff --git a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c index 124313ce3c09..127f040de9de 100644 --- a/arch/ppc/kernel/syscalls.c +++ b/arch/ppc/kernel/syscalls.c | |||
@@ -41,10 +41,6 @@ | |||
41 | #include <asm/ipc.h> | 41 | #include <asm/ipc.h> |
42 | #include <asm/semaphore.h> | 42 | #include <asm/semaphore.h> |
43 | 43 | ||
44 | void | ||
45 | check_bugs(void) | ||
46 | { | ||
47 | } | ||
48 | 44 | ||
49 | /* | 45 | /* |
50 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | 46 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index d87423d1003a..961ede87be72 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -118,6 +118,28 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
118 | info.si_code = code; | 118 | info.si_code = code; |
119 | info.si_addr = (void __user *) addr; | 119 | info.si_addr = (void __user *) addr; |
120 | force_sig_info(signr, &info, current); | 120 | force_sig_info(signr, &info, current); |
121 | |||
122 | /* | ||
123 | * Init gets no signals that it doesn't have a handler for. | ||
124 | * That's all very well, but if it has caused a synchronous | ||
125 | * exception and we ignore the resulting signal, it will just | ||
126 | * generate the same exception over and over again and we get | ||
127 | * nowhere. Better to kill it and let the kernel panic. | ||
128 | */ | ||
129 | if (current->pid == 1) { | ||
130 | __sighandler_t handler; | ||
131 | |||
132 | spin_lock_irq(¤t->sighand->siglock); | ||
133 | handler = current->sighand->action[signr-1].sa.sa_handler; | ||
134 | spin_unlock_irq(¤t->sighand->siglock); | ||
135 | if (handler == SIG_DFL) { | ||
136 | /* init has generated a synchronous exception | ||
137 | and it doesn't have a handler for the signal */ | ||
138 | printk(KERN_CRIT "init has generated signal %d " | ||
139 | "but has no handler for it\n", signr); | ||
140 | do_exit(signr); | ||
141 | } | ||
142 | } | ||
121 | } | 143 | } |
122 | 144 | ||
123 | /* | 145 | /* |
@@ -849,10 +871,12 @@ void AltivecAssistException(struct pt_regs *regs) | |||
849 | } | 871 | } |
850 | #endif /* CONFIG_ALTIVEC */ | 872 | #endif /* CONFIG_ALTIVEC */ |
851 | 873 | ||
874 | #ifdef CONFIG_E500 | ||
852 | void PerformanceMonitorException(struct pt_regs *regs) | 875 | void PerformanceMonitorException(struct pt_regs *regs) |
853 | { | 876 | { |
854 | perf_irq(regs); | 877 | perf_irq(regs); |
855 | } | 878 | } |
879 | #endif | ||
856 | 880 | ||
857 | #ifdef CONFIG_FSL_BOOKE | 881 | #ifdef CONFIG_FSL_BOOKE |
858 | void CacheLockingException(struct pt_regs *regs, unsigned long address, | 882 | void CacheLockingException(struct pt_regs *regs, unsigned long address, |
diff --git a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile index 1c380e67d435..f1e1fb4144f0 100644 --- a/arch/ppc/lib/Makefile +++ b/arch/ppc/lib/Makefile | |||
@@ -4,6 +4,5 @@ | |||
4 | 4 | ||
5 | obj-y := checksum.o string.o strcase.o dec_and_lock.o div64.o | 5 | obj-y := checksum.o string.o strcase.o dec_and_lock.o div64.o |
6 | 6 | ||
7 | obj-$(CONFIG_SMP) += locks.o | ||
8 | obj-$(CONFIG_8xx) += rheap.o | 7 | obj-$(CONFIG_8xx) += rheap.o |
9 | obj-$(CONFIG_CPM2) += rheap.o | 8 | obj-$(CONFIG_CPM2) += rheap.o |
diff --git a/arch/ppc/lib/dec_and_lock.c b/arch/ppc/lib/dec_and_lock.c index 4ee888070d91..b18f0d9a00fc 100644 --- a/arch/ppc/lib/dec_and_lock.c +++ b/arch/ppc/lib/dec_and_lock.c | |||
@@ -11,14 +11,7 @@ | |||
11 | * has a cmpxchg, and where atomic->value is an int holding | 11 | * has a cmpxchg, and where atomic->value is an int holding |
12 | * the value of the atomic (i.e. the high bits aren't used | 12 | * the value of the atomic (i.e. the high bits aren't used |
13 | * for a lock or anything like that). | 13 | * for a lock or anything like that). |
14 | * | ||
15 | * N.B. ATOMIC_DEC_AND_LOCK gets defined in include/linux/spinlock.h | ||
16 | * if spinlocks are empty and thus atomic_dec_and_lock is defined | ||
17 | * to be atomic_dec_and_test - in that case we don't need it | ||
18 | * defined here as well. | ||
19 | */ | 14 | */ |
20 | |||
21 | #ifndef ATOMIC_DEC_AND_LOCK | ||
22 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | 15 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) |
23 | { | 16 | { |
24 | int counter; | 17 | int counter; |
@@ -43,4 +36,3 @@ int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | |||
43 | } | 36 | } |
44 | 37 | ||
45 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 38 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
46 | #endif /* ATOMIC_DEC_AND_LOCK */ | ||
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index 57d9930843ac..ee5e9f25baf9 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -278,11 +278,7 @@ bad_area: | |||
278 | 278 | ||
279 | /* User mode accesses cause a SIGSEGV */ | 279 | /* User mode accesses cause a SIGSEGV */ |
280 | if (user_mode(regs)) { | 280 | if (user_mode(regs)) { |
281 | info.si_signo = SIGSEGV; | 281 | _exception(SIGSEGV, regs, code, address); |
282 | info.si_errno = 0; | ||
283 | info.si_code = code; | ||
284 | info.si_addr = (void __user *) address; | ||
285 | force_sig_info(SIGSEGV, &info, current); | ||
286 | return 0; | 282 | return 0; |
287 | } | 283 | } |
288 | 284 | ||
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index ab83132a7ed0..3ec87c91343e 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
31 | #include <asm/ppc_asm.h> | 31 | #include <asm/ppc_asm.h> |
32 | #include <asm/thread_info.h> | 32 | #include <asm/thread_info.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | 34 | ||
35 | #ifdef CONFIG_SMP | 35 | #ifdef CONFIG_SMP |
36 | .comm mmu_hash_lock,4 | 36 | .comm mmu_hash_lock,4 |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 0fd3442f5131..d6b2b1965dcb 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -91,15 +91,10 @@ ebony_calibrate_decr(void) | |||
91 | * on Rev. C silicon then errata forces us to | 91 | * on Rev. C silicon then errata forces us to |
92 | * use the internal clock. | 92 | * use the internal clock. |
93 | */ | 93 | */ |
94 | switch (PVR_REV(mfspr(SPRN_PVR))) { | 94 | if (strcmp(cur_cpu_spec[0]->cpu_name, "440GP Rev. B") == 0) |
95 | case PVR_REV(PVR_440GP_RB): | 95 | freq = EBONY_440GP_RB_SYSCLK; |
96 | freq = EBONY_440GP_RB_SYSCLK; | 96 | else |
97 | break; | 97 | freq = EBONY_440GP_RC_SYSCLK; |
98 | case PVR_REV(PVR_440GP_RC1): | ||
99 | default: | ||
100 | freq = EBONY_440GP_RC_SYSCLK; | ||
101 | break; | ||
102 | } | ||
103 | 98 | ||
104 | ibm44x_calibrate_decr(freq); | 99 | ibm44x_calibrate_decr(freq); |
105 | } | 100 | } |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index b659d7b3d747..ff3796860123 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -58,7 +58,7 @@ static void parse_bootinfo(unsigned long r3, | |||
58 | static void hdpu_set_l1pe(void); | 58 | static void hdpu_set_l1pe(void); |
59 | static void hdpu_cpustate_set(unsigned char new_state); | 59 | static void hdpu_cpustate_set(unsigned char new_state); |
60 | #ifdef CONFIG_SMP | 60 | #ifdef CONFIG_SMP |
61 | static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; | 61 | static DEFINE_SPINLOCK(timebase_lock); |
62 | static unsigned int timebase_upper = 0, timebase_lower = 0; | 62 | static unsigned int timebase_upper = 0, timebase_lower = 0; |
63 | extern int smp_tb_synchronized; | 63 | extern int smp_tb_synchronized; |
64 | 64 | ||
diff --git a/arch/ppc/platforms/pmac_sleep.S b/arch/ppc/platforms/pmac_sleep.S index 016a74649155..88419c77ac43 100644 --- a/arch/ppc/platforms/pmac_sleep.S +++ b/arch/ppc/platforms/pmac_sleep.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/cputable.h> | 17 | #include <asm/cputable.h> |
18 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | 21 | ||
22 | #define MAGIC 0x4c617273 /* 'Lars' */ | 22 | #define MAGIC 0x4c617273 /* 'Lars' */ |
23 | 23 | ||
@@ -161,6 +161,8 @@ _GLOBAL(low_sleep_handler) | |||
161 | addi r3,r3,sleep_storage@l | 161 | addi r3,r3,sleep_storage@l |
162 | stw r5,0(r3) | 162 | stw r5,0(r3) |
163 | 163 | ||
164 | .globl low_cpu_die | ||
165 | low_cpu_die: | ||
164 | /* Flush & disable all caches */ | 166 | /* Flush & disable all caches */ |
165 | bl flush_disable_caches | 167 | bl flush_disable_caches |
166 | 168 | ||
diff --git a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c index 8e049dab4e63..794a23994b82 100644 --- a/arch/ppc/platforms/pmac_smp.c +++ b/arch/ppc/platforms/pmac_smp.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/hardirq.h> | 35 | #include <linux/hardirq.h> |
36 | #include <linux/cpu.h> | ||
36 | 37 | ||
37 | #include <asm/ptrace.h> | 38 | #include <asm/ptrace.h> |
38 | #include <asm/atomic.h> | 39 | #include <asm/atomic.h> |
@@ -55,9 +56,7 @@ | |||
55 | * Powersurge (old powermac SMP) support. | 56 | * Powersurge (old powermac SMP) support. |
56 | */ | 57 | */ |
57 | 58 | ||
58 | extern void __secondary_start_psurge(void); | 59 | extern void __secondary_start_pmac_0(void); |
59 | extern void __secondary_start_psurge2(void); /* Temporary horrible hack */ | ||
60 | extern void __secondary_start_psurge3(void); /* Temporary horrible hack */ | ||
61 | 60 | ||
62 | /* Addresses for powersurge registers */ | 61 | /* Addresses for powersurge registers */ |
63 | #define HAMMERHEAD_BASE 0xf8000000 | 62 | #define HAMMERHEAD_BASE 0xf8000000 |
@@ -119,7 +118,7 @@ static volatile int sec_tb_reset = 0; | |||
119 | static unsigned int pri_tb_hi, pri_tb_lo; | 118 | static unsigned int pri_tb_hi, pri_tb_lo; |
120 | static unsigned int pri_tb_stamp; | 119 | static unsigned int pri_tb_stamp; |
121 | 120 | ||
122 | static void __init core99_init_caches(int cpu) | 121 | static void __devinit core99_init_caches(int cpu) |
123 | { | 122 | { |
124 | if (!cpu_has_feature(CPU_FTR_L2CR)) | 123 | if (!cpu_has_feature(CPU_FTR_L2CR)) |
125 | return; | 124 | return; |
@@ -346,7 +345,7 @@ static int __init smp_psurge_probe(void) | |||
346 | 345 | ||
347 | static void __init smp_psurge_kick_cpu(int nr) | 346 | static void __init smp_psurge_kick_cpu(int nr) |
348 | { | 347 | { |
349 | void (*start)(void) = __secondary_start_psurge; | 348 | unsigned long start = __pa(__secondary_start_pmac_0) + nr * 8; |
350 | unsigned long a; | 349 | unsigned long a; |
351 | 350 | ||
352 | /* may need to flush here if secondary bats aren't setup */ | 351 | /* may need to flush here if secondary bats aren't setup */ |
@@ -356,17 +355,7 @@ static void __init smp_psurge_kick_cpu(int nr) | |||
356 | 355 | ||
357 | if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu", 0x353); | 356 | if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu", 0x353); |
358 | 357 | ||
359 | /* setup entry point of secondary processor */ | 358 | out_be32(psurge_start, start); |
360 | switch (nr) { | ||
361 | case 2: | ||
362 | start = __secondary_start_psurge2; | ||
363 | break; | ||
364 | case 3: | ||
365 | start = __secondary_start_psurge3; | ||
366 | break; | ||
367 | } | ||
368 | |||
369 | out_be32(psurge_start, __pa(start)); | ||
370 | mb(); | 359 | mb(); |
371 | 360 | ||
372 | psurge_set_ipi(nr); | 361 | psurge_set_ipi(nr); |
@@ -500,14 +489,14 @@ static int __init smp_core99_probe(void) | |||
500 | return ncpus; | 489 | return ncpus; |
501 | } | 490 | } |
502 | 491 | ||
503 | static void __init smp_core99_kick_cpu(int nr) | 492 | static void __devinit smp_core99_kick_cpu(int nr) |
504 | { | 493 | { |
505 | unsigned long save_vector, new_vector; | 494 | unsigned long save_vector, new_vector; |
506 | unsigned long flags; | 495 | unsigned long flags; |
507 | 496 | ||
508 | volatile unsigned long *vector | 497 | volatile unsigned long *vector |
509 | = ((volatile unsigned long *)(KERNELBASE+0x100)); | 498 | = ((volatile unsigned long *)(KERNELBASE+0x100)); |
510 | if (nr < 1 || nr > 3) | 499 | if (nr < 0 || nr > 3) |
511 | return; | 500 | return; |
512 | if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu", 0x346); | 501 | if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu", 0x346); |
513 | 502 | ||
@@ -518,19 +507,9 @@ static void __init smp_core99_kick_cpu(int nr) | |||
518 | save_vector = *vector; | 507 | save_vector = *vector; |
519 | 508 | ||
520 | /* Setup fake reset vector that does | 509 | /* Setup fake reset vector that does |
521 | * b __secondary_start_psurge - KERNELBASE | 510 | * b __secondary_start_pmac_0 + nr*8 - KERNELBASE |
522 | */ | 511 | */ |
523 | switch(nr) { | 512 | new_vector = (unsigned long) __secondary_start_pmac_0 + nr * 8; |
524 | case 1: | ||
525 | new_vector = (unsigned long)__secondary_start_psurge; | ||
526 | break; | ||
527 | case 2: | ||
528 | new_vector = (unsigned long)__secondary_start_psurge2; | ||
529 | break; | ||
530 | case 3: | ||
531 | new_vector = (unsigned long)__secondary_start_psurge3; | ||
532 | break; | ||
533 | } | ||
534 | *vector = 0x48000002 + new_vector - KERNELBASE; | 513 | *vector = 0x48000002 + new_vector - KERNELBASE; |
535 | 514 | ||
536 | /* flush data cache and inval instruction cache */ | 515 | /* flush data cache and inval instruction cache */ |
@@ -554,7 +533,7 @@ static void __init smp_core99_kick_cpu(int nr) | |||
554 | if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347); | 533 | if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347); |
555 | } | 534 | } |
556 | 535 | ||
557 | static void __init smp_core99_setup_cpu(int cpu_nr) | 536 | static void __devinit smp_core99_setup_cpu(int cpu_nr) |
558 | { | 537 | { |
559 | /* Setup L2/L3 */ | 538 | /* Setup L2/L3 */ |
560 | if (cpu_nr != 0) | 539 | if (cpu_nr != 0) |
@@ -668,3 +647,47 @@ struct smp_ops_t core99_smp_ops __pmacdata = { | |||
668 | .give_timebase = smp_core99_give_timebase, | 647 | .give_timebase = smp_core99_give_timebase, |
669 | .take_timebase = smp_core99_take_timebase, | 648 | .take_timebase = smp_core99_take_timebase, |
670 | }; | 649 | }; |
650 | |||
651 | #ifdef CONFIG_HOTPLUG_CPU | ||
652 | |||
653 | int __cpu_disable(void) | ||
654 | { | ||
655 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
656 | |||
657 | /* XXX reset cpu affinity here */ | ||
658 | openpic_set_priority(0xf); | ||
659 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | ||
660 | mb(); | ||
661 | udelay(20); | ||
662 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | ||
663 | return 0; | ||
664 | } | ||
665 | |||
666 | extern void low_cpu_die(void) __attribute__((noreturn)); /* in pmac_sleep.S */ | ||
667 | static int cpu_dead[NR_CPUS]; | ||
668 | |||
669 | void cpu_die(void) | ||
670 | { | ||
671 | local_irq_disable(); | ||
672 | cpu_dead[smp_processor_id()] = 1; | ||
673 | mb(); | ||
674 | low_cpu_die(); | ||
675 | } | ||
676 | |||
677 | void __cpu_die(unsigned int cpu) | ||
678 | { | ||
679 | int timeout; | ||
680 | |||
681 | timeout = 1000; | ||
682 | while (!cpu_dead[cpu]) { | ||
683 | if (--timeout == 0) { | ||
684 | printk("CPU %u refused to die!\n", cpu); | ||
685 | break; | ||
686 | } | ||
687 | msleep(1); | ||
688 | } | ||
689 | cpu_callin_map[cpu] = 0; | ||
690 | cpu_dead[cpu] = 0; | ||
691 | } | ||
692 | |||
693 | #endif | ||
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 774709807538..75fe8eb10693 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c | |||
@@ -90,14 +90,10 @@ cpc700_mask_and_ack_irq(unsigned int irq) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | static struct hw_interrupt_type cpc700_pic = { | 92 | static struct hw_interrupt_type cpc700_pic = { |
93 | "CPC700 PIC", | 93 | .typename = "CPC700 PIC", |
94 | NULL, | 94 | .enable = cpc700_unmask_irq, |
95 | NULL, | 95 | .disable = cpc700_mask_irq, |
96 | cpc700_unmask_irq, | 96 | .ack = cpc700_mask_and_ack_irq, |
97 | cpc700_mask_irq, | ||
98 | cpc700_mask_and_ack_irq, | ||
99 | NULL, | ||
100 | NULL | ||
101 | }; | 97 | }; |
102 | 98 | ||
103 | __init static void | 99 | __init static void |
diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c index b9391e650141..5c7908c20e43 100644 --- a/arch/ppc/syslib/i8259.c +++ b/arch/ppc/syslib/i8259.c | |||
@@ -129,14 +129,11 @@ static void i8259_end_irq(unsigned int irq) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | struct hw_interrupt_type i8259_pic = { | 131 | struct hw_interrupt_type i8259_pic = { |
132 | " i8259 ", | 132 | .typename = " i8259 ", |
133 | NULL, | 133 | .enable = i8259_unmask_irq, |
134 | NULL, | 134 | .disable = i8259_mask_irq, |
135 | i8259_unmask_irq, | 135 | .ack = i8259_mask_and_ack_irq, |
136 | i8259_mask_irq, | 136 | .end = i8259_end_irq, |
137 | i8259_mask_and_ack_irq, | ||
138 | i8259_end_irq, | ||
139 | NULL | ||
140 | }; | 137 | }; |
141 | 138 | ||
142 | static struct resource pic1_iores = { | 139 | static struct resource pic1_iores = { |
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index d4776af6a3ca..0bb919859b8b 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -236,9 +236,10 @@ void __init ibm440gx_l2c_setup(struct ibm44x_clocks* p) | |||
236 | /* Disable L2C on rev.A, rev.B and 800MHz version of rev.C, | 236 | /* Disable L2C on rev.A, rev.B and 800MHz version of rev.C, |
237 | enable it on all other revisions | 237 | enable it on all other revisions |
238 | */ | 238 | */ |
239 | u32 pvr = mfspr(SPRN_PVR); | 239 | if (strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. A") == 0 || |
240 | if (pvr == PVR_440GX_RA || pvr == PVR_440GX_RB || | 240 | strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. B") == 0 |
241 | (pvr == PVR_440GX_RC && p->cpu > 667000000)) | 241 | || (strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. C") |
242 | == 0 && p->cpu > 667000000)) | ||
242 | ibm440gx_l2c_disable(); | 243 | ibm440gx_l2c_disable(); |
243 | else | 244 | else |
244 | ibm440gx_l2c_enable(); | 245 | ibm440gx_l2c_enable(); |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 6262b11f366f..839f8872826f 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | u8 mv64x60_pci_exclude_bridge = 1; | 33 | u8 mv64x60_pci_exclude_bridge = 1; |
34 | spinlock_t mv64x60_lock = SPIN_LOCK_UNLOCKED; | 34 | DEFINE_SPINLOCK(mv64x60_lock); |
35 | 35 | ||
36 | static phys_addr_t mv64x60_bridge_pbase; | 36 | static phys_addr_t mv64x60_bridge_pbase; |
37 | static void *mv64x60_bridge_vbase; | 37 | static void *mv64x60_bridge_vbase; |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 7e272c51a497..2e0ea92144f6 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -82,13 +82,11 @@ static void openpic2_end_irq(unsigned int irq_nr); | |||
82 | static void openpic2_ack_irq(unsigned int irq_nr); | 82 | static void openpic2_ack_irq(unsigned int irq_nr); |
83 | 83 | ||
84 | struct hw_interrupt_type open_pic2 = { | 84 | struct hw_interrupt_type open_pic2 = { |
85 | " OpenPIC2 ", | 85 | .typename = " OpenPIC2 ", |
86 | NULL, | 86 | .enable = openpic2_enable_irq, |
87 | NULL, | 87 | .disable = openpic2_disable_irq, |
88 | openpic2_enable_irq, | 88 | .ack = openpic2_ack_irq, |
89 | openpic2_disable_irq, | 89 | .end = openpic2_end_irq, |
90 | openpic2_ack_irq, | ||
91 | openpic2_end_irq, | ||
92 | }; | 90 | }; |
93 | 91 | ||
94 | /* | 92 | /* |
diff --git a/arch/ppc/syslib/ppc403_pic.c b/arch/ppc/syslib/ppc403_pic.c index 06cb0af2a58d..ce4d1deb86e9 100644 --- a/arch/ppc/syslib/ppc403_pic.c +++ b/arch/ppc/syslib/ppc403_pic.c | |||
@@ -34,13 +34,10 @@ static void ppc403_aic_disable(unsigned int irq); | |||
34 | static void ppc403_aic_disable_and_ack(unsigned int irq); | 34 | static void ppc403_aic_disable_and_ack(unsigned int irq); |
35 | 35 | ||
36 | static struct hw_interrupt_type ppc403_aic = { | 36 | static struct hw_interrupt_type ppc403_aic = { |
37 | "403GC AIC", | 37 | .typename = "403GC AIC", |
38 | NULL, | 38 | .enable = ppc403_aic_enable, |
39 | NULL, | 39 | .disable = ppc403_aic_disable, |
40 | ppc403_aic_enable, | 40 | .ack = ppc403_aic_disable_and_ack, |
41 | ppc403_aic_disable, | ||
42 | ppc403_aic_disable_and_ack, | ||
43 | 0 | ||
44 | }; | 41 | }; |
45 | 42 | ||
46 | int | 43 | int |
diff --git a/arch/ppc/syslib/qspan_pci.c b/arch/ppc/syslib/qspan_pci.c index 57f4ed5e5ae1..0970b5d30391 100644 --- a/arch/ppc/syslib/qspan_pci.c +++ b/arch/ppc/syslib/qspan_pci.c | |||
@@ -94,7 +94,7 @@ | |||
94 | #define mk_config_type1(bus, dev, offset) \ | 94 | #define mk_config_type1(bus, dev, offset) \ |
95 | mk_config_addr(bus, dev, offset) | 1; | 95 | mk_config_addr(bus, dev, offset) | 1; |
96 | 96 | ||
97 | static spinlock_t pcibios_lock = SPIN_LOCK_UNLOCKED; | 97 | static DEFINE_SPINLOCK(pcibios_lock); |
98 | 98 | ||
99 | int qspan_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn, | 99 | int qspan_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn, |
100 | unsigned char offset, unsigned char *val) | 100 | unsigned char offset, unsigned char *val) |
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index e0bd66f0847a..2cbcad278cef 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -79,14 +79,11 @@ xilinx_intc_end(unsigned int irq) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | static struct hw_interrupt_type xilinx_intc = { | 81 | static struct hw_interrupt_type xilinx_intc = { |
82 | "Xilinx Interrupt Controller", | 82 | .typename = "Xilinx Interrupt Controller", |
83 | NULL, | 83 | .enable = xilinx_intc_enable, |
84 | NULL, | 84 | .disable = xilinx_intc_disable, |
85 | xilinx_intc_enable, | 85 | .ack = xilinx_intc_disable_and_ack, |
86 | xilinx_intc_disable, | 86 | .end = xilinx_intc_end, |
87 | xilinx_intc_disable_and_ack, | ||
88 | xilinx_intc_end, | ||
89 | 0 | ||
90 | }; | 87 | }; |
91 | 88 | ||
92 | int | 89 | int |
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index 8189953a372c..17d2c1eac3b8 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile | |||
@@ -56,7 +56,7 @@ LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) | |||
56 | CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ | 56 | CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ |
57 | -mcall-aixdesc | 57 | -mcall-aixdesc |
58 | # Temporary hack until we have migrated to asm-powerpc | 58 | # Temporary hack until we have migrated to asm-powerpc |
59 | CPPFLAGS += -Iinclude3 | 59 | CPPFLAGS += -Iarch/$(ARCH)/include |
60 | 60 | ||
61 | GCC_VERSION := $(call cc-version) | 61 | GCC_VERSION := $(call cc-version) |
62 | GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) | 62 | GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) |
@@ -89,11 +89,12 @@ drivers-$(CONFIG_OPROFILE) += arch/ppc64/oprofile/ | |||
89 | 89 | ||
90 | boot := arch/ppc64/boot | 90 | boot := arch/ppc64/boot |
91 | 91 | ||
92 | boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd | 92 | boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd |
93 | boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd | 93 | boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode |
94 | boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm | 94 | boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd |
95 | boottarget-$(CONFIG_PPC_BPA) := zImage zImage.initrd | 95 | boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm |
96 | $(boottarget-y): vmlinux | 96 | boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd |
97 | $(boottargets-y): vmlinux | ||
97 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 98 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
98 | 99 | ||
99 | bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage | 100 | bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage |
@@ -114,27 +115,21 @@ all: $(KBUILD_IMAGE) | |||
114 | 115 | ||
115 | archclean: | 116 | archclean: |
116 | $(Q)$(MAKE) $(clean)=$(boot) | 117 | $(Q)$(MAKE) $(clean)=$(boot) |
117 | $(Q)rm -rf include3 | 118 | # Temporary hack until we have migrated to asm-powerpc |
119 | $(Q)rm -rf arch/$(ARCH)/include | ||
118 | 120 | ||
119 | prepare: include/asm-ppc64/offsets.h | ||
120 | |||
121 | arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
122 | include/config/MARKER | ||
123 | |||
124 | include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s | ||
125 | $(call filechk,gen-asm-offsets) | ||
126 | 121 | ||
127 | # Temporary hack until we have migrated to asm-powerpc | 122 | # Temporary hack until we have migrated to asm-powerpc |
128 | include/asm: include3/asm | 123 | include/asm: arch/$(ARCH)/include/asm |
129 | include3/asm: | 124 | arch/$(ARCH)/include/asm: |
130 | $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi; | 125 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi |
131 | $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm | 126 | $(Q)ln -fsn $(srctree)/include/asm-powerpc arch/$(ARCH)/include/asm |
132 | 127 | ||
133 | define archhelp | 128 | define archhelp |
134 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 129 | echo ' zImage.vmode - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)' |
135 | echo ' zImage.initrd- Compressed kernel image with initrd attached,' | 130 | echo ' zImage.initrd.vmode - Compressed kernel image with initrd attached,' |
136 | echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz' | 131 | echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz' |
137 | echo ' (arch/$(ARCH)/boot/zImage.initrd)' | 132 | echo ' (arch/$(ARCH)/boot/zImage.initrd.vmode)' |
133 | echo ' zImage - zImage for pSeries machines' | ||
134 | echo ' zImage.initrd - zImage with initrd for pSeries machines' | ||
138 | endef | 135 | endef |
139 | |||
140 | CLEAN_FILES += include/asm-ppc64/offsets.h | ||
diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile index 2c5f5e73d00c..33fdc8710891 100644 --- a/arch/ppc64/boot/Makefile +++ b/arch/ppc64/boot/Makefile | |||
@@ -37,6 +37,9 @@ quiet_cmd_bootcc = BOOTCC $@ | |||
37 | quiet_cmd_bootas = BOOTAS $@ | 37 | quiet_cmd_bootas = BOOTAS $@ |
38 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< | 38 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< |
39 | 39 | ||
40 | quiet_cmd_bootld = BOOTLD $@ | ||
41 | cmd_bootld = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(2) | ||
42 | |||
40 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c | 43 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c |
41 | $(call if_changed_dep,bootcc) | 44 | $(call if_changed_dep,bootcc) |
42 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S | 45 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S |
@@ -53,7 +56,7 @@ src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section))) | |||
53 | gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) | 56 | gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) |
54 | 57 | ||
55 | hostprogs-y := addnote addRamDisk | 58 | hostprogs-y := addnote addRamDisk |
56 | targets += zImage zImage.initrd imagesize.c \ | 59 | targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd imagesize.c \ |
57 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ | 60 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ |
58 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ | 61 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ |
59 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ | 62 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ |
@@ -63,7 +66,7 @@ extra-y := initrd.o | |||
63 | quiet_cmd_ramdisk = RAMDISK $@ | 66 | quiet_cmd_ramdisk = RAMDISK $@ |
64 | cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ | 67 | cmd_ramdisk = $(obj)/addRamDisk $(obj)/ramdisk.image.gz $< $@ |
65 | 68 | ||
66 | quiet_cmd_stripvm = STRIP $@ | 69 | quiet_cmd_stripvm = STRIP $@ |
67 | cmd_stripvm = $(STRIP) -s $< -o $@ | 70 | cmd_stripvm = $(STRIP) -s $< -o $@ |
68 | 71 | ||
69 | vmlinux.strip: vmlinux FORCE | 72 | vmlinux.strip: vmlinux FORCE |
@@ -71,12 +74,20 @@ vmlinux.strip: vmlinux FORCE | |||
71 | $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE | 74 | $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE |
72 | $(call if_changed,ramdisk) | 75 | $(call if_changed,ramdisk) |
73 | 76 | ||
74 | addsection = $(CROSS32OBJCOPY) $(1) \ | 77 | quiet_cmd_addsection = ADDSEC $@ |
75 | --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ | 78 | cmd_addsection = $(CROSS32OBJCOPY) $@ \ |
76 | --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) | 79 | --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(patsubst %.o,%.gz, $@) \ |
80 | --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $@))=$(OBJCOPYFLAGS) | ||
81 | |||
82 | quiet_cmd_imagesize = GENSIZE $@ | ||
83 | cmd_imagesize = ls -l vmlinux.strip | \ | ||
84 | awk '{printf "/* generated -- do not edit! */\n" "unsigned long vmlinux_filesize = %d;\n", $$5}' \ | ||
85 | > $(obj)/imagesize.c && \ | ||
86 | $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \ | ||
87 | awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' >> $(obj)/imagesize.c | ||
77 | 88 | ||
78 | quiet_cmd_addnote = ADDNOTE $@ | 89 | quiet_cmd_addnote = ADDNOTE $@ |
79 | cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ | 90 | cmd_addnote = $(obj)/addnote $@ |
80 | 91 | ||
81 | $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE | 92 | $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE |
82 | $(call if_changed,gzip) | 93 | $(call if_changed,gzip) |
@@ -85,28 +96,30 @@ $(obj)/kernel-initrd.gz: $(obj)/ramdisk.image.gz | |||
85 | cp -f $(obj)/ramdisk.image.gz $@ | 96 | cp -f $(obj)/ramdisk.image.gz $@ |
86 | 97 | ||
87 | $(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz FORCE | 98 | $(call src-sec, $(required) $(initrd)): $(obj)/kernel-%.c: $(obj)/kernel-%.gz FORCE |
88 | touch $@ | 99 | @touch $@ |
89 | 100 | ||
90 | $(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FORCE | 101 | $(call obj-sec, $(required) $(initrd)): $(obj)/kernel-%.o: $(obj)/kernel-%.c FORCE |
91 | $(call if_changed_dep,bootcc) | 102 | $(call if_changed_dep,bootcc) |
92 | $(call addsection, $@) | 103 | $(call cmd,addsection) |
104 | |||
105 | $(obj)/zImage.vmode: obj-boot += $(call obj-sec, $(required)) | ||
106 | $(obj)/zImage.vmode: $(call obj-sec, $(required)) $(obj-boot) FORCE | ||
107 | $(call cmd,bootld,$(obj-boot)) | ||
108 | |||
109 | $(obj)/zImage.initrd.vmode: obj-boot += $(call obj-sec, $(required) $(initrd)) | ||
110 | $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) FORCE | ||
111 | $(call cmd,bootld,$(obj-boot)) | ||
93 | 112 | ||
94 | $(obj)/zImage: obj-boot += $(call obj-sec, $(required)) | 113 | $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote FORCE |
95 | $(obj)/zImage: $(call obj-sec, $(required)) $(obj-boot) $(obj)/addnote FORCE | 114 | @cp -f $< $@ |
96 | $(call if_changed,addnote) | 115 | $(call if_changed,addnote) |
97 | 116 | ||
98 | $(obj)/zImage.initrd: obj-boot += $(call obj-sec, $(required) $(initrd)) | 117 | $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote FORCE |
99 | $(obj)/zImage.initrd: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(obj)/addnote FORCE | 118 | @cp -f $< $@ |
100 | $(call if_changed,addnote) | 119 | $(call if_changed,addnote) |
101 | 120 | ||
102 | $(obj)/imagesize.c: vmlinux.strip | 121 | $(obj)/imagesize.c: vmlinux.strip |
103 | @echo Generating $@ | 122 | $(call cmd,imagesize) |
104 | ls -l vmlinux.strip | \ | ||
105 | awk '{printf "/* generated -- do not edit! */\n" \ | ||
106 | "unsigned long vmlinux_filesize = %d;\n", $$5}' > $(obj)/imagesize.c | ||
107 | $(CROSS_COMPILE)nm -n vmlinux | tail -n 1 | \ | ||
108 | awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \ | ||
109 | >> $(obj)/imagesize.c | ||
110 | 123 | ||
111 | install: $(CONFIGURE) $(BOOTIMAGE) | 124 | install: $(CONFIGURE) $(BOOTIMAGE) |
112 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" | 125 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" |
diff --git a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c index 99e68cfbe688..f7ec19a2d0b0 100644 --- a/arch/ppc64/boot/main.c +++ b/arch/ppc64/boot/main.c | |||
@@ -23,7 +23,8 @@ extern void flush_cache(void *, unsigned long); | |||
23 | 23 | ||
24 | /* Value picked to match that used by yaboot */ | 24 | /* Value picked to match that used by yaboot */ |
25 | #define PROG_START 0x01400000 | 25 | #define PROG_START 0x01400000 |
26 | #define RAM_END (256<<20) // Fixme: use OF */ | 26 | #define RAM_END (512<<20) // Fixme: use OF */ |
27 | #define ONE_MB 0x100000 | ||
27 | 28 | ||
28 | static char *avail_ram; | 29 | static char *avail_ram; |
29 | static char *begin_avail, *end_avail; | 30 | static char *begin_avail, *end_avail; |
@@ -32,6 +33,7 @@ static unsigned int heap_use; | |||
32 | static unsigned int heap_max; | 33 | static unsigned int heap_max; |
33 | 34 | ||
34 | extern char _start[]; | 35 | extern char _start[]; |
36 | extern char _end[]; | ||
35 | extern char _vmlinux_start[]; | 37 | extern char _vmlinux_start[]; |
36 | extern char _vmlinux_end[]; | 38 | extern char _vmlinux_end[]; |
37 | extern char _initrd_start[]; | 39 | extern char _initrd_start[]; |
@@ -58,13 +60,13 @@ typedef void (*kernel_entry_t)( unsigned long, | |||
58 | 60 | ||
59 | #undef DEBUG | 61 | #undef DEBUG |
60 | 62 | ||
61 | static unsigned long claim_base = PROG_START; | 63 | static unsigned long claim_base; |
62 | 64 | ||
63 | static unsigned long try_claim(unsigned long size) | 65 | static unsigned long try_claim(unsigned long size) |
64 | { | 66 | { |
65 | unsigned long addr = 0; | 67 | unsigned long addr = 0; |
66 | 68 | ||
67 | for(; claim_base < RAM_END; claim_base += 0x100000) { | 69 | for(; claim_base < RAM_END; claim_base += ONE_MB) { |
68 | #ifdef DEBUG | 70 | #ifdef DEBUG |
69 | printf(" trying: 0x%08lx\n\r", claim_base); | 71 | printf(" trying: 0x%08lx\n\r", claim_base); |
70 | #endif | 72 | #endif |
@@ -95,7 +97,26 @@ void start(unsigned long a1, unsigned long a2, void *promptr) | |||
95 | if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) | 97 | if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) |
96 | exit(); | 98 | exit(); |
97 | 99 | ||
98 | printf("\n\rzImage starting: loaded at 0x%x\n\r", (unsigned)_start); | 100 | printf("\n\rzImage starting: loaded at 0x%lx\n\r", (unsigned long) _start); |
101 | |||
102 | /* | ||
103 | * The first available claim_base must be above the end of the | ||
104 | * the loaded kernel wrapper file (_start to _end includes the | ||
105 | * initrd image if it is present) and rounded up to a nice | ||
106 | * 1 MB boundary for good measure. | ||
107 | */ | ||
108 | |||
109 | claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB); | ||
110 | |||
111 | #if defined(PROG_START) | ||
112 | /* | ||
113 | * Maintain a "magic" minimum address. This keeps some older | ||
114 | * firmware platforms running. | ||
115 | */ | ||
116 | |||
117 | if (claim_base < PROG_START) | ||
118 | claim_base = PROG_START; | ||
119 | #endif | ||
99 | 120 | ||
100 | /* | 121 | /* |
101 | * Now we try to claim some memory for the kernel itself | 122 | * Now we try to claim some memory for the kernel itself |
@@ -105,7 +126,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr) | |||
105 | * size... In practice we add 1Mb, that is enough, but we should really | 126 | * size... In practice we add 1Mb, that is enough, but we should really |
106 | * consider fixing the Makefile to put a _raw_ kernel in there ! | 127 | * consider fixing the Makefile to put a _raw_ kernel in there ! |
107 | */ | 128 | */ |
108 | vmlinux_memsize += 0x100000; | 129 | vmlinux_memsize += ONE_MB; |
109 | printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux_memsize); | 130 | printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux_memsize); |
110 | vmlinux.addr = try_claim(vmlinux_memsize); | 131 | vmlinux.addr = try_claim(vmlinux_memsize); |
111 | if (vmlinux.addr == 0) { | 132 | if (vmlinux.addr == 0) { |
diff --git a/arch/ppc64/kernel/bpa_iic.c b/arch/ppc64/kernel/bpa_iic.c index c8f3dc3fad70..0aaa878e19d3 100644 --- a/arch/ppc64/kernel/bpa_iic.c +++ b/arch/ppc64/kernel/bpa_iic.c | |||
@@ -205,6 +205,18 @@ static struct iic_regs __iomem *find_iic(int cpu) | |||
205 | } | 205 | } |
206 | 206 | ||
207 | #ifdef CONFIG_SMP | 207 | #ifdef CONFIG_SMP |
208 | |||
209 | /* Use the highest interrupt priorities for IPI */ | ||
210 | static inline int iic_ipi_to_irq(int ipi) | ||
211 | { | ||
212 | return IIC_IPI_OFFSET + IIC_NUM_IPIS - 1 - ipi; | ||
213 | } | ||
214 | |||
215 | static inline int iic_irq_to_ipi(int irq) | ||
216 | { | ||
217 | return IIC_NUM_IPIS - 1 - (irq - IIC_IPI_OFFSET); | ||
218 | } | ||
219 | |||
208 | void iic_setup_cpu(void) | 220 | void iic_setup_cpu(void) |
209 | { | 221 | { |
210 | out_be64(&__get_cpu_var(iic).regs->prio, 0xff); | 222 | out_be64(&__get_cpu_var(iic).regs->prio, 0xff); |
@@ -212,18 +224,20 @@ void iic_setup_cpu(void) | |||
212 | 224 | ||
213 | void iic_cause_IPI(int cpu, int mesg) | 225 | void iic_cause_IPI(int cpu, int mesg) |
214 | { | 226 | { |
215 | out_be64(&per_cpu(iic, cpu).regs->generate, mesg); | 227 | out_be64(&per_cpu(iic, cpu).regs->generate, (IIC_NUM_IPIS - 1 - mesg) << 4); |
216 | } | 228 | } |
217 | 229 | ||
218 | static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) | 230 | static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) |
219 | { | 231 | { |
220 | 232 | smp_message_recv(iic_irq_to_ipi(irq), regs); | |
221 | smp_message_recv(irq - IIC_IPI_OFFSET, regs); | ||
222 | return IRQ_HANDLED; | 233 | return IRQ_HANDLED; |
223 | } | 234 | } |
224 | 235 | ||
225 | static void iic_request_ipi(int irq, const char *name) | 236 | static void iic_request_ipi(int ipi, const char *name) |
226 | { | 237 | { |
238 | int irq; | ||
239 | |||
240 | irq = iic_ipi_to_irq(ipi); | ||
227 | /* IPIs are marked SA_INTERRUPT as they must run with irqs | 241 | /* IPIs are marked SA_INTERRUPT as they must run with irqs |
228 | * disabled */ | 242 | * disabled */ |
229 | get_irq_desc(irq)->handler = &iic_pic; | 243 | get_irq_desc(irq)->handler = &iic_pic; |
@@ -233,10 +247,10 @@ static void iic_request_ipi(int irq, const char *name) | |||
233 | 247 | ||
234 | void iic_request_IPIs(void) | 248 | void iic_request_IPIs(void) |
235 | { | 249 | { |
236 | iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_CALL_FUNCTION, "IPI-call"); | 250 | iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call"); |
237 | iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_RESCHEDULE, "IPI-resched"); | 251 | iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched"); |
238 | #ifdef CONFIG_DEBUGGER | 252 | #ifdef CONFIG_DEBUGGER |
239 | iic_request_ipi(IIC_IPI_OFFSET + PPC_MSG_DEBUGGER_BREAK, "IPI-debug"); | 253 | iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug"); |
240 | #endif /* CONFIG_DEBUGGER */ | 254 | #endif /* CONFIG_DEBUGGER */ |
241 | } | 255 | } |
242 | #endif /* CONFIG_SMP */ | 256 | #endif /* CONFIG_SMP */ |
diff --git a/arch/ppc64/kernel/cpu_setup_power4.S b/arch/ppc64/kernel/cpu_setup_power4.S index 0482c063c26e..1fb673c511ff 100644 --- a/arch/ppc64/kernel/cpu_setup_power4.S +++ b/arch/ppc64/kernel/cpu_setup_power4.S | |||
@@ -12,10 +12,9 @@ | |||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/ppc_asm.h> | ||
16 | #include <asm/cputable.h> | 15 | #include <asm/cputable.h> |
17 | #include <asm/ppc_asm.h> | 16 | #include <asm/ppc_asm.h> |
18 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
19 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
20 | 19 | ||
21 | _GLOBAL(__970_cpu_preinit) | 20 | _GLOBAL(__970_cpu_preinit) |
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c index 4c857a6516fc..ba93fd731222 100644 --- a/arch/ppc64/kernel/eeh.c +++ b/arch/ppc64/kernel/eeh.c | |||
@@ -254,6 +254,7 @@ pci_addr_cache_insert(struct pci_dev *dev, unsigned long alo, | |||
254 | static void __pci_addr_cache_insert_device(struct pci_dev *dev) | 254 | static void __pci_addr_cache_insert_device(struct pci_dev *dev) |
255 | { | 255 | { |
256 | struct device_node *dn; | 256 | struct device_node *dn; |
257 | struct pci_dn *pdn; | ||
257 | int i; | 258 | int i; |
258 | int inserted = 0; | 259 | int inserted = 0; |
259 | 260 | ||
@@ -265,8 +266,9 @@ static void __pci_addr_cache_insert_device(struct pci_dev *dev) | |||
265 | } | 266 | } |
266 | 267 | ||
267 | /* Skip any devices for which EEH is not enabled. */ | 268 | /* Skip any devices for which EEH is not enabled. */ |
268 | if (!(dn->eeh_mode & EEH_MODE_SUPPORTED) || | 269 | pdn = dn->data; |
269 | dn->eeh_mode & EEH_MODE_NOCHECK) { | 270 | if (!(pdn->eeh_mode & EEH_MODE_SUPPORTED) || |
271 | pdn->eeh_mode & EEH_MODE_NOCHECK) { | ||
270 | #ifdef DEBUG | 272 | #ifdef DEBUG |
271 | printk(KERN_INFO "PCI: skip building address cache for=%s\n", | 273 | printk(KERN_INFO "PCI: skip building address cache for=%s\n", |
272 | pci_name(dev)); | 274 | pci_name(dev)); |
@@ -415,6 +417,7 @@ int eeh_unregister_notifier(struct notifier_block *nb) | |||
415 | static int read_slot_reset_state(struct device_node *dn, int rets[]) | 417 | static int read_slot_reset_state(struct device_node *dn, int rets[]) |
416 | { | 418 | { |
417 | int token, outputs; | 419 | int token, outputs; |
420 | struct pci_dn *pdn = dn->data; | ||
418 | 421 | ||
419 | if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) { | 422 | if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) { |
420 | token = ibm_read_slot_reset_state2; | 423 | token = ibm_read_slot_reset_state2; |
@@ -424,8 +427,8 @@ static int read_slot_reset_state(struct device_node *dn, int rets[]) | |||
424 | outputs = 3; | 427 | outputs = 3; |
425 | } | 428 | } |
426 | 429 | ||
427 | return rtas_call(token, 3, outputs, rets, dn->eeh_config_addr, | 430 | return rtas_call(token, 3, outputs, rets, pdn->eeh_config_addr, |
428 | BUID_HI(dn->phb->buid), BUID_LO(dn->phb->buid)); | 431 | BUID_HI(pdn->phb->buid), BUID_LO(pdn->phb->buid)); |
429 | } | 432 | } |
430 | 433 | ||
431 | /** | 434 | /** |
@@ -534,6 +537,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
534 | unsigned long flags; | 537 | unsigned long flags; |
535 | int rc, reset_state; | 538 | int rc, reset_state; |
536 | struct eeh_event *event; | 539 | struct eeh_event *event; |
540 | struct pci_dn *pdn; | ||
537 | 541 | ||
538 | __get_cpu_var(total_mmio_ffs)++; | 542 | __get_cpu_var(total_mmio_ffs)++; |
539 | 543 | ||
@@ -542,14 +546,15 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
542 | 546 | ||
543 | if (!dn) | 547 | if (!dn) |
544 | return 0; | 548 | return 0; |
549 | pdn = dn->data; | ||
545 | 550 | ||
546 | /* Access to IO BARs might get this far and still not want checking. */ | 551 | /* Access to IO BARs might get this far and still not want checking. */ |
547 | if (!(dn->eeh_mode & EEH_MODE_SUPPORTED) || | 552 | if (!pdn->eeh_capable || !(pdn->eeh_mode & EEH_MODE_SUPPORTED) || |
548 | dn->eeh_mode & EEH_MODE_NOCHECK) { | 553 | pdn->eeh_mode & EEH_MODE_NOCHECK) { |
549 | return 0; | 554 | return 0; |
550 | } | 555 | } |
551 | 556 | ||
552 | if (!dn->eeh_config_addr) { | 557 | if (!pdn->eeh_config_addr) { |
553 | return 0; | 558 | return 0; |
554 | } | 559 | } |
555 | 560 | ||
@@ -557,7 +562,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
557 | * If we already have a pending isolation event for this | 562 | * If we already have a pending isolation event for this |
558 | * slot, we know it's bad already, we don't need to check... | 563 | * slot, we know it's bad already, we don't need to check... |
559 | */ | 564 | */ |
560 | if (dn->eeh_mode & EEH_MODE_ISOLATED) { | 565 | if (pdn->eeh_mode & EEH_MODE_ISOLATED) { |
561 | atomic_inc(&eeh_fail_count); | 566 | atomic_inc(&eeh_fail_count); |
562 | if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) { | 567 | if (atomic_read(&eeh_fail_count) >= EEH_MAX_FAILS) { |
563 | /* re-read the slot reset state */ | 568 | /* re-read the slot reset state */ |
@@ -582,7 +587,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
582 | } | 587 | } |
583 | 588 | ||
584 | /* prevent repeated reports of this failure */ | 589 | /* prevent repeated reports of this failure */ |
585 | dn->eeh_mode |= EEH_MODE_ISOLATED; | 590 | pdn->eeh_mode |= EEH_MODE_ISOLATED; |
586 | 591 | ||
587 | reset_state = rets[0]; | 592 | reset_state = rets[0]; |
588 | 593 | ||
@@ -590,9 +595,9 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
590 | memset(slot_errbuf, 0, eeh_error_buf_size); | 595 | memset(slot_errbuf, 0, eeh_error_buf_size); |
591 | 596 | ||
592 | rc = rtas_call(ibm_slot_error_detail, | 597 | rc = rtas_call(ibm_slot_error_detail, |
593 | 8, 1, NULL, dn->eeh_config_addr, | 598 | 8, 1, NULL, pdn->eeh_config_addr, |
594 | BUID_HI(dn->phb->buid), | 599 | BUID_HI(pdn->phb->buid), |
595 | BUID_LO(dn->phb->buid), NULL, 0, | 600 | BUID_LO(pdn->phb->buid), NULL, 0, |
596 | virt_to_phys(slot_errbuf), | 601 | virt_to_phys(slot_errbuf), |
597 | eeh_error_buf_size, | 602 | eeh_error_buf_size, |
598 | 1 /* Temporary Error */); | 603 | 1 /* Temporary Error */); |
@@ -679,8 +684,9 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
679 | u32 *device_id = (u32 *)get_property(dn, "device-id", NULL); | 684 | u32 *device_id = (u32 *)get_property(dn, "device-id", NULL); |
680 | u32 *regs; | 685 | u32 *regs; |
681 | int enable; | 686 | int enable; |
687 | struct pci_dn *pdn = dn->data; | ||
682 | 688 | ||
683 | dn->eeh_mode = 0; | 689 | pdn->eeh_mode = 0; |
684 | 690 | ||
685 | if (status && strcmp(status, "ok") != 0) | 691 | if (status && strcmp(status, "ok") != 0) |
686 | return NULL; /* ignore devices with bad status */ | 692 | return NULL; /* ignore devices with bad status */ |
@@ -691,7 +697,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
691 | 697 | ||
692 | /* There is nothing to check on PCI to ISA bridges */ | 698 | /* There is nothing to check on PCI to ISA bridges */ |
693 | if (dn->type && !strcmp(dn->type, "isa")) { | 699 | if (dn->type && !strcmp(dn->type, "isa")) { |
694 | dn->eeh_mode |= EEH_MODE_NOCHECK; | 700 | pdn->eeh_mode |= EEH_MODE_NOCHECK; |
695 | return NULL; | 701 | return NULL; |
696 | } | 702 | } |
697 | 703 | ||
@@ -708,7 +714,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
708 | enable = 0; | 714 | enable = 0; |
709 | 715 | ||
710 | if (!enable) | 716 | if (!enable) |
711 | dn->eeh_mode |= EEH_MODE_NOCHECK; | 717 | pdn->eeh_mode |= EEH_MODE_NOCHECK; |
712 | 718 | ||
713 | /* Ok... see if this device supports EEH. Some do, some don't, | 719 | /* Ok... see if this device supports EEH. Some do, some don't, |
714 | * and the only way to find out is to check each and every one. */ | 720 | * and the only way to find out is to check each and every one. */ |
@@ -721,8 +727,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
721 | EEH_ENABLE); | 727 | EEH_ENABLE); |
722 | if (ret == 0) { | 728 | if (ret == 0) { |
723 | eeh_subsystem_enabled = 1; | 729 | eeh_subsystem_enabled = 1; |
724 | dn->eeh_mode |= EEH_MODE_SUPPORTED; | 730 | pdn->eeh_mode |= EEH_MODE_SUPPORTED; |
725 | dn->eeh_config_addr = regs[0]; | 731 | pdn->eeh_config_addr = regs[0]; |
726 | #ifdef DEBUG | 732 | #ifdef DEBUG |
727 | printk(KERN_DEBUG "EEH: %s: eeh enabled\n", dn->full_name); | 733 | printk(KERN_DEBUG "EEH: %s: eeh enabled\n", dn->full_name); |
728 | #endif | 734 | #endif |
@@ -730,10 +736,11 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
730 | 736 | ||
731 | /* This device doesn't support EEH, but it may have an | 737 | /* This device doesn't support EEH, but it may have an |
732 | * EEH parent, in which case we mark it as supported. */ | 738 | * EEH parent, in which case we mark it as supported. */ |
733 | if (dn->parent && (dn->parent->eeh_mode & EEH_MODE_SUPPORTED)) { | 739 | if (dn->parent && dn->parent->data |
740 | && (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) { | ||
734 | /* Parent supports EEH. */ | 741 | /* Parent supports EEH. */ |
735 | dn->eeh_mode |= EEH_MODE_SUPPORTED; | 742 | pdn->eeh_mode |= EEH_MODE_SUPPORTED; |
736 | dn->eeh_config_addr = dn->parent->eeh_config_addr; | 743 | pdn->eeh_config_addr = PCI_DN(dn->parent)->eeh_config_addr; |
737 | return NULL; | 744 | return NULL; |
738 | } | 745 | } |
739 | } | 746 | } |
@@ -790,11 +797,13 @@ void __init eeh_init(void) | |||
790 | for (phb = of_find_node_by_name(NULL, "pci"); phb; | 797 | for (phb = of_find_node_by_name(NULL, "pci"); phb; |
791 | phb = of_find_node_by_name(phb, "pci")) { | 798 | phb = of_find_node_by_name(phb, "pci")) { |
792 | unsigned long buid; | 799 | unsigned long buid; |
800 | struct pci_dn *pci; | ||
793 | 801 | ||
794 | buid = get_phb_buid(phb); | 802 | buid = get_phb_buid(phb); |
795 | if (buid == 0) | 803 | if (buid == 0 || phb->data == NULL) |
796 | continue; | 804 | continue; |
797 | 805 | ||
806 | pci = phb->data; | ||
798 | info.buid_lo = BUID_LO(buid); | 807 | info.buid_lo = BUID_LO(buid); |
799 | info.buid_hi = BUID_HI(buid); | 808 | info.buid_hi = BUID_HI(buid); |
800 | traverse_pci_devices(phb, early_enable_eeh, &info); | 809 | traverse_pci_devices(phb, early_enable_eeh, &info); |
@@ -823,9 +832,9 @@ void eeh_add_device_early(struct device_node *dn) | |||
823 | struct pci_controller *phb; | 832 | struct pci_controller *phb; |
824 | struct eeh_early_enable_info info; | 833 | struct eeh_early_enable_info info; |
825 | 834 | ||
826 | if (!dn) | 835 | if (!dn || !dn->data) |
827 | return; | 836 | return; |
828 | phb = dn->phb; | 837 | phb = PCI_DN(dn)->phb; |
829 | if (NULL == phb || 0 == phb->buid) { | 838 | if (NULL == phb || 0 == phb->buid) { |
830 | printk(KERN_WARNING "EEH: Expected buid but found none\n"); | 839 | printk(KERN_WARNING "EEH: Expected buid but found none\n"); |
831 | return; | 840 | return; |
diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S index bf99b4a92f20..d133a49cdf89 100644 --- a/arch/ppc64/kernel/entry.S +++ b/arch/ppc64/kernel/entry.S | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/mmu.h> | 28 | #include <asm/mmu.h> |
29 | #include <asm/thread_info.h> | 29 | #include <asm/thread_info.h> |
30 | #include <asm/ppc_asm.h> | 30 | #include <asm/ppc_asm.h> |
31 | #include <asm/offsets.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/cputable.h> | 32 | #include <asm/cputable.h> |
33 | 33 | ||
34 | #ifdef CONFIG_PPC_ISERIES | 34 | #ifdef CONFIG_PPC_ISERIES |
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index b436206e317d..58c314738c99 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/mmu.h> | 30 | #include <asm/mmu.h> |
31 | #include <asm/systemcfg.h> | 31 | #include <asm/systemcfg.h> |
32 | #include <asm/ppc_asm.h> | 32 | #include <asm/ppc_asm.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/bug.h> | 34 | #include <asm/bug.h> |
35 | #include <asm/cputable.h> | 35 | #include <asm/cputable.h> |
36 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
diff --git a/arch/ppc64/kernel/idle_power4.S b/arch/ppc64/kernel/idle_power4.S index 97e4a2655040..ca02afe2a795 100644 --- a/arch/ppc64/kernel/idle_power4.S +++ b/arch/ppc64/kernel/idle_power4.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
22 | #include <asm/ppc_asm.h> | 22 | #include <asm/ppc_asm.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
26 | 26 | ||
diff --git a/arch/ppc64/kernel/iomap.c b/arch/ppc64/kernel/iomap.c index 153cc8b0f136..6160c8dbb7c5 100644 --- a/arch/ppc64/kernel/iomap.c +++ b/arch/ppc64/kernel/iomap.c | |||
@@ -22,13 +22,23 @@ unsigned int fastcall ioread16(void __iomem *addr) | |||
22 | { | 22 | { |
23 | return readw(addr); | 23 | return readw(addr); |
24 | } | 24 | } |
25 | unsigned int fastcall ioread16be(void __iomem *addr) | ||
26 | { | ||
27 | return in_be16(addr); | ||
28 | } | ||
25 | unsigned int fastcall ioread32(void __iomem *addr) | 29 | unsigned int fastcall ioread32(void __iomem *addr) |
26 | { | 30 | { |
27 | return readl(addr); | 31 | return readl(addr); |
28 | } | 32 | } |
33 | unsigned int fastcall ioread32be(void __iomem *addr) | ||
34 | { | ||
35 | return in_be32(addr); | ||
36 | } | ||
29 | EXPORT_SYMBOL(ioread8); | 37 | EXPORT_SYMBOL(ioread8); |
30 | EXPORT_SYMBOL(ioread16); | 38 | EXPORT_SYMBOL(ioread16); |
39 | EXPORT_SYMBOL(ioread16be); | ||
31 | EXPORT_SYMBOL(ioread32); | 40 | EXPORT_SYMBOL(ioread32); |
41 | EXPORT_SYMBOL(ioread32be); | ||
32 | 42 | ||
33 | void fastcall iowrite8(u8 val, void __iomem *addr) | 43 | void fastcall iowrite8(u8 val, void __iomem *addr) |
34 | { | 44 | { |
@@ -38,13 +48,23 @@ void fastcall iowrite16(u16 val, void __iomem *addr) | |||
38 | { | 48 | { |
39 | writew(val, addr); | 49 | writew(val, addr); |
40 | } | 50 | } |
51 | void fastcall iowrite16be(u16 val, void __iomem *addr) | ||
52 | { | ||
53 | out_be16(addr, val); | ||
54 | } | ||
41 | void fastcall iowrite32(u32 val, void __iomem *addr) | 55 | void fastcall iowrite32(u32 val, void __iomem *addr) |
42 | { | 56 | { |
43 | writel(val, addr); | 57 | writel(val, addr); |
44 | } | 58 | } |
59 | void fastcall iowrite32be(u32 val, void __iomem *addr) | ||
60 | { | ||
61 | out_be32(addr, val); | ||
62 | } | ||
45 | EXPORT_SYMBOL(iowrite8); | 63 | EXPORT_SYMBOL(iowrite8); |
46 | EXPORT_SYMBOL(iowrite16); | 64 | EXPORT_SYMBOL(iowrite16); |
65 | EXPORT_SYMBOL(iowrite16be); | ||
47 | EXPORT_SYMBOL(iowrite32); | 66 | EXPORT_SYMBOL(iowrite32); |
67 | EXPORT_SYMBOL(iowrite32be); | ||
48 | 68 | ||
49 | /* | 69 | /* |
50 | * These are the "repeat read/write" functions. Note the | 70 | * These are the "repeat read/write" functions. Note the |
@@ -56,15 +76,15 @@ EXPORT_SYMBOL(iowrite32); | |||
56 | */ | 76 | */ |
57 | void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) | 77 | void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) |
58 | { | 78 | { |
59 | _insb((u8 __force *) addr, dst, count); | 79 | _insb((u8 __iomem *) addr, dst, count); |
60 | } | 80 | } |
61 | void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) | 81 | void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) |
62 | { | 82 | { |
63 | _insw_ns((u16 __force *) addr, dst, count); | 83 | _insw_ns((u16 __iomem *) addr, dst, count); |
64 | } | 84 | } |
65 | void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) | 85 | void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) |
66 | { | 86 | { |
67 | _insl_ns((u32 __force *) addr, dst, count); | 87 | _insl_ns((u32 __iomem *) addr, dst, count); |
68 | } | 88 | } |
69 | EXPORT_SYMBOL(ioread8_rep); | 89 | EXPORT_SYMBOL(ioread8_rep); |
70 | EXPORT_SYMBOL(ioread16_rep); | 90 | EXPORT_SYMBOL(ioread16_rep); |
@@ -72,15 +92,15 @@ EXPORT_SYMBOL(ioread32_rep); | |||
72 | 92 | ||
73 | void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) | 93 | void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) |
74 | { | 94 | { |
75 | _outsb((u8 __force *) addr, src, count); | 95 | _outsb((u8 __iomem *) addr, src, count); |
76 | } | 96 | } |
77 | void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) | 97 | void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) |
78 | { | 98 | { |
79 | _outsw_ns((u16 __force *) addr, src, count); | 99 | _outsw_ns((u16 __iomem *) addr, src, count); |
80 | } | 100 | } |
81 | void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) | 101 | void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) |
82 | { | 102 | { |
83 | _outsl_ns((u32 __force *) addr, src, count); | 103 | _outsl_ns((u32 __iomem *) addr, src, count); |
84 | } | 104 | } |
85 | EXPORT_SYMBOL(iowrite8_rep); | 105 | EXPORT_SYMBOL(iowrite8_rep); |
86 | EXPORT_SYMBOL(iowrite16_rep); | 106 | EXPORT_SYMBOL(iowrite16_rep); |
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c index 845eebd1e28d..9032b6bfe036 100644 --- a/arch/ppc64/kernel/iommu.c +++ b/arch/ppc64/kernel/iommu.c | |||
@@ -438,7 +438,8 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl) | |||
438 | 438 | ||
439 | void iommu_free_table(struct device_node *dn) | 439 | void iommu_free_table(struct device_node *dn) |
440 | { | 440 | { |
441 | struct iommu_table *tbl = dn->iommu_table; | 441 | struct pci_dn *pdn = dn->data; |
442 | struct iommu_table *tbl = pdn->iommu_table; | ||
442 | unsigned long bitmap_sz, i; | 443 | unsigned long bitmap_sz, i; |
443 | unsigned int order; | 444 | unsigned int order; |
444 | 445 | ||
diff --git a/arch/ppc64/kernel/maple_pci.c b/arch/ppc64/kernel/maple_pci.c index 53993999b265..5a8b4d8c2dd6 100644 --- a/arch/ppc64/kernel/maple_pci.c +++ b/arch/ppc64/kernel/maple_pci.c | |||
@@ -447,9 +447,9 @@ void __init maple_pci_init(void) | |||
447 | */ | 447 | */ |
448 | if (u3_agp) { | 448 | if (u3_agp) { |
449 | struct device_node *np = u3_agp->arch_data; | 449 | struct device_node *np = u3_agp->arch_data; |
450 | np->busno = 0xf0; | 450 | PCI_DN(np)->busno = 0xf0; |
451 | for (np = np->child; np; np = np->sibling) | 451 | for (np = np->child; np; np = np->sibling) |
452 | np->busno = 0xf0; | 452 | PCI_DN(np)->busno = 0xf0; |
453 | } | 453 | } |
454 | 454 | ||
455 | /* Tell pci.c to use the common resource allocation mecanism */ | 455 | /* Tell pci.c to use the common resource allocation mecanism */ |
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S index 6d860c1d9fa0..e7241ad80a08 100644 --- a/arch/ppc64/kernel/misc.S +++ b/arch/ppc64/kernel/misc.S | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/page.h> | 26 | #include <asm/page.h> |
27 | #include <asm/cache.h> | 27 | #include <asm/cache.h> |
28 | #include <asm/ppc_asm.h> | 28 | #include <asm/ppc_asm.h> |
29 | #include <asm/offsets.h> | 29 | #include <asm/asm-offsets.h> |
30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
31 | 31 | ||
32 | .text | 32 | .text |
@@ -1431,9 +1431,9 @@ _GLOBAL(sys_call_table) | |||
1431 | .llong .sys_ni_syscall /* 195 - 32bit only stat64 */ | 1431 | .llong .sys_ni_syscall /* 195 - 32bit only stat64 */ |
1432 | .llong .sys_ni_syscall /* 32bit only lstat64 */ | 1432 | .llong .sys_ni_syscall /* 32bit only lstat64 */ |
1433 | .llong .sys_ni_syscall /* 32bit only fstat64 */ | 1433 | .llong .sys_ni_syscall /* 32bit only fstat64 */ |
1434 | .llong .sys_ni_syscall /* 32bit only pciconfig_read */ | 1434 | .llong .sys_pciconfig_read |
1435 | .llong .sys_ni_syscall /* 32bit only pciconfig_write */ | 1435 | .llong .sys_pciconfig_write |
1436 | .llong .sys_ni_syscall /* 32bit only pciconfig_iobase */ | 1436 | .llong .sys_pciconfig_iobase /* 200 - pciconfig_iobase */ |
1437 | .llong .sys_ni_syscall /* reserved for MacOnLinux */ | 1437 | .llong .sys_ni_syscall /* reserved for MacOnLinux */ |
1438 | .llong .sys_getdents64 | 1438 | .llong .sys_getdents64 |
1439 | .llong .sys_pivot_root | 1439 | .llong .sys_pivot_root |
diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c index 9d5e1e7fc389..f0fd7fbd6531 100644 --- a/arch/ppc64/kernel/pSeries_iommu.c +++ b/arch/ppc64/kernel/pSeries_iommu.c | |||
@@ -295,7 +295,7 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb, | |||
295 | struct iommu_table *tbl, | 295 | struct iommu_table *tbl, |
296 | unsigned int *dma_window) | 296 | unsigned int *dma_window) |
297 | { | 297 | { |
298 | tbl->it_busno = dn->bussubno; | 298 | tbl->it_busno = PCI_DN(dn)->bussubno; |
299 | 299 | ||
300 | /* TODO: Parse field size properties properly. */ | 300 | /* TODO: Parse field size properties properly. */ |
301 | tbl->it_size = (((unsigned long)dma_window[4] << 32) | | 301 | tbl->it_size = (((unsigned long)dma_window[4] << 32) | |
@@ -311,6 +311,7 @@ static void iommu_table_setparms_lpar(struct pci_controller *phb, | |||
311 | static void iommu_bus_setup_pSeries(struct pci_bus *bus) | 311 | static void iommu_bus_setup_pSeries(struct pci_bus *bus) |
312 | { | 312 | { |
313 | struct device_node *dn, *pdn; | 313 | struct device_node *dn, *pdn; |
314 | struct pci_dn *pci; | ||
314 | struct iommu_table *tbl; | 315 | struct iommu_table *tbl; |
315 | 316 | ||
316 | DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self); | 317 | DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self); |
@@ -325,6 +326,7 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) | |||
325 | */ | 326 | */ |
326 | 327 | ||
327 | dn = pci_bus_to_OF_node(bus); | 328 | dn = pci_bus_to_OF_node(bus); |
329 | pci = dn->data; | ||
328 | 330 | ||
329 | if (!bus->self) { | 331 | if (!bus->self) { |
330 | /* Root bus */ | 332 | /* Root bus */ |
@@ -341,18 +343,18 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) | |||
341 | * alltogether. This leaves 768MB for the window. | 343 | * alltogether. This leaves 768MB for the window. |
342 | */ | 344 | */ |
343 | DBG("PHB has io-hole, reserving 256MB\n"); | 345 | DBG("PHB has io-hole, reserving 256MB\n"); |
344 | dn->phb->dma_window_size = 3 << 28; | 346 | pci->phb->dma_window_size = 3 << 28; |
345 | dn->phb->dma_window_base_cur = 1 << 28; | 347 | pci->phb->dma_window_base_cur = 1 << 28; |
346 | } else { | 348 | } else { |
347 | /* 1GB window by default */ | 349 | /* 1GB window by default */ |
348 | dn->phb->dma_window_size = 1 << 30; | 350 | pci->phb->dma_window_size = 1 << 30; |
349 | dn->phb->dma_window_base_cur = 0; | 351 | pci->phb->dma_window_base_cur = 0; |
350 | } | 352 | } |
351 | 353 | ||
352 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | 354 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); |
353 | 355 | ||
354 | iommu_table_setparms(dn->phb, dn, tbl); | 356 | iommu_table_setparms(pci->phb, dn, tbl); |
355 | dn->iommu_table = iommu_init_table(tbl); | 357 | pci->iommu_table = iommu_init_table(tbl); |
356 | } else { | 358 | } else { |
357 | /* Do a 128MB table at root. This is used for the IDE | 359 | /* Do a 128MB table at root. This is used for the IDE |
358 | * controller on some SMP-mode POWER4 machines. It | 360 | * controller on some SMP-mode POWER4 machines. It |
@@ -363,16 +365,16 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) | |||
363 | * Allocate at offset 128MB to avoid having to deal | 365 | * Allocate at offset 128MB to avoid having to deal |
364 | * with ISA holes; 128MB table for IDE is plenty. | 366 | * with ISA holes; 128MB table for IDE is plenty. |
365 | */ | 367 | */ |
366 | dn->phb->dma_window_size = 1 << 27; | 368 | pci->phb->dma_window_size = 1 << 27; |
367 | dn->phb->dma_window_base_cur = 1 << 27; | 369 | pci->phb->dma_window_base_cur = 1 << 27; |
368 | 370 | ||
369 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | 371 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); |
370 | 372 | ||
371 | iommu_table_setparms(dn->phb, dn, tbl); | 373 | iommu_table_setparms(pci->phb, dn, tbl); |
372 | dn->iommu_table = iommu_init_table(tbl); | 374 | pci->iommu_table = iommu_init_table(tbl); |
373 | 375 | ||
374 | /* All child buses have 256MB tables */ | 376 | /* All child buses have 256MB tables */ |
375 | dn->phb->dma_window_size = 1 << 28; | 377 | pci->phb->dma_window_size = 1 << 28; |
376 | } | 378 | } |
377 | } else { | 379 | } else { |
378 | pdn = pci_bus_to_OF_node(bus->parent); | 380 | pdn = pci_bus_to_OF_node(bus->parent); |
@@ -386,12 +388,12 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) | |||
386 | 388 | ||
387 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | 389 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); |
388 | 390 | ||
389 | iommu_table_setparms(dn->phb, dn, tbl); | 391 | iommu_table_setparms(pci->phb, dn, tbl); |
390 | 392 | ||
391 | dn->iommu_table = iommu_init_table(tbl); | 393 | pci->iommu_table = iommu_init_table(tbl); |
392 | } else { | 394 | } else { |
393 | /* Lower than first child or under python, use parent table */ | 395 | /* Lower than first child or under python, use parent table */ |
394 | dn->iommu_table = pdn->iommu_table; | 396 | pci->iommu_table = PCI_DN(pdn)->iommu_table; |
395 | } | 397 | } |
396 | } | 398 | } |
397 | } | 399 | } |
@@ -401,6 +403,7 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
401 | { | 403 | { |
402 | struct iommu_table *tbl; | 404 | struct iommu_table *tbl; |
403 | struct device_node *dn, *pdn; | 405 | struct device_node *dn, *pdn; |
406 | struct pci_dn *ppci; | ||
404 | unsigned int *dma_window = NULL; | 407 | unsigned int *dma_window = NULL; |
405 | 408 | ||
406 | DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self); | 409 | DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self); |
@@ -419,22 +422,24 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
419 | return; | 422 | return; |
420 | } | 423 | } |
421 | 424 | ||
422 | if (!pdn->iommu_table) { | 425 | ppci = pdn->data; |
426 | if (!ppci->iommu_table) { | ||
423 | /* Bussubno hasn't been copied yet. | 427 | /* Bussubno hasn't been copied yet. |
424 | * Do it now because iommu_table_setparms_lpar needs it. | 428 | * Do it now because iommu_table_setparms_lpar needs it. |
425 | */ | 429 | */ |
426 | pdn->bussubno = bus->number; | 430 | |
431 | ppci->bussubno = bus->number; | ||
427 | 432 | ||
428 | tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), | 433 | tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), |
429 | GFP_KERNEL); | 434 | GFP_KERNEL); |
430 | 435 | ||
431 | iommu_table_setparms_lpar(pdn->phb, pdn, tbl, dma_window); | 436 | iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window); |
432 | 437 | ||
433 | pdn->iommu_table = iommu_init_table(tbl); | 438 | ppci->iommu_table = iommu_init_table(tbl); |
434 | } | 439 | } |
435 | 440 | ||
436 | if (pdn != dn) | 441 | if (pdn != dn) |
437 | dn->iommu_table = pdn->iommu_table; | 442 | PCI_DN(dn)->iommu_table = ppci->iommu_table; |
438 | } | 443 | } |
439 | 444 | ||
440 | 445 | ||
@@ -449,11 +454,11 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev) | |||
449 | */ | 454 | */ |
450 | mydn = dn = pci_device_to_OF_node(dev); | 455 | mydn = dn = pci_device_to_OF_node(dev); |
451 | 456 | ||
452 | while (dn && dn->iommu_table == NULL) | 457 | while (dn && dn->data && PCI_DN(dn)->iommu_table == NULL) |
453 | dn = dn->parent; | 458 | dn = dn->parent; |
454 | 459 | ||
455 | if (dn) { | 460 | if (dn && dn->data) { |
456 | mydn->iommu_table = dn->iommu_table; | 461 | PCI_DN(mydn)->iommu_table = PCI_DN(dn)->iommu_table; |
457 | } else { | 462 | } else { |
458 | DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, dev->pretty_name); | 463 | DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, dev->pretty_name); |
459 | } | 464 | } |
@@ -463,10 +468,11 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti | |||
463 | { | 468 | { |
464 | int err = NOTIFY_OK; | 469 | int err = NOTIFY_OK; |
465 | struct device_node *np = node; | 470 | struct device_node *np = node; |
471 | struct pci_dn *pci = np->data; | ||
466 | 472 | ||
467 | switch (action) { | 473 | switch (action) { |
468 | case PSERIES_RECONFIG_REMOVE: | 474 | case PSERIES_RECONFIG_REMOVE: |
469 | if (np->iommu_table && | 475 | if (pci->iommu_table && |
470 | get_property(np, "ibm,dma-window", NULL)) | 476 | get_property(np, "ibm,dma-window", NULL)) |
471 | iommu_free_table(np); | 477 | iommu_free_table(np); |
472 | break; | 478 | break; |
@@ -486,6 +492,7 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
486 | struct device_node *pdn, *dn; | 492 | struct device_node *pdn, *dn; |
487 | struct iommu_table *tbl; | 493 | struct iommu_table *tbl; |
488 | int *dma_window = NULL; | 494 | int *dma_window = NULL; |
495 | struct pci_dn *pci; | ||
489 | 496 | ||
490 | DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name); | 497 | DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name); |
491 | 498 | ||
@@ -497,8 +504,10 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
497 | */ | 504 | */ |
498 | dn = pci_device_to_OF_node(dev); | 505 | dn = pci_device_to_OF_node(dev); |
499 | 506 | ||
500 | for (pdn = dn; pdn && !pdn->iommu_table; pdn = pdn->parent) { | 507 | for (pdn = dn; pdn && pdn->data && !PCI_DN(pdn)->iommu_table; |
501 | dma_window = (unsigned int *)get_property(pdn, "ibm,dma-window", NULL); | 508 | pdn = pdn->parent) { |
509 | dma_window = (unsigned int *) | ||
510 | get_property(pdn, "ibm,dma-window", NULL); | ||
502 | if (dma_window) | 511 | if (dma_window) |
503 | break; | 512 | break; |
504 | } | 513 | } |
@@ -515,20 +524,21 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
515 | DBG("Found DMA window, allocating table\n"); | 524 | DBG("Found DMA window, allocating table\n"); |
516 | } | 525 | } |
517 | 526 | ||
518 | if (!pdn->iommu_table) { | 527 | pci = pdn->data; |
528 | if (!pci->iommu_table) { | ||
519 | /* iommu_table_setparms_lpar needs bussubno. */ | 529 | /* iommu_table_setparms_lpar needs bussubno. */ |
520 | pdn->bussubno = pdn->phb->bus->number; | 530 | pci->bussubno = pci->phb->bus->number; |
521 | 531 | ||
522 | tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), | 532 | tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), |
523 | GFP_KERNEL); | 533 | GFP_KERNEL); |
524 | 534 | ||
525 | iommu_table_setparms_lpar(pdn->phb, pdn, tbl, dma_window); | 535 | iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window); |
526 | 536 | ||
527 | pdn->iommu_table = iommu_init_table(tbl); | 537 | pci->iommu_table = iommu_init_table(tbl); |
528 | } | 538 | } |
529 | 539 | ||
530 | if (pdn != dn) | 540 | if (pdn != dn) |
531 | dn->iommu_table = pdn->iommu_table; | 541 | PCI_DN(dn)->iommu_table = pci->iommu_table; |
532 | } | 542 | } |
533 | 543 | ||
534 | static void iommu_bus_setup_null(struct pci_bus *b) { } | 544 | static void iommu_bus_setup_null(struct pci_bus *b) { } |
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index b5ca7d8347e2..8447dcc2c2b3 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/bootmem.h> | 21 | #include <linux/bootmem.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/syscalls.h> | ||
24 | 25 | ||
25 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
@@ -837,9 +838,11 @@ int pcibios_scan_all_fns(struct pci_bus *bus, int devfn) | |||
837 | * device tree. If they are then we need to scan all the | 838 | * device tree. If they are then we need to scan all the |
838 | * functions of this slot. | 839 | * functions of this slot. |
839 | */ | 840 | */ |
840 | for (dn = busdn->child; dn; dn = dn->sibling) | 841 | for (dn = busdn->child; dn; dn = dn->sibling) { |
841 | if ((dn->devfn >> 3) == (devfn >> 3)) | 842 | struct pci_dn *pdn = dn->data; |
843 | if (pdn && (pdn->devfn >> 3) == (devfn >> 3)) | ||
842 | return 1; | 844 | return 1; |
845 | } | ||
843 | 846 | ||
844 | return 0; | 847 | return 0; |
845 | } | 848 | } |
@@ -982,3 +985,62 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
982 | } | 985 | } |
983 | 986 | ||
984 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 987 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
988 | |||
989 | |||
990 | #define IOBASE_BRIDGE_NUMBER 0 | ||
991 | #define IOBASE_MEMORY 1 | ||
992 | #define IOBASE_IO 2 | ||
993 | #define IOBASE_ISA_IO 3 | ||
994 | #define IOBASE_ISA_MEM 4 | ||
995 | |||
996 | long sys_pciconfig_iobase(long which, unsigned long in_bus, | ||
997 | unsigned long in_devfn) | ||
998 | { | ||
999 | struct pci_controller* hose; | ||
1000 | struct list_head *ln; | ||
1001 | struct pci_bus *bus = NULL; | ||
1002 | struct device_node *hose_node; | ||
1003 | |||
1004 | /* Argh ! Please forgive me for that hack, but that's the | ||
1005 | * simplest way to get existing XFree to not lockup on some | ||
1006 | * G5 machines... So when something asks for bus 0 io base | ||
1007 | * (bus 0 is HT root), we return the AGP one instead. | ||
1008 | */ | ||
1009 | #ifdef CONFIG_PPC_PMAC | ||
1010 | if (systemcfg->platform == PLATFORM_POWERMAC && | ||
1011 | machine_is_compatible("MacRISC4")) | ||
1012 | if (in_bus == 0) | ||
1013 | in_bus = 0xf0; | ||
1014 | #endif /* CONFIG_PPC_PMAC */ | ||
1015 | |||
1016 | /* That syscall isn't quite compatible with PCI domains, but it's | ||
1017 | * used on pre-domains setup. We return the first match | ||
1018 | */ | ||
1019 | |||
1020 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | ||
1021 | bus = pci_bus_b(ln); | ||
1022 | if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate)) | ||
1023 | break; | ||
1024 | bus = NULL; | ||
1025 | } | ||
1026 | if (bus == NULL || bus->sysdata == NULL) | ||
1027 | return -ENODEV; | ||
1028 | |||
1029 | hose_node = (struct device_node *)bus->sysdata; | ||
1030 | hose = PCI_DN(hose_node)->phb; | ||
1031 | |||
1032 | switch (which) { | ||
1033 | case IOBASE_BRIDGE_NUMBER: | ||
1034 | return (long)hose->first_busno; | ||
1035 | case IOBASE_MEMORY: | ||
1036 | return (long)hose->pci_mem_offset; | ||
1037 | case IOBASE_IO: | ||
1038 | return (long)hose->io_base_phys; | ||
1039 | case IOBASE_ISA_IO: | ||
1040 | return (long)isa_io_base; | ||
1041 | case IOBASE_ISA_MEM: | ||
1042 | return -EINVAL; | ||
1043 | } | ||
1044 | |||
1045 | return -EOPNOTSUPP; | ||
1046 | } | ||
diff --git a/arch/ppc64/kernel/pci.h b/arch/ppc64/kernel/pci.h index 26be78b13af1..5eb2cc320566 100644 --- a/arch/ppc64/kernel/pci.h +++ b/arch/ppc64/kernel/pci.h | |||
@@ -34,7 +34,6 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
34 | 34 | ||
35 | void pci_devs_phb_init(void); | 35 | void pci_devs_phb_init(void); |
36 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); | 36 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); |
37 | struct device_node *fetch_dev_dn(struct pci_dev *dev); | ||
38 | 37 | ||
39 | /* PCI address cache management routines */ | 38 | /* PCI address cache management routines */ |
40 | void pci_addr_cache_insert_device(struct pci_dev *dev); | 39 | void pci_addr_cache_insert_device(struct pci_dev *dev); |
diff --git a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c index ec345462afc3..a86389d07d57 100644 --- a/arch/ppc64/kernel/pci_dn.c +++ b/arch/ppc64/kernel/pci_dn.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/bootmem.h> | ||
26 | 28 | ||
27 | #include <asm/io.h> | 29 | #include <asm/io.h> |
28 | #include <asm/prom.h> | 30 | #include <asm/prom.h> |
@@ -40,16 +42,26 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) | |||
40 | struct pci_controller *phb = data; | 42 | struct pci_controller *phb = data; |
41 | int *type = (int *)get_property(dn, "ibm,pci-config-space-type", NULL); | 43 | int *type = (int *)get_property(dn, "ibm,pci-config-space-type", NULL); |
42 | u32 *regs; | 44 | u32 *regs; |
43 | 45 | struct pci_dn *pdn; | |
44 | dn->phb = phb; | 46 | |
47 | if (phb->is_dynamic) | ||
48 | pdn = kmalloc(sizeof(*pdn), GFP_KERNEL); | ||
49 | else | ||
50 | pdn = alloc_bootmem(sizeof(*pdn)); | ||
51 | if (pdn == NULL) | ||
52 | return NULL; | ||
53 | memset(pdn, 0, sizeof(*pdn)); | ||
54 | dn->data = pdn; | ||
55 | pdn->node = dn; | ||
56 | pdn->phb = phb; | ||
45 | regs = (u32 *)get_property(dn, "reg", NULL); | 57 | regs = (u32 *)get_property(dn, "reg", NULL); |
46 | if (regs) { | 58 | if (regs) { |
47 | /* First register entry is addr (00BBSS00) */ | 59 | /* First register entry is addr (00BBSS00) */ |
48 | dn->busno = (regs[0] >> 16) & 0xff; | 60 | pdn->busno = (regs[0] >> 16) & 0xff; |
49 | dn->devfn = (regs[0] >> 8) & 0xff; | 61 | pdn->devfn = (regs[0] >> 8) & 0xff; |
50 | } | 62 | } |
51 | 63 | ||
52 | dn->pci_ext_config_space = (type && *type == 1); | 64 | pdn->pci_ext_config_space = (type && *type == 1); |
53 | return NULL; | 65 | return NULL; |
54 | } | 66 | } |
55 | 67 | ||
@@ -112,10 +124,15 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
112 | void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) | 124 | void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) |
113 | { | 125 | { |
114 | struct device_node * dn = (struct device_node *) phb->arch_data; | 126 | struct device_node * dn = (struct device_node *) phb->arch_data; |
127 | struct pci_dn *pdn; | ||
115 | 128 | ||
116 | /* PHB nodes themselves must not match */ | 129 | /* PHB nodes themselves must not match */ |
117 | dn->devfn = dn->busno = -1; | 130 | update_dn_pci_info(dn, phb); |
118 | dn->phb = phb; | 131 | pdn = dn->data; |
132 | if (pdn) { | ||
133 | pdn->devfn = pdn->busno = -1; | ||
134 | pdn->phb = phb; | ||
135 | } | ||
119 | 136 | ||
120 | /* Update dn->phb ptrs for new phb and children devices */ | 137 | /* Update dn->phb ptrs for new phb and children devices */ |
121 | traverse_pci_devices(dn, update_dn_pci_info, phb); | 138 | traverse_pci_devices(dn, update_dn_pci_info, phb); |
@@ -123,14 +140,17 @@ void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) | |||
123 | 140 | ||
124 | /* | 141 | /* |
125 | * Traversal func that looks for a <busno,devfcn> value. | 142 | * Traversal func that looks for a <busno,devfcn> value. |
126 | * If found, the device_node is returned (thus terminating the traversal). | 143 | * If found, the pci_dn is returned (thus terminating the traversal). |
127 | */ | 144 | */ |
128 | static void *is_devfn_node(struct device_node *dn, void *data) | 145 | static void *is_devfn_node(struct device_node *dn, void *data) |
129 | { | 146 | { |
130 | int busno = ((unsigned long)data >> 8) & 0xff; | 147 | int busno = ((unsigned long)data >> 8) & 0xff; |
131 | int devfn = ((unsigned long)data) & 0xff; | 148 | int devfn = ((unsigned long)data) & 0xff; |
149 | struct pci_dn *pci = dn->data; | ||
132 | 150 | ||
133 | return ((devfn == dn->devfn) && (busno == dn->busno)) ? dn : NULL; | 151 | if (pci && (devfn == pci->devfn) && (busno == pci->busno)) |
152 | return dn; | ||
153 | return NULL; | ||
134 | } | 154 | } |
135 | 155 | ||
136 | /* | 156 | /* |
@@ -149,13 +169,10 @@ static void *is_devfn_node(struct device_node *dn, void *data) | |||
149 | struct device_node *fetch_dev_dn(struct pci_dev *dev) | 169 | struct device_node *fetch_dev_dn(struct pci_dev *dev) |
150 | { | 170 | { |
151 | struct device_node *orig_dn = dev->sysdata; | 171 | struct device_node *orig_dn = dev->sysdata; |
152 | struct pci_controller *phb = orig_dn->phb; /* assume same phb as orig_dn */ | ||
153 | struct device_node *phb_dn; | ||
154 | struct device_node *dn; | 172 | struct device_node *dn; |
155 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; | 173 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; |
156 | 174 | ||
157 | phb_dn = phb->arch_data; | 175 | dn = traverse_pci_devices(orig_dn, is_devfn_node, (void *)searchval); |
158 | dn = traverse_pci_devices(phb_dn, is_devfn_node, (void *)searchval); | ||
159 | if (dn) | 176 | if (dn) |
160 | dev->sysdata = dn; | 177 | dev->sysdata = dn; |
161 | return dn; | 178 | return dn; |
@@ -165,11 +182,13 @@ EXPORT_SYMBOL(fetch_dev_dn); | |||
165 | static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) | 182 | static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) |
166 | { | 183 | { |
167 | struct device_node *np = node; | 184 | struct device_node *np = node; |
185 | struct pci_dn *pci; | ||
168 | int err = NOTIFY_OK; | 186 | int err = NOTIFY_OK; |
169 | 187 | ||
170 | switch (action) { | 188 | switch (action) { |
171 | case PSERIES_RECONFIG_ADD: | 189 | case PSERIES_RECONFIG_ADD: |
172 | update_dn_pci_info(np, np->parent->phb); | 190 | pci = np->parent->data; |
191 | update_dn_pci_info(np, pci->phb); | ||
173 | break; | 192 | break; |
174 | default: | 193 | default: |
175 | err = NOTIFY_DONE; | 194 | err = NOTIFY_DONE; |
diff --git a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c index ef0a62b916be..14647e09c9cd 100644 --- a/arch/ppc64/kernel/pci_iommu.c +++ b/arch/ppc64/kernel/pci_iommu.c | |||
@@ -66,7 +66,7 @@ static inline struct iommu_table *devnode_table(struct device *dev) | |||
66 | #endif /* CONFIG_PPC_ISERIES */ | 66 | #endif /* CONFIG_PPC_ISERIES */ |
67 | 67 | ||
68 | #ifdef CONFIG_PPC_MULTIPLATFORM | 68 | #ifdef CONFIG_PPC_MULTIPLATFORM |
69 | return PCI_GET_DN(pdev)->iommu_table; | 69 | return PCI_DN(PCI_GET_DN(pdev))->iommu_table; |
70 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 70 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c index 98ed2bccab1a..eb4e6c3f694d 100644 --- a/arch/ppc64/kernel/pmac_feature.c +++ b/arch/ppc64/kernel/pmac_feature.c | |||
@@ -674,6 +674,7 @@ void __init pmac_check_ht_link(void) | |||
674 | #if 0 /* Disabled for now */ | 674 | #if 0 /* Disabled for now */ |
675 | u32 ufreq, freq, ucfg, cfg; | 675 | u32 ufreq, freq, ucfg, cfg; |
676 | struct device_node *pcix_node; | 676 | struct device_node *pcix_node; |
677 | struct pci_dn *pdn; | ||
677 | u8 px_bus, px_devfn; | 678 | u8 px_bus, px_devfn; |
678 | struct pci_controller *px_hose; | 679 | struct pci_controller *px_hose; |
679 | 680 | ||
@@ -687,9 +688,10 @@ void __init pmac_check_ht_link(void) | |||
687 | printk("No PCI-X bridge found\n"); | 688 | printk("No PCI-X bridge found\n"); |
688 | return; | 689 | return; |
689 | } | 690 | } |
690 | px_hose = pcix_node->phb; | 691 | pdn = pcix_node->data; |
691 | px_bus = pcix_node->busno; | 692 | px_hose = pdn->phb; |
692 | px_devfn = pcix_node->devfn; | 693 | px_bus = pdn->busno; |
694 | px_devfn = pdn->devfn; | ||
693 | 695 | ||
694 | early_read_config_dword(px_hose, px_bus, px_devfn, 0xc4, &cfg); | 696 | early_read_config_dword(px_hose, px_bus, px_devfn, 0xc4, &cfg); |
695 | early_read_config_dword(px_hose, px_bus, px_devfn, 0xcc, &freq); | 697 | early_read_config_dword(px_hose, px_bus, px_devfn, 0xcc, &freq); |
diff --git a/arch/ppc64/kernel/pmac_pci.c b/arch/ppc64/kernel/pmac_pci.c index 71fe911ad183..d37bff2d7d40 100644 --- a/arch/ppc64/kernel/pmac_pci.c +++ b/arch/ppc64/kernel/pmac_pci.c | |||
@@ -242,7 +242,7 @@ static int u3_ht_skip_device(struct pci_controller *hose, | |||
242 | else | 242 | else |
243 | busdn = hose->arch_data; | 243 | busdn = hose->arch_data; |
244 | for (dn = busdn->child; dn; dn = dn->sibling) | 244 | for (dn = busdn->child; dn; dn = dn->sibling) |
245 | if (dn->devfn == devfn) | 245 | if (dn->data && PCI_DN(dn)->devfn == devfn) |
246 | break; | 246 | break; |
247 | if (dn == NULL) | 247 | if (dn == NULL) |
248 | return -1; | 248 | return -1; |
@@ -746,9 +746,9 @@ void __init pmac_pci_init(void) | |||
746 | */ | 746 | */ |
747 | if (u3_agp) { | 747 | if (u3_agp) { |
748 | struct device_node *np = u3_agp->arch_data; | 748 | struct device_node *np = u3_agp->arch_data; |
749 | np->busno = 0xf0; | 749 | PCI_DN(np)->busno = 0xf0; |
750 | for (np = np->child; np; np = np->sibling) | 750 | for (np = np->child; np; np = np->sibling) |
751 | np->busno = 0xf0; | 751 | PCI_DN(np)->busno = 0xf0; |
752 | } | 752 | } |
753 | 753 | ||
754 | pmac_check_ht_link(); | 754 | pmac_check_ht_link(); |
diff --git a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c index cdfec7438d01..63d9481c3ec2 100644 --- a/arch/ppc64/kernel/pmc.c +++ b/arch/ppc64/kernel/pmc.c | |||
@@ -26,7 +26,7 @@ static void dummy_perf(struct pt_regs *regs) | |||
26 | mtspr(SPRN_MMCR0, mmcr0); | 26 | mtspr(SPRN_MMCR0, mmcr0); |
27 | } | 27 | } |
28 | 28 | ||
29 | static spinlock_t pmc_owner_lock = SPIN_LOCK_UNLOCKED; | 29 | static DEFINE_SPINLOCK(pmc_owner_lock); |
30 | static void *pmc_owner_caller; /* mostly for debugging */ | 30 | static void *pmc_owner_caller; /* mostly for debugging */ |
31 | perf_irq_t perf_irq = dummy_perf; | 31 | perf_irq_t perf_irq = dummy_perf; |
32 | 32 | ||
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index 6ad5a8467f87..7035deb6de92 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c | |||
@@ -1733,6 +1733,7 @@ static void of_node_release(struct kref *kref) | |||
1733 | kfree(node->intrs); | 1733 | kfree(node->intrs); |
1734 | kfree(node->addrs); | 1734 | kfree(node->addrs); |
1735 | kfree(node->full_name); | 1735 | kfree(node->full_name); |
1736 | kfree(node->data); | ||
1736 | kfree(node); | 1737 | kfree(node); |
1737 | } | 1738 | } |
1738 | 1739 | ||
diff --git a/arch/ppc64/kernel/rtas_pci.c b/arch/ppc64/kernel/rtas_pci.c index 1dccadaddd1d..4a9719b48abe 100644 --- a/arch/ppc64/kernel/rtas_pci.c +++ b/arch/ppc64/kernel/rtas_pci.c | |||
@@ -48,7 +48,7 @@ static int write_pci_config; | |||
48 | static int ibm_read_pci_config; | 48 | static int ibm_read_pci_config; |
49 | static int ibm_write_pci_config; | 49 | static int ibm_write_pci_config; |
50 | 50 | ||
51 | static int config_access_valid(struct device_node *dn, int where) | 51 | static int config_access_valid(struct pci_dn *dn, int where) |
52 | { | 52 | { |
53 | if (where < 256) | 53 | if (where < 256) |
54 | return 1; | 54 | return 1; |
@@ -78,15 +78,17 @@ static int rtas_read_config(struct device_node *dn, int where, int size, u32 *va | |||
78 | int returnval = -1; | 78 | int returnval = -1; |
79 | unsigned long buid, addr; | 79 | unsigned long buid, addr; |
80 | int ret; | 80 | int ret; |
81 | struct pci_dn *pdn; | ||
81 | 82 | ||
82 | if (!dn) | 83 | if (!dn || !dn->data) |
83 | return PCIBIOS_DEVICE_NOT_FOUND; | 84 | return PCIBIOS_DEVICE_NOT_FOUND; |
84 | if (!config_access_valid(dn, where)) | 85 | pdn = dn->data; |
86 | if (!config_access_valid(pdn, where)) | ||
85 | return PCIBIOS_BAD_REGISTER_NUMBER; | 87 | return PCIBIOS_BAD_REGISTER_NUMBER; |
86 | 88 | ||
87 | addr = ((where & 0xf00) << 20) | (dn->busno << 16) | | 89 | addr = ((where & 0xf00) << 20) | (pdn->busno << 16) | |
88 | (dn->devfn << 8) | (where & 0xff); | 90 | (pdn->devfn << 8) | (where & 0xff); |
89 | buid = dn->phb->buid; | 91 | buid = pdn->phb->buid; |
90 | if (buid) { | 92 | if (buid) { |
91 | ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval, | 93 | ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval, |
92 | addr, buid >> 32, buid & 0xffffffff, size); | 94 | addr, buid >> 32, buid & 0xffffffff, size); |
@@ -98,8 +100,8 @@ static int rtas_read_config(struct device_node *dn, int where, int size, u32 *va | |||
98 | if (ret) | 100 | if (ret) |
99 | return PCIBIOS_DEVICE_NOT_FOUND; | 101 | return PCIBIOS_DEVICE_NOT_FOUND; |
100 | 102 | ||
101 | if (returnval == EEH_IO_ERROR_VALUE(size) | 103 | if (returnval == EEH_IO_ERROR_VALUE(size) && |
102 | && eeh_dn_check_failure (dn, NULL)) | 104 | eeh_dn_check_failure (dn, NULL)) |
103 | return PCIBIOS_DEVICE_NOT_FOUND; | 105 | return PCIBIOS_DEVICE_NOT_FOUND; |
104 | 106 | ||
105 | return PCIBIOS_SUCCESSFUL; | 107 | return PCIBIOS_SUCCESSFUL; |
@@ -118,24 +120,28 @@ static int rtas_pci_read_config(struct pci_bus *bus, | |||
118 | 120 | ||
119 | /* Search only direct children of the bus */ | 121 | /* Search only direct children of the bus */ |
120 | for (dn = busdn->child; dn; dn = dn->sibling) | 122 | for (dn = busdn->child; dn; dn = dn->sibling) |
121 | if (dn->devfn == devfn && of_device_available(dn)) | 123 | if (dn->data && PCI_DN(dn)->devfn == devfn |
124 | && of_device_available(dn)) | ||
122 | return rtas_read_config(dn, where, size, val); | 125 | return rtas_read_config(dn, where, size, val); |
126 | |||
123 | return PCIBIOS_DEVICE_NOT_FOUND; | 127 | return PCIBIOS_DEVICE_NOT_FOUND; |
124 | } | 128 | } |
125 | 129 | ||
126 | static int rtas_write_config(struct device_node *dn, int where, int size, u32 val) | 130 | int rtas_write_config(struct device_node *dn, int where, int size, u32 val) |
127 | { | 131 | { |
128 | unsigned long buid, addr; | 132 | unsigned long buid, addr; |
129 | int ret; | 133 | int ret; |
134 | struct pci_dn *pdn; | ||
130 | 135 | ||
131 | if (!dn) | 136 | if (!dn || !dn->data) |
132 | return PCIBIOS_DEVICE_NOT_FOUND; | 137 | return PCIBIOS_DEVICE_NOT_FOUND; |
133 | if (!config_access_valid(dn, where)) | 138 | pdn = dn->data; |
139 | if (!config_access_valid(pdn, where)) | ||
134 | return PCIBIOS_BAD_REGISTER_NUMBER; | 140 | return PCIBIOS_BAD_REGISTER_NUMBER; |
135 | 141 | ||
136 | addr = ((where & 0xf00) << 20) | (dn->busno << 16) | | 142 | addr = ((where & 0xf00) << 20) | (pdn->busno << 16) | |
137 | (dn->devfn << 8) | (where & 0xff); | 143 | (pdn->devfn << 8) | (where & 0xff); |
138 | buid = dn->phb->buid; | 144 | buid = pdn->phb->buid; |
139 | if (buid) { | 145 | if (buid) { |
140 | ret = rtas_call(ibm_write_pci_config, 5, 1, NULL, addr, buid >> 32, buid & 0xffffffff, size, (ulong) val); | 146 | ret = rtas_call(ibm_write_pci_config, 5, 1, NULL, addr, buid >> 32, buid & 0xffffffff, size, (ulong) val); |
141 | } else { | 147 | } else { |
@@ -161,7 +167,8 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
161 | 167 | ||
162 | /* Search only direct children of the bus */ | 168 | /* Search only direct children of the bus */ |
163 | for (dn = busdn->child; dn; dn = dn->sibling) | 169 | for (dn = busdn->child; dn; dn = dn->sibling) |
164 | if (dn->devfn == devfn && of_device_available(dn)) | 170 | if (dn->data && PCI_DN(dn)->devfn == devfn |
171 | && of_device_available(dn)) | ||
165 | return rtas_write_config(dn, where, size, val); | 172 | return rtas_write_config(dn, where, size, val); |
166 | return PCIBIOS_DEVICE_NOT_FOUND; | 173 | return PCIBIOS_DEVICE_NOT_FOUND; |
167 | } | 174 | } |
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index 214914a95a50..e93c13458910 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c | |||
@@ -708,62 +708,9 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu | |||
708 | compat_ptr(ubuf)); | 708 | compat_ptr(ubuf)); |
709 | } | 709 | } |
710 | 710 | ||
711 | #define IOBASE_BRIDGE_NUMBER 0 | ||
712 | #define IOBASE_MEMORY 1 | ||
713 | #define IOBASE_IO 2 | ||
714 | #define IOBASE_ISA_IO 3 | ||
715 | #define IOBASE_ISA_MEM 4 | ||
716 | |||
717 | asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) | 711 | asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) |
718 | { | 712 | { |
719 | #ifdef CONFIG_PCI | 713 | return sys_pciconfig_iobase(which, in_bus, in_devfn); |
720 | struct pci_controller* hose; | ||
721 | struct list_head *ln; | ||
722 | struct pci_bus *bus = NULL; | ||
723 | struct device_node *hose_node; | ||
724 | |||
725 | /* Argh ! Please forgive me for that hack, but that's the | ||
726 | * simplest way to get existing XFree to not lockup on some | ||
727 | * G5 machines... So when something asks for bus 0 io base | ||
728 | * (bus 0 is HT root), we return the AGP one instead. | ||
729 | */ | ||
730 | #ifdef CONFIG_PPC_PMAC | ||
731 | if (systemcfg->platform == PLATFORM_POWERMAC && | ||
732 | machine_is_compatible("MacRISC4")) | ||
733 | if (in_bus == 0) | ||
734 | in_bus = 0xf0; | ||
735 | #endif /* CONFIG_PPC_PMAC */ | ||
736 | |||
737 | /* That syscall isn't quite compatible with PCI domains, but it's | ||
738 | * used on pre-domains setup. We return the first match | ||
739 | */ | ||
740 | |||
741 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | ||
742 | bus = pci_bus_b(ln); | ||
743 | if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate)) | ||
744 | break; | ||
745 | bus = NULL; | ||
746 | } | ||
747 | if (bus == NULL || bus->sysdata == NULL) | ||
748 | return -ENODEV; | ||
749 | |||
750 | hose_node = (struct device_node *)bus->sysdata; | ||
751 | hose = hose_node->phb; | ||
752 | |||
753 | switch (which) { | ||
754 | case IOBASE_BRIDGE_NUMBER: | ||
755 | return (long)hose->first_busno; | ||
756 | case IOBASE_MEMORY: | ||
757 | return (long)hose->pci_mem_offset; | ||
758 | case IOBASE_IO: | ||
759 | return (long)hose->io_base_phys; | ||
760 | case IOBASE_ISA_IO: | ||
761 | return (long)isa_io_base; | ||
762 | case IOBASE_ISA_MEM: | ||
763 | return -EINVAL; | ||
764 | } | ||
765 | #endif /* CONFIG_PCI */ | ||
766 | return -EOPNOTSUPP; | ||
767 | } | 714 | } |
768 | 715 | ||
769 | 716 | ||
diff --git a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c index a8cbb202b8cd..05f16633bd2c 100644 --- a/arch/ppc64/kernel/syscalls.c +++ b/arch/ppc64/kernel/syscalls.c | |||
@@ -46,10 +46,6 @@ | |||
46 | 46 | ||
47 | extern unsigned long wall_jiffies; | 47 | extern unsigned long wall_jiffies; |
48 | 48 | ||
49 | void | ||
50 | check_bugs(void) | ||
51 | { | ||
52 | } | ||
53 | 49 | ||
54 | /* | 50 | /* |
55 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | 51 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. |
diff --git a/arch/ppc64/kernel/u3_iommu.c b/arch/ppc64/kernel/u3_iommu.c index b6e3bca4102d..41ea09cb9ac7 100644 --- a/arch/ppc64/kernel/u3_iommu.c +++ b/arch/ppc64/kernel/u3_iommu.c | |||
@@ -276,7 +276,7 @@ static void iommu_dev_setup_u3(struct pci_dev *dev) | |||
276 | dn = pci_device_to_OF_node(dev); | 276 | dn = pci_device_to_OF_node(dev); |
277 | 277 | ||
278 | if (dn) | 278 | if (dn) |
279 | dn->iommu_table = &iommu_table_u3; | 279 | PCI_DN(dn)->iommu_table = &iommu_table_u3; |
280 | } | 280 | } |
281 | 281 | ||
282 | static void iommu_bus_setup_u3(struct pci_bus *bus) | 282 | static void iommu_bus_setup_u3(struct pci_bus *bus) |
@@ -291,7 +291,7 @@ static void iommu_bus_setup_u3(struct pci_bus *bus) | |||
291 | dn = pci_bus_to_OF_node(bus); | 291 | dn = pci_bus_to_OF_node(bus); |
292 | 292 | ||
293 | if (dn) | 293 | if (dn) |
294 | dn->iommu_table = &iommu_table_u3; | 294 | PCI_DN(dn)->iommu_table = &iommu_table_u3; |
295 | } | 295 | } |
296 | 296 | ||
297 | static void iommu_dev_setup_null(struct pci_dev *dev) { } | 297 | static void iommu_dev_setup_null(struct pci_dev *dev) { } |
diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c index ed6766e21f5a..d49c3613c8ec 100644 --- a/arch/ppc64/kernel/udbg.c +++ b/arch/ppc64/kernel/udbg.c | |||
@@ -158,14 +158,20 @@ static struct console udbg_console = { | |||
158 | .index = -1, | 158 | .index = -1, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static int early_console_initialized; | ||
162 | |||
161 | void __init disable_early_printk(void) | 163 | void __init disable_early_printk(void) |
162 | { | 164 | { |
165 | if (!early_console_initialized) | ||
166 | return; | ||
163 | unregister_console(&udbg_console); | 167 | unregister_console(&udbg_console); |
168 | early_console_initialized = 0; | ||
164 | } | 169 | } |
165 | 170 | ||
166 | /* called by setup_system */ | 171 | /* called by setup_system */ |
167 | void register_early_udbg_console(void) | 172 | void register_early_udbg_console(void) |
168 | { | 173 | { |
174 | early_console_initialized = 1; | ||
169 | register_console(&udbg_console); | 175 | register_console(&udbg_console); |
170 | } | 176 | } |
171 | 177 | ||
diff --git a/arch/ppc64/kernel/vdso32/cacheflush.S b/arch/ppc64/kernel/vdso32/cacheflush.S index 0ed7ea721715..c8db993574ee 100644 --- a/arch/ppc64/kernel/vdso32/cacheflush.S +++ b/arch/ppc64/kernel/vdso32/cacheflush.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/vdso.h> | 15 | #include <asm/vdso.h> |
16 | #include <asm/offsets.h> | 16 | #include <asm/asm-offsets.h> |
17 | 17 | ||
18 | .text | 18 | .text |
19 | 19 | ||
diff --git a/arch/ppc64/kernel/vdso32/datapage.S b/arch/ppc64/kernel/vdso32/datapage.S index 29b6bd32e1f1..4f4eb0be3992 100644 --- a/arch/ppc64/kernel/vdso32/datapage.S +++ b/arch/ppc64/kernel/vdso32/datapage.S | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/offsets.h> | 15 | #include <asm/asm-offsets.h> |
16 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
17 | #include <asm/vdso.h> | 17 | #include <asm/vdso.h> |
18 | 18 | ||
diff --git a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S index 2b48bf1fb109..07f1c1c650c8 100644 --- a/arch/ppc64/kernel/vdso32/gettimeofday.S +++ b/arch/ppc64/kernel/vdso32/gettimeofday.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/vdso.h> | 15 | #include <asm/vdso.h> |
16 | #include <asm/offsets.h> | 16 | #include <asm/asm-offsets.h> |
17 | #include <asm/unistd.h> | 17 | #include <asm/unistd.h> |
18 | 18 | ||
19 | .text | 19 | .text |
diff --git a/arch/ppc64/kernel/vdso64/cacheflush.S b/arch/ppc64/kernel/vdso64/cacheflush.S index e0725b7b7003..d4a0ad28d534 100644 --- a/arch/ppc64/kernel/vdso64/cacheflush.S +++ b/arch/ppc64/kernel/vdso64/cacheflush.S | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/vdso.h> | 15 | #include <asm/vdso.h> |
16 | #include <asm/offsets.h> | 16 | #include <asm/asm-offsets.h> |
17 | 17 | ||
18 | .text | 18 | .text |
19 | 19 | ||
diff --git a/arch/ppc64/kernel/vdso64/datapage.S b/arch/ppc64/kernel/vdso64/datapage.S index 18afd971c9d9..ed6e599ae824 100644 --- a/arch/ppc64/kernel/vdso64/datapage.S +++ b/arch/ppc64/kernel/vdso64/datapage.S | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/offsets.h> | 15 | #include <asm/asm-offsets.h> |
16 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
17 | #include <asm/vdso.h> | 17 | #include <asm/vdso.h> |
18 | 18 | ||
diff --git a/arch/ppc64/kernel/vdso64/gettimeofday.S b/arch/ppc64/kernel/vdso64/gettimeofday.S index ed3f970ff05e..f6df8028570a 100644 --- a/arch/ppc64/kernel/vdso64/gettimeofday.S +++ b/arch/ppc64/kernel/vdso64/gettimeofday.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/ppc_asm.h> | 15 | #include <asm/ppc_asm.h> |
16 | #include <asm/vdso.h> | 16 | #include <asm/vdso.h> |
17 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | 18 | ||
19 | .text | 19 | .text |
20 | /* | 20 | /* |
diff --git a/arch/ppc64/lib/dec_and_lock.c b/arch/ppc64/lib/dec_and_lock.c index 6e8d8591708c..7b9d4da5cf92 100644 --- a/arch/ppc64/lib/dec_and_lock.c +++ b/arch/ppc64/lib/dec_and_lock.c | |||
@@ -20,14 +20,7 @@ | |||
20 | * has a cmpxchg, and where atomic->value is an int holding | 20 | * has a cmpxchg, and where atomic->value is an int holding |
21 | * the value of the atomic (i.e. the high bits aren't used | 21 | * the value of the atomic (i.e. the high bits aren't used |
22 | * for a lock or anything like that). | 22 | * for a lock or anything like that). |
23 | * | ||
24 | * N.B. ATOMIC_DEC_AND_LOCK gets defined in include/linux/spinlock.h | ||
25 | * if spinlocks are empty and thus atomic_dec_and_lock is defined | ||
26 | * to be atomic_dec_and_test - in that case we don't need it | ||
27 | * defined here as well. | ||
28 | */ | 23 | */ |
29 | |||
30 | #ifndef ATOMIC_DEC_AND_LOCK | ||
31 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | 24 | int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) |
32 | { | 25 | { |
33 | int counter; | 26 | int counter; |
@@ -52,4 +45,3 @@ int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) | |||
52 | } | 45 | } |
53 | 46 | ||
54 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 47 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
55 | #endif /* ATOMIC_DEC_AND_LOCK */ | ||
diff --git a/arch/ppc64/lib/locks.c b/arch/ppc64/lib/locks.c index ef70ef91abe2..033643ab69e0 100644 --- a/arch/ppc64/lib/locks.c +++ b/arch/ppc64/lib/locks.c | |||
@@ -23,12 +23,12 @@ | |||
23 | /* waiting for a spinlock... */ | 23 | /* waiting for a spinlock... */ |
24 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 24 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
25 | 25 | ||
26 | void __spin_yield(spinlock_t *lock) | 26 | void __spin_yield(raw_spinlock_t *lock) |
27 | { | 27 | { |
28 | unsigned int lock_value, holder_cpu, yield_count; | 28 | unsigned int lock_value, holder_cpu, yield_count; |
29 | struct paca_struct *holder_paca; | 29 | struct paca_struct *holder_paca; |
30 | 30 | ||
31 | lock_value = lock->lock; | 31 | lock_value = lock->slock; |
32 | if (lock_value == 0) | 32 | if (lock_value == 0) |
33 | return; | 33 | return; |
34 | holder_cpu = lock_value & 0xffff; | 34 | holder_cpu = lock_value & 0xffff; |
@@ -38,7 +38,7 @@ void __spin_yield(spinlock_t *lock) | |||
38 | if ((yield_count & 1) == 0) | 38 | if ((yield_count & 1) == 0) |
39 | return; /* virtual cpu is currently running */ | 39 | return; /* virtual cpu is currently running */ |
40 | rmb(); | 40 | rmb(); |
41 | if (lock->lock != lock_value) | 41 | if (lock->slock != lock_value) |
42 | return; /* something has changed */ | 42 | return; /* something has changed */ |
43 | #ifdef CONFIG_PPC_ISERIES | 43 | #ifdef CONFIG_PPC_ISERIES |
44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, |
@@ -54,7 +54,7 @@ void __spin_yield(spinlock_t *lock) | |||
54 | * This turns out to be the same for read and write locks, since | 54 | * This turns out to be the same for read and write locks, since |
55 | * we only know the holder if it is write-locked. | 55 | * we only know the holder if it is write-locked. |
56 | */ | 56 | */ |
57 | void __rw_yield(rwlock_t *rw) | 57 | void __rw_yield(raw_rwlock_t *rw) |
58 | { | 58 | { |
59 | int lock_value; | 59 | int lock_value; |
60 | unsigned int holder_cpu, yield_count; | 60 | unsigned int holder_cpu, yield_count; |
@@ -82,9 +82,9 @@ void __rw_yield(rwlock_t *rw) | |||
82 | } | 82 | } |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | void spin_unlock_wait(spinlock_t *lock) | 85 | void __raw_spin_unlock_wait(raw_spinlock_t *lock) |
86 | { | 86 | { |
87 | while (lock->lock) { | 87 | while (lock->slock) { |
88 | HMT_low(); | 88 | HMT_low(); |
89 | if (SHARED_PROCESSOR) | 89 | if (SHARED_PROCESSOR) |
90 | __spin_yield(lock); | 90 | __spin_yield(lock); |
@@ -92,4 +92,4 @@ void spin_unlock_wait(spinlock_t *lock) | |||
92 | HMT_medium(); | 92 | HMT_medium(); |
93 | } | 93 | } |
94 | 94 | ||
95 | EXPORT_SYMBOL(spin_unlock_wait); | 95 | EXPORT_SYMBOL(__raw_spin_unlock_wait); |
diff --git a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S index 35eb49e1b890..ee5a5d36bfa8 100644 --- a/arch/ppc64/mm/hash_low.S +++ b/arch/ppc64/mm/hash_low.S | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <asm/ppc_asm.h> | 18 | #include <asm/ppc_asm.h> |
19 | #include <asm/offsets.h> | 19 | #include <asm/asm-offsets.h> |
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | 21 | ||
22 | .text | 22 | .text |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index a14ab87df491..c2157c9c3acb 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -554,12 +554,12 @@ void __init do_init_bootmem(void) | |||
554 | * present. | 554 | * present. |
555 | */ | 555 | */ |
556 | for (i=0; i < lmb.memory.cnt; i++) | 556 | for (i=0; i < lmb.memory.cnt; i++) |
557 | free_bootmem(lmb_start_pfn(&lmb.memory, i), | 557 | free_bootmem(lmb.memory.region[i].base, |
558 | lmb_size_bytes(&lmb.memory, i)); | 558 | lmb_size_bytes(&lmb.memory, i)); |
559 | 559 | ||
560 | /* reserve the sections we're already using */ | 560 | /* reserve the sections we're already using */ |
561 | for (i=0; i < lmb.reserved.cnt; i++) | 561 | for (i=0; i < lmb.reserved.cnt; i++) |
562 | reserve_bootmem(lmb_start_pfn(&lmb.reserved, i), | 562 | reserve_bootmem(lmb.reserved.region[i].base, |
563 | lmb_size_bytes(&lmb.reserved, i)); | 563 | lmb_size_bytes(&lmb.reserved, i)); |
564 | 564 | ||
565 | for (i=0; i < lmb.memory.cnt; i++) | 565 | for (i=0; i < lmb.memory.cnt; i++) |
diff --git a/arch/ppc64/mm/slb_low.S b/arch/ppc64/mm/slb_low.S index 698d6b9ed6d1..a3a03da503bc 100644 --- a/arch/ppc64/mm/slb_low.S +++ b/arch/ppc64/mm/slb_low.S | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
22 | #include <asm/mmu.h> | 22 | #include <asm/mmu.h> |
23 | #include <asm/ppc_asm.h> | 23 | #include <asm/ppc_asm.h> |
24 | #include <asm/offsets.h> | 24 | #include <asm/asm-offsets.h> |
25 | #include <asm/cputable.h> | 25 | #include <asm/cputable.h> |
26 | 26 | ||
27 | /* void slb_allocate(unsigned long ea); | 27 | /* void slb_allocate(unsigned long ea); |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 3cd8dd25c9d7..98db30481d97 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
@@ -19,6 +19,7 @@ CFLAGS += -m31 | |||
19 | AFLAGS += -m31 | 19 | AFLAGS += -m31 |
20 | UTS_MACHINE := s390 | 20 | UTS_MACHINE := s390 |
21 | STACK_SIZE := 8192 | 21 | STACK_SIZE := 8192 |
22 | CHECKFLAGS += -D__s390__ | ||
22 | endif | 23 | endif |
23 | 24 | ||
24 | ifdef CONFIG_ARCH_S390X | 25 | ifdef CONFIG_ARCH_S390X |
@@ -28,6 +29,7 @@ CFLAGS += -m64 | |||
28 | AFLAGS += -m64 | 29 | AFLAGS += -m64 |
29 | UTS_MACHINE := s390x | 30 | UTS_MACHINE := s390x |
30 | STACK_SIZE := 16384 | 31 | STACK_SIZE := 16384 |
32 | CHECKFLAGS += -D__s390__ -D__s390x__ | ||
31 | endif | 33 | endif |
32 | 34 | ||
33 | cflags-$(CONFIG_MARCH_G5) += $(call cc-option,-march=g5) | 35 | cflags-$(CONFIG_MARCH_G5) += $(call cc-option,-march=g5) |
@@ -100,16 +102,6 @@ image: vmlinux | |||
100 | archclean: | 102 | archclean: |
101 | $(Q)$(MAKE) $(clean)=$(boot) | 103 | $(Q)$(MAKE) $(clean)=$(boot) |
102 | 104 | ||
103 | prepare: include/asm-$(ARCH)/offsets.h | ||
104 | |||
105 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
106 | include/config/MARKER | ||
107 | |||
108 | include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
109 | $(call filechk,gen-asm-offsets) | ||
110 | |||
111 | CLEAN_FILES += include/asm-$(ARCH)/offsets.h | ||
112 | |||
113 | # Don't use tabs in echo arguments | 105 | # Don't use tabs in echo arguments |
114 | define archhelp | 106 | define archhelp |
115 | echo '* image - Kernel image for IPL ($(boot)/image)' | 107 | echo '* image - Kernel image for IPL ($(boot)/image)' |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index cbe7d6a2d02c..58fc7fbcb40e 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/errno.h> | 18 | #include <asm/errno.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
21 | #include <asm/offsets.h> | 21 | #include <asm/asm-offsets.h> |
22 | #include <asm/unistd.h> | 22 | #include <asm/unistd.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | 24 | ||
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index fb77b72ab262..d0c9ffaa25db 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/errno.h> | 18 | #include <asm/errno.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/thread_info.h> | 20 | #include <asm/thread_info.h> |
21 | #include <asm/offsets.h> | 21 | #include <asm/asm-offsets.h> |
22 | #include <asm/unistd.h> | 22 | #include <asm/unistd.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | 24 | ||
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 2710e66fefba..55654b6e16dc 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/config.h> | 30 | #include <linux/config.h> |
31 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
32 | #include <asm/lowcore.h> | 32 | #include <asm/lowcore.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/thread_info.h> | 34 | #include <asm/thread_info.h> |
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | 36 | ||
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 9a8263a153cb..c9ff0404c875 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/config.h> | 30 | #include <linux/config.h> |
31 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
32 | #include <asm/lowcore.h> | 32 | #include <asm/lowcore.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/thread_info.h> | 34 | #include <asm/thread_info.h> |
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | 36 | ||
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c index 888b5596c195..2dc14e9c8327 100644 --- a/arch/s390/lib/spinlock.c +++ b/arch/s390/lib/spinlock.c | |||
@@ -36,7 +36,7 @@ _diag44(void) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | void | 38 | void |
39 | _raw_spin_lock_wait(spinlock_t *lp, unsigned int pc) | 39 | _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc) |
40 | { | 40 | { |
41 | int count = spin_retry; | 41 | int count = spin_retry; |
42 | 42 | ||
@@ -53,7 +53,7 @@ _raw_spin_lock_wait(spinlock_t *lp, unsigned int pc) | |||
53 | EXPORT_SYMBOL(_raw_spin_lock_wait); | 53 | EXPORT_SYMBOL(_raw_spin_lock_wait); |
54 | 54 | ||
55 | int | 55 | int |
56 | _raw_spin_trylock_retry(spinlock_t *lp, unsigned int pc) | 56 | _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc) |
57 | { | 57 | { |
58 | int count = spin_retry; | 58 | int count = spin_retry; |
59 | 59 | ||
@@ -67,7 +67,7 @@ _raw_spin_trylock_retry(spinlock_t *lp, unsigned int pc) | |||
67 | EXPORT_SYMBOL(_raw_spin_trylock_retry); | 67 | EXPORT_SYMBOL(_raw_spin_trylock_retry); |
68 | 68 | ||
69 | void | 69 | void |
70 | _raw_read_lock_wait(rwlock_t *rw) | 70 | _raw_read_lock_wait(raw_rwlock_t *rw) |
71 | { | 71 | { |
72 | unsigned int old; | 72 | unsigned int old; |
73 | int count = spin_retry; | 73 | int count = spin_retry; |
@@ -86,7 +86,7 @@ _raw_read_lock_wait(rwlock_t *rw) | |||
86 | EXPORT_SYMBOL(_raw_read_lock_wait); | 86 | EXPORT_SYMBOL(_raw_read_lock_wait); |
87 | 87 | ||
88 | int | 88 | int |
89 | _raw_read_trylock_retry(rwlock_t *rw) | 89 | _raw_read_trylock_retry(raw_rwlock_t *rw) |
90 | { | 90 | { |
91 | unsigned int old; | 91 | unsigned int old; |
92 | int count = spin_retry; | 92 | int count = spin_retry; |
@@ -102,7 +102,7 @@ _raw_read_trylock_retry(rwlock_t *rw) | |||
102 | EXPORT_SYMBOL(_raw_read_trylock_retry); | 102 | EXPORT_SYMBOL(_raw_read_trylock_retry); |
103 | 103 | ||
104 | void | 104 | void |
105 | _raw_write_lock_wait(rwlock_t *rw) | 105 | _raw_write_lock_wait(raw_rwlock_t *rw) |
106 | { | 106 | { |
107 | int count = spin_retry; | 107 | int count = spin_retry; |
108 | 108 | ||
@@ -119,7 +119,7 @@ _raw_write_lock_wait(rwlock_t *rw) | |||
119 | EXPORT_SYMBOL(_raw_write_lock_wait); | 119 | EXPORT_SYMBOL(_raw_write_lock_wait); |
120 | 120 | ||
121 | int | 121 | int |
122 | _raw_write_trylock_retry(rwlock_t *rw) | 122 | _raw_write_trylock_retry(raw_rwlock_t *rw) |
123 | { | 123 | { |
124 | int count = spin_retry; | 124 | int count = spin_retry; |
125 | 125 | ||
diff --git a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S index e8029ef42ef2..88fc94fe6488 100644 --- a/arch/s390/lib/uaccess.S +++ b/arch/s390/lib/uaccess.S | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <asm/lowcore.h> | 13 | #include <asm/lowcore.h> |
14 | #include <asm/offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | .text | 16 | .text |
17 | .align 4 | 17 | .align 4 |
diff --git a/arch/s390/lib/uaccess64.S b/arch/s390/lib/uaccess64.S index 0ca56972f4f0..50219786fc7a 100644 --- a/arch/s390/lib/uaccess64.S +++ b/arch/s390/lib/uaccess64.S | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <asm/lowcore.h> | 13 | #include <asm/lowcore.h> |
14 | #include <asm/offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | 15 | ||
16 | .text | 16 | .text |
17 | .align 4 | 17 | .align 4 |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index b5635635b5ee..19f00d57acf0 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -155,7 +155,7 @@ endif | |||
155 | prepare: maketools include/asm-sh/.cpu include/asm-sh/.mach | 155 | prepare: maketools include/asm-sh/.cpu include/asm-sh/.mach |
156 | 156 | ||
157 | .PHONY: maketools FORCE | 157 | .PHONY: maketools FORCE |
158 | maketools: include/asm-sh/asm-offsets.h include/linux/version.h FORCE | 158 | maketools: include/linux/version.h FORCE |
159 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h | 159 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h |
160 | 160 | ||
161 | all: zImage | 161 | all: zImage |
@@ -168,14 +168,7 @@ compressed: zImage | |||
168 | archclean: | 168 | archclean: |
169 | $(Q)$(MAKE) $(clean)=$(boot) | 169 | $(Q)$(MAKE) $(clean)=$(boot) |
170 | 170 | ||
171 | CLEAN_FILES += include/asm-sh/machtypes.h include/asm-sh/asm-offsets.h | 171 | CLEAN_FILES += include/asm-sh/machtypes.h |
172 | |||
173 | arch/sh/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
174 | include/asm-sh/.cpu include/asm-sh/.mach | ||
175 | |||
176 | include/asm-sh/asm-offsets.h: arch/sh/kernel/asm-offsets.s | ||
177 | $(call filechk,gen-asm-offsets) | ||
178 | |||
179 | 172 | ||
180 | define archhelp | 173 | define archhelp |
181 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' | 174 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' |
diff --git a/arch/sh/boards/adx/irq_maskreg.c b/arch/sh/boards/adx/irq_maskreg.c index ca91bb0f1f5c..c0973f8d57ba 100644 --- a/arch/sh/boards/adx/irq_maskreg.c +++ b/arch/sh/boards/adx/irq_maskreg.c | |||
@@ -37,13 +37,13 @@ static void end_maskreg_irq(unsigned int irq); | |||
37 | 37 | ||
38 | /* hw_interrupt_type */ | 38 | /* hw_interrupt_type */ |
39 | static struct hw_interrupt_type maskreg_irq_type = { | 39 | static struct hw_interrupt_type maskreg_irq_type = { |
40 | " Mask Register", | 40 | .typename = " Mask Register", |
41 | startup_maskreg_irq, | 41 | .startup = startup_maskreg_irq, |
42 | shutdown_maskreg_irq, | 42 | .shutdown = shutdown_maskreg_irq, |
43 | enable_maskreg_irq, | 43 | .enable = enable_maskreg_irq, |
44 | disable_maskreg_irq, | 44 | .disable = disable_maskreg_irq, |
45 | mask_and_ack_maskreg, | 45 | .ack = mask_and_ack_maskreg, |
46 | end_maskreg_irq | 46 | .end = end_maskreg_irq |
47 | }; | 47 | }; |
48 | 48 | ||
49 | /* actual implementatin */ | 49 | /* actual implementatin */ |
diff --git a/arch/sh/boards/bigsur/io.c b/arch/sh/boards/bigsur/io.c index 697144de7419..a9fde781b21a 100644 --- a/arch/sh/boards/bigsur/io.c +++ b/arch/sh/boards/bigsur/io.c | |||
@@ -37,10 +37,6 @@ static u8 bigsur_iomap_lo_shift[BIGSUR_IOMAP_LO_NMAP]; | |||
37 | static u32 bigsur_iomap_hi[BIGSUR_IOMAP_HI_NMAP]; | 37 | static u32 bigsur_iomap_hi[BIGSUR_IOMAP_HI_NMAP]; |
38 | static u8 bigsur_iomap_hi_shift[BIGSUR_IOMAP_HI_NMAP]; | 38 | static u8 bigsur_iomap_hi_shift[BIGSUR_IOMAP_HI_NMAP]; |
39 | 39 | ||
40 | #ifndef MAX | ||
41 | #define MAX(a,b) ((a)>(b)?(a):(b)) | ||
42 | #endif | ||
43 | |||
44 | void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift) | 40 | void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift) |
45 | { | 41 | { |
46 | u32 port, endport = baseport + nports; | 42 | u32 port, endport = baseport + nports; |
@@ -57,7 +53,7 @@ void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift) | |||
57 | addr += (1<<(BIGSUR_IOMAP_LO_SHIFT)); | 53 | addr += (1<<(BIGSUR_IOMAP_LO_SHIFT)); |
58 | } | 54 | } |
59 | 55 | ||
60 | for (port = MAX(baseport, BIGSUR_IOMAP_LO_THRESH) ; | 56 | for (port = max_t(u32, baseport, BIGSUR_IOMAP_LO_THRESH); |
61 | port < endport && port < BIGSUR_IOMAP_HI_THRESH ; | 57 | port < endport && port < BIGSUR_IOMAP_HI_THRESH ; |
62 | port += (1<<BIGSUR_IOMAP_HI_SHIFT)) { | 58 | port += (1<<BIGSUR_IOMAP_HI_SHIFT)) { |
63 | pr_debug(" maphi[0x%x] = 0x%08x\n", port, addr); | 59 | pr_debug(" maphi[0x%x] = 0x%08x\n", port, addr); |
@@ -80,7 +76,7 @@ void bigsur_port_unmap(u32 baseport, u32 nports) | |||
80 | bigsur_iomap_lo[port>>BIGSUR_IOMAP_LO_SHIFT] = 0; | 76 | bigsur_iomap_lo[port>>BIGSUR_IOMAP_LO_SHIFT] = 0; |
81 | } | 77 | } |
82 | 78 | ||
83 | for (port = MAX(baseport, BIGSUR_IOMAP_LO_THRESH) ; | 79 | for (port = max_t(u32, baseport, BIGSUR_IOMAP_LO_THRESH); |
84 | port < endport && port < BIGSUR_IOMAP_HI_THRESH ; | 80 | port < endport && port < BIGSUR_IOMAP_HI_THRESH ; |
85 | port += (1<<BIGSUR_IOMAP_HI_SHIFT)) { | 81 | port += (1<<BIGSUR_IOMAP_HI_SHIFT)) { |
86 | bigsur_iomap_hi[port>>BIGSUR_IOMAP_HI_SHIFT] = 0; | 82 | bigsur_iomap_hi[port>>BIGSUR_IOMAP_HI_SHIFT] = 0; |
diff --git a/arch/sh/boards/bigsur/irq.c b/arch/sh/boards/bigsur/irq.c index c188fc32dc9a..6ddbcc77244d 100644 --- a/arch/sh/boards/bigsur/irq.c +++ b/arch/sh/boards/bigsur/irq.c | |||
@@ -228,23 +228,23 @@ static void shutdown_bigsur_irq(unsigned int irq) | |||
228 | 228 | ||
229 | /* Define the IRQ structures for the L1 and L2 IRQ types */ | 229 | /* Define the IRQ structures for the L1 and L2 IRQ types */ |
230 | static struct hw_interrupt_type bigsur_l1irq_type = { | 230 | static struct hw_interrupt_type bigsur_l1irq_type = { |
231 | "BigSur-CPLD-Level1-IRQ", | 231 | .typename = "BigSur-CPLD-Level1-IRQ", |
232 | startup_bigsur_irq, | 232 | .startup = startup_bigsur_irq, |
233 | shutdown_bigsur_irq, | 233 | .shutdown = shutdown_bigsur_irq, |
234 | enable_bigsur_l1irq, | 234 | .enable = enable_bigsur_l1irq, |
235 | disable_bigsur_l1irq, | 235 | .disable = disable_bigsur_l1irq, |
236 | mask_and_ack_bigsur, | 236 | .ack = mask_and_ack_bigsur, |
237 | end_bigsur_irq | 237 | .end = end_bigsur_irq |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static struct hw_interrupt_type bigsur_l2irq_type = { | 240 | static struct hw_interrupt_type bigsur_l2irq_type = { |
241 | "BigSur-CPLD-Level2-IRQ", | 241 | .typename = "BigSur-CPLD-Level2-IRQ", |
242 | startup_bigsur_irq, | 242 | .startup = startup_bigsur_irq, |
243 | shutdown_bigsur_irq, | 243 | .shutdown =shutdown_bigsur_irq, |
244 | enable_bigsur_l2irq, | 244 | .enable = enable_bigsur_l2irq, |
245 | disable_bigsur_l2irq, | 245 | .disable = disable_bigsur_l2irq, |
246 | mask_and_ack_bigsur, | 246 | .ack = mask_and_ack_bigsur, |
247 | end_bigsur_irq | 247 | .end = end_bigsur_irq |
248 | }; | 248 | }; |
249 | 249 | ||
250 | 250 | ||
diff --git a/arch/sh/boards/cqreek/irq.c b/arch/sh/boards/cqreek/irq.c index fa6cfe5a20a7..d1da0d844567 100644 --- a/arch/sh/boards/cqreek/irq.c +++ b/arch/sh/boards/cqreek/irq.c | |||
@@ -83,13 +83,13 @@ static void shutdown_cqreek_irq(unsigned int irq) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | static struct hw_interrupt_type cqreek_irq_type = { | 85 | static struct hw_interrupt_type cqreek_irq_type = { |
86 | "CqREEK-IRQ", | 86 | .typename = "CqREEK-IRQ", |
87 | startup_cqreek_irq, | 87 | .startup = startup_cqreek_irq, |
88 | shutdown_cqreek_irq, | 88 | .shutdown = shutdown_cqreek_irq, |
89 | enable_cqreek_irq, | 89 | .enable = enable_cqreek_irq, |
90 | disable_cqreek_irq, | 90 | .disable = disable_cqreek_irq, |
91 | mask_and_ack_cqreek, | 91 | .ack = mask_and_ack_cqreek, |
92 | end_cqreek_irq | 92 | .end = end_cqreek_irq |
93 | }; | 93 | }; |
94 | 94 | ||
95 | int cqreek_has_ide, cqreek_has_isa; | 95 | int cqreek_has_ide, cqreek_has_isa; |
diff --git a/arch/sh/boards/harp/irq.c b/arch/sh/boards/harp/irq.c index acd58489970f..52d0ba39031b 100644 --- a/arch/sh/boards/harp/irq.c +++ b/arch/sh/boards/harp/irq.c | |||
@@ -39,13 +39,13 @@ static unsigned int startup_harp_irq(unsigned int irq) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | static struct hw_interrupt_type harp_irq_type = { | 41 | static struct hw_interrupt_type harp_irq_type = { |
42 | "Harp-IRQ", | 42 | .typename = "Harp-IRQ", |
43 | startup_harp_irq, | 43 | .startup = startup_harp_irq, |
44 | shutdown_harp_irq, | 44 | .shutdown = shutdown_harp_irq, |
45 | enable_harp_irq, | 45 | .enable = enable_harp_irq, |
46 | disable_harp_irq, | 46 | .disable = disable_harp_irq, |
47 | mask_and_ack_harp, | 47 | .ack = mask_and_ack_harp, |
48 | end_harp_irq | 48 | .end = end_harp_irq |
49 | }; | 49 | }; |
50 | 50 | ||
51 | static void disable_harp_irq(unsigned int irq) | 51 | static void disable_harp_irq(unsigned int irq) |
diff --git a/arch/sh/boards/overdrive/irq.c b/arch/sh/boards/overdrive/irq.c index 23adc6be71e7..715e8feb3a68 100644 --- a/arch/sh/boards/overdrive/irq.c +++ b/arch/sh/boards/overdrive/irq.c | |||
@@ -86,13 +86,13 @@ static unsigned int startup_od_irq(unsigned int irq) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | static struct hw_interrupt_type od_irq_type = { | 88 | static struct hw_interrupt_type od_irq_type = { |
89 | "Overdrive-IRQ", | 89 | .typename = "Overdrive-IRQ", |
90 | startup_od_irq, | 90 | .startup = startup_od_irq, |
91 | shutdown_od_irq, | 91 | .shutdown = shutdown_od_irq, |
92 | enable_od_irq, | 92 | .enable = enable_od_irq, |
93 | disable_od_irq, | 93 | .disable = disable_od_irq, |
94 | mask_and_ack_od, | 94 | .ack = mask_and_ack_od, |
95 | end_od_irq | 95 | .end = end_od_irq |
96 | }; | 96 | }; |
97 | 97 | ||
98 | static void disable_od_irq(unsigned int irq) | 98 | static void disable_od_irq(unsigned int irq) |
diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c index a7921f67a35f..ed4c5b50ea45 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c | |||
@@ -74,13 +74,13 @@ static void end_hs7751rvoip_irq(unsigned int irq) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | static struct hw_interrupt_type hs7751rvoip_irq_type = { | 76 | static struct hw_interrupt_type hs7751rvoip_irq_type = { |
77 | "HS7751RVoIP IRQ", | 77 | .typename = "HS7751RVoIP IRQ", |
78 | startup_hs7751rvoip_irq, | 78 | .startup = startup_hs7751rvoip_irq, |
79 | shutdown_hs7751rvoip_irq, | 79 | .shutdown = shutdown_hs7751rvoip_irq, |
80 | enable_hs7751rvoip_irq, | 80 | .enable = enable_hs7751rvoip_irq, |
81 | disable_hs7751rvoip_irq, | 81 | .disable = disable_hs7751rvoip_irq, |
82 | ack_hs7751rvoip_irq, | 82 | .ack = ack_hs7751rvoip_irq, |
83 | end_hs7751rvoip_irq, | 83 | .end = end_hs7751rvoip_irq, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static void make_hs7751rvoip_irq(unsigned int irq) | 86 | static void make_hs7751rvoip_irq(unsigned int irq) |
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index 95717f4f1e2d..d36c9374aed1 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c | |||
@@ -88,13 +88,13 @@ static void end_rts7751r2d_irq(unsigned int irq) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | static struct hw_interrupt_type rts7751r2d_irq_type = { | 90 | static struct hw_interrupt_type rts7751r2d_irq_type = { |
91 | "RTS7751R2D IRQ", | 91 | .typename = "RTS7751R2D IRQ", |
92 | startup_rts7751r2d_irq, | 92 | .startup = startup_rts7751r2d_irq, |
93 | shutdown_rts7751r2d_irq, | 93 | .shutdown = shutdown_rts7751r2d_irq, |
94 | enable_rts7751r2d_irq, | 94 | .enable = enable_rts7751r2d_irq, |
95 | disable_rts7751r2d_irq, | 95 | .disable = disable_rts7751r2d_irq, |
96 | ack_rts7751r2d_irq, | 96 | .ack = ack_rts7751r2d_irq, |
97 | end_rts7751r2d_irq, | 97 | .end = end_rts7751r2d_irq, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static void make_rts7751r2d_irq(unsigned int irq) | 100 | static void make_rts7751r2d_irq(unsigned int irq) |
diff --git a/arch/sh/boards/renesas/systemh/irq.c b/arch/sh/boards/renesas/systemh/irq.c index 5675a4134eee..7a2eb10edb56 100644 --- a/arch/sh/boards/renesas/systemh/irq.c +++ b/arch/sh/boards/renesas/systemh/irq.c | |||
@@ -35,13 +35,13 @@ static void end_systemh_irq(unsigned int irq); | |||
35 | 35 | ||
36 | /* hw_interrupt_type */ | 36 | /* hw_interrupt_type */ |
37 | static struct hw_interrupt_type systemh_irq_type = { | 37 | static struct hw_interrupt_type systemh_irq_type = { |
38 | " SystemH Register", | 38 | .typename = " SystemH Register", |
39 | startup_systemh_irq, | 39 | .startup = startup_systemh_irq, |
40 | shutdown_systemh_irq, | 40 | .shutdown = shutdown_systemh_irq, |
41 | enable_systemh_irq, | 41 | .enable = enable_systemh_irq, |
42 | disable_systemh_irq, | 42 | .disable = disable_systemh_irq, |
43 | mask_and_ack_systemh, | 43 | .ack = mask_and_ack_systemh, |
44 | end_systemh_irq | 44 | .end = end_systemh_irq |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static unsigned int startup_systemh_irq(unsigned int irq) | 47 | static unsigned int startup_systemh_irq(unsigned int irq) |
diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c index 1298883eca4b..1395c1e65da4 100644 --- a/arch/sh/boards/superh/microdev/irq.c +++ b/arch/sh/boards/superh/microdev/irq.c | |||
@@ -83,13 +83,13 @@ static unsigned int startup_microdev_irq(unsigned int irq) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | static struct hw_interrupt_type microdev_irq_type = { | 85 | static struct hw_interrupt_type microdev_irq_type = { |
86 | "MicroDev-IRQ", | 86 | .typename = "MicroDev-IRQ", |
87 | startup_microdev_irq, | 87 | .startup = startup_microdev_irq, |
88 | shutdown_microdev_irq, | 88 | .shutdown = shutdown_microdev_irq, |
89 | enable_microdev_irq, | 89 | .enable = enable_microdev_irq, |
90 | disable_microdev_irq, | 90 | .disable = disable_microdev_irq, |
91 | mask_and_ack_microdev, | 91 | .ack = mask_and_ack_microdev, |
92 | end_microdev_irq | 92 | .end = end_microdev_irq |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static void disable_microdev_irq(unsigned int irq) | 95 | static void disable_microdev_irq(unsigned int irq) |
diff --git a/arch/sh/cchips/hd6446x/hd64465/io.c b/arch/sh/cchips/hd6446x/hd64465/io.c index 99ac709c550e..84cb142def0b 100644 --- a/arch/sh/cchips/hd6446x/hd64465/io.c +++ b/arch/sh/cchips/hd6446x/hd64465/io.c | |||
@@ -48,10 +48,6 @@ static unsigned char hd64465_iomap_lo_shift[HD64465_IOMAP_LO_NMAP]; | |||
48 | static unsigned long hd64465_iomap_hi[HD64465_IOMAP_HI_NMAP]; | 48 | static unsigned long hd64465_iomap_hi[HD64465_IOMAP_HI_NMAP]; |
49 | static unsigned char hd64465_iomap_hi_shift[HD64465_IOMAP_HI_NMAP]; | 49 | static unsigned char hd64465_iomap_hi_shift[HD64465_IOMAP_HI_NMAP]; |
50 | 50 | ||
51 | #ifndef MAX | ||
52 | #define MAX(a,b) ((a)>(b)?(a):(b)) | ||
53 | #endif | ||
54 | |||
55 | #define PORT2ADDR(x) (sh_mv.mv_isa_port2addr(x)) | 51 | #define PORT2ADDR(x) (sh_mv.mv_isa_port2addr(x)) |
56 | 52 | ||
57 | void hd64465_port_map(unsigned short baseport, unsigned int nports, | 53 | void hd64465_port_map(unsigned short baseport, unsigned int nports, |
@@ -71,7 +67,7 @@ void hd64465_port_map(unsigned short baseport, unsigned int nports, | |||
71 | addr += (1<<(HD64465_IOMAP_LO_SHIFT)); | 67 | addr += (1<<(HD64465_IOMAP_LO_SHIFT)); |
72 | } | 68 | } |
73 | 69 | ||
74 | for (port = MAX(baseport, HD64465_IOMAP_LO_THRESH) ; | 70 | for (port = max_t(unsigned int, baseport, HD64465_IOMAP_LO_THRESH); |
75 | port < endport && port < HD64465_IOMAP_HI_THRESH ; | 71 | port < endport && port < HD64465_IOMAP_HI_THRESH ; |
76 | port += (1<<HD64465_IOMAP_HI_SHIFT)) { | 72 | port += (1<<HD64465_IOMAP_HI_SHIFT)) { |
77 | DPRINTK(" maphi[0x%x] = 0x%08lx\n", port, addr); | 73 | DPRINTK(" maphi[0x%x] = 0x%08lx\n", port, addr); |
@@ -95,7 +91,7 @@ void hd64465_port_unmap(unsigned short baseport, unsigned int nports) | |||
95 | hd64465_iomap_lo[port>>HD64465_IOMAP_LO_SHIFT] = 0; | 91 | hd64465_iomap_lo[port>>HD64465_IOMAP_LO_SHIFT] = 0; |
96 | } | 92 | } |
97 | 93 | ||
98 | for (port = MAX(baseport, HD64465_IOMAP_LO_THRESH) ; | 94 | for (port = max_t(unsigned int, baseport, HD64465_IOMAP_LO_THRESH); |
99 | port < endport && port < HD64465_IOMAP_HI_THRESH ; | 95 | port < endport && port < HD64465_IOMAP_HI_THRESH ; |
100 | port += (1<<HD64465_IOMAP_HI_SHIFT)) { | 96 | port += (1<<HD64465_IOMAP_HI_SHIFT)) { |
101 | hd64465_iomap_hi[port>>HD64465_IOMAP_HI_SHIFT] = 0; | 97 | hd64465_iomap_hi[port>>HD64465_IOMAP_HI_SHIFT] = 0; |
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 3079234cb65b..1b6ac523b458 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -87,13 +87,13 @@ static void shutdown_voyagergx_irq(unsigned int irq) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static struct hw_interrupt_type voyagergx_irq_type = { | 89 | static struct hw_interrupt_type voyagergx_irq_type = { |
90 | "VOYAGERGX-IRQ", | 90 | .typename = "VOYAGERGX-IRQ", |
91 | startup_voyagergx_irq, | 91 | .startup = startup_voyagergx_irq, |
92 | shutdown_voyagergx_irq, | 92 | .shutdown = shutdown_voyagergx_irq, |
93 | enable_voyagergx_irq, | 93 | .enable = enable_voyagergx_irq, |
94 | disable_voyagergx_irq, | 94 | .disable = disable_voyagergx_irq, |
95 | mask_and_ack_voyagergx, | 95 | .ack = mask_and_ack_voyagergx, |
96 | end_voyagergx_irq, | 96 | .end = end_voyagergx_irq, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 99 | static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
diff --git a/arch/sh/kernel/cpu/irq_imask.c b/arch/sh/kernel/cpu/irq_imask.c index f76901e732fb..a963d00a971e 100644 --- a/arch/sh/kernel/cpu/irq_imask.c +++ b/arch/sh/kernel/cpu/irq_imask.c | |||
@@ -46,13 +46,13 @@ static unsigned int startup_imask_irq(unsigned int irq) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | static struct hw_interrupt_type imask_irq_type = { | 48 | static struct hw_interrupt_type imask_irq_type = { |
49 | "SR.IMASK", | 49 | .typename = "SR.IMASK", |
50 | startup_imask_irq, | 50 | .startup = startup_imask_irq, |
51 | shutdown_imask_irq, | 51 | .shutdown = shutdown_imask_irq, |
52 | enable_imask_irq, | 52 | .enable = enable_imask_irq, |
53 | disable_imask_irq, | 53 | .disable = disable_imask_irq, |
54 | mask_and_ack_imask, | 54 | .ack = mask_and_ack_imask, |
55 | end_imask_irq | 55 | .end = end_imask_irq |
56 | }; | 56 | }; |
57 | 57 | ||
58 | void static inline set_interrupt_registers(int ip) | 58 | void static inline set_interrupt_registers(int ip) |
diff --git a/arch/sh/kernel/cpu/irq_ipr.c b/arch/sh/kernel/cpu/irq_ipr.c index 7ea3d2d030e5..71f92096132b 100644 --- a/arch/sh/kernel/cpu/irq_ipr.c +++ b/arch/sh/kernel/cpu/irq_ipr.c | |||
@@ -48,13 +48,13 @@ static unsigned int startup_ipr_irq(unsigned int irq) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static struct hw_interrupt_type ipr_irq_type = { | 50 | static struct hw_interrupt_type ipr_irq_type = { |
51 | "IPR-IRQ", | 51 | .typename = "IPR-IRQ", |
52 | startup_ipr_irq, | 52 | .startup = startup_ipr_irq, |
53 | shutdown_ipr_irq, | 53 | .shutdown = shutdown_ipr_irq, |
54 | enable_ipr_irq, | 54 | .enable = enable_ipr_irq, |
55 | disable_ipr_irq, | 55 | .disable = disable_ipr_irq, |
56 | mask_and_ack_ipr, | 56 | .ack = mask_and_ack_ipr, |
57 | end_ipr_irq | 57 | .end = end_ipr_irq |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static void disable_ipr_irq(unsigned int irq) | 60 | static void disable_ipr_irq(unsigned int irq) |
@@ -142,13 +142,13 @@ static unsigned int startup_pint_irq(unsigned int irq) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | static struct hw_interrupt_type pint_irq_type = { | 144 | static struct hw_interrupt_type pint_irq_type = { |
145 | "PINT-IRQ", | 145 | .typename = "PINT-IRQ", |
146 | startup_pint_irq, | 146 | .startup = startup_pint_irq, |
147 | shutdown_pint_irq, | 147 | .shutdown = shutdown_pint_irq, |
148 | enable_pint_irq, | 148 | .enable = enable_pint_irq, |
149 | disable_pint_irq, | 149 | .disable = disable_pint_irq, |
150 | mask_and_ack_pint, | 150 | .ack = mask_and_ack_pint, |
151 | end_pint_irq | 151 | .end = end_pint_irq |
152 | }; | 152 | }; |
153 | 153 | ||
154 | static void disable_pint_irq(unsigned int irq) | 154 | static void disable_pint_irq(unsigned int irq) |
diff --git a/arch/sh/kernel/cpu/sh4/irq_intc2.c b/arch/sh/kernel/cpu/sh4/irq_intc2.c index 099ebbf89745..f6b16ba01932 100644 --- a/arch/sh/kernel/cpu/sh4/irq_intc2.c +++ b/arch/sh/kernel/cpu/sh4/irq_intc2.c | |||
@@ -48,13 +48,13 @@ static unsigned int startup_intc2_irq(unsigned int irq) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | static struct hw_interrupt_type intc2_irq_type = { | 50 | static struct hw_interrupt_type intc2_irq_type = { |
51 | "INTC2-IRQ", | 51 | .typename = "INTC2-IRQ", |
52 | startup_intc2_irq, | 52 | .startup = startup_intc2_irq, |
53 | shutdown_intc2_irq, | 53 | .shutdown = shutdown_intc2_irq, |
54 | enable_intc2_irq, | 54 | .enable = enable_intc2_irq, |
55 | disable_intc2_irq, | 55 | .disable = disable_intc2_irq, |
56 | mask_and_ack_intc2, | 56 | .ack = mask_and_ack_intc2, |
57 | end_intc2_irq | 57 | .end = end_intc2_irq |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static void disable_intc2_irq(unsigned int irq) | 60 | static void disable_intc2_irq(unsigned int irq) |
diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile index b4fd8e13fea9..39073734a476 100644 --- a/arch/sh64/Makefile +++ b/arch/sh64/Makefile | |||
@@ -73,11 +73,7 @@ compressed: zImage | |||
73 | archclean: | 73 | archclean: |
74 | $(Q)$(MAKE) $(clean)=$(boot) | 74 | $(Q)$(MAKE) $(clean)=$(boot) |
75 | 75 | ||
76 | prepare: include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h | 76 | prepare: arch/$(ARCH)/lib/syscalltab.h |
77 | |||
78 | include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \ | ||
79 | include/asm include/linux/version.h | ||
80 | $(call filechk,gen-asm-offsets) | ||
81 | 77 | ||
82 | define filechk_gen-syscalltab | 78 | define filechk_gen-syscalltab |
83 | (set -e; \ | 79 | (set -e; \ |
@@ -108,7 +104,7 @@ endef | |||
108 | arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S | 104 | arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S |
109 | $(call filechk,gen-syscalltab) | 105 | $(call filechk,gen-syscalltab) |
110 | 106 | ||
111 | CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h | 107 | CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h |
112 | 108 | ||
113 | define archhelp | 109 | define archhelp |
114 | @echo ' zImage - Compressed kernel image (arch/sh64/boot/zImage)' | 110 | @echo ' zImage - Compressed kernel image (arch/sh64/boot/zImage)' |
diff --git a/arch/sh64/kernel/irq_intc.c b/arch/sh64/kernel/irq_intc.c index 43f88f3a78b0..fc99bf4e362c 100644 --- a/arch/sh64/kernel/irq_intc.c +++ b/arch/sh64/kernel/irq_intc.c | |||
@@ -107,13 +107,13 @@ static void mask_and_ack_intc(unsigned int); | |||
107 | static void end_intc_irq(unsigned int irq); | 107 | static void end_intc_irq(unsigned int irq); |
108 | 108 | ||
109 | static struct hw_interrupt_type intc_irq_type = { | 109 | static struct hw_interrupt_type intc_irq_type = { |
110 | "INTC", | 110 | .typename = "INTC", |
111 | startup_intc_irq, | 111 | .startup = startup_intc_irq, |
112 | shutdown_intc_irq, | 112 | .shutdown = shutdown_intc_irq, |
113 | enable_intc_irq, | 113 | .enable = enable_intc_irq, |
114 | disable_intc_irq, | 114 | .disable = disable_intc_irq, |
115 | mask_and_ack_intc, | 115 | .ack = mask_and_ack_intc, |
116 | end_intc_irq | 116 | .end = end_intc_irq |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static int irlm; /* IRL mode */ | 119 | static int irlm; /* IRL mode */ |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 7b3bbaf083a6..dea48f6cff38 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
@@ -59,17 +59,7 @@ image tftpboot.img: vmlinux | |||
59 | archclean: | 59 | archclean: |
60 | $(Q)$(MAKE) $(clean)=$(boot) | 60 | $(Q)$(MAKE) $(clean)=$(boot) |
61 | 61 | ||
62 | prepare: include/asm-$(ARCH)/asm_offsets.h | 62 | CLEAN_FILES += arch/$(ARCH)/boot/System.map |
63 | |||
64 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
65 | include/config/MARKER | ||
66 | |||
67 | include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
68 | $(call filechk,gen-asm-offsets) | ||
69 | |||
70 | CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \ | ||
71 | arch/$(ARCH)/kernel/asm-offsets.s \ | ||
72 | arch/$(ARCH)/boot/System.map | ||
73 | 63 | ||
74 | # Don't use tabs in echo arguments. | 64 | # Don't use tabs in echo arguments. |
75 | define archhelp | 65 | define archhelp |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index b448166f5da9..03ecb4e4614e 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/kgdb.h> | 17 | #include <asm/kgdb.h> |
18 | #include <asm/contregs.h> | 18 | #include <asm/contregs.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/asm_offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/psr.h> | 21 | #include <asm/psr.h> |
22 | #include <asm/vaddrs.h> | 22 | #include <asm/vaddrs.h> |
23 | #include <asm/memreg.h> | 23 | #include <asm/memreg.h> |
diff --git a/arch/sparc/kernel/sclow.S b/arch/sparc/kernel/sclow.S index 3a867fc19927..136e37c53d49 100644 --- a/arch/sparc/kernel/sclow.S +++ b/arch/sparc/kernel/sclow.S | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | #include <asm/asm_offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/errno.h> | 11 | #include <asm/errno.h> |
12 | #include <asm/winmacro.h> | 12 | #include <asm/winmacro.h> |
13 | #include <asm/thread_info.h> | 13 | #include <asm/thread_info.h> |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 5d974a2b735a..f84809333624 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -114,17 +114,7 @@ DOT_ALIAS2(unsigned, urem, unsigned, unsigned) | |||
114 | /* used by various drivers */ | 114 | /* used by various drivers */ |
115 | EXPORT_SYMBOL(sparc_cpu_model); | 115 | EXPORT_SYMBOL(sparc_cpu_model); |
116 | EXPORT_SYMBOL(kernel_thread); | 116 | EXPORT_SYMBOL(kernel_thread); |
117 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
118 | #ifdef CONFIG_SMP | 117 | #ifdef CONFIG_SMP |
119 | EXPORT_SYMBOL(_do_spin_lock); | ||
120 | EXPORT_SYMBOL(_do_spin_unlock); | ||
121 | EXPORT_SYMBOL(_spin_trylock); | ||
122 | EXPORT_SYMBOL(_do_read_lock); | ||
123 | EXPORT_SYMBOL(_do_read_unlock); | ||
124 | EXPORT_SYMBOL(_do_write_lock); | ||
125 | EXPORT_SYMBOL(_do_write_unlock); | ||
126 | #endif | ||
127 | #else | ||
128 | // XXX find what uses (or used) these. | 118 | // XXX find what uses (or used) these. |
129 | EXPORT_SYMBOL(___rw_read_enter); | 119 | EXPORT_SYMBOL(___rw_read_enter); |
130 | EXPORT_SYMBOL(___rw_read_exit); | 120 | EXPORT_SYMBOL(___rw_read_exit); |
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 2296ff9dc47a..fa5006946062 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile | |||
@@ -9,5 +9,3 @@ lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \ | |||
9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ | 9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ |
10 | copy_user.o locks.o atomic.o atomic32.o bitops.o \ | 10 | copy_user.o locks.o atomic.o atomic32.o bitops.o \ |
11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o | 11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o |
12 | |||
13 | lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o | ||
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 19724c5800a7..2e64e8c3e8e5 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -20,7 +20,7 @@ spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = { | |||
20 | 20 | ||
21 | #else /* SMP */ | 21 | #else /* SMP */ |
22 | 22 | ||
23 | static spinlock_t dummy = SPIN_LOCK_UNLOCKED; | 23 | static DEFINE_SPINLOCK(dummy); |
24 | #define ATOMIC_HASH_SIZE 1 | 24 | #define ATOMIC_HASH_SIZE 1 |
25 | #define ATOMIC_HASH(a) (&dummy) | 25 | #define ATOMIC_HASH(a) (&dummy) |
26 | 26 | ||
diff --git a/arch/sparc/lib/debuglocks.c b/arch/sparc/lib/debuglocks.c deleted file mode 100644 index fb182352782c..000000000000 --- a/arch/sparc/lib/debuglocks.c +++ /dev/null | |||
@@ -1,202 +0,0 @@ | |||
1 | /* $Id: debuglocks.c,v 1.11 2001/09/20 00:35:31 davem Exp $ | ||
2 | * debuglocks.c: Debugging versions of SMP locking primitives. | ||
3 | * | ||
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | ||
5 | * Copyright (C) 1998-99 Anton Blanchard (anton@progsoc.uts.edu.au) | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/sched.h> | ||
10 | #include <linux/threads.h> /* For NR_CPUS */ | ||
11 | #include <linux/spinlock.h> | ||
12 | #include <asm/psr.h> | ||
13 | #include <asm/system.h> | ||
14 | |||
15 | #ifdef CONFIG_SMP | ||
16 | |||
17 | /* Some notes on how these debugging routines work. When a lock is acquired | ||
18 | * an extra debugging member lock->owner_pc is set to the caller of the lock | ||
19 | * acquisition routine. Right before releasing a lock, the debugging program | ||
20 | * counter is cleared to zero. | ||
21 | * | ||
22 | * Furthermore, since PC's are 4 byte aligned on Sparc, we stuff the CPU | ||
23 | * number of the owner in the lowest two bits. | ||
24 | */ | ||
25 | |||
26 | #define STORE_CALLER(A) __asm__ __volatile__("mov %%i7, %0" : "=r" (A)); | ||
27 | |||
28 | static inline void show(char *str, spinlock_t *lock, unsigned long caller) | ||
29 | { | ||
30 | int cpu = smp_processor_id(); | ||
31 | |||
32 | printk("%s(%p) CPU#%d stuck at %08lx, owner PC(%08lx):CPU(%lx)\n",str, | ||
33 | lock, cpu, caller, lock->owner_pc & ~3, lock->owner_pc & 3); | ||
34 | } | ||
35 | |||
36 | static inline void show_read(char *str, rwlock_t *lock, unsigned long caller) | ||
37 | { | ||
38 | int cpu = smp_processor_id(); | ||
39 | |||
40 | printk("%s(%p) CPU#%d stuck at %08lx, owner PC(%08lx):CPU(%lx)\n", str, | ||
41 | lock, cpu, caller, lock->owner_pc & ~3, lock->owner_pc & 3); | ||
42 | } | ||
43 | |||
44 | static inline void show_write(char *str, rwlock_t *lock, unsigned long caller) | ||
45 | { | ||
46 | int cpu = smp_processor_id(); | ||
47 | int i; | ||
48 | |||
49 | printk("%s(%p) CPU#%d stuck at %08lx, owner PC(%08lx):CPU(%lx)", str, | ||
50 | lock, cpu, caller, lock->owner_pc & ~3, lock->owner_pc & 3); | ||
51 | |||
52 | for(i = 0; i < NR_CPUS; i++) | ||
53 | printk(" reader[%d]=%08lx", i, lock->reader_pc[i]); | ||
54 | |||
55 | printk("\n"); | ||
56 | } | ||
57 | |||
58 | #undef INIT_STUCK | ||
59 | #define INIT_STUCK 100000000 | ||
60 | |||
61 | void _do_spin_lock(spinlock_t *lock, char *str) | ||
62 | { | ||
63 | unsigned long caller; | ||
64 | unsigned long val; | ||
65 | int cpu = smp_processor_id(); | ||
66 | int stuck = INIT_STUCK; | ||
67 | |||
68 | STORE_CALLER(caller); | ||
69 | |||
70 | again: | ||
71 | __asm__ __volatile__("ldstub [%1], %0" : "=r" (val) : "r" (&(lock->lock))); | ||
72 | if(val) { | ||
73 | while(lock->lock) { | ||
74 | if (!--stuck) { | ||
75 | show(str, lock, caller); | ||
76 | stuck = INIT_STUCK; | ||
77 | } | ||
78 | barrier(); | ||
79 | } | ||
80 | goto again; | ||
81 | } | ||
82 | lock->owner_pc = (cpu & 3) | (caller & ~3); | ||
83 | } | ||
84 | |||
85 | int _spin_trylock(spinlock_t *lock) | ||
86 | { | ||
87 | unsigned long val; | ||
88 | unsigned long caller; | ||
89 | int cpu = smp_processor_id(); | ||
90 | |||
91 | STORE_CALLER(caller); | ||
92 | |||
93 | __asm__ __volatile__("ldstub [%1], %0" : "=r" (val) : "r" (&(lock->lock))); | ||
94 | if(!val) { | ||
95 | /* We got it, record our identity for debugging. */ | ||
96 | lock->owner_pc = (cpu & 3) | (caller & ~3); | ||
97 | } | ||
98 | return val == 0; | ||
99 | } | ||
100 | |||
101 | void _do_spin_unlock(spinlock_t *lock) | ||
102 | { | ||
103 | lock->owner_pc = 0; | ||
104 | barrier(); | ||
105 | lock->lock = 0; | ||
106 | } | ||
107 | |||
108 | void _do_read_lock(rwlock_t *rw, char *str) | ||
109 | { | ||
110 | unsigned long caller; | ||
111 | unsigned long val; | ||
112 | int cpu = smp_processor_id(); | ||
113 | int stuck = INIT_STUCK; | ||
114 | |||
115 | STORE_CALLER(caller); | ||
116 | |||
117 | wlock_again: | ||
118 | __asm__ __volatile__("ldstub [%1 + 3], %0" : "=r" (val) : "r" (&(rw->lock))); | ||
119 | if(val) { | ||
120 | while(rw->lock & 0xff) { | ||
121 | if (!--stuck) { | ||
122 | show_read(str, rw, caller); | ||
123 | stuck = INIT_STUCK; | ||
124 | } | ||
125 | barrier(); | ||
126 | } | ||
127 | goto wlock_again; | ||
128 | } | ||
129 | |||
130 | rw->reader_pc[cpu] = caller; | ||
131 | barrier(); | ||
132 | rw->lock++; | ||
133 | } | ||
134 | |||
135 | void _do_read_unlock(rwlock_t *rw, char *str) | ||
136 | { | ||
137 | unsigned long caller; | ||
138 | unsigned long val; | ||
139 | int cpu = smp_processor_id(); | ||
140 | int stuck = INIT_STUCK; | ||
141 | |||
142 | STORE_CALLER(caller); | ||
143 | |||
144 | wlock_again: | ||
145 | __asm__ __volatile__("ldstub [%1 + 3], %0" : "=r" (val) : "r" (&(rw->lock))); | ||
146 | if(val) { | ||
147 | while(rw->lock & 0xff) { | ||
148 | if (!--stuck) { | ||
149 | show_read(str, rw, caller); | ||
150 | stuck = INIT_STUCK; | ||
151 | } | ||
152 | barrier(); | ||
153 | } | ||
154 | goto wlock_again; | ||
155 | } | ||
156 | |||
157 | rw->reader_pc[cpu] = 0; | ||
158 | barrier(); | ||
159 | rw->lock -= 0x1ff; | ||
160 | } | ||
161 | |||
162 | void _do_write_lock(rwlock_t *rw, char *str) | ||
163 | { | ||
164 | unsigned long caller; | ||
165 | unsigned long val; | ||
166 | int cpu = smp_processor_id(); | ||
167 | int stuck = INIT_STUCK; | ||
168 | |||
169 | STORE_CALLER(caller); | ||
170 | |||
171 | wlock_again: | ||
172 | __asm__ __volatile__("ldstub [%1 + 3], %0" : "=r" (val) : "r" (&(rw->lock))); | ||
173 | if(val) { | ||
174 | wlock_wait: | ||
175 | while(rw->lock) { | ||
176 | if (!--stuck) { | ||
177 | show_write(str, rw, caller); | ||
178 | stuck = INIT_STUCK; | ||
179 | } | ||
180 | barrier(); | ||
181 | } | ||
182 | goto wlock_again; | ||
183 | } | ||
184 | |||
185 | if (rw->lock & ~0xff) { | ||
186 | *(((unsigned char *)&rw->lock)+3) = 0; | ||
187 | barrier(); | ||
188 | goto wlock_wait; | ||
189 | } | ||
190 | |||
191 | barrier(); | ||
192 | rw->owner_pc = (cpu & 3) | (caller & ~3); | ||
193 | } | ||
194 | |||
195 | void _do_write_unlock(rwlock_t *rw) | ||
196 | { | ||
197 | rw->owner_pc = 0; | ||
198 | barrier(); | ||
199 | rw->lock = 0; | ||
200 | } | ||
201 | |||
202 | #endif /* SMP */ | ||
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S index 54b8e764b042..a231cca37216 100644 --- a/arch/sparc/mm/hypersparc.S +++ b/arch/sparc/mm/hypersparc.S | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
8 | #include <asm/psr.h> | 8 | #include <asm/psr.h> |
9 | #include <asm/asm_offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/asi.h> | 10 | #include <asm/asi.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page.h> |
12 | #include <asm/pgtsrmmu.h> | 12 | #include <asm/pgtsrmmu.h> |
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S index 2dcaa5ac1a38..cd90f3fdc4e7 100644 --- a/arch/sparc/mm/swift.S +++ b/arch/sparc/mm/swift.S | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm/asi.h> | 9 | #include <asm/asi.h> |
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/pgtsrmmu.h> | 11 | #include <asm/pgtsrmmu.h> |
12 | #include <asm/asm_offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | 13 | ||
14 | .text | 14 | .text |
15 | .align 4 | 15 | .align 4 |
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S index 8acd1787fde2..697af617594a 100644 --- a/arch/sparc/mm/tsunami.S +++ b/arch/sparc/mm/tsunami.S | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/config.h> | 7 | #include <linux/config.h> |
8 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
9 | #include <asm/asm_offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/psr.h> | 10 | #include <asm/psr.h> |
11 | #include <asm/asi.h> | 11 | #include <asm/asi.h> |
12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S index f58712d26bf5..3cbd6de18dde 100644 --- a/arch/sparc/mm/viking.S +++ b/arch/sparc/mm/viking.S | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
10 | #include <asm/ptrace.h> | 10 | #include <asm/ptrace.h> |
11 | #include <asm/psr.h> | 11 | #include <asm/psr.h> |
12 | #include <asm/asm_offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | #include <asm/asi.h> | 13 | #include <asm/asi.h> |
14 | #include <asm/mxcc.h> | 14 | #include <asm/mxcc.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
diff --git a/arch/sparc64/kernel/asm-offsets.c b/arch/sparc64/kernel/asm-offsets.c new file mode 100644 index 000000000000..9e263112a6e2 --- /dev/null +++ b/arch/sparc64/kernel/asm-offsets.c | |||
@@ -0,0 +1 @@ | |||
/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */ | |||
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 66255434128a..7d10b0397091 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -607,11 +607,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
607 | struct thread_info *t = p->thread_info; | 607 | struct thread_info *t = p->thread_info; |
608 | char *child_trap_frame; | 608 | char *child_trap_frame; |
609 | 609 | ||
610 | #ifdef CONFIG_DEBUG_SPINLOCK | ||
611 | p->thread.smp_lock_count = 0; | ||
612 | p->thread.smp_lock_pc = 0; | ||
613 | #endif | ||
614 | |||
615 | /* Calculate offset to stack_frame & pt_regs */ | 610 | /* Calculate offset to stack_frame & pt_regs */ |
616 | child_trap_frame = ((char *)t) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); | 611 | child_trap_frame = ((char *)t) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); |
617 | memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); | 612 | memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 7d9a0f6c437d..cbb5e59824e5 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -115,17 +115,12 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data); | |||
115 | 115 | ||
116 | /* used by various drivers */ | 116 | /* used by various drivers */ |
117 | #ifdef CONFIG_SMP | 117 | #ifdef CONFIG_SMP |
118 | #ifndef CONFIG_DEBUG_SPINLOCK | ||
119 | /* Out of line rw-locking implementation. */ | 118 | /* Out of line rw-locking implementation. */ |
120 | EXPORT_SYMBOL(__read_lock); | 119 | EXPORT_SYMBOL(__read_lock); |
121 | EXPORT_SYMBOL(__read_unlock); | 120 | EXPORT_SYMBOL(__read_unlock); |
122 | EXPORT_SYMBOL(__write_lock); | 121 | EXPORT_SYMBOL(__write_lock); |
123 | EXPORT_SYMBOL(__write_unlock); | 122 | EXPORT_SYMBOL(__write_unlock); |
124 | EXPORT_SYMBOL(__write_trylock); | 123 | EXPORT_SYMBOL(__write_trylock); |
125 | /* Out of line spin-locking implementation. */ | ||
126 | EXPORT_SYMBOL(_raw_spin_lock); | ||
127 | EXPORT_SYMBOL(_raw_spin_lock_flags); | ||
128 | #endif | ||
129 | 124 | ||
130 | /* Hard IRQ locking */ | 125 | /* Hard IRQ locking */ |
131 | EXPORT_SYMBOL(synchronize_irq); | 126 | EXPORT_SYMBOL(synchronize_irq); |
diff --git a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile index 40dbeec7e5d6..d968aebe83b2 100644 --- a/arch/sparc64/lib/Makefile +++ b/arch/sparc64/lib/Makefile | |||
@@ -14,7 +14,6 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \ | |||
14 | copy_in_user.o user_fixup.o memmove.o \ | 14 | copy_in_user.o user_fixup.o memmove.o \ |
15 | mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o | 15 | mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o |
16 | 16 | ||
17 | lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o | ||
18 | lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o | 17 | lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o |
19 | 18 | ||
20 | obj-y += iomap.o | 19 | obj-y += iomap.o |
diff --git a/arch/sparc64/lib/debuglocks.c b/arch/sparc64/lib/debuglocks.c deleted file mode 100644 index f5f0b5586f01..000000000000 --- a/arch/sparc64/lib/debuglocks.c +++ /dev/null | |||
@@ -1,366 +0,0 @@ | |||
1 | /* $Id: debuglocks.c,v 1.9 2001/11/17 00:10:48 davem Exp $ | ||
2 | * debuglocks.c: Debugging versions of SMP locking primitives. | ||
3 | * | ||
4 | * Copyright (C) 1998 David S. Miller (davem@redhat.com) | ||
5 | */ | ||
6 | |||
7 | #include <linux/config.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/sched.h> | ||
10 | #include <linux/spinlock.h> | ||
11 | #include <asm/system.h> | ||
12 | |||
13 | #ifdef CONFIG_SMP | ||
14 | |||
15 | static inline void show (char *str, spinlock_t *lock, unsigned long caller) | ||
16 | { | ||
17 | int cpu = smp_processor_id(); | ||
18 | |||
19 | printk("%s(%p) CPU#%d stuck at %08x, owner PC(%08x):CPU(%x)\n", | ||
20 | str, lock, cpu, (unsigned int) caller, | ||
21 | lock->owner_pc, lock->owner_cpu); | ||
22 | } | ||
23 | |||
24 | static inline void show_read (char *str, rwlock_t *lock, unsigned long caller) | ||
25 | { | ||
26 | int cpu = smp_processor_id(); | ||
27 | |||
28 | printk("%s(%p) CPU#%d stuck at %08x, writer PC(%08x):CPU(%x)\n", | ||
29 | str, lock, cpu, (unsigned int) caller, | ||
30 | lock->writer_pc, lock->writer_cpu); | ||
31 | } | ||
32 | |||
33 | static inline void show_write (char *str, rwlock_t *lock, unsigned long caller) | ||
34 | { | ||
35 | int cpu = smp_processor_id(); | ||
36 | int i; | ||
37 | |||
38 | printk("%s(%p) CPU#%d stuck at %08x\n", | ||
39 | str, lock, cpu, (unsigned int) caller); | ||
40 | printk("Writer: PC(%08x):CPU(%x)\n", | ||
41 | lock->writer_pc, lock->writer_cpu); | ||
42 | printk("Readers:"); | ||
43 | for (i = 0; i < NR_CPUS; i++) | ||
44 | if (lock->reader_pc[i]) | ||
45 | printk(" %d[%08x]", i, lock->reader_pc[i]); | ||
46 | printk("\n"); | ||
47 | } | ||
48 | |||
49 | #undef INIT_STUCK | ||
50 | #define INIT_STUCK 100000000 | ||
51 | |||
52 | void _do_spin_lock(spinlock_t *lock, char *str, unsigned long caller) | ||
53 | { | ||
54 | unsigned long val; | ||
55 | int stuck = INIT_STUCK; | ||
56 | int cpu = get_cpu(); | ||
57 | int shown = 0; | ||
58 | |||
59 | again: | ||
60 | __asm__ __volatile__("ldstub [%1], %0" | ||
61 | : "=r" (val) | ||
62 | : "r" (&(lock->lock)) | ||
63 | : "memory"); | ||
64 | membar_storeload_storestore(); | ||
65 | if (val) { | ||
66 | while (lock->lock) { | ||
67 | if (!--stuck) { | ||
68 | if (shown++ <= 2) | ||
69 | show(str, lock, caller); | ||
70 | stuck = INIT_STUCK; | ||
71 | } | ||
72 | rmb(); | ||
73 | } | ||
74 | goto again; | ||
75 | } | ||
76 | lock->owner_pc = ((unsigned int)caller); | ||
77 | lock->owner_cpu = cpu; | ||
78 | current->thread.smp_lock_count++; | ||
79 | current->thread.smp_lock_pc = ((unsigned int)caller); | ||
80 | |||
81 | put_cpu(); | ||
82 | } | ||
83 | |||
84 | int _do_spin_trylock(spinlock_t *lock, unsigned long caller) | ||
85 | { | ||
86 | unsigned long val; | ||
87 | int cpu = get_cpu(); | ||
88 | |||
89 | __asm__ __volatile__("ldstub [%1], %0" | ||
90 | : "=r" (val) | ||
91 | : "r" (&(lock->lock)) | ||
92 | : "memory"); | ||
93 | membar_storeload_storestore(); | ||
94 | if (!val) { | ||
95 | lock->owner_pc = ((unsigned int)caller); | ||
96 | lock->owner_cpu = cpu; | ||
97 | current->thread.smp_lock_count++; | ||
98 | current->thread.smp_lock_pc = ((unsigned int)caller); | ||
99 | } | ||
100 | |||
101 | put_cpu(); | ||
102 | |||
103 | return val == 0; | ||
104 | } | ||
105 | |||
106 | void _do_spin_unlock(spinlock_t *lock) | ||
107 | { | ||
108 | lock->owner_pc = 0; | ||
109 | lock->owner_cpu = NO_PROC_ID; | ||
110 | membar_storestore_loadstore(); | ||
111 | lock->lock = 0; | ||
112 | current->thread.smp_lock_count--; | ||
113 | } | ||
114 | |||
115 | /* Keep INIT_STUCK the same... */ | ||
116 | |||
117 | void _do_read_lock(rwlock_t *rw, char *str, unsigned long caller) | ||
118 | { | ||
119 | unsigned long val; | ||
120 | int stuck = INIT_STUCK; | ||
121 | int cpu = get_cpu(); | ||
122 | int shown = 0; | ||
123 | |||
124 | wlock_again: | ||
125 | /* Wait for any writer to go away. */ | ||
126 | while (((long)(rw->lock)) < 0) { | ||
127 | if (!--stuck) { | ||
128 | if (shown++ <= 2) | ||
129 | show_read(str, rw, caller); | ||
130 | stuck = INIT_STUCK; | ||
131 | } | ||
132 | rmb(); | ||
133 | } | ||
134 | /* Try once to increment the counter. */ | ||
135 | __asm__ __volatile__( | ||
136 | " ldx [%0], %%g1\n" | ||
137 | " brlz,a,pn %%g1, 2f\n" | ||
138 | " mov 1, %0\n" | ||
139 | " add %%g1, 1, %%g7\n" | ||
140 | " casx [%0], %%g1, %%g7\n" | ||
141 | " sub %%g1, %%g7, %0\n" | ||
142 | "2:" : "=r" (val) | ||
143 | : "0" (&(rw->lock)) | ||
144 | : "g1", "g7", "memory"); | ||
145 | membar_storeload_storestore(); | ||
146 | if (val) | ||
147 | goto wlock_again; | ||
148 | rw->reader_pc[cpu] = ((unsigned int)caller); | ||
149 | current->thread.smp_lock_count++; | ||
150 | current->thread.smp_lock_pc = ((unsigned int)caller); | ||
151 | |||
152 | put_cpu(); | ||
153 | } | ||
154 | |||
155 | void _do_read_unlock(rwlock_t *rw, char *str, unsigned long caller) | ||
156 | { | ||
157 | unsigned long val; | ||
158 | int stuck = INIT_STUCK; | ||
159 | int cpu = get_cpu(); | ||
160 | int shown = 0; | ||
161 | |||
162 | /* Drop our identity _first_. */ | ||
163 | rw->reader_pc[cpu] = 0; | ||
164 | current->thread.smp_lock_count--; | ||
165 | runlock_again: | ||
166 | /* Spin trying to decrement the counter using casx. */ | ||
167 | __asm__ __volatile__( | ||
168 | " membar #StoreLoad | #LoadLoad\n" | ||
169 | " ldx [%0], %%g1\n" | ||
170 | " sub %%g1, 1, %%g7\n" | ||
171 | " casx [%0], %%g1, %%g7\n" | ||
172 | " membar #StoreLoad | #StoreStore\n" | ||
173 | " sub %%g1, %%g7, %0\n" | ||
174 | : "=r" (val) | ||
175 | : "0" (&(rw->lock)) | ||
176 | : "g1", "g7", "memory"); | ||
177 | if (val) { | ||
178 | if (!--stuck) { | ||
179 | if (shown++ <= 2) | ||
180 | show_read(str, rw, caller); | ||
181 | stuck = INIT_STUCK; | ||
182 | } | ||
183 | goto runlock_again; | ||
184 | } | ||
185 | |||
186 | put_cpu(); | ||
187 | } | ||
188 | |||
189 | void _do_write_lock(rwlock_t *rw, char *str, unsigned long caller) | ||
190 | { | ||
191 | unsigned long val; | ||
192 | int stuck = INIT_STUCK; | ||
193 | int cpu = get_cpu(); | ||
194 | int shown = 0; | ||
195 | |||
196 | wlock_again: | ||
197 | /* Spin while there is another writer. */ | ||
198 | while (((long)rw->lock) < 0) { | ||
199 | if (!--stuck) { | ||
200 | if (shown++ <= 2) | ||
201 | show_write(str, rw, caller); | ||
202 | stuck = INIT_STUCK; | ||
203 | } | ||
204 | rmb(); | ||
205 | } | ||
206 | |||
207 | /* Try to acuire the write bit. */ | ||
208 | __asm__ __volatile__( | ||
209 | " mov 1, %%g3\n" | ||
210 | " sllx %%g3, 63, %%g3\n" | ||
211 | " ldx [%0], %%g1\n" | ||
212 | " brlz,pn %%g1, 1f\n" | ||
213 | " or %%g1, %%g3, %%g7\n" | ||
214 | " casx [%0], %%g1, %%g7\n" | ||
215 | " membar #StoreLoad | #StoreStore\n" | ||
216 | " ba,pt %%xcc, 2f\n" | ||
217 | " sub %%g1, %%g7, %0\n" | ||
218 | "1: mov 1, %0\n" | ||
219 | "2:" : "=r" (val) | ||
220 | : "0" (&(rw->lock)) | ||
221 | : "g3", "g1", "g7", "memory"); | ||
222 | if (val) { | ||
223 | /* We couldn't get the write bit. */ | ||
224 | if (!--stuck) { | ||
225 | if (shown++ <= 2) | ||
226 | show_write(str, rw, caller); | ||
227 | stuck = INIT_STUCK; | ||
228 | } | ||
229 | goto wlock_again; | ||
230 | } | ||
231 | if ((rw->lock & ((1UL<<63)-1UL)) != 0UL) { | ||
232 | /* Readers still around, drop the write | ||
233 | * lock, spin, and try again. | ||
234 | */ | ||
235 | if (!--stuck) { | ||
236 | if (shown++ <= 2) | ||
237 | show_write(str, rw, caller); | ||
238 | stuck = INIT_STUCK; | ||
239 | } | ||
240 | __asm__ __volatile__( | ||
241 | " mov 1, %%g3\n" | ||
242 | " sllx %%g3, 63, %%g3\n" | ||
243 | "1: ldx [%0], %%g1\n" | ||
244 | " andn %%g1, %%g3, %%g7\n" | ||
245 | " casx [%0], %%g1, %%g7\n" | ||
246 | " cmp %%g1, %%g7\n" | ||
247 | " membar #StoreLoad | #StoreStore\n" | ||
248 | " bne,pn %%xcc, 1b\n" | ||
249 | " nop" | ||
250 | : /* no outputs */ | ||
251 | : "r" (&(rw->lock)) | ||
252 | : "g3", "g1", "g7", "cc", "memory"); | ||
253 | while(rw->lock != 0) { | ||
254 | if (!--stuck) { | ||
255 | if (shown++ <= 2) | ||
256 | show_write(str, rw, caller); | ||
257 | stuck = INIT_STUCK; | ||
258 | } | ||
259 | rmb(); | ||
260 | } | ||
261 | goto wlock_again; | ||
262 | } | ||
263 | |||
264 | /* We have it, say who we are. */ | ||
265 | rw->writer_pc = ((unsigned int)caller); | ||
266 | rw->writer_cpu = cpu; | ||
267 | current->thread.smp_lock_count++; | ||
268 | current->thread.smp_lock_pc = ((unsigned int)caller); | ||
269 | |||
270 | put_cpu(); | ||
271 | } | ||
272 | |||
273 | void _do_write_unlock(rwlock_t *rw, unsigned long caller) | ||
274 | { | ||
275 | unsigned long val; | ||
276 | int stuck = INIT_STUCK; | ||
277 | int shown = 0; | ||
278 | |||
279 | /* Drop our identity _first_ */ | ||
280 | rw->writer_pc = 0; | ||
281 | rw->writer_cpu = NO_PROC_ID; | ||
282 | current->thread.smp_lock_count--; | ||
283 | wlock_again: | ||
284 | __asm__ __volatile__( | ||
285 | " membar #StoreLoad | #LoadLoad\n" | ||
286 | " mov 1, %%g3\n" | ||
287 | " sllx %%g3, 63, %%g3\n" | ||
288 | " ldx [%0], %%g1\n" | ||
289 | " andn %%g1, %%g3, %%g7\n" | ||
290 | " casx [%0], %%g1, %%g7\n" | ||
291 | " membar #StoreLoad | #StoreStore\n" | ||
292 | " sub %%g1, %%g7, %0\n" | ||
293 | : "=r" (val) | ||
294 | : "0" (&(rw->lock)) | ||
295 | : "g3", "g1", "g7", "memory"); | ||
296 | if (val) { | ||
297 | if (!--stuck) { | ||
298 | if (shown++ <= 2) | ||
299 | show_write("write_unlock", rw, caller); | ||
300 | stuck = INIT_STUCK; | ||
301 | } | ||
302 | goto wlock_again; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | int _do_write_trylock(rwlock_t *rw, char *str, unsigned long caller) | ||
307 | { | ||
308 | unsigned long val; | ||
309 | int cpu = get_cpu(); | ||
310 | |||
311 | /* Try to acuire the write bit. */ | ||
312 | __asm__ __volatile__( | ||
313 | " mov 1, %%g3\n" | ||
314 | " sllx %%g3, 63, %%g3\n" | ||
315 | " ldx [%0], %%g1\n" | ||
316 | " brlz,pn %%g1, 1f\n" | ||
317 | " or %%g1, %%g3, %%g7\n" | ||
318 | " casx [%0], %%g1, %%g7\n" | ||
319 | " membar #StoreLoad | #StoreStore\n" | ||
320 | " ba,pt %%xcc, 2f\n" | ||
321 | " sub %%g1, %%g7, %0\n" | ||
322 | "1: mov 1, %0\n" | ||
323 | "2:" : "=r" (val) | ||
324 | : "0" (&(rw->lock)) | ||
325 | : "g3", "g1", "g7", "memory"); | ||
326 | |||
327 | if (val) { | ||
328 | put_cpu(); | ||
329 | return 0; | ||
330 | } | ||
331 | |||
332 | if ((rw->lock & ((1UL<<63)-1UL)) != 0UL) { | ||
333 | /* Readers still around, drop the write | ||
334 | * lock, return failure. | ||
335 | */ | ||
336 | __asm__ __volatile__( | ||
337 | " mov 1, %%g3\n" | ||
338 | " sllx %%g3, 63, %%g3\n" | ||
339 | "1: ldx [%0], %%g1\n" | ||
340 | " andn %%g1, %%g3, %%g7\n" | ||
341 | " casx [%0], %%g1, %%g7\n" | ||
342 | " cmp %%g1, %%g7\n" | ||
343 | " membar #StoreLoad | #StoreStore\n" | ||
344 | " bne,pn %%xcc, 1b\n" | ||
345 | " nop" | ||
346 | : /* no outputs */ | ||
347 | : "r" (&(rw->lock)) | ||
348 | : "g3", "g1", "g7", "cc", "memory"); | ||
349 | |||
350 | put_cpu(); | ||
351 | |||
352 | return 0; | ||
353 | } | ||
354 | |||
355 | /* We have it, say who we are. */ | ||
356 | rw->writer_pc = ((unsigned int)caller); | ||
357 | rw->writer_cpu = cpu; | ||
358 | current->thread.smp_lock_count++; | ||
359 | current->thread.smp_lock_pc = ((unsigned int)caller); | ||
360 | |||
361 | put_cpu(); | ||
362 | |||
363 | return 1; | ||
364 | } | ||
365 | |||
366 | #endif /* CONFIG_SMP */ | ||
diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index cac0a1cf0050..be0a054e3ed6 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
25 | #include <linux/mtio.h> | 25 | #include <linux/mtio.h> |
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/rcupdate.h> | ||
27 | #include <linux/compat.h> | 28 | #include <linux/compat.h> |
28 | 29 | ||
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
@@ -293,16 +294,18 @@ static struct module_info { | |||
293 | static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) | 294 | static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) |
294 | { | 295 | { |
295 | struct inode *ino; | 296 | struct inode *ino; |
297 | struct fdtable *fdt; | ||
296 | /* I wonder which of these tests are superfluous... --patrik */ | 298 | /* I wonder which of these tests are superfluous... --patrik */ |
297 | spin_lock(¤t->files->file_lock); | 299 | rcu_read_lock(); |
298 | if (! current->files->fd[fd] || | 300 | fdt = files_fdtable(current->files); |
299 | ! current->files->fd[fd]->f_dentry || | 301 | if (! fdt->fd[fd] || |
300 | ! (ino = current->files->fd[fd]->f_dentry->d_inode) || | 302 | ! fdt->fd[fd]->f_dentry || |
303 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || | ||
301 | ! S_ISSOCK(ino->i_mode)) { | 304 | ! S_ISSOCK(ino->i_mode)) { |
302 | spin_unlock(¤t->files->file_lock); | 305 | rcu_read_unlock(); |
303 | return TBADF; | 306 | return TBADF; |
304 | } | 307 | } |
305 | spin_unlock(¤t->files->file_lock); | 308 | rcu_read_unlock(); |
306 | 309 | ||
307 | switch (cmd & 0xff) { | 310 | switch (cmd & 0xff) { |
308 | case 109: /* SI_SOCKPARAMS */ | 311 | case 109: /* SI_SOCKPARAMS */ |
diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c index 022c80f43392..aaad29c35c83 100644 --- a/arch/sparc64/solaris/timod.c +++ b/arch/sparc64/solaris/timod.c | |||
@@ -143,9 +143,11 @@ static struct T_primsg *timod_mkctl(int size) | |||
143 | static void timod_wake_socket(unsigned int fd) | 143 | static void timod_wake_socket(unsigned int fd) |
144 | { | 144 | { |
145 | struct socket *sock; | 145 | struct socket *sock; |
146 | struct fdtable *fdt; | ||
146 | 147 | ||
147 | SOLD("wakeing socket"); | 148 | SOLD("wakeing socket"); |
148 | sock = SOCKET_I(current->files->fd[fd]->f_dentry->d_inode); | 149 | fdt = files_fdtable(current->files); |
150 | sock = SOCKET_I(fdt->fd[fd]->f_dentry->d_inode); | ||
149 | wake_up_interruptible(&sock->wait); | 151 | wake_up_interruptible(&sock->wait); |
150 | read_lock(&sock->sk->sk_callback_lock); | 152 | read_lock(&sock->sk->sk_callback_lock); |
151 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) | 153 | if (sock->fasync_list && !test_bit(SOCK_ASYNC_WAITDATA, &sock->flags)) |
@@ -157,9 +159,11 @@ static void timod_wake_socket(unsigned int fd) | |||
157 | static void timod_queue(unsigned int fd, struct T_primsg *it) | 159 | static void timod_queue(unsigned int fd, struct T_primsg *it) |
158 | { | 160 | { |
159 | struct sol_socket_struct *sock; | 161 | struct sol_socket_struct *sock; |
162 | struct fdtable *fdt; | ||
160 | 163 | ||
161 | SOLD("queuing primsg"); | 164 | SOLD("queuing primsg"); |
162 | sock = (struct sol_socket_struct *)current->files->fd[fd]->private_data; | 165 | fdt = files_fdtable(current->files); |
166 | sock = (struct sol_socket_struct *)fdt->fd[fd]->private_data; | ||
163 | it->next = sock->pfirst; | 167 | it->next = sock->pfirst; |
164 | sock->pfirst = it; | 168 | sock->pfirst = it; |
165 | if (!sock->plast) | 169 | if (!sock->plast) |
@@ -171,9 +175,11 @@ static void timod_queue(unsigned int fd, struct T_primsg *it) | |||
171 | static void timod_queue_end(unsigned int fd, struct T_primsg *it) | 175 | static void timod_queue_end(unsigned int fd, struct T_primsg *it) |
172 | { | 176 | { |
173 | struct sol_socket_struct *sock; | 177 | struct sol_socket_struct *sock; |
178 | struct fdtable *fdt; | ||
174 | 179 | ||
175 | SOLD("queuing primsg at end"); | 180 | SOLD("queuing primsg at end"); |
176 | sock = (struct sol_socket_struct *)current->files->fd[fd]->private_data; | 181 | fdt = files_fdtable(current->files); |
182 | sock = (struct sol_socket_struct *)fdt->fd[fd]->private_data; | ||
177 | it->next = NULL; | 183 | it->next = NULL; |
178 | if (sock->plast) | 184 | if (sock->plast) |
179 | sock->plast->next = it; | 185 | sock->plast->next = it; |
@@ -344,6 +350,7 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, | |||
344 | char *buf; | 350 | char *buf; |
345 | struct file *filp; | 351 | struct file *filp; |
346 | struct inode *ino; | 352 | struct inode *ino; |
353 | struct fdtable *fdt; | ||
347 | struct sol_socket_struct *sock; | 354 | struct sol_socket_struct *sock; |
348 | mm_segment_t old_fs = get_fs(); | 355 | mm_segment_t old_fs = get_fs(); |
349 | long args[6]; | 356 | long args[6]; |
@@ -351,7 +358,9 @@ int timod_putmsg(unsigned int fd, char __user *ctl_buf, int ctl_len, | |||
351 | (int (*)(int, unsigned long __user *))SYS(socketcall); | 358 | (int (*)(int, unsigned long __user *))SYS(socketcall); |
352 | int (*sys_sendto)(int, void __user *, size_t, unsigned, struct sockaddr __user *, int) = | 359 | int (*sys_sendto)(int, void __user *, size_t, unsigned, struct sockaddr __user *, int) = |
353 | (int (*)(int, void __user *, size_t, unsigned, struct sockaddr __user *, int))SYS(sendto); | 360 | (int (*)(int, void __user *, size_t, unsigned, struct sockaddr __user *, int))SYS(sendto); |
354 | filp = current->files->fd[fd]; | 361 | |
362 | fdt = files_fdtable(current->files); | ||
363 | filp = fdt->fd[fd]; | ||
355 | ino = filp->f_dentry->d_inode; | 364 | ino = filp->f_dentry->d_inode; |
356 | sock = (struct sol_socket_struct *)filp->private_data; | 365 | sock = (struct sol_socket_struct *)filp->private_data; |
357 | SOLD("entry"); | 366 | SOLD("entry"); |
@@ -620,6 +629,7 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us | |||
620 | int oldflags; | 629 | int oldflags; |
621 | struct file *filp; | 630 | struct file *filp; |
622 | struct inode *ino; | 631 | struct inode *ino; |
632 | struct fdtable *fdt; | ||
623 | struct sol_socket_struct *sock; | 633 | struct sol_socket_struct *sock; |
624 | struct T_unitdata_ind udi; | 634 | struct T_unitdata_ind udi; |
625 | mm_segment_t old_fs = get_fs(); | 635 | mm_segment_t old_fs = get_fs(); |
@@ -632,7 +642,8 @@ int timod_getmsg(unsigned int fd, char __user *ctl_buf, int ctl_maxlen, s32 __us | |||
632 | 642 | ||
633 | SOLD("entry"); | 643 | SOLD("entry"); |
634 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); | 644 | SOLDD(("%u %p %d %p %p %d %p %d\n", fd, ctl_buf, ctl_maxlen, ctl_len, data_buf, data_maxlen, data_len, *flags_p)); |
635 | filp = current->files->fd[fd]; | 645 | fdt = files_fdtable(current->files); |
646 | filp = fdt->fd[fd]; | ||
636 | ino = filp->f_dentry->d_inode; | 647 | ino = filp->f_dentry->d_inode; |
637 | sock = (struct sol_socket_struct *)filp->private_data; | 648 | sock = (struct sol_socket_struct *)filp->private_data; |
638 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); | 649 | SOLDD(("%p %p\n", sock->pfirst, sock->pfirst ? sock->pfirst->next : NULL)); |
@@ -844,12 +855,14 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
844 | int __user *flgptr; | 855 | int __user *flgptr; |
845 | int flags; | 856 | int flags; |
846 | int error = -EBADF; | 857 | int error = -EBADF; |
858 | struct fdtable *fdt; | ||
847 | 859 | ||
848 | SOLD("entry"); | 860 | SOLD("entry"); |
849 | lock_kernel(); | 861 | lock_kernel(); |
850 | if(fd >= NR_OPEN) goto out; | 862 | if(fd >= NR_OPEN) goto out; |
851 | 863 | ||
852 | filp = current->files->fd[fd]; | 864 | fdt = files_fdtable(current->files); |
865 | filp = fdt->fd[fd]; | ||
853 | if(!filp) goto out; | 866 | if(!filp) goto out; |
854 | 867 | ||
855 | ino = filp->f_dentry->d_inode; | 868 | ino = filp->f_dentry->d_inode; |
@@ -910,12 +923,14 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) | |||
910 | struct strbuf ctl, dat; | 923 | struct strbuf ctl, dat; |
911 | int flags = (int) arg3; | 924 | int flags = (int) arg3; |
912 | int error = -EBADF; | 925 | int error = -EBADF; |
926 | struct fdtable *fdt; | ||
913 | 927 | ||
914 | SOLD("entry"); | 928 | SOLD("entry"); |
915 | lock_kernel(); | 929 | lock_kernel(); |
916 | if(fd >= NR_OPEN) goto out; | 930 | if(fd >= NR_OPEN) goto out; |
917 | 931 | ||
918 | filp = current->files->fd[fd]; | 932 | fdt = files_fdtable(current->files); |
933 | filp = fdt->fd[fd]; | ||
919 | if(!filp) goto out; | 934 | if(!filp) goto out; |
920 | 935 | ||
921 | ino = filp->f_dentry->d_inode; | 936 | ino = filp->f_dentry->d_inode; |
diff --git a/arch/um/Makefile b/arch/um/Makefile index b15f6048caae..577b8d1cf1a6 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -197,6 +197,22 @@ define filechk_umlconfig | |||
197 | sed 's/ CONFIG/ UML_CONFIG/' | 197 | sed 's/ CONFIG/ UML_CONFIG/' |
198 | endef | 198 | endef |
199 | 199 | ||
200 | define filechk_gen-asm-offsets | ||
201 | (set -e; \ | ||
202 | echo "#ifndef __ASM_OFFSETS_H__"; \ | ||
203 | echo "#define __ASM_OFFSETS_H__"; \ | ||
204 | echo "/*"; \ | ||
205 | echo " * DO NOT MODIFY."; \ | ||
206 | echo " *"; \ | ||
207 | echo " * This file was generated by arch/$(ARCH)/Makefile"; \ | ||
208 | echo " *"; \ | ||
209 | echo " */"; \ | ||
210 | echo ""; \ | ||
211 | sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ | ||
212 | echo ""; \ | ||
213 | echo "#endif" ) | ||
214 | endef | ||
215 | |||
200 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h | 216 | $(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h |
201 | $(call filechk,umlconfig) | 217 | $(call filechk,umlconfig) |
202 | 218 | ||
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index baddb5d64ca5..436abbba409b 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -8,6 +8,7 @@ START := 0x60000000 | |||
8 | #it's needed for headers to work! | 8 | #it's needed for headers to work! |
9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin | 9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin |
10 | USER_CFLAGS += -fno-builtin | 10 | USER_CFLAGS += -fno-builtin |
11 | CHECKFLAGS += -m64 | ||
11 | 12 | ||
12 | ELF_ARCH := i386:x86-64 | 13 | ELF_ARCH := i386:x86-64 |
13 | ELF_FORMAT := elf64-x86-64 | 14 | ELF_FORMAT := elf64-x86-64 |
diff --git a/arch/um/kernel/asm-offsets.c b/arch/um/kernel/asm-offsets.c new file mode 100644 index 000000000000..c13a64a288f6 --- /dev/null +++ b/arch/um/kernel/asm-offsets.c | |||
@@ -0,0 +1 @@ | |||
/* Dummy file to make kbuild happy - unused! */ | |||
diff --git a/arch/um/kernel/skas/include/uaccess-skas.h b/arch/um/kernel/skas/include/uaccess-skas.h index cd6c280482cb..6ee3f3902e68 100644 --- a/arch/um/kernel/skas/include/uaccess-skas.h +++ b/arch/um/kernel/skas/include/uaccess-skas.h | |||
@@ -18,18 +18,18 @@ | |||
18 | ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ | 18 | ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \ |
19 | ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))) | 19 | ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))) |
20 | 20 | ||
21 | static inline int verify_area_skas(int type, const void * addr, | 21 | static inline int verify_area_skas(int type, const void __user * addr, |
22 | unsigned long size) | 22 | unsigned long size) |
23 | { | 23 | { |
24 | return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); | 24 | return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); |
25 | } | 25 | } |
26 | 26 | ||
27 | extern int copy_from_user_skas(void *to, const void *from, int n); | 27 | extern int copy_from_user_skas(void *to, const void __user *from, int n); |
28 | extern int copy_to_user_skas(void *to, const void *from, int n); | 28 | extern int copy_to_user_skas(void __user *to, const void *from, int n); |
29 | extern int strncpy_from_user_skas(char *dst, const char *src, int count); | 29 | extern int strncpy_from_user_skas(char *dst, const char __user *src, int count); |
30 | extern int __clear_user_skas(void *mem, int len); | 30 | extern int __clear_user_skas(void __user *mem, int len); |
31 | extern int clear_user_skas(void *mem, int len); | 31 | extern int clear_user_skas(void __user *mem, int len); |
32 | extern int strnlen_user_skas(const void *str, int len); | 32 | extern int strnlen_user_skas(const void __user *str, int len); |
33 | 33 | ||
34 | #endif | 34 | #endif |
35 | 35 | ||
diff --git a/arch/um/kernel/tt/include/uaccess-tt.h b/arch/um/kernel/tt/include/uaccess-tt.h index 3fbb5fe26f49..aa6db384af80 100644 --- a/arch/um/kernel/tt/include/uaccess-tt.h +++ b/arch/um/kernel/tt/include/uaccess-tt.h | |||
@@ -33,7 +33,7 @@ extern unsigned long uml_physmem; | |||
33 | (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ | 33 | (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \ |
34 | (under_task_size(addr, size) || is_stack(addr, size)))) | 34 | (under_task_size(addr, size) || is_stack(addr, size)))) |
35 | 35 | ||
36 | static inline int verify_area_tt(int type, const void * addr, | 36 | static inline int verify_area_tt(int type, const void __user * addr, |
37 | unsigned long size) | 37 | unsigned long size) |
38 | { | 38 | { |
39 | return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); | 39 | return(access_ok_tt(type, addr, size) ? 0 : -EFAULT); |
@@ -50,12 +50,12 @@ extern int __do_clear_user(void *mem, size_t len, void **fault_addr, | |||
50 | extern int __do_strnlen_user(const char *str, unsigned long n, | 50 | extern int __do_strnlen_user(const char *str, unsigned long n, |
51 | void **fault_addr, void **fault_catcher); | 51 | void **fault_addr, void **fault_catcher); |
52 | 52 | ||
53 | extern int copy_from_user_tt(void *to, const void *from, int n); | 53 | extern int copy_from_user_tt(void *to, const void __user *from, int n); |
54 | extern int copy_to_user_tt(void *to, const void *from, int n); | 54 | extern int copy_to_user_tt(void __user *to, const void *from, int n); |
55 | extern int strncpy_from_user_tt(char *dst, const char *src, int count); | 55 | extern int strncpy_from_user_tt(char *dst, const char __user *src, int count); |
56 | extern int __clear_user_tt(void *mem, int len); | 56 | extern int __clear_user_tt(void __user *mem, int len); |
57 | extern int clear_user_tt(void *mem, int len); | 57 | extern int clear_user_tt(void __user *mem, int len); |
58 | extern int strnlen_user_tt(const void *str, int len); | 58 | extern int strnlen_user_tt(const void __user *str, int len); |
59 | 59 | ||
60 | #endif | 60 | #endif |
61 | 61 | ||
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 17f305b6bade..59a1291f477e 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -9,6 +9,11 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | |||
9 | 9 | ||
10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ | 10 | $(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ |
11 | $(CFLAGS_$(notdir $@)) | 11 | $(CFLAGS_$(notdir $@)) |
12 | $(USER_OBJS): cmd_checksrc = | ||
13 | $(USER_OBJS): quiet_cmd_checksrc = | ||
14 | $(USER_OBJS): cmd_force_checksrc = | ||
15 | $(USER_OBJS): quiet_cmd_force_checksrc = | ||
16 | |||
12 | 17 | ||
13 | # The stubs and unmap.o can't try to call mcount or update basic block data | 18 | # The stubs and unmap.o can't try to call mcount or update basic block data |
14 | define unprofile | 19 | define unprofile |
diff --git a/arch/v850/Makefile b/arch/v850/Makefile index bf38ca0ad781..8be9aacb20a7 100644 --- a/arch/v850/Makefile +++ b/arch/v850/Makefile | |||
@@ -51,16 +51,4 @@ root_fs_image_force: $(ROOT_FS_IMAGE) | |||
51 | $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o | 51 | $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o |
52 | endif | 52 | endif |
53 | 53 | ||
54 | 54 | CLEAN_FILES += root_fs_image.o | |
55 | prepare: include/asm-$(ARCH)/asm-consts.h | ||
56 | |||
57 | # Generate constants from C code for use by asm files | ||
58 | arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \ | ||
59 | include/config/MARKER | ||
60 | |||
61 | include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s | ||
62 | $(call filechk,gen-asm-offsets) | ||
63 | |||
64 | CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \ | ||
65 | arch/$(ARCH)/kernel/asm-consts.s \ | ||
66 | root_fs_image.o | ||
diff --git a/arch/v850/kernel/asm-consts.c b/arch/v850/kernel/asm-offsets.c index 24f291369070..24f291369070 100644 --- a/arch/v850/kernel/asm-consts.c +++ b/arch/v850/kernel/asm-offsets.c | |||
diff --git a/arch/v850/kernel/entry.S b/arch/v850/kernel/entry.S index 895e27b1d839..d991e4547dbb 100644 --- a/arch/v850/kernel/entry.S +++ b/arch/v850/kernel/entry.S | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
23 | #include <asm/errno.h> | 23 | #include <asm/errno.h> |
24 | 24 | ||
25 | #include <asm/asm-consts.h> | 25 | #include <asm/asm-offsets.h> |
26 | 26 | ||
27 | 27 | ||
28 | /* Make a slightly more convenient alias for C_SYMBOL_NAME. */ | 28 | /* Make a slightly more convenient alias for C_SYMBOL_NAME. */ |
diff --git a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c index 336cbf21dc8f..9e85969ba976 100644 --- a/arch/v850/kernel/irq.c +++ b/arch/v850/kernel/irq.c | |||
@@ -67,13 +67,13 @@ static void ack_none(unsigned int irq) | |||
67 | #define end_none enable_none | 67 | #define end_none enable_none |
68 | 68 | ||
69 | struct hw_interrupt_type no_irq_type = { | 69 | struct hw_interrupt_type no_irq_type = { |
70 | "none", | 70 | .typename = "none", |
71 | startup_none, | 71 | .startup = startup_none, |
72 | shutdown_none, | 72 | .shutdown = shutdown_none, |
73 | enable_none, | 73 | .enable = enable_none, |
74 | disable_none, | 74 | .disable = disable_none, |
75 | ack_none, | 75 | .ack = ack_none, |
76 | end_none | 76 | .end = end_none |
77 | }; | 77 | }; |
78 | 78 | ||
79 | volatile unsigned long irq_err_count, spurious_count; | 79 | volatile unsigned long irq_err_count, spurious_count; |
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c index abd48409dcca..62bdb8d29fc0 100644 --- a/arch/v850/kernel/setup.c +++ b/arch/v850/kernel/setup.c | |||
@@ -138,13 +138,13 @@ static void nmi_end (unsigned irq) | |||
138 | } | 138 | } |
139 | 139 | ||
140 | static struct hw_interrupt_type nmi_irq_type = { | 140 | static struct hw_interrupt_type nmi_irq_type = { |
141 | "NMI", | 141 | .typename = "NMI", |
142 | irq_zero, /* startup */ | 142 | .startup = irq_zero, /* startup */ |
143 | irq_nop, /* shutdown */ | 143 | .shutdown = irq_nop, /* shutdown */ |
144 | irq_nop, /* enable */ | 144 | .enable = irq_nop, /* enable */ |
145 | irq_nop, /* disable */ | 145 | .disable = irq_nop, /* disable */ |
146 | irq_nop, /* ack */ | 146 | .ack = irq_nop, /* ack */ |
147 | nmi_end, /* end */ | 147 | .end = nmi_end, /* end */ |
148 | }; | 148 | }; |
149 | 149 | ||
150 | void __init init_IRQ (void) | 150 | void __init init_IRQ (void) |
diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c index e2cc5580fa2a..17049aaa8f11 100644 --- a/arch/v850/kernel/sim.c +++ b/arch/v850/kernel/sim.c | |||
@@ -73,13 +73,13 @@ static void irq_nop (unsigned irq) { } | |||
73 | static unsigned irq_zero (unsigned irq) { return 0; } | 73 | static unsigned irq_zero (unsigned irq) { return 0; } |
74 | 74 | ||
75 | static struct hw_interrupt_type sim_irq_type = { | 75 | static struct hw_interrupt_type sim_irq_type = { |
76 | "IRQ", | 76 | .typename = "IRQ", |
77 | irq_zero, /* startup */ | 77 | .startup = irq_zero, /* startup */ |
78 | irq_nop, /* shutdown */ | 78 | .shutdown = irq_nop, /* shutdown */ |
79 | irq_nop, /* enable */ | 79 | .enable = irq_nop, /* enable */ |
80 | irq_nop, /* disable */ | 80 | .disable = irq_nop, /* disable */ |
81 | irq_nop, /* ack */ | 81 | .ack = irq_nop, /* ack */ |
82 | irq_nop, /* end */ | 82 | .end = irq_nop, /* end */ |
83 | }; | 83 | }; |
84 | 84 | ||
85 | void __init mach_init_irqs (void) | 85 | void __init mach_init_irqs (void) |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 4c6ed96d5f7c..a9cd42e61828 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -86,16 +86,6 @@ install fdimage fdimage144 fdimage288: vmlinux | |||
86 | archclean: | 86 | archclean: |
87 | $(Q)$(MAKE) $(clean)=$(boot) | 87 | $(Q)$(MAKE) $(clean)=$(boot) |
88 | 88 | ||
89 | prepare: include/asm-$(ARCH)/offset.h | ||
90 | |||
91 | arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ | ||
92 | include/config/MARKER | ||
93 | |||
94 | include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s | ||
95 | $(call filechk,gen-asm-offsets) | ||
96 | |||
97 | CLEAN_FILES += include/asm-$(ARCH)/offset.h | ||
98 | |||
99 | define archhelp | 89 | define archhelp |
100 | echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' | 90 | echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)' |
101 | echo ' install - Install kernel using' | 91 | echo ' install - Install kernel using' |
diff --git a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c index d259f8a6f811..419758f19ca4 100644 --- a/arch/x86_64/ia32/ia32_ioctl.c +++ b/arch/x86_64/ia32/ia32_ioctl.c | |||
@@ -24,17 +24,26 @@ | |||
24 | static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr) | 24 | static int tiocgdev(unsigned fd, unsigned cmd, unsigned int __user *ptr) |
25 | { | 25 | { |
26 | 26 | ||
27 | struct file *file = fget(fd); | 27 | struct file *file; |
28 | struct tty_struct *real_tty; | 28 | struct tty_struct *real_tty; |
29 | int fput_needed, ret; | ||
29 | 30 | ||
31 | file = fget_light(fd, &fput_needed); | ||
30 | if (!file) | 32 | if (!file) |
31 | return -EBADF; | 33 | return -EBADF; |
34 | |||
35 | ret = -EINVAL; | ||
32 | if (file->f_op->ioctl != tty_ioctl) | 36 | if (file->f_op->ioctl != tty_ioctl) |
33 | return -EINVAL; | 37 | goto out; |
34 | real_tty = (struct tty_struct *)file->private_data; | 38 | real_tty = (struct tty_struct *)file->private_data; |
35 | if (!real_tty) | 39 | if (!real_tty) |
36 | return -EINVAL; | 40 | goto out; |
37 | return put_user(new_encode_dev(tty_devnum(real_tty)), ptr); | 41 | |
42 | ret = put_user(new_encode_dev(tty_devnum(real_tty)), ptr); | ||
43 | |||
44 | out: | ||
45 | fput_light(file, fput_needed); | ||
46 | return ret; | ||
38 | } | 47 | } |
39 | 48 | ||
40 | #define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int) /* Read IRQ rate */ | 49 | #define RTC_IRQP_READ32 _IOR('p', 0x0b, unsigned int) /* Read IRQ rate */ |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index f174083d5567..5244f803203d 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <asm/dwarf2.h> | 7 | #include <asm/dwarf2.h> |
8 | #include <asm/calling.h> | 8 | #include <asm/calling.h> |
9 | #include <asm/offset.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/current.h> | 10 | #include <asm/current.h> |
11 | #include <asm/errno.h> | 11 | #include <asm/errno.h> |
12 | #include <asm/ia32_unistd.h> | 12 | #include <asm/ia32_unistd.h> |
diff --git a/arch/x86_64/ia32/vsyscall-syscall.S b/arch/x86_64/ia32/vsyscall-syscall.S index e2aaf3de8a42..b024965bb689 100644 --- a/arch/x86_64/ia32/vsyscall-syscall.S +++ b/arch/x86_64/ia32/vsyscall-syscall.S | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <asm/ia32_unistd.h> | 5 | #include <asm/ia32_unistd.h> |
6 | #include <asm/offset.h> | 6 | #include <asm/asm-offsets.h> |
7 | #include <asm/segment.h> | 7 | #include <asm/segment.h> |
8 | 8 | ||
9 | .text | 9 | .text |
diff --git a/arch/x86_64/ia32/vsyscall-sysenter.S b/arch/x86_64/ia32/vsyscall-sysenter.S index 8fb8e0ff3afa..71f3de586b56 100644 --- a/arch/x86_64/ia32/vsyscall-sysenter.S +++ b/arch/x86_64/ia32/vsyscall-sysenter.S | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <asm/ia32_unistd.h> | 5 | #include <asm/ia32_unistd.h> |
6 | #include <asm/offset.h> | 6 | #include <asm/asm-offsets.h> |
7 | 7 | ||
8 | .text | 8 | .text |
9 | .section .text.vsyscall,"ax" | 9 | .section .text.vsyscall,"ax" |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 116ac5f53dce..bb0ae18ec02b 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -567,7 +567,7 @@ unsigned long pci_mem_start = 0xaeedbabe; | |||
567 | */ | 567 | */ |
568 | __init void e820_setup_gap(void) | 568 | __init void e820_setup_gap(void) |
569 | { | 569 | { |
570 | unsigned long gapstart, gapsize; | 570 | unsigned long gapstart, gapsize, round; |
571 | unsigned long last; | 571 | unsigned long last; |
572 | int i; | 572 | int i; |
573 | int found = 0; | 573 | int found = 0; |
@@ -604,14 +604,14 @@ __init void e820_setup_gap(void) | |||
604 | } | 604 | } |
605 | 605 | ||
606 | /* | 606 | /* |
607 | * Start allocating dynamic PCI memory a bit into the gap, | 607 | * See how much we want to round up: start off with |
608 | * aligned up to the nearest megabyte. | 608 | * rounding to the next 1MB area. |
609 | * | ||
610 | * Question: should we try to pad it up a bit (do something | ||
611 | * like " + (gapsize >> 3)" in there too?). We now have the | ||
612 | * technology. | ||
613 | */ | 609 | */ |
614 | pci_mem_start = (gapstart + 0xfffff) & ~0xfffff; | 610 | round = 0x100000; |
611 | while ((gapsize >> 4) > round) | ||
612 | round += round; | ||
613 | /* Fun with two's complement */ | ||
614 | pci_mem_start = (gapstart + round) & -round; | ||
615 | 615 | ||
616 | printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n", | 616 | printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n", |
617 | pci_mem_start, gapstart, gapsize); | 617 | pci_mem_start, gapstart, gapsize); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index be51dbe1f75e..3620508c8bd9 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <asm/errno.h> | 36 | #include <asm/errno.h> |
37 | #include <asm/dwarf2.h> | 37 | #include <asm/dwarf2.h> |
38 | #include <asm/calling.h> | 38 | #include <asm/calling.h> |
39 | #include <asm/offset.h> | 39 | #include <asm/asm-offsets.h> |
40 | #include <asm/msr.h> | 40 | #include <asm/msr.h> |
41 | #include <asm/unistd.h> | 41 | #include <asm/unistd.h> |
42 | #include <asm/thread_info.h> | 42 | #include <asm/thread_info.h> |
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index adc96282a9e2..6d57da96bf8c 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c | |||
@@ -78,8 +78,18 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector) | |||
78 | 78 | ||
79 | static void flat_send_IPI_allbutself(int vector) | 79 | static void flat_send_IPI_allbutself(int vector) |
80 | { | 80 | { |
81 | #ifndef CONFIG_HOTPLUG_CPU | ||
81 | if (((num_online_cpus()) - 1) >= 1) | 82 | if (((num_online_cpus()) - 1) >= 1) |
82 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); | 83 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); |
84 | #else | ||
85 | cpumask_t allbutme = cpu_online_map; | ||
86 | int me = get_cpu(); /* Ensure we are not preempted when we clear */ | ||
87 | cpu_clear(me, allbutme); | ||
88 | |||
89 | if (!cpus_empty(allbutme)) | ||
90 | flat_send_IPI_mask(allbutme, vector); | ||
91 | put_cpu(); | ||
92 | #endif | ||
83 | } | 93 | } |
84 | 94 | ||
85 | static void flat_send_IPI_all(int vector) | 95 | static void flat_send_IPI_all(int vector) |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 40e0aca088fb..5f1529be1237 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1167,9 +1167,9 @@ void disable_IO_APIC(void) | |||
1167 | clear_IO_APIC(); | 1167 | clear_IO_APIC(); |
1168 | 1168 | ||
1169 | /* | 1169 | /* |
1170 | * If the i82559 is routed through an IOAPIC | 1170 | * If the i8259 is routed through an IOAPIC |
1171 | * Put that IOAPIC in virtual wire mode | 1171 | * Put that IOAPIC in virtual wire mode |
1172 | * so legacy interrups can be delivered. | 1172 | * so legacy interrupts can be delivered. |
1173 | */ | 1173 | */ |
1174 | pin = find_isa_irq_pin(0, mp_ExtINT); | 1174 | pin = find_isa_irq_pin(0, mp_ExtINT); |
1175 | if (pin != -1) { | 1175 | if (pin != -1) { |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0511d8087910..9aec524be3eb 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -929,7 +929,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
929 | c->x86_num_cores = intel_num_cpu_cores(c); | 929 | c->x86_num_cores = intel_num_cpu_cores(c); |
930 | } | 930 | } |
931 | 931 | ||
932 | void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) | 932 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) |
933 | { | 933 | { |
934 | char *v = c->x86_vendor_id; | 934 | char *v = c->x86_vendor_id; |
935 | 935 | ||
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 90aeccd15190..4fb34b5cb1f9 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -894,23 +894,6 @@ static __init void disable_smp(void) | |||
894 | cpu_set(0, cpu_core_map[0]); | 894 | cpu_set(0, cpu_core_map[0]); |
895 | } | 895 | } |
896 | 896 | ||
897 | /* | ||
898 | * Handle user cpus=... parameter. | ||
899 | */ | ||
900 | static __init void enforce_max_cpus(unsigned max_cpus) | ||
901 | { | ||
902 | int i, k; | ||
903 | k = 0; | ||
904 | for (i = 0; i < NR_CPUS; i++) { | ||
905 | if (!cpu_possible(i)) | ||
906 | continue; | ||
907 | if (++k > max_cpus) { | ||
908 | cpu_clear(i, cpu_possible_map); | ||
909 | cpu_clear(i, cpu_present_map); | ||
910 | } | ||
911 | } | ||
912 | } | ||
913 | |||
914 | #ifdef CONFIG_HOTPLUG_CPU | 897 | #ifdef CONFIG_HOTPLUG_CPU |
915 | /* | 898 | /* |
916 | * cpu_possible_map should be static, it cannot change as cpu's | 899 | * cpu_possible_map should be static, it cannot change as cpu's |
@@ -999,8 +982,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
999 | current_cpu_data = boot_cpu_data; | 982 | current_cpu_data = boot_cpu_data; |
1000 | current_thread_info()->cpu = 0; /* needed? */ | 983 | current_thread_info()->cpu = 0; /* needed? */ |
1001 | 984 | ||
1002 | enforce_max_cpus(max_cpus); | ||
1003 | |||
1004 | #ifdef CONFIG_HOTPLUG_CPU | 985 | #ifdef CONFIG_HOTPLUG_CPU |
1005 | prefill_possible_map(); | 986 | prefill_possible_map(); |
1006 | #endif | 987 | #endif |
diff --git a/arch/x86_64/kernel/suspend_asm.S b/arch/x86_64/kernel/suspend_asm.S index 53f8e1659511..4d659e97df10 100644 --- a/arch/x86_64/kernel/suspend_asm.S +++ b/arch/x86_64/kernel/suspend_asm.S | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <asm/segment.h> | 15 | #include <asm/segment.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/offset.h> | 17 | #include <asm/asm-offsets.h> |
18 | 18 | ||
19 | ENTRY(swsusp_arch_suspend) | 19 | ENTRY(swsusp_arch_suspend) |
20 | 20 | ||
diff --git a/arch/x86_64/lib/copy_user.S b/arch/x86_64/lib/copy_user.S index bd556c804248..dfa358b05c89 100644 --- a/arch/x86_64/lib/copy_user.S +++ b/arch/x86_64/lib/copy_user.S | |||
@@ -7,7 +7,7 @@ | |||
7 | #define FIX_ALIGNMENT 1 | 7 | #define FIX_ALIGNMENT 1 |
8 | 8 | ||
9 | #include <asm/current.h> | 9 | #include <asm/current.h> |
10 | #include <asm/offset.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/thread_info.h> | 11 | #include <asm/thread_info.h> |
12 | #include <asm/cpufeature.h> | 12 | #include <asm/cpufeature.h> |
13 | 13 | ||
diff --git a/arch/x86_64/lib/getuser.S b/arch/x86_64/lib/getuser.S index f80bafee8669..3844d5e885a4 100644 --- a/arch/x86_64/lib/getuser.S +++ b/arch/x86_64/lib/getuser.S | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | #include <asm/offset.h> | 32 | #include <asm/asm-offsets.h> |
33 | #include <asm/thread_info.h> | 33 | #include <asm/thread_info.h> |
34 | 34 | ||
35 | .text | 35 | .text |
diff --git a/arch/x86_64/lib/putuser.S b/arch/x86_64/lib/putuser.S index 5828b8191667..7f5593974e2d 100644 --- a/arch/x86_64/lib/putuser.S +++ b/arch/x86_64/lib/putuser.S | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
29 | #include <asm/errno.h> | 29 | #include <asm/errno.h> |
30 | #include <asm/offset.h> | 30 | #include <asm/asm-offsets.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | 32 | ||
33 | .text | 33 | .text |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 27847e4ffcbf..67ef4cd173b9 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -66,13 +66,7 @@ boot := arch/xtensa/boot | |||
66 | 66 | ||
67 | archinc := include/asm-xtensa | 67 | archinc := include/asm-xtensa |
68 | 68 | ||
69 | arch/xtensa/kernel/asm-offsets.s: \ | 69 | prepare: $(archinc)/.platform |
70 | arch/xtensa/kernel/asm-offsets.c $(archinc)/.platform | ||
71 | |||
72 | include/asm-xtensa/offsets.h: arch/xtensa/kernel/asm-offsets.s | ||
73 | $(call filechk,gen-asm-offsets) | ||
74 | |||
75 | prepare: $(archinc)/.platform $(archinc)/offsets.h | ||
76 | 70 | ||
77 | # Update machine cpu and platform symlinks if something which affects | 71 | # Update machine cpu and platform symlinks if something which affects |
78 | # them changed. | 72 | # them changed. |
@@ -94,7 +88,7 @@ bzImage : zImage | |||
94 | zImage zImage.initrd: vmlinux | 88 | zImage zImage.initrd: vmlinux |
95 | $(Q)$(MAKE) $(build)=$(boot) $@ | 89 | $(Q)$(MAKE) $(build)=$(boot) $@ |
96 | 90 | ||
97 | CLEAN_FILES += arch/xtensa/vmlinux.lds $(archinc)/offset.h \ | 91 | CLEAN_FILES += arch/xtensa/vmlinux.lds \ |
98 | $(archinc)/platform $(archinc)/xtensa/config \ | 92 | $(archinc)/platform $(archinc)/xtensa/config \ |
99 | $(archinc)/.platform | 93 | $(archinc)/.platform |
100 | 94 | ||
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index 74b1e90ef08c..a4956578a24d 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
21 | #include <asm/current.h> | 21 | #include <asm/current.h> |
22 | #include <asm/offsets.h> | 22 | #include <asm/asm-offsets.h> |
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index c64a01f71de6..5c018c503dfa 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 4099703b14be..c83bb0d41787 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <asm/mmu.h> | 43 | #include <asm/mmu.h> |
44 | #include <asm/irq.h> | 44 | #include <asm/irq.h> |
45 | #include <asm/atomic.h> | 45 | #include <asm/atomic.h> |
46 | #include <asm/offsets.h> | 46 | #include <asm/asm-offsets.h> |
47 | #include <asm/coprocessor.h> | 47 | #include <asm/coprocessor.h> |
48 | 48 | ||
49 | extern void ret_from_fork(void); | 49 | extern void ret_from_fork(void); |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 81808f0c6742..0e74397bfa2b 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <asm/ptrace.h> | 46 | #include <asm/ptrace.h> |
47 | #include <asm/ptrace.h> | 47 | #include <asm/ptrace.h> |
48 | #include <asm/current.h> | 48 | #include <asm/current.h> |
49 | #include <asm/offsets.h> | 49 | #include <asm/asm-offsets.h> |
50 | #include <asm/pgtable.h> | 50 | #include <asm/pgtable.h> |
51 | #include <asm/processor.h> | 51 | #include <asm/processor.h> |
52 | #include <asm/page.h> | 52 | #include <asm/page.h> |