diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /arch/sparc64 | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/time.c | 16 | ||||
-rw-r--r-- | arch/sparc64/kernel/traps.c | 17 | ||||
-rw-r--r-- | arch/sparc64/mm/fault.c | 4 |
3 files changed, 12 insertions, 25 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 7d61f1bfd3d3..e55b5c6ece02 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -641,23 +641,8 @@ static void __init set_system_time(void) | |||
641 | mon = MSTK_REG_MONTH(mregs); | 641 | mon = MSTK_REG_MONTH(mregs); |
642 | year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); | 642 | year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); |
643 | } else { | 643 | } else { |
644 | int i; | ||
645 | |||
646 | /* Dallas 12887 RTC chip. */ | 644 | /* Dallas 12887 RTC chip. */ |
647 | 645 | ||
648 | /* Stolen from arch/i386/kernel/time.c, see there for | ||
649 | * credits and descriptive comments. | ||
650 | */ | ||
651 | for (i = 0; i < 1000000; i++) { | ||
652 | if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) | ||
653 | break; | ||
654 | udelay(10); | ||
655 | } | ||
656 | for (i = 0; i < 1000000; i++) { | ||
657 | if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) | ||
658 | break; | ||
659 | udelay(10); | ||
660 | } | ||
661 | do { | 646 | do { |
662 | sec = CMOS_READ(RTC_SECONDS); | 647 | sec = CMOS_READ(RTC_SECONDS); |
663 | min = CMOS_READ(RTC_MINUTES); | 648 | min = CMOS_READ(RTC_MINUTES); |
@@ -666,6 +651,7 @@ static void __init set_system_time(void) | |||
666 | mon = CMOS_READ(RTC_MONTH); | 651 | mon = CMOS_READ(RTC_MONTH); |
667 | year = CMOS_READ(RTC_YEAR); | 652 | year = CMOS_READ(RTC_YEAR); |
668 | } while (sec != CMOS_READ(RTC_SECONDS)); | 653 | } while (sec != CMOS_READ(RTC_SECONDS)); |
654 | |||
669 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | 655 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
670 | BCD_TO_BIN(sec); | 656 | BCD_TO_BIN(sec); |
671 | BCD_TO_BIN(min); | 657 | BCD_TO_BIN(min); |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index df612e4f75f9..ff090bb9734b 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -43,18 +43,19 @@ | |||
43 | #include <linux/kmod.h> | 43 | #include <linux/kmod.h> |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | struct notifier_block *sparc64die_chain; | 46 | ATOMIC_NOTIFIER_HEAD(sparc64die_chain); |
47 | static DEFINE_SPINLOCK(die_notifier_lock); | ||
48 | 47 | ||
49 | int register_die_notifier(struct notifier_block *nb) | 48 | int register_die_notifier(struct notifier_block *nb) |
50 | { | 49 | { |
51 | int err = 0; | 50 | return atomic_notifier_chain_register(&sparc64die_chain, nb); |
52 | unsigned long flags; | ||
53 | spin_lock_irqsave(&die_notifier_lock, flags); | ||
54 | err = notifier_chain_register(&sparc64die_chain, nb); | ||
55 | spin_unlock_irqrestore(&die_notifier_lock, flags); | ||
56 | return err; | ||
57 | } | 51 | } |
52 | EXPORT_SYMBOL(register_die_notifier); | ||
53 | |||
54 | int unregister_die_notifier(struct notifier_block *nb) | ||
55 | { | ||
56 | return atomic_notifier_chain_unregister(&sparc64die_chain, nb); | ||
57 | } | ||
58 | EXPORT_SYMBOL(unregister_die_notifier); | ||
58 | 59 | ||
59 | /* When an irrecoverable trap occurs at tl > 0, the trap entry | 60 | /* When an irrecoverable trap occurs at tl > 0, the trap entry |
60 | * code logs the trap state registers at every level in the trap | 61 | * code logs the trap state registers at every level in the trap |
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index d21ff3230c02..0db2f7d9fab5 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -413,12 +413,12 @@ good_area: | |||
413 | #ifdef CONFIG_HUGETLB_PAGE | 413 | #ifdef CONFIG_HUGETLB_PAGE |
414 | mm_rss -= (mm->context.huge_pte_count * (HPAGE_SIZE / PAGE_SIZE)); | 414 | mm_rss -= (mm->context.huge_pte_count * (HPAGE_SIZE / PAGE_SIZE)); |
415 | #endif | 415 | #endif |
416 | if (unlikely(mm_rss >= | 416 | if (unlikely(mm_rss > |
417 | mm->context.tsb_block[MM_TSB_BASE].tsb_rss_limit)) | 417 | mm->context.tsb_block[MM_TSB_BASE].tsb_rss_limit)) |
418 | tsb_grow(mm, MM_TSB_BASE, mm_rss); | 418 | tsb_grow(mm, MM_TSB_BASE, mm_rss); |
419 | #ifdef CONFIG_HUGETLB_PAGE | 419 | #ifdef CONFIG_HUGETLB_PAGE |
420 | mm_rss = mm->context.huge_pte_count; | 420 | mm_rss = mm->context.huge_pte_count; |
421 | if (unlikely(mm_rss >= | 421 | if (unlikely(mm_rss > |
422 | mm->context.tsb_block[MM_TSB_HUGE].tsb_rss_limit)) | 422 | mm->context.tsb_block[MM_TSB_HUGE].tsb_rss_limit)) |
423 | tsb_grow(mm, MM_TSB_HUGE, mm_rss); | 423 | tsb_grow(mm, MM_TSB_HUGE, mm_rss); |
424 | #endif | 424 | #endif |