Commit 7f012496 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Linus Torvalds

[PATCH] another alpha update

 - Makefile cleanups and fixes
 - a bunch of syscalls added
 - removed crap from asm/ide.h (it's not needed anymore)
 - __down_read_trylock fix
parent 76f92de7
......@@ -91,9 +91,9 @@ CFLAGS := $(CFLAGS) -Wa,-mev6
HEAD := arch/alpha/kernel/head.o
core-y := arch/alpha/kernel/ arch/alpha/mm/
core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/built-in.o
libs-y := arch/alpha/lib
core-y += arch/alpha/kernel/ arch/alpha/mm/
core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/
libs-y += arch/alpha/lib/
MAKEBOOT = $(MAKE) -C arch/alpha/boot
......
......@@ -1119,3 +1119,27 @@ sys_call_table:
.quad sys_readahead
.quad sys_ni_syscall /* 380, sys_security */
.quad sys_tkill
.quad sys_setxattr
.quad sys_lsetxattr
.quad sys_fsetxattr
.quad sys_getxattr
.quad sys_lgetxattr
.quad sys_fgetxattr
.quad sys_listxattr
.quad sys_llistxattr
.quad sys_flistxattr /* 390 */
.quad sys_removexattr
.quad sys_lremovexattr
.quad sys_fremovexattr
.quad sys_futex
.quad sys_sched_setaffinity
.quad sys_sched_getaffinity
.quad sys_ni_syscall /* 397, tux */
.quad sys_io_setup
.quad sys_io_destroy
.quad sys_io_getevents /* 400 */
.quad sys_io_submit
.quad sys_io_cancel
.quad sys_ni_syscall /* 403, sys_alloc_hugepages */
.quad sys_ni_syscall /* 404, sys_free_hugepages */
.quad sys_exit_group
......@@ -2,7 +2,7 @@
# Makefile for alpha-specific library files..
#
EXTRA_AFLAGS := $(CFLAGS)
L_TARGET := lib.a
# Many of these routines have implementations tuned for ev6.
# Choose them iff we're targeting ev6 specifically.
......@@ -17,7 +17,7 @@ ifeq ($(CONFIG_ALPHA_EV67),y)
ev67 := ev67-
endif
OBJS = __divqu.o __remqu.o __divlu.o __remlu.o \
obj-y = __divqu.o __remqu.o __divlu.o __remlu.o \
udelay.o \
$(ev6)memset.o \
$(ev6)memcpy.o \
......@@ -46,12 +46,9 @@ OBJS = __divqu.o __remqu.o __divlu.o __remlu.o \
fpreg.o \
callback_srm.o srm_puts.o srm_printk.o
ifeq ($(CONFIG_SMP),y)
OBJS += dec_and_lock.o
endif
obj-$(CONFIG_SMP) += dec_and_lock.o
lib.a: $(OBJS)
$(AR) rcs lib.a $(OBJS)
include $(TOPDIR)/Rules.make
__divqu.o: $(ev6)divide.S
$(CC) $(AFLAGS) -DDIV -c -o __divqu.o $(ev6)divide.S
......@@ -64,5 +61,3 @@ __divlu.o: $(ev6)divide.S
__remlu.o: $(ev6)divide.S
$(CC) $(AFLAGS) -DREM -DINTSIZE -c -o __remlu.o $(ev6)divide.S
include $(TOPDIR)/Rules.make
......@@ -2,10 +2,8 @@
# Makefile for the FPU instruction emulation.
#
obj-$(CONFIG_MATHEMU) += math-emu.o
math-emu-objs := math.o qrnnd.o
CFLAGS += -I. -I$(TOPDIR)/include/math-emu -w
obj-$(CONFIG_MATHEMU) += math.o qrnnd.o
include $(TOPDIR)/Rules.make
......@@ -80,17 +80,6 @@ static __inline__ void ide_init_default_hwifs(void)
#endif
}
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
#define ide_check_region(from,extent) check_region((from), (extent))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
#define ide_ack_intr(hwif) (1)
#define ide_fix_driveid(id) do {} while (0)
#define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0)
#endif /* __KERNEL__ */
#endif /* __ASMalpha_IDE_H */
......@@ -93,14 +93,16 @@ static inline void __down_read(struct rw_semaphore *sem)
*/
static inline int __down_read_trylock(struct rw_semaphore *sem)
{
long res, tmp;
long old, new, res;
res = sem->count;
do {
tmp = res + RWSEM_ACTIVE_READ_BIAS;
if (tmp <= 0)
new = res + RWSEM_ACTIVE_READ_BIAS;
if (new <= 0)
break;
} while (cmpxchg(&sem->count, res, tmp) != res);
old = res;
res = cmpxchg(&sem->count, old, new);
} while (res != old);
return res >= 0 ? 1 : 0;
}
......
......@@ -331,6 +331,18 @@
#define __NR_removexattr 391
#define __NR_lremovexattr 392
#define __NR_fremovexattr 393
#define __NR_futex 394
#define __NR_sched_setaffinity 395
#define __NR_sched_getaffinity 396
#define __NR_tuxcall 397
#define __NR_io_setup 398
#define __NR_io_destroy 399
#define __NR_io_getevents 400
#define __NR_io_submit 401
#define __NR_io_cancel 402
#define __NR_alloc_hugepages 403
#define __NR_free_hugepages 404
#define __NR_exit_group 405
#if defined(__GNUC__)
......
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