diff -u --recursive --new-file v2.0.19/linux/CREDITS linux/CREDITS --- v2.0.19/linux/CREDITS Wed Sep 11 17:57:12 1996 +++ linux/CREDITS Thu Sep 12 08:27:33 1996 @@ -1559,6 +1559,7 @@ N: Leonard N. Zubkoff E: lnz@dandelion.com +W: http://www.dandelion.com/Linux/ D: BusLogic SCSI driver D: Miscellaneous kernel fixes S: 3078 Sulphur Spring Court diff -u --recursive --new-file v2.0.19/linux/Documentation/Configure.help linux/Documentation/Configure.help --- v2.0.19/linux/Documentation/Configure.help Sat Aug 10 10:03:14 1996 +++ linux/Documentation/Configure.help Thu Sep 12 08:27:33 1996 @@ -3,6 +3,14 @@ # This version of the Linux kernel configuration help texts # corresponds to the kernel versions 2.0.x. # +# International versions available on the WWW: +# - http://www.eis.or.jp/muse/kikutani/Configure.help-1.2.x.euc +# is a Japanese translation of a previous version of this file, +# written by kikutani@eis.or.jp. +# - http://nevod.perm.su/service/linux/doc/kernel/Configure.help +# is a Russian translation of this file, maintained by +# kaf@linux.nevod.perm.su. +# # Information about what a kernel is, what it does, how to patch and # compile it and much more is contained in the Kernel-HOWTO, available # via ftp (user: anonymous) from sunsite.unc.edu in the directory @@ -202,22 +210,23 @@ "SiS" chipset. Unfortunately, it has a number of rather nasty design flaws that can cause severe data corruption under many common conditions. Say Y here to include code which tries to automatically - detect and correct the problems under Linux. - This option also enables access to the secondary IDE ports in some - CMD640 based systems. This driver will work automatically in PCI - based systems (most new systems have PCI slots). But if your system - uses VESA local bus (VLB) instead of PCI, you must also supply a - kernel boot parameter to enable the CMD640 bugfix/support: - "ide0=cmd640_vlb" The CMD640 chip is also used on add-in cards by - Acculogic, and on the "CSA-6400E PCI to IDE controller" that some - people have. If unsure, say Y. + detect and correct the problems under Linux. This option also + enables access to the secondary IDE ports in some CMD640 based + systems. This driver will work automatically in PCI based systems + (most new systems have PCI slots). But if your system uses VESA + local bus (VLB) instead of PCI, you must also supply a kernel boot + parameter to enable the CMD640 bugfix/support: "ide0=cmd640_vlb" The + CMD640 chip is also used on add-in cards by Acculogic, and on the + "CSA-6400E PCI to IDE controller" that some people have. For + details, read Documentation/ide.txt. If unsure, say Y. CMD640 enhanced support CONFIG_BLK_DEV_CMD640_ENHANCED - This option includes support for setting/autotuning PIO modes - and prefetch on CMD640 IDE interfaces. If you have a CMD640 IDE - interface and your BIOS does not already do this for you, then say Y - here. Otherwise say N. + This option includes support for setting/autotuning PIO modes and + prefetch on CMD640 IDE interfaces. For details, read + Documentation/ide.txt. If you have a CMD640 IDE interface and your + BIOS does not already do this for you, then say Y here. Otherwise + say N. RZ1000 chipset bugfix/support CONFIG_BLK_DEV_RZ1000 @@ -267,12 +276,13 @@ of the UMC-8672, and permits faster I/O speeds to be set as well. See the Documentation/ide.txt and umc8672.c files for more info. -ALI M1439/M1445 support +ALI M14xx support CONFIG_BLK_DEV_ALI14XX This driver is enabled at runtime using the "ide0=ali14xx" kernel boot parameter. It enables support for the secondary IDE interface - of the chipset, and permits faster I/O speeds to be set as well. - See the Documentation/ide.txt and ali14xx.c files for more info. + of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster + I/O speeds to be set as well. See the Documentation/ide.txt and + ali14xx.c files for more info. PROMISE DC4030 support (EXPERIMENTAL) CONFIG_BLK_DEV_PROMISE @@ -551,7 +561,7 @@ certain BIOSes if your computer uses a PCI bus system. This is recommended; say Y. -Intel 430FX (Triton) chipset DMA support +Intel 82371 PIIX (Triton I/II) DMA support CONFIG_BLK_DEV_TRITON If your PCI system uses an IDE harddrive (as opposed to SCSI, say) and includes the Intel 430FX PCI Triton chipset, you will want to @@ -804,11 +814,11 @@ CONFIG_IP_MULTICAST This is code for addressing several networked computers at once, enlarging your kernel by about 2 kB. If you are using gated, the - daemon that updates your computer's routing tables, and are using - RIP2 or OSPF you will need to have this option compiled in. You also - need multicasting if you intend to participate in the MBONE, a high - bandwidth network on top of the internet which carries audio and - video broadcasts. More information about the MBONE is on the WWW at + daemon that updates your computer's routing tables, you will need to + have this option compiled in. You also need multicasting if you + intend to participate in the MBONE, a high bandwidth network on top + of the internet which carries audio and video broadcasts. More + information about the MBONE is on the WWW at http://www.best.com/~prince/techinfo/mbone.html (to browse the WWW, you need to have access to a machine on the Internet that has one of the programs lynx, netscape or Mosaic). Information about the @@ -1233,16 +1243,19 @@ SCSI generic support CONFIG_CHR_DEV_SG If you want to use SCSI scanners, synthesizers or CD-writers or just - about anything having "SCSI" in its name other than disks, CDROMs or - tapes, say Y here. Those won't be supported by the kernel directly, - so you need some additional software which knows how to talk to - these things using the SCSI protocol. Chances are that you'll have - to write that software yourself, so have a look at the SCSI-HOWTO - and at the SCSI-Programming-HOWTO, both available via ftp (user: - anonymous) in sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to - compile this as a module ( = code which can be inserted in and - removed from the running kernel whenever you want), say M here and - read Documentation/modules.txt and Documentation/scsi.txt. + about anything having "SCSI" in its name other than harddisks, + CDROMs or tapes, say Y here. Those won't be supported by the kernel + directly, so you need some additional software which knows how to + talk to these devices using the SCSI protocol. For CD-writers, you + would need the program cdwrite, available via ftp (user: anonymous) + from sunsite.unc.edu:/pub/Linux/utils/disk-management; for other + devices, it's possible that you'll have to write the driver software + yourself, so have a look at the SCSI-HOWTO and at the + SCSI-Programming-HOWTO, both available via ftp (user: anonymous) in + sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this + as a module ( = code which can be inserted in and removed from the + running kernel whenever you want), say M here and read + Documentation/modules.txt and Documentation/scsi.txt. Probe all LUNs on each SCSI device CONFIG_SCSI_MULTI_LUN @@ -1354,9 +1367,9 @@ CONFIG_SCSI_EATA_PIO This driver supports all EATA-PIO protocol compliant SCSI Host Adaptors like the DPT PM2001 and the PM2012A. EATA-DMA compliant - HBAs can also use this driver but are discouraged from doing so, - since this driver only supports harddisks and lacks numerous - features. You might want to have a look at the SCSI-HOWTO, + host adaptors could also use this driver but are discouraged from + doing so, since this driver only supports harddisks and lacks + numerous features. You might want to have a look at the SCSI-HOWTO, available via ftp (user: anonymous) at sunsite.unc.edu:/pub/Linux/docs/HOWTO. If you want to compile this as a module ( = code which can be inserted in and removed from the @@ -1482,10 +1495,10 @@ not allow targets to disconnect CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT This option is only provided for safety if you suspect some scsi - device of yours to not support properly this feature. In that case, - you would say Y here. In general however, to not allow targets to - disconnect is not reasonable if there is more than 1 device on a - scsi bus. The normal answer therefore is N. + device of yours to not support properly the target-disconnect + feature. In that case, you would say Y here. In general however, to + not allow targets to disconnect is not reasonable if there is more + than 1 device on a scsi bus. The normal answer therefore is N. enable tagged command queuing CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE @@ -1497,8 +1510,8 @@ asks the driver to use up to 4 concurrent tagged commands for target 2 of controller 0. See the file drivers/scsi/README.ncr53c8xx for more information. - WARNING! tagged queue support requires to allow targets to - disconnect (see above). + WARNING! If you say Y here, then you have to say N to "not allow + targets to disconnect", above. The safe answer therefore is N. The normal answer therefore is Y. @@ -1933,9 +1946,9 @@ low-cost way to connect to a remote internet access provider or to form a private wide area network. The one physical line from your box to the local "switch" (i.e. the entry point to the frame relay - network) can carry several logical point-to-point connections to - other computers connected to the frame relay network. For a general - explanation of the protocol, check out + network, usually at the phone company) can carry several logical + point-to-point connections to other computers connected to the frame + relay network. For a general explanation of the protocol, check out http://frame-relay.indiana.edu/4000/4000index.html on the WWW. (To browse the WWW, you need to have access to a machine on the Internet that has one of the programs lynx, netscape or Mosaic.) To use frame @@ -2724,7 +2737,7 @@ This is the driver for the 'DOLPHIN' drive with a 34-pin Sony compatible interface. It also works with the Lasermate CR328A. If you have one of those, say Y. This driver does not work for the - Optics Storage 8001 drive; use the IDE-ATAPI CDROM driver for this + Optics Storage 8001 drive; use the IDE-ATAPI CDROM driver for that one. Sanyo CDR-H94A CDROM support @@ -2764,19 +2777,22 @@ CONFIG_QUOTA If you say Y here, you will be able to set per user limits for disk usage (also called diskquotas). Currently, it works only for the - ext2 filesystem; you need the software available via ftp (user: - anonymous) in - ftp.funet.fi:/pub/Linux/PEOPLE/Linus/subsystems/quota/ in order to - use it. Probably this is only useful for multi user systems. If - unsure, say N. + ext2 filesystem. You need additional software in order to use quota + support; check the file Documentation/Changes for that. Probably the + quota support is only useful for multi user systems. If unsure, say + N. Mandatory lock support CONFIG_LOCK_MANDATORY - Mandatory locking is used by some System 5 style database - applications. To use this option safely you must have newer NFS - daemons, new samba, new netatalk, new mars-nwe and other file - servers. At the time of writing none of these are available. Unless - you need this feature say N. + File locking is a system designed to prevent that several processes + write to the same file at the same time, causing data + corruption. Mandatory file locking is more secure than the usual + algorithm and is used by some Unix System 5 style database + applications. For details, read Documentation/mandatory.txt. To use + this option safely you must have newer NFS daemons, new samba, new + netatalk, new mars-nwe and other file servers. At the time of + writing none of these are available. So it's safest to say N here + unless you really know that you need this feature. Minix fs support CONFIG_MINIX_FS @@ -2986,9 +3002,11 @@ CONFIG_ISO9660_FS This is the standard filesystem used on CDROMs. It was previously known as "High Sierra Filesystem" and is called "hsfs" on other Unix - systems. If you have a CDROM drive and want to do more with it than - just listen to audio CDs and watch its LEDs, say Y (and read the - CDROM-HOWTO, available via ftp (user: anonymous) from + systems. The so-called Rock-Ridge extensions which allow for long + Unix filenames are also supported by this driver. If you have a + CDROM drive and want to do more with it than just listen to audio + CDs and watch its LEDs, say Y (and read the CDROM-HOWTO, available + via ftp (user: anonymous) from sunsite.unc.edu:/pub/Linux/docs/HOWTO), thereby enlarging your kernel by about 27 kB; otherwise say N. If you want to compile this as a module ( = code which can be inserted in and removed from the @@ -3355,18 +3373,21 @@ Advanced Power Management CONFIG_APM APM is a BIOS specification for saving power using several different - techniques. This is mostly useful for battery powered laptops with APM - compliant BIOSes. Specifically, the time will be reset after a USER - RESUME operation, the /proc/apm device will provide battery status - information, and user-space programs will receive notification of APM - "events" (e.g., battery status change). This driver does not spin down - disk drives (see hdparm(8) for that); and it doesn't turn off - VESA-compliant "green" monitors. This driver does not support the TI - 4000M TravelMate and the ACER 486/DX4/75 because they don't have - compliant BIOSes. Many "green" desktop machines also don't have - compliant BIOSes, and this driver will cause those machines to panic - during the boot phase (typically, these machines are using a data - segment of 0040, which is reserved for the Linux kernel). If you don't + techniques. This is mostly useful for battery powered laptops with + APM compliant BIOSes. Specifically, the time will be reset after a + USER RESUME operation, the /proc/apm device will provide battery + status information, and user-space programs will receive + notification of APM "events" (e.g., battery status change). This + driver does not spin down disk drives (see hdparm(8) for that); and + it doesn't turn off VESA-compliant "green" monitors. This driver + does not support the TI 4000M TravelMate and the ACER 486/DX4/75 + because they don't have compliant BIOSes. Many "green" desktop + machines also don't have compliant BIOSes, and this driver will + cause those machines to panic during the boot phase (typically, + these machines are using a data segment of 0040, which is reserved + for the Linux kernel). If you get random kernel OOPSes that don't + seem to be related to anything and you have a motherboard with APM + support, try disabling/enabling this option. Generally, if you don't have a battery in your machine, there isn't much point in using this driver. @@ -3478,12 +3499,16 @@ Berkshire Products PC Watchdog card CONFIG_PCWATCHDOG - This is the driver for the Berkshire Products PC Watchdog card. This card - simply watches your kernel to make sure it doesn't freeze, and if it does, - it resets your computer after a certain amount of time. This driver is - like the WDT501 driver but for different hardware. The PC watchdog cards - can be ordered from http://www.berkprod.com. Some example rc.local files - are available from ftp.bitgate.com. + This is the driver for the Berkshire Products PC Watchdog card. + This card simply watches your kernel to make sure it doesn't freeze, + and if it does, it resets your computer after a certain amount of + time. This driver is like the WDT501 driver but for different + hardware. The PC watchdog cards can be ordered from + http://www.berkprod.com. Some example rc.local files are available + from ftp.bitgate.com. This driver is also available as a module ( = + code which can be inserted in and removed from the running kernel + whenever you want). If you want to compile it as a module, say M + here and read Documentation/modules.txt. Most people will say N. Enhanced Real Time Clock Support CONFIG_RTC @@ -3839,7 +3864,7 @@ # LocalWords: Bernd informatik rwth aachen uae affs multihosting bytecode java # LocalWords: applets applet JDK ncsa cabi SNI Alphatronix readme LANs scarab # LocalWords: winsock RNIS caltech OSPF honour Honouring Mbit Localtalk DEFRAG -# LocalWords: Camtec Berkshire +# LocalWords: localtalk download Packetwin Baycom baycom interwork ascii JNT # LocalWords: Camtec proxying indyramp defragment defragmented UDP FAS FASXX # LocalWords: FastSCSI SIO FDC qlogicfas QLogic qlogicisp setbaycom ife ee LJ # LocalWords: ethz ch Travelmates ProAudioSpectrum ProAudio SoundMan SB SBPro @@ -3849,4 +3874,5 @@ # LocalWords: Soundscape SSCAPE TRIX MediaTrix PnP Maui dsp midixx EIA getty # LocalWords: mgetty sendfax gert greenie muc lowlevel Lasermate LanManager io # LocalWords: OOPSes trackball binghamton mobileip ncr IOMAPPED settags ns ser -# LocalWords: setsync NEGO MPARITY +# LocalWords: setsync NEGO MPARITY autotuning prefetch PIIX cdwrite utils rc +# LocalWords: PCWATCHDOG berkprod bitgate diff -u --recursive --new-file v2.0.19/linux/MAINTAINERS linux/MAINTAINERS --- v2.0.19/linux/MAINTAINERS Wed Sep 11 17:57:13 1996 +++ linux/MAINTAINERS Thu Sep 12 08:55:21 1996 @@ -106,10 +106,10 @@ S: Maintained APM DRIVER -P: Rik Faith & Stephen Rothwell -M: faith@cs.unc.edu, Stephen.Rothwell@canb.auug.org.au -L: linux-laptop@vger.rutgers.edu -S: Maintained +P: Rik Faith & Stephen Rothwell +M: faith@cs.unc.edu, Stephen.Rothwell@canb.auug.org.au +L: linux-laptop@vger.rutgers.edu +S: Maintained APPLETALK NETWORK LAYER P: Alan Cox & University Of Michigan @@ -166,10 +166,10 @@ S: Maintained FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit) -P: Rik Faith -M: faith@cs.unc.edu -L: linux-scsi@vger.rutgers.edu -S: Odd fixes (e.g., new signatures) +P: Rik Faith +M: faith@cs.unc.edu +L: linux-scsi@vger.rutgers.edu +S: Odd fixes (e.g., new signatures) SCSI TAPE DRIVER P: Kai Mäkisara @@ -245,10 +245,10 @@ S: Maintained STARMODE RADIO IP (STRIP) PROTOCOL DRIVER -P: Stuart Cheshire -M: cheshire@cs.stanford.edu -W: http://mosquitonet.Stanford.EDU/strip.html -S: Maintained +P: Stuart Cheshire +M: cheshire@cs.stanford.edu +W: http://mosquitonet.Stanford.EDU/strip.html +S: Maintained SMB FILESYSTEM: P: Volker Lendecke diff -u --recursive --new-file v2.0.19/linux/Makefile linux/Makefile --- v2.0.19/linux/Makefile Wed Sep 11 17:57:13 1996 +++ linux/Makefile Wed Sep 11 22:37:03 1996 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 0 -SUBLEVEL = 19 +SUBLEVEL = 20 ARCH = i386 diff -u --recursive --new-file v2.0.19/linux/arch/i386/kernel/ksyms.c linux/arch/i386/kernel/ksyms.c --- v2.0.19/linux/arch/i386/kernel/ksyms.c Sat Jun 29 12:00:45 1996 +++ linux/arch/i386/kernel/ksyms.c Wed Sep 11 22:56:13 1996 @@ -3,6 +3,8 @@ #include #include +#include + extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); @@ -11,6 +13,8 @@ /* platform dependent support */ X(dump_thread), X(dump_fpu), + XNOVERS(down_failed), + XNOVERS(up_wakeup), #ifdef __SMP__ X(apic_reg), /* Needed internally for the I386 inlines */ X(cpu_data), diff -u --recursive --new-file v2.0.19/linux/arch/i386/lib/semaphore.S linux/arch/i386/lib/semaphore.S --- v2.0.19/linux/arch/i386/lib/semaphore.S Wed Sep 11 17:57:13 1996 +++ linux/arch/i386/lib/semaphore.S Wed Sep 11 22:34:27 1996 @@ -12,18 +12,14 @@ * to increment the number of waiters on the semaphore, * call "__down()", and then eventually return to try again. */ -.globl down_failed -ALIGN -down_failed: +ENTRY(down_failed) pushl %eax pushl %ecx call SYMBOL_NAME(__down) popl %ecx ret -.globl up_wakeup -ALIGN -up_wakeup: +ENTRY(up_wakeup) pushl %eax pushl %ecx call SYMBOL_NAME(__up) diff -u --recursive --new-file v2.0.19/linux/drivers/net/dlci.c linux/drivers/net/dlci.c --- v2.0.19/linux/drivers/net/dlci.c Mon May 13 23:23:07 1996 +++ linux/drivers/net/dlci.c Fri Sep 13 08:29:48 1996 @@ -5,7 +5,7 @@ * interfaces. Requires 'dlcicfg' program to create usable * interfaces, the initial one, 'dlci' is for IOCTL use only. * - * Version: @(#)dlci.c 0.25 13 May 1996 + * Version: @(#)dlci.c 0.30 12 Sep 1996 * * Author: Mike McLagan * @@ -13,14 +13,13 @@ * * 0.15 Mike Mclagan Packet freeing, bug in kmalloc call * DLCI_RET handling - * * 0.20 Mike McLagan More conservative on which packets * are returned for retry and whic are * are dropped. If DLCI_RET_DROP is * returned from the FRAD, the packet is * sent back to Linux for re-transmission - * * 0.25 Mike McLagan Converted to use SIOC IOCTL calls + * 0.30 Jim Freeman Fixed to allow IPX traffic * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -54,7 +53,7 @@ #include static const char *devname = "dlci"; -static const char *version = "DLCI driver v0.25, 13 May 1996, mike.mclagan@linux.org"; +static const char *version = "DLCI driver v0.30, 12 Sep 1996, mike.mclagan@linux.org"; static struct device *open_dev[CONFIG_DLCI_COUNT]; @@ -143,7 +142,7 @@ hdr.pad = FRAD_P_PADDING; hdr.NLPID = FRAD_P_SNAP; memset(hdr.OUI, 0, sizeof(hdr.OUI)); - hdr.PID = type; + hdr.PID = htons(type); hlen = sizeof(hdr); break; } @@ -194,7 +193,8 @@ /* at this point, it's an EtherType frame */ header = sizeof(struct frhdr); - skb->protocol = htons(hdr->PID); + /* Already in network order ! */ + skb->protocol = hdr->PID; process = 1; break; @@ -619,12 +619,6 @@ for (i = 0; i < DEV_NUMBUFFS; i++) skb_queue_head_init(&dev->buffs[i]); - - if (strcmp(dev->name, devname) == 0) - { - dev->type = 0xFFFF; - dev->family = AF_UNSPEC; - } return(0); } diff -u --recursive --new-file v2.0.19/linux/drivers/net/sdla.c linux/drivers/net/sdla.c --- v2.0.19/linux/drivers/net/sdla.c Sat May 18 11:15:09 1996 +++ linux/drivers/net/sdla.c Fri Sep 13 08:29:48 1996 @@ -5,7 +5,7 @@ * * Global definitions for the Frame relay interface. * - * Version: @(#)sdla.c 0.25 14 May 1996 + * Version: @(#)sdla.c 0.30 12 Sep 1996 * * Credits: Sangoma Technologies, for the use of 2 cards for an extended * period of time. @@ -23,7 +23,8 @@ * non DLCI devices. * 0.25 Mike McLagan Fixed problem with rejecting packets * from non DLCI devices. - * + * 0.30 Mike McLagan Fixed kernel panic when used with modified + * ifconfig * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -58,7 +59,7 @@ #include -static const char* version = "SDLA driver v0.25, 14 May 1996, mike.mclagan@linux.org"; +static const char* version = "SDLA driver v0.30, 12 Sep 1996, mike.mclagan@linux.org"; static const char* devname = "sdla"; @@ -424,6 +425,7 @@ window = flp->type == SDLA_S508 ? SDLA_508_CMD_BUF : SDLA_502_CMD_BUF; cmd_buf = (struct sdla_cmd *)(dev->mem_start + (window & SDLA_ADDR_MASK)); ret = 0; + len = 0; jiffs = jiffies + HZ; /* 1 second is plenty */ save_flags(pflags); cli(); @@ -603,7 +605,7 @@ int sdla_dlci_conf(struct device *slave, struct device *master, int get) { struct frad_local *flp; - struct frad_local *dlp; + struct dlci_local *dlp; int i; short len, ret; diff -u --recursive --new-file v2.0.19/linux/include/asm-alpha/atomic.h linux/include/asm-alpha/atomic.h --- v2.0.19/linux/include/asm-alpha/atomic.h Thu Apr 4 14:48:02 1996 +++ linux/include/asm-alpha/atomic.h Wed Sep 11 21:41:51 1996 @@ -51,11 +51,30 @@ } /* - * Same as above, but return true if we counted down to zero + * Same as above, but return the result value */ -extern __inline__ int atomic_sub_and_test(atomic_t i, atomic_t * v) +extern __inline__ long atomic_add_return(atomic_t i, atomic_t * v) { - unsigned long temp, result; + long temp, result; + __asm__ __volatile__( + "\n1:\t" + "ldl_l %0,%1\n\t" + "addl %0,%3,%0\n\t" + "bis %0,%0,%2\n\t" + "stl_c %0,%1\n\t" + "beq %0,1b\n" + "2:" + :"=&r" (temp), + "=m" (__atomic_fool_gcc(v)), + "=&r" (result) + :"Ir" (i), + "m" (__atomic_fool_gcc(v))); + return result; +} + +extern __inline__ long atomic_sub_return(atomic_t i, atomic_t * v) +{ + long temp, result; __asm__ __volatile__( "\n1:\t" "ldl_l %0,%1\n\t" @@ -69,11 +88,16 @@ "=&r" (result) :"Ir" (i), "m" (__atomic_fool_gcc(v))); - return result==0; + return result; } +#define atomic_dec_return(v) atomic_sub_return(1,(v)) +#define atomic_inc_return(v) atomic_add_return(1,(v)) + +#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) +#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) + #define atomic_inc(v) atomic_add(1,(v)) #define atomic_dec(v) atomic_sub(1,(v)) -#define atomic_dec_and_test(v) atomic_sub_and_test(1,(v)) #endif diff -u --recursive --new-file v2.0.19/linux/include/asm-alpha/processor.h linux/include/asm-alpha/processor.h --- v2.0.19/linux/include/asm-alpha/processor.h Wed Aug 21 09:18:09 1996 +++ linux/include/asm-alpha/processor.h Thu Sep 12 16:13:49 1996 @@ -59,7 +59,7 @@ 0 \ } -#define alloc_kernel_stack() get_free_page(GFP_KERNEL) +#define alloc_kernel_stack() __get_free_page(GFP_KERNEL) #define free_kernel_stack(page) free_page((page)) #include diff -u --recursive --new-file v2.0.19/linux/include/asm-alpha/semaphore.h linux/include/asm-alpha/semaphore.h --- v2.0.19/linux/include/asm-alpha/semaphore.h Wed Sep 11 17:57:16 1996 +++ linux/include/asm-alpha/semaphore.h Wed Sep 11 21:41:51 1996 @@ -7,9 +7,11 @@ * (C) Copyright 1996 Linus Torvalds */ +#include + struct semaphore { - int count; - int waiting; + atomic_t count; + atomic_t waiting; struct wait_queue * wait; }; @@ -17,27 +19,25 @@ #define MUTEX_LOCKED ((struct semaphore) { 0, 0, NULL }) extern void __down(struct semaphore * sem); -extern void wake_up(struct wait_queue ** p); +extern void __up(struct semaphore * sem); /* - * These are not yet interrupt-safe: should use ldl_l/stl_c here.. - * - * See include/asm-i386/semaphore.h on how to do this correctly - * without any jumps or wakeups taken for the no-contention cases. + * This isn't quite as clever as the x86 side, but the gp register + * makes things a bit more complicated on the alpha.. */ extern inline void down(struct semaphore * sem) { - sem->count--; - /* "down_failed" */ - if (sem->count < 0) + for (;;) { + if (atomic_dec_return(&sem->count) >= 0) + break; __down(sem); + } } extern inline void up(struct semaphore * sem) { - sem->count++; - /* "up_wakeup" */ - __up(sem); + if (atomic_inc_return(&sem->count) <= 0) + __up(sem); } #endif diff -u --recursive --new-file v2.0.19/linux/include/asm-i386/processor.h linux/include/asm-i386/processor.h --- v2.0.19/linux/include/asm-i386/processor.h Thu May 9 07:58:57 1996 +++ linux/include/asm-i386/processor.h Thu Sep 12 16:13:34 1996 @@ -131,7 +131,7 @@ NULL, 0, 0, 0, 0 /* vm86_info */ \ } -#define alloc_kernel_stack() get_free_page(GFP_KERNEL) +#define alloc_kernel_stack() __get_free_page(GFP_KERNEL) #define free_kernel_stack(page) free_page((page)) static inline void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp) diff -u --recursive --new-file v2.0.19/linux/include/asm-i386/semaphore.h linux/include/asm-i386/semaphore.h --- v2.0.19/linux/include/asm-i386/semaphore.h Wed Sep 11 17:57:17 1996 +++ linux/include/asm-i386/semaphore.h Wed Sep 11 22:56:34 1996 @@ -1,6 +1,8 @@ #ifndef _I386_SEMAPHORE_H #define _I386_SEMAPHORE_H +#include + /* * SMP- and interrupt-safe semaphores.. * @@ -16,8 +18,11 @@ #define MUTEX ((struct semaphore) { 1, 0, NULL }) #define MUTEX_LOCKED ((struct semaphore) { 0, 0, NULL }) +asmlinkage void down_failed(void /* special register calling convention */); +asmlinkage void up_wakeup(void /* special register calling convention */); + extern void __down(struct semaphore * sem); -extern void wake_up(struct wait_queue ** p); +extern void __up(struct semaphore * sem); /* * This is ugly, but we want the default case to fall through. @@ -34,7 +39,7 @@ "lock ; " #endif "decl %0\n\t" - "js down_failed" + "js " SYMBOL_NAME_STR(down_failed) :/* no outputs */ :"m" (sem->count), "c" (sem) :"ax","dx","memory"); @@ -55,8 +60,8 @@ "lock ; " #endif "incl %0\n\t" - "jle up_wakeup\n" - "1:" + "jle " SYMBOL_NAME_STR(up_wakeup) + "\n1:" :/* no outputs */ :"m" (sem->count), "c" (sem) :"ax", "dx", "memory"); diff -u --recursive --new-file v2.0.19/linux/kernel/ksyms.c linux/kernel/ksyms.c --- v2.0.19/linux/kernel/ksyms.c Wed Sep 11 17:57:18 1996 +++ linux/kernel/ksyms.c Thu Sep 12 07:26:25 1996 @@ -333,6 +333,7 @@ X(insert_inode_hash), X(event), X(__down), + X(__up), X(securelevel), /* all busmice */ X(add_mouse_randomness), diff -u --recursive --new-file v2.0.19/linux/kernel/sched.c linux/kernel/sched.c --- v2.0.19/linux/kernel/sched.c Wed Sep 11 17:57:18 1996 +++ linux/kernel/sched.c Thu Sep 12 08:27:33 1996 @@ -43,7 +43,7 @@ int securelevel = 0; /* system security level */ -long tick = 1000000 / HZ; /* timer interrupt period */ +long tick = (1000000 + HZ/2) / HZ; /* timer interrupt period */ volatile struct timeval xtime; /* The current time */ int tickadj = 500/HZ; /* microsecs */ @@ -64,7 +64,7 @@ long time_maxerror = MAXPHASE; /* maximum error (us) */ long time_esterror = MAXPHASE; /* estimated error (us) */ long time_phase = 0; /* phase offset (scaled us) */ -long time_freq = 0; /* frequency offset (scaled ppm) */ +long time_freq = ((1000000 + HZ/2) % HZ - HZ/2) << SHIFT_USEC; /* frequency offset (scaled ppm) */ long time_adj = 0; /* tick adjust (scaled 1 / HZ) */ long time_reftime = 0; /* time at last adjustment (s) */ @@ -515,7 +515,7 @@ * critical part is the inline stuff in * where we want to avoid any extra jumps and calls. */ -inline void __up(struct semaphore *sem) +void __up(struct semaphore *sem) { normalize_semaphore(sem); wake_up(&sem->wait); diff -u --recursive --new-file v2.0.19/linux/mm/vmscan.c linux/mm/vmscan.c --- v2.0.19/linux/mm/vmscan.c Wed Sep 11 17:57:19 1996 +++ linux/mm/vmscan.c Fri Sep 13 15:45:32 1996 @@ -108,8 +108,13 @@ } else { if (page_map->count != 1) return 0; - if (!(entry = get_swap_page())) - return 0; /* Aieee!!! Out of swap space! */ + if (!(entry = get_swap_page())) { + /* Aieee!!! Out of swap space! */ + int retval = -1; + if (nr_swapfiles == 0) + retval = 0; + return retval; + } vma->vm_mm->rss--; flush_cache_page(vma, address); set_pte(page_table, __pte(entry)); @@ -312,6 +317,9 @@ if (!--p->swap_cnt) swap_task++; switch (swap_out_process(p, dma, wait)) { + /* out of swap space? */ + case -1: + return 0; case 0: if (p->swap_cnt) swap_task++;