Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix NMI startup bug which also breaks perf.
sparc: fix size argument to find_next_zero_bit()
sparc: use bitmap_set()
sparc32: unaligned memory access (MNA) trap handler bug

+10 -10
+2
arch/sparc/include/asm/pcr.h
··· 43 43 44 44 extern u64 pcr_enable; 45 45 46 + extern int pcr_arch_init(void); 47 + 46 48 #endif /* __PCR_H */
+2 -3
arch/sparc/kernel/iommu.c
··· 255 255 static int iommu_alloc_ctx(struct iommu *iommu) 256 256 { 257 257 int lowest = iommu->ctx_lowest_free; 258 - int sz = IOMMU_NUM_CTXS - lowest; 259 - int n = find_next_zero_bit(iommu->ctx_bitmap, sz, lowest); 258 + int n = find_next_zero_bit(iommu->ctx_bitmap, IOMMU_NUM_CTXS, lowest); 260 259 261 - if (unlikely(n == sz)) { 260 + if (unlikely(n == IOMMU_NUM_CTXS)) { 262 261 n = find_next_zero_bit(iommu->ctx_bitmap, lowest, 1); 263 262 if (unlikely(n == lowest)) { 264 263 printk(KERN_WARNING "IOMMU: Ran out of contexts.\n");
-2
arch/sparc/kernel/pcr.c
··· 167 167 unregister_perf_hsvc(); 168 168 return err; 169 169 } 170 - 171 - early_initcall(pcr_arch_init);
+2
arch/sparc/kernel/smp_64.c
··· 49 49 #include <asm/mdesc.h> 50 50 #include <asm/ldc.h> 51 51 #include <asm/hypervisor.h> 52 + #include <asm/pcr.h> 52 53 53 54 #include "cpumap.h" 54 55 ··· 1359 1358 1360 1359 void __init smp_cpus_done(unsigned int max_cpus) 1361 1360 { 1361 + pcr_arch_init(); 1362 1362 } 1363 1363 1364 1364 void smp_send_reschedule(int cpu)
+2 -2
arch/sparc/kernel/una_asm_32.S
··· 24 24 .globl __do_int_store 25 25 __do_int_store: 26 26 ld [%o2], %g1 27 - cmp %1, 2 27 + cmp %o1, 2 28 28 be 2f 29 - cmp %1, 4 29 + cmp %o1, 4 30 30 be 1f 31 31 srl %g1, 24, %g2 32 32 srl %g1, 16, %g7
+2 -3
arch/sparc/lib/bitext.c
··· 10 10 */ 11 11 12 12 #include <linux/string.h> 13 - #include <linux/bitops.h> 13 + #include <linux/bitmap.h> 14 14 15 15 #include <asm/bitext.h> 16 16 ··· 80 80 while (test_bit(offset + i, t->map) == 0) { 81 81 i++; 82 82 if (i == len) { 83 - for (i = 0; i < len; i++) 84 - __set_bit(offset + i, t->map); 83 + bitmap_set(t->map, offset, len); 85 84 if (offset == t->first_free) 86 85 t->first_free = find_next_zero_bit 87 86 (t->map, t->size,