You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kenn H. <ke...@us...> - 2001-02-03 13:51:08
|
Update of /cvsroot/linux-vax/kernel/Documentation/vax In directory usw-pr-cvs1:/tmp/cvs-serv21466 Modified Files: README Log Message: Need coffee.... Index: README =================================================================== RCS file: /cvsroot/linux-vax/kernel/Documentation/vax/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- README 2001/02/03 13:44:23 1.3 +++ README 2001/02/03 13:51:15 1.4 @@ -1,5 +1,5 @@ -Last updated Feb 2, 2000 +Last updated Feb 2, 2001 GETTING STARTED |
From: Kenn H. <ke...@us...> - 2001-02-03 13:44:16
|
Update of /cvsroot/linux-vax/kernel/Documentation/vax In directory usw-pr-cvs1:/tmp/cvs-serv20449 Modified Files: README Log Message: Updated to bring it back in sync with reality Index: README =================================================================== RCS file: /cvsroot/linux-vax/kernel/Documentation/vax/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- README 2000/07/13 00:51:53 1.2 +++ README 2001/02/03 13:44:23 1.3 @@ -1,5 +1,5 @@ -Last updated Jul 10, 2000 +Last updated Feb 2, 2000 GETTING STARTED @@ -13,49 +13,24 @@ Unfortunately, there are a few large downloads involved to get up and running... -1. The cross-compiler and binutils - - First download the following: - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/sources/ - - binutils-2.9.1.0.25.tar.bz2 - egcs-1.1.2.tar.bz2 - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/patches/ - - binutils-2.9.1.0.25-20000219.patch.bz2 - egcs-1.1.2-20000219.patch.bz2 - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/ +1. The cross-compiler and binutils - build-vax.sh - one-tree-vax.sh + Grab the sources from CVS: - Create a new directory to unpack all this stuff in and untar the - egcs and binutils tarballs, apply the patches and copy in the shell - scripts: + $ cvs -d:pserver:ano...@cv...:/cvsroot/linux-vax login + (hit return at the password prompt). - $ mkdir vax-cross - $ cd vax-cross - $ tar xvf --use=bzip2 DOWNLOADS/binutils-2.9.1.0.25.tar.bz2 - $ tar xvf --use=bzip2 DOWNLOADS/egcs-1.1.2.tar.bz2 - $ cd binutils-2.9.1.0.25.current - $ patch -p1 < DOWNLOADS/binutils-2.9.1.0.25-20000219.patch - $ cd ../egcs-1.1.2.current - $ patch -p1 < DOWNLOADS/egcs-1.1.2-20000219.patch - $ cd .. - $ cp DOWNLOADS/one-tree-vax.sh DOWNLOADS/build-vax.sh . + $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co tools - Then create the combined binutils/egcs source tree and build it: + Then build the combined binutils/gcc source tree: - $ ./one-tree-vax.sh + $ cd tools $ ./build-vax.sh These should complete without errors. If you get errors, something is seriously wrong and you probably won't get a correctly-installed toolchain. All object files and binaries will be created in - vax-cross/b-vax-dec-linux without touching the source trees. + tools/b-vax-dec-linux without touching the source trees. Then install them: @@ -67,6 +42,9 @@ This will not touch your current GCC installation. + A toolchain snapshot will soon be available for those people who don't + want to compile their own. + 2. The kernel sources Grab the sources from CVS: @@ -75,32 +53,38 @@ (hit return at the password prompt). $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel + + for the tree based on 2.2.14, or + + $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel-2.4 + + for the 2.4.0 tree. - cd into the kernel dir created by cvs and do + cd into the kernel (or kernel-2.4) dir created by cvs and do $ make oldconfig to create a default .config. (Don't go playing with the config, please. It will probably just break the compile.) - Compile a network-bootable image by doing + Compile a bootable image by doing - $ make mopboot + $ make This will generate plenty of compiler and linker warnings, but you should - end up with a vmlinux.SYS file sized about 280K. + end up with a vmlinux.SYS and a vmlinux.dsk. If you are hacking around in arch/vax, you can do a quicker re-compile by doing - $ make mopbootx + $ make archonly which just rebuilds stuff in arch/vax and re-links the kernel. If you have your VAX and Linux machine on the same SCSI chain and you've got a scratch disk handy, you can do - $ make diskboot && dd if=vmlinux.dsk of=/dev/sdX + $ make && dd if=vmlinux.dsk of=/dev/sdX and then tell your VAX to boot from this disk. This is faster than netbooting. @@ -113,7 +97,7 @@ Sources at - http://www.mssl.ucl.ac.uk/~atp/linux-vax/download/mopd-linux.tar.gz + ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/misc/mopd-linux-vax-2.5.4.tar.gz Compile and install. Create the directory /tftpboot/mop. mopd looks here, and here only, when searching for boot images. @@ -143,6 +127,7 @@ VAXstation 3100/m30 VAXstation 3100/m76 VAXstation 3500 + VAXstation 4000/60 VAXstation II/GPX First you'll want to get your VAX to stop at the >>> console prompt |
From: Kenn H. <ke...@us...> - 2001-02-03 13:43:32
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/vax In directory usw-pr-cvs1:/tmp/cvs-serv20298 Modified Files: README Log Message: Updated to bring it back in sync with reality Index: README =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/vax/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- README 2001/01/18 00:10:39 1.1 +++ README 2001/02/03 13:43:39 1.2 @@ -1,5 +1,5 @@ -Last updated Jul 10, 2000 +Last updated Feb 2, 2000 GETTING STARTED @@ -13,49 +13,24 @@ Unfortunately, there are a few large downloads involved to get up and running... -1. The cross-compiler and binutils - - First download the following: - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/sources/ - - binutils-2.9.1.0.25.tar.bz2 - egcs-1.1.2.tar.bz2 - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/patches/ - - binutils-2.9.1.0.25-20000219.patch.bz2 - egcs-1.1.2-20000219.patch.bz2 - - From ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/ +1. The cross-compiler and binutils - build-vax.sh - one-tree-vax.sh + Grab the sources from CVS: - Create a new directory to unpack all this stuff in and untar the - egcs and binutils tarballs, apply the patches and copy in the shell - scripts: + $ cvs -d:pserver:ano...@cv...:/cvsroot/linux-vax login + (hit return at the password prompt). - $ mkdir vax-cross - $ cd vax-cross - $ tar xvf --use=bzip2 DOWNLOADS/binutils-2.9.1.0.25.tar.bz2 - $ tar xvf --use=bzip2 DOWNLOADS/egcs-1.1.2.tar.bz2 - $ cd binutils-2.9.1.0.25.current - $ patch -p1 < DOWNLOADS/binutils-2.9.1.0.25-20000219.patch - $ cd ../egcs-1.1.2.current - $ patch -p1 < DOWNLOADS/egcs-1.1.2-20000219.patch - $ cd .. - $ cp DOWNLOADS/one-tree-vax.sh DOWNLOADS/build-vax.sh . + $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co tools - Then create the combined binutils/egcs source tree and build it: + Then build the combined binutils/gcc source tree: - $ ./one-tree-vax.sh + $ cd tools $ ./build-vax.sh These should complete without errors. If you get errors, something is seriously wrong and you probably won't get a correctly-installed toolchain. All object files and binaries will be created in - vax-cross/b-vax-dec-linux without touching the source trees. + tools/b-vax-dec-linux without touching the source trees. Then install them: @@ -67,6 +42,9 @@ This will not touch your current GCC installation. + A toolchain snapshot will soon be available for those people who don't + want to compile their own. + 2. The kernel sources Grab the sources from CVS: @@ -75,32 +53,38 @@ (hit return at the password prompt). $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel + + for the tree based on 2.2.14, or + + $ cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linux-vax co kernel-2.4 + + for the 2.4.0 tree. - cd into the kernel dir created by cvs and do + cd into the kernel (or kernel-2.4) dir created by cvs and do $ make oldconfig to create a default .config. (Don't go playing with the config, please. It will probably just break the compile.) - Compile a network-bootable image by doing + Compile a bootable image by doing - $ make mopboot + $ make This will generate plenty of compiler and linker warnings, but you should - end up with a vmlinux.SYS file sized about 280K. + end up with a vmlinux.SYS and a vmlinux.dsk. If you are hacking around in arch/vax, you can do a quicker re-compile by doing - $ make mopbootx + $ make archonly which just rebuilds stuff in arch/vax and re-links the kernel. If you have your VAX and Linux machine on the same SCSI chain and you've got a scratch disk handy, you can do - $ make diskboot && dd if=vmlinux.dsk of=/dev/sdX + $ make && dd if=vmlinux.dsk of=/dev/sdX and then tell your VAX to boot from this disk. This is faster than netbooting. @@ -113,7 +97,7 @@ Sources at - http://www.mssl.ucl.ac.uk/~atp/linux-vax/download/mopd-linux.tar.gz + ftp://linux-vax.sourceforge.net/pub/linux-vax/tools/misc/mopd-linux-vax-2.5.4.tar.gz Compile and install. Create the directory /tftpboot/mop. mopd looks here, and here only, when searching for boot images. @@ -143,6 +127,7 @@ VAXstation 3100/m30 VAXstation 3100/m76 VAXstation 3500 + VAXstation 4000/60 VAXstation II/GPX First you'll want to get your VAX to stop at the >>> console prompt |
From: Kenn H. <ke...@us...> - 2001-01-29 01:09:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv29867/arch/vax/kernel Modified Files: Makefile Added Files: semaphore.c Log Message: Semaphores added. SYSV IPC and proc filesystem compile and sort-of-work. Init sequence now gets as far as tty init. EXTRAVERSION updated to -20010129 --- NEW FILE --- /* * $Id: semaphore.c,v 1.1 2001/01/29 01:09:18 kenn Exp $ * * VAX version (based on S390 version) * Copyright (C) 2001, Kenn Humborg * * S390 version * Copyright (C) 1998 IBM Corporation * Author(s): Martin Schwidefsky * * Derived from "linux/arch/i386/kernel/semaphore.c * Copyright (C) 1999, Linus Torvalds * */ #include <linux/sched.h> #include <asm/semaphore.h> /* * Semaphores are implemented using a two-way counter: * The "count" variable is decremented for each process * that tries to acquire the semaphore, while the "sleeping" * variable is a count of such acquires. * * Notably, the inline "up()" and "down()" functions can * efficiently test if they need to do any extra work (up * needs to do something only if count was negative before * the increment operation. * * "sleeping" and the contention routine ordering is * protected by the semaphore spinlock. * * Note that these functions are only called when there is * contention on the lock, and as such all this is the * "non-critical" part of the whole semaphore business. The * critical part is the inline stuff in <asm/semaphore.h> * where we want to avoid any extra jumps and calls. */ /* * Logic: * - only on a boundary condition do we need to care. When we go * from a negative count to a non-negative, we wake people up. * - when we go from a non-negative count to a negative do we * (a) synchronize with the "sleeper" count and (b) make sure * that we're on the wakeup list before we synchronize so that * we cannot lose wakeup events. */ void __up(struct semaphore *sem) { wake_up(&sem->wait); } static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; void __down(struct semaphore * sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); tsk->state = TASK_UNINTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); sem->sleepers++; for (;;) { int sleepers = sem->sleepers; /* * Add "everybody else" into it. They aren't * playing, because we own the spinlock. */ if (!atomic_add_negative(sleepers - 1, &sem->count)) { sem->sleepers = 0; break; } sem->sleepers = 1; /* us - see -1 above */ spin_unlock_irq(&semaphore_lock); schedule(); tsk->state = TASK_UNINTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); remove_wait_queue(&sem->wait, &wait); tsk->state = TASK_RUNNING; wake_up(&sem->wait); } int __down_interruptible(struct semaphore * sem) { int retval = 0; struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); tsk->state = TASK_INTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); sem->sleepers ++; for (;;) { int sleepers = sem->sleepers; /* * With signals pending, this turns into * the trylock failure case - we won't be * sleeping, and we* can't get the lock as * it has contention. Just correct the count * and exit. */ if (signal_pending(current)) { retval = -EINTR; sem->sleepers = 0; atomic_add(sleepers, &sem->count); break; } /* * Add "everybody else" into it. They aren't * playing, because we own the spinlock. The * "-1" is because we're still hoping to get * the lock. */ if (!atomic_add_negative(sleepers - 1, &sem->count)) { sem->sleepers = 0; break; } sem->sleepers = 1; /* us - see -1 above */ spin_unlock_irq(&semaphore_lock); schedule(); tsk->state = TASK_INTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); tsk->state = TASK_RUNNING; remove_wait_queue(&sem->wait, &wait); wake_up(&sem->wait); return retval; } /* * Trylock failed - make sure we correct for * having decremented the count. */ int __down_trylock(struct semaphore * sem) { unsigned long flags; int sleepers; spin_lock_irqsave(&semaphore_lock, flags); sleepers = sem->sleepers + 1; sem->sleepers = 0; /* * Add "everybody else" and us into it. They aren't * playing, because we own the spinlock. */ if (!atomic_add_negative(sleepers, &sem->count)) wake_up(&sem->wait); spin_unlock_irqrestore(&semaphore_lock, flags); return 1; } void down_read_failed_biased(struct rw_semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); add_wait_queue(&sem->wait, &wait); /* put ourselves at the head of the list */ for (;;) { if (sem->read_bias_granted && xchg(&sem->read_bias_granted, 0)) break; set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->read_bias_granted) schedule(); } remove_wait_queue(&sem->wait, &wait); tsk->state = TASK_RUNNING; } void down_write_failed_biased(struct rw_semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); add_wait_queue_exclusive(&sem->write_bias_wait, &wait); /* put ourselves at the end of the list */ for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } remove_wait_queue(&sem->write_bias_wait, &wait); tsk->state = TASK_RUNNING; /* if the lock is currently unbiased, awaken the sleepers * FIXME: this wakes up the readers early in a bit of a * stampede -> bad! */ if (atomic_read(&sem->count) >= 0) wake_up(&sem->wait); } /* Wait for the lock to become unbiased. Readers * are non-exclusive. =) */ void down_read_failed(struct rw_semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); up_read(sem); /* this takes care of granting the lock */ add_wait_queue(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; schedule(); } remove_wait_queue(&sem->wait, &wait); tsk->state = TASK_RUNNING; } /* Wait for the lock to become unbiased. Since we're * a writer, we'll make ourselves exclusive. */ void down_write_failed(struct rw_semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); up_write(sem); /* this takes care of granting the lock */ add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); } remove_wait_queue(&sem->wait, &wait); tsk->state = TASK_RUNNING; } /* Called when someone has done an up that transitioned from * negative to non-negative, meaning that the lock has been * granted to whomever owned the bias. */ void rwsem_wake_readers(struct rw_semaphore *sem) { if (xchg(&sem->read_bias_granted, 1)) BUG(); wake_up(&sem->wait); } void rwsem_wake_writers(struct rw_semaphore *sem) { if (xchg(&sem->write_bias_granted, 1)) BUG(); wake_up(&sem->write_bias_wait); } void __down_read_failed(int count, struct rw_semaphore *sem) { do { if (count == -1) { down_read_failed_biased(sem); break; } down_read_failed(sem); count = atomic_dec_return(&sem->count); } while (count != 0); } void __down_write_failed(int count, struct rw_semaphore *sem) { do { if (count < 0 && count > -RW_LOCK_BIAS) { down_write_failed_biased(sem); break; } down_write_failed(sem); count = atomic_add_return(-RW_LOCK_BIAS, &sem->count); } while (count != 0); } void __rwsem_wake(int count, struct rw_semaphore *sem) { if (count == 0) rwsem_wake_readers(sem); else rwsem_wake_writers(sem); } Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 2001/01/26 00:27:00 1.3 +++ Makefile 2001/01/29 01:09:18 1.4 @@ -12,7 +12,7 @@ O_TARGET := kernel.o obj-y := process.o setup.o regdump.o interrupt.o entry.o time.o \ - syscall.o signal.o \ + syscall.o signal.o semaphore.o \ init_task.o reboot.o cpu_generic.o \ cpu_ka630.o cpu_ka640.o cpu_ka650.o cpu_ka660.o \ cpu_ka410.o cpu_ka42.o cpu_ka43.o cpu_ka46.o |
From: Kenn H. <ke...@us...> - 2001-01-29 01:09:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv29867/arch/vax/boot Modified Files: tmp_init.c Log Message: Semaphores added. SYSV IPC and proc filesystem compile and sort-of-work. Init sequence now gets as far as tty init. EXTRAVERSION updated to -20010129 Index: tmp_init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/tmp_init.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tmp_init.c 2001/01/26 00:27:00 1.2 +++ tmp_init.c 2001/01/29 01:09:18 1.3 @@ -137,7 +137,7 @@ boot_rpb.l_pfncnt, boot_rpb.l_vmb_version, boot_rpb.l_badpgs); printk("Physical memory: %08x pages (%dKB)\n", - boot_rpb.l_pfncnt, boot_rpb.l_pfncnt / 2); + max_pfn, max_pfn / 2); setup_arch(&command_line); @@ -162,7 +162,6 @@ memory on the free list */ mem_init(); - kmem_cache_sizes_init(); #ifdef CONFIG_PROC_FS @@ -233,11 +232,8 @@ #if defined(CONFIG_NET) sock_init(); - net_dev_init(); #endif - device_setup(); - start_context_thread(); do_initcalls(); @@ -254,14 +250,6 @@ printk("tmp_init: in init thread\n"); tmp_do_basic_setup(); - -#if 0 - kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); - kernel_thread(kupdate, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); - kswapd_setup(); - kernel_thread(kpiod, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); - kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); -#endif panic("No init found."); } |
From: Kenn H. <ke...@us...> - 2001-01-29 01:09:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv29867/arch/vax Modified Files: defconfig Log Message: Semaphores added. SYSV IPC and proc filesystem compile and sort-of-work. Init sequence now gets as far as tty init. EXTRAVERSION updated to -20010129 Index: defconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/defconfig,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- defconfig 2001/01/26 00:27:00 1.2 +++ defconfig 2001/01/29 01:09:18 1.3 @@ -12,9 +12,10 @@ # CONFIG_EXTRA_ELF_COMPILER is not set # CONFIG_SMP is not set CONFIG_NET=y -# CONFIG_SYSVIPC is not set +CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set +CONFIG_PROC_FS=y # # Loadable module support @@ -65,7 +66,7 @@ # CONFIG_DUMMY is not set # CONFIG_SLIP is not set # CONFIG_PPP is not set -CONFIG_VAX_LANCE=y +# CONFIG_VAX_LANCE is not set # # File systems @@ -92,7 +93,7 @@ # CONFIG_NTFS_FS is not set # CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set -# CONFIG_PROC_FS is not set +CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_MOUNT is not set # CONFIG_DEVFS_DEBUG is not set |
From: Kenn H. <ke...@us...> - 2001-01-29 01:09:27
|
Update of /cvsroot/linux-vax/kernel-2.4 In directory usw-pr-cvs1:/tmp/cvs-serv29867 Modified Files: Makefile Log Message: Semaphores added. SYSV IPC and proc filesystem compile and sort-of-work. Init sequence now gets as far as tty init. EXTRAVERSION updated to -20010129 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile 2001/01/26 00:31:06 1.4 +++ Makefile 2001/01/29 01:09:18 1.5 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 0 -EXTRAVERSION = -20010126 +EXTRAVERSION = -20010129 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
From: Kenn H. <ke...@us...> - 2001-01-29 01:02:39
|
Update of /cvsroot/linux-vax/kernel-2.4/mm In directory usw-pr-cvs1:/tmp/cvs-serv28465 Modified Files: slab.c Log Message: Temporary hacks to get the slab allocator to work with our 512 byte page size. Index: slab.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/mm/slab.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- slab.c 2001/01/14 16:42:29 1.1.1.1 +++ slab.c 2001/01/29 01:02:30 1.2 @@ -85,9 +85,9 @@ * FORCED_DEBUG - 1 enables SLAB_RED_ZONE and SLAB_POISON (if possible) */ -#define DEBUG 0 +#define DEBUG 1 #define STATS 0 -#define FORCED_DEBUG 0 +#define FORCED_DEBUG 1 /* * Parameters for kmem_cache_reap @@ -293,7 +293,11 @@ #endif /* maximum size of an obj (in 2^order pages) */ +#if PAGE_SIZE == 512 /* temporary for VAX */ +#define MAX_OBJ_ORDER 8 /* 256 pages */ +#else #define MAX_OBJ_ORDER 5 /* 32 pages */ +#endif /* * Do not go above this order unless 0 objects fit into the slab. @@ -305,8 +309,11 @@ /* * Absolute limit for the gfp order */ +#if PAGE_SIZE == 512 /* temporary for VAX */ +#define MAX_GFP_ORDER 8 /* 256 pages */ +#else #define MAX_GFP_ORDER 5 /* 32 pages */ - +#endif /* Macros for storing/retrieving the cachep and or slab from the * global 'mem_map'. These are used to find the slab an obj belongs to. @@ -325,7 +332,7 @@ } cache_sizes_t; static cache_sizes_t cache_sizes[] = { -#if PAGE_SIZE == 4096 +#if PAGE_SIZE == 4096 || PAGE_SIZE == 512 /* temporarly for VAX */ { 32, NULL, NULL}, #endif { 64, NULL, NULL}, @@ -1532,6 +1539,15 @@ void * kmalloc (size_t size, int flags) { cache_sizes_t *csizep = cache_sizes; + + /* With the VAX's 512-byte pages, kmalloc doesn't work for + sizes between 33 and 128 bytes (inclusive). I don't know + why, ( and I'm not really interested in fixing it, since + we'll be moving to a 4K page soon), so this just fudges + around the issue */ + if ((size >= 33) && (size <= 128)) { + size = 129; + } for (; csizep->cs_size; csizep++) { if (size > csizep->cs_size) |
From: Kenn H. <ke...@us...> - 2001-01-29 01:01:42
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv28360 Modified Files: init.c Log Message: Finish off the memory initialization by freeing all the bootmem memory. Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- init.c 2001/01/26 00:27:00 1.2 +++ init.c 2001/01/29 01:01:32 1.3 @@ -28,10 +28,7 @@ /* * In other architectures, paging_init sets up the kernel's page tables. - * In Linux/VAX, this is already done by the early boot code, so all we - * have to do is set up the mem_map[] array. - * - * The start_mem and end_mem addresses are virtual addresses + * In Linux/VAX, this is already done by the early boot code. */ void __init paging_init() @@ -68,19 +65,16 @@ void mem_init(void) { - if (!mem_map) { - BUG(); - } + max_mapnr = num_physpages = max_low_pfn; - max_mapnr = num_physpages = max_pfn; - high_memory = (void *) __va(max_pfn * PAGE_SIZE); - /* this will put all low memory onto the freelists */ totalram_pages += free_all_bootmem(); + high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); + printk("Memory: %luk/%luk available\n", - (unsigned long) nr_free_pages() * 2, - max_mapnr * 2 + (unsigned long) nr_free_pages() / 2, + max_mapnr / 2 ); return; |
From: Kenn H. <ke...@us...> - 2001-01-29 01:00:58
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv28257 Modified Files: fault.c Log Message: Longer stack dumps Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fault.c 2001/01/17 16:13:57 1.1 +++ fault.c 2001/01/29 01:00:48 1.2 @@ -127,7 +127,7 @@ "PC %08x, PSL %08x\n", address, reason, info->pc, info->psl); printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 32); + hex_dump((void *)(regs->sp), 256); show_regs(regs); show_cpu_regs(); @@ -190,7 +190,7 @@ info->reason, info->addr, info->pc, info->psl); printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 32); + hex_dump((void *)(regs->sp), 256); show_regs(regs); show_cpu_regs(); @@ -220,7 +220,7 @@ info->reason, info->addr, info->pc, info->psl); printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 32); + hex_dump((void *)(regs->sp), 256); show_regs(regs); show_cpu_regs(); |
From: Kenn H. <ke...@us...> - 2001-01-29 01:00:31
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/lib In directory usw-pr-cvs1:/tmp/cvs-serv28040 Modified Files: Makefile Removed Files: udiv.S urem.S Log Message: The operations provided by udiv.S and urem.S are now natively implemented by GCC Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/lib/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 2001/01/20 13:51:05 1.2 +++ Makefile 2001/01/29 01:00:20 1.3 @@ -10,13 +10,7 @@ all: libio.a L_TARGET := libio.a -obj-y := string.o console.o urem.o udiv.o - -# GCC builds gcc-2.95.2-linuxvax-20000820 and later have built-in support -# for the umodsi3 and udivsi3 functions implemented in urem.S and udiv.S -# Once we switch over to a newer GCC build, these files should be removed -# (as they are under a BSD license which still contains the 'advertising' -# clause) - KPH 2000-08-20 +obj-y := string.o console.o include $(TOPDIR)/Rules.make --- udiv.S DELETED --- --- urem.S DELETED --- |
From: Kenn H. <ke...@us...> - 2001-01-29 00:59:35
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/lib In directory usw-pr-cvs1:/tmp/cvs-serv27962 Modified Files: string.c Log Message: Now we have a memset() that actually works... Index: string.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/lib/string.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- string.c 2001/01/26 00:27:00 1.2 +++ string.c 2001/01/29 00:59:26 1.3 @@ -206,23 +206,21 @@ #ifdef __HAVE_ARCH_MEMSET void * memset(void * s, int c , __kernel_size_t count) { - char *xs = (char *) s; - - while (count > 0xffff) { - asm("movc5 $0, 0, %0, $0xffff, *%1" - : /* no outputs */ - : "g" (c), "g" (xs) - : "r0", "r1", "r2", "r3", "r4", "r5" - /* r0 to r5 get clobbered */ ); - count -= 0xffff; - } - if (count != 0) { - asm("movc5 $0, 0, %0, %1, *%2" - : /* no outputs */ - : "g" (c), "g" (count), "g" (xs) - : "r0", "r1", "r2", "r3", "r4", "r5" - /* r0 to r5 get clobbered */ ); - } + asm ( + " movl %2, r6 \n" /* R6 holds bytes left */ + " movl %0, r3 \n" /* dest in R3 */ + " movl $0xffff, r7 \n" /* R7 always holds 65535 */ + " next_chunk: \n" + " cmpl r6, r7 \n" + " blequ last_chunk \n" /* < 65535 bytes left */ + " movc5 $0, 0, %1, r7, (r3) \n" /* MOVC5 updates R3 for us */ + " subl2 r7, r6 \n" + " brb next_chunk \n" + "last_chunk: \n" + " movc5 $0, 0, %1, r6, (r3) " + : /* no outputs */ + : "g" (s), "g" (c), "g" (count) + : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"); return s; } |
From: Kenn H. <ke...@us...> - 2001-01-29 00:59:03
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv27841 Modified Files: syscall.c Log Message: sys_uname() uses a read-write semaphore, so should use up/down_read rather than up/down Index: syscall.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/syscall.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- syscall.c 2001/01/26 00:27:00 1.2 +++ syscall.c 2001/01/29 00:58:54 1.3 @@ -215,9 +215,9 @@ int err; if (!name) return -EFAULT; - down(&uts_sem); + down_read(&uts_sem); err=copy_to_user(name, &system_utsname, sizeof (*name)); - up(&uts_sem); + up_read(&uts_sem); return err?-EFAULT:0; } |
From: Kenn H. <ke...@us...> - 2001-01-29 00:58:20
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv27732 Modified Files: setup.c Log Message: Remove a bunch of superfluous #includes. Setup the boot-time memory allocator properly. Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/setup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- setup.c 2001/01/26 00:27:00 1.2 +++ setup.c 2001/01/29 00:58:11 1.3 @@ -9,32 +9,30 @@ * Bootup setup stuff. */ -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/stddef.h> -#include <linux/unistd.h> -#include <linux/ptrace.h> -#include <linux/malloc.h> -#include <linux/user.h> -#include <linux/tty.h> -#include <linux/delay.h> -#include <linux/config.h> -#include <linux/console.h> +#include <linux/bootmem.h> #include <linux/init.h> #include <linux/string.h> -#include <asm/pgtable.h> #include <asm/rpb.h> +#include <asm/page.h> #define COMMAND_LINE_SIZE 256 static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; -void __init -setup_arch(char **cmdline_p) +/* Defined in arch/vax/mm/init.c */ +extern void paging_init(void); + +/* Linker will put this at the end of the kernel image */ +extern char _end; + +void __init setup_arch(char **cmdline_p) { + unsigned long bootmap_size; + /* * Locate the command line. - Don't have one yet... */ @@ -43,6 +41,28 @@ /* Get the SID */ vax_cpu.sid = __mfpr(PR_SID); + + /* Initialize bootmem */ + + /* We don't have any holes in our physical memory layout, + so we throw everything into the bootmem allocator. + Eventually, we will get smarter and use the bad page lists + provided by the console ROM to map out faulty memory. + This also has the side effect of placing the bootmem bitmap + at the start of physical memory. init_bootmem() also + marks every page as reserved. We have to explicitly free + available memory ourselves. (max_pfn comes from RPB.) */ + bootmap_size = init_bootmem(0, max_pfn); + + /* Available memory is now the region from the end of the + bootmem bitmap to the start of the kernel and from the + end of the SPT to the end of memory */ +printk("calling free_bootmem(%08lx, %08lx)\n", bootmap_size, KERNEL_START_PHYS - bootmap_size); + free_bootmem(bootmap_size, KERNEL_START_PHYS - bootmap_size); +printk("calling free_bootmem(%08lx, %08lx)\n", __pa(SPT_BASE + SPT_SIZE), (max_pfn << PAGE_SHIFT) - __pa(SPT_BASE + SPT_SIZE)); + free_bootmem(__pa(SPT_BASE + SPT_SIZE), (max_pfn << PAGE_SHIFT) - __pa(SPT_BASE + SPT_SIZE)); + + paging_init(); /* Set up the initial PCB. We can refer to current because head.S has already set us up on the kernel stack of task 0. */ |
From: Kenn H. <ke...@us...> - 2001-01-29 00:57:09
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv27684 Modified Files: regdump.c Log Message: Deal with inaccessible virtual addresses in hex_dump() Index: regdump.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/regdump.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- regdump.c 2001/01/17 16:13:57 1.1 +++ regdump.c 2001/01/29 00:57:00 1.2 @@ -14,8 +14,8 @@ #include <asm/psl.h> #include <asm/ptrace.h> #include <asm/system.h> +#include <asm/uaccess.h> - void show_regs(struct pt_regs *regs) { struct psl_fields *psl; @@ -100,14 +100,22 @@ void hex_dump(void *addr, unsigned int bytes) { - unsigned int *p = (unsigned int *)addr; + unsigned int *p = addr; unsigned int i; + unsigned int x; - for (i=0; i<bytes; i+=4) { - printk(" %08x %08x %08x %08x %08x\n", - (unsigned int)(p + i), - p[i], p[i+1], - p[i+2], p[i+3]); + for (i=0; i<bytes/4; i++) { + if (i%4 == 0) { + printk(" %08lx ", (unsigned long)(p+i)); + } + if (get_user(x, p+i)) { + printk(" --------"); + } else { + printk(" %08x", x); + } + if (i%4 == 3) { + printk("\n"); + } } } @@ -160,7 +168,7 @@ target_sp += (target_ap->argc + 1); } - hex_dump(target_sp, 32); + hex_dump(target_sp, 256); } void dump_cur_regs(unsigned int frames) |
From: Kenn H. <ke...@us...> - 2001-01-29 00:56:28
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv27602 Modified Files: interrupt.c interrupt.h Log Message: Add a reserved instruction exception handler (which will also deal with BUGx instructions). Remove some unnecessary #includes. Print longer stack dumps. Index: interrupt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- interrupt.c 2001/01/26 00:27:00 1.4 +++ interrupt.c 2001/01/29 00:56:19 1.5 @@ -13,13 +13,10 @@ #include <linux/random.h> #include <linux/sched.h> #include <linux/mm.h> -#include <linux/stddef.h> #include <linux/string.h> -#include <asm/scb.h> -#include <asm/pgtable.h> #include <asm/pgalloc.h> - +#include <asm/scb.h> #include <asm/hardirq.h> #include <asm/softirq.h> @@ -29,11 +26,6 @@ union scb_and_device_vectors __attribute((__aligned__(VPAGE_SIZE))) scb; -#if 0 -unsigned int local_irq_count[NR_CPUS]; -unsigned int local_bh_count[NR_CPUS]; -#endif - /* Statically-defined pool of irqvector structures. This will go once we have a working kmalloc()/kfree(). @@ -120,6 +112,11 @@ machine_halt(); } + if (register_excep_handler(SCB_RESINSTR, reserved_instr_handler, 0, 0)) { + printk("Panic: unable to register reserved operand handler\n"); + machine_halt(); + } + if (register_excep_handler(SCB_CHMK, syscall_handler, 1, 0)) { printk("Panic: unable to register syscall handler\n"); machine_halt(); @@ -145,8 +142,31 @@ { printk("\nReserved operand fault at PC=%08lx\n", regs->pc); + printk("\nStack dump\n"); + hex_dump((void *)(regs->sp), 256); + + show_regs(regs); + show_cpu_regs(); + + machine_halt(); +} + +/* This is the handler for reserved instruction exceptions. + Eventually this will have to check if the fault was from user + mode or kernel mode and either throw a SIGILL or panic. */ + +void reserved_instr_handler(struct pt_regs *regs, void *unused) +{ + unsigned short instr = *(unsigned short *)(regs->pc); + + if ((instr == 0xfeff) || (instr == 0xfdff)) { + printk("\nKernel bugcheck at PC=%08lx\n", regs->pc); + } else { + printk("\nReserved instruction at PC=%08lx\n", regs->pc); + } + printk("\nStack dump\n"); - hex_dump((void *)(regs->sp), 32); + hex_dump((void *)(regs->sp), 256); show_regs(regs); show_cpu_regs(); Index: interrupt.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/interrupt.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- interrupt.h 2001/01/26 00:27:00 1.3 +++ interrupt.h 2001/01/29 00:56:19 1.4 @@ -62,6 +62,7 @@ extern void accvio_handler(struct pt_regs *regs, void *excep_info); extern void page_fault_handler(struct pt_regs *regs, void *excep_info); extern void reserved_operand_handler(struct pt_regs *regs, void *excep_info); +extern void reserved_instr_handler(struct pt_regs *regs, void *excep_info); extern void corrected_read_handler(struct pt_regs *regs, void *excep_info); extern void syscall_handler(struct pt_regs *regs, void *excep_info); |
From: Kenn H. <ke...@us...> - 2001-01-29 00:55:13
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv27409 Modified Files: entry.S Log Message: Ensure that the pt_regs structure created when an interrupt occurs contains the correct stack pointer for the previous mode (rather than always being the user SP - makes stack dumps more useful) Index: entry.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/entry.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- entry.S 2001/01/26 00:27:00 1.2 +++ entry.S 2001/01/29 00:55:04 1.3 @@ -60,7 +60,26 @@ pushl (sp)[r0] /* Push saved PSL again */ pushl (sp)[r0] /* Push saved PC again */ - mfpr $PR_USP,-(sp) /* Save user SP at time of exception */ + extzv $22, $2, 4(sp), -(sp) /* Extract PREVMODE field from saved + PSL and save on stack (because we + don't have any spare registers yet) */ + cmpzv $24, $2, 8(sp), (sp) /* Is PREVMODE == CURMODE? */ + beql same_mode + mfpr (sp),(sp) /* HACK ALERT! The processor modes are 0..3 + for kernel..user mode. The stack pointer + internal processor registers are also 0..3 + for kernel..user mode. So, using the + PREVMODE value we just saved on the stack, + we overwrite it with the correct stack + pointer register. Net result: the saved_sp + here is the correct stack pointer for the + processor mode before the exception occurred */ + brb sp_saved +same_mode: + moval 16(sp)[r0],(sp) /* Exception is not changing modes. Therefore + we calculate how far up the stack the SP + was pointing when the exception occurred. */ +sp_saved: pushr $0x3ffe /* Push FP to R1 */ pushl 64(sp) /* Duplicate saved R0 */ @@ -69,7 +88,7 @@ SP: saved R0 +4 saved R1 ... - +56 saved user SP + +56 saved SP for previous mode +60 saved PC +64 saved PSL +68 saved R0 @@ -111,7 +130,7 @@ /* The stack now looks like: - SP: saved user SP + SP: saved SP for previous mode +4 saved PC (maybe modified by exception handler) +8 saved PSL (end of struct pt_regs) +12 saved R0 (maybe modified by exception handler) @@ -135,7 +154,7 @@ /* The stack now looks like: - SP: saved user SP + SP: saved SP for previous mode +4 saved PC (maybe modified by exception handler) +8 saved PSL (end of struct pt_regs) +12 saved R0 (maybe modified by exception handler) |
From: Kenn H. <ke...@us...> - 2001-01-29 00:49:35
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv26873 Modified Files: pgtable.h Log Message: One-liner: was reading wrong field in RPB for memory size Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pgtable.h 2001/01/24 00:07:42 1.4 +++ pgtable.h 2001/01/29 00:49:26 1.5 @@ -379,7 +379,7 @@ /* Memory sizing. You'll need to #include <asm/rpb.h> to get the declaration of boot_rpb. */ -#define max_pfn (boot_rpb.l_max_pfn) +#define max_pfn (boot_rpb.l_pfncnt) #include <asm-generic/pgtable.h> |
From: Kenn H. <ke...@us...> - 2001-01-29 00:49:00
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv26738 Modified Files: page.h Log Message: One-liner: change BUG() to do BUGW rather than HALT Index: page.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/page.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- page.h 2001/01/18 15:52:28 1.3 +++ page.h 2001/01/29 00:48:51 1.4 @@ -14,7 +14,7 @@ #define BUG() do { \ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - __asm__ __volatile__(".word 0x0000"); \ + __asm__ __volatile__("bugw $0"); \ } while (0) #define PAGE_BUG(page) do { \ |
From: Kenn H. <ke...@us...> - 2001-01-29 00:47:50
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv26415 Modified Files: semaphore-helper.h semaphore.h Log Message: Rather than fight with the current VAX versions of semaphore.h and semaphore-helper.h (which seemed to have rotted quite a bit), I just took a look at the S390 implementations. The S390 files didn't have any platform-specific bits, so I've just stolen them en masse. As long as we get the atomic_xxx operations sorted, it should work OK. Index: semaphore-helper.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/semaphore-helper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- semaphore-helper.h 2001/01/17 16:18:52 1.1 +++ semaphore-helper.h 2001/01/29 00:47:41 1.2 @@ -1,13 +1,19 @@ -#ifndef _VAX_SEMAPHORE_HELPER_H -#define _VAX_SEMAPHORE_HELPER_H - /* - * SMP- and interrupt-safe semaphores helper functions. + * $Id$ + * + * VAX version based on S390 version * - * (C) Copyright 1996 Linus Torvalds - * (C) Copyright 1999 Andrea Arcangeli + * S390 version + * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * + * Derived from "include/asm-i386/semaphore-helper.h" + * (C) Copyright 1996 Linus Torvalds + * (C) Copyright 1999 Andrea Arcangeli */ +#ifndef _VAX_SEMAPHORE_HELPER_H +#define _VAX_SEMAPHORE_HELPER_H + /* * These two _must_ execute atomically wrt each other. * @@ -19,34 +25,12 @@ unsigned long flags; spin_lock_irqsave(&semaphore_wake_lock, flags); - if (atomic_read(&sem->count) <= 0) - sem->waking++; + sem->waking++; spin_unlock_irqrestore(&semaphore_wake_lock, flags); } static inline int waking_non_zero(struct semaphore *sem) { - int ret; - /* FIXME: use interlocked instructions (ADAWI, atp 1998) */ - __asm__ __volatile__( - "S1: movl %1,%0\n" - " tstl %0\n" - " beql S2\n" - " decl %1\n" - "S2:" - : "=r" (ret) - : "r" (&sem->waking) - : "r0", "memory"); - - return ret; -} - -/* FIXME: this is the original, is the above equivalent? It was in Nov 98, - * but this has changed recently - */ -/* -static inline int waking_non_zero(struct semaphore *sem) -{ unsigned long flags; int ret = 0; @@ -58,16 +42,18 @@ spin_unlock_irqrestore(&semaphore_wake_lock, flags); return ret; } -*/ + /* * waking_non_zero_interruptible: * 1 got the lock * 0 go to sleep * -EINTR interrupted * - * We must undo the sem->count down_interruptible() increment while we are - * protected by the spinlock in order to make atomic this atomic_inc() with the - * atomic_read() in wake_one_more(), otherwise we can race. -arca + * If we give up we must undo our count-decrease we previously did in down(). + * Subtle: up() can continue to happens and increase the semaphore count + * even during our critical section protected by the spinlock. So + * we must remeber to undo the sem->waking that will be run from + * wake_one_more() some time soon, if the semaphore count become > 0. */ static inline int waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk) @@ -80,7 +66,8 @@ sem->waking--; ret = 1; } else if (signal_pending(tsk)) { - atomic_inc(&sem->count); + if (atomic_inc_and_test_greater_zero(&sem->count)) + sem->waking--; ret = -EINTR; } spin_unlock_irqrestore(&semaphore_wake_lock, flags); @@ -92,9 +79,7 @@ * 1 failed to lock * 0 got the lock * - * We must undo the sem->count down_trylock() increment while we are - * protected by the spinlock in order to make atomic this atomic_inc() with the - * atomic_read() in wake_one_more(), otherwise we can race. -arca + * Implementation details are the same of the interruptible case. */ static inline int waking_non_zero_trylock(struct semaphore *sem) { @@ -103,13 +88,16 @@ spin_lock_irqsave(&semaphore_wake_lock, flags); if (sem->waking <= 0) - atomic_inc(&sem->count); - else { + { + if (atomic_inc_and_test_greater_zero(&sem->count)) + sem->waking--; + } else { sem->waking--; ret = 0; } spin_unlock_irqrestore(&semaphore_wake_lock, flags); return ret; } + +#endif /* _VAX_SEMAPHORE_HELPER_H */ -#endif Index: semaphore.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/semaphore.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- semaphore.h 2001/01/29 00:44:39 1.3 +++ semaphore.h 2001/01/29 00:47:41 1.4 @@ -191,4 +191,3 @@ } #endif /* _VAX_SEMAPHORE_H */ - |
From: Kenn H. <ke...@us...> - 2001-01-29 00:44:48
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv26062 Modified Files: semaphore.h Log Message: semaphore-helper.h Index: semaphore.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/semaphore.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- semaphore.h 2001/01/18 15:52:28 1.2 +++ semaphore.h 2001/01/29 00:44:39 1.3 @@ -1,37 +1,29 @@ -#ifndef _VAX_SEMAPHORE_H -#define _VAX_SEMAPHORE_H - - /* - * SMP- and interrupt-safe semaphores.. + * $Id$ + * + * VAX version based on S390 version + * + * S390 version + * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation * - * (C) Copyright 1996 Linus Torvalds - * - * VAX port atp Nov 1998. - * - this makes my brain hurt. - * - updated for 2.4 Jan 2001. New wait_queue_head_t plus misc software rot. - * Lifted from s390 and parisc + * Derived from "include/asm-i386/semaphore.h" + * (C) Copyright 1996 Linus Torvalds */ + +#ifndef _VAX_SEMAPHORE_H +#define _VAX_SEMAPHORE_H + #include <asm/system.h> #include <asm/atomic.h> -#include <linux/wait.h> /* wait_queue_head_t */ -#include <linux/linkage.h> +#include <linux/wait.h> struct semaphore { atomic_t count; - int waking; + int sleepers; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif +#define __SEM_DEBUG_INIT(name) #define __SEMAPHORE_INITIALIZER(name,count) \ { ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ @@ -49,9 +41,6 @@ extern inline void sema_init (struct semaphore *sem, int val) { *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); -#if WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -74,52 +63,32 @@ asmlinkage int __down_trylock(struct semaphore * sem); asmlinkage void __up(struct semaphore * sem); -extern spinlock_t semaphore_wake_lock; - - -extern __inline__ void down(struct semaphore * sem) +extern inline void down(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - if (atomic_dec_return(&sem->count) < 0) __down(sem); } -extern __inline__ int down_interruptible(struct semaphore * sem) +extern inline int down_interruptible(struct semaphore * sem) { int ret = 0; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_interruptible(sem); return ret; } -extern __inline__ int down_trylock(struct semaphore * sem) +extern inline int down_trylock(struct semaphore * sem) { int ret = 0; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_trylock(sem); return ret; } -/* - * Note! This is subtle. We jump to wake people up only if - * the semaphore was negative (== somebody was waiting on it). - */ -extern __inline__ void up(struct semaphore * sem) +extern inline void up(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_inc_return(&sem->count) <= 0) __up(sem); } @@ -143,38 +112,27 @@ * flopping back and forth between readers and writers * under heavy use. * - * -ben + * -ben */ struct rw_semaphore { - atomic_t count; - volatile unsigned char write_bias_granted; - volatile unsigned char read_bias_granted; - volatile unsigned char pad1; - volatile unsigned char pad2; - wait_queue_head_t wait; - wait_queue_head_t write_bias_wait; -#if WAITQUEUE_DEBUG - long __magic; - atomic_t readers; - atomic_t writers; -#endif + atomic_t count; + volatile unsigned int write_bias_granted; + volatile unsigned int read_bias_granted; + wait_queue_head_t wait; + wait_queue_head_t write_bias_wait; }; -#if WAITQUEUE_DEBUG -#define __RWSEM_DEBUG_INIT , ATOMIC_INIT(0), ATOMIC_INIT(0) -#else -#define __RWSEM_DEBUG_INIT /* */ -#endif +#define RW_LOCK_BIAS 0x01000000 -#define RW_LOCK_BIAS 0x01000000 +#define __RWSEM_DEBUG_INIT /* */ #define __RWSEM_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, 0, 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \ - __SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT } +{ ATOMIC_INIT(count), 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ + __WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \ + __SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT } #define __DECLARE_RWSEM_GENERIC(name,count) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name,count) + struct rw_semaphore name = __RWSEM_INITIALIZER(name,count) #define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS) #define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS-1) @@ -182,110 +140,55 @@ extern inline void init_rwsem(struct rw_semaphore *sem) { - atomic_set(&sem->count, RW_LOCK_BIAS); - sem->read_bias_granted = 0; - sem->write_bias_granted = 0; - init_waitqueue_head(&sem->wait); - init_waitqueue_head(&sem->write_bias_wait); -#if WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; - atomic_set(&sem->readers, 0); - atomic_set(&sem->writers, 0); -#endif -} - -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME -extern struct rw_semaphore *__build_read_lock(struct rw_semaphore *sem, const char *what); -extern struct rw_semaphore *__build_write_lock(struct rw_semaphore *sem, const char *what); -#endif - -/* we use FASTCALL convention for the helpers */ -extern struct rw_semaphore *FASTCALL(__down_read_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(__down_write_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(__rwsem_wake(struct rw_semaphore *sem)); + atomic_set(&sem->count, RW_LOCK_BIAS); + sem->read_bias_granted = 0; + sem->write_bias_granted = 0; + init_waitqueue_head(&sem->wait); + init_waitqueue_head(&sem->write_bias_wait); +} +extern void __down_read_failed(int, struct rw_semaphore *); +extern void __down_write_failed(int, struct rw_semaphore *); +extern void __rwsem_wake(int, struct rw_semaphore *); + extern inline void down_read(struct rw_semaphore *sem) { -#if WAITQUEUE_DEBUG - if (sem->__magic != (long)&sem->__magic) - BUG(); -#endif -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME - __build_read_lock(sem, "__down_read_failed"); -#endif -#if WAITQUEUE_DEBUG - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->writers)) - BUG(); - atomic_inc(&sem->readers); -#endif + int count; + count = atomic_dec_return(&sem->count); + if (count < 0) + __down_read_failed(count, sem); } extern inline void down_write(struct rw_semaphore *sem) { -#if WAITQUEUE_DEBUG - if (sem->__magic != (long)&sem->__magic) - BUG(); -#endif -#ifdef FIXME_WILLY_FIXME_FOR_REAL_THIS_TIME - __build_write_lock(sem, "__down_write_failed"); -#endif -#if WAITQUEUE_DEBUG - if (atomic_read(&sem->writers)) - BUG(); - if (atomic_read(&sem->readers)) - BUG(); - if (sem->read_bias_granted) - BUG(); - if (sem->write_bias_granted) - BUG(); - atomic_inc(&sem->writers); -#endif + int count; + count = atomic_add_return (-RW_LOCK_BIAS, &sem->count); + if (count < 0) + __down_write_failed(count, sem); } /* When a reader does a release, the only significant * case is when there was a writer waiting, and we've * bumped the count to 0: we must wake the writer up. */ -extern inline void __up_read(struct rw_semaphore *sem) +extern inline void up_read(struct rw_semaphore *sem) { + int count; + count = atomic_inc_return(&sem->count); + if (count == 0) + __rwsem_wake(count, sem); } /* releasing the writer is easy -- just release it and * wake up any sleepers. */ -extern inline void __up_write(struct rw_semaphore *sem) -{ -} - -extern inline void up_read(struct rw_semaphore *sem) -{ -#if WAITQUEUE_DEBUG - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->writers)) - BUG(); - atomic_dec(&sem->readers); -#endif - __up_read(sem); -} - extern inline void up_write(struct rw_semaphore *sem) { -#if WAITQUEUE_DEBUG - if (sem->read_bias_granted) - BUG(); - if (sem->write_bias_granted) - BUG(); - if (atomic_read(&sem->readers)) - BUG(); - if (atomic_read(&sem->writers) != 1) - BUG(); - atomic_dec(&sem->writers); -#endif - __up_write(sem); + int count; + count = atomic_add_return(RW_LOCK_BIAS, &sem->count); + if (count >= 0 && count < RW_LOCK_BIAS) + __rwsem_wake(count, sem); } +#endif /* _VAX_SEMAPHORE_H */ -#endif /* !(_VAX_SEMAPHORE_H) */ |
From: Kenn H. <ke...@us...> - 2001-01-29 00:44:30
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv25963 Modified Files: atomic.h Log Message: Added atomic_add_negative (returns non-zero if count still negative Index: atomic.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/atomic.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- atomic.h 2001/01/17 16:18:52 1.1 +++ atomic.h 2001/01/29 00:44:21 1.2 @@ -94,5 +94,20 @@ #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) +/* This one returns non-zero if the result is negative */ +static __inline__ int atomic_add_negative(int i, atomic_t *v) +{ + int retval = 0; + __asm__ __volatile__( + " addl2 %2,%1 \n" + " blss 1f \n" + " incl %0 \n" + "1: \n" + : "=g" (retval) + : "m" (*v), "g" (i)); + + return retval; +} + #endif /* _ARCH_VAX_ATOMIC*/ |
From: Kenn H. <ke...@us...> - 2001-01-26 00:30:43
|
Update of /cvsroot/linux-vax/kernel-2.4 In directory usw-pr-cvs1:/tmp/cvs-serv27633 Modified Files: Makefile Log Message: Bumped up EXTRAVERSION Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 2001/01/26 00:27:00 1.3 +++ Makefile 2001/01/26 00:31:06 1.4 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 0 -EXTRAVERSION = -20010122 +EXTRAVERSION = -20010126 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
From: Kenn H. <ke...@us...> - 2001-01-26 00:26:38
|
Update of /cvsroot/linux-vax/kernel-2.4/kernel In directory usw-pr-cvs1:/tmp/cvs-serv25353/kernel Modified Files: panic.c Log Message: Bring forward all 2.2 work from before new year. This should give us all a (somewhat) bootable kernel. Index: panic.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/kernel/panic.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- panic.c 2001/01/14 16:41:07 1.1.1.1 +++ panic.c 2001/01/26 00:27:00 1.2 @@ -96,6 +96,9 @@ #if defined(CONFIG_ARCH_S390) disabled_wait(caller); #endif +#ifdef CONFIG_VAX + machine_halt(); +#endif sti(); for(;;) { CHECK_EMERGENCY_SYNC |
From: Kenn H. <ke...@us...> - 2001-01-26 00:26:38
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv25353/include/asm-vax Modified Files: delay.h Log Message: Bring forward all 2.2 work from before new year. This should give us all a (somewhat) bootable kernel. Index: delay.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/delay.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- delay.h 2001/01/17 16:18:52 1.1 +++ delay.h 2001/01/26 00:27:00 1.2 @@ -3,11 +3,52 @@ extern unsigned long loops_per_sec; -/* Bodies of these functions moved to arch/vax/kernel/delay.c - since we can't inline stuff until we compile with - optimizations */ -void __delay(unsigned long loops); -void udelay(unsigned long usecs); +/* + * Copyright (C) 1993 Linus Torvalds + * + * Delay routines, using a pre-computed "loops_per_second" value. + * VAX port Copyright 1998 atp. + */ + +/* well, if you have CISC instructions lying around, might as well use them*/ +extern __inline__ void +__delay(unsigned long loops) +{ + __asm__ __volatile__("1:\tsobgtr %0, 1b\n" : "=r" (loops) : "0" (loops)); +} + +/* + * division by multiplication: you don't have to worry about + * loss of precision. + * + * Use only for very small delays ( < 1 msec). Should probably use a + * lookup table, really, as the multiplications take much too long with + * short delays. This is a "reasonable" implementation, though (and the + * first constant multiplications gets optimized away if the delay is + * a constant) + */ +extern __inline__ void +__udelay(unsigned long usecs, unsigned long lpj) +{ + struct { + unsigned long lo; + unsigned long hi; + } prod; + + usecs *= 0x000010c6UL * HZ; /* (2**32 / 1000000) * HZ */ + __asm__("emul %1,%2,$0,%0" + :"=g" (prod) + :"g" (usecs),"g" (lpj)); + __delay(prod.hi); +} + +#ifdef __SMP__ +#define udelay(usecs) \ + __udelay(usecs, cpu_data[smp_processor_id()].loops_per_jiffy) +#else +#define udelay(usecs) \ + __udelay(usecs, loops_per_jiffy) +#endif #endif /* _VAX_DELAY_H */ |