Commit 9511b3bb authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents e121e75f 90e54641
......@@ -486,6 +486,21 @@ setup_arch(char **cmdline_p)
hwrpb = (struct hwrpb_struct*) __va(INIT_HWRPB->phys_addr);
boot_cpuid = hard_smp_processor_id();
/*
* Pre-process the system type to make sure it will be valid.
*
* This may restore real CABRIO and EB66+ family names, ie
* EB64+ and EB66.
*
* Oh, and "white box" AS800 (aka DIGITAL Server 3000 series)
* and AS1200 (DIGITAL Server 5000 series) have the type as
* the negative of the real one.
*/
if ((long)hwrpb->sys_type < 0) {
hwrpb->sys_type = -((long)hwrpb->sys_type);
hwrpb_update_checksum(hwrpb);
}
/* Register a call for panic conditions. */
notifier_chain_register(&panic_notifier_list, &alpha_panic_block);
......
......@@ -38,7 +38,7 @@
#define curptr g6
#define NR_SYSCALLS 268 /* Each OS is different... */
#define NR_SYSCALLS 272 /* Each OS is different... */
/* These are just handy. */
#define _SV save %sp, -STACKFRAME_SZ, %sp
......
......@@ -72,7 +72,8 @@ sys_call_table:
/*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
/*255*/ .long sys_nis_syscall, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
/*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_nis_syscall
/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy
/*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_nis_syscall
#ifdef CONFIG_SUNOS_EMUL
/* Now the SunOS syscall table. */
......@@ -172,5 +173,8 @@ sunos_sys_table:
/*260*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
/*270*/ .long sunos_nosys, sunos_nosys, sunos_nosys
.long sunos_nosys
#endif
......@@ -813,7 +813,7 @@ config DEBUG_SPINLOCK
# the generic version in that case.
config HAVE_DEC_LOCK
bool
depends on !DEBUG_SPINLOCK
depends on SMP && !DEBUG_SPINLOCK
default y
config DEBUG_SPINLOCK_SLEEP
......
......@@ -26,7 +26,7 @@
#define curptr g6
#define NR_SYSCALLS 268 /* Each OS is different... */
#define NR_SYSCALLS 272 /* Each OS is different... */
.text
.align 32
......
......@@ -270,9 +270,14 @@ to_kernel:
#ifdef CONFIG_PREEMPT
ldsw [%g6 + TI_PRE_COUNT], %l5
brnz %l5, kern_fpucheck
ldx [%g6 + TI_FLAGS], %l5
andcc %l5, _TIF_NEED_RESCHED, %g0
be,pt %xcc, kern_fpucheck
srl %l4, 20, %l5
cmp %l5, 0
bne,pn %xcc, kern_fpucheck
sethi %hi(PREEMPT_ACTIVE), %l6
stw %l6, [%g6 + TI_PRE_COUNT]
wrpr 0, %pil
call schedule
nop
ba,pt %xcc, rtrap
......
......@@ -136,6 +136,7 @@ EXPORT_SYMBOL(__read_lock);
EXPORT_SYMBOL(__read_unlock);
EXPORT_SYMBOL(__write_lock);
EXPORT_SYMBOL(__write_unlock);
EXPORT_SYMBOL(__write_trylock);
#endif
/* Hard IRQ locking */
......
......@@ -72,7 +72,8 @@ sys_call_table32:
/*250*/ .word sys32_mremap, sys32_sysctl, sys_getsid, sys_fdatasync, sys32_nfsservctl
.word sys_ni_syscall, compat_clock_settime, compat_clock_gettime, compat_clock_getres, compat_clock_nanosleep
/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, compat_timer_settime, compat_timer_gettime, sys_timer_getoverrun
.word sys_timer_delete, sys32_timer_create, sys_ni_syscall, sys_ni_syscall
.word sys_timer_delete, sys32_timer_create, sys_ni_syscall, sys_ni_syscall, sys_ni_syscall
/*270*/ .word sys_ni_syscall, sys_ni_syscall, sys_ni_syscall, sys_ni_syscall
/* Now the 64-bit native Linux syscall table. */
......@@ -133,7 +134,8 @@ sys_call_table:
/*250*/ .word sys64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
.word sys_ni_syscall, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
/*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
.word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_ni_syscall
.word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy
/*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_ni_syscall
#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
defined(CONFIG_SOLARIS_EMUL_MODULE)
......@@ -233,6 +235,7 @@ sunos_sys_table:
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
.word sunos_nosys, sunos_nosys, sunos_nosys
#endif
......@@ -29,7 +29,7 @@
atomic_dec_and_lock: /* %o0 = counter, %o1 = lock */
loop1: lduw [%o0], %g5
subcc %g5, 1, %g7
be,pn %icc, to_zero
be,pn %icc, start_to_zero
nop
nzero: cas [%o0], %g5, %g7
cmp %g5, %g7
......@@ -40,6 +40,7 @@ out:
membar #StoreLoad | #StoreStore
retl
mov %g1, %o0
start_to_zero:
#ifdef CONFIG_PREEMPT
ldsw [%g6 + TI_PRE_COUNT], %g3
add %g3, 1, %g3
......
......@@ -63,5 +63,27 @@ __write_lock: /* %o0 = lock_ptr */
be,pt %icc, 99b
membar #StoreLoad | #StoreStore
ba,a,pt %xcc, 1b
.globl __write_trylock
__write_trylock: /* %o0 = lock_ptr */
sethi %hi(0x80000000), %g2
1: lduw [%o0], %g5
brnz,pn %g5, __write_trylock_fail
4: or %g5, %g2, %g7
cas [%o0], %g5, %g7
cmp %g5, %g7
be,pt %icc, __write_trylock_succeed
membar #StoreLoad | #StoreStore
ba,pt %xcc, 1b
nop
__write_trylock_succeed:
retl
mov 1, %o0
__write_trylock_fail:
retl
mov 0, %o0
rwlock_impl_end:
......@@ -284,10 +284,15 @@
#define __NR_timer_delete 265
#define __NR_timer_create 266
/* #define __NR_vserver 267 Reserved for VSERVER */
/* WARNING: You MAY NOT add syscall numbers larger than 267, since
#define __NR_io_setup 268
#define __NR_io_destroy 268
#define __NR_io_submit 269
#define __NR_io_cancel 270
#define __NR_io_getevents 271
/* WARNING: You MAY NOT add syscall numbers larger than 271, since
* all of the syscall tables in the Sparc kernel are
* sized to have 267 entries (starting at zero). Therefore
* find a free slot in the 0-266 range.
* sized to have 272 entries (starting at zero). Therefore
* find a free slot in the 0-271 range.
*/
#define _syscall0(type,name) \
......
......@@ -79,7 +79,8 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
......
......@@ -118,11 +118,13 @@ extern void __read_lock(rwlock_t *);
extern void __read_unlock(rwlock_t *);
extern void __write_lock(rwlock_t *);
extern void __write_unlock(rwlock_t *);
extern int __write_trylock(rwlock_t *);
#define _raw_read_lock(p) __read_lock(p)
#define _raw_read_unlock(p) __read_unlock(p)
#define _raw_write_lock(p) __write_lock(p)
#define _raw_write_unlock(p) __write_unlock(p)
#define _raw_write_trylock(p) __write_trylock(p)
#else /* !(CONFIG_DEBUG_SPINLOCK) */
......
......@@ -286,10 +286,15 @@
#define __NR_timer_delete 265
#define __NR_timer_create 266
/* #define __NR_vserver 267 Reserved for VSERVER */
/* WARNING: You MAY NOT add syscall numbers larger than 267, since
#define __NR_io_setup 268
#define __NR_io_destroy 268
#define __NR_io_submit 269
#define __NR_io_cancel 270
#define __NR_io_getevents 271
/* WARNING: You MAY NOT add syscall numbers larger than 271, since
* all of the syscall tables in the Sparc kernel are
* sized to have 267 entries (starting at zero). Therefore
* find a free slot in the 0-266 range.
* sized to have 272 entries (starting at zero). Therefore
* find a free slot in the 0-271 range.
*/
#define _syscall0(type,name) \
......
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