diff options
Diffstat (limited to 'arch')
44 files changed, 523 insertions, 463 deletions
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 1d3c1398c428..52c91ccc1648 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -271,6 +271,19 @@ titan_dispatch_irqs(u64 mask) | |||
271 | * Titan Family | 271 | * Titan Family |
272 | */ | 272 | */ |
273 | static void __init | 273 | static void __init |
274 | titan_request_irq(unsigned int irq, irq_handler_t handler, | ||
275 | unsigned long irqflags, const char *devname, | ||
276 | void *dev_id) | ||
277 | { | ||
278 | int err; | ||
279 | err = request_irq(irq, handler, irqflags, devname, dev_id); | ||
280 | if (err) { | ||
281 | printk("titan_request_irq for IRQ %d returned %d; ignoring\n", | ||
282 | irq, err); | ||
283 | } | ||
284 | } | ||
285 | |||
286 | static void __init | ||
274 | titan_late_init(void) | 287 | titan_late_init(void) |
275 | { | 288 | { |
276 | /* | 289 | /* |
@@ -278,15 +291,15 @@ titan_late_init(void) | |||
278 | * all reported to the kernel as machine checks, so the handler | 291 | * all reported to the kernel as machine checks, so the handler |
279 | * is a nop so it can be called to count the individual events. | 292 | * is a nop so it can be called to count the individual events. |
280 | */ | 293 | */ |
281 | request_irq(63+16, titan_intr_nop, IRQF_DISABLED, | 294 | titan_request_irq(63+16, titan_intr_nop, IRQF_DISABLED, |
282 | "CChip Error", NULL); | 295 | "CChip Error", NULL); |
283 | request_irq(62+16, titan_intr_nop, IRQF_DISABLED, | 296 | titan_request_irq(62+16, titan_intr_nop, IRQF_DISABLED, |
284 | "PChip 0 H_Error", NULL); | 297 | "PChip 0 H_Error", NULL); |
285 | request_irq(61+16, titan_intr_nop, IRQF_DISABLED, | 298 | titan_request_irq(61+16, titan_intr_nop, IRQF_DISABLED, |
286 | "PChip 1 H_Error", NULL); | 299 | "PChip 1 H_Error", NULL); |
287 | request_irq(60+16, titan_intr_nop, IRQF_DISABLED, | 300 | titan_request_irq(60+16, titan_intr_nop, IRQF_DISABLED, |
288 | "PChip 0 C_Error", NULL); | 301 | "PChip 0 C_Error", NULL); |
289 | request_irq(59+16, titan_intr_nop, IRQF_DISABLED, | 302 | titan_request_irq(59+16, titan_intr_nop, IRQF_DISABLED, |
290 | "PChip 1 C_Error", NULL); | 303 | "PChip 1 C_Error", NULL); |
291 | 304 | ||
292 | /* | 305 | /* |
@@ -345,9 +358,9 @@ privateer_init_pci(void) | |||
345 | * Hook a couple of extra err interrupts that the | 358 | * Hook a couple of extra err interrupts that the |
346 | * common titan code won't. | 359 | * common titan code won't. |
347 | */ | 360 | */ |
348 | request_irq(53+16, titan_intr_nop, IRQF_DISABLED, | 361 | titan_request_irq(53+16, titan_intr_nop, IRQF_DISABLED, |
349 | "NMI", NULL); | 362 | "NMI", NULL); |
350 | request_irq(50+16, titan_intr_nop, IRQF_DISABLED, | 363 | titan_request_irq(50+16, titan_intr_nop, IRQF_DISABLED, |
351 | "Temperature Warning", NULL); | 364 | "Temperature Warning", NULL); |
352 | 365 | ||
353 | /* | 366 | /* |
diff --git a/arch/blackfin/kernel/init_task.c b/arch/blackfin/kernel/init_task.c index b45188f8512e..673c860ffc23 100644 --- a/arch/blackfin/kernel/init_task.c +++ b/arch/blackfin/kernel/init_task.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init_task.h> | 32 | #include <linux/init_task.h> |
33 | #include <linux/mqueue.h> | 33 | #include <linux/mqueue.h> |
34 | #include <linux/fs.h> | ||
34 | 35 | ||
35 | static struct fs_struct init_fs = INIT_FS; | 36 | static struct fs_struct init_fs = INIT_FS; |
36 | static struct files_struct init_files = INIT_FILES; | 37 | static struct files_struct init_files = INIT_FILES; |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 5a51dd6ab280..6a7aefe48346 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/user.h> | 33 | #include <linux/user.h> |
34 | #include <linux/a.out.h> | 34 | #include <linux/a.out.h> |
35 | #include <linux/uaccess.h> | 35 | #include <linux/uaccess.h> |
36 | #include <linux/fs.h> | ||
37 | #include <linux/err.h> | ||
36 | 38 | ||
37 | #include <asm/blackfin.h> | 39 | #include <asm/blackfin.h> |
38 | #include <asm/fixed_code.h> | 40 | #include <asm/fixed_code.h> |
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c index f5e1ae3d1705..abcd14817d0e 100644 --- a/arch/blackfin/kernel/sys_bfin.c +++ b/arch/blackfin/kernel/sys_bfin.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/syscalls.h> | 37 | #include <linux/syscalls.h> |
38 | #include <linux/mman.h> | 38 | #include <linux/mman.h> |
39 | #include <linux/file.h> | 39 | #include <linux/file.h> |
40 | #include <linux/fs.h> | ||
40 | #include <linux/uaccess.h> | 41 | #include <linux/uaccess.h> |
41 | #include <linux/ipc.h> | 42 | #include <linux/ipc.h> |
42 | #include <linux/unistd.h> | 43 | #include <linux/unistd.h> |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 8766bd612b47..792a8416fe10 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/kallsyms.h> | 33 | #include <linux/kallsyms.h> |
34 | #include <linux/fs.h> | ||
34 | #include <asm/traps.h> | 35 | #include <asm/traps.h> |
35 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
36 | #include <asm/blackfin.h> | 37 | #include <asm/blackfin.h> |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 4b41248b61ad..6b4d026a00a1 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -180,8 +180,6 @@ source "drivers/isdn/Kconfig" | |||
180 | 180 | ||
181 | source "drivers/telephony/Kconfig" | 181 | source "drivers/telephony/Kconfig" |
182 | 182 | ||
183 | source "drivers/cdrom/Kconfig" | ||
184 | |||
185 | # | 183 | # |
186 | # input before char - char/joystick depends on it. As does USB. | 184 | # input before char - char/joystick depends on it. As does USB. |
187 | # | 185 | # |
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 275673c192aa..1e74f3c5cee2 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -1496,6 +1496,7 @@ sys_call_table: | |||
1496 | .long sys_signalfd | 1496 | .long sys_signalfd |
1497 | .long sys_timerfd | 1497 | .long sys_timerfd |
1498 | .long sys_eventfd | 1498 | .long sys_eventfd |
1499 | .long sys_fallocate | ||
1499 | 1500 | ||
1500 | 1501 | ||
1501 | syscall_table_size = (. - sys_call_table) | 1502 | syscall_table_size = (. - sys_call_table) |
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index c85598acb8fd..1b66d5c70eaf 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <asm/mce.h> | 11 | #include <asm/mce.h> |
12 | #include <asm/nmi.h> | 12 | #include <asm/nmi.h> |
13 | 13 | ||
14 | #define MAX_PATCH_LEN (255-1) | ||
15 | |||
14 | #ifdef CONFIG_HOTPLUG_CPU | 16 | #ifdef CONFIG_HOTPLUG_CPU |
15 | static int smp_alt_once; | 17 | static int smp_alt_once; |
16 | 18 | ||
@@ -148,7 +150,8 @@ static unsigned char** find_nop_table(void) | |||
148 | 150 | ||
149 | #endif /* CONFIG_X86_64 */ | 151 | #endif /* CONFIG_X86_64 */ |
150 | 152 | ||
151 | static void nop_out(void *insns, unsigned int len) | 153 | /* Use this to add nops to a buffer, then text_poke the whole buffer. */ |
154 | static void add_nops(void *insns, unsigned int len) | ||
152 | { | 155 | { |
153 | unsigned char **noptable = find_nop_table(); | 156 | unsigned char **noptable = find_nop_table(); |
154 | 157 | ||
@@ -156,7 +159,7 @@ static void nop_out(void *insns, unsigned int len) | |||
156 | unsigned int noplen = len; | 159 | unsigned int noplen = len; |
157 | if (noplen > ASM_NOP_MAX) | 160 | if (noplen > ASM_NOP_MAX) |
158 | noplen = ASM_NOP_MAX; | 161 | noplen = ASM_NOP_MAX; |
159 | text_poke(insns, noptable[noplen], noplen); | 162 | memcpy(insns, noptable[noplen], noplen); |
160 | insns += noplen; | 163 | insns += noplen; |
161 | len -= noplen; | 164 | len -= noplen; |
162 | } | 165 | } |
@@ -174,15 +177,15 @@ extern u8 *__smp_locks[], *__smp_locks_end[]; | |||
174 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) | 177 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) |
175 | { | 178 | { |
176 | struct alt_instr *a; | 179 | struct alt_instr *a; |
177 | u8 *instr; | 180 | char insnbuf[MAX_PATCH_LEN]; |
178 | int diff; | ||
179 | 181 | ||
180 | DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end); | 182 | DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end); |
181 | for (a = start; a < end; a++) { | 183 | for (a = start; a < end; a++) { |
184 | u8 *instr = a->instr; | ||
182 | BUG_ON(a->replacementlen > a->instrlen); | 185 | BUG_ON(a->replacementlen > a->instrlen); |
186 | BUG_ON(a->instrlen > sizeof(insnbuf)); | ||
183 | if (!boot_cpu_has(a->cpuid)) | 187 | if (!boot_cpu_has(a->cpuid)) |
184 | continue; | 188 | continue; |
185 | instr = a->instr; | ||
186 | #ifdef CONFIG_X86_64 | 189 | #ifdef CONFIG_X86_64 |
187 | /* vsyscall code is not mapped yet. resolve it manually. */ | 190 | /* vsyscall code is not mapped yet. resolve it manually. */ |
188 | if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END) { | 191 | if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END) { |
@@ -191,9 +194,10 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) | |||
191 | __FUNCTION__, a->instr, instr); | 194 | __FUNCTION__, a->instr, instr); |
192 | } | 195 | } |
193 | #endif | 196 | #endif |
194 | memcpy(instr, a->replacement, a->replacementlen); | 197 | memcpy(insnbuf, a->replacement, a->replacementlen); |
195 | diff = a->instrlen - a->replacementlen; | 198 | add_nops(insnbuf + a->replacementlen, |
196 | nop_out(instr + a->replacementlen, diff); | 199 | a->instrlen - a->replacementlen); |
200 | text_poke(instr, insnbuf, a->instrlen); | ||
197 | } | 201 | } |
198 | } | 202 | } |
199 | 203 | ||
@@ -215,16 +219,18 @@ static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end) | |||
215 | static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end) | 219 | static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end) |
216 | { | 220 | { |
217 | u8 **ptr; | 221 | u8 **ptr; |
222 | char insn[1]; | ||
218 | 223 | ||
219 | if (noreplace_smp) | 224 | if (noreplace_smp) |
220 | return; | 225 | return; |
221 | 226 | ||
227 | add_nops(insn, 1); | ||
222 | for (ptr = start; ptr < end; ptr++) { | 228 | for (ptr = start; ptr < end; ptr++) { |
223 | if (*ptr < text) | 229 | if (*ptr < text) |
224 | continue; | 230 | continue; |
225 | if (*ptr > text_end) | 231 | if (*ptr > text_end) |
226 | continue; | 232 | continue; |
227 | nop_out(*ptr, 1); | 233 | text_poke(*ptr, insn, 1); |
228 | }; | 234 | }; |
229 | } | 235 | } |
230 | 236 | ||
@@ -351,6 +357,7 @@ void apply_paravirt(struct paravirt_patch_site *start, | |||
351 | struct paravirt_patch_site *end) | 357 | struct paravirt_patch_site *end) |
352 | { | 358 | { |
353 | struct paravirt_patch_site *p; | 359 | struct paravirt_patch_site *p; |
360 | char insnbuf[MAX_PATCH_LEN]; | ||
354 | 361 | ||
355 | if (noreplace_paravirt) | 362 | if (noreplace_paravirt) |
356 | return; | 363 | return; |
@@ -358,13 +365,15 @@ void apply_paravirt(struct paravirt_patch_site *start, | |||
358 | for (p = start; p < end; p++) { | 365 | for (p = start; p < end; p++) { |
359 | unsigned int used; | 366 | unsigned int used; |
360 | 367 | ||
361 | used = paravirt_ops.patch(p->instrtype, p->clobbers, p->instr, | 368 | BUG_ON(p->len > MAX_PATCH_LEN); |
362 | p->len); | 369 | used = paravirt_ops.patch(p->instrtype, p->clobbers, insnbuf, |
370 | (unsigned long)p->instr, p->len); | ||
363 | 371 | ||
364 | BUG_ON(used > p->len); | 372 | BUG_ON(used > p->len); |
365 | 373 | ||
366 | /* Pad the rest with nops */ | 374 | /* Pad the rest with nops */ |
367 | nop_out(p->instr + used, p->len - used); | 375 | add_nops(insnbuf + used, p->len - used); |
376 | text_poke(p->instr, insnbuf, p->len); | ||
368 | } | 377 | } |
369 | } | 378 | } |
370 | extern struct paravirt_patch_site __start_parainstructions[], | 379 | extern struct paravirt_patch_site __start_parainstructions[], |
@@ -379,7 +388,7 @@ void __init alternative_instructions(void) | |||
379 | that might execute the to be patched code. | 388 | that might execute the to be patched code. |
380 | Other CPUs are not running. */ | 389 | Other CPUs are not running. */ |
381 | stop_nmi(); | 390 | stop_nmi(); |
382 | #ifdef CONFIG_MCE | 391 | #ifdef CONFIG_X86_MCE |
383 | stop_mce(); | 392 | stop_mce(); |
384 | #endif | 393 | #endif |
385 | 394 | ||
@@ -417,7 +426,7 @@ void __init alternative_instructions(void) | |||
417 | local_irq_restore(flags); | 426 | local_irq_restore(flags); |
418 | 427 | ||
419 | restart_nmi(); | 428 | restart_nmi(); |
420 | #ifdef CONFIG_MCE | 429 | #ifdef CONFIG_X86_MCE |
421 | restart_mce(); | 430 | restart_mce(); |
422 | #endif | 431 | #endif |
423 | } | 432 | } |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index bfc6cb7df7e7..f9fff29e01a9 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -61,8 +61,9 @@ static int enable_local_apic __initdata = 0; | |||
61 | 61 | ||
62 | /* Local APIC timer verification ok */ | 62 | /* Local APIC timer verification ok */ |
63 | static int local_apic_timer_verify_ok; | 63 | static int local_apic_timer_verify_ok; |
64 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ | 64 | /* Disable local APIC timer from the kernel commandline or via dmi quirk |
65 | static int local_apic_timer_disabled; | 65 | or using CPU MSR check */ |
66 | int local_apic_timer_disabled; | ||
66 | /* Local APIC timer works in C2 */ | 67 | /* Local APIC timer works in C2 */ |
67 | int local_apic_timer_c2_ok; | 68 | int local_apic_timer_c2_ok; |
68 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); | 69 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); |
@@ -370,12 +371,9 @@ void __init setup_boot_APIC_clock(void) | |||
370 | long delta, deltapm; | 371 | long delta, deltapm; |
371 | int pm_referenced = 0; | 372 | int pm_referenced = 0; |
372 | 373 | ||
373 | if (boot_cpu_has(X86_FEATURE_LAPIC_TIMER_BROKEN)) | ||
374 | local_apic_timer_disabled = 1; | ||
375 | |||
376 | /* | 374 | /* |
377 | * The local apic timer can be disabled via the kernel | 375 | * The local apic timer can be disabled via the kernel |
378 | * commandline or from the test above. Register the lapic | 376 | * commandline or from the CPU detection code. Register the lapic |
379 | * timer as a dummy clock event source on SMP systems, so the | 377 | * timer as a dummy clock event source on SMP systems, so the |
380 | * broadcast mechanism is used. On UP systems simply ignore it. | 378 | * broadcast mechanism is used. On UP systems simply ignore it. |
381 | */ | 379 | */ |
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index c7ba455d5ac7..dcf6bbb1c7c0 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/mm.h> | 3 | #include <linux/mm.h> |
4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
5 | #include <asm/processor.h> | 5 | #include <asm/processor.h> |
6 | #include <asm/apic.h> | ||
6 | 7 | ||
7 | #include "cpu.h" | 8 | #include "cpu.h" |
8 | 9 | ||
@@ -22,6 +23,7 @@ | |||
22 | extern void vide(void); | 23 | extern void vide(void); |
23 | __asm__(".align 4\nvide: ret"); | 24 | __asm__(".align 4\nvide: ret"); |
24 | 25 | ||
26 | #ifdef CONFIG_X86_LOCAL_APIC | ||
25 | #define ENABLE_C1E_MASK 0x18000000 | 27 | #define ENABLE_C1E_MASK 0x18000000 |
26 | #define CPUID_PROCESSOR_SIGNATURE 1 | 28 | #define CPUID_PROCESSOR_SIGNATURE 1 |
27 | #define CPUID_XFAM 0x0ff00000 | 29 | #define CPUID_XFAM 0x0ff00000 |
@@ -52,6 +54,7 @@ static __cpuinit int amd_apic_timer_broken(void) | |||
52 | } | 54 | } |
53 | return 0; | 55 | return 0; |
54 | } | 56 | } |
57 | #endif | ||
55 | 58 | ||
56 | int force_mwait __cpuinitdata; | 59 | int force_mwait __cpuinitdata; |
57 | 60 | ||
@@ -282,8 +285,10 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
282 | num_cache_leaves = 3; | 285 | num_cache_leaves = 3; |
283 | } | 286 | } |
284 | 287 | ||
288 | #ifdef CONFIG_X86_LOCAL_APIC | ||
285 | if (amd_apic_timer_broken()) | 289 | if (amd_apic_timer_broken()) |
286 | set_bit(X86_FEATURE_LAPIC_TIMER_BROKEN, c->x86_capability); | 290 | local_apic_timer_disabled = 1; |
291 | #endif | ||
287 | 292 | ||
288 | if (c->x86 == 0x10 && !force_mwait) | 293 | if (c->x86 == 0x10 && !force_mwait) |
289 | clear_bit(X86_FEATURE_MWAIT, c->x86_capability); | 294 | clear_bit(X86_FEATURE_MWAIT, c->x86_capability); |
diff --git a/arch/i386/kernel/doublefault.c b/arch/i386/kernel/doublefault.c index 265c5597efb0..40978af630e7 100644 --- a/arch/i386/kernel/doublefault.c +++ b/arch/i386/kernel/doublefault.c | |||
@@ -13,7 +13,7 @@ | |||
13 | static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE]; | 13 | static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE]; |
14 | #define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE) | 14 | #define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE) |
15 | 15 | ||
16 | #define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + 0x1000000) | 16 | #define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + MAXMEM) |
17 | 17 | ||
18 | static void doublefault_fn(void) | 18 | static void doublefault_fn(void) |
19 | { | 19 | { |
@@ -23,23 +23,23 @@ static void doublefault_fn(void) | |||
23 | store_gdt(&gdt_desc); | 23 | store_gdt(&gdt_desc); |
24 | gdt = gdt_desc.address; | 24 | gdt = gdt_desc.address; |
25 | 25 | ||
26 | printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size); | 26 | printk(KERN_EMERG "PANIC: double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size); |
27 | 27 | ||
28 | if (ptr_ok(gdt)) { | 28 | if (ptr_ok(gdt)) { |
29 | gdt += GDT_ENTRY_TSS << 3; | 29 | gdt += GDT_ENTRY_TSS << 3; |
30 | tss = *(u16 *)(gdt+2); | 30 | tss = *(u16 *)(gdt+2); |
31 | tss += *(u8 *)(gdt+4) << 16; | 31 | tss += *(u8 *)(gdt+4) << 16; |
32 | tss += *(u8 *)(gdt+7) << 24; | 32 | tss += *(u8 *)(gdt+7) << 24; |
33 | printk("double fault, tss at %08lx\n", tss); | 33 | printk(KERN_EMERG "double fault, tss at %08lx\n", tss); |
34 | 34 | ||
35 | if (ptr_ok(tss)) { | 35 | if (ptr_ok(tss)) { |
36 | struct i386_hw_tss *t = (struct i386_hw_tss *)tss; | 36 | struct i386_hw_tss *t = (struct i386_hw_tss *)tss; |
37 | 37 | ||
38 | printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp); | 38 | printk(KERN_EMERG "eip = %08lx, esp = %08lx\n", t->eip, t->esp); |
39 | 39 | ||
40 | printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n", | 40 | printk(KERN_EMERG "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n", |
41 | t->eax, t->ebx, t->ecx, t->edx); | 41 | t->eax, t->ebx, t->ecx, t->edx); |
42 | printk("esi = %08lx, edi = %08lx\n", | 42 | printk(KERN_EMERG "esi = %08lx, edi = %08lx\n", |
43 | t->esi, t->edi); | 43 | t->esi, t->edi); |
44 | } | 44 | } |
45 | } | 45 | } |
@@ -63,6 +63,7 @@ struct tss_struct doublefault_tss __cacheline_aligned = { | |||
63 | .cs = __KERNEL_CS, | 63 | .cs = __KERNEL_CS, |
64 | .ss = __KERNEL_DS, | 64 | .ss = __KERNEL_DS, |
65 | .ds = __USER_DS, | 65 | .ds = __USER_DS, |
66 | .fs = __KERNEL_PERCPU, | ||
66 | 67 | ||
67 | .__cr3 = __pa(swapper_pg_dir) | 68 | .__cr3 = __pa(swapper_pg_dir) |
68 | } | 69 | } |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 7c52b222207e..8f0382161c91 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -162,9 +162,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20); | |||
162 | * which will be freed later | 162 | * which will be freed later |
163 | */ | 163 | */ |
164 | 164 | ||
165 | #ifdef CONFIG_HOTPLUG_CPU | 165 | #ifndef CONFIG_HOTPLUG_CPU |
166 | .section .text,"ax",@progbits | ||
167 | #else | ||
168 | .section .init.text,"ax",@progbits | 166 | .section .init.text,"ax",@progbits |
169 | #endif | 167 | #endif |
170 | 168 | ||
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index ea962c0667d5..739cfb207dd7 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c | |||
@@ -69,7 +69,8 @@ DEF_NATIVE(read_tsc, "rdtsc"); | |||
69 | 69 | ||
70 | DEF_NATIVE(ud2a, "ud2a"); | 70 | DEF_NATIVE(ud2a, "ud2a"); |
71 | 71 | ||
72 | static unsigned native_patch(u8 type, u16 clobbers, void *insns, unsigned len) | 72 | static unsigned native_patch(u8 type, u16 clobbers, void *ibuf, |
73 | unsigned long addr, unsigned len) | ||
73 | { | 74 | { |
74 | const unsigned char *start, *end; | 75 | const unsigned char *start, *end; |
75 | unsigned ret; | 76 | unsigned ret; |
@@ -90,7 +91,7 @@ static unsigned native_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
90 | #undef SITE | 91 | #undef SITE |
91 | 92 | ||
92 | patch_site: | 93 | patch_site: |
93 | ret = paravirt_patch_insns(insns, len, start, end); | 94 | ret = paravirt_patch_insns(ibuf, len, start, end); |
94 | break; | 95 | break; |
95 | 96 | ||
96 | case PARAVIRT_PATCH(make_pgd): | 97 | case PARAVIRT_PATCH(make_pgd): |
@@ -107,7 +108,7 @@ static unsigned native_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
107 | break; | 108 | break; |
108 | 109 | ||
109 | default: | 110 | default: |
110 | ret = paravirt_patch_default(type, clobbers, insns, len); | 111 | ret = paravirt_patch_default(type, clobbers, ibuf, addr, len); |
111 | break; | 112 | break; |
112 | } | 113 | } |
113 | 114 | ||
@@ -129,68 +130,67 @@ struct branch { | |||
129 | u32 delta; | 130 | u32 delta; |
130 | } __attribute__((packed)); | 131 | } __attribute__((packed)); |
131 | 132 | ||
132 | unsigned paravirt_patch_call(void *target, u16 tgt_clobbers, | 133 | unsigned paravirt_patch_call(void *insnbuf, |
133 | void *site, u16 site_clobbers, | 134 | const void *target, u16 tgt_clobbers, |
135 | unsigned long addr, u16 site_clobbers, | ||
134 | unsigned len) | 136 | unsigned len) |
135 | { | 137 | { |
136 | unsigned char *call = site; | 138 | struct branch *b = insnbuf; |
137 | unsigned long delta = (unsigned long)target - (unsigned long)(call+5); | 139 | unsigned long delta = (unsigned long)target - (addr+5); |
138 | struct branch b; | ||
139 | 140 | ||
140 | if (tgt_clobbers & ~site_clobbers) | 141 | if (tgt_clobbers & ~site_clobbers) |
141 | return len; /* target would clobber too much for this site */ | 142 | return len; /* target would clobber too much for this site */ |
142 | if (len < 5) | 143 | if (len < 5) |
143 | return len; /* call too long for patch site */ | 144 | return len; /* call too long for patch site */ |
144 | 145 | ||
145 | b.opcode = 0xe8; /* call */ | 146 | b->opcode = 0xe8; /* call */ |
146 | b.delta = delta; | 147 | b->delta = delta; |
147 | BUILD_BUG_ON(sizeof(b) != 5); | 148 | BUILD_BUG_ON(sizeof(*b) != 5); |
148 | text_poke(call, (unsigned char *)&b, 5); | ||
149 | 149 | ||
150 | return 5; | 150 | return 5; |
151 | } | 151 | } |
152 | 152 | ||
153 | unsigned paravirt_patch_jmp(void *target, void *site, unsigned len) | 153 | unsigned paravirt_patch_jmp(const void *target, void *insnbuf, |
154 | unsigned long addr, unsigned len) | ||
154 | { | 155 | { |
155 | unsigned char *jmp = site; | 156 | struct branch *b = insnbuf; |
156 | unsigned long delta = (unsigned long)target - (unsigned long)(jmp+5); | 157 | unsigned long delta = (unsigned long)target - (addr+5); |
157 | struct branch b; | ||
158 | 158 | ||
159 | if (len < 5) | 159 | if (len < 5) |
160 | return len; /* call too long for patch site */ | 160 | return len; /* call too long for patch site */ |
161 | 161 | ||
162 | b.opcode = 0xe9; /* jmp */ | 162 | b->opcode = 0xe9; /* jmp */ |
163 | b.delta = delta; | 163 | b->delta = delta; |
164 | text_poke(jmp, (unsigned char *)&b, 5); | ||
165 | 164 | ||
166 | return 5; | 165 | return 5; |
167 | } | 166 | } |
168 | 167 | ||
169 | unsigned paravirt_patch_default(u8 type, u16 clobbers, void *site, unsigned len) | 168 | unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf, |
169 | unsigned long addr, unsigned len) | ||
170 | { | 170 | { |
171 | void *opfunc = *((void **)¶virt_ops + type); | 171 | void *opfunc = *((void **)¶virt_ops + type); |
172 | unsigned ret; | 172 | unsigned ret; |
173 | 173 | ||
174 | if (opfunc == NULL) | 174 | if (opfunc == NULL) |
175 | /* If there's no function, patch it with a ud2a (BUG) */ | 175 | /* If there's no function, patch it with a ud2a (BUG) */ |
176 | ret = paravirt_patch_insns(site, len, start_ud2a, end_ud2a); | 176 | ret = paravirt_patch_insns(insnbuf, len, start_ud2a, end_ud2a); |
177 | else if (opfunc == paravirt_nop) | 177 | else if (opfunc == paravirt_nop) |
178 | /* If the operation is a nop, then nop the callsite */ | 178 | /* If the operation is a nop, then nop the callsite */ |
179 | ret = paravirt_patch_nop(); | 179 | ret = paravirt_patch_nop(); |
180 | else if (type == PARAVIRT_PATCH(iret) || | 180 | else if (type == PARAVIRT_PATCH(iret) || |
181 | type == PARAVIRT_PATCH(irq_enable_sysexit)) | 181 | type == PARAVIRT_PATCH(irq_enable_sysexit)) |
182 | /* If operation requires a jmp, then jmp */ | 182 | /* If operation requires a jmp, then jmp */ |
183 | ret = paravirt_patch_jmp(opfunc, site, len); | 183 | ret = paravirt_patch_jmp(opfunc, insnbuf, addr, len); |
184 | else | 184 | else |
185 | /* Otherwise call the function; assume target could | 185 | /* Otherwise call the function; assume target could |
186 | clobber any caller-save reg */ | 186 | clobber any caller-save reg */ |
187 | ret = paravirt_patch_call(opfunc, CLBR_ANY, | 187 | ret = paravirt_patch_call(insnbuf, opfunc, CLBR_ANY, |
188 | site, clobbers, len); | 188 | addr, clobbers, len); |
189 | 189 | ||
190 | return ret; | 190 | return ret; |
191 | } | 191 | } |
192 | 192 | ||
193 | unsigned paravirt_patch_insns(void *site, unsigned len, | 193 | unsigned paravirt_patch_insns(void *insnbuf, unsigned len, |
194 | const char *start, const char *end) | 194 | const char *start, const char *end) |
195 | { | 195 | { |
196 | unsigned insn_len = end - start; | 196 | unsigned insn_len = end - start; |
@@ -198,7 +198,7 @@ unsigned paravirt_patch_insns(void *site, unsigned len, | |||
198 | if (insn_len > len || start == NULL) | 198 | if (insn_len > len || start == NULL) |
199 | insn_len = len; | 199 | insn_len = len; |
200 | else | 200 | else |
201 | memcpy(site, start, insn_len); | 201 | memcpy(insnbuf, start, insn_len); |
202 | 202 | ||
203 | return insn_len; | 203 | return insn_len; |
204 | } | 204 | } |
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c index 72042bb7ec94..18673e0f193b 100644 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c | |||
@@ -87,12 +87,14 @@ struct vmi_timer_ops vmi_timer_ops; | |||
87 | #define IRQ_PATCH_INT_MASK 0 | 87 | #define IRQ_PATCH_INT_MASK 0 |
88 | #define IRQ_PATCH_DISABLE 5 | 88 | #define IRQ_PATCH_DISABLE 5 |
89 | 89 | ||
90 | static inline void patch_offset(unsigned char *eip, unsigned char *dest) | 90 | static inline void patch_offset(void *insnbuf, |
91 | unsigned long eip, unsigned long dest) | ||
91 | { | 92 | { |
92 | *(unsigned long *)(eip+1) = dest-eip-5; | 93 | *(unsigned long *)(insnbuf+1) = dest-eip-5; |
93 | } | 94 | } |
94 | 95 | ||
95 | static unsigned patch_internal(int call, unsigned len, void *insns) | 96 | static unsigned patch_internal(int call, unsigned len, void *insnbuf, |
97 | unsigned long eip) | ||
96 | { | 98 | { |
97 | u64 reloc; | 99 | u64 reloc; |
98 | struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc; | 100 | struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc; |
@@ -100,14 +102,14 @@ static unsigned patch_internal(int call, unsigned len, void *insns) | |||
100 | switch(rel->type) { | 102 | switch(rel->type) { |
101 | case VMI_RELOCATION_CALL_REL: | 103 | case VMI_RELOCATION_CALL_REL: |
102 | BUG_ON(len < 5); | 104 | BUG_ON(len < 5); |
103 | *(char *)insns = MNEM_CALL; | 105 | *(char *)insnbuf = MNEM_CALL; |
104 | patch_offset(insns, rel->eip); | 106 | patch_offset(insnbuf, eip, (unsigned long)rel->eip); |
105 | return 5; | 107 | return 5; |
106 | 108 | ||
107 | case VMI_RELOCATION_JUMP_REL: | 109 | case VMI_RELOCATION_JUMP_REL: |
108 | BUG_ON(len < 5); | 110 | BUG_ON(len < 5); |
109 | *(char *)insns = MNEM_JMP; | 111 | *(char *)insnbuf = MNEM_JMP; |
110 | patch_offset(insns, rel->eip); | 112 | patch_offset(insnbuf, eip, (unsigned long)rel->eip); |
111 | return 5; | 113 | return 5; |
112 | 114 | ||
113 | case VMI_RELOCATION_NOP: | 115 | case VMI_RELOCATION_NOP: |
@@ -128,21 +130,26 @@ static unsigned patch_internal(int call, unsigned len, void *insns) | |||
128 | * Apply patch if appropriate, return length of new instruction | 130 | * Apply patch if appropriate, return length of new instruction |
129 | * sequence. The callee does nop padding for us. | 131 | * sequence. The callee does nop padding for us. |
130 | */ | 132 | */ |
131 | static unsigned vmi_patch(u8 type, u16 clobbers, void *insns, unsigned len) | 133 | static unsigned vmi_patch(u8 type, u16 clobbers, void *insns, |
134 | unsigned long eip, unsigned len) | ||
132 | { | 135 | { |
133 | switch (type) { | 136 | switch (type) { |
134 | case PARAVIRT_PATCH(irq_disable): | 137 | case PARAVIRT_PATCH(irq_disable): |
135 | return patch_internal(VMI_CALL_DisableInterrupts, len, insns); | 138 | return patch_internal(VMI_CALL_DisableInterrupts, len, |
139 | insns, eip); | ||
136 | case PARAVIRT_PATCH(irq_enable): | 140 | case PARAVIRT_PATCH(irq_enable): |
137 | return patch_internal(VMI_CALL_EnableInterrupts, len, insns); | 141 | return patch_internal(VMI_CALL_EnableInterrupts, len, |
142 | insns, eip); | ||
138 | case PARAVIRT_PATCH(restore_fl): | 143 | case PARAVIRT_PATCH(restore_fl): |
139 | return patch_internal(VMI_CALL_SetInterruptMask, len, insns); | 144 | return patch_internal(VMI_CALL_SetInterruptMask, len, |
145 | insns, eip); | ||
140 | case PARAVIRT_PATCH(save_fl): | 146 | case PARAVIRT_PATCH(save_fl): |
141 | return patch_internal(VMI_CALL_GetInterruptMask, len, insns); | 147 | return patch_internal(VMI_CALL_GetInterruptMask, len, |
148 | insns, eip); | ||
142 | case PARAVIRT_PATCH(iret): | 149 | case PARAVIRT_PATCH(iret): |
143 | return patch_internal(VMI_CALL_IRET, len, insns); | 150 | return patch_internal(VMI_CALL_IRET, len, insns, eip); |
144 | case PARAVIRT_PATCH(irq_enable_sysexit): | 151 | case PARAVIRT_PATCH(irq_enable_sysexit): |
145 | return patch_internal(VMI_CALL_SYSEXIT, len, insns); | 152 | return patch_internal(VMI_CALL_SYSEXIT, len, insns, eip); |
146 | default: | 153 | default: |
147 | break; | 154 | break; |
148 | } | 155 | } |
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index 8927222b3ab2..4241a74d16c8 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -82,7 +82,7 @@ static void flush_kernel_map(void *arg) | |||
82 | struct page *p; | 82 | struct page *p; |
83 | 83 | ||
84 | /* High level code is not ready for clflush yet */ | 84 | /* High level code is not ready for clflush yet */ |
85 | if (cpu_has_clflush) { | 85 | if (0 && cpu_has_clflush) { |
86 | list_for_each_entry (p, lh, lru) | 86 | list_for_each_entry (p, lh, lru) |
87 | cache_flush_page(p); | 87 | cache_flush_page(p); |
88 | } else if (boot_cpu_data.x86_model >= 4) | 88 | } else if (boot_cpu_data.x86_model >= 4) |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index 85503deeda46..ebc6f3c66340 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -455,3 +455,26 @@ void pcibios_disable_device (struct pci_dev *dev) | |||
455 | if (!dev->msi_enabled && pcibios_disable_irq) | 455 | if (!dev->msi_enabled && pcibios_disable_irq) |
456 | pcibios_disable_irq(dev); | 456 | pcibios_disable_irq(dev); |
457 | } | 457 | } |
458 | |||
459 | struct pci_bus *pci_scan_bus_with_sysdata(int busno) | ||
460 | { | ||
461 | struct pci_bus *bus = NULL; | ||
462 | struct pci_sysdata *sd; | ||
463 | |||
464 | /* | ||
465 | * Allocate per-root-bus (not per bus) arch-specific data. | ||
466 | * TODO: leak; this memory is never freed. | ||
467 | * It's arguable whether it's worth the trouble to care. | ||
468 | */ | ||
469 | sd = kzalloc(sizeof(*sd), GFP_KERNEL); | ||
470 | if (!sd) { | ||
471 | printk(KERN_ERR "PCI: OOM, skipping PCI bus %02x\n", busno); | ||
472 | return NULL; | ||
473 | } | ||
474 | sd->node = -1; | ||
475 | bus = pci_scan_bus(busno, &pci_root_ops, sd); | ||
476 | if (!bus) | ||
477 | kfree(sd); | ||
478 | |||
479 | return bus; | ||
480 | } | ||
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index e7306dbf6c42..c82cbf4c7226 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c | |||
@@ -25,9 +25,9 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) | |||
25 | pci_read_config_byte(d, reg++, &subb); | 25 | pci_read_config_byte(d, reg++, &subb); |
26 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); | 26 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); |
27 | if (busno) | 27 | if (busno) |
28 | pci_scan_bus(busno, &pci_root_ops, NULL); /* Bus A */ | 28 | pci_scan_bus_with_sysdata(busno); /* Bus A */ |
29 | if (suba < subb) | 29 | if (suba < subb) |
30 | pci_scan_bus(suba+1, &pci_root_ops, NULL); /* Bus B */ | 30 | pci_scan_bus_with_sysdata(suba+1); /* Bus B */ |
31 | } | 31 | } |
32 | pcibios_last_bus = -1; | 32 | pcibios_last_bus = -1; |
33 | } | 33 | } |
@@ -42,7 +42,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d) | |||
42 | u8 busno; | 42 | u8 busno; |
43 | pci_read_config_byte(d, 0x4a, &busno); | 43 | pci_read_config_byte(d, 0x4a, &busno); |
44 | printk(KERN_INFO "PCI: i440KX/GX host bridge %s: secondary bus %02x\n", pci_name(d), busno); | 44 | printk(KERN_INFO "PCI: i440KX/GX host bridge %s: secondary bus %02x\n", pci_name(d), busno); |
45 | pci_scan_bus(busno, &pci_root_ops, NULL); | 45 | pci_scan_bus_with_sysdata(busno); |
46 | pcibios_last_bus = -1; | 46 | pcibios_last_bus = -1; |
47 | } | 47 | } |
48 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); | 48 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); |
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index f2cb942f8281..665db063a40a 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -138,8 +138,9 @@ static void __init pirq_peer_trick(void) | |||
138 | for(i = 1; i < 256; i++) { | 138 | for(i = 1; i < 256; i++) { |
139 | if (!busmap[i] || pci_find_bus(0, i)) | 139 | if (!busmap[i] || pci_find_bus(0, i)) |
140 | continue; | 140 | continue; |
141 | if (pci_scan_bus(i, &pci_root_ops, NULL)) | 141 | if (pci_scan_bus_with_sysdata(i)) |
142 | printk(KERN_INFO "PCI: Discovered primary peer bus %02x [IRQ]\n", i); | 142 | printk(KERN_INFO "PCI: Discovered primary peer " |
143 | "bus %02x [IRQ]\n", i); | ||
143 | } | 144 | } |
144 | pcibios_last_bus = -1; | 145 | pcibios_last_bus = -1; |
145 | } | 146 | } |
diff --git a/arch/i386/pci/legacy.c b/arch/i386/pci/legacy.c index 149a9588c256..5565d7016b75 100644 --- a/arch/i386/pci/legacy.c +++ b/arch/i386/pci/legacy.c | |||
@@ -26,7 +26,7 @@ static void __devinit pcibios_fixup_peer_bridges(void) | |||
26 | l != 0x0000 && l != 0xffff) { | 26 | l != 0x0000 && l != 0xffff) { |
27 | DBG("Found device at %02x:%02x [%04x]\n", n, devfn, l); | 27 | DBG("Found device at %02x:%02x [%04x]\n", n, devfn, l); |
28 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n); | 28 | printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n); |
29 | pci_scan_bus(n, &pci_root_ops, NULL); | 29 | pci_scan_bus_with_sysdata(n); |
30 | break; | 30 | break; |
31 | } | 31 | } |
32 | } | 32 | } |
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index bb1afd9e589d..0d46b7a88b3b 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -82,16 +82,15 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, | |||
82 | 82 | ||
83 | switch (len) { | 83 | switch (len) { |
84 | case 1: | 84 | case 1: |
85 | *value = readb(mmcfg_virt_addr + reg); | 85 | *value = mmio_config_readb(mmcfg_virt_addr + reg); |
86 | break; | 86 | break; |
87 | case 2: | 87 | case 2: |
88 | *value = readw(mmcfg_virt_addr + reg); | 88 | *value = mmio_config_readw(mmcfg_virt_addr + reg); |
89 | break; | 89 | break; |
90 | case 4: | 90 | case 4: |
91 | *value = readl(mmcfg_virt_addr + reg); | 91 | *value = mmio_config_readl(mmcfg_virt_addr + reg); |
92 | break; | 92 | break; |
93 | } | 93 | } |
94 | |||
95 | spin_unlock_irqrestore(&pci_config_lock, flags); | 94 | spin_unlock_irqrestore(&pci_config_lock, flags); |
96 | 95 | ||
97 | return 0; | 96 | return 0; |
@@ -116,16 +115,15 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, | |||
116 | 115 | ||
117 | switch (len) { | 116 | switch (len) { |
118 | case 1: | 117 | case 1: |
119 | writeb(value, mmcfg_virt_addr + reg); | 118 | mmio_config_writeb(mmcfg_virt_addr, value); |
120 | break; | 119 | break; |
121 | case 2: | 120 | case 2: |
122 | writew(value, mmcfg_virt_addr + reg); | 121 | mmio_config_writew(mmcfg_virt_addr, value); |
123 | break; | 122 | break; |
124 | case 4: | 123 | case 4: |
125 | writel(value, mmcfg_virt_addr + reg); | 124 | mmio_config_writel(mmcfg_virt_addr, value); |
126 | break; | 125 | break; |
127 | } | 126 | } |
128 | |||
129 | spin_unlock_irqrestore(&pci_config_lock, flags); | 127 | spin_unlock_irqrestore(&pci_config_lock, flags); |
130 | 128 | ||
131 | return 0; | 129 | return 0; |
diff --git a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c index adbe17a38f6f..f5f165f69e0c 100644 --- a/arch/i386/pci/numa.c +++ b/arch/i386/pci/numa.c | |||
@@ -96,10 +96,14 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) | |||
96 | pci_read_config_byte(d, reg++, &suba); | 96 | pci_read_config_byte(d, reg++, &suba); |
97 | pci_read_config_byte(d, reg++, &subb); | 97 | pci_read_config_byte(d, reg++, &subb); |
98 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); | 98 | DBG("i450NX PXB %d: %02x/%02x/%02x\n", pxb, busno, suba, subb); |
99 | if (busno) | 99 | if (busno) { |
100 | pci_scan_bus(QUADLOCAL2BUS(quad,busno), &pci_root_ops, NULL); /* Bus A */ | 100 | /* Bus A */ |
101 | if (suba < subb) | 101 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, busno)); |
102 | pci_scan_bus(QUADLOCAL2BUS(quad,suba+1), &pci_root_ops, NULL); /* Bus B */ | 102 | } |
103 | if (suba < subb) { | ||
104 | /* Bus B */ | ||
105 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, suba+1)); | ||
106 | } | ||
103 | } | 107 | } |
104 | pcibios_last_bus = -1; | 108 | pcibios_last_bus = -1; |
105 | } | 109 | } |
@@ -123,8 +127,7 @@ static int __init pci_numa_init(void) | |||
123 | continue; | 127 | continue; |
124 | printk("Scanning PCI bus %d for quad %d\n", | 128 | printk("Scanning PCI bus %d for quad %d\n", |
125 | QUADLOCAL2BUS(quad,0), quad); | 129 | QUADLOCAL2BUS(quad,0), quad); |
126 | pci_scan_bus(QUADLOCAL2BUS(quad,0), | 130 | pci_scan_bus_with_sysdata(QUADLOCAL2BUS(quad, 0)); |
127 | &pci_root_ops, NULL); | ||
128 | } | 131 | } |
129 | return 0; | 132 | return 0; |
130 | } | 133 | } |
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h index e58bae2076ad..8c66f275756f 100644 --- a/arch/i386/pci/pci.h +++ b/arch/i386/pci/pci.h | |||
@@ -104,3 +104,46 @@ extern DECLARE_BITMAP(pci_mmcfg_fallback_slots, 32*PCI_MMCFG_MAX_CHECK_BUS); | |||
104 | extern int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus, | 104 | extern int __init pci_mmcfg_arch_reachable(unsigned int seg, unsigned int bus, |
105 | unsigned int devfn); | 105 | unsigned int devfn); |
106 | extern int __init pci_mmcfg_arch_init(void); | 106 | extern int __init pci_mmcfg_arch_init(void); |
107 | |||
108 | /* | ||
109 | * AMD Fam10h CPUs are buggy, and cannot access MMIO config space | ||
110 | * on their northbrige except through the * %eax register. As such, you MUST | ||
111 | * NOT use normal IOMEM accesses, you need to only use the magic mmio-config | ||
112 | * accessor functions. | ||
113 | * In fact just use pci_config_*, nothing else please. | ||
114 | */ | ||
115 | static inline unsigned char mmio_config_readb(void __iomem *pos) | ||
116 | { | ||
117 | u8 val; | ||
118 | asm volatile("movb (%1),%%al" : "=a" (val) : "r" (pos)); | ||
119 | return val; | ||
120 | } | ||
121 | |||
122 | static inline unsigned short mmio_config_readw(void __iomem *pos) | ||
123 | { | ||
124 | u16 val; | ||
125 | asm volatile("movw (%1),%%ax" : "=a" (val) : "r" (pos)); | ||
126 | return val; | ||
127 | } | ||
128 | |||
129 | static inline unsigned int mmio_config_readl(void __iomem *pos) | ||
130 | { | ||
131 | u32 val; | ||
132 | asm volatile("movl (%1),%%eax" : "=a" (val) : "r" (pos)); | ||
133 | return val; | ||
134 | } | ||
135 | |||
136 | static inline void mmio_config_writeb(void __iomem *pos, u8 val) | ||
137 | { | ||
138 | asm volatile("movb %%al,(%1)" :: "a" (val), "r" (pos) : "memory"); | ||
139 | } | ||
140 | |||
141 | static inline void mmio_config_writew(void __iomem *pos, u16 val) | ||
142 | { | ||
143 | asm volatile("movw %%ax,(%1)" :: "a" (val), "r" (pos) : "memory"); | ||
144 | } | ||
145 | |||
146 | static inline void mmio_config_writel(void __iomem *pos, u32 val) | ||
147 | { | ||
148 | asm volatile("movl %%eax,(%1)" :: "a" (val), "r" (pos) : "memory"); | ||
149 | } | ||
diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c index f1b486d4190b..8ecb1c722594 100644 --- a/arch/i386/pci/visws.c +++ b/arch/i386/pci/visws.c | |||
@@ -101,8 +101,8 @@ static int __init pcibios_init(void) | |||
101 | "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); | 101 | "bridge B (PIIX4) bus: %u\n", pci_bus1, pci_bus0); |
102 | 102 | ||
103 | raw_pci_ops = &pci_direct_conf1; | 103 | raw_pci_ops = &pci_direct_conf1; |
104 | pci_scan_bus(pci_bus0, &pci_root_ops, NULL); | 104 | pci_scan_bus_with_sysdata(pci_bus0); |
105 | pci_scan_bus(pci_bus1, &pci_root_ops, NULL); | 105 | pci_scan_bus_with_sysdata(pci_bus1); |
106 | pci_fixup_irqs(visws_swizzle, visws_map_irq); | 106 | pci_fixup_irqs(visws_swizzle, visws_map_irq); |
107 | pcibios_resource_survey(); | 107 | pcibios_resource_survey(); |
108 | return 0; | 108 | return 0; |
diff --git a/arch/i386/xen/enlighten.c b/arch/i386/xen/enlighten.c index 9a8c1181c001..f0c37511d8da 100644 --- a/arch/i386/xen/enlighten.c +++ b/arch/i386/xen/enlighten.c | |||
@@ -842,7 +842,8 @@ void __init xen_setup_vcpu_info_placement(void) | |||
842 | } | 842 | } |
843 | } | 843 | } |
844 | 844 | ||
845 | static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | 845 | static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf, |
846 | unsigned long addr, unsigned len) | ||
846 | { | 847 | { |
847 | char *start, *end, *reloc; | 848 | char *start, *end, *reloc; |
848 | unsigned ret; | 849 | unsigned ret; |
@@ -869,7 +870,7 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
869 | if (start == NULL || (end-start) > len) | 870 | if (start == NULL || (end-start) > len) |
870 | goto default_patch; | 871 | goto default_patch; |
871 | 872 | ||
872 | ret = paravirt_patch_insns(insns, len, start, end); | 873 | ret = paravirt_patch_insns(insnbuf, len, start, end); |
873 | 874 | ||
874 | /* Note: because reloc is assigned from something that | 875 | /* Note: because reloc is assigned from something that |
875 | appears to be an array, gcc assumes it's non-null, | 876 | appears to be an array, gcc assumes it's non-null, |
@@ -877,8 +878,8 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
877 | end. */ | 878 | end. */ |
878 | if (reloc > start && reloc < end) { | 879 | if (reloc > start && reloc < end) { |
879 | int reloc_off = reloc - start; | 880 | int reloc_off = reloc - start; |
880 | long *relocp = (long *)(insns + reloc_off); | 881 | long *relocp = (long *)(insnbuf + reloc_off); |
881 | long delta = start - (char *)insns; | 882 | long delta = start - (char *)addr; |
882 | 883 | ||
883 | *relocp += delta; | 884 | *relocp += delta; |
884 | } | 885 | } |
@@ -886,7 +887,8 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insns, unsigned len) | |||
886 | 887 | ||
887 | default_patch: | 888 | default_patch: |
888 | default: | 889 | default: |
889 | ret = paravirt_patch_default(type, clobbers, insns, len); | 890 | ret = paravirt_patch_default(type, clobbers, insnbuf, |
891 | addr, len); | ||
890 | break; | 892 | break; |
891 | } | 893 | } |
892 | 894 | ||
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index d0b43df44426..ca7a197998ee 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -1,9 +1,23 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22-rc6 | 3 | # Linux kernel version: 2.6.23-rc2 |
4 | # Tue Jun 26 14:15:19 2007 | 4 | # Tue Aug 7 19:17:26 2007 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_POWER4_ONLY is not set | ||
12 | CONFIG_POWER3=y | ||
13 | CONFIG_POWER4=y | ||
14 | CONFIG_PPC_FPU=y | ||
15 | CONFIG_ALTIVEC=y | ||
16 | CONFIG_PPC_STD_MMU=y | ||
17 | # CONFIG_PPC_MM_SLICES is not set | ||
18 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
19 | CONFIG_SMP=y | ||
20 | CONFIG_NR_CPUS=2 | ||
7 | CONFIG_64BIT=y | 21 | CONFIG_64BIT=y |
8 | CONFIG_PPC_MERGE=y | 22 | CONFIG_PPC_MERGE=y |
9 | CONFIG_MMU=y | 23 | CONFIG_MMU=y |
@@ -15,6 +29,7 @@ CONFIG_ARCH_HAS_ILOG2_U64=y | |||
15 | CONFIG_GENERIC_HWEIGHT=y | 29 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 30 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
17 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 31 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
32 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | ||
18 | CONFIG_PPC=y | 33 | CONFIG_PPC=y |
19 | CONFIG_EARLY_PRINTK=y | 34 | CONFIG_EARLY_PRINTK=y |
20 | CONFIG_COMPAT=y | 35 | CONFIG_COMPAT=y |
@@ -22,50 +37,32 @@ CONFIG_SYSVIPC_COMPAT=y | |||
22 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 37 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
23 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 38 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
24 | CONFIG_PPC_OF=y | 39 | CONFIG_PPC_OF=y |
40 | CONFIG_OF=y | ||
25 | # CONFIG_PPC_UDBG_16550 is not set | 41 | # CONFIG_PPC_UDBG_16550 is not set |
26 | # CONFIG_GENERIC_TBSYNC is not set | 42 | # CONFIG_GENERIC_TBSYNC is not set |
27 | CONFIG_AUDIT_ARCH=y | 43 | CONFIG_AUDIT_ARCH=y |
28 | CONFIG_GENERIC_BUG=y | 44 | CONFIG_GENERIC_BUG=y |
29 | # CONFIG_DEFAULT_UIMAGE is not set | 45 | # CONFIG_DEFAULT_UIMAGE is not set |
30 | |||
31 | # | ||
32 | # Processor support | ||
33 | # | ||
34 | # CONFIG_POWER4_ONLY is not set | ||
35 | CONFIG_POWER3=y | ||
36 | CONFIG_POWER4=y | ||
37 | CONFIG_PPC_FPU=y | ||
38 | # CONFIG_PPC_DCR_NATIVE is not set | 46 | # CONFIG_PPC_DCR_NATIVE is not set |
39 | # CONFIG_PPC_DCR_MMIO is not set | 47 | # CONFIG_PPC_DCR_MMIO is not set |
40 | # CONFIG_PPC_OF_PLATFORM_PCI is not set | 48 | # CONFIG_PPC_OF_PLATFORM_PCI is not set |
41 | CONFIG_ALTIVEC=y | ||
42 | CONFIG_PPC_STD_MMU=y | ||
43 | # CONFIG_PPC_MM_SLICES is not set | ||
44 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
45 | CONFIG_SMP=y | ||
46 | CONFIG_NR_CPUS=2 | ||
47 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 49 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
48 | 50 | ||
49 | # | 51 | # |
50 | # Code maturity level options | 52 | # General setup |
51 | # | 53 | # |
52 | CONFIG_EXPERIMENTAL=y | 54 | CONFIG_EXPERIMENTAL=y |
53 | CONFIG_LOCK_KERNEL=y | 55 | CONFIG_LOCK_KERNEL=y |
54 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 56 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
55 | |||
56 | # | ||
57 | # General setup | ||
58 | # | ||
59 | CONFIG_LOCALVERSION="" | 57 | CONFIG_LOCALVERSION="" |
60 | CONFIG_LOCALVERSION_AUTO=y | 58 | CONFIG_LOCALVERSION_AUTO=y |
61 | CONFIG_SWAP=y | 59 | CONFIG_SWAP=y |
62 | CONFIG_SYSVIPC=y | 60 | CONFIG_SYSVIPC=y |
63 | # CONFIG_IPC_NS is not set | ||
64 | CONFIG_SYSVIPC_SYSCTL=y | 61 | CONFIG_SYSVIPC_SYSCTL=y |
65 | # CONFIG_POSIX_MQUEUE is not set | 62 | # CONFIG_POSIX_MQUEUE is not set |
66 | # CONFIG_BSD_PROCESS_ACCT is not set | 63 | # CONFIG_BSD_PROCESS_ACCT is not set |
67 | # CONFIG_TASKSTATS is not set | 64 | # CONFIG_TASKSTATS is not set |
68 | # CONFIG_UTS_NS is not set | 65 | # CONFIG_USER_NS is not set |
69 | # CONFIG_AUDIT is not set | 66 | # CONFIG_AUDIT is not set |
70 | # CONFIG_IKCONFIG is not set | 67 | # CONFIG_IKCONFIG is not set |
71 | CONFIG_LOG_BUF_SHIFT=17 | 68 | CONFIG_LOG_BUF_SHIFT=17 |
@@ -100,10 +97,6 @@ CONFIG_SLAB=y | |||
100 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
101 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
102 | CONFIG_BASE_SMALL=0 | 99 | CONFIG_BASE_SMALL=0 |
103 | |||
104 | # | ||
105 | # Loadable module support | ||
106 | # | ||
107 | CONFIG_MODULES=y | 100 | CONFIG_MODULES=y |
108 | CONFIG_MODULE_UNLOAD=y | 101 | CONFIG_MODULE_UNLOAD=y |
109 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 102 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
@@ -111,12 +104,9 @@ CONFIG_MODULE_UNLOAD=y | |||
111 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 104 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
112 | CONFIG_KMOD=y | 105 | CONFIG_KMOD=y |
113 | CONFIG_STOP_MACHINE=y | 106 | CONFIG_STOP_MACHINE=y |
114 | |||
115 | # | ||
116 | # Block layer | ||
117 | # | ||
118 | CONFIG_BLOCK=y | 107 | CONFIG_BLOCK=y |
119 | # CONFIG_BLK_DEV_IO_TRACE is not set | 108 | # CONFIG_BLK_DEV_IO_TRACE is not set |
109 | CONFIG_BLK_DEV_BSG=y | ||
120 | 110 | ||
121 | # | 111 | # |
122 | # IO Schedulers | 112 | # IO Schedulers |
@@ -136,7 +126,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
136 | # | 126 | # |
137 | CONFIG_PPC_MULTIPLATFORM=y | 127 | CONFIG_PPC_MULTIPLATFORM=y |
138 | # CONFIG_EMBEDDED6xx is not set | 128 | # CONFIG_EMBEDDED6xx is not set |
139 | # CONFIG_APUS is not set | 129 | # CONFIG_PPC_82xx is not set |
130 | # CONFIG_PPC_83xx is not set | ||
131 | # CONFIG_PPC_86xx is not set | ||
140 | # CONFIG_PPC_PSERIES is not set | 132 | # CONFIG_PPC_PSERIES is not set |
141 | # CONFIG_PPC_ISERIES is not set | 133 | # CONFIG_PPC_ISERIES is not set |
142 | # CONFIG_PPC_MPC52xx is not set | 134 | # CONFIG_PPC_MPC52xx is not set |
@@ -223,6 +215,7 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y | |||
223 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 215 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
224 | CONFIG_RESOURCES_64BIT=y | 216 | CONFIG_RESOURCES_64BIT=y |
225 | CONFIG_ZONE_DMA_FLAG=1 | 217 | CONFIG_ZONE_DMA_FLAG=1 |
218 | CONFIG_BOUNCE=y | ||
226 | CONFIG_ARCH_MEMORY_PROBE=y | 219 | CONFIG_ARCH_MEMORY_PROBE=y |
227 | # CONFIG_PPC_HAS_HASH_64K is not set | 220 | # CONFIG_PPC_HAS_HASH_64K is not set |
228 | # CONFIG_PPC_64K_PAGES is not set | 221 | # CONFIG_PPC_64K_PAGES is not set |
@@ -241,6 +234,7 @@ CONFIG_ZONE_DMA=y | |||
241 | CONFIG_GENERIC_ISA_DMA=y | 234 | CONFIG_GENERIC_ISA_DMA=y |
242 | # CONFIG_PCI is not set | 235 | # CONFIG_PCI is not set |
243 | # CONFIG_PCI_DOMAINS is not set | 236 | # CONFIG_PCI_DOMAINS is not set |
237 | # CONFIG_PCI_SYSCALL is not set | ||
244 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 238 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
245 | 239 | ||
246 | # | 240 | # |
@@ -365,6 +359,7 @@ CONFIG_WIRELESS_EXT=y | |||
365 | # CONFIG_MAC80211 is not set | 359 | # CONFIG_MAC80211 is not set |
366 | # CONFIG_IEEE80211 is not set | 360 | # CONFIG_IEEE80211 is not set |
367 | # CONFIG_RFKILL is not set | 361 | # CONFIG_RFKILL is not set |
362 | # CONFIG_NET_9P is not set | ||
368 | 363 | ||
369 | # | 364 | # |
370 | # Device Drivers | 365 | # Device Drivers |
@@ -379,26 +374,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
379 | # CONFIG_DEBUG_DRIVER is not set | 374 | # CONFIG_DEBUG_DRIVER is not set |
380 | # CONFIG_DEBUG_DEVRES is not set | 375 | # CONFIG_DEBUG_DEVRES is not set |
381 | # CONFIG_SYS_HYPERVISOR is not set | 376 | # CONFIG_SYS_HYPERVISOR is not set |
382 | |||
383 | # | ||
384 | # Connector - unified userspace <-> kernelspace linker | ||
385 | # | ||
386 | # CONFIG_CONNECTOR is not set | 377 | # CONFIG_CONNECTOR is not set |
387 | # CONFIG_MTD is not set | 378 | # CONFIG_MTD is not set |
388 | 379 | CONFIG_OF_DEVICE=y | |
389 | # | ||
390 | # Parallel port support | ||
391 | # | ||
392 | # CONFIG_PARPORT is not set | 380 | # CONFIG_PARPORT is not set |
393 | 381 | CONFIG_BLK_DEV=y | |
394 | # | ||
395 | # Plug and Play support | ||
396 | # | ||
397 | # CONFIG_PNPACPI is not set | ||
398 | |||
399 | # | ||
400 | # Block devices | ||
401 | # | ||
402 | # CONFIG_BLK_DEV_FD is not set | 382 | # CONFIG_BLK_DEV_FD is not set |
403 | # CONFIG_BLK_DEV_COW_COMMON is not set | 383 | # CONFIG_BLK_DEV_COW_COMMON is not set |
404 | CONFIG_BLK_DEV_LOOP=y | 384 | CONFIG_BLK_DEV_LOOP=y |
@@ -411,11 +391,8 @@ CONFIG_BLK_DEV_RAM_SIZE=65535 | |||
411 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 391 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
412 | # CONFIG_CDROM_PKTCDVD is not set | 392 | # CONFIG_CDROM_PKTCDVD is not set |
413 | # CONFIG_ATA_OVER_ETH is not set | 393 | # CONFIG_ATA_OVER_ETH is not set |
414 | 394 | CONFIG_MISC_DEVICES=y | |
415 | # | 395 | # CONFIG_EEPROM_93CX6 is not set |
416 | # Misc devices | ||
417 | # | ||
418 | # CONFIG_BLINK is not set | ||
419 | # CONFIG_IDE is not set | 396 | # CONFIG_IDE is not set |
420 | 397 | ||
421 | # | 398 | # |
@@ -423,6 +400,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
423 | # | 400 | # |
424 | # CONFIG_RAID_ATTRS is not set | 401 | # CONFIG_RAID_ATTRS is not set |
425 | CONFIG_SCSI=y | 402 | CONFIG_SCSI=y |
403 | CONFIG_SCSI_DMA=y | ||
426 | # CONFIG_SCSI_TGT is not set | 404 | # CONFIG_SCSI_TGT is not set |
427 | # CONFIG_SCSI_NETLINK is not set | 405 | # CONFIG_SCSI_NETLINK is not set |
428 | CONFIG_SCSI_PROC_FS=y | 406 | CONFIG_SCSI_PROC_FS=y |
@@ -455,37 +433,22 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
455 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 433 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
456 | # CONFIG_SCSI_SAS_ATTRS is not set | 434 | # CONFIG_SCSI_SAS_ATTRS is not set |
457 | # CONFIG_SCSI_SAS_LIBSAS is not set | 435 | # CONFIG_SCSI_SAS_LIBSAS is not set |
458 | 436 | # CONFIG_SCSI_LOWLEVEL is not set | |
459 | # | ||
460 | # SCSI low-level drivers | ||
461 | # | ||
462 | # CONFIG_ISCSI_TCP is not set | ||
463 | # CONFIG_SCSI_DEBUG is not set | ||
464 | # CONFIG_ATA is not set | 437 | # CONFIG_ATA is not set |
465 | |||
466 | # | ||
467 | # Multi-device support (RAID and LVM) | ||
468 | # | ||
469 | # CONFIG_MD is not set | 438 | # CONFIG_MD is not set |
470 | # CONFIG_MACINTOSH_DRIVERS is not set | 439 | # CONFIG_MACINTOSH_DRIVERS is not set |
471 | |||
472 | # | ||
473 | # Network device support | ||
474 | # | ||
475 | CONFIG_NETDEVICES=y | 440 | CONFIG_NETDEVICES=y |
441 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
476 | # CONFIG_DUMMY is not set | 442 | # CONFIG_DUMMY is not set |
477 | # CONFIG_BONDING is not set | 443 | # CONFIG_BONDING is not set |
444 | # CONFIG_MACVLAN is not set | ||
478 | # CONFIG_EQUALIZER is not set | 445 | # CONFIG_EQUALIZER is not set |
479 | # CONFIG_TUN is not set | 446 | # CONFIG_TUN is not set |
480 | |||
481 | # | ||
482 | # Ethernet (10 or 100Mbit) | ||
483 | # | ||
484 | # CONFIG_NET_ETHERNET is not set | 447 | # CONFIG_NET_ETHERNET is not set |
485 | CONFIG_MII=m | 448 | CONFIG_MII=m |
486 | CONFIG_NETDEV_1000=y | 449 | CONFIG_NETDEV_1000=y |
487 | CONFIG_NETDEV_10000=y | ||
488 | CONFIG_GELIC_NET=y | 450 | CONFIG_GELIC_NET=y |
451 | # CONFIG_NETDEV_10000 is not set | ||
489 | 452 | ||
490 | # | 453 | # |
491 | # Wireless LAN | 454 | # Wireless LAN |
@@ -518,15 +481,7 @@ CONFIG_USB_NET_MCS7830=m | |||
518 | # CONFIG_NETCONSOLE is not set | 481 | # CONFIG_NETCONSOLE is not set |
519 | # CONFIG_NETPOLL is not set | 482 | # CONFIG_NETPOLL is not set |
520 | # CONFIG_NET_POLL_CONTROLLER is not set | 483 | # CONFIG_NET_POLL_CONTROLLER is not set |
521 | |||
522 | # | ||
523 | # ISDN subsystem | ||
524 | # | ||
525 | # CONFIG_ISDN is not set | 484 | # CONFIG_ISDN is not set |
526 | |||
527 | # | ||
528 | # Telephony Support | ||
529 | # | ||
530 | # CONFIG_PHONE is not set | 485 | # CONFIG_PHONE is not set |
531 | 486 | ||
532 | # | 487 | # |
@@ -604,10 +559,6 @@ CONFIG_VT_HW_CONSOLE_BINDING=y | |||
604 | CONFIG_UNIX98_PTYS=y | 559 | CONFIG_UNIX98_PTYS=y |
605 | CONFIG_LEGACY_PTYS=y | 560 | CONFIG_LEGACY_PTYS=y |
606 | CONFIG_LEGACY_PTY_COUNT=16 | 561 | CONFIG_LEGACY_PTY_COUNT=16 |
607 | |||
608 | # | ||
609 | # IPMI | ||
610 | # | ||
611 | # CONFIG_IPMI_HANDLER is not set | 562 | # CONFIG_IPMI_HANDLER is not set |
612 | # CONFIG_WATCHDOG is not set | 563 | # CONFIG_WATCHDOG is not set |
613 | # CONFIG_HW_RANDOM is not set | 564 | # CONFIG_HW_RANDOM is not set |
@@ -616,10 +567,6 @@ CONFIG_GEN_RTC=y | |||
616 | # CONFIG_R3964 is not set | 567 | # CONFIG_R3964 is not set |
617 | # CONFIG_RAW_DRIVER is not set | 568 | # CONFIG_RAW_DRIVER is not set |
618 | # CONFIG_HANGCHECK_TIMER is not set | 569 | # CONFIG_HANGCHECK_TIMER is not set |
619 | |||
620 | # | ||
621 | # TPM devices | ||
622 | # | ||
623 | # CONFIG_TCG_TPM is not set | 570 | # CONFIG_TCG_TPM is not set |
624 | # CONFIG_I2C is not set | 571 | # CONFIG_I2C is not set |
625 | 572 | ||
@@ -628,11 +575,8 @@ CONFIG_GEN_RTC=y | |||
628 | # | 575 | # |
629 | # CONFIG_SPI is not set | 576 | # CONFIG_SPI is not set |
630 | # CONFIG_SPI_MASTER is not set | 577 | # CONFIG_SPI_MASTER is not set |
631 | |||
632 | # | ||
633 | # Dallas's 1-wire bus | ||
634 | # | ||
635 | # CONFIG_W1 is not set | 578 | # CONFIG_W1 is not set |
579 | # CONFIG_POWER_SUPPLY is not set | ||
636 | # CONFIG_HWMON is not set | 580 | # CONFIG_HWMON is not set |
637 | 581 | ||
638 | # | 582 | # |
@@ -657,6 +601,7 @@ CONFIG_GEN_RTC=y | |||
657 | # | 601 | # |
658 | # CONFIG_DISPLAY_SUPPORT is not set | 602 | # CONFIG_DISPLAY_SUPPORT is not set |
659 | # CONFIG_VGASTATE is not set | 603 | # CONFIG_VGASTATE is not set |
604 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
660 | CONFIG_FB=y | 605 | CONFIG_FB=y |
661 | # CONFIG_FIRMWARE_EDID is not set | 606 | # CONFIG_FIRMWARE_EDID is not set |
662 | # CONFIG_FB_DDC is not set | 607 | # CONFIG_FB_DDC is not set |
@@ -691,11 +636,13 @@ CONFIG_FB_PS3_DEFAULT_SIZE_M=18 | |||
691 | # CONFIG_VGA_CONSOLE is not set | 636 | # CONFIG_VGA_CONSOLE is not set |
692 | CONFIG_DUMMY_CONSOLE=y | 637 | CONFIG_DUMMY_CONSOLE=y |
693 | CONFIG_FRAMEBUFFER_CONSOLE=y | 638 | CONFIG_FRAMEBUFFER_CONSOLE=y |
639 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
694 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | 640 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y |
695 | # CONFIG_FONTS is not set | 641 | # CONFIG_FONTS is not set |
696 | CONFIG_FONT_8x8=y | 642 | CONFIG_FONT_8x8=y |
697 | CONFIG_FONT_8x16=y | 643 | CONFIG_FONT_8x16=y |
698 | CONFIG_LOGO=y | 644 | CONFIG_LOGO=y |
645 | CONFIG_FB_LOGO_EXTRA=y | ||
699 | # CONFIG_LOGO_LINUX_MONO is not set | 646 | # CONFIG_LOGO_LINUX_MONO is not set |
700 | # CONFIG_LOGO_LINUX_VGA16 is not set | 647 | # CONFIG_LOGO_LINUX_VGA16 is not set |
701 | CONFIG_LOGO_LINUX_CLUT224=y | 648 | CONFIG_LOGO_LINUX_CLUT224=y |
@@ -709,6 +656,8 @@ CONFIG_SOUND=y | |||
709 | # Advanced Linux Sound Architecture | 656 | # Advanced Linux Sound Architecture |
710 | # | 657 | # |
711 | CONFIG_SND=y | 658 | CONFIG_SND=y |
659 | CONFIG_SND_TIMER=y | ||
660 | CONFIG_SND_PCM=y | ||
712 | # CONFIG_SND_SEQUENCER is not set | 661 | # CONFIG_SND_SEQUENCER is not set |
713 | # CONFIG_SND_MIXER_OSS is not set | 662 | # CONFIG_SND_MIXER_OSS is not set |
714 | # CONFIG_SND_PCM_OSS is not set | 663 | # CONFIG_SND_PCM_OSS is not set |
@@ -735,6 +684,12 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
735 | # | 684 | # |
736 | 685 | ||
737 | # | 686 | # |
687 | # ALSA PowerPC devices | ||
688 | # | ||
689 | CONFIG_SND_PS3=y | ||
690 | CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 | ||
691 | |||
692 | # | ||
738 | # USB devices | 693 | # USB devices |
739 | # | 694 | # |
740 | # CONFIG_SND_USB_AUDIO is not set | 695 | # CONFIG_SND_USB_AUDIO is not set |
@@ -747,13 +702,14 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
747 | # CONFIG_SND_SOC is not set | 702 | # CONFIG_SND_SOC is not set |
748 | 703 | ||
749 | # | 704 | # |
750 | # Open Sound System | 705 | # SoC Audio support for SuperH |
751 | # | 706 | # |
752 | # CONFIG_SOUND_PRIME is not set | ||
753 | 707 | ||
754 | # | 708 | # |
755 | # HID Devices | 709 | # Open Sound System |
756 | # | 710 | # |
711 | # CONFIG_SOUND_PRIME is not set | ||
712 | CONFIG_HID_SUPPORT=y | ||
757 | CONFIG_HID=y | 713 | CONFIG_HID=y |
758 | # CONFIG_HID_DEBUG is not set | 714 | # CONFIG_HID_DEBUG is not set |
759 | 715 | ||
@@ -770,10 +726,7 @@ CONFIG_USB_HID=m | |||
770 | # | 726 | # |
771 | # CONFIG_USB_KBD is not set | 727 | # CONFIG_USB_KBD is not set |
772 | # CONFIG_USB_MOUSE is not set | 728 | # CONFIG_USB_MOUSE is not set |
773 | 729 | CONFIG_USB_SUPPORT=y | |
774 | # | ||
775 | # USB support | ||
776 | # | ||
777 | CONFIG_USB_ARCH_HAS_HCD=y | 730 | CONFIG_USB_ARCH_HAS_HCD=y |
778 | CONFIG_USB_ARCH_HAS_OHCI=y | 731 | CONFIG_USB_ARCH_HAS_OHCI=y |
779 | CONFIG_USB_ARCH_HAS_EHCI=y | 732 | CONFIG_USB_ARCH_HAS_EHCI=y |
@@ -803,6 +756,7 @@ CONFIG_USB_OHCI_HCD=y | |||
803 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | 756 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y |
804 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | 757 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y |
805 | # CONFIG_USB_SL811_HCD is not set | 758 | # CONFIG_USB_SL811_HCD is not set |
759 | # CONFIG_USB_R8A66597_HCD is not set | ||
806 | 760 | ||
807 | # | 761 | # |
808 | # USB Device Class drivers | 762 | # USB Device Class drivers |
@@ -879,31 +833,8 @@ CONFIG_USB_MON=y | |||
879 | # | 833 | # |
880 | # CONFIG_USB_GADGET is not set | 834 | # CONFIG_USB_GADGET is not set |
881 | # CONFIG_MMC is not set | 835 | # CONFIG_MMC is not set |
882 | |||
883 | # | ||
884 | # LED devices | ||
885 | # | ||
886 | # CONFIG_NEW_LEDS is not set | 836 | # CONFIG_NEW_LEDS is not set |
887 | 837 | # CONFIG_EDAC is not set | |
888 | # | ||
889 | # LED drivers | ||
890 | # | ||
891 | |||
892 | # | ||
893 | # LED Triggers | ||
894 | # | ||
895 | |||
896 | # | ||
897 | # InfiniBand support | ||
898 | # | ||
899 | |||
900 | # | ||
901 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
902 | # | ||
903 | |||
904 | # | ||
905 | # Real Time Clock | ||
906 | # | ||
907 | # CONFIG_RTC_CLASS is not set | 838 | # CONFIG_RTC_CLASS is not set |
908 | 839 | ||
909 | # | 840 | # |
@@ -920,6 +851,11 @@ CONFIG_USB_MON=y | |||
920 | # | 851 | # |
921 | 852 | ||
922 | # | 853 | # |
854 | # Userspace I/O | ||
855 | # | ||
856 | # CONFIG_UIO is not set | ||
857 | |||
858 | # | ||
923 | # File systems | 859 | # File systems |
924 | # | 860 | # |
925 | CONFIG_EXT2_FS=m | 861 | CONFIG_EXT2_FS=m |
@@ -948,8 +884,8 @@ CONFIG_QUOTA=y | |||
948 | CONFIG_QFMT_V2=y | 884 | CONFIG_QFMT_V2=y |
949 | CONFIG_QUOTACTL=y | 885 | CONFIG_QUOTACTL=y |
950 | CONFIG_DNOTIFY=y | 886 | CONFIG_DNOTIFY=y |
951 | # CONFIG_AUTOFS_FS is not set | 887 | CONFIG_AUTOFS_FS=m |
952 | CONFIG_AUTOFS4_FS=y | 888 | CONFIG_AUTOFS4_FS=m |
953 | # CONFIG_FUSE_FS is not set | 889 | # CONFIG_FUSE_FS is not set |
954 | 890 | ||
955 | # | 891 | # |
@@ -1030,7 +966,6 @@ CONFIG_CIFS=m | |||
1030 | # CONFIG_NCP_FS is not set | 966 | # CONFIG_NCP_FS is not set |
1031 | # CONFIG_CODA_FS is not set | 967 | # CONFIG_CODA_FS is not set |
1032 | # CONFIG_AFS_FS is not set | 968 | # CONFIG_AFS_FS is not set |
1033 | # CONFIG_9P_FS is not set | ||
1034 | 969 | ||
1035 | # | 970 | # |
1036 | # Partition Types | 971 | # Partition Types |
@@ -1096,6 +1031,7 @@ CONFIG_BITREVERSE=y | |||
1096 | # CONFIG_CRC16 is not set | 1031 | # CONFIG_CRC16 is not set |
1097 | # CONFIG_CRC_ITU_T is not set | 1032 | # CONFIG_CRC_ITU_T is not set |
1098 | CONFIG_CRC32=y | 1033 | CONFIG_CRC32=y |
1034 | # CONFIG_CRC7 is not set | ||
1099 | # CONFIG_LIBCRC32C is not set | 1035 | # CONFIG_LIBCRC32C is not set |
1100 | CONFIG_PLIST=y | 1036 | CONFIG_PLIST=y |
1101 | CONFIG_HAS_IOMEM=y | 1037 | CONFIG_HAS_IOMEM=y |
@@ -1120,6 +1056,7 @@ CONFIG_MAGIC_SYSRQ=y | |||
1120 | CONFIG_DEBUG_KERNEL=y | 1056 | CONFIG_DEBUG_KERNEL=y |
1121 | # CONFIG_DEBUG_SHIRQ is not set | 1057 | # CONFIG_DEBUG_SHIRQ is not set |
1122 | CONFIG_DETECT_SOFTLOCKUP=y | 1058 | CONFIG_DETECT_SOFTLOCKUP=y |
1059 | CONFIG_SCHED_DEBUG=y | ||
1123 | # CONFIG_SCHEDSTATS is not set | 1060 | # CONFIG_SCHEDSTATS is not set |
1124 | # CONFIG_TIMER_STATS is not set | 1061 | # CONFIG_TIMER_STATS is not set |
1125 | # CONFIG_DEBUG_SLAB is not set | 1062 | # CONFIG_DEBUG_SLAB is not set |
@@ -1150,10 +1087,6 @@ CONFIG_IRQSTACKS=y | |||
1150 | # | 1087 | # |
1151 | # CONFIG_KEYS is not set | 1088 | # CONFIG_KEYS is not set |
1152 | # CONFIG_SECURITY is not set | 1089 | # CONFIG_SECURITY is not set |
1153 | |||
1154 | # | ||
1155 | # Cryptographic options | ||
1156 | # | ||
1157 | CONFIG_CRYPTO=y | 1090 | CONFIG_CRYPTO=y |
1158 | CONFIG_CRYPTO_ALGAPI=y | 1091 | CONFIG_CRYPTO_ALGAPI=y |
1159 | CONFIG_CRYPTO_BLKCIPHER=y | 1092 | CONFIG_CRYPTO_BLKCIPHER=y |
@@ -1191,7 +1124,4 @@ CONFIG_CRYPTO_DES=y | |||
1191 | # CONFIG_CRYPTO_CRC32C is not set | 1124 | # CONFIG_CRYPTO_CRC32C is not set |
1192 | # CONFIG_CRYPTO_CAMELLIA is not set | 1125 | # CONFIG_CRYPTO_CAMELLIA is not set |
1193 | # CONFIG_CRYPTO_TEST is not set | 1126 | # CONFIG_CRYPTO_TEST is not set |
1194 | 1127 | CONFIG_CRYPTO_HW=y | |
1195 | # | ||
1196 | # Hardware crypto devices | ||
1197 | # | ||
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 1448af92c6a9..171800002ede 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1672,8 +1672,9 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1672 | * Are we booted from a PROM Of-type client-interface ? | 1672 | * Are we booted from a PROM Of-type client-interface ? |
1673 | */ | 1673 | */ |
1674 | cmpldi cr0,r5,0 | 1674 | cmpldi cr0,r5,0 |
1675 | bne .__boot_from_prom /* yes -> prom */ | 1675 | beq 1f |
1676 | 1676 | b .__boot_from_prom /* yes -> prom */ | |
1677 | 1: | ||
1677 | /* Save parameters */ | 1678 | /* Save parameters */ |
1678 | mr r31,r3 | 1679 | mr r31,r3 |
1679 | mr r30,r4 | 1680 | mr r30,r4 |
@@ -1701,7 +1702,7 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1701 | bl .__mmu_off | 1702 | bl .__mmu_off |
1702 | b .__after_prom_start | 1703 | b .__after_prom_start |
1703 | 1704 | ||
1704 | _STATIC(__boot_from_prom) | 1705 | _INIT_STATIC(__boot_from_prom) |
1705 | /* Save parameters */ | 1706 | /* Save parameters */ |
1706 | mr r31,r3 | 1707 | mr r31,r3 |
1707 | mr r30,r4 | 1708 | mr r30,r4 |
@@ -1768,9 +1769,10 @@ _STATIC(__after_prom_start) | |||
1768 | /* the source addr */ | 1769 | /* the source addr */ |
1769 | 1770 | ||
1770 | cmpdi r4,0 /* In some cases the loader may */ | 1771 | cmpdi r4,0 /* In some cases the loader may */ |
1771 | beq .start_here_multiplatform /* have already put us at zero */ | 1772 | bne 1f |
1773 | b .start_here_multiplatform /* have already put us at zero */ | ||
1772 | /* so we can skip the copy. */ | 1774 | /* so we can skip the copy. */ |
1773 | LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */ | 1775 | 1: LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */ |
1774 | sub r5,r5,r27 | 1776 | sub r5,r5,r27 |
1775 | 1777 | ||
1776 | li r6,0x100 /* Start offset, the first 0x100 */ | 1778 | li r6,0x100 /* Start offset, the first 0x100 */ |
@@ -1957,7 +1959,7 @@ _GLOBAL(enable_64b_mode) | |||
1957 | /* | 1959 | /* |
1958 | * This is where the main kernel code starts. | 1960 | * This is where the main kernel code starts. |
1959 | */ | 1961 | */ |
1960 | _STATIC(start_here_multiplatform) | 1962 | _INIT_STATIC(start_here_multiplatform) |
1961 | /* get a new offset, now that the kernel has moved. */ | 1963 | /* get a new offset, now that the kernel has moved. */ |
1962 | bl .reloc_offset | 1964 | bl .reloc_offset |
1963 | mr r26,r3 | 1965 | mr r26,r3 |
@@ -2019,7 +2021,7 @@ _STATIC(start_here_multiplatform) | |||
2019 | b . /* prevent speculative execution */ | 2021 | b . /* prevent speculative execution */ |
2020 | 2022 | ||
2021 | /* This is where all platforms converge execution */ | 2023 | /* This is where all platforms converge execution */ |
2022 | _STATIC(start_here_common) | 2024 | _INIT_STATIC(start_here_common) |
2023 | /* relocation is on at this point */ | 2025 | /* relocation is on at this point */ |
2024 | 2026 | ||
2025 | /* The following code sets up the SP and TOC now that we are */ | 2027 | /* The following code sets up the SP and TOC now that we are */ |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index a97e23ac1976..291ffbc360c9 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -313,6 +313,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
313 | 313 | ||
314 | dev->current_state = 4; /* unknown power state */ | 314 | dev->current_state = 4; /* unknown power state */ |
315 | dev->error_state = pci_channel_io_normal; | 315 | dev->error_state = pci_channel_io_normal; |
316 | dev->dma_mask = 0xffffffff; | ||
316 | 317 | ||
317 | if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { | 318 | if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { |
318 | /* a PCI-PCI bridge */ | 319 | /* a PCI-PCI bridge */ |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index b0697017d0e8..a73d2d700973 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -69,20 +69,9 @@ static inline void slb_shadow_update(unsigned long ea, | |||
69 | smp_wmb(); | 69 | smp_wmb(); |
70 | } | 70 | } |
71 | 71 | ||
72 | static inline void create_shadowed_slbe(unsigned long ea, unsigned long flags, | 72 | static inline void slb_shadow_clear(unsigned long entry) |
73 | unsigned long entry) | ||
74 | { | 73 | { |
75 | /* | 74 | get_slb_shadow()->save_area[entry].esid = 0; |
76 | * Updating the shadow buffer before writing the SLB ensures | ||
77 | * we don't get a stale entry here if we get preempted by PHYP | ||
78 | * between these two statements. | ||
79 | */ | ||
80 | slb_shadow_update(ea, flags, entry); | ||
81 | |||
82 | asm volatile("slbmte %0,%1" : | ||
83 | : "r" (mk_vsid_data(ea, flags)), | ||
84 | "r" (mk_esid_data(ea, entry)) | ||
85 | : "memory" ); | ||
86 | } | 75 | } |
87 | 76 | ||
88 | void slb_flush_and_rebolt(void) | 77 | void slb_flush_and_rebolt(void) |
@@ -100,11 +89,13 @@ void slb_flush_and_rebolt(void) | |||
100 | vflags = SLB_VSID_KERNEL | vmalloc_llp; | 89 | vflags = SLB_VSID_KERNEL | vmalloc_llp; |
101 | 90 | ||
102 | ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); | 91 | ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); |
103 | if ((ksp_esid_data & ESID_MASK) == PAGE_OFFSET) | 92 | if ((ksp_esid_data & ESID_MASK) == PAGE_OFFSET) { |
104 | ksp_esid_data &= ~SLB_ESID_V; | 93 | ksp_esid_data &= ~SLB_ESID_V; |
105 | 94 | slb_shadow_clear(2); | |
106 | /* Only third entry (stack) may change here so only resave that */ | 95 | } else { |
107 | slb_shadow_update(get_paca()->kstack, lflags, 2); | 96 | /* Update stack entry; others don't change */ |
97 | slb_shadow_update(get_paca()->kstack, lflags, 2); | ||
98 | } | ||
108 | 99 | ||
109 | /* We need to do this all in asm, so we're sure we don't touch | 100 | /* We need to do this all in asm, so we're sure we don't touch |
110 | * the stack between the slbia and rebolting it. */ | 101 | * the stack between the slbia and rebolting it. */ |
@@ -235,16 +226,12 @@ void slb_initialize(void) | |||
235 | vflags = SLB_VSID_KERNEL | vmalloc_llp; | 226 | vflags = SLB_VSID_KERNEL | vmalloc_llp; |
236 | 227 | ||
237 | /* Invalidate the entire SLB (even slot 0) & all the ERATS */ | 228 | /* Invalidate the entire SLB (even slot 0) & all the ERATS */ |
238 | asm volatile("isync":::"memory"); | 229 | slb_shadow_update(PAGE_OFFSET, lflags, 0); |
239 | asm volatile("slbmte %0,%0"::"r" (0) : "memory"); | 230 | asm volatile("isync; slbia; sync; slbmte %0,%1; isync" :: |
240 | asm volatile("isync; slbia; isync":::"memory"); | 231 | "r" (get_slb_shadow()->save_area[0].vsid), |
241 | create_shadowed_slbe(PAGE_OFFSET, lflags, 0); | 232 | "r" (get_slb_shadow()->save_area[0].esid) : "memory"); |
242 | 233 | ||
243 | create_shadowed_slbe(VMALLOC_START, vflags, 1); | 234 | slb_shadow_update(VMALLOC_START, vflags, 1); |
244 | 235 | ||
245 | /* We don't bolt the stack for the time being - we're in boot, | 236 | slb_flush_and_rebolt(); |
246 | * so the stack is in the bolted segment. By the time it goes | ||
247 | * elsewhere, we'll call _switch() which will bolt in the new | ||
248 | * one. */ | ||
249 | asm volatile("isync":::"memory"); | ||
250 | } | 237 | } |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index f833dba2a028..d5fd3909d13a 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -405,6 +405,8 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, | |||
405 | 405 | ||
406 | if (len > mm->task_size) | 406 | if (len > mm->task_size) |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | if (len & ((1ul << pshift) - 1)) | ||
409 | return -EINVAL; | ||
408 | if (fixed && (addr & ((1ul << pshift) - 1))) | 410 | if (fixed && (addr & ((1ul << pshift) - 1))) |
409 | return -EINVAL; | 411 | return -EINVAL; |
410 | if (fixed && addr > (mm->task_size - len)) | 412 | if (fixed && addr > (mm->task_size - len)) |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index b39cb52c6fb9..2c8e641a739b 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -106,7 +106,6 @@ static struct of_device_id mpc832x_ids[] = { | |||
106 | { .type = "soc", }, | 106 | { .type = "soc", }, |
107 | { .compatible = "soc", }, | 107 | { .compatible = "soc", }, |
108 | { .type = "qe", }, | 108 | { .type = "qe", }, |
109 | { .type = "mdio", }, | ||
110 | {}, | 109 | {}, |
111 | }; | 110 | }; |
112 | 111 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index b2b28a44738c..090906170a41 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -70,7 +70,6 @@ static struct of_device_id mpc832x_ids[] = { | |||
70 | { .type = "soc", }, | 70 | { .type = "soc", }, |
71 | { .compatible = "soc", }, | 71 | { .compatible = "soc", }, |
72 | { .type = "qe", }, | 72 | { .type = "qe", }, |
73 | { .type = "mdio", }, | ||
74 | {}, | 73 | {}, |
75 | }; | 74 | }; |
76 | 75 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 0e615fd65c1f..84b58934aafd 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -113,7 +113,6 @@ static struct of_device_id mpc836x_ids[] = { | |||
113 | { .type = "soc", }, | 113 | { .type = "soc", }, |
114 | { .compatible = "soc", }, | 114 | { .compatible = "soc", }, |
115 | { .type = "qe", }, | 115 | { .type = "qe", }, |
116 | { .type = "mdio", }, | ||
117 | {}, | 116 | {}, |
118 | }; | 117 | }; |
119 | 118 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index e8003bf00c9a..be25ecd911ba 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -142,7 +142,6 @@ static struct of_device_id mpc85xx_ids[] = { | |||
142 | { .type = "soc", }, | 142 | { .type = "soc", }, |
143 | { .compatible = "soc", }, | 143 | { .compatible = "soc", }, |
144 | { .type = "qe", }, | 144 | { .type = "qe", }, |
145 | { .type = "mdio", }, | ||
146 | {}, | 145 | {}, |
147 | }; | 146 | }; |
148 | 147 | ||
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 90124228b8f4..095a30304c56 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/spu_priv1.h> | 36 | #include <asm/spu_priv1.h> |
37 | #include <asm/xmon.h> | 37 | #include <asm/xmon.h> |
38 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
39 | #include "spu_priv1_mmio.h" | ||
40 | 39 | ||
41 | const struct spu_management_ops *spu_management_ops; | 40 | const struct spu_management_ops *spu_management_ops; |
42 | EXPORT_SYMBOL_GPL(spu_management_ops); | 41 | EXPORT_SYMBOL_GPL(spu_management_ops); |
@@ -636,138 +635,6 @@ static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf) | |||
636 | 635 | ||
637 | static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL); | 636 | static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL); |
638 | 637 | ||
639 | /* Hardcoded affinity idxs for QS20 */ | ||
640 | #define SPES_PER_BE 8 | ||
641 | static int QS20_reg_idxs[SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 }; | ||
642 | static int QS20_reg_memory[SPES_PER_BE] = { 1, 1, 0, 0, 0, 0, 0, 0 }; | ||
643 | |||
644 | static struct spu *spu_lookup_reg(int node, u32 reg) | ||
645 | { | ||
646 | struct spu *spu; | ||
647 | |||
648 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | ||
649 | if (*(u32 *)get_property(spu_devnode(spu), "reg", NULL) == reg) | ||
650 | return spu; | ||
651 | } | ||
652 | return NULL; | ||
653 | } | ||
654 | |||
655 | static void init_aff_QS20_harcoded(void) | ||
656 | { | ||
657 | int node, i; | ||
658 | struct spu *last_spu, *spu; | ||
659 | u32 reg; | ||
660 | |||
661 | for (node = 0; node < MAX_NUMNODES; node++) { | ||
662 | last_spu = NULL; | ||
663 | for (i = 0; i < SPES_PER_BE; i++) { | ||
664 | reg = QS20_reg_idxs[i]; | ||
665 | spu = spu_lookup_reg(node, reg); | ||
666 | if (!spu) | ||
667 | continue; | ||
668 | spu->has_mem_affinity = QS20_reg_memory[reg]; | ||
669 | if (last_spu) | ||
670 | list_add_tail(&spu->aff_list, | ||
671 | &last_spu->aff_list); | ||
672 | last_spu = spu; | ||
673 | } | ||
674 | } | ||
675 | } | ||
676 | |||
677 | static int of_has_vicinity(void) | ||
678 | { | ||
679 | struct spu* spu; | ||
680 | |||
681 | spu = list_entry(cbe_spu_info[0].spus.next, struct spu, cbe_list); | ||
682 | return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL; | ||
683 | } | ||
684 | |||
685 | static struct spu *aff_devnode_spu(int cbe, struct device_node *dn) | ||
686 | { | ||
687 | struct spu *spu; | ||
688 | |||
689 | list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list) | ||
690 | if (spu_devnode(spu) == dn) | ||
691 | return spu; | ||
692 | return NULL; | ||
693 | } | ||
694 | |||
695 | static struct spu * | ||
696 | aff_node_next_to(int cbe, struct device_node *target, struct device_node *avoid) | ||
697 | { | ||
698 | struct spu *spu; | ||
699 | const phandle *vic_handles; | ||
700 | int lenp, i; | ||
701 | |||
702 | list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list) { | ||
703 | if (spu_devnode(spu) == avoid) | ||
704 | continue; | ||
705 | vic_handles = get_property(spu_devnode(spu), "vicinity", &lenp); | ||
706 | for (i=0; i < (lenp / sizeof(phandle)); i++) { | ||
707 | if (vic_handles[i] == target->linux_phandle) | ||
708 | return spu; | ||
709 | } | ||
710 | } | ||
711 | return NULL; | ||
712 | } | ||
713 | |||
714 | static void init_aff_fw_vicinity_node(int cbe) | ||
715 | { | ||
716 | struct spu *spu, *last_spu; | ||
717 | struct device_node *vic_dn, *last_spu_dn; | ||
718 | phandle avoid_ph; | ||
719 | const phandle *vic_handles; | ||
720 | const char *name; | ||
721 | int lenp, i, added, mem_aff; | ||
722 | |||
723 | last_spu = list_entry(cbe_spu_info[cbe].spus.next, struct spu, cbe_list); | ||
724 | avoid_ph = 0; | ||
725 | for (added = 1; added < cbe_spu_info[cbe].n_spus; added++) { | ||
726 | last_spu_dn = spu_devnode(last_spu); | ||
727 | vic_handles = get_property(last_spu_dn, "vicinity", &lenp); | ||
728 | |||
729 | for (i = 0; i < (lenp / sizeof(phandle)); i++) { | ||
730 | if (vic_handles[i] == avoid_ph) | ||
731 | continue; | ||
732 | |||
733 | vic_dn = of_find_node_by_phandle(vic_handles[i]); | ||
734 | if (!vic_dn) | ||
735 | continue; | ||
736 | |||
737 | name = get_property(vic_dn, "name", NULL); | ||
738 | if (strcmp(name, "spe") == 0) { | ||
739 | spu = aff_devnode_spu(cbe, vic_dn); | ||
740 | avoid_ph = last_spu_dn->linux_phandle; | ||
741 | } | ||
742 | else { | ||
743 | mem_aff = strcmp(name, "mic-tm") == 0; | ||
744 | spu = aff_node_next_to(cbe, vic_dn, last_spu_dn); | ||
745 | if (!spu) | ||
746 | continue; | ||
747 | if (mem_aff) { | ||
748 | last_spu->has_mem_affinity = 1; | ||
749 | spu->has_mem_affinity = 1; | ||
750 | } | ||
751 | avoid_ph = vic_dn->linux_phandle; | ||
752 | } | ||
753 | list_add_tail(&spu->aff_list, &last_spu->aff_list); | ||
754 | last_spu = spu; | ||
755 | break; | ||
756 | } | ||
757 | } | ||
758 | } | ||
759 | |||
760 | static void init_aff_fw_vicinity(void) | ||
761 | { | ||
762 | int cbe; | ||
763 | |||
764 | /* sets has_mem_affinity for each spu, as long as the | ||
765 | * spu->aff_list list, linking each spu to its neighbors | ||
766 | */ | ||
767 | for (cbe = 0; cbe < MAX_NUMNODES; cbe++) | ||
768 | init_aff_fw_vicinity_node(cbe); | ||
769 | } | ||
770 | |||
771 | static int __init init_spu_base(void) | 638 | static int __init init_spu_base(void) |
772 | { | 639 | { |
773 | int i, ret = 0; | 640 | int i, ret = 0; |
@@ -811,13 +678,7 @@ static int __init init_spu_base(void) | |||
811 | mutex_unlock(&spu_full_list_mutex); | 678 | mutex_unlock(&spu_full_list_mutex); |
812 | spu_add_sysdev_attr(&attr_stat); | 679 | spu_add_sysdev_attr(&attr_stat); |
813 | 680 | ||
814 | if (of_has_vicinity()) { | 681 | spu_init_affinity(); |
815 | init_aff_fw_vicinity(); | ||
816 | } else { | ||
817 | long root = of_get_flat_dt_root(); | ||
818 | if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0")) | ||
819 | init_aff_QS20_harcoded(); | ||
820 | } | ||
821 | 682 | ||
822 | return 0; | 683 | return 0; |
823 | 684 | ||
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 75ed50fcc3db..5eb88346181a 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -361,8 +361,171 @@ static int of_destroy_spu(struct spu *spu) | |||
361 | return 0; | 361 | return 0; |
362 | } | 362 | } |
363 | 363 | ||
364 | /* Hardcoded affinity idxs for qs20 */ | ||
365 | #define QS20_SPES_PER_BE 8 | ||
366 | static int qs20_reg_idxs[QS20_SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 }; | ||
367 | static int qs20_reg_memory[QS20_SPES_PER_BE] = { 1, 1, 0, 0, 0, 0, 0, 0 }; | ||
368 | |||
369 | static struct spu *spu_lookup_reg(int node, u32 reg) | ||
370 | { | ||
371 | struct spu *spu; | ||
372 | u32 *spu_reg; | ||
373 | |||
374 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | ||
375 | spu_reg = (u32*)of_get_property(spu_devnode(spu), "reg", NULL); | ||
376 | if (*spu_reg == reg) | ||
377 | return spu; | ||
378 | } | ||
379 | return NULL; | ||
380 | } | ||
381 | |||
382 | static void init_affinity_qs20_harcoded(void) | ||
383 | { | ||
384 | int node, i; | ||
385 | struct spu *last_spu, *spu; | ||
386 | u32 reg; | ||
387 | |||
388 | for (node = 0; node < MAX_NUMNODES; node++) { | ||
389 | last_spu = NULL; | ||
390 | for (i = 0; i < QS20_SPES_PER_BE; i++) { | ||
391 | reg = qs20_reg_idxs[i]; | ||
392 | spu = spu_lookup_reg(node, reg); | ||
393 | if (!spu) | ||
394 | continue; | ||
395 | spu->has_mem_affinity = qs20_reg_memory[reg]; | ||
396 | if (last_spu) | ||
397 | list_add_tail(&spu->aff_list, | ||
398 | &last_spu->aff_list); | ||
399 | last_spu = spu; | ||
400 | } | ||
401 | } | ||
402 | } | ||
403 | |||
404 | static int of_has_vicinity(void) | ||
405 | { | ||
406 | struct spu* spu; | ||
407 | |||
408 | spu = list_first_entry(&cbe_spu_info[0].spus, struct spu, cbe_list); | ||
409 | return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL; | ||
410 | } | ||
411 | |||
412 | static struct spu *devnode_spu(int cbe, struct device_node *dn) | ||
413 | { | ||
414 | struct spu *spu; | ||
415 | |||
416 | list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list) | ||
417 | if (spu_devnode(spu) == dn) | ||
418 | return spu; | ||
419 | return NULL; | ||
420 | } | ||
421 | |||
422 | static struct spu * | ||
423 | neighbour_spu(int cbe, struct device_node *target, struct device_node *avoid) | ||
424 | { | ||
425 | struct spu *spu; | ||
426 | struct device_node *spu_dn; | ||
427 | const phandle *vic_handles; | ||
428 | int lenp, i; | ||
429 | |||
430 | list_for_each_entry(spu, &cbe_spu_info[cbe].spus, cbe_list) { | ||
431 | spu_dn = spu_devnode(spu); | ||
432 | if (spu_dn == avoid) | ||
433 | continue; | ||
434 | vic_handles = of_get_property(spu_dn, "vicinity", &lenp); | ||
435 | for (i=0; i < (lenp / sizeof(phandle)); i++) { | ||
436 | if (vic_handles[i] == target->linux_phandle) | ||
437 | return spu; | ||
438 | } | ||
439 | } | ||
440 | return NULL; | ||
441 | } | ||
442 | |||
443 | static void init_affinity_node(int cbe) | ||
444 | { | ||
445 | struct spu *spu, *last_spu; | ||
446 | struct device_node *vic_dn, *last_spu_dn; | ||
447 | phandle avoid_ph; | ||
448 | const phandle *vic_handles; | ||
449 | const char *name; | ||
450 | int lenp, i, added; | ||
451 | |||
452 | last_spu = list_first_entry(&cbe_spu_info[cbe].spus, struct spu, | ||
453 | cbe_list); | ||
454 | avoid_ph = 0; | ||
455 | for (added = 1; added < cbe_spu_info[cbe].n_spus; added++) { | ||
456 | last_spu_dn = spu_devnode(last_spu); | ||
457 | vic_handles = of_get_property(last_spu_dn, "vicinity", &lenp); | ||
458 | |||
459 | /* | ||
460 | * Walk through each phandle in vicinity property of the spu | ||
461 | * (tipically two vicinity phandles per spe node) | ||
462 | */ | ||
463 | for (i = 0; i < (lenp / sizeof(phandle)); i++) { | ||
464 | if (vic_handles[i] == avoid_ph) | ||
465 | continue; | ||
466 | |||
467 | vic_dn = of_find_node_by_phandle(vic_handles[i]); | ||
468 | if (!vic_dn) | ||
469 | continue; | ||
470 | |||
471 | /* a neighbour might be spe, mic-tm, or bif0 */ | ||
472 | name = of_get_property(vic_dn, "name", NULL); | ||
473 | if (!name) | ||
474 | continue; | ||
475 | |||
476 | if (strcmp(name, "spe") == 0) { | ||
477 | spu = devnode_spu(cbe, vic_dn); | ||
478 | avoid_ph = last_spu_dn->linux_phandle; | ||
479 | } else { | ||
480 | /* | ||
481 | * "mic-tm" and "bif0" nodes do not have | ||
482 | * vicinity property. So we need to find the | ||
483 | * spe which has vic_dn as neighbour, but | ||
484 | * skipping the one we came from (last_spu_dn) | ||
485 | */ | ||
486 | spu = neighbour_spu(cbe, vic_dn, last_spu_dn); | ||
487 | if (!spu) | ||
488 | continue; | ||
489 | if (!strcmp(name, "mic-tm")) { | ||
490 | last_spu->has_mem_affinity = 1; | ||
491 | spu->has_mem_affinity = 1; | ||
492 | } | ||
493 | avoid_ph = vic_dn->linux_phandle; | ||
494 | } | ||
495 | |||
496 | list_add_tail(&spu->aff_list, &last_spu->aff_list); | ||
497 | last_spu = spu; | ||
498 | break; | ||
499 | } | ||
500 | } | ||
501 | } | ||
502 | |||
503 | static void init_affinity_fw(void) | ||
504 | { | ||
505 | int cbe; | ||
506 | |||
507 | for (cbe = 0; cbe < MAX_NUMNODES; cbe++) | ||
508 | init_affinity_node(cbe); | ||
509 | } | ||
510 | |||
511 | static int __init init_affinity(void) | ||
512 | { | ||
513 | if (of_has_vicinity()) { | ||
514 | init_affinity_fw(); | ||
515 | } else { | ||
516 | long root = of_get_flat_dt_root(); | ||
517 | if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0")) | ||
518 | init_affinity_qs20_harcoded(); | ||
519 | else | ||
520 | printk("No affinity configuration found"); | ||
521 | } | ||
522 | |||
523 | return 0; | ||
524 | } | ||
525 | |||
364 | const struct spu_management_ops spu_management_of_ops = { | 526 | const struct spu_management_ops spu_management_of_ops = { |
365 | .enumerate_spus = of_enumerate_spus, | 527 | .enumerate_spus = of_enumerate_spus, |
366 | .create_spu = of_create_spu, | 528 | .create_spu = of_create_spu, |
367 | .destroy_spu = of_destroy_spu, | 529 | .destroy_spu = of_destroy_spu, |
530 | .init_affinity = init_affinity, | ||
368 | }; | 531 | }; |
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index d4fc74f7bb15..67144d1d1405 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | config PPC_PS3 | 1 | config PPC_PS3 |
2 | bool "Sony PS3 (incomplete)" | 2 | bool "Sony PS3" |
3 | depends on PPC_MULTIPLATFORM && PPC64 | 3 | depends on PPC_MULTIPLATFORM && PPC64 |
4 | select PPC_CELL | 4 | select PPC_CELL |
5 | select USB_ARCH_HAS_OHCI | 5 | select USB_ARCH_HAS_OHCI |
@@ -10,10 +10,10 @@ config PPC_PS3 | |||
10 | select MEMORY_HOTPLUG | 10 | select MEMORY_HOTPLUG |
11 | help | 11 | help |
12 | This option enables support for the Sony PS3 game console | 12 | This option enables support for the Sony PS3 game console |
13 | and other platforms using the PS3 hypervisor. | 13 | and other platforms using the PS3 hypervisor. Enabling this |
14 | Support for this platform is not yet complete, so | 14 | option will allow building otheros.bld, a kernel image suitable |
15 | enabling this will not result in a bootable kernel on a | 15 | for programming into flash memory, and vmlinux, a kernel image |
16 | PS3 system. | 16 | suitable for loading via kexec. |
17 | 17 | ||
18 | menu "PS3 Platform Options" | 18 | menu "PS3 Platform Options" |
19 | depends on PPC_PS3 | 19 | depends on PPC_PS3 |
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 825ebb2cbc2a..e23a5a874ad3 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -273,55 +273,58 @@ static int ps3stor_wait_for_completion(u64 dev_id, u64 tag, | |||
273 | 273 | ||
274 | static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | 274 | static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) |
275 | { | 275 | { |
276 | int error = -ENODEV; | ||
276 | int result; | 277 | int result; |
277 | const u64 notification_dev_id = (u64)-1LL; | 278 | const u64 notification_dev_id = (u64)-1LL; |
278 | const unsigned int timeout = HZ; | 279 | const unsigned int timeout = HZ; |
279 | u64 lpar; | 280 | u64 lpar; |
280 | u64 tag; | 281 | u64 tag; |
282 | void *buf; | ||
283 | enum ps3_notify_type { | ||
284 | notify_device_ready = 0, | ||
285 | notify_region_probe = 1, | ||
286 | notify_region_update = 2, | ||
287 | }; | ||
281 | struct { | 288 | struct { |
282 | u64 operation_code; /* must be zero */ | 289 | u64 operation_code; /* must be zero */ |
283 | u64 event_mask; /* 1 = device ready */ | 290 | u64 event_mask; /* OR of 1UL << enum ps3_notify_type */ |
284 | } *notify_cmd; | 291 | } *notify_cmd; |
285 | struct { | 292 | struct { |
286 | u64 event_type; /* notify_device_ready */ | 293 | u64 event_type; /* enum ps3_notify_type */ |
287 | u64 bus_id; | 294 | u64 bus_id; |
288 | u64 dev_id; | 295 | u64 dev_id; |
289 | u64 dev_type; | 296 | u64 dev_type; |
290 | u64 dev_port; | 297 | u64 dev_port; |
291 | } *notify_event; | 298 | } *notify_event; |
292 | enum { | ||
293 | notify_device_ready = 1 | ||
294 | }; | ||
295 | 299 | ||
296 | pr_debug(" -> %s:%u: bus_id %u, dev_id %u, dev_type %u\n", __func__, | 300 | pr_debug(" -> %s:%u: bus_id %u, dev_id %u, dev_type %u\n", __func__, |
297 | __LINE__, repo->bus_id, repo->dev_id, repo->dev_type); | 301 | __LINE__, repo->bus_id, repo->dev_id, repo->dev_type); |
298 | 302 | ||
299 | notify_cmd = kzalloc(512, GFP_KERNEL); | 303 | buf = kzalloc(512, GFP_KERNEL); |
300 | notify_event = (void *)notify_cmd; | 304 | if (!buf) |
301 | if (!notify_cmd) | ||
302 | return -ENOMEM; | 305 | return -ENOMEM; |
303 | 306 | ||
304 | lpar = ps3_mm_phys_to_lpar(__pa(notify_cmd)); | 307 | lpar = ps3_mm_phys_to_lpar(__pa(buf)); |
308 | notify_cmd = buf; | ||
309 | notify_event = buf; | ||
305 | 310 | ||
306 | result = lv1_open_device(repo->bus_id, notification_dev_id, 0); | 311 | result = lv1_open_device(repo->bus_id, notification_dev_id, 0); |
307 | if (result) { | 312 | if (result) { |
308 | printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__, | 313 | printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__, |
309 | __LINE__, ps3_result(result)); | 314 | __LINE__, ps3_result(result)); |
310 | result = -ENODEV; | ||
311 | goto fail_free; | 315 | goto fail_free; |
312 | } | 316 | } |
313 | 317 | ||
314 | /* Setup and write the request for device notification. */ | 318 | /* Setup and write the request for device notification. */ |
315 | 319 | ||
316 | notify_cmd->operation_code = 0; /* must be zero */ | 320 | notify_cmd->operation_code = 0; /* must be zero */ |
317 | notify_cmd->event_mask = 0x01; /* device ready */ | 321 | notify_cmd->event_mask = 1UL << notify_region_probe; |
318 | 322 | ||
319 | result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar, | 323 | result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar, |
320 | &tag); | 324 | &tag); |
321 | if (result) { | 325 | if (result) { |
322 | printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__, | 326 | printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__, |
323 | ps3_result(result)); | 327 | ps3_result(result)); |
324 | result = -ENODEV; | ||
325 | goto fail_close; | 328 | goto fail_close; |
326 | } | 329 | } |
327 | 330 | ||
@@ -332,13 +335,11 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
332 | if (result) { | 335 | if (result) { |
333 | printk(KERN_ERR "%s:%u: write not completed %s\n", __func__, | 336 | printk(KERN_ERR "%s:%u: write not completed %s\n", __func__, |
334 | __LINE__, ps3_result(result)); | 337 | __LINE__, ps3_result(result)); |
335 | result = -ENODEV; | ||
336 | goto fail_close; | 338 | goto fail_close; |
337 | } | 339 | } |
338 | 340 | ||
339 | /* Loop here processing the requested notification events. */ | 341 | /* Loop here processing the requested notification events. */ |
340 | 342 | ||
341 | result = -ENODEV; | ||
342 | while (1) { | 343 | while (1) { |
343 | memset(notify_event, 0, sizeof(*notify_event)); | 344 | memset(notify_event, 0, sizeof(*notify_event)); |
344 | 345 | ||
@@ -358,7 +359,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
358 | break; | 359 | break; |
359 | } | 360 | } |
360 | 361 | ||
361 | if (notify_event->event_type != notify_device_ready || | 362 | if (notify_event->event_type != notify_region_probe || |
362 | notify_event->bus_id != repo->bus_id) { | 363 | notify_event->bus_id != repo->bus_id) { |
363 | pr_debug("%s:%u: bad notify_event: event %lu, " | 364 | pr_debug("%s:%u: bad notify_event: event %lu, " |
364 | "dev_id %lu, dev_type %lu\n", | 365 | "dev_id %lu, dev_type %lu\n", |
@@ -386,9 +387,9 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
386 | fail_close: | 387 | fail_close: |
387 | lv1_close_device(repo->bus_id, notification_dev_id); | 388 | lv1_close_device(repo->bus_id, notification_dev_id); |
388 | fail_free: | 389 | fail_free: |
389 | kfree(notify_cmd); | 390 | kfree(buf); |
390 | pr_debug(" <- %s:%u\n", __func__, __LINE__); | 391 | pr_debug(" <- %s:%u\n", __func__, __LINE__); |
391 | return result; | 392 | return error; |
392 | } | 393 | } |
393 | 394 | ||
394 | static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, | 395 | static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, |
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index 502d80ed982b..ac2a4b8a4c14 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c | |||
@@ -414,10 +414,16 @@ static int __init ps3_enumerate_spus(int (*fn)(void *data)) | |||
414 | return num_resource_id; | 414 | return num_resource_id; |
415 | } | 415 | } |
416 | 416 | ||
417 | static int ps3_init_affinity(void) | ||
418 | { | ||
419 | return 0; | ||
420 | } | ||
421 | |||
417 | const struct spu_management_ops spu_management_ps3_ops = { | 422 | const struct spu_management_ops spu_management_ps3_ops = { |
418 | .enumerate_spus = ps3_enumerate_spus, | 423 | .enumerate_spus = ps3_enumerate_spus, |
419 | .create_spu = ps3_create_spu, | 424 | .create_spu = ps3_create_spu, |
420 | .destroy_spu = ps3_destroy_spu, | 425 | .destroy_spu = ps3_destroy_spu, |
426 | .init_affinity = ps3_init_affinity, | ||
421 | }; | 427 | }; |
422 | 428 | ||
423 | /* spu_priv1_ops */ | 429 | /* spu_priv1_ops */ |
diff --git a/arch/x86_64/boot/compressed/head.S b/arch/x86_64/boot/compressed/head.S index 1312bfaff306..9fd8030cc54f 100644 --- a/arch/x86_64/boot/compressed/head.S +++ b/arch/x86_64/boot/compressed/head.S | |||
@@ -195,6 +195,11 @@ ENTRY(startup_64) | |||
195 | movl %eax, %ds | 195 | movl %eax, %ds |
196 | movl %eax, %es | 196 | movl %eax, %es |
197 | movl %eax, %ss | 197 | movl %eax, %ss |
198 | movl %eax, %fs | ||
199 | movl %eax, %gs | ||
200 | lldt %ax | ||
201 | movl $0x20, %eax | ||
202 | ltr %ax | ||
198 | 203 | ||
199 | /* Compute the decompressed kernel start address. It is where | 204 | /* Compute the decompressed kernel start address. It is where |
200 | * we were loaded at aligned to a 2M boundary. %rbp contains the | 205 | * we were loaded at aligned to a 2M boundary. %rbp contains the |
@@ -295,6 +300,8 @@ gdt: | |||
295 | .quad 0x0000000000000000 /* NULL descriptor */ | 300 | .quad 0x0000000000000000 /* NULL descriptor */ |
296 | .quad 0x00af9a000000ffff /* __KERNEL_CS */ | 301 | .quad 0x00af9a000000ffff /* __KERNEL_CS */ |
297 | .quad 0x00cf92000000ffff /* __KERNEL_DS */ | 302 | .quad 0x00cf92000000ffff /* __KERNEL_DS */ |
303 | .quad 0x0080890000000000 /* TS descriptor */ | ||
304 | .quad 0x0000000000000000 /* TS continued */ | ||
298 | gdt_end: | 305 | gdt_end: |
299 | .bss | 306 | .bss |
300 | /* Stack for uncompression */ | 307 | /* Stack for uncompression */ |
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 900ff38d68de..925758dbca0c 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -791,10 +791,8 @@ static void setup_APIC_timer(unsigned int clocks) | |||
791 | 791 | ||
792 | /* wait for irq slice */ | 792 | /* wait for irq slice */ |
793 | if (hpet_address && hpet_use_timer) { | 793 | if (hpet_address && hpet_use_timer) { |
794 | int trigger = hpet_readl(HPET_T0_CMP); | 794 | u32 trigger = hpet_readl(HPET_T0_CMP); |
795 | while (hpet_readl(HPET_COUNTER) >= trigger) | 795 | while (hpet_readl(HPET_T0_CMP) == trigger) |
796 | /* do nothing */ ; | ||
797 | while (hpet_readl(HPET_COUNTER) < trigger) | ||
798 | /* do nothing */ ; | 796 | /* do nothing */ ; |
799 | } else { | 797 | } else { |
800 | int c1, c2; | 798 | int c1, c2; |
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c index ba16c968ca3f..71da01e73f03 100644 --- a/arch/x86_64/kernel/pci-calgary.c +++ b/arch/x86_64/kernel/pci-calgary.c | |||
@@ -367,16 +367,15 @@ static inline struct iommu_table *find_iommu_table(struct device *dev) | |||
367 | 367 | ||
368 | pdev = to_pci_dev(dev); | 368 | pdev = to_pci_dev(dev); |
369 | 369 | ||
370 | /* is the device behind a bridge? */ | 370 | pbus = pdev->bus; |
371 | if (unlikely(pdev->bus->parent)) | 371 | |
372 | pbus = pdev->bus->parent; | 372 | /* is the device behind a bridge? Look for the root bus */ |
373 | else | 373 | while (pbus->parent) |
374 | pbus = pdev->bus; | 374 | pbus = pbus->parent; |
375 | 375 | ||
376 | tbl = pci_iommu(pbus); | 376 | tbl = pci_iommu(pbus); |
377 | 377 | ||
378 | BUG_ON(pdev->bus->parent && | 378 | BUG_ON(tbl && (tbl->it_busno != pbus->number)); |
379 | (tbl->it_busno != pdev->bus->parent->number)); | ||
380 | 379 | ||
381 | return tbl; | 380 | return tbl; |
382 | } | 381 | } |
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 7e161c698af4..10b9809ce821 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c | |||
@@ -75,7 +75,8 @@ static void flush_kernel_map(void *arg) | |||
75 | 75 | ||
76 | /* When clflush is available always use it because it is | 76 | /* When clflush is available always use it because it is |
77 | much cheaper than WBINVD. */ | 77 | much cheaper than WBINVD. */ |
78 | if (!cpu_has_clflush) | 78 | /* clflush is still broken. Disable for now. */ |
79 | if (1 || !cpu_has_clflush) | ||
79 | asm volatile("wbinvd" ::: "memory"); | 80 | asm volatile("wbinvd" ::: "memory"); |
80 | else list_for_each_entry(pg, l, lru) { | 81 | else list_for_each_entry(pg, l, lru) { |
81 | void *adr = page_address(pg); | 82 | void *adr = page_address(pg); |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 65d82736987e..4095e4d66a1d 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -66,13 +66,13 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, | |||
66 | 66 | ||
67 | switch (len) { | 67 | switch (len) { |
68 | case 1: | 68 | case 1: |
69 | *value = readb(addr + reg); | 69 | *value = mmio_config_readb(addr + reg); |
70 | break; | 70 | break; |
71 | case 2: | 71 | case 2: |
72 | *value = readw(addr + reg); | 72 | *value = mmio_config_readw(addr + reg); |
73 | break; | 73 | break; |
74 | case 4: | 74 | case 4: |
75 | *value = readl(addr + reg); | 75 | *value = mmio_config_readl(addr + reg); |
76 | break; | 76 | break; |
77 | } | 77 | } |
78 | 78 | ||
@@ -94,13 +94,13 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, | |||
94 | 94 | ||
95 | switch (len) { | 95 | switch (len) { |
96 | case 1: | 96 | case 1: |
97 | writeb(value, addr + reg); | 97 | mmio_config_writeb(addr + reg, value); |
98 | break; | 98 | break; |
99 | case 2: | 99 | case 2: |
100 | writew(value, addr + reg); | 100 | mmio_config_writew(addr + reg, value); |
101 | break; | 101 | break; |
102 | case 4: | 102 | case 4: |
103 | writel(value, addr + reg); | 103 | mmio_config_writel(addr + reg, value); |
104 | break; | 104 | break; |
105 | } | 105 | } |
106 | 106 | ||
diff --git a/arch/x86_64/vdso/.gitignore b/arch/x86_64/vdso/.gitignore new file mode 100644 index 000000000000..f8b69d84238e --- /dev/null +++ b/arch/x86_64/vdso/.gitignore | |||
@@ -0,0 +1 @@ | |||
vdso.lds | |||