diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/time.c | 37 |
5 files changed, 27 insertions, 25 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a38cb5036df0..4dcb8af94090 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -756,7 +756,7 @@ void handler_irq(int irq, struct pt_regs *regs) | |||
756 | clear_softint(clr_mask); | 756 | clear_softint(clr_mask); |
757 | } | 757 | } |
758 | #else | 758 | #else |
759 | int should_forward = 1; | 759 | int should_forward = 0; |
760 | 760 | ||
761 | clear_softint(1 << irq); | 761 | clear_softint(1 << irq); |
762 | #endif | 762 | #endif |
@@ -1007,10 +1007,10 @@ static int retarget_one_irq(struct irqaction *p, int goal_cpu) | |||
1007 | } | 1007 | } |
1008 | upa_writel(tid | IMAP_VALID, imap); | 1008 | upa_writel(tid | IMAP_VALID, imap); |
1009 | 1009 | ||
1010 | while (!cpu_online(goal_cpu)) { | 1010 | do { |
1011 | if (++goal_cpu >= NR_CPUS) | 1011 | if (++goal_cpu >= NR_CPUS) |
1012 | goal_cpu = 0; | 1012 | goal_cpu = 0; |
1013 | } | 1013 | } while (!cpu_online(goal_cpu)); |
1014 | 1014 | ||
1015 | return goal_cpu; | 1015 | return goal_cpu; |
1016 | } | 1016 | } |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 26d3ec41da1c..a0cd2b2494d6 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -62,9 +62,6 @@ void default_idle(void) | |||
62 | */ | 62 | */ |
63 | void cpu_idle(void) | 63 | void cpu_idle(void) |
64 | { | 64 | { |
65 | if (current->pid != 0) | ||
66 | return; | ||
67 | |||
68 | /* endless idle loop with no priority at all */ | 65 | /* endless idle loop with no priority at all */ |
69 | for (;;) { | 66 | for (;;) { |
70 | /* If current->work.need_resched is zero we should really | 67 | /* If current->work.need_resched is zero we should really |
@@ -80,7 +77,6 @@ void cpu_idle(void) | |||
80 | schedule(); | 77 | schedule(); |
81 | check_pgt_cache(); | 78 | check_pgt_cache(); |
82 | } | 79 | } |
83 | return; | ||
84 | } | 80 | } |
85 | 81 | ||
86 | #else | 82 | #else |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 5f080cf04b33..80a76e2ad732 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/security.h> | 21 | #include <linux/security.h> |
22 | #include <linux/signal.h> | ||
22 | 23 | ||
23 | #include <asm/asi.h> | 24 | #include <asm/asi.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
@@ -559,7 +560,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
559 | addr = 1; | 560 | addr = 1; |
560 | 561 | ||
561 | case PTRACE_CONT: { /* restart after signal. */ | 562 | case PTRACE_CONT: { /* restart after signal. */ |
562 | if (data > _NSIG) { | 563 | if (!valid_signal(data)) { |
563 | pt_error_return(regs, EIO); | 564 | pt_error_return(regs, EIO); |
564 | goto out_tsk; | 565 | goto out_tsk; |
565 | } | 566 | } |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index cad5a1122800..e78cc53594fa 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -278,7 +278,7 @@ EXPORT_SYMBOL(verify_compat_iovec); | |||
278 | 278 | ||
279 | EXPORT_SYMBOL(dump_thread); | 279 | EXPORT_SYMBOL(dump_thread); |
280 | EXPORT_SYMBOL(dump_fpu); | 280 | EXPORT_SYMBOL(dump_fpu); |
281 | EXPORT_SYMBOL(__pte_alloc_one_kernel); | 281 | EXPORT_SYMBOL(pte_alloc_one_kernel); |
282 | #ifndef CONFIG_SMP | 282 | #ifndef CONFIG_SMP |
283 | EXPORT_SYMBOL(pgt_quicklists); | 283 | EXPORT_SYMBOL(pgt_quicklists); |
284 | #endif | 284 | #endif |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 6a717d4d2bc5..71b4e3807694 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | DEFINE_SPINLOCK(mostek_lock); | 49 | DEFINE_SPINLOCK(mostek_lock); |
50 | DEFINE_SPINLOCK(rtc_lock); | 50 | DEFINE_SPINLOCK(rtc_lock); |
51 | unsigned long mstk48t02_regs = 0UL; | 51 | void __iomem *mstk48t02_regs = NULL; |
52 | #ifdef CONFIG_PCI | 52 | #ifdef CONFIG_PCI |
53 | unsigned long ds1287_regs = 0UL; | 53 | unsigned long ds1287_regs = 0UL; |
54 | #endif | 54 | #endif |
@@ -59,8 +59,8 @@ u64 jiffies_64 = INITIAL_JIFFIES; | |||
59 | 59 | ||
60 | EXPORT_SYMBOL(jiffies_64); | 60 | EXPORT_SYMBOL(jiffies_64); |
61 | 61 | ||
62 | static unsigned long mstk48t08_regs = 0UL; | 62 | static void __iomem *mstk48t08_regs; |
63 | static unsigned long mstk48t59_regs = 0UL; | 63 | static void __iomem *mstk48t59_regs; |
64 | 64 | ||
65 | static int set_rtc_mmss(unsigned long); | 65 | static int set_rtc_mmss(unsigned long); |
66 | 66 | ||
@@ -520,7 +520,7 @@ void timer_tick_interrupt(struct pt_regs *regs) | |||
520 | /* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */ | 520 | /* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */ |
521 | static void __init kick_start_clock(void) | 521 | static void __init kick_start_clock(void) |
522 | { | 522 | { |
523 | unsigned long regs = mstk48t02_regs; | 523 | void __iomem *regs = mstk48t02_regs; |
524 | u8 sec, tmp; | 524 | u8 sec, tmp; |
525 | int i, count; | 525 | int i, count; |
526 | 526 | ||
@@ -604,7 +604,7 @@ static void __init kick_start_clock(void) | |||
604 | /* Return nonzero if the clock chip battery is low. */ | 604 | /* Return nonzero if the clock chip battery is low. */ |
605 | static int __init has_low_battery(void) | 605 | static int __init has_low_battery(void) |
606 | { | 606 | { |
607 | unsigned long regs = mstk48t02_regs; | 607 | void __iomem *regs = mstk48t02_regs; |
608 | u8 data1, data2; | 608 | u8 data1, data2; |
609 | 609 | ||
610 | spin_lock_irq(&mostek_lock); | 610 | spin_lock_irq(&mostek_lock); |
@@ -623,7 +623,7 @@ static int __init has_low_battery(void) | |||
623 | static void __init set_system_time(void) | 623 | static void __init set_system_time(void) |
624 | { | 624 | { |
625 | unsigned int year, mon, day, hour, min, sec; | 625 | unsigned int year, mon, day, hour, min, sec; |
626 | unsigned long mregs = mstk48t02_regs; | 626 | void __iomem *mregs = mstk48t02_regs; |
627 | #ifdef CONFIG_PCI | 627 | #ifdef CONFIG_PCI |
628 | unsigned long dregs = ds1287_regs; | 628 | unsigned long dregs = ds1287_regs; |
629 | #else | 629 | #else |
@@ -843,7 +843,8 @@ void __init clock_probe(void) | |||
843 | !strcmp(model, "m5823")) { | 843 | !strcmp(model, "m5823")) { |
844 | ds1287_regs = edev->resource[0].start; | 844 | ds1287_regs = edev->resource[0].start; |
845 | } else { | 845 | } else { |
846 | mstk48t59_regs = edev->resource[0].start; | 846 | mstk48t59_regs = (void __iomem *) |
847 | edev->resource[0].start; | ||
847 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 848 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
848 | } | 849 | } |
849 | break; | 850 | break; |
@@ -865,7 +866,8 @@ try_isa_clock: | |||
865 | !strcmp(model, "m5823")) { | 866 | !strcmp(model, "m5823")) { |
866 | ds1287_regs = isadev->resource.start; | 867 | ds1287_regs = isadev->resource.start; |
867 | } else { | 868 | } else { |
868 | mstk48t59_regs = isadev->resource.start; | 869 | mstk48t59_regs = (void __iomem *) |
870 | isadev->resource.start; | ||
869 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 871 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
870 | } | 872 | } |
871 | break; | 873 | break; |
@@ -893,21 +895,24 @@ try_isa_clock: | |||
893 | } | 895 | } |
894 | 896 | ||
895 | if(model[5] == '0' && model[6] == '2') { | 897 | if(model[5] == '0' && model[6] == '2') { |
896 | mstk48t02_regs = (((u64)clk_reg[0].phys_addr) | | 898 | mstk48t02_regs = (void __iomem *) |
897 | (((u64)clk_reg[0].which_io)<<32UL)); | 899 | (((u64)clk_reg[0].phys_addr) | |
900 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
898 | } else if(model[5] == '0' && model[6] == '8') { | 901 | } else if(model[5] == '0' && model[6] == '8') { |
899 | mstk48t08_regs = (((u64)clk_reg[0].phys_addr) | | 902 | mstk48t08_regs = (void __iomem *) |
900 | (((u64)clk_reg[0].which_io)<<32UL)); | 903 | (((u64)clk_reg[0].phys_addr) | |
904 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
901 | mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; | 905 | mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; |
902 | } else { | 906 | } else { |
903 | mstk48t59_regs = (((u64)clk_reg[0].phys_addr) | | 907 | mstk48t59_regs = (void __iomem *) |
904 | (((u64)clk_reg[0].which_io)<<32UL)); | 908 | (((u64)clk_reg[0].phys_addr) | |
909 | (((u64)clk_reg[0].which_io)<<32UL)); | ||
905 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; | 910 | mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; |
906 | } | 911 | } |
907 | break; | 912 | break; |
908 | } | 913 | } |
909 | 914 | ||
910 | if (mstk48t02_regs != 0UL) { | 915 | if (mstk48t02_regs != NULL) { |
911 | /* Report a low battery voltage condition. */ | 916 | /* Report a low battery voltage condition. */ |
912 | if (has_low_battery()) | 917 | if (has_low_battery()) |
913 | prom_printf("NVRAM: Low battery voltage!\n"); | 918 | prom_printf("NVRAM: Low battery voltage!\n"); |
@@ -1087,7 +1092,7 @@ unsigned long long sched_clock(void) | |||
1087 | static int set_rtc_mmss(unsigned long nowtime) | 1092 | static int set_rtc_mmss(unsigned long nowtime) |
1088 | { | 1093 | { |
1089 | int real_seconds, real_minutes, chip_minutes; | 1094 | int real_seconds, real_minutes, chip_minutes; |
1090 | unsigned long mregs = mstk48t02_regs; | 1095 | void __iomem *mregs = mstk48t02_regs; |
1091 | #ifdef CONFIG_PCI | 1096 | #ifdef CONFIG_PCI |
1092 | unsigned long dregs = ds1287_regs; | 1097 | unsigned long dregs = ds1287_regs; |
1093 | #else | 1098 | #else |