diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-28 22:00:09 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-28 22:00:09 +0000 |
commit | 1a1d77dd589de5a567fa95e36aa6999c704ceca4 (patch) | |
tree | 141e31f89f18b9fe0831f31852e0435ceaccafc5 /include/asm-sparc | |
parent | fb9c690a18b3d66925a65b17441c37fa14d4370b (diff) |
Merge with 2.4.0-test7.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/bitops.h | 10 | ||||
-rw-r--r-- | include/asm-sparc/fcntl.h | 15 | ||||
-rw-r--r-- | include/asm-sparc/md.h | 13 | ||||
-rw-r--r-- | include/asm-sparc/mmu_context.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/page.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/pgtable.h | 8 | ||||
-rw-r--r-- | include/asm-sparc/spinlock.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/unistd.h | 8 |
8 files changed, 39 insertions, 28 deletions
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h index 16daf7a3a..8ab8bdaf0 100644 --- a/include/asm-sparc/bitops.h +++ b/include/asm-sparc/bitops.h @@ -1,4 +1,4 @@ -/* $Id: bitops.h,v 1.59 2000/07/13 01:51:50 davem Exp $ +/* $Id: bitops.h,v 1.60 2000/08/10 23:49:16 davem Exp $ * bitops.h: Bit string operations on the Sparc. * * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) @@ -232,6 +232,8 @@ extern __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long siz found_first: tmp |= ~0UL << size; + if (tmp == ~0UL) /* Are any bits zero? */ + return result + size; /* Nope. */ found_middle: return result + ffz(tmp); } @@ -379,7 +381,11 @@ extern __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long tmp = *p; found_first: - return result + ffz(__swab32(tmp) | (~0UL << size)); + tmp = __swab32(tmp) | (~0UL << size); + if (tmp == ~0UL) /* Are any bits zero? */ + return result + size; /* Nope. */ + return result + ffz(tmp); + found_middle: return result + ffz(__swab32(tmp)); } diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index 2a373ed60..344765930 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h @@ -1,4 +1,4 @@ -/* $Id: fcntl.h,v 1.13 2000/07/06 01:41:45 davem Exp $ */ +/* $Id: fcntl.h,v 1.14 2000/08/12 20:49:49 jj Exp $ */ #ifndef _SPARC_FCNTL_H #define _SPARC_FCNTL_H @@ -34,6 +34,10 @@ #define F_SETSIG 10 /* for sockets. */ #define F_GETSIG 11 /* for sockets. */ +#define F_GETLK64 12 /* using 'struct flock64' */ +#define F_SETLK64 13 +#define F_SETLKW64 14 + /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ @@ -62,4 +66,13 @@ struct flock { short __unused; }; +struct flock64 { + short l_type; + short l_whence; + loff_t l_start; + loff_t l_len; + pid_t l_pid; + short __unused; +}; + #endif diff --git a/include/asm-sparc/md.h b/include/asm-sparc/md.h deleted file mode 100644 index e0d0e85a5..000000000 --- a/include/asm-sparc/md.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: md.h,v 1.1 1997/12/15 15:12:39 jj Exp $ - * md.h: High speed xor_block operation for RAID4/5 - * - */ - -#ifndef __ASM_MD_H -#define __ASM_MD_H - -/* #define HAVE_ARCH_XORBLOCK */ - -#define MD_XORBLOCK_ALIGNMENT sizeof(long) - -#endif /* __ASM_MD_H */ diff --git a/include/asm-sparc/mmu_context.h b/include/asm-sparc/mmu_context.h index 604c447a9..274707e2d 100644 --- a/include/asm-sparc/mmu_context.h +++ b/include/asm-sparc/mmu_context.h @@ -13,7 +13,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, * Initialize a new mmu context. This is invoked when a new * address space instance (unique or shared) is instantiated. */ -#define init_new_context(tsk, mm) ((mm)->context = NO_CONTEXT) +#define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0) /* * Destroy a dead context. This occurs when mmput drops the diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 47022fbba..e6373384f 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h @@ -1,4 +1,4 @@ -/* $Id: page.h,v 1.53 2000/06/04 08:36:33 anton Exp $ +/* $Id: page.h,v 1.54 2000/08/10 01:04:53 davem Exp $ * page.h: Various defines and such for MMU operations on the Sparc for * the Linux kernel. * diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 2debbf084..8562fc287 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h @@ -1,4 +1,4 @@ -/* $Id: pgtable.h,v 1.101 2000/08/09 00:00:17 davem Exp $ */ +/* $Id: pgtable.h,v 1.102 2000/08/14 00:46:13 anton Exp $ */ #ifndef _SPARC_PGTABLE_H #define _SPARC_PGTABLE_H @@ -201,11 +201,9 @@ extern unsigned long empty_zero_page; #define SIZEOF_PTR_LOG2 2 -BTFIXUPDEF_CALL_CONST(unsigned long, sparc_pte_pagenr, pte_t) BTFIXUPDEF_CALL_CONST(unsigned long, pmd_page, pmd_t) BTFIXUPDEF_CALL_CONST(unsigned long, pgd_page, pgd_t) -#define sparc_pte_pagenr(pte) BTFIXUP_CALL(sparc_pte_pagenr)(pte) #define pmd_page(pmd) BTFIXUP_CALL(pmd_page)(pmd) #define pgd_page(pgd) BTFIXUP_CALL(pgd_page)(pgd) @@ -305,7 +303,9 @@ BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) /* Permanent address of a page. */ #define page_address(page) ((page)->virtual) -#define pte_page(x) (mem_map+sparc_pte_pagenr(x)) + +BTFIXUPDEF_CALL(struct page *, pte_page, pte_t) +#define pte_page(pte) BTFIXUP_CALL(pte_page)(pte) /* * Conversion functions: convert a page and protection to a page entry, diff --git a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h index 0b3df22b9..84b0f03f5 100644 --- a/include/asm-sparc/spinlock.h +++ b/include/asm-sparc/spinlock.h @@ -16,7 +16,7 @@ * Define this to use the verbose/debugging versions in * arch/sparc/lib/debuglocks.c * - * Be sure to make check_asm whenever changing this option. + * Be sure to make dep whenever changing this option. */ #define SPIN_LOCK_DEBUG @@ -28,7 +28,7 @@ struct _spinlock_debug { typedef struct _spinlock_debug spinlock_t; #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0, 0 } -#define spin_lock_init(lp) do { (lp)->owner_pc = 0; (lp)->lock = 0; } while(0) +#define spin_lock_init(lp) do { *(lp)= SPIN_LOCK_UNLOCKED; } while(0) #define spin_is_locked(lp) (*((volatile unsigned char *)(&((lp)->lock))) != 0) #define spin_unlock_wait(lp) do { barrier(); } while(*(volatile unsigned char *)(&(lp)->lock)) @@ -49,6 +49,8 @@ typedef struct _rwlock_debug rwlock_t; #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, {0} } +#define rwlock_init(lp) do { *(lp)= RW_LOCK_UNLOCKED; } while(0) + extern void _do_read_lock(rwlock_t *rw, char *str); extern void _do_read_unlock(rwlock_t *rw, char *str); extern void _do_write_lock(rwlock_t *rw, char *str); @@ -144,6 +146,9 @@ typedef struct { volatile unsigned int lock; } rwlock_t; #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } +#define rwlock_init(lp) do { *(lp)= RW_LOCK_UNLOCKED; } while(0) + + /* Sort of like atomic_t's on Sparc, but even more clever. * * ------------------------------------ diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 989c6742c..741949c5e 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -1,4 +1,4 @@ -/* $Id: unistd.h,v 1.66 2000/01/29 17:57:25 jj Exp $ */ +/* $Id: unistd.h,v 1.70 2000/08/14 05:39:07 jj Exp $ */ #ifndef _SPARC_UNISTD_H #define _SPARC_UNISTD_H @@ -67,7 +67,7 @@ #define __NR_geteuid 49 /* SunOS calls getuid() */ #define __NR_getegid 50 /* SunOS calls getgid() */ #define __NR_acct 51 /* Common */ -/* #define __NR_ni_syscall 52 ENOSYS under SunOS */ +/* #define __NR_memory_ordering 52 Linux sparc64 specific */ #define __NR_getgid32 53 /* Linux sparc32 specific */ #define __NR_ioctl 54 /* Common */ #define __NR_reboot 55 /* Common */ @@ -169,8 +169,8 @@ /* #define __NR_getmsg 151 SunOS Specific */ /* #define __NR_putmsg 152 SunOS Specific */ #define __NR_poll 153 /* Common */ -/* #define __NR_ni_syscall 154 ENOSYS under SunOS */ -/* #define __NR_nfssvc 155 SunOS Specific */ +#define __NR_getdents64 154 /* Linux specific */ +#define __NR_fcntl64 155 /* Linux sparc32 Specific */ /* #define __NR_getdirentries 156 SunOS Specific */ #define __NR_statfs 157 /* Common */ #define __NR_fstatfs 158 /* Common */ |