Commit a0f895bb authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/sparc-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents f38b18a0 fc83829c
......@@ -234,29 +234,13 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
#ifdef DEBUG_PTRACE
char *pt_rq [] = {
"TRACEME",
"PEEKTEXT",
"PEEKDATA",
"PEEKUSR",
"POKETEXT",
"POKEDATA",
"POKEUSR",
"CONT",
"KILL",
"SINGLESTEP",
"SUNATTACH",
"SUNDETACH",
"GETREGS",
"SETREGS",
"GETFPREGS",
"SETFPREGS",
"READDATA",
"WRITEDATA",
"READTEXT",
"WRITETEXT",
"GETFPAREGS",
"SETFPAREGS",
""
/* 0 */ "TRACEME", "PEEKTEXT", "PEEKDATA", "PEEKUSR",
/* 4 */ "POKETEXT", "POKEDATA", "POKEUSR", "CONT",
/* 8 */ "KILL", "SINGLESTEP", "SUNATTACH", "SUNDETACH",
/* 12 */ "GETREGS", "SETREGS", "GETFPREGS", "SETFPREGS",
/* 16 */ "READDATA", "WRITEDATA", "READTEXT", "WRITETEXT",
/* 20 */ "GETFPAREGS", "SETFPAREGS", "unknown", "unknown",
/* 24 */ "SYSCALL", ""
};
#endif
......@@ -285,7 +269,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
{
char *s;
if ((request > 0) && (request < 21))
if ((request >= 0) && (request <= 24))
s = pt_rq [request];
else
s = "unknown";
......
......@@ -1048,8 +1048,8 @@ static inline int check_nonblock(int ret, int fd)
return ret;
}
extern asmlinkage int sys_read(unsigned int fd,char *buf,int count);
extern asmlinkage int sys_write(unsigned int fd,char *buf,int count);
extern asmlinkage ssize_t sys_read(unsigned int fd,char *buf,int count);
extern asmlinkage ssize_t sys_write(unsigned int fd,char *buf,int count);
extern asmlinkage int sys_recv(int fd, void * ubuf, int size, unsigned flags);
extern asmlinkage int sys_send(int fd, void * buff, int len, unsigned flags);
extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen);
......
......@@ -181,11 +181,11 @@ extern void rs_init(void);
extern void clock_probe(void);
extern void power_init(void);
static void __init pcibios_init(void)
static int __init pcibios_init(void)
{
pci_controller_probe();
if (pci_controller_root == NULL)
return;
return 0;
pci_scan_each_controller_bus();
......@@ -197,6 +197,8 @@ static void __init pcibios_init(void)
rs_init();
clock_probe();
power_init();
return 0;
}
subsys_initcall(pcibios_init);
......
......@@ -586,13 +586,6 @@ void fault_in_user_windows(void)
* under SunOS are nothing short of bletcherous:
* Parent --> %o0 == childs pid, %o1 == 0
* Child --> %o0 == parents pid, %o1 == 1
*
* NOTE: We have a separate fork kpsr/kwim because
* the parent could change these values between
* sys_fork invocation and when we reach here
* if the parent should sleep while trying to
* allocate the task_struct and kernel stack in
* do_fork().
*/
int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
unsigned long unused,
......
......@@ -78,29 +78,13 @@ pt_os_succ_return (struct pt_regs *regs, unsigned long val, long *addr)
#ifdef DEBUG_PTRACE
char *pt_rq [] = {
"TRACEME",
"PEEKTEXT",
"PEEKDATA",
"PEEKUSR",
"POKETEXT",
"POKEDATA",
"POKEUSR",
"CONT",
"KILL",
"SINGLESTEP",
"SUNATTACH",
"SUNDETACH",
"GETREGS",
"SETREGS",
"GETFPREGS",
"SETFPREGS",
"READDATA",
"WRITEDATA",
"READTEXT",
"WRITETEXT",
"GETFPAREGS",
"SETFPAREGS",
""
/* 0 */ "TRACEME", "PEEKTEXT", "PEEKDATA", "PEEKUSR",
/* 4 */ "POKETEXT", "POKEDATA", "POKEUSR", "CONT",
/* 8 */ "KILL", "SINGLESTEP", "SUNATTACH", "SUNDETACH",
/* 12 */ "GETREGS", "SETREGS", "GETFPREGS", "SETFPREGS",
/* 16 */ "READDATA", "WRITEDATA", "READTEXT", "WRITETEXT",
/* 20 */ "GETFPAREGS", "SETFPAREGS", "unknown", "unknown",
/* 24 */ "SYSCALL", ""
};
#endif
......@@ -134,7 +118,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
{
char *s;
if ((request > 0) && (request < 21))
if ((request >= 0) && (request <= 24))
s = pt_rq [request];
else
s = "unknown";
......
......@@ -372,6 +372,10 @@ void VISenter(void);
/* RAID code needs this */
EXPORT_SYMBOL_NOVERS(VISenter);
extern void batten_down_hatches(void);
/* for input/keybdev */
EXPORT_SYMBOL(batten_down_hatches);
#ifdef CONFIG_DEBUG_BUGVERBOSE
EXPORT_SYMBOL(do_BUG);
#endif
......@@ -1198,8 +1198,8 @@ static inline int check_nonblock(int ret, int fd)
return ret;
}
extern asmlinkage int sys_read(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage int sys_write(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage ssize_t sys_read(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage ssize_t sys_write(unsigned int fd, char *buf, unsigned long count);
extern asmlinkage int sys_recv(int fd, void *ubuf, size_t size, unsigned flags);
extern asmlinkage int sys_send(int fd, void *buff, size_t len, unsigned flags);
extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen);
......
......@@ -5,6 +5,7 @@
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/sched.h>
#include <asm/io.h>
......
......@@ -10,9 +10,9 @@
#include <linux/compiler.h>
#include <asm/byteorder.h>
extern long ___test_and_set_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_clear_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_change_bit(unsigned long nr, volatile void *addr);
extern long ___test_and_set_bit(unsigned long nr, volatile unsigned long *addr);
extern long ___test_and_clear_bit(unsigned long nr, volatile unsigned long *addr);
extern long ___test_and_change_bit(unsigned long nr, volatile unsigned long *addr);
#define test_and_set_bit(nr,addr) ({___test_and_set_bit(nr,addr)!=0;})
#define test_and_clear_bit(nr,addr) ({___test_and_clear_bit(nr,addr)!=0;})
......@@ -22,52 +22,64 @@ extern long ___test_and_change_bit(unsigned long nr, volatile void *addr);
#define change_bit(nr,addr) ((void)___test_and_change_bit(nr,addr))
/* "non-atomic" versions... */
#define __set_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m |= (1UL << (__nr & 63)); \
} while (0)
#define __clear_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m &= ~(1UL << (__nr & 63)); \
} while (0)
#define __change_bit(X,Y) \
do { unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
*__m ^= (1UL << (__nr & 63)); \
} while (0)
#define __test_and_set_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old | __mask); \
((__old & __mask) != 0); \
})
#define __test_and_clear_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old & ~__mask); \
((__old & __mask) != 0); \
})
#define __test_and_change_bit(X,Y) \
({ unsigned long __nr = (X); \
long *__m = ((long *) (Y)) + (__nr >> 6); \
long __old = *__m; \
long __mask = (1UL << (__nr & 63)); \
*__m = (__old ^ __mask); \
((__old & __mask) != 0); \
})
static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m |= (1UL << (nr & 63));
}
static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m &= ~(1UL << (nr & 63));
}
static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
*m ^= (1UL << (nr & 63));
}
static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old | mask);
return ((old & mask) != 0);
}
static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old & ~mask);
return ((old & mask) != 0);
}
static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
{
volatile unsigned long *m = addr + (nr >> 6);
long old = *m;
long mask = (1UL << (nr & 63));
*m = (old ^ mask);
return ((old & mask) != 0);
}
#define smp_mb__before_clear_bit() do { } while(0)
#define smp_mb__after_clear_bit() do { } while(0)
static __inline__ int test_bit(int nr, __const__ void *addr)
static __inline__ int test_bit(int nr, __const__ volatile unsigned long *addr)
{
return (1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63))) != 0UL;
return (1UL & ((addr)[nr >> 6] >> (nr & 63))) != 0UL;
}
/* The easy/cheese version for now. */
......@@ -177,9 +189,9 @@ static __inline__ unsigned int hweight8(unsigned int w)
* @offset: The bitnumber to start searching at
* @size: The maximum size to search
*/
static __inline__ unsigned long find_next_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -231,9 +243,9 @@ static __inline__ unsigned long find_next_bit(void *addr, unsigned long size, un
* on Linus's ALPHA routines, which are pretty portable BTW.
*/
static __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -272,15 +284,15 @@ static __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long siz
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
extern long ___test_and_set_le_bit(int nr, volatile void *addr);
extern long ___test_and_clear_le_bit(int nr, volatile void *addr);
extern long ___test_and_set_le_bit(int nr, volatile unsigned long *addr);
extern long ___test_and_clear_le_bit(int nr, volatile unsigned long *addr);
#define test_and_set_le_bit(nr,addr) ({___test_and_set_le_bit(nr,addr)!=0;})
#define test_and_clear_le_bit(nr,addr) ({___test_and_clear_le_bit(nr,addr)!=0;})
#define set_le_bit(nr,addr) ((void)___test_and_set_le_bit(nr,addr))
#define clear_le_bit(nr,addr) ((void)___test_and_clear_le_bit(nr,addr))
static __inline__ int test_le_bit(int nr, __const__ void * addr)
static __inline__ int test_le_bit(int nr, __const__ unsigned long * addr)
{
int mask;
__const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
......@@ -293,9 +305,9 @@ static __inline__ int test_le_bit(int nr, __const__ void * addr)
#define find_first_zero_le_bit(addr, size) \
find_next_zero_le_bit((addr), (size), 0)
static __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long size, unsigned long offset)
static __inline__ unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, unsigned long offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
unsigned long *p = addr + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;
......@@ -332,18 +344,22 @@ static __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long
#ifdef __KERNEL__
#define ext2_set_bit test_and_set_le_bit
#define ext2_clear_bit test_and_clear_le_bit
#define ext2_test_bit test_le_bit
#define ext2_find_first_zero_bit find_first_zero_le_bit
#define ext2_find_next_zero_bit find_next_zero_le_bit
#define ext2_set_bit(nr,addr) test_and_set_le_bit((nr),(unsigned long *)(addr))
#define ext2_clear_bit(nr,addr) test_and_clear_le_bit((nr),(unsigned long *)(addr))
#define ext2_test_bit(nr,addr) test_le_bit((nr),(unsigned long *)(addr))
#define ext2_find_first_zero_bit(addr, size) \
find_first_zero_le_bit((unsigned long *)(addr), (size))
#define ext2_find_next_zero_bit(addr, size, off) \
find_next_zero_le_bit((unsigned long *)(addr), (size), (off))
/* Bitmap functions for the minix filesystem. */
#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
#define minix_set_bit(nr,addr) set_bit(nr,addr)
#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define minix_test_and_set_bit(nr,addr) test_and_set_bit((nr),(unsigned long *)(addr))
#define minix_set_bit(nr,addr) set_bit((nr),(unsigned long *)(addr))
#define minix_test_and_clear_bit(nr,addr) \
test_and_clear_bit((nr),(unsigned long *)(addr))
#define minix_test_bit(nr,addr) test_bit((nr),(unsigned long *)(addr))
#define minix_find_first_zero_bit(addr,size) \
find_first_zero_bit((unsigned long *)(addr),(size))
#endif /* __KERNEL__ */
......
......@@ -10,8 +10,6 @@
#include <asm/pstate.h>
#include <asm/ptrace.h>
#define AOFF_task_fpregs (((ASIZ_task) + (64 - 1)) & ~(64 - 1))
/* Clobbers %o5, %g1, %g2, %g3, %g7, %icc, %xcc */
#define VISEntry \
......
......@@ -765,23 +765,25 @@ do { \
do { \
if (r) \
{ \
unsigned rtype ur_; \
X##_c = FP_CLS_NORMAL; \
\
if ((X##_s = (r < 0))) \
r = -r; \
\
ur_ = (unsigned rtype) r; \
if (rsize <= _FP_W_TYPE_SIZE) \
__FP_CLZ(X##_e, r); \
__FP_CLZ(X##_e, ur_); \
else \
__FP_CLZ_2(X##_e, (_FP_W_TYPE)(r >> _FP_W_TYPE_SIZE), \
(_FP_W_TYPE)r); \
__FP_CLZ_2(X##_e, (_FP_W_TYPE)(ur_ >> _FP_W_TYPE_SIZE), \
(_FP_W_TYPE)ur_); \
if (rsize < _FP_W_TYPE_SIZE) \
X##_e -= (_FP_W_TYPE_SIZE - rsize); \
X##_e = rsize - X##_e - 1; \
\
if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \
__FP_FRAC_SRS_1(r, (X##_e - _FP_WFRACBITS_##fs + 1), rsize); \
_FP_FRAC_DISASSEMBLE_##wc(X, ((unsigned rtype)r), rsize); \
__FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
_FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
_FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \
} \
......
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