diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/align.c | 63 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/iommu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas-proc.c | 14 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/swsusp_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 11 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 3 |
15 files changed, 151 insertions, 49 deletions
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 3839839f83c7..b876e989220b 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -642,10 +642,14 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg, | |||
642 | */ | 642 | */ |
643 | static int emulate_vsx(unsigned char __user *addr, unsigned int reg, | 643 | static int emulate_vsx(unsigned char __user *addr, unsigned int reg, |
644 | unsigned int areg, struct pt_regs *regs, | 644 | unsigned int areg, struct pt_regs *regs, |
645 | unsigned int flags, unsigned int length) | 645 | unsigned int flags, unsigned int length, |
646 | unsigned int elsize) | ||
646 | { | 647 | { |
647 | char *ptr; | 648 | char *ptr; |
649 | unsigned long *lptr; | ||
648 | int ret = 0; | 650 | int ret = 0; |
651 | int sw = 0; | ||
652 | int i, j; | ||
649 | 653 | ||
650 | flush_vsx_to_thread(current); | 654 | flush_vsx_to_thread(current); |
651 | 655 | ||
@@ -654,19 +658,35 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg, | |||
654 | else | 658 | else |
655 | ptr = (char *) ¤t->thread.vr[reg - 32]; | 659 | ptr = (char *) ¤t->thread.vr[reg - 32]; |
656 | 660 | ||
657 | if (flags & ST) | 661 | lptr = (unsigned long *) ptr; |
658 | ret = __copy_to_user(addr, ptr, length); | 662 | |
659 | else { | 663 | if (flags & SW) |
660 | if (flags & SPLT){ | 664 | sw = elsize-1; |
661 | ret = __copy_from_user(ptr, addr, length); | 665 | |
662 | ptr += length; | 666 | for (j = 0; j < length; j += elsize) { |
667 | for (i = 0; i < elsize; ++i) { | ||
668 | if (flags & ST) | ||
669 | ret |= __put_user(ptr[i^sw], addr + i); | ||
670 | else | ||
671 | ret |= __get_user(ptr[i^sw], addr + i); | ||
663 | } | 672 | } |
664 | ret |= __copy_from_user(ptr, addr, length); | 673 | ptr += elsize; |
674 | addr += elsize; | ||
665 | } | 675 | } |
666 | if (flags & U) | 676 | |
667 | regs->gpr[areg] = regs->dar; | 677 | if (!ret) { |
668 | if (ret) | 678 | if (flags & U) |
679 | regs->gpr[areg] = regs->dar; | ||
680 | |||
681 | /* Splat load copies the same data to top and bottom 8 bytes */ | ||
682 | if (flags & SPLT) | ||
683 | lptr[1] = lptr[0]; | ||
684 | /* For 8 byte loads, zero the top 8 bytes */ | ||
685 | else if (!(flags & ST) && (8 == length)) | ||
686 | lptr[1] = 0; | ||
687 | } else | ||
669 | return -EFAULT; | 688 | return -EFAULT; |
689 | |||
670 | return 1; | 690 | return 1; |
671 | } | 691 | } |
672 | #endif | 692 | #endif |
@@ -767,16 +787,25 @@ int fix_alignment(struct pt_regs *regs) | |||
767 | 787 | ||
768 | #ifdef CONFIG_VSX | 788 | #ifdef CONFIG_VSX |
769 | if ((instruction & 0xfc00003e) == 0x7c000018) { | 789 | if ((instruction & 0xfc00003e) == 0x7c000018) { |
770 | /* Additional register addressing bit (64 VSX vs 32 FPR/GPR */ | 790 | unsigned int elsize; |
791 | |||
792 | /* Additional register addressing bit (64 VSX vs 32 FPR/GPR) */ | ||
771 | reg |= (instruction & 0x1) << 5; | 793 | reg |= (instruction & 0x1) << 5; |
772 | /* Simple inline decoder instead of a table */ | 794 | /* Simple inline decoder instead of a table */ |
795 | /* VSX has only 8 and 16 byte memory accesses */ | ||
796 | nb = 8; | ||
773 | if (instruction & 0x200) | 797 | if (instruction & 0x200) |
774 | nb = 16; | 798 | nb = 16; |
775 | else if (instruction & 0x080) | 799 | |
776 | nb = 8; | 800 | /* Vector stores in little-endian mode swap individual |
777 | else | 801 | elements, so process them separately */ |
778 | nb = 4; | 802 | elsize = 4; |
803 | if (instruction & 0x80) | ||
804 | elsize = 8; | ||
805 | |||
779 | flags = 0; | 806 | flags = 0; |
807 | if (regs->msr & MSR_LE) | ||
808 | flags |= SW; | ||
780 | if (instruction & 0x100) | 809 | if (instruction & 0x100) |
781 | flags |= ST; | 810 | flags |= ST; |
782 | if (instruction & 0x040) | 811 | if (instruction & 0x040) |
@@ -787,7 +816,7 @@ int fix_alignment(struct pt_regs *regs) | |||
787 | nb = 8; | 816 | nb = 8; |
788 | } | 817 | } |
789 | PPC_WARN_ALIGNMENT(vsx, regs); | 818 | PPC_WARN_ALIGNMENT(vsx, regs); |
790 | return emulate_vsx(addr, reg, areg, regs, flags, nb); | 819 | return emulate_vsx(addr, reg, areg, regs, flags, nb, elsize); |
791 | } | 820 | } |
792 | #endif | 821 | #endif |
793 | /* A size of 0 indicates an instruction we don't support, with | 822 | /* A size of 0 indicates an instruction we don't support, with |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 03c862b6a9c4..2fc82bac3bbc 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -697,9 +697,9 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
697 | .machine_check = machine_check_generic, | 697 | .machine_check = machine_check_generic, |
698 | .platform = "ppc750", | 698 | .platform = "ppc750", |
699 | }, | 699 | }, |
700 | { /* 750CL */ | 700 | { /* 750CL (and "Broadway") */ |
701 | .pvr_mask = 0xfffff0f0, | 701 | .pvr_mask = 0xfffff0e0, |
702 | .pvr_value = 0x00087010, | 702 | .pvr_value = 0x00087000, |
703 | .cpu_name = "750CL", | 703 | .cpu_name = "750CL", |
704 | .cpu_features = CPU_FTRS_750CL, | 704 | .cpu_features = CPU_FTRS_750CL, |
705 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, | 705 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 829c3fe7c5a2..e025e89fe93e 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -164,6 +164,9 @@ __after_mmu_off: | |||
164 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM | 164 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM |
165 | bl setup_cpm_bat | 165 | bl setup_cpm_bat |
166 | #endif | 166 | #endif |
167 | #ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO | ||
168 | bl setup_usbgecko_bat | ||
169 | #endif | ||
167 | 170 | ||
168 | /* | 171 | /* |
169 | * Call setup_cpu for CPU 0 and initialize 6xx Idle | 172 | * Call setup_cpu for CPU 0 and initialize 6xx Idle |
@@ -1203,6 +1206,28 @@ setup_cpm_bat: | |||
1203 | blr | 1206 | blr |
1204 | #endif | 1207 | #endif |
1205 | 1208 | ||
1209 | #ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO | ||
1210 | setup_usbgecko_bat: | ||
1211 | /* prepare a BAT for early io */ | ||
1212 | #if defined(CONFIG_GAMECUBE) | ||
1213 | lis r8, 0x0c00 | ||
1214 | #elif defined(CONFIG_WII) | ||
1215 | lis r8, 0x0d00 | ||
1216 | #else | ||
1217 | #error Invalid platform for USB Gecko based early debugging. | ||
1218 | #endif | ||
1219 | /* | ||
1220 | * The virtual address used must match the virtual address | ||
1221 | * associated to the fixmap entry FIX_EARLY_DEBUG_BASE. | ||
1222 | */ | ||
1223 | lis r11, 0xfffe /* top 128K */ | ||
1224 | ori r8, r8, 0x002a /* uncached, guarded ,rw */ | ||
1225 | ori r11, r11, 0x2 /* 128K, Vs=1, Vp=0 */ | ||
1226 | mtspr SPRN_DBAT1L, r8 | ||
1227 | mtspr SPRN_DBAT1U, r11 | ||
1228 | blr | ||
1229 | #endif | ||
1230 | |||
1206 | #ifdef CONFIG_8260 | 1231 | #ifdef CONFIG_8260 |
1207 | /* Jump into the system reset for the rom. | 1232 | /* Jump into the system reset for the rom. |
1208 | * We first disable the MMU, and then jump to the ROM reset address. | 1233 | * We first disable the MMU, and then jump to the ROM reset address. |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 678f98cd5e64..3ef743fa5d7c 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -542,11 +542,11 @@ DARFixed:/* Return from dcbx instruction bug workaround, r10 holds value of DAR | |||
542 | FixupDAR:/* Entry point for dcbx workaround. */ | 542 | FixupDAR:/* Entry point for dcbx workaround. */ |
543 | /* fetch instruction from memory. */ | 543 | /* fetch instruction from memory. */ |
544 | mfspr r10, SPRN_SRR0 | 544 | mfspr r10, SPRN_SRR0 |
545 | andis. r11, r10, 0x8000 /* Address >= 0x80000000 */ | ||
545 | DO_8xx_CPU6(0x3780, r3) | 546 | DO_8xx_CPU6(0x3780, r3) |
546 | mtspr SPRN_MD_EPN, r10 | 547 | mtspr SPRN_MD_EPN, r10 |
547 | mfspr r11, SPRN_M_TWB /* Get level 1 table entry address */ | 548 | mfspr r11, SPRN_M_TWB /* Get level 1 table entry address */ |
548 | cmplwi cr0, r11, 0x0800 | 549 | beq- 3f /* Branch if user space */ |
549 | blt- 3f /* Branch if user space */ | ||
550 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h | 550 | lis r11, (swapper_pg_dir-PAGE_OFFSET)@h |
551 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l | 551 | ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l |
552 | rlwimi r11, r10, 32-20, 0xffc /* r11 = r11&~0xffc|(r10>>20)&0xffc */ | 552 | rlwimi r11, r10, 32-20, 0xffc /* r11 = r11&~0xffc|(r10>>20)&0xffc */ |
@@ -768,12 +768,12 @@ start_here: | |||
768 | */ | 768 | */ |
769 | initial_mmu: | 769 | initial_mmu: |
770 | tlbia /* Invalidate all TLB entries */ | 770 | tlbia /* Invalidate all TLB entries */ |
771 | #ifdef CONFIG_PIN_TLB | 771 | /* Always pin the first 8 MB ITLB to prevent ITLB |
772 | misses while mucking around with SRR0/SRR1 in asm | ||
773 | */ | ||
772 | lis r8, MI_RSV4I@h | 774 | lis r8, MI_RSV4I@h |
773 | ori r8, r8, 0x1c00 | 775 | ori r8, r8, 0x1c00 |
774 | #else | 776 | |
775 | li r8, 0 | ||
776 | #endif | ||
777 | mtspr SPRN_MI_CTR, r8 /* Set instruction MMU control */ | 777 | mtspr SPRN_MI_CTR, r8 /* Set instruction MMU control */ |
778 | 778 | ||
779 | #ifdef CONFIG_PIN_TLB | 779 | #ifdef CONFIG_PIN_TLB |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index fd51578e29dd..5547ae6e6b0b 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/bitops.h> | 33 | #include <linux/bitmap.h> |
34 | #include <linux/iommu-helper.h> | 34 | #include <linux/iommu-helper.h> |
35 | #include <linux/crash_dump.h> | 35 | #include <linux/crash_dump.h> |
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
@@ -251,7 +251,7 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | |||
251 | } | 251 | } |
252 | 252 | ||
253 | ppc_md.tce_free(tbl, entry, npages); | 253 | ppc_md.tce_free(tbl, entry, npages); |
254 | iommu_area_free(tbl->it_map, free_entry, npages); | 254 | bitmap_clear(tbl->it_map, free_entry, npages); |
255 | } | 255 | } |
256 | 256 | ||
257 | static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | 257 | static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index f6dca4f4b295..9040330b0530 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -210,7 +210,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
210 | if (!desc) | 210 | if (!desc) |
211 | return 0; | 211 | return 0; |
212 | 212 | ||
213 | spin_lock_irqsave(&desc->lock, flags); | 213 | raw_spin_lock_irqsave(&desc->lock, flags); |
214 | 214 | ||
215 | action = desc->action; | 215 | action = desc->action; |
216 | if (!action || !action->handler) | 216 | if (!action || !action->handler) |
@@ -237,7 +237,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
237 | seq_putc(p, '\n'); | 237 | seq_putc(p, '\n'); |
238 | 238 | ||
239 | skip: | 239 | skip: |
240 | spin_unlock_irqrestore(&desc->lock, flags); | 240 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
241 | 241 | ||
242 | return 0; | 242 | return 0; |
243 | } | 243 | } |
@@ -1112,7 +1112,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1112 | if (!desc) | 1112 | if (!desc) |
1113 | continue; | 1113 | continue; |
1114 | 1114 | ||
1115 | spin_lock_irqsave(&desc->lock, flags); | 1115 | raw_spin_lock_irqsave(&desc->lock, flags); |
1116 | 1116 | ||
1117 | if (desc->action && desc->action->handler) { | 1117 | if (desc->action && desc->action->handler) { |
1118 | seq_printf(m, "%5d ", i); | 1118 | seq_printf(m, "%5d ", i); |
@@ -1131,7 +1131,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1131 | seq_printf(m, "%s\n", p); | 1131 | seq_printf(m, "%s\n", p); |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | spin_unlock_irqrestore(&desc->lock, flags); | 1134 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | return 0; | 1137 | return 0; |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index e8dfdbd9327a..cadbed679fbb 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1107,6 +1107,12 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | |||
1107 | list_for_each_entry(dev, &bus->devices, bus_list) { | 1107 | list_for_each_entry(dev, &bus->devices, bus_list) { |
1108 | struct dev_archdata *sd = &dev->dev.archdata; | 1108 | struct dev_archdata *sd = &dev->dev.archdata; |
1109 | 1109 | ||
1110 | /* Cardbus can call us to add new devices to a bus, so ignore | ||
1111 | * those who are already fully discovered | ||
1112 | */ | ||
1113 | if (dev->is_added) | ||
1114 | continue; | ||
1115 | |||
1110 | /* Setup OF node pointer in archdata */ | 1116 | /* Setup OF node pointer in archdata */ |
1111 | sd->of_node = pci_device_to_OF_node(dev); | 1117 | sd->of_node = pci_device_to_OF_node(dev); |
1112 | 1118 | ||
@@ -1147,6 +1153,13 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
1147 | } | 1153 | } |
1148 | EXPORT_SYMBOL(pcibios_fixup_bus); | 1154 | EXPORT_SYMBOL(pcibios_fixup_bus); |
1149 | 1155 | ||
1156 | void __devinit pci_fixup_cardbus(struct pci_bus *bus) | ||
1157 | { | ||
1158 | /* Now fixup devices on that bus */ | ||
1159 | pcibios_setup_bus_devices(bus); | ||
1160 | } | ||
1161 | |||
1162 | |||
1150 | static int skip_isa_ioresource_align(struct pci_dev *dev) | 1163 | static int skip_isa_ioresource_align(struct pci_dev *dev) |
1151 | { | 1164 | { |
1152 | if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) && | 1165 | if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) && |
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 1be9fe38bcb5..8777fb02349f 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -262,19 +262,19 @@ static int __init proc_rtas_init(void) | |||
262 | if (rtas_node == NULL) | 262 | if (rtas_node == NULL) |
263 | return -ENODEV; | 263 | return -ENODEV; |
264 | 264 | ||
265 | proc_create("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL, | 265 | proc_create("powerpc/rtas/progress", S_IRUGO|S_IWUSR, NULL, |
266 | &ppc_rtas_progress_operations); | 266 | &ppc_rtas_progress_operations); |
267 | proc_create("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL, | 267 | proc_create("powerpc/rtas/clock", S_IRUGO|S_IWUSR, NULL, |
268 | &ppc_rtas_clock_operations); | 268 | &ppc_rtas_clock_operations); |
269 | proc_create("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL, | 269 | proc_create("powerpc/rtas/poweron", S_IWUSR|S_IRUGO, NULL, |
270 | &ppc_rtas_poweron_operations); | 270 | &ppc_rtas_poweron_operations); |
271 | proc_create("ppc64/rtas/sensors", S_IRUGO, NULL, | 271 | proc_create("powerpc/rtas/sensors", S_IRUGO, NULL, |
272 | &ppc_rtas_sensors_operations); | 272 | &ppc_rtas_sensors_operations); |
273 | proc_create("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, NULL, | 273 | proc_create("powerpc/rtas/frequency", S_IWUSR|S_IRUGO, NULL, |
274 | &ppc_rtas_tone_freq_operations); | 274 | &ppc_rtas_tone_freq_operations); |
275 | proc_create("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL, | 275 | proc_create("powerpc/rtas/volume", S_IWUSR|S_IRUGO, NULL, |
276 | &ppc_rtas_tone_volume_operations); | 276 | &ppc_rtas_tone_volume_operations); |
277 | proc_create("ppc64/rtas/rmo_buffer", S_IRUSR, NULL, | 277 | proc_create("powerpc/rtas/rmo_buffer", S_IRUSR, NULL, |
278 | &ppc_rtas_rmo_buf_ops); | 278 | &ppc_rtas_rmo_buf_ops); |
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index bf90361bb70f..fd0d29493fd6 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <asm/mmu.h> | 42 | #include <asm/mmu.h> |
43 | 43 | ||
44 | struct rtas_t rtas = { | 44 | struct rtas_t rtas = { |
45 | .lock = __RAW_SPIN_LOCK_UNLOCKED | 45 | .lock = __ARCH_SPIN_LOCK_UNLOCKED |
46 | }; | 46 | }; |
47 | EXPORT_SYMBOL(rtas); | 47 | EXPORT_SYMBOL(rtas); |
48 | 48 | ||
@@ -80,13 +80,13 @@ static unsigned long lock_rtas(void) | |||
80 | 80 | ||
81 | local_irq_save(flags); | 81 | local_irq_save(flags); |
82 | preempt_disable(); | 82 | preempt_disable(); |
83 | __raw_spin_lock_flags(&rtas.lock, flags); | 83 | arch_spin_lock_flags(&rtas.lock, flags); |
84 | return flags; | 84 | return flags; |
85 | } | 85 | } |
86 | 86 | ||
87 | static void unlock_rtas(unsigned long flags) | 87 | static void unlock_rtas(unsigned long flags) |
88 | { | 88 | { |
89 | __raw_spin_unlock(&rtas.lock); | 89 | arch_spin_unlock(&rtas.lock); |
90 | local_irq_restore(flags); | 90 | local_irq_restore(flags); |
91 | preempt_enable(); | 91 | preempt_enable(); |
92 | } | 92 | } |
@@ -978,7 +978,7 @@ int __init early_init_dt_scan_rtas(unsigned long node, | |||
978 | return 1; | 978 | return 1; |
979 | } | 979 | } |
980 | 980 | ||
981 | static raw_spinlock_t timebase_lock; | 981 | static arch_spinlock_t timebase_lock; |
982 | static u64 timebase = 0; | 982 | static u64 timebase = 0; |
983 | 983 | ||
984 | void __cpuinit rtas_give_timebase(void) | 984 | void __cpuinit rtas_give_timebase(void) |
@@ -987,10 +987,10 @@ void __cpuinit rtas_give_timebase(void) | |||
987 | 987 | ||
988 | local_irq_save(flags); | 988 | local_irq_save(flags); |
989 | hard_irq_disable(); | 989 | hard_irq_disable(); |
990 | __raw_spin_lock(&timebase_lock); | 990 | arch_spin_lock(&timebase_lock); |
991 | rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); | 991 | rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); |
992 | timebase = get_tb(); | 992 | timebase = get_tb(); |
993 | __raw_spin_unlock(&timebase_lock); | 993 | arch_spin_unlock(&timebase_lock); |
994 | 994 | ||
995 | while (timebase) | 995 | while (timebase) |
996 | barrier(); | 996 | barrier(); |
@@ -1002,8 +1002,8 @@ void __cpuinit rtas_take_timebase(void) | |||
1002 | { | 1002 | { |
1003 | while (!timebase) | 1003 | while (!timebase) |
1004 | barrier(); | 1004 | barrier(); |
1005 | __raw_spin_lock(&timebase_lock); | 1005 | arch_spin_lock(&timebase_lock); |
1006 | set_tb(timebase >> 32, timebase & 0xffffffff); | 1006 | set_tb(timebase >> 32, timebase & 0xffffffff); |
1007 | timebase = 0; | 1007 | timebase = 0; |
1008 | __raw_spin_unlock(&timebase_lock); | 1008 | arch_spin_unlock(&timebase_lock); |
1009 | } | 1009 | } |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index a521fb8a40ee..c2ee14498077 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -619,4 +619,16 @@ void __cpu_die(unsigned int cpu) | |||
619 | if (smp_ops->cpu_die) | 619 | if (smp_ops->cpu_die) |
620 | smp_ops->cpu_die(cpu); | 620 | smp_ops->cpu_die(cpu); |
621 | } | 621 | } |
622 | |||
623 | static DEFINE_MUTEX(powerpc_cpu_hotplug_driver_mutex); | ||
624 | |||
625 | void cpu_hotplug_driver_lock() | ||
626 | { | ||
627 | mutex_lock(&powerpc_cpu_hotplug_driver_mutex); | ||
628 | } | ||
629 | |||
630 | void cpu_hotplug_driver_unlock() | ||
631 | { | ||
632 | mutex_unlock(&powerpc_cpu_hotplug_driver_mutex); | ||
633 | } | ||
622 | #endif | 634 | #endif |
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S index b47d8ceffb52..b0754e237438 100644 --- a/arch/powerpc/kernel/swsusp_32.S +++ b/arch/powerpc/kernel/swsusp_32.S | |||
@@ -303,7 +303,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS) | |||
303 | lis r4,0x1000 | 303 | lis r4,0x1000 |
304 | 1: addic. r4,r4,-0x1000 | 304 | 1: addic. r4,r4,-0x1000 |
305 | tlbie r4 | 305 | tlbie r4 |
306 | blt 1b | 306 | bgt 1b |
307 | sync | 307 | sync |
308 | 308 | ||
309 | /* restore the MSR and turn on the MMU */ | 309 | /* restore the MSR and turn on the MMU */ |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 9ba2cc88591d..6c6093d67f30 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -903,12 +903,21 @@ static void decrementer_set_mode(enum clock_event_mode mode, | |||
903 | decrementer_set_next_event(DECREMENTER_MAX, dev); | 903 | decrementer_set_next_event(DECREMENTER_MAX, dev); |
904 | } | 904 | } |
905 | 905 | ||
906 | static inline uint64_t div_sc64(unsigned long ticks, unsigned long nsec, | ||
907 | int shift) | ||
908 | { | ||
909 | uint64_t tmp = ((uint64_t)ticks) << shift; | ||
910 | |||
911 | do_div(tmp, nsec); | ||
912 | return tmp; | ||
913 | } | ||
914 | |||
906 | static void __init setup_clockevent_multiplier(unsigned long hz) | 915 | static void __init setup_clockevent_multiplier(unsigned long hz) |
907 | { | 916 | { |
908 | u64 mult, shift = 32; | 917 | u64 mult, shift = 32; |
909 | 918 | ||
910 | while (1) { | 919 | while (1) { |
911 | mult = div_sc(hz, NSEC_PER_SEC, shift); | 920 | mult = div_sc64(hz, NSEC_PER_SEC, shift); |
912 | if (mult && (mult >> 32UL) == 0UL) | 921 | if (mult && (mult >> 32UL) == 0UL) |
913 | break; | 922 | break; |
914 | 923 | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 804f0f30f227..d069ff8a7e03 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -174,6 +174,15 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
174 | return 0; | 174 | return 0; |
175 | } | 175 | } |
176 | 176 | ||
177 | void user_single_step_siginfo(struct task_struct *tsk, | ||
178 | struct pt_regs *regs, siginfo_t *info) | ||
179 | { | ||
180 | memset(info, 0, sizeof(*info)); | ||
181 | info->si_signo = SIGTRAP; | ||
182 | info->si_code = TRAP_TRACE; | ||
183 | info->si_addr = (void __user *)regs->nip; | ||
184 | } | ||
185 | |||
177 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | 186 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) |
178 | { | 187 | { |
179 | siginfo_t info; | 188 | siginfo_t info; |
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index fc9af47e2128..e39cad83c884 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -60,6 +60,8 @@ void __init udbg_early_init(void) | |||
60 | udbg_init_40x_realmode(); | 60 | udbg_init_40x_realmode(); |
61 | #elif defined(CONFIG_PPC_EARLY_DEBUG_CPM) | 61 | #elif defined(CONFIG_PPC_EARLY_DEBUG_CPM) |
62 | udbg_init_cpm(); | 62 | udbg_init_cpm(); |
63 | #elif defined(CONFIG_PPC_EARLY_DEBUG_USBGECKO) | ||
64 | udbg_init_usbgecko(); | ||
63 | #endif | 65 | #endif |
64 | 66 | ||
65 | #ifdef CONFIG_PPC_EARLY_DEBUG | 67 | #ifdef CONFIG_PPC_EARLY_DEBUG |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 27735a7ac12b..dcd01c82e701 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -38,6 +38,9 @@ jiffies = jiffies_64 + 4; | |||
38 | #endif | 38 | #endif |
39 | SECTIONS | 39 | SECTIONS |
40 | { | 40 | { |
41 | . = 0; | ||
42 | reloc_start = .; | ||
43 | |||
41 | . = KERNELBASE; | 44 | . = KERNELBASE; |
42 | 45 | ||
43 | /* | 46 | /* |