diff -u --recursive --new-file v2.4.0-test9/linux/CREDITS linux/CREDITS
--- v2.4.0-test9/linux/CREDITS Sun Oct 8 10:50:03 2000
+++ linux/CREDITS Mon Oct 30 14:46:22 2000
@@ -320,7 +320,7 @@
D: wrote /proc/self hack, minor samba & dosemu patches
N: Axel Boldt
-E: boldt@math.ucsb.edu
+E: axel@uni-paderborn.de
W: http://math-www.uni-paderborn.de/~axel/
D: Configuration help text support
D: Linux CD and Support Giveaway List
@@ -795,13 +795,16 @@
S: Germany
N: Jeremy Fitzhardinge
-E: jeremy@zip.com.au
+E: jeremy@goop.org
+W: http://www.goop.org/~jeremy
+D: author of userfs filesystem
D: Improved mmap and munmap handling
D: General mm minor tidyups
-S: 67 Surrey St.
-S: Darlinghurst, Sydney
-S: New South Wales 2010
-S: Australia
+D: autofs v4 maintainer
+S: 987 Alabama St
+S: San Francisco
+S: CA, 94110
+S: USA
N: Ralf Flaxa
E: rfflaxa@immd4.informatik.uni-erlangen.de
@@ -1703,7 +1706,7 @@
N: Torben Mathiasen
E: torben.mathiasen@compaq.com
-E: tmm@image.dk
+E: torben@kernel.dk
W: http://tlan.kernel.dk
D: ThunderLAN maintainer
D: ThunderLAN updates and other kernel fixes.
@@ -2173,9 +2176,9 @@
S: Germany
N: Joerg Reuter
-E: jreuter@poboxes.com
-W: http://poboxes.com/jreuter/
-W: http://qsl.net/dl1bke/
+E: jreuter@yaina.de
+W: http://yaina.de/jreuter/
+W: http://www.qsl.net/dl1bke/
D: Generic Z8530 driver, AX.25 DAMA slave implementation
D: Several AX.25 hacks
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/Changes linux/Documentation/Changes
--- v2.4.0-test9/linux/Documentation/Changes Tue Sep 5 13:55:46 2000
+++ linux/Documentation/Changes Thu Oct 26 13:49:15 2000
@@ -28,7 +28,10 @@
Visite para obtener la traducción
al español de este documento en varios formatos.
-Last updated: August 28, 2000
+Eine deutsche Version dieser Datei finden Sie unter
+.
+
+Last updated: October 25, 2000
Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).
@@ -45,13 +48,13 @@
Card) hardware, for example, you probably needn't concern yourself
with pcmcia-cs.
-o Gnu C 2.7.2.3 # gcc --version
+o Gnu C 2.91.66 # gcc --version
o Gnu make 3.77 # make --version
o binutils 2.9.1.0.25 # ld -v
o util-linux 2.10o # kbdrate -v
-o modutils 2.3.15 # insmod -V
-o e2fsprogs 1.18 # tune2fs --version
-o pcmcia-cs 3.1.19 # cardmgr -V
+o modutils 2.3.18 # insmod -V
+o e2fsprogs 1.19 # tune2fs --version
+o pcmcia-cs 3.1.21 # cardmgr -V
o PPP 2.4.0 # pppd --version
o isdn4k-utils 3.1beta7 # isdnctrl 2>&1|grep version
@@ -61,13 +64,22 @@
GCC
---
-You will need at least gcc 2.7.2 to compile the kernel. You currently
-have several options for gcc-derived compilers: gcc 2.7.2.3, various
-versions of egcs, the new gcc 2.95 and upcoming gcc 3.0, and experimental
-compilers like pgcc. For absolute stability, it is still recommended
-that gcc 2.7.2.3 be used to compile your kernel. egcs 1.1.2 should also
-work. gcc 2.95 is known to have problems, and using pgcc for your kernel
-is just asking for trouble.
+The gcc version requirements may vary depending on the type of CPU in your
+computer. The next paragraph applies to users of x86 CPUs, but not
+necessarily to users of other CPUs. Users of other CPUs should obtain
+information about their gcc version requirements from another source.
+
+The recommended compiler for the kernel is egcs 1.1.2 (gcc 2.91.66), and it
+should be used when you need absolute stability. You may use gcc 2.95.2
+instead if you wish, although it may cause problems. Later versions of gcc
+have not received much testing for Linux kernel compilation, and there are
+almost certainly bugs (mainly, but not exclusively, in the kernel) that
+will need to be fixed in order to use these compilers. In any case, using
+pgcc instead of egcs or plain gcc is just asking for trouble.
+
+Note that gcc 2.7.2.3 is no longer a supported kernel compiler. The kernel
+no longer works around bugs in gcc 2.7.2.3 and, in fact, will refuse to
+be compiled with it.
In addition, please pay attention to compiler optimization. Anything
greater than -O2 may not be wise. Similarly, if you choose to use gcc-2.95
@@ -82,7 +94,7 @@
Binutils
--------
-Linux on IA/32 has recently switched from using as86 to using gas for
+Linux on IA-32 has recently switched from using as86 to using gas for
assembling the 16-bit boot code, removing the need for as86 to compile
your kernel. This change does, however, mean that you need a recent
release of binutils.
@@ -242,12 +254,7 @@
Compilers
*********
-gcc 2.7.2.3
------------
-o
-o
-
-egcs 1.1.2
+egcs 1.1.2 (gcc 2.91.66)
---------
o
o
@@ -277,7 +284,7 @@
Modutils
--------
-o
+o
Mkinitrd
--------
@@ -285,8 +292,8 @@
E2fsprogs
---------
-o
-o
+o
+o
LVM toolset
-----------
@@ -294,7 +301,7 @@
Pcmcia-cs
---------
-o
+o
Jade
----
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.4.0-test9/linux/Documentation/Configure.help Sun Oct 8 10:50:04 2000
+++ linux/Documentation/Configure.help Mon Oct 30 14:46:05 2000
@@ -1,4 +1,4 @@
-# Maintained by Axel Boldt (boldt@math.ucsb.edu)
+# Maintained by Axel Boldt (axel@uni-paderborn.de)
#
# This version of the Linux kernel configuration help texts
# corresponds to the kernel versions 2.3.x.
@@ -868,6 +868,10 @@
This is a driver for the OPTi 82C621 EIDE controller.
Please read the comments at the top of drivers/ide/opti621.c.
+ServerWorks OSB4 chipset support (EXPERIMENTAL)
+CONFIG_BLK_DEV_OSB4
+ This driver adds PIO/DMA support for the Serverworks OSB4 chipset
+
Intel PIIXn chipsets support
CONFIG_BLK_DEV_PIIX
This driver adds PIO mode setting and tuning for all PIIX IDE
@@ -938,7 +942,20 @@
available" as well.
Please read the comments at the top of drivers/ide/sis5513.c
-
+
+SLC90E66 chipset support
+CONFIG_BLK_DEV_SLC90E66
+ This driver ensures (U)DMA support for Victroy66 SouthBridges for
+ SMsC with Intel NorthBridges. This is an Ultra66 based chipset.
+ The nice thing about it is that you can mix Ultra/DMA/PIO devices
+ and it will handle timing cycles. Since this is an improved look-a-like
+ to the PIIX4 it should be a nice addition.
+
+ If you say Y here, you need to say Y to "Use DMA by default when
+ available" as well.
+
+ Please read the comments at the top of drivers/ide/slc90e66.c
+
Winbond SL82c105 support
CONFIG_BLK_DEV_SL82C105
If you have a Winbond SL82c105 IDE controller, say Y here to enable
@@ -2146,13 +2163,26 @@
If you're using aboot 0.7 or later, the bootloader will examine
the ELF headers to determine where to transfer control. Unfortunately,
- most older bootloaders -- APB, or MILO -- hardcoded the kernel
+ most older bootloaders -- APB or MILO -- hardcoded the kernel
start address rather than examining the ELF headers, and the result
is a hard lockup.
Say Y if you have a broken bootloader. Say N if you do not, or
if you wish to run on Wildfire.
+Large VMALLOC support
+CONFIG_ALPHA_LARGE_VMALLOC
+ Process creation and other aspects of virtual memory management
+ can be streamlined if we restrict the kernel to one PGD for all
+ vmalloc allocations. This equates to about 8GB.
+
+ Under normal circumstances, this is so far and above what is needed
+ as to be laughable. However, there are certain applications (such
+ as benchmark-grade in-kernel web serving) that can make use of as
+ much vmalloc space as is available.
+
+ Say N unless you know you need gobs and gobs of vmalloc space.
+
Non-standard serial port support
CONFIG_SERIAL_NONSTANDARD
Say Y here if you have any non-standard serial boards -- boards
@@ -2376,6 +2406,30 @@
information about which PCI hardware does work under Linux and which
doesn't.
+PCI support
+CONFIG_PCI_INTEGRATOR
+ Find out whether you have a PCI motherboard. PCI is the name of a
+ bus system, i.e. the way the CPU talks to the other stuff inside
+ your box. Other bus systems are ISA, EISA, Microchannel (MCA) or
+ VESA. If you have PCI, say Y, otherwise N.
+
+ The PCI-HOWTO, available from
+ http://www.linuxdoc.org/docs.html#howto , contains valuable
+ information about which PCI hardware does work under Linux and which
+ doesn't.
+
+QSpan PCI
+CONFIG_PCI_QSPAN
+ Find out whether you have a PCI motherboard. PCI is the name of a
+ bus system, i.e. the way the CPU talks to the other stuff inside
+ your box. Other bus systems are ISA, EISA, Microchannel (MCA) or
+ VESA. If you have PCI, say Y, otherwise N.
+
+ The PCI-HOWTO, available from
+ http://www.linuxdoc.org/docs.html#howto , contains valuable
+ information about which PCI hardware does work under Linux and which
+ doesn't.
+
PCI access mode
CONFIG_PCI_GOBIOS
On PCI systems, the BIOS can be used to detect the PCI devices and
@@ -4560,6 +4614,30 @@
This is a Logical Link Layer protocol used for X.25 connections over
Ethernet, using ordinary Ethernet cards.
+
+Frame Diverter (EXPERIMENTAL)
+CONFIG_NET_DIVERT
+ The Frame Diverter allows you to divert packets from the
+ network, that are not aimed at the interface receiving it (in
+ promisc. mode). Typically, a Linux box setup as an ethernet bridge
+ with the Frames Diverter on, can do some *really* transparent www
+ caching using a Squid proxy for example.
+
+ This is very usefull when you don't want to change your router's
+ config (or if you simply don't have access to it).
+
+ The other possible usages of diverting Ethernet Frames are numberous:
+ - reroute smtp traffic to another interface
+ - traffic-shape certain network streams
+ - transparently proxy smtp connections
+ - etc...
+
+ For more informations, please refer to:
+ http://www.freshmeat.net/projects/etherdivert
+ http://perso.wanadoo.fr/magpie/EtherDivert.html
+
+ If unsure, say N
+
802.1d Ethernet Bridging
CONFIG_BRIDGE
If you say Y here, then your Linux box will be able to act as an
@@ -8113,6 +8191,11 @@
say Y and read the Ethernet-HOWTO, available from
http://www.linuxdoc.org/docs.html#howto .
+ This driver also works for the following NE2000 clone cards:
+ RealTek RTL-8029 Winbond 89C940 Compex RL2000 KTI ET32P2
+ NetVin NV5000SC Via 86C926 SureCom NE34 Winbond
+ Holtek HT80232 Holtek HT80229
+
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called ne2k-pci.o. If you want to compile it as a
@@ -8176,6 +8259,8 @@
read the Ethernet-HOWTO, available from
http://www.linuxdoc.org/docs.html#howto .
+ Note: the 8029 is a NE2000 PCI clone, you can use the NE2K-PCI driver.
+
If you want to compile this driver 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. This is recommended.
@@ -9958,12 +10043,13 @@
The module will be called usb-ohci.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
-USB Human Interface Device (HID) support
+USB Human Interface Device (full HID) support
CONFIG_USB_HID
- Say Y here if you want to connect keyboards, mice, joysticks,
- graphic tablets, or any other HID based devices to your
- computer via USB. More information is available:
- Documentation/usb/input.txt.
+ Say Y here if you want full HID support to connect keyboards,
+ mice, joysticks, graphic tablets, or any other HID based devices
+ to your computer via USB. You can't use this driver and the
+ HIDBP (Boot Protocol) keyboard and mouse drivers at the same time.
+ More information is available: Documentation/usb/input.txt.
If unsure, say Y.
@@ -9972,11 +10058,11 @@
The module will be called hid.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
-USB HIDBP Keyboard support
+USB HIDBP Keyboard (basic) support
CONFIG_USB_KBD
Say Y here if you don't want to use the generic HID driver for your
USB keyboard and prefer to use the keyboard in its limited Boot
- Protocol mode. This driver is much smaller than the HID one.
+ Protocol mode instead. This driver is much smaller than the HID one.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
@@ -9985,11 +10071,11 @@
If unsure, say N.
-USB HIDBP Mouse support
+USB HIDBP Mouse (basic) support
CONFIG_USB_MOUSE
Say Y here if you don't want to use the generic HID driver for your
USB mouse and prefer to use the mouse in its limited Boot Protocol
- mode. This driver is much smaller than the HID one.
+ mode instead. This driver is much smaller than the HID one.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
@@ -14248,6 +14334,25 @@
for Trident 4Dwave. PCI ID 1039:7018 stands for SiS7018. PCI ID
10B9:5451 stands for ALi5451.
+ This driver supports S/PDIF in/out (record/playback) for ALi 5451
+ embedded in ALi M1535+ and M1535D+. Note that they aren't all
+ enabled by default; you can enable them by saying Y to "/proc file
+ system support" and "Sysctl support", and after the /proc file
+ system has been mounted, executing the command
+
+ command what is enabled
+
+ echo 0>/proc/ALi5451 pcm out is also set to S/PDIF out. (Default).
+
+ echo 1>/proc/ALi5451 use S/PDIF out to output pcm data.
+
+ echo 2>/proc/ALi5451 use S/PDIF out to output non-pcm data.(AC3...).
+
+ echo 3>/proc/ALi5451 record from Ac97 in(MIC, Line in...). (Default).
+
+ echo 4>/proc/ALi5451 no matter Ac97 settings, record from S/PDIF in.
+
+
This driver differs slightly from OSS/Free, so PLEASE READ the
comments at the top of driver/sound/trident.c
@@ -15075,18 +15180,27 @@
really know what you are doing, say N. Try Y only if you're quite
adventurous.
-Amiga AutoConfig Identification
+Zorro support
CONFIG_ZORRO
- This enables support for automatic identification of Amiga expansion
- cards that obey the AutoConfig(tm) specification.
- Say Y if you want your expansion cards to be identified on bootup;
- it will enlarge your kernel by about 10 KB. The identification
- information is then also available through /proc/zorro (say Y to
- "/proc file system support"!). Read Documentation/zorro.txt for more
- information.
+ This enables support for the Zorro bus in the Amiga. If you have
+ expansion cards in your Amiga that conform to the Amiga
+ AutoConfig(tm) specification, say Y, otherwise N. Note that even
+ expansion cards that do not fit in the Zorro slots but fit in e.g.
+ the CPU slot may fall in this category, so you have to say Y to let
+ Linux use these.
+
+Zorro device name database
+CONFIG_ZORRO_NAMES
+ By default, the kernel contains a database of all known Zorro device
+ names to make the information in /proc/iomem comprehensible to the
+ user. This database increases the size of the kernel image by about
+ 15KB, but it gets freed after the system boots up, so it doesn't
+ take up kernel memory. Anyway, if you are building an installation
+ floppy or kernel for an embedded system where kernel image size
+ really matters, you can disable this feature and you'll get device
+ ID numbers instead of names.
- Note that even if you say N here, you can still use your expansion
- cards. If in doubt, say Y.
+ When in doubt, say Y.
Amiga 1200/600 PCMCIA support (EXPERIMENTAL)
CONFIG_AMIGA_PCMCIA
@@ -16664,6 +16778,119 @@
If you do not have a CompactPCI model CP1400 or CP1500, or
another UltraSPARC-IIi-cEngine boardset with a 7-segment display,
you should say N to this option.
+
+IA-64 system type
+CONFIG_IA64_GENERIC
+ This selects the system type of your hardware. A "generic" kernel
+ will run on any supported IA-64 system. However, if you configure
+ a kernel for your specific system, it will be faster and smaller.
+
+ To find out what type of IA-64 system you have, you may want to
+ check the IA-64 Linux web site at http://www.linux-ia64.org/.
+ As of the time of this writing, most hardware is DIG compliant,
+ so the "DIG-compliant" option is usually the right choice.
+
+ HP-simulator For the HP simulator (http://software.hp.com/ia64linux/).
+ SN1-simulator For the SGI SN1 simulator.
+ DIG-compliant For DIG ("Developer's Interface Guide") compliant system.
+
+ If you don't know what to do, choose "generic".
+
+Kernel page size
+CONFIG_IA64_PAGE_SIZE_4KB
+
+ This lets you select the page size of the kernel. For best IA-64
+ performance, a page size of 8KB or 16KB is recommended. For best
+ IA-32 compatibility, a page size of 4KB should be selected (the vast
+ majority of IA-32 binaries work perfectly fine with a larger page
+ size). For Itanium systems, do NOT chose a page size larger than
+ 16KB.
+
+ 4KB For best IA-32 compatibility
+ 8KB For best IA-64 performance
+ 16KB For best IA-64 performance
+ 64KB Not for Itanium.
+
+ If you don't know what to do, choose 8KB.
+
+Enable Itanium A-step specific code
+CONFIG_ITANIUM_ASTEP_SPECIFIC
+ Select this option to build a kernel for an Itanium prototype system
+ with an A-step CPU. You have an A-step CPU if the "revision" field in
+ /proc/cpuinfo is 0.
+
+Enable Itanium A1-step specific code
+CONFIG_ITANIUM_A1_SPECIFIC
+ Select this option to build a kernel for an Itanium prototype system
+ with an A1-step CPU. If you don't know whether you have an A1-step CPU,
+ you probably don't and you can answer "no" here.
+
+Enable Itanium B-step specific code
+CONFIG_ITANIUM_BSTEP_SPECIFIC
+ Select this option to build a kernel for an Itanium prototype system
+ with a B-step CPU. You have a B-step CPU if the "revision" field in
+ /proc/cpuinfo has a value in the range from 1 to 4.
+
+Enable Itanium B0-step specific code
+CONFIG_ITANIUM_B0_SPECIFIC
+ Select this option to bild a kernel for an Itanium prototype system
+ with a B0-step CPU. You have a B0-step CPU if the "revision" field in
+ /proc/cpuinfo is 1.
+
+Force interrupt redirection
+CONFIG_IA64_HAVE_IRQREDIR
+ Select this option if you know that your system has the ability to
+ redirect interrupts to different CPUs. Select N here if you're
+ unsure.
+
+Enable use of global TLB purge instruction (ptc.g)
+CONFIG_ITANIUM_PTCG
+ Say Y here if you want the kernel to use the IA-64 "ptc.g"
+ instruction to flush the TLB on all CPUs. Select N here if
+ you're unsure.
+
+Enable SoftSDV hacks
+CONFIG_IA64_SOFTSDV_HACKS
+ Say Y here to enable hacks to make the kernel work on the Intel
+ SoftSDV simulator. Select N here if you're unsure.
+
+Enable AzusA hacks
+CONFIG_IA64_AZUSA_HACKS
+ Say Y here to enable hacks to make the kernel work on the NEC
+ AzusA platform. Select N here if you're unsure.
+
+Force socket buffers below 4GB?
+CONFIG_SKB_BELOW_4GB
+ Most of today's network interface cards (NICs) support DMA to
+ the low 32 bits of the address space only. On machines with
+ more then 4GB of memory, this can cause the system to slow
+ down if there is no I/O TLB hardware. Turning this option on
+ avoids the slow-down by forcing socket buffers to be allocated
+ from memory below 4GB. The downside is that your system could
+ run out of memory below 4GB before all memory has been used up.
+ If you're unsure how to answer this question, answer Y.
+
+Enable IA-64 Machine Check Abort
+CONFIG_IA64_MCA
+ Say Y here to enable machine check support for IA-64. If you're
+ unsure, answer Y.
+
+Performance monitor support
+CONFIG_PERFMON
+ Selects whether support for the IA-64 performance monitor hardware
+ is included in the kernel. This makes some kernel data-structures a
+ little bigger and slows down execution a bit, but it is still
+ usually a good idea to turn this on. If you're unsure, say N.
+
+/proc/pal support
+CONFIG_IA64_PALINFO
+ If you say Y here, you are able to get PAL (Processor Abstraction
+ Layer) information in /proc/pal. This contains useful information
+ about the processors in your systems, such as cache and TLB sizes
+ and the PAL firmware version in use.
+
+ To use this option, you have to check that the "/proc file system
+ support" (CONFIG_PROC_FS) is enabled, too.
#
# A couple of things I keep forgetting:
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/DocBook/via-audio.tmpl linux/Documentation/DocBook/via-audio.tmpl
--- v2.4.0-test9/linux/Documentation/DocBook/via-audio.tmpl Mon Jun 19 12:56:07 2000
+++ linux/Documentation/DocBook/via-audio.tmpl Mon Oct 30 12:24:22 2000
@@ -56,15 +56,16 @@
Introduction
- The Via VT82C686A and VT82C686A "super southbridge" chips contain
- AC97-compatible audio logic which features dual full-duplex 16-bit stereo
- PCM sound channels, plus a third PCM channel intended for use
+ The Via VT82C686A "super southbridge" chips contain
+ AC97-compatible audio logic which features dual 16-bit stereo
+ PCM sound channels (full duplex), plus a third PCM channel intended for use
in hardware-assisted FM synthesis.
The current Linux kernel audio driver for this family of chips
- supports audio playback, but recording and hardware-assisted
- FM support features are not yet available.
+ supports audio playback and recording, but hardware-assisted
+ FM features, and hardware buffer direct-access (mmap)
+ support are not yet available.
This driver supports any Linux kernel version after 2.3.50.
@@ -148,13 +149,6 @@
Known Bugs And Assumptions
- Recording support
-
-
- Recording support is currently missing.
-
-
-
MMAP support
@@ -188,17 +182,6 @@
- Broken apps
-
-
- Applications which attempt to open the sound device in read/write
- mode (O_RDWR) will fail. This is incorrect OSS behavior, but since
- this driver will eventually support recording as well as playback,
- we will be able to (in the future) support even broken programs which
- unconditionally use O_RDWR.
-
-
-
@@ -221,8 +204,8 @@
Random Notes
Two /proc pseudo-files provide diagnostic information. This is generally
- not useful to most users. Power users can disable VIA_PROC_FS macro in the
- driver source code, and remove the /proc support code. In any case, once
+ not useful to most users. Power users can disable CONFIG_SOUND_VIA82CXXX_PROCFS,
+ and remove the /proc support code. Once
version 2.0.0 is released, the /proc support code will be disabled by
default. Available /proc pseudo-files:
@@ -236,16 +219,6 @@
and device ids are not examined.
- Only supports a single sound chip, as this is a motherboard chipset.
- Some architecture remains for multiple cards, feel free to submit
- a patch to clean some of that up.
-
-
- No consideration for SMP, this chipset is not known to be found on
- any SMP motherboards. However, spin_locks must be used anyway in order
- to handle interrupts correctly.
-
-
GNU indent formatting options: -kr -i8 -pcs
@@ -264,6 +237,159 @@
Driver ChangeLog
+
+
+Version 1.1.14
+
+
+
+
+ Use VM_RESERVE when available, to eliminate unnecessary page faults.
+
+
+
+
+
+
+Version 1.1.12
+
+
+
+
+ mmap bug fixes from Linus.
+
+
+
+
+
+
+Version 1.1.11
+
+
+
+
+ Many more bug fixes. mmap enabled by default, but may still be buggy.
+
+
+
+
+
+ Uses new and spiffy method of mmap'ing the DMA buffer, based
+ on a suggestion from Linus.
+
+
+
+
+
+
+Version 1.1.10
+
+
+
+
+ Many bug fixes. mmap enabled by default, but may still be buggy.
+
+
+
+
+
+
+Version 1.1.9
+
+
+
+
+ Redesign and rewrite audio playback implementation. (faster and smaller, hopefully)
+
+
+
+
+
+ Implement recording and full duplex (DSP_CAP_DUPLEX) support.
+
+
+
+
+
+ Make procfs support optional.
+
+
+
+
+
+ Quick interrupt status check, to lessen overhead in interrupt
+ sharing situations.
+
+
+
+
+
+ Add mmap(2) support. Disabled for now, it is still buggy and experimental.
+
+
+
+
+
+ Surround all syscalls with a semaphore for cheap and easy SMP protection.
+
+
+
+
+
+ Fix bug in channel shutdown (hardware channel reset) code.
+
+
+
+
+
+ Remove unnecessary spinlocks (better performance).
+
+
+
+
+
+ Eliminate "unknown AFMT" message by using a different method
+ of selecting the best AFMT_xxx sound sample format for use.
+
+
+
+
+
+ Support for realtime hardware pointer position reporting
+ (DSP_CAP_REALTIME, SNDCTL_DSP_GETxPTR ioctls)
+
+
+
+
+
+ Support for capture/playback triggering
+ (DSP_CAP_TRIGGER, SNDCTL_DSP_SETTRIGGER ioctls)
+
+
+
+
+
+ SNDCTL_DSP_SETDUPLEX and SNDCTL_DSP_POST ioctls now handled.
+
+
+
+
+
+ Rewrite open(2) and close(2) logic to allow only one user at
+ a time. All other open(2) attempts will sleep until they succeed.
+ FIXME: open(O_RDONLY) and open(O_WRONLY) should be allowed to succeed.
+
+
+
+
+
+ Reviewed code to ensure that SMP and multiple audio devices
+ are fully supported.
+
+
+
+
+
Version 1.1.8
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/IO-mapping.txt linux/Documentation/IO-mapping.txt
--- v2.4.0-test9/linux/Documentation/IO-mapping.txt Fri Jul 28 12:50:51 2000
+++ linux/Documentation/IO-mapping.txt Fri Oct 27 10:58:02 2000
@@ -141,7 +141,7 @@
* read first 32 bits from ISA memory at 0xC0000, aka
* C000:0000 in DOS terms
*/
- unsigned int signature = readl(0xC0000);
+ unsigned int signature = isa_readl(0xC0000);
- remapping and writing:
/*
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/cachetlb.txt linux/Documentation/cachetlb.txt
--- v2.4.0-test9/linux/Documentation/cachetlb.txt Thu Sep 7 08:31:59 2000
+++ linux/Documentation/cachetlb.txt Tue Oct 10 10:33:51 2000
@@ -284,6 +284,12 @@
user space shared/writable mappings of this page potentially
exist, this routine is called.
+ NOTE: This routine need only be called for page cache pages
+ which can potentially ever be mapped into the address
+ space of a user process. So for example, VFS layer code
+ handling vfs symlinks in the page cache need not call
+ this interface at all.
+
The phrase "kernel writes to a page cache page" means,
specifically, that the kernel executes store instructions
that dirty data in that page at the page->virtual mapping
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/exception.txt linux/Documentation/exception.txt
--- v2.4.0-test9/linux/Documentation/exception.txt Fri Jul 14 16:08:11 2000
+++ linux/Documentation/exception.txt Mon Oct 16 12:26:52 2000
@@ -284,3 +284,9 @@
successful, -EFAULT on failure. Our original code did not test this
return value, however the inline assembly code in get_user tries to
return -EFAULT. GCC selected EAX to return this value.
+
+NOTE:
+Due to the way that the exception table is built and needs to be ordered,
+only use exceptions for code in the .text section. Any other section
+will cause the exception table to not be sorted correctly, and the
+exceptions will fail.
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/ia64/README linux/Documentation/ia64/README
--- v2.4.0-test9/linux/Documentation/ia64/README Fri Aug 4 11:23:37 2000
+++ linux/Documentation/ia64/README Mon Oct 9 17:54:53 2000
@@ -1,6 +1,6 @@
- Linux kernel release 2.3.xx for the IA-64 Platform
+ Linux kernel release 2.4.xx for the IA-64 Platform
- These are the release notes for Linux version 2.3 for IA-64
+ These are the release notes for Linux version 2.4 for IA-64
platform. This document provides information specific to IA-64
ONLY, to get additional information about the Linux kernel also
read the original Linux README provided with the kernel.
@@ -31,46 +31,13 @@
IA-64 SPECIFICS
- - Security related issues:
-
- o mmap needs to check whether mapping would overlap with the
- address-space hole in a region or whether the mapping would be
- across regions. In both cases, mmap should fail.
-
- o ptrace is a huge security hole right now as it does not reject
- writing to security sensitive bits (such as the PSR!).
-
- General issues:
- o Kernel modules aren't supported yet.
-
- o For non-RT signals, siginfo isn't passed through from the kernel
- to the point where the signal is actually delivered. Also, we
- should make sure the siginfo data is compliant with the UNIX
- ABI.
-
o Hardly any performance tuning has been done. Obvious targets
- include the library routines (memcpy, IP checksum, etc.). Less
+ include the library routines (IP checksum, etc.). Less
obvious targets include making sure we don't flush the TLB
- needlessly, etc. Also, the TLB handlers should probably try to
- do a speculative load from the virtually mapped linear page
- table and only if that fails fall back on walking the page table
- tree.
+ needlessly, etc.
- o Discontiguous large memory support; memory above 4GB will be
- discontiguous since the 4GB-64MB is reserved for firmware and I/O
- space.
-
- o Correct mapping for PAL runtime code; PAL code needs to be
- mapped by a TR.
-
- o Make current IRQ/IOSAPIC handling closer to IA32 such as,
- disable/enable interrupts, use of INPROGRESS flag etc.
-
- o clone system call implementation; needs to setup proper backing
- store
-
o SMP locks cleanup/optimization
- o IA32 support. Currently experimental. It mostly works but
- there are problems with some dynamically loaded programs.
+ o IA32 support. Currently experimental. It mostly works.
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/isapnp.txt linux/Documentation/isapnp.txt
--- v2.4.0-test9/linux/Documentation/isapnp.txt Sun Mar 19 18:19:22 2000
+++ linux/Documentation/isapnp.txt Mon Oct 9 17:53:05 2000
@@ -1,5 +1,5 @@
ISA Plug & Play support by Jaroslav Kysela
-=========================================================
+==========================================================
Interface /proc/isapnp
======================
@@ -13,7 +13,7 @@
---------------
With the write interface you can simply activate or modify the configuration
-for ISA Plug & Play devices. It is mainly useable for drivers which don't
+for ISA Plug & Play devices. It is mainly useable for drivers which has not
use the ISA Plug & Play kernel support yet.
card - select PnP device by vendor identification
@@ -33,8 +33,8 @@
Explanation:
- variable begins with zero
- variable begins with one
- - is in form 'PNP0000'
- - is in form 'PNP0000'
+ - is in format 'PNP0000'
+ - is in format 'PNP0000'
Example:
@@ -54,6 +54,7 @@
activate
EOF
+
Information for developers
==========================
@@ -92,7 +93,7 @@
Example for ids parameter initialization:
-static struct isapnp_card_id ids[] __devinitdata = {
+static struct isapnp_card_id card_ids[] __devinitdata = {
{
ISAPNP_CARD_ID('A','D','V', 0x550a),
devs: {
@@ -105,6 +106,25 @@
ISAPNP_CARD_END,
}
};
+ISAPNP_CARD_TABLE(card_ids);
+
+extern int isapnp_probe_devs(const struct isapnp_device_id *ids,
+ int (*probe)(struct pci_bus *card,
+ const struct isapnp_device_id *id));
+
+
+This function is a helper for drivers which requires to use one
+device from an ISA PnP card. For each matched devices is called the probe
+callback with appropriate information.
+
+Example for ids parameter initialization:
+
+static struct isapnp_device_id device_ids[] __devinitdata = {
+ { ISAPNP_DEVICE_SINGLE('E','S','S', 0x0968, 'E','S','S', 0x0968), },
+ { ISAPNP_DEVICE_SINGLE_END, }
+};
+MODULE_DEVICE_TABLE(isapnp, device_ids);
+
ISA PnP configuration
=====================
@@ -157,6 +177,8 @@
NULL);
if (!dev)
return -ENODEV;
+ if (dev->active)
+ return -EBUSY;
if (dev->prepare(dev)<0)
return -EAGAIN;
if (!(dev->resource[0].flags & IORESOURCE_IO))
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/kbuild/makefiles.txt linux/Documentation/kbuild/makefiles.txt
--- v2.4.0-test9/linux/Documentation/kbuild/makefiles.txt Sun Oct 8 10:50:04 2000
+++ linux/Documentation/kbuild/makefiles.txt Fri Oct 27 10:55:01 2000
@@ -341,11 +341,6 @@
# arch/i386/Makefile
- # only work around strength reduction bug(s) on older gcc versions
- CFLAGS += $(shell if ! $(CC) -march=i486 -S -o /dev/null \
- -xc /dev/null >/dev/null 2>&1; \
- then echo "-fno-strength-reduce"; fi)
-
# prevent gcc from keeping the stack 16 byte aligned
CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 \
-S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
@@ -356,21 +351,15 @@
# arch/i386/Makefile
ifdef CONFIG_M386
- CFLAGS += $(shell if $(CC) -march=i386 -S -o /dev/null \
- -xc /dev/null >/dev/null 2>&1; \
- then echo "-march=i386"; else echo "-m386"; fi)
+ CFLAGS += -march=i386
endif
ifdef CONFIG_M486
- CFLAGS += $(shell if $(CC) -march=i486 -S -o /dev/null \
- -xc /dev/null >/dev/null 2>&1; \
- then echo "-march=i486"; else echo "-m486"; fi)
+ CFLAGS += -march=i486
endif
ifdef CONFIG_M586
- CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null \
- -xc /dev/null >/dev/null 2>&1; \
- then echo "-march=i586"; fi)
+ CFLAGS += -march=i586
endif
Some arch Makefiles redefine the compilation commands in order
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/networking/8139too.txt linux/Documentation/networking/8139too.txt
--- v2.4.0-test9/linux/Documentation/networking/8139too.txt Sun Oct 8 10:50:04 2000
+++ linux/Documentation/networking/8139too.txt Mon Oct 30 12:54:42 2000
@@ -180,6 +180,20 @@
Change History
--------------
+Version 0.9.11 - October 28, 2000
+
+* Do not fail when PIO and MMIO region lengths do not match.
+ (They don't on some CardBus models, at least)
+* Sanity check Rx packet status and size (Tobias)
+* When handling a Tx timeout, disable Tx ASAP if not already.
+* Do not inline Tx interrupt handler (better register usage)
+* Handle dirty_tx signed integer wrap
+* Do not abort Rx processing on lack of memory, keep going
+ until the current Rx ring is completely handling. (Tobias)
+* Clean up rtl8139_close
+* Whitespace correction for dev_kfree_skb_irq call
+
+
Version 0.9.10 - September 12, 2000
* Never wrap an Rx packet (faster Rx interrupt handling)
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/networking/z8530drv.txt linux/Documentation/networking/z8530drv.txt
--- v2.4.0-test9/linux/Documentation/networking/z8530drv.txt Tue Jul 6 19:05:48 1999
+++ linux/Documentation/networking/z8530drv.txt Thu Oct 12 14:05:34 2000
@@ -4,17 +4,14 @@
Internet:
=========
-1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils-3.0-1.tar.gz
+1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz
-2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils-3.0-1.tar.gz
-
-3. ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming/z8530drv-utils-3.0.tar.gz
- If you can't find it there, try .../tcpip/linux/z8530drv-utils-3.0.tar.gz
+2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz
Please note that the information in this document may be hopelessly outdated.
A new version of the documentation, along with links to other important
Linux Kernel AX.25 documentation and programs, is available on
-http://www.rat.de/jr
+http://yaina.de/jreuter
-----------------------------------------------------------------------------
@@ -23,7 +20,7 @@
********************************************************************
- (c) 1993,1998 by Joerg Reuter DL1BKE
+ (c) 1993,2000 by Joerg Reuter DL1BKE
portions (c) 1993 Guido ten Dolle PE1NNZ
@@ -655,6 +652,6 @@
in the Linux standard distribution and their support.
Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org
- AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU
- Internet: jreuter@poboxes.com
- WWW : http://www.rat.de/jr/
+ AX-25 : DL1BKE @ DB0ABH.#BAY.DEU.EU
+ Internet: jreuter@yaina.de
+ WWW : http://yaina.de/jreuter
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/pm.txt linux/Documentation/pm.txt
--- v2.4.0-test9/linux/Documentation/pm.txt Wed Feb 23 20:05:12 2000
+++ linux/Documentation/pm.txt Thu Oct 26 14:22:24 2000
@@ -261,7 +261,6 @@
enabling power management for my specific driver/device?
ACPI4Linux mailing list: acpi@phobos.fs.tum.de
-Linux ACPI maintainer: andy_henroid@yahoo.com
System Interface
----------------
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/s390/cds.txt linux/Documentation/s390/cds.txt
--- v2.4.0-test9/linux/Documentation/s390/cds.txt Fri Jul 28 12:50:52 2000
+++ linux/Documentation/s390/cds.txt Thu Oct 12 14:19:31 2000
@@ -419,7 +419,7 @@
free_irq() - Release Device Ownership
A device driver may call free_irq() to release ownership of a previously
-aquired device.
+acquired device.
void free_irq( unsigned int irq,
void *dev_id);
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/usb/bluetooth.txt linux/Documentation/usb/bluetooth.txt
--- v2.4.0-test9/linux/Documentation/usb/bluetooth.txt Wed Dec 31 16:00:00 1969
+++ linux/Documentation/usb/bluetooth.txt Mon Oct 9 14:23:49 2000
@@ -0,0 +1,44 @@
+INTRODUCTION
+
+ The USB Bluetooth driver supports any USB Bluetooth device.
+ It currently works well with the Linux USB Bluetooth stack from Axis
+ (available at http://developer.axis.com/software/bluetooth/ ) and
+ has been rumored to work with other Linux USB Bluetooth stacks.
+
+
+CONFIGURATION
+
+ Currently the driver can handle up to 256 different USB Bluetooth
+ devices at once.
+
+ If you are not using devfs:
+ The major number that the driver uses is 216 so to use the driver,
+ create the following nodes:
+ mknod /dev/ttyUB0 c 216 0
+ mknod /dev/ttyUB1 c 216 1
+ mknod /dev/ttyUB2 c 216 2
+ mknod /dev/ttyUB3 c 216 3
+ .
+ .
+ .
+ mknod /dev/ttyUB254 c 216 254
+ mknod /dev/ttyUB255 c 216 255
+
+ If you are using devfs:
+ The devices supported by this driver will show up as
+ /dev/usb/ttub/{0,1,...}
+
+ When the device is connected and recognized by the driver, the driver
+ will print to the system log, which node the device has been bound to.
+
+
+CONTACT:
+
+ If anyone has any problems using this driver, please contact me, or
+ join the Linux-USB mailing list (information on joining the mailing
+ list, as well as a link to its searchable archive is at
+ http://www.linux-usb.org/ )
+
+
+Greg Kroah-Hartman
+greg@kroah.com
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/vm/locking linux/Documentation/vm/locking
--- v2.4.0-test9/linux/Documentation/vm/locking Sat Jan 8 21:36:20 2000
+++ linux/Documentation/vm/locking Fri Oct 13 12:10:30 2000
@@ -4,7 +4,7 @@
from different people about how locking and synchronization is done
in the Linux vm code.
-vmlist_access_lock/vmlist_modify_lock
+page_table_lock
--------------------------------------
Page stealers pick processes out of the process pool and scan for
@@ -12,10 +12,10 @@
of the victim mm, a mm_count inc and a mmdrop are done in swap_out().
Page stealers hold kernel_lock to protect against a bunch of races.
The vma list of the victim mm is also scanned by the stealer,
-and the vmlist_lock is used to preserve list sanity against the
+and the page_table_lock is used to preserve list sanity against the
process adding/deleting to the list. This also guarantees existence
of the vma. Vma existence is not guaranteed once try_to_swap_out()
-drops the vmlist lock. To guarantee the existence of the underlying
+drops the page_table_lock. To guarantee the existence of the underlying
file structure, a get_file is done before the swapout() method is
invoked. The page passed into swapout() is guaranteed not to be reused
for a different purpose because the page reference count due to being
@@ -32,19 +32,19 @@
(ie all vm system calls and faults), and from ptrace, swapin due to
swap deletion etc.
2. To modify the vmlist (add/delete or change fields in an element),
-you must also hold vmlist_modify_lock, to guard against page stealers
+you must also hold page_table_lock, to guard against page stealers
scanning the list.
3. To scan the vmlist (find_vma()), you must either
a. grab mmap_sem, which should be done by all cases except
page stealer.
or
- b. grab vmlist_access_lock, only done by page stealer.
-4. While holding the vmlist_modify_lock, you must be able to guarantee
+ b. grab page_table_lock, only done by page stealer.
+4. While holding the page_table_lock, you must be able to guarantee
that no code path will lead to page stealing. A better guarantee is
to claim non sleepability, which ensures that you are not sleeping
for a lock, whose holder might in turn be doing page stealing.
-5. You must be able to guarantee that while holding vmlist_modify_lock
-or vmlist_access_lock of mm A, you will not try to get either lock
+5. You must be able to guarantee that while holding page_table_lock
+or page_table_lock of mm A, you will not try to get either lock
for mm B.
The caveats are:
@@ -52,7 +52,7 @@
The update of mmap_cache is racy (page stealer can race with other code
that invokes find_vma with mmap_sem held), but that is okay, since it
is a hint. This can be fixed, if desired, by having find_vma grab the
-vmlist lock.
+page_table_lock.
Code that add/delete elements from the vmlist chain are
@@ -72,23 +72,16 @@
expand_stack(), it is hard to come up with a destructive scenario without
having the vmlist protection in this case.
-The vmlist lock nests with the inode i_shared_lock and the kmem cache
+The page_table_lock nests with the inode i_shared_lock and the kmem cache
c_spinlock spinlocks. This is okay, since code that holds i_shared_lock
never asks for memory, and the kmem code asks for pages after dropping
-c_spinlock. The vmlist lock also nests with pagecache_lock and
+c_spinlock. The page_table_lock also nests with pagecache_lock and
pagemap_lru_lock spinlocks, and no code asks for memory with these locks
held.
-The vmlist lock is grabbed while holding the kernel_lock spinning monitor.
+The page_table_lock is grabbed while holding the kernel_lock spinning monitor.
-The vmlist lock can be a sleeping or spin lock. In either case, care
-must be taken that it is not held on entry to the driver methods, since
-those methods might sleep or ask for memory, causing deadlocks.
-
-The current implementation of the vmlist lock uses the page_table_lock,
-which is also the spinlock that page stealers use to protect changes to
-the victim process' ptes. Thus we have a reduction in the total number
-of locks.
+The page_table_lock is a spin lock.
swap_list_lock/swap_device_lock
-------------------------------
diff -u --recursive --new-file v2.4.0-test9/linux/Documentation/zorro.txt linux/Documentation/zorro.txt
--- v2.4.0-test9/linux/Documentation/zorro.txt Tue Mar 7 10:52:41 2000
+++ linux/Documentation/zorro.txt Mon Oct 16 12:51:16 2000
@@ -9,7 +9,7 @@
---------------
The Zorro bus is the bus used in the Amiga family of computers. Thanks to
-AutoConfig(tm), it's is 100% Plug-and-Play.
+AutoConfig(tm), it's 100% Plug-and-Play.
There are two types of Zorro busses, Zorro II and Zorro III:
@@ -32,7 +32,6 @@
while ((z = zorro_find_device(ZORRO_PROD_xxx, z))) {
if (!zorro_request_region(z->resource.start+MY_START, MY_SIZE,
"My explanation"))
- strcpy(z->name, "My board name");
...
}
@@ -94,16 +93,7 @@
iounmap(virt_addr);
-5. Zorro Device Naming
-----------------------
-
-Since we think generic device naming is something for userspace (zorroutils),
-we don't keep a Zorro device name database in the kernel.
-However, device drivers are allowed to store the expansion board name in struct
-zorro_dev.
-
-
-6. References
+5. References
-------------
linux/include/linux/zorro.h
@@ -111,6 +101,6 @@
linux/include/asm-m68k/io.h
linux/include/asm-m68k/amigahw.h
linux/include/asm-ppc/io.h
-linux/driver/zorro
+linux/drivers/zorro
/proc/bus/zorro
diff -u --recursive --new-file v2.4.0-test9/linux/MAINTAINERS linux/MAINTAINERS
--- v2.4.0-test9/linux/MAINTAINERS Sun Oct 8 10:50:04 2000
+++ linux/MAINTAINERS Mon Oct 30 14:46:22 2000
@@ -87,6 +87,12 @@
L: linux-hams@vger.kernel.org
S: Maintained
+8139TOO ETHERNET DRIVER
+P: Jeff Garzik
+M: jgarzik@mandrakesoft.com
+W: http://sourceforge.net/projects/gkernel/
+S: Maintained
+
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
P: Theodore Ts'o
M: tytso@mit.edu
@@ -101,8 +107,8 @@
S: Maintained
ACPI
-P: Andrew Henroid
-M: andy_henroid@yahoo.com
+P: Andy Grover
+M: andrew.grover@intel.com
L: acpi@phobos.fs.tum.de
W: http://phobos.fs.tum.de/acpi/index.html
S: Maintained
@@ -208,7 +214,7 @@
P: Jeff Garzik
M: jgarzik@mandrakesoft.com
L: linux-fbdev@vuser.vu.union.edu
-S: Maintained
+S: Odd Fixes
COMPAQ FIBRE CHANNEL 64-bit/66MHz PCI non-intelligent HBA
P: Amy Vanzant-Hodge
@@ -255,7 +261,7 @@
CONFIGURE.HELP
P: Axel Boldt
-M: boldt@math.ucsb.edu
+M: axel@uni-paderborn.de
S: Maintained
COSA/SRP SYNC SERIAL DRIVER
@@ -295,9 +301,9 @@
DAMA SLAVE for AX.25
P: Joerg Reuter
-M: jreuter@poboxes.com
-W: http://poboxes.com/jreuter/
-W: http://qsl.net/dl1bke/
+M: jreuter@yaina.de
+W: http://yaina.de/jreuter/
+W: http://www.qsl.net/dl1bke/
L: linux-hams@vger.kernel.org
S: Maintained
@@ -423,8 +429,8 @@
FILE LOCKING (flock() and fcntl()/lockf())
P: Matthew Wilcox
-M: willy@thepuffingroup.com
-L: linux-kernel@vger.kernel.org
+M: matthew@wil.cx
+L: linux-fsdevel@vger.kernel.org
S: Maintained
FPU EMULATOR
@@ -609,6 +615,12 @@
M: mingo@redhat.com
S: Maintained
+INTEL I8XX RANDOM NUMBER GENERATOR SUPPORT
+P: Jeff Garzik
+M: jgarzik@mandrakesoft.com
+W: http://sourceforge.net/projects/gkernel/
+S: Maintained
+
INTEL P6 MICROCODE UPDATE SUPPORT
P: Tigran Aivazian
M: tigran@veritas.com
@@ -678,6 +690,12 @@
L: autofs@linux.kernel.org
S: Maintained
+KERNEL AUTOMOUNTER v4 (AUTOFS4)
+P: Jeremy Fitzhardinge
+M: jeremy@goop.org
+L: autofs@linux.kernel.org
+S: Maintained
+
KERNEL NFSD
P: Neil Brown
M: neilb@cse.unsw.edu.au
@@ -1151,7 +1169,7 @@
TLAN NETWORK DRIVER
P: Torben Mathiasen
M: torben.mathiasen@compaq.com
-M: tmm@image.dk
+M: torben@kernel.dk
L: tlan@vuser.vu.union.edu
L: linux-net@vger.kernel.org
W: http://tlan.kernel.dk
@@ -1180,7 +1198,8 @@
TULIP NETWORK DRIVER
P: Jeff Garzik
M: jgarzik@mandrakesoft.com
-L: linux-tulip@cesdis.gsfc.nasa.gov
+L: tulip-users@lists.sourceforge.net
+W: http://sourceforge.net/projects/tulip/
S: Maintained
TUN/TAP driver
@@ -1338,6 +1357,7 @@
P: Jeff Garzik
M: jgarzik@mandrakesoft.com
L: linux-via@gtf.org
+W: http://sourceforge.net/projects/gkernel/
S: Maintained
USB DIAMOND RIO500 DRIVER
@@ -1386,9 +1406,9 @@
Z8530 DRIVER FOR AX.25
P: Joerg Reuter
-M: jreuter@poboxes.com
-W: http://poboxes.com/jreuter/
-W: http://qsl.net/dl1bke/
+M: jreuter@yaina.de
+W: http://yaina.de/jreuter/
+W: http://www.qsl.net/dl1bke/
L: linux-hams@vger.kernel.org
S: Maintained
diff -u --recursive --new-file v2.4.0-test9/linux/Makefile linux/Makefile
--- v2.4.0-test9/linux/Makefile Sun Oct 8 10:50:04 2000
+++ linux/Makefile Fri Oct 27 10:55:48 2000
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 0
-EXTRAVERSION = -test9
+EXTRAVERSION = -test10
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -87,7 +87,7 @@
CPPFLAGS := -D__KERNEL__ -I$(HPATH)
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
#
@@ -158,7 +158,7 @@
DRIVERS-$(CONFIG_PCMCIA_NETCARD) += drivers/net/pcmcia/pcmcia_net.o
DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
-DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus.a
+DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/zorro.a
DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o
@@ -182,9 +182,6 @@
include arch/$(ARCH)/Makefile
-# use '-fno-strict-aliasing', but only if the compiler can take it
-CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-strict-aliasing"; fi)
-
export CPPFLAGS CFLAGS AFLAGS
export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
@@ -291,7 +288,7 @@
# Exuberant ctags works better with -I
tags: dummy
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__initlocaldata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
@@ -367,6 +364,7 @@
rm -f drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c
rm -f drivers/char/conmakehash
rm -f drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist
+ rm -f drivers/zorro/devlist.h drivers/zorro/gen-devlist
rm -f drivers/sound/bin2hex drivers/sound/hex2hex
rm -f drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2}
rm -f net/khttpd/make_times_h
diff -u --recursive --new-file v2.4.0-test9/linux/README linux/README
--- v2.4.0-test9/linux/README Sun Oct 8 10:50:04 2000
+++ linux/README Thu Oct 26 13:49:15 2000
@@ -161,12 +161,10 @@
COMPILING the kernel:
- - Make sure you have gcc-2.7.2 or newer available. It seems older gcc
- versions can have problems compiling newer versions of Linux. This
- is mainly because the older compilers can only generate "a.out"-format
- executables. As of Linux 2.1.0, the kernel must be compiled as an
- "ELF" binary. If you upgrade your compiler, remember to get the new
- binutils package too (for as/ld/nm and company).
+ - Make sure you have gcc-2.91.66 (egcs-1.1.2) available. gcc 2.95.2 may
+ also work but is not as safe, and *gcc 2.7.2.3 is no longer supported*.
+ Also remember to upgrade your binutils package (for as/ld/nm and company)
+ if necessary. For more information, refer to ./Documentation/Changes.
Please note that you can still run a.out user programs with this
kernel.
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v2.4.0-test9/linux/arch/alpha/config.in Sun Oct 8 10:50:04 2000
+++ linux/arch/alpha/config.in Mon Oct 16 15:38:41 2000
@@ -63,6 +63,7 @@
unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
unset CONFIG_ALPHA_IRONGATE
unset CONFIG_ALPHA_BROKEN_IRQ_MASK
+unset CONFIG_ALPHA_LARGE_VMALLOC
# Most of these machines have ISA slots; not exactly sure which don't,
# and this doesn't activate hordes of code, so do it always.
@@ -205,6 +206,14 @@
-o "$CONFIG_ALPHA_TITAN" = "y" -o "$CONFIG_ALPHA_GENERIC" = "y" ]
then
bool 'Symmetric multi-processing support' CONFIG_SMP
+fi
+
+# The machine must be able to support more than 8GB physical memory
+# before large vmalloc might even pretend to be an issue.
+if [ "$CONFIG_ALPHA_GENERIC" = "y" -o "$CONFIG_ALPHA_DP264" = "y" \
+ -o "$CONFIG_ALPHA_WILDFIRE" = "y" -o "$CONFIG_ALPHA_TITAN" = "y" ]
+then
+ bool 'Large VMALLOC support' CONFIG_ALPHA_LARGE_VMALLOC
fi
source drivers/pci/Config.in
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/defconfig linux/arch/alpha/defconfig
--- v2.4.0-test9/linux/arch/alpha/defconfig Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/defconfig Mon Oct 16 15:38:41 2000
@@ -6,14 +6,14 @@
#
# Code maturity level options
#
-# CONFIG_EXPERIMENTAL is not set
+CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
-# CONFIG_KMOD is not set
+CONFIG_KMOD=y
#
# General setup
@@ -52,6 +52,7 @@
CONFIG_PCI=y
CONFIG_ALPHA_BROKEN_IRQ_MASK=y
# CONFIG_SMP is not set
+# CONFIG_ALPHA_LARGE_VMALLOC is not set
CONFIG_PCI_NAMES=y
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
@@ -61,10 +62,10 @@
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
-CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
-CONFIG_BINFMT_EM86=y
+# CONFIG_BINFMT_EM86 is not set
#
# Parallel port support
@@ -72,10 +73,15 @@
# CONFIG_PARPORT is not set
#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
# Plug and Play configuration
#
-# CONFIG_PNP is not set
-# CONFIG_ISAPNP is not set
+CONFIG_PNP=y
+CONFIG_ISAPNP=y
#
# Block devices
@@ -84,11 +90,24 @@
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_LOOP=m
# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_LVM_PROC_FS is not set
#
# Networking options
@@ -96,23 +115,48 @@
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK is not set
-# CONFIG_NETFILTER is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
-# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_ALIAS is not set
+# CONFIG_IP_MROUTE is not set
+CONFIG_INET_ECN=y
# CONFIG_SYN_COOKIES is not set
#
-# (it is safe to leave these untouched)
+# IP: Netfilter Configuration
#
-CONFIG_SKB_LARGE=y
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IPTABLES=m
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_UNCLEAN is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+CONFIG_IP_NF_FILTER=m
+# CONFIG_IP_NF_TARGET_REJECT is not set
+# CONFIG_IP_NF_TARGET_MIRROR is not set
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+CONFIG_IP_NF_COMPAT_IPCHAINS=y
+CONFIG_IP_NF_NAT_NEEDED=y
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
#
#
@@ -120,13 +164,92 @@
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
#
# ATA/IDE/MFM/RLL support
#
-# CONFIG_IDE is not set
-# CONFIG_BLK_DEV_IDE_MODES is not set
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
+# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
+# CONFIG_BLK_DEV_IDEDISK_IBM is not set
+# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
+# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
+# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
+# CONFIG_BLK_DEV_IDEDISK_WD is not set
+# CONFIG_BLK_DEV_COMMERIAL is not set
+# CONFIG_BLK_DEV_TIVO is not set
+# CONFIG_BLK_DEV_IDECS is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_ISAPNP is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_IDEPCI_SHARE_IRQ is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_PCI_WIP is not set
+# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_AEC62XX_TUNING is not set
+CONFIG_BLK_DEV_ALI15X3=y
+# CONFIG_WDC_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD7409 is not set
+# CONFIG_AMD7409_OVERRIDE is not set
+CONFIG_BLK_DEV_CMD64X=y
+CONFIG_BLK_DEV_CY82C693=y
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_HPT34X_AUTODMA is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_PDC202XX is not set
+# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_CHIPSETS is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_DMA_NONPCI is not set
+CONFIG_BLK_DEV_IDE_MODES=y
#
# SCSI support
@@ -140,7 +263,7 @@
CONFIG_SD_EXTRA_DEVS=40
# CONFIG_CHR_DEV_ST is not set
CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_SR_EXTRA_DEVS=2
# CONFIG_CHR_DEV_SG is not set
@@ -149,7 +272,7 @@
#
# CONFIG_SCSI_DEBUG_QUEUES is not set
# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
#
@@ -161,13 +284,18 @@
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_IPS is not set
+CONFIG_SCSI_AIC7XXX=y
+CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT=y
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_PROC_STATS=y
+CONFIG_AIC7XXX_RESET_DELAY=5
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_DMA is not set
@@ -178,24 +306,30 @@
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_NCR53C7xx is not set
-# CONFIG_SCSI_NCR53C8XX is not set
-# CONFIG_SCSI_SYM53C8XX is not set
+CONFIG_SCSI_NCR53C8XX=y
+CONFIG_SCSI_SYM53C8XX=y
+CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
+CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
+CONFIG_SCSI_NCR53C8XX_SYNC=20
+# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
+# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
-CONFIG_SCSI_QLOGIC_ISP=y
+# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_DEBUG is not set
#
# Network device support
@@ -209,40 +343,62 @@
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
-# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=y
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
-CONFIG_DE4X5=y
-# CONFIG_TULIP is not set
+# CONFIG_DE4X5 is not set
+CONFIG_TULIP=y
# CONFIG_DGRS is not set
+# CONFIG_DM9102 is not set
# CONFIG_EEPRO100 is not set
+# CONFIG_LNE390 is not set
+# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
+# CONFIG_NE3210 is not set
+# CONFIG_ES3210 is not set
+# CONFIG_RTL8129 is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
+# CONFIG_WINBOND_840 is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
+# CONFIG_HAMACHI is not set
+CONFIG_YELLOWFIN=y
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
@@ -256,6 +412,8 @@
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
#
# Wan interfaces
@@ -307,19 +465,19 @@
# Joysticks
#
# CONFIG_JOYSTICK is not set
+
+#
+# Input core support is needed for joysticks
+#
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-
-#
-# Video For Linux
-#
-# CONFIG_VIDEO_DEV is not set
+CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
@@ -328,34 +486,38 @@
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
# CONFIG_DRM is not set
-# CONFIG_DRM_TDFX is not set
#
-# USB support
+# Multimedia devices
#
-# CONFIG_USB is not set
+# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS_FS=m
# CONFIG_AUTOFS4_FS is not set
# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_VFAT_FS=y
# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
@@ -363,23 +525,40 @@
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
-CONFIG_NFS_FS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
# CONFIG_ROOT_NFS is not set
-# CONFIG_NFSD is not set
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_SUNRPC=m
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_MOUNT_SUBDIR is not set
+# CONFIG_NCPFS_NDS_DOMAINS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
#
# Partition Types
@@ -387,7 +566,45 @@
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_OSF_PARTITION=y
CONFIG_MSDOS_PARTITION=y
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_UTF8 is not set
#
# Console drivers
@@ -405,7 +622,18 @@
# CONFIG_SOUND is not set
#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+
+#
# Kernel hacking
#
CONFIG_MATHEMU=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_ALPHA_LEGACY_START_ADDRESS=y
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/core_cia.c linux/arch/alpha/kernel/core_cia.c
--- v2.4.0-test9/linux/arch/alpha/kernel/core_cia.c Mon Aug 28 21:21:57 2000
+++ linux/arch/alpha/kernel/core_cia.c Fri Oct 27 10:55:01 2000
@@ -399,7 +399,7 @@
{
static int page[PAGE_SIZE/4]
__attribute__((aligned(PAGE_SIZE)))
- __initlocaldata = { 0 };
+ __initdata = { 0 };
struct pci_iommu_arena *arena = pci_isa_hose->sg_isa;
int ctrl, addr0, tag0, pte0, data0;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
--- v2.4.0-test9/linux/arch/alpha/kernel/setup.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/setup.c Fri Oct 27 10:55:01 2000
@@ -449,17 +449,13 @@
}
static struct console srmcons = {
- "srm0",
- srm_console_write,
- NULL,
- srm_console_device,
- srm_console_wait_key,
- NULL,
- srm_console_setup,
- CON_PRINTBUFFER | CON_ENABLED, /* fake it out */
- -1,
- 0,
- NULL
+ name: "srm0",
+ write: srm_console_write,
+ device: srm_console_device,
+ wait_key: srm_console_wait_key,
+ setup: srm_console_setup,
+ flags: CON_PRINTBUFFER | CON_ENABLED, /* fake it out */
+ index: -1,
};
#else
@@ -683,7 +679,7 @@
static struct alpha_machine_vector * __init
get_sysvec(long type, long variation, long cpu)
{
- static struct alpha_machine_vector *systype_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *systype_vecs[] __initdata =
{
NULL, /* 0 */
NULL, /* ADU */
@@ -726,48 +722,48 @@
NULL, /* Titan */
};
- static struct alpha_machine_vector *unofficial_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *unofficial_vecs[] __initdata =
{
NULL, /* 100 */
&ruffian_mv,
};
- static struct alpha_machine_vector *api_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *api_vecs[] __initdata =
{
NULL, /* 200 */
&nautilus_mv,
};
- static struct alpha_machine_vector *alcor_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *alcor_vecs[] __initdata =
{
&alcor_mv, &xlt_mv, &xlt_mv
};
- static struct alpha_machine_vector *eb164_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *eb164_vecs[] __initdata =
{
&eb164_mv, &pc164_mv, &lx164_mv, &sx164_mv, &rx164_mv
};
- static struct alpha_machine_vector *eb64p_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *eb64p_vecs[] __initdata =
{
&eb64p_mv,
&cabriolet_mv,
&cabriolet_mv /* AlphaPCI64 */
};
- static struct alpha_machine_vector *eb66_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *eb66_vecs[] __initdata =
{
&eb66_mv,
&eb66p_mv
};
- static struct alpha_machine_vector *titan_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *titan_vecs[] __initdata =
{
NULL,
&privateer_mv, /* privateer */
};
- static struct alpha_machine_vector *tsunami_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *tsunami_vecs[] __initdata =
{
NULL,
&dp264_mv, /* dp264 */
@@ -860,7 +856,7 @@
static struct alpha_machine_vector * __init
get_sysvec_byname(const char *name)
{
- static struct alpha_machine_vector *all_vecs[] __initlocaldata =
+ static struct alpha_machine_vector *all_vecs[] __initdata =
{
&alcor_mv,
&alphabook1_mv,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_alcor.c linux/arch/alpha/kernel/sys_alcor.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_alcor.c Thu Mar 16 14:08:32 2000
+++ linux/arch/alpha/kernel/sys_alcor.c Fri Oct 27 10:55:01 2000
@@ -201,7 +201,7 @@
static int __init
alcor_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[7][5] __initlocaldata = {
+ static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */
/* note: IDSEL 17 is XLT only */
{16+13, 16+13, 16+13, 16+13, 16+13}, /* IdSel 17, TULIP */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_cabriolet.c linux/arch/alpha/kernel/sys_cabriolet.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_cabriolet.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/sys_cabriolet.c Fri Oct 27 10:55:01 2000
@@ -173,7 +173,7 @@
static inline int __init
eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[5][5] __initlocaldata = {
+ static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */
{16+0, 16+0, 16+5, 16+9, 16+13}, /* IdSel 6, slot 0, J25 */
{16+1, 16+1, 16+6, 16+10, 16+14}, /* IdSel 7, slot 1, J26 */
@@ -203,7 +203,7 @@
static inline int __init
cabriolet_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[5][5] __initlocaldata = {
+ static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+2, 16+2, 16+7, 16+11, 16+15}, /* IdSel 5, slot 2, J21 */
{ 16+0, 16+0, 16+5, 16+9, 16+13}, /* IdSel 6, slot 0, J19 */
@@ -274,7 +274,7 @@
static inline int __init
alphapc164_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[7][5] __initlocaldata = {
+ static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+2, 16+2, 16+9, 16+13, 16+17}, /* IdSel 5, slot 2, J20 */
{ 16+0, 16+0, 16+7, 16+11, 16+15}, /* IdSel 6, slot 0, J29 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_dp264.c linux/arch/alpha/kernel/sys_dp264.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_dp264.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/sys_dp264.c Fri Oct 27 10:55:01 2000
@@ -393,7 +393,7 @@
static int __init
dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[6][5] __initlocaldata = {
+ static char irq_tab[6][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ -1, -1, -1, -1, -1}, /* IdSel 5 ISA Bridge */
{ 16+ 3, 16+ 3, 16+ 2, 16+ 2, 16+ 2}, /* IdSel 6 SCSI builtin*/
@@ -427,7 +427,7 @@
static int __init
monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[13][5] __initlocaldata = {
+ static char irq_tab[13][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 45, 45, 45, 45, 45}, /* IdSel 3 21143 PCI1 */
{ -1, -1, -1, -1, -1}, /* IdSel 4 unused */
@@ -488,7 +488,7 @@
static int __init
webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[13][5] __initlocaldata = {
+ static char irq_tab[13][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */
{ -1, -1, -1, -1, -1}, /* IdSel 8 unused */
@@ -509,7 +509,7 @@
static int __init
clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[7][5] __initlocaldata = {
+ static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+ 8, 16+ 8, 16+ 9, 16+10, 16+11}, /* IdSel 1 slot 1 */
{ 16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 2 slot 2 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_eb64p.c linux/arch/alpha/kernel/sys_eb64p.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_eb64p.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/sys_eb64p.c Fri Oct 27 10:55:01 2000
@@ -188,7 +188,7 @@
static int __init
eb64p_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[5][5] __initlocaldata = {
+ static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */
{16+7, 16+7, 16+7, 16+7, 16+7}, /* IdSel 5, slot ?, ?? */
{16+0, 16+0, 16+2, 16+4, 16+9}, /* IdSel 6, slot ?, ?? */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_miata.c linux/arch/alpha/kernel/sys_miata.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_miata.c Thu Mar 16 14:08:32 2000
+++ linux/arch/alpha/kernel/sys_miata.c Fri Oct 27 10:55:01 2000
@@ -151,7 +151,7 @@
static int __init
miata_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[18][5] __initlocaldata = {
+ static char irq_tab[18][5] __initdata = {
/*INT INTA INTB INTC INTD */
{16+ 8, 16+ 8, 16+ 8, 16+ 8, 16+ 8}, /* IdSel 14, DC21142 */
{ -1, -1, -1, -1, -1}, /* IdSel 15, EIDE */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_mikasa.c linux/arch/alpha/kernel/sys_mikasa.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_mikasa.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/sys_mikasa.c Fri Oct 27 10:55:01 2000
@@ -164,7 +164,7 @@
static int __init
mikasa_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[8][5] __initlocaldata = {
+ static char irq_tab[8][5] __initdata = {
/*INT INTA INTB INTC INTD */
{16+12, 16+12, 16+12, 16+12, 16+12}, /* IdSel 17, SCSI */
{ -1, -1, -1, -1, -1}, /* IdSel 18, PCEB */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_noritake.c linux/arch/alpha/kernel/sys_noritake.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_noritake.c Tue Jul 18 22:58:28 2000
+++ linux/arch/alpha/kernel/sys_noritake.c Fri Oct 27 10:55:01 2000
@@ -205,7 +205,7 @@
static int __init
noritake_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[15][5] __initlocaldata = {
+ static char irq_tab[15][5] __initdata = {
/*INT INTA INTB INTC INTD */
/* note: IDSELs 16, 17, and 25 are CORELLE only */
{ 16+1, 16+1, 16+1, 16+1, 16+1}, /* IdSel 16, QLOGIC */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_rawhide.c linux/arch/alpha/kernel/sys_rawhide.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_rawhide.c Mon Feb 28 14:54:30 2000
+++ linux/arch/alpha/kernel/sys_rawhide.c Fri Oct 27 10:55:01 2000
@@ -194,7 +194,7 @@
static int __init
rawhide_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[5][5] __initlocaldata = {
+ static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+16, 16+16, 16+16, 16+16, 16+16}, /* IdSel 1 SCSI PCI 1 */
{ 16+ 0, 16+ 0, 16+ 1, 16+ 2, 16+ 3}, /* IdSel 2 slot 2 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_ruffian.c linux/arch/alpha/kernel/sys_ruffian.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_ruffian.c Thu Mar 16 14:08:32 2000
+++ linux/arch/alpha/kernel/sys_ruffian.c Fri Oct 27 10:55:01 2000
@@ -119,7 +119,7 @@
/* Check BANK_ENABLE */
if (bank & 0x01) {
- static unsigned long size[] __initlocaldata = {
+ static unsigned long size[] __initdata = {
0x40000000UL, /* 0x00, 1G */
0x20000000UL, /* 0x02, 512M */
0x10000000UL, /* 0x04, 256M */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_rx164.c linux/arch/alpha/kernel/sys_rx164.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_rx164.c Mon Feb 28 14:54:30 2000
+++ linux/arch/alpha/kernel/sys_rx164.c Fri Oct 27 10:55:01 2000
@@ -164,7 +164,7 @@
rx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
#if 0
- static char irq_tab_pass1[6][5] __initlocaldata = {
+ static char irq_tab_pass1[6][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+3, 16+3, 16+8, 16+13, 16+18}, /* IdSel 5, slot 2 */
{ 16+5, 16+5, 16+10, 16+15, 16+20}, /* IdSel 6, slot 0 */
@@ -174,7 +174,7 @@
{ 16+1, 16+1, 16+6, 16+11, 16+16}, /* IdSel 10, slot 4 */
};
#else
- static char irq_tab[6][5] __initlocaldata = {
+ static char irq_tab[6][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+0, 16+0, 16+6, 16+11, 16+16}, /* IdSel 5, slot 0 */
{ 16+1, 16+1, 16+7, 16+12, 16+17}, /* IdSel 6, slot 1 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_sable.c linux/arch/alpha/kernel/sys_sable.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_sable.c Mon Feb 28 14:54:30 2000
+++ linux/arch/alpha/kernel/sys_sable.c Fri Oct 27 10:55:01 2000
@@ -255,7 +255,7 @@
static int __init
sable_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[9][5] __initlocaldata = {
+ static char irq_tab[9][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 32+0, 32+0, 32+0, 32+0, 32+0}, /* IdSel 0, TULIP */
{ 32+1, 32+1, 32+1, 32+1, 32+1}, /* IdSel 1, SCSI */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_sio.c linux/arch/alpha/kernel/sys_sio.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_sio.c Sun Feb 27 13:28:01 2000
+++ linux/arch/alpha/kernel/sys_sio.c Fri Oct 27 10:55:01 2000
@@ -143,7 +143,7 @@
* that they use the default INTA line, if they are interrupt
* driven at all).
*/
- static char irq_tab[][5] __initlocaldata = {
+ static char irq_tab[][5] __initdata = {
/*INT A B C D */
{ 3, 3, 3, 3, 3}, /* idsel 6 (53c810) */
{-1, -1, -1, -1, -1}, /* idsel 7 (SIO: PCI/ISA bridge) */
@@ -164,7 +164,7 @@
static inline int __init
p2k_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[][5] __initlocaldata = {
+ static char irq_tab[][5] __initdata = {
/*INT A B C D */
{ 0, 0, -1, -1, -1}, /* idsel 6 (53c810) */
{-1, -1, -1, -1, -1}, /* idsel 7 (SIO: PCI/ISA bridge) */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_sx164.c linux/arch/alpha/kernel/sys_sx164.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_sx164.c Mon Jun 26 11:26:56 2000
+++ linux/arch/alpha/kernel/sys_sx164.c Fri Oct 27 10:55:01 2000
@@ -96,7 +96,7 @@
static int __init
sx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[5][5] __initlocaldata = {
+ static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ 16+ 9, 16+ 9, 16+13, 16+17, 16+21}, /* IdSel 5 slot 2 J17 */
{ 16+11, 16+11, 16+15, 16+19, 16+23}, /* IdSel 6 slot 0 J19 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_takara.c linux/arch/alpha/kernel/sys_takara.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_takara.c Thu Mar 16 14:08:32 2000
+++ linux/arch/alpha/kernel/sys_takara.c Fri Oct 27 10:55:01 2000
@@ -172,7 +172,7 @@
static int __init
takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[15][5] __initlocaldata = {
+ static char irq_tab[15][5] __initdata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
{ 16+2, 16+2, 16+2, 16+2, 16+2}, /* slot 7 == device 2 */
{ 16+1, 16+1, 16+1, 16+1, 16+1}, /* slot 8 == device 1 */
@@ -203,7 +203,7 @@
static int __init
takara_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[15][5] __initlocaldata = {
+ static char irq_tab[15][5] __initdata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
{ 16+2, 16+2, 16+2, 16+2, 16+2}, /* slot 7 == device 2 */
{ 16+1, 16+1, 16+1, 16+1, 16+1}, /* slot 8 == device 1 */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/kernel/sys_wildfire.c linux/arch/alpha/kernel/sys_wildfire.c
--- v2.4.0-test9/linux/arch/alpha/kernel/sys_wildfire.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/kernel/sys_wildfire.c Mon Oct 30 12:24:22 2000
@@ -302,7 +302,7 @@
static int __init
wildfire_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static char irq_tab[8][5] __initlocaldata = {
+ static char irq_tab[8][5] __initdata = {
/*INT INTA INTB INTC INTD */
{ -1, -1, -1, -1, -1}, /* IdSel 0 ISA Bridge */
{ 36, 36, 36+1, 36+2, 36+3}, /* IdSel 1 SCSI builtin */
@@ -326,11 +326,6 @@
return irq;
}
-static void __init
-wildfire_init_pci(void)
-{
- common_init_pci();
-}
/*
* The System Vectors
@@ -353,7 +348,7 @@
init_arch: wildfire_init_arch,
init_irq: wildfire_init_irq,
init_rtc: common_init_rtc,
- init_pci: wildfire_init_pci,
+ init_pci: common_init_pci,
kill_arch: wildfire_kill_arch,
pci_map_irq: wildfire_map_irq,
pci_swizzle: common_swizzle,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/lib/Makefile linux/arch/alpha/lib/Makefile
--- v2.4.0-test9/linux/arch/alpha/lib/Makefile Mon Jun 19 17:59:33 2000
+++ linux/arch/alpha/lib/Makefile Mon Oct 16 15:38:41 2000
@@ -13,7 +13,7 @@
strchr.o strrchr.o memchr.o \
copy_user.o clear_user.o strncpy_from_user.o strlen_user.o \
csum_ipv6_magic.o strcasecmp.o semaphore.o fpreg.o \
- callback_srm.o callback_init.o srm_puts.o srm_printk.o
+ callback_srm.o srm_puts.o srm_printk.o
lib.a: $(OBJS)
$(AR) rcs lib.a $(OBJS)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/lib/callback_init.c linux/arch/alpha/lib/callback_init.c
--- v2.4.0-test9/linux/arch/alpha/lib/callback_init.c Mon Jun 19 17:59:33 2000
+++ linux/arch/alpha/lib/callback_init.c Wed Dec 31 16:00:00 1969
@@ -1,79 +0,0 @@
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "../kernel/proto.h"
-
-extern struct hwrpb_struct *hwrpb;
-
-/* This is the SRM version. Maybe there will be a DBM version. */
-
-int callback_init_done = 0;
-
-void * __init callback_init(void * kernel_end)
-{
- int i, j;
- unsigned long vaddr = CONSOLE_REMAP_START;
- struct crb_struct * crb;
- pgd_t * pgd = pgd_offset_k(vaddr);
- pmd_t * pmd;
- unsigned long two_pte_pages;
-
- if (!alpha_using_srm) {
- switch_to_system_map();
- return kernel_end;
- }
-
- /* Allocate some memory for the pages. */
- two_pte_pages = ((unsigned long)kernel_end + ~PAGE_MASK) & PAGE_MASK;
- kernel_end = (void *)(two_pte_pages + 2*PAGE_SIZE);
- memset((void *)two_pte_pages, 0, 2*PAGE_SIZE);
-
- /* Starting at the HWRPB, locate the CRB. */
- crb = (struct crb_struct *)((char *)hwrpb + hwrpb->crb_offset);
-
- /* Tell the console whither the console is to be remapped. */
- if (srm_fixup(vaddr, (unsigned long)hwrpb))
- __halt(); /* "We're boned." --Bender */
-
- /* Edit the procedure descriptors for DISPATCH and FIXUP. */
- crb->dispatch_va = (struct procdesc_struct *)
- (vaddr + (unsigned long)crb->dispatch_va - crb->map[0].va);
- crb->fixup_va = (struct procdesc_struct *)
- (vaddr + (unsigned long)crb->fixup_va - crb->map[0].va);
-
- switch_to_system_map();
-
- /*
- * Set up the first and second level PTEs for console callbacks.
- * There is an assumption here that only one of each is needed,
- * and this allows for 8MB. Currently (late 1999), big consoles
- * are still under 4MB.
- */
- pgd_set(pgd, (pmd_t *)two_pte_pages);
- pmd = pmd_offset(pgd, vaddr);
- pmd_set(pmd, (pte_t *)(two_pte_pages + PAGE_SIZE));
-
- /*
- * Set up the third level PTEs and update the virtual addresses
- * of the CRB entries.
- */
- for (i = 0; i < crb->map_entries; ++i) {
- unsigned long paddr = crb->map[i].pa;
- crb->map[i].va = vaddr;
- for (j = 0; j < crb->map[i].count; ++j) {
- set_pte(pte_offset(pmd, vaddr),
- mk_pte_phys(paddr, PAGE_KERNEL));
- paddr += PAGE_SIZE;
- vaddr += PAGE_SIZE;
- }
- }
-
- callback_init_done = 1;
- return kernel_end;
-}
-
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/mm/fault.c linux/arch/alpha/mm/fault.c
--- v2.4.0-test9/linux/arch/alpha/mm/fault.c Sun Oct 8 10:50:05 2000
+++ linux/arch/alpha/mm/fault.c Mon Oct 16 15:38:41 2000
@@ -108,6 +108,11 @@
if (!mm || in_interrupt())
goto no_context;
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+ if (address >= TASK_SIZE)
+ goto vmalloc_fault;
+#endif
+
down(&mm->mmap_sem);
vma = find_vma(mm, address);
if (!vma)
@@ -204,4 +209,25 @@
if (!user_mode(regs))
goto no_context;
return;
+
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+vmalloc_fault:
+ if (user_mode(regs)) {
+ force_sig(SIGSEGV, current);
+ return;
+ } else {
+ /* Synchronize this task's top level page-table
+ with the "reference" page table from init. */
+ long offset = __pgd_offset(address);
+ pgd_t *pgd, *pgd_k;
+
+ pgd = current->active_mm->pgd + offset;
+ pgd_k = swapper_pg_dir + offset;
+ if (!pgd_present(*pgd) && pgd_present(*pgd_k)) {
+ pgd_val(*pgd) = pgd_val(*pgd_k);
+ return;
+ }
+ goto no_context;
+ }
+#endif
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/alpha/mm/init.c linux/arch/alpha/mm/init.c
--- v2.4.0-test9/linux/arch/alpha/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/alpha/mm/init.c Mon Oct 16 15:38:41 2000
@@ -19,6 +19,7 @@
#include
#include
#include /* max_low_pfn */
+#include
#ifdef CONFIG_BLK_DEV_INITRD
#include
#endif
@@ -30,6 +31,7 @@
#include
#include
#include
+#include
static unsigned long totalram_pages;
@@ -55,6 +57,29 @@
pmd_set(pmd, (pte_t *) BAD_PAGETABLE);
}
+pgd_t *
+get_pgd_slow(void)
+{
+ pgd_t *ret, *init;
+
+ ret = (pgd_t *)__get_free_page(GFP_KERNEL);
+ init = pgd_offset(&init_mm, 0UL);
+ if (ret) {
+ clear_page(ret);
+#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+ memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
+ (PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t));
+#else
+ pgd_val(ret[PTRS_PER_PGD-2]) = pgd_val(init[PTRS_PER_PGD-2]);
+#endif
+
+ /* The last PGD entry is the VPTB self-map. */
+ pgd_val(ret[PTRS_PER_PGD-1])
+ = pte_val(mk_pte(virt_to_page(ret), PAGE_KERNEL));
+ }
+ return ret;
+}
+
pmd_t *
get_pmd_slow(pgd_t *pgd, unsigned long offset)
{
@@ -182,8 +207,9 @@
return __reload_thread(pcb);
}
-/* switch_to_system_map() sets up some necessary page tables. */
-void
+/* Set up initial PCB, VPTB, and other such nicities. */
+
+static inline void
switch_to_system_map(void)
{
unsigned long newptbr;
@@ -224,6 +250,84 @@
}
original_pcb = *(struct thread_struct *) original_pcb_ptr;
}
+
+int callback_init_done;
+
+void * __init
+callback_init(void * kernel_end)
+{
+ struct crb_struct * crb;
+ pgd_t *pgd;
+ pmd_t *pmd;
+ void *two_pages;
+
+ /* Starting at the HWRPB, locate the CRB. */
+ crb = (struct crb_struct *)((char *)hwrpb + hwrpb->crb_offset);
+
+ if (alpha_using_srm) {
+ /* Tell the console whither it is to be remapped. */
+ if (srm_fixup(VMALLOC_START, (unsigned long)hwrpb))
+ __halt(); /* "We're boned." --Bender */
+
+ /* Edit the procedure descriptors for DISPATCH and FIXUP. */
+ crb->dispatch_va = (struct procdesc_struct *)
+ (VMALLOC_START + (unsigned long)crb->dispatch_va
+ - crb->map[0].va);
+ crb->fixup_va = (struct procdesc_struct *)
+ (VMALLOC_START + (unsigned long)crb->fixup_va
+ - crb->map[0].va);
+ }
+
+ switch_to_system_map();
+
+ /* Allocate one PGD and one PMD. In the case of SRM, we'll need
+ these to actually remap the console. There is an assumption
+ here that only one of each is needed, and this allows for 8MB.
+ Currently (late 1999), big consoles are still under 4MB.
+
+ In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC,
+ we need to allocate the PGD we use for vmalloc before we start
+ forking other tasks. */
+
+ two_pages = (void *)
+ (((unsigned long)kernel_end + ~PAGE_MASK) & PAGE_MASK);
+ kernel_end = two_pages + 2*PAGE_SIZE;
+ memset(two_pages, 0, 2*PAGE_SIZE);
+
+ pgd = pgd_offset_k(VMALLOC_START);
+ pgd_set(pgd, (pmd_t *)two_pages);
+ pmd = pmd_offset(pgd, VMALLOC_START);
+ pmd_set(pmd, (pte_t *)(two_pages + PAGE_SIZE));
+
+ if (alpha_using_srm) {
+ static struct vm_struct console_remap_vm;
+ unsigned long vaddr = VMALLOC_START;
+ long i, j;
+
+ /* Set up the third level PTEs and update the virtual
+ addresses of the CRB entries. */
+ for (i = 0; i < crb->map_entries; ++i) {
+ unsigned long paddr = crb->map[i].pa;
+ crb->map[i].va = vaddr;
+ for (j = 0; j < crb->map[i].count; ++j) {
+ set_pte(pte_offset(pmd, vaddr),
+ mk_pte_phys(paddr, PAGE_KERNEL));
+ paddr += PAGE_SIZE;
+ vaddr += PAGE_SIZE;
+ }
+ }
+
+ /* Let vmalloc know that we've allocated some space. */
+ console_remap_vm.flags = VM_ALLOC;
+ console_remap_vm.addr = VMALLOC_START;
+ console_remap_vm.size = vaddr - VMALLOC_START;
+ vmlist = &console_remap_vm;
+ }
+
+ callback_init_done = 1;
+ return kernel_end;
+}
+
/*
* paging_init() sets up the memory map.
diff -u --recursive --new-file v2.4.0-test9/linux/arch/arm/config.in linux/arch/arm/config.in
--- v2.4.0-test9/linux/arch/arm/config.in Sun Oct 8 10:50:05 2000
+++ linux/arch/arm/config.in Sun Oct 8 09:30:40 2000
@@ -213,7 +213,8 @@
define_bool CONFIG_PCI y
else
if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
- bool 'PCI support' CONFIG_PCI
+ bool 'PCI support' CONFIG_PCI_INTEGRATOR
+ define_bool CONFIG_PCI $CONFIG_PCI_INTEGRATOR
else
define_bool CONFIG_PCI n
fi
diff -u --recursive --new-file v2.4.0-test9/linux/arch/arm/kernel/semaphore.c linux/arch/arm/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/arm/kernel/semaphore.c Sun Oct 8 10:50:05 2000
+++ linux/arch/arm/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -19,8 +19,8 @@
/*
* Semaphores are implemented using a two-way counter:
* The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * 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
@@ -257,7 +257,7 @@
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/arm/mm/init.c linux/arch/arm/mm/init.c
--- v2.4.0-test9/linux/arch/arm/mm/init.c Sun Oct 8 10:50:06 2000
+++ linux/arch/arm/mm/init.c Mon Oct 16 15:25:46 2000
@@ -56,7 +56,7 @@
* The sole use of this is to pass memory configuration
* data from paging_init to mem_init.
*/
-static struct meminfo __initdata meminfo;
+static struct meminfo meminfo __initdata = { 0, };
/*
* empty_bad_page is the page that is used for page faults when
@@ -383,27 +383,27 @@
* Register the kernel text and data with bootmem.
* Note that this can only be in node 0.
*/
- reserve_bootmem_node(0, __pa(&_stext), &_end - &_stext);
+ reserve_bootmem_node(NODE_DATA(0), __pa(&_stext), &_end - &_stext);
#ifdef CONFIG_CPU_32
/*
* Reserve the page tables. These are already in use,
* and can only be in node 0.
*/
- reserve_bootmem_node(0, __pa(swapper_pg_dir),
+ reserve_bootmem_node(NODE_DATA(0), __pa(swapper_pg_dir),
PTRS_PER_PGD * sizeof(void *));
#else
/*
* Stop this memory from being grabbed - its special DMA
* memory that is required for the screen.
*/
- reserve_bootmem_node(0, 0x02000000, 0x00080000);
+ reserve_bootmem_node(NODE_DATA(0), 0x02000000, 0x00080000);
#endif
/*
* And don't forget to reserve the allocator bitmap,
* which will be freed later.
*/
- reserve_bootmem_node(0, bootmap_pfn << PAGE_SHIFT,
+ reserve_bootmem_node(NODE_DATA(0), bootmap_pfn << PAGE_SHIFT,
bootmap_pages << PAGE_SHIFT);
}
@@ -416,7 +416,7 @@
for (bank = 0; bank < mi->nr_banks; bank++)
if (mi->bank[bank].node == node)
- free_bootmem_node(node, mi->bank[bank].start,
+ free_bootmem_node(NODE_DATA(node), mi->bank[bank].start,
mi->bank[bank].size);
}
@@ -450,7 +450,7 @@
/*
* Initialise the bootmem allocator.
*/
- init_bootmem_node(node, map_pg, np->start, np->end);
+ init_bootmem_node(NODE_DATA(node), map_pg, np->start, np->end);
free_bootmem_node_bank(node, mi);
map_pg += np->bootmap_pages;
@@ -465,7 +465,7 @@
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_node >= 0)
- reserve_bootmem_node(initrd_node, __pa(initrd_start),
+ reserve_bootmem_node(NODE_DATA(initrd_node), __pa(initrd_start),
initrd_end - initrd_start);
#endif
@@ -583,7 +583,7 @@
/* this will put all unused low memory onto the freelists */
for (node = 0; node < numnodes; node++)
- totalram_pages += free_all_bootmem_node(node);
+ totalram_pages += free_all_bootmem_node(NODE_DATA(node));
/*
* Since our memory may not be contiguous, calculate the
diff -u --recursive --new-file v2.4.0-test9/linux/arch/arm/mm/mm-armv.c linux/arch/arm/mm/mm-armv.c
--- v2.4.0-test9/linux/arch/arm/mm/mm-armv.c Sun Oct 8 10:50:06 2000
+++ linux/arch/arm/mm/mm-armv.c Mon Oct 16 15:25:46 2000
@@ -438,7 +438,7 @@
start = __virt_to_phys(pg);
end = __virt_to_phys(pgend);
- free_bootmem_node(node, start, end - start);
+ free_bootmem_node(NODE_DATA(node), start, end - start);
}
static inline void free_unused_memmap_node(int node, struct meminfo *mi)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/Makefile linux/arch/i386/Makefile
--- v2.4.0-test9/linux/arch/i386/Makefile Fri Aug 18 09:30:51 2000
+++ linux/arch/i386/Makefile Fri Oct 27 10:55:01 2000
@@ -23,62 +23,59 @@
CFLAGS += -pipe
-# only work around strength reduction bug(s) on older gcc versions
-CFLAGS += $(shell if ! $(CC) -march=i486 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-strength-reduce"; fi)
-
# prevent gcc from keeping the stack 16 byte aligned
CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi)
ifdef CONFIG_M386
-CFLAGS += $(shell if $(CC) -march=i386 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i386"; else echo "-m386"; fi)
+CFLAGS += -march=i386
endif
ifdef CONFIG_M486
-CFLAGS += $(shell if $(CC) -march=i486 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i486"; else echo "-m486"; fi)
+CFLAGS += -march=i486
endif
ifdef CONFIG_M586
-CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i586"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_M586TSC
-CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i586"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_M586MMX
-CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i586"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_M686
-CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
+CFLAGS += -march=i686
endif
ifdef CONFIG_M686FXSR
-CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
+CFLAGS += -march=i686
endif
ifdef CONFIG_MK6
-CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; fi)
+CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; else echo "-march=i586"; fi)
endif
ifdef CONFIG_MK7
-CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686 -malign-functions=4"; fi fi)
+CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi)
endif
ifdef CONFIG_MCRUSOE
-CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i586"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_MWINCHIPC6
-CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_MWINCHIP2
-CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
+CFLAGS += -march=i586
endif
ifdef CONFIG_MWINCHIP3D
-CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi)
+CFLAGS += -march=i586
endif
HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S
--- v2.4.0-test9/linux/arch/i386/boot/setup.S Tue Jul 18 22:00:33 2000
+++ linux/arch/i386/boot/setup.S Mon Oct 30 14:44:29 2000
@@ -641,6 +641,15 @@
outb %al, $0x60
call empty_8042
+#
+# You must preserve the other bits here. Otherwise embarrasing things
+# like laptops powering off on boot happen. Corrected version by Kira
+# Brown from Linux 2.2
+#
+ inb $0x92, %al #
+ orb $02, %al # "fast A20" version
+ outb %al, $0x92 # some chips have only this
+
# wait until a20 really *is* enabled; it can take a fair amount of
# time on certain systems; Toshiba Tecras are known to have this
# problem. The memory location used here (0x200) is the int 0x80
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/config.in linux/arch/i386/config.in
--- v2.4.0-test9/linux/arch/i386/config.in Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/config.in Mon Oct 16 12:32:35 2000
@@ -45,7 +45,7 @@
#
if [ "$CONFIG_M386" = "y" ]; then
define_bool CONFIG_X86_CMPXCHG n
- define_int CONFIG_X86_L1_CACHE_BYTES 16
+ define_int CONFIG_X86_L1_CACHE_SHIFT 4
else
define_bool CONFIG_X86_WP_WORKS_OK y
define_bool CONFIG_X86_INVLPG y
@@ -54,37 +54,37 @@
define_bool CONFIG_X86_POPAD_OK y
fi
if [ "$CONFIG_M486" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 16
+ define_int CONFIG_X86_L1_CACHE_SHIFT 4
define_bool CONFIG_X86_USE_STRING_486 y
define_bool CONFIG_X86_ALIGNMENT_16 y
fi
if [ "$CONFIG_M586" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_USE_STRING_486 y
define_bool CONFIG_X86_ALIGNMENT_16 y
fi
if [ "$CONFIG_M586TSC" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_USE_STRING_486 y
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_TSC y
fi
if [ "$CONFIG_M586MMX" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_USE_STRING_486 y
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_GOOD_APIC y
fi
if [ "$CONFIG_M686" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_GOOD_APIC y
define_bool CONFIG_X86_PGE y
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
fi
if [ "$CONFIG_M686FXSR" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_GOOD_APIC y
define_bool CONFIG_X86_PGE y
@@ -93,13 +93,13 @@
define_bool CONFIG_X86_XMM y
fi
if [ "$CONFIG_MK6" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
fi
if [ "$CONFIG_MK7" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 64
+ define_int CONFIG_X86_L1_CACHE_SHIFT 6
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_GOOD_APIC y
define_bool CONFIG_X86_USE_3DNOW y
@@ -107,22 +107,22 @@
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
fi
if [ "$CONFIG_MCRUSOE" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_TSC y
fi
if [ "$CONFIG_MWINCHIPC6" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
fi
if [ "$CONFIG_MWINCHIP2" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
fi
if [ "$CONFIG_MWINCHIP3D" = "y" ]; then
- define_int CONFIG_X86_L1_CACHE_BYTES 32
+ define_int CONFIG_X86_L1_CACHE_SHIFT 5
define_bool CONFIG_X86_ALIGNMENT_16 y
define_bool CONFIG_X86_TSC y
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/defconfig linux/arch/i386/defconfig
--- v2.4.0-test9/linux/arch/i386/defconfig Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/defconfig Mon Oct 30 15:28:11 2000
@@ -39,7 +39,7 @@
CONFIG_X86_CMPXCHG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
-CONFIG_X86_L1_CACHE_BYTES=32
+CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
@@ -230,7 +230,9 @@
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_OSB4 is not set
# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
@@ -352,6 +354,7 @@
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/acpi.c linux/arch/i386/kernel/acpi.c
--- v2.4.0-test9/linux/arch/i386/kernel/acpi.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/acpi.c Sun Oct 8 09:14:04 2000
@@ -27,6 +27,8 @@
* - check copy*user return
* - get rid of check_region
* - get rid of verify_area
+ * Arnaldo Carvalho de Melo - 2000/09/28
+ * - do proper release on failure in acpi_claim_ioports and acpi_init
*/
#include
@@ -81,6 +83,7 @@
struct file *file,
void *buffer,
size_t *len);
+static void acpi_release(unsigned long start, unsigned long size);
static struct ctl_table_header *acpi_sysctl = NULL;
@@ -1300,15 +1303,28 @@
static int acpi_claim_ioports(struct acpi_facp *facp)
{
// we don't get a guarantee of contiguity for any of the ACPI registers
- if (acpi_claim(facp->pm1a_evt, facp->pm1_evt_len)
- || acpi_claim(facp->pm1b_evt, facp->pm1_evt_len)
- || acpi_claim(facp->pm1a_cnt, facp->pm1_cnt_len)
- || acpi_claim(facp->pm1b_cnt, facp->pm1_cnt_len)
- || acpi_claim(facp->pm_tmr, facp->pm_tm_len)
- || acpi_claim(facp->gpe0, facp->gpe0_len)
- || acpi_claim(facp->gpe1, facp->gpe1_len))
- return -EBUSY;
+ if (acpi_claim(facp->pm1a_evt, facp->pm1_evt_len))
+ goto return_ebusy;
+ if (acpi_claim(facp->pm1b_evt, facp->pm1_evt_len))
+ goto release_pm1a_evt;
+ if (acpi_claim(facp->pm1a_cnt, facp->pm1_cnt_len))
+ goto release_pm1b_evt;
+ if (acpi_claim(facp->pm1b_cnt, facp->pm1_cnt_len))
+ goto release_pm1a_cnt;
+ if (acpi_claim(facp->pm_tmr, facp->pm_tm_len))
+ goto release_pm1b_cnt;
+ if (acpi_claim(facp->gpe0, facp->gpe0_len))
+ goto release_pm_tmr;
+ if (acpi_claim(facp->gpe1, facp->gpe1_len))
+ goto release_gpe0;
return 0;
+release_gpe0: acpi_release(facp->gpe0, facp->gpe0_len);
+release_pm_tmr: acpi_release(facp->pm_tmr, facp->pm_tm_len);
+release_pm1b_cnt: acpi_release(facp->pm1b_cnt, facp->pm1_cnt_len);
+release_pm1a_cnt: acpi_release(facp->pm1a_cnt, facp->pm1_cnt_len);
+release_pm1b_evt: acpi_release(facp->pm1b_evt, facp->pm1_evt_len);
+release_pm1a_evt: acpi_release(facp->pm1a_evt, facp->pm1_evt_len);
+return_ebusy: return -EBUSY;
}
/*
@@ -1523,8 +1539,10 @@
error = -ENOMEM;
}
if (data)
- if (copy_from_user(data, buffer, size))
+ if (copy_from_user(data, buffer, size)) {
+ acpi_destroy_table(info);
error = -EFAULT;
+ }
write_unlock(&acpi_do_table_lock);
}
@@ -1838,7 +1856,7 @@
&acpi_facp)) {
printk(KERN_ERR "ACPI: SCI (IRQ%d) allocation failed\n",
facp->sci_int);
- goto err_out;
+ goto cleanup_ioports;
}
#ifndef CONFIG_ACPI_S1_SLEEP
@@ -1846,6 +1864,8 @@
#endif
acpi_sysctl = register_sysctl_table(acpi_dir_table, 1);
+ if (!acpi_sysctl)
+ goto cleanup_irq;
pm_power_off = acpi_power_off;
@@ -1863,7 +1883,10 @@
pm_idle = acpi_idle;
return 0;
-
+cleanup_irq:
+ free_irq(facp->sci_int, &acpi_facp);
+cleanup_ioports:
+ acpi_release_ioports(facp);
err_out:
if (pci_driver_registered)
pci_unregister_driver(&acpi_driver);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
--- v2.4.0-test9/linux/arch/i386/kernel/apm.c Wed Aug 9 14:21:14 2000
+++ linux/arch/i386/kernel/apm.c Thu Oct 26 14:13:07 2000
@@ -1427,7 +1427,7 @@
atomic_inc(¤t->files->count);
daemonize();
- strcpy(current->comm, "kapmd");
+ strcpy(current->comm, "kapm-idled");
sigfillset(¤t->blocked);
current->tty = NULL; /* get rid of controlling tty */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/bluesmoke.c linux/arch/i386/kernel/bluesmoke.c
--- v2.4.0-test9/linux/arch/i386/kernel/bluesmoke.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/bluesmoke.c Mon Oct 16 12:58:51 2000
@@ -8,7 +8,7 @@
#include
#include
-static int banks = 0;
+static int banks;
void mcheck_fault(void)
{
@@ -71,7 +71,7 @@
u32 l, h;
int i;
struct cpuinfo_x86 *c;
- static int done=0;
+ static int done;
c=cpu_data+smp_processor_id();
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.4.0-test9/linux/arch/i386/kernel/entry.S Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/entry.S Mon Oct 16 12:35:44 2000
@@ -205,7 +205,7 @@
ENTRY(ret_from_sys_call)
#ifdef CONFIG_SMP
movl processor(%ebx),%eax
- shll $5,%eax
+ shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
movl SYMBOL_NAME(irq_stat)(,%eax),%ecx # softirq_active
testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx # softirq_mask
#else
@@ -261,7 +261,7 @@
#ifdef CONFIG_SMP
GET_CURRENT(%ebx)
movl processor(%ebx),%eax
- shll $5,%eax
+ shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
movl SYMBOL_NAME(irq_stat)(,%eax),%ecx # softirq_active
testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx # softirq_mask
#else
@@ -305,16 +305,18 @@
pushl %ebx
cld
movl %es,%ecx
- xchgl %eax, ORIG_EAX(%esp) # orig_eax (get the error code. )
+ movl ORIG_EAX(%esp), %esi # get the error code
+ movl ES(%esp), %edi # get the function address
+ movl %eax, ORIG_EAX(%esp)
+ movl %ecx, ES(%esp)
movl %esp,%edx
- xchgl %ecx, ES(%esp) # get the address and save es.
- pushl %eax # push the error code
- pushl %edx
+ pushl %esi # push the error code
+ pushl %edx # push the pt_regs pointer
movl $(__KERNEL_DS),%edx
movl %edx,%ds
movl %edx,%es
GET_CURRENT(%ebx)
- call *%ecx
+ call *%edi
addl $8,%esp
jmp ret_from_exception
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- v2.4.0-test9/linux/arch/i386/kernel/i387.c Sun Sep 3 10:57:33 2000
+++ linux/arch/i386/kernel/i387.c Mon Oct 23 15:57:29 2000
@@ -33,22 +33,24 @@
#endif
/*
- * FPU lazy state save handling.
+ * The _current_ task is using the FPU for the first time
+ * so initialize it and set the mxcsr to its default
+ * value at reset if we support FXSR and then
+ * remeber the current task has used the FPU.
*/
-
-void save_fpu( struct task_struct *tsk )
+void init_fpu(void)
{
- if ( HAVE_FXSR ) {
- asm volatile( "fxsave %0 ; fwait"
- : "=m" (tsk->thread.i387.fxsave) );
- } else {
- asm volatile( "fnsave %0 ; fwait"
- : "=m" (tsk->thread.i387.fsave) );
- }
- tsk->flags &= ~PF_USEDFPU;
- stts();
+ __asm__("fninit");
+ if ( HAVE_FXSR )
+ load_mxcsr(0x1f80);
+
+ current->used_math = 1;
}
+/*
+ * FPU lazy state save handling.
+ */
+
void save_init_fpu( struct task_struct *tsk )
{
if ( HAVE_FXSR ) {
@@ -79,16 +81,16 @@
static inline unsigned short twd_i387_to_fxsr( unsigned short twd )
{
- unsigned short ret = 0;
- int i;
-
- for ( i = 0 ; i < 8 ; i++ ) {
- if ( (twd & 0x3) != 0x3 ) {
- ret |= (1 << i);
- }
- twd = twd >> 2;
- }
- return ret;
+ unsigned int tmp; /* to avoid 16 bit prefixes in the code */
+
+ /* Transform each pair of bits into 01 (valid) or 00 (empty) */
+ tmp = ~twd;
+ tmp = (tmp | (tmp>>1)) & 0x5555; /* 0V0V0V0V0V0V0V0V */
+ /* and move the valid bits to the lower byte. */
+ tmp = (tmp | (tmp >> 1)) & 0x3333; /* 00VV00VV00VV00VV */
+ tmp = (tmp | (tmp >> 2)) & 0x0f0f; /* 0000VVVV0000VVVV */
+ tmp = (tmp | (tmp >> 4)) & 0x00ff; /* 00000000VVVVVVVV */
+ return tmp;
}
static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct *fxsave )
@@ -105,8 +107,8 @@
if ( twd & 0x1 ) {
st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
- switch ( st->exponent ) {
- case 0xffff:
+ switch ( st->exponent & 0x7fff ) {
+ case 0x7fff:
tag = 2; /* Special */
break;
case 0x0000:
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/i8259.c linux/arch/i386/kernel/i8259.c
--- v2.4.0-test9/linux/arch/i386/kernel/i8259.c Thu Aug 3 17:15:40 2000
+++ linux/arch/i386/kernel/i8259.c Mon Oct 16 12:58:51 2000
@@ -178,7 +178,7 @@
* this 'mixed mode' IRQ handling costs nothing because it's only used
* at IRQ setup time.
*/
-unsigned long io_apic_irqs = 0;
+unsigned long io_apic_irqs;
void disable_8259A_irq(unsigned int irq)
{
@@ -312,7 +312,7 @@
goto handle_real_irq;
{
- static int spurious_irq_mask = 0;
+ static int spurious_irq_mask;
/*
* At this point we can be sure the IRQ is spurious,
* lets ACK and report it. [once per IRQ]
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/microcode.c linux/arch/i386/kernel/microcode.c
--- v2.4.0-test9/linux/arch/i386/kernel/microcode.c Thu Sep 7 09:16:12 2000
+++ linux/arch/i386/kernel/microcode.c Mon Oct 30 14:44:29 2000
@@ -177,7 +177,7 @@
req->err = 1; /* assume the worst */
- if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6){
+ if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 != 6){
printk(KERN_ERR "microcode: CPU%d not an Intel P6\n", cpu_num);
return;
}
@@ -198,11 +198,15 @@
wrmsr(0x8B, 0, 0);
__asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
rdmsr(0x8B, val[0], rev);
- if (microcode[i].rev <= rev) {
+ if (microcode[i].rev < rev) {
printk(KERN_ERR
"microcode: CPU%d not 'upgrading' to earlier revision"
" %d (current=%d)\n", cpu_num, microcode[i].rev, rev);
- } else {
+ } else if (microcode[i].rev == rev) {
+ printk(KERN_ERR
+ "microcode: CPU%d already up-to-date (revision %d)\n",
+ cpu_num, rev);
+ } else {
int sum = 0;
struct microcode *m = µcode[i];
unsigned int *sump = (unsigned int *)(m+1);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
--- v2.4.0-test9/linux/arch/i386/kernel/mtrr.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/mtrr.c Mon Oct 16 12:58:51 2000
@@ -1581,7 +1581,7 @@
# endif /* CONFIG_PROC_FS */
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
static void compute_ascii (void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/pci-irq.c linux/arch/i386/kernel/pci-irq.c
--- v2.4.0-test9/linux/arch/i386/kernel/pci-irq.c Mon Jun 26 12:02:16 2000
+++ linux/arch/i386/kernel/pci-irq.c Mon Oct 30 12:54:37 2000
@@ -125,81 +125,143 @@
}
}
+/*
+ * Common IRQ routing practice: nybbles in config space,
+ * offset by some magic constant.
+ */
+static unsigned int read_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr)
+{
+ u8 x;
+ unsigned reg = offset + (nr >> 1);
+
+ pci_read_config_byte(router, reg, &x);
+ return (nr & 1) ? (x >> 4) : (x & 0xf);
+}
+
+static void write_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr, unsigned int val)
+{
+ u8 x;
+ unsigned reg = offset + (nr >> 1);
+
+ pci_read_config_byte(router, reg, &x);
+ x = (nr & 1) ? ((x & 0x0f) | (val << 4)) : ((x & 0xf0) | val);
+ pci_write_config_byte(router, reg, x);
+}
+
+/*
+ * ALI pirq entries are damn ugly, and completely undocumented.
+ * This has been figured out from pirq tables, and it's not a pretty
+ * picture.
+ */
static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
static unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
+
+ switch (pirq) {
+ case 0x00:
+ return 0;
+ default:
+ return irqmap[read_config_nybble(router, 0x48, pirq-1)];
+ case 0xfe:
+ return irqmap[read_config_nybble(router, 0x44, 0)];
+ case 0xff:
+ return irqmap[read_config_nybble(router, 0x75, 0)];
+ }
+}
+
+static void pirq_ali_ide_interrupt(struct pci_dev *router, unsigned reg, unsigned val, unsigned irq)
+{
u8 x;
- unsigned reg;
- pirq--;
- reg = 0x48 + (pirq >> 1);
pci_read_config_byte(router, reg, &x);
- return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
+ x = (x & 0xe0) | val; /* clear the level->edge transform */
+ pci_write_config_byte(router, reg, x);
+ eisa_set_level_irq(irq);
}
static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
static unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
unsigned int val = irqmap[irq];
- pirq--;
+
if (val) {
- u8 x;
- unsigned reg = 0x48 + (pirq >> 1);
- pci_read_config_byte(router, reg, &x);
- x = (pirq & 1) ? ((x & 0x0f) | (val << 4)) : ((x & 0xf0) | val);
- pci_write_config_byte(router, reg, x);
+ switch (pirq) {
+ default:
+ write_config_nybble(router, 0x48, pirq-1, val);
+ break;
+ case 0xfe:
+ pirq_ali_ide_interrupt(router, 0x44, val, irq);
+ break;
+ case 0xff:
+ pirq_ali_ide_interrupt(router, 0x75, val, irq);
+ break;
+ }
eisa_set_level_irq(irq);
return 1;
}
return 0;
}
+/*
+ * The Intel PIIX4 pirq rules are fairly simple: "pirq" is
+ * just a pointer to the config space. However, something
+ * funny is going on with 0xfe/0xff, and apparently they
+ * should handle IDE irq routing. Ignore them for now.
+ */
static int pirq_piix_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
u8 x;
- pci_read_config_byte(router, pirq, &x);
- return (x < 16) ? x : 0;
+
+ switch (pirq) {
+ case 0xfe:
+ case 0xff:
+ return 0;
+ default:
+ pci_read_config_byte(router, pirq, &x);
+ return (x < 16) ? x : 0;
+ }
}
static int pirq_piix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
- pci_write_config_byte(router, pirq, irq);
- return 1;
+ switch (pirq) {
+ case 0xfe:
+ case 0xff:
+ return 0;
+ default:
+ pci_write_config_byte(router, pirq, irq);
+ return 1;
+ }
}
+/*
+ * The VIA pirq rules are nibble-based, like ALI,
+ * but without the ugly irq number munging or the
+ * strange special cases..
+ */
static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
- u8 x;
- int reg = 0x55 + (pirq >> 1);
- pci_read_config_byte(router, reg, &x);
- return (pirq & 1) ? (x >> 4) : (x & 0x0f);
+ return read_config_nybble(router, 0x55, pirq);
}
static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
- u8 x;
- int reg = 0x55 + (pirq >> 1);
- pci_read_config_byte(router, reg, &x);
- x = (pirq & 1) ? ((x & 0x0f) | (irq << 4)) : ((x & 0xf0) | irq);
- pci_write_config_byte(router, reg, x);
+ write_config_nybble(router, 0x55, pirq, irq);
return 1;
}
+/*
+ * OPTI: high four bits are nibble pointer..
+ * I wonder what the low bits do?
+ */
static int pirq_opti_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
- u8 x;
- int reg = 0xb8 + (pirq >> 5);
- pci_read_config_byte(router, reg, &x);
- return (pirq & 0x10) ? (x >> 4) : (x & 0x0f);
+ return read_config_nybble(router, 0xb8, pirq >> 4);
}
static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
- u8 x;
- int reg = 0xb8 + (pirq >> 5);
- pci_read_config_byte(router, reg, &x);
- x = (pirq & 0x10) ? ((x & 0x0f) | (irq << 4)) : ((x & 0xf0) | irq);
- pci_write_config_byte(router, reg, x);
+ write_config_nybble(router, 0xb8, pirq >> 4, irq);
return 1;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
--- v2.4.0-test9/linux/arch/i386/kernel/ptrace.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/ptrace.c Mon Oct 30 14:46:53 2000
@@ -351,7 +351,7 @@
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
- child->ptrace &= ~(PT_PTRACED|PT_TRACESYS);
+ child->ptrace = 0;
child->exit_code = data;
write_lock_irq(&tasklist_lock);
REMOVE_LINKS(child);
@@ -451,6 +451,15 @@
break;
}
+ case PTRACE_SETOPTIONS: {
+ if (data & PTRACE_O_TRACESYSGOOD)
+ child->ptrace |= PT_TRACESYSGOOD;
+ else
+ child->ptrace &= ~PT_TRACESYSGOOD;
+ ret = 0;
+ break;
+ }
+
default:
ret = -EIO;
break;
@@ -467,7 +476,10 @@
if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) !=
(PT_PTRACED|PT_TRACESYS))
return;
- current->exit_code = SIGTRAP;
+ /* the 0x80 provides a way for the tracing parent to distinguish
+ between a syscall stop and SIGTRAP delivery */
+ current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+ ? 0x80 : 0);
current->state = TASK_STOPPED;
notify_parent(current, SIGCHLD);
schedule();
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/semaphore.c linux/arch/i386/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/i386/kernel/semaphore.c Wed Mar 22 18:12:20 2000
+++ linux/arch/i386/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -20,8 +20,8 @@
/*
* Semaphores are implemented using a two-way counter:
* The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * 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
@@ -373,7 +373,7 @@
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- v2.4.0-test9/linux/arch/i386/kernel/setup.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/setup.c Thu Oct 19 15:48:02 2000
@@ -51,6 +51,10 @@
* Forward port AMD Duron errata T13 from 2.2.17pre
* Dave Jones , August 2000
*
+ * Forward port lots of fixes/improvements from 2.2.18pre
+ * Cyrix III, Pentium IV support.
+ * Dave Jones , October 2000
+ *
*/
/*
@@ -137,6 +141,8 @@
extern char _text, _etext, _edata, _end;
extern unsigned long cpu_khz;
+static int disable_x86_serial_nr __initdata = 1;
+
/*
* This is set up by the setup-routine at boot-time
*/
@@ -844,12 +850,6 @@
{
unsigned int n, dummy, *v;
- /*
- * Actually we must have cpuid or we could never have
- * figured out that this was AMD/Cyrix/Transmeta
- * from the vendor info :-).
- */
-
cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
if (n < 0x80000004)
return 0;
@@ -862,29 +862,45 @@
return 1;
}
+
+static void __init display_cacheinfo(struct cpuinfo_x86 *c)
+{
+ unsigned int n, dummy, ecx, edx;
+
+ cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
+
+ if (n >= 0x80000005) {
+ cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
+ printk("CPU: L1 I Cache: %dK L1 D Cache: %dK (%d bytes/line)\n",
+ edx>>24, ecx>>24, edx&0xFF);
+ c->x86_cache_size=(ecx>>24)+(edx>>24);
+ }
+
+ if (n < 0x80000006) /* Cyrix just has large L1. */
+ return;
+
+ cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
+ c->x86_cache_size = ecx >>16;
+
+ /* AMD errata T13 (order #21922) */
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+ boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 3 &&
+ boot_cpu_data.x86_mask == 0)
+ {
+ c->x86_cache_size = 64;
+ }
+ printk("CPU: L2 Cache: %dK\n", ecx>>16);
+}
+
+
static int __init amd_model(struct cpuinfo_x86 *c)
{
u32 l, h;
unsigned long flags;
- unsigned int n, dummy, ecx, edx;
int mbytes = max_mapnr >> (20-PAGE_SHIFT);
int r=get_model_name(c);
- /*
- * Set MTRR capability flag if appropriate
- */
- if(boot_cpu_data.x86 == 5) {
- if((boot_cpu_data.x86_model == 13) ||
- (boot_cpu_data.x86_model == 9) ||
- ((boot_cpu_data.x86_model == 8) &&
- (boot_cpu_data.x86_mask >= 8)))
- c->x86_capability |= X86_FEATURE_MTRR;
- }
-
- /*
- * Now do the cache operations.
- */
switch(c->x86)
{
case 5:
@@ -923,6 +939,7 @@
if(mbytes>4092)
mbytes=4092;
+
rdmsr(0xC0000082, l, h);
if((l&0xFFFF0000)==0)
{
@@ -935,35 +952,23 @@
printk(KERN_INFO "Enabling new style K6 write allocation for %d Mb\n",
mbytes);
}
+
+ /* Set MTRR capability flag if appropriate */
+ if((boot_cpu_data.x86_model == 13) ||
+ (boot_cpu_data.x86_model == 9) ||
+ ((boot_cpu_data.x86_model == 8) &&
+ (boot_cpu_data.x86_mask >= 8)))
+ c->x86_capability |= X86_FEATURE_MTRR;
break;
}
+
break;
+
case 6: /* An Athlon/Duron. We can trust the BIOS probably */
break;
}
- cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
- if (n >= 0x80000005) {
- cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
- printk("CPU: L1 I Cache: %dK L1 D Cache: %dK (%d bytes/line)\n",
- edx>>24, ecx>>24, edx&0xFF);
- c->x86_cache_size=(ecx>>24)+(edx>>24);
- }
-
- /* AMD errata T13 (order #21922) */
- if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 3 &&
- boot_cpu_data.x86_mask == 0)
- {
- c->x86_cache_size = 64;
- printk("CPU: L2 Cache: 64K\n");
- } else {
- if (n >= 0x80000006) {
- cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
- printk("CPU: L2 Cache: %dK\n", ecx>>16);
- c->x86_cache_size=(ecx>>16);
- }
- }
-
+ display_cacheinfo(c);
return r;
}
@@ -1097,9 +1102,8 @@
bug to do with 'hlt'. I've not seen any boards using VSA2
and X doesn't seem to support it either so who cares 8).
VSA1 we work around however.
-
*/
-
+
printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
isa_dma_bridge_buggy = 2;
#endif
@@ -1183,79 +1187,104 @@
u32 lo,hi,newlo;
u32 aa,bb,cc,dd;
- switch(c->x86_model) {
- case 4:
- name="C6";
- fcr_set=ECX8|DSMC|EDCTLB|EMMX|ERETSTK;
- fcr_clr=DPDC;
- printk("Disabling bugged TSC.\n");
- c->x86_capability &= ~X86_FEATURE_TSC;
- break;
- case 8:
- switch(c->x86_mask) {
- default:
- name="2";
- break;
- case 7 ... 9:
- name="2A";
- break;
- case 10 ... 15:
- name="2B";
- break;
- }
- fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
- fcr_clr=DPDC;
- break;
- case 9:
- name="3";
- fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
- fcr_clr=DPDC;
- break;
- case 10:
- name="4";
- /* no info on the WC4 yet */
- break;
- default:
- name="??";
- }
+ switch (c->x86) {
- /* get FCR */
- rdmsr(0x107, lo, hi);
+ case 5:
+ switch(c->x86_model) {
+ case 4:
+ name="C6";
+ fcr_set=ECX8|DSMC|EDCTLB|EMMX|ERETSTK;
+ fcr_clr=DPDC;
+ printk("Disabling bugged TSC.\n");
+ c->x86_capability &= ~X86_FEATURE_TSC;
+ break;
+ case 8:
+ switch(c->x86_mask) {
+ default:
+ name="2";
+ break;
+ case 7 ... 9:
+ name="2A";
+ break;
+ case 10 ... 15:
+ name="2B";
+ break;
+ }
+ fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
+ fcr_clr=DPDC;
+ break;
+ case 9:
+ name="3";
+ fcr_set=ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|E2MMX|EAMD3D;
+ fcr_clr=DPDC;
+ break;
+ case 10:
+ name="4";
+ /* no info on the WC4 yet */
+ break;
+ default:
+ name="??";
+ }
+
+ /* get FCR */
+ rdmsr(0x107, lo, hi);
+
+ newlo=(lo|fcr_set) & (~fcr_clr);
+
+ if (newlo!=lo) {
+ printk("Centaur FCR was 0x%X now 0x%X\n", lo, newlo );
+ wrmsr(0x107, newlo, hi );
+ } else {
+ printk("Centaur FCR is 0x%X\n",lo);
+ }
+ /* Emulate MTRRs using Centaur's MCR. */
+ c->x86_capability |= X86_FEATURE_MTRR;
+ /* Report CX8 */
+ c->x86_capability |= X86_FEATURE_CX8;
+ /* Set 3DNow! on Winchip 2 and above. */
+ if (c->x86_model >=8)
+ c->x86_capability |= X86_FEATURE_AMD3D;
+ /* See if we can find out some more. */
+ cpuid(0x80000000,&aa,&bb,&cc,&dd);
+ if (aa>=0x80000005) { /* Yes, we can. */
+ cpuid(0x80000005,&aa,&bb,&cc,&dd);
+ /* Add L1 data and code cache sizes. */
+ c->x86_cache_size = (cc>>24)+(dd>>24);
+ }
+ sprintf( c->x86_model_id, "WinChip %s", name );
+ break;
- newlo=(lo|fcr_set) & (~fcr_clr);
+ case 6:
+ switch (c->x86_model) {
+ case 6: /* Cyrix III */
+ rdmsr (0x1107, lo, hi);
+ lo |= (1<<1 | 1<<7); /* Report CX8 & enable PGE */
+ wrmsr (0x1107, lo, hi);
+
+ c->x86_capability |= X86_FEATURE_CX8;
+ rdmsr (0x80000001, lo, hi);
+ if (hi & (1<<31))
+ c->x86_capability |= X86_FEATURE_AMD3D;
- if (newlo!=lo) {
- printk("Centaur FCR was 0x%X now 0x%X\n", lo, newlo );
- wrmsr(0x107, newlo, hi );
- } else {
- printk("Centaur FCR is 0x%X\n",lo);
- }
-
- /* Emulate MTRRs using Centaur's MCR. */
- c->x86_capability |= X86_FEATURE_MTRR;
- /* Report CX8 */
- c->x86_capability |= X86_FEATURE_CX8;
- /* Set 3DNow! on Winchip 2 and above. */
- if (c->x86_model >=8)
- c->x86_capability |= X86_FEATURE_AMD3D;
- /* See if we can find out some more. */
- cpuid(0x80000000,&aa,&bb,&cc,&dd);
- if (aa>=0x80000005) { /* Yes, we can. */
- cpuid(0x80000005,&aa,&bb,&cc,&dd);
- /* Add L1 data and code cache sizes. */
- c->x86_cache_size = (cc>>24)+(dd>>24);
+ get_model_name(c);
+ display_cacheinfo(c);
+ break;
+ }
+ break;
}
- sprintf( c->x86_model_id, "WinChip %s", name );
+
}
+
static void __init transmeta_model(struct cpuinfo_x86 *c)
{
- unsigned int cap_mask, uk, max, dummy, n, ecx, edx;
+ unsigned int cap_mask, uk, max, dummy;
unsigned int cms_rev1, cms_rev2;
unsigned int cpu_rev, cpu_freq, cpu_flags;
char cpu_info[65];
get_model_name(c); /* Same as AMD/Cyrix */
+ display_cacheinfo(c);
/* Print CMS and CPU revision */
cpuid(0x80860000, &max, &dummy, &dummy, &dummy);
@@ -1309,22 +1338,6 @@
wrmsr(0x80860004, ~0, uk);
cpuid(0x00000001, &dummy, &dummy, &dummy, &c->x86_capability);
wrmsr(0x80860004, cap_mask, uk);
-
-
- /* L1/L2 cache */
- cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
-
- if (n >= 0x80000005) {
- cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
- printk("CPU: L1 I Cache: %dK L1 D Cache: %dK\n",
- ecx>>24, edx>>24);
- c->x86_cache_size=(ecx>>24)+(edx>>24);
- }
- if (n >= 0x80000006) {
- cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
- printk("CPU: L2 Cache: %dK\n", ecx>>16);
- c->x86_cache_size=(ecx>>16);
- }
}
@@ -1407,7 +1420,7 @@
* to have CPUID. (Thanks to Herbert Oppmann)
*/
-static int deep_magic_nexgen_probe(void)
+static int __init deep_magic_nexgen_probe(void)
{
int ret;
@@ -1424,9 +1437,9 @@
return ret;
}
-static void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
+static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
{
- if(c->x86_capability&(1<<18)) {
+ if(c->x86_capability&(X86_FEATURE_PN) && disable_x86_serial_nr) {
/* Disable processor serial number */
unsigned long lo,hi;
rdmsr(0x119,lo,hi);
@@ -1436,10 +1449,20 @@
}
}
+
+int __init x86_serial_nr_setup(char *s)
+{
+ disable_x86_serial_nr = 0;
+ return 1;
+}
+__setup("serialnumber", x86_serial_nr_setup);
+
+
void __init identify_cpu(struct cpuinfo_x86 *c)
{
int i=0;
char *p = NULL;
+ extern void mcheck_init(void);
c->loops_per_sec = loops_per_sec;
c->x86_cache_size = -1;
@@ -1476,9 +1499,10 @@
return;
case X86_VENDOR_INTEL:
-
+
squash_the_stupid_serial_number(c);
-
+ mcheck_init();
+
if (c->cpuid_level > 1) {
/* supports eax=2 call */
int edx, dummy;
@@ -1522,6 +1546,12 @@
}
}
+ /* Pentium IV. */
+ if (c->x86 == 15) {
+ get_model_name(c);
+ return;
+ }
+
/* Names for the Pentium II/Celeron processors
detectable only by also checking the cache size.
Dixon is NOT a Celeron. */
@@ -1555,7 +1585,7 @@
squash_the_stupid_serial_number(c);
return;
}
-
+
/* may be changed in the switch so needs to be after */
if(c->x86_vendor == X86_VENDOR_NEXGEN)
@@ -1658,12 +1688,12 @@
#endif
p += sprintf(p,"processor\t: %d\n"
"vendor_id\t: %s\n"
- "cpu family\t: %c\n"
+ "cpu family\t: %d\n"
"model\t\t: %d\n"
"model name\t: %s\n",
n,
c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
- c->x86 + '0',
+ c->x86,
c->x86_model,
c->x86_model_id[0] ? c->x86_model_id : "unknown");
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- v2.4.0-test9/linux/arch/i386/kernel/smp.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/smp.c Mon Oct 16 12:58:51 2000
@@ -422,7 +422,7 @@
int wait;
};
-static struct call_data_struct * call_data = NULL;
+static struct call_data_struct * call_data;
/*
* this function sends a 'generic call function' IPI to all other CPUs
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- v2.4.0-test9/linux/arch/i386/kernel/time.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/time.c Mon Oct 16 12:58:51 2000
@@ -76,7 +76,7 @@
* Equal to 2^32 * (1 / (clocks per usec) ).
* Initialized in time_init.
*/
-unsigned long fast_gettimeoffset_quotient=0;
+unsigned long fast_gettimeoffset_quotient;
extern rwlock_t xtime_lock;
extern unsigned long wall_jiffies;
@@ -373,9 +373,9 @@
}
/* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
-int timer_ack = 0;
+int timer_ack;
/*
* timer_interrupt() needs to keep up the real-time clock,
@@ -449,7 +449,7 @@
#endif
}
-static int use_tsc = 0;
+static int use_tsc;
/*
* This is the same as the above, except we _also_ save the current
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- v2.4.0-test9/linux/arch/i386/kernel/traps.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/kernel/traps.c Mon Oct 23 15:54:05 2000
@@ -741,11 +741,7 @@
if (current->used_math) {
restore_fpu(current);
} else {
- /*
- * Our first FPU usage, clean the chip.
- */
- __asm__("fninit");
- current->used_math = 1;
+ init_fpu();
}
current->flags |= PF_USEDFPU; /* So we fnsave on switch_to() */
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
--- v2.4.0-test9/linux/arch/i386/mm/fault.c Wed May 24 18:38:26 2000
+++ linux/arch/i386/mm/fault.c Mon Oct 16 12:26:52 2000
@@ -77,31 +77,6 @@
return 0;
}
-static void __init handle_wp_test (void)
-{
- const unsigned long vaddr = PAGE_OFFSET;
- pgd_t *pgd;
- pmd_t *pmd;
- pte_t *pte;
-
- /*
- * make it read/writable temporarily, so that the fault
- * can be handled.
- */
- pgd = swapper_pg_dir + __pgd_offset(vaddr);
- pmd = pmd_offset(pgd, vaddr);
- pte = pte_offset(pmd, vaddr);
- *pte = mk_pte_phys(0, PAGE_KERNEL);
- __flush_tlb_all();
-
- boot_cpu_data.wp_works_ok = 1;
- /*
- * Beware: Black magic here. The printk is needed here to flush
- * CPU state on certain buggy processors.
- */
- printk("Ok");
-}
-
asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
extern unsigned long idt;
@@ -130,6 +105,19 @@
__asm__("movl %%cr2,%0":"=r" (address));
tsk = current;
+
+ /*
+ * We fault-in kernel-space virtual memory on-demand. The
+ * 'reference' page table is init_mm.pgd.
+ *
+ * NOTE! We MUST NOT take any locks for this case. We may
+ * be in an interrupt or a critical region, and should
+ * only copy the information from the master page table,
+ * nothing more.
+ */
+ if (address >= TASK_SIZE)
+ goto vmalloc_fault;
+
mm = tsk->mm;
info.si_code = SEGV_MAPERR;
@@ -223,6 +211,7 @@
bad_area:
up(&mm->mmap_sem);
+bad_area_nosemaphore:
/* User mode accesses just cause a SIGSEGV */
if (error_code & 4) {
tsk->thread.cr2 = address;
@@ -260,14 +249,7 @@
/*
* Oops. The kernel tried to access some bad page. We'll have to
* terminate things with extreme prejudice.
- *
- * First we check if it was the bootup rw-test, though..
*/
- if (boot_cpu_data.wp_works_ok < 0 &&
- address == PAGE_OFFSET && (error_code & 1)) {
- handle_wp_test();
- return;
- }
if (address < PAGE_SIZE)
printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
@@ -318,4 +300,34 @@
/* Kernel mode? Handle exceptions or die */
if (!(error_code & 4))
goto no_context;
+ return;
+
+vmalloc_fault:
+ {
+ /*
+ * Synchronize this task's top level page-table
+ * with the 'reference' page table.
+ */
+ int offset = __pgd_offset(address);
+ pgd_t *pgd, *pgd_k;
+ pmd_t *pmd, *pmd_k;
+
+ pgd = tsk->active_mm->pgd + offset;
+ pgd_k = init_mm.pgd + offset;
+
+ if (!pgd_present(*pgd)) {
+ if (!pgd_present(*pgd_k))
+ goto bad_area_nosemaphore;
+ set_pgd(pgd, *pgd_k);
+ return;
+ }
+
+ pmd = pmd_offset(pgd, address);
+ pmd_k = pmd_offset(pgd_k, address);
+
+ if (pmd_present(*pmd) || !pmd_present(*pmd_k))
+ goto bad_area_nosemaphore;
+ set_pmd(pmd, *pmd_k);
+ return;
+ }
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
--- v2.4.0-test9/linux/arch/i386/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/i386/mm/init.c Mon Oct 23 14:42:33 2000
@@ -37,8 +37,8 @@
#include
unsigned long highstart_pfn, highend_pfn;
-static unsigned long totalram_pages = 0;
-static unsigned long totalhigh_pages = 0;
+static unsigned long totalram_pages;
+static unsigned long totalhigh_pages;
/*
* BAD_PAGE is the page that is used for page faults when linux
@@ -491,16 +491,21 @@
* before and after the test are here to work-around some nasty CPU bugs.
*/
+/*
+ * This function cannot be __init, since exceptions don't work in that
+ * section.
+ */
+static int do_test_wp_bit(unsigned long vaddr);
+
void __init test_wp_bit(void)
{
/*
- * Ok, all PAE-capable CPUs are definitely handling the WP bit right.
+ * Ok, all PSE-capable CPUs are definitely handling the WP bit right.
*/
const unsigned long vaddr = PAGE_OFFSET;
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte, old_pte;
- char tmp_reg;
printk("Checking if this processor honours the WP bit even in supervisor mode... ");
@@ -511,27 +516,19 @@
*pte = mk_pte_phys(0, PAGE_READONLY);
local_flush_tlb();
- __asm__ __volatile__(
- "jmp 1f; 1:\n"
- "movb %0,%1\n"
- "movb %1,%0\n"
- "jmp 1f; 1:\n"
- :"=m" (*(char *) vaddr),
- "=q" (tmp_reg)
- :/* no inputs */
- :"memory");
+ boot_cpu_data.wp_works_ok = do_test_wp_bit(vaddr);
*pte = old_pte;
local_flush_tlb();
- if (boot_cpu_data.wp_works_ok < 0) {
- boot_cpu_data.wp_works_ok = 0;
+ if (!boot_cpu_data.wp_works_ok) {
printk("No.\n");
#ifdef CONFIG_X86_WP_WORKS_OK
panic("This kernel doesn't support CPU's with broken WP. Recompile it for a 386!");
#endif
- } else
- printk(".\n");
+ } else {
+ printk("Ok.\n");
+ }
}
static inline int page_is_ram (unsigned long pagenr)
@@ -632,6 +629,30 @@
zap_low_mappings();
#endif
+}
+
+/* Put this after the callers, so that it cannot be inlined */
+static int do_test_wp_bit(unsigned long vaddr)
+{
+ char tmp_reg;
+ int flag;
+
+ __asm__ __volatile__(
+ " movb %0,%1 \n"
+ "1: movb %1,%0 \n"
+ " xorl %2,%2 \n"
+ "2: \n"
+ ".section __ex_table,\"a\"\n"
+ " .align 4 \n"
+ " .long 1b,2b \n"
+ ".previous \n"
+ :"=m" (*(char *) vaddr),
+ "=q" (tmp_reg),
+ "=r" (flag)
+ :"2" (1)
+ :"memory");
+
+ return flag;
}
void free_initmem(void)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/i386/mm/ioremap.c linux/arch/i386/mm/ioremap.c
--- v2.4.0-test9/linux/arch/i386/mm/ioremap.c Sun Oct 8 10:50:06 2000
+++ linux/arch/i386/mm/ioremap.c Thu Oct 12 12:44:04 2000
@@ -78,7 +78,6 @@
if (remap_area_pmd(pmd, address, end - address,
phys_addr + address, flags))
return -ENOMEM;
- set_pgdir(address, *dir);
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/Makefile linux/arch/ia64/Makefile
--- v2.4.0-test9/linux/arch/ia64/Makefile Tue Jul 25 18:10:10 2000
+++ linux/arch/ia64/Makefile Mon Oct 9 17:54:53 2000
@@ -14,13 +14,18 @@
export AWK
LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
-AFLAGS += -Wa,-x
+AFLAGS += -Wa,-x
+AFLAGS_KERNEL := -mconstant-gp
EXTRA =
CFLAGS := $(CFLAGS) -pipe $(EXTRA) -Wa,-x -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \
-funwind-tables
CFLAGS_KERNEL := -mconstant-gp
+ifeq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y)
+ CFLAGS += -ma-step
+endif
+
ifdef CONFIG_IA64_GENERIC
CORE_FILES := arch/$(ARCH)/hp/hp.a \
arch/$(ARCH)/sn/sn.a \
@@ -41,11 +46,18 @@
$(CORE_FILES)
endif
-ifdef CONFIG_IA64_SGI_SN1_SIM
+ifdef CONFIG_IA64_SGI_SN1
+CFLAGS := $(CFLAGS) -DSN -I. -DBRINGUP -DDIRECT_L1_CONSOLE \
+ -DNUMA_BASE -DSIMULATED_KLGRAPH -DNUMA_MIGR_CONTROL \
+ -DLITTLE_ENDIAN -DREAL_HARDWARE -DLANGUAGE_C=1 \
+ -D_LANGUAGE_C=1
SUBDIRS := arch/$(ARCH)/sn/sn1 \
arch/$(ARCH)/sn \
+ arch/$(ARCH)/sn/io \
+ arch/$(ARCH)/sn/fprom \
$(SUBDIRS)
CORE_FILES := arch/$(ARCH)/sn/sn.a \
+ arch/$(ARCH)/sn/io/sgiio.o\
$(CORE_FILES)
endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/boot/bootloader.c linux/arch/ia64/boot/bootloader.c
--- v2.4.0-test9/linux/arch/ia64/boot/bootloader.c Tue Jul 11 19:02:37 2000
+++ linux/arch/ia64/boot/bootloader.c Mon Oct 9 17:54:53 2000
@@ -68,15 +68,16 @@
void
enter_virtual_mode (unsigned long new_psr)
{
+ long tmp;
+
+ asm volatile ("movl %0=1f" : "=r"(tmp));
asm volatile ("mov cr.ipsr=%0" :: "r"(new_psr));
- asm volatile ("mov cr.iip=%0" :: "r"(&&target));
+ asm volatile ("mov cr.iip=%0" :: "r"(tmp));
asm volatile ("mov cr.ifs=r0");
- asm volatile ("rfi;;"); /* must be last insn in an insn group */
-
- target:
+ asm volatile ("rfi;;");
+ asm volatile ("1:");
}
-
#define MAX_ARGS 32
void
@@ -96,7 +97,7 @@
char *kpath, *args;
long arglen = 0;
- asm volatile ("movl gp=__gp" ::: "memory");
+ asm volatile ("movl gp=__gp;;" ::: "memory");
asm volatile ("mov sp=%0" :: "r"(stack) : "memory");
asm volatile ("bsw.1;;");
#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/config.in linux/arch/ia64/config.in
--- v2.4.0-test9/linux/arch/ia64/config.in Sun Oct 8 10:50:06 2000
+++ linux/arch/ia64/config.in Mon Oct 9 17:54:53 2000
@@ -27,7 +27,7 @@
"generic CONFIG_IA64_GENERIC \
DIG-compliant CONFIG_IA64_DIG \
HP-simulator CONFIG_IA64_HP_SIM \
- SN1-simulator CONFIG_IA64_SGI_SN1_SIM" generic
+ SGI-SN1 CONFIG_IA64_SGI_SN1" generic
choice 'Kernel page size' \
"4KB CONFIG_IA64_PAGE_SIZE_4KB \
@@ -51,11 +51,30 @@
bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS
bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS
bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA
+ bool ' Force socket buffers below 4GB?' CONFIG_SKB_BELOW_4GB
+
+ bool ' ACPI kernel configuration manager (EXPERIMENTAL)' CONFIG_ACPI_KERNEL_CONFIG
+ if [ "$CONFIG_ACPI_KERNEL_CONFIG" = "y" ]; then
+ define_bool CONFIG_PM y
+ define_bool CONFIG_ACPI y
+ define_bool CONFIG_ACPI_INTERPRETER y
+ fi
fi
-if [ "$CONFIG_IA64_SGI_SN1_SIM" = "y" ]; then
- define_bool CONFIG_NUMA y
- define_bool CONFIG_IA64_SOFTSDV_HACKS y
+if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then
+ bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG
+ bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC
+ if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then
+ bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC
+ fi
+ bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM n
+ bool ' Enable SGI hack for version 1.0 syngery bugs' CONFIG_IA64_SGI_SYNERGY_1_0_HACKS n
+ define_bool CONFIG_DEVFS_DEBUG y
+ define_bool CONFIG_DEVFS_FS y
+ define_bool CONFIG_IA64_BRL_EMU y
+ define_bool CONFIG_IA64_MCA y
+ define_bool CONFIG_IA64_SGI_IO y
+ define_bool CONFIG_ITANIUM y
fi
define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
@@ -161,6 +180,10 @@
fi # !HP_SIM
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source drivers/input/Config.in
source drivers/char/Config.in
#source drivers/misc/Config.in
@@ -192,7 +215,6 @@
endmenu
source drivers/usb/Config.in
-source drivers/input/Config.in
fi # !HP_SIM
@@ -226,5 +248,6 @@
bool 'Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ
bool 'Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS
bool 'Enable new unwind support' CONFIG_IA64_NEW_UNWIND
+bool 'Disable VHPT' CONFIG_DISABLE_VHPT
endmenu
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/dig/iosapic.c linux/arch/ia64/dig/iosapic.c
--- v2.4.0-test9/linux/arch/ia64/dig/iosapic.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/dig/iosapic.c Mon Oct 9 17:54:53 2000
@@ -31,6 +31,10 @@
#include
#include
+#ifdef CONFIG_ACPI_KERNEL_CONFIG
+# include
+#endif
+
#undef DEBUG_IRQ_ROUTING
static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
@@ -228,7 +232,7 @@
{
struct hw_interrupt_type *irq_type;
struct pci_vector_struct *vectors;
- int i, irq;
+ int i, irq, num_pci_vectors;
if (irqbase == 0)
/*
@@ -255,9 +259,14 @@
* Map the PCI Interrupt data into the ACPI IOSAPIC data using
* the info that the bootstrap loader passed to us.
*/
+# ifdef CONFIG_ACPI_KERNEL_CONFIG
+ acpi_cf_get_pci_vectors(&vectors, &num_pci_vectors);
+# else
ia64_boot_param.pci_vectors = (__u64) __va(ia64_boot_param.pci_vectors);
vectors = (struct pci_vector_struct *) ia64_boot_param.pci_vectors;
- for (i = 0; i < ia64_boot_param.num_pci_vectors; i++) {
+ num_pci_vectors = ia64_boot_param.num_pci_vectors;
+# endif
+ for (i = 0; i < num_pci_vectors; i++) {
irq = vectors[i].irq;
if (irq < 16)
irq = isa_irq_to_vector(irq);
@@ -277,11 +286,11 @@
iosapic_trigger(irq) = IO_SAPIC_LEVEL;
iosapic_polarity(irq) = IO_SAPIC_POL_LOW;
-#ifdef DEBUG_IRQ_ROUTING
+# ifdef DEBUG_IRQ_ROUTING
printk("PCI: BUS %d Slot %x Pin %x IRQ %02x --> Vector %02x IOSAPIC Pin %d\n",
vectors[i].bus, vectors[i].pci_id>>16, vectors[i].pin, vectors[i].irq,
irq, iosapic_pin(irq));
-#endif
+# endif
}
#endif /* CONFIG_IA64_SOFTSDV_HACKS */
@@ -377,7 +386,7 @@
unsigned int ver, v;
int l, max_pin;
- ver = iosapic_version(iosapic->address);
+ ver = iosapic_version((unsigned long) ioremap(iosapic->address, 0));
max_pin = (ver >> 16) & 0xff;
printk("IOSAPIC Version %x.%x: address 0x%lx IRQs 0x%x - 0x%x\n",
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/hp/hpsim_console.c linux/arch/ia64/hp/hpsim_console.c
--- v2.4.0-test9/linux/arch/ia64/hp/hpsim_console.c Sun Feb 6 18:42:40 2000
+++ linux/arch/ia64/hp/hpsim_console.c Thu Oct 12 14:20:48 2000
@@ -28,17 +28,13 @@
static kdev_t simcons_console_device (struct console *);
struct console hpsim_cons = {
- "simcons",
- simcons_write, /* write */
- NULL, /* read */
- simcons_console_device, /* device */
- simcons_wait_key, /* wait_key */
- NULL, /* unblank */
- simcons_init, /* setup */
- CON_PRINTBUFFER, /* flags */
- -1, /* index */
- 0, /* cflag */
- NULL /* next */
+ name: "simcons",
+ write: simcons_write,
+ device: simcons_console_device,
+ wait_key: simcons_wait_key,
+ setup: simcons_init,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
static int
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/ia32/Makefile linux/arch/ia64/ia32/Makefile
--- v2.4.0-test9/linux/arch/ia64/ia32/Makefile Fri Jul 14 16:08:11 2000
+++ linux/arch/ia64/ia32/Makefile Mon Oct 9 17:54:53 2000
@@ -3,9 +3,9 @@
#
.S.s:
- $(CPP) $(AFLAGS) -o $*.s $<
+ $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -o $*.s $<
.S.o:
- $(CC) $(AFLAGS) -c -o $*.o $<
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $<
all: ia32.o
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/ia32/binfmt_elf32.c linux/arch/ia64/ia32/binfmt_elf32.c
--- v2.4.0-test9/linux/arch/ia64/ia32/binfmt_elf32.c Mon Aug 7 21:02:27 2000
+++ linux/arch/ia64/ia32/binfmt_elf32.c Mon Oct 9 17:54:53 2000
@@ -52,7 +52,7 @@
pte_t * pte;
if (page_count(page) != 1)
- printk("mem_map disagrees with %p at %08lx\n", page, address);
+ printk("mem_map disagrees with %p at %08lx\n", (void *) page, address);
pgd = pgd_offset(tsk->mm, address);
pmd = pmd_alloc(pgd, address);
if (!pmd) {
@@ -120,6 +120,8 @@
: "r" ((ulong)IA32_FCR_DEFAULT));
__asm__("mov ar.fir = r0");
__asm__("mov ar.fdr = r0");
+ __asm__("mov %0=ar.k0 ;;" : "=r" (current->thread.old_iob));
+ __asm__("mov ar.k0=%0 ;;" :: "r"(IA32_IOBASE));
/* TSS */
__asm__("mov ar.k1 = %0"
: /* no outputs */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/ia32/ia32_signal.c linux/arch/ia64/ia32/ia32_signal.c
--- v2.4.0-test9/linux/arch/ia64/ia32/ia32_signal.c Thu Jun 22 07:09:44 2000
+++ linux/arch/ia64/ia32/ia32_signal.c Mon Oct 9 17:54:53 2000
@@ -278,7 +278,7 @@
err |= setup_sigcontext_ia32(&frame->sc, &frame->fpstate, regs, set->sig[0]);
- if (_NSIG_WORDS > 1) {
+ if (_IA32_NSIG_WORDS > 1) {
err |= __copy_to_user(frame->extramask, &set->sig[1],
sizeof(frame->extramask));
}
@@ -310,7 +310,7 @@
#if 0
printk("SIG deliver (%s:%d): sig=%d sp=%p pc=%lx ra=%x\n",
- current->comm, current->pid, sig, frame, regs->cr_iip, frame->pretcode);
+ current->comm, current->pid, sig, (void *) frame, regs->cr_iip, frame->pretcode);
#endif
return 1;
@@ -380,7 +380,7 @@
#if 0
printk("SIG deliver (%s:%d): sp=%p pc=%lx ra=%x\n",
- current->comm, current->pid, frame, regs->cr_iip, frame->pretcode);
+ current->comm, current->pid, (void *) frame, regs->cr_iip, frame->pretcode);
#endif
return 1;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/ia32/ia32_support.c linux/arch/ia64/ia32/ia32_support.c
--- v2.4.0-test9/linux/arch/ia64/ia32/ia32_support.c Thu Jun 22 07:09:44 2000
+++ linux/arch/ia64/ia32/ia32_support.c Mon Oct 9 17:54:53 2000
@@ -42,6 +42,7 @@
thread->csd = csd;
thread->ssd = ssd;
thread->tssd = tssd;
+ asm ("mov ar.k0=%0 ;;" :: "r"(thread->old_iob));
}
void
@@ -68,6 +69,8 @@
"mov ar.k1=%7"
:: "r"(eflag), "r"(fsr), "r"(fcr), "r"(fir), "r"(fdr),
"r"(csd), "r"(ssd), "r"(tssd));
+ asm ("mov %0=ar.k0 ;;" : "=r"(thread->old_iob));
+ asm ("mov ar.k0=%0 ;;" :: "r"(IA32_IOBASE));
}
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/ia32/sys_ia32.c linux/arch/ia64/ia32/sys_ia32.c
--- v2.4.0-test9/linux/arch/ia64/ia32/sys_ia32.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/ia32/sys_ia32.c Mon Oct 9 17:54:53 2000
@@ -75,11 +75,11 @@
n = 0;
do {
err = get_user(addr, (int *)A(arg));
- if (IS_ERR(err))
+ if (err)
return err;
if (ap) { /* no access_ok needed, we allocated */
err = __put_user((char *)A(addr), ap++);
- if (IS_ERR(err))
+ if (err)
return err;
}
arg += sizeof(unsigned int);
@@ -102,13 +102,14 @@
{
struct pt_regs *regs = (struct pt_regs *)&stack;
char **av, **ae;
- int na, ne, r, len;
+ int na, ne, len;
+ long r;
na = nargs(argv, NULL);
- if (IS_ERR(na))
+ if (na < 0)
return(na);
ne = nargs(envp, NULL);
- if (IS_ERR(ne))
+ if (ne < 0)
return(ne);
len = (na + ne + 2) * sizeof(*av);
/*
@@ -130,19 +131,19 @@
return (long)av;
ae = av + na + 1;
r = __put_user(0, (av + na));
- if (IS_ERR(r))
+ if (r)
goto out;
r = __put_user(0, (ae + ne));
- if (IS_ERR(r))
+ if (r)
goto out;
r = nargs(argv, av);
- if (IS_ERR(r))
+ if (r < 0)
goto out;
r = nargs(envp, ae);
- if (IS_ERR(r))
+ if (r < 0)
goto out;
r = sys_execve(filename, av, ae, regs);
- if (IS_ERR(r))
+ if (r < 0)
out:
sys_munmap((unsigned long) av, len);
return(r);
@@ -297,7 +298,7 @@
error = do_mmap(file, addr, len, prot, flags, poff);
up(¤t->mm->mmap_sem);
- if (!IS_ERR(error))
+ if (!IS_ERR((void *) error))
error += offset - poff;
} else {
down(¤t->mm->mmap_sem);
@@ -788,7 +789,8 @@
}
static int
-fillonedir32 (void * __buf, const char * name, int namlen, off_t offset, ino_t ino)
+fillonedir32 (void * __buf, const char * name, int namlen, off_t offset, ino_t ino,
+ unsigned int d_type)
{
struct readdir32_callback * buf = (struct readdir32_callback *) __buf;
struct old_linux32_dirent * dirent;
@@ -2543,6 +2545,78 @@
printk("IA32 syscall #%d issued, maybe we should implement it\n",
(int)regs->r1);
return(sys_ni_syscall());
+}
+
+/*
+ * The IA64 maps 4 I/O ports for each 4K page
+ */
+#define IOLEN ((65536 / 4) * 4096)
+
+asmlinkage long
+sys_iopl (int level, long arg1, long arg2, long arg3)
+{
+ extern unsigned long ia64_iobase;
+ int fd;
+ struct file * file;
+ unsigned int old;
+ unsigned long addr;
+ mm_segment_t old_fs = get_fs ();
+
+ if (level != 3)
+ return(-EINVAL);
+ /* Trying to gain more privileges? */
+ __asm__ __volatile__("mov %0=ar.eflag ;;" : "=r"(old));
+ if (level > ((old >> 12) & 3)) {
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
+ }
+ set_fs(KERNEL_DS);
+ fd = sys_open("/dev/mem", O_SYNC | O_RDWR, 0);
+ set_fs(old_fs);
+ if (fd < 0)
+ return fd;
+ file = fget(fd);
+ if (file == NULL) {
+ sys_close(fd);
+ return(-EFAULT);
+ }
+
+ down(¤t->mm->mmap_sem);
+ lock_kernel();
+
+ addr = do_mmap_pgoff(file, IA32_IOBASE,
+ IOLEN, PROT_READ|PROT_WRITE, MAP_SHARED,
+ (ia64_iobase & ~PAGE_OFFSET) >> PAGE_SHIFT);
+
+ unlock_kernel();
+ up(¤t->mm->mmap_sem);
+
+ if (addr >= 0) {
+ __asm__ __volatile__("mov ar.k0=%0 ;;" :: "r"(addr));
+ old = (old & ~0x3000) | (level << 12);
+ __asm__ __volatile__("mov ar.eflag=%0 ;;" :: "r"(old));
+ }
+
+ fput(file);
+ sys_close(fd);
+ return 0;
+}
+
+asmlinkage long
+sys_ioperm (unsigned long from, unsigned long num, int on)
+{
+
+ /*
+ * Since IA64 doesn't have permission bits we'd have to go to
+ * a lot of trouble to simulate them in software. There's
+ * no point, only trusted programs can make this call so we'll
+ * just turn it into an iopl call and let the process have
+ * access to all I/O ports.
+ *
+ * XXX proper ioperm() support should be emulated by
+ * manipulating the page protections...
+ */
+ return(sys_iopl(3, 0, 0, 0));
}
#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/Makefile linux/arch/ia64/kernel/Makefile
--- v2.4.0-test9/linux/arch/ia64/kernel/Makefile Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/Makefile Mon Oct 9 17:54:53 2000
@@ -3,9 +3,9 @@
#
.S.s:
- $(CPP) $(AFLAGS) -o $*.s $<
+ $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -o $*.s $<
.S.o:
- $(CC) $(AFLAGS) -c -o $*.o $<
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $<
all: kernel.o head.o init_task.o
@@ -16,7 +16,7 @@
obj-$(CONFIG_IA64_GENERIC) += machvec.o
obj-$(CONFIG_IA64_PALINFO) += palinfo.o
obj-$(CONFIG_PCI) += pci.o
-obj-$(CONFIG_SMP) += smp.o
+obj-$(CONFIG_SMP) += smp.o smpboot.o
obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o
obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/acpi.c linux/arch/ia64/kernel/acpi.c
--- v2.4.0-test9/linux/arch/ia64/kernel/acpi.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/acpi.c Mon Oct 9 17:54:53 2000
@@ -24,18 +24,17 @@
#include
#include
#include
+#ifdef CONFIG_ACPI_KERNEL_CONFIG
+# include
+#endif
#undef ACPI_DEBUG /* Guess what this does? */
-#ifdef CONFIG_SMP
-extern struct smp_boot_data smp;
-#endif
-
/* These are ugly but will be reclaimed by the kernel */
-int __initdata available_cpus = 0;
-int __initdata total_cpus = 0;
+int __initdata available_cpus;
+int __initdata total_cpus;
-void (*pm_idle) (void);
+void (*pm_idle)(void);
/*
* Identify usable CPU's and remember them for SMP bringup later.
@@ -60,18 +59,16 @@
add = 0;
}
+#ifdef CONFIG_SMP
+ smp_boot_data.cpu_phys_id[total_cpus] = -1;
+#endif
if (add) {
printk("Available.\n");
available_cpus++;
#ifdef CONFIG_SMP
-# if LARGE_CPU_ID_OK
- smp.cpu_map[total_cpus] = (lsapic->id << 8) | lsapic->eid;
-# else
- smp.cpu_map[total_cpus] = lsapic->id;
-# endif
-#endif
+ smp_boot_data.cpu_phys_id[total_cpus] = (lsapic->id << 8) | lsapic->eid;
+#endif /* CONFIG_SMP */
}
-
total_cpus++;
}
@@ -139,13 +136,12 @@
break;
}
-#if 1/*def ACPI_DEBUG*/
+# ifdef ACPI_DEBUG
printk("Legacy ISA IRQ %x -> IA64 Vector %x IOSAPIC Pin %x Active %s %s Trigger\n",
legacy->isa_irq, vector, iosapic_pin(vector),
((iosapic_polarity(vector) == IO_SAPIC_POL_LOW) ? "Low" : "High"),
((iosapic_trigger(vector) == IO_SAPIC_LEVEL) ? "Level" : "Edge"));
-#endif /* ACPI_DEBUG */
-
+# endif /* ACPI_DEBUG */
#endif /* CONFIG_IA64_IRQ_ACPI */
}
@@ -172,10 +168,6 @@
/* Base address of IPI Message Block */
ipi_base_addr = (unsigned long) ioremap(msapic->interrupt_block, 0);
-#ifdef CONFIG_SMP
- memset(&smp, -1, sizeof(smp));
-#endif
-
p = (char *) (msapic + 1);
end = p + (msapic->header.length - sizeof(acpi_sapic_t));
@@ -248,6 +240,10 @@
printk("ACPI: %.6s %.8s %d.%d\n", rsdt->header.oem_id, rsdt->header.oem_table_id,
rsdt->header.oem_revision >> 16, rsdt->header.oem_revision & 0xffff);
+#ifdef CONFIG_ACPI_KERNEL_CONFIG
+ acpi_cf_init(rsdp);
+#endif
+
tables = (rsdt->header.length - sizeof(acpi_desc_table_hdr_t)) / 8;
for (i = 0; i < tables; i++) {
hdrp = (acpi_desc_table_hdr_t *) __va(rsdt->entry_ptrs[i]);
@@ -259,12 +255,16 @@
acpi_parse_msapic((acpi_sapic_t *) hdrp);
}
+#ifdef CONFIG_ACPI_KERNEL_CONFIG
+ acpi_cf_terminate();
+#endif
+
#ifdef CONFIG_SMP
if (available_cpus == 0) {
printk("ACPI: Found 0 CPUS; assuming 1\n");
available_cpus = 1; /* We've got at least one of these, no? */
}
- smp.cpu_count = available_cpus;
+ smp_boot_data.cpu_count = available_cpus;
#endif
return 1;
}
@@ -278,7 +278,7 @@
#else
# if defined (CONFIG_IA64_HP_SIM)
return "hpsim";
-# elif defined (CONFIG_IA64_SGI_SN1_SIM)
+# elif defined (CONFIG_IA64_SGI_SN1)
return "sn1";
# elif defined (CONFIG_IA64_DIG)
return "dig";
@@ -286,4 +286,4 @@
# error Unknown platform. Fix acpi.c.
# endif
#endif
-}
+}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/efi.c linux/arch/ia64/kernel/efi.c
--- v2.4.0-test9/linux/arch/ia64/kernel/efi.c Sun Oct 8 10:50:06 2000
+++ linux/arch/ia64/kernel/efi.c Fri Oct 13 12:05:29 2000
@@ -18,6 +18,7 @@
* Goutham Rao:
* Skip non-WB memory and ignore empty memory ranges.
*/
+#include
#include
#include
#include
@@ -216,12 +217,41 @@
md->phys_addr);
continue;
}
- mask = ~((1 << _PAGE_SIZE_4M)-1); /* XXX should be dynamic? */
+ /*
+ * We must use the same page size as the one used
+ * for the kernel region when we map the PAL code.
+ * This way, we avoid overlapping TRs if code is
+ * executed nearby. The Alt I-TLB installs 256MB
+ * page sizes as defined for region 7.
+ *
+ * XXX Fixme: should be dynamic here (for page size)
+ */
+ mask = ~((1 << _PAGE_SIZE_256M)-1);
vaddr = PAGE_OFFSET + md->phys_addr;
- printk(__FUNCTION__": mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n",
- md->phys_addr, md->phys_addr + (md->num_pages << 12),
- vaddr & mask, (vaddr & mask) + 4*1024*1024);
+ /*
+ * We must check that the PAL mapping won't overlap
+ * with the kernel mapping on ITR1.
+ *
+ * PAL code is guaranteed to be aligned on a power of 2
+ * between 4k and 256KB.
+ * Also from the documentation, it seems like there is an
+ * implicit guarantee that you will need only ONE ITR to
+ * map it. This implies that the PAL code is always aligned
+ * on its size, i.e., the closest matching page size supported
+ * by the TLB. Therefore PAL code is guaranteed never to cross
+ * a 256MB unless it is bigger than 256MB (very unlikely!).
+ * So for now the following test is enough to determine whether
+ * or not we need a dedicated ITR for the PAL code.
+ */
+ if ((vaddr & mask) == (PAGE_OFFSET & mask)) {
+ printk(__FUNCTION__ " : no need to install ITR for PAL Code\n");
+ continue;
+ }
+
+ printk("CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n",
+ smp_processor_id(), md->phys_addr, md->phys_addr + (md->num_pages << 12),
+ vaddr & mask, (vaddr & mask) + 256*1024*1024);
/*
* Cannot write to CRx with PSR.ic=1
@@ -232,12 +262,11 @@
* ITR0/DTR0: used for kernel code/data
* ITR1/DTR1: used by HP simulator
* ITR2/DTR2: map PAL code
- * ITR3/DTR3: used to map PAL calls buffer
*/
ia64_itr(0x1, 2, vaddr & mask,
pte_val(mk_pte_phys(md->phys_addr,
__pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RX))),
- _PAGE_SIZE_4M);
+ _PAGE_SIZE_256M);
local_irq_restore(flags);
ia64_srlz_i ();
}
@@ -348,6 +377,16 @@
#endif
efi_map_pal_code();
+
+#ifndef CONFIG_IA64_SOFTSDV_HACKS
+ /*
+ * (Some) SoftSDVs seem to have a problem with this call.
+ * Since it's mostly a performance optimization, just don't do
+ * it for now... --davidm 99/12/6
+ */
+ efi_enter_virtual_mode();
+#endif
+
}
void
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/entry.S linux/arch/ia64/kernel/entry.S
--- v2.4.0-test9/linux/arch/ia64/kernel/entry.S Tue Sep 5 13:50:01 2000
+++ linux/arch/ia64/kernel/entry.S Mon Oct 9 17:54:54 2000
@@ -120,6 +120,9 @@
mov r13=in0 // set "current" pointer
;;
DO_LOAD_SWITCH_STACK( )
+#ifdef CONFIG_SMP
+ sync.i // ensure "fc"s done by this CPU are visible on other CPUs
+#endif
br.ret.sptk.few rp
END(ia64_switch_to)
@@ -1088,7 +1091,7 @@
data8 sys_setpriority
data8 sys_statfs
data8 sys_fstatfs
- data8 sys_ioperm // 1105
+ data8 ia64_ni_syscall
data8 sys_semget
data8 sys_semop
data8 sys_semctl
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/fw-emu.c linux/arch/ia64/kernel/fw-emu.c
--- v2.4.0-test9/linux/arch/ia64/kernel/fw-emu.c Fri Jul 14 16:08:11 2000
+++ linux/arch/ia64/kernel/fw-emu.c Mon Oct 9 17:54:54 2000
@@ -20,7 +20,7 @@
#define MB (1024*1024UL)
-#define NUM_MEM_DESCS 3
+#define NUM_MEM_DESCS 2
static char fw_mem[( sizeof(efi_system_table_t)
+ sizeof(efi_runtime_services_t)
@@ -453,6 +453,12 @@
md->num_pages = (1*MB) >> 12; /* 1MB (in 4KB pages) */
md->attribute = EFI_MEMORY_WB;
+#if 0
+ /*
+ * XXX bootmem is broken for now... (remember to NUM_MEM_DESCS
+ * if you re-enable this!)
+ */
+
/* descriptor for high memory (>4GB): */
md = &efi_memmap[2];
md->type = EFI_CONVENTIONAL_MEMORY;
@@ -461,6 +467,7 @@
md->virt_addr = 0;
md->num_pages = (32*MB) >> 12; /* 32MB (in 4KB pages) */
md->attribute = EFI_MEMORY_WB;
+#endif
bp = id(ZERO_PAGE_ADDR);
bp->efi_systab = __pa(&fw_mem);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/head.S linux/arch/ia64/kernel/head.S
--- v2.4.0-test9/linux/arch/ia64/kernel/head.S Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/head.S Mon Oct 9 17:54:54 2000
@@ -111,7 +111,7 @@
* be implemented more efficiently (for example, __switch_to()
* always sets the psr.dfh bit of the task it is switching to).
*/
- addl r12=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2
+ addl r12=IA64_STK_OFFSET-IA64_PT_REGS_SIZE-16,r2
addl r2=IA64_RBS_OFFSET,r2 // initialize the RSE
mov ar.rsc=r0 // place RSE in enforced lazy mode
;;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/ia64_ksyms.c linux/arch/ia64/kernel/ia64_ksyms.c
--- v2.4.0-test9/linux/arch/ia64/kernel/ia64_ksyms.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/ia64_ksyms.c Mon Oct 9 17:54:54 2000
@@ -10,6 +10,7 @@
EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(memscan);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strchr);
EXPORT_SYMBOL(strcmp);
@@ -18,6 +19,8 @@
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strncpy);
+EXPORT_SYMBOL(strnlen);
+EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strtok);
@@ -27,24 +30,58 @@
#include
#include
+/* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */
EXPORT_SYMBOL(csum_partial_copy_nocheck);
+EXPORT_SYMBOL(csum_tcpudp_magic);
+EXPORT_SYMBOL(ip_compute_csum);
+EXPORT_SYMBOL(ip_fast_csum);
+
+#include
+EXPORT_SYMBOL(__ia64_memcpy_fromio);
+EXPORT_SYMBOL(__ia64_memcpy_toio);
+EXPORT_SYMBOL(__ia64_memset_c_io);
#include
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(disable_irq_nosync);
+
+#include
+EXPORT_SYMBOL(clear_page);
+
+#include
+EXPORT_SYMBOL(pci_dma_sync_sg);
+EXPORT_SYMBOL(pci_dma_sync_single);
+EXPORT_SYMBOL(pci_map_sg);
+EXPORT_SYMBOL(pci_map_single);
+EXPORT_SYMBOL(pci_unmap_sg);
+EXPORT_SYMBOL(pci_unmap_single);
#include
EXPORT_SYMBOL(cpu_data);
EXPORT_SYMBOL(kernel_thread);
+#include
+#ifdef CONFIG_IA64_DEBUG_IRQ
+EXPORT_SYMBOL(last_cli_ip);
+#endif
+
#ifdef CONFIG_SMP
+
+#include
#include
EXPORT_SYMBOL(synchronize_irq);
+#include
+EXPORT_SYMBOL(smp_call_function);
+
+#include
+EXPORT_SYMBOL(smp_num_cpus);
+
#include
EXPORT_SYMBOL(kernel_flag);
-#include
+/* #include */
EXPORT_SYMBOL(__global_sti);
EXPORT_SYMBOL(__global_cli);
EXPORT_SYMBOL(__global_save_flags);
@@ -54,17 +91,29 @@
#include
EXPORT_SYMBOL(__copy_user);
+EXPORT_SYMBOL(__do_clear_user);
#include
EXPORT_SYMBOL(__ia64_syscall);
/* from arch/ia64/lib */
+extern void __divsi3(void);
+extern void __udivsi3(void);
+extern void __modsi3(void);
+extern void __umodsi3(void);
extern void __divdi3(void);
extern void __udivdi3(void);
extern void __moddi3(void);
extern void __umoddi3(void);
+EXPORT_SYMBOL_NOVERS(__divsi3);
+EXPORT_SYMBOL_NOVERS(__udivsi3);
+EXPORT_SYMBOL_NOVERS(__modsi3);
+EXPORT_SYMBOL_NOVERS(__umodsi3);
EXPORT_SYMBOL_NOVERS(__divdi3);
EXPORT_SYMBOL_NOVERS(__udivdi3);
EXPORT_SYMBOL_NOVERS(__moddi3);
EXPORT_SYMBOL_NOVERS(__umoddi3);
+
+extern unsigned long ia64_iobase;
+EXPORT_SYMBOL(ia64_iobase);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/irq.c linux/arch/ia64/kernel/irq.c
--- v2.4.0-test9/linux/arch/ia64/kernel/irq.c Fri Aug 4 16:15:37 2000
+++ linux/arch/ia64/kernel/irq.c Mon Oct 9 17:54:54 2000
@@ -536,8 +536,7 @@
desc->depth--;
break;
case 0:
- printk("enable_irq() unbalanced from %p\n",
- __builtin_return_address(0));
+ printk("enable_irq() unbalanced from %p\n", (void *) __builtin_return_address(0));
}
spin_unlock_irqrestore(&desc->lock, flags);
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/irq_ia64.c linux/arch/ia64/kernel/irq_ia64.c
--- v2.4.0-test9/linux/arch/ia64/kernel/irq_ia64.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/irq_ia64.c Mon Oct 9 17:54:54 2000
@@ -39,7 +39,8 @@
spinlock_t ivr_read_lock;
#endif
-unsigned long ipi_base_addr = IPI_DEFAULT_BASE_ADDR; /* default base addr of IPI table */
+/* default base addr of IPI table */
+unsigned long ipi_base_addr = (__IA64_UNCACHED_OFFSET | IPI_DEFAULT_BASE_ADDR);
/*
* Legacy IRQ to IA-64 vector translation table. Any vector not in
@@ -220,13 +221,23 @@
{
unsigned long ipi_addr;
unsigned long ipi_data;
+ unsigned long phys_cpu_id;
#ifdef CONFIG_ITANIUM_A1_SPECIFIC
unsigned long flags;
#endif
-# define EID 0
+
+#ifdef CONFIG_SMP
+ phys_cpu_id = cpu_physical_id(cpu);
+#else
+ phys_cpu_id = (ia64_get_lid() >> 16) & 0xffff;
+#endif
+
+ /*
+ * cpu number is in 8bit ID and 8bit EID
+ */
ipi_data = (delivery_mode << 8) | (vector & 0xff);
- ipi_addr = ipi_base_addr | ((cpu << 8 | EID) << 4) | ((redirect & 1) << 3);
+ ipi_addr = ipi_base_addr | (phys_cpu_id << 4) | ((redirect & 1) << 3);
#ifdef CONFIG_ITANIUM_A1_SPECIFIC
spin_lock_irqsave(&ivr_read_lock, flags);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/ivt.S linux/arch/ia64/kernel/ivt.S
--- v2.4.0-test9/linux/arch/ia64/kernel/ivt.S Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/ivt.S Mon Oct 9 17:54:54 2000
@@ -4,6 +4,8 @@
* Copyright (C) 1998-2000 Hewlett-Packard Co
* Copyright (C) 1998, 1999 Stephane Eranian
* Copyright (C) 1998-2000 David Mosberger
+ *
+ * 00/08/23 Asit Mallick TLB handling for SMP
*/
/*
* This file defines the interrupt vector table used by the CPU.
@@ -134,32 +136,51 @@
(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL?
dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
;;
-(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0)
+(p7) ld8 r20=[r17] // fetch the L2 entry (may be 0)
shr.u r19=r16,PAGE_SHIFT // shift L3 index into position
;;
-(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL?
- dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
+(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was L2 entry NULL?
+ dep r21=r19,r20,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
;;
-(p7) ld8 r18=[r17] // read the L3 PTE
+(p7) ld8 r18=[r21] // read the L3 PTE
mov r19=cr.isr // cr.isr bit 0 tells us if this is an insn miss
;;
(p7) tbit.z p6,p7=r18,0 // page present bit cleared?
- mov r21=cr.iha // get the VHPT address that caused the TLB miss
+ mov r22=cr.iha // get the VHPT address that caused the TLB miss
;; // avoid RAW on p7
(p7) tbit.nz.unc p10,p11=r19,32 // is it an instruction TLB miss?
- dep r17=0,r17,0,PAGE_SHIFT // clear low bits to get page address
+ dep r23=0,r20,0,PAGE_SHIFT // clear low bits to get page address
;;
(p10) itc.i r18 // insert the instruction TLB entry
(p11) itc.d r18 // insert the data TLB entry
(p6) br.spnt.few page_fault // handle bad address/page not present (page fault)
- mov cr.ifa=r21
+ mov cr.ifa=r22
// Now compute and insert the TLB entry for the virtual page table.
// We never execute in a page table page so there is no need to set
// the exception deferral bit.
- adds r16=__DIRTY_BITS_NO_ED|_PAGE_PL_0|_PAGE_AR_RW,r17
+ adds r24=__DIRTY_BITS_NO_ED|_PAGE_PL_0|_PAGE_AR_RW,r23
+ ;;
+(p7) itc.d r24
+ ;;
+#ifdef CONFIG_SMP
+ //
+ // Re-check L2 and L3 pagetable. If they changed, we may have received
+ // a ptc.g between reading the pagetable and the "itc". If so,
+ // flush the entry we inserted and retry.
+ //
+ ld8 r25=[r21] // read L3 PTE again
+ ld8 r26=[r17] // read L2 entry again
+ ;;
+ cmp.ne p6,p7=r26,r20 // did L2 entry change
+ mov r27=PAGE_SHIFT<<2
+ ;;
+(p6) ptc.l r22,r27 // purge PTE page translation
+(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did L3 PTE change
;;
-(p7) itc.d r16
+(p6) ptc.l r16,r27 // purge translation
+#endif
+
mov pr=r31,-1 // restore predicate registers
rfi
@@ -175,22 +196,32 @@
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r16=cr.iha // get virtual address of L3 PTE
+ mov r16=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
;;
- ld8.s r16=[r16] // try to read L3 PTE
+ ld8.s r17=[r19] // try to read L3 PTE
mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r16 // did read succeed?
+ tnat.nz p6,p0=r17 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
- itc.i r16
+ itc.i r17
+ ;;
+#ifdef CONFIG_SMP
+ ld8.s r18=[r19] // try to read L3 PTE again and see if same
+ mov r20=PAGE_SHIFT<<2 // setup page size for purge
;;
+ cmp.eq p6,p7=r17,r18
+ ;;
+(p7) ptc.l r16,r20
+#endif
mov pr=r31,-1
rfi
-1: mov r16=cr.ifa // get address that caused the TLB miss
- ;;
- rsm psr.dt // use physical addressing for data
+#ifdef CONFIG_DISABLE_VHPT
+itlb_fault:
+#endif
+1: rsm psr.dt // use physical addressing for data
mov r19=ar.k7 // get page table base address
shl r21=r16,3 // shift bit 60 into sign bit
shr.u r17=r16,61 // get the region number into r17
@@ -228,6 +259,15 @@
(p7) itc.i r18 // insert the instruction TLB entry
(p6) br.spnt.few page_fault // handle bad address/page not present (page fault)
;;
+#ifdef CONFIG_SMP
+ ld8 r19=[r17] // re-read the PTE and check if same
+ ;;
+ cmp.eq p6,p7=r18,r19
+ mov r20=PAGE_SHIFT<<2
+ ;;
+(p7) ptc.l r16,r20 // PTE changed purge translation
+#endif
+
mov pr=r31,-1 // restore predicate registers
rfi
@@ -243,22 +283,32 @@
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r16=cr.iha // get virtual address of L3 PTE
+ mov r16=cr.ifa // get virtual address
+ mov r19=cr.iha // get virtual address of L3 PTE
;;
- ld8.s r16=[r16] // try to read L3 PTE
+ ld8.s r17=[r19] // try to read L3 PTE
mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r16 // did read succeed?
+ tnat.nz p6,p0=r17 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
- itc.d r16
+ itc.d r17
+ ;;
+#ifdef CONFIG_SMP
+ ld8.s r18=[r19] // try to read L3 PTE again and see if same
+ mov r20=PAGE_SHIFT<<2 // setup page size for purge
;;
+ cmp.eq p6,p7=r17,r18
+ ;;
+(p7) ptc.l r16,r20
+#endif
mov pr=r31,-1
rfi
-1: mov r16=cr.ifa // get address that caused the TLB miss
- ;;
- rsm psr.dt // use physical addressing for data
+#ifdef CONFIG_DISABLE_VHPT
+dtlb_fault:
+#endif
+1: rsm psr.dt // use physical addressing for data
mov r19=ar.k7 // get page table base address
shl r21=r16,3 // shift bit 60 into sign bit
shr.u r17=r16,61 // get the region number into r17
@@ -296,6 +346,14 @@
(p7) itc.d r18 // insert the instruction TLB entry
(p6) br.spnt.few page_fault // handle bad address/page not present (page fault)
;;
+#ifdef CONFIG_SMP
+ ld8 r19=[r17] // re-read the PTE and check if same
+ ;;
+ cmp.eq p6,p7=r18,r19
+ mov r20=PAGE_SHIFT<<2
+ ;;
+(p7) ptc.l r16,r20 // PTE changed purge translation
+#endif
mov pr=r31,-1 // restore predicate registers
rfi
@@ -303,6 +361,16 @@
/////////////////////////////////////////////////////////////////////////////////////////
// 0x0c00 Entry 3 (size 64 bundles) Alt ITLB (19)
mov r16=cr.ifa // get address that caused the TLB miss
+#ifdef CONFIG_DISABLE_VHPT
+ mov r31=pr
+ ;;
+ shr.u r21=r16,61 // get the region number into r21
+ ;;
+ cmp.gt p6,p0=6,r21 // user mode
+(p6) br.cond.dptk.many itlb_fault
+ ;;
+ mov pr=r31,-1
+#endif
movl r17=__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RX
;;
shr.u r18=r16,57 // move address bit 61 to bit 4
@@ -323,8 +391,14 @@
movl r17=__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RW
mov r20=cr.isr
mov r21=cr.ipsr
- mov r19=pr
+ mov r31=pr
;;
+#ifdef CONFIG_DISABLE_VHPT
+ shr.u r22=r16,61 // get the region number into r21
+ ;;
+ cmp.gt p8,p0=6,r22 // user mode
+(p8) br.cond.dptk.many dtlb_fault
+#endif
tbit.nz p6,p7=r20,IA64_ISR_SP_BIT // is speculation bit on?
shr.u r18=r16,57 // move address bit 61 to bit 4
dep r16=0,r16,IA64_MAX_PHYS_BITS,(64-IA64_MAX_PHYS_BITS) // clear ed & reserved bits
@@ -337,7 +411,7 @@
(p6) mov cr.ipsr=r21
;;
(p7) itc.d r16 // insert the TLB entry
- mov pr=r19,-1
+ mov pr=r31,-1
rfi
;;
@@ -452,6 +526,7 @@
// a nested TLB miss hit where we look up the physical address of the L3 PTE
// and then continue at label 1 below.
//
+#ifndef CONFIG_SMP
mov r16=cr.ifa // get the address that caused the fault
movl r30=1f // load continuation point in case of nested fault
;;
@@ -465,6 +540,36 @@
;;
st8 [r17]=r18 // store back updated PTE
itc.d r18 // install updated PTE
+#else
+ mov r16=cr.ifa // get the address that caused the fault
+ movl r30=1f // load continuation point in case of nested fault
+ ;;
+ thash r17=r16 // compute virtual address of L3 PTE
+ mov r28=ar.ccv // save ar.ccv
+ mov r29=b0 // save b0 in case of nested fault
+ mov r27=pr
+ ;;
+1: ld8 r18=[r17]
+ ;; // avoid RAW on r18
+ mov ar.ccv=r18 // set compare value for cmpxchg
+ or r25=_PAGE_D,r18 // set the dirty bit
+ ;;
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
+ mov r24=PAGE_SHIFT<<2
+ ;;
+ cmp.eq p6,p7=r26,r18
+ ;;
+(p6) itc.d r25 // install updated PTE
+ ;;
+ ld8 r18=[r17] // read PTE again
+ ;;
+ cmp.eq p6,p7=r18,r25 // is it same as the newly installed
+ ;;
+(p7) ptc.l r16,r24
+ mov b0=r29 // restore b0
+ mov ar.ccv=r28
+ mov pr=r27,-1
+#endif
rfi
.align 1024
@@ -486,6 +591,8 @@
(p6) mov r16=r18 // if so, use cr.iip instead of cr.ifa
mov pr=r31,-1
#endif /* CONFIG_ITANIUM */
+
+#ifndef CONFIG_SMP
movl r30=1f // load continuation point in case of nested fault
;;
thash r17=r16 // compute virtual address of L3 PTE
@@ -515,12 +622,58 @@
;;
st8 [r17]=r18 // store back updated PTE
itc.i r18 // install updated PTE
+#else
+ movl r30=1f // load continuation point in case of nested fault
+ ;;
+ thash r17=r16 // compute virtual address of L3 PTE
+ mov r28=ar.ccv // save ar.ccv
+ mov r29=b0 // save b0 in case of nested fault)
+ mov r27=pr
+ ;;
+1: ld8 r18=[r17]
+#if defined(CONFIG_IA32_SUPPORT) && \
+ (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_B0_SPECIFIC))
+ //
+ // Erratum 85 (Access bit fault could be reported before page not present fault)
+ // If the PTE is indicates the page is not present, then just turn this into a
+ // page fault.
+ //
+ ;;
+ tbit.nz p6,p0=r18,0 // page present bit set?
+(p6) br.cond.sptk 1f
+ ;; // avoid WAW on p6
+ mov pr=r27,-1
+ br.cond.sptk page_fault // page wasn't present
+1:
+#else
+ ;; // avoid RAW on r18
+#endif
+ mov ar.ccv=r18 // set compare value for cmpxchg
+ or r25=_PAGE_A,r18 // set the accessed bit
+ ;;
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
+ mov r24=PAGE_SHIFT<<2
+ ;;
+ cmp.eq p6,p7=r26,r18
+ ;;
+(p6) itc.i r25 // install updated PTE
+ ;;
+ ld8 r18=[r17] // read PTE again
+ ;;
+ cmp.eq p6,p7=r18,r25 // is it same as the newly installed
+ ;;
+(p7) ptc.l r16,r24
+ mov b0=r29 // restore b0
+ mov ar.ccv=r28
+ mov pr=r27,-1
+#endif
rfi
.align 1024
/////////////////////////////////////////////////////////////////////////////////////////
// 0x2800 Entry 10 (size 64 bundles) Data Access-bit (15,55)
// Like Entry 8, except for data access
+#ifndef CONFIG_SMP
mov r16=cr.ifa // get the address that caused the fault
movl r30=1f // load continuation point in case of nested fault
;;
@@ -534,6 +687,36 @@
;;
st8 [r17]=r18 // store back updated PTE
itc.d r18 // install updated PTE
+#else
+ mov r16=cr.ifa // get the address that caused the fault
+ movl r30=1f // load continuation point in case of nested fault
+ ;;
+ thash r17=r16 // compute virtual address of L3 PTE
+ mov r28=ar.ccv // save ar.ccv
+ mov r29=b0 // save b0 in case of nested fault
+ mov r27=pr
+ ;;
+1: ld8 r18=[r17]
+ ;; // avoid RAW on r18
+ mov ar.ccv=r18 // set compare value for cmpxchg
+ or r25=_PAGE_A,r18 // set the dirty bit
+ ;;
+ cmpxchg8.acq r26=[r17],r25,ar.ccv
+ mov r24=PAGE_SHIFT<<2
+ ;;
+ cmp.eq p6,p7=r26,r18
+ ;;
+(p6) itc.d r25 // install updated PTE
+ ;;
+ ld8 r18=[r17] // read PTE again
+ ;;
+ cmp.eq p6,p7=r18,r25 // is it same as the newly installed
+ ;;
+(p7) ptc.l r16,r24
+ mov b0=r29 // restore b0
+ mov ar.ccv=r28
+ mov pr=r27,-1
+#endif
rfi
.align 1024
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/mca.c linux/arch/ia64/kernel/mca.c
--- v2.4.0-test9/linux/arch/ia64/kernel/mca.c Fri Jul 14 16:08:11 2000
+++ linux/arch/ia64/kernel/mca.c Mon Oct 9 17:54:54 2000
@@ -43,10 +43,6 @@
u64 ia64_mca_bspstore[1024];
u64 ia64_init_stack[INIT_TASK_SIZE] __attribute__((aligned(16)));
-#if defined(SAL_MPINIT_WORKAROUND) && !defined(CONFIG_SMP)
-int bootstrap_processor = -1;
-#endif
-
static void ia64_mca_cmc_vector_setup(int enable,
int_vector_t cmc_vector);
static void ia64_mca_wakeup_ipi_wait(void);
@@ -223,12 +219,6 @@
IA64_MCA_DEBUG("ia64_mca_init : begin\n");
-#if defined(SAL_MPINIT_WORKAROUND) && !defined(CONFIG_SMP)
- /* XXX -- workaround for SAL bug for running on MP system, but UP kernel */
-
- bootstrap_processor = hard_smp_processor_id();
-#endif
-
/* Clear the Rendez checkin flag for all cpus */
for(i = 0 ; i < IA64_MAXCPUS; i++)
ia64_mc_info.imi_rendez_checkin[i] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
@@ -265,8 +255,11 @@
IA64_MCA_DEBUG("ia64_mca_init : correctable mca vector setup done\n");
ia64_mc_info.imi_mca_handler = __pa(ia64_os_mca_dispatch);
- ia64_mc_info.imi_mca_handler_size =
- __pa(ia64_os_mca_dispatch_end) - __pa(ia64_os_mca_dispatch);
+ /*
+ * XXX - disable SAL checksum by setting size to 0; should be
+ * __pa(ia64_os_mca_dispatch_end) - __pa(ia64_os_mca_dispatch);
+ */
+ ia64_mc_info.imi_mca_handler_size = 0;
/* Register the os mca handler with SAL */
if (ia64_sal_set_vectors(SAL_VECTOR_OS_MCA,
ia64_mc_info.imi_mca_handler,
@@ -278,10 +271,14 @@
IA64_MCA_DEBUG("ia64_mca_init : registered os mca handler with SAL\n");
+ /*
+ * XXX - disable SAL checksum by setting size to 0, should be
+ * IA64_INIT_HANDLER_SIZE
+ */
ia64_mc_info.imi_monarch_init_handler = __pa(mon_init_ptr->fp);
- ia64_mc_info.imi_monarch_init_handler_size = IA64_INIT_HANDLER_SIZE;
+ ia64_mc_info.imi_monarch_init_handler_size = 0;
ia64_mc_info.imi_slave_init_handler = __pa(slave_init_ptr->fp);
- ia64_mc_info.imi_slave_init_handler_size = IA64_INIT_HANDLER_SIZE;
+ ia64_mc_info.imi_slave_init_handler_size = 0;
IA64_MCA_DEBUG("ia64_mca_init : os init handler at %lx\n",ia64_mc_info.imi_monarch_init_handler);
@@ -386,7 +383,7 @@
int cpu;
/* Clear the Rendez checkin flag for all cpus */
- for(cpu = 0 ; cpu < IA64_MAXCPUS; cpu++)
+ for(cpu = 0 ; cpu < smp_num_cpus; cpu++)
if (ia64_mc_info.imi_rendez_checkin[cpu] == IA64_MCA_RENDEZ_CHECKIN_DONE)
ia64_mca_wakeup(cpu);
@@ -404,11 +401,14 @@
void
ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *ptregs)
{
- int flags;
+ int flags, cpu = 0;
/* Mask all interrupts */
save_and_cli(flags);
- ia64_mc_info.imi_rendez_checkin[ia64_get_cpuid(0)] = IA64_MCA_RENDEZ_CHECKIN_DONE;
+#ifdef CONFIG_SMP
+ cpu = cpu_logical_id(hard_smp_processor_id());
+#endif
+ ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE;
/* Register with the SAL monarch that the slave has
* reached SAL
*/
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/mca_asm.S linux/arch/ia64/kernel/mca_asm.S
--- v2.4.0-test9/linux/arch/ia64/kernel/mca_asm.S Fri Jul 14 16:08:11 2000
+++ linux/arch/ia64/kernel/mca_asm.S Fri Oct 13 12:05:29 2000
@@ -6,6 +6,8 @@
// 00/03/29 cfleck Added code to save INIT handoff state in pt_regs format, switch to temp kstack,
// switch modes, jump to C INIT handler
//
+#include
+
#include
#include
#include
@@ -680,32 +682,22 @@
.proc ia64_monarch_init_handler
ia64_monarch_init_handler:
-#if defined(SAL_MPINIT_WORKAROUND)
+#if defined(CONFIG_SMP) && defined(SAL_MPINIT_WORKAROUND)
//
// work around SAL bug that sends all processors to monarch entry
//
- .global bootstrap_processor
-
- movl r21=24
- movl r20=16
mov r17=cr.lid
- movl r18=bootstrap_processor
+ movl r18=__cpu_physical_id
;;
- dep r18=0,r18,61,3 // convert bsp to physical address
+ dep r18=0,r18,61,3 // convert to physical address
;;
- shr r19=r17,r20
- shr r22=r17,r21
+ shr.u r17=r17,16
ld4 r18=[r18] // get the BSP ID
;;
- and r19=0xf, r19
- and r22=0xf, r22
- ;;
- shl r19=r19,8 // get them in the right order
- ;;
- or r22=r22,r19 // combine EID and LID
+ dep r17=0,r17,16,48
;;
- cmp.eq p6,p7=r22,r18 // Am I the BSP ?
-(p7) br.cond.spnt slave_init_spin_me
+ cmp4.ne p6,p0=r17,r18 // Am I the BSP ?
+(p6) br.cond.spnt slave_init_spin_me
;;
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/minstate.h linux/arch/ia64/kernel/minstate.h
--- v2.4.0-test9/linux/arch/ia64/kernel/minstate.h Thu Jun 22 07:09:44 2000
+++ linux/arch/ia64/kernel/minstate.h Mon Oct 9 17:54:54 2000
@@ -192,13 +192,3 @@
#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs,) STOPS
#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs, mov r15=r19) STOPS
#define SAVE_MIN DO_SAVE_MIN(mov rCRIFS=r0,) STOPS
-
-#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
-# define STOPS nop.i 0x0;; nop.i 0x0;; nop.i 0x0;;
-#else
-# define STOPS
-#endif
-
-#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs,) STOPS
-#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover;; mov rCRIFS=cr.ifs, mov r15=r19) STOPS
-#define SAVE_MIN DO_SAVE_MIN(mov rCRIFS=r0,) STOPS
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/pal.S linux/arch/ia64/kernel/pal.S
--- v2.4.0-test9/linux/arch/ia64/kernel/pal.S Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/pal.S Mon Oct 9 17:54:54 2000
@@ -54,7 +54,8 @@
*
* in0 Pointer to struct ia64_pal_retval
* in1 Index of PAL service
- * in2 - in4 Remaning PAL arguments
+ * in2 - in4 Remaining PAL arguments
+ * in5 1 ==> clear psr.ic, 0 ==> don't clear psr.ic
*
*/
GLOBAL_ENTRY(ia64_pal_call_static)
@@ -68,18 +69,22 @@
}
;;
ld8 loc2 = [loc2] // loc2 <- entry point
- mov r30 = in2
- mov r31 = in3
+ tbit.nz p6,p7 = in5, 0
+ adds r8 = 1f-1b,r8
;;
mov loc3 = psr
mov loc0 = rp
UNW(.body)
- adds r8 = 1f-1b,r8
- ;;
- rsm psr.i
+ mov r30 = in2
+
+(p6) rsm psr.i | psr.ic
+ mov r31 = in3
mov b7 = loc2
+
+(p7) rsm psr.i
+ ;;
+(p6) srlz.i
mov rp = r8
- ;;
br.cond.sptk.few b7
1: mov psr.l = loc3
mov ar.pfs = loc1
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/palinfo.c linux/arch/ia64/kernel/palinfo.c
--- v2.4.0-test9/linux/arch/ia64/kernel/palinfo.c Sun Aug 13 10:17:16 2000
+++ linux/arch/ia64/kernel/palinfo.c Fri Oct 13 12:05:29 2000
@@ -10,11 +10,11 @@
* Copyright (C) 2000 Stephane Eranian
*
* 05/26/2000 S.Eranian initial release
+ * 08/21/2000 S.Eranian updated to July 2000 PAL specs
*
* ISSUES:
- * - because of some PAL bugs, some calls return invalid results or
- * are empty for now.
- * - remove hack to avoid problem with <= 256M RAM for itr.
+ * - as of 2.2.9/2.2.12, the following values are still wrong
+ * PAL_VM_SUMMARY: key & rid sizes
*/
#include
#include
@@ -111,7 +111,7 @@
#define RSE_HINTS_COUNT (sizeof(rse_hints)/sizeof(const char *))
/*
- * The current revision of the Volume 2 of
+ * The current revision of the Volume 2 (July 2000) of
* IA-64 Architecture Software Developer's Manual is wrong.
* Table 4-10 has invalid information concerning the ma field:
* Correct table is:
@@ -132,38 +132,6 @@
"NaTPage" /* 111 */
};
-
-
-/*
- * Allocate a buffer suitable for calling PAL code in Virtual mode
- *
- * The documentation (PAL2.6) allows DTLB misses on the buffer. So
- * using the TC is enough, no need to pin the entry.
- *
- * We allocate a kernel-sized page (at least 4KB). This is enough to
- * hold any possible reply.
- */
-static inline void *
-get_palcall_buffer(void)
-{
- void *tmp;
-
- tmp = (void *)__get_free_page(GFP_KERNEL);
- if (tmp == 0) {
- printk(KERN_ERR __FUNCTION__" : can't get a buffer page\n");
- }
- return tmp;
-}
-
-/*
- * Free a palcall buffer allocated with the previous call
- */
-static inline void
-free_palcall_buffer(void *addr)
-{
- __free_page(addr);
-}
-
/*
* Take a 64bit vector and produces a string such that
* if bit n is set then 2^n in clear text is generated. The adjustment
@@ -243,17 +211,12 @@
{
s64 status;
char *p = page;
- pal_power_mgmt_info_u_t *halt_info;
+ u64 halt_info_buffer[8];
+ pal_power_mgmt_info_u_t *halt_info =(pal_power_mgmt_info_u_t *)halt_info_buffer;
int i;
- halt_info = get_palcall_buffer();
- if (halt_info == 0) return 0;
-
status = ia64_pal_halt_info(halt_info);
- if (status != 0) {
- free_palcall_buffer(halt_info);
- return 0;
- }
+ if (status != 0) return 0;
for (i=0; i < 8 ; i++ ) {
if (halt_info[i].pal_power_mgmt_info_s.im == 1) {
@@ -270,9 +233,6 @@
p += sprintf(p,"Power level %d: not implemented\n",i);
}
}
-
- free_palcall_buffer(halt_info);
-
return p - page;
}
@@ -502,7 +462,7 @@
"RSE load/store hints : %ld (%s)\n",
phys_stacked,
hints.ph_data,
- hints.ph_data < RSE_HINTS_COUNT ? rse_hints[hints.ph_data]: "(??)");
+ hints.ph_data < RSE_HINTS_COUNT ? rse_hints[hints.ph_data]: "(\?\?)");
if (ia64_pal_debug_info(&iregs, &dregs)) return 0;
@@ -569,7 +529,9 @@
"Enable Half Transfer",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ "Enable Cache Line Repl. Exclusive",
+ "Enable Cache Line Repl. Shared",
"Disable Transaction Queuing",
"Disable Reponse Error Checking",
"Disable Bus Error Checking",
@@ -673,16 +635,10 @@
perfmon_info(char *page)
{
char *p = page;
- u64 *pm_buffer;
+ u64 pm_buffer[16];
pal_perf_mon_info_u_t pm_info;
- pm_buffer = (u64 *)get_palcall_buffer();
- if (pm_buffer == 0) return 0;
-
- if (ia64_pal_perf_mon_info(pm_buffer, &pm_info) != 0) {
- free_palcall_buffer(pm_buffer);
- return 0;
- }
+ if (ia64_pal_perf_mon_info(pm_buffer, &pm_info) != 0) return 0;
#ifdef IA64_PAL_PERF_MON_INFO_BUG
/*
@@ -718,8 +674,6 @@
p = bitregister_process(p, pm_buffer+12, 256);
p += sprintf(p, "\n");
-
- free_palcall_buffer(pm_buffer);
return p - page;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/pci-dma.c linux/arch/ia64/kernel/pci-dma.c
--- v2.4.0-test9/linux/arch/ia64/kernel/pci-dma.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/pci-dma.c Mon Oct 9 17:54:54 2000
@@ -97,7 +97,8 @@
io_tlb_index = 0;
io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
- printk("Placing software IO TLB between 0x%p - 0x%p\n", io_tlb_start, io_tlb_end);
+ printk("Placing software IO TLB between 0x%p - 0x%p\n",
+ (void *) io_tlb_start, (void *) io_tlb_end);
}
/*
@@ -394,7 +395,7 @@
* Once the device is given the dma address, the device owns this memory
* until either pci_unmap_single or pci_dma_sync_single is performed.
*/
-extern inline dma_addr_t
+dma_addr_t
pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
if (direction == PCI_DMA_NONE)
@@ -410,7 +411,7 @@
* After this call, reads by the cpu to the buffer are guarenteed to see
* whatever the device wrote there.
*/
-extern inline void
+void
pci_unmap_single (struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
{
if (direction == PCI_DMA_NONE)
@@ -433,7 +434,7 @@
* Device ownership issues as mentioned above for pci_map_single are
* the same here.
*/
-extern inline int
+int
pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
{
if (direction == PCI_DMA_NONE)
@@ -446,7 +447,7 @@
* Again, cpu read rules concerning calls here are the same as for
* pci_unmap_single() above.
*/
-extern inline void
+void
pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
{
if (direction == PCI_DMA_NONE)
@@ -463,7 +464,7 @@
* next point you give the PCI dma address back to the card, the
* device again owns the buffer.
*/
-extern inline void
+void
pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction)
{
if (direction == PCI_DMA_NONE)
@@ -478,7 +479,7 @@
* The same as pci_dma_sync_single but for a scatter-gather list,
* same rules and usage.
*/
-extern inline void
+void
pci_dma_sync_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
{
if (direction == PCI_DMA_NONE)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/perfmon.c linux/arch/ia64/kernel/perfmon.c
--- v2.4.0-test9/linux/arch/ia64/kernel/perfmon.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/perfmon.c Mon Oct 9 17:54:54 2000
@@ -10,15 +10,19 @@
#include
#include
+#include
#include
#include
#include
+#include
+#include
#include
#include
#include
#include
#include
+#include
/* Long blurb on how this works:
* We set dcr.pp, psr.pp, and the appropriate pmc control values with
@@ -52,68 +56,107 @@
#ifdef CONFIG_PERFMON
#define MAX_PERF_COUNTER 4 /* true for Itanium, at least */
+#define PMU_FIRST_COUNTER 4 /* first generic counter */
+
#define WRITE_PMCS_AND_START 0xa0
#define WRITE_PMCS 0xa1
#define READ_PMDS 0xa2
#define STOP_PMCS 0xa3
-#define IA64_COUNTER_MASK 0xffffffffffffff6fL
-#define PERF_OVFL_VAL 0xffffffffL
-volatile int used_by_system;
-struct perfmon_counter {
- unsigned long data;
- unsigned long counter_num;
-};
+/*
+ * this structure needs to be enhanced
+ */
+typedef struct {
+ unsigned long pmu_reg_data; /* generic PMD register */
+ unsigned long pmu_reg_num; /* which register number */
+} perfmon_reg_t;
+
+/*
+ * This structure is initialize at boot time and contains
+ * a description of the PMU main characteristic as indicated
+ * by PAL
+ */
+typedef struct {
+ unsigned long perf_ovfl_val; /* overflow value for generic counters */
+ unsigned long max_pmc; /* highest PMC */
+ unsigned long max_pmd; /* highest PMD */
+ unsigned long max_counters; /* number of generic counter pairs (PMC/PMD) */
+} pmu_config_t;
+/* XXX will go static when ptrace() is cleaned */
+unsigned long perf_ovfl_val; /* overflow value for generic counters */
+
+static pmu_config_t pmu_conf;
+
+/*
+ * could optimize to avoid cache conflicts in SMP
+ */
unsigned long pmds[NR_CPUS][MAX_PERF_COUNTER];
asmlinkage unsigned long
-sys_perfmonctl (int cmd1, int cmd2, void *ptr)
+sys_perfmonctl (int cmd, int count, void *ptr, long arg4, long arg5, long arg6, long arg7, long arg8, long stack)
{
- struct perfmon_counter tmp, *cptr = ptr;
- unsigned long cnum, dcr, flags;
- struct perf_counter;
+ struct pt_regs *regs = (struct pt_regs *) &stack;
+ perfmon_reg_t tmp, *cptr = ptr;
+ unsigned long cnum;
int i;
- switch (cmd1) {
+ switch (cmd) {
case WRITE_PMCS: /* Writes to PMC's and clears PMDs */
case WRITE_PMCS_AND_START: /* Also starts counting */
- if (cmd2 <= 0 || cmd2 > MAX_PERF_COUNTER - used_by_system)
- return -EINVAL;
-
- if (!access_ok(VERIFY_READ, cptr, sizeof(struct perf_counter)*cmd2))
+ if (!access_ok(VERIFY_READ, cptr, sizeof(struct perfmon_reg_t)*count))
return -EFAULT;
- current->thread.flags |= IA64_THREAD_PM_VALID;
+ for (i = 0; i < count; i++, cptr++) {
- for (i = 0; i < cmd2; i++, cptr++) {
copy_from_user(&tmp, cptr, sizeof(tmp));
- /* XXX need to check validity of counter_num and perhaps data!! */
- if (tmp.counter_num < 4
- || tmp.counter_num >= 4 + MAX_PERF_COUNTER - used_by_system)
- return -EFAULT;
-
- ia64_set_pmc(tmp.counter_num, tmp.data);
- ia64_set_pmd(tmp.counter_num, 0);
- pmds[smp_processor_id()][tmp.counter_num - 4] = 0;
+
+ /* XXX need to check validity of pmu_reg_num and perhaps data!! */
+
+ if (tmp.pmu_reg_num > pmu_conf.max_pmc || tmp.pmu_reg_num == 0) return -EFAULT;
+
+ ia64_set_pmc(tmp.pmu_reg_num, tmp.pmu_reg_data);
+
+ /* to go away */
+ if (tmp.pmu_reg_num >= PMU_FIRST_COUNTER && tmp.pmu_reg_num < PMU_FIRST_COUNTER+pmu_conf.max_counters) {
+ ia64_set_pmd(tmp.pmu_reg_num, 0);
+ pmds[smp_processor_id()][tmp.pmu_reg_num - PMU_FIRST_COUNTER] = 0;
+
+ printk(__FUNCTION__" setting PMC/PMD[%ld] es=0x%lx pmd[%ld]=%lx\n", tmp.pmu_reg_num, (tmp.pmu_reg_data>>8) & 0x7f, tmp.pmu_reg_num, ia64_get_pmd(tmp.pmu_reg_num));
+ } else
+ printk(__FUNCTION__" setting PMC[%ld]=0x%lx\n", tmp.pmu_reg_num, tmp.pmu_reg_data);
}
- if (cmd1 == WRITE_PMCS_AND_START) {
+ if (cmd == WRITE_PMCS_AND_START) {
+#if 0
+/* irrelevant with user monitors */
local_irq_save(flags);
+
dcr = ia64_get_dcr();
dcr |= IA64_DCR_PP;
ia64_set_dcr(dcr);
+
local_irq_restore(flags);
+#endif
+
ia64_set_pmc(0, 0);
+
+ /* will start monitoring right after rfi */
+ ia64_psr(regs)->up = 1;
}
+ /*
+ * mark the state as valid.
+ * this will trigger save/restore at context switch
+ */
+ current->thread.flags |= IA64_THREAD_PM_VALID;
break;
case READ_PMDS:
- if (cmd2 <= 0 || cmd2 > MAX_PERF_COUNTER - used_by_system)
+ if (count <= 0 || count > MAX_PERF_COUNTER)
return -EINVAL;
- if (!access_ok(VERIFY_WRITE, cptr, sizeof(struct perf_counter)*cmd2))
+ if (!access_ok(VERIFY_WRITE, cptr, sizeof(struct perfmon_reg_t)*count))
return -EFAULT;
/* This looks shady, but IMHO this will work fine. This is
@@ -121,14 +164,15 @@
* with the interrupt handler. See explanation in the
* following comment.
*/
-
+#if 0
+/* irrelevant with user monitors */
local_irq_save(flags);
__asm__ __volatile__("rsm psr.pp\n");
dcr = ia64_get_dcr();
dcr &= ~IA64_DCR_PP;
ia64_set_dcr(dcr);
local_irq_restore(flags);
-
+#endif
/*
* We cannot write to pmc[0] to stop counting here, as
* that particular instruction might cause an overflow
@@ -142,36 +186,47 @@
* when we re-enabled interrupts. When I muck with dcr,
* is the irq_save/restore needed?
*/
- for (i = 0, cnum = 4;i < cmd2; i++, cnum++, cptr++) {
- tmp.data = (pmds[smp_processor_id()][i]
- + (ia64_get_pmd(cnum) & PERF_OVFL_VAL));
- tmp.counter_num = cnum;
- if (copy_to_user(cptr, &tmp, sizeof(tmp)))
- return -EFAULT;
- //put_user(pmd, &cptr->data);
+
+
+ /* XXX: This needs to change to read more than just the counters */
+ for (i = 0, cnum = PMU_FIRST_COUNTER;i < count; i++, cnum++, cptr++) {
+
+ tmp.pmu_reg_data = (pmds[smp_processor_id()][i]
+ + (ia64_get_pmd(cnum) & pmu_conf.perf_ovfl_val));
+
+ tmp.pmu_reg_num = cnum;
+
+ if (copy_to_user(cptr, &tmp, sizeof(tmp))) return -EFAULT;
}
+#if 0
+/* irrelevant with user monitors */
local_irq_save(flags);
__asm__ __volatile__("ssm psr.pp");
dcr = ia64_get_dcr();
dcr |= IA64_DCR_PP;
ia64_set_dcr(dcr);
local_irq_restore(flags);
+#endif
break;
case STOP_PMCS:
ia64_set_pmc(0, 1);
ia64_srlz_d();
- for (i = 0; i < MAX_PERF_COUNTER - used_by_system; ++i)
+ for (i = 0; i < MAX_PERF_COUNTER; ++i)
ia64_set_pmc(4+i, 0);
- if (!used_by_system) {
- local_irq_save(flags);
- dcr = ia64_get_dcr();
- dcr &= ~IA64_DCR_PP;
- ia64_set_dcr(dcr);
- local_irq_restore(flags);
- }
+#if 0
+/* irrelevant with user monitors */
+ local_irq_save(flags);
+ dcr = ia64_get_dcr();
+ dcr &= ~IA64_DCR_PP;
+ ia64_set_dcr(dcr);
+ local_irq_restore(flags);
+ ia64_psr(regs)->up = 0;
+#endif
+
current->thread.flags &= ~(IA64_THREAD_PM_VALID);
+
break;
default:
@@ -187,13 +242,21 @@
unsigned long mask, i, cnum, val;
mask = ia64_get_pmc(0) >> 4;
- for (i = 0, cnum = 4; i < MAX_PERF_COUNTER - used_by_system; cnum++, i++, mask >>= 1) {
- val = 0;
+ for (i = 0, cnum = PMU_FIRST_COUNTER ; i < pmu_conf.max_counters; cnum++, i++, mask >>= 1) {
+
+
+ val = mask & 0x1 ? pmu_conf.perf_ovfl_val + 1 : 0;
+
if (mask & 0x1)
- val += PERF_OVFL_VAL + 1;
+ printk(__FUNCTION__ " PMD%ld overflowed pmd=%lx pmod=%lx\n", cnum, ia64_get_pmd(cnum), pmds[smp_processor_id()][i]);
+
/* since we got an interrupt, might as well clear every pmd. */
- val += ia64_get_pmd(cnum) & PERF_OVFL_VAL;
+ val += ia64_get_pmd(cnum) & pmu_conf.perf_ovfl_val;
+
+ printk(__FUNCTION__ " adding val=%lx to pmod[%ld]=%lx \n", val, i, pmds[smp_processor_id()][i]);
+
pmds[smp_processor_id()][i] += val;
+
ia64_set_pmd(cnum, 0);
}
}
@@ -212,16 +275,69 @@
name: "perfmon"
};
-void
+static int
+perfmon_proc_info(char *page)
+{
+ char *p = page;
+ u64 pmc0 = ia64_get_pmc(0);
+
+ p += sprintf(p, "PMC[0]=%lx\n", pmc0);
+
+ return p - page;
+}
+
+static int
+perfmon_read_entry(char *page, char **start, off_t off, int count, int *eof, void *data)
+{
+ int len = perfmon_proc_info(page);
+
+ if (len <= off+count) *eof = 1;
+
+ *start = page + off;
+ len -= off;
+
+ if (len>count) len = count;
+ if (len<0) len = 0;
+
+ return len;
+}
+
+static struct proc_dir_entry *perfmon_dir;
+
+void __init
perfmon_init (void)
{
+ pal_perf_mon_info_u_t pm_info;
+ u64 pm_buffer[16];
+ s64 status;
+
irq_desc[PERFMON_IRQ].status |= IRQ_PER_CPU;
irq_desc[PERFMON_IRQ].handler = &irq_type_ia64_sapic;
setup_irq(PERFMON_IRQ, &perfmon_irqaction);
ia64_set_pmv(PERFMON_IRQ);
ia64_srlz_d();
- printk("Initialized perfmon vector to %u\n",PERFMON_IRQ);
+
+ printk("perfmon: Initialized vector to %u\n",PERFMON_IRQ);
+
+ if ((status=ia64_pal_perf_mon_info(pm_buffer, &pm_info)) != 0) {
+ printk(__FUNCTION__ " pal call failed (%ld)\n", status);
+ return;
+ }
+ pmu_conf.perf_ovfl_val = perf_ovfl_val = (1L << pm_info.pal_perf_mon_info_s.width) - 1;
+
+ /* XXX need to use PAL instead */
+ pmu_conf.max_pmc = 13;
+ pmu_conf.max_pmd = 17;
+ pmu_conf.max_counters = pm_info.pal_perf_mon_info_s.generic;
+
+ printk("perfmon: Counters are %d bits\n", pm_info.pal_perf_mon_info_s.width);
+ printk("perfmon: Maximum counter value 0x%lx\n", pmu_conf.perf_ovfl_val);
+
+ /*
+ * for now here for debug purposes
+ */
+ perfmon_dir = create_proc_read_entry ("perfmon", 0, 0, perfmon_read_entry, NULL);
}
void
@@ -238,10 +354,13 @@
ia64_set_pmc(0, 1);
ia64_srlz_d();
- for (i=0; i< IA64_NUM_PM_REGS - used_by_system ; i++) {
- t->pmd[i] = ia64_get_pmd(4+i);
+ /*
+ * XXX: this will need to be extended beyong just counters
+ */
+ for (i=0; i< IA64_NUM_PM_REGS; i++) {
+ t->pmd[i] = ia64_get_pmd(4+i);
t->pmod[i] = pmds[smp_processor_id()][i];
- t->pmc[i] = ia64_get_pmc(4+i);
+ t->pmc[i] = ia64_get_pmc(4+i);
}
}
@@ -250,7 +369,10 @@
{
int i;
- for (i=0; i< IA64_NUM_PM_REGS - used_by_system ; i++) {
+ /*
+ * XXX: this will need to be extended beyong just counters
+ */
+ for (i=0; i< IA64_NUM_PM_REGS ; i++) {
ia64_set_pmd(4+i, t->pmd[i]);
pmds[smp_processor_id()][i] = t->pmod[i];
ia64_set_pmc(4+i, t->pmc[i]);
@@ -262,7 +384,7 @@
#else /* !CONFIG_PERFMON */
asmlinkage unsigned long
-sys_perfmonctl (int cmd1, int cmd2, void *ptr)
+sys_perfmonctl (int cmd, int count, void *ptr)
{
return -ENOSYS;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/process.c linux/arch/ia64/kernel/process.c
--- v2.4.0-test9/linux/arch/ia64/kernel/process.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/process.c Mon Oct 9 17:54:54 2000
@@ -294,7 +294,8 @@
* call behavior where scratch registers are preserved across
* system calls (unless used by the system call itself).
*/
-# define THREAD_FLAGS_TO_CLEAR (IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID)
+# define THREAD_FLAGS_TO_CLEAR (IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID \
+ | IA64_THREAD_PM_VALID)
# define THREAD_FLAGS_TO_SET 0
p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR)
| THREAD_FLAGS_TO_SET);
@@ -333,6 +334,17 @@
if (ia64_peek(pt, current, addr, &val) == 0)
access_process_vm(current, addr, &val, sizeof(val), 1);
+ /*
+ * coredump format:
+ * r0-r31
+ * NaT bits (for r0-r31; bit N == 1 iff rN is a NaT)
+ * predicate registers (p0-p63)
+ * b0-b7
+ * ip cfm user-mask
+ * ar.rsc ar.bsp ar.bspstore ar.rnat
+ * ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec
+ */
+
/* r0 is zero */
for (i = 1, mask = (1UL << i); i < 32; ++i) {
unw_get_gr(info, i, &dst[i], &nat);
@@ -370,7 +382,6 @@
void
do_dump_fpu (struct unw_frame_info *info, void *arg)
{
- struct task_struct *fpu_owner = ia64_get_fpu_owner();
elf_fpreg_t *dst = arg;
int i;
@@ -384,10 +395,9 @@
for (i = 2; i < 32; ++i)
unw_get_fr(info, i, dst + i);
- if ((fpu_owner == current) || (current->thread.flags & IA64_THREAD_FPH_VALID)) {
- ia64_sync_fph(current);
+ ia64_flush_fph(current);
+ if ((current->thread.flags & IA64_THREAD_FPH_VALID) != 0)
memcpy(dst + 32, current->thread.fph, 96*16);
- }
}
#endif /* CONFIG_IA64_NEW_UNWIND */
@@ -463,7 +473,6 @@
unw_init_running(do_dump_fpu, dst);
#else
struct switch_stack *sw = ((struct switch_stack *) pt) - 1;
- struct task_struct *fpu_owner = ia64_get_fpu_owner();
memset(dst, 0, sizeof (dst)); /* don't leak any "random" bits */
@@ -472,12 +481,9 @@
dst[8] = pt->f8; dst[9] = pt->f9;
memcpy(dst + 10, &sw->f10, 22*16); /* f10-f31 are contiguous */
- if ((fpu_owner == current) || (current->thread.flags & IA64_THREAD_FPH_VALID)) {
- if (fpu_owner == current) {
- __ia64_save_fpu(current->thread.fph);
- }
+ ia64_flush_fph(current);
+ if ((current->thread.flags & IA64_THREAD_FPH_VALID) != 0)
memcpy(dst + 32, current->thread.fph, 96*16);
- }
#endif
return 1; /* f0-f31 are always valid so we always return 1 */
}
@@ -501,14 +507,14 @@
kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
{
struct task_struct *parent = current;
- int result;
+ int result, tid;
- clone(flags | CLONE_VM, 0);
+ tid = clone(flags | CLONE_VM, 0);
if (parent != current) {
result = (*fn)(arg);
_exit(result);
}
- return 0; /* parent: just return */
+ return tid;
}
/*
@@ -520,9 +526,10 @@
/* drop floating-point and debug-register state if it exists: */
current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
- if (ia64_get_fpu_owner() == current) {
+#ifndef CONFIG_SMP
+ if (ia64_get_fpu_owner() == current)
ia64_set_fpu_owner(0);
- }
+#endif
}
/*
@@ -532,9 +539,28 @@
void
exit_thread (void)
{
- if (ia64_get_fpu_owner() == current) {
+#ifndef CONFIG_SMP
+ if (ia64_get_fpu_owner() == current)
ia64_set_fpu_owner(0);
+#endif
+#ifdef CONFIG_PERFMON
+ /* stop monitoring */
+ if ((current->thread.flags & IA64_THREAD_PM_VALID) != 0) {
+ /*
+ * we cannot rely on switch_to() to save the PMU
+ * context for the last time. There is a possible race
+ * condition in SMP mode between the child and the
+ * parent. by explicitly saving the PMU context here
+ * we garantee no race. this call we also stop
+ * monitoring
+ */
+ ia64_save_pm_regs(¤t->thread);
+ /*
+ * make sure that switch_to() will not save context again
+ */
+ current->thread.flags &= ~IA64_THREAD_PM_VALID;
}
+#endif
}
unsigned long
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/ptrace.c linux/arch/ia64/kernel/ptrace.c
--- v2.4.0-test9/linux/arch/ia64/kernel/ptrace.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/ptrace.c Mon Oct 9 17:54:54 2000
@@ -376,7 +376,8 @@
ret = 0;
} else {
if ((unsigned long) laddr >= (unsigned long) high_memory) {
- printk("yikes: trying to access long at %p\n", laddr);
+ printk("yikes: trying to access long at %p\n",
+ (void *) laddr);
return -EIO;
}
ret = *laddr;
@@ -543,21 +544,48 @@
}
/*
- * Ensure the state in child->thread.fph is up-to-date.
+ * Write f32-f127 back to task->thread.fph if it has been modified.
*/
-void
-ia64_sync_fph (struct task_struct *child)
+inline void
+ia64_flush_fph (struct task_struct *task)
{
- if (ia64_psr(ia64_task_regs(child))->mfh && ia64_get_fpu_owner() == child) {
- ia64_psr(ia64_task_regs(child))->mfh = 0;
- ia64_set_fpu_owner(0);
- ia64_save_fpu(&child->thread.fph[0]);
- child->thread.flags |= IA64_THREAD_FPH_VALID;
+ struct ia64_psr *psr = ia64_psr(ia64_task_regs(task));
+#ifdef CONFIG_SMP
+ struct task_struct *fpu_owner = current;
+#else
+ struct task_struct *fpu_owner = ia64_get_fpu_owner();
+#endif
+
+ if (task == fpu_owner && psr->mfh) {
+ psr->mfh = 0;
+ ia64_save_fpu(&task->thread.fph[0]);
+ task->thread.flags |= IA64_THREAD_FPH_VALID;
}
- if (!(child->thread.flags & IA64_THREAD_FPH_VALID)) {
- memset(&child->thread.fph, 0, sizeof(child->thread.fph));
- child->thread.flags |= IA64_THREAD_FPH_VALID;
+}
+
+/*
+ * Sync the fph state of the task so that it can be manipulated
+ * through thread.fph. If necessary, f32-f127 are written back to
+ * thread.fph or, if the fph state hasn't been used before, thread.fph
+ * is cleared to zeroes. Also, access to f32-f127 is disabled to
+ * ensure that the task picks up the state from thread.fph when it
+ * executes again.
+ */
+void
+ia64_sync_fph (struct task_struct *task)
+{
+ struct ia64_psr *psr = ia64_psr(ia64_task_regs(task));
+
+ ia64_flush_fph(task);
+ if (!(task->thread.flags & IA64_THREAD_FPH_VALID)) {
+ task->thread.flags |= IA64_THREAD_FPH_VALID;
+ memset(&task->thread.fph, 0, sizeof(task->thread.fph));
}
+#ifndef CONFIG_SMP
+ if (ia64_get_fpu_owner() == task)
+ ia64_set_fpu_owner(0);
+#endif
+ psr->dfh = 1;
}
#ifdef CONFIG_IA64_NEW_UNWIND
@@ -589,6 +617,7 @@
struct switch_stack *sw;
struct unw_frame_info info;
struct pt_regs *pt;
+ unsigned long pmd_tmp;
pt = ia64_task_regs(child);
sw = (struct switch_stack *) (child->thread.ksp + 16);
@@ -600,7 +629,10 @@
if (addr < PT_F127 + 16) {
/* accessing fph */
- ia64_sync_fph(child);
+ if (write_access)
+ ia64_sync_fph(child);
+ else
+ ia64_flush_fph(child);
ptr = (unsigned long *) ((unsigned long) &child->thread.fph + addr);
} else if (addr >= PT_F10 && addr < PT_F15 + 16) {
/* scratch registers untouched by kernel (saved in switch_stack) */
@@ -656,6 +688,9 @@
case PT_B1: case PT_B2: case PT_B3: case PT_B4: case PT_B5:
return unw_access_br(&info, (addr - PT_B1)/8 + 1, data, write_access);
+ case PT_AR_EC:
+ return unw_access_ar(&info, UNW_AR_EC, data, write_access);
+
case PT_AR_LC:
return unw_access_ar(&info, UNW_AR_LC, data, write_access);
@@ -759,7 +794,11 @@
addr);
return -1;
}
- } else {
+ } else
+#ifdef CONFIG_PERFMON
+ if (addr < PT_PMD)
+#endif
+ {
/* access debug registers */
if (!(child->thread.flags & IA64_THREAD_DBG_VALID)) {
@@ -782,6 +821,32 @@
ptr += regnum;
}
+#ifdef CONFIG_PERFMON
+ else {
+ /*
+ * XXX: will eventually move back to perfmonctl()
+ */
+ unsigned long pmd = (addr - PT_PMD) >> 3;
+ extern unsigned long perf_ovfl_val;
+
+ /* we just use ptrace to read */
+ if (write_access) return -1;
+
+ if (pmd > 3) {
+ printk("ptrace: rejecting access to PMD[%ld] address 0x%lx\n", pmd, addr);
+ return -1;
+ }
+
+ /*
+ * We always need to mask upper 32bits of pmd because value is random
+ */
+ pmd_tmp = child->thread.pmod[pmd]+(child->thread.pmd[pmd]& perf_ovfl_val);
+
+ /*printk(__FUNCTION__" child=%d reading pmd[%ld]=%lx\n", child->pid, pmd, pmd_tmp);*/
+
+ ptr = &pmd_tmp;
+ }
+#endif
if (write_access)
*ptr = *data;
else
@@ -794,8 +859,9 @@
static int
access_uarea (struct task_struct *child, unsigned long addr, unsigned long *data, int write_access)
{
- unsigned long *ptr, *rbs, *bspstore, ndirty, regnum;
+ unsigned long *ptr = NULL, *rbs, *bspstore, ndirty, regnum;
struct switch_stack *sw;
+ unsigned long pmd_tmp;
struct pt_regs *pt;
if ((addr & 0x7) != 0)
@@ -803,7 +869,10 @@
if (addr < PT_F127+16) {
/* accessing fph */
- ia64_sync_fph(child);
+ if (write_access)
+ ia64_sync_fph(child);
+ else
+ ia64_flush_fph(child);
ptr = (unsigned long *) ((unsigned long) &child->thread.fph + addr);
} else if (addr < PT_F9+16) {
/* accessing switch_stack or pt_regs: */
@@ -864,6 +933,14 @@
*data = (pt->cr_ipsr & IPSR_READ_MASK);
return 0;
+ case PT_AR_EC:
+ if (write_access)
+ sw->ar_pfs = (((*data & 0x3f) << 52)
+ | (sw->ar_pfs & ~(0x3fUL << 52)));
+ else
+ *data = (sw->ar_pfs >> 52) & 0x3f;
+ break;
+
case PT_R1: case PT_R2: case PT_R3:
case PT_R4: case PT_R5: case PT_R6: case PT_R7:
case PT_R8: case PT_R9: case PT_R10: case PT_R11:
@@ -900,7 +977,12 @@
/* disallow accessing anything else... */
return -1;
}
- } else {
+ } else
+#ifdef CONFIG_PERFMON
+ if (addr < PT_PMD)
+#endif
+ {
+
/* access debug registers */
if (!(child->thread.flags & IA64_THREAD_DBG_VALID)) {
@@ -921,6 +1003,33 @@
ptr += regnum;
}
+#ifdef CONFIG_PERFMON
+ else {
+ /*
+ * XXX: will eventually move back to perfmonctl()
+ */
+ unsigned long pmd = (addr - PT_PMD) >> 3;
+ extern unsigned long perf_ovfl_val;
+
+ /* we just use ptrace to read */
+ if (write_access) return -1;
+
+ if (pmd > 3) {
+ printk("ptrace: rejecting access to PMD[%ld] address 0x%lx\n", pmd, addr);
+ return -1;
+ }
+
+ /*
+ * We always need to mask upper 32bits of pmd because value is random
+ */
+ pmd_tmp = child->thread.pmod[pmd]+(child->thread.pmd[pmd]& perf_ovfl_val);
+
+ /*printk(__FUNCTION__" child=%d reading pmd[%ld]=%lx\n", child->pid, pmd, pmd_tmp);*/
+
+ ptr = &pmd_tmp;
+ }
+#endif
+
if (write_access)
*ptr = *data;
else
@@ -996,10 +1105,12 @@
ret = -ESRCH;
if (!(child->ptrace & PT_PTRACED))
goto out_tsk;
+
if (child->state != TASK_STOPPED) {
- if (request != PTRACE_KILL)
+ if (request != PTRACE_KILL && request != PTRACE_PEEKUSR)
goto out_tsk;
}
+
if (child->p_pptr != current)
goto out_tsk;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/sal.c linux/arch/ia64/kernel/sal.c
--- v2.4.0-test9/linux/arch/ia64/kernel/sal.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/sal.c Mon Oct 9 17:54:54 2000
@@ -34,6 +34,7 @@
}
ia64_sal_handler ia64_sal = (ia64_sal_handler) default_handler;
+ia64_sal_desc_ptc_t *ia64_ptc_domain_info;
const char *
ia64_sal_strerror (long status)
@@ -125,6 +126,10 @@
#endif
ia64_pal_handler_init(__va(ep->pal_proc));
ia64_sal_handler_init(__va(ep->sal_proc), __va(ep->gp));
+ break;
+
+ case SAL_DESC_PTC:
+ ia64_ptc_domain_info = (ia64_sal_desc_ptc_t *)p;
break;
case SAL_DESC_AP_WAKEUP:
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/semaphore.c linux/arch/ia64/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/ia64/kernel/semaphore.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -7,9 +7,9 @@
/*
* Semaphores are implemented using a two-way counter: The "count"
- * variable is decremented for each process that tries to aquire the
+ * variable is decremented for each process that tries to acquire the
* semaphore, while the "sleepers" variable is a count of such
- * aquires.
+ * acquires.
*
* Notably, the inline "up()" and "down()" functions can efficiently
* test if they need to do any extra work (up needs to do something
@@ -188,7 +188,7 @@
}
/*
- * This gets called if we failed to aquire the lock and we are not
+ * This gets called if we failed to acquire the lock and we are not
* biased to acquire the lock. We undo the decrement that was
* done earlier, go to sleep, and then attempt to re-acquire the
* lock afterwards.
@@ -279,7 +279,7 @@
while (sem->count < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (sem->count >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/setup.c linux/arch/ia64/kernel/setup.c
--- v2.4.0-test9/linux/arch/ia64/kernel/setup.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/setup.c Mon Oct 9 17:54:55 2000
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#ifdef CONFIG_BLK_DEV_RAM
# include
@@ -43,7 +44,7 @@
extern char _end;
-/* cpu_data[bootstrap_processor] is data for the bootstrap processor: */
+/* cpu_data[0] is data for the bootstrap processor: */
struct cpuinfo_ia64 cpu_data[NR_CPUS];
unsigned long ia64_cycles_per_usec;
@@ -56,6 +57,8 @@
volatile unsigned long cpu_online_map;
#endif
+unsigned long ia64_iobase; /* virtual address for I/O accesses */
+
#define COMMAND_LINE_SIZE 512
char saved_command_line[COMMAND_LINE_SIZE]; /* used in proc filesystem */
@@ -111,6 +114,7 @@
void __init
setup_arch (char **cmdline_p)
{
+ extern unsigned long ia64_iobase;
unsigned long max_pfn, bootmap_start, bootmap_size;
unw_init();
@@ -157,7 +161,7 @@
if (initrd_start >= PAGE_OFFSET)
printk("Warning: boot loader passed virtual address "
"for initrd, please upgrade the loader\n");
- } else
+ else
#endif
/*
* The loader ONLY passes physical addresses
@@ -215,9 +219,16 @@
ia64_sal_init(efi.sal_systab);
#ifdef CONFIG_SMP
- bootstrap_processor = hard_smp_processor_id();
- current->processor = bootstrap_processor;
+ current->processor = 0;
+ cpu_physical_id(0) = hard_smp_processor_id();
#endif
+ /*
+ * Set `iobase' to the appropriate address in region 6
+ * (uncached access range)
+ */
+ __asm__ ("mov %0=ar.k0;;" : "=r"(ia64_iobase));
+ ia64_iobase = __IA64_UNCACHED_OFFSET | (ia64_iobase & ~PAGE_OFFSET);
+
cpu_init(); /* initialize the bootstrap CPU */
#ifdef CONFIG_IA64_GENERIC
@@ -259,6 +270,11 @@
int
get_cpuinfo (char *buffer)
{
+#ifdef CONFIG_SMP
+# define lps c->loops_per_sec
+#else
+# define lps loops_per_sec
+#endif
char family[32], model[32], features[128], *cp, *p = buffer;
struct cpuinfo_ia64 *c;
unsigned long mask;
@@ -309,7 +325,7 @@
features,
c->ppn, c->number, c->proc_freq / 1000000, c->proc_freq % 1000000,
c->itc_freq / 1000000, c->itc_freq % 1000000,
- loops_per_sec() / 500000, (loops_per_sec() / 5000) % 100);
+ lps / 500000, (lps / 5000) % 100);
}
return p - buffer;
}
@@ -371,8 +387,8 @@
#endif
phys_addr_size = vm1.pal_vm_info_1_s.phys_add_size;
}
- printk("processor implements %lu virtual and %lu physical address bits\n",
- impl_va_msb + 1, phys_addr_size);
+ printk("CPU %d: %lu virtual and %lu physical address bits\n",
+ smp_processor_id(), impl_va_msb + 1, phys_addr_size);
c->unimpl_va_mask = ~((7L<<61) | ((1L << (impl_va_msb + 1)) - 1));
c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1));
@@ -405,9 +421,12 @@
* do NOT defer TLB misses, page-not-present, access bit, or
* debug faults but kernel code should not rely on any
* particular setting of these bits.
- */
ia64_set_dcr(IA64_DCR_DR | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_PP);
+ */
+ ia64_set_dcr(IA64_DCR_DR | IA64_DCR_DK | IA64_DCR_DX );
+#ifndef CONFIG_SMP
ia64_set_fpu_owner(0); /* initialize ar.k5 */
+#endif
atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/signal.c linux/arch/ia64/kernel/signal.c
--- v2.4.0-test9/linux/arch/ia64/kernel/signal.c Sun Sep 3 11:53:58 2000
+++ linux/arch/ia64/kernel/signal.c Mon Oct 9 17:54:55 2000
@@ -147,11 +147,12 @@
ia64_put_nat_bits(&scr->pt, &scr->sw, nat); /* restore the original scratch NaT bits */
#endif
- if (flags & IA64_SC_FLAG_FPH_VALID) {
- struct task_struct *fpu_owner = ia64_get_fpu_owner();
+ if ((flags & IA64_SC_FLAG_FPH_VALID) != 0) {
+ struct ia64_psr *psr = ia64_psr(&scr->pt);
__copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16);
- if (fpu_owner == current) {
+ if (!psr->dfh) {
+ psr->mfh = 0;
__ia64_load_fpu(current->thread.fph);
}
}
@@ -235,9 +236,12 @@
goto give_sigsegv;
sigdelsetmask(&set, ~_BLOCKABLE);
+
spin_lock_irq(¤t->sigmask_lock);
- current->blocked = set;
- recalc_sigpending(current);
+ {
+ current->blocked = set;
+ recalc_sigpending(current);
+ }
spin_unlock_irq(¤t->sigmask_lock);
if (restore_sigcontext(sc, scr))
@@ -274,7 +278,6 @@
static long
setup_sigcontext (struct sigcontext *sc, sigset_t *mask, struct sigscratch *scr)
{
- struct task_struct *fpu_owner = ia64_get_fpu_owner();
unsigned long flags = 0, ifs, nat;
long err;
@@ -286,11 +289,9 @@
/* if cr_ifs isn't valid, we got here through a syscall */
flags |= IA64_SC_FLAG_IN_SYSCALL;
}
- if ((fpu_owner == current) || (current->thread.flags & IA64_THREAD_FPH_VALID)) {
+ ia64_flush_fph(current);
+ if ((current->thread.flags & IA64_THREAD_FPH_VALID)) {
flags |= IA64_SC_FLAG_FPH_VALID;
- if (fpu_owner == current) {
- __ia64_save_fpu(current->thread.fph);
- }
__copy_to_user(&sc->sc_fr[32], current->thread.fph, 96*16);
}
@@ -425,9 +426,11 @@
if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(¤t->sigmask_lock);
- sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask);
- sigaddset(¤t->blocked, sig);
- recalc_sigpending(current);
+ {
+ sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask);
+ sigaddset(¤t->blocked, sig);
+ recalc_sigpending(current);
+ }
spin_unlock_irq(¤t->sigmask_lock);
}
return 1;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/smp.c linux/arch/ia64/kernel/smp.c
--- v2.4.0-test9/linux/arch/ia64/kernel/smp.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/smp.c Mon Oct 9 17:54:55 2000
@@ -6,6 +6,8 @@
*
* Lots of stuff stolen from arch/alpha/kernel/smp.c
*
+ * 00/09/11 David Mosberger Do loops_per_sec calibration on each CPU.
+ * 00/08/23 Asit Mallick fixed logical processor id
* 00/03/31 Rohit Seth Fixes for Bootstrap Processor & cpu_online_map
* now gets done here (instead of setup.c)
* 99/10/05 davidm Update to bring it in sync with new command-line processing scheme.
@@ -27,6 +29,7 @@
#include
#include
#include
+#include
#include
#include
@@ -39,27 +42,31 @@
#include
#include
+extern void __init calibrate_delay(void);
extern int cpu_idle(void * unused);
-extern void _start(void);
extern void machine_halt(void);
+extern void start_ap(void);
extern int cpu_now_booting; /* Used by head.S to find idle task */
extern volatile unsigned long cpu_online_map; /* Bitmap of available cpu's */
extern struct cpuinfo_ia64 cpu_data[NR_CPUS]; /* Duh... */
+struct smp_boot_data smp_boot_data __initdata;
+
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
-struct smp_boot_data __initdata smp;
-char __initdata no_int_routing = 0;
+char __initdata no_int_routing;
unsigned char smp_int_redirect; /* are INT and IPI redirectable by the chipset? */
-volatile int __cpu_number_map[NR_CPUS] = { -1, }; /* SAPIC ID -> Logical ID */
-volatile int __cpu_logical_map[NR_CPUS] = { -1, }; /* logical ID -> SAPIC ID */
+volatile int __cpu_physical_id[NR_CPUS] = { -1, }; /* Logical ID -> SAPIC ID */
int smp_num_cpus = 1;
-int bootstrap_processor = -1; /* SAPIC ID of BSP */
-int smp_threads_ready = 0; /* Set when the idlers are all forked */
-cycles_t cacheflush_time = 0;
+volatile int smp_threads_ready; /* Set when the idlers are all forked */
+cycles_t cacheflush_time;
unsigned long ap_wakeup_vector = -1; /* External Int to use to wakeup AP's */
+
+static volatile unsigned long cpu_callin_map;
+static volatile int smp_commenced;
+
static int max_cpus = -1; /* Command line */
static unsigned long ipi_op[NR_CPUS];
struct smp_call_struct {
@@ -135,6 +142,7 @@
static inline int
pointer_lock(void *lock, void *data, int retry)
{
+ volatile long *ptr = lock;
again:
if (cmpxchg_acq((void **) lock, 0, data) == 0)
return 0;
@@ -142,7 +150,7 @@
if (!retry)
return -EBUSY;
- while (*(void **) lock)
+ while (*ptr)
;
goto again;
@@ -275,12 +283,10 @@
send_IPI_allbutself(int op)
{
int i;
- int cpu_id = 0;
for (i = 0; i < smp_num_cpus; i++) {
- cpu_id = __cpu_logical_map[i];
- if (cpu_id != smp_processor_id())
- send_IPI_single(cpu_id, op);
+ if (i != smp_processor_id())
+ send_IPI_single(i, op);
}
}
@@ -290,7 +296,7 @@
int i;
for (i = 0; i < smp_num_cpus; i++)
- send_IPI_single(__cpu_logical_map[i], op);
+ send_IPI_single(i, op);
}
static inline void
@@ -335,7 +341,7 @@
smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int retry, int wait)
{
struct smp_call_struct data;
- long timeout;
+ unsigned long timeout;
int cpus = 1;
if (cpuid == smp_processor_id()) {
@@ -387,7 +393,7 @@
smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
{
struct smp_call_struct data;
- long timeout;
+ unsigned long timeout;
int cpus = smp_num_cpus - 1;
if (cpus == 0)
@@ -453,80 +459,16 @@
if (--data->prof_counter <= 0) {
data->prof_counter = data->prof_multiplier;
- /*
- * update_process_times() expects us to have done irq_enter().
- * Besides, if we don't timer interrupts ignore the global
- * interrupt lock, which is the WrongThing (tm) to do.
- */
- irq_enter(cpu, 0);
update_process_times(user);
- irq_exit(cpu, 0);
}
}
-static inline void __init
-smp_calibrate_delay(int cpuid)
-{
- struct cpuinfo_ia64 *c = &cpu_data[cpuid];
-#if 0
- unsigned long old = loops_per_sec;
- extern void calibrate_delay(void);
-
- loops_per_sec = 0;
- calibrate_delay();
- c->loops_per_sec = loops_per_sec;
- loops_per_sec = old;
-#else
- c->loops_per_sec = loops_per_sec;
-#endif
-}
-
-/*
- * SAL shoves the AP's here when we start them. Physical mode, no kernel TR,
- * no RRs set, better than even chance that psr is bogus. Fix all that and
- * call _start. In effect, pretend to be lilo.
- *
- * Stolen from lilo_start.c. Thanks David!
- */
-void
-start_ap(void)
-{
- unsigned long flags;
-
- /*
- * Install a translation register that identity maps the
- * kernel's 256MB page(s).
- */
- ia64_clear_ic(flags);
- ia64_set_rr( 0, (0x1000 << 8) | (_PAGE_SIZE_1M << 2));
- ia64_set_rr(PAGE_OFFSET, (ia64_rid(0, PAGE_OFFSET) << 8) | (_PAGE_SIZE_256M << 2));
- ia64_srlz_d();
- ia64_itr(0x3, 1, PAGE_OFFSET,
- pte_val(mk_pte_phys(0, __pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RWX))),
- _PAGE_SIZE_256M);
- ia64_srlz_i();
-
- flags = (IA64_PSR_IT | IA64_PSR_IC | IA64_PSR_DT | IA64_PSR_RT | IA64_PSR_DFH |
- IA64_PSR_BN);
-
- asm volatile ("movl r8 = 1f\n"
- ";;\n"
- "mov cr.ipsr=%0\n"
- "mov cr.iip=r8\n"
- "mov cr.ifs=r0\n"
- ";;\n"
- "rfi;;"
- "1:\n"
- "movl r1 = __gp" :: "r"(flags) : "r8");
- _start();
-}
-
/*
* AP's start using C here.
*/
void __init
-smp_callin(void)
+smp_callin (void)
{
extern void ia64_rid_init(void);
extern void ia64_init_itm(void);
@@ -534,12 +476,17 @@
#ifdef CONFIG_PERFMON
extern void perfmon_init_percpu(void);
#endif
+ int cpu = smp_processor_id();
- efi_map_pal_code();
+ if (test_and_set_bit(cpu, &cpu_online_map)) {
+ printk("CPU#%d already initialized!\n", cpu);
+ machine_halt();
+ }
+ efi_map_pal_code();
cpu_init();
- smp_setup_percpu_timer(smp_processor_id());
+ smp_setup_percpu_timer(cpu);
/* setup the CPU local timer tick */
ia64_init_itm();
@@ -552,16 +499,16 @@
ia64_set_lrr0(0, 1);
ia64_set_lrr1(0, 1);
- if (test_and_set_bit(smp_processor_id(), &cpu_online_map)) {
- printk("CPU#%d already initialized!\n", smp_processor_id());
- machine_halt();
- }
- while (!smp_threads_ready)
- mb();
-
local_irq_enable(); /* Interrupts have been off until now */
- smp_calibrate_delay(smp_processor_id());
- printk("SMP: CPU %d starting idle loop\n", smp_processor_id());
+
+ calibrate_delay();
+ my_cpu_data.loops_per_sec = loops_per_sec;
+
+ /* allow the master to continue */
+ set_bit(cpu, &cpu_callin_map);
+
+ /* finally, wait for the BP to finish initialization: */
+ while (!smp_commenced);
cpu_idle(NULL);
}
@@ -583,14 +530,13 @@
}
/*
- * Bring one cpu online.
- *
- * NB: cpuid is the CPU BUS-LOCAL ID, not the entire SAPIC ID. See asm/smp.h.
+ * Bring one cpu online. Return 0 if this fails for any reason.
*/
static int __init
-smp_boot_one_cpu(int cpuid, int cpunum)
+smp_boot_one_cpu(int cpu)
{
struct task_struct *idle;
+ int cpu_phys_id = cpu_physical_id(cpu);
long timeout;
/*
@@ -603,50 +549,37 @@
* Sheesh . . .
*/
if (fork_by_hand() < 0)
- panic("failed fork for CPU %d", cpuid);
+ panic("failed fork for CPU 0x%x", cpu_phys_id);
/*
* We remove it from the pidhash and the runqueue
* once we got the process:
*/
idle = init_task.prev_task;
if (!idle)
- panic("No idle process for CPU %d", cpuid);
- init_tasks[cpunum] = idle;
+ panic("No idle process for CPU 0x%x", cpu_phys_id);
+ init_tasks[cpu] = idle;
del_from_runqueue(idle);
unhash_process(idle);
/* Schedule the first task manually. */
- idle->processor = cpuid;
+ idle->processor = cpu;
idle->has_cpu = 1;
/* Let _start know what logical CPU we're booting (offset into init_tasks[] */
- cpu_now_booting = cpunum;
-
+ cpu_now_booting = cpu;
+
/* Kick the AP in the butt */
- ipi_send(cpuid, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
- ia64_srlz_i();
- mb();
+ ipi_send(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
- /*
- * OK, wait a bit for that CPU to finish staggering about. smp_callin() will
- * call cpu_init() which will set a bit for this AP. When that bit flips, the AP
- * is waiting for smp_threads_ready to be 1 and we can move on.
- */
+ /* wait up to 10s for the AP to start */
for (timeout = 0; timeout < 100000; timeout++) {
- if (test_bit(cpuid, &cpu_online_map))
- goto alive;
+ if (test_bit(cpu, &cpu_callin_map))
+ return 1;
udelay(100);
- barrier();
}
- printk(KERN_ERR "SMP: Processor %d is stuck.\n", cpuid);
+ printk(KERN_ERR "SMP: Processor 0x%x is stuck.\n", cpu_phys_id);
return 0;
-
-alive:
- /* Remember the AP data */
- __cpu_number_map[cpuid] = cpunum;
- __cpu_logical_map[cpunum] = cpuid;
- return 1;
}
@@ -663,21 +596,20 @@
unsigned long bogosum;
/* Take care of some initial bookkeeping. */
- memset(&__cpu_number_map, -1, sizeof(__cpu_number_map));
- memset(&__cpu_logical_map, -1, sizeof(__cpu_logical_map));
+ memset(&__cpu_physical_id, -1, sizeof(__cpu_physical_id));
memset(&ipi_op, 0, sizeof(ipi_op));
- /* Setup BSP mappings */
- __cpu_number_map[bootstrap_processor] = 0;
- __cpu_logical_map[0] = bootstrap_processor;
+ /* Setup BP mappings */
+ __cpu_physical_id[0] = hard_smp_processor_id();
- smp_calibrate_delay(smp_processor_id());
+ /* on the BP, the kernel already called calibrate_delay_loop() in init/main.c */
+ my_cpu_data.loops_per_sec = loops_per_sec;
#if 0
smp_tune_scheduling();
#endif
- smp_setup_percpu_timer(bootstrap_processor);
+ smp_setup_percpu_timer(0);
- if (test_and_set_bit(bootstrap_processor, &cpu_online_map)) {
+ if (test_and_set_bit(0, &cpu_online_map)) {
printk("CPU#%d already initialized!\n", smp_processor_id());
machine_halt();
}
@@ -692,16 +624,18 @@
if (max_cpus != -1)
printk("Limiting CPUs to %d\n", max_cpus);
- if (smp.cpu_count > 1) {
+ if (smp_boot_data.cpu_count > 1) {
printk(KERN_INFO "SMP: starting up secondaries.\n");
- for (i = 0; i < NR_CPUS; i++) {
- if (smp.cpu_map[i] == -1 ||
- smp.cpu_map[i] == bootstrap_processor)
+ for (i = 0; i < smp_boot_data.cpu_count; i++) {
+ /* skip performance restricted and bootstrap cpu: */
+ if (smp_boot_data.cpu_phys_id[i] == -1
+ || smp_boot_data.cpu_phys_id[i] == hard_smp_processor_id())
continue;
- if (smp_boot_one_cpu(smp.cpu_map[i], cpu_count) == 0)
- continue;
+ cpu_physical_id(cpu_count) = smp_boot_data.cpu_phys_id[i];
+ if (!smp_boot_one_cpu(cpu_count))
+ continue; /* failed */
cpu_count++; /* Count good CPUs only... */
/*
@@ -731,20 +665,12 @@
}
/*
- * Called from main.c by each AP.
+ * Called when the BP is just about to fire off init.
*/
void __init
smp_commence(void)
{
- mb();
-}
-
-/*
- * Not used; part of the i386 bringup
- */
-void __init
-initialize_secondary(void)
-{
+ smp_commenced = 1;
}
int __init
@@ -759,9 +685,7 @@
*
* Setup of the IPI irq handler is done in irq.c:init_IRQ_SMP().
*
- * So this just gets the BSP SAPIC ID and print's it out. Dull, huh?
- *
- * Not anymore. This also registers the AP OS_MC_REDVEZ address with SAL.
+ * This also registers the AP OS_MC_REDVEZ address with SAL.
*/
void __init
init_smp_config(void)
@@ -771,9 +695,6 @@
unsigned long gp;
} *ap_startup;
long sal_ret;
-
- /* Grab the BSP ID */
- bootstrap_processor = hard_smp_processor_id();
/* Tell SAL where to drop the AP's. */
ap_startup = (struct fptr *) start_ap;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/smpboot.c linux/arch/ia64/kernel/smpboot.c
--- v2.4.0-test9/linux/arch/ia64/kernel/smpboot.c Fri Apr 21 15:21:24 2000
+++ linux/arch/ia64/kernel/smpboot.c Fri Oct 13 12:05:29 2000
@@ -1,2 +1,74 @@
-unsigned long cpu_online_map;
+/*
+ * SMP Support
+ *
+ * Application processor startup code, moved from smp.c to better support kernel profile
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * SAL shoves the AP's here when we start them. Physical mode, no kernel TR,
+ * no RRs set, better than even chance that psr is bogus. Fix all that and
+ * call _start. In effect, pretend to be lilo.
+ *
+ * Stolen from lilo_start.c. Thanks David!
+ */
+void
+start_ap(void)
+{
+ extern void _start (void);
+ unsigned long flags;
+
+ /*
+ * Install a translation register that identity maps the
+ * kernel's 256MB page(s).
+ */
+ ia64_clear_ic(flags);
+ ia64_set_rr( 0, (0x1000 << 8) | (_PAGE_SIZE_1M << 2));
+ ia64_set_rr(PAGE_OFFSET, (ia64_rid(0, PAGE_OFFSET) << 8) | (_PAGE_SIZE_256M << 2));
+ ia64_srlz_d();
+ ia64_itr(0x3, 1, PAGE_OFFSET,
+ pte_val(mk_pte_phys(0, __pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RWX))),
+ _PAGE_SIZE_256M);
+ ia64_srlz_i();
+
+ flags = (IA64_PSR_IT | IA64_PSR_IC | IA64_PSR_DT | IA64_PSR_RT | IA64_PSR_DFH |
+ IA64_PSR_BN);
+
+ asm volatile ("movl r8 = 1f\n"
+ ";;\n"
+ "mov cr.ipsr=%0\n"
+ "mov cr.iip=r8\n"
+ "mov cr.ifs=r0\n"
+ ";;\n"
+ "rfi;;"
+ "1:\n"
+ "movl r1 = __gp" :: "r"(flags) : "r8");
+ _start();
+}
+
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/sys_ia64.c linux/arch/ia64/kernel/sys_ia64.c
--- v2.4.0-test9/linux/arch/ia64/kernel/sys_ia64.c Fri Jul 14 16:08:12 2000
+++ linux/arch/ia64/kernel/sys_ia64.c Mon Oct 9 17:54:55 2000
@@ -147,7 +147,7 @@
struct pt_regs *regs = (struct pt_regs *) &stack;
addr = do_mmap2(addr, len, prot, flags, fd, pgoff);
- if (!IS_ERR(addr))
+ if (!IS_ERR((void *) addr))
regs->r8 = 0; /* ensure large addresses are not mistaken as failures... */
return addr;
}
@@ -162,26 +162,12 @@
return -EINVAL;
addr = do_mmap2(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
- if (!IS_ERR(addr))
+ if (!IS_ERR((void *) addr))
regs->r8 = 0; /* ensure large addresses are not mistaken as failures... */
return addr;
}
asmlinkage long
-sys_ioperm (unsigned long from, unsigned long num, int on)
-{
- printk(KERN_ERR "sys_ioperm(from=%lx, num=%lx, on=%d)\n", from, num, on);
- return -EIO;
-}
-
-asmlinkage long
-sys_iopl (int level, long arg1, long arg2, long arg3)
-{
- printk(KERN_ERR "sys_iopl(level=%d)!\n", level);
- return -ENOSYS;
-}
-
-asmlinkage long
sys_vm86 (long arg0, long arg1, long arg2, long arg3)
{
printk(KERN_ERR "sys_vm86(%lx, %lx, %lx, %lx)!\n", arg0, arg1, arg2, arg3);
@@ -204,7 +190,7 @@
unsigned long addr;
addr = sys_create_module (name_user, size);
- if (!IS_ERR(addr))
+ if (!IS_ERR((void *) addr))
regs->r8 = 0; /* ensure large addresses are not mistaken as failures... */
return addr;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/time.c linux/arch/ia64/kernel/time.c
--- v2.4.0-test9/linux/arch/ia64/kernel/time.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/time.c Mon Oct 9 17:54:55 2000
@@ -183,7 +183,7 @@
#ifdef CONFIG_SMP
smp_do_timer(regs);
- if (smp_processor_id() == bootstrap_processor)
+ if (smp_processor_id() == 0)
do_timer(regs);
#else
do_timer(regs);
@@ -303,7 +303,7 @@
itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den;
itm.delta = itc_freq / HZ;
- printk("timer: CPU %d base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, ITC freq=%lu.%03luMHz\n",
+ printk("CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, ITC freq=%lu.%03luMHz\n",
smp_processor_id(),
platform_base_freq / 1000000, (platform_base_freq / 1000) % 1000,
itc_ratio.num, itc_ratio.den, itc_freq / 1000000, (itc_freq / 1000) % 1000);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/traps.c linux/arch/ia64/kernel/traps.c
--- v2.4.0-test9/linux/arch/ia64/kernel/traps.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/traps.c Mon Oct 9 17:54:55 2000
@@ -192,38 +192,45 @@
}
/*
- * disabled_fp_fault() is called when a user-level process attempts to
- * access one of the registers f32..f127 while it doesn't own the
+ * disabled_fph_fault() is called when a user-level process attempts
+ * to access one of the registers f32..f127 when it doesn't own the
* fp-high register partition. When this happens, we save the current
* fph partition in the task_struct of the fpu-owner (if necessary)
* and then load the fp-high partition of the current task (if
- * necessary).
+ * necessary). Note that the kernel has access to fph by the time we
+ * get here, as the IVT's "Diabled FP-Register" handler takes care of
+ * clearing psr.dfh.
*/
static inline void
disabled_fph_fault (struct pt_regs *regs)
{
- struct task_struct *fpu_owner = ia64_get_fpu_owner();
+ struct ia64_psr *psr = ia64_psr(regs);
- /* first, clear psr.dfh and psr.mfh: */
- regs->cr_ipsr &= ~(IA64_PSR_DFH | IA64_PSR_MFH);
- if (fpu_owner != current) {
- ia64_set_fpu_owner(current);
+ /* first, grant user-level access to fph partition: */
+ psr->dfh = 0;
+#ifndef CONFIG_SMP
+ {
+ struct task_struct *fpu_owner = ia64_get_fpu_owner();
+
+ if (fpu_owner == current)
+ return;
- if (fpu_owner && ia64_psr(ia64_task_regs(fpu_owner))->mfh) {
- ia64_psr(ia64_task_regs(fpu_owner))->mfh = 0;
- fpu_owner->thread.flags |= IA64_THREAD_FPH_VALID;
- __ia64_save_fpu(fpu_owner->thread.fph);
- }
- if ((current->thread.flags & IA64_THREAD_FPH_VALID) != 0) {
- __ia64_load_fpu(current->thread.fph);
- } else {
- __ia64_init_fpu();
- /*
- * Set mfh because the state in thread.fph does not match
- * the state in the fph partition.
- */
- ia64_psr(regs)->mfh = 1;
- }
+ if (fpu_owner)
+ ia64_flush_fph(fpu_owner);
+
+ ia64_set_fpu_owner(current);
+ }
+#endif /* !CONFIG_SMP */
+ if ((current->thread.flags & IA64_THREAD_FPH_VALID) != 0) {
+ __ia64_load_fpu(current->thread.fph);
+ psr->mfh = 0;
+ } else {
+ __ia64_init_fpu();
+ /*
+ * Set mfh because the state in thread.fph does not match the state in
+ * the fph partition.
+ */
+ psr->mfh = 1;
}
}
@@ -247,20 +254,21 @@
* kernel, so set those bits in the mask and set the low volatile
* pointer to point to these registers.
*/
- fp_state.bitmask_low64 = 0xffc0; /* bit6..bit15 */
#ifndef FPSWA_BUG
- fp_state.fp_state_low_volatile = ®s->f6;
+ fp_state.bitmask_low64 = 0x3c0; /* bit 6..9 */
+ fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) ®s->f6;
#else
+ fp_state.bitmask_low64 = 0xffc0; /* bit6..bit15 */
f6_15[0] = regs->f6;
f6_15[1] = regs->f7;
f6_15[2] = regs->f8;
f6_15[3] = regs->f9;
- __asm__ ("stf.spill %0=f10" : "=m"(f6_15[4]));
- __asm__ ("stf.spill %0=f11" : "=m"(f6_15[5]));
- __asm__ ("stf.spill %0=f12" : "=m"(f6_15[6]));
- __asm__ ("stf.spill %0=f13" : "=m"(f6_15[7]));
- __asm__ ("stf.spill %0=f14" : "=m"(f6_15[8]));
- __asm__ ("stf.spill %0=f15" : "=m"(f6_15[9]));
+ __asm__ ("stf.spill %0=f10%P0" : "=m"(f6_15[4]));
+ __asm__ ("stf.spill %0=f11%P0" : "=m"(f6_15[5]));
+ __asm__ ("stf.spill %0=f12%P0" : "=m"(f6_15[6]));
+ __asm__ ("stf.spill %0=f13%P0" : "=m"(f6_15[7]));
+ __asm__ ("stf.spill %0=f14%P0" : "=m"(f6_15[8]));
+ __asm__ ("stf.spill %0=f15%P0" : "=m"(f6_15[9]));
fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) f6_15;
#endif
/*
@@ -279,12 +287,12 @@
(unsigned long *) isr, (unsigned long *) pr,
(unsigned long *) ifs, &fp_state);
#ifdef FPSWA_BUG
- __asm__ ("ldf.fill f10=%0" :: "m"(f6_15[4]));
- __asm__ ("ldf.fill f11=%0" :: "m"(f6_15[5]));
- __asm__ ("ldf.fill f12=%0" :: "m"(f6_15[6]));
- __asm__ ("ldf.fill f13=%0" :: "m"(f6_15[7]));
- __asm__ ("ldf.fill f14=%0" :: "m"(f6_15[8]));
- __asm__ ("ldf.fill f15=%0" :: "m"(f6_15[9]));
+ __asm__ ("ldf.fill f10=%0%P0" :: "m"(f6_15[4]));
+ __asm__ ("ldf.fill f11=%0%P0" :: "m"(f6_15[5]));
+ __asm__ ("ldf.fill f12=%0%P0" :: "m"(f6_15[6]));
+ __asm__ ("ldf.fill f13=%0%P0" :: "m"(f6_15[7]));
+ __asm__ ("ldf.fill f14=%0%P0" :: "m"(f6_15[8]));
+ __asm__ ("ldf.fill f15=%0%P0" :: "m"(f6_15[9]));
regs->f6 = f6_15[0];
regs->f7 = f6_15[1];
regs->f8 = f6_15[2];
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/unaligned.c linux/arch/ia64/kernel/unaligned.c
--- v2.4.0-test9/linux/arch/ia64/kernel/unaligned.c Fri Jul 14 16:08:12 2000
+++ linux/arch/ia64/kernel/unaligned.c Mon Oct 9 17:54:55 2000
@@ -278,9 +278,9 @@
bspstore = (unsigned long *)regs->ar_bspstore;
DPRINT(("rse_slot_num=0x%lx\n",ia64_rse_slot_num((unsigned long *)sw->ar_bspstore)));
- DPRINT(("kbs=%p nlocals=%ld\n", kbs, nlocals));
+ DPRINT(("kbs=%p nlocals=%ld\n", (void *) kbs, nlocals));
DPRINT(("bspstore next rnat slot %p\n",
- ia64_rse_rnat_addr((unsigned long *)sw->ar_bspstore)));
+ (void *) ia64_rse_rnat_addr((unsigned long *)sw->ar_bspstore)));
DPRINT(("on_kbs=%ld rnats=%ld\n",
on_kbs, ((sw->ar_bspstore-(unsigned long)kbs)>>3) - on_kbs));
@@ -292,7 +292,7 @@
addr = slot = ia64_rse_skip_regs(bsp, r1 - 32);
DPRINT(("ubs_end=%p bsp=%p addr=%p slot=0x%lx\n",
- ubs_end, bsp, addr, ia64_rse_slot_num(addr)));
+ (void *) ubs_end, (void *) bsp, (void *) addr, ia64_rse_slot_num(addr)));
ia64_poke(regs, current, (unsigned long)addr, val);
@@ -303,7 +303,7 @@
ia64_peek(regs, current, (unsigned long)addr, &rnats);
DPRINT(("rnat @%p = 0x%lx nat=%d rnatval=%lx\n",
- addr, rnats, nat, rnats &ia64_rse_slot_num(slot)));
+ (void *) addr, rnats, nat, rnats &ia64_rse_slot_num(slot)));
if (nat) {
rnats |= __IA64_UL(1) << ia64_rse_slot_num(slot);
@@ -312,7 +312,7 @@
}
ia64_poke(regs, current, (unsigned long)addr, rnats);
- DPRINT(("rnat changed to @%p = 0x%lx\n", addr, rnats));
+ DPRINT(("rnat changed to @%p = 0x%lx\n", (void *) addr, rnats));
}
@@ -373,7 +373,7 @@
addr = slot = ia64_rse_skip_regs(bsp, r1 - 32);
DPRINT(("ubs_end=%p bsp=%p addr=%p slot=0x%lx\n",
- ubs_end, bsp, addr, ia64_rse_slot_num(addr)));
+ (void *) ubs_end, (void *) bsp, (void *) addr, ia64_rse_slot_num(addr)));
ia64_peek(regs, current, (unsigned long)addr, val);
@@ -383,7 +383,7 @@
addr = ia64_rse_rnat_addr(addr);
ia64_peek(regs, current, (unsigned long)addr, &rnats);
- DPRINT(("rnat @%p = 0x%lx\n", addr, rnats));
+ DPRINT(("rnat @%p = 0x%lx\n", (void *) addr, rnats));
if (nat)
*nat = rnats >> ia64_rse_slot_num(slot) & 0x1;
@@ -437,13 +437,13 @@
* UNAT bit_pos = GR[r3]{8:3} form EAS-2.4
*/
bitmask = __IA64_UL(1) << (addr >> 3 & 0x3f);
- DPRINT(("*0x%lx=0x%lx NaT=%d prev_unat @%p=%lx\n", addr, val, nat, unat, *unat));
+ DPRINT(("*0x%lx=0x%lx NaT=%d prev_unat @%p=%lx\n", addr, val, nat, (void *) unat, *unat));
if (nat) {
*unat |= bitmask;
} else {
*unat &= ~bitmask;
}
- DPRINT(("*0x%lx=0x%lx NaT=%d new unat: %p=%lx\n", addr, val, nat, unat,*unat));
+ DPRINT(("*0x%lx=0x%lx NaT=%d new unat: %p=%lx\n", addr, val, nat, (void *) unat,*unat));
}
#define IA64_FPH_OFFS(r) (r - IA64_FIRST_ROTATING_FR)
@@ -455,16 +455,15 @@
unsigned long addr;
/*
- * From EAS-2.5: FPDisableFault has higher priority than
- * Unaligned Fault. Thus, when we get here, we know the partition is
- * enabled.
+ * From EAS-2.5: FPDisableFault has higher priority than Unaligned
+ * Fault. Thus, when we get here, we know the partition is enabled.
+ * To update f32-f127, there are three choices:
+ *
+ * (1) save f32-f127 to thread.fph and update the values there
+ * (2) use a gigantic switch statement to directly access the registers
+ * (3) generate code on the fly to update the desired register
*
- * The registers [32-127] are ususally saved in the tss. When get here,
- * they are NECESSARILY live because they are only saved explicitely.
- * We have 3 ways of updating the values: force a save of the range
- * in tss, use a gigantic switch/case statement or generate code on the
- * fly to store to the right register.
- * For now, we are using the (slow) save/restore way.
+ * For now, we are using approach (1).
*/
if (regnum >= IA64_FIRST_ROTATING_FR) {
ia64_sync_fph(current);
@@ -491,7 +490,6 @@
* let's do it for safety.
*/
regs->cr_ipsr |= IA64_PSR_MFL;
-
}
}
@@ -522,12 +520,12 @@
* Unaligned Fault. Thus, when we get here, we know the partition is
* enabled.
*
- * When regnum > 31, the register is still live and
- * we need to force a save to the tss to get access to it.
- * See discussion in setfpreg() for reasons and other ways of doing this.
+ * When regnum > 31, the register is still live and we need to force a save
+ * to current->thread.fph to get access to it. See discussion in setfpreg()
+ * for reasons and other ways of doing this.
*/
if (regnum >= IA64_FIRST_ROTATING_FR) {
- ia64_sync_fph(current);
+ ia64_flush_fph(current);
*fpval = current->thread.fph[IA64_FPH_OFFS(regnum)];
} else {
/*
@@ -1084,9 +1082,9 @@
/*
* XXX fixme
*
- * A possible optimization would be to drop fpr_final
- * and directly use the storage from the saved context i.e.,
- * the actual final destination (pt_regs, switch_stack or tss).
+ * A possible optimization would be to drop fpr_final and directly
+ * use the storage from the saved context i.e., the actual final
+ * destination (pt_regs, switch_stack or thread structure).
*/
setfpreg(ld->r1, &fpr_final[0], regs);
setfpreg(ld->imm, &fpr_final[1], regs);
@@ -1212,9 +1210,9 @@
/*
* XXX fixme
*
- * A possible optimization would be to drop fpr_final
- * and directly use the storage from the saved context i.e.,
- * the actual final destination (pt_regs, switch_stack or tss).
+ * A possible optimization would be to drop fpr_final and directly
+ * use the storage from the saved context i.e., the actual final
+ * destination (pt_regs, switch_stack or thread structure).
*/
setfpreg(ld->r1, &fpr_final, regs);
}
@@ -1223,9 +1221,7 @@
* check for updates on any loads
*/
if (ld->op == 0x7 || ld->m)
- emulate_load_updates(ld->op == 0x7 ? UPD_IMMEDIATE: UPD_REG,
- ld, regs, ifa);
-
+ emulate_load_updates(ld->op == 0x7 ? UPD_IMMEDIATE: UPD_REG, ld, regs, ifa);
/*
* invalidate ALAT entry in case of advanced floating point loads
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/unwind.c linux/arch/ia64/kernel/unwind.c
--- v2.4.0-test9/linux/arch/ia64/kernel/unwind.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/kernel/unwind.c Mon Oct 9 17:54:55 2000
@@ -66,7 +66,7 @@
#define UNW_STATS 0 /* WARNING: this disabled interrupts for long time-spans!! */
#if UNW_DEBUG
- static long unw_debug_level = 1;
+ static long unw_debug_level = 255;
# define debug(level,format...) if (unw_debug_level > level) printk(format)
# define dprintk(format...) printk(format)
# define inline
@@ -111,7 +111,7 @@
struct unw_table kernel_table;
/* hash table that maps instruction pointer to script index: */
- unw_hash_index_t hash[UNW_HASH_SIZE];
+ unsigned short hash[UNW_HASH_SIZE];
/* script cache: */
struct unw_script cache[UNW_CACHE_SIZE];
@@ -152,47 +152,47 @@
UNW_REG_UNAT, UNW_REG_LC, UNW_REG_FPSR, UNW_REG_PRI_UNAT_GR
},
preg_index: {
- struct_offset(struct unw_frame_info, pri_unat)/8, /* PRI_UNAT_GR */
- struct_offset(struct unw_frame_info, pri_unat)/8, /* PRI_UNAT_MEM */
- struct_offset(struct unw_frame_info, pbsp)/8,
- struct_offset(struct unw_frame_info, bspstore)/8,
- struct_offset(struct unw_frame_info, pfs)/8,
- struct_offset(struct unw_frame_info, rnat)/8,
+ struct_offset(struct unw_frame_info, pri_unat_loc)/8, /* PRI_UNAT_GR */
+ struct_offset(struct unw_frame_info, pri_unat_loc)/8, /* PRI_UNAT_MEM */
+ struct_offset(struct unw_frame_info, bsp_loc)/8,
+ struct_offset(struct unw_frame_info, bspstore_loc)/8,
+ struct_offset(struct unw_frame_info, pfs_loc)/8,
+ struct_offset(struct unw_frame_info, rnat_loc)/8,
struct_offset(struct unw_frame_info, psp)/8,
- struct_offset(struct unw_frame_info, rp)/8,
+ struct_offset(struct unw_frame_info, rp_loc)/8,
struct_offset(struct unw_frame_info, r4)/8,
struct_offset(struct unw_frame_info, r5)/8,
struct_offset(struct unw_frame_info, r6)/8,
struct_offset(struct unw_frame_info, r7)/8,
- struct_offset(struct unw_frame_info, unat)/8,
- struct_offset(struct unw_frame_info, pr)/8,
- struct_offset(struct unw_frame_info, lc)/8,
- struct_offset(struct unw_frame_info, fpsr)/8,
- struct_offset(struct unw_frame_info, b1)/8,
- struct_offset(struct unw_frame_info, b2)/8,
- struct_offset(struct unw_frame_info, b3)/8,
- struct_offset(struct unw_frame_info, b4)/8,
- struct_offset(struct unw_frame_info, b5)/8,
- struct_offset(struct unw_frame_info, f2)/8,
- struct_offset(struct unw_frame_info, f3)/8,
- struct_offset(struct unw_frame_info, f4)/8,
- struct_offset(struct unw_frame_info, f5)/8,
- struct_offset(struct unw_frame_info, fr[16 - 16])/8,
- struct_offset(struct unw_frame_info, fr[17 - 16])/8,
- struct_offset(struct unw_frame_info, fr[18 - 16])/8,
- struct_offset(struct unw_frame_info, fr[19 - 16])/8,
- struct_offset(struct unw_frame_info, fr[20 - 16])/8,
- struct_offset(struct unw_frame_info, fr[21 - 16])/8,
- struct_offset(struct unw_frame_info, fr[22 - 16])/8,
- struct_offset(struct unw_frame_info, fr[23 - 16])/8,
- struct_offset(struct unw_frame_info, fr[24 - 16])/8,
- struct_offset(struct unw_frame_info, fr[25 - 16])/8,
- struct_offset(struct unw_frame_info, fr[26 - 16])/8,
- struct_offset(struct unw_frame_info, fr[27 - 16])/8,
- struct_offset(struct unw_frame_info, fr[28 - 16])/8,
- struct_offset(struct unw_frame_info, fr[29 - 16])/8,
- struct_offset(struct unw_frame_info, fr[30 - 16])/8,
- struct_offset(struct unw_frame_info, fr[31 - 16])/8,
+ struct_offset(struct unw_frame_info, unat_loc)/8,
+ struct_offset(struct unw_frame_info, pr_loc)/8,
+ struct_offset(struct unw_frame_info, lc_loc)/8,
+ struct_offset(struct unw_frame_info, fpsr_loc)/8,
+ struct_offset(struct unw_frame_info, b1_loc)/8,
+ struct_offset(struct unw_frame_info, b2_loc)/8,
+ struct_offset(struct unw_frame_info, b3_loc)/8,
+ struct_offset(struct unw_frame_info, b4_loc)/8,
+ struct_offset(struct unw_frame_info, b5_loc)/8,
+ struct_offset(struct unw_frame_info, f2_loc)/8,
+ struct_offset(struct unw_frame_info, f3_loc)/8,
+ struct_offset(struct unw_frame_info, f4_loc)/8,
+ struct_offset(struct unw_frame_info, f5_loc)/8,
+ struct_offset(struct unw_frame_info, fr_loc[16 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[17 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[18 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[19 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[20 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[21 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[22 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[23 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[24 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[25 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[26 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[27 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[28 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[29 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[30 - 16])/8,
+ struct_offset(struct unw_frame_info, fr_loc[31 - 16])/8,
},
hash : { [0 ... UNW_HASH_SIZE - 1] = -1 },
#if UNW_DEBUG
@@ -211,6 +211,27 @@
/* Unwind accessors. */
+/*
+ * Returns offset of rREG in struct pt_regs.
+ */
+static inline unsigned long
+pt_regs_off (unsigned long reg)
+{
+ unsigned long off =0;
+
+ if (reg >= 1 && reg <= 3)
+ off = struct_offset(struct pt_regs, r1) + 8*(reg - 1);
+ else if (reg <= 11)
+ off = struct_offset(struct pt_regs, r8) + 8*(reg - 8);
+ else if (reg <= 15)
+ off = struct_offset(struct pt_regs, r12) + 8*(reg - 12);
+ else if (reg <= 31)
+ off = struct_offset(struct pt_regs, r16) + 8*(reg - 16);
+ else
+ dprintk("unwind: bad scratch reg r%lu\n", reg);
+ return off;
+}
+
int
unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char *nat, int write)
{
@@ -251,26 +272,23 @@
}
/* fall through */
case UNW_NAT_NONE:
+ dummy_nat = 0;
nat_addr = &dummy_nat;
break;
- case UNW_NAT_SCRATCH:
- if (info->pri_unat)
- nat_addr = info->pri_unat;
- else
- nat_addr = &info->sw->caller_unat;
- case UNW_NAT_PRI_UNAT:
+ case UNW_NAT_MEMSTK:
nat_mask = (1UL << ((long) addr & 0x1f8)/8);
break;
- case UNW_NAT_STACKED:
+ case UNW_NAT_REGSTK:
nat_addr = ia64_rse_rnat_addr(addr);
if ((unsigned long) addr < info->regstk.limit
|| (unsigned long) addr >= info->regstk.top)
{
- dprintk("unwind: 0x%p outside of regstk "
- "[0x%lx-0x%lx)\n", addr,
- info->regstk.limit, info->regstk.top);
+ dprintk("unwind: %p outside of regstk "
+ "[0x%lx-0x%lx)\n", (void *) addr,
+ info->regstk.limit,
+ info->regstk.top);
return -1;
}
if ((unsigned long) nat_addr >= info->regstk.top)
@@ -289,18 +307,11 @@
pt = (struct pt_regs *) info->psp - 1;
else
pt = (struct pt_regs *) info->sp - 1;
- if (regnum <= 3)
- addr = &pt->r1 + (regnum - 1);
- else if (regnum <= 11)
- addr = &pt->r8 + (regnum - 8);
- else if (regnum <= 15)
- addr = &pt->r12 + (regnum - 12);
- else
- addr = &pt->r16 + (regnum - 16);
- if (info->pri_unat)
- nat_addr = info->pri_unat;
+ addr = (unsigned long *) ((long) pt + pt_regs_off(regnum));
+ if (info->pri_unat_loc)
+ nat_addr = info->pri_unat_loc;
else
- nat_addr = &info->sw->caller_unat;
+ nat_addr = &info->sw->ar_unat;
nat_mask = (1UL << ((long) addr & 0x1f8)/8);
}
} else {
@@ -320,7 +331,10 @@
if (write) {
*addr = *val;
- *nat_addr = (*nat_addr & ~nat_mask) | nat_mask;
+ if (*nat)
+ *nat_addr |= nat_mask;
+ else
+ *nat_addr &= ~nat_mask;
} else {
*val = *addr;
*nat = (*nat_addr & nat_mask) != 0;
@@ -346,7 +360,7 @@
/* preserved: */
case 1: case 2: case 3: case 4: case 5:
- addr = *(&info->b1 + (regnum - 1));
+ addr = *(&info->b1_loc + (regnum - 1));
if (!addr)
addr = &info->sw->b1 + (regnum - 1);
break;
@@ -379,7 +393,7 @@
pt = (struct pt_regs *) info->sp - 1;
if (regnum <= 5) {
- addr = *(&info->f2 + (regnum - 2));
+ addr = *(&info->f2_loc + (regnum - 2));
if (!addr)
addr = &info->sw->f2 + (regnum - 2);
} else if (regnum <= 15) {
@@ -388,13 +402,16 @@
else
addr = &info->sw->f10 + (regnum - 10);
} else if (regnum <= 31) {
- addr = info->fr[regnum - 16];
+ addr = info->fr_loc[regnum - 16];
if (!addr)
addr = &info->sw->f16 + (regnum - 16);
} else {
struct task_struct *t = info->task;
- ia64_sync_fph(t);
+ if (write)
+ ia64_sync_fph(t);
+ else
+ ia64_flush_fph(t);
addr = t->thread.fph + (regnum - 32);
}
@@ -418,52 +435,53 @@
switch (regnum) {
case UNW_AR_BSP:
- addr = info->pbsp;
+ addr = info->bsp_loc;
if (!addr)
addr = &info->sw->ar_bspstore;
break;
case UNW_AR_BSPSTORE:
- addr = info->bspstore;
+ addr = info->bspstore_loc;
if (!addr)
addr = &info->sw->ar_bspstore;
break;
case UNW_AR_PFS:
- addr = info->pfs;
+ addr = info->pfs_loc;
if (!addr)
addr = &info->sw->ar_pfs;
break;
case UNW_AR_RNAT:
- addr = info->rnat;
+ addr = info->rnat_loc;
if (!addr)
addr = &info->sw->ar_rnat;
break;
case UNW_AR_UNAT:
- addr = info->unat;
+ addr = info->unat_loc;
if (!addr)
addr = &info->sw->ar_unat;
break;
case UNW_AR_LC:
- addr = info->lc;
+ addr = info->lc_loc;
if (!addr)
addr = &info->sw->ar_lc;
break;
case UNW_AR_EC:
- if (!info->cfm)
+ if (!info->cfm_loc)
return -1;
if (write)
- *info->cfm = (*info->cfm & ~(0x3fUL << 52)) | ((*val & 0x3f) << 52);
+ *info->cfm_loc =
+ (*info->cfm_loc & ~(0x3fUL << 52)) | ((*val & 0x3f) << 52);
else
- *val = (*info->cfm >> 52) & 0x3f;
+ *val = (*info->cfm_loc >> 52) & 0x3f;
return 0;
case UNW_AR_FPSR:
- addr = info->fpsr;
+ addr = info->fpsr_loc;
if (!addr)
addr = &info->sw->ar_fpsr;
break;
@@ -493,7 +511,7 @@
{
unsigned long *addr;
- addr = info->pr;
+ addr = info->pr_loc;
if (!addr)
addr = &info->sw->pr;
@@ -605,9 +623,8 @@
int i;
/*
- * First, resolve implicit register save locations
- * (see Section "11.4.2.3 Rules for Using Unwind
- * Descriptors", rule 3):
+ * First, resolve implicit register save locations (see Section "11.4.2.3 Rules
+ * for Using Unwind Descriptors", rule 3):
*/
for (i = 0; i < (int) sizeof(unw.save_order)/sizeof(unw.save_order[0]); ++i) {
reg = sr->curr.reg + unw.save_order[i];
@@ -1045,16 +1062,16 @@
static inline unw_hash_index_t
hash (unsigned long ip)
{
-# define magic 0x9e3779b97f4a7c16 /* (sqrt(5)/2-1)*2^64 */
+# define magic 0x9e3779b97f4a7c16 /* based on (sqrt(5)/2-1)*2^64 */
return (ip >> 4)*magic >> (64 - UNW_LOG_HASH_SIZE);
}
static inline long
-cache_match (struct unw_script *script, unsigned long ip, unsigned long pr_val)
+cache_match (struct unw_script *script, unsigned long ip, unsigned long pr)
{
read_lock(&script->lock);
- if ((ip) == (script)->ip && (((pr_val) ^ (script)->pr_val) & (script)->pr_mask) == 0)
+ if (ip == script->ip && ((pr ^ script->pr_val) & script->pr_mask) == 0)
/* keep the read lock... */
return 1;
read_unlock(&script->lock);
@@ -1065,21 +1082,26 @@
script_lookup (struct unw_frame_info *info)
{
struct unw_script *script = unw.cache + info->hint;
- unsigned long ip, pr_val;
+ unsigned short index;
+ unsigned long ip, pr;
STAT(++unw.stat.cache.lookups);
ip = info->ip;
- pr_val = info->pr_val;
+ pr = info->pr;
- if (cache_match(script, ip, pr_val)) {
+ if (cache_match(script, ip, pr)) {
STAT(++unw.stat.cache.hinted_hits);
return script;
}
- script = unw.cache + unw.hash[hash(ip)];
+ index = unw.hash[hash(ip)];
+ if (index >= UNW_CACHE_SIZE)
+ return 0;
+
+ script = unw.cache + index;
while (1) {
- if (cache_match(script, ip, pr_val)) {
+ if (cache_match(script, ip, pr)) {
/* update hint; no locking required as single-word writes are atomic */
STAT(++unw.stat.cache.normal_hits);
unw.cache[info->prev_script].hint = script - unw.cache;
@@ -1099,8 +1121,8 @@
script_new (unsigned long ip)
{
struct unw_script *script, *prev, *tmp;
+ unw_hash_index_t index;
unsigned long flags;
- unsigned char index;
unsigned short head;
STAT(++unw.stat.script.news);
@@ -1133,22 +1155,24 @@
unw.lru_tail = head;
/* remove the old script from the hash table (if it's there): */
- index = hash(script->ip);
- tmp = unw.cache + unw.hash[index];
- prev = 0;
- while (1) {
- if (tmp == script) {
- if (prev)
- prev->coll_chain = tmp->coll_chain;
- else
- unw.hash[index] = tmp->coll_chain;
- break;
- } else
- prev = tmp;
- if (tmp->coll_chain >= UNW_CACHE_SIZE)
+ if (script->ip) {
+ index = hash(script->ip);
+ tmp = unw.cache + unw.hash[index];
+ prev = 0;
+ while (1) {
+ if (tmp == script) {
+ if (prev)
+ prev->coll_chain = tmp->coll_chain;
+ else
+ unw.hash[index] = tmp->coll_chain;
+ break;
+ } else
+ prev = tmp;
+ if (tmp->coll_chain >= UNW_CACHE_SIZE)
/* old script wasn't in the hash-table */
- break;
- tmp = unw.cache + tmp->coll_chain;
+ break;
+ tmp = unw.cache + tmp->coll_chain;
+ }
}
/* enter new script in the hash table */
@@ -1198,19 +1222,17 @@
struct unw_reg_info *r = sr->curr.reg + i;
enum unw_insn_opcode opc;
struct unw_insn insn;
- unsigned long val;
+ unsigned long val = 0;
switch (r->where) {
case UNW_WHERE_GR:
if (r->val >= 32) {
/* register got spilled to a stacked register */
opc = UNW_INSN_SETNAT_TYPE;
- val = UNW_NAT_STACKED;
- } else {
+ val = UNW_NAT_REGSTK;
+ } else
/* register got spilled to a scratch register */
- opc = UNW_INSN_SETNAT_TYPE;
- val = UNW_NAT_SCRATCH;
- }
+ opc = UNW_INSN_SETNAT_MEMSTK;
break;
case UNW_WHERE_FR:
@@ -1225,8 +1247,7 @@
case UNW_WHERE_PSPREL:
case UNW_WHERE_SPREL:
- opc = UNW_INSN_SETNAT_PRI_UNAT;
- val = 0;
+ opc = UNW_INSN_SETNAT_MEMSTK;
break;
default:
@@ -1267,18 +1288,8 @@
}
val = unw.preg_index[UNW_REG_R4 + (rval - 4)];
} else {
- opc = UNW_INSN_LOAD_SPREL;
- val = -sizeof(struct pt_regs);
- if (rval >= 1 && rval <= 3)
- val += struct_offset(struct pt_regs, r1) + 8*(rval - 1);
- else if (rval <= 11)
- val += struct_offset(struct pt_regs, r8) + 8*(rval - 8);
- else if (rval <= 15)
- val += struct_offset(struct pt_regs, r12) + 8*(rval - 12);
- else if (rval <= 31)
- val += struct_offset(struct pt_regs, r16) + 8*(rval - 16);
- else
- dprintk("unwind: bad scratch reg r%lu\n", rval);
+ opc = UNW_INSN_ADD_SP;
+ val = -sizeof(struct pt_regs) + pt_regs_off(rval);
}
break;
@@ -1288,7 +1299,7 @@
else if (rval >= 16 && rval <= 31)
val = unw.preg_index[UNW_REG_F16 + (rval - 16)];
else {
- opc = UNW_INSN_LOAD_SPREL;
+ opc = UNW_INSN_ADD_SP;
val = -sizeof(struct pt_regs);
if (rval <= 9)
val += struct_offset(struct pt_regs, f6) + 16*(rval - 6);
@@ -1301,7 +1312,7 @@
if (rval >= 1 && rval <= 5)
val = unw.preg_index[UNW_REG_B1 + (rval - 1)];
else {
- opc = UNW_INSN_LOAD_SPREL;
+ opc = UNW_INSN_ADD_SP;
val = -sizeof(struct pt_regs);
if (rval == 0)
val += struct_offset(struct pt_regs, b0);
@@ -1313,11 +1324,11 @@
break;
case UNW_WHERE_SPREL:
- opc = UNW_INSN_LOAD_SPREL;
+ opc = UNW_INSN_ADD_SP;
break;
case UNW_WHERE_PSPREL:
- opc = UNW_INSN_LOAD_PSPREL;
+ opc = UNW_INSN_ADD_PSP;
break;
default:
@@ -1330,6 +1341,18 @@
script_emit(script, insn);
if (need_nat_info)
emit_nat_info(sr, i, script);
+
+ if (i == UNW_REG_PSP) {
+ /*
+ * info->psp must contain the _value_ of the previous
+ * sp, not it's save location. We get this by
+ * dereferencing the value we just stored in
+ * info->psp:
+ */
+ insn.opc = UNW_INSN_LOAD;
+ insn.dst = insn.val = unw.preg_index[UNW_REG_PSP];
+ script_emit(script, insn);
+ }
}
static inline struct unw_table_entry *
@@ -1378,7 +1401,7 @@
memset(&sr, 0, sizeof(sr));
for (r = sr.curr.reg; r < sr.curr.reg + UNW_NUM_REGS; ++r)
r->when = UNW_WHEN_NEVER;
- sr.pr_val = info->pr_val;
+ sr.pr_val = info->pr;
script = script_new(ip);
if (!script) {
@@ -1447,8 +1470,8 @@
}
#if UNW_DEBUG
- printk ("unwind: state record for func 0x%lx, t=%u:\n",
- table->segment_base + e->start_offset, sr.when_target);
+ printk("unwind: state record for func 0x%lx, t=%u:\n",
+ table->segment_base + e->start_offset, sr.when_target);
for (r = sr.curr.reg; r < sr.curr.reg + UNW_NUM_REGS; ++r) {
if (r->where != UNW_WHERE_NONE || r->when != UNW_WHEN_NEVER) {
printk(" %s <- ", unw.preg_name[r - sr.curr.reg]);
@@ -1463,7 +1486,7 @@
break;
default: printk("BADWHERE(%d)", r->where); break;
}
- printk ("\t\t%d\n", r->when);
+ printk("\t\t%d\n", r->when);
}
}
#endif
@@ -1472,13 +1495,17 @@
/* translate state record into unwinder instructions: */
- if (sr.curr.reg[UNW_REG_PSP].where == UNW_WHERE_NONE
- && sr.when_target > sr.curr.reg[UNW_REG_PSP].when && sr.curr.reg[UNW_REG_PSP].val != 0)
- {
+ /*
+ * First, set psp if we're dealing with a fixed-size frame;
+ * subsequent instructions may depend on this value.
+ */
+ if (sr.when_target > sr.curr.reg[UNW_REG_PSP].when
+ && (sr.curr.reg[UNW_REG_PSP].where == UNW_WHERE_NONE)
+ && sr.curr.reg[UNW_REG_PSP].val != 0) {
/* new psp is sp plus frame size */
insn.opc = UNW_INSN_ADD;
- insn.dst = unw.preg_index[UNW_REG_PSP];
- insn.val = sr.curr.reg[UNW_REG_PSP].val;
+ insn.dst = struct_offset(struct unw_frame_info, psp)/8;
+ insn.val = sr.curr.reg[UNW_REG_PSP].val; /* frame size */
script_emit(script, insn);
}
@@ -1562,23 +1589,34 @@
val);
break;
- case UNW_INSN_LOAD_PSPREL:
+ case UNW_INSN_ADD_PSP:
s[dst] = state->psp + val;
break;
- case UNW_INSN_LOAD_SPREL:
+ case UNW_INSN_ADD_SP:
s[dst] = state->sp + val;
break;
- case UNW_INSN_SETNAT_PRI_UNAT:
- if (!state->pri_unat)
- state->pri_unat = &state->sw->caller_unat;
- s[dst+1] = ((*state->pri_unat - s[dst]) << 32) | UNW_NAT_PRI_UNAT;
+ case UNW_INSN_SETNAT_MEMSTK:
+ if (!state->pri_unat_loc)
+ state->pri_unat_loc = &state->sw->ar_unat;
+ /* register off. is a multiple of 8, so the least 3 bits (type) are 0 */
+ s[dst+1] = (*state->pri_unat_loc - s[dst]) | UNW_NAT_MEMSTK;
break;
case UNW_INSN_SETNAT_TYPE:
s[dst+1] = val;
break;
+
+ case UNW_INSN_LOAD:
+#if UNW_DEBUG
+ if ((s[val] & (my_cpu_data.unimpl_va_mask | 0x7)) || s[val] < TASK_SIZE) {
+ debug(1, "unwind: rejecting bad psp=0x%lx\n", s[val]);
+ break;
+ }
+#endif
+ s[dst] = *(unsigned long *) s[val];
+ break;
}
}
STAT(unw.stat.script.run_time += ia64_get_itc() - start);
@@ -1587,13 +1625,14 @@
lazy_init:
off = unw.sw_off[val];
s[val] = (unsigned long) state->sw + off;
- if (off >= struct_offset (struct unw_frame_info, r4)
- && off <= struct_offset (struct unw_frame_info, r7))
+ if (off >= struct_offset(struct switch_stack, r4)
+ && off <= struct_offset(struct switch_stack, r7))
/*
- * We're initializing a general register: init NaT info, too. Note that we
- * rely on the fact that call_unat is the first field in struct switch_stack:
+ * We're initializing a general register: init NaT info, too. Note that
+ * the offset is a multiple of 8 which gives us the 3 bits needed for
+ * the type field.
*/
- s[val+1] = (-off << 32) | UNW_NAT_PRI_UNAT;
+ s[val+1] = (struct_offset(struct switch_stack, ar_unat) - off) | UNW_NAT_MEMSTK;
goto redo;
}
@@ -1603,11 +1642,10 @@
int have_write_lock = 0;
struct unw_script *scr;
- if ((info->ip & (my_cpu_data.unimpl_va_mask | 0xf)) || rgn_index(info->ip) != RGN_KERNEL)
- {
+ if ((info->ip & (my_cpu_data.unimpl_va_mask | 0xf)) || info->ip < TASK_SIZE) {
/* don't let obviously bad addresses pollute the cache */
debug(1, "unwind: rejecting bad ip=0x%lx\n", info->ip);
- info->rp = 0;
+ info->rp_loc = 0;
return -1;
}
@@ -1648,12 +1686,12 @@
prev_bsp = info->bsp;
/* restore the ip */
- if (!info->rp) {
+ if (!info->rp_loc) {
debug(1, "unwind: failed to locate return link (ip=0x%lx)!\n", info->ip);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
- ip = info->ip = *info->rp;
+ ip = info->ip = *info->rp_loc;
if (ip < GATE_ADDR + PAGE_SIZE) {
/*
* We don't have unwind info for the gate page, so we consider that part
@@ -1665,23 +1703,23 @@
}
/* restore the cfm: */
- if (!info->pfs) {
+ if (!info->pfs_loc) {
dprintk("unwind: failed to locate ar.pfs!\n");
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
- info->cfm = info->pfs;
+ info->cfm_loc = info->pfs_loc;
/* restore the bsp: */
- pr = info->pr_val;
+ pr = info->pr;
num_regs = 0;
if ((info->flags & UNW_FLAG_INTERRUPT_FRAME)) {
if ((pr & (1UL << pNonSys)) != 0)
- num_regs = *info->cfm & 0x7f; /* size of frame */
- info->pfs =
+ num_regs = *info->cfm_loc & 0x7f; /* size of frame */
+ info->pfs_loc =
(unsigned long *) (info->sp + 16 + struct_offset(struct pt_regs, ar_pfs));
} else
- num_regs = (*info->cfm >> 7) & 0x7f; /* size of locals */
+ num_regs = (*info->cfm_loc >> 7) & 0x7f; /* size of locals */
info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->bsp, -num_regs);
if (info->bsp < info->regstk.limit || info->bsp > info->regstk.top) {
dprintk("unwind: bsp (0x%lx) out of range [0x%lx-0x%lx]\n",
@@ -1694,7 +1732,7 @@
info->sp = info->psp;
if (info->sp < info->memstk.top || info->sp > info->memstk.limit) {
dprintk("unwind: sp (0x%lx) out of range [0x%lx-0x%lx]\n",
- info->sp, info->regstk.top, info->regstk.limit);
+ info->sp, info->memstk.top, info->memstk.limit);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1;
}
@@ -1705,8 +1743,11 @@
return -1;
}
+ /* as we unwind, the saved ar.unat becomes the primary unat: */
+ info->pri_unat_loc = info->unat_loc;
+
/* finally, restore the predicates: */
- unw_get_pr(info, &info->pr_val);
+ unw_get_pr(info, &info->pr);
retval = find_save_locs(info);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
@@ -1773,11 +1814,11 @@
info->task = t;
info->sw = sw;
info->sp = info->psp = (unsigned long) (sw + 1) - 16;
- info->cfm = &sw->ar_pfs;
- sol = (*info->cfm >> 7) & 0x7f;
+ info->cfm_loc = &sw->ar_pfs;
+ sol = (*info->cfm_loc >> 7) & 0x7f;
info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->regstk.top, -sol);
info->ip = sw->b0;
- info->pr_val = sw->pr;
+ info->pr = sw->pr;
find_save_locs(info);
STAT(unw.stat.api.init_time += ia64_get_itc() - start; local_irq_restore(flags));
@@ -1808,7 +1849,7 @@
info->regstk.top = top;
info->sw = sw;
info->bsp = (unsigned long) ia64_rse_skip_regs((unsigned long *) info->regstk.top, -sol);
- info->cfm = &sw->ar_pfs;
+ info->cfm_loc = &sw->ar_pfs;
info->ip = sw->b0;
#endif
}
@@ -1845,7 +1886,7 @@
info->regstk.top = top;
info->sw = sw;
info->bsp = (unsigned long) ia64_rse_skip_regs(bsp, -sof);
- info->cfm = ®s->cr_ifs;
+ info->cfm_loc = ®s->cr_ifs;
info->ip = regs->cr_iip;
#endif
}
@@ -1881,7 +1922,7 @@
int
unw_unwind (struct unw_frame_info *info)
{
- unsigned long sol, cfm = *info->cfm;
+ unsigned long sol, cfm = *info->cfm_loc;
int is_nat;
sol = (cfm >> 7) & 0x7f; /* size of locals */
@@ -1903,7 +1944,7 @@
/* reject let obviously bad addresses */
return -1;
- info->cfm = ia64_rse_skip_regs((unsigned long *) info->bsp, sol - 1);
+ info->cfm_loc = ia64_rse_skip_regs((unsigned long *) info->bsp, sol - 1);
cfm = read_reg(info, sol - 1, &is_nat);
if (is_nat)
return -1;
@@ -2006,7 +2047,7 @@
if (prevt->next == table)
break;
if (!prevt) {
- dprintk("unwind: failed to find unwind table %p\n", table);
+ dprintk("unwind: failed to find unwind table %p\n", (void *) table);
spin_unlock_irqrestore(&unw.lock, flags);
return;
}
@@ -2070,9 +2111,9 @@
for (i = UNW_REG_F16, off = SW(F16); i <= UNW_REG_F31; ++i, off += 16)
unw.sw_off[unw.preg_index[i]] = off;
- unw.cache[0].coll_chain = -1;
- for (i = 1; i < UNW_CACHE_SIZE; ++i) {
- unw.cache[i].lru_chain = (i - 1);
+ for (i = 0; i < UNW_CACHE_SIZE; ++i) {
+ if (i > 0)
+ unw.cache[i].lru_chain = (i - 1);
unw.cache[i].coll_chain = -1;
unw.cache[i].lock = RW_LOCK_UNLOCKED;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/kernel/unwind_i.h linux/arch/ia64/kernel/unwind_i.h
--- v2.4.0-test9/linux/arch/ia64/kernel/unwind_i.h Thu Jun 22 07:09:44 2000
+++ linux/arch/ia64/kernel/unwind_i.h Mon Oct 9 17:54:56 2000
@@ -115,21 +115,21 @@
enum unw_nat_type {
UNW_NAT_NONE, /* NaT not represented */
UNW_NAT_VAL, /* NaT represented by NaT value (fp reg) */
- UNW_NAT_PRI_UNAT, /* NaT value is in unat word at offset OFF */
- UNW_NAT_SCRATCH, /* NaT value is in scratch.pri_unat */
- UNW_NAT_STACKED /* NaT is in rnat */
+ UNW_NAT_MEMSTK, /* NaT value is in unat word at offset OFF */
+ UNW_NAT_REGSTK /* NaT is in rnat */
};
enum unw_insn_opcode {
UNW_INSN_ADD, /* s[dst] += val */
+ UNW_INSN_ADD_PSP, /* s[dst] = (s.psp + val) */
+ UNW_INSN_ADD_SP, /* s[dst] = (s.sp + val) */
UNW_INSN_MOVE, /* s[dst] = s[val] */
UNW_INSN_MOVE2, /* s[dst] = s[val]; s[dst+1] = s[val+1] */
UNW_INSN_MOVE_STACKED, /* s[dst] = ia64_rse_skip(*s.bsp, val) */
- UNW_INSN_LOAD_PSPREL, /* s[dst] = *(*s.psp + 8*val) */
- UNW_INSN_LOAD_SPREL, /* s[dst] = *(*s.sp + 8*val) */
- UNW_INSN_SETNAT_PRI_UNAT, /* s[dst+1].nat.type = PRI_UNAT;
+ UNW_INSN_SETNAT_MEMSTK, /* s[dst+1].nat.type = MEMSTK;
s[dst+1].nat.off = *s.pri_unat - s[dst] */
- UNW_INSN_SETNAT_TYPE /* s[dst+1].nat.type = val */
+ UNW_INSN_SETNAT_TYPE, /* s[dst+1].nat.type = val */
+ UNW_INSN_LOAD /* s[dst] = *s[val] */
};
struct unw_insn {
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/lib/Makefile linux/arch/ia64/lib/Makefile
--- v2.4.0-test9/linux/arch/ia64/lib/Makefile Fri Jul 14 16:08:12 2000
+++ linux/arch/ia64/lib/Makefile Mon Oct 9 17:54:56 2000
@@ -3,30 +3,49 @@
#
.S.o:
- $(CC) $(AFLAGS) -c $< -o $@
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c $< -o $@
L_TARGET = lib.a
-L_OBJS = __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \
- checksum.o clear_page.o csum_partial_copy.o copy_page.o \
- copy_user.o clear_user.o memcpy.o memset.o strncpy_from_user.o \
- strlen.o strlen_user.o strnlen_user.o \
+L_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
+ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \
+ checksum.o clear_page.o csum_partial_copy.o copy_page.o \
+ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \
flush.o do_csum.o
+ifneq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y)
+ L_OBJS += memcpy.o memset.o strlen.o
+endif
+
LX_OBJS = io.o
-IGNORE_FLAGS_OBJS = __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
+IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
+ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
-include $(TOPDIR)/Rules.make
+$(L_TARGET):
+
+__divdi3.o: idiv64.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $<
+
+__udivdi3.o: idiv64.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $<
-__divdi3.o: idiv.S
- $(CC) $(AFLAGS) -c -o $@ $<
+__moddi3.o: idiv64.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $<
-__udivdi3.o: idiv.S
- $(CC) $(AFLAGS) -c -DUNSIGNED -c -o $@ $<
+__umoddi3.o: idiv64.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $<
-__moddi3.o: idiv.S
- $(CC) $(AFLAGS) -c -DMODULO -c -o $@ $<
+__divsi3.o: idiv32.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $<
-__umoddi3.o: idiv.S
- $(CC) $(AFLAGS) -c -DMODULO -DUNSIGNED -c -o $@ $<
+__udivsi3.o: idiv32.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $<
+
+__modsi3.o: idiv32.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $<
+
+__umodsi3.o: idiv32.S
+ $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $<
+
+include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/lib/idiv.S linux/arch/ia64/lib/idiv.S
--- v2.4.0-test9/linux/arch/ia64/lib/idiv.S Fri Jul 14 16:08:12 2000
+++ linux/arch/ia64/lib/idiv.S Wed Dec 31 16:00:00 1969
@@ -1,98 +0,0 @@
-/*
- * Integer division routine.
- *
- * Copyright (C) 1999-2000 Hewlett-Packard Co
- * Copyright (C) 1999-2000 David Mosberger-Tang
- */
-
-#include
-
-/*
- * Compute a 64-bit unsigned integer quotient.
- *
- * Use reciprocal approximation and Newton-Raphson iteration to compute the
- * quotient. frcpa gives 8.6 significant bits, so we need 3 iterations
- * to get more than the 64 bits of precision that we need for DImode.
- *
- * Must use max precision for the reciprocal computations to get 64 bits of
- * precision.
- *
- * r32 holds the dividend. r33 holds the divisor.
- */
-
-#ifdef MODULO
-# define OP mod
-#else
-# define OP div
-#endif
-
-#ifdef UNSIGNED
-# define SGN u
-# define INT_TO_FP(a,b) fcvt.xuf.s1 a=b
-# define FP_TO_INT(a,b) fcvt.fxu.trunc.s1 a=b
-#else
-# define SGN
-# define INT_TO_FP(a,b) fcvt.xf a=b
-# define FP_TO_INT(a,b) fcvt.fx.trunc.s1 a=b
-#endif
-
-#define PASTE1(a,b) a##b
-#define PASTE(a,b) PASTE1(a,b)
-#define NAME PASTE(PASTE(__,SGN),PASTE(OP,di3))
-
-GLOBAL_ENTRY(NAME)
- UNW(.prologue)
- .regstk 2,0,0,0
- // Transfer inputs to FP registers.
- setf.sig f8 = in0
- setf.sig f9 = in1
- UNW(.fframe 16)
- UNW(.save.f 0x20)
- stf.spill [sp] = f17,-16
-
- // Convert the inputs to FP, to avoid FP software-assist faults.
- INT_TO_FP(f8, f8)
- ;;
-
- UNW(.save.f 0x10)
- stf.spill [sp] = f16
- UNW(.body)
- INT_TO_FP(f9, f9)
- ;;
- frcpa.s1 f17, p6 = f8, f9 // y = frcpa(b)
- ;;
- /*
- * This is the magic algorithm described in Section 8.6.2 of "IA-64
- * and Elementary Functions" by Peter Markstein; HP Professional Books
- * (http://www.hp.com/go/retailbooks/)
- */
-(p6) fmpy.s1 f7 = f8, f17 // q = a*y
-(p6) fnma.s1 f6 = f9, f17, f1 // e = -b*y + 1
- ;;
-(p6) fma.s1 f16 = f7, f6, f7 // q1 = q*e + q
-(p6) fmpy.s1 f7 = f6, f6 // e1 = e*e
- ;;
-(p6) fma.s1 f16 = f16, f7, f16 // q2 = q1*e1 + q1
-(p6) fma.s1 f6 = f17, f6, f17 // y1 = y*e + y
- ;;
-(p6) fma.s1 f6 = f6, f7, f6 // y2 = y1*e1 + y1
-(p6) fnma.s1 f7 = f9, f16, f8 // r = -b*q2 + a
- ;;
-(p6) fma.s1 f17 = f7, f6, f16 // q3 = r*y2 + q2
- ;;
-#ifdef MODULO
- FP_TO_INT(f17, f17) // round quotient to an unsigned integer
- ;;
- INT_TO_FP(f17, f17) // renormalize
- ;;
- fnma.s1 f17 = f17, f9, f8 // compute remainder
- ;;
-#endif
- UNW(.restore sp)
- ldf.fill f16 = [sp], 16
- FP_TO_INT(f8, f17) // round result to an (unsigned) integer
- ;;
- ldf.fill f17 = [sp]
- getf.sig r8 = f8 // transfer result to result register
- br.ret.sptk rp
-END(NAME)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/lib/idiv32.S linux/arch/ia64/lib/idiv32.S
--- v2.4.0-test9/linux/arch/ia64/lib/idiv32.S Wed Dec 31 16:00:00 1969
+++ linux/arch/ia64/lib/idiv32.S Mon Oct 9 17:54:56 2000
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2000 Hewlett-Packard Co
+ * Copyright (C) 2000 David Mosberger-Tang
+ *
+ * 32-bit integer division.
+ *
+ * This code is based on the application note entitled "Divide, Square Root
+ * and Remainder Algorithms for the IA-64 Architecture". This document
+ * is available as Intel document number 248725-002 or via the web at
+ * http://developer.intel.com/software/opensource/numerics/
+ *
+ * For more details on the theory behind these algorithms, see "IA-64
+ * and Elementary Functions" by Peter Markstein; HP Professional Books
+ * (http://www.hp.com/go/retailbooks/)
+ */
+
+#include
+
+#ifdef MODULO
+# define OP mod
+#else
+# define OP div
+#endif
+
+#ifdef UNSIGNED
+# define SGN u
+# define EXTEND zxt4
+# define INT_TO_FP(a,b) fcvt.xuf.s1 a=b
+# define FP_TO_INT(a,b) fcvt.fxu.trunc.s1 a=b
+#else
+# define SGN
+# define EXTEND sxt4
+# define INT_TO_FP(a,b) fcvt.xf a=b
+# define FP_TO_INT(a,b) fcvt.fx.trunc.s1 a=b
+#endif
+
+#define PASTE1(a,b) a##b
+#define PASTE(a,b) PASTE1(a,b)
+#define NAME PASTE(PASTE(__,SGN),PASTE(OP,si3))
+
+GLOBAL_ENTRY(NAME)
+ .regstk 2,0,0,0
+ // Transfer inputs to FP registers.
+ mov r2 = 0xffdd // r2 = -34 + 65535 (fp reg format bias)
+ EXTEND in0 = in0 // in0 = a
+ EXTEND in1 = in1 // in1 = b
+ ;;
+ setf.sig f8 = in0
+ setf.sig f9 = in1
+#ifdef MODULO
+ sub in1 = r0, in1 // in1 = -b
+#endif
+ ;;
+ // Convert the inputs to FP, to avoid FP software-assist faults.
+ INT_TO_FP(f8, f8)
+ INT_TO_FP(f9, f9)
+ ;;
+ setf.exp f7 = r2 // f7 = 2^-34
+ frcpa.s1 f6, p6 = f8, f9 // y0 = frcpa(b)
+ ;;
+(p6) fmpy.s1 f8 = f8, f6 // q0 = a*y0
+(p6) fnma.s1 f6 = f9, f6, f1 // e0 = -b*y0 + 1
+ ;;
+#ifdef MODULO
+ setf.sig f9 = in1 // f9 = -b
+#endif
+(p6) fma.s1 f8 = f6, f8, f8 // q1 = e0*q0 + q0
+(p6) fma.s1 f6 = f6, f6, f7 // e1 = e0*e0 + 2^-34
+ ;;
+#ifdef MODULO
+ setf.sig f7 = in0
+#endif
+(p6) fma.s1 f6 = f6, f8, f8 // q2 = e1*q1 + q1
+ ;;
+ FP_TO_INT(f6, f6) // q = trunc(q2)
+ ;;
+#ifdef MODULO
+ xma.l f6 = f6, f9, f7 // r = q*(-b) + a
+ ;;
+#endif
+ getf.sig r8 = f6 // transfer result to result register
+ br.ret.sptk rp
+END(NAME)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/lib/idiv64.S linux/arch/ia64/lib/idiv64.S
--- v2.4.0-test9/linux/arch/ia64/lib/idiv64.S Wed Dec 31 16:00:00 1969
+++ linux/arch/ia64/lib/idiv64.S Mon Oct 9 17:54:56 2000
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 1999-2000 Hewlett-Packard Co
+ * Copyright (C) 1999-2000 David Mosberger-Tang
+ *
+ * 64-bit integer division.
+ *
+ * This code is based on the application note entitled "Divide, Square Root
+ * and Remainder Algorithms for the IA-64 Architecture". This document
+ * is available as Intel document number 248725-002 or via the web at
+ * http://developer.intel.com/software/opensource/numerics/
+ *
+ * For more details on the theory behind these algorithms, see "IA-64
+ * and Elementary Functions" by Peter Markstein; HP Professional Books
+ * (http://www.hp.com/go/retailbooks/)
+ */
+
+#include
+
+#ifdef MODULO
+# define OP mod
+#else
+# define OP div
+#endif
+
+#ifdef UNSIGNED
+# define SGN u
+# define INT_TO_FP(a,b) fcvt.xuf.s1 a=b
+# define FP_TO_INT(a,b) fcvt.fxu.trunc.s1 a=b
+#else
+# define SGN
+# define INT_TO_FP(a,b) fcvt.xf a=b
+# define FP_TO_INT(a,b) fcvt.fx.trunc.s1 a=b
+#endif
+
+#define PASTE1(a,b) a##b
+#define PASTE(a,b) PASTE1(a,b)
+#define NAME PASTE(PASTE(__,SGN),PASTE(OP,di3))
+
+GLOBAL_ENTRY(NAME)
+ UNW(.prologue)
+ .regstk 2,0,0,0
+ // Transfer inputs to FP registers.
+ setf.sig f8 = in0
+ setf.sig f9 = in1
+ UNW(.fframe 16)
+ UNW(.save.f 0x20)
+ stf.spill [sp] = f17,-16
+
+ // Convert the inputs to FP, to avoid FP software-assist faults.
+ INT_TO_FP(f8, f8)
+ ;;
+
+ UNW(.save.f 0x10)
+ stf.spill [sp] = f16
+ UNW(.body)
+ INT_TO_FP(f9, f9)
+ ;;
+ frcpa.s1 f17, p6 = f8, f9 // y0 = frcpa(b)
+ ;;
+(p6) fmpy.s1 f7 = f8, f17 // q0 = a*y0
+(p6) fnma.s1 f6 = f9, f17, f1 // e0 = -b*y0 + 1
+ ;;
+(p6) fma.s1 f16 = f7, f6, f7 // q1 = q0*e0 + q0
+(p6) fmpy.s1 f7 = f6, f6 // e1 = e0*e0
+ ;;
+#ifdef MODULO
+ sub in1 = r0, in1 // in1 = -b
+#endif
+(p6) fma.s1 f16 = f16, f7, f16 // q2 = q1*e1 + q1
+(p6) fma.s1 f6 = f17, f6, f17 // y1 = y0*e0 + y0
+ ;;
+(p6) fma.s1 f6 = f6, f7, f6 // y2 = y1*e1 + y1
+(p6) fnma.s1 f7 = f9, f16, f8 // r = -b*q2 + a
+ ;;
+#ifdef MODULO
+ setf.sig f8 = in0 // f8 = a
+ setf.sig f9 = in1 // f9 = -b
+#endif
+(p6) fma.s1 f17 = f7, f6, f16 // q3 = r*y2 + q2
+ ;;
+ UNW(.restore sp)
+ ldf.fill f16 = [sp], 16
+ FP_TO_INT(f17, f17) // q = trunc(q3)
+ ;;
+#ifdef MODULO
+ xma.l f17 = f17, f9, f8 // r = q*(-b) + a
+ ;;
+#endif
+ getf.sig r8 = f17 // transfer result to result register
+ ldf.fill f17 = [sp]
+ br.ret.sptk rp
+END(NAME)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/lib/io.c linux/arch/ia64/lib/io.c
--- v2.4.0-test9/linux/arch/ia64/lib/io.c Thu Jun 22 07:09:44 2000
+++ linux/arch/ia64/lib/io.c Mon Oct 9 17:54:56 2000
@@ -1,4 +1,3 @@
-#include
#include
#include
@@ -49,6 +48,3 @@
}
}
-EXPORT_SYMBOL(__ia64_memcpy_fromio);
-EXPORT_SYMBOL(__ia64_memcpy_toio);
-EXPORT_SYMBOL(__ia64_memset_c_io);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/mm/init.c linux/arch/ia64/mm/init.c
--- v2.4.0-test9/linux/arch/ia64/mm/init.c Fri Aug 11 19:09:06 2000
+++ linux/arch/ia64/mm/init.c Mon Oct 9 17:54:56 2000
@@ -357,6 +357,7 @@
panic("mm/init: overlap between virtually mapped linear page table and "
"mapped kernel space!");
pta = POW2(61) - POW2(impl_va_msb);
+#ifndef CONFIG_DISABLE_VHPT
/*
* Set the (virtually mapped linear) page table address. Bit
* 8 selects between the short and long format, bits 2-7 the
@@ -364,6 +365,9 @@
* enabled.
*/
ia64_set_pta(pta | (0<<8) | ((3*(PAGE_SHIFT-3)+3)<<2) | 1);
+#else
+ ia64_set_pta(pta | (0<<8) | ((3*(PAGE_SHIFT-3)+3)<<2) | 0);
+#endif
}
/*
@@ -444,15 +448,6 @@
/* install the gate page in the global page table: */
put_gate_page(virt_to_page(__start_gate_section), GATE_ADDR);
-
-#ifndef CONFIG_IA64_SOFTSDV_HACKS
- /*
- * (Some) SoftSDVs seem to have a problem with this call.
- * Since it's mostly a performance optimization, just don't do
- * it for now... --davidm 99/12/6
- */
- efi_enter_virtual_mode();
-#endif
#ifdef CONFIG_IA32_SUPPORT
ia32_gdt_init();
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ia64/tools/Makefile linux/arch/ia64/tools/Makefile
--- v2.4.0-test9/linux/arch/ia64/tools/Makefile Fri Jul 14 16:08:12 2000
+++ linux/arch/ia64/tools/Makefile Mon Oct 9 17:54:57 2000
@@ -46,4 +46,4 @@
endif
-.PHONY: all modules
+.PHONY: all modules modules_install
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/amiga/amiga_ksyms.c linux/arch/m68k/amiga/amiga_ksyms.c
--- v2.4.0-test9/linux/arch/m68k/amiga/amiga_ksyms.c Mon Jun 19 12:56:08 2000
+++ linux/arch/m68k/amiga/amiga_ksyms.c Mon Oct 16 12:51:16 2000
@@ -1,7 +1,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/amiga/chipram.c linux/arch/m68k/amiga/chipram.c
--- v2.4.0-test9/linux/arch/m68k/amiga/chipram.c Mon Jun 19 12:56:08 2000
+++ linux/arch/m68k/amiga/chipram.c Mon Oct 16 12:51:16 2000
@@ -8,7 +8,7 @@
#include
#include
#include
-#include
+#include
#include
struct chip_desc {
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/amiga/config.c linux/arch/m68k/amiga/config.c
--- v2.4.0-test9/linux/arch/m68k/amiga/config.c Wed Jan 26 12:44:20 2000
+++ linux/arch/m68k/amiga/config.c Mon Oct 16 12:51:16 2000
@@ -20,7 +20,9 @@
#include
#include
#include
+#ifdef CONFIG_ZORRO
#include
+#endif
#include
#include
@@ -89,17 +91,10 @@
#endif
static struct console amiga_console_driver = {
- "debug",
- NULL, /* write */
- NULL, /* read */
- NULL, /* device */
- amiga_wait_key, /* wait_key */
- NULL, /* unblank */
- NULL, /* setup */
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ wait_key: amiga_wait_key,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
#ifdef CONFIG_MAGIC_SYSRQ
@@ -168,6 +163,7 @@
break;
case BI_AMIGA_AUTOCON:
+#ifdef CONFIG_ZORRO
if (zorro_num_autocon < ZORRO_NUM_AUTO) {
const struct ConfigDev *cd = (struct ConfigDev *)data;
struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++];
@@ -178,6 +174,7 @@
dev->resource.end = dev->resource.start+cd->cd_BoardSize-1;
} else
printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
+#endif
break;
case BI_AMIGA_SERPER:
@@ -1004,11 +1001,13 @@
AMIGAHW_ANNOUNCE(ALICE_NTSC, "NTSC Alice 8374");
AMIGAHW_ANNOUNCE(MAGIC_REKICK, "Magic Hard Rekick");
AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot");
+#ifdef CONFIG_ZORRO
if (AMIGAHW_PRESENT(ZORRO))
len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion "
"Device%s\n",
AMIGAHW_PRESENT(ZORRO3) ? "I" : "",
zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s");
+#endif
#undef AMIGAHW_ANNOUNCE
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/atari/debug.c linux/arch/m68k/atari/debug.c
--- v2.4.0-test9/linux/arch/m68k/atari/debug.c Mon Jan 31 10:32:53 2000
+++ linux/arch/m68k/atari/debug.c Thu Oct 12 14:20:48 2000
@@ -31,17 +31,9 @@
int atari_SCC_reset_done = 0;
static struct console atari_console_driver = {
- "debug",
- NULL, /* write */
- NULL, /* read */
- NULL, /* device */
- NULL, /* wait_key */
- NULL, /* unblank */
- NULL, /* setup */
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/config.in linux/arch/m68k/config.in
--- v2.4.0-test9/linux/arch/m68k/config.in Sun Oct 8 10:50:06 2000
+++ linux/arch/m68k/config.in Mon Oct 16 12:51:16 2000
@@ -139,9 +139,8 @@
fi
fi
-if [ "$CONFIG_PCI" = "y" ]; then
- source drivers/pci/Config.in
-fi
+source drivers/pci/Config.in
+source drivers/zorro/Config.in
endmenu
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/kernel/semaphore.c linux/arch/m68k/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/m68k/kernel/semaphore.c Wed Jan 26 12:44:20 2000
+++ linux/arch/m68k/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -182,7 +182,7 @@
while (atomic_read(&sem->count) < 0) {
set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/kernel/setup.c linux/arch/m68k/kernel/setup.c
--- v2.4.0-test9/linux/arch/m68k/kernel/setup.c Mon Jun 19 12:56:08 2000
+++ linux/arch/m68k/kernel/setup.c Mon Oct 16 15:25:46 2000
@@ -68,13 +68,13 @@
char m68k_debug_device[6] = "";
-void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata;
+void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent keyboard functions */
-int (*mach_keyb_init) (void) __initdata;
+int (*mach_keyb_init) (void) __initdata = NULL;
int (*mach_kbdrate) (struct kbd_repeat *) = NULL;
void (*mach_kbd_leds) (unsigned int) = NULL;
/* machine dependent irq functions */
-void (*mach_init_IRQ) (void) __initdata;
+void (*mach_init_IRQ) (void) __initdata = NULL;
void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
void (*mach_get_model) (char *model) = NULL;
int (*mach_get_hardware_list) (char *buffer) = NULL;
@@ -365,7 +365,7 @@
high_memory += m68k_memory[i].size;
}
- availmem += init_bootmem_node(0, availmem >> PAGE_SHIFT,
+ availmem += init_bootmem_node(NODE_DATA(0), availmem >> PAGE_SHIFT,
startmem >> PAGE_SHIFT, endmem >> PAGE_SHIFT);
for (i = 0; i < m68k_num_memory; i++)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/mac/config.c linux/arch/m68k/mac/config.c
--- v2.4.0-test9/linux/arch/m68k/mac/config.c Sun Feb 13 11:21:42 2000
+++ linux/arch/m68k/mac/config.c Mon Oct 16 12:53:18 2000
@@ -127,7 +127,6 @@
}
#endif
-extern struct consw fb_con;
extern struct fb_info *mac_fb_init(long *);
extern void mac_default_handler(int, void *, struct pt_regs *);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/mac/debug.c linux/arch/m68k/mac/debug.c
--- v2.4.0-test9/linux/arch/m68k/mac/debug.c Mon Jan 31 10:32:53 2000
+++ linux/arch/m68k/mac/debug.c Thu Oct 12 14:20:48 2000
@@ -159,17 +159,9 @@
static int scc_port = -1;
static struct console mac_console_driver = {
- "debug",
- NULL, /* write */
- NULL, /* read */
- NULL, /* device */
- NULL, /* wait_key */
- NULL, /* unblank */
- NULL, /* setup */
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/mm/init.c linux/arch/m68k/mm/init.c
--- v2.4.0-test9/linux/arch/m68k/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/m68k/mm/init.c Mon Oct 16 12:58:51 2000
@@ -32,7 +32,7 @@
#include
#endif
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
#ifdef CONFIG_SUN3
void mmu_emu_reserve_pages(unsigned long max_page);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/m68k/q40/config.c linux/arch/m68k/q40/config.c
--- v2.4.0-test9/linux/arch/m68k/q40/config.c Thu Aug 26 12:42:31 1999
+++ linux/arch/m68k/q40/config.c Thu Oct 12 14:20:48 2000
@@ -74,17 +74,10 @@
static int q40_wait_key(struct console *co){return 0;}
static struct console q40_console_driver = {
- "debug",
- NULL, /* write */
- NULL, /* read */
- NULL, /* device */
- q40_wait_key, /* wait_key */
- NULL, /* unblank */
- NULL, /* setup */
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ wait_key: q40_wait_key,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/baget/vacserial.c linux/arch/mips/baget/vacserial.c
--- v2.4.0-test9/linux/arch/mips/baget/vacserial.c Sun Oct 8 10:50:06 2000
+++ linux/arch/mips/baget/vacserial.c Thu Oct 12 14:20:48 2000
@@ -2811,17 +2811,13 @@
}
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/dec/promcon.c linux/arch/mips/dec/promcon.c
--- v2.4.0-test9/linux/arch/mips/dec/promcon.c Thu Aug 26 12:42:31 1999
+++ linux/arch/mips/dec/promcon.c Thu Oct 12 14:20:48 2000
@@ -47,17 +47,13 @@
static struct console sercons =
{
- "ttyS",
- prom_console_write,
- NULL,
- prom_console_device,
- prom_console_wait_key,
- NULL,
- prom_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: prom_console_write,
+ device: prom_console_device,
+ wait_key: prom_console_wait_key,
+ setup: prom_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/dec/time.c linux/arch/mips/dec/time.c
--- v2.4.0-test9/linux/arch/mips/dec/time.c Sun Oct 8 10:50:06 2000
+++ linux/arch/mips/dec/time.c Mon Oct 16 12:58:51 2000
@@ -39,7 +39,7 @@
/* Cycle counter value at the previous timer interrupt.. */
-static unsigned int timerhi = 0, timerlo = 0;
+static unsigned int timerhi, timerlo;
/*
* On MIPS only R4000 and better have a cycle counter.
@@ -269,7 +269,7 @@
}
/* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
/*
* timer_interrupt() needs to keep up the real-time clock,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/kernel/time.c linux/arch/mips/kernel/time.c
--- v2.4.0-test9/linux/arch/mips/kernel/time.c Sun Oct 8 10:50:07 2000
+++ linux/arch/mips/kernel/time.c Mon Oct 16 12:58:51 2000
@@ -26,7 +26,7 @@
#include
extern volatile unsigned long wall_jiffies;
-unsigned long r4k_interval = 0;
+unsigned long r4k_interval;
extern rwlock_t xtime_lock;
/*
@@ -40,7 +40,7 @@
/* Cycle counter value at the previous timer interrupt.. */
-static unsigned int timerhi = 0, timerlo = 0;
+static unsigned int timerhi, timerlo;
/*
* On MIPS only R4000 and better have a cycle counter.
@@ -53,14 +53,14 @@
unsigned long res, tmp;
/* Last jiffy when do_fast_gettimeoffset() was called. */
- static unsigned long last_jiffies=0;
+ static unsigned long last_jiffies;
unsigned long quotient;
/*
* Cached "1/(clocks per usec)*2^32" value.
* It has to be recalculated once each jiffy.
*/
- static unsigned long cached_quotient=0;
+ static unsigned long cached_quotient;
tmp = jiffies;
@@ -154,7 +154,7 @@
int count;
static int count_p = LATCH; /* for the first call after boot */
- static unsigned long jiffies_p = 0;
+ static unsigned long jiffies_p;
/*
* cache volatile jiffies temporarily; we have IRQs turned off.
@@ -330,7 +330,7 @@
}
/* last time the cmos clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
/*
* timer_interrupt() needs to keep up the real-time clock,
@@ -340,7 +340,7 @@
timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
#ifdef CONFIG_DDB5074
- static unsigned cnt = 0, period = 0, dist = 0;
+ static unsigned cnt, period, dist;
if (cnt == 0 || cnt == dist)
ddb5074_led_d2(1);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/mm/init.c linux/arch/mips/mm/init.c
--- v2.4.0-test9/linux/arch/mips/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/mips/mm/init.c Mon Oct 16 12:58:51 2000
@@ -39,7 +39,7 @@
#endif
#include
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
extern void prom_fixup_mem_map(unsigned long start, unsigned long end);
extern void prom_free_prom_memory(void);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/orion/promcon.c linux/arch/mips/orion/promcon.c
--- v2.4.0-test9/linux/arch/mips/orion/promcon.c Tue Jul 11 11:14:48 2000
+++ linux/arch/mips/orion/promcon.c Thu Oct 12 14:20:48 2000
@@ -68,17 +68,13 @@
static struct console sercons =
{
- "ttyS",
- prom_console_write,
- NULL,
- prom_console_device,
- prom_console_wait_key,
- NULL,
- prom_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: prom_console_write,
+ device: prom_console_device,
+ wait_key: prom_console_wait_key,
+ setup: prom_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/sgi/kernel/indy_timer.c linux/arch/mips/sgi/kernel/indy_timer.c
--- v2.4.0-test9/linux/arch/mips/sgi/kernel/indy_timer.c Sun Oct 8 10:50:07 2000
+++ linux/arch/mips/sgi/kernel/indy_timer.c Mon Oct 16 12:58:51 2000
@@ -79,8 +79,8 @@
return retval;
}
-static long last_rtc_update = 0;
-unsigned long missed_heart_beats = 0;
+static long last_rtc_update;
+unsigned long missed_heart_beats;
void indy_timer_interrupt(struct pt_regs *regs)
{
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips/sgi/kernel/promcon.c linux/arch/mips/sgi/kernel/promcon.c
--- v2.4.0-test9/linux/arch/mips/sgi/kernel/promcon.c Sat May 13 08:29:14 2000
+++ linux/arch/mips/sgi/kernel/promcon.c Thu Oct 12 14:20:48 2000
@@ -49,17 +49,13 @@
static struct console sercons =
{
- "ttyS",
- prom_console_write,
- NULL,
- prom_console_device,
- prom_console_wait_key,
- NULL,
- prom_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: prom_console_write,
+ device: prom_console_device,
+ wait_key: prom_console_wait_key,
+ setup: prom_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/kernel/smp.c linux/arch/mips64/kernel/smp.c
--- v2.4.0-test9/linux/arch/mips64/kernel/smp.c Thu Jul 27 18:36:54 2000
+++ linux/arch/mips64/kernel/smp.c Mon Oct 16 12:58:51 2000
@@ -54,7 +54,7 @@
/* The 'big kernel lock' */
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
-int smp_threads_ready = 0; /* Not used */
+int smp_threads_ready; /* Not used */
atomic_t smp_commenced = ATOMIC_INIT(0);
struct cpuinfo_mips cpu_data[NR_CPUS];
int smp_num_cpus; /* Number that came online. */
@@ -130,7 +130,7 @@
atomic_t started;
atomic_t finished;
int wait;
-} *call_data = NULL;
+} *call_data;
int smp_call_function (void (*func) (void *info), void *info, int retry,
int wait)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/mm/init.c linux/arch/mips64/mm/init.c
--- v2.4.0-test9/linux/arch/mips64/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/mips64/mm/init.c Mon Oct 16 12:58:51 2000
@@ -38,7 +38,7 @@
#endif
#include
-unsigned long totalram_pages = 0;
+unsigned long totalram_pages;
void __bad_pte_kernel(pmd_t *pmd)
{
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/sgi-ip22/ip22-timer.c linux/arch/mips64/sgi-ip22/ip22-timer.c
--- v2.4.0-test9/linux/arch/mips64/sgi-ip22/ip22-timer.c Sun Oct 8 10:50:07 2000
+++ linux/arch/mips64/sgi-ip22/ip22-timer.c Mon Oct 16 12:58:51 2000
@@ -79,8 +79,8 @@
return retval;
}
-static long last_rtc_update = 0;
-unsigned long missed_heart_beats = 0;
+static long last_rtc_update;
+unsigned long missed_heart_beats;
void indy_timer_interrupt(struct pt_regs *regs)
{
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-memory.c linux/arch/mips64/sgi-ip27/ip27-memory.c
--- v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-memory.c Thu Sep 7 08:44:50 2000
+++ linux/arch/mips64/sgi-ip27/ip27-memory.c Mon Oct 16 15:25:46 2000
@@ -200,11 +200,11 @@
<< PAGE_SHIFT));
NODE_DATA(node)->bdata = plat_node_bdata + node;
slot_freepfn += node_datasz;
- bootmap_size = init_bootmem_node(node, slot_freepfn,
+ bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn,
slot_firstpfn, slot_lastpfn);
- free_bootmem_node(node, slot_firstpfn << PAGE_SHIFT,
+ free_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
(slot_lastpfn - slot_firstpfn) << PAGE_SHIFT);
- reserve_bootmem_node(node, slot_firstpfn << PAGE_SHIFT,
+ reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size);
}
printk("Total memory probed : 0x%lx pages\n", numpages);
@@ -278,7 +278,7 @@
/*
* This will free up the bootmem, ie, slot 0 memory.
*/
- totalram_pages += free_all_bootmem_node(nid);
+ totalram_pages += free_all_bootmem_node(NODE_DATA(nid));
/*
* We need to manually do the other slots.
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-rtc.c linux/arch/mips64/sgi-ip27/ip27-rtc.c
--- v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-rtc.c Wed Jul 12 21:58:42 2000
+++ linux/arch/mips64/sgi-ip27/ip27-rtc.c Mon Oct 16 12:58:51 2000
@@ -60,8 +60,8 @@
#define RTC_IS_OPEN 0x01 /* means /dev/rtc is in use */
#define RTC_TIMER_ON 0x02 /* missed irq timer active */
-static unsigned char rtc_status = 0; /* bitmapped status byte. */
-static unsigned long rtc_freq = 0; /* Current periodic IRQ rate */
+static unsigned char rtc_status; /* bitmapped status byte. */
+static unsigned long rtc_freq; /* Current periodic IRQ rate */
static struct m48t35_rtc *rtc;
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-timer.c linux/arch/mips64/sgi-ip27/ip27-timer.c
--- v2.4.0-test9/linux/arch/mips64/sgi-ip27/ip27-timer.c Sun Oct 8 10:50:07 2000
+++ linux/arch/mips64/sgi-ip27/ip27-timer.c Mon Oct 16 12:58:51 2000
@@ -36,7 +36,7 @@
#define CYCLES_PER_JIFFY (CYCLES_PER_SEC/HZ)
static unsigned long ct_cur[NR_CPUS]; /* What counter should be at next timer irq */
-static long last_rtc_update = 0; /* Last time the rtc clock got updated */
+static long last_rtc_update; /* Last time the rtc clock got updated */
extern rwlock_t xtime_lock;
extern volatile unsigned long wall_jiffies;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/8260_io/uart.c linux/arch/ppc/8260_io/uart.c
--- v2.4.0-test9/linux/arch/ppc/8260_io/uart.c Sun Oct 8 10:50:07 2000
+++ linux/arch/ppc/8260_io/uart.c Thu Oct 12 14:20:48 2000
@@ -2268,17 +2268,13 @@
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- CONFIG_SERIAL_CONSOLE_PORT,
- 0,
- NULL
+ name: "ttyS",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: CONFIG_SERIAL_CONSOLE_PORT,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/8xx_io/uart.c linux/arch/ppc/8xx_io/uart.c
--- v2.4.0-test9/linux/arch/ppc/8xx_io/uart.c Thu Jul 13 09:42:50 2000
+++ linux/arch/ppc/8xx_io/uart.c Thu Oct 12 14:20:48 2000
@@ -2407,17 +2407,13 @@
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- CONFIG_SERIAL_CONSOLE_PORT,
- 0,
- NULL
+ name: "ttyS",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: CONFIG_SERIAL_CONSOLE_PORT,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/amiga/config.c linux/arch/ppc/amiga/config.c
--- v2.4.0-test9/linux/arch/ppc/amiga/config.c Wed Nov 10 22:18:38 1999
+++ linux/arch/ppc/amiga/config.c Thu Oct 12 14:20:48 2000
@@ -97,17 +97,10 @@
#endif
static struct console amiga_console_driver = {
- "debug",
- NULL, /* write */
- NULL, /* read */
- NULL, /* device */
- amiga_wait_key, /* wait_key */
- NULL, /* unblank */
- NULL, /* setup */
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ wait_key: amiga_wait_key,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
#ifdef CONFIG_MAGIC_SYSRQ
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/config.in linux/arch/ppc/config.in
--- v2.4.0-test9/linux/arch/ppc/config.in Sun Oct 8 10:50:07 2000
+++ linux/arch/ppc/config.in Mon Oct 16 12:51:16 2000
@@ -104,11 +104,11 @@
"$CONFIG_8260" = "y" ]; then
define_bool CONFIG_PCI n
else
- if [ "$CONFIG_6xx" = "y" -o "$CONFIG_PPC64BRIDGE" = "y" ]; then
- define_bool CONFIG_PCI y
+ if [ "$CONFIG_8xx" = "y" ]; then
+ bool 'QSpan PCI' CONFIG_PCI_QSPAN
+ define_bool CONFIG_PCI $CONFIG_PCI_QSPAN
else
- # CONFIG_8xx
- bool 'QSpan PCI' CONFIG_PCI
+ define_bool CONFIG_PCI y
fi
fi
@@ -126,6 +126,7 @@
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
source drivers/pci/Config.in
+source drivers/zorro/Config.in
bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
@@ -151,7 +152,7 @@
fi
if [ "$CONFIG_PREP" = "y" -o "$CONFIG_ALL_PPC" = "y" ]; then
- bool 'PReP bootloader kernel arguments' CONFIG_CMDLINE_BOOL y
+ bool 'PReP bootloader kernel arguments' CONFIG_CMDLINE_BOOL
if [ "$CONFIG_CMDLINE_BOOL" = "y" ] ; then
string 'Initial kernel command string' CONFIG_CMDLINE "console=ttyS0,9600 console=tty0 root=/dev/sda2"
fi
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/kernel/apus_setup.c linux/arch/ppc/kernel/apus_setup.c
--- v2.4.0-test9/linux/arch/ppc/kernel/apus_setup.c Sun Oct 8 10:50:07 2000
+++ linux/arch/ppc/kernel/apus_setup.c Sun Oct 8 09:33:07 2000
@@ -82,13 +82,13 @@
extern void amiga_init_IRQ(void);
-void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata;
+void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent keyboard functions */
-int (*mach_keyb_init) (void) __initdata;
+int (*mach_keyb_init) (void) __initdata = NULL;
int (*mach_kbdrate) (struct kbd_repeat *) __apusdata = NULL;
void (*mach_kbd_leds) (unsigned int) __apusdata = NULL;
/* machine dependent irq functions */
-void (*mach_init_IRQ) (void) __initdata;
+void (*mach_init_IRQ) (void) __initdata = NULL;
void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) __apusdata = NULL;
void (*mach_get_model) (char *model) __apusdata = NULL;
int (*mach_get_hardware_list) (char *buffer) __apusdata = NULL;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/kernel/prep_setup.c linux/arch/ppc/kernel/prep_setup.c
--- v2.4.0-test9/linux/arch/ppc/kernel/prep_setup.c Sun Oct 8 10:50:08 2000
+++ linux/arch/ppc/kernel/prep_setup.c Sun Oct 8 09:33:07 2000
@@ -384,8 +384,8 @@
* 2 following ones measure the interval. The precision of the method
* is still doubtful due to the short interval sampled.
*/
-static __initdata volatile int calibrate_steps = 3;
-static __initdata unsigned tbstamp;
+static volatile int calibrate_steps __initdata = 3;
+static unsigned tbstamp __initdata = 0;
void __init
prep_calibrate_decr_handler(int irq,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/kernel/smp.c linux/arch/ppc/kernel/smp.c
--- v2.4.0-test9/linux/arch/ppc/kernel/smp.c Sun Oct 8 10:50:08 2000
+++ linux/arch/ppc/kernel/smp.c Mon Oct 16 12:58:51 2000
@@ -41,8 +41,8 @@
#include
#include "open_pic.h"
-int smp_threads_ready = 0;
-volatile int smp_commenced = 0;
+int smp_threads_ready;
+volatile int smp_commenced;
int smp_num_cpus = 1;
struct cpuinfo_PPC cpu_data[NR_CPUS];
struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
@@ -54,10 +54,10 @@
cycles_t cacheflush_time;
/* this has to go in the data section because it is accessed from prom_init */
-int smp_hw_index[NR_CPUS] = {0};
+int smp_hw_index[NR_CPUS];
/* all cpu mappings are 1-1 -- Cort */
-volatile unsigned long cpu_callin_map[NR_CPUS] = {0,};
+volatile unsigned long cpu_callin_map[NR_CPUS];
int start_secondary(void *);
extern int cpu_idle(void *unused);
@@ -226,7 +226,7 @@
atomic_t started;
atomic_t finished;
int wait;
-} *call_data = NULL;
+} *call_data;
/*
* this function sends a 'generic call function' IPI to all other CPUs
diff -u --recursive --new-file v2.4.0-test9/linux/arch/ppc/mm/init.c linux/arch/ppc/mm/init.c
--- v2.4.0-test9/linux/arch/ppc/mm/init.c Sun Oct 8 10:50:10 2000
+++ linux/arch/ppc/mm/init.c Mon Oct 16 12:58:51 2000
@@ -82,8 +82,8 @@
int mem_init_done;
int init_bootmem_done;
int boot_mapsize;
-unsigned long totalram_pages = 0;
-unsigned long totalhigh_pages = 0;
+unsigned long totalram_pages;
+unsigned long totalhigh_pages;
extern pgd_t swapper_pg_dir[];
extern char _start[], _end[];
extern char etext[], _stext[];
@@ -138,10 +138,10 @@
char *klimit = _end;
struct mem_pieces phys_avail;
-PTE *Hash=0, *Hash_end;
-unsigned long Hash_size=0, Hash_mask;
+PTE *Hash, *Hash_end;
+unsigned long Hash_size, Hash_mask;
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
-unsigned long _SDR1=0;
+unsigned long _SDR1;
static void hash_init(void);
union ubat { /* BAT register values to be loaded */
@@ -195,7 +195,7 @@
* (i.e. page tables) instead of the bats.
* -- Cort
*/
-int __map_without_bats = 0;
+int __map_without_bats;
/* max amount of RAM to use */
unsigned long __max_memory;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/s390/config.in linux/arch/s390/config.in
--- v2.4.0-test9/linux/arch/s390/config.in Tue Aug 22 11:29:02 2000
+++ linux/arch/s390/config.in Sun Oct 8 09:30:41 2000
@@ -46,10 +46,15 @@
endmenu
source drivers/s390/Config.in
+
+mainmenu_option next_comment
+comment 'Character devices'
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
fi
+
+endmenu
if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in
diff -u --recursive --new-file v2.4.0-test9/linux/arch/s390/kernel/semaphore.c linux/arch/s390/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/s390/kernel/semaphore.c Fri May 12 11:41:45 2000
+++ linux/arch/s390/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -16,8 +16,8 @@
/*
* Semaphores are implemented using a two-way counter:
* The "count" variable is decremented for each process
- * that tries to aquire the semaphore, while the "sleeping"
- * variable is a count of such aquires.
+ * 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
@@ -242,7 +242,7 @@
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/s390/mm/init.c linux/arch/s390/mm/init.c
--- v2.4.0-test9/linux/arch/s390/mm/init.c Mon Aug 7 21:02:27 2000
+++ linux/arch/s390/mm/init.c Mon Oct 16 12:58:51 2000
@@ -36,7 +36,7 @@
#include
#include
-static unsigned long totalram_pages = 0;
+static unsigned long totalram_pages;
/*
* BAD_PAGE is the page that is used for page faults when linux
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/kernel/entry.S linux/arch/sh/kernel/entry.S
--- v2.4.0-test9/linux/arch/sh/kernel/entry.S Sun Oct 8 10:50:11 2000
+++ linux/arch/sh/kernel/entry.S Fri Oct 13 12:06:52 2000
@@ -149,52 +149,55 @@
.align 2
tlb_miss_load:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #0, $r5
.align 2
tlb_miss_store:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #1, $r5
.align 2
initial_page_write:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #1, $r5
.align 2
tlb_protection_violation_load:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
- mov.l 1f, $r0
- jmp @$r0
+ bra call_dpf
mov #0, $r5
.align 2
tlb_protection_violation_store:
- mov.l 2f, $r0
- mov.l @$r0, $r6
- mov $r15, $r4
+ bra call_dpf
+ mov #1, $r5
+
+call_dpf:
mov.l 1f, $r0
+ mov $r5, $r8
+ mov.l @$r0, $r6
+ mov $r6, $r9
+ mov.l 2f, $r0
+ sts $pr, $r10
+ jsr @$r0
+ mov $r15, $r4
+ !
+ tst #0xff, $r0
+ bf/s 0f
+ lds $r10, $pr
+ rts
+ nop
+0: STI()
+ mov.l 3f, $r0
+ mov $r9, $r6
+ mov $r8, $r5
jmp @$r0
- mov #1, $r5
+ mov $r15, $r4
.align 2
-1: .long SYMBOL_NAME(__do_page_fault)
-2: .long MMU_TEA
+1: .long MMU_TEA
+2: .long SYMBOL_NAME(__do_page_fault)
+3: .long SYMBOL_NAME(do_page_fault)
#if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS)
.align 2
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/kernel/semaphore.c linux/arch/sh/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/sh/kernel/semaphore.c Wed Aug 9 13:59:04 2000
+++ linux/arch/sh/kernel/semaphore.c Thu Oct 12 14:19:31 2000
@@ -253,7 +253,7 @@
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/kernel/setup.c linux/arch/sh/kernel/setup.c
--- v2.4.0-test9/linux/arch/sh/kernel/setup.c Wed Aug 9 13:59:04 2000
+++ linux/arch/sh/kernel/setup.c Mon Oct 16 15:25:46 2000
@@ -166,17 +166,13 @@
}
static struct console sh_console = {
- "bios",
- sh_console_write,
- NULL,
- sh_console_device,
- sh_console_wait_key,
- NULL,
- sh_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "bios",
+ write: sh_console_write,
+ device: sh_console_device,
+ wait_key: sh_console_wait_key,
+ setup: sh_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
void sh_console_init(void)
@@ -371,7 +367,7 @@
* bootstrap step all allocations (until the page allocator
* is intact) must be done via bootmem_alloc().
*/
- bootmap_size = init_bootmem_node(0, start_pfn,
+ bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
__MEMORY_START>>PAGE_SHIFT,
max_low_pfn);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/kernel/time.c linux/arch/sh/kernel/time.c
--- v2.4.0-test9/linux/arch/sh/kernel/time.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sh/kernel/time.c Mon Oct 16 12:58:51 2000
@@ -213,7 +213,7 @@
}
/* last time the RTC clock got updated */
-static long last_rtc_update = 0;
+static long last_rtc_update;
/*
* timer_interrupt() needs to keep up the real-time clock,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/mm/fault.c linux/arch/sh/mm/fault.c
--- v2.4.0-test9/linux/arch/sh/mm/fault.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sh/mm/fault.c Fri Oct 13 12:06:52 2000
@@ -231,8 +231,11 @@
goto no_context;
}
-static int __do_page_fault1(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long address)
+/*
+ * Called with interrupt disabled.
+ */
+asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
+ unsigned long address)
{
pgd_t *dir;
pmd_t *pmd;
@@ -240,8 +243,6 @@
pte_t entry;
if (address >= VMALLOC_START && address < VMALLOC_END)
- /* We can change the implementation of P3 area pte entries.
- set_pgdir and such. */
dir = pgd_offset_k(address);
else
dir = pgd_offset(current->mm, address);
@@ -273,23 +274,6 @@
set_pte(pte, entry);
update_mmu_cache(NULL, address, entry);
return 0;
-}
-
-/*
- * Called with interrupt disabled.
- */
-asmlinkage void __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long address)
-{
- /*
- * XXX: Could you please implement this (calling __do_page_fault1)
- * in assembler language in entry.S?
- */
- if (__do_page_fault1(regs, writeaccess, address) == 0)
- /* Done. */
- return;
- sti();
- do_page_fault(regs, writeaccess, address);
}
void update_mmu_cache(struct vm_area_struct * vma,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/mm/init.c linux/arch/sh/mm/init.c
--- v2.4.0-test9/linux/arch/sh/mm/init.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sh/mm/init.c Mon Oct 16 12:58:51 2000
@@ -40,8 +40,8 @@
*/
unsigned long mmu_context_cache;
-static unsigned long totalram_pages = 0;
-static unsigned long totalhigh_pages = 0;
+static unsigned long totalram_pages;
+static unsigned long totalhigh_pages;
extern unsigned long init_smp_mappings(unsigned long);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sh/mm/ioremap.c linux/arch/sh/mm/ioremap.c
--- v2.4.0-test9/linux/arch/sh/mm/ioremap.c Sun Mar 5 09:33:55 2000
+++ linux/arch/sh/mm/ioremap.c Fri Oct 13 12:06:52 2000
@@ -17,6 +17,9 @@
unsigned long phys_addr, unsigned long flags)
{
unsigned long end;
+ pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW |
+ _PAGE_DIRTY | _PAGE_ACCESSED |
+ _PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags);
address &= ~PMD_MASK;
end = address + size;
@@ -25,8 +28,7 @@
do {
if (!pte_none(*pte))
printk("remap_area_pte: page already exists\n");
- set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW |
- _PAGE_DIRTY | _PAGE_ACCESSED | flags)));
+ set_pte(pte, mk_pte_phys(phys_addr, pgprot));
address += PAGE_SIZE;
phys_addr += PAGE_SIZE;
pte++;
@@ -55,22 +57,21 @@
}
static int remap_area_pages(unsigned long address, unsigned long phys_addr,
- unsigned long size, unsigned long flags)
+ unsigned long size, unsigned long flags)
{
pgd_t * dir;
unsigned long end = address + size;
phys_addr -= address;
- dir = pgd_offset(&init_mm, address);
+ dir = pgd_offset_k(address);
flush_cache_all();
while (address < end) {
pmd_t *pmd = pmd_alloc_kernel(dir, address);
if (!pmd)
return -ENOMEM;
if (remap_area_pmd(pmd, address, end - address,
- phys_addr + address, flags))
+ phys_addr + address, flags))
return -ENOMEM;
- set_pgdir(address, *dir);
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/config.in linux/arch/sparc/config.in
--- v2.4.0-test9/linux/arch/sparc/config.in Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc/config.in Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.102 2000/08/23 05:59:28 davem Exp $
+# $Id: config.in,v 1.104 2000/10/04 09:01:38 anton Exp $
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/config-language.txt.
#
@@ -94,7 +94,7 @@
# bool ' LVM information in proc filesystem' CONFIG_LVM_PROC_FS Y
#fi
-include drivers/md/Config.in
+source drivers/md/Config.in
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/ebus.c linux/arch/sparc/kernel/ebus.c
--- v2.4.0-test9/linux/arch/sparc/kernel/ebus.c Thu Jun 22 07:21:12 2000
+++ linux/arch/sparc/kernel/ebus.c Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-/* $Id: ebus.c,v 1.10 2000/06/20 01:10:00 anton Exp $
+/* $Id: ebus.c,v 1.11 2000/10/10 01:07:38 davem Exp $
* ebus.c: PCI to EBus bridge device.
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
@@ -27,9 +27,6 @@
#ifdef CONFIG_SUN_OPENPROMIO
extern int openprom_init(void);
#endif
-#ifdef CONFIG_SPARCAUDIO
-extern int sparcaudio_init(void);
-#endif
#ifdef CONFIG_SUN_AUXIO
extern void auxio_probe(void);
#endif
@@ -374,9 +371,6 @@
openprom_init();
#endif
-#ifdef CONFIG_SPARCAUDIO
- sparcaudio_init();
-#endif
#ifdef CONFIG_SUN_BPP
bpp_init();
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/ioport.c linux/arch/sparc/kernel/ioport.c
--- v2.4.0-test9/linux/arch/sparc/kernel/ioport.c Thu Jun 22 07:21:12 2000
+++ linux/arch/sparc/kernel/ioport.c Fri Oct 13 12:08:01 2000
@@ -1,4 +1,4 @@
-/* $Id: ioport.c,v 1.39 2000/06/20 01:10:00 anton Exp $
+/* $Id: ioport.c,v 1.40 2000/10/10 09:44:46 anton Exp $
* ioport.c: Simple io mapping allocator.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -244,6 +244,7 @@
unsigned long plen;
plen = res->end - res->start + 1;
+ plen = (plen + PAGE_SIZE-1) & PAGE_MASK;
while (plen != 0) {
plen -= PAGE_SIZE;
(*_sparc_unmapioaddr)(res->start + plen);
@@ -323,7 +324,7 @@
return;
}
- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
printk("sbus_free_consistent: unaligned va %p\n", p);
return;
}
@@ -496,7 +497,7 @@
if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
free_pages(va, order);
- printk("sbus_alloc_consistent: no core\n");
+ printk("pci_alloc_consistent: no core\n");
return NULL;
}
memset((char*)res, 0, sizeof(struct resource));
@@ -546,18 +547,18 @@
if ((res = _sparc_find_resource(&_sparc_dvma,
(unsigned long)p)) == NULL) {
- printk("sbus_free_consistent: cannot free %p\n", p);
+ printk("pci_free_consistent: cannot free %p\n", p);
return;
}
- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
- printk("sbus_free_consistent: unaligned va %p\n", p);
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
+ printk("pci_free_consistent: unaligned va %p\n", p);
return;
}
n = (n + PAGE_SIZE-1) & PAGE_MASK;
if ((res->end-res->start)+1 != n) {
- printk("sbus_free_consistent: region 0x%lx asked 0x%lx\n",
+ printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
(long)((res->end-res->start)+1), (long)n);
return;
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
--- v2.4.0-test9/linux/arch/sparc/kernel/process.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/kernel/process.c Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.153 2000/09/06 00:45:01 davem Exp $
+/* $Id: process.c,v 1.154 2000/10/05 06:12:57 anton Exp $
* linux/arch/sparc/kernel/process.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -234,6 +234,7 @@
void smp_show_backtrace_all_cpus(void)
{
xc0((smpfunc_t) show_backtrace);
+ show_backtrace();
}
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/semaphore.c linux/arch/sparc/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/sparc/kernel/semaphore.c Mon Jan 3 12:01:31 2000
+++ linux/arch/sparc/kernel/semaphore.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: semaphore.c,v 1.2 1999/12/28 11:50:37 jj Exp $
+/* $Id: semaphore.c,v 1.3 2000/10/14 10:09:00 davem Exp $
* Generic semaphore code. Buyer beware. Do your own
* specific changes in
*/
@@ -218,7 +218,7 @@
while (sem->count < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (sem->count >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/setup.c linux/arch/sparc/kernel/setup.c
--- v2.4.0-test9/linux/arch/sparc/kernel/setup.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/kernel/setup.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.119 2000/08/31 10:24:17 anton Exp $
+/* $Id: setup.c,v 1.120 2000/10/14 10:09:00 davem Exp $
* linux/arch/sparc/kernel/setup.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -287,7 +287,9 @@
}
static struct console prom_console = {
- "PROM", prom_cons_write, 0, 0, 0, 0, 0, CON_PRINTBUFFER, 0, 0, 0
+ name: "PROM",
+ write: prom_cons_write,
+ flags: CON_PRINTBUFFER,
};
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/smp.c linux/arch/sparc/kernel/smp.c
--- v2.4.0-test9/linux/arch/sparc/kernel/smp.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/kernel/smp.c Tue Oct 10 10:33:51 2000
@@ -145,33 +145,33 @@
void smp_flush_cache_all(void)
{
xc0((smpfunc_t) BTFIXUP_CALL(local_flush_cache_all));
+ local_flush_cache_all();
}
void smp_flush_tlb_all(void)
{
xc0((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_all));
+ local_flush_tlb_all();
}
void smp_flush_cache_mm(struct mm_struct *mm)
{
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_cache_mm(mm);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc1((smpfunc_t) BTFIXUP_CALL(local_flush_cache_mm), (unsigned long) mm);
+ local_flush_cache_mm(mm);
}
}
void smp_flush_tlb_mm(struct mm_struct *mm)
{
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id())) {
- local_flush_tlb_mm(mm);
- } else {
+ if(mm->cpu_vm_mask != (1 << smp_processor_id())) {
xc1((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_mm), (unsigned long) mm);
if(atomic_read(&mm->mm_users) == 1 && current->active_mm == mm)
mm->cpu_vm_mask = (1 << smp_processor_id());
}
+ local_flush_tlb_mm(mm);
}
}
@@ -179,10 +179,9 @@
unsigned long end)
{
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_cache_range(mm, start, end);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc3((smpfunc_t) BTFIXUP_CALL(local_flush_cache_range), (unsigned long) mm, start, end);
+ local_flush_cache_range(mm, start, end);
}
}
@@ -190,10 +189,9 @@
unsigned long end)
{
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_tlb_range(mm, start, end);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc3((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_range), (unsigned long) mm, start, end);
+ local_flush_tlb_range(mm, start, end);
}
}
@@ -202,10 +200,9 @@
struct mm_struct *mm = vma->vm_mm;
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_cache_page(vma, page);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc2((smpfunc_t) BTFIXUP_CALL(local_flush_cache_page), (unsigned long) vma, page);
+ local_flush_cache_page(vma, page);
}
}
@@ -214,10 +211,9 @@
struct mm_struct *mm = vma->vm_mm;
if(mm->context != NO_CONTEXT) {
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_tlb_page(vma, page);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc2((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_page), (unsigned long) vma, page);
+ local_flush_tlb_page(vma, page);
}
}
@@ -231,17 +227,15 @@
*/
#if 1
xc1((smpfunc_t) BTFIXUP_CALL(local_flush_page_to_ram), page);
-#else
- local_flush_page_to_ram(page);
#endif
+ local_flush_page_to_ram(page);
}
void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr)
{
- if(mm->cpu_vm_mask == (1 << smp_processor_id()))
- local_flush_sig_insns(mm, insn_addr);
- else
+ if(mm->cpu_vm_mask != (1 << smp_processor_id()))
xc2((smpfunc_t) BTFIXUP_CALL(local_flush_sig_insns), (unsigned long) mm, insn_addr);
+ local_flush_sig_insns(mm, insn_addr);
}
/* Reschedule call back. */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/sparc-stub.c linux/arch/sparc/kernel/sparc-stub.c
--- v2.4.0-test9/linux/arch/sparc/kernel/sparc-stub.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc/kernel/sparc-stub.c Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-/* $Id: sparc-stub.c,v 1.26 1999/12/27 06:08:34 anton Exp $
+/* $Id: sparc-stub.c,v 1.27 2000/10/03 07:28:49 anton Exp $
* sparc-stub.c: KGDB support for the Linux kernel.
*
* Modifications to run under Linux
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/sun4d_smp.c linux/arch/sparc/kernel/sun4d_smp.c
--- v2.4.0-test9/linux/arch/sparc/kernel/sun4d_smp.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/kernel/sun4d_smp.c Tue Oct 10 10:33:51 2000
@@ -376,9 +376,6 @@
}
}
- /* First, run local copy. */
- func(arg1, arg2, arg3, arg4, arg5);
-
{
register int i;
@@ -396,8 +393,6 @@
}
spin_unlock_irqrestore(&cross_call_lock, flags);
- } else {
- func(arg1, arg2, arg3, arg4, arg5); /* Just need to run local copy. */
}
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/sun4m_smp.c linux/arch/sparc/kernel/sun4m_smp.c
--- v2.4.0-test9/linux/arch/sparc/kernel/sun4m_smp.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/kernel/sun4m_smp.c Tue Oct 10 10:33:51 2000
@@ -405,9 +405,6 @@
}
}
- /* First, run local copy. */
- func(arg1, arg2, arg3, arg4, arg5);
-
{
register int i;
@@ -425,8 +422,6 @@
}
spin_unlock_irqrestore(&cross_call_lock, flags);
- } else {
- func(arg1, arg2, arg3, arg4, arg5); /* Just need to run local copy. */
}
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/mm/fault.c linux/arch/sparc/mm/fault.c
--- v2.4.0-test9/linux/arch/sparc/mm/fault.c Wed May 3 01:47:57 2000
+++ linux/arch/sparc/mm/fault.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: fault.c,v 1.116 2000/05/03 06:37:03 davem Exp $
+/* $Id: fault.c,v 1.117 2000/10/16 14:32:50 anton Exp $
* fault.c: Page fault handlers for the Sparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -200,11 +200,24 @@
siginfo_t info;
int from_user = !(regs->psr & PSR_PS);
- info.si_code = SEGV_MAPERR;
if(text_fault)
address = regs->pc;
/*
+ * We fault-in kernel-space virtual memory on-demand. The
+ * 'reference' page table is init_mm.pgd.
+ *
+ * NOTE! We MUST NOT take any locks for this case. We may
+ * be in an interrupt or a critical region, and should
+ * only copy the information from the master page table,
+ * nothing more.
+ */
+ if (!ARCH_SUN4C_SUN4 && address >= TASK_SIZE)
+ goto vmalloc_fault;
+
+ info.si_code = SEGV_MAPERR;
+
+ /*
* If we're in an interrupt or have no user
* context, we must not take the fault..
*/
@@ -271,6 +284,7 @@
bad_area:
up(&mm->mmap_sem);
+bad_area_nosemaphore:
/* User mode accesses just cause a SIGSEGV */
if(from_user) {
#if 0
@@ -340,6 +354,35 @@
force_sig_info (SIGBUS, &info, tsk);
if (!from_user)
goto no_context;
+
+vmalloc_fault:
+ {
+ /*
+ * Synchronize this task's top level page-table
+ * with the 'reference' page table.
+ */
+ int offset = pgd_index(address);
+ pgd_t *pgd, *pgd_k;
+ pmd_t *pmd, *pmd_k;
+
+ pgd = tsk->active_mm->pgd + offset;
+ pgd_k = init_mm.pgd + offset;
+
+ if (!pgd_present(*pgd)) {
+ if (!pgd_present(*pgd_k))
+ goto bad_area_nosemaphore;
+ pgd_set(pgd, *pgd_k);
+ return;
+ }
+
+ pmd = pmd_offset(pgd, address);
+ pmd_k = pmd_offset(pgd_k, address);
+
+ if (pmd_present(*pmd) || !pmd_present(*pmd_k))
+ goto bad_area_nosemaphore;
+ pmd_set(pmd, *pmd_k);
+ return;
+ }
}
asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write,
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/mm/init.c linux/arch/sparc/mm/init.c
--- v2.4.0-test9/linux/arch/sparc/mm/init.c Thu Sep 7 08:32:00 2000
+++ linux/arch/sparc/mm/init.c Mon Oct 23 15:48:27 2000
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.93 2000/08/31 11:40:55 anton Exp $
+/* $Id: init.c,v 1.94 2000/10/19 00:49:51 davem Exp $
* linux/arch/sparc/mm/init.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -42,7 +42,7 @@
struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS];
unsigned long sparc_unmapped_base;
-struct pgtable_cache_struct pgt_quicklists = { 0, 0, 0, 0 };
+struct pgtable_cache_struct pgt_quicklists;
/* References to section boundaries */
extern char __init_begin, __init_end, _start, _end, etext , edata;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
--- v2.4.0-test9/linux/arch/sparc/mm/srmmu.c Tue Aug 29 12:41:12 2000
+++ linux/arch/sparc/mm/srmmu.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: srmmu.c,v 1.222 2000/08/29 08:59:23 davem Exp $
+/* $Id: srmmu.c,v 1.223 2000/10/16 14:32:49 anton Exp $
* srmmu.c: SRMMU specific routines for memory management.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -69,9 +69,6 @@
#define FLUSH_END }
#endif
-BTFIXUPDEF_CALL(void, pmd_set, pmd_t *, pte_t *)
-#define pmd_set(pmdp,ptep) BTFIXUP_CALL(pmd_set)(pmdp,ptep)
-
BTFIXUPDEF_CALL(void, flush_page_for_dma, unsigned long)
#define flush_page_for_dma(page) BTFIXUP_CALL(flush_page_for_dma)(page)
@@ -482,19 +479,6 @@
srmmu_free_nocache((unsigned long)pmd, SRMMU_PMD_TABLE_SIZE);
}
-static void srmmu_set_pgdir(unsigned long address, pgd_t entry)
-{
- struct task_struct * p;
-
- read_lock(&tasklist_lock);
- for_each_task(p) {
- if (!p->mm)
- continue;
- *srmmu_pgd_offset(p->mm,address) = entry;
- }
- read_unlock(&tasklist_lock);
-}
-
static inline void alloc_context(struct mm_struct *old_mm, struct mm_struct *mm)
{
struct ctx_list *ctxp;
@@ -2148,8 +2132,6 @@
#endif
BTFIXUPSET_CALL(do_check_pgt_cache, srmmu_check_pgt_cache, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(set_pgdir, srmmu_set_pgdir, BTFIXUPCALL_NORM);
-
BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1);
BTFIXUPSET_CALL(switch_mm, srmmu_switch_mm, BTFIXUPCALL_NORM);
@@ -2175,6 +2157,7 @@
BTFIXUPSET_CALL(mk_pte_phys, srmmu_mk_pte_phys, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(pgd_set, srmmu_pgd_set, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM);
BTFIXUPSET_INT(pte_modify_mask, SRMMU_CHG_MASK);
BTFIXUPSET_CALL(pmd_offset, srmmu_pmd_offset, BTFIXUPCALL_NORM);
@@ -2208,9 +2191,6 @@
BTFIXUPSET_CALL(alloc_task_struct, srmmu_alloc_task_struct, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(free_task_struct, srmmu_free_task_struct, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(get_task_struct, srmmu_get_task_struct, BTFIXUPCALL_NORM);
-
- /* SRMMU specific. */
- BTFIXUPSET_CALL(pmd_set, srmmu_pmd_set, BTFIXUPCALL_NORM);
get_srmmu_type();
patch_window_trap_handlers();
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/mm/sun4c.c linux/arch/sparc/mm/sun4c.c
--- v2.4.0-test9/linux/arch/sparc/mm/sun4c.c Tue Aug 29 12:41:12 2000
+++ linux/arch/sparc/mm/sun4c.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: sun4c.c,v 1.199 2000/08/29 08:59:23 davem Exp $
+/* $Id: sun4c.c,v 1.200 2000/10/16 14:32:49 anton Exp $
* sun4c.c: Doing in software what should be done in hardware.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -1904,6 +1904,10 @@
{
}
+static void sun4c_pmd_set(pmd_t * pmdp, pte_t * ptep)
+{
+}
+
void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr,
int bus_type, int rdonly)
{
@@ -2267,11 +2271,6 @@
return (pgd_t *)ret;
}
-static void sun4c_set_pgdir(unsigned long address, pgd_t entry)
-{
- /* Nothing to do */
-}
-
extern __inline__ void sun4c_free_pgd_fast(pgd_t *pgd)
{
*(unsigned long *)pgd = (unsigned long) pgd_quicklist;
@@ -2616,8 +2615,6 @@
#endif
BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(set_pgdir, sun4c_set_pgdir, BTFIXUPCALL_NOP);
-
BTFIXUPSET_CALL(flush_cache_all, sun4c_flush_cache_all, BTFIXUPCALL_NORM);
if (sun4c_vacinfo.do_hwflushes) {
@@ -2719,4 +2716,5 @@
/* These should _never_ get called with two level tables. */
BTFIXUPSET_CALL(pgd_set, sun4c_pgd_set, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(pgd_page, sun4c_pgd_page, BTFIXUPCALL_RETO0);
+ BTFIXUPSET_CALL(pmd_set, sun4c_pmd_set, BTFIXUPCALL_NOP);
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/config.in linux/arch/sparc64/config.in
--- v2.4.0-test9/linux/arch/sparc64/config.in Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/config.in Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.121 2000/08/23 05:59:28 davem Exp $
+# $Id: config.in,v 1.125 2000/10/10 01:05:53 davem Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
@@ -89,12 +89,7 @@
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-#tristate 'Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM N
-#if [ "$CONFIG_BLK_DEV_LVM" != "n" ]; then
-# bool ' LVM information in proc filesystem' CONFIG_LVM_PROC_FS Y
-#fi
-
-include drivers/md/Config.in
+source drivers/md/Config.in
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
@@ -166,7 +161,7 @@
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
- bool ' Enable tagged command queueing (TCQ) by default' CONFIG_AIC7XXX_TAGGED_QUEUEING Y
+ bool ' Enable tagged command queueing (TCQ) by default' CONFIG_AIC7XXX_TAGGED_QUEUEING
int ' Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 8
bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS N
int ' Delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 5
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/defconfig linux/arch/sparc64/defconfig
--- v2.4.0-test9/linux/arch/sparc64/defconfig Mon Aug 28 12:00:08 2000
+++ linux/arch/sparc64/defconfig Mon Oct 30 14:34:12 2000
@@ -138,10 +138,18 @@
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_MD=m
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_LVM is not set
+# CONFIG_LVM_PROC_FS is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_INITRD is not set
@@ -181,6 +189,7 @@
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
@@ -254,10 +263,11 @@
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_OSB4 is not set
# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_VIA82CXXX_TUNING is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/ioctl32.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/ioctl32.c Fri Aug 18 10:26:25 2000
+++ linux/arch/sparc64/kernel/ioctl32.c Thu Oct 26 23:35:47 2000
@@ -1,4 +1,4 @@
-/* $Id: ioctl32.c,v 1.98 2000/08/16 12:33:00 davem Exp $
+/* $Id: ioctl32.c,v 1.99 2000/10/17 16:20:33 davem Exp $
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
@@ -3221,9 +3221,16 @@
/* Little p (/dev/rtc, /dev/envctrl, etc.) */
COMPATIBLE_IOCTL(RTCGET)
COMPATIBLE_IOCTL(RTCSET)
-COMPATIBLE_IOCTL(I2CIOCSADR)
-COMPATIBLE_IOCTL(I2CIOCGADR)
-COMPATIBLE_IOCTL(D7SIOCRD)
+COMPATIBLE_IOCTL(ENVCTRL_RD_WARNING_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_SHUTDOWN_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_FAN_STATUS)
+COMPATIBLE_IOCTL(ENVCTRL_RD_VOLTAGE_STATUS)
+COMPATIBLE_IOCTL(ENVCTRL_RD_SCSI_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_ETHERNET_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_MTHRBD_TEMPERATURE)
+COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_VOLTAGE)
+/* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */
COMPATIBLE_IOCTL(D7SIOCWR)
COMPATIBLE_IOCTL(D7SIOCTM)
/* Little m */
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/pci.c linux/arch/sparc64/kernel/pci.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/pci.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/kernel/pci.c Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-/* $Id: pci.c,v 1.17 2000/09/05 06:49:44 anton Exp $
+/* $Id: pci.c,v 1.18 2000/10/03 11:31:42 anton Exp $
* pci.c: UltraSparc PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/semaphore.c linux/arch/sparc64/kernel/semaphore.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/semaphore.c Thu Mar 30 16:54:53 2000
+++ linux/arch/sparc64/kernel/semaphore.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: semaphore.c,v 1.3 2000/03/27 10:38:46 davem Exp $
+/* $Id: semaphore.c,v 1.4 2000/10/14 10:09:00 davem Exp $
* Generic semaphore code. Buyer beware. Do your own
* specific changes in
*/
@@ -275,7 +275,7 @@
while (sem->count < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (sem->count >= 0)
- break; /* we must attempt to aquire or bias the lock */
+ break; /* we must attempt to acquire or bias the lock */
schedule();
}
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/setup.c linux/arch/sparc64/kernel/setup.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/setup.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/kernel/setup.c Mon Oct 16 13:36:08 2000
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.56 2000/09/21 06:29:01 anton Exp $
+/* $Id: setup.c,v 1.57 2000/10/14 10:09:00 davem Exp $
* linux/arch/sparc64/kernel/setup.c
*
* Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
@@ -75,17 +75,10 @@
}
static struct console prom_console = {
- "prom",
- prom_console_write,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- CON_CONSDEV | CON_ENABLED,
- -1,
- 0,
- NULL
+ name: "prom",
+ write: prom_console_write,
+ flags: CON_CONSDEV | CON_ENABLED,
+ index: -1,
};
#define PROM_TRUE -1
@@ -294,17 +287,10 @@
#ifdef PROM_DEBUG_CONSOLE
static struct console prom_debug_console = {
- "debug",
- prom_console_write,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "debug",
+ write: prom_console_write,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/smp.c linux/arch/sparc64/kernel/smp.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/smp.c Sun Aug 6 11:43:17 2000
+++ linux/arch/sparc64/kernel/smp.c Mon Oct 30 14:34:12 2000
@@ -28,6 +28,7 @@
#include
#include
#include
+#include
#define __KERNEL_SYSCALLS__
#include
@@ -302,9 +303,17 @@
static inline void xcall_deliver(u64 data0, u64 data1, u64 data2, u64 pstate, unsigned long cpu)
{
- u64 result, target = (cpu << 14) | 0x70;
+ u64 result, target;
int stuck, tmp;
+ if (this_is_starfire) {
+ /* map to real upaid */
+ cpu = (((cpu & 0x3c) << 1) |
+ ((cpu & 0x40) >> 4) |
+ (cpu & 0x3));
+ }
+
+ target = (cpu << 14) | 0x70;
#ifdef XCALL_DEBUG
printk("CPU[%d]: xcall(data[%016lx:%016lx:%016lx],tgt[%016lx])\n",
smp_processor_id(), data0, data1, data2, target);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/sparc64_ksyms.c linux/arch/sparc64/kernel/sparc64_ksyms.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/sparc64_ksyms.c Thu Aug 10 12:43:12 2000
+++ linux/arch/sparc64/kernel/sparc64_ksyms.c Mon Oct 30 14:34:12 2000
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.92 2000/08/09 08:45:40 anton Exp $
+/* $Id: sparc64_ksyms.c,v 1.95 2000/10/30 21:01:40 davem Exp $
* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -18,6 +18,8 @@
#include
#include
#include
+#include
+#include
#include
#include
@@ -29,6 +31,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -37,6 +40,7 @@
#include
#include
#include
+#include
#ifdef CONFIG_SBUS
#include
#include
@@ -88,6 +92,7 @@
extern int __ashrdi3(int, int);
extern void dump_thread(struct pt_regs *, struct user *);
+extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
#ifdef CONFIG_SMP
extern spinlock_t kernel_flag;
@@ -230,6 +235,13 @@
/* Should really be in linux/kernel/ksyms.c */
EXPORT_SYMBOL(dump_thread);
+EXPORT_SYMBOL(dump_fpu);
+EXPORT_SYMBOL(get_pmd_slow);
+EXPORT_SYMBOL(get_pte_slow);
+#ifndef CONFIG_SMP
+EXPORT_SYMBOL(pgt_quicklists);
+#endif
+EXPORT_SYMBOL(put_fs_struct);
/* math-emu wants this */
EXPORT_SYMBOL(die_if_kernel);
@@ -262,10 +274,9 @@
/* sparc library symbols */
EXPORT_SYMBOL(__strlen);
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
EXPORT_SYMBOL(strlen);
-#endif
EXPORT_SYMBOL(strnlen);
+EXPORT_SYMBOL(__strlen_user);
EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/starfire.c linux/arch/sparc64/kernel/starfire.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/starfire.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/kernel/starfire.c Mon Oct 30 14:34:12 2000
@@ -1,4 +1,4 @@
-/* $Id: starfire.c,v 1.7 2000/09/22 23:02:13 davem Exp $
+/* $Id: starfire.c,v 1.8 2000/10/27 18:36:47 anton Exp $
* starfire.c: Starfire/E10000 support.
*
* Copyright (C) 1998 David S. Miller (davem@redhat.com)
@@ -31,7 +31,12 @@
void starfire_cpu_setup(void)
{
if (this_is_starfire) {
-/* We do this in starfire_translate - Anton */
+/*
+ * We do this in starfire_translate and xcall_deliver. When we fix our cpu
+ * arrays to support > 64 processors we can use the real upaid instead
+ * of the logical cpuid in __cpu_number_map etc, then we can get rid of
+ * the translations everywhere. - Anton
+ */
#if 0
int i;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
--- v2.4.0-test9/linux/arch/sparc64/kernel/sys_sparc32.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/kernel/sys_sparc32.c Tue Oct 10 10:33:51 2000
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc32.c,v 1.164 2000/09/14 10:42:47 davem Exp $
+/* $Id: sys_sparc32.c,v 1.165 2000/10/10 04:47:31 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -2893,7 +2893,7 @@
/*
* count32() counts the number of arguments/envelopes
*/
-static int count32(u32 * argv)
+static int count32(u32 * argv, int max)
{
int i = 0;
@@ -2902,9 +2902,13 @@
u32 p; int error;
error = get_user(p,argv);
- if (error) return error;
- if (!p) break;
- argv++; i++;
+ if (error)
+ return error;
+ if (!p)
+ break;
+ argv++;
+ if (++i > max)
+ return -E2BIG;
}
}
return i;
@@ -3001,12 +3005,12 @@
bprm.sh_bang = 0;
bprm.loader = 0;
bprm.exec = 0;
- if ((bprm.argc = count32(argv)) < 0) {
+ if ((bprm.argc = count32(argv, bprm.p / sizeof(u32))) < 0) {
allow_write_access(file);
fput(file);
return bprm.argc;
}
- if ((bprm.envc = count32(envp)) < 0) {
+ if ((bprm.envc = count32(envp, bprm.p / sizeof(u32))) < 0) {
allow_write_access(file);
fput(file);
return bprm.envc;
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/mm/init.c linux/arch/sparc64/mm/init.c
--- v2.4.0-test9/linux/arch/sparc64/mm/init.c Sun Oct 8 10:50:11 2000
+++ linux/arch/sparc64/mm/init.c Mon Oct 23 15:48:27 2000
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.156 2000/09/21 06:34:48 anton Exp $
+/* $Id: init.c,v 1.157 2000/10/19 00:49:52 davem Exp $
* arch/sparc64/mm/init.c
*
* Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
@@ -873,7 +873,7 @@
}
#endif
/* Initialize the boot-time allocator. */
- bootmap_size = init_bootmem_node(0, bootmap_pfn, phys_base>>PAGE_SHIFT, end_pfn);
+ bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, phys_base>>PAGE_SHIFT, end_pfn);
/* Now register the available physical memory with the
* allocator.
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc64/solaris/socksys.c linux/arch/sparc64/solaris/socksys.c
--- v2.4.0-test9/linux/arch/sparc64/solaris/socksys.c Wed Jul 26 18:36:44 2000
+++ linux/arch/sparc64/solaris/socksys.c Mon Oct 23 15:48:27 2000
@@ -1,4 +1,4 @@
-/* $Id: socksys.c,v 1.16 2000/07/27 00:03:48 davem Exp $
+/* $Id: socksys.c,v 1.17 2000/10/19 00:49:53 davem Exp $
* socksys.c: /dev/inet/ stuff for Solaris emulation.
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -161,7 +161,7 @@
release: socksys_release,
};
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
int __init
init_socksys(void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/Makefile linux/drivers/Makefile
--- v2.4.0-test9/linux/drivers/Makefile Sun Oct 8 10:50:11 2000
+++ linux/drivers/Makefile Mon Oct 9 14:40:17 2000
@@ -28,9 +28,9 @@
subdir-$(CONFIG_INPUT) += input
subdir-$(CONFIG_PHONE) += telephony
subdir-$(CONFIG_SGI) += sgi
-subdir-$(CONFIG_I2O) += i2o
subdir-$(CONFIG_IDE) += ide
subdir-$(CONFIG_SCSI) += scsi
+subdir-$(CONFIG_I2O) += i2o
subdir-$(CONFIG_MD) += md
subdir-$(CONFIG_IEEE1394) += ieee1394
subdir-$(CONFIG_PNP) += pnp
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/acorn/char/defkeymap-acorn.c linux/drivers/acorn/char/defkeymap-acorn.c
--- v2.4.0-test9/linux/drivers/acorn/char/defkeymap-acorn.c Sun Oct 8 10:50:12 2000
+++ linux/drivers/acorn/char/defkeymap-acorn.c Mon Oct 16 12:58:51 2000
@@ -285,7 +285,7 @@
char *funcbufptr = func_buf;
int funcbufsize = sizeof(func_buf);
-int funcbufleft = 0; /* space left */
+int funcbufleft; /* space left */
char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/atm/fore200e.c linux/drivers/atm/fore200e.c
--- v2.4.0-test9/linux/drivers/atm/fore200e.c Thu Jul 6 21:37:24 2000
+++ linux/drivers/atm/fore200e.c Mon Oct 16 12:56:50 2000
@@ -2920,7 +2920,7 @@
#ifdef MODULE
-static unsigned int __init
+static int __init
fore200e_module_init(void)
{
DPRINTK(1, "module loaded\n");
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/atm/nicstar.c linux/drivers/atm/nicstar.c
--- v2.4.0-test9/linux/drivers/atm/nicstar.c Thu Jul 6 21:37:24 2000
+++ linux/drivers/atm/nicstar.c Mon Oct 16 12:58:51 2000
@@ -259,7 +259,7 @@
/* Global variables ***********************************************************/
static struct ns_dev *cards[NS_MAX_CARDS];
-static unsigned num_cards = 0;
+static unsigned num_cards;
static struct atmdev_ops atm_ops =
{
open: ns_open,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/DAC960.c linux/drivers/block/DAC960.c
--- v2.4.0-test9/linux/drivers/block/DAC960.c Mon Aug 21 09:23:54 2000
+++ linux/drivers/block/DAC960.c Thu Oct 26 23:35:47 2000
@@ -51,7 +51,7 @@
*/
static int
- DAC960_ControllerCount = 0;
+ DAC960_ControllerCount;
/*
@@ -60,7 +60,7 @@
*/
static int
- DAC960_ActiveControllerCount = 0;
+ DAC960_ActiveControllerCount;
/*
@@ -69,7 +69,7 @@
*/
static DAC960_Controller_T
- *DAC960_Controllers[DAC960_MaxControllers] = { NULL };
+ *DAC960_Controllers[DAC960_MaxControllers];
/*
@@ -5679,7 +5679,7 @@
}
if (MessageLevel == DAC960_AnnounceLevel)
{
- static int AnnouncementLines = 0;
+ static int AnnouncementLines;
if (++AnnouncementLines <= 2)
printk("%sDAC960: %s", DAC960_MessageLevelMap[MessageLevel],
Buffer);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/acsi_slm.c linux/drivers/block/acsi_slm.c
--- v2.4.0-test9/linux/drivers/block/acsi_slm.c Fri Jul 14 12:20:22 2000
+++ linux/drivers/block/acsi_slm.c Mon Oct 16 12:58:51 2000
@@ -942,7 +942,7 @@
int attach_slm( int target, int lun )
-{ static int did_register = 0;
+{ static int did_register;
int len;
if (N_SLM_Printers >= MAX_SLM) {
@@ -992,7 +992,7 @@
return( 1 );
}
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
int slm_init( void )
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/cciss.c linux/drivers/block/cciss.c
--- v2.4.0-test9/linux/drivers/block/cciss.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/cciss.c Thu Oct 26 23:35:47 2000
@@ -71,10 +71,10 @@
#define READ_AHEAD 128
#define NR_CMDS 128 /* #commands that can be outstanding */
#define MAX_CTLR 8
-static int nr_ctlr =0;
-static ctlr_info_t *hba[MAX_CTLR] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static int nr_ctlr;
+static ctlr_info_t *hba[MAX_CTLR];
-static struct proc_dir_entry *proc_cciss = NULL;
+static struct proc_dir_entry *proc_cciss;
static void do_cciss_request(int i);
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
--- v2.4.0-test9/linux/drivers/block/cpqarray.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/cpqarray.c Thu Oct 26 23:35:47 2000
@@ -68,10 +68,10 @@
#define MAX_CTLR 8
#define CTLR_SHIFT 8
-static int nr_ctlr = 0;
-static ctlr_info_t *hba[MAX_CTLR] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static int nr_ctlr;
+static ctlr_info_t *hba[MAX_CTLR];
-static int eisa[8] = { 0, 0 ,0 ,0, 0, 0 ,0 ,0 };
+static int eisa[8];
#define NR_PRODUCTS (sizeof(products)/sizeof(struct board_type))
@@ -103,7 +103,7 @@
static int * ida_hardsizes;
static struct gendisk ida_gendisk[MAX_CTLR];
-static struct proc_dir_entry *proc_array = NULL;
+static struct proc_dir_entry *proc_array;
/* Debug... */
#define DBG(s) do { s } while(0)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
--- v2.4.0-test9/linux/drivers/block/floppy.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/floppy.c Thu Oct 26 23:35:47 2000
@@ -3435,6 +3435,7 @@
static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long param)
{
+#define FD_IOCTL_ALLOWED ((filp) && (filp)->private_data)
#define OUT(c,x) case c: outparam = (const char *) (x); break
#define IN(c,x,tag) case c: *(x) = inparam. tag ; return 0
@@ -3502,7 +3503,7 @@
return -EINVAL;
/* permission checks */
- if (((cmd & 0x40) && !(filp->f_mode & 2)) ||
+ if (((cmd & 0x40) && !FD_IOCTL_ALLOWED) ||
((cmd & 0x80) && !capable(CAP_SYS_ADMIN)))
return -EPERM;
@@ -3708,6 +3709,8 @@
return -EIO;
}
+ filp->private_data = (void*) 0;
+
drive = DRIVE(inode->i_rdev);
if (drive >= N_DRIVE ||
!(allowed_drive_mask & (1 << drive)) ||
@@ -3774,6 +3777,13 @@
buffer_track = -1;
invalidate_buffers(MKDEV(FLOPPY_MAJOR,old_dev));
}
+
+ /* Allow ioctls if we have write-permissions even if read-only open.
+ * Needed so that programs such as fdrawcmd still can work on write
+ * protected disks */
+ if ((filp->f_mode & 2) ||
+ (inode->i_sb && (permission(inode,2) == 0)))
+ filp->private_data = (void*) 8;
if (UFDCS->rawcmd == 1)
UFDCS->rawcmd = 2;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- v2.4.0-test9/linux/drivers/block/ll_rw_blk.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/ll_rw_blk.c Thu Oct 26 23:35:47 2000
@@ -328,7 +328,7 @@
* on the list.
*
* This is called with interrupts off and no requests on the queue.
- * (and with the request spinlock aquired)
+ * (and with the request spinlock acquired)
*/
static void generic_plug_device(request_queue_t *q, kdev_t dev)
{
@@ -570,7 +570,7 @@
/*
* add-request adds a request to the linked list.
- * It disables interrupts (aquires the request spinlock) so that it can muck
+ * It disables interrupts (acquires the request spinlock) so that it can muck
* with the request-lists in peace. Thus it should be called with no spinlocks
* held.
*
@@ -624,7 +624,7 @@
}
/*
- * Has to be called with the request spinlock aquired
+ * Has to be called with the request spinlock acquired
*/
static void attempt_merge(request_queue_t * q,
struct request *req,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/loop.c linux/drivers/block/loop.c
--- v2.4.0-test9/linux/drivers/block/loop.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/loop.c Mon Oct 16 12:58:51 2000
@@ -80,7 +80,7 @@
static struct loop_device *loop_dev;
static int *loop_sizes;
static int *loop_blksizes;
-static devfs_handle_t devfs_handle = NULL; /* For the directory */
+static devfs_handle_t devfs_handle; /* For the directory */
#define FALSE 0
#define TRUE (!FALSE)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/nbd.c linux/drivers/block/nbd.c
--- v2.4.0-test9/linux/drivers/block/nbd.c Wed Jul 5 13:15:19 2000
+++ linux/drivers/block/nbd.c Mon Oct 30 14:30:33 2000
@@ -55,7 +55,7 @@
static u64 nbd_bytesizes[MAX_NBD];
static struct nbd_device nbd_dev[MAX_NBD];
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
#define DEBUG( s )
/* #define DEBUG( s ) printk( s )
@@ -106,7 +106,7 @@
do {
- sock->sk->allocation = GFP_ATOMIC;
+ sock->sk->allocation = GFP_BUFFER;
iov.iov_base = buf;
iov.iov_len = size;
msg.msg_name = NULL;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/paride/Makefile linux/drivers/block/paride/Makefile
--- v2.4.0-test9/linux/drivers/block/paride/Makefile Sun Aug 6 11:23:40 2000
+++ linux/drivers/block/paride/Makefile Fri Oct 13 11:40:11 2000
@@ -1,183 +1,34 @@
#
-# Makefile for PARIDE
+# Makefile for Parallel port IDE device drivers.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
+# 7 October 2000, Bartlomiej Zolnierkiewicz
+# Rewritten to use lists instead of if-statements.
#
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-
-SUB_DIRS :=
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS)
L_TARGET := paride.a
-MX_OBJS :=
-LX_OBJS :=
-MI_OBJS :=
-MIX_OBJS :=
-
-ifeq ($(CONFIG_PARIDE),y)
- LX_OBJS += paride.o
-else
- ifeq ($(CONFIG_PARIDE),m)
- MX_OBJS += paride.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PD),y)
- LX_OBJS += pd.o
-else
- ifeq ($(CONFIG_PARIDE_PD),m)
- M_OBJS += pd.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PCD),y)
- LX_OBJS += pcd.o
-else
- ifeq ($(CONFIG_PARIDE_PCD),m)
- M_OBJS += pcd.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PF),y)
- LX_OBJS += pf.o
-else
- ifeq ($(CONFIG_PARIDE_PF),m)
- M_OBJS += pf.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PT),y)
- LX_OBJS += pt.o
-else
- ifeq ($(CONFIG_PARIDE_PT),m)
- M_OBJS += pt.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_PG),y)
- LX_OBJS += pg.o
-else
- ifeq ($(CONFIG_PARIDE_PG),m)
- M_OBJS += pg.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ATEN),y)
- LX_OBJS += aten.o
-else
- ifeq ($(CONFIG_PARIDE_ATEN),m)
- M_OBJS += aten.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_BPCK),y)
- LX_OBJS += bpck.o
-else
- ifeq ($(CONFIG_PARIDE_BPCK),m)
- M_OBJS += bpck.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_COMM),y)
- LX_OBJS += comm.o
-else
- ifeq ($(CONFIG_PARIDE_COMM),m)
- M_OBJS += comm.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_DSTR),y)
- LX_OBJS += dstr.o
-else
- ifeq ($(CONFIG_PARIDE_DSTR),m)
- M_OBJS += dstr.o
- endif
-endif
-ifeq ($(CONFIG_PARIDE_KBIC),y)
- LX_OBJS += kbic.o
-else
- ifeq ($(CONFIG_PARIDE_KBIC),m)
- M_OBJS += kbic.o
- endif
-endif
+obj-$(CONFIG_PARIDE) += paride.o
+obj-$(CONFIG_PARIDE_PD) += pd.o
+obj-$(CONFIG_PARIDE_PCD) += pcd.o
+obj-$(CONFIG_PARIDE_PF) += pf.o
+obj-$(CONFIG_PARIDE_PT) += pt.o
+obj-$(CONFIG_PARIDE_PG) += pg.o
+obj-$(CONFIG_PARIDE_ATEN) += aten.o
+obj-$(CONFIG_PARIDE_BPCK) += bpck.o
+obj-$(CONFIG_PARIDE_COMM) += comm.o
+obj-$(CONFIG_PARIDE_DSTR) += dstr.o
+obj-$(CONFIG_PARIDE_KBIC) += kbic.o
+obj-$(CONFIG_PARIDE_EPAT) += epat.o
+obj-$(CONFIG_PARIDE_EPIA) += epia.o
+obj-$(CONFIG_PARIDE_FIT2) += fit2.o
+obj-$(CONFIG_PARIDE_FIT3) += fit3.o
+obj-$(CONFIG_PARIDE_FRPW) += frpw.o
+obj-$(CONFIG_PARIDE_FRIQ) += friq.o
+obj-$(CONFIG_PARIDE_ON20) += on20.o
+obj-$(CONFIG_PARIDE_ON26) += on26.o
+obj-$(CONFIG_PARIDE_KTTI) += ktti.o
-ifeq ($(CONFIG_PARIDE_EPAT),y)
- LX_OBJS += epat.o
-else
- ifeq ($(CONFIG_PARIDE_EPAT),m)
- M_OBJS += epat.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_EPIA),y)
- LX_OBJS += epia.o
-else
- ifeq ($(CONFIG_PARIDE_EPIA),m)
- M_OBJS += epia.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FIT2),y)
- LX_OBJS += fit2.o
-else
- ifeq ($(CONFIG_PARIDE_FIT2),m)
- M_OBJS += fit2.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FIT3),y)
- LX_OBJS += fit3.o
-else
- ifeq ($(CONFIG_PARIDE_FIT3),m)
- M_OBJS += fit3.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_FRPW),y)
- LX_OBJS += frpw.o
-else
- ifeq ($(CONFIG_PARIDE_FRPW),m)
- M_OBJS += frpw.o
- endif
-endif
-
-
-ifeq ($(CONFIG_PARIDE_FRIQ),y)
- LX_OBJS += friq.o
-else
- ifeq ($(CONFIG_PARIDE_FRIQ),m)
- M_OBJS += friq.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ON20),y)
- LX_OBJS += on20.o
-else
- ifeq ($(CONFIG_PARIDE_ON20),m)
- M_OBJS += on20.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_ON26),y)
- LX_OBJS += on26.o
-else
- ifeq ($(CONFIG_PARIDE_ON26),m)
- M_OBJS += on26.o
- endif
-endif
-
-ifeq ($(CONFIG_PARIDE_KTTI),y)
- LX_OBJS += ktti.o
-else
- ifeq ($(CONFIG_PARIDE_KTTI),m)
- M_OBJS += ktti.o
- endif
-endif
+L_OBJS := $(obj-y)
+M_OBJS := $(obj-m)
include $(TOPDIR)/Rules.make
-
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/paride/pg.c linux/drivers/block/paride/pg.c
--- v2.4.0-test9/linux/drivers/block/paride/pg.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/block/paride/pg.c Mon Oct 16 12:58:51 2000
@@ -289,7 +289,7 @@
}
}
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
int pg_init (void) /* preliminary initialisation */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/paride/pt.c linux/drivers/block/paride/pt.c
--- v2.4.0-test9/linux/drivers/block/paride/pt.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/block/paride/pt.c Mon Oct 16 12:58:51 2000
@@ -293,7 +293,7 @@
}
}
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
int pt_init (void) /* preliminary initialisation */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/rd.c linux/drivers/block/rd.c
--- v2.4.0-test9/linux/drivers/block/rd.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/block/rd.c Mon Oct 16 12:58:51 2000
@@ -99,7 +99,7 @@
static int rd_hardsec[NUM_RAMDISKS]; /* Size of real blocks in bytes */
static int rd_blocksizes[NUM_RAMDISKS]; /* Size of 1024 byte blocks :) */
static int rd_kbsize[NUM_RAMDISKS]; /* Size in blocks of 1024 bytes */
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
static struct inode *rd_inode[NUM_RAMDISKS]; /* Protected device inodes */
/*
@@ -778,11 +778,11 @@
static uch *inbuf;
static uch *window;
-static unsigned insize = 0; /* valid bytes in inbuf */
-static unsigned inptr = 0; /* index of next byte to be processed in inbuf */
-static unsigned outcnt = 0; /* bytes in output buffer */
-static int exit_code = 0;
-static long bytes_out = 0;
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned inptr; /* index of next byte to be processed in inbuf */
+static unsigned outcnt; /* bytes in output buffer */
+static int exit_code;
+static long bytes_out;
static struct file *crd_infp, *crd_outfp;
#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/block/xd.c linux/drivers/block/xd.c
--- v2.4.0-test9/linux/drivers/block/xd.c Sun Oct 8 10:50:15 2000
+++ linux/drivers/block/xd.c Thu Oct 26 23:35:47 2000
@@ -142,9 +142,9 @@
static DECLARE_WAIT_QUEUE_HEAD(xd_wait_open);
static u_char xd_valid[XD_MAXDRIVES] = { 0,0 };
static u_char xd_drives, xd_irq = 5, xd_dma = 3, xd_maxsectors;
-static u_char xd_override __initdata, xd_type __initdata;
+static u_char xd_override __initdata = 0, xd_type __initdata = 0;
static u_short xd_iobase = 0x320;
-static int xd_geo[XD_MAXDRIVES*3] __initdata;
+static int xd_geo[XD_MAXDRIVES*3] __initdata = { 0, };
static volatile int xdc_busy;
static DECLARE_WAIT_QUEUE_HEAD(xdc_wait);
@@ -518,7 +518,7 @@
if (nodma)
return (PIO_MODE);
- if (((u_int) buffer & 0xFFFF0000) != (((u_int) buffer + count) & 0xFFFF0000)) {
+ if (((unsigned long) buffer & 0xFFFF0000) != (((unsigned long) buffer + count) & 0xFFFF0000)) {
#ifdef DEBUG_OTHER
printk("xd_setup_dma: using PIO, transfer overlaps 64k boundary\n");
#endif /* DEBUG_OTHER */
@@ -529,7 +529,7 @@
disable_dma(xd_dma);
clear_dma_ff(xd_dma);
set_dma_mode(xd_dma,mode);
- set_dma_addr(xd_dma,(u_int) buffer);
+ set_dma_addr(xd_dma, (unsigned long) buffer);
set_dma_count(xd_dma,count);
release_dma_lock(f);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- v2.4.0-test9/linux/drivers/cdrom/cdrom.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/cdrom/cdrom.c Mon Oct 16 12:58:51 2000
@@ -267,15 +267,15 @@
#include
/* used to tell the module to turn on full debugging messages */
-static int debug = 0;
+static int debug;
/* used to keep tray locked at all times */
-static int keeplocked = 0;
+static int keeplocked;
/* default compatibility mode */
static int autoclose=1;
-static int autoeject=0;
+static int autoeject;
static int lockdoor = 1;
/* will we ever get to use this... sigh. */
-static int check_media_type = 0;
+static int check_media_type;
MODULE_PARM(debug, "i");
MODULE_PARM(autoclose, "i");
MODULE_PARM(autoeject, "i");
@@ -326,8 +326,8 @@
#ifdef CONFIG_SYSCTL
static void cdrom_sysctl_register(void);
#endif /* CONFIG_SYSCTL */
-static struct cdrom_device_info *topCdromPtr = NULL;
-static devfs_handle_t devfs_handle = NULL;
+static struct cdrom_device_info *topCdromPtr;
+static devfs_handle_t devfs_handle;
struct block_device_operations cdrom_fops =
{
@@ -346,12 +346,12 @@
int register_cdrom(struct cdrom_device_info *cdi)
{
- static char banner_printed = 0;
+ static char banner_printed;
int major = MAJOR(cdi->dev);
struct cdrom_device_ops *cdo = cdi->ops;
int *change_capability = (int *)&cdo->capability; /* hack */
char vname[16];
- static unsigned int cdrom_counter = 0;
+ static unsigned int cdrom_counter;
cdinfo(CD_OPEN, "entering register_cdrom\n");
@@ -2566,7 +2566,7 @@
static void cdrom_sysctl_register(void)
{
- static int initialized = 0;
+ static int initialized;
if (initialized == 1)
return;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
--- v2.4.0-test9/linux/drivers/cdrom/sbpcd.c Tue Sep 5 13:46:15 2000
+++ linux/drivers/cdrom/sbpcd.c Thu Oct 26 23:35:48 2000
@@ -561,9 +561,9 @@
static int sbpcd_ioaddr = CDROM_PORT; /* default I/O base address */
static int sbpro_type = SBPRO;
-static unsigned char setup_done = 0;
-static unsigned char f_16bit = 0;
-static unsigned char do_16bit = 0;
+static unsigned char setup_done;
+static unsigned char f_16bit;
+static unsigned char do_16bit;
static int CDo_command, CDo_reset;
static int CDo_sel_i_d, CDo_enable;
static int CDi_info, CDi_status, CDi_data;
@@ -575,7 +575,7 @@
static struct cdrom_volctrl volctrl;
static struct cdrom_read_audio read_audio;
-static unsigned char msgnum=0;
+static unsigned char msgnum;
static char msgbuf[80];
static const char *str_sb = "SoundBlaster";
@@ -618,26 +618,26 @@
static u_char familyT[]="CD-55"; /* TEAC CD-55A */
static u_char familyV[]="ECS-AT"; /* ECS Vertos 100 */
-static u_int recursion=0; /* internal testing only */
-static u_int fatal_err=0; /* internal testing only */
-static u_int response_count=0;
+static u_int recursion; /* internal testing only */
+static u_int fatal_err; /* internal testing only */
+static u_int response_count;
static u_int flags_cmd_out;
-static u_char cmd_type=0;
+static u_char cmd_type;
static u_char drvcmd[10];
static u_char infobuf[20];
static u_char xa_head_buf[CD_XA_HEAD];
static u_char xa_tail_buf[CD_XA_TAIL];
#if OLD_BUSY
-static volatile u_char busy_data=0;
-static volatile u_char busy_audio=0; /* true semaphores would be safer */
+static volatile u_char busy_data;
+static volatile u_char busy_audio; /* true semaphores would be safer */
#endif OLD_BUSY
static DECLARE_MUTEX(ioctl_read_sem);
static u_long timeout;
-static volatile u_char timed_out_delay=0;
-static volatile u_char timed_out_data=0;
+static volatile u_char timed_out_delay;
+static volatile u_char timed_out_data;
#if 0
-static volatile u_char timed_out_audio=0;
+static volatile u_char timed_out_audio;
#endif
static u_int datarate= 1000000;
static u_int maxtim16=16000000;
@@ -656,15 +656,15 @@
#endif
/*==========================================================================*/
-static int ndrives=0;
+static int ndrives;
static u_char drv_pattern[NR_SBPCD]={speed_auto,speed_auto,speed_auto,speed_auto};
-static int sbpcd_blocksizes[NR_SBPCD] = {0, };
+static int sbpcd_blocksizes[NR_SBPCD];
/*==========================================================================*/
/*
* drive space begins here (needed separate for each unit)
*/
-static int d=0; /* DriveStruct index: drive number */
+static int d; /* DriveStruct index: drive number */
static struct {
char drv_id; /* "jumpered" drive ID or -1 */
@@ -5654,7 +5654,7 @@
* Called once at boot or load time.
*/
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
#ifdef MODULE
int __init __SBPCD_INIT(void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/acquirewdt.c linux/drivers/char/acquirewdt.c
--- v2.4.0-test9/linux/drivers/char/acquirewdt.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/char/acquirewdt.c Mon Oct 16 12:58:51 2000
@@ -40,7 +40,7 @@
#include
#include
-static int acq_is_open=0;
+static int acq_is_open;
static spinlock_t acq_lock;
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/console.c linux/drivers/char/console.c
--- v2.4.0-test9/linux/drivers/char/console.c Wed Aug 9 14:18:26 2000
+++ linux/drivers/char/console.c Mon Oct 16 12:59:22 2000
@@ -108,7 +108,7 @@
#include "console_macros.h"
-struct consw *conswitchp = NULL;
+const struct consw *conswitchp;
/* A bitmap for codes <32. A bit of 1 indicates that the code
* corresponding to that bit number invokes some special action
@@ -136,7 +136,7 @@
struct vc vc_cons [MAX_NR_CONSOLES];
#ifndef VT_SINGLE_DRIVER
-static struct consw *con_driver_map[MAX_NR_CONSOLES];
+static const struct consw *con_driver_map[MAX_NR_CONSOLES];
#endif
static int con_open(struct tty_struct *, struct file *);
@@ -152,14 +152,14 @@
static void hide_cursor(int currcons);
static void unblank_screen_t(unsigned long dummy);
-static int printable = 0; /* Is console ready for printing? */
+static int printable; /* Is console ready for printing? */
-int do_poke_blanked_console = 0;
-int console_blanked = 0;
+int do_poke_blanked_console;
+int console_blanked;
-static int vesa_blank_mode = 0; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
+static int vesa_blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
static int blankinterval = 10*60*HZ;
-static int vesa_off_interval = 0;
+static int vesa_off_interval;
/*
* fg_console is the current virtual console,
@@ -167,10 +167,10 @@
* want_console is the console we want to switch to,
* kmsg_redirect is the console for kernel messages,
*/
-int fg_console = 0;
-int last_console = 0;
+int fg_console;
+int last_console;
int want_console = -1;
-int kmsg_redirect = 0;
+int kmsg_redirect;
/*
* For each existing display, we have a pointer to console currently visible
@@ -178,7 +178,7 @@
* appropriately. Unless the low-level driver supplies its own display_fg
* variable, we use this one for the "master display".
*/
-static struct vc_data *master_display_fg = NULL;
+static struct vc_data *master_display_fg;
/*
* Unfortunately, we need to delay tty echo when we're currently writing to the
@@ -192,13 +192,13 @@
/*
* For the same reason, we defer scrollback to the console tasklet.
*/
-static int scrollback_delta = 0;
+static int scrollback_delta;
/*
* Hook so that the power management routines can (un)blank
* the console on our behalf.
*/
-int (*console_blank_hook)(int) = NULL;
+int (*console_blank_hook)(int);
static struct timer_list console_timer;
@@ -216,7 +216,7 @@
#endif
static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data);
-static struct pm_dev *pm_con = NULL;
+static struct pm_dev *pm_con;
static inline unsigned short *screenpos(int currcons, int offset, int viewed)
{
@@ -415,9 +415,9 @@
/* used by selection: complement pointer position */
void complement_pos(int currcons, int offset)
{
- static unsigned short *p = NULL;
- static unsigned short old = 0;
- static unsigned short oldx = 0, oldy = 0;
+ static unsigned short *p;
+ static unsigned short old;
+ static unsigned short oldx, oldy;
if (p) {
scr_writew(old, p);
@@ -2056,7 +2056,7 @@
{
int currcons = fg_console;
unsigned char c;
- static unsigned long printing = 0;
+ static unsigned long printing;
const ushort *start;
ushort cnt = 0;
ushort myx;
@@ -2147,17 +2147,13 @@
}
struct console vt_console_driver = {
- "tty",
- vt_console_print,
- NULL,
- vt_console_device,
- keyboard_wait_for_keypress,
- unblank_screen,
- NULL,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "tty",
+ write: vt_console_print,
+ device: vt_console_device,
+ wait_key: keyboard_wait_for_keypress,
+ unblank: unblank_screen,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
#endif
@@ -2484,7 +2480,7 @@
* and become default driver for newly opened ones.
*/
-void take_over_console(struct consw *csw, int first, int last, int deflt)
+void take_over_console(const struct consw *csw, int first, int last, int deflt)
{
int i, j = -1;
const char *desc;
@@ -2532,7 +2528,7 @@
printk("to %s\n", desc);
}
-void give_up_console(struct consw *csw)
+void give_up_console(const struct consw *csw)
{
int i;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c
--- v2.4.0-test9/linux/drivers/char/cyclades.c Wed Jul 12 16:19:41 2000
+++ linux/drivers/char/cyclades.c Mon Oct 16 12:58:51 2000
@@ -770,7 +770,7 @@
*/
static struct cyclades_port cy_port[NR_PORTS];
-static int cy_next_channel = 0; /* next minor available */
+static int cy_next_channel; /* next minor available */
static struct tty_struct *serial_table[NR_PORTS];
static struct termios *serial_termios[NR_PORTS];
@@ -862,9 +862,9 @@
/* PCI related definitions */
-static unsigned short cy_pci_nboard = 0;
-static unsigned short cy_isa_nboard = 0;
-static unsigned short cy_nboard = 0;
+static unsigned short cy_pci_nboard;
+static unsigned short cy_isa_nboard;
+static unsigned short cy_nboard;
#ifdef CONFIG_PCI
static unsigned short cy_pci_dev_id[] = {
PCI_DEVICE_ID_CYCLOM_Y_Lo, /* PCI < 1Mb */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/dsp56k.c linux/drivers/char/dsp56k.c
--- v2.4.0-test9/linux/drivers/char/dsp56k.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/char/dsp56k.c Mon Oct 16 12:58:51 2000
@@ -509,7 +509,7 @@
/****** Init and module functions ******/
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
int __init dsp56k_init(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/dtlk.c linux/drivers/char/dtlk.c
--- v2.4.0-test9/linux/drivers/char/dtlk.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/char/dtlk.c Thu Oct 12 11:16:25 2000
@@ -392,7 +392,6 @@
{
current->state = TASK_INTERRUPTIBLE;
schedule_timeout((ms * HZ + 1000 - HZ) / 1000);
- current->state = TASK_RUNNING;
}
static int dtlk_readable(void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/dz.c linux/drivers/char/dz.c
--- v2.4.0-test9/linux/drivers/char/dz.c Mon Jun 26 18:03:05 2000
+++ linux/drivers/char/dz.c Thu Oct 12 14:20:47 2000
@@ -1553,17 +1553,13 @@
}
static struct console dz_sercons = {
- "ttyS",
- dz_console_print,
- NULL,
- dz_console_device,
- dz_console_wait_key,
- NULL,
- dz_console_setup,
- CON_CONSDEV | CON_PRINTBUFFER,
- CONSOLE_LINE,
- 0,
- NULL
+ name: "ttyS",
+ write: dz_console_print,
+ device: dz_console_device,
+ wait_key: dz_console_wait_key,
+ setup: dz_console_setup,
+ flags: CON_CONSDEV | CON_PRINTBUFFER,
+ index: CONSOLE_LINE,
};
void __init dz_serial_console_init(void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/epca.c linux/drivers/char/epca.c
--- v2.4.0-test9/linux/drivers/char/epca.c Tue Jul 18 15:57:36 2000
+++ linux/drivers/char/epca.c Mon Oct 16 12:58:51 2000
@@ -78,11 +78,11 @@
/* ----------------- Begin global definitions ------------------- */
static char mesg[100];
-static int pc_refcount, nbdevs = 0, num_cards = 0, liloconfig = 0;
+static int pc_refcount, nbdevs, num_cards, liloconfig;
static int digi_poller_inhibited = 1 ;
-static int setup_error_code = 0;
-static int invalid_lilo_config = 0;
+static int setup_error_code;
+static int invalid_lilo_config;
/* -----------------------------------------------------------------------
MAXBOARDS is typically 12, but ISA and EISA cards are restricted to
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/esp.c linux/drivers/char/esp.c
--- v2.4.0-test9/linux/drivers/char/esp.c Mon Feb 14 15:34:21 2000
+++ linux/drivers/char/esp.c Mon Oct 16 12:58:51 2000
@@ -70,9 +70,8 @@
#define NR_PRIMARY 8 /* maximum number of primary ports */
/* The following variables can be set by giving module options */
-static int irq[NR_PRIMARY] = {0,0,0,0,0,0,0,0}; /* IRQ for each base port */
-static unsigned int divisor[NR_PRIMARY] = {0,0,0,0,0,0,0,0};
- /* custom divisor for each port */
+static int irq[NR_PRIMARY]; /* IRQ for each base port */
+static unsigned int divisor[NR_PRIMARY]; /* custom divisor for each port */
static unsigned int dma = ESP_DMA_CHANNEL; /* DMA channel */
static unsigned int rx_trigger = ESP_RX_TRIGGER;
static unsigned int tx_trigger = ESP_TX_TRIGGER;
@@ -168,7 +167,7 @@
* buffer across all the serial ports, since it significantly saves
* memory if large numbers of serial ports are open.
*/
-static unsigned char *tmp_buf = 0;
+static unsigned char *tmp_buf;
static DECLARE_MUTEX(tmp_buf_sem);
static inline int serial_paranoia_check(struct esp_struct *info,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/fdc-io.c linux/drivers/char/ftape/lowlevel/fdc-io.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/fdc-io.c Tue Nov 23 10:29:15 1999
+++ linux/drivers/char/ftape/lowlevel/fdc-io.c Mon Oct 16 12:58:51 2000
@@ -50,10 +50,10 @@
/* Global vars.
*/
-int ftape_motor = 0;
+int ftape_motor;
volatile int ftape_current_cylinder = -1;
volatile fdc_mode_enum fdc_mode = fdc_idle;
-fdc_config_info fdc = {0};
+fdc_config_info fdc;
DECLARE_WAIT_QUEUE_HEAD(ftape_wait_intr);
unsigned int ft_fdc_base = CONFIG_FT_FDC_BASE;
@@ -73,15 +73,15 @@
volatile __u8 fdc_cyl; /* FDC track from sector id */
volatile __u8 fdc_sect; /* FDC sector from sector id */
static int fdc_data_rate = 500; /* data rate (Kbps) */
-static int fdc_rate_code = 0; /* data rate code (0 == 500 Kbps) */
+static int fdc_rate_code; /* data rate code (0 == 500 Kbps) */
static int fdc_seek_rate = 2; /* step rate (msec) */
static void (*do_ftape) (void);
static int fdc_fifo_state; /* original fifo setting - fifo enabled */
static int fdc_fifo_thr; /* original fifo setting - threshold */
static int fdc_lock_state; /* original lock setting - locked */
-static int fdc_fifo_locked = 0; /* has fifo && lock set ? */
-static __u8 fdc_precomp = 0; /* default precomp. value (nsec) */
-static __u8 fdc_prec_code = 0; /* fdc precomp. select code */
+static int fdc_fifo_locked; /* has fifo && lock set ? */
+static __u8 fdc_precomp; /* default precomp. value (nsec) */
+static __u8 fdc_prec_code; /* fdc precomp. select code */
static char ftape_id[] = "ftape"; /* used by request irq and free irq */
@@ -188,7 +188,7 @@
int count = cmd_len;
int retry = 0;
#ifdef TESTING
- static unsigned int last_time = 0;
+ static unsigned int last_time;
unsigned int time;
#endif
TRACE_FUN(ft_t_any);
@@ -387,7 +387,7 @@
{
DECLARE_WAITQUEUE(wait,current);
sigset_t old_sigmask;
- static int resetting = 0;
+ static int resetting;
long timeout;
TRACE_FUN(ft_t_fdc_dma);
@@ -868,7 +868,7 @@
TRACE_EXIT 0;
}
-static int perpend_mode = 0; /* set if fdc is in perpendicular mode */
+static int perpend_mode; /* set if fdc is in perpendicular mode */
static int perpend_off(void)
{
@@ -1113,7 +1113,7 @@
/* Determine fd controller type
*/
-static __u8 fdc_save_state[2] = {0, 0};
+static __u8 fdc_save_state[2];
int fdc_probe(void)
{
@@ -1283,7 +1283,7 @@
static int fdc_config(void)
{
- static int already_done = 0;
+ static int already_done;
TRACE_FUN(ft_t_any);
if (already_done) {
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/fdc-isr.c linux/drivers/char/ftape/lowlevel/fdc-isr.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/fdc-isr.c Tue Nov 25 14:45:27 1997
+++ linux/drivers/char/ftape/lowlevel/fdc-isr.c Mon Oct 16 12:58:51 2000
@@ -44,10 +44,10 @@
/* Global vars.
*/
-volatile int ft_expected_stray_interrupts = 0;
-volatile int ft_interrupt_seen = 0;
-volatile int ft_seek_completed = 0;
-volatile int ft_hide_interrupt = 0;
+volatile int ft_expected_stray_interrupts;
+volatile int ft_interrupt_seen;
+volatile int ft_seek_completed;
+volatile int ft_hide_interrupt;
/* Local vars.
*/
typedef enum {
@@ -55,7 +55,7 @@
data_am_error = 0x04, data_crc_error = 0x08,
no_data_error = 0x10, overrun_error = 0x20,
} error_cause;
-static int stop_read_ahead = 0;
+static int stop_read_ahead;
static void print_error_cause(int cause)
@@ -730,7 +730,7 @@
*/
static void handle_fdc_busy(buffer_struct *buff)
{
- static int no_data_error_count = 0;
+ static int no_data_error_count;
int retry = 0;
error_cause cause;
__u8 in[7];
@@ -1077,7 +1077,7 @@
*/
void fdc_isr(void)
{
- static int isr_active = 0;
+ static int isr_active;
#ifdef TESTING
unsigned int t0 = ftape_timestamp();
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-bsm.c linux/drivers/char/ftape/lowlevel/ftape-bsm.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-bsm.c Tue Nov 23 10:29:15 1999
+++ linux/drivers/char/ftape/lowlevel/ftape-bsm.c Mon Oct 16 12:58:51 2000
@@ -39,8 +39,8 @@
/* Local vars.
*/
-static __u8 *bad_sector_map = NULL;
-static SectorCount *bsm_hash_ptr = NULL;
+static __u8 *bad_sector_map;
+static SectorCount *bsm_hash_ptr;
typedef enum {
forward, backward
@@ -454,7 +454,7 @@
* For true random access it may have to be redesigned.
*/
static int last_reference = -1;
- static SectorMap map = 0;
+ static SectorMap map;
if (segment_id > last_reference) {
/* Skip all sectors before segment_id
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-format.c linux/drivers/char/ftape/lowlevel/ftape-format.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-format.c Tue Nov 25 14:45:27 1997
+++ linux/drivers/char/ftape/lowlevel/ftape-format.c Mon Oct 16 12:58:51 2000
@@ -47,7 +47,7 @@
/*
* first segment of the new buffer
*/
-static int switch_segment = 0;
+static int switch_segment;
/*
* at most 256 segments fit into one 32 kb buffer. Even TR-1 cartridges have
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-io.c linux/drivers/char/ftape/lowlevel/ftape-io.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-io.c Tue Aug 31 11:30:48 1999
+++ linux/drivers/char/ftape/lowlevel/ftape-io.c Mon Oct 16 12:58:51 2000
@@ -50,14 +50,14 @@
*/
/* NOTE: sectors start numbering at 1, all others at 0 ! */
ft_timeout_table ftape_timeout;
-unsigned int ftape_tape_len = 0;
+unsigned int ftape_tape_len;
volatile qic117_cmd_t ftape_current_command;
const struct qic117_command_table qic117_cmds[] = QIC117_COMMANDS;
int ftape_might_be_off_track;
/* Local vars.
*/
-static int diagnostic_mode = 0;
+static int diagnostic_mode;
static unsigned int ftape_udelay_count;
static unsigned int ftape_udelay_time;
@@ -232,7 +232,7 @@
int ftape_command(qic117_cmd_t command)
{
int result = 0;
- static int level = 0;
+ static int level;
TRACE_FUN(ft_t_any);
if ((unsigned int)command > NR_ITEMS(qic117_cmds)) {
@@ -778,7 +778,7 @@
int status;
int result = 0;
unsigned int data_rate = new_rate;
- static int supported = 0;
+ static int supported;
int rate_changed = 0;
qic_model dummy_model;
unsigned int dummy_qic_std, dummy_tape_len;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-rw.c linux/drivers/char/ftape/lowlevel/ftape-rw.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-rw.c Sun Sep 3 11:47:46 2000
+++ linux/drivers/char/ftape/lowlevel/ftape-rw.c Mon Oct 16 12:58:51 2000
@@ -43,18 +43,18 @@
/* Global vars.
*/
-int ft_nr_buffers = 0;
-buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS] = {NULL, };
+int ft_nr_buffers;
+buffer_struct *ft_buffer[FT_MAX_NR_BUFFERS];
static volatile int ft_head;
static volatile int ft_tail; /* not volatile but need same type as head */
int fdc_setup_error;
location_record ft_location = {-1, 0};
-volatile int ftape_tape_running = 0;
+volatile int ftape_tape_running;
/* Local vars.
*/
-static int overrun_count_offset = 0;
-static int inhibit_correction = 0;
+static int overrun_count_offset;
+static int inhibit_correction;
/* maxmimal allowed overshoot when fast seeking
*/
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-tracing.c linux/drivers/char/ftape/lowlevel/ftape-tracing.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-tracing.c Tue Nov 25 14:45:27 1997
+++ linux/drivers/char/ftape/lowlevel/ftape-tracing.c Mon Oct 16 12:58:51 2000
@@ -43,11 +43,11 @@
* 8 + everything else
*/
ft_trace_t ftape_tracing = ft_t_info; /* Default level: information and up */
-int ftape_function_nest_level = 0;
+int ftape_function_nest_level;
/* Local vars.
*/
-static __u8 trace_id = 0;
+static __u8 trace_id;
static char spacing[] = "* ";
void ftape_trace_call(const char *file, const char *name)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-write.c linux/drivers/char/ftape/lowlevel/ftape-write.c
--- v2.4.0-test9/linux/drivers/char/ftape/lowlevel/ftape-write.c Tue Nov 25 14:45:27 1997
+++ linux/drivers/char/ftape/lowlevel/ftape-write.c Mon Oct 16 12:58:51 2000
@@ -47,7 +47,7 @@
/* Local vars.
*/
-static int last_write_failed = 0;
+static int last_write_failed;
void ftape_zap_write_buffers(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-buffers.c linux/drivers/char/ftape/zftape/zftape-buffers.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-buffers.c Sun Nov 8 11:13:46 1998
+++ linux/drivers/char/ftape/zftape/zftape-buffers.c Mon Oct 16 12:58:51 2000
@@ -48,8 +48,8 @@
/* local varibales
*/
-static unsigned int used_memory = 0;
-static unsigned int peak_memory = 0;
+static unsigned int used_memory;
+static unsigned int peak_memory;
void zft_memory_stats(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-ctl.c linux/drivers/char/ftape/zftape/zftape-ctl.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-ctl.c Wed May 6 10:56:03 1998
+++ linux/drivers/char/ftape/zftape/zftape-ctl.c Mon Oct 16 12:58:51 2000
@@ -49,16 +49,16 @@
/* Global vars.
*/
-int zft_write_protected = 0; /* this is when cartridge rdonly or O_RDONLY */
-int zft_header_read = 0;
-int zft_offline = 0;
-unsigned int zft_unit = 0;
-int zft_resid = 0;
-int zft_mt_compression = 0;
+int zft_write_protected; /* this is when cartridge rdonly or O_RDONLY */
+int zft_header_read;
+int zft_offline;
+unsigned int zft_unit;
+int zft_resid;
+int zft_mt_compression;
/* Local vars.
*/
-static int going_offline = 0;
+static int going_offline;
typedef int (mt_fun)(int *argptr);
typedef int (*mt_funp)(int *argptr);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-read.c linux/drivers/char/ftape/zftape/zftape-read.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-read.c Thu Mar 12 10:33:21 1998
+++ linux/drivers/char/ftape/zftape/zftape-read.c Mon Oct 16 12:58:51 2000
@@ -45,11 +45,11 @@
/* Global vars.
*/
-int zft_just_before_eof = 0;
+int zft_just_before_eof;
/* Local vars.
*/
-static int buf_len_rd = 0;
+static int buf_len_rd;
void zft_zap_read_buffers(void)
{
@@ -194,7 +194,7 @@
int *req_clipped,
const zft_position *pos)
{
- static __s64 remaining = 0;
+ static __s64 remaining;
static int eod;
TRACE_FUN(ft_t_flow);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-rw.c linux/drivers/char/ftape/zftape/zftape-rw.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-rw.c Fri Feb 20 18:28:22 1998
+++ linux/drivers/char/ftape/zftape/zftape-rw.c Mon Oct 16 12:58:51 2000
@@ -41,14 +41,14 @@
/* Global vars.
*/
-__u8 *zft_deblock_buf = NULL;
-__u8 *zft_hseg_buf = NULL;
+__u8 *zft_deblock_buf;
+__u8 *zft_hseg_buf;
int zft_deblock_segment = -1;
zft_status_enum zft_io_state = zft_idle;
-int zft_header_changed = 0;
-int zft_bad_sector_map_changed = 0;
-int zft_qic113 = 0; /* conform to old specs. and old zftape */
-int zft_use_compression = 0;
+int zft_header_changed;
+int zft_bad_sector_map_changed;
+int zft_qic113; /* conform to old specs. and old zftape */
+int zft_use_compression;
zft_position zft_pos = {
-1, /* seg_pos */
0, /* seg_byte_pos */
@@ -56,10 +56,10 @@
0 /* volume_pos */
};
unsigned int zft_blk_sz = CONFIG_ZFT_DFLT_BLK_SZ;
-__s64 zft_capacity = 0;
+__s64 zft_capacity;
-unsigned int zft_written_segments = 0;
-int zft_label_changed = 0;
+unsigned int zft_written_segments;
+int zft_label_changed;
/* Local vars.
*/
@@ -165,8 +165,8 @@
* Also, it might be in the future that the bad sector map gets
* changed. -> reset the cache
*/
-static int seg_pos = 0;
-static __s64 tape_pos = 0;
+static int seg_pos;
+static __s64 tape_pos;
__s64 zft_get_capacity(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-vtbl.c linux/drivers/char/ftape/zftape/zftape-vtbl.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-vtbl.c Tue Nov 25 14:45:28 1997
+++ linux/drivers/char/ftape/zftape/zftape-vtbl.c Mon Oct 16 12:58:51 2000
@@ -48,8 +48,8 @@
* global variables
*/
int zft_qic_mode = 1; /* use the vtbl */
-int zft_old_ftape = 0; /* prevents old ftaped tapes to be overwritten */
-int zft_volume_table_changed = 0; /* for write_header_segments() */
+int zft_old_ftape; /* prevents old ftaped tapes to be overwritten */
+int zft_volume_table_changed; /* for write_header_segments() */
/*
* private variables (only exported for inline functions)
@@ -59,9 +59,9 @@
/* We could also allocate these dynamically when extracting the volume table
* sizeof(zft_volinfo) is about 32 or something close to that
*/
-static zft_volinfo tape_vtbl = { {NULL, NULL}, 0, };
-static zft_volinfo eot_vtbl = { {NULL, NULL}, 0, };
-static zft_volinfo *cur_vtbl = NULL;
+static zft_volinfo tape_vtbl;
+static zft_volinfo eot_vtbl;
+static zft_volinfo *cur_vtbl;
inline void zft_new_vtbl_entry(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-write.c linux/drivers/char/ftape/zftape/zftape-write.c
--- v2.4.0-test9/linux/drivers/char/ftape/zftape/zftape-write.c Thu Mar 12 10:33:21 1998
+++ linux/drivers/char/ftape/zftape/zftape-write.c Mon Oct 16 12:58:51 2000
@@ -48,8 +48,8 @@
/* Local vars.
*/
-static int last_write_failed = 0;
-static int need_flush = 0;
+static int last_write_failed;
+static int need_flush;
void zft_prevent_flush(void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/generic_serial.c linux/drivers/char/generic_serial.c
--- v2.4.0-test9/linux/drivers/char/generic_serial.c Fri Aug 11 14:54:17 2000
+++ linux/drivers/char/generic_serial.c Mon Oct 16 12:58:51 2000
@@ -33,7 +33,7 @@
static char * tmp_buf;
static DECLARE_MUTEX(tmp_buf_sem);
-int gs_debug = 0;
+int gs_debug;
#ifdef DEBUG
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/i810_rng.c linux/drivers/char/i810_rng.c
--- v2.4.0-test9/linux/drivers/char/i810_rng.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/char/i810_rng.c Mon Oct 16 12:23:12 2000
@@ -2,6 +2,7 @@
Hardware driver for Intel i810 Random Number Generator (RNG)
Copyright 2000 Jeff Garzik
+ Copyright 2000 Philipp Rumpf
Driver Web site: http://gtf.org/garzik/drivers/i810_rng/
@@ -131,6 +132,9 @@
This will slow things down but guarantee that bad data is
never passed upstream.
+ * FIXME: module unload is racy. To fix this, struct ctl_table
+ needs an owner member a la struct file_operations.
+
* Since the RNG is accessed from a timer as well as normal
kernel code, but not from interrupts, we use spin_lock_bh
in regular code, and spin_lock in the timer function, to
@@ -164,6 +168,17 @@
* Convert numeric globals to unsigned
* Module unload cleanup
+ Version 0.9.1:
+ * Support i815 chipsets too (Matt Sottek)
+ * Fix reference counting when statically compiled (prumpf)
+ * Rewrite rng_dev_read (prumpf)
+ * Make module races less likely (prumpf)
+ * Small miscellaneous bug fixes (prumpf)
+ * Use pci table for PCI id list
+
+ Version 0.9.2:
+ * Simplify open blocking logic
+
*/
@@ -187,7 +202,7 @@
/*
* core module and version information
*/
-#define RNG_VERSION "0.9.0"
+#define RNG_VERSION "0.9.2"
#define RNG_MODULE_NAME "i810_rng"
#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION
#define PFX RNG_MODULE_NAME ": "
@@ -218,11 +233,6 @@
/*
- * misc helper macros
- */
-#define arraysize(x) (sizeof(x)/sizeof(*(x)))
-
-/*
* prototypes
*/
static void rng_fips_test_store (int rng_data);
@@ -281,8 +291,6 @@
static struct timer_list rng_timer; /* kernel timer for RNG hardware reads and tests */
static struct pci_dev *rng_pdev; /* Firmware Hub PCI device found during PCI probe */
static struct semaphore rng_open_sem; /* Semaphore for serializing rng_open/release */
-static wait_queue_head_t rng_open_wait; /* Wait queue for serializing open/release */
-static int rng_open_mode; /* Open mode (we only allow reads) */
/*
@@ -363,7 +371,7 @@
/*
- * rng_enable - enable or disable the RNG and internal timer
+ * rng_enable - enable or disable the RNG hardware
*/
static int rng_enable (int enable)
{
@@ -377,15 +385,13 @@
hw_status = rng_hwstatus ();
if (enable) {
- rng_hw_enabled = 1;
+ rng_hw_enabled++;
MOD_INC_USE_COUNT;
} else {
-#ifndef __alpha__
- if (GET_USE_COUNT (THIS_MODULE) > 0)
+ if (rng_hw_enabled) {
+ rng_hw_enabled--;
MOD_DEC_USE_COUNT;
- if (GET_USE_COUNT (THIS_MODULE) == 0)
- rng_hw_enabled = 0;
-#endif
+ }
}
if (rng_hw_enabled && ((hw_status & RNG_ENABLED) == 0)) {
@@ -407,7 +413,8 @@
else if (action == 2)
printk (KERN_INFO PFX "RNG h/w disabled\n");
- if ((!!enable) != (!!(new_status & RNG_ENABLED))) {
+ /* too bad C doesn't have ^^ */
+ if ((!enable) != (!(new_status & RNG_ENABLED))) {
printk (KERN_ERR PFX "Unable to %sable the RNG\n",
enable ? "en" : "dis");
rc = -EIO;
@@ -429,6 +436,7 @@
DPRINTK ("ENTER\n");
+ MOD_INC_USE_COUNT;
spin_lock_bh (&rng_lock);
rng_enabled_sysctl = enabled_save = rng_timer_enabled;
spin_unlock_bh (&rng_lock);
@@ -456,6 +464,9 @@
spin_unlock_bh (&rng_lock);
}
+ /* This needs to be in a higher layer */
+ MOD_DEC_USE_COUNT;
+
DPRINTK ("EXIT, returning 0\n");
return 0;
}
@@ -614,22 +625,17 @@
int rc = -EINVAL;
if ((filp->f_mode & FMODE_READ) == 0)
- goto err_out_ret;
+ return rc;
if (filp->f_mode & FMODE_WRITE)
- goto err_out_ret;
+ return rc;
/* wait for device to become free */
- down (&rng_open_sem);
- while (rng_open_mode & filp->f_mode) {
- if (filp->f_flags & O_NONBLOCK) {
- up (&rng_open_sem);
- return -EWOULDBLOCK;
- }
- up (&rng_open_sem);
- interruptible_sleep_on (&rng_open_wait);
- if (signal_pending (current))
+ if (filp->f_flags & O_NONBLOCK) {
+ if (down_trylock (&rng_open_sem))
+ return -EAGAIN;
+ } else {
+ if (down_interruptible (&rng_open_sem))
return -ERESTARTSYS;
- down (&rng_open_sem);
}
if (rng_enable (1)) {
@@ -637,87 +643,60 @@
goto err_out;
}
- rng_open_mode |= filp->f_mode & (FMODE_READ | FMODE_WRITE);
- up (&rng_open_sem);
return 0;
err_out:
up (&rng_open_sem);
-err_out_ret:
return rc;
}
static int rng_dev_release (struct inode *inode, struct file *filp)
{
- down(&rng_open_sem);
-
rng_enable(0);
- rng_open_mode &= (~filp->f_mode) & (FMODE_READ|FMODE_WRITE);
-
up (&rng_open_sem);
- wake_up (&rng_open_wait);
return 0;
}
-static ssize_t rng_dev_read (struct file *filp, char * buf, size_t size,
- loff_t *offp)
+static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size,
+ loff_t * offp)
{
- int have_data, copied = 0;
- u8 data=0;
- u8 *page;
-
- if (size < 1)
- return 0;
-
- page = (unsigned char *) get_free_page (GFP_KERNEL);
- if (!page)
- return -ENOMEM;
-
-read_loop:
- /* using the fact that read() can return >0 but
- * less than the requested amount, we simply
- * read up to PAGE_SIZE or buffer size, whichever
- * is smaller, and return that data.
- */
- if ((copied == size) || (copied == PAGE_SIZE)) {
- size_t tmpsize = (copied == size) ? size : PAGE_SIZE;
- int rc = copy_to_user (buf, page, tmpsize);
- free_page ((long)page);
- if (rc) return rc;
- return tmpsize;
- }
+ int have_data;
+ u8 data = 0;
+ ssize_t ret = 0;
- spin_lock_bh (&rng_lock);
+ while (size) {
+ spin_lock_bh (&rng_lock);
- have_data = 0;
- if (rng_data_present ()) {
- data = rng_data_read ();
- have_data = 1;
- }
+ have_data = 0;
+ if (rng_data_present ()) {
+ data = rng_data_read ();
+ have_data = 1;
+ }
- spin_unlock_bh (&rng_lock);
+ spin_unlock_bh (&rng_lock);
- if (have_data) {
- page[copied] = data;
- copied++;
- } else {
- if (filp->f_flags & O_NONBLOCK) {
- free_page ((long)page);
- return -EAGAIN;
+ if (have_data) {
+ if (put_user (data, buf++)) {
+ ret = ret ? : -EFAULT;
+ break;
+ }
+ size--;
+ ret++;
}
- }
- if (current->need_resched)
- schedule ();
+ if (current->need_resched)
+ schedule ();
+
+ if (signal_pending (current))
+ return ret ? : -ERESTARTSYS;
- if (signal_pending (current)) {
- free_page ((long)page);
- return -ERESTARTSYS;
+ if (filp->f_flags & O_NONBLOCK)
+ return ret ? : -EAGAIN;
}
- goto read_loop;
+ return ret;
}
@@ -793,8 +772,9 @@
* want to register another driver on the same PCI id.
*/
const static struct pci_device_id rng_pci_tbl[] __initdata = {
- { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, },
- { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, },
+ { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, },
+ { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, },
+ { 0x8086, 0x1130, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, },
};
MODULE_DEVICE_TABLE (pci, rng_pci_tbl);
@@ -832,14 +812,16 @@
DPRINTK ("ENTER\n");
init_MUTEX (&rng_open_sem);
- init_waitqueue_head (&rng_open_wait);
- pdev = pci_find_device (0x8086, 0x2418, NULL);
- if (!pdev)
- pdev = pci_find_device (0x8086, 0x2428, NULL);
- if (!pdev)
- return -ENODEV;
+ pci_for_each_dev(pdev) {
+ if (pci_match_device (rng_pci_tbl, pdev) != NULL)
+ goto match;
+ }
+
+ DPRINTK ("EXIT, returning -ENODEV\n");
+ return -ENODEV;
+match:
rc = rng_init_one (pdev);
if (rc)
return rc;
@@ -894,7 +876,7 @@
* 4.11.1 (http://csrc.nist.gov/fips/fips1401.htm)
* The Monobit, Poker, Runs, and Long Runs tests are implemented below.
* This test is run at periodic intervals to verify
-* data is sufficently random. If the tests are failed the RNG module
+* data is sufficiently random. If the tests are failed the RNG module
* will no longer submit data to the entropy pool, but the tests will
* continue to run at the given interval. If at a later time the RNG
* passes all tests it will be re-enabled for the next period.
@@ -905,7 +887,7 @@
* disable the RNG, we will just leave it disabled for the period of
* time until the tests are rerun and passed.
*
-* For argument sake I tested /proc/urandom with these tests and it
+* For argument sake I tested /dev/urandom with these tests and it
* took 142,095 tries before I got a failure, and urandom isn't as
* random as random :)
*/
@@ -923,7 +905,7 @@
int j;
static int last_bit = 0;
- DPRINTK ("ENTER, rng_data = %d\n", rng_data & 0xFF);
+ DPRINTK ("ENTER, rng_data = %d\n", rng_data);
poker[rng_data >> 4]++;
poker[rng_data & 15]++;
@@ -1010,8 +992,8 @@
rng_trusted = rng_test;
/* finally, clear out FIPS variables for start of next run */
- memset (&poker, 0, sizeof (poker));
- memset (&runs, 0, sizeof (runs));
+ memset (poker, 0, sizeof (poker));
+ memset (runs, 0, sizeof (runs));
ones = 0;
rlength = -1;
current_bit = 0;
@@ -1019,4 +1001,3 @@
DPRINTK ("EXIT\n");
}
-
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ip2/i2ellis.c linux/drivers/char/ip2/i2ellis.c
--- v2.4.0-test9/linux/drivers/char/ip2/i2ellis.c Wed Jul 5 11:00:21 2000
+++ linux/drivers/char/ip2/i2ellis.c Mon Oct 16 12:58:51 2000
@@ -51,9 +51,9 @@
//* Static Data *
//***************
-static int ii2Safe = 0; // Safe I/O address for delay routine
+static int ii2Safe; // Safe I/O address for delay routine
-static int iiDelayed = 0; // Set when the iiResetDelay function is
+static int iiDelayed; // Set when the iiResetDelay function is
// called. Cleared when ANY board is reset.
static struct timer_list * pDelayTimer; // Used by iiDelayTimer
static wait_queue_head_t pDelayWait; // Used by iiDelayTimer
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ip2main.c linux/drivers/char/ip2main.c
--- v2.4.0-test9/linux/drivers/char/ip2main.c Fri Jul 14 12:20:22 2000
+++ linux/drivers/char/ip2main.c Mon Oct 16 12:58:51 2000
@@ -295,13 +295,13 @@
/* Here, then is a table of board pointers which the interrupt routine should
* scan through to determine who it must service.
*/
-static unsigned short i2nBoards = 0; // Number of boards here
+static unsigned short i2nBoards; // Number of boards here
static i2eBordStrPtr i2BoardPtrTable[IP2_MAX_BOARDS];
static i2ChanStrPtr DevTable[IP2_MAX_PORTS];
//DevTableMem just used to save addresses for kfree
-static void *DevTableMem[IP2_MAX_BOARDS] = {NULL,NULL,NULL,NULL};
+static void *DevTableMem[IP2_MAX_BOARDS];
static struct tty_struct * TtyTable[IP2_MAX_PORTS];
static struct termios * Termios[IP2_MAX_PORTS];
@@ -318,8 +318,8 @@
open: ip2_ipl_open,
};
-static long irq_counter = 0;
-static long bh_counter = 0;
+static long irq_counter;
+static long bh_counter;
// Use immediate queue to service interrupts
//#define USE_IQI // PCI&2.2 needs work
@@ -330,15 +330,15 @@
*/
#define POLL_TIMEOUT (jiffies + 1)
static struct timer_list PollTimer = { function: ip2_poll };
-static char TimerOn = 0;
+static char TimerOn;
#ifdef IP2DEBUG_TRACE
/* Trace (debug) buffer data */
#define TRACEMAX 1000
static unsigned long tracebuf[TRACEMAX];
-static int tracestuff = 0;
-static int tracestrip = 0;
-static int tracewrap = 0;
+static int tracestuff;
+static int tracestrip;
+static int tracewrap;
#endif
/**********/
@@ -372,13 +372,13 @@
# endif /* LINUX_VERSION */
#endif /* MODULE */
-static int poll_only = 0;
+static int poll_only;
-static int Eisa_irq = 0;
-static int Eisa_slot = 0;
+static int Eisa_irq;
+static int Eisa_slot;
-static int iindx = 0;
-static char rirqs[IP2_MAX_BOARDS] = {0,};
+static int iindx;
+static char rirqs[IP2_MAX_BOARDS];
static int Valid_Irqs[] = { 3, 4, 5, 7, 10, 11, 12, 15, 0};
/******************************************************************************/
@@ -584,13 +584,13 @@
old_ip2_init(void)
{
#ifdef CONFIG_DEVFS_FS
- static devfs_handle_t devfs_handle = NULL;
+ static devfs_handle_t devfs_handle;
int j, box;
#endif
int i;
int err;
int status = 0;
- static int loaded = 0;
+ static int loaded;
i2eBordStrPtr pB = NULL;
int rc = -1;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/istallion.c linux/drivers/char/istallion.c
--- v2.4.0-test9/linux/drivers/char/istallion.c Tue Jul 18 15:57:58 2000
+++ linux/drivers/char/istallion.c Mon Oct 16 12:58:51 2000
@@ -142,7 +142,7 @@
*/
#define STLI_EISAPROBE 0
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
/*****************************************************************************/
@@ -189,7 +189,7 @@
* swapping!). All ports will share one buffer - since if the system
* is already swapping a shared buffer won't make things any worse.
*/
-static char *stli_tmpwritebuf = (char *) NULL;
+static char *stli_tmpwritebuf;
static DECLARE_MUTEX(stli_tmpwritesem);
#define STLI_TXBUFSIZE 4096
@@ -201,10 +201,10 @@
* with a large memcpy. Just use 1 buffer for all ports, since its
* use it is only need for short periods of time by each port.
*/
-static char *stli_txcookbuf = (char *) NULL;
-static int stli_txcooksize = 0;
-static int stli_txcookrealsize = 0;
-static struct tty_struct *stli_txcooktty = (struct tty_struct *) NULL;
+static char *stli_txcookbuf;
+static int stli_txcooksize;
+static int stli_txcookrealsize;
+static struct tty_struct *stli_txcooktty;
/*
* Define a local default termios struct. All ports will be created
@@ -234,7 +234,7 @@
static stlibrd_t *stli_brds[STL_MAXBRDS];
-static int stli_shared = 0;
+static int stli_shared;
/*
* Per board state flags. Used with the state field of the board struct.
@@ -796,7 +796,7 @@
function: stli_poll
};
-static int stli_timeron = 0;
+static int stli_timeron;
/*
* Define the calculation for the timeout routine.
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/joystick/gameport.c linux/drivers/char/joystick/gameport.c
--- v2.4.0-test9/linux/drivers/char/joystick/gameport.c Tue Aug 22 09:06:31 2000
+++ linux/drivers/char/joystick/gameport.c Mon Oct 16 12:58:51 2000
@@ -51,9 +51,9 @@
EXPORT_SYMBOL(gameport_rescan);
EXPORT_SYMBOL(gameport_cooked_read);
-static struct gameport *gameport_list = NULL;
-static struct gameport_dev *gameport_dev = NULL;
-static int gameport_number = 0;
+static struct gameport *gameport_list;
+static struct gameport_dev *gameport_dev;
+static int gameport_number;
/*
* gameport_measure_speed() measures the gameport i/o speed.
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/joystick/ns558.c linux/drivers/char/joystick/ns558.c
--- v2.4.0-test9/linux/drivers/char/joystick/ns558.c Mon Aug 21 08:52:53 2000
+++ linux/drivers/char/joystick/ns558.c Mon Oct 16 13:28:11 2000
@@ -57,7 +57,8 @@
struct gameport gameport;
};
-static struct ns558 *ns558 = NULL;
+static struct ns558 *ns558;
+static int have_pci_devices;
/*
* ns558_isa_probe() tries to find an isa gameport at the
@@ -311,6 +312,15 @@
#endif
/*
+ * Probe for PCI ports. Always probe for PCI first,
+ * it is the least-invasive probe.
+ */
+
+ i = pci_module_init(&ns558_pci_driver);
+ if (i == 0)
+ have_pci_devices = 1;
+
+/*
* Probe for ISA ports.
*/
@@ -329,14 +339,7 @@
}
#endif
-/*
- * Probe for PCI ports.
- */
-
- if (!ns558 && pci_module_init(&ns558_pci_driver))
- return -ENODEV;
-
- return 0;
+ return ns558 ? 0 : -ENODEV;
}
void __exit ns558_exit(void)
@@ -365,7 +368,8 @@
port = port->next;
}
- pci_unregister_driver(&ns558_pci_driver);
+ if (have_pci_devices)
+ pci_unregister_driver(&ns558_pci_driver);
}
module_init(ns558_init);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/joystick/serio.c linux/drivers/char/joystick/serio.c
--- v2.4.0-test9/linux/drivers/char/joystick/serio.c Thu Jun 22 06:59:58 2000
+++ linux/drivers/char/joystick/serio.c Mon Oct 16 12:58:51 2000
@@ -44,9 +44,9 @@
EXPORT_SYMBOL(serio_close);
EXPORT_SYMBOL(serio_rescan);
-static struct serio *serio_list = NULL;
-static struct serio_dev *serio_dev = NULL;
-static int serio_number = 0;
+static struct serio *serio_list;
+static struct serio_dev *serio_dev;
+static int serio_number;
static void serio_find_dev(struct serio *serio)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
--- v2.4.0-test9/linux/drivers/char/keyboard.c Mon Jul 31 19:36:10 2000
+++ linux/drivers/char/keyboard.c Mon Oct 16 12:58:51 2000
@@ -61,7 +61,7 @@
#define KBD_DEFLOCK 0
#endif
-void (*kbd_ledfunc)(unsigned int led) = NULL;
+void (*kbd_ledfunc)(unsigned int led);
EXPORT_SYMBOL(handle_scancode);
EXPORT_SYMBOL(kbd_ledfunc);
@@ -83,24 +83,24 @@
*/
/* shift state counters.. */
-static unsigned char k_down[NR_SHIFT] = {0, };
+static unsigned char k_down[NR_SHIFT];
/* keyboard key bitmap */
-static unsigned long key_down[256/BITS_PER_LONG] = { 0, };
+static unsigned long key_down[256/BITS_PER_LONG];
-static int dead_key_next = 0;
+static int dead_key_next;
/*
* In order to retrieve the shift_state (for the mouse server), either
* the variable must be global, or a new procedure must be created to
* return the value. I chose the former way.
*/
-int shift_state = 0;
+int shift_state;
static int npadch = -1; /* -1 or number assembled on pad */
-static unsigned char diacr = 0;
-static char rep = 0; /* flag telling character repeat */
+static unsigned char diacr;
+static char rep; /* flag telling character repeat */
struct kbd_struct kbd_table[MAX_NR_CONSOLES];
static struct tty_struct **ttytab;
static struct kbd_struct * kbd = kbd_table;
-static struct tty_struct * tty = NULL;
+static struct tty_struct * tty;
void compute_shiftstate(void);
@@ -160,7 +160,7 @@
static int sysrq_pressed;
#endif
-static struct pm_dev *pm_kbd = NULL;
+static struct pm_dev *pm_kbd;
/*
* Many other routines do put_queue, but I think either
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/lp.c linux/drivers/char/lp.c
--- v2.4.0-test9/linux/drivers/char/lp.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/char/lp.c Thu Oct 12 14:20:47 2000
@@ -603,17 +603,10 @@
}
static struct console lpcons = {
- "lp",
- lp_console_write,
- NULL,
- lp_console_device,
- NULL,
- NULL,
- NULL,
- CON_PRINTBUFFER,
- 0,
- 0,
- NULL
+ name: "lp",
+ write: lp_console_write,
+ device: lp_console_device,
+ flags: CON_PRINTBUFFER,
};
#endif /* console on line printer */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/mem.c linux/drivers/char/mem.c
--- v2.4.0-test9/linux/drivers/char/mem.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/char/mem.c Tue Oct 10 10:33:51 2000
@@ -28,9 +28,6 @@
#ifdef CONFIG_I2C
extern int i2c_init_all(void);
#endif
-#ifdef CONFIG_SPARCAUDIO
-extern int sparcaudio_init(void);
-#endif
#ifdef CONFIG_ISDN
int isdn_init(void);
#endif
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/misc.c linux/drivers/char/misc.c
--- v2.4.0-test9/linux/drivers/char/misc.c Sun Oct 8 10:50:16 2000
+++ linux/drivers/char/misc.c Mon Oct 16 12:58:51 2000
@@ -174,7 +174,7 @@
int misc_register(struct miscdevice * misc)
{
- static devfs_handle_t devfs_handle = NULL;
+ static devfs_handle_t devfs_handle;
if (misc->next || misc->prev)
return -EBUSY;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/mxser.c linux/drivers/char/mxser.c
--- v2.4.0-test9/linux/drivers/char/mxser.c Mon Jun 19 13:25:06 2000
+++ linux/drivers/char/mxser.c Mon Oct 16 12:58:51 2000
@@ -170,10 +170,10 @@
{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C104, MXSER_BOARD_C104_PCI},
};
-static int ioaddr[MXSER_BOARDS] = {0, 0, 0, 0};
+static int ioaddr[MXSER_BOARDS];
static int ttymajor = MXSERMAJOR;
static int calloutmajor = MXSERCUMAJOR;
-static int verbose = 0;
+static int verbose;
/* Variables for insmod */
@@ -274,7 +274,7 @@
* buffer across all the serial ports, since it significantly saves
* memory if large numbers of serial ports are open.
*/
-static unsigned char *mxvar_tmp_buf = 0;
+static unsigned char *mxvar_tmp_buf;
static struct semaphore mxvar_tmp_buf_sem;
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/pc110pad.c linux/drivers/char/pc110pad.c
--- v2.4.0-test9/linux/drivers/char/pc110pad.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/char/pc110pad.c Mon Oct 16 12:58:51 2000
@@ -68,7 +68,7 @@
/* driver/filesystem interface management */
static wait_queue_head_t queue;
static struct fasync_struct *asyncptr;
-static int active=0; /* number of concurrent open()s */
+static int active; /* number of concurrent open()s */
static struct semaphore reader_lock;
/**
@@ -111,10 +111,10 @@
* up/down mouse events to be created by incrementing synthesize_tap.
*/
-static int button_pending=0;
-static int recent_transition=0;
-static int transition_count=0;
-static int synthesize_tap=0;
+static int button_pending;
+static int recent_transition;
+static int transition_count;
+static int synthesize_tap;
static void tap_timeout(unsigned long data);
static struct timer_list tap_timer = { function: tap_timeout };
@@ -218,13 +218,13 @@
*/
static int raw_data[3];
-static int raw_data_count=0;
-static int raw_x=0, raw_y=0; /* most recent absolute co-ords read */
-static int raw_down=0; /* raw up/down state */
-static int debounced_down=0; /* up/down state after debounce processing */
+static int raw_data_count;
+static int raw_x, raw_y; /* most recent absolute co-ords read */
+static int raw_down; /* raw up/down state */
+static int debounced_down; /* up/down state after debounce processing */
static enum { NO_BOUNCE, JUST_GONE_UP, JUST_GONE_DOWN } bounce=NO_BOUNCE;
/* set just after an up/down transition */
-static int xy_pending=0; /* set if new data have not yet been read */
+static int xy_pending; /* set if new data have not yet been read */
/*
* Timer goes off a short while after an up/down transition and copies
@@ -425,7 +425,7 @@
* will make much sense in that case.
*/
static int read_bytes[3];
-static int read_byte_count=0;
+static int read_byte_count;
/**
* sample_raw:
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- v2.4.0-test9/linux/drivers/char/pc_keyb.c Mon Aug 28 12:06:33 2000
+++ linux/drivers/char/pc_keyb.c Mon Oct 23 15:51:36 2000
@@ -65,13 +65,13 @@
static void __aux_write_ack(int val);
#endif
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
static unsigned char handle_kbd_event(void);
/* used only by send_data - set by keyboard_interrupt */
-static volatile unsigned char reply_expected = 0;
-static volatile unsigned char acknowledge = 0;
-static volatile unsigned char resend = 0;
+static volatile unsigned char reply_expected;
+static volatile unsigned char acknowledge;
+static volatile unsigned char resend;
#if defined CONFIG_PSMOUSE
@@ -84,9 +84,9 @@
#define AUX_RECONNECT 170 /* scancode when ps2 device is plugged (back) in */
static struct aux_queue *queue; /* Mouse data buffer. */
-static int aux_count = 0;
+static int aux_count;
/* used when we send commands to the mouse that expect an ACK. */
-static unsigned char mouse_reply_expected = 0;
+static unsigned char mouse_reply_expected;
#define AUX_INTS_OFF (KBD_MODE_KCC | KBD_MODE_DISABLE_MOUSE | KBD_MODE_SYS | KBD_MODE_KBD_INT)
#define AUX_INTS_ON (KBD_MODE_KCC | KBD_MODE_SYS | KBD_MODE_MOUSE_INT | KBD_MODE_KBD_INT)
@@ -291,7 +291,7 @@
int pckbd_translate(unsigned char scancode, unsigned char *keycode,
char raw_mode)
{
- static int prev_scancode = 0;
+ static int prev_scancode;
/* special prefix scancodes.. */
if (scancode == 0xe0 || scancode == 0xe1) {
@@ -448,7 +448,7 @@
unsigned char status = kbd_read_status();
unsigned int work = 10000;
- while (status & KBD_STAT_OBF) {
+ while ((--work > 0) && (status & KBD_STAT_OBF)) {
unsigned char scancode;
scancode = kbd_read_input();
@@ -467,13 +467,10 @@
}
status = kbd_read_status();
-
- if (!--work) {
- printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n",
- status);
- break;
- }
}
+
+ if (!work)
+ printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n", status);
return status;
}
@@ -481,14 +478,13 @@
static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- unsigned long flags;
-
#ifdef CONFIG_VT
kbd_pt_regs = regs;
#endif
- spin_lock_irqsave(&kbd_controller_lock, flags);
+
+ spin_lock_irq(&kbd_controller_lock);
handle_kbd_event();
- spin_unlock_irqrestore(&kbd_controller_lock, flags);
+ spin_unlock_irq(&kbd_controller_lock);
}
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/ppdev.c linux/drivers/char/ppdev.c
--- v2.4.0-test9/linux/drivers/char/ppdev.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/ppdev.c Mon Oct 16 12:58:51 2000
@@ -595,7 +595,7 @@
release: pp_release,
};
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
static int __init ppdev_init (void)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/q40_keyb.c linux/drivers/char/q40_keyb.c
--- v2.4.0-test9/linux/drivers/char/q40_keyb.c Wed Sep 8 11:51:22 1999
+++ linux/drivers/char/q40_keyb.c Mon Oct 23 15:51:36 2000
@@ -94,7 +94,7 @@
};
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
/*
@@ -340,11 +340,10 @@
static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- unsigned long flags;
unsigned char status;
disable_keyboard();
- spin_lock_irqsave(&kbd_controller_lock, flags);
+ spin_lock(&kbd_controller_lock);
kbd_pt_regs = regs;
status = IRQ_KEYB_MASK & master_inb(INTERRUPT_REG);
@@ -386,7 +385,7 @@
keyup=1;
}
exit:
- spin_unlock_irqrestore(&kbd_controller_lock, flags);
+ spin_unlock(&kbd_controller_lock);
master_outb(-1,KEYBOARD_UNLOCK_REG); /* keyb ints reenabled herewith */
enable_keyboard();
}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/qpmouse.c linux/drivers/char/qpmouse.c
--- v2.4.0-test9/linux/drivers/char/qpmouse.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/qpmouse.c Mon Oct 16 12:58:51 2000
@@ -110,8 +110,8 @@
#define QP_IRQ 12
-static int qp_present = 0;
-static int qp_count = 0;
+static int qp_present;
+static int qp_count;
static int qp_data = QP_DATA;
static int qp_status = QP_STATUS;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/random.c linux/drivers/char/random.c
--- v2.4.0-test9/linux/drivers/char/random.c Tue Jul 18 15:58:13 2000
+++ linux/drivers/char/random.c Mon Oct 16 12:58:51 2000
@@ -763,7 +763,7 @@
void add_keyboard_randomness(unsigned char scancode)
{
- static unsigned char last_scancode = 0;
+ static unsigned char last_scancode;
/* ignore autorepeat (multiple key down w/o key up) */
if (scancode != last_scancode) {
last_scancode = scancode;
@@ -1998,8 +1998,8 @@
__u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
__u16 sport, __u16 dport)
{
- static __u32 rekey_time = 0;
- static __u32 count = 0;
+ static __u32 rekey_time;
+ static __u32 count;
static __u32 secret[12];
struct timeval tv;
__u32 seq;
@@ -2027,7 +2027,7 @@
__u32 secure_ipv6_id(__u32 *daddr)
{
- static time_t rekey_time = 0;
+ static time_t rekey_time;
static __u32 secret[12];
time_t t;
@@ -2050,8 +2050,8 @@
__u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
__u16 sport, __u16 dport)
{
- static __u32 rekey_time = 0;
- static __u32 count = 0;
+ static __u32 rekey_time;
+ static __u32 count;
static __u32 secret[12];
struct timeval tv;
__u32 seq;
@@ -2105,7 +2105,7 @@
*/
__u32 secure_ip_id(__u32 daddr)
{
- static time_t rekey_time = 0;
+ static time_t rekey_time;
static __u32 secret[12];
time_t t;
@@ -2144,7 +2144,7 @@
#define COOKIEBITS 24 /* Upper bits store count */
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
-static int syncookie_init = 0;
+static int syncookie_init;
static __u32 syncookie_secret[2][16-3+HASH_BUFFER_SIZE];
__u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, __u16 sport,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/rio/rio_linux.c linux/drivers/char/rio/rio_linux.c
--- v2.4.0-test9/linux/drivers/char/rio/rio_linux.c Fri Aug 11 14:51:33 2000
+++ linux/drivers/char/rio/rio_linux.c Mon Oct 16 12:58:51 2000
@@ -211,7 +211,7 @@
static struct tty_driver rio_driver, rio_callout_driver;
static struct tty_driver rio_driver2, rio_callout_driver2;
-static struct tty_struct * rio_table[RIO_NPORTS] = { NULL, };
+static struct tty_struct * rio_table[RIO_NPORTS];
static struct termios ** rio_termios;
static struct termios ** rio_termios_locked;
@@ -223,9 +223,9 @@
struct rio_port *rio_ports;
int rio_refcount;
-int rio_initialized = 0;
-int rio_nports = 0;
-int rio_debug = 0;
+int rio_initialized;
+int rio_nports;
+int rio_debug;
/* You can have the driver poll your card.
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/riscom8.c linux/drivers/char/riscom8.c
--- v2.4.0-test9/linux/drivers/char/riscom8.c Thu Oct 28 10:42:02 1999
+++ linux/drivers/char/riscom8.c Mon Oct 16 12:58:51 2000
@@ -82,13 +82,13 @@
#define RISCOM_TYPE_NORMAL 1
#define RISCOM_TYPE_CALLOUT 2
-static struct riscom_board * IRQ_to_board[16] = { NULL, } ;
+static struct riscom_board * IRQ_to_board[16];
static struct tty_driver riscom_driver, riscom_callout_driver;
-static int riscom_refcount = 0;
-static struct tty_struct * riscom_table[RC_NBOARD * RC_NPORT] = { NULL, };
-static struct termios * riscom_termios[RC_NBOARD * RC_NPORT] = { NULL, };
-static struct termios * riscom_termios_locked[RC_NBOARD * RC_NPORT] = { NULL, };
-static unsigned char * tmp_buf = NULL;
+static int riscom_refcount;
+static struct tty_struct * riscom_table[RC_NBOARD * RC_NPORT];
+static struct termios * riscom_termios[RC_NBOARD * RC_NPORT];
+static struct termios * riscom_termios_locked[RC_NBOARD * RC_NPORT];
+static unsigned char * tmp_buf;
static DECLARE_MUTEX(tmp_buf_sem);
static unsigned long baud_table[] = {
@@ -103,9 +103,7 @@
{ 0, RC_IOBASE4, 0, },
};
-static struct riscom_port rc_port[RC_NBOARD * RC_NPORT] = {
- { 0, },
-};
+static struct riscom_port rc_port[RC_NBOARD * RC_NPORT];
/* RISCom/8 I/O ports addresses (without address translation) */
static unsigned short rc_ioport[] = {
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/rocket.c linux/drivers/char/rocket.c
--- v2.4.0-test9/linux/drivers/char/rocket.c Sun Sep 3 11:43:18 2000
+++ linux/drivers/char/rocket.c Mon Oct 16 12:58:51 2000
@@ -154,26 +154,26 @@
static void rp_flush_buffer(struct tty_struct *tty);
static struct tty_driver rocket_driver, callout_driver;
-static int rocket_refcount = 0;
+static int rocket_refcount;
-static int rp_num_ports_open = 0;
+static int rp_num_ports_open;
static struct timer_list rocket_timer;
-unsigned long board1 = 0;
-unsigned long board2 = 0;
-unsigned long board3 = 0;
-unsigned long board4 = 0;
-unsigned long controller = 0;
-unsigned long support_low_speed = 0;
+unsigned long board1;
+unsigned long board2;
+unsigned long board3;
+unsigned long board4;
+unsigned long controller;
+unsigned long support_low_speed;
int rp_baud_base = 460800;
static unsigned long rcktpt_io_addr[NUM_BOARDS];
static int max_board;
#ifdef TIME_STAT
-static unsigned long long time_stat = 0;
-static unsigned long time_stat_short = 0;
-static unsigned long time_stat_long = 0;
-static unsigned long time_counter = 0;
+static unsigned long long time_stat;
+static unsigned long time_stat_short;
+static unsigned long time_stat_long;
+static unsigned long time_counter;
#endif
#if ((LINUX_VERSION_CODE > 0x020111) && defined(MODULE))
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/rtc.c linux/drivers/char/rtc.c
--- v2.4.0-test9/linux/drivers/char/rtc.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/rtc.c Thu Oct 12 11:16:26 2000
@@ -39,9 +39,10 @@
* 1.10a Andrea Arcangeli: Alpha updates
* 1.10b Andrew Morton: SMP lock fix
* 1.10c Cesar Barros: SMP locking fixes and cleanup
+ * 1.10d Paul Gortmaker: delete paranoia check in rtc_exit
*/
-#define RTC_VERSION "1.10c"
+#define RTC_VERSION "1.10d"
#define RTC_IO_EXTENT 0x10 /* Only really two ports, but... */
@@ -723,18 +724,6 @@
static void __exit rtc_exit (void)
{
- /* interrupts and maybe timer disabled at this point by rtc_release */
- /* FIXME: Maybe??? */
-
- if (rtc_status & RTC_TIMER_ON) {
- spin_lock_irq (&rtc_lock);
- rtc_status &= ~RTC_TIMER_ON;
- del_timer(&rtc_irq_timer);
- spin_unlock_irq (&rtc_lock);
-
- printk(KERN_WARNING "rtc_exit(), and timer still running.\n");
- }
-
remove_proc_entry ("driver/rtc", NULL);
misc_deregister(&rtc_dev);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/sbc60xxwdt.c linux/drivers/char/sbc60xxwdt.c
--- v2.4.0-test9/linux/drivers/char/sbc60xxwdt.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/sbc60xxwdt.c Mon Oct 16 12:58:51 2000
@@ -104,9 +104,9 @@
static void wdt_timer_ping(unsigned long);
static struct timer_list timer;
-static unsigned long next_heartbeat = 0;
-static int wdt_is_open = 0;
-static int wdt_expect_close = 0;
+static unsigned long next_heartbeat;
+static int wdt_is_open;
+static int wdt_expect_close;
/*
* Whack the dog
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/selection.c linux/drivers/char/selection.c
--- v2.4.0-test9/linux/drivers/char/selection.c Tue Aug 31 11:30:48 1999
+++ linux/drivers/char/selection.c Mon Oct 16 12:58:51 2000
@@ -36,11 +36,11 @@
/* Variables for selection control. */
/* Use a dynamic buffer, instead of static (Dec 1994) */
- int sel_cons = 0; /* must not be disallocated */
+ int sel_cons; /* must not be disallocated */
static volatile int sel_start = -1; /* cleared by clear_selection */
static int sel_end;
-static int sel_buffer_lth = 0;
-static char *sel_buffer = NULL;
+static int sel_buffer_lth;
+static char *sel_buffer;
/* clear_selection, highlight and highlight_pointer can be called
from interrupt (via scrollback/front) */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/serial.c linux/drivers/char/serial.c
--- v2.4.0-test9/linux/drivers/char/serial.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/serial.c Mon Oct 16 12:58:51 2000
@@ -267,7 +267,7 @@
static int IRQ_timeout[NR_IRQS];
#ifdef CONFIG_SERIAL_CONSOLE
static struct console sercons;
-static int lsr_break_flag = 0;
+static int lsr_break_flag;
#endif
#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
static unsigned long break_pressed; /* break, really ... */
@@ -325,7 +325,7 @@
#define NR_PCI_BOARDS 8
static struct pci_board_inst serial_pci_board[NR_PCI_BOARDS];
-static int serial_pci_board_idx = 0;
+static int serial_pci_board_idx;
#ifndef IS_PCI_REGION_IOPORT
#define IS_PCI_REGION_IOPORT(dev, r) (pci_resource_flags((dev), (r)) & \
@@ -1060,7 +1060,7 @@
*/
static void rs_timer(unsigned long dummy)
{
- static unsigned long last_strobe = 0;
+ static unsigned long last_strobe;
struct async_struct *info;
unsigned int i;
unsigned long flags;
@@ -5666,17 +5666,13 @@
}
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/serial167.c linux/drivers/char/serial167.c
--- v2.4.0-test9/linux/drivers/char/serial167.c Mon Feb 14 15:31:14 2000
+++ linux/drivers/char/serial167.c Thu Oct 12 14:20:47 2000
@@ -2858,17 +2858,13 @@
static struct console sercons = {
- "ttyS",
- serial167_console_write,
- NULL,
- serial167_console_device,
- serial167_console_wait_key,
- NULL,
- serial167_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: serial167_console_write,
+ device: serial167_console_device,
+ wait_key: serial167_console_wait_key,
+ setup: serial167_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/serial_21285.c linux/drivers/char/serial_21285.c
--- v2.4.0-test9/linux/drivers/char/serial_21285.c Sun Aug 13 10:04:17 2000
+++ linux/drivers/char/serial_21285.c Thu Oct 12 14:20:47 2000
@@ -490,17 +490,13 @@
static struct console rs285_cons =
{
- SERIAL_21285_NAME,
- rs285_console_write,
- NULL,
- rs285_console_device,
- rs285_console_wait_key,
- NULL,
- rs285_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: SERIAL_21285_NAME,
+ write: rs285_console_write,
+ device: rs285_console_device,
+ wait_key: rs285_console_wait_key,
+ setup: rs285_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
void __init rs285_console_init(void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/serial_amba.c linux/drivers/char/serial_amba.c
--- v2.4.0-test9/linux/drivers/char/serial_amba.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/serial_amba.c Thu Oct 12 14:20:47 2000
@@ -2016,7 +2016,6 @@
#endif
device: ambauart_console_device,
wait_key: ambauart_console_wait_key,
- unblank: NULL,
setup: ambauart_console_setup,
flags: CON_PRINTBUFFER,
index: -1,
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/sh-sci.c linux/drivers/char/sh-sci.c
--- v2.4.0-test9/linux/drivers/char/sh-sci.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/sh-sci.c Thu Oct 12 14:20:47 2000
@@ -1247,17 +1247,13 @@
}
static struct console sercons = {
- "ttySC",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttySC",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/softdog.c linux/drivers/char/softdog.c
--- v2.4.0-test9/linux/drivers/char/softdog.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/softdog.c Mon Oct 16 12:58:51 2000
@@ -58,7 +58,7 @@
static struct timer_list watchdog_ticktock = {
function: watchdog_fire,
};
-static int timer_alive = 0;
+static int timer_alive;
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/specialix.c linux/drivers/char/specialix.c
--- v2.4.0-test9/linux/drivers/char/specialix.c Wed Jul 5 10:56:13 2000
+++ linux/drivers/char/specialix.c Mon Oct 16 12:58:51 2000
@@ -181,11 +181,11 @@
#define SPECIALIX_TYPE_CALLOUT 2
static struct tty_driver specialix_driver, specialix_callout_driver;
-static int specialix_refcount = 0;
-static struct tty_struct * specialix_table[SX_NBOARD * SX_NPORT] = { NULL, };
-static struct termios * specialix_termios[SX_NBOARD * SX_NPORT] = { NULL, };
-static struct termios * specialix_termios_locked[SX_NBOARD * SX_NPORT] = { NULL, };
-static unsigned char * tmp_buf = NULL;
+static int specialix_refcount;
+static struct tty_struct * specialix_table[SX_NBOARD * SX_NPORT];
+static struct termios * specialix_termios[SX_NBOARD * SX_NPORT];
+static struct termios * specialix_termios_locked[SX_NBOARD * SX_NPORT];
+static unsigned char * tmp_buf;
static DECLARE_MUTEX(tmp_buf_sem);
static unsigned long baud_table[] = {
@@ -200,9 +200,7 @@
{ 0, SX_IOBASE4, 15, },
};
-static struct specialix_port sx_port[SX_NBOARD * SX_NPORT] = {
- { 0, },
-};
+static struct specialix_port sx_port[SX_NBOARD * SX_NPORT];
#ifdef SPECIALIX_TIMER
@@ -1013,7 +1011,7 @@
long tmp;
unsigned char cor1 = 0, cor3 = 0;
unsigned char mcor1 = 0, mcor2 = 0;
- static int again=0;
+ static int again;
if (!(tty = port->tty) || !tty->termios)
return;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/stallion.c linux/drivers/char/stallion.c
--- v2.4.0-test9/linux/drivers/char/stallion.c Tue Sep 5 14:03:52 2000
+++ linux/drivers/char/stallion.c Mon Oct 16 12:58:51 2000
@@ -146,7 +146,7 @@
static struct tty_struct *stl_ttys[STL_MAXDEVS];
static struct termios *stl_termios[STL_MAXDEVS];
static struct termios *stl_termioslocked[STL_MAXDEVS];
-static int stl_refcount = 0;
+static int stl_refcount;
/*
* We will need to allocate a temporary write buffer for chars that
@@ -192,7 +192,7 @@
* shared with another Stallion board.
*/
static int stl_gotintrs[STL_MAXBRDS];
-static int stl_numintrs = 0;
+static int stl_numintrs;
/*****************************************************************************/
@@ -748,7 +748,7 @@
/*****************************************************************************/
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
#ifdef MODULE
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/sx.c linux/drivers/char/sx.c
--- v2.4.0-test9/linux/drivers/char/sx.c Fri Aug 11 14:51:33 2000
+++ linux/drivers/char/sx.c Mon Oct 16 12:58:51 2000
@@ -309,16 +309,16 @@
static struct tty_driver sx_driver, sx_callout_driver;
-static struct tty_struct * sx_table[SX_NPORTS] = { NULL, };
+static struct tty_struct * sx_table[SX_NPORTS];
static struct termios ** sx_termios;
static struct termios ** sx_termios_locked;
struct sx_board boards[SX_NBOARDS];
struct sx_port *sx_ports;
int sx_refcount;
-int sx_initialized = 0;
-int sx_nports = 0;
-int sx_debug = 0;
+int sx_initialized;
+int sx_nports;
+int sx_debug;
/* You can have the driver poll your card.
@@ -330,7 +330,7 @@
everything will continue to work....
*/
int sx_poll = 1;
-int sx_slowpoll = 0;
+int sx_slowpoll;
/* The card limits the number of interrupts per second.
At 115k2 "100" should be sufficient.
@@ -2077,7 +2077,7 @@
void printheader(void)
{
- static int header_printed = 0;
+ static int header_printed;
if (!header_printed) {
printk (KERN_INFO "Specialix SX driver "
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/synclink.c linux/drivers/char/synclink.c
--- v2.4.0-test9/linux/drivers/char/synclink.c Tue Jul 18 15:56:40 2000
+++ linux/drivers/char/synclink.c Thu Oct 12 11:18:36 2000
@@ -3354,7 +3354,6 @@
}
}
- set_current_state(TASK_RUNNING);
exit:
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):mgsl_wait_until_sent(%s) exit\n",
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/sysrq.c linux/drivers/char/sysrq.c
--- v2.4.0-test9/linux/drivers/char/sysrq.c Mon Jul 31 19:36:10 2000
+++ linux/drivers/char/sysrq.c Mon Oct 16 12:58:51 2000
@@ -34,7 +34,7 @@
int sysrq_enabled = 1;
/* Machine specific power off function */
-void (*sysrq_power_off)(void) = NULL;
+void (*sysrq_power_off)(void);
EXPORT_SYMBOL(sysrq_power_off);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/tpqic02.c linux/drivers/char/tpqic02.c
--- v2.4.0-test9/linux/drivers/char/tpqic02.c Wed Jul 12 21:58:42 2000
+++ linux/drivers/char/tpqic02.c Mon Oct 16 12:58:51 2000
@@ -116,7 +116,7 @@
static struct mtconfiginfo qic02_tape_dynconf = /* user settable */
{ 0, 0, BOGUS_IRQ, 0, 0, TPQD_DEFAULT_FLAGS, };
-static struct qic02_ccb qic02_tape_ccb = { 0, }; /* private stuff */
+static struct qic02_ccb qic02_tape_ccb; /* private stuff */
#else
@@ -127,7 +127,7 @@
# endif
#endif /* CONFIG_QIC02_DYNCONF */
-static volatile int ctlbits = 0; /* control reg bits for tape interface */
+static volatile int ctlbits; /* control reg bits for tape interface */
static wait_queue_head_t qic02_tape_transfer; /* sync rw with interrupts */
@@ -149,10 +149,10 @@
static volatile flag status_bytes_wr = NO; /* write FM at close or not */
static volatile flag status_bytes_rd = NO; /* (rd|wr) used for rewinding */
-static volatile unsigned long status_cmd_pending = 0; /* cmd in progress */
+static volatile unsigned long status_cmd_pending; /* cmd in progress */
static volatile flag status_expect_int = NO; /* ready for interrupts */
static volatile flag status_timer_on = NO; /* using time-out */
-static volatile int status_error = 0; /* int handler may detect error */
+static volatile int status_error; /* int handler may detect error */
static volatile flag status_eof_detected = NO; /* end of file */
static volatile flag status_eom_detected = NO; /* end of recorded media */
static volatile flag status_eot_detected = NO; /* end of tape */
@@ -161,7 +161,7 @@
static volatile unsigned long dma_bytes_todo;
static volatile unsigned long dma_bytes_done;
-static volatile unsigned dma_mode = 0; /* !=0 also means DMA in use */
+static volatile unsigned dma_mode; /* !=0 also means DMA in use */
static flag need_rewind = YES;
static kdev_t current_tape_dev;
@@ -208,7 +208,7 @@
* must ensure that a large enough buffer is passed to the kernel, in order
* to reduce tape repositioning wear and tear.
*/
-static unsigned long buffaddr = 0; /* physical address of buffer */
+static unsigned long buffaddr; /* physical address of buffer */
/* This translates minor numbers to the corresponding recording format: */
static const char *format_names[] = {
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- v2.4.0-test9/linux/drivers/char/tty_io.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/tty_io.c Mon Oct 16 12:58:51 2000
@@ -1414,7 +1414,7 @@
if ((tty->driver.type == TTY_DRIVER_TYPE_SERIAL) &&
(tty->driver.subtype == SERIAL_TYPE_CALLOUT) &&
(tty->count == 1)) {
- static int nr_warns = 0;
+ static int nr_warns;
if (nr_warns < 5) {
printk(KERN_WARNING "tty_io.c: "
"process %d (%s) used obsolete /dev/%s - "
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
--- v2.4.0-test9/linux/drivers/char/vc_screen.c Thu Jun 29 18:25:50 2000
+++ linux/drivers/char/vc_screen.c Mon Oct 16 12:58:51 2000
@@ -459,7 +459,7 @@
open: vcs_open,
};
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
void vcs_make_devfs (unsigned int index, int unregister)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/vme_scc.c linux/drivers/char/vme_scc.c
--- v2.4.0-test9/linux/drivers/char/vme_scc.c Mon Feb 14 15:31:14 2000
+++ linux/drivers/char/vme_scc.c Thu Oct 12 14:20:47 2000
@@ -1111,17 +1111,13 @@
static struct console sercons = {
- "ttyS",
- scc_console_write,
- NULL,
- scc_console_device,
- scc_console_wait_key,
- NULL,
- scc_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: scc_console_write,
+ device: scc_console_device,
+ wait_key: scc_console_wait_key,
+ setup: scc_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/vt.c linux/drivers/char/vt.c
--- v2.4.0-test9/linux/drivers/char/vt.c Tue Aug 8 15:25:24 2000
+++ linux/drivers/char/vt.c Mon Oct 16 12:58:51 2000
@@ -36,7 +36,7 @@
#include
#endif /* CONFIG_FB_COMPAT_XPMAC */
-char vt_dont_switch = 0;
+char vt_dont_switch;
extern struct tty_driver console_driver;
#define VT_IS_IN_USE(i) (console_driver.table[i] && console_driver.table[i]->count)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/wdt285.c linux/drivers/char/wdt285.c
--- v2.4.0-test9/linux/drivers/char/wdt285.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/wdt285.c Mon Oct 16 12:58:51 2000
@@ -43,7 +43,7 @@
#define FCLK (50*1000*1000) /* 50MHz */
static int soft_margin = TIMER_MARGIN; /* in seconds */
-static int timer_alive = 0;
+static int timer_alive;
#ifdef ONLY_TESTING
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/char/wdt977.c linux/drivers/char/wdt977.c
--- v2.4.0-test9/linux/drivers/char/wdt977.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/char/wdt977.c Mon Oct 16 12:58:51 2000
@@ -29,8 +29,8 @@
#define WATCHDOG_MINOR 130
static int timeout = 3;
-static int timer_alive = 0;
-static int testmode = 0;
+static int timer_alive;
+static int testmode;
/*
* Allow only one person to hold it open
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/i2o/i2o_core.c linux/drivers/i2o/i2o_core.c
--- v2.4.0-test9/linux/drivers/i2o/i2o_core.c Mon Jun 19 13:30:56 2000
+++ linux/drivers/i2o/i2o_core.c Mon Oct 16 13:36:08 2000
@@ -183,7 +183,7 @@
static int evt_in = 0;
static int evt_out = 0;
static int evt_q_len = 0;
-#define MODINC(x,y) (x = x++ % y)
+#define MODINC(x,y) ((x) = ((x) + 1) % (y))
/*
* I2O configuration spinlock. This isnt a big deal for contention
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/i2o/i2o_scsi.c linux/drivers/i2o/i2o_scsi.c
--- v2.4.0-test9/linux/drivers/i2o/i2o_scsi.c Wed Apr 12 09:38:53 2000
+++ linux/drivers/i2o/i2o_scsi.c Mon Oct 30 14:44:29 2000
@@ -437,6 +437,8 @@
continue;
shpnt = scsi_register(tpnt, sizeof(struct i2o_scsi_host));
+ if(shpnt==NULL)
+ continue;
save_flags(flags);
cli();
shpnt->unique_id = (u32)d;
@@ -902,12 +904,8 @@
return 0;
}
-/* Loadable module support */
-#ifdef MODULE
-
MODULE_AUTHOR("Red Hat Software");
-Scsi_Host_Template driver_template = I2OSCSI;
+static Scsi_Host_Template driver_template = I2OSCSI;
#include "../scsi/scsi_module.c"
-#endif
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/Config.in linux/drivers/ide/Config.in
--- v2.4.0-test9/linux/drivers/ide/Config.in Tue Sep 5 13:08:42 2000
+++ linux/drivers/ide/Config.in Thu Oct 26 14:11:39 2000
@@ -68,7 +68,9 @@
dep_bool ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_EXPERIMENTAL
dep_bool ' PROMISE PDC20246/PDC20262/PDC20267 support' CONFIG_BLK_DEV_PDC202XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX
+ dep_bool ' ServerWorks OSB4 chipset support' CONFIG_BLK_DEV_OSB4 $CONFIG_BLK_DEV_OSB4
dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
+ dep_bool ' SLC90E66 chipset support' CONFIG_BLK_DEV_SLC90E66 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' VIA82CXXX chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
fi
@@ -154,9 +156,11 @@
"$CONFIG_BLK_DEV_HPT366" = "y" -o \
"$CONFIG_BLK_DEV_IDE_PMAC" = "y" -o \
"$CONFIG_BLK_DEV_OPTI621" = "y" -o \
+ "$CONFIG_BLK_DEV_OSB4" = "y" -o \
"$CONFIG_BLK_DEV_PDC202XX" = "y" -o \
"$CONFIG_BLK_DEV_PIIX" = "y" -o \
"$CONFIG_BLK_DEV_SIS5513" = "y" -o \
+ "$CONFIG_BLK_DEV_SLC90E66" = "y" -o \
"$CONFIG_BLK_DEV_SL82C105" = "y" -o \
"$CONFIG_BLK_DEV_VIA82CXXX" = "y" ]; then
define_bool CONFIG_BLK_DEV_IDE_MODES y
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/Makefile linux/drivers/ide/Makefile
--- v2.4.0-test9/linux/drivers/ide/Makefile Sun Aug 6 11:23:40 2000
+++ linux/drivers/ide/Makefile Thu Oct 26 14:11:39 2000
@@ -1,14 +1,8 @@
#
# Makefile for the kernel ata, atapi, and ide block device drivers.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now inherited from the
-# parent makefile.
-#
-
+# 12 September 2000, Bartlomiej Zolnierkiewicz
+# Rewritten to use lists instead of if-statements.
#
# Note : at this point, these files are compiled on all systems.
# In the future, some of these should be built conditionally.
@@ -19,219 +13,85 @@
ALL_SUB_DIRS := $(SUB_DIRS)
O_TARGET := idedriver.o
-O_OBJS := ide-geometry.o
-M_OBJS :=
-OX_OBJS :=
-MX_OBJS :=
-
-ifeq ($(CONFIG_BLK_DEV_AEC62XX),y)
-IDE_OBJS += aec62xx.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_ALI14XX),y)
-IDE_OBJS += ali14xx.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_ALI15X3),y)
-IDE_OBJS += alim15x3.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_AMD7409),y)
-IDE_OBJS += amd7409.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_BUDDHA),y)
-IDE_OBJS += buddha.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_CMD640),y)
-IDE_OBJS += cmd640.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_CMD64X),y)
-IDE_OBJS += cmd64x.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_CS5530),y)
-IDE_OBJS += cs5530.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_CY82C693),y)
-IDE_OBJS += cy82c693.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_DTC2278),y)
-IDE_OBJS += dtc2278.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_FALCON_IDE),y)
-IDE_OBJS += falconide.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_GAYLE),y)
-IDE_OBJS += gayle.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_Q40IDE),y)
-IDE_OBJS += q40ide.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_HD),y)
-O_OBJS += hd.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_HPT34X),y)
-IDE_OBJS += hpt34x.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_HPT366),y)
-IDE_OBJS += hpt366.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_HT6560B),y)
-IDE_OBJS += ht6560b.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),y)
-IDE_OBJS += icside.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDEDMA),y)
-IDE_OBJS += ide-dma.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
-IDE_OBJS += ide-pci.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_ISAPNP),y)
-IDE_OBJS += ide-pnp.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDE_PMAC),y)
-IDE_OBJS += ide-pmac.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_MAC_IDE),y)
-IDE_OBJS += macide.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_NS87415),y)
-IDE_OBJS += ns87415.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_OPTI621),y)
-IDE_OBJS += opti621.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_PDC202XX),y)
-IDE_OBJS += pdc202xx.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_PDC4030),y)
-IDE_OBJS += pdc4030.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_PIIX),y)
-IDE_OBJS += piix.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_QD6580),y)
-IDE_OBJS += qd6580.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDE_RAPIDE),y)
-IDE_OBJS += rapide.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_RZ1000),y)
-IDE_OBJS += rz1000.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_SIS5513),y)
-IDE_OBJS += sis5513.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_SL82C105),y)
-IDE_OBJS += sl82c105.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_TRM290),y)
-IDE_OBJS += trm290.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_UMC8672),y)
-IDE_OBJS += umc8672.o
-endif
-
-ifeq ($(CONFIG_BLK_DEV_VIA82CXXX),y)
-IDE_OBJS += via82cxxx.o
-endif
-
-### if CONFIG_BLK_DEV_IDE is n, IDE_OBJS will be ignored
-
-ifeq ($(CONFIG_PROC_FS),y)
-IDE_OBJS += ide-proc.o
-endif
-
-###Collect
-
-ifeq ($(CONFIG_BLK_DEV_IDE),y)
- OX_OBJS += ide.o ide-features.o
- O_OBJS += ide-probe.o $(IDE_OBJS)
-else
- ifeq ($(CONFIG_BLK_DEV_IDE),m)
- MIX_OBJS += ide.o ide-features.o $(IDE_OBJS)
- M_OBJS += ide-mod.o ide-probe-mod.o
- endif
-endif
-
-############
-
-ifeq ($(CONFIG_BLK_DEV_IDECS),y)
-O_OBJS += ide-cs.o
-else
- ifeq ($(CONFIG_BLK_DEV_IDECS),m)
- M_OBJS += ide-cs.o
- endif
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDEDISK),y)
-O_OBJS += ide-disk.o
-else
- ifeq ($(CONFIG_BLK_DEV_IDEDISK),m)
- M_OBJS += ide-disk.o
- endif
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDECD),y)
-O_OBJS += ide-cd.o
-else
- ifeq ($(CONFIG_BLK_DEV_IDECD),m)
- M_OBJS += ide-cd.o
- endif
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDETAPE),y)
-O_OBJS += ide-tape.o
-else
- ifeq ($(CONFIG_BLK_DEV_IDETAPE),m)
- M_OBJS += ide-tape.o
- endif
-endif
-
-ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),y)
-O_OBJS += ide-floppy.o
-else
- ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),m)
- M_OBJS += ide-floppy.o
- endif
-endif
+
+obj-y :=
+obj-m :=
+ide-obj-y :=
+
+ide-obj-$(CONFIG_BLK_DEV_AEC62XX) += aec62xx.o
+ide-obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o
+ide-obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o
+ide-obj-$(CONFIG_BLK_DEV_AMD7409) += amd7409.o
+ide-obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
+ide-obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o
+ide-obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o
+ide-obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o
+ide-obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o
+ide-obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
+ide-obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
+ide-obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
+ide-obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
+ide-obj-$(CONFIG_BLK_DEV_HD) += hd.o
+ide-obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o
+ide-obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o
+ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
+ide-obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
+ide-obj-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o
+ide-obj-$(CONFIG_BLK_DEV_IDEPCI) += ide-pci.o
+ide-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
+ide-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += ide-pmac.o
+ide-obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
+ide-obj-$(CONFIG_BLK_DEV_NS87415) += ns87415.o
+ide-obj-$(CONFIG_BLK_DEV_OPTI621) += opti621.o
+ide-obj-$(CONFIG_BLK_DEV_OSB4) += osb4.o
+ide-obj-$(CONFIG_BLK_DEV_PDC202XX) += pdc202xx.o
+ide-obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
+ide-obj-$(CONFIG_BLK_DEV_PIIX) += piix.o
+ide-obj-$(CONFIG_BLK_DEV_QD6580) += qd6580.o
+ide-obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
+ide-obj-$(CONFIG_BLK_DEV_RZ1000) += rz1000.o
+ide-obj-$(CONFIG_BLK_DEV_SIS5513) += sis5513.o
+ide-obj-$(CONFIG_BLK_DEV_SLC90E66) += slc90e66.o
+ide-obj-$(CONFIG_BLK_DEV_SL82C105) += sl82c105.o
+ide-obj-$(CONFIG_BLK_DEV_TRM290) += trm290.o
+ide-obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
+ide-obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o
+
+ide-obj-$(CONFIG_PROC_FS) += ide-proc.o
+
+export-objs := ide.o ide-features.o
+list-multi := ide-mod.o ide-probe-mod.o
+ide-mod-objs := $(export-objs) $(ide-obj-y)
+ide-probe-mod-objs := ide-probe.o ide-geometry.o
+
+obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o
+obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o
+obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
+obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
+obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
+obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+multi-y := $(filter $(list-multi), $(obj-y))
+multi-m := $(filter $(list-multi), $(obj-m))
+int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Take multi-part drivers out of obj-y and put components in.
+obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+O_OBJS := $(filter-out $(export-objs), $(obj-y))
+OX_OBJS := $(filter $(export-objs), $(obj-y))
+M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
+MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
+MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
include $(TOPDIR)/Rules.make
-ide-mod.o: ide.o ide-features.o $(IDE_OBJS)
- $(LD) $(LD_RFLAG) -r -o $@ ide.o ide-features.o $(IDE_OBJS)
+ide-mod.o: $(ide-mod-objs)
+ $(LD) -r -o $@ $(ide-mod-objs)
-ide-probe-mod.o: ide-probe.o ide-geometry.o
- $(LD) $(LD_RFLAG) -r -o $@ ide-probe.o ide-geometry.o
+ide-probe-mod.o: $(ide-probe-mod-objs)
+ $(LD) -r -o $@ $(ide-probe-mod-objs)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/alim15x3.c linux/drivers/ide/alim15x3.c
--- v2.4.0-test9/linux/drivers/ide/alim15x3.c Tue Jun 20 07:52:36 2000
+++ linux/drivers/ide/alim15x3.c Mon Oct 16 13:36:08 2000
@@ -171,11 +171,11 @@
((reg5yh & 0x30)>>4) + 12 );
}
} else {
- p += sprintf(p, q,
- (tmp = (reg5xh & 0x03)) ? (tmp << 3) : 4,
- (tmp = ((reg5xh & 0x30)>>4)) ? (tmp << 3) : 4,
- (tmp = (reg5yh & 0x03)) ? (tmp << 3) : 4,
- (tmp = ((reg5yh & 0x30)>>4)) ? (tmp << 3) : 4 );
+ int t1 = (tmp = (reg5xh & 0x03)) ? (tmp << 3) : 4;
+ int t2 = (tmp = ((reg5xh & 0x30)>>4)) ? (tmp << 3) : 4;
+ int t3 = (tmp = (reg5yh & 0x03)) ? (tmp << 3) : 4;
+ int t4 = (tmp = ((reg5yh & 0x30)>>4)) ? (tmp << 3) : 4;
+ p += sprintf(p, q, t1, t2, t3, t4);
}
#if 0
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/buddha.c linux/drivers/ide/buddha.c
--- v2.4.0-test9/linux/drivers/ide/buddha.c Thu Apr 13 22:54:26 2000
+++ linux/drivers/ide/buddha.c Mon Oct 16 12:51:16 2000
@@ -117,19 +117,15 @@
buddha_num_hwifs = 0;
while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
unsigned long board;
- const char *name;
- if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA) {
+ if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA)
buddha_num_hwifs = BUDDHA_NUM_HWIFS;
- name = "Buddha IDE Interface";
- } else if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL) {
+ else if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL)
buddha_num_hwifs = CATWEASEL_NUM_HWIFS;
- name = "Catweasel IDE Interface and Floppy Controller";
- } else
+ else
continue;
board = z->resource.start;
if (!request_mem_region(board+BUDDHA_BASE1, 0x800, "IDE"))
continue;
- strcpy(z->name, name);
buddha_board = ZTWO_VADDR(board);
/* write to BUDDHA_IRQ_MR to enable the board IRQ */
*(char *)(buddha_board+BUDDHA_IRQ_MR) = 0;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide-disk.c linux/drivers/ide/ide-disk.c
--- v2.4.0-test9/linux/drivers/ide/ide-disk.c Tue Jun 20 07:52:36 2000
+++ linux/drivers/ide/ide-disk.c Thu Oct 26 23:35:48 2000
@@ -64,8 +64,8 @@
u16 *p = buffer;
while (wcount--) {
- *p++ = *p << 8 | *p >> 8;
- *p++ = *p << 8 | *p >> 8;
+ *p = *p << 8 | *p >> 8; p++;
+ *p = *p << 8 | *p >> 8; p++;
}
}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide-features.c linux/drivers/ide/ide-features.c
--- v2.4.0-test9/linux/drivers/ide/ide-features.c Thu Aug 3 16:07:42 2000
+++ linux/drivers/ide/ide-features.c Mon Oct 16 12:21:40 2000
@@ -224,7 +224,8 @@
#ifndef CONFIG_IDEDMA_IVB
if ((drive->id->hw_config & 0x6000) == 0) {
#else /* !CONFIG_IDEDMA_IVB */
- if ((drive->id->hw_config & 0x2000) == 0) {
+ if (((drive->id->hw_config & 0x2000) == 0) ||
+ ((drive->id->hw_config & 0x4000) == 0)) {
#endif /* CONFIG_IDEDMA_IVB */
printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->name);
return 1;
@@ -260,7 +261,7 @@
#ifndef CONFIG_IDEDMA_IVB
(drive->id->hw_config & 0x4000) &&
#endif /* CONFIG_IDEDMA_IVB */
- (drive->id->hw_config & 0x2000)) ? 1 : 0);
+ (drive->id->hw_config & 0x6000)) ? 1 : 0);
}
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide-pci.c linux/drivers/ide/ide-pci.c
--- v2.4.0-test9/linux/drivers/ide/ide-pci.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/ide/ide-pci.c Thu Oct 26 14:11:39 2000
@@ -72,6 +72,8 @@
#define DEVID_CS5530 ((ide_pci_devid_t){PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE})
#define DEVID_AMD7403 ((ide_pci_devid_t){PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_COBRA_7403})
#define DEVID_AMD7409 ((ide_pci_devid_t){PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7409})
+#define DEVID_SLC90E66 ((ide_pci_devid_t){PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1})
+#define DEVID_OSB4 ((ide_pci_devid_t){PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE})
#define IDE_IGNORE ((void *)-1)
@@ -205,6 +207,19 @@
#define INIT_OPTI621 NULL
#endif
+#ifdef CONFIG_BLK_DEV_OSB4
+extern unsigned int pci_init_osb4(struct pci_dev *, const char *);
+extern unsigned int ata66_osb4(ide_hwif_t *);
+extern void ide_init_osb4(ide_hwif_t *);
+#define PCI_OSB4 &pci_init_osb4
+#define ATA66_OSB4 &ata66_osb4
+#define INIT_OSB4 &ide_init_osb4
+#else
+#define PCI_OSB4 NULL
+#define ATA66_OSB4 NULL
+#define INIT_OSB4 NULL
+#endif
+
#ifdef CONFIG_BLK_DEV_PDC202XX
extern unsigned int pci_init_pdc202xx(struct pci_dev *, const char *);
extern unsigned int ata66_pdc202xx(ide_hwif_t *);
@@ -253,6 +268,19 @@
#define INIT_SIS5513 NULL
#endif
+#ifdef CONFIG_BLK_DEV_SLC90E66
+extern unsigned int pci_init_slc90e66(struct pci_dev *, const char *);
+extern unsigned int ata66_slc90e66(ide_hwif_t *);
+extern void ide_init_slc90e66(ide_hwif_t *);
+#define PCI_SLC90E66 &pci_init_slc90e66
+#define ATA66_SLC90E66 &ata66_slc90e66
+#define INIT_SLC90E66 &ide_init_slc90e66
+#else
+#define PCI_SLC90E66 NULL
+#define ATA66_SLC90E66 NULL
+#define INIT_SLC90E66 NULL
+#endif
+
#ifdef CONFIG_BLK_DEV_SL82C105
extern void ide_init_sl82c105(ide_hwif_t *);
extern void ide_dmacapable_sl82c105(ide_hwif_t *, unsigned long);
@@ -351,6 +379,8 @@
{DEVID_CS5530, "CS5530", PCI_CS5530, NULL, INIT_CS5530, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 },
{DEVID_AMD7403, "AMD7403", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 },
{DEVID_AMD7409, "AMD7409", PCI_AMD7409, ATA66_AMD7409, INIT_AMD7409, DMA_AMD7409, {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, ON_BOARD, 0 },
+ {DEVID_SLC90E66,"SLC90E66", PCI_SLC90E66, ATA66_SLC90E66, INIT_SLC90E66, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
+ {DEVID_OSB4, "ServerWorks OSB4", PCI_OSB4, ATA66_OSB4, INIT_OSB4, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 },
{IDE_PCI_DEVID_NULL, "PCI_IDE", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 }};
/*
@@ -466,7 +496,7 @@
*/
for (reg = 0; reg < 4; reg++) {
struct resource *res = dev->resource + reg;
- if (!(res->flags & PCI_BASE_ADDRESS_SPACE_IO))
+ if ((res->flags & IORESOURCE_IO) == 0)
continue;
if (!res->start) {
printk("%s: Missing I/O address #%d\n", name, reg);
@@ -493,11 +523,16 @@
byte tmp = 0;
ide_hwif_t *hwif, *mate = NULL;
unsigned int class_rev;
- int pci_class_ide;
#ifdef CONFIG_IDEDMA_AUTO
autodma = 1;
#endif
+
+#if 1 /* what do do with this useful tool ??? */
+ if (pci_enable_device(dev))
+ return;
+#endif
+
check_if_enabled:
if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
printk("%s: error accessing PCI regs\n", d->name);
@@ -539,8 +574,7 @@
* Can we trust the reported IRQ?
*/
pciirq = dev->irq;
- pci_class_ide = ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE);
- if (!pci_class_ide) {
+ if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
/*
* This allows offboard ide-pci cards the enable a BIOS,
@@ -550,17 +584,11 @@
*/
pciirq = (d->init_chipset) ? d->init_chipset(dev, d->name) : ide_special_settings(dev, d->name);
} else if (tried_config) {
- printk(KERN_INFO "%s: will probe irqs later\n", d->name);
+ printk("%s: will probe irqs later\n", d->name);
pciirq = 0;
} else if (!pciirq) {
- if (pci_class_ide) {
- /* this is the normal path for most IDE devices */
- if (d->init_chipset)
- pciirq = d->init_chipset(dev, d->name);
- else
- printk(KERN_INFO "%s standard IDE storage device detected\n", d->name);
- } else
- printk(KERN_WARNING "%s: bad irq (0): will probe later\n", d->name);
+ printk("%s: bad irq (%d): will probe later\n", d->name, pciirq);
+ pciirq = 0;
} else {
if (d->init_chipset)
(void) d->init_chipset(dev, d->name);
@@ -656,6 +684,7 @@
IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD646) ||
IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD648) ||
IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD649) ||
+ IDE_PCI_DEVID_EQ(d->devid, DEVID_OSB4) ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))) {
unsigned long dma_base = ide_get_or_set_dma_base(hwif, (!mate && d->extra) ? d->extra : 0, d->name);
if (dma_base && !(pcicmd & PCI_COMMAND_MASTER)) {
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide-proc.c linux/drivers/ide/ide-proc.c
--- v2.4.0-test9/linux/drivers/ide/ide-proc.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/ide/ide-proc.c Thu Oct 26 14:11:39 2000
@@ -101,6 +101,10 @@
extern byte hpt366_proc;
int (*hpt366_display_info)(char *, char **, off_t, int) = NULL;
#endif /* CONFIG_BLK_DEV_HPT366 */
+#ifdef CONFIG_BLK_DEV_OSB4
+extern byte osb4_proc;
+int (*osb4_display_info)(char *, char **, off_t, int) = NULL;
+#endif /* CONFIG_BLK_DEV_OSB4 */
#ifdef CONFIG_BLK_DEV_PDC202XX
extern byte pdc202xx_proc;
int (*pdc202xx_display_info)(char *, char **, off_t, int) = NULL;
@@ -113,6 +117,10 @@
extern byte sis_proc;
int (*sis_display_info)(char *, char **, off_t, int) = NULL;
#endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+extern byte slc90e66_proc;
+int (*slc90e66_display_info)(char *, char **, off_t, int) = NULL;
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
#ifdef CONFIG_BLK_DEV_VIA82CXXX
extern byte via_proc;
int (*via_display_info)(char *, char **, off_t, int) = NULL;
@@ -829,6 +837,10 @@
if ((hpt366_display_info) && (hpt366_proc))
create_proc_info_entry("hpt366", 0, proc_ide_root, hpt366_display_info);
#endif /* CONFIG_BLK_DEV_HPT366 */
+#ifdef CONFIG_BLK_DEV_OSB4
+ if ((osb4_display_info) && (osb4_proc))
+ create_proc_info_entry("osb4", 0, proc_ide_root, osb4_display_info);
+#endif /* CONFIG_BLK_DEV_OSB4 */
#ifdef CONFIG_BLK_DEV_PDC202XX
if ((pdc202xx_display_info) && (pdc202xx_proc))
create_proc_info_entry("pdc202xx", 0, proc_ide_root, pdc202xx_display_info);
@@ -841,6 +853,10 @@
if ((sis_display_info) && (sis_proc))
create_proc_info_entry("sis", 0, proc_ide_root, sis_display_info);
#endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+ if ((slc90e66_display_info) && (slc90e66_proc))
+ create_proc_info_entry("slc90e66", 0, proc_ide_root, slc90e66_display_info);
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
#ifdef CONFIG_BLK_DEV_VIA82CXXX
if ((via_display_info) && (via_proc))
create_proc_info_entry("via", 0, proc_ide_root, via_display_info);
@@ -881,6 +897,10 @@
if ((hpt366_display_info) && (hpt366_proc))
remove_proc_entry("ide/hpt366",0);
#endif /* CONFIG_BLK_DEV_HPT366 */
+#ifdef CONFIG_BLK_DEV_OSB4
+ if ((osb4_display_info) && (osb4_proc))
+ remove_proc_entry("ide/osb4",0);
+#endif /* CONFIG_BLK_DEV_OSB4 */
#ifdef CONFIG_BLK_DEV_PDC202XX
if ((pdc202xx_display_info) && (pdc202xx_proc))
remove_proc_entry("ide/pdc202xx",0);
@@ -893,6 +913,10 @@
if ((sis_display_info) && (sis_proc))
remove_proc_entry("ide/sis", 0);
#endif /* CONFIG_BLK_DEV_SIS5513 */
+#ifdef CONFIG_BLK_DEV_SLC90E66
+ if ((slc90e66_display_info) && (slc90e66_proc))
+ remove_proc_entry("ide/slc90e66",0);
+#endif /* CONFIG_BLK_DEV_SLC90E66 */
#ifdef CONFIG_BLK_DEV_VIA82CXXX
if ((via_display_info) && (via_proc))
remove_proc_entry("ide/via",0);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide-tape.c linux/drivers/ide/ide-tape.c
--- v2.4.0-test9/linux/drivers/ide/ide-tape.c Thu Jul 27 16:40:57 2000
+++ linux/drivers/ide/ide-tape.c Thu Oct 26 14:11:39 2000
@@ -3126,8 +3126,11 @@
idetape_init_pc (pc);
pc->c[0] = IDETAPE_LOAD_UNLOAD_CMD;
pc->c[4] = cmd;
- if (tape->onstream)
+ if (tape->onstream) {
pc->c[1] = 1;
+ if (cmd == !IDETAPE_LU_LOAD_MASK)
+ pc->c[4] = 4;
+ }
set_bit (PC_WAIT_FOR_DSC, &pc->flags);
pc->callback = &idetape_pc_callback;
}
@@ -3239,12 +3242,18 @@
pc->callback = &idetape_pc_callback;
}
-static void idetape_create_prevent_cmd (ide_drive_t *drive, idetape_pc_t *pc, int prevent)
+static int idetape_create_prevent_cmd (ide_drive_t *drive, idetape_pc_t *pc, int prevent)
{
+ idetape_tape_t *tape = drive->driver_data;
+
+ if (!tape->capabilities.lock)
+ return 0;
+
idetape_init_pc(pc);
pc->c[0] = IDETAPE_PREVENT_CMD;
pc->c[4] = prevent;
pc->callback = &idetape_pc_callback;
+ return 1;
}
static int __idetape_discard_read_pipeline (ide_drive_t *drive)
@@ -5017,13 +5026,15 @@
}
}
case MTLOCK:
- idetape_create_prevent_cmd(drive, &pc, 1);
+ if (!idetape_create_prevent_cmd(drive, &pc, 1))
+ return 0;
retval = idetape_queue_pc_tail (drive,&pc);
if (retval) return retval;
tape->door_locked = DOOR_EXPLICITLY_LOCKED;
return 0;
case MTUNLOCK:
- idetape_create_prevent_cmd(drive, &pc, 0);
+ if (!idetape_create_prevent_cmd(drive, &pc, 0))
+ return 0;
retval = idetape_queue_pc_tail (drive,&pc);
if (retval) return retval;
tape->door_locked = DOOR_UNLOCKED;
@@ -5262,10 +5273,11 @@
clear_bit (IDETAPE_PIPELINE_ERROR, &tape->flags);
if (tape->chrdev_direction == idetape_direction_none) {
- idetape_create_prevent_cmd(drive, &pc, 1);
- if (!idetape_queue_pc_tail (drive,&pc)) {
- if (tape->door_locked != DOOR_EXPLICITLY_LOCKED)
- tape->door_locked = DOOR_LOCKED;
+ if (idetape_create_prevent_cmd(drive, &pc, 1)) {
+ if (!idetape_queue_pc_tail (drive,&pc)) {
+ if (tape->door_locked != DOOR_EXPLICITLY_LOCKED)
+ tape->door_locked = DOOR_LOCKED;
+ }
}
idetape_analyze_headers(drive);
}
@@ -5320,9 +5332,9 @@
(void) idetape_rewind_tape (drive);
if (tape->chrdev_direction == idetape_direction_none) {
if (tape->door_locked != DOOR_EXPLICITLY_LOCKED) {
- idetape_create_prevent_cmd(drive, &pc, 0);
- if (!idetape_queue_pc_tail (drive,&pc))
- tape->door_locked = DOOR_UNLOCKED;
+ if (idetape_create_prevent_cmd(drive, &pc, 0))
+ if (!idetape_queue_pc_tail (drive,&pc))
+ tape->door_locked = DOOR_UNLOCKED;
}
}
clear_bit (IDETAPE_BUSY, &tape->flags);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/ide.c linux/drivers/ide/ide.c
--- v2.4.0-test9/linux/drivers/ide/ide.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/ide/ide.c Mon Oct 16 12:58:51 2000
@@ -163,12 +163,12 @@
static const byte ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR, IDE2_MAJOR, IDE3_MAJOR, IDE4_MAJOR, IDE5_MAJOR, IDE6_MAJOR, IDE7_MAJOR, IDE8_MAJOR, IDE9_MAJOR };
-static int idebus_parameter = 0; /* holds the "idebus=" parameter */
-static int system_bus_speed = 0; /* holds what we think is VESA/PCI bus speed */
+static int idebus_parameter; /* holds the "idebus=" parameter */
+static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */
static int initializing; /* set while initializing built-in drivers */
#ifdef CONFIG_BLK_DEV_IDEPCI
-static int ide_scan_direction = 0; /* THIS was formerly 2.2.x pci=reverse */
+static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
#endif /* CONFIG_BLK_DEV_IDEPCI */
#if defined(__mc68000__) || defined(CONFIG_APUS)
@@ -176,14 +176,14 @@
* ide_lock is used by the Atari code to obtain access to the IDE interrupt,
* which is shared between several drivers.
*/
-static int ide_lock = 0;
+static int ide_lock;
#endif /* __mc68000__ || CONFIG_APUS */
/*
* ide_modules keeps track of the available IDE chipset/probe/driver modules.
*/
-ide_module_t *ide_modules = NULL;
-ide_module_t *ide_probe = NULL;
+ide_module_t *ide_modules;
+ide_module_t *ide_probe;
/*
* This is declared extern in ide.h, for access by other IDE modules:
@@ -1509,7 +1509,7 @@
stat = IN_BYTE(hwif->io_ports[IDE_STATUS_OFFSET]);
if (!OK_STAT(stat, READY_STAT, BAD_STAT)) {
/* Try to not flood the console with msgs */
- static unsigned long last_msgtime = 0, count = 0;
+ static unsigned long last_msgtime, count;
++count;
if (0 < (signed long)(jiffies - (last_msgtime + HZ))) {
last_msgtime = jiffies;
@@ -3499,7 +3499,7 @@
/*
* Probe module
*/
-devfs_handle_t ide_devfs_handle = NULL;
+devfs_handle_t ide_devfs_handle;
EXPORT_SYMBOL(ide_probe);
EXPORT_SYMBOL(drive_is_flashcard);
@@ -3561,7 +3561,7 @@
*/
int __init ide_init (void)
{
- static char banner_printed = 0;
+ static char banner_printed;
int i;
if (!banner_printed) {
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/osb4.c linux/drivers/ide/osb4.c
--- v2.4.0-test9/linux/drivers/ide/osb4.c Wed Dec 31 16:00:00 1969
+++ linux/drivers/ide/osb4.c Thu Oct 26 14:11:39 2000
@@ -0,0 +1,322 @@
+/*
+ * linux/drivers/block/osb4.c Version 0.2 17 Oct 2000
+ *
+ * Copyright (C) 2000 Cobalt Networks, Inc.
+ * May be copied or modified under the terms of the GNU General Public License
+ *
+ * interface borrowed from alim15x3.c:
+ * Copyright (C) 1998-2000 Michel Aubry, Maintainer
+ * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer
+ *
+ * Copyright (C) 1998-2000 Andre Hedrick
+ *
+ * IDE support for the ServerWorks OSB4 IDE chipset
+ *
+ * here's the default lspci:
+ *
+ * 00:0f.1 IDE interface: ServerWorks: Unknown device 0211 (prog-if 8a [Master SecP PriP])
+ * Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
+ * Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR-
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include "ide_modes.h"
+
+#define OSB4_DEBUG_DRIVE_INFO 0
+
+#define DISPLAY_OSB4_TIMINGS
+
+#if defined(DISPLAY_OSB4_TIMINGS) && defined(CONFIG_PROC_FS)
+#include
+#include
+
+static byte osb4_revision = 0;
+static struct pci_dev *bmide_dev;
+
+static int osb4_get_info(char *, char **, off_t, int, int);
+extern int (*osb4_display_info)(char *, char **, off_t, int, int); /* ide-proc.c */
+extern char *ide_media_verbose(ide_drive_t *);
+
+static int osb4_get_info (char *buffer, char **addr, off_t offset, int count, int dummy)
+{
+ char *p = buffer;
+ u32 bibma = pci_resource_start(bmide_dev, 4);
+ u16 reg56;
+ u8 c0 = 0, c1 = 0, reg54;
+
+ pci_read_config_byte(bmide_dev, 0x54, ®54);
+ pci_read_config_word(bmide_dev, 0x56, ®56);
+
+ /*
+ * at that point bibma+0x2 et bibma+0xa are byte registers
+ * to investigate:
+ */
+ c0 = inb_p((unsigned short)bibma + 0x02);
+ c1 = inb_p((unsigned short)bibma + 0x0a);
+
+ p += sprintf(p, "\n ServerWorks OSB4 Chipset.\n");
+ p += sprintf(p, "--------------- Primary Channel ---------------- Secondary Channel -------------\n");
+ p += sprintf(p, " %sabled %sabled\n",
+ (c0&0x80) ? "dis" : " en",
+ (c1&0x80) ? "dis" : " en");
+ p += sprintf(p, "--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------\n");
+ p += sprintf(p, "DMA enabled: %s %s %s %s\n",
+ (c0&0x20) ? "yes" : "no ",
+ (c0&0x40) ? "yes" : "no ",
+ (c1&0x20) ? "yes" : "no ",
+ (c1&0x40) ? "yes" : "no " );
+ p += sprintf(p, "UDMA enabled: %s %s %s %s\n",
+ (reg54 & 0x01) ? "yes" : "no ",
+ (reg54 & 0x02) ? "yes" : "no ",
+ (reg54 & 0x04) ? "yes" : "no ",
+ (reg54 & 0x08) ? "yes" : "no " );
+ p += sprintf(p, "UDMA enabled: %s %s %s %s\n",
+ (reg56 & 0x0002) ? "2" : ((reg56 & 0x0001) ? "1" :
+ ((reg56 & 0x000f) ? "X" : "0")),
+ (reg56 & 0x0020) ? "2" : ((reg56 & 0x0010) ? "1" :
+ ((reg56 & 0x00f0) ? "X" : "0")),
+ (reg56 & 0x0200) ? "2" : ((reg56 & 0x0100) ? "1" :
+ ((reg56 & 0x0f00) ? "X" : "0")),
+ (reg56 & 0x2000) ? "2" : ((reg56 & 0x1000) ? "1" :
+ ((reg56 & 0xf000) ? "X" : "0")));
+ return p-buffer; /* => must be less than 4k! */
+}
+#endif /* defined(DISPLAY_OSB4_TIMINGS) && defined(CONFIG_PROC_FS) */
+
+byte osb4_proc = 0;
+
+extern char *ide_xfer_verbose (byte xfer_rate);
+
+static void osb4_tune_drive (ide_drive_t *drive, byte pio)
+{
+ /* command/recover widths */
+ byte timings[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
+ int port = HWIF(drive)->index ? 0x42 : 0x40;
+
+ pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+ if (&HWIF(drive)->drives[0] == drive) /* master drive */
+ port++;
+ pci_write_config_byte(HWIF(drive)->pci_dev, port, timings[pio]);
+}
+
+#if defined(CONFIG_BLK_DEV_IDEDMA) && defined(CONFIG_BLK_DEV_OSB4)
+static int osb4_tune_chipset (ide_drive_t *drive, byte speed)
+{
+ ide_hwif_t *hwif = HWIF(drive);
+ struct pci_dev *dev = hwif->pci_dev;
+ byte is_slave = (&HWIF(drive)->drives[1] == drive) ? 1 : 0;
+ byte bit8, enable;
+ int err;
+
+ /* clear udma register if we don't want udma */
+ if (speed < XFER_UDMA_0) {
+ enable = 0x1 << (is_slave + (hwif->channel ? 2 : 0));
+ pci_read_config_byte(dev, 0x54, &bit8);
+ pci_write_config_byte(dev, 0x54, bit8 & ~enable);
+ }
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
+ if (speed >= XFER_MW_DMA_0) {
+ byte channel = hwif->channel ? 0x46 : 0x44;
+ if (!is_slave)
+ channel++;
+
+ switch (speed) {
+ case XFER_MW_DMA_0:
+ bit8 = 0x77;
+ break;
+ case XFER_MW_DMA_1:
+ bit8 = 0x21;
+ break;
+ case XFER_MW_DMA_2:
+ default:
+ bit8 = 0x20;
+ break;
+ }
+ pci_write_config_byte(dev, channel, bit8);
+ }
+
+ if (speed >= XFER_UDMA_0) {
+ byte channel = hwif->channel ? 0x57 : 0x56;
+ int slave = is_slave ? 4 : 0;
+
+ pci_read_config_byte(dev, channel, &bit8);
+ bit8 &= ~(0xf << slave);
+ switch (speed) {
+ case XFER_UDMA_0:
+ break;
+ case XFER_UDMA_1:
+ bit8 |= 0x1 << slave;
+ break;
+ case XFER_UDMA_2:
+ default:
+ bit8 |= 0x2 << slave;
+ break;
+ }
+ pci_write_config_byte(dev, channel, bit8);
+
+ enable = 0x1 << (is_slave + (hwif->channel ? 2 : 0));
+ pci_read_config_byte(dev, 0x54, &bit8);
+ pci_write_config_byte(dev, 0x54, bit8 | enable);
+ }
+#endif
+
+#if OSB4_DEBUG_DRIVE_INFO
+ printk("%s: %s drive%d\n", drive->name, ide_xfer_verbose(speed), drive->dn);
+#endif /* OSB4_DEBUG_DRIVE_INFO */
+ if (!drive->init_speed)
+ drive->init_speed = speed;
+ err = ide_config_drive_speed(drive, speed);
+ drive->current_speed = speed;
+ return err;
+}
+
+static int osb4_config_drive_for_dma (ide_drive_t *drive)
+{
+ struct hd_driveid *id = drive->id;
+ byte speed;
+
+ byte udma_66 = eighty_ninty_three(drive);
+ /* need specs to figure out if osb4 is capable of ata/66/100 */
+ int ultra100 = 0;
+ int ultra66 = 0;
+ int ultra = 1;
+
+ if ((id->dma_ultra & 0x0020) && (udma_66) && (ultra100)) {
+ speed = XFER_UDMA_5;
+ } else if ((id->dma_ultra & 0x0010) && (ultra)) {
+ speed = ((udma_66) && (ultra66)) ? XFER_UDMA_4 : XFER_UDMA_2;
+ } else if ((id->dma_ultra & 0x0008) && (ultra)) {
+ speed = ((udma_66) && (ultra66)) ? XFER_UDMA_3 : XFER_UDMA_1;
+ } else if ((id->dma_ultra & 0x0004) && (ultra)) {
+ speed = XFER_UDMA_2;
+ } else if ((id->dma_ultra & 0x0002) && (ultra)) {
+ speed = XFER_UDMA_1;
+ } else if ((id->dma_ultra & 0x0001) && (ultra)) {
+ speed = XFER_UDMA_0;
+ } else if (id->dma_mword & 0x0004) {
+ speed = XFER_MW_DMA_2;
+ } else if (id->dma_mword & 0x0002) {
+ speed = XFER_MW_DMA_1;
+ } else if (id->dma_1word & 0x0004) {
+ speed = XFER_SW_DMA_2;
+ } else {
+ speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);
+ }
+
+ (void) osb4_tune_chipset(drive, speed);
+
+ return ((int) ((id->dma_ultra >> 11) & 7) ? ide_dma_on :
+ ((id->dma_ultra >> 8) & 7) ? ide_dma_on :
+ ((id->dma_mword >> 8) & 7) ? ide_dma_on :
+ ((id->dma_1word >> 8) & 7) ? ide_dma_on :
+ ide_dma_off_quietly);
+}
+
+static int osb4_dmaproc(ide_dma_action_t func, ide_drive_t *drive)
+{
+ switch (func) {
+ case ide_dma_check:
+ return ide_dmaproc((ide_dma_action_t) osb4_config_drive_for_dma(drive), drive);
+ default :
+ break;
+ }
+ /* Other cases are done by generic IDE-DMA code. */
+ return ide_dmaproc(func, drive);
+}
+#endif /* defined(CONFIG_BLK_DEV_IDEDMA) && (CONFIG_BLK_DEV_OSB4) */
+
+unsigned int __init pci_init_osb4 (struct pci_dev *dev, const char *name)
+{
+ u16 word;
+ byte bit8;
+
+ pci_read_config_byte(dev, PCI_REVISION_ID, &osb4_revision);
+
+ /* setup command register. just make sure that bus master and
+ * i/o ports are on. */
+ pci_read_config_word(dev, PCI_COMMAND, &word);
+ if ((word & (PCI_COMMAND_MASTER | PCI_COMMAND_IO)) !=
+ (PCI_COMMAND_MASTER | PCI_COMMAND_IO))
+ pci_write_config_word(dev, PCI_COMMAND, word |
+ PCI_COMMAND_MASTER | PCI_COMMAND_IO);
+
+ /* make sure that we're in pci native mode for both the primary
+ * and secondary channel. */
+ pci_read_config_byte(dev, PCI_CLASS_PROG, &bit8);
+ if ((bit8 & 0x5) != 0x5)
+ pci_write_config_byte(dev, PCI_CLASS_PROG, bit8 | 0x5);
+
+ /* setup up our latency. the default is 255 which is a bit large.
+ * set it to 64 instead. */
+ pci_read_config_byte(dev, PCI_LATENCY_TIMER, &bit8);
+ if (bit8 != 0x40)
+ pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x40);
+
+#if defined(DISPLAY_OSB4_TIMINGS) && defined(CONFIG_PROC_FS)
+ if (!osb4_proc) {
+ osb4_proc = 1;
+ bmide_dev = dev;
+ osb4_display_info = &osb4_get_info;
+ }
+#endif /* DISPLAY_OSB4_TIMINGS && CONFIG_PROC_FS */
+ return 0;
+}
+
+unsigned int __init ata66_osb4 (ide_hwif_t *hwif)
+{
+ return 0;
+}
+
+void __init ide_init_osb4 (ide_hwif_t *hwif)
+{
+ if (!hwif->irq)
+ hwif->irq = hwif->channel ? 15 : 14;
+
+ hwif->tuneproc = &osb4_tune_drive;
+ hwif->drives[0].autotune = 1;
+ hwif->drives[1].autotune = 1;
+
+ if (!hwif->dma_base)
+ return;
+
+#ifndef CONFIG_BLK_DEV_IDEDMA
+ hwif->autodma = 0;
+#else /* CONFIG_BLK_DEV_IDEDMA */
+#ifdef CONFIG_BLK_DEV_OSB4
+ hwif->autodma = 1;
+ hwif->dmaproc = &osb4_dmaproc;
+ hwif->speedproc = &osb4_tune_chipset;
+#endif /* CONFIG_BLK_DEV_OSB4 */
+#endif /* !CONFIG_BLK_DEV_IDEDMA */
+}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/slc90e66.c linux/drivers/ide/slc90e66.c
--- v2.4.0-test9/linux/drivers/ide/slc90e66.c Wed Dec 31 16:00:00 1969
+++ linux/drivers/ide/slc90e66.c Mon Oct 16 12:21:40 2000
@@ -0,0 +1,382 @@
+/*
+ * linux/drivers/ide/slc90e66.c Version 0.10 October 4, 2000
+ *
+ * Copyright (C) 2000 Andre Hedrick
+ * May be copied or modified under the terms of the GNU General Public License
+ *
+ * 00:07.1 IDE interface: EFAR Microsystems:
+ * Unknown device 9130 (prog-if 8a [Master SecP PriP])
+ * Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
+ * VGASnoop- ParErr- Stepping- SERR- FastB2B-
+ * Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
+ * >TAbort- SERR-
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include "ide_modes.h"
+
+#define SLC90E66_DEBUG_DRIVE_INFO 0
+
+#define DISPLAY_SLC90E66_TIMINGS
+
+#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
+#include
+#include
+
+static int slc90e66_get_info(char *, char **, off_t, int);
+extern int (*slc90e66_display_info)(char *, char **, off_t, int); /* ide-proc.c */
+extern char *ide_media_verbose(ide_drive_t *);
+static struct pci_dev *bmide_dev;
+
+static int slc90e66_get_info (char *buffer, char **addr, off_t offset, int count)
+{
+ char *p = buffer;
+ u32 bibma = pci_resource_start(bmide_dev, 4);
+ u16 reg40 = 0, psitre = 0, reg42 = 0, ssitre = 0;
+ u8 c0 = 0, c1 = 0;
+ u8 reg44 = 0, reg47 = 0, reg48 = 0, reg4a = 0, reg4b = 0;
+
+ pci_read_config_word(bmide_dev, 0x40, ®40);
+ pci_read_config_word(bmide_dev, 0x42, ®42);
+ pci_read_config_byte(bmide_dev, 0x44, ®44);
+ pci_read_config_byte(bmide_dev, 0x47, ®47);
+ pci_read_config_byte(bmide_dev, 0x48, ®48);
+ pci_read_config_byte(bmide_dev, 0x4a, ®4a);
+ pci_read_config_byte(bmide_dev, 0x4b, ®4b);
+
+ psitre = (reg40 & 0x4000) ? 1 : 0;
+ ssitre = (reg42 & 0x4000) ? 1 : 0;
+
+ /*
+ * at that point bibma+0x2 et bibma+0xa are byte registers
+ * to investigate:
+ */
+ c0 = inb_p((unsigned short)bibma + 0x02);
+ c1 = inb_p((unsigned short)bibma + 0x0a);
+
+ p += sprintf(p, " SLC90E66 Chipset.\n");
+ p += sprintf(p, "--------------- Primary Channel ---------------- Secondary Channel -------------\n");
+ p += sprintf(p, " %sabled %sabled\n",
+ (c0&0x80) ? "dis" : " en",
+ (c1&0x80) ? "dis" : " en");
+ p += sprintf(p, "--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------\n");
+ p += sprintf(p, "DMA enabled: %s %s %s %s\n",
+ (c0&0x20) ? "yes" : "no ",
+ (c0&0x40) ? "yes" : "no ",
+ (c1&0x20) ? "yes" : "no ",
+ (c1&0x40) ? "yes" : "no " );
+ p += sprintf(p, "UDMA enabled: %s %s %s %s\n",
+ (reg48&0x01) ? "yes" : "no ",
+ (reg48&0x02) ? "yes" : "no ",
+ (reg48&0x04) ? "yes" : "no ",
+ (reg48&0x08) ? "yes" : "no " );
+ p += sprintf(p, "UDMA enabled: %s %s %s %s\n",
+ ((reg4a&0x04)==0x04) ? "4" :
+ ((reg4a&0x03)==0x03) ? "3" :
+ (reg4a&0x02) ? "2" :
+ (reg4a&0x01) ? "1" :
+ (reg4a&0x00) ? "0" : "X",
+ ((reg4a&0x40)==0x40) ? "4" :
+ ((reg4a&0x30)==0x30) ? "3" :
+ (reg4a&0x20) ? "2" :
+ (reg4a&0x10) ? "1" :
+ (reg4a&0x00) ? "0" : "X",
+ ((reg4b&0x04)==0x04) ? "4" :
+ ((reg4b&0x03)==0x03) ? "3" :
+ (reg4b&0x02) ? "2" :
+ (reg4b&0x01) ? "1" :
+ (reg4b&0x00) ? "0" : "X",
+ ((reg4b&0x40)==0x40) ? "4" :
+ ((reg4b&0x30)==0x30) ? "3" :
+ (reg4b&0x20) ? "2" :
+ (reg4b&0x10) ? "1" :
+ (reg4b&0x00) ? "0" : "X");
+
+ p += sprintf(p, "UDMA\n");
+ p += sprintf(p, "DMA\n");
+ p += sprintf(p, "PIO\n");
+
+/*
+ * FIXME.... Add configuration junk data....blah blah......
+ */
+
+ return p-buffer; /* => must be less than 4k! */
+}
+#endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
+
+/*
+ * Used to set Fifo configuration via kernel command line:
+ */
+
+byte slc90e66_proc = 0;
+
+extern char *ide_xfer_verbose (byte xfer_rate);
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
+/*
+ *
+ */
+static byte slc90e66_dma_2_pio (byte xfer_rate) {
+ switch(xfer_rate) {
+ case XFER_UDMA_4:
+ case XFER_UDMA_3:
+ case XFER_UDMA_2:
+ case XFER_UDMA_1:
+ case XFER_UDMA_0:
+ case XFER_MW_DMA_2:
+ case XFER_PIO_4:
+ return 4;
+ case XFER_MW_DMA_1:
+ case XFER_PIO_3:
+ return 3;
+ case XFER_SW_DMA_2:
+ case XFER_PIO_2:
+ return 2;
+ case XFER_MW_DMA_0:
+ case XFER_SW_DMA_1:
+ case XFER_SW_DMA_0:
+ case XFER_PIO_1:
+ case XFER_PIO_0:
+ case XFER_PIO_SLOW:
+ default:
+ return 0;
+ }
+}
+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
+/*
+ * Based on settings done by AMI BIOS
+ * (might be usefull if drive is not registered in CMOS for any reason).
+ */
+static void slc90e66_tune_drive (ide_drive_t *drive, byte pio)
+{
+ unsigned long flags;
+ u16 master_data;
+ byte slave_data;
+ int is_slave = (&HWIF(drive)->drives[1] == drive);
+ int master_port = HWIF(drive)->index ? 0x42 : 0x40;
+ int slave_port = 0x44;
+ /* ISP RTC */
+ byte timings[][2] = { { 0, 0 },
+ { 0, 0 },
+ { 1, 0 },
+ { 2, 1 },
+ { 2, 3 }, };
+
+ pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+ pci_read_config_word(HWIF(drive)->pci_dev, master_port, &master_data);
+ if (is_slave) {
+ master_data = master_data | 0x4000;
+ if (pio > 1)
+ /* enable PPE, IE and TIME */
+ master_data = master_data | 0x0070;
+ pci_read_config_byte(HWIF(drive)->pci_dev, slave_port, &slave_data);
+ slave_data = slave_data & (HWIF(drive)->index ? 0x0f : 0xf0);
+ slave_data = slave_data | ((timings[pio][0] << 2) | (timings[pio][1]
+ << (HWIF(drive)->index ? 4 : 0)));
+ } else {
+ master_data = master_data & 0xccf8;
+ if (pio > 1)
+ /* enable PPE, IE and TIME */
+ master_data = master_data | 0x0007;
+ master_data = master_data | (timings[pio][0] << 12) |
+ (timings[pio][1] << 8);
+ }
+ save_flags(flags);
+ cli();
+ pci_write_config_word(HWIF(drive)->pci_dev, master_port, master_data);
+ if (is_slave)
+ pci_write_config_byte(HWIF(drive)->pci_dev, slave_port, slave_data);
+ restore_flags(flags);
+}
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
+static int slc90e66_tune_chipset (ide_drive_t *drive, byte speed)
+{
+ ide_hwif_t *hwif = HWIF(drive);
+ struct pci_dev *dev = hwif->pci_dev;
+ byte maslave = hwif->channel ? 0x42 : 0x40;
+ int a_speed = 7 << (drive->dn * 4);
+ int u_flag = 1 << drive->dn;
+ int u_speed = 0;
+ int err = 0;
+ int sitre;
+ short reg4042, reg44, reg48, reg4a;
+
+ pci_read_config_word(dev, maslave, ®4042);
+ sitre = (reg4042 & 0x4000) ? 1 : 0;
+ pci_read_config_word(dev, 0x44, ®44);
+ pci_read_config_word(dev, 0x48, ®48);
+ pci_read_config_word(dev, 0x4a, ®4a);
+
+ switch(speed) {
+ case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break;
+ case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break;
+ case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break;
+ case XFER_UDMA_1: u_speed = 1 << (drive->dn * 4); break;
+ case XFER_UDMA_0: u_speed = 0 << (drive->dn * 4); break;
+ case XFER_MW_DMA_2:
+ case XFER_MW_DMA_1:
+ case XFER_SW_DMA_2: break;
+ default: return -1;
+ }
+
+ if (speed >= XFER_UDMA_0) {
+ if (!(reg48 & u_flag))
+ pci_write_config_word(dev, 0x48, reg48|u_flag);
+ if ((reg4a & u_speed) != u_speed) {
+ pci_write_config_word(dev, 0x4a, reg4a & ~a_speed);
+ pci_read_config_word(dev, 0x4a, ®4a);
+ pci_write_config_word(dev, 0x4a, reg4a|u_speed);
+ }
+ }
+ if (speed < XFER_UDMA_0) {
+ if (reg48 & u_flag)
+ pci_write_config_word(dev, 0x48, reg48 & ~u_flag);
+ if (reg4a & a_speed)
+ pci_write_config_word(dev, 0x4a, reg4a & ~a_speed);
+ }
+
+ slc90e66_tune_drive(drive, slc90e66_dma_2_pio(speed));
+
+#if SLC90E66_DEBUG_DRIVE_INFO
+ printk("%s: %s drive%d\n", drive->name, ide_xfer_verbose(speed), drive->dn);
+#endif /* SLC90E66_DEBUG_DRIVE_INFO */
+ if (!drive->init_speed)
+ drive->init_speed = speed;
+ err = ide_config_drive_speed(drive, speed);
+ drive->current_speed = speed;
+ return err;
+}
+
+static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
+{
+ struct hd_driveid *id = drive->id;
+ int ultra = 1;
+ byte speed = 0;
+ byte udma_66 = eighty_ninty_three(drive);
+
+ if ((id->dma_ultra & 0x0010) && (ultra)) {
+ speed = (udma_66) ? XFER_UDMA_4 : XFER_UDMA_2;
+ } else if ((id->dma_ultra & 0x0008) && (ultra)) {
+ speed = (udma_66) ? XFER_UDMA_3 : XFER_UDMA_1;
+ } else if ((id->dma_ultra & 0x0004) && (ultra)) {
+ speed = XFER_UDMA_2;
+ } else if ((id->dma_ultra & 0x0002) && (ultra)) {
+ speed = XFER_UDMA_1;
+ } else if ((id->dma_ultra & 0x0001) && (ultra)) {
+ speed = XFER_UDMA_0;
+ } else if (id->dma_mword & 0x0004) {
+ speed = XFER_MW_DMA_2;
+ } else if (id->dma_mword & 0x0002) {
+ speed = XFER_MW_DMA_1;
+ } else if (id->dma_1word & 0x0004) {
+ speed = XFER_SW_DMA_2;
+ } else {
+ speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);
+ }
+
+ (void) slc90e66_tune_chipset(drive, speed);
+
+ return ((int) ((id->dma_ultra >> 11) & 7) ? ide_dma_on :
+ ((id->dma_ultra >> 8) & 7) ? ide_dma_on :
+ ((id->dma_mword >> 8) & 7) ? ide_dma_on :
+ ((id->dma_1word >> 8) & 7) ? ide_dma_on :
+ ide_dma_off_quietly);
+}
+
+static int slc90e66_dmaproc(ide_dma_action_t func, ide_drive_t *drive)
+{
+ switch (func) {
+ case ide_dma_check:
+ return ide_dmaproc((ide_dma_action_t) slc90e66_config_drive_for_dma(drive), drive);
+ default :
+ break;
+ }
+ /* Other cases are done by generic IDE-DMA code. */
+ return ide_dmaproc(func, drive);
+}
+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
+unsigned int __init pci_init_slc90e66 (struct pci_dev *dev, const char *name)
+{
+#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
+ if (!slc90e66_proc) {
+ slc90e66_proc = 1;
+ bmide_dev = dev;
+ slc90e66_display_info = &slc90e66_get_info;
+ }
+#endif /* DISPLAY_SLC90E66_TIMINGS && CONFIG_PROC_FS */
+ return 0;
+}
+
+unsigned int __init ata66_slc90e66 (ide_hwif_t *hwif)
+{
+#if 1
+ byte reg47 = 0, ata66 = 0;
+ byte mask = hwif->channel ? 0x02 : 0x01;
+
+ pci_read_config_byte(hwif->pci_dev, 0x47, ®47);
+
+ ata66 = (reg47 & mask) ? 1 : 0;
+#else
+ byte ata66 = 0;
+#endif
+ return ata66;
+}
+
+void __init ide_init_slc90e66 (ide_hwif_t *hwif)
+{
+ if (!hwif->irq)
+ hwif->irq = hwif->channel ? 15 : 14;
+
+ hwif->tuneproc = &slc90e66_tune_drive;
+ hwif->drives[0].autotune = 1;
+ hwif->drives[1].autotune = 1;
+
+ if (!hwif->dma_base)
+ return;
+
+#ifndef CONFIG_BLK_DEV_IDEDMA
+ hwif->autodma = 0;
+#else /* CONFIG_BLK_DEV_IDEDMA */
+ hwif->autodma = 1;
+ hwif->dmaproc = &slc90e66_dmaproc;
+ hwif->speedproc = &slc90e66_tune_chipset;
+#endif /* !CONFIG_BLK_DEV_IDEDMA */
+}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ide/via82cxxx.c linux/drivers/ide/via82cxxx.c
--- v2.4.0-test9/linux/drivers/ide/via82cxxx.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/ide/via82cxxx.c Sun Oct 8 09:07:10 2000
@@ -1,5 +1,5 @@
/*
- * $Id: via82cxxx.c,v 2.1d 2000/10/01 10:01:00 vojtech Exp $
+ * $Id: via82cxxx.c,v 2.1e 2000/10/03 10:01:00 vojtech Exp $
*
* Copyright (c) 2000 Vojtech Pavlik
*
@@ -192,7 +192,7 @@
via_print("----------VIA BusMastering IDE Configuration----------------");
- via_print("Driver Version: 2.1d");
+ via_print("Driver Version: 2.1e");
pci_read_config_byte(isa_dev, PCI_REVISION_ID, &t);
via_print("South Bridge: VIA %s rev %#x", via_isa_bridges[via_config].name, t);
@@ -334,8 +334,8 @@
*/
switch(via_isa_bridges[via_config].speed) {
- case XFER_UDMA_2: t = via_timing[i].udma ? (0xe0 | (FIT(via_timing[i].udma, 2, 5) - 2)) : 0x03; break;
- case XFER_UDMA_4: t = via_timing[i].udma ? (0xe8 | (FIT(via_timing[i].udma, 2, 9) - 2)) : 0x0f; break;
+ case XFER_UDMA_2: t = via_timing[i].udma ? (0xe0 | (FIT(ENOUGH(via_timing[i].udma, T), 2, 5) - 2)) : 0x03; break;
+ case XFER_UDMA_4: t = via_timing[i].udma ? (0xe8 | (FIT(ENOUGH(via_timing[i].udma, T/2), 2, 9) - 2)) : 0x0f; break;
}
if (via_isa_bridges[via_config].speed != XFER_MW_DMA_2)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ieee1394/Config.in linux/drivers/ieee1394/Config.in
--- v2.4.0-test9/linux/drivers/ieee1394/Config.in Wed Jul 5 13:03:56 2000
+++ linux/drivers/ieee1394/Config.in Wed Oct 11 16:49:47 2000
@@ -14,7 +14,8 @@
bool ' Support for non-IEEE1394 local ports' CONFIG_IEEE1394_PCILYNX_PORTS
fi
- dep_tristate 'Adaptec AIC-5800 (AHA-89xx) support' CONFIG_IEEE1394_AIC5800 $CONFIG_IEEE1394
+# this driver is unsupported now:
+# dep_tristate 'Adaptec AIC-5800 (AHA-89xx) support' CONFIG_IEEE1394_AIC5800 $CONFIG_IEEE1394
dep_tristate 'OHCI (Open Host Controller Interface) support' CONFIG_IEEE1394_OHCI1394 $CONFIG_IEEE1394
dep_tristate 'Video1394 support' CONFIG_IEEE1394_VIDEO1394 $CONFIG_IEEE1394_OHCI1394
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ieee1394/aic5800.c linux/drivers/ieee1394/aic5800.c
--- v2.4.0-test9/linux/drivers/ieee1394/aic5800.c Wed Jul 5 13:03:56 2000
+++ linux/drivers/ieee1394/aic5800.c Wed Oct 11 16:49:47 2000
@@ -1,4 +1,6 @@
/*
+ * +++ THIS DRIVER IS ORPHANED AND UNSUPPORTED +++
+ *
* aic5800.c - Adaptec AIC-5800 PCI-IEEE1394 chip driver
* Copyright (C)1999 Emanuel Pirker
*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/ieee1394/raw1394.c linux/drivers/ieee1394/raw1394.c
--- v2.4.0-test9/linux/drivers/ieee1394/raw1394.c Sun Oct 8 10:50:17 2000
+++ linux/drivers/ieee1394/raw1394.c Mon Oct 16 12:58:51 2000
@@ -42,13 +42,13 @@
#endif
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
LIST_HEAD(host_info_list);
-static int host_count = 0;
+static int host_count;
spinlock_t host_info_lock = SPIN_LOCK_UNLOCKED;
-static struct hpsb_highlevel *hl_handle = NULL;
+static struct hpsb_highlevel *hl_handle;
static atomic_t iso_buffer_size;
static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/input/input.c linux/drivers/input/input.c
--- v2.4.0-test9/linux/drivers/input/input.c Mon Aug 21 21:50:32 2000
+++ linux/drivers/input/input.c Mon Oct 16 12:58:51 2000
@@ -49,12 +49,12 @@
#define INPUT_MAJOR 13
#define INPUT_DEVICES 256
-static struct input_dev *input_dev = NULL;
-static struct input_handler *input_handler = NULL;
-static struct input_handler *input_table[8] = { NULL, /* ... */ };
-static devfs_handle_t input_devfs_handle = NULL;
-static int input_number = 0;
-static long input_devices[NBITS(INPUT_DEVICES)] = { 0, /* ... */ };
+static struct input_dev *input_dev;
+static struct input_handler *input_handler;
+static struct input_handler *input_table[8];
+static devfs_handle_t input_devfs_handle;
+static int input_number;
+static long input_devices[NBITS(INPUT_DEVICES)];
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/isdn/avmb1/capifs.c linux/drivers/isdn/avmb1/capifs.c
--- v2.4.0-test9/linux/drivers/isdn/avmb1/capifs.c Tue Aug 22 09:06:31 2000
+++ linux/drivers/isdn/avmb1/capifs.c Thu Oct 12 14:39:41 2000
@@ -1,11 +1,14 @@
/*
- * $Id: capifs.c,v 1.9 2000/08/20 07:30:13 keil Exp $
+ * $Id: capifs.c,v 1.10 2000/10/12 10:12:35 calle Exp $
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
*
* Heavily based on devpts filesystem from H. Peter Anvin
*
* $Log: capifs.c,v $
+ * Revision 1.10 2000/10/12 10:12:35 calle
+ * Bugfix: second iput(inode) on umount, destroies a foreign inode.
+ *
* Revision 1.9 2000/08/20 07:30:13 keil
* changes for 2.4
*
@@ -69,7 +72,7 @@
MODULE_AUTHOR("Carsten Paeth ");
-static char *revision = "$Revision: 1.9 $";
+static char *revision = "$Revision: 1.10 $";
struct capifs_ncci {
struct inode *inode;
@@ -552,6 +555,7 @@
continue;
if (np->inode) {
inode = np->inode;
+ np->inode = 0;
np->used = 0;
inode->i_nlink--;
iput(inode);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/isdn/hysdn/boardergo.c linux/drivers/isdn/hysdn/boardergo.c
--- v2.4.0-test9/linux/drivers/isdn/hysdn/boardergo.c Tue Aug 22 09:06:31 2000
+++ linux/drivers/isdn/hysdn/boardergo.c Thu Oct 12 14:19:32 2000
@@ -459,7 +459,7 @@
request_region(card->iobase + PCI9050_USER_IO, 1, "HYSDN");
ergo_stopcard(card); /* disable interrupts */
if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) {
- ergo_releasehardware(card); /* return the aquired hardware */
+ ergo_releasehardware(card); /* return the acquired hardware */
return (-1);
}
/* success, now setup the function pointers */
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
--- v2.4.0-test9/linux/drivers/isdn/isdn_common.c Mon Aug 21 07:49:03 2000
+++ linux/drivers/isdn/isdn_common.c Mon Oct 16 12:58:51 2000
@@ -46,7 +46,7 @@
/* Debugflags */
#undef ISDN_DEBUG_STATCALLB
-isdn_dev *dev = (isdn_dev *) 0;
+isdn_dev *dev;
static char *isdn_revision = "$Revision: 1.111 $";
@@ -65,7 +65,7 @@
extern char *isdn_v110_revision;
#ifdef CONFIG_ISDN_DIVERSION
-isdn_divert_if *divert_if = NULL; /* interface to diversion module */
+isdn_divert_if *divert_if; /* interface to diversion module */
#endif CONFIG_ISDN_DIVERSION
@@ -2260,7 +2260,7 @@
#ifdef CONFIG_DEVFS_FS
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
static void isdn_register_devfs(int k)
{
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/isdn/sc/debug.c linux/drivers/isdn/sc/debug.c
--- v2.4.0-test9/linux/drivers/isdn/sc/debug.c Wed Apr 1 16:21:04 1998
+++ linux/drivers/isdn/sc/debug.c Mon Oct 16 13:36:08 2000
@@ -70,6 +70,6 @@
int i = 0;
while(dn[i] != ',')
- str[i] = dn[i++];
+ str[i] = dn[i], i++;
str[i] = 0x0;
}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/isdn/sc/init.c linux/drivers/isdn/sc/init.c
--- v2.4.0-test9/linux/drivers/isdn/sc/init.c Sun Nov 7 16:34:00 1999
+++ linux/drivers/isdn/sc/init.c Thu Oct 12 14:19:32 2000
@@ -302,7 +302,7 @@
/*
* No interrupt could be used
*/
- pr_debug("Failed to aquire an IRQ line\n");
+ pr_debug("Failed to acquire an IRQ line\n");
continue;
}
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/macintosh/macserial.c linux/drivers/macintosh/macserial.c
--- v2.4.0-test9/linux/drivers/macintosh/macserial.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/macintosh/macserial.c Thu Oct 12 14:20:47 2000
@@ -2890,17 +2890,13 @@
}
static struct console sercons = {
- "ttyS",
- serial_console_write,
- NULL,
- serial_console_device,
- serial_console_wait_key,
- NULL,
- serial_console_setup,
- CON_PRINTBUFFER,
- -1,
- 0,
- NULL
+ name: "ttyS",
+ write: serial_console_write,
+ device: serial_console_device,
+ wait_key: serial_console_wait_key,
+ setup: serial_console_setup,
+ flags: CON_PRINTBUFFER,
+ index: -1,
};
/*
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/md/md.c linux/drivers/md/md.c
--- v2.4.0-test9/linux/drivers/md/md.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/md/md.c Thu Oct 26 23:35:48 2000
@@ -60,7 +60,7 @@
# define dprintk(x...) do { } while(0)
#endif
-static mdk_personality_t *pers[MAX_PERSONALITY] = {NULL, };
+static mdk_personality_t *pers[MAX_PERSONALITY];
/*
* Current RAID-1,4,5 parallel reconstruction 'guaranteed speed limit'
@@ -105,12 +105,12 @@
static int md_blocksizes[MAX_MD_DEVS];
static int md_hardsect_sizes[MAX_MD_DEVS];
static int md_maxreadahead[MAX_MD_DEVS];
-static mdk_thread_t *md_recovery_thread = NULL;
+static mdk_thread_t *md_recovery_thread;
-int md_size[MAX_MD_DEVS] = {0, };
+int md_size[MAX_MD_DEVS];
extern struct block_device_operations md_fops;
-static devfs_handle_t devfs_handle = NULL;
+static devfs_handle_t devfs_handle;
static struct gendisk md_gendisk=
{
@@ -136,7 +136,7 @@
* one! Eg. HSM uses several sub-devices to implement Logical
* Volumes. All these sub-devices map to the same mddev.
*/
-dev_mapping_t mddev_map [MAX_MD_DEVS] = { {NULL, 0}, };
+dev_mapping_t mddev_map[MAX_MD_DEVS];
void add_mddev_mapping (mddev_t * mddev, kdev_t dev, void *data)
{
@@ -2032,7 +2032,7 @@
* at boot time.
*/
#ifdef CONFIG_AUTODETECT_RAID
-static int detected_devices[128] md__initdata;
+static int detected_devices[128] md__initdata = { 0, };
static int dev_cnt=0;
void md_autodetect_dev(kdev_t dev)
{
@@ -3640,7 +3640,7 @@
int pers[MAX_MD_BOOT_DEVS];
int chunk[MAX_MD_BOOT_DEVS];
kdev_t devices[MAX_MD_BOOT_DEVS][MAX_REAL];
-} md_setup_args md__initdata;
+} md_setup_args md__initdata = { 0, };
/*
* Parse the command-line parameters given our kernel, but do not
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tda7432.c linux/drivers/media/video/tda7432.c
--- v2.4.0-test9/linux/drivers/media/video/tda7432.c Mon May 15 12:06:25 2000
+++ linux/drivers/media/video/tda7432.c Mon Oct 16 12:37:04 2000
@@ -25,6 +25,10 @@
* Added I2C_DRIVERID_TDA7432
* added loudness insmod control
* Revision: 0.1 - initial version
+ *
+ * Changes:
+ * Arnaldo Carvalho de Melo - 08/14/2000
+ * - resource allocation fixes in tda7432_attach
*/
#include
@@ -320,8 +324,10 @@
client->addr = addr;
client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
- if (!t)
+ if (!t) {
+ kfree(client);
return -ENOMEM;
+ }
memset(t,0,sizeof *t);
do_tda7432_init(client);
MOD_INC_USE_COUNT;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tda8425.c linux/drivers/media/video/tda8425.c
--- v2.4.0-test9/linux/drivers/media/video/tda8425.c Mon May 15 12:06:25 2000
+++ linux/drivers/media/video/tda8425.c Mon Oct 16 12:37:04 2000
@@ -13,6 +13,10 @@
* two stereo inputs, so if someone has this card, could they tell me if the
* second one can be used for anything (i.e., does it have an external input
* that you can't hear even if you set input to composite?)
+ *
+ * Changes:
+ * Arnaldo Carvalho de Melo - 08/14/2000
+ * - resource allocation fixes in tda8425_attach
*/
#include
@@ -148,8 +152,10 @@
client->addr = addr;
client->data = tda = kmalloc(sizeof *tda,GFP_KERNEL);
- if (!tda)
+ if (!tda) {
+ kfree(client);
return -ENOMEM;
+ }
memset(tda,0,sizeof *tda);
do_tda8425_init(client);
MOD_INC_USE_COUNT;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tda985x.c linux/drivers/media/video/tda985x.c
--- v2.4.0-test9/linux/drivers/media/video/tda985x.c Mon May 15 12:06:25 2000
+++ linux/drivers/media/video/tda985x.c Mon Oct 16 12:37:04 2000
@@ -11,6 +11,9 @@
* Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
* Which was based on tda8425.c by Greg Alexander (c) 1998
*
+ * Contributors:
+ * Arnaldo Carvalho de Melo
+ *
* OPTIONS:
* debug - set to 1 if you'd like to see debug messages
* - set to 2 if you'd like to be flooded with debug messages
@@ -22,6 +25,7 @@
* Fine tune sound
* Get rest of capabilities into video_audio struct...
*
+ * Revision 0.6 - resource allocation fixes in tda985x_attach (08/14/2000)
* Revision 0.5 - cleaned up debugging messages, added debug level=2
* Revision: 0.4 - check for correct chip= insmod value
* also cleaned up comments a bit
@@ -350,8 +354,10 @@
client->addr = addr;
client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
- if (!t)
+ if (!t) {
+ kfree(client);
return -ENOMEM;
+ }
memset(t,0,sizeof *t);
do_tda985x_init(client);
MOD_INC_USE_COUNT;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tda9875.c linux/drivers/media/video/tda9875.c
--- v2.4.0-test9/linux/drivers/media/video/tda9875.c Sun Aug 6 12:45:28 2000
+++ linux/drivers/media/video/tda9875.c Mon Oct 16 12:37:04 2000
@@ -11,9 +11,13 @@
* Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
* Which was based on tda8425.c by Greg Alexander (c) 1998
*
+ * Contributors:
+ * Arnaldo Carvalho de Melo (0.2)
+ *
* OPTIONS:
* debug - set to 1 if you'd like to see debug messages
*
+ * Revision 0.2 - resource allocation fixes in tda9875_attach (08/14/2000)
* Revision: 0.1 - original version
*/
@@ -232,8 +236,10 @@
client->addr = addr;
client->data = t = kmalloc(sizeof *t,GFP_KERNEL);
- if (!t)
+ if (!t) {
+ kfree(client);
return -ENOMEM;
+ }
memset(t,0,sizeof *t);
do_tda9875_init(client);
MOD_INC_USE_COUNT;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/media/video/tea6300.c linux/drivers/media/video/tea6300.c
--- v2.4.0-test9/linux/drivers/media/video/tea6300.c Sat Jan 8 12:54:54 2000
+++ linux/drivers/media/video/tea6300.c Mon Oct 16 12:37:04 2000
@@ -15,6 +15,10 @@
* balance (different left,right values) and, if someone ever finds a card
* with the support (or if you're careful with a soldering iron), fade
* (front/back).
+ *
+ * Changes:
+ * Arnaldo Carvalho de Melo - 08/14/2000
+ * - resource allocation fixes in tea6300_attach
*/
#include
@@ -170,8 +174,10 @@
client->addr = addr;
client->data = tea = kmalloc(sizeof *tea,GFP_KERNEL);
- if (!tea)
+ if (!tea) {
+ kfree(client);
return -ENOMEM;
+ }
memset(tea,0,sizeof *tea);
do_tea6300_init(client);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c501.c linux/drivers/net/3c501.c
--- v2.4.0-test9/linux/drivers/net/3c501.c Fri Aug 11 15:57:57 2000
+++ linux/drivers/net/3c501.c Mon Oct 30 12:24:21 2000
@@ -218,10 +218,6 @@
* The boilerplate probe code.
*/
-#ifdef HAVE_DEVLIST
-struct netdev_entry el1_drv = {"3c501", el1_probe1, EL1_IO_EXTENT, netcard_portlist};
-#else
-
/**
* el1_probe:
* @dev: The device structure passed in to probe.
@@ -246,17 +242,11 @@
return -ENXIO;
for (i = 0; netcard_portlist[i]; i++)
- {
- int ioaddr = netcard_portlist[i];
- if (check_region(ioaddr, EL1_IO_EXTENT))
- continue;
- if (el1_probe1(dev, ioaddr) == 0)
+ if (el1_probe1(dev, netcard_portlist[i]) == 0)
return 0;
- }
return -ENODEV;
}
-#endif
/**
* el1_probe:
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c503.c linux/drivers/net/3c503.c
--- v2.4.0-test9/linux/drivers/net/3c503.c Tue Sep 5 12:57:51 2000
+++ linux/drivers/net/3c503.c Mon Oct 30 12:24:21 2000
@@ -62,15 +62,6 @@
#define EL2_IO_EXTENT 16
-#ifdef HAVE_DEVLIST
-/* The 3c503 uses two entries, one for the safe memory-mapped probe and
- the other for the typical I/O probe. */
-struct netdev_entry el2_drv =
-{"3c503", el2_probe, EL1_IO_EXTENT, 0};
-struct netdev_entry el2pio_drv =
-{"3c503pio", el2_pioprobe1, EL1_IO_EXTENT, netcard_portlist};
-#endif
-
static int el2_open(struct net_device *dev);
static int el2_close(struct net_device *dev);
static void el2_reset_8390(struct net_device *dev);
@@ -115,14 +106,13 @@
if (el2_probe1(dev, netcard_portlist[i]) == 0)
return 0;
}
-#if ! defined(no_probe_nonshared_memory) && ! defined (HAVE_DEVLIST)
+#if ! defined(no_probe_nonshared_memory)
return el2_pio_probe(dev);
#else
return -ENODEV;
#endif
}
-#ifndef HAVE_DEVLIST
/* Try all of the locations that aren't obviously empty. This touches
a lot of locations, and is much riskier than the code above. */
int __init
@@ -146,7 +136,6 @@
return -ENODEV;
}
-#endif
/* Probe for the Etherlink II card at I/O port base IOADDR,
returning non-zero on success. If found, set the station
@@ -184,15 +173,6 @@
/* Restore the register we frobbed. */
outb(saved_406, ioaddr + 0x406);
return -ENODEV;
- }
-
- /* We should have a "dev" from Space.c or the static module table. */
- if (dev == NULL) {
- printk("3c503.c: Passed a NULL device.\n");
- dev = init_etherdev(0, 0);
-
- if (!dev)
- return -ENOMEM;
}
if (ei_debug && version_printed++ == 0)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
--- v2.4.0-test9/linux/drivers/net/3c505.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/3c505.c Mon Oct 30 12:24:21 2000
@@ -1302,8 +1302,8 @@
long flags;
byte orig_HSR;
- if (check_region(addr, 0xf))
- return -1;
+ if (!request_region(addr, ELP_IO_EXTENT, "3c505"))
+ return -ENODEV;
orig_HSR = inb_status(addr);
@@ -1313,7 +1313,7 @@
if (orig_HSR == 0xff) {
if (elp_debug > 0)
printk(notfound_msg, 1);
- return -1;
+ goto out;
}
/* Enable interrupts - we need timers! */
save_flags(flags);
@@ -1332,7 +1332,7 @@
if (inb_status(addr) & DIR) {
if (elp_debug > 0)
printk(notfound_msg, 2);
- return -1;
+ goto out;
}
} else {
/* If HCR.DIR is down, we pull it up. HSR.DIR should follow. */
@@ -1343,7 +1343,7 @@
if (!(inb_status(addr) & DIR)) {
if (elp_debug > 0)
printk(notfound_msg, 3);
- return -1;
+ goto out;
}
}
/*
@@ -1353,6 +1353,9 @@
printk(found_msg);
return 0;
+out:
+ release_region(addr, ELP_IO_EXTENT);
+ return -ENODEV;
}
/*************************************************************
@@ -1503,6 +1506,7 @@
outb_control(adapter->hcr_val & ~(FLSH | ATTN), dev);
}
printk("%s: failed to initialise 3c505\n", dev->name);
+ release_region(dev->base_addr, ELP_IO_EXTENT);
return -ENODEV;
okay:
@@ -1593,10 +1597,6 @@
if (adapter->rx_pcb.data.configure) {
printk("%s: adapter configuration failed\n", dev->name);
}
- /*
- * and reserve the address region
- */
- request_region(dev->base_addr, ELP_IO_EXTENT, "3c505");
/*
* initialise the device
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
--- v2.4.0-test9/linux/drivers/net/3c507.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/3c507.c Mon Oct 30 12:24:21 2000
@@ -295,11 +295,6 @@
static void init_82586_mem(struct net_device *dev);
-#ifdef HAVE_DEVLIST
-struct netdev_entry netcard_drv =
-{"3c507", el16_probe1, EL16_IO_EXTENT, netcard_portlist};
-#endif
-
/* Check for a network adaptor of this type, and return '0' iff one exists.
If dev->base_addr == 0, probe all likely locations.
If dev->base_addr == 1, always return failure.
@@ -317,13 +312,9 @@
else if (base_addr != 0)
return -ENXIO; /* Don't probe at all. */
- for (i = 0; netcard_portlist[i]; i++) {
- int ioaddr = netcard_portlist[i];
- if (check_region(ioaddr, EL16_IO_EXTENT))
- continue;
- if (el16_probe1(dev, ioaddr) == 0)
+ for (i = 0; netcard_portlist[i]; i++)
+ if (el16_probe1(dev, netcard_portlist[i]) == 0)
return 0;
- }
return -ENODEV;
}
@@ -331,7 +322,7 @@
static int __init el16_probe1(struct net_device *dev, int ioaddr)
{
static unsigned char init_ID_done = 0, version_printed = 0;
- int i, irq, irqval;
+ int i, irq, irqval, retval;
struct net_local *lp;
if (init_ID_done == 0) {
@@ -348,15 +339,14 @@
init_ID_done = 1;
}
- if (inb(ioaddr) == '*' && inb(ioaddr+1) == '3'
- && inb(ioaddr+2) == 'C' && inb(ioaddr+3) == 'O')
- ;
- else
+ if (!request_region(ioaddr, EL16_IO_EXTENT, "3c507"))
return -ENODEV;
- /* Allocate a new 'dev' if needed. */
- if (dev == NULL)
- dev = init_etherdev(0, 0);
+ if ((inb(ioaddr) != '*') || (inb(ioaddr + 1) != '3') ||
+ (inb(ioaddr + 2) != 'C') || (inb(ioaddr + 3) != 'O')) {
+ retval = -ENODEV;
+ goto out;
+ }
if (net_debug && version_printed++ == 0)
printk(version);
@@ -371,11 +361,11 @@
irqval = request_irq(irq, &el16_interrupt, 0, "3c507", dev);
if (irqval) {
printk ("unable to get IRQ %d (irqval=%d).\n", irq, irqval);
- return -EAGAIN;
+ retval = -EAGAIN;
+ goto out;
}
/* We've committed to using the board, and can start filling in *dev. */
- request_region(ioaddr, EL16_IO_EXTENT, "3c507");
dev->base_addr = ioaddr;
outb(0x01, ioaddr + MISC_CTRL);
@@ -419,8 +409,10 @@
/* Initialize the device structure. */
lp = dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
- if (dev->priv == NULL)
- return -ENOMEM;
+ if (dev->priv == NULL) {
+ retval = -ENOMEM;
+ goto out;
+ }
memset(dev->priv, 0, sizeof(struct net_local));
spin_lock_init(&lp->lock);
@@ -436,6 +428,9 @@
dev->flags&=~IFF_MULTICAST; /* Multicast doesn't work */
return 0;
+out:
+ release_region(ioaddr, EL16_IO_EXTENT);
+ return retval;
}
static int el16_open(struct net_device *dev)
@@ -862,12 +857,7 @@
lp->rx_tail = rx_tail;
}
#ifdef MODULE
-static struct net_device dev_3c507 = {
- "", /* device name is inserted by linux/drivers/net/net_init.c */
- 0, 0, 0, 0,
- 0, 0,
- 0, 0, 0, NULL, el16_probe
-};
+static struct net_device dev_3c507 = { init: el16_probe };
static int io = 0x300;
static int irq = 0;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
--- v2.4.0-test9/linux/drivers/net/3c509.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/3c509.c Mon Oct 30 12:24:21 2000
@@ -173,7 +173,7 @@
unsigned short vendor, function;
char *name;
};
-struct el3_isapnp_adapters_struct el3_isapnp_adapters[] = {
+static struct el3_isapnp_adapters_struct el3_isapnp_adapters[] = {
{ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5090), "3Com Etherlink III (TP)"},
{ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5091), "3Com Etherlink III"},
{ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5094), "3Com Etherlink III (combo)"},
@@ -182,13 +182,10 @@
{ISAPNP_VENDOR('P', 'N', 'P'), ISAPNP_FUNCTION(0x80f8), "3Com Etherlink III compatible"},
{0, }
};
-u16 el3_isapnp_phys_addr[8][3] = {
- {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
- {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}
-};
+static u16 el3_isapnp_phys_addr[8][3];
#endif /* CONFIG_ISAPNP */
#ifdef __ISAPNP__
-static int nopnp = 0;
+static int nopnp;
#endif
int el3_probe(struct net_device *dev)
@@ -437,13 +434,6 @@
/* Free the interrupt so that some other card can use it. */
outw(0x0f00, ioaddr + WN0_IRQ);
found:
- if (dev == NULL) {
- dev = init_etherdev(dev, sizeof(struct el3_private));
- if (dev == NULL) {
- release_region(ioaddr, EL3_IO_EXTENT);
- return -ENOMEM;
- }
- }
memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
dev->base_addr = ioaddr;
dev->irq = irq;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c515.c linux/drivers/net/3c515.c
--- v2.4.0-test9/linux/drivers/net/3c515.c Tue Jul 11 11:12:23 2000
+++ linux/drivers/net/3c515.c Mon Oct 16 12:58:51 2000
@@ -90,7 +90,7 @@
#define DRIVER_DEBUG 1
/* Some values here only for performance evaluation and path-coverage
debugging. */
-static int rx_nocopy = 0, rx_copy = 0, queued_packet = 0;
+static int rx_nocopy, rx_copy, queued_packet;
/* Number of times to check to see if the Tx FIFO has space, used in some
limited cases. */
@@ -364,7 +364,7 @@
0, 0, 0
};
-static int nopnp = 0;
+static int nopnp;
#endif
static int corkscrew_scan(struct net_device *dev);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c527.c linux/drivers/net/3c527.c
--- v2.4.0-test9/linux/drivers/net/3c527.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/3c527.c Mon Oct 30 12:24:21 2000
@@ -272,19 +272,6 @@
return -ENODEV;
}
- /*
- * Don't allocate the private data here, it is done later
- * This makes it easier to free the memory when this driver
- * is used as a module.
- */
-
- if(dev==NULL)
- {
- dev = init_etherdev(0, 0);
- if (dev == NULL)
- return -ENOMEM;
- }
-
/* Fill in the 'dev' fields. */
dev->base_addr = mca_io_bases[(POS>>1)&7];
dev->mem_start = mca_mem_bases[(POS>>4)&7];
@@ -1457,11 +1444,7 @@
#ifdef MODULE
-static struct net_device this_device = {
- "", /* will be inserted by linux/drivers/net/mc32_init.c */
- 0, 0, 0, 0,
- 0, 0, /* I/O address, IRQ */
- 0, 0, 0, NULL, mc32_probe };
+static struct net_device this_device = { init: mc32_probe };
/**
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/3c59x.c linux/drivers/net/3c59x.c
--- v2.4.0-test9/linux/drivers/net/3c59x.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/3c59x.c Mon Oct 16 12:58:51 2000
@@ -222,7 +222,7 @@
/* Set iff a MII transceiver on any interface requires mdio preamble.
This only set with the original DP83840 on older 3c905 boards, so the extra
code size of a per-interface flag is not worthwhile. */
-static char mii_preamble_required = 0;
+static char mii_preamble_required;
#define PFX "3c59x: "
@@ -740,12 +740,12 @@
/* #define dev_alloc_skb dev_alloc_skb_debug */
/* A list of all installed Vortex EISA devices, for removing the driver module. */
-static struct net_device *root_vortex_eisa_dev = NULL;
+static struct net_device *root_vortex_eisa_dev;
/* Variables to work-around the Compaq PCI BIOS32 problem. */
-static int compaq_ioaddr = 0, compaq_irq = 0, compaq_device_id = 0x5900;
+static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900;
-static int vortex_cards_found = 0;
+static int vortex_cards_found;
static void vortex_suspend (struct pci_dev *pdev)
{
@@ -853,7 +853,7 @@
unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */
int i;
struct net_device *dev;
- static int printed_version = 0;
+ static int printed_version;
int retval;
struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx];
@@ -1616,7 +1616,7 @@
outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
}
if (status & StatsFull) { /* Empty statistics. */
- static int DoneDidThat = 0;
+ static int DoneDidThat;
if (vortex_debug > 4)
printk(KERN_DEBUG "%s: Updating stats.\n", dev->name);
update_stats(ioaddr, dev);
@@ -2573,8 +2573,8 @@
};
-static int vortex_have_pci = 0;
-static int vortex_have_eisa = 0;
+static int vortex_have_pci;
+static int vortex_have_eisa;
static int __init vortex_init (void)
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/8139too.c linux/drivers/net/8139too.c
--- v2.4.0-test9/linux/drivers/net/8139too.c Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/8139too.c Mon Oct 30 12:54:42 2000
@@ -70,6 +70,10 @@
Martin Dennett - incredibly helpful insight on undocumented
features of the 8139 chips
+ Jean-Jacques Michel - bug fix
+
+ Tobias - Rx interrupt status checking suggestion
+
Submitting bug reports:
"rtl8139-diag -mmmaaavvveefN" output
@@ -141,7 +145,7 @@
#include
-#define RTL8139_VERSION "0.9.10"
+#define RTL8139_VERSION "0.9.11"
#define RTL8139_MODULE_NAME "8139too"
#define RTL8139_DRIVER_NAME RTL8139_MODULE_NAME " Fast Ethernet driver " RTL8139_VERSION
#define PFX RTL8139_MODULE_NAME ": "
@@ -174,8 +178,6 @@
}
#endif
-#define arraysize(x) (sizeof(x)/sizeof(*(x)))
-
/* A few user-configurable values. */
/* media options */
@@ -198,8 +200,11 @@
/* Number of Tx descriptor registers. */
#define NUM_TX_DESC 4
+/* max supported ethernet frame size -- must be at least (dev->mtu+14+4).*/
+#define MAX_ETH_FRAME_SIZE 1536
+
/* Size of the Tx bounce buffers -- must be at least (dev->mtu+14+4). */
-#define TX_BUF_SIZE 1536
+#define TX_BUF_SIZE MAX_ETH_FRAME_SIZE
#define TX_BUF_TOT_LEN (TX_BUF_SIZE * NUM_TX_DESC)
/* PCI Tuning Parameters
@@ -552,7 +557,7 @@
#define RTL_R8(reg) inb (((unsigned long)ioaddr) + (reg))
#define RTL_R16(reg) inw (((unsigned long)ioaddr) + (reg))
-#define RTL_R32(reg) inl (((unsigned long)ioaddr) + (reg))
+#define RTL_R32(reg) ((unsigned long) inl (((unsigned long)ioaddr) + (reg)))
#define RTL_W8(reg, val8) outb ((val8), ((unsigned long)ioaddr) + (reg))
#define RTL_W16(reg, val16) outw ((val16), ((unsigned long)ioaddr) + (reg))
#define RTL_W32(reg, val32) outl ((val32), ((unsigned long)ioaddr) + (reg))
@@ -600,7 +605,7 @@
/* read MMIO register */
#define RTL_R8(reg) readb (ioaddr + (reg))
#define RTL_R16(reg) readw (ioaddr + (reg))
-#define RTL_R32(reg) readl (ioaddr + (reg))
+#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg)))
#endif /* USE_IO_OPS */
@@ -677,8 +682,7 @@
}
/* check for weird/broken PCI region reporting */
- if ((pio_len != mmio_len) ||
- (pio_len < RTL_MIN_IO_SIZE) ||
+ if ((pio_len < RTL_MIN_IO_SIZE) ||
(mmio_len < RTL_MIN_IO_SIZE)) {
printk (KERN_ERR PFX "Invalid PCI region size(s), aborting\n");
rc = -ENODEV;
@@ -761,7 +765,7 @@
/* identify chip attached to board */
tmp = RTL_R8 (ChipVersion);
- for (i = arraysize (rtl_chip_info) - 1; i >= 0; i--)
+ for (i = ARRAY_SIZE (rtl_chip_info) - 1; i >= 0; i--)
if (tmp == rtl_chip_info[i].version) {
tp->chipset = i;
goto match;
@@ -770,7 +774,7 @@
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
printk (KERN_DEBUG PFX "PCI device %s: unknown chip version, assuming RTL-8139\n",
pdev->slot_name);
- printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%x\n", pdev->slot_name, RTL_R32 (TxConfig));
+ printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n", pdev->slot_name, RTL_R32 (TxConfig));
tp->chipset = 0;
match:
@@ -1464,11 +1468,36 @@
}
+static void rtl8139_tx_clear (struct rtl8139_private *tp)
+{
+ int i;
+
+ atomic_set (&tp->cur_tx, 0);
+ atomic_set (&tp->dirty_tx, 0);
+
+ /* Dump the unsent Tx packets. */
+ for (i = 0; i < NUM_TX_DESC; i++) {
+ struct ring_info *rp = &tp->tx_info[i];
+ if (rp->mapping != 0) {
+ pci_unmap_single (tp->pci_dev, rp->mapping,
+ rp->skb->len, PCI_DMA_TODEVICE);
+ rp->mapping = 0;
+ }
+ if (rp->skb) {
+ dev_kfree_skb (rp->skb);
+ rp->skb = NULL;
+ tp->stats.tx_dropped++;
+ }
+ }
+}
+
+
static void rtl8139_tx_timeout (struct net_device *dev)
{
struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv;
void *ioaddr = tp->mmio_addr;
int i;
+ u8 tmp8;
unsigned long flags;
DPRINTK ("%s: Transmit timeout, status %2.2x %4.4x "
@@ -1477,6 +1506,11 @@
RTL_R16 (IntrStatus),
RTL_R8 (MediaStatus));
+ /* disable Tx ASAP, if not already */
+ tmp8 = RTL_R8 (ChipCmd);
+ if (tmp8 & CmdTxEnb)
+ RTL_W8 (ChipCmd, tmp8 & ~CmdTxEnb);
+
/* Disable interrupts by clearing the interrupt mask. */
RTL_W16 (IntrMask, 0x0000);
@@ -1485,31 +1519,15 @@
dev->name, atomic_read (&tp->cur_tx),
atomic_read (&tp->dirty_tx));
for (i = 0; i < NUM_TX_DESC; i++)
- printk (KERN_DEBUG "%s: Tx descriptor %d is %8.8x.%s\n",
+ printk (KERN_DEBUG "%s: Tx descriptor %d is %8.8lx.%s\n",
dev->name, i, RTL_R32 (TxStatus0 + (i * 4)),
i == atomic_read (&tp->dirty_tx) % NUM_TX_DESC ?
" (queue head)" : "");
- spin_lock_irqsave (&tp->lock, flags);
-
/* Stop a shared interrupt from scavenging while we are. */
- atomic_set (&tp->cur_tx, 0);
- atomic_set (&tp->dirty_tx, 0);
-
- /* Dump the unsent Tx packets. */
- for (i = 0; i < NUM_TX_DESC; i++) {
- struct ring_info *rp = &tp->tx_info[i];
- if (rp->mapping != 0) {
- pci_unmap_single (tp->pci_dev, rp->mapping,
- rp->skb->len, PCI_DMA_TODEVICE);
- rp->mapping = 0;
- }
- if (rp->skb) {
- dev_kfree_skb (rp->skb);
- rp->skb = NULL;
- tp->stats.tx_dropped++;
- }
- }
+ spin_lock_irqsave (&tp->lock, flags);
+
+ rtl8139_tx_clear (tp);
spin_unlock_irqrestore (&tp->lock, flags);
@@ -1551,11 +1569,11 @@
}
-static inline void rtl8139_tx_interrupt (struct net_device *dev,
- struct rtl8139_private *tp,
- void *ioaddr)
+static void rtl8139_tx_interrupt (struct net_device *dev,
+ struct rtl8139_private *tp,
+ void *ioaddr)
{
- unsigned int dirty_tx;
+ int cur_tx, dirty_tx, tx_left;
assert (dev != NULL);
assert (tp != NULL);
@@ -1563,7 +1581,9 @@
dirty_tx = atomic_read (&tp->dirty_tx);
- while ((atomic_read (&tp->cur_tx) - dirty_tx) > 0) {
+ cur_tx = atomic_read (&tp->cur_tx);
+ tx_left = cur_tx - dirty_tx;
+ while (tx_left > 0) {
int entry = dirty_tx % NUM_TX_DESC;
int txstatus;
@@ -1609,12 +1629,20 @@
tp->tx_info[entry].skb->len,
PCI_DMA_TODEVICE);
tp->tx_info[entry].mapping = 0;
- } dev_kfree_skb_irq (tp->tx_info[entry].skb);
+ }
+ dev_kfree_skb_irq (tp->tx_info[entry].skb);
tp->tx_info[entry].skb = NULL;
dirty_tx++;
- if (netif_queue_stopped (dev) &&
- (atomic_read (&tp->cur_tx) - dirty_tx < NUM_TX_DESC))
+ if (dirty_tx < 0) { /* handle signed int overflow */
+ atomic_sub (cur_tx, &tp->cur_tx); /* XXX racy? */
+ dirty_tx = cur_tx - tx_left + 1;
+ }
+ if (netif_queue_stopped (dev))
netif_wake_queue (dev);
+
+ cur_tx = atomic_read (&tp->cur_tx);
+ tx_left = cur_tx - dirty_tx;
+
}
#ifndef RTL8139_NDEBUG
@@ -1702,10 +1730,15 @@
while ((RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {
int ring_offset = cur_rx % RX_BUF_LEN;
- u32 rx_status = le32_to_cpu (*(u32 *) (rx_ring + ring_offset));
- int rx_size = rx_status >> 16;
+ u32 rx_status;
+ unsigned int rx_size;
+ unsigned int pkt_size;
struct sk_buff *skb;
- int pkt_size = rx_size - 4;
+
+ /* read size+status of next frame from DMA ring buffer */
+ rx_status = le32_to_cpu (*(u32 *) (rx_ring + ring_offset));
+ rx_size = rx_status >> 16;
+ pkt_size = rx_size - 4;
DPRINTK ("%s: rtl8139_rx() status %4.4x, size %4.4x,"
" cur %4.4x.\n", dev->name, rx_status,
@@ -1733,11 +1766,13 @@
if (rx_size == 0xfff0)
break;
- /* if Rx err received, Rx process gets reset, so
- * we abort any further Rx processing
+ /* If Rx err or invalid rx_size/rx_status received
+ * (which happens if we get lost in the ring),
+ * Rx process gets reset, so we abort any further
+ * Rx processing.
*/
- if (rx_status &
- (RxBadSymbol | RxRunt | RxTooLong | RxCRCErr | RxBadAlign)) {
+ if ((rx_size > (MAX_ETH_FRAME_SIZE+4)) ||
+ (!(rx_status & RxStatusOK))) {
rtl8139_rx_err (rx_status, dev, tp, ioaddr);
return;
}
@@ -1752,23 +1787,23 @@
*/
skb = dev_alloc_skb (pkt_size + 2);
- if (skb == NULL) {
+ if (skb) {
+ skb->dev = dev;
+ skb_reserve (skb, 2); /* 16 byte align the IP fields. */
+
+ eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
+ skb_put (skb, pkt_size);
+
+ skb->protocol = eth_type_trans (skb, dev);
+ netif_rx (skb);
+ tp->stats.rx_bytes += pkt_size;
+ tp->stats.rx_packets++;
+ } else {
printk (KERN_WARNING
"%s: Memory squeeze, dropping packet.\n",
dev->name);
tp->stats.rx_dropped++;
- break;
}
- skb->dev = dev;
- skb_reserve (skb, 2); /* 16 byte align the IP fields. */
-
- eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
- skb_put (skb, pkt_size);
-
- skb->protocol = eth_type_trans (skb, dev);
- netif_rx (skb);
- tp->stats.rx_bytes += pkt_size;
- tp->stats.rx_packets++;
cur_rx = (cur_rx + rx_size + 4 + 3) & ~3;
RTL_W16_F (RxBufPtr, cur_rx - 16);
@@ -1809,9 +1844,12 @@
tp->full_duplex = duplex;
RTL_W8 (Cfg9346, Cfg9346_Unlock);
RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20);
+ RTL_W8 (Cfg9346, Cfg9346_Lock);
}
status &= ~RxUnderrun;
}
+
+ /* XXX along with rtl8139_rx_err, are we double-counting errors? */
if (status &
(RxUnderrun | RxOverflow | RxErr | RxFIFOOver))
tp->stats.rx_errors++;
@@ -1926,7 +1964,6 @@
{
struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv;
void *ioaddr = tp->mmio_addr;
- int i;
unsigned long flags;
DPRINTK ("ENTER\n");
@@ -1940,36 +1977,22 @@
spin_lock_irqsave (&tp->lock, flags);
- /* Disable interrupts by clearing the interrupt mask. */
- RTL_W16 (IntrMask, 0x0000);
-
/* Stop the chip's Tx and Rx DMA processes. */
RTL_W8 (ChipCmd, (RTL_R8 (ChipCmd) & ChipCmdClear));
+ /* Disable interrupts by clearing the interrupt mask. */
+ RTL_W16 (IntrMask, 0x0000);
+
/* Update the error counts. */
tp->stats.rx_missed_errors += RTL_R32 (RxMissed);
RTL_W32 (RxMissed, 0);
spin_unlock_irqrestore (&tp->lock, flags);
- /* snooze for a small bit */
- if (current->need_resched)
- schedule ();
-
+ synchronize_irq ();
free_irq (dev->irq, dev);
- for (i = 0; i < NUM_TX_DESC; i++) {
- struct sk_buff *skb = tp->tx_info[i].skb;
- dma_addr_t mapping = tp->tx_info[i].mapping;
-
- if (skb) {
- if (mapping)
- pci_unmap_single (tp->pci_dev, mapping, skb->len, PCI_DMA_TODEVICE);
- dev_kfree_skb (skb);
- }
- tp->tx_info[i].skb = NULL;
- tp->tx_info[i].mapping = 0;
- }
+ rtl8139_tx_clear (tp);
pci_free_consistent(tp->pci_dev, RX_BUF_TOT_LEN,
tp->rx_ring, tp->rx_ring_dma);
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/82596.c linux/drivers/net/82596.c
--- v2.4.0-test9/linux/drivers/net/82596.c Mon Aug 7 23:02:56 2000
+++ linux/drivers/net/82596.c Mon Oct 30 12:24:21 2000
@@ -1488,20 +1488,8 @@
}
}
-#ifdef HAVE_DEVLIST
-static unsigned int i596_portlist[] __initdata =
-{0x300, 0};
-struct netdev_entry i596_drv =
-{"i82596", i82596_probe, I596_TOTAL_SIZE, i596_portlist};
-#endif
-
#ifdef MODULE
-static struct net_device dev_82596 =
-{
- "", /* device name inserted by drivers/net/net_init.c */
- 0, 0, 0, 0,
- 0, 0, /* base, irq */
- 0, 0, 0, NULL, i82596_probe};
+static struct net_device dev_82596 = { init: i82596_probe };
#ifdef ENABLE_APRICOT
static int io = 0x300;
diff -u --recursive --new-file v2.4.0-test9/linux/drivers/net/8390.h linux/drivers/net/8390.h
--- v2.4.0-test9/linux/drivers/net/8390.h Sun Oct 8 10:50:18 2000
+++ linux/drivers/net/8390.h Tue Oct 31 11:18:46 2000
@@ -1,6 +1,6 @@
/* Generic NS8390 register definitions. */
/* This file is part of Donald Becker's 8390 drivers, and is distributed
- under the same license. Auto-loading of 8390.o added by Paul Gortmaker.
+ under the same license. Auto-loading of 8390.o only in v2.2 - Paul G.
Some of these names and comments originated from the Crynwr
packet drivers, which are distributed under the GPL. */
@@ -12,11 +12,6 @@
#include
#include