Commit 527457d7 authored by Paul Jackson's avatar Paul Jackson Committed by Linus Torvalds

[PATCH] sparc32 cpumask bitop build fix

With the following changes, I was able to compile the "sparc" (32 bit)
arch, using defconfig and crosstool.  There were still plenty of warnings,
but nothing else relating to bitops or cpumasks that I noticed.  This is
working with 2.6.7-mm5.

I have no way to boot test this, but these changes seem obvious enough that
I'd recommend including them.
Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe783356
......@@ -366,9 +366,9 @@ static inline unsigned long find_next_zero_bit(unsigned long *addr,
*
* Scheduler induced bitop, do not use.
*/
static inline int find_next_bit(unsigned long *addr, int size, int offset)
static inline int find_next_bit(const unsigned long *addr, int size, int offset)
{
unsigned long *p = addr + (offset >> 5);
const unsigned long *p = addr + (offset >> 5);
int num = offset & ~0x1f;
unsigned long word;
......@@ -384,6 +384,17 @@ static inline int find_next_bit(unsigned long *addr, int size, int offset)
return num;
}
/**
* find_first_bit - find the first set bit in a memory region
* @addr: The address to start the search at
* @size: The maximum size to search
*
* Returns the bit-number of the first set bit, not the number of the byte
* containing a bit.
*/
#define find_first_bit(addr, size) \
find_next_bit((addr), (size), 0)
/*
*/
static inline int test_le_bit(int nr, __const__ unsigned long * addr)
......
......@@ -126,7 +126,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
#define switch_to(prev, next, last) do { \
SWITCH_ENTER(prev); \
SWITCH_DO_LAZY_FPU(next); \
next->active_mm->cpu_vm_mask |= (1 << smp_processor_id()); \
cpu_set(smp_processor_id(), next->active_mm->cpu_vm_mask); \
__asm__ __volatile__( \
"sethi %%hi(here - 0x8), %%o7\n\t" \
"mov %%g6, %%g3\n\t" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment