diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-28 04:05:44 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-28 04:05:44 -0800 |
| commit | 9511b3bb35fc90b1da023d0277f9ab8f07728e24 (patch) | |
| tree | 348e3d2384c14556cd4346c7b205dfad62964946 | |
| parent | e121e75ff43c7a433271a267642e87ab1df36aa5 (diff) | |
| parent | 90e546419a34d44d0dc5d9ae2709e73eef616d47 (diff) | |
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
| -rw-r--r-- | arch/alpha/kernel/setup.c | 15 | ||||
| -rw-r--r-- | arch/sparc/kernel/entry.S | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/systbls.S | 6 | ||||
| -rw-r--r-- | arch/sparc64/Kconfig | 2 | ||||
| -rw-r--r-- | arch/sparc64/kernel/entry.S | 2 | ||||
| -rw-r--r-- | arch/sparc64/kernel/rtrap.S | 7 | ||||
| -rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 1 | ||||
| -rw-r--r-- | arch/sparc64/kernel/systbls.S | 9 | ||||
| -rw-r--r-- | arch/sparc64/lib/dec_and_lock.S | 3 | ||||
| -rw-r--r-- | arch/sparc64/lib/rwlock.S | 22 | ||||
| -rw-r--r-- | include/asm-sparc/unistd.h | 11 | ||||
| -rw-r--r-- | include/asm-sparc64/hardirq.h | 3 | ||||
| -rw-r--r-- | include/asm-sparc64/spinlock.h | 2 | ||||
| -rw-r--r-- | include/asm-sparc64/unistd.h | 11 |
14 files changed, 80 insertions, 16 deletions
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index eab5371047f4..fd3b3871778d 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -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); diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index d04aae13d183..0b96b55ecfee 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -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 diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 0cd70cf7a449..1d0feaf5abe8 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S @@ -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 diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 6065f69f701c..af748abc7ae0 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -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 diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index ce63576d15c6..8955c0c433f1 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -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 diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 97f596873c0a..b58afaeca193 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S @@ -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 diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 34fcdf186b9e..a9d77fb4b0e7 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -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 */ diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 3c7a3589391b..a1e4027e29eb 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S @@ -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 diff --git a/arch/sparc64/lib/dec_and_lock.S b/arch/sparc64/lib/dec_and_lock.S index 2e8fcfce52c5..399c13509f20 100644 --- a/arch/sparc64/lib/dec_and_lock.S +++ b/arch/sparc64/lib/dec_and_lock.S @@ -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 diff --git a/arch/sparc64/lib/rwlock.S b/arch/sparc64/lib/rwlock.S index 56edad121be7..ffbf75bc3bc7 100644 --- a/arch/sparc64/lib/rwlock.S +++ b/arch/sparc64/lib/rwlock.S @@ -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: diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 47c2e1e266c2..044ab5ab5747 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -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) \ diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h index 97e43a160b3b..b57dd3df9965 100644 --- a/include/asm-sparc64/hardirq.h +++ b/include/asm-sparc64/hardirq.h @@ -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) diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index 8bdc07cfad6f..201472fc01bc 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h @@ -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) */ diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index f666fed20caa..defdb109015b 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -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) \ |
