diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/Makefile | 3 | ||||
-rw-r--r-- | arch/ppc/kernel/cpu_setup_6xx.S | 3 | ||||
-rw-r--r-- | arch/ppc/kernel/cpu_setup_power4.S | 3 | ||||
-rw-r--r-- | arch/ppc/kernel/dma-mapping.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/fpu.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/head.S | 30 | ||||
-rw-r--r-- | arch/ppc/kernel/head_44x.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/head_4xx.S | 3 | ||||
-rw-r--r-- | arch/ppc/kernel/head_8xx.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/head_fsl_booke.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/idle.c | 6 | ||||
-rw-r--r-- | arch/ppc/kernel/idle_6xx.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/idle_power4.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/misc.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/pci.c | 1 | ||||
-rw-r--r-- | arch/ppc/kernel/smp.c | 44 | ||||
-rw-r--r-- | arch/ppc/kernel/swsusp.S | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/syscalls.c | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 24 |
20 files changed, 89 insertions, 52 deletions
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index b1457a8a9c0f..1fb92f16acd6 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile | |||
@@ -15,8 +15,9 @@ extra-y += vmlinux.lds | |||
15 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ | 15 | obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ |
16 | process.o signal.o ptrace.o align.o \ | 16 | process.o signal.o ptrace.o align.o \ |
17 | semaphore.o syscalls.o setup.o \ | 17 | semaphore.o syscalls.o setup.o \ |
18 | cputable.o ppc_htab.o perfmon.o | 18 | cputable.o ppc_htab.o |
19 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o | 19 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o |
20 | obj-$(CONFIG_E500) += perfmon.o | ||
20 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o | 21 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o |
21 | obj-$(CONFIG_POWER4) += cpu_setup_power4.o | 22 | obj-$(CONFIG_POWER4) += cpu_setup_power4.o |
22 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o | 23 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o |
diff --git a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S index bd037caa4055..ba396438ede3 100644 --- a/arch/ppc/kernel/cpu_setup_6xx.S +++ b/arch/ppc/kernel/cpu_setup_6xx.S | |||
@@ -12,10 +12,9 @@ | |||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/ppc_asm.h> | ||
16 | #include <asm/cputable.h> | 15 | #include <asm/cputable.h> |
17 | #include <asm/ppc_asm.h> | 16 | #include <asm/ppc_asm.h> |
18 | #include <asm/offsets.h> | 17 | #include <asm/asm-offsets.h> |
19 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
20 | 19 | ||
21 | _GLOBAL(__setup_cpu_601) | 20 | _GLOBAL(__setup_cpu_601) |
diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S index f2ea1a990f17..7e4fbb653724 100644 --- a/arch/ppc/kernel/cpu_setup_power4.S +++ b/arch/ppc/kernel/cpu_setup_power4.S | |||
@@ -14,8 +14,7 @@ | |||
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include <asm/ppc_asm.h> | 15 | #include <asm/ppc_asm.h> |
16 | #include <asm/cputable.h> | 16 | #include <asm/cputable.h> |
17 | #include <asm/ppc_asm.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/offsets.h> | ||
19 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
20 | 19 | ||
21 | _GLOBAL(__970_cpu_preinit) | 20 | _GLOBAL(__970_cpu_preinit) |
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index e0c631cf96b0..b566d982806c 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c | |||
@@ -393,7 +393,7 @@ EXPORT_SYMBOL(__dma_sync); | |||
393 | * __dma_sync_page() implementation for systems using highmem. | 393 | * __dma_sync_page() implementation for systems using highmem. |
394 | * In this case, each page of a buffer must be kmapped/kunmapped | 394 | * In this case, each page of a buffer must be kmapped/kunmapped |
395 | * in order to have a virtual address for __dma_sync(). This must | 395 | * in order to have a virtual address for __dma_sync(). This must |
396 | * not sleep so kmap_atmomic()/kunmap_atomic() are used. | 396 | * not sleep so kmap_atomic()/kunmap_atomic() are used. |
397 | * | 397 | * |
398 | * Note: yes, it is possible and correct to have a buffer extend | 398 | * Note: yes, it is possible and correct to have a buffer extend |
399 | * beyond the first page. | 399 | * beyond the first page. |
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index cb83045e2edf..03d4886869f3 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/cputable.h> | 29 | #include <asm/cputable.h> |
30 | #include <asm/thread_info.h> | 30 | #include <asm/thread_info.h> |
31 | #include <asm/ppc_asm.h> | 31 | #include <asm/ppc_asm.h> |
32 | #include <asm/offsets.h> | 32 | #include <asm/asm-offsets.h> |
33 | #include <asm/unistd.h> | 33 | #include <asm/unistd.h> |
34 | 34 | ||
35 | #undef SHOW_SYSCALLS | 35 | #undef SHOW_SYSCALLS |
diff --git a/arch/ppc/kernel/fpu.S b/arch/ppc/kernel/fpu.S index 6189b26f640f..665d7d34304c 100644 --- a/arch/ppc/kernel/fpu.S +++ b/arch/ppc/kernel/fpu.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/ppc_asm.h> | 20 | #include <asm/ppc_asm.h> |
21 | #include <asm/offsets.h> | 21 | #include <asm/asm-offsets.h> |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * This task wants to use the FPU now. | 24 | * This task wants to use the FPU now. |
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index a931d773715f..1960fb8c259c 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/cache.h> | 31 | #include <asm/cache.h> |
32 | #include <asm/thread_info.h> | 32 | #include <asm/thread_info.h> |
33 | #include <asm/ppc_asm.h> | 33 | #include <asm/ppc_asm.h> |
34 | #include <asm/offsets.h> | 34 | #include <asm/asm-offsets.h> |
35 | 35 | ||
36 | #ifdef CONFIG_APUS | 36 | #ifdef CONFIG_APUS |
37 | #include <asm/amigappc.h> | 37 | #include <asm/amigappc.h> |
@@ -1023,23 +1023,21 @@ __secondary_start_gemini: | |||
1023 | andc r4,r4,r3 | 1023 | andc r4,r4,r3 |
1024 | mtspr SPRN_HID0,r4 | 1024 | mtspr SPRN_HID0,r4 |
1025 | sync | 1025 | sync |
1026 | bl gemini_prom_init | ||
1027 | b __secondary_start | 1026 | b __secondary_start |
1028 | #endif /* CONFIG_GEMINI */ | 1027 | #endif /* CONFIG_GEMINI */ |
1029 | .globl __secondary_start_psurge | 1028 | |
1030 | __secondary_start_psurge: | 1029 | .globl __secondary_start_pmac_0 |
1031 | li r24,1 /* cpu # */ | 1030 | __secondary_start_pmac_0: |
1032 | b __secondary_start_psurge99 | 1031 | /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */ |
1033 | .globl __secondary_start_psurge2 | 1032 | li r24,0 |
1034 | __secondary_start_psurge2: | 1033 | b 1f |
1035 | li r24,2 /* cpu # */ | 1034 | li r24,1 |
1036 | b __secondary_start_psurge99 | 1035 | b 1f |
1037 | .globl __secondary_start_psurge3 | 1036 | li r24,2 |
1038 | __secondary_start_psurge3: | 1037 | b 1f |
1039 | li r24,3 /* cpu # */ | 1038 | li r24,3 |
1040 | b __secondary_start_psurge99 | 1039 | 1: |
1041 | __secondary_start_psurge99: | 1040 | /* on powersurge, we come in here with IR=0 and DR=1, and DBAT 0 |
1042 | /* we come in here with IR=0 and DR=1, and DBAT 0 | ||
1043 | set to map the 0xf0000000 - 0xffffffff region */ | 1041 | set to map the 0xf0000000 - 0xffffffff region */ |
1044 | mfmsr r0 | 1042 | mfmsr r0 |
1045 | rlwinm r0,r0,0,28,26 /* clear DR (0x10) */ | 1043 | rlwinm r0,r0,0,28,26 /* clear DR (0x10) */ |
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 9e68e32edb60..599245b0407e 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/cputable.h> | 40 | #include <asm/cputable.h> |
41 | #include <asm/thread_info.h> | 41 | #include <asm/thread_info.h> |
42 | #include <asm/ppc_asm.h> | 42 | #include <asm/ppc_asm.h> |
43 | #include <asm/offsets.h> | 43 | #include <asm/asm-offsets.h> |
44 | #include "head_booke.h" | 44 | #include "head_booke.h" |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 0a5e723d3be6..8562b807b37c 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/cputable.h> | 40 | #include <asm/cputable.h> |
41 | #include <asm/thread_info.h> | 41 | #include <asm/thread_info.h> |
42 | #include <asm/ppc_asm.h> | 42 | #include <asm/ppc_asm.h> |
43 | #include <asm/offsets.h> | 43 | #include <asm/asm-offsets.h> |
44 | 44 | ||
45 | /* As with the other PowerPC ports, it is expected that when code | 45 | /* As with the other PowerPC ports, it is expected that when code |
46 | * execution begins here, the following registers contain valid, yet | 46 | * execution begins here, the following registers contain valid, yet |
@@ -453,6 +453,7 @@ label: | |||
453 | #else | 453 | #else |
454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) | 454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) |
455 | #endif | 455 | #endif |
456 | #endif | ||
456 | 457 | ||
457 | /* 0x1100 - Data TLB Miss Exception | 458 | /* 0x1100 - Data TLB Miss Exception |
458 | * As the name implies, translation is not in the MMU, so search the | 459 | * As the name implies, translation is not in the MMU, so search the |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index eb18cadb3755..cb1a3a54a026 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | #include <asm/ppc_asm.h> | 32 | #include <asm/ppc_asm.h> |
33 | #include <asm/offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | 34 | ||
35 | /* Macro to make the code more readable. */ | 35 | /* Macro to make the code more readable. */ |
36 | #ifdef CONFIG_8xx_CPU6 | 36 | #ifdef CONFIG_8xx_CPU6 |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 4028f4c7d978..8e52e8408316 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <asm/cputable.h> | 41 | #include <asm/cputable.h> |
42 | #include <asm/thread_info.h> | 42 | #include <asm/thread_info.h> |
43 | #include <asm/ppc_asm.h> | 43 | #include <asm/ppc_asm.h> |
44 | #include <asm/offsets.h> | 44 | #include <asm/asm-offsets.h> |
45 | #include "head_booke.h" | 45 | #include "head_booke.h" |
46 | 46 | ||
47 | /* As with the other PowerPC ports, it is expected that when code | 47 | /* As with the other PowerPC ports, it is expected that when code |
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c index 53547b6de45b..fba29c876b62 100644 --- a/arch/ppc/kernel/idle.c +++ b/arch/ppc/kernel/idle.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/sysctl.h> | 24 | #include <linux/sysctl.h> |
25 | #include <linux/cpu.h> | ||
25 | 26 | ||
26 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
@@ -35,6 +36,7 @@ | |||
35 | void default_idle(void) | 36 | void default_idle(void) |
36 | { | 37 | { |
37 | void (*powersave)(void); | 38 | void (*powersave)(void); |
39 | int cpu = smp_processor_id(); | ||
38 | 40 | ||
39 | powersave = ppc_md.power_save; | 41 | powersave = ppc_md.power_save; |
40 | 42 | ||
@@ -44,7 +46,7 @@ void default_idle(void) | |||
44 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
45 | else { | 47 | else { |
46 | set_thread_flag(TIF_POLLING_NRFLAG); | 48 | set_thread_flag(TIF_POLLING_NRFLAG); |
47 | while (!need_resched()) | 49 | while (!need_resched() && !cpu_is_offline(cpu)) |
48 | barrier(); | 50 | barrier(); |
49 | clear_thread_flag(TIF_POLLING_NRFLAG); | 51 | clear_thread_flag(TIF_POLLING_NRFLAG); |
50 | } | 52 | } |
@@ -52,6 +54,8 @@ void default_idle(void) | |||
52 | } | 54 | } |
53 | if (need_resched()) | 55 | if (need_resched()) |
54 | schedule(); | 56 | schedule(); |
57 | if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) | ||
58 | cpu_die(); | ||
55 | } | 59 | } |
56 | 60 | ||
57 | /* | 61 | /* |
diff --git a/arch/ppc/kernel/idle_6xx.S b/arch/ppc/kernel/idle_6xx.S index 25d009c75f7b..1a2194cf6828 100644 --- a/arch/ppc/kernel/idle_6xx.S +++ b/arch/ppc/kernel/idle_6xx.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
22 | #include <asm/ppc_asm.h> | 22 | #include <asm/ppc_asm.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
26 | 26 | ||
diff --git a/arch/ppc/kernel/idle_power4.S b/arch/ppc/kernel/idle_power4.S index 73a58ff03900..cc0d535365cd 100644 --- a/arch/ppc/kernel/idle_power4.S +++ b/arch/ppc/kernel/idle_power4.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
21 | #include <asm/thread_info.h> | 21 | #include <asm/thread_info.h> |
22 | #include <asm/ppc_asm.h> | 22 | #include <asm/ppc_asm.h> |
23 | #include <asm/offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
26 | 26 | ||
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index ce71b4a01585..90d917d2e856 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/mmu.h> | 23 | #include <asm/mmu.h> |
24 | #include <asm/ppc_asm.h> | 24 | #include <asm/ppc_asm.h> |
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | #include <asm/offsets.h> | 26 | #include <asm/asm-offsets.h> |
27 | 27 | ||
28 | .text | 28 | .text |
29 | 29 | ||
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 7b3586a3bf30..854e45beb387 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -80,7 +80,6 @@ fixup_broken_pcnet32(struct pci_dev* dev) | |||
80 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { | 80 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { |
81 | dev->vendor = PCI_VENDOR_ID_AMD; | 81 | dev->vendor = PCI_VENDOR_ID_AMD; |
82 | pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD); | 82 | pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD); |
83 | pci_name_device(dev); | ||
84 | } | 83 | } |
85 | } | 84 | } |
86 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32); | 85 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32); |
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index e70b587b9e51..726fe7ce1747 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c | |||
@@ -45,6 +45,7 @@ cpumask_t cpu_online_map; | |||
45 | cpumask_t cpu_possible_map; | 45 | cpumask_t cpu_possible_map; |
46 | int smp_hw_index[NR_CPUS]; | 46 | int smp_hw_index[NR_CPUS]; |
47 | struct thread_info *secondary_ti; | 47 | struct thread_info *secondary_ti; |
48 | static struct task_struct *idle_tasks[NR_CPUS]; | ||
48 | 49 | ||
49 | EXPORT_SYMBOL(cpu_online_map); | 50 | EXPORT_SYMBOL(cpu_online_map); |
50 | EXPORT_SYMBOL(cpu_possible_map); | 51 | EXPORT_SYMBOL(cpu_possible_map); |
@@ -286,7 +287,8 @@ static void __devinit smp_store_cpu_info(int id) | |||
286 | 287 | ||
287 | void __init smp_prepare_cpus(unsigned int max_cpus) | 288 | void __init smp_prepare_cpus(unsigned int max_cpus) |
288 | { | 289 | { |
289 | int num_cpus, i; | 290 | int num_cpus, i, cpu; |
291 | struct task_struct *p; | ||
290 | 292 | ||
291 | /* Fixup boot cpu */ | 293 | /* Fixup boot cpu */ |
292 | smp_store_cpu_info(smp_processor_id()); | 294 | smp_store_cpu_info(smp_processor_id()); |
@@ -308,6 +310,17 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
308 | 310 | ||
309 | if (smp_ops->space_timers) | 311 | if (smp_ops->space_timers) |
310 | smp_ops->space_timers(num_cpus); | 312 | smp_ops->space_timers(num_cpus); |
313 | |||
314 | for_each_cpu(cpu) { | ||
315 | if (cpu == smp_processor_id()) | ||
316 | continue; | ||
317 | /* create a process for the processor */ | ||
318 | p = fork_idle(cpu); | ||
319 | if (IS_ERR(p)) | ||
320 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
321 | p->thread_info->cpu = cpu; | ||
322 | idle_tasks[cpu] = p; | ||
323 | } | ||
311 | } | 324 | } |
312 | 325 | ||
313 | void __devinit smp_prepare_boot_cpu(void) | 326 | void __devinit smp_prepare_boot_cpu(void) |
@@ -334,12 +347,17 @@ int __devinit start_secondary(void *unused) | |||
334 | set_dec(tb_ticks_per_jiffy); | 347 | set_dec(tb_ticks_per_jiffy); |
335 | cpu_callin_map[cpu] = 1; | 348 | cpu_callin_map[cpu] = 1; |
336 | 349 | ||
337 | printk("CPU %i done callin...\n", cpu); | 350 | printk("CPU %d done callin...\n", cpu); |
338 | smp_ops->setup_cpu(cpu); | 351 | smp_ops->setup_cpu(cpu); |
339 | printk("CPU %i done setup...\n", cpu); | 352 | printk("CPU %d done setup...\n", cpu); |
340 | local_irq_enable(); | ||
341 | smp_ops->take_timebase(); | 353 | smp_ops->take_timebase(); |
342 | printk("CPU %i done timebase take...\n", cpu); | 354 | printk("CPU %d done timebase take...\n", cpu); |
355 | |||
356 | spin_lock(&call_lock); | ||
357 | cpu_set(cpu, cpu_online_map); | ||
358 | spin_unlock(&call_lock); | ||
359 | |||
360 | local_irq_enable(); | ||
343 | 361 | ||
344 | cpu_idle(); | 362 | cpu_idle(); |
345 | return 0; | 363 | return 0; |
@@ -347,17 +365,11 @@ int __devinit start_secondary(void *unused) | |||
347 | 365 | ||
348 | int __cpu_up(unsigned int cpu) | 366 | int __cpu_up(unsigned int cpu) |
349 | { | 367 | { |
350 | struct task_struct *p; | ||
351 | char buf[32]; | 368 | char buf[32]; |
352 | int c; | 369 | int c; |
353 | 370 | ||
354 | /* create a process for the processor */ | 371 | secondary_ti = idle_tasks[cpu]->thread_info; |
355 | /* only regs.msr is actually used, and 0 is OK for it */ | 372 | mb(); |
356 | p = fork_idle(cpu); | ||
357 | if (IS_ERR(p)) | ||
358 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
359 | secondary_ti = p->thread_info; | ||
360 | p->thread_info->cpu = cpu; | ||
361 | 373 | ||
362 | /* | 374 | /* |
363 | * There was a cache flush loop here to flush the cache | 375 | * There was a cache flush loop here to flush the cache |
@@ -389,7 +401,11 @@ int __cpu_up(unsigned int cpu) | |||
389 | printk("Processor %d found.\n", cpu); | 401 | printk("Processor %d found.\n", cpu); |
390 | 402 | ||
391 | smp_ops->give_timebase(); | 403 | smp_ops->give_timebase(); |
392 | cpu_set(cpu, cpu_online_map); | 404 | |
405 | /* Wait until cpu puts itself in the online map */ | ||
406 | while (!cpu_online(cpu)) | ||
407 | cpu_relax(); | ||
408 | |||
393 | return 0; | 409 | return 0; |
394 | } | 410 | } |
395 | 411 | ||
diff --git a/arch/ppc/kernel/swsusp.S b/arch/ppc/kernel/swsusp.S index 55148bb88d39..69773cc1a85f 100644 --- a/arch/ppc/kernel/swsusp.S +++ b/arch/ppc/kernel/swsusp.S | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <asm/cputable.h> | 5 | #include <asm/cputable.h> |
6 | #include <asm/thread_info.h> | 6 | #include <asm/thread_info.h> |
7 | #include <asm/ppc_asm.h> | 7 | #include <asm/ppc_asm.h> |
8 | #include <asm/offsets.h> | 8 | #include <asm/asm-offsets.h> |
9 | 9 | ||
10 | 10 | ||
11 | /* | 11 | /* |
diff --git a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c index 124313ce3c09..127f040de9de 100644 --- a/arch/ppc/kernel/syscalls.c +++ b/arch/ppc/kernel/syscalls.c | |||
@@ -41,10 +41,6 @@ | |||
41 | #include <asm/ipc.h> | 41 | #include <asm/ipc.h> |
42 | #include <asm/semaphore.h> | 42 | #include <asm/semaphore.h> |
43 | 43 | ||
44 | void | ||
45 | check_bugs(void) | ||
46 | { | ||
47 | } | ||
48 | 44 | ||
49 | /* | 45 | /* |
50 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | 46 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index d87423d1003a..961ede87be72 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -118,6 +118,28 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
118 | info.si_code = code; | 118 | info.si_code = code; |
119 | info.si_addr = (void __user *) addr; | 119 | info.si_addr = (void __user *) addr; |
120 | force_sig_info(signr, &info, current); | 120 | force_sig_info(signr, &info, current); |
121 | |||
122 | /* | ||
123 | * Init gets no signals that it doesn't have a handler for. | ||
124 | * That's all very well, but if it has caused a synchronous | ||
125 | * exception and we ignore the resulting signal, it will just | ||
126 | * generate the same exception over and over again and we get | ||
127 | * nowhere. Better to kill it and let the kernel panic. | ||
128 | */ | ||
129 | if (current->pid == 1) { | ||
130 | __sighandler_t handler; | ||
131 | |||
132 | spin_lock_irq(¤t->sighand->siglock); | ||
133 | handler = current->sighand->action[signr-1].sa.sa_handler; | ||
134 | spin_unlock_irq(¤t->sighand->siglock); | ||
135 | if (handler == SIG_DFL) { | ||
136 | /* init has generated a synchronous exception | ||
137 | and it doesn't have a handler for the signal */ | ||
138 | printk(KERN_CRIT "init has generated signal %d " | ||
139 | "but has no handler for it\n", signr); | ||
140 | do_exit(signr); | ||
141 | } | ||
142 | } | ||
121 | } | 143 | } |
122 | 144 | ||
123 | /* | 145 | /* |
@@ -849,10 +871,12 @@ void AltivecAssistException(struct pt_regs *regs) | |||
849 | } | 871 | } |
850 | #endif /* CONFIG_ALTIVEC */ | 872 | #endif /* CONFIG_ALTIVEC */ |
851 | 873 | ||
874 | #ifdef CONFIG_E500 | ||
852 | void PerformanceMonitorException(struct pt_regs *regs) | 875 | void PerformanceMonitorException(struct pt_regs *regs) |
853 | { | 876 | { |
854 | perf_irq(regs); | 877 | perf_irq(regs); |
855 | } | 878 | } |
879 | #endif | ||
856 | 880 | ||
857 | #ifdef CONFIG_FSL_BOOKE | 881 | #ifdef CONFIG_FSL_BOOKE |
858 | void CacheLockingException(struct pt_regs *regs, unsigned long address, | 882 | void CacheLockingException(struct pt_regs *regs, unsigned long address, |