diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:56:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:56:44 -0500 |
commit | b7f3a209e9b09b3110ea084836c75f2cd26b29f2 (patch) | |
tree | b5f77cb3f2eab58a2a2f3705fdd08bd39ea02a3f /arch/sparc/kernel | |
parent | 6d6b89bd2e316b78d668f761d380837b81fa71ef (diff) | |
parent | 4b17764737bb4ee3364b8bfa2059f51ebc19ccd6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6:
sparc: Support show_unhandled_signals.
sparc: use __ratelimit
sunxvr500: Additional PCI id for sunxvr500 driver
sparc: use asm-generic/scatterlist.h
sparc64: If 'slot-names' property exist, create sysfs PCI slot information.
sparc: remove trailing space in messages
sparc: remove redundant return statements
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/devices.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 75 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4d_smp.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/unaligned_64.c | 11 |
8 files changed, 82 insertions, 18 deletions
diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c index b062de9424a4..62dc7a021413 100644 --- a/arch/sparc/kernel/devices.c +++ b/arch/sparc/kernel/devices.c | |||
@@ -143,6 +143,4 @@ void __init device_scan(void) | |||
143 | 143 | ||
144 | if (ARCH_SUN4C) | 144 | if (ARCH_SUN4C) |
145 | sun4c_probe_memerr_reg(); | 145 | sun4c_probe_memerr_reg(); |
146 | |||
147 | return; | ||
148 | } | 146 | } |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 87f1760c0aa2..0409d62d8ca2 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -124,7 +124,7 @@ void __init leon_init_timers(irq_handler_t counter_fn) | |||
124 | 124 | ||
125 | if (!(LEON3_BYPASS_LOAD_PA(&leon3_gptimer_regs->config) & | 125 | if (!(LEON3_BYPASS_LOAD_PA(&leon3_gptimer_regs->config) & |
126 | (1<<LEON3_GPTIMER_SEPIRQ))) { | 126 | (1<<LEON3_GPTIMER_SEPIRQ))) { |
127 | prom_printf("irq timer not configured with seperate irqs \n"); | 127 | prom_printf("irq timer not configured with separate irqs\n"); |
128 | BUG(); | 128 | BUG(); |
129 | } | 129 | } |
130 | 130 | ||
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 05c0dadd6371..85787577f683 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -177,7 +177,7 @@ void __init leon_boot_cpus(void) | |||
177 | int nrcpu = leon_smp_nrcpus(); | 177 | int nrcpu = leon_smp_nrcpus(); |
178 | int me = smp_processor_id(); | 178 | int me = smp_processor_id(); |
179 | 179 | ||
180 | printk(KERN_INFO "%d:(%d:%d) cpus mpirq at 0x%x \n", (unsigned int)me, | 180 | printk(KERN_INFO "%d:(%d:%d) cpus mpirq at 0x%x\n", (unsigned int)me, |
181 | (unsigned int)nrcpu, (unsigned int)NR_CPUS, | 181 | (unsigned int)nrcpu, (unsigned int)NR_CPUS, |
182 | (unsigned int)&(leon3_irqctrl_regs->mpstatus)); | 182 | (unsigned int)&(leon3_irqctrl_regs->mpstatus)); |
183 | 183 | ||
@@ -226,7 +226,7 @@ int __cpuinit leon_boot_one_cpu(int i) | |||
226 | break; | 226 | break; |
227 | udelay(200); | 227 | udelay(200); |
228 | } | 228 | } |
229 | printk(KERN_INFO "Started CPU %d \n", (unsigned int)i); | 229 | printk(KERN_INFO "Started CPU %d\n", (unsigned int)i); |
230 | 230 | ||
231 | if (!(cpu_callin_map[i])) { | 231 | if (!(cpu_callin_map[i])) { |
232 | printk(KERN_ERR "Processor %d is stuck.\n", i); | 232 | printk(KERN_ERR "Processor %d is stuck.\n", i); |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 37b66c60abe3..5ac539a5930f 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1095,3 +1095,78 @@ static int __init pcibios_init(void) | |||
1095 | return 0; | 1095 | return 0; |
1096 | } | 1096 | } |
1097 | subsys_initcall(pcibios_init); | 1097 | subsys_initcall(pcibios_init); |
1098 | |||
1099 | #ifdef CONFIG_SYSFS | ||
1100 | static void __devinit pci_bus_slot_names(struct device_node *node, | ||
1101 | struct pci_bus *bus) | ||
1102 | { | ||
1103 | const struct pci_slot_names { | ||
1104 | u32 slot_mask; | ||
1105 | char names[0]; | ||
1106 | } *prop; | ||
1107 | const char *sp; | ||
1108 | int len, i; | ||
1109 | u32 mask; | ||
1110 | |||
1111 | prop = of_get_property(node, "slot-names", &len); | ||
1112 | if (!prop) | ||
1113 | return; | ||
1114 | |||
1115 | mask = prop->slot_mask; | ||
1116 | sp = prop->names; | ||
1117 | |||
1118 | if (ofpci_verbose) | ||
1119 | printk("PCI: Making slots for [%s] mask[0x%02x]\n", | ||
1120 | node->full_name, mask); | ||
1121 | |||
1122 | i = 0; | ||
1123 | while (mask) { | ||
1124 | struct pci_slot *pci_slot; | ||
1125 | u32 this_bit = 1 << i; | ||
1126 | |||
1127 | if (!(mask & this_bit)) { | ||
1128 | i++; | ||
1129 | continue; | ||
1130 | } | ||
1131 | |||
1132 | if (ofpci_verbose) | ||
1133 | printk("PCI: Making slot [%s]\n", sp); | ||
1134 | |||
1135 | pci_slot = pci_create_slot(bus, i, sp, NULL); | ||
1136 | if (IS_ERR(pci_slot)) | ||
1137 | printk(KERN_ERR "PCI: pci_create_slot returned %ld\n", | ||
1138 | PTR_ERR(pci_slot)); | ||
1139 | |||
1140 | sp += strlen(sp) + 1; | ||
1141 | mask &= ~this_bit; | ||
1142 | i++; | ||
1143 | } | ||
1144 | } | ||
1145 | |||
1146 | static int __init of_pci_slot_init(void) | ||
1147 | { | ||
1148 | struct pci_bus *pbus = NULL; | ||
1149 | |||
1150 | while ((pbus = pci_find_next_bus(pbus)) != NULL) { | ||
1151 | struct device_node *node; | ||
1152 | |||
1153 | if (pbus->self) { | ||
1154 | struct dev_archdata *sd = pbus->self->sysdata; | ||
1155 | |||
1156 | /* PCI->PCI bridge */ | ||
1157 | node = sd->prom_node; | ||
1158 | } else { | ||
1159 | struct pci_pbm_info *pbm = pbus->sysdata; | ||
1160 | |||
1161 | /* Host PCI controller */ | ||
1162 | node = pbm->op->node; | ||
1163 | } | ||
1164 | |||
1165 | pci_bus_slot_names(node, pbus); | ||
1166 | } | ||
1167 | |||
1168 | return 0; | ||
1169 | } | ||
1170 | |||
1171 | module_init(of_pci_slot_init); | ||
1172 | #endif | ||
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 75e88c00bca3..d36a8d391ca0 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -585,8 +585,6 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node) | |||
585 | writew(ivec, pcic->pcic_regs+PCI_INT_SELECT_LO); | 585 | writew(ivec, pcic->pcic_regs+PCI_INT_SELECT_LO); |
586 | } | 586 | } |
587 | } | 587 | } |
588 | |||
589 | return; | ||
590 | } | 588 | } |
591 | 589 | ||
592 | /* | 590 | /* |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 9be2af55c5cd..b22ce6100403 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -95,8 +95,6 @@ static void prom_sync_me(void) | |||
95 | "nop\n\t" | 95 | "nop\n\t" |
96 | "nop\n\t" : : "r" (prom_tbr)); | 96 | "nop\n\t" : : "r" (prom_tbr)); |
97 | local_irq_restore(flags); | 97 | local_irq_restore(flags); |
98 | |||
99 | return; | ||
100 | } | 98 | } |
101 | 99 | ||
102 | static unsigned int boot_flags __initdata = 0; | 100 | static unsigned int boot_flags __initdata = 0; |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 68791cad7b74..482f2ab92692 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -194,7 +194,7 @@ int __cpuinit smp4d_boot_one_cpu(int i) | |||
194 | smp_penguin_ctable.reg_size = 0; | 194 | smp_penguin_ctable.reg_size = 0; |
195 | 195 | ||
196 | /* whirrr, whirrr, whirrrrrrrrr... */ | 196 | /* whirrr, whirrr, whirrrrrrrrr... */ |
197 | SMP_PRINTK(("Starting CPU %d at %p \n", i, entry)); | 197 | SMP_PRINTK(("Starting CPU %d at %p\n", i, entry)); |
198 | local_flush_cache_all(); | 198 | local_flush_cache_all(); |
199 | prom_startcpu(cpu_node, | 199 | prom_startcpu(cpu_node, |
200 | &smp_penguin_ctable, 0, (char *)entry); | 200 | &smp_penguin_ctable, 0, (char *)entry); |
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c index 378ca82b9ccc..ebce43018c49 100644 --- a/arch/sparc/kernel/unaligned_64.c +++ b/arch/sparc/kernel/unaligned_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/perf_event.h> | 23 | #include <linux/perf_event.h> |
24 | #include <linux/ratelimit.h> | ||
24 | #include <asm/fpumacro.h> | 25 | #include <asm/fpumacro.h> |
25 | 26 | ||
26 | enum direction { | 27 | enum direction { |
@@ -274,13 +275,9 @@ static void kernel_mna_trap_fault(int fixup_tstate_asi) | |||
274 | 275 | ||
275 | static void log_unaligned(struct pt_regs *regs) | 276 | static void log_unaligned(struct pt_regs *regs) |
276 | { | 277 | { |
277 | static unsigned long count, last_time; | 278 | static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5); |
278 | 279 | ||
279 | if (time_after(jiffies, last_time + 5 * HZ)) | 280 | if (__ratelimit(&ratelimit)) { |
280 | count = 0; | ||
281 | if (count < 5) { | ||
282 | last_time = jiffies; | ||
283 | count++; | ||
284 | printk("Kernel unaligned access at TPC[%lx] %pS\n", | 281 | printk("Kernel unaligned access at TPC[%lx] %pS\n", |
285 | regs->tpc, (void *) regs->tpc); | 282 | regs->tpc, (void *) regs->tpc); |
286 | } | 283 | } |
@@ -636,7 +633,6 @@ daex: | |||
636 | return; | 633 | return; |
637 | } | 634 | } |
638 | advance(regs); | 635 | advance(regs); |
639 | return; | ||
640 | } | 636 | } |
641 | 637 | ||
642 | void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr) | 638 | void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr) |
@@ -685,5 +681,4 @@ daex: | |||
685 | return; | 681 | return; |
686 | } | 682 | } |
687 | advance(regs); | 683 | advance(regs); |
688 | return; | ||
689 | } | 684 | } |