diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
commit | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch) | |
tree | 9f54936c87764bef75e97395cb56b7d1e0df24c6 /arch/powerpc/kernel | |
parent | 4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff) | |
parent | 6be325719b3e54624397e413efd4b33a997e55a3 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 12 | ||||
-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/smp.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/swsusp_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 11 |
6 files changed, 49 insertions, 15 deletions
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/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/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 | ||