Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Feb 18, 2011
2 parents fa7ea87 + b62818e commit a0aeccd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions arch/sparc/include/asm/pcr.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ static inline u64 picl_value(unsigned int nmi_hz)

extern u64 pcr_enable;

extern int pcr_arch_init(void);

#endif /* __PCR_H */
5 changes: 2 additions & 3 deletions arch/sparc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,9 @@ static inline iopte_t *alloc_npages(struct device *dev, struct iommu *iommu,
static int iommu_alloc_ctx(struct iommu *iommu)
{
int lowest = iommu->ctx_lowest_free;
int sz = IOMMU_NUM_CTXS - lowest;
int n = find_next_zero_bit(iommu->ctx_bitmap, sz, lowest);
int n = find_next_zero_bit(iommu->ctx_bitmap, IOMMU_NUM_CTXS, lowest);

if (unlikely(n == sz)) {
if (unlikely(n == IOMMU_NUM_CTXS)) {
n = find_next_zero_bit(iommu->ctx_bitmap, lowest, 1);
if (unlikely(n == lowest)) {
printk(KERN_WARNING "IOMMU: Ran out of contexts.\n");
Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/kernel/pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,3 @@ int __init pcr_arch_init(void)
unregister_perf_hsvc();
return err;
}

early_initcall(pcr_arch_init);
2 changes: 2 additions & 0 deletions arch/sparc/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <asm/mdesc.h>
#include <asm/ldc.h>
#include <asm/hypervisor.h>
#include <asm/pcr.h>

#include "cpumap.h"

Expand Down Expand Up @@ -1358,6 +1359,7 @@ void __cpu_die(unsigned int cpu)

void __init smp_cpus_done(unsigned int max_cpus)
{
pcr_arch_init();
}

void smp_send_reschedule(int cpu)
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/una_asm_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ retl_efault:
.globl __do_int_store
__do_int_store:
ld [%o2], %g1
cmp %1, 2
cmp %o1, 2
be 2f
cmp %1, 4
cmp %o1, 4
be 1f
srl %g1, 24, %g2
srl %g1, 16, %g7
Expand Down
5 changes: 2 additions & 3 deletions arch/sparc/lib/bitext.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

#include <linux/string.h>
#include <linux/bitops.h>
#include <linux/bitmap.h>

#include <asm/bitext.h>

Expand Down Expand Up @@ -80,8 +80,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
while (test_bit(offset + i, t->map) == 0) {
i++;
if (i == len) {
for (i = 0; i < len; i++)
__set_bit(offset + i, t->map);
bitmap_set(t->map, offset, len);
if (offset == t->first_free)
t->first_free = find_next_zero_bit
(t->map, t->size,
Expand Down

0 comments on commit a0aeccd

Please sign in to comment.