diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-24 00:08:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-24 00:08:12 -0400 |
commit | ccc712fe6b2acbafe9fc31f765a193e3249ca4a1 (patch) | |
tree | 9e1a4052a69203baf1e866af4536ca9ceb904fa6 /arch/powerpc/kernel | |
parent | 9c637646dafd82370c284ce7fcc8b4ba2546dfb1 (diff) | |
parent | c9169f8747bb282cbe518132bf7d49755a00b6c1 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 8 |
4 files changed, 34 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 359ab89748e0..40a39291861f 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -115,6 +115,7 @@ static int __init add_legacy_soc_port(struct device_node *np, | |||
115 | u64 addr; | 115 | u64 addr; |
116 | u32 *addrp; | 116 | u32 *addrp; |
117 | upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; | 117 | upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; |
118 | struct device_node *tsi = of_get_parent(np); | ||
118 | 119 | ||
119 | /* We only support ports that have a clock frequency properly | 120 | /* We only support ports that have a clock frequency properly |
120 | * encoded in the device-tree. | 121 | * encoded in the device-tree. |
@@ -134,7 +135,10 @@ static int __init add_legacy_soc_port(struct device_node *np, | |||
134 | /* Add port, irq will be dealt with later. We passed a translated | 135 | /* Add port, irq will be dealt with later. We passed a translated |
135 | * IO port value. It will be fixed up later along with the irq | 136 | * IO port value. It will be fixed up later along with the irq |
136 | */ | 137 | */ |
137 | return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags, 0); | 138 | if (tsi && !strcmp(tsi->type, "tsi-bridge")) |
139 | return add_legacy_port(np, -1, UPIO_TSI, addr, addr, NO_IRQ, flags, 0); | ||
140 | else | ||
141 | return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags, 0); | ||
138 | } | 142 | } |
139 | 143 | ||
140 | static int __init add_legacy_isa_port(struct device_node *np, | 144 | static int __init add_legacy_isa_port(struct device_node *np, |
@@ -464,7 +468,7 @@ static int __init serial_dev_init(void) | |||
464 | fixup_port_irq(i, np, port); | 468 | fixup_port_irq(i, np, port); |
465 | if (port->iotype == UPIO_PORT) | 469 | if (port->iotype == UPIO_PORT) |
466 | fixup_port_pio(i, np, port); | 470 | fixup_port_pio(i, np, port); |
467 | if (port->iotype == UPIO_MEM) | 471 | if ((port->iotype == UPIO_MEM) || (port->iotype == UPIO_TSI)) |
468 | fixup_port_mmio(i, np, port); | 472 | fixup_port_mmio(i, np, port); |
469 | } | 473 | } |
470 | 474 | ||
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 6a7e997c401d..11052c212ad5 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -598,11 +598,6 @@ static struct device_node *of_irq_find_parent(struct device_node *child) | |||
598 | return p; | 598 | return p; |
599 | } | 599 | } |
600 | 600 | ||
601 | static u8 of_irq_pci_swizzle(u8 slot, u8 pin) | ||
602 | { | ||
603 | return (((pin - 1) + slot) % 4) + 1; | ||
604 | } | ||
605 | |||
606 | /* This doesn't need to be called if you don't have any special workaround | 601 | /* This doesn't need to be called if you don't have any special workaround |
607 | * flags to pass | 602 | * flags to pass |
608 | */ | 603 | */ |
@@ -891,6 +886,12 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq | |||
891 | } | 886 | } |
892 | EXPORT_SYMBOL_GPL(of_irq_map_one); | 887 | EXPORT_SYMBOL_GPL(of_irq_map_one); |
893 | 888 | ||
889 | #ifdef CONFIG_PCI | ||
890 | static u8 of_irq_pci_swizzle(u8 slot, u8 pin) | ||
891 | { | ||
892 | return (((pin - 1) + slot) % 4) + 1; | ||
893 | } | ||
894 | |||
894 | int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) | 895 | int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) |
895 | { | 896 | { |
896 | struct device_node *dn, *ppnode; | 897 | struct device_node *dn, *ppnode; |
@@ -967,4 +968,4 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) | |||
967 | return of_irq_map_raw(ppnode, &lspec, laddr, out_irq); | 968 | return of_irq_map_raw(ppnode, &lspec, laddr, out_irq); |
968 | } | 969 | } |
969 | EXPORT_SYMBOL_GPL(of_irq_map_pci); | 970 | EXPORT_SYMBOL_GPL(of_irq_map_pci); |
970 | 971 | #endif /* CONFIG_PCI */ | |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 774c0a3c5019..18e59e43d2b3 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -417,7 +417,7 @@ static __inline__ void timer_check_rtc(void) | |||
417 | /* | 417 | /* |
418 | * This version of gettimeofday has microsecond resolution. | 418 | * This version of gettimeofday has microsecond resolution. |
419 | */ | 419 | */ |
420 | static inline void __do_gettimeofday(struct timeval *tv, u64 tb_val) | 420 | static inline void __do_gettimeofday(struct timeval *tv) |
421 | { | 421 | { |
422 | unsigned long sec, usec; | 422 | unsigned long sec, usec; |
423 | u64 tb_ticks, xsec; | 423 | u64 tb_ticks, xsec; |
@@ -431,7 +431,12 @@ static inline void __do_gettimeofday(struct timeval *tv, u64 tb_val) | |||
431 | * without a divide (and in fact, without a multiply) | 431 | * without a divide (and in fact, without a multiply) |
432 | */ | 432 | */ |
433 | temp_varp = do_gtod.varp; | 433 | temp_varp = do_gtod.varp; |
434 | tb_ticks = tb_val - temp_varp->tb_orig_stamp; | 434 | |
435 | /* Sampling the time base must be done after loading | ||
436 | * do_gtod.varp in order to avoid racing with update_gtod. | ||
437 | */ | ||
438 | data_barrier(temp_varp); | ||
439 | tb_ticks = get_tb() - temp_varp->tb_orig_stamp; | ||
435 | temp_tb_to_xs = temp_varp->tb_to_xs; | 440 | temp_tb_to_xs = temp_varp->tb_to_xs; |
436 | temp_stamp_xsec = temp_varp->stamp_xsec; | 441 | temp_stamp_xsec = temp_varp->stamp_xsec; |
437 | xsec = temp_stamp_xsec + mulhdu(tb_ticks, temp_tb_to_xs); | 442 | xsec = temp_stamp_xsec + mulhdu(tb_ticks, temp_tb_to_xs); |
@@ -464,7 +469,7 @@ void do_gettimeofday(struct timeval *tv) | |||
464 | tv->tv_usec = usec; | 469 | tv->tv_usec = usec; |
465 | return; | 470 | return; |
466 | } | 471 | } |
467 | __do_gettimeofday(tv, get_tb()); | 472 | __do_gettimeofday(tv); |
468 | } | 473 | } |
469 | 474 | ||
470 | EXPORT_SYMBOL(do_gettimeofday); | 475 | EXPORT_SYMBOL(do_gettimeofday); |
@@ -650,6 +655,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
650 | int next_dec; | 655 | int next_dec; |
651 | int cpu = smp_processor_id(); | 656 | int cpu = smp_processor_id(); |
652 | unsigned long ticks; | 657 | unsigned long ticks; |
658 | u64 tb_next_jiffy; | ||
653 | 659 | ||
654 | #ifdef CONFIG_PPC32 | 660 | #ifdef CONFIG_PPC32 |
655 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 661 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
@@ -691,11 +697,14 @@ void timer_interrupt(struct pt_regs * regs) | |||
691 | continue; | 697 | continue; |
692 | 698 | ||
693 | write_seqlock(&xtime_lock); | 699 | write_seqlock(&xtime_lock); |
694 | tb_last_jiffy += tb_ticks_per_jiffy; | 700 | tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy; |
695 | tb_last_stamp = per_cpu(last_jiffy, cpu); | 701 | if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { |
696 | do_timer(regs); | 702 | tb_last_jiffy = tb_next_jiffy; |
697 | timer_recalc_offset(tb_last_jiffy); | 703 | tb_last_stamp = per_cpu(last_jiffy, cpu); |
698 | timer_check_rtc(); | 704 | do_timer(regs); |
705 | timer_recalc_offset(tb_last_jiffy); | ||
706 | timer_check_rtc(); | ||
707 | } | ||
699 | write_sequnlock(&xtime_lock); | 708 | write_sequnlock(&xtime_lock); |
700 | } | 709 | } |
701 | 710 | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index e4d1713e8aea..9b352bd0a460 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -585,14 +585,14 @@ static void parse_fpe(struct pt_regs *regs) | |||
585 | #define INST_MFSPR_PVR_MASK 0xfc1fffff | 585 | #define INST_MFSPR_PVR_MASK 0xfc1fffff |
586 | 586 | ||
587 | #define INST_DCBA 0x7c0005ec | 587 | #define INST_DCBA 0x7c0005ec |
588 | #define INST_DCBA_MASK 0x7c0007fe | 588 | #define INST_DCBA_MASK 0xfc0007fe |
589 | 589 | ||
590 | #define INST_MCRXR 0x7c000400 | 590 | #define INST_MCRXR 0x7c000400 |
591 | #define INST_MCRXR_MASK 0x7c0007fe | 591 | #define INST_MCRXR_MASK 0xfc0007fe |
592 | 592 | ||
593 | #define INST_STRING 0x7c00042a | 593 | #define INST_STRING 0x7c00042a |
594 | #define INST_STRING_MASK 0x7c0007fe | 594 | #define INST_STRING_MASK 0xfc0007fe |
595 | #define INST_STRING_GEN_MASK 0x7c00067e | 595 | #define INST_STRING_GEN_MASK 0xfc00067e |
596 | #define INST_LSWI 0x7c0004aa | 596 | #define INST_LSWI 0x7c0004aa |
597 | #define INST_LSWX 0x7c00042a | 597 | #define INST_LSWX 0x7c00042a |
598 | #define INST_STSWI 0x7c0005aa | 598 | #define INST_STSWI 0x7c0005aa |