diff -u --recursive --new-file v2.4.0-test6/linux/CREDITS linux/CREDITS
--- v2.4.0-test6/linux/CREDITS Wed Aug 9 19:19:48 2000
+++ linux/CREDITS Tue Aug 22 15:21:53 2000
@@ -12,7 +12,7 @@
N: Matti Aarnio
E: mea@nic.funet.fi
D: Alpha systems hacking, IPv6 and other network related stuff
-D: One of assisting postmasters for vger.rutgers.edu's lists
+D: One of assisting postmasters for vger.kernel.org's lists
S: (ask for current address)
S: Finland
@@ -507,6 +507,13 @@
D: Assorted sched/mm titbits
S: Oxfordshire, UK.
+N: Mark Corner
+E: mcorner@umich.edu
+W: http://www.eecs.umich.edu/~mcorner/
+D: USB Bluetooth Driver
+S: University of Michigan
+S: Ann Arbor, MI
+
N: Alan Cox
W: http://roadrunner.swansea.linux.org.uk/alan.shtml
E: alan@lxorguk.ukuu.org.uk
@@ -740,6 +747,14 @@
S: 23900 - LECCO (Lc)
S: Italy
+N: Nils Faerber
+E: nils@kernelconcepts.de
+D: i810 TCO watchdog driver author
+D: Mitsumi LU005 tests and fixes
+S: Dreisbachstrasse 24
+S: D-57250 Netphen
+S: Germany
+
N: Rik Faith
E: faith@cs.unc.edu
E: faith@acm.org
@@ -1448,6 +1463,12 @@
D: Author of the dialog utility, foundation
D: for Menuconfig's lxdialog.
+N: Christoph Lameter
+E: christoph@lameter.com
+D: Digiboard PC/Xe and PC/Xi, Digiboard EPCA
+D: Early protocol filter for bridging code
+D: Bug fixes
+
N: Paul Laufer
E: pelaufer@csupomona.edu
D: Soundblaster driver fixes, ISAPnP quirk
@@ -1633,7 +1654,7 @@
S: USA
N: Petko Manolov
-E: petkan@spct.net
+E: petkan@dce.bg
D: USB ethernet (pegasus) driver
D: optimizing i[45]86 string routines
D: i386 task swithing hacks
@@ -1671,6 +1692,16 @@
D: XF86_8514
D: cfdisk (curses based disk partitioning program)
+N: Torben Mathiasen
+E: torben.mathiasen@compaq.com
+E: tmm@image.dk
+W: http://tlan.kernel.dk
+D: ThunderLAN maintainer
+D: ThunderLAN updates and other kernel fixes.
+S: Bremensgade 29, st.th
+S: 2300 Copenhagen S
+S: Denmark
+
N: Claudio S. Matsuoka
E: claudio@conectiva.com
E: claudio@helllabs.org
@@ -2010,6 +2041,11 @@
W: http://www.speakeasy.org/~kirk/
D: implemented kmod
D: modularized BSD Unix domain sockets
+
+N: Mikael Pettersson
+E: mikpe@csd.uu.se
+W: http://www.csd.uu.se/~mikpe/
+D: Miscellaneous fixes
N: Reed H. Petty
E: rhp@draper.net
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/Changes linux/Documentation/Changes
--- v2.4.0-test6/linux/Documentation/Changes Wed Aug 9 19:19:48 2000
+++ linux/Documentation/Changes Mon Aug 21 08:09:09 2000
@@ -16,14 +16,16 @@
'net).
The latest revision of this document, in various formats, can always
-be found at http://cyberbuzz.gatech.edu/kaboom/linux/Changes-2.4/
-.
+be found at .
Feel free to translate this document. If you do so, please send me a
URL to your translation for inclusion in future revisions of this
document.
-Last updated: June 11, 2000
+Smotrite file , yavlyaushisya
+russkim perevodom dannogo documenta.
+
+Last updated: August 15, 2000
Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).
@@ -41,12 +43,13 @@
with pcmcia-cs.
o Gnu C 2.7.2.3 # gcc --version
+o Gnu make 3.77 # make --version
o binutils 2.9.1.0.22 # ld -v
-o util-linux 2.10g # chsh -v
+o util-linux 2.10o # kbdrate -v
o modutils 2.3.13 # insmod -V
o e2fsprogs 1.18 # /sbin/tune2fs --version
-o pcmcia-cs 3.1.13 # cardmgr -V
-o PPP 2.4.0b1 # pppd --version
+o pcmcia-cs 3.1.19 # cardmgr -V
+o PPP 2.4.0 # pppd --version
o isdn4k-utils 3.1beta7 # isdnctrl 2>&1|grep version
Kernel compilation
@@ -59,7 +62,7 @@
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.12 should also
+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.
@@ -68,6 +71,11 @@
or derivatives, be sure not to use -fstrict-aliasing (which, depending on
your version of gcc 2.95, may necessitate using -fno-strict-aliasing).
+Make
+----
+
+You will need Gnu make 3.77 or later to build the kernel.
+
Binutils
--------
@@ -95,7 +103,7 @@
You do not have to mount it to use it as long as you can live with the
default maxima for shared memory and segments. If you wish to change
these variables, you have to mount it with the options nr_blocks
-and/or nr_inodes. POSIX shared memory is also now implemented via a
+and / or nr_inodes. POSIX shared memory is also now implemented via a
virtual filesystem. If you want to use it, you'll need to mount the
filesystem. The recommended mount location is /dev/shm, and adding the
following line to /etc/fstab should take care of things:
@@ -124,7 +132,8 @@
New versions of util-linux provide *fdisk support for larger disks,
support new options to mount, recognize more supported partition
-types, and similar goodies. You'll probably want to upgrade.
+types, have a fdformat which works with 2.4 kernels, and similar goodies.
+You'll probably want to upgrade.
Ksymoops
--------
@@ -138,7 +147,15 @@
Upgrade to recent modutils to fix various outstanding bugs which are
seen more frequently under 2.3.x, and to enable auto-loading of USB
-modules.
+modules. In addition, the layout of modules under
+/lib/modules/`uname -r`/ has been made more sane. This change also
+requires that you upgrade to a recent modutils.
+
+Mkinitrd
+--------
+
+These changes to the /lib/modules file tree layout also require that
+mkinitrd be upgraded.
E2fsprogs
---------
@@ -224,110 +241,90 @@
gcc 2.7.2.3
-----------
-o ftp://ftp.gnu.org/gnu/gcc/gcc-2.7.2.3.tar.gz
-
-o ftp://metalab.unc.edu/pub/gnu/gcc-2.7.2.3.tar.gz
-
+o
+o
-egcs 1.12
+egcs 1.1.2
---------
-o ftp://ftp.valinux.com/pub/support/hjl/gcc/egcs-1.1.2/egcs-1.1.2-glibc.x86.tar.bz2
-
-o ftp://ftp.valinux.com/pub/support/hjl/gcc/egcs-1.1.2/egcs-1.1.2-libc5.x86.tar.bz2
-
-o ftp://ftp.valinux.com/pub/support/hjl/gcc/egcs-1.1.2/egcs-1.1.2-alpha.tar.bz2
-
+o
+o
+o
Binutils
********
2.9.1 series
------------
-o ftp://ftp.valinux.com/pub/support/hjl/binutils/2.9.1/binutils-2.9.1.0.25.tar.gz
-
+o
2.9.5 series
------------
-o ftp://ftp.valinux.com/pub/support/hjl/binutils/binutils-2.9.5.0.46.tar.gz
-
+o
System utilities
****************
Util-linux
----------
-o ftp://ftp.cwi.nl/pub/aeb/util-linux/util-linux-2.10g.tar.gz
-
+o
Ksymoops
--------
-o ftp://ftp.kernel.org/pub/linux/utils/kernel/ksymoops/v2.3
-
+o
Modutils
--------
-o ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.3/modutils-2.3.13.tar.gz
-
+o
+
+Mkinitrd
+--------
+o
E2fsprogs
---------
-o http://web.mit.edu/tytso/www/linux/dist/e2fsprogs-1.18.tar.gz
-
-o http://web.mit.edu/tytso/www/linux/dist/e2fsprogs-1.18.src.rpm
-
+o
+o
LVM toolset
-----------
-o http://linux.msede.com/lvm/
+o
Pcmcia-cs
---------
-o ftp://sourceforge.org/pcmcia/pcmcia-cs-3.1.13.tar.gz
-
+o
Jade
----
-o ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz
-
+o
DocBook Stylesheets
-------------------
-o http://nwalsh.com/docbook/dsssl/
-
+o
Intel P6 microcode
------------------
-o http://www.urbanmyth.org/microcode/
-
+o
Network
*******
PPP
---
-o ftp://linuxcare.com.au/pub/ppp/ppp-2.4.0b1.tar.gz
-
+o
Isdn4k-utils
------------
-o ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/testing/isdn4k-
- utils.v3.1beta7.tar.gz
-
+o
Netfilter
---------
-o http://netfilter.filewatcher.org/iptables-1.1.1.tar.bz2
-
-o http://www.samba.org/netfilter/iptables-1.1.1.tar.bz2
-
-o http://netfilter.kernelnotes.org/iptables-1.1.1.tar.bz2
-
+o
+o
+o
Ip-route2
---------
-o ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.2.4-now-ss991023.tar.gz
-
+o
Suggestions and corrections
===========================
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.4.0-test6/linux/Documentation/Configure.help Wed Aug 9 19:19:48 2000
+++ linux/Documentation/Configure.help Wed Aug 23 09:30:13 2000
@@ -2305,7 +2305,7 @@
Intel 440LX/BX/GX support
CONFIG_AGP_INTEL
This option gives you AGP support for the GLX component of the
- "soon to be released" XFree86 4.x on Intel 440LX/BX/GX chipsets.
+ XFree86 4.x on Intel 440LX/BX/GX chipsets.
For the moment, you should probably say N, unless you want to test
the GLX component for XFree86 3.3.6, which can be downloaded from
@@ -2320,7 +2320,7 @@
VIA chipset support
CONFIG_AGP_VIA
This option gives you AGP support for the GLX component of the
- "soon to be released" XFree86 4.x on VIA MPV3/Apollo Pro chipsets.
+ XFree86 4.x on VIA MPV3/Apollo Pro chipsets.
For the moment, you should probably say N, unless you want to test
the GLX component for XFree86 3.3.6, which can be downloaded from
@@ -2329,7 +2329,7 @@
AMD Irongate support
CONFIG_AGP_AMD
This option gives you AGP support for the GLX component of the
- "soon to be released" XFree86 4.x on Intel AMD Irongate chipset.
+ XFree86 4.x on Intel AMD Irongate chipset.
For the moment, you should probably say N, unless you want to test
the GLX component for XFree86 3.3.6, which can be downloaded from
@@ -2350,7 +2350,7 @@
ALI M1541 support
CONFIG_AGP_ALI
This option gives you AGP support for the GLX component of the
- "soon to be released" XFree86 4.x on the ALi M1541 chipset.
+ XFree86 4.x on the ALi M1541 chipset.
This chipset can do AGP 1x and 2x, but note that there is an
acknowledged incompatibility with Matrox G200 cards. Due to
@@ -2777,7 +2777,8 @@
SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
- "586" for generic Pentium CPUs, possibly lacking the TSC
(time stamp counter) register.
- - "Pentium-Classic" for the Intel Pentium/Pentium MMX.
+ - "Pentium-Classic" for the Intel Pentium.
+ - "Pentium-MMX" for the Intel Pentium MMX.
- "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
- "Pentium-III" for the Intel Pentium III.
- "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
@@ -3672,27 +3673,6 @@
can be gotten from the document
http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html
-IP: optimize as router not host
-CONFIG_IP_ROUTER
- Some Linux network drivers use a technique called copy and checksum
- to optimize host performance. For a machine which acts as a router
- most of the time and is forwarding most packets to another host this
- is however a loss. If you say Y here, copy and checksum will be
- switched off. In the future, it may make other changes which
- optimize for router operation.
-
- Note that your box can only act as a router if you enable IP
- forwarding in your kernel; you can do that by saying Y to "/proc
- file system support" and "Sysctl support" below and executing the
- line
-
- echo "1" > /proc/sys/net/ipv4/ip_forward
-
- at boot time after the /proc file system has been mounted. You can
- do that even if you say N here.
-
- If unsure, say N here.
-
IP: kernel level autoconfiguration
CONFIG_IP_PNP
This enables automatic configuration of IP addresses of devices and
@@ -3762,26 +3742,6 @@
Network), but can be distributed all over the Internet. If you want
to do that, say Y here and to "IP: multicast routing" below.
-IP: aliasing support
-CONFIG_IP_ALIAS
- Sometimes it is useful to give several IP addresses to a single
- physical network interface (serial port or Ethernet card). The most
- common case is that you want to serve different WWW or FTP documents
- to the outside depending on which of your host names was used to
- connect to you. This is called "multihosting" or "virtual domains"
- or "virtual hosting services" and is explained in the
- Virtual-Services-HOWTO, available from
- http://www.linuxdoc.org/docs.html#howto .
-
- Another scenario would be that there are two logical networks living
- on your local Ethernet and you want to access them both with the
- same Ethernet card. This can also be done if you say Y here.
-
- The configuration of these alias addresses is done with a special
- name syntax explained in Documentation/networking/alias.txt and in
- the IP-Alias mini-HOWTO. If you want this, say Y. Most people don't
- need it and say N.
-
IP: multicast routing
CONFIG_IP_MROUTE
This is used if you want your machine to act as a router for IP
@@ -7259,7 +7219,29 @@
module, say M here and read Documentation/modules.txt. If unsure,
say N.
-Ethertap network tap (EXPERIMENTAL)
+Universal TUN/TAP device driver.
+CONFIG_TUN
+ TUN/TAP provides packet reception and transmission for user space programs.
+ It can be viewed as a simple Point-to-Point or Ethernet device, which
+ instead of receiving packets from a physical media, receives them from
+ user space program and instead of sending packets via physical media
+ writes them to the user space program.
+
+ When a program opens /dev/net/tun, driver creates and registers
+ corresponding net device tunX or tapX. After a program closed above
+ devices, driver will automatically delete tunXX or tapXX device and all
+ routes corresponding to it.
+
+ Please read Documentation/networking/tuntap.txt for more information.
+
+ 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 tun.o. If you want to compile it as a
+ module, say M here and read Documentation/modules.txt.
+
+ If you don't know what to use this for, you don't need it.
+
+Ethertap network tap (OBSOLETE)
CONFIG_ETHERTAP
If you say Y here (and have said Y to "Kernel/User network link
driver", above) and create a character special file /dev/tap0 with
@@ -8736,6 +8718,13 @@
module, say M here and read Documentation/modules.txt as well as
Documentation/networking/net-modules.txt.
+National Semiconductor DP83810 series PCI Ethernet support
+CONFIG_NATSEMI
+ This driver is for the National Semiconductor DP83810 series,
+ including the 83815 chip.
+ More specific information and updates are available from
+ http://www.scyld.com/network/natsemi.html
+
SK_G16 support
CONFIG_SK_G16
If you have a network (Ethernet) card of this type, say Y and read
@@ -10173,9 +10162,10 @@
USB Digi International AccelePort USB Serial Driver
CONFIG_USB_SERIAL_DIGI_ACCELEPORT
- Say Y here if you want to use a Digi AccelePort USB 4 device,
- a 4 port USB serial converter. The Digi Acceleport USB 2 and
- 8 are not yet supported by this driver.
+ Say Y here if you want to use Digi AccelePort USB 2 or 4 devices,
+ 2 port (plus parallel port) and 4 port USB serial converters. The
+ parallel port on the USB 2 appears as a third serial port on Linux.
+ The Digi Acceleport USB 8 is not yet supported by this driver.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
@@ -10236,16 +10226,19 @@
CONFIG_USB_PEGASUS
Say Y if you want to use your USB ethernet device. Supported
cards until now are:
+ ADMtek AN986 (eval. board)
Accton 10/100
Billington USB-100
Corega FEter USB-TX
MELCO/BUFFALO LUA-TX
- D-Link DSB-650TX, DSB-650TX-PNA
- Linksys USB100TX
- SNC 202
+ D-Link DSB-650TX, DSB-650TX-PNA, DSB-650, DU-E10, DU-E100
+ Linksys USB100TX, USB10TX
+ LANEED Ethernet LD-USB/TX
+ SMC 202
+ SOHOware NUB Ethernet
If you have devices with vendor IDs other than noted above
you should add them in the driver code and send a message
- to me (petkan@spct.net) for update.
+ to me (petkan@dce.bg) for update.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
@@ -11297,6 +11290,21 @@
want), say M here and read Documentation/modules.txt. The module
will be called smbfs.o. Most people say N, however.
+nls support setting
+CONFIG_SMB_NLS_REMOTE
+ This setting allows you to specify a default value for which
+ codepage the server uses. If this field is left blank no
+ translations will be done by default. The local codepage/charset
+ default to CONFIG_NLS_DEFAULT.
+
+ The nls settings can be changed at mount time, if your smbmount
+ supports that, using the codepage and iocharset parameters.
+
+ Currently no smbmount distributed with samba supports this, it is
+ assumed future versions will. In the meantime you can get an
+ unofficial patch for samba 2.0.7 from:
+ http://www.hojdpunkten.ac.se/054/samba/index.html
+
Coda file system support (advanced network fs)
CONFIG_CODA_FS
Coda is an advanced network file system, similar to NFS in that it
@@ -14085,7 +14093,13 @@
Creative EMU10K1 based PCI sound cards
CONFIG_SOUND_EMU10K1
Say Y or M if you have a PCI sound card using the EMU10K1
- chipset, such as the Creative SBLive! or SB PCI512.
+ chipset, such as the Creative SBLive!, SB PCI512 or Emu-APS.
+
+Crystal SoundFusion (CS4280/461x)
+CONFIG_SOUND_FUSION
+ This module drives the Crystal SoundFusion devices (CS4280/46xx series)
+ when wired as native sound drivers with AC97 codecs. If this driver
+ does not work try the CS4232 driver.
Ensoniq ES1370 based PCI sound cards
CONFIG_SOUND_ES1370
@@ -14374,6 +14388,10 @@
before E-DSS1 was established. Nowadays, all new lines in Germany
use E-DSS1.
+HiSax Support for US NI1
+CONFIG_HISAX_NI1
+ Enable this if you like to use ISDN in US on a NI1 basic rate interface.
+
Teles 16.0/8.0
CONFIG_HISAX_16_0
This enables HiSax support for the Teles ISDN-cards S0-16.0, S0-8
@@ -14502,6 +14520,13 @@
See Documentation/isdn/README.HiSax on how to configure it using a
different D-channel protocol, or non-standard IRQ/port settings.
+NETspider U card
+CONFIG_HISAX_NETJET_U
+ This enables HiSax support for the Netspider U interface ISDN card from
+ Traverse Technologies.
+ See Documentation/isdn/README.HiSax on how to configure it using a
+ different D-channel protocol, or non-standard IRQ/port settings.
+
Niccy PnP/PCI card
CONFIG_HISAX_NICCY
This enables HiSax support for the Dr. Neuhaus Niccy PnP or PCI.
@@ -14590,7 +14615,7 @@
called sc.o. See Documentation/isdn/README.sc and
http://www.spellcast.com for more information.
-Eicon.Diehl active card support
+Eicon active card support
CONFIG_ISDN_DRV_EICON
Say Y here if you have an Eicon active ISDN card. In order to use
this card, additional firmware is necessary, which has to be loaded
@@ -14598,6 +14623,11 @@
latest isdn4k-utils package. Please read the file
Documentation/isdn/README.eicon for more information.
+Eicon Diva Server card support
+CONFIG_ISDN_DRV_EICON_PCI
+ Say Y here if you have an Eicon Diva Server (BRI/PRI/4BRI) ISDN card.
+ Please read Documentation/isdn/README.eicon for more information.
+
Eicon old-type card support
CONFIG_ISDN_DRV_EICON_ISA
Say Y here if you have an old-type Eicon active ISDN card. In order
@@ -14606,10 +14636,18 @@
the latest isdn4k-utils package. Please read the file
Documentation/isdn/README.eicon for more information.
-Support AT-Fax Class 2 commands
+Eicon driver type standalone
+CONFIG_ISDN_DRV_EICON_STANDALONE
+ Enable this option if you want the eicon driver as standalone
+ version with no interface to the ISDN4Linux isdn module. If you
+ say Y here, the eicon module only supports the Diva Server PCI
+ cards and will provide its own IDI interface. You should say N
+ here.
+
+Support AT-Fax Class 1 and 2 commands
CONFIG_ISDN_TTY_FAX
If you say Y here, the modem-emulator will support a subset of the
- Fax Class 2 commands. Using a getty with fax-support
+ Fax Class 1 and 2 commands. Using a getty with fax-support
(mgetty+sendfax, hylafax), you will be able to use your Linux box as
an ISDN-fax-machine. This must be supported by the lowlevel driver
also. See Documentation/isdn/README.fax for more information.
@@ -14678,6 +14716,10 @@
Champ, Ergo and Metro. You will then get a module called hysdn.o.
Please read the file Documentation/isdn/README.hysdn for more
information.
+
+HYSDN CAPI 2.0 support
+CONFIG_HYSDN_CAPI
+ Say Y here if you like to use Hypercope's CAPI 2.0 interface
Support for Sun4 architecture
CONFIG_SUN4
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/DocBook/Makefile linux/Documentation/DocBook/Makefile
--- v2.4.0-test6/linux/Documentation/DocBook/Makefile Thu Jul 27 17:37:59 2000
+++ linux/Documentation/DocBook/Makefile Sat Aug 12 14:25:54 2000
@@ -81,6 +81,11 @@
$(TOPDIR)/scripts/docgen $(APISOURCES) \
kernel-api.sgml
+kernel-api-man: $(APISOURCES)
+ @rm -rf $(TOPDIR)/Documentation/man
+ $(TOPDIR)/scripts/kernel-doc -man $^ | \
+ $(PERL) $(TOPDIR)/scripts/split-man $(TOPDIR)/Documentation/man
+
parportbook: $(JPG-parportbook)
parportbook.ps: $(EPS-parportbook)
parportbook.sgml: parportbook.tmpl $(TOPDIR)/drivers/parport/init.c
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/README.DAC960 linux/Documentation/README.DAC960
--- v2.4.0-test6/linux/Documentation/README.DAC960 Wed Aug 9 19:19:48 2000
+++ linux/Documentation/README.DAC960 Mon Aug 21 09:23:54 2000
@@ -1,11 +1,11 @@
Linux Driver for Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers
- Version 2.2.7 for Linux 2.2.16
- Version 2.4.7 for Linux 2.4.0
+ Version 2.2.8 for Linux 2.2.16
+ Version 2.4.8 for Linux 2.4.0
PRODUCTION RELEASE
- 1 August 2000
+ 19 August 2000
Leonard N. Zubkoff
Dandelion Digital
@@ -28,9 +28,9 @@
well as the most recent release of this driver, will always be available from
my Linux Home Page at URL "http://www.dandelion.com/Linux/". The Linux DAC960
driver supports all current Mylex PCI RAID controllers including the new
-eXtremeRAID 2000/3000 and AcceleRAID 352/170 models which have an entirely new
-firmware interface from the older eXtremeRAID 1100, AcceleRAID 150/200/250, and
-DAC960PJ/PG/PU/PD/PL. See below for a complete controller list as well as
+eXtremeRAID 2000/3000 and AcceleRAID 352/170/160 models which have an entirely
+new firmware interface from the older eXtremeRAID 1100, AcceleRAID 150/200/250,
+and DAC960PJ/PG/PU/PD/PL. See below for a complete controller list as well as
minimum firmware version requirements. For simplicity, in most places this
documentation refers to DAC960 generically rather than explicitly listing all
the supported models.
@@ -120,6 +120,12 @@
100MHz Intel i960RM RISC Processor
16MB/32MB/64MB ECC SDRAM Memory
+AcceleRAID 160
+ 1 Wide Ultra-160 LVD SCSI channel
+ 100MHz Intel i960RS RISC Processor
+ Built in 16M ECC SDRAM Memory
+ PCI Low Profile Form Factor - fit for 2U height
+
eXtremeRAID 1100 (DAC1164P)
3 Wide Ultra-2/LVD SCSI channels
233MHz StrongARM SA 110 Processor
@@ -164,8 +170,8 @@
Intel i960 RISC Processor
2MB/4MB/8MB/16MB/32MB DRAM Memory
-For the eXtremeRAID 2000/3000 and AcceleRAID 352/170, firmware version 6.00-01
-or above is required.
+For the eXtremeRAID 2000/3000 and AcceleRAID 352/170/160, firmware version
+6.00-01 or above is required.
For the eXtremeRAID 1100, firmware version 5.06-0-52 or above is required.
@@ -203,10 +209,10 @@
replacing "/usr/src" with wherever you keep your Linux kernel source tree:
cd /usr/src
- tar -xvzf DAC960-2.2.7.tar.gz (or DAC960-2.4.7.tar.gz)
+ tar -xvzf DAC960-2.2.8.tar.gz (or DAC960-2.4.8.tar.gz)
mv README.DAC960 linux/Documentation
mv DAC960.[ch] linux/drivers/block
- patch -p0 < DAC960.patch
+ patch -p0 < DAC960.patch (if DAC960.patch is included)
cd linux
make config
make depend
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/arm/SA1100/CERF linux/Documentation/arm/SA1100/CERF
--- v2.4.0-test6/linux/Documentation/arm/SA1100/CERF Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/SA1100/CERF Sun Aug 13 09:58:24 2000
@@ -0,0 +1,34 @@
+The Intrinsyc CerfBoard is a StrongARM 1110-based computer on a board that measures
+approximately 2" square. It includes an Ethernet controller, an RS232-compatible serial port, a
+USB function port, and one CompactFlash+ slot on the back. Pictures can be found at the
+Intrinsyc website, http://www.intrinsyc.com.
+
+This document describes the support in the Linux kernel for the Intrinsyc CerfBoard as of
+version 2.4.0-test4-np1.
+
+Supported in this version:
+ - CompactFlash+ slot (select PCMCIA in General Setup and any options that may be required)
+ - Onboard Crystal CS8900 Ethernet controller (Cerf CS8900A support in Network Devices)
+ - Serial ports with a serial console (hardcoded to 38400 8N1)
+
+Not supported in this version (yet):
+ - LCD driver/touchscreen interface
+ - UDC (a driver exists right now, but is unstable and slow and only works with the Linux USB)
+
+In order to get this kernel onto your Cerf, you need a server that runs both BOOTP and
+TFTP. Detailed instructions should have come with your evaluation kit on how to use the
+bootloader. This series of commands will suffice:
+
+ make cerf_config
+ make xconfig
+ make dep
+ make zImage
+ cp arch/arm/boot/zImage
+
+The default config uses a 4MB RAM disk located at 0xc0500000 as root. Setting the board to
+mount root from a NFS partition works, too.
+
+
+I-Gene Leong, Intrinsyc Software Inc.
+ileong@intrinsyc.com
+
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/arm/SA1100/nanoEngine linux/Documentation/arm/SA1100/nanoEngine
--- v2.4.0-test6/linux/Documentation/arm/SA1100/nanoEngine Wed Dec 31 16:00:00 1969
+++ linux/Documentation/arm/SA1100/nanoEngine Sun Aug 13 09:58:24 2000
@@ -0,0 +1,9 @@
+nanoEngine
+----------
+
+"nanoEngine" is a SA1110 based single board computer from
+Bright Star Engineering Inc. See www.brightstareng.com/arm
+for more info.
+
+Ref: Stuart Adams
+
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/digiboard.txt linux/Documentation/digiboard.txt
--- v2.4.0-test6/linux/Documentation/digiboard.txt Sun Nov 7 16:37:33 1999
+++ linux/Documentation/digiboard.txt Tue Aug 22 15:21:53 2000
@@ -20,7 +20,7 @@
It is available from ftp.digi.com/ftp.digiboard.com. You can write me if
you need an patch for this driver.
- Bernhard Kaindl (bkaindl@netway.at) 6. April 1997.
+Bernhard Kaindl (bkaindl@netway.at) 6. April 1997.
Configuring the Driver
----------------------
@@ -153,20 +153,18 @@
Sources of Information
----------------------
-Web page: http://private.fuller.edu/clameter/digi.html
+Please contact digi directly digilnux@dgii.com. Forward any information of
+general interest to me.
-Mailing list: digiboard@list.fuller.edu
+Web page (mainly of historical interest): http://lameter.com/digi
-(Write e-mail to that address to subscribe. Common ListServ commands work.
-Archive of messages available)
-
-Christoph Lameter (clameter@fuller.edu) 16. April 1996.
+Christoph Lameter (christoph@lameter.com) Aug 14, 2000.
Supporting Tools
----------------
-Some tools and more detailed information can be found at
-ftp://ftp.fuller.edu/Linux/digi
+Some (old) tools and more detailed information can be found at
+ftp://lameter.com/digi
The "ditty" tool described in the Digiboard Manuals for other Unixes
is also available.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/digiepca.txt linux/Documentation/digiepca.txt
--- v2.4.0-test6/linux/Documentation/digiepca.txt Thu Apr 29 11:53:41 1999
+++ linux/Documentation/digiepca.txt Tue Aug 22 15:21:53 2000
@@ -81,16 +81,12 @@
-> FTP: ftp://dgii.com
-> Webpage: http://www.dgii.com
--> Webpage: http://private.fuller.edu/clameter/digi.html
--> Mailing List: digiboard@list.fuller.edu Note write e-mail to subscribe
- common ListServ commands will not work.
+-> Webpage: http://lameter.com/digi
Acknowledgments:
----------------
Much of this work (And even text) was derived from a similar document
supporting the original public domain DigiBoard driver Copyright (C)
1994,1995 Troy De Jongh. Many thanks to Christoph Lameter
-(clameter@fuller.edu) and Mike McLagan (mike.mclagan@linux.org) who authored
+(christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored
and contributed to the original document.
-
-
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- v2.4.0-test6/linux/Documentation/fb/matroxfb.txt Wed Aug 9 19:19:48 2000
+++ linux/Documentation/fb/matroxfb.txt Thu Aug 10 12:34:31 2000
@@ -146,6 +146,27 @@
strange pattern on screen and so on. Devices not enabled by BIOS
are still initialized. It is default.
init - driver initializes every device it knows about.
+memtype - specifies memory type, implies 'init'. This is valid only for G200
+ and G400 and has following meaning:
+ G200: 0 -> 2x128Kx32 chips, 2MB onboard, probably sgram
+ 1 -> 2x128Kx32 chips, 4MB onboard, probably sgram
+ 2 -> 2x256Kx32 chips, 4MB onboard, probably sgram
+ 3 -> 2x256Kx32 chips, 8MB onboard, probably sgram
+ 4 -> 2x512Kx16 chips, 8/16MB onboard, probably sdram only
+ 5 -> same as above
+ 6 -> 4x128Kx32 chips, 4MB onboard, probably sgram
+ 7 -> 4x128Kx32 chips, 8MB onboard, probably sgram
+ G400: 0 -> 2x512Kx16 SDRAM, 16/32MB
+ 2x512Kx32 SGRAM, 16/32MB
+ 1 -> 2x256Kx32 SGRAM, 8/16MB
+ 2 -> 4x128Kx32 SGRAM, 8/16MB
+ 3 -> 4x512Kx32 SDRAM, 32MB
+ 4 -> 4x256Kx32 SGRAM, 16/32MB
+ 5 -> 2x1Mx32 SDRAM, 32MB
+ 6 -> reserved
+ 7 -> reserved
+ You should use sdram or sgram parameter in addition to memtype
+ parameter.
nomtrr - disables write combining on frame buffer. This slows down driver but
there is reported minor incompatibility between GUS DMA and XFree
under high loads if write combining is enabled (sound dropouts).
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/i386/IO-APIC.txt linux/Documentation/i386/IO-APIC.txt
--- v2.4.0-test6/linux/Documentation/i386/IO-APIC.txt Thu May 11 15:30:05 2000
+++ linux/Documentation/i386/IO-APIC.txt Mon Aug 21 08:57:35 2000
@@ -109,8 +109,8 @@
use smart try-and-err techniques to find out the correct pirq line ...
-good luck and mail to linux-smp@vger.rutgers.edu or
-linux-kernel@vger.rutgers.edu if you have any problems that are not covered
+good luck and mail to linux-smp@vger.kernel.org or
+linux-kernel@vger.kernel.org if you have any problems that are not covered
by this document.
-- mingo
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/isdn/README linux/Documentation/isdn/README
--- v2.4.0-test6/linux/Documentation/isdn/README Wed Aug 9 19:19:49 2000
+++ linux/Documentation/isdn/README Sun Aug 13 10:05:32 2000
@@ -242,7 +242,7 @@
0 = transparent
1 = transparent with audio features (e.g. DSP)
2 = Fax G3 Class 2 commands (S14 has to be set to 11)
- 2 = Fax G3 Class 1 commands (S14 has to be set to 11)
+ 3 = Fax G3 Class 1 commands (S14 has to be set to 11)
16 250 Send-Packet-size/16
17 8 Window-size (not yet implemented)
18 4 Bit coded register, Service-Octet-1 to accept,
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/isdn/README.HiSax linux/Documentation/isdn/README.HiSax
--- v2.4.0-test6/linux/Documentation/isdn/README.HiSax Wed Aug 9 19:19:49 2000
+++ linux/Documentation/isdn/README.HiSax Mon Aug 21 07:49:02 2000
@@ -53,7 +53,7 @@
Sedlbauer ISDN-Controller PC/104
USR Sportster internal TA (compatible Stollmann tina-pp V3)
ith Kommunikationstechnik GmbH MIC 16 ISA card
-Traverse Technologie NETjet PCI S0 card
+Traverse Technologie NETjet PCI S0 card and NETspider U card
Dr. Neuhaus Niccy PnP/PCI
Siemens I-Surf 1.0
Siemens I-Surf 2.0 (with IPAC, try type 12 asuscom)
@@ -134,7 +134,12 @@
The parameter for the D-Channel protocol may be omitted if you selected the
correct one during kernel config. Valid values are "1" for German 1TR6,
-"2" for EDSS1 (Euro ISDN) and "3" for leased lines (no D-Channel).
+"2" for EDSS1 (Euro ISDN), "3" for leased lines (no D-Channel) and "4"
+for US NI1.
+With US NI1 you have to include your SPID into the MSN setting in the form
+: for example (your phonenumber is 1234 your SPID 5678):
+AT&E1234:5678 on ttyI interfaces
+isdnctrl eaz ippp0 1234:5678 on network devices
The Creatix/Teles PnP cards use io1= and io2= instead of io= for specifying
the I/O addresses of the ISAC and HSCX chips, respectively.
@@ -186,8 +191,8 @@
34 Gazel ISDN cards (PCI) none
35 HFC 2BDS0 PCI none
36 W6692 based PCI cards none
- 37 HFC 2BDS0 S+, SP/PCMCIA irq,io (pcmcia must be set with cardmgr)
-
+ 37 HFC 2BDS0 S+, SP/PCMCIA irq,io (pcmcia must be set with cardmgr)
+ 38 NETspider U PCI card none
At the moment IRQ sharing is only possible with PCI cards. Please make sure
that your IRQ is free and enabled for ISA use.
@@ -291,7 +296,9 @@
34 Gazel ISDN cards (PCI) no parameter
35 HFC 2BDS0 PCI no parameter
36 W6692 based PCI cards none
- 37 HFC 2BDS0 S+,SP/PCMCIA pa=irq, pb=io
+ 37 HFC 2BDS0 S+,SP/PCMCIA ONLY WORKS AS A MODULE !
+ 38 NETspider U PCI card none
+
Running the driver
------------------
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/isdn/README.eicon linux/Documentation/isdn/README.eicon
--- v2.4.0-test6/linux/Documentation/isdn/README.eicon Mon Mar 27 08:08:20 2000
+++ linux/Documentation/isdn/README.eicon Sun Aug 13 10:05:32 2000
@@ -1,4 +1,4 @@
-$Id: README.eicon,v 1.7 2000/03/06 16:38:43 armin Exp $
+$Id: README.eicon,v 1.9 2000/06/08 08:50:25 armin Exp $
(c) 1999,2000 Armin Schindler (mac@melware.de)
(c) 1999,2000 Cytronics & Melware (info@melware.de)
@@ -40,6 +40,7 @@
------------------
- DIVA Server BRI/PCI 2M
- DIVA Server PRI/PCI 2M (9M 23M 30M)
+- DIVA Server 4BRI/PCI
supported functions of onboard DSPs:
- analog modem
- fax group 2/3 (Fax Class 2 commands)
@@ -80,7 +81,7 @@
Example for a BRI card with E-DSS1 Protocol with PtP configuration.
- eiconctrl [-d DriverId] load etsi -n -t0 -s1
+ eiconctrl [-d DriverId] load etsi -n -t1 -s1
Example for loading and starting a PRI card with E-DSS1 Protocol.
@@ -99,6 +100,18 @@
the necessary D-Channel traces for isdnlog.
+FILECHECK:
+A part of the eicon driver source code files are provided
+by Eicon Technology. In order to get the best support from Eicon,
+these files are tested with a checksum, just to know if the files
+were modified. This does *not* mean, you are not allowed to modify the
+driver. If you want to improve the driver or you fix a bug, please do
+so and let me (or Eicon) know, about the necessary changes. So
+every user knows, if the driver he uses is modified or checked with
+Eicon files. When the driver has been loaded, in the syslog you will
+find something like "verified" or "modified" right after the version.
+
+
Thanks to
Deutsche Mailbox Saar-Lor-Lux GmbH
for sponsoring and testing fax
@@ -113,3 +126,4 @@
Armin Schindler
mac@melware.de
http://www.melware.de
+
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/isdn/README.fax linux/Documentation/isdn/README.fax
--- v2.4.0-test6/linux/Documentation/isdn/README.fax Thu Nov 11 20:11:31 1999
+++ linux/Documentation/isdn/README.fax Sun Aug 13 10:05:32 2000
@@ -24,6 +24,9 @@
Eicon DIVA Server BRI/PCI
- full support with both B-channels.
+Eicon DIVA Server 4BRI/PCI
+ - full support with all B-channels.
+
Eicon DIVA Server PRI/PCI
- full support on amount of B-channels
depending on DSPs on board.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/isdn/README.hysdn linux/Documentation/isdn/README.hysdn
--- v2.4.0-test6/linux/Documentation/isdn/README.hysdn Wed Aug 9 19:19:49 2000
+++ linux/Documentation/isdn/README.hysdn Mon Aug 21 07:49:02 2000
@@ -1,9 +1,13 @@
-$Id: README.hysdn,v 1.1 2000/02/10 19:46:15 werner Exp $
+$Id: README.hysdn,v 1.3 2000/08/06 09:22:51 armin Exp $
The hysdn driver has been written by
by Werner Cornelius (werner@isdn4linux.de or werner@titro.de)
for Hypercope GmbH Aachen Germany. Hypercope agreed to publish this driver
under the GNU Public License.
+The CAPI 2.0-support was added by Ulrich Albrecht (ualbrecht@hypercope.de)
+for Hypercope GmbH Aachen, Germany.
+
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -41,15 +45,19 @@
enable ISDN support in the kernel config and support for HYSDN cards in
the active cards submenu. The driver may only be compiled and used if
support for loadable modules and the process filesystem have been enabled.
- No other ISDN options need to be enabled for these cards.
- Up to now these cards do not use or require the standard isdn interface
- module (isdn.o), but registers itself as an ethernet card. All necessary
+ These cards provide two different interfaces to the kernel. Without the
+ optional CAPI 2.0 support, they register as ethernet card. IP-routing
+ to a ISDN-destination is performed on the card itself. All necessary
handlers for various protocols like ppp and others as well as config info
and firmware may be fetched from Hypercopes WWW-Site www.hypercope.de.
- The driver has been included in the i4l tree as a CAPI compliant module
- is under development and will be connected to the standard i4l modules
- additionally.
+
+ With CAPI 2.0 support enabled, the card can also be used as a CAPI 2.0
+ compliant devices with either CAPI 2.0 applications
+ (check isdn4k-utils) or -using the capidrv module- as a regular
+ isdn4linux device. This is done via the same mechanism as with the
+ active AVM cards and in fact uses the same module.
+
2. Loading/Unloading the driver
@@ -58,7 +66,14 @@
If a loaded driver shall be unloaded all open files in the /proc/net/hysdn
subdir need to be closed and all ethernet interfaces allocated by this
driver must be shut down. Otherwise the module counter will avoid a module
- unload.
+ unload.
+
+ If you are using the CAPI 2.0-interface, make sure to load/modprobe the
+ kernelcapi-module first.
+
+ If you plan to use the capidrv-link to isdn4linux, make sure to load
+ capidrv.o after all modules using this driver (i.e. after hysdn and
+ any avm-specific modules).
3. Entries in the /proc filesystem
@@ -160,8 +175,11 @@
6. Where to get additional info and help
If you have any problems concerning the driver or configuration contact
- the Hypercope support team (www.hypercope.de) and or the author
- Werner Cornelius (werner@isdn4linux or cornelius@titro.de)
+ the Hypercope support team (support@hypercope.de) and or the authors
+ Werner Cornelius (werner@isdn4linux or cornelius@titro.de) or
+ Ulrich Albrecht (ualbrecht@hypercope.de).
+
+
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/kernel-docs.txt linux/Documentation/kernel-docs.txt
--- v2.4.0-test6/linux/Documentation/kernel-docs.txt Mon Jul 10 16:47:18 2000
+++ linux/Documentation/kernel-docs.txt Wed Aug 23 09:33:09 2000
@@ -278,7 +278,7 @@
Author: Stephen C. Tweedie.
URL:
ftp://ftp.uk.linux.org:/pub/linux/sct/fs/jfs/journal-design.ps.gz
- Keywords: ext3, journalist.
+ Keywords: ext3, journaling.
Description: Excellent 8-pages paper explaining the journaling
capabilities added to ext2 by the author, showing different
problems faced and the alternatives chosen.
@@ -476,6 +476,14 @@
URL: http://www.linux-mag.com/2000-03/gear_01.html
Keywords: PCI, bus, bus-mastering.
Description: The title says it all.
+
+ * Title: "Linux 2.4 Kernel Internals"
+ Author: Tigran Aivazian.
+ URL: http://www.moses.uklinux.net/patches/lki.html
+ Keywords: Linux, kernel, VFS, SMP boot
+ Description: A little book used for a short training course
+ I gave on this subject at VERITAS. Covers building the kernel
+ image, booting (including SMP), process management, VFS and more.
BOOKS: (Not on-line)
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/arcnet-hardware.txt linux/Documentation/networking/arcnet-hardware.txt
--- v2.4.0-test6/linux/Documentation/networking/arcnet-hardware.txt Sun Nov 7 16:37:33 1999
+++ linux/Documentation/networking/arcnet-hardware.txt Tue Aug 22 15:21:54 2000
@@ -3063,7 +3063,7 @@
** Tiara **
(model unknown)
-------------------------
- - from Christoph Lameter
+ - from Christoph Lameter
Here is information about my card as far as I could figure it out:
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/arcnet.txt linux/Documentation/networking/arcnet.txt
--- v2.4.0-test6/linux/Documentation/networking/arcnet.txt Mon Jul 5 19:52:52 1999
+++ linux/Documentation/networking/arcnet.txt Mon Aug 21 08:57:35 2000
@@ -70,7 +70,7 @@
There are archives of the mailing list at:
http://tichy.ch.uj.edu.pl/lists/linux-arcnet
-The people on linux-net@vger.rutgers.edu have also been known to be very
+The people on linux-net@vger.kernel.org have also been known to be very
helpful, especially when we're talking about ALPHA Linux kernels that may or
may not work right in the first place.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/ax25.txt linux/Documentation/networking/ax25.txt
--- v2.4.0-test6/linux/Documentation/networking/ax25.txt Mon Jul 7 08:19:59 1997
+++ linux/Documentation/networking/ax25.txt Mon Aug 21 08:57:35 2000
@@ -8,7 +8,7 @@
There is an active mailing list for discussing Linux amateur radio matters
called linux-hams. To subscribe to it, send a message to
-Majordomo@vger.rutgers.edu with the words "subscribe linux-hams" in the body
+majordomo@vger.kernel.org with the words "subscribe linux-hams" in the body
of the message, the subject field is ignored.
Jonathan G4KLX
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/ethertap.txt linux/Documentation/networking/ethertap.txt
--- v2.4.0-test6/linux/Documentation/networking/ethertap.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/networking/ethertap.txt Wed Aug 23 09:30:13 2000
@@ -1,3 +1,9 @@
+NOTE: Ethertap is now an obsolete facility, and is scheduled
+ to be removed in the 2.5.x kernel series. Those writing
+ applications using ethertap should convert their code to
+ use the TUN/TAP driver instead, see 'tuntap.txt' in this
+ directory for more details. -DaveM
+
Ethertap programming mini-HOWTO
-------------------------------
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt
--- v2.4.0-test6/linux/Documentation/networking/ip-sysctl.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/networking/ip-sysctl.txt Fri Aug 18 10:26:25 2000
@@ -194,13 +194,84 @@
Enable timestamps as defined in RFC1323.
tcp_sack - BOOLEAN
- Enable select acknowledgments.
+ Enable select acknowledgments (SACKS).
+
+tcp_fack - BOOLEAN
+ Enable FACK congestion avoidance and fast restransmission.
+ The value is not used, if tcp_sack is not enabled.
+
+tcp_dsack - BOOLEAN
+ Allows TCP to send "duplicate" SACKs.
+
+tcp_ecn - BOOLEN
+ Enable Explicit Congestion Notification in TCP.
+
+tcp_reordering - INTEGER
+ Maximal reordering of packets in a TCP stream.
+ Default: 3
tcp_retrans_collapse - BOOLEAN
Bug-to-bug compatibility with some broken printers.
On retransmit try to send bigger packets to work around bugs in
certain TCP stacks.
+tcp_wmem - vector of 3 INTEGERs: min, default, max
+ min: Amount of memory reserved for send buffers for TCP socket.
+ Each TCP socket has rights to use it due to fact of its birth.
+ Default: 4K
+
+ default: Amount of memory allowed for send buffers for TCP socket
+ by default. This value overrides net.core.wmem_default used
+ by other protocols, it is usually lower than net.core.wmem_default.
+ Default: 16K
+
+ max: Maximal amount of memory allowed for automatically selected
+ send buffers for TCP socket. This value does not override
+ net.core.wmem_max, "static" selection via SO_SNDBUF does not use this.
+ Default: 128K
+
+tcp_rmem - vector of 3 INTEGERs: min, default, max
+ min: Minimal size of receive buffer used by TCP sockets.
+ It is guaranteed to each TCP socket, even under moderate memory
+ pressure.
+ Default: 8K
+
+ default: default size of receive buffer used by TCP sockets.
+ This value overrides net.core.rmem_default used by other protocols.
+ Default: 87380 bytes. This value results in window of 65535 with
+ default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit
+ less for default tcp_app_win. See below about these variables.
+
+ max: maximal size of receive buffer allowed for automatically
+ selected receiver buffers for TCP socket. This value does not override
+ net.core.rmem_max, "static" selection via SO_RCVBUF does not use this.
+ Default: 87380*2 bytes.
+
+tcp_mem - vector of 3 INTEGERs: min, pressure, max
+ low: below this number of pages TCP is not bothered about its
+ memory appetite.
+
+ pressure: when amount of memory allocated by TCP exceeds this number
+ of pages, TCP moderates its memory consumption and enters memory
+ pressure mode, which is exited when memory consumtion falls
+ under "low".
+
+ high: number of pages allowed for queueing by all TCP sockets.
+
+ Defaults are calculated at boot time from amount of available
+ memory.
+
+tcp_app_win - INTEGER
+ Reserve max(window/2^tcp_app_win, mss) of window for application
+ buffer. Value 0 is special, it means that nothing is reserved.
+ Default: 31
+
+tcp_adv_win_scale - INTEGER
+ Count buffering overhead as bytes/2^tcp_adv_win_scale
+ (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
+ if it is <= 0.
+ Default: 2
+
ip_local_port_range - 2 INTEGERS
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
@@ -305,4 +376,4 @@
Updated by:
Andi Kleen
ak@muc.de
-$Id: ip-sysctl.txt,v 1.13 2000/01/18 08:24:09 davem Exp $
+$Id: ip-sysctl.txt,v 1.16 2000/08/13 18:24:11 davem Exp $
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/tuntap.txt linux/Documentation/networking/tuntap.txt
--- v2.4.0-test6/linux/Documentation/networking/tuntap.txt Wed Dec 31 16:00:00 1969
+++ linux/Documentation/networking/tuntap.txt Wed Aug 23 09:30:13 2000
@@ -0,0 +1,150 @@
+Universal TUN/TAP device driver.
+Copyright (C) 1999-2000 Maxim Krasnyansky
+
+ Linux, Solaris drivers
+ Copyright (C) 1999-2000 Maxim Krasnyansky
+
+ FreeBSD TAP driver
+ Copyright (c) 1999-2000 Maksim Yevmenkin
+
+1. Description
+ TUN/TAP provides packet reception and transmission for user space programs.
+ It can be viewed as a simple Point-to-Point or Ethernet device, which
+ instead of receiving packets from a physical media, receives them from
+ user space program and instead of sending packets via physical media
+ writes them to the user space program.
+
+ When a program opens /dev/net/tun, driver creates and registers corresponding
+ net device tunX or tapX. After a program closed above devices, driver will
+ automatically delete tunXX or tapXX device and all routes corresponding to it.
+
+ This package(http://vtun.sourceforge.net/tun) contains two simple example
+ programs how to use tun and tap devices. Both programs works like
+ bridge between two network interfaces.
+ br_select.c - bridge based on select system call.
+ br_sigio.c - bridge based on async io and SIGIO signal.
+ However the best example is VTun http://vtun.sourceforge.net :))
+
+2. Installation
+ Run './configure' to configure the driver.
+
+ Run 'make install' to compile and install driver module and to create
+ /dev/net/tun device node.
+
+3. Loading driver module
+ Linux
+ To load TUN/TAP driver module run:
+ modprobe tun
+ To configure automatic loading of the 'tun' module you have to add:
+ alias char-major-195 tun
+ to the /etc/conf.modules, and run:
+ modprobe -a
+ TUN/TAP driver will be automatically loaded when application access
+ /dev/net/tun.
+ If "Kernel module loader" - module auto-loading support is not enabled
+ in your kernel then you can add
+ modprobe tun
+ to one of the startup rc files.
+
+4. Program interface
+ 4.1 Network device allocation:
+
+ int tun_alloc(char *dev)
+ {
+ struct ifreq ifr;
+ int fd, err;
+
+ if( (fd = open("/dev/net/tun", O_RDWR)) < 0 )
+ return tun_alloc_old(dev);
+
+ memset(&ifr, 0, sizeof(ifr));
+
+ /* Flags: IFF_TUN - TUN device (no Ethernet headers)
+ * IFF_TAP - TAP device
+ *
+ * IFF_NO_PI - Do not provide packet information
+ */
+ ifr.ifr_flags = IFF_TUN;
+ if( *dev )
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+
+ if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){
+ close(fd);
+ return err;
+ }
+ strcpy(dev, ifr.ifr_name);
+ return fd;
+ }
+
+ 4.2 Frame format:
+ If flag IFF_NO_PI is not set each frame format is:
+ Flags [2 bytes]
+ Proto [2 bytes]
+ Raw protocol(IP, IPv6, etc) frame.
+
+Universal TUN/TAP device driver Frequently Asked Question.
+
+1. What is the TUN ?
+The TUN is Virtual Point-to-Point network device.
+TUN driver was designed as low level kernel support for
+IP tunneling. It provides to userland application
+two interfaces:
+ - /dev/tunX - character device;
+ - tunX - virtual Point-to-Point interface.
+
+Userland application can write IP frame to /dev/tunX
+and kernel will receive this frame from tunX interface.
+In the same time every frame that kernel writes to tunX
+interface can be read by userland application from /dev/tunX
+device.
+
+2. What is the TAP ?
+The TAP is a Virtual Ethernet network device.
+TAP driver was designed as low level kernel support for
+Ethernet tunneling. It provides to userland application
+two interfaces:
+ - /dev/tapX - character device;
+ - tapX - virtual Ethernet interface.
+
+Userland application can write Ethernet frame to /dev/tapX
+and kernel will receive this frame from tapX interface.
+In the same time every frame that kernel writes to tapX
+interface can be read by userland application from /dev/tapX
+device.
+
+3. What platforms are supported by TUN/TAP driver ?
+Currently driver has been written for 3 Unices:
+ Linux kernels 2.2.x, 2.4.x
+ FreeBSD 3.x, 4.x, 5.x
+ Solaris 2.6, 7.0, 8.0
+
+4. What is TUN/TAP driver used for?
+As mentioned above, main purpose of TUN/TAP driver is tunneling.
+It used by VTun (http://vtun.netpedia.net).
+
+5. How does Virtual network device actually work ?
+Virtual network device can be viewed as a simple Point-to-Point or
+Ethernet device, which instead of receiving packets from a physical
+media, receives them from user space program and instead of sending
+packets via physical media sends them to the user space program.
+
+Let's say that you configured IPX on the tap0, then whenever
+kernel sends any IPX packet to tap0, it is passed to the application
+(VTun for example). Application encrypts, compresses and sends it to
+the other side over TCP or UDP. Application on other side decompress
+and decrypts them and write packet to the TAP device, kernel handles
+the packet like it came from real physical device.
+
+6. What is the difference between TUN driver and TAP driver?
+TUN works with IP frames. TAP works with Ethernet frames.
+
+7. What is the difference between BPF and TUN/TAP driver?
+BFP is a advanced packet filter. It can be attached to existing
+network interface. It does not provide virtual network interface.
+TUN/TAP driver does provide virtual network interface and it is possible
+to attach BPF to this interface.
+
+8. Does TAP driver support kernel Ethernet bridging?
+Yes. Linux and FreeBSD drivers support Ethernet bridging.
+
+
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/vortex.txt linux/Documentation/networking/vortex.txt
--- v2.4.0-test6/linux/Documentation/networking/vortex.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/networking/vortex.txt Mon Aug 21 08:57:35 2000
@@ -13,7 +13,7 @@
Andrew Morton
Netdev mailing list
- Linux kernel mailing list
+ Linux kernel mailing list
Please note the 'Reporting and Diagnosing Problems' section at the end
of this file.
@@ -52,7 +52,6 @@
3CCFE656 Cyclone CardBus
3CCFEM656 Cyclone CardBus
3c450 Cyclone/unknown
- 3Com Boomerang (unknown version)
Module parameters
@@ -67,7 +66,7 @@
If you are using the PCMCIA tools (cardmgr) then the options may be
placed in /etc/pcmcia/config.opts:
-module "3c59x" opts "debug=3 extra_reset=1"
+module "3c59x" opts "debug=3 rx_copybreak=300"
The supported parameters are:
@@ -104,8 +103,8 @@
When generating a value for the 'options' setting, the above media
selection values may be OR'ed (or added to) the following:
- 512 (0x200) Force full-duplex
- 16 (0x10) Bus-master enable bit (Old Vortex cards only)
+ 512 (0x200) Force full duplex mode.
+ 16 (0x10) Bus-master enable bit (Old Vortex cards only)
For example:
@@ -119,6 +118,22 @@
Similar to bit 9 of 'options'. Forces the corresponding card into
full-duplex mode.
+flow_ctrl=N1,N2,N3...
+
+ Use 802.3x MAC-layer flow control. The 3com cards only support the
+ PAUSE command, which means that they will stop sending packets for a
+ short period if they receive a PAUSE frame from the link partner.
+
+ The driver only allows flow control on a link which is operating in
+ full duplex mode.
+
+ This feature does not appear to work on the 3c905 - only 3c905B and
+ 3c905C have been tested.
+
+ The 3com cards appear to only respond to PAUSE frames which are
+ sent to the reserved destination address of 01:80:c2:00:00:01. They
+ do not honour PAUSE frames which are sent to the station MAC address.
+
rx_copybreak=M
The driver preallocates 32 full-sized (1536 byte) network buffers
@@ -141,15 +156,6 @@
is exceeded the interrupt service routine gives up and generates a
warning message "eth0: Too much work in interrupt".
-extra_reset=N
-
- Where N is 0 or 1 (default 0).
-
- Some network cards (notably 3CCFE575CT Cardbus) do not initialise
- correctly and need an extra transmitter reset. If you find that the
- card comes up receiving but not transmitting, try giving the module
- the 'extra_reset=1' option.
-
compaq_ioaddr=N
compaq_irq=N
compaq_device_id=N
@@ -220,29 +226,102 @@
Reporting and diagnosing problems
---------------------------------
-If the driver plays up, there are a number of things you can do analyse
-the problem and to help others do this:
+Maintainers find that accurate and complete problem reports are
+invaluable in resolving driver problems. We are frequently not able to
+reproduce problems and must rely on your patience and efforts to get to
+the bottom of the problem.
+
+If you believe you have a driver problem here are some of the
+steps you should take:
+
+- Is it really a driver problem?
+
+ Eliminate some variables: try different cards, different
+ computers, different cables, different ports on the switch/hub,
+ different versions of the kernel or ofthe driver, etc.
+
+- OK, it's a driver problem.
+
+ You need to generate a report. Typically this is an email to the
+ maintainer and/or linux-net@vger.kernel.org. The maintainer's
+ email address will be inthe driver source or in the MAINTAINERS file.
+
+- The contents of your report will vary a lot depending upon the
+ problem. If it's a kernel crash then you should refer to the
+ REPORTING-BUGS file.
+
+ But for most problems it is useful to provide the following:
+
+ o Kernel version, driver version
+
+ o A copy of the banner message which the driver generates when
+ it is initialised. For example:
+
+ eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
+ 8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
+ MII transceiver found at address 24, status 782d.
+ Enabling bus-master transmits and whole-frame receives.
+
+ o If it is a PCI device, the relevant output from 'lspci -vx', eg:
+
+ 00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
+ Subsystem: 3Com Corporation: Unknown device 9200
+ Flags: bus master, medium devsel, latency 32, IRQ 19
+ I/O ports at a400 [size=128]
+ Memory at db000000 (32-bit, non-prefetchable) [size=128]
+ Expansion ROM at [disabled] [size=128K]
+ Capabilities: [dc] Power Management version 2
+ 00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
+ 10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
+ 20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
+ 30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
+
+ o A description of the environment: 10baseT? 100baseT?
+ full/half duplex? switched or hubbed?
+
+ o Any additional module parameters which you may be providing to the driver.
+
+ o Any kernel logs which are produced. The more the merrier.
+ If this is a large file and you are sending your report to a
+ mailing list, mention that you have the logfile, but don't send
+ it. If you're reporting direct to the maintainer then just send
+ it.
+
+ To ensure that all kernel logs are available, add the
+ following line to /etc/syslog.conf:
+
+ kern.* /var/log/messages
+
+ Then restart syslogd with:
+
+ /etc/rc.d/init.d/syslog restart
-- Turn on debugging in the driver
- Add 'debug=7' to /etc/modules.conf (/etc/conf.modules)
- Change 'vortex_debug' to 7 in the source code.
+ (The above may vary, depending upon which Linux distribution you use).
-- Send all kernel logs, starting with the first probe of the card.
+ o If your problem is reproducible then that's great. Try the
+ following:
-- Run 'mii-diag -v' to show the state of the Media Independent
- Interface. If the card sometimes works and sometimes doesn't, run
- 'mii-diag -v' in both states.
+ 1) Increase the debug level. Usually this is done via:
-- Please run 'vortex-diag -aaee' in both good and bad states. This
- show the NIC's registers and EEPROM contents.
+ a) modprobe driver.o debug=7
+ b) In /etc/conf.modules (or modules.conf):
+ options driver_name debug=7
-- Describe your setup: 10baseT, 100baseT, full/half duplex, etc.
+ 2) Recreate the problem with the higher debug level,
+ send all logs to the maintainer.
-- Note any additional module insertion commands you're using.
+ 3) Download you card's diagnostic tool from Donald
+ Backer's website http://www.scyld.com/diag. Download
+ mii-diag.c as well. Build these.
-- Try different media type settings (see above).
+ a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
+ working correctly. Save the output.
-- Try inserting the module with 'extra_reset=1' (or compile this into
- the driver).
+ b) Run the above commands when the card is malfunctioning. Send
+ both sets of output.
+Finally, please be patient and be prepared to do some work. You may end up working on
+this problem for a week or more as the maintainer asks more questions, asks for more
+tests, asks for patches to be applied, etc. At the end of it all, the problem may even
+remain unresolved.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/networking/x25.txt linux/Documentation/networking/x25.txt
--- v2.4.0-test6/linux/Documentation/networking/x25.txt Tue Apr 28 14:22:04 1998
+++ linux/Documentation/networking/x25.txt Mon Aug 21 08:57:35 2000
@@ -29,10 +29,10 @@
format and behaviour of the protocol. If time permits this option will also
be actively considered.
-A linux-x25 mailing list has been created at vger.rutgers.edu to support the
+A linux-x25 mailing list has been created at vger.kernel.org to support the
development and use of Linux X.25. It is early days yet, but interested
parties are welcome to subscribe to it. Just send a message to
-Majordomo@vger.rutgers.edu with the following in the message body:
+majordomo@vger.kernel.org with the following in the message body:
subscribe linux-x25
end
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/nmi_watchdog.txt linux/Documentation/nmi_watchdog.txt
--- v2.4.0-test6/linux/Documentation/nmi_watchdog.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/nmi_watchdog.txt Mon Aug 21 08:57:35 2000
@@ -29,5 +29,5 @@
[ feel free to send bug reports, suggestions and patches to
Ingo Molnar or the Linux SMP mailing
- list at ]
+ list at ]
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/oops-tracing.txt linux/Documentation/oops-tracing.txt
--- v2.4.0-test6/linux/Documentation/oops-tracing.txt Thu Nov 11 20:11:31 1999
+++ linux/Documentation/oops-tracing.txt Mon Aug 21 08:57:35 2000
@@ -13,7 +13,7 @@
worth even more than the oops
If you are totally stumped as to whom to send the report, send it to
-linux-kernel@vger.rutgers.edu. Thanks for your help in making Linux as
+linux-kernel@vger.kernel.org. Thanks for your help in making Linux as
stable as humanly possible.
Where is the_oops.txt?
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/scsi-generic.txt linux/Documentation/scsi-generic.txt
--- v2.4.0-test6/linux/Documentation/scsi-generic.txt Sun Mar 19 18:35:30 2000
+++ linux/Documentation/scsi-generic.txt Mon Aug 21 08:57:35 2000
@@ -756,7 +756,7 @@
the SCSI "sr" driver.
http://www.torque.net/sg
My site with sg related information.
-newsgroup:linux-scsi@vger.rutgers.edu
+newsgroup:linux-scsi@vger.kernel.org
Newsgroup for Linux related SCSI matters
/usr/src/linux/MAINTAINERS
This is a file in the Linux kernel source that
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/sound/Soundblaster linux/Documentation/sound/Soundblaster
--- v2.4.0-test6/linux/Documentation/sound/Soundblaster Wed Apr 26 16:34:06 2000
+++ linux/Documentation/sound/Soundblaster Fri Aug 11 14:42:16 2000
@@ -9,8 +9,8 @@
io I/O address of the Sound Blaster chip (0x220,0x240,0x260,0x280)
irq IRQ of the Sound Blaster chip (5,7,9,10)
-dma 8-bit DMA channel for the Sound Blaster (0,1,3)
-dma16 16-bit DMA channel for SB16 and equivalent cards (5,6,7)
+dma 8-bit DMA channel for the Sound Blaster (0,1,3)
+dma16 16-bit DMA channel for SB16 and equivalent cards (5,6,7)
mpu_io I/O for MPU chip if present (0x300,0x330)
sm_games=1 Set if you have a Logitech soundman games
@@ -21,11 +21,13 @@
The following arguments are taken if ISAPnP support is compiled in
isapnp=0 Set this to disable ISAPnP detection (use io=0xXXX etc. above)
-multiple=1 Set to enable detection of multiple Soundblaster cards.
+multiple=0 Set to disable detection of multiple Soundblaster cards.
+ Consider it a bug if this option is needed, and send in a
+ report.
reverse=1 Reverses the order of the search in the PnP table.
uart401=1 Set to enable detection of mpu devices on some clones.
-isapnpjump Jumps to a specific slot in the driver's PnP table. Use the
- source, Luke.
+isapnpjump=n Jumps to slot n in the driver's PnP table. Use the source,
+ Luke.
You may well want to load the opl3 driver for synth music on most SB and
clone SB devices
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/sparc/sbus_drivers.txt linux/Documentation/sparc/sbus_drivers.txt
--- v2.4.0-test6/linux/Documentation/sparc/sbus_drivers.txt Wed Dec 31 16:00:00 1969
+++ linux/Documentation/sparc/sbus_drivers.txt Fri Aug 18 10:26:25 2000
@@ -0,0 +1,272 @@
+
+ Writing SBUS Drivers
+
+ David S. Miller (davem@redhat.com)
+
+ The SBUS driver interfaces of the Linux kernel have been
+revamped completely for 2.4.x for several reasons. Foremost were
+performance and complexity concerns. This document details these
+new interfaces and how they are used to write an SBUS device driver.
+
+ SBUS drivers need to include to get access
+to functions and structures described here.
+
+ Probing and Detection
+
+ Each SBUS device inside the machine is described by a
+structure called "struct sbus_dev". Likewise, each SBUS bus
+found in the system is described by a "struct sbus_bus". For
+each SBUS bus, the devices underneath are hung in a tree-like
+fashion off of the bus structure.
+
+ The SBUS device structure contains enough information
+for you to implement your device probing algorithm and obtain
+the bits necessary to run your device. The most commonly
+used members of this structure, and their typical usage,
+will be detailed below.
+
+ Here is how probing is performed by an SBUS driver
+under Linux:
+
+ static void init_one_mydevice(struct sbus_dev *sdev)
+ {
+ ...
+ }
+
+ static int mydevice_match(struct sbus_dev *sdev)
+ {
+ if (some_criteria(sdev))
+ return 1;
+ return 0;
+ }
+
+ static void mydevice_probe(void)
+ {
+ struct sbus_bus *sbus;
+ struct sbus_dev *sdev;
+
+ for_each_sbus(sbus) {
+ for_each_sbusdev(sdev, sbus) {
+ if (mydevice_match(sdev))
+ init_one_mydevice(sdev);
+ }
+ }
+ }
+
+ All this does is walk through all SBUS devices in the
+system, checks each to see if it is of the type which
+your driver is written for, and if so it calls the init
+routine to attach the device and prepare to drive it.
+
+ "init_one_mydevice" might do things like allocate software
+state structures, map in I/O registers, place the hardware
+into an initialized state, etc.
+
+ Mapping and Accessing I/O Registers
+
+ Each SBUS device structure contains an array of descriptors
+which describe each register set. We abuse struct resource for that.
+They each correspond to the "reg" properties provided by the OBP firmware.
+
+ Before you can access your device's registers you must map
+them. And later if you wish to shutdown your driver (for module
+unload or similar) you must unmap them. You must treat them as
+a resource, which you allocate (map) before using and free up
+(unmap) when you are done with it.
+
+ The mapping information is stored in an opaque value
+typed as an "unsigned long". This is the type of the return value
+of the mapping interface, and the arguments to the unmapping
+interface. Let's say you want to map the first set of registers.
+Perhaps part of your driver software state structure looks like:
+
+ struct mydevice {
+ unsigned long control_regs;
+ ...
+ struct sbus_dev *sdev;
+ ...
+ };
+
+ At initialization time you then use the sbus_ioremap
+interface to map in your registers, like so:
+
+ static void init_one_mydevice(struct sbus_dev *sdev)
+ {
+ struct mydevice *mp;
+ ...
+
+ mp->control_regs = sbus_ioremap(&sdev->resource[0], 0,
+ CONTROL_REGS_SIZE, "mydevice regs");
+ if (!mp->control_regs) {
+ /* Failure, cleanup and return. */
+ }
+ }
+
+ Second argument to sbus_ioremap is an offset for
+cranky devices with broken OBP PROM. The sbus_ioremap uses only
+a start address and flags from the resource structure.
+Therefore it is possible to use the same resource to map
+several sets of registers or even to fabricate a resource
+structure if driver gets physical address from some private place.
+This practice is discouraged though. Use whatever OBP PROM
+provided to you.
+
+ And here is how you might unmap these registers later at
+driver shutdown or module unload time, using the sbus_iounmap
+interface:
+
+ static void mydevice_unmap_regs(struct mydevice *mp)
+ {
+ sbus_iounmap(mp->control_regs, CONTROL_REGS_SIZE);
+ }
+
+ Finally, to actually access your registers there are 6
+interface routines at your disposal. Accesses are byte (8 bit),
+word (16 bit), or longword (32 bit) sized. Here they are:
+
+ u8 sbus_readb(unsigned long reg) /* read byte */
+ u16 sbus_readw(unsigned long reg) /* read word */
+ u32 sbus_readl(unsigned long reg) /* read longword */
+ void sbus_writeb(u8 value, unsigned long reg) /* write byte */
+ void sbus_writew(u16 value, unsigned long reg) /* write word */
+ void sbus_writel(u32 value, unsigned long reg) /* write longword */
+
+ So, let's say your device has a control register of some sort
+at offset zero. The following might implement resetting your device:
+
+ #define CONTROL 0x00UL
+
+ #define CONTROL_RESET 0x00000001 /* Reset hardware */
+
+ static void mydevice_reset(struct mydevice *mp)
+ {
+ sbus_writel(CONTROL_RESET, mp->regs + CONTROL);
+ }
+
+ Or perhaps there is a data port register at an offset of
+16 bytes which allows you to read bytes from a fifo in the device:
+
+ #define DATA 0x10UL
+
+ static u8 mydevice_get_byte(struct mydevice *mp)
+ {
+ return sbus_readb(mp->regs + DATA);
+ }
+
+ It's pretty straightforward, and clueful readers may have
+noticed that these interfaces mimick the PCI interfaces of the
+Linux kernel. This was not by accident.
+
+ WARNING:
+
+ DO NOT try to treat these opaque register mapping
+ values as a memory mapped pointer to some structure
+ which you can dereference.
+
+ It may be memory mapped, it may not be. In fact it
+ could be a physical address, or it could be the time
+ of day xor'd with 0xdeadbeef. :-)
+
+ Whatever it is, it's an implementation detail. The
+ interface was done this way to shield the driver
+ author from such complexities.
+
+ Doing DVMA
+
+ SBUS devices can perform DMA transactions in a way similar
+to PCI but dissimilar to ISA, e.g. DMA masters supply address.
+In contrast to PCI, however, that address (a bus address) is
+translated by IOMMU before a memory access is performed and therefore
+it is virtual. Sun calls this procedure DVMA.
+
+ Linux supports two styles of using SBUS DVMA: "consistent memory"
+and "streaming DVMA". CPU view of consistent memory chunk is, well,
+consistent with a view of a device. Think of it as an uncached memory.
+Typically this way of doing DVMA is not very fast and drivers use it
+mostly for control blocks or queues. On some CPUs we cannot flush or
+invalidate individual pages or cache lines and doing explicit flushing
+over ever little byte in every control block would be wasteful.
+
+Streaming DVMA is a preferred way to transfer large amounts of data.
+This process works in the following way:
+1. a CPU stops accessing a certain part of memory,
+ flushes its caches covering that memory;
+2. a device does DVMA accesses, then posts an interrupt;
+3. CPU invalidates its caches and starts to access the memory.
+
+A single streaming DVMA operation can touch several discontiguous
+regions of a virtual bus address space. This is called a scatter-gather
+DVMA.
+
+[TBD: Why do not we neither Solaris attempt to map disjoint pages
+into a single virtual chunk with the help of IOMMU, so that non SG
+DVMA masters would do SG? It'd be very helpful for RAID.]
+
+ In order to perform a consistent DVMA a driver does something
+like the following:
+
+ char *mem; /* Address in the CPU space */
+ u32 busa; /* Address in the SBus space */
+
+ mem = (char *) sbus_alloc_consistant(sdev, MYMEMSIZE, &busa);
+
+ Then mem is used when CPU accesses this memory and u32
+is fed to the device so that it can do DVMA. This is typically
+done with an sbus_writel() into some device register.
+
+ Do not forget to free the DVMA resources once you are done:
+
+ sbus_free_consistant(sdev, MYMEMSIZE, mem, busa);
+
+ Streaming DVMA is more interesting. First you allocate some
+memory suitable for it or pin down some user pages. Then it all works
+like this:
+
+ char *mem = argumen1;
+ unsigned int size = argument2;
+ u32 busa; /* Address in the SBus space */
+
+ *mem = 1; /* CPU can access */
+ busa = sbus_map_single(sdev, mem, size);
+ if (busa == 0) .......
+
+ /* Tell the device to use busa here */
+ /* CPU cannot access the memory without sbus_dma_sync_single() */
+
+ sbus_unmap_single(sdev, busa, size);
+ if (*mem == 0) .... /* CPU can access again */
+
+ It is possible to retain mappings and ask the device to
+access data again and again without calling sbus_unmap_single.
+However, CPU caches must be invalidated with sbus_dma_sync_single
+before such access.
+
+[TBD but what about writeback caches here... do we have any?]
+
+ There is an equivalent set of functions doing the same thing
+only with several memory segments at once for devices capable of
+scatter-gather transfers. Use the Source, Luke.
+
+ Examples
+
+ drivers/net/sunhme.c
+ This is a complicated driver which illustrates many concepts
+discussed above and plus it handles both PCI and SBUS boards.
+
+ drivers/scsi/esp.c
+ Check it out for scatter-gather DVMA.
+
+ drivers/sbus/char/bpp.c
+ A non-DVMA device.
+
+ drivers/net/sunlance.c
+ Lance driver abuses consistent mappings for data transfer.
+It is a nifty trick which we do not particularly recommend...
+Just check it out and know that it's legal.
+
+ Bad examples, do NOT use
+
+ drivers/video/cgsix.c
+ This one uses result of sbus_ioremap as if it is an address.
+This does NOT work on sparc64 and therefore is broken. We will
+convert it at a later date.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/usb/proc_usb_info.txt linux/Documentation/usb/proc_usb_info.txt
--- v2.4.0-test6/linux/Documentation/usb/proc_usb_info.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/usb/proc_usb_info.txt Tue Aug 22 09:06:31 2000
@@ -1,6 +1,6 @@
/proc/bus/usb filesystem output
===============================
-(version 2000.03.24)
+(version 2000.08.15)
The /proc filesystem for USB devices generates
@@ -9,6 +9,23 @@
/proc/bus/usb/drivers lists the registered drivers,
one per line, with each driver's USB minor dev node
number range if applicable.
+
+**NOTE**: If /proc/bus/usb appears empty, you need
+ to mount the filesystem, issue the command (as root):
+
+ mount -t usbdevfs none /proc/bus/usb
+
+ An alternative and more permanent method would be to add
+
+ none /proc/bus/usb usbdevfs defaults 0 0
+
+ to /etc/fstab. This will mount usbdevfs at each reboot.
+ You can then issue `cat /proc/bus/usb/devices` to extract
+ USB device information.
+
+For more information on mounting the usbdevfs file system, see the
+"USB Device Filesystem" section of the USB Guide. The latest copy
+of the USB Guide can be found at http://www.linux-usb.org/
In /proc/bus/usb/devices, each device's output has multiple
lines of ASCII output.
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/usb/usb-serial.txt linux/Documentation/usb/usb-serial.txt
--- v2.4.0-test6/linux/Documentation/usb/usb-serial.txt Wed Aug 9 19:19:49 2000
+++ linux/Documentation/usb/usb-serial.txt Sun Aug 13 19:23:19 2000
@@ -135,16 +135,16 @@
Digi AccelePort Driver
- This driver supports the Digi AccelePort USB 4 device, a 4 port
- USB serial converter. The driver does NOT yet support the Digi
- AccelePort USB 2 or 8.
+ This driver supports the Digi AccelePort USB 2 and 4 devices, 2 port
+ (plus a parallel port) and 4 port USB serial converters. The driver
+ does NOT yet support the Digi AccelePort USB 8.
- The driver supports open, close, read, write, termios settings (baud
- rate, word size, parity, stop bits, hardware/software flow control,
- CREAD), DTR/RTS, and TIOCMGET/SET/BIS/BIC ioctls. It has not been
- thoroughly tested, but it seems to be working reasonable well. There
- is more work to do, including flow control, ioctls, and support for
- the Digi AccelePort USB 2 and 8.
+ The driver is generally working, though we still have a few more ioctls
+ to implement and final testing and debugging to do. The paralled port
+ on the USB 2 is supported as a serial to parallel converter; in other
+ words, it appears as another USB serial port on Linux, even though
+ physically it is really a parallel port. The Digi Acceleport USB 8
+ is not yet supported.
Please contact Peter Berger (pberger@brimson.com) or Al Borchers
(alborchers@steinerpoint.com) for questions or problems with this
diff -u --recursive --new-file v2.4.0-test6/linux/Documentation/watchdog.txt linux/Documentation/watchdog.txt
--- v2.4.0-test6/linux/Documentation/watchdog.txt Fri Jun 23 21:55:07 2000
+++ linux/Documentation/watchdog.txt Fri Aug 11 15:57:57 2000
@@ -14,7 +14,7 @@
Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)
-All five interfaces provide /dev/watchdog, which when open must be written
+All six interfaces provide /dev/watchdog, which when open must be written
to within a timeout or the machine will reboot. Each write delays the reboot
time another timeout. In the case of the software watchdog the ability to
reboot will depend on the state of the machines and interrupts. The hardware
@@ -35,17 +35,27 @@
The wdt card cannot be safely probed for. Instead you need to pass
wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
+The i810 TCO watchdog modules can be configured with the "i810_margin"
+commandline argument which specifies the counter initial value. The counter
+is decremented every 0.6 seconds and default to 50 (30 seconds). Values can
+range between 3 and 63.
+
+The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
+WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
+and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
+documentation for the 82801AA and 82801AB datasheet).
+
Features
--------
- WDT501P WDT500P Software Berkshire
-Reboot Timer X X X X
-External Reboot X X o o
-I/O Port Monitor o o o X
-Temperature X o o X
-Fan Speed X o o o
-Power Under X o o o
-Power Over X o o o
-Overheat X o o o
+ WDT501P WDT500P Software Berkshire i810 TCO
+Reboot Timer X X X X X
+External Reboot X X o o o
+I/O Port Monitor o o o X o
+Temperature X o o X o
+Fan Speed X o o o o
+Power Under X o o o o
+Power Over X o o o o
+Overheat X o o o o
The external event interfaces on the WDT boards are not currently supported.
Minor numbers are however allocated for it.
@@ -69,6 +79,7 @@
while(1)
{
write(fd,"\0",1);
+ fsync(fd);
sleep(10);
}
}
diff -u --recursive --new-file v2.4.0-test6/linux/MAINTAINERS linux/MAINTAINERS
--- v2.4.0-test6/linux/MAINTAINERS Wed Aug 9 19:19:49 2000
+++ linux/MAINTAINERS Tue Aug 22 15:21:54 2000
@@ -72,25 +72,32 @@
3C501 NETWORK DRIVER
P: Alan Cox
M: alan@the.3c501.cabal.tm
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained for 2.2 only
3C505 NETWORK DRIVER
P: Philip Blundell
M: Philip.Blundell@pobox.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
6PACK NETWORK DRIVER FOR AX.25
P: Andreas Koensgen
M: ajk@iehk.rwth-aachen.de
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
+S: Maintained
+
+8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
+P: Theodore Ts'o
+M: tytso@mit.edu
+L: linux-serial@vger.kernel.org
+W: http://serial.sourceforge.net
S: Maintained
8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
P: Paul Gortmaker
M: p_gortmaker@yahoo.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
ACPI
@@ -112,7 +119,7 @@
P: Bob Frey
M: linux@advansys.com
W: http://www.advansys.com/linux.html
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
AEDSP16 DRIVER
@@ -123,13 +130,13 @@
AHA152X SCSI DRIVER
P: Juergen E. Fischer
M: Juergen Fischer
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
APM DRIVER
P: Stephen Rothwell
M: apm@linuxcare.com.au
-L: linux-laptop@vger.rutgers.edu
+L: linux-laptop@vger.kernel.org
W: http://linuxcare.com.au/apm/
S: Supported
@@ -154,19 +161,19 @@
ARPD SUPPORT
P: Jonathan Layes
M: layes@loran.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
AX.25 NETWORK LAYER
P: Matthias Welwarsky
M: dg2fef@afthd.tu-darmstadt.de
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
S: Maintained
BAYCOM/HDLCDRV/SOUNDMODEM DRIVERS FOR AX.25
P: Thomas Sailer
M: sailer@ife.ee.ethz.ch
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
W: http://www.ife.ee.ethz.ch/~sailer/ham/ham.html
S: Maintained
@@ -179,7 +186,7 @@
BFS FILE SYSTEM
P: Tigran A. Aivazian
M: tigran@veritas.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.ocston.org/~tigran/patches/bfs
S: Maintained
@@ -193,7 +200,7 @@
BUSLOGIC SCSI DRIVER
P: Leonard N. Zubkoff
M: Leonard N. Zubkoff
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
W: http://www.dandelion.com/Linux/
S: Maintained
@@ -276,7 +283,7 @@
M: jreuter@poboxes.com
W: http://poboxes.com/jreuter/
W: http://qsl.net/dl1bke/
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
S: Maintained
DC390/AM53C974 SCSI driver
@@ -295,13 +302,13 @@
DEVICE NUMBER REGISTRY
P: H. Peter Anvin
M: hpa@zytor.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
DEVICE FILESYSTEM
P: Richard Gooch
M: rgooch@atnf.csiro.au
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
DIGI INTL. EPCA DRIVER
@@ -314,10 +321,17 @@
DIGI RIGHTSWITCH NETWORK DRIVER
P: Rick Richardson
M: rick@remotepoint.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
W: http://www.dgii.com/linux/
S: Maintained
+DIGIBOARD PC/XE AND PC/XI DRIVER
+P: Christoph Lameter
+M: christoph@lameter.com
+W: http://www.dgii.com/linux,http://lameter.com/digi
+L: digilnux@dgii.com
+S: Maintained
+
DISK GEOMETRY AND PARTITION HANDLING
P: Andries Brouwer
M: aeb@veritas.com
@@ -329,7 +343,7 @@
DISKQUOTA:
P: Marco van Wieringen
M: mvw@planets.elm.net
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
DOUBLETALK DRIVER
@@ -341,19 +355,19 @@
EATA-DMA SCSI DRIVER
P: Michael Neuffer
M: mike@i-Connect.Net
-L: linux-eata@i-connect.net, linux-scsi@vger.rutgers.edu
+L: linux-eata@i-connect.net, linux-scsi@vger.kernel.org
S: Maintained
EATA ISA/EISA/PCI SCSI DRIVER
P: Dario Ballabio
M: dario@milano.europe.dg.com
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
EATA-PIO SCSI DRIVER
P: Michael Neuffer
M: mike@i-Connect.Net
-L: linux-eata@i-connect.net, linux-scsi@vger.rutgers.edu
+L: linux-eata@i-connect.net, linux-scsi@vger.kernel.org
S: Maintained
EEPRO100 NETWORK DRIVER
@@ -371,7 +385,7 @@
ETHEREXPRESS-16 NETWORK DRIVER
P: Philip Blundell
M: Philip.Blundell@pobox.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
ETHERNET BRIDGE
@@ -389,13 +403,13 @@
EXT2 FILE SYSTEM
P: Remy Card
M: Remy.Card@linux.org
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
FILE LOCKING (flock() and fcntl()/lockf())
P: Matthew Wilcox
M: willy@thepuffingroup.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
FPU EMULATOR
@@ -407,46 +421,53 @@
FRAME RELAY DLCI/FRAD (Sangoma drivers too)
P: Mike McLagan
M: mike.mclagan@linux.org
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
FTAPE/QIC-117
P: Claus-Justus Heine
M: claus@momo.math.rwth-aachen.de
-L: linux-tape@vger.rutgers.edu
+L: linux-tape@vger.kernel.org
W: http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape/
S: Maintained
FUTURE DOMAIN TMC-16x0 SCSI DRIVER (16-bit)
P: Rik Faith
M: faith@cs.unc.edu
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Odd fixes (e.g., new signatures)
GDT SCSI DISK ARRAY CONTROLLER DRIVER
P: Achim Leubner
M: achim@vortex.de
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
W: http://www.icp-vortex.com/
S: Supported
HAYES ESP SERIAL DRIVER
P: Andrew J. Robinson
M: arobinso@nyx.net
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.nyx.net/~arobinso
S: Maintained
HFS FILESYSTEM
P: Adrian Sun
M: asun@cobaltnet.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
+HGA FRAMEBUFFER DRIVER
+P: Ferenc Bakonyi
+M: fero@drama.obuda.kando.hu
+L: linux-nvidia@lists.surfsouth.com
+W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml
+S: Maintained
+
HIGH-SPEED SCC DRIVER FOR AX.25
P: Klaus Kudielka
M: klaus.kudielka@ieee.org
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
W: http://www.nt.tuwien.ac.at/~kkudielk/Linux/
S: Maintained
@@ -486,7 +507,13 @@
i386 BOOT CODE
P: Riley H. Williams
M: rhw@memalpha.cx
-L: Linux-Kernel@vger.rutgers.edu
+L: Linux-Kernel@vger.kernel.org
+S: Maintained
+
+i810 TCO TIMER WATCHDOG
+P: Nils Faerber
+M: nils@kernelconcepts.de
+W: http://www.kernelconcepts.de/
S: Maintained
IBM MCA SCSI SUBSYSTEM DRIVER
@@ -506,7 +533,7 @@
M: andre@linux-ide.org
M: ahedrick@atipa.com
M: andre@suse.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.kernel.org/pub/linux/kernel/people/hedrick/
W: http://www.linux-ide.org/
S: Supported
@@ -514,14 +541,14 @@
IDE/ATAPI CDROM DRIVER
P: Jens Axboe
M: axboe@image.dk
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.kernel.dk
S: Maintained
IDE/ATAPI TAPE/FLOPPY DRIVERS
P: Gadi Oxman
M: Gadi Oxman
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
IEEE 1394 SUBSYSTEM
@@ -571,7 +598,7 @@
IPX/SPX NETWORK LAYER
P: Jay Schulist
M: jschlst@turbolinux.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
IRDA SUBSYSTEM
@@ -643,7 +670,7 @@
LAPB module
P: Henner Eisen
M: eis@baty.hanse.de
-L: linux-x25@vger.rutgers.edu
+L: linux-x25@vger.kernel.org
S: Maintained
LINUX FOR POWERPC
@@ -704,25 +731,25 @@
M: David Weinehall
W: http://www.acc.umu.se/~tao/
W: http://www.acc.umu.se/~mcalinux/
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
MODULE SUPPORT [GENERAL], KMOD
P: Keith Owens
M: kaos@ocs.com.au
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
MOUSE AND MISC DEVICES [GENERAL]
P: Alessandro Rubini
M: rubini@ipvvis.unipv.it
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
MTRR AND SIMILAR SUPPORT [i386]
P: Richard Gooch
M: rgooch@atnf.csiro.au
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html
S: Maintained
@@ -753,7 +780,7 @@
NETROM NETWORK LAYER
P: Tomi Manninen
M: Tomi.Manninen@hut.fi
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
S: Maintained
NETWORK BLOCK DEVICE
@@ -764,7 +791,7 @@
NETWORKING [GENERAL]
P: Networking Team
M: netdev@oss.sgi.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
W: http://www.uk.linux.org/NetNews.html (2.0 only)
S: Maintained
@@ -781,26 +808,26 @@
NFS CLIENT
P: Trond Myklebust
M: trond.myklebust@fys.uio.no
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
NI5010 NETWORK DRIVER
P: Jan-Pascal van Best and Andreas Mohr
M: Jan-Pascal van Best
M: Andreas Mohr <100.30936@germany.net>
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
NON-IDE/NON-SCSI CDROM DRIVERS [GENERAL] (come on, crew - mark your responsibility)
P: Eberhard Moenkeberg
M: emoenke@gwdg.de
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
NTFS FILESYSTEM
P: Anton Altaparmakov
M: aia21@cus.cam.ac.uk
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Odd Fixes
NVIDIA (RIVA) FRAMEBUFFER DRIVER
@@ -814,7 +841,7 @@
M: p2@ace.ulyssis.sutdent.kuleuven.ac.be
P: Mike Phillips
M: phillim@amtrak.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
L: linux-tr@emissary.aus-etc.com
W: http://www.linuxtr.net
S: Maintained
@@ -822,7 +849,7 @@
OPL3-SA2, SA3, and SAx DRIVER
P: Scott Murray
M: scott@spiteful.org
-L: linux-sound@vger.rutgers.edu
+L: linux-sound@vger.kernel.org
S: Maintained
PARALLEL PORT SUPPORT
@@ -853,27 +880,27 @@
PCI SOUND DRIVERS (ES1370, ES1371 and SONICVIBES)
P: Thomas Sailer
M: sailer@ife.ee.ethz.ch
-L: linux-sound@vger.rutgers.edu
+L: linux-sound@vger.kernel.org
W: http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html
S: Maintained
PCI SUBSYSTEM
P: Martin Mares
M: mj@suse.cz
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Supported
PCMCIA SUBSYSTEM
P: David Hinds
M: dhinds@zen.stanford.edu
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://pcmcia.sourceforge.org
S: Maintained
PCNET32 NETWORK DRIVER
P: Thomas Bogendörfer
M: tsbogend@alpha.franken.de
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
PNP SUPPORT
@@ -887,7 +914,7 @@
PPP PROTOCOL DRIVERS AND COMPRESSORS
P: Paul Mackerras
M: paulus@linuxcare.com
-L: linux-ppp@vger.rutgers.edu
+L: linux-ppp@vger.kernel.org
S: Maintained
PPP OVER ETHERNET
@@ -904,7 +931,7 @@
QNX4 FILESYSTEM
P: Anders Larsen
M: al@alarsen.net
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.alarsen.net/linux/qnx4fs/
S: Maintained
@@ -917,25 +944,25 @@
RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
P: Corey Thomas
M: corey@world.std.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
REAL TIME CLOCK DRIVER
P: Paul Gortmaker
M: p_gortmaker@yahoo.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
ROSE NETWORK LAYER
P: Jean-Paul Roubelat
M: jpr@f6fbb.org
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
S: Maintained
RISCOM8 DRIVER
P: Dmitry Gorodchanin
M: pgmdsg@ibi.com
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
RTLINUX REALTIME LINUX
@@ -954,31 +981,31 @@
SBPCD CDROM DRIVER
P: Eberhard Moenkeberg
M: emoenke@gwdg.de
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Maintained
SCSI CDROM DRIVER
P: Jens Axboe
M: axboe@image.dk
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
W: http://www.kernel.dk
S: Maintained
SCSI SG DRIVER
P: Doug Gilbert
M: dgilbert@interlog.com
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
W: http://www.torque.net/sg
S: Maintained
SCSI SUBSYSTEM
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Unmaintained
SCSI TAPE DRIVER
P: Kai Mdkisara
M: Kai.Makisara@metla.fi
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
SGI VISUAL WORKSTATION 320 AND 540
@@ -991,7 +1018,7 @@
SIS 900/7016 FAST ETHERNET DRIVER
P: Ollie Lho
M: ollie@sis.com.tw
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Supported
SMB FILESYSTEM
@@ -1004,7 +1031,7 @@
SMP: (except SPARC)
P: Linus Torvalds
M: torvalds@transmeta.com
-L: linux-smp@vger.rutgers.edu
+L: linux-smp@vger.kernel.org
S: Maintained
SOFTWARE RAID (Multiple Disks) SUPPORT
@@ -1015,7 +1042,7 @@
SONIC NETWORK DRIVER
P: Thomas Bogendoerfer
M: tsbogend@alpha.franken.de
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Maintained
SOUND
@@ -1032,8 +1059,8 @@
M: jj@sunsite.ms.mff.cuni.cz
P: Anton Blanchard
M: anton@linuxcare.com
-L: sparclinux@vger.rutgers.edu
-L: ultralinux@vger.rutgers.edu
+L: sparclinux@vger.kernel.org
+L: ultralinux@vger.kernel.org
W: http://ultra.linux.cz
W: http://www.geog.ubc.ca/s_linux.html
S: Maintained
@@ -1042,13 +1069,13 @@
P: Roger Wolff
M: R.E.Wolff@BitWizard.nl
M: io8-linux@specialix.co.uk
-L: linux-kernel@vger.rutgers.edu ?
+L: linux-kernel@vger.kernel.org ?
S: Supported
SPX NETWORK LAYER
P: Jay Schulist
M: jschlst@turbolinux.com
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
S: Supported
SNA NETWORK LAYER
@@ -1093,21 +1120,21 @@
M: torben.mathiasen@compaq.com
M: tmm@image.dk
L: tlan@vuser.vu.union.edu
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
W: http://tlan.kernel.dk
S: Maintained
TOKEN-RING NETWORK DRIVER
P: Paul Norton
M: pnorton@ieee.org
-L: linux-net@vger.rutgers.edu
+L: linux-net@vger.kernel.org
L: linux-tr@linuxtr.net
S: Maintained
TRIDENT 4DWAVE/SIS 7018 PCI AUDIO CORE
P: Ollie Lho
M: ollie@sis.com.tw
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
S: Supported
TMS380 TOKEN-RING NETWORK DRIVER
@@ -1126,7 +1153,7 @@
U14-34F SCSI DRIVER
P: Dario Ballabio
M: dario@milano.europe.dg.com
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
UDF FILESYSTEM
@@ -1141,14 +1168,14 @@
UMSDOS FILESYSTEM
P: Matija Nalis
M: Matija Nalis
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://linux.voyager.hr/umsdos/
S: Maintained
UNIFORM CDROM DRIVER
P: Jens Axboe
M: axboe@image.dk
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://www.kernel.dk
S: Maintained
@@ -1207,7 +1234,7 @@
USB PEGASUS DRIVER
P: Petko Manolov
-M: petkan@spct.net
+M: petkan@dce.bg
L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
@@ -1262,7 +1289,7 @@
VFAT FILESYSTEM:
P: Gordon Chaffee
M: chaffee@cs.berkeley.edu
-L: linux-kernel@vger.rutgers.edu
+L: linux-kernel@vger.kernel.org
W: http://bmrc.berkeley.edu/people/chaffee
S: Maintained
@@ -1301,13 +1328,13 @@
WD7000 SCSI DRIVER
P: Miroslav Zagorac
M: zaga@fly.cc.fer.hr
-L: linux-scsi@vger.rutgers.edu
+L: linux-scsi@vger.kernel.org
S: Maintained
X.25 NETWORK LAYER
P: Henner Eisen
M: eis@baty.hanse.de
-L: linux-x25@vger.rutgers.edu
+L: linux-x25@vger.kernel.org
S: Maintained
Z85230 SYNCHRONOUS DRIVER
@@ -1321,7 +1348,7 @@
M: jreuter@poboxes.com
W: http://poboxes.com/jreuter/
W: http://qsl.net/dl1bke/
-L: linux-hams@vger.rutgers.edu
+L: linux-hams@vger.kernel.org
S: Maintained
ZR36120 VIDEO FOR LINUX DRIVER
diff -u --recursive --new-file v2.4.0-test6/linux/Makefile linux/Makefile
--- v2.4.0-test6/linux/Makefile Wed Aug 9 19:19:49 2000
+++ linux/Makefile Tue Aug 22 11:41:14 2000
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 0
-EXTRAVERSION = -test6
+EXTRAVERSION = -test7
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -123,6 +123,7 @@
drivers/char/char.o \
drivers/misc/misc.o \
drivers/net/net.o \
+ drivers/media/media.o \
drivers/parport/parport.a
LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc lib
@@ -136,10 +137,10 @@
DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o
DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a
-DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.a
+DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
DRIVERS-$(CONFIG_APPLETALK) += drivers/net/appletalk/appletalk.a
DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.a
-DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.a
+DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnet.a
DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
@@ -169,8 +170,9 @@
DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
+DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
DRIVERS-$(CONFIG_I2O) += drivers/i2o/i2o.o
-DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda_drivers.a
+DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.a
DRIVERS-$(CONFIG_ACPI_INTERPRETER) += drivers/acpi/acpi.o
@@ -428,6 +430,9 @@
scripts/mkdep init/*.c > .depend
scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
+ifdef CONFIG_MODVERSIONS
+ $(MAKE) update-modverfile
+endif
ifdef CONFIG_MODVERSIONS
MODVERFILE := $(TOPDIR)/include/linux/modversions.h
@@ -436,7 +441,7 @@
endif
export MODVERFILE
-depend dep: dep-files $(MODVERFILE)
+depend dep: dep-files
# make checkconfig: Prune 'scripts' directory to avoid "false positives".
checkconfig:
diff -u --recursive --new-file v2.4.0-test6/linux/README linux/README
--- v2.4.0-test6/linux/README Thu Jul 27 17:37:59 2000
+++ linux/README Mon Aug 21 08:57:35 2000
@@ -14,7 +14,7 @@
contained in 2.4.xx when the code base has stabilized again.
If you decide to use 2.3, it is recommended that you join the kernel mailing
-list. To do this, e-mail majordomo@vger.rutgers.edu, and put in the body
+list. To do this, e-mail majordomo@vger.kernel.org, and put in the body
of the message "subscribe linux-kernel" or "subscribe linux-kernel-digest"
for a daily digest of the mailing list (it is a high-traffic list.)
diff -u --recursive --new-file v2.4.0-test6/linux/REPORTING-BUGS linux/REPORTING-BUGS
--- v2.4.0-test6/linux/REPORTING-BUGS Wed Apr 26 16:34:06 2000
+++ linux/REPORTING-BUGS Mon Aug 21 08:57:35 2000
@@ -17,7 +17,7 @@
The list of maintainers is in the MAINTAINERS file in this directory.
If you are totally stumped as to whom to send the report, send it to
-linux-kernel@vger.rutgers.edu. (For more information on the linux-kernel
+linux-kernel@vger.kernel.org. (For more information on the linux-kernel
mailing list see http://www.tux.org/lkml/).
This is a suggested format for a bug report sent to the Linux kernel mailing
diff -u --recursive --new-file v2.4.0-test6/linux/Rules.make linux/Rules.make
--- v2.4.0-test6/linux/Rules.make Wed Aug 9 19:19:49 2000
+++ linux/Rules.make Sun Aug 13 09:55:51 2000
@@ -10,7 +10,7 @@
#
# Special variables which should not be exported
#
-unexport EXTRA_ASFLAGS
+unexport EXTRA_AFLAGS
unexport EXTRA_CFLAGS
unexport EXTRA_LDFLAGS
unexport EXTRA_ARFLAGS
@@ -57,7 +57,21 @@
) > $(dir $@)/.$(notdir $@).flags
%.o: %.s
- $(AS) $(ASFLAGS) $(EXTRA_CFLAGS) -o $@ $<
+ $(AS) $(AFLAGS) $(EXTRA_CFLAGS) -o $@ $<
+
+# Old makefiles define their own rules for compiling .S files,
+# but these standard rules are available for any Makefile that
+# wants to use them. Our plan is to incrementally convert all
+# the Makefiles to these standard rules. -- rmk, mec
+ifdef USE_STANDARD_AS_RULE
+
+%.s: %.S
+ $(CPP) $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$@) $< > $@
+
+%.o: %.S
+ $(CC) $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$@) -c -o $@ $<
+
+endif
#
#
@@ -208,8 +222,16 @@
$(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver)): $(TOPDIR)/include/linux/autoconf.h
-$(TOPDIR)/include/linux/modversions.h: $(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver))
- @echo updating $(TOPDIR)/include/linux/modversions.h
+# updates .ver files but not modversions.h
+fastdep: $(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver))
+
+# updates .ver files and modversions.h like before (is this needed?)
+dep: fastdep update-modverfile
+
+endif # SYMTAB_OBJS
+
+# update modversions.h, but only if it would change
+update-modverfile:
@(echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_H"; \
echo "#include "; \
@@ -218,11 +240,14 @@
if [ -f $$f ]; then echo "#include "; fi; \
done; \
echo "#endif"; \
- ) > $@
-
-dep fastdep: $(TOPDIR)/include/linux/modversions.h
-
-endif # SYMTAB_OBJS
+ ) > $(TOPDIR)/include/linux/modversions.h.tmp
+ @if [ -r $(TOPDIR)/include/linux/modversions.h ] && cmp -s $(TOPDIR)/include/linux/modversions.h $(TOPDIR)/include/linux/modversions.h.tmp; then \
+ echo $(TOPDIR)/include/linux/modversions.h was not updated; \
+ rm -f $(TOPDIR)/include/linux/modversions.h.tmp; \
+ else \
+ echo $(TOPDIR)/include/linux/modversions.h was updated; \
+ mv -f $(TOPDIR)/include/linux/modversions.h.tmp $(TOPDIR)/include/linux/modversions.h; \
+ fi
$(M_OBJS): $(TOPDIR)/include/linux/modversions.h
ifdef MAKING_MODULES
diff -u --recursive --new-file v2.4.0-test6/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v2.4.0-test6/linux/arch/alpha/config.in Thu Jul 27 17:37:59 2000
+++ linux/arch/alpha/config.in Tue Aug 22 11:41:14 2000
@@ -302,9 +302,10 @@
source drivers/char/Config.in
-
#source drivers/misc/Config.in
+source drivers/media/Config.in
+
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
@@ -334,6 +335,7 @@
endmenu
source drivers/usb/Config.in
+source drivers/input/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
diff -u --recursive --new-file v2.4.0-test6/linux/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- v2.4.0-test6/linux/arch/alpha/kernel/entry.S Wed Aug 9 19:19:49 2000
+++ linux/arch/alpha/kernel/entry.S Fri Aug 11 14:29:04 2000
@@ -1160,3 +1160,4 @@
.quad sys_pivot_root
.quad sys_mincore /* 375 */
.quad sys_pciconfig_iobase
+ .quad sys_getdents64
diff -u --recursive --new-file v2.4.0-test6/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
--- v2.4.0-test6/linux/arch/alpha/kernel/osf_sys.c Thu Jul 27 17:37:59 2000
+++ linux/arch/alpha/kernel/osf_sys.c Fri Aug 11 14:29:04 2000
@@ -104,7 +104,8 @@
int error;
};
-static int osf_filldir(void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
+static int osf_filldir(void *__buf, const char *name, int namlen, off_t offset,
+ ino_t ino, unsigned int d_type)
{
struct osf_dirent *dirent;
struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
--- v2.4.0-test6/linux/arch/alpha/kernel/time.c Fri Jul 14 12:12:04 2000
+++ linux/arch/alpha/kernel/time.c Mon Aug 21 07:52:34 2000
@@ -1,7 +1,7 @@
/*
* linux/arch/alpha/kernel/time.c
*
- * Copyright (C) 1991, 1992, 1995, 1999 Linus Torvalds
+ * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds
*
* This file contains the PC-specific time handling details:
* reading the RTC at bootup, etc..
@@ -21,6 +21,9 @@
* 1999-04-16 Thorsten Kranzkowski (dl8bcu@gmx.net)
* fixed algorithm in do_gettimeofday() for calculating the precise time
* from processor cycle counter (now taking lost_ticks into account)
+ * 2000-08-13 Jan-Benedict Glaw
+ * Fixed time_init to be aware of epoches != 1900. This prevents
+ * booting up in 2048 for me;) Code is stolen from rtc.c.
*/
#include
#include
@@ -200,7 +203,7 @@
void
time_init(void)
{
- unsigned int year, mon, day, hour, min, sec, cc1, cc2;
+ unsigned int year, mon, day, hour, min, sec, cc1, cc2, epoch;
unsigned long cycle_freq, one_percent;
long diff;
@@ -263,16 +266,24 @@
BCD_TO_BIN(mon);
BCD_TO_BIN(year);
}
-#ifdef ALPHA_PRE_V1_2_SRM_CONSOLE
- /*
- * The meaning of life, the universe, and everything. Plus
- * this makes the year come out right on SRM consoles earlier
- * than v1.2.
- */
- year -= 42;
-#endif
- if ((year += 1900) < 1970)
+
+ /* PC-like is standard; used for year <= 20 || year >= 100 */
+ epoch = 1900;
+ if (year > 20 && year < 48)
+ /* ARC console, used on some not so old boards */
+ epoch = 1980;
+ else if (year >= 48 && year < 70)
+ /* Digital UNIX, used on older boards (eg. AXPpxi33) */
+ epoch = 1952;
+ else if (year >= 70 && year < 100)
+ /* Digital DECstations, very old... */
+ epoch = 1928;
+
+ printk(KERN_INFO "Using epoch = %d\n", epoch);
+
+ if ((year += epoch) < 1970)
year += 100;
+
xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
xtime.tv_usec = 0;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/Makefile linux/arch/arm/Makefile
--- v2.4.0-test6/linux/arch/arm/Makefile Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/Makefile Sun Aug 13 09:54:15 2000
@@ -48,7 +48,7 @@
#
ifeq ($(NEW_GCC),y)
CFLAGS += -mshort-load-bytes
-CFLAGS_PROC_CPU_26 := -mcpu=arm3 -Os
+CFLAGS_PROC_CPU_26 := -mcpu=arm3 -mapcs-26 -Os
CFLAGS_PROC_CPU_32v3 := -march=armv3
CFLAGS_PROC_CPU_32v4 := -march=armv4
CFLAGS_ARM6 := -mtune=arm6
@@ -166,10 +166,9 @@
HEAD := arch/arm/kernel/head-$(PROCESSOR).o \
arch/arm/kernel/init_task.o
SUBDIRS += arch/arm/kernel arch/arm/mm arch/arm/lib \
- arch/arm/special arch/arm/nwfpe
+ arch/arm/nwfpe
CORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)
LIBS := arch/arm/lib/lib.o arch/arm/lib/lib.a $(LIBS) $(LIBGCC)
-DRIVERS += arch/arm/special/special.a
ifeq ($(CONFIG_NWFPE),y)
LIBS := arch/arm/nwfpe/math-emu.o $(LIBS)
@@ -193,7 +192,14 @@
# The following is a hack to get 'constants.h' up
# to date before starting compilation
-$(patsubst %, _dir_%, $(SUBDIRS)) : constants
+$(patsubst %, _dir_%, $(SUBDIRS)) init/main.o init/version.o : \
+ constants \
+ include/asm-arm/mach-types.h
+
+include/asm-arm/mach-types.h: \
+ arch/arm/tools/mach-types \
+ arch/arm/tools/gen-mach-types
+ @awk -f arch/arm/tools/gen-mach-types arch/arm/tools/mach-types > $@
constants: $(TOPDIR)/include/asm-arm/proc-fns.h dummy
@$(MAKE) -C arch/arm/lib constants.h
@@ -218,16 +224,16 @@
arch/arm/lib: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/arm/lib
-zImage zinstall Image install: vmlinux
+bzImage zImage zinstall Image bootpImage install: vmlinux
@$(MAKEBOOT) $@
archmrproper:
- @$(MAKE) -C arch/$(ARCH)/special mrproper
$(RM) include/asm-arm/arch include/asm-arm/proc
archclean:
@$(MAKEBOOT) clean
$(RM) arch/arm/lib/constants.h arch/arm/vmlinux.lds
+ $(RM) include/asm-arm/mach-types.h
archdep: symlinks
@$(MAKEBOOT) dep
@@ -241,46 +247,25 @@
#
# Configuration targets. Use these to select a
# configuration for your architecture
-#
-a5k_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/a5k arch/arm/defconfig
-
-ebsa110_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/ebsa110 arch/arm/defconfig
-
-footbridge_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/footbridge arch/arm/defconfig
-
-rpc_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/rpc arch/arm/defconfig
-
-brutus_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/brutus arch/arm/defconfig
-
-victor_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/victor arch/arm/defconfig
-
-empeg_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/empeg arch/arm/defconfig
-
-thinclient_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/thinclient arch/arm/defconfig
-
-assabet_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/assabet arch/arm/defconfig
-
-lart_config:
- $(RM) arch/arm/defconfig
- cp arch/arm/def-configs/lart arch/arm/defconfig
+CFGS= a5k_config ebsa110_config \
+ footbridge_config rpc_config \
+ brutus_config victor_config \
+ empeg_config thinclient_config \
+ assabet_config lart_config \
+ cerf_config
+
+$(CFGS):
+ @( \
+ CFG=$(@:_config=); \
+ if [ -f arch/arm/def-configs/$$CFG ]; then \
+ $(RM) arch/arm/defconfig; \
+ cp arch/arm/def-configs/$$CFG arch/arm/defconfig; \
+ echo "*** Default configuration for $$CFG installed"; \
+ echo "*** Next, you may run 'make oldconfig'"; \
+ else \
+ echo "$$CFG does not exist"; \
+ fi; \
+ )
l7200_config:
$(RM) arch/arm/defconfig
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/Makefile linux/arch/arm/boot/Makefile
--- v2.4.0-test6/linux/arch/arm/boot/Makefile Sun Apr 12 11:42:15 1998
+++ linux/arch/arm/boot/Makefile Sun Aug 13 09:54:15 2000
@@ -5,20 +5,105 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
-# Copyright (C) 1995, 1996 Russell King
+# Copyright (C) 1995-2000 Russell King
#
SYSTEM =$(TOPDIR)/vmlinux
+ifeq ($(CONFIG_CPU_26),y)
+ZTEXTADDR = 0x02080000
+PARAMS_PHYS = 0x0207c000
+INITRD_PHYS = 0x02180000
+INITRD_VIRT = 0x02180000
+endif
+
+ifeq ($(CONFIG_ARCH_RPC),y)
+ZTEXTADDR = 0x10008000
+PARAMS_PHYS = 0x10000100
+INITRD_PHYS = 0x18000000
+INITRD_VIRT = 0xc8000000
+endif
+
+ifeq ($(CONFIG_ARCH_CLPS7500),y)
+ZTEXTADDR = 0x10008000
+endif
+
+ifeq ($(CONFIG_ARCH_EBSA110),y)
+ZTEXTADDR = 0x00008000
+PARAMS_PHYS = 0x00000400
+INITRD_PHYS = 0x00800000
+INITRD_VIRT = 0xc0800000
+endif
+
+ifeq ($(CONFIG_FOOTBRIDGE),y)
+ZTEXTADDR = 0x00008000
+PARAMS = 0x00000100
+INITRD_PHYS = 0x00800000
+INITRD_VIRT = 0xc0800000
+endif
+
+ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
+ZTEXTADDR = 0x40200000
+ZRELADDR = 0x40008000
+endif
+
+ifeq ($(CONFIG_ARCH_L7200),y)
+# RAM based kernel
+#ZTEXTADDR = 0xf0400000
+#ZRELADDR = 0xf0008000
+
+# FLASH based kernel
+ZTEXTADDR = 0x00010000
+ZRELADDR = 0xf0008000
+ZBSSADDR = 0xf03e0000
+endif
+
+ifeq ($(CONFIG_ARCH_SA1100),y)
+ZTEXTADDR = 0xc0008000
+ZRELADDR = 0xc0008000
+ifeq ($(CONFIG_SA1100_VICTOR),y)
+ ZTEXTADDR = 0x00002000
+ ZBSSADDR = 0xc0100000
+endif
+ifeq ($(CONFIG_SA1100_THINCLIENT),y)
+ ZTEXTADDR = 0xC0200000
+endif
+ifeq ($(CONFIG_SA1100_GRAPHICSCLIENT),y)
+ ZTEXTADDR = 0xC0200000
+endif
+endif
+
+#
+# If you don't define ZRELADDR above,
+# then it defaults to ZTEXTADDR
+#
+ifeq ($(ZRELADDR),)
+ZRELADDR = $(ZTEXTADDR)
+endif
+
+export SYSTEM ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS INITRD_VIRT PARAMS_PHYS
+
Image: $(CONFIGURE) $(SYSTEM)
$(OBJCOPY) $(SYSTEM) $@
+bzImage: zImage
+
zImage: $(CONFIGURE) compressed/vmlinux
$(OBJCOPY) compressed/vmlinux $@
+bootpImage: bootp/bootp
+ $(OBJCOPY) bootp/bootp $@
+
compressed/vmlinux: $(TOPDIR)/vmlinux dep
@$(MAKE) -C compressed vmlinux
+bootp/bootp: zImage initrd
+ @$(MAKE) -C bootp bootp
+
+initrd:
+ @test "$(INITRD_VIRT)" != "" || (echo This architecture does not support INITRD; exit -1)
+ @test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1)
+
install: $(CONFIGURE) Image
sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
@@ -26,7 +111,8 @@
sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
clean:
- rm -f Image zImage
+ $(RM) Image zImage bootpImage
@$(MAKE) -C compressed clean
+ @$(MAKE) -C bootp clean
dep:
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/bootp/Makefile linux/arch/arm/boot/bootp/Makefile
--- v2.4.0-test6/linux/arch/arm/boot/bootp/Makefile Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/boot/bootp/Makefile Sun Aug 13 09:54:15 2000
@@ -0,0 +1,26 @@
+#
+# linux/arch/arm/boot/bootp/Makefile
+#
+
+ZSYSTEM =$(TOPDIR)/arch/arm/boot/zImage
+INITRD =$(ZSYSTEM)
+ZLDFLAGS =-p -X -T bootp.lds \
+ --defsym initrd_addr=$(INITRD_PHYS) \
+ --defsym initrd_virt=$(INITRD_VIRT) \
+ --defsym params=$(PARAMS_PHYS)
+
+all: bootp
+
+# Note that bootp.lds picks up kernel.o and initrd.o
+bootp: init.o kernel.o initrd.o bootp.lds
+ $(LD) $(ZLDFLAGS) -o $@ init.o
+
+kernel.o: $(ZSYSTEM)
+ $(LD) -r -s -o $@ -b binary $(ZSYSTEM)
+
+initrd.o: $(INITRD)
+ $(LD) -r -s -o $@ -b binary $(INITRD)
+
+.PHONY: $(INITRD) $(ZSYSTEM)
+
+clean:; $(RM) bootp bootp.lds
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/bootp/init.S linux/arch/arm/boot/bootp/init.S
--- v2.4.0-test6/linux/arch/arm/boot/bootp/init.S Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/boot/bootp/init.S Sun Aug 13 09:54:15 2000
@@ -0,0 +1,57 @@
+/*
+ * Header file for splitting kernel + initrd. Note that we pass
+ * r0 through to r3 straight through.
+ */
+ .section .start,#alloc,#execinstr
+ .type _entry, #function
+_entry:
+kernel_addr: adr r10, initdata
+ ldmia r10, {r11, r12}
+ sub r11, r10, r11 @ work out exec offset
+ add r12, r12, r11 @ correct "splitify"
+ mov pc, r12 @ jump to splitify
+ .size _entry,. - _entry
+
+ .type initdata, #object
+initdata: .word initdata @ compiled address of this
+ .word splitify
+ .size initdata,. - initdata
+
+ .text
+splitify: adr r13, data
+ ldmia r13!, {r4-r6} @ move the kernel
+ add r4, r4, r11 @ correction
+ mov r12, r5
+ bl move
+
+ ldmia r13!, {r4-r6} @ then the initrd
+ add r4, r4, r11 @ correction
+ bl move
+
+ ldmib r13, {r5,r6,r7} @ get size and addr of initrd
+ add r7, r7, #16*4 @ offset of initrd_start in param_struct
+ stmia r7, {r5,r6} @ save in param_struct
+ mov pc, r12 @ call kernel
+
+move: ldmia r4!, {r7 - r10} @ move 32-bytes at a time
+ stmia r5!, {r7 - r10}
+ ldmia r4!, {r7 - r10}
+ stmia r5!, {r7 - r10}
+ subs r6, r6, #8 * 4
+ bcs move
+ mov pc, lr
+
+data: .word kernel_start
+ .word kernel_addr
+ .word kernel_len
+
+ .word initrd_start
+ .word initrd_addr
+ .word initrd_len
+
+ .word initrd_virt
+ .word initrd_len
+ .word params
+
+ .type kernel_start,#object
+ .type initrd_start,#object
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/Makefile linux/arch/arm/boot/compressed/Makefile
--- v2.4.0-test6/linux/arch/arm/boot/compressed/Makefile Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/boot/compressed/Makefile Sun Aug 13 09:54:15 2000
@@ -2,10 +2,13 @@
# linux/arch/arm/boot/compressed/Makefile
#
# create a compressed vmlinuz image from the original vmlinux
+#
+# Note! SYSTEM, ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported
+# from arch/arm/boot/Makefile
+#
HEAD = head.o
OBJS = misc.o
-SYSTEM = $(TOPDIR)/vmlinux
CFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS $(CFLAGS_PROC)
FONTC = $(TOPDIR)/drivers/video/font_acorn_8x8.c
ZLDFLAGS = -p -X -T vmlinux.lds
@@ -17,60 +20,25 @@
OBJS += ll_char_wr.o font.o
endif
-ifeq ($(CONFIG_CPU_26),y)
-ZTEXTADDR = 0x02080000
-endif
-
-ifeq ($(CONFIG_ARCH_RPC),y)
-ZTEXTADDR = 0x10008000
-endif
-
-ifeq ($(CONFIG_ARCH_CLPS7500),y)
-ZTEXTADDR = 0x10008000
-endif
-
-ifeq ($(CONFIG_ARCH_EBSA110),y)
-ZTEXTADDR = 0x00008000
-endif
-
-ifeq ($(CONFIG_FOOTBRIDGE),y)
-ZTEXTADDR = 0x00008000
-endif
-
ifeq ($(CONFIG_ARCH_NETWINDER),y)
OBJS += head-netwinder.o
endif
ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
HEAD = head-nexuspci.o
-ZTEXTADDR = 0x40200000
-ZRELADDR = 0x40008000
+endif
+
+ifeq ($(CONFIG_ARCH_L7200),y)
+OBJS += head-l7200.o
endif
ifeq ($(CONFIG_ARCH_SA1100),y)
OBJS += head-sa1100.o setup-sa1100.o
-ZTEXTADDR = 0xc0008000
-ZRELADDR = 0xc0008000
-ifeq ($(CONFIG_SA1100_VICTOR),y)
- ZTEXTADDR = 0x00002000
- ZBSSADDR = 0xc0100000
-endif
-ifeq ($(CONFIG_SA1100_THINCLIENT),y)
- ZTEXTADDR = 0xC0200000
-endif
-ifeq ($(CONFIG_SA1100_GRAPHICSCLIENT),y)
- ZTEXTADDR = 0xC0200000
+ifeq ($(CONFIG_SA1100_NANOENGINE),y)
+ OBJS += hw-bse.o
endif
endif
-#
-# If you don't define ZRELADDR above,
-# then it defaults to ZTEXTADDR
-#
-ifeq ($(ZRELADDR),)
-ZRELADDR = $(ZTEXTADDR)
-endif
-
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;
ifneq ($(ZBSSADDR),)
@@ -104,3 +72,6 @@
.PHONY: vmlinux.lds clean
misc.o: misc.c $(TOPDIR)/include/asm/arch/uncompress.h $(TOPDIR)/lib/inflate.c
+
+%.o: %.S
+ $(CC) $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$@) -c -o $@ $<
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/head-l7200.S linux/arch/arm/boot/compressed/head-l7200.S
--- v2.4.0-test6/linux/arch/arm/boot/compressed/head-l7200.S Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/boot/compressed/head-l7200.S Sun Aug 13 09:54:15 2000
@@ -0,0 +1,30 @@
+/*
+ * linux/arch/arm/boot/compressed/head-l7200.S
+ *
+ * Copyright (C) 2000 Steve Hill
+ *
+ * Some code borrowed from Nicola Pitre's 'head-sa1100.S' file. This
+ * is merged with head.S by the linker.
+ */
+
+#include
+
+#ifndef CONFIG_ARCH_L7200
+#error What am I doing here...
+#endif
+
+ .section ".start", #alloc, #execinstr
+
+__L7200_start:
+
+ mov r0, #0x00100000 @ FLASH address of initrd
+ mov r2, #0xf1000000 @ RAM address of initrd
+ add r1, r2, #0x00700000 @ Size of initrd
+1:
+ ldmia r0!, {r3, r4, r5, r6}
+ stmia r2!, {r3, r4, r5, r6}
+ cmp r2, r1
+ ble 1b
+
+ mov r8, #0 @ Zero it out
+ mov r7, #19 @ Set architecture ID
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/head-netwinder.S linux/arch/arm/boot/compressed/head-netwinder.S
--- v2.4.0-test6/linux/arch/arm/boot/compressed/head-netwinder.S Tue Nov 23 22:42:20 1999
+++ linux/arch/arm/boot/compressed/head-netwinder.S Sun Aug 13 09:54:15 2000
@@ -1,15 +1,24 @@
+#define K(a,b,c) ((a) << 24 | (b) << 12 | (c))
+
.section ".start", #alloc, #execinstr
+ /*
+ * check to see if we are running from the correct address.
+ * If not, we move ourselves in a two stage process. Firstly,
+ * we copy the start of the kernel (which includes this code)
+ * to 0x8000, and then jump to this code to continue with the
+ * rest (since this code will get overwritten).
+ */
adr r2, 1f
- ldmdb r2, {r7, r8}
+ ldmdb r2, {r9, r10}
and r3, r2, #0xc000
- teq r3, #0x8000
- beq 2f
+ teq r3, #0x8000 @ correctly located?
+ beq 2f @ skip this code
bic r3, r2, #0xc000
orr r3, r3, #0x8000
- mov r0, r3
- mov r4, #64
- sub r5, r8, r7
+ mov r0, r3 @ new address if '1'
+ mov r4, #64 @ number of bytes to copy
+ sub r5, r10, r9 @ total number of bytes to copy
b 1f
.word _start
@@ -17,15 +26,16 @@
1:
.rept 4
- ldmia r2!, {r6, r7, r8, r9}
- stmia r3!, {r6, r7, r8, r9}
+ ldmia r2!, {r6, r9, r10, r11}
+ stmia r3!, {r6, r9, r10, r11}
.endr
subs r4, r4, #64
bcs 1b
- movs r4, r5
- mov r5, #0
- mov r1, #5 @ only here to fix NeTTroms which dont set r1
- movne pc, r0
-
- mov r0, #0
+ movs r4, r5 @ remaining length
+ mov r5, #0 @ no more to copy
+ movne pc, r0 @ jump back to 1 (in the newly copied
+ @ code)
+ mov r7, #5 @ only here to fix NeTTroms which dont
+ mov r8, #2 << 24 @ scheduled for removal in 2.5.xx
+ orr r8, r8, #5 << 12
2:
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/head-sa1100.S linux/arch/arm/boot/compressed/head-sa1100.S
--- v2.4.0-test6/linux/arch/arm/boot/compressed/head-sa1100.S Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/boot/compressed/head-sa1100.S Sun Aug 13 09:54:15 2000
@@ -9,6 +9,7 @@
#include
#include
+#include
#ifndef CONFIG_ARCH_SA1100
#error What am I doing here...
@@ -18,27 +19,10 @@
__SA1100_start:
- @ Preserve r0/r1 i.e. kernel entry values
- mov r8, r0
- mov r9, r1
-
-#if defined( CONFIG_SA1100_ASSABET ) || \
- defined( CONFIG_SA1100_BRUTUS ) || \
- defined( CONFIG_SA1100_THINCLIENT )
-@ Booting from Angel -- need to enter SVC mode
-#define angel_SWIreason_EnterSVC 0x17 /* from arm.h, in angel source */
-#define angel_SWI_ARM (0x123456)
- mov r0, #angel_SWIreason_EnterSVC
- swi #angel_SWI_ARM
-
- @ turn off interrupts to prevent the angel from running
- mrs r0, cpsr
- orr r0, r0, #0xc0
- msr cpsr_c, r0
-#endif
+ @ Preserve r8/r7 i.e. kernel entry values
#ifdef CONFIG_SA1100_VICTOR
- teq r9, #26 @ MACH_TYPE_VICTOR
+ teq r7, #MACH_TYPE_VICTOR
bne 10f
@ Copy cmdline to 0xc0000000
@@ -74,10 +58,6 @@
* Pause for a short time so that we give enough time
* for the host to start a terminal up.
*/
- mov r0, #0x02000000
+ mov r0, #0x00200000
1: subs r0, r0, #1
bne 1b
-
- @ Restore initial r0/r1
- mov r0, r8
- mov r1, r9
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/head.S linux/arch/arm/boot/compressed/head.S
--- v2.4.0-test6/linux/arch/arm/boot/compressed/head.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/boot/compressed/head.S Sun Aug 13 09:54:15 2000
@@ -3,9 +3,9 @@
*
* Copyright (C) 1996-1999 Russell King
*/
+#include
#include
-
/*
* Debugging stuff
*/
@@ -84,18 +84,31 @@
b 1f
.word 0x016f2818 @ Magic numbers to help the loader
.word start
-1:
+1: mov r7, r1 @ save architecture ID
+ mov r8, r0 @ save r0
+#ifdef CONFIG_ANGELBOOT
+ /*
+ * Booting from Angel - need to enter SVC mode and disable
+ * FIQs/IRQs (numeric definitions from angel arm.h source)
+ */
+ mov r0, #0x17 @ angel_SWIreason_EnterSVC
+ swi 0x123456 @ angel_SWI_ARM
+ mrs r0, cpsr @ turn off interrupts to
+ orr r0, r0, #0xc0 @ prevent angel from running
+ msr cpsr_c, r0
+
+ /*
+ * Note that some cache flushing and other stuff may
+ * be needed here - is there an Angel SWI call for this?
+ */
+#endif
/*
* some architecture specific code can be inserted
- * by the linker here, but it should preserve r0, r1
- * and r8.
+ * by the linker here, but it should preserve r7 and r8.
*/
.text
-1: teq r0, #0
- bne 1b
- mov r7, r1 @ save architecture ID
- mrc p15, 0, r6, c0, c0 @ get processor ID
+1: mrc p15, 0, r6, c0, c0 @ get processor ID
adr r2, LC0
ldmia r2, {r2, r3, r4, r5, sp}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/hw-bse.c linux/arch/arm/boot/compressed/hw-bse.c
--- v2.4.0-test6/linux/arch/arm/boot/compressed/hw-bse.c Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/boot/compressed/hw-bse.c Sun Aug 13 09:54:15 2000
@@ -0,0 +1,74 @@
+/*
+ * Bright Star Engineering Inc.
+ *
+ * code for readng parameters from the
+ * parameter blocks of the boot block
+ * flash memory
+ *
+ */
+
+static int strcmp(const char *s1, const char *s2)
+{
+ while (*s1 != '\0' && *s1 == *s2)
+ {
+ s1++;
+ s2++;
+ }
+
+ return (*(unsigned char *) s1) - (*(unsigned char *) s2);
+}
+
+struct pblk_t {
+ char type;
+ unsigned short size;
+};
+
+static char *bse_getflashparam(char *name) {
+ unsigned int esize;
+ char *q,*r;
+ unsigned char *p,*e;
+ struct pblk_t *thepb = (struct pblk_t *) 0x00004000;
+ struct pblk_t *altpb = (struct pblk_t *) 0x00006000;
+ if (thepb->type&1) {
+ if (altpb->type&1) {
+ /* no valid param block */
+ return (char*)0;
+ } else {
+ /* altpb is valid */
+ struct pblk_t *tmp;
+ tmp = thepb;
+ thepb = altpb;
+ altpb = tmp;
+ }
+ }
+ p = (char*)thepb + sizeof(struct pblk_t);
+ e = p + thepb->size;
+ while (p < e) {
+ q = p;
+ esize = *p;
+ if (esize == 0xFF) break;
+ if (esize == 0) break;
+ if (esize > 127) {
+ esize = (esize&0x7F)<<8 | p[1];
+ q++;
+ }
+ q++;
+ r=q;
+ if (*r && ((name == 0) || (!strcmp(name,r)))) {
+ while (*q++) ;
+ return q;
+ }
+ p+=esize;
+ }
+ return (char*)0;
+}
+
+void bse_setup(void) {
+ /* extract the linux cmdline from flash */
+ char *name=bse_getflashparam("linuxboot");
+ char *x = (char *)0xc0000100;
+ if (name) {
+ while (*name) *x++=*name++;
+ }
+ *x=0;
+}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/boot/compressed/setup-sa1100.S linux/arch/arm/boot/compressed/setup-sa1100.S
--- v2.4.0-test6/linux/arch/arm/boot/compressed/setup-sa1100.S Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/boot/compressed/setup-sa1100.S Sun Aug 13 09:54:15 2000
@@ -9,8 +9,9 @@
* Runtime test for Neponset added.
*/
-#define __ASSEMBLY__
#include
+#include
+#include
.text
@@ -44,6 +45,12 @@
#define GPIO_2_9 0x3fc
+/*
+ * void sa1100_setup( int arch_id );
+ *
+ * This is called from decompress_kernel() with the arch_decomp_setup() macro.
+ */
+
ENTRY(sa1100_setup)
mov r3, r0 @ keep machine type in r3
@@ -51,7 +58,7 @@
@ (taken from "Intel StrongARM SA-1110 Microprocessor Development Board
@ User's Guide," p.4-9)
- teq r3, #25 @ MACH_TYPE_ASSABET
+ teq r3, #MACH_TYPE_ASSABET
bne skip_SCR
ldr r0, GPIO_BASE
@@ -80,8 +87,8 @@
skip_SCR:
@ Initialize UART (if bootloader has not done it yet)...
- teq r3, #16 @ MACH_TYPE_BRUTUS
- teqne r3, #25 @ MACH_TYPE_ASSABET
+ teq r3, #MACH_TYPE_BRUTUS
+ teqne r3, #MACH_TYPE_ASSABET
bne skip_uart
@ UART3 if Assabet is used with Neponset
@@ -92,7 +99,7 @@
@ At least for Brutus, the UART1 is used through
@ the alternate GPIO function...
- teq r3, #16 @ MACH_TYPE_BRUTUS
+ teq r3, #MACH_TYPE_BRUTUS
bne uart1
alt_GPIO_uart: ldr r0, GPIO_BASE
@@ -126,5 +133,14 @@
mov r1, #0xff @ flush status reg
str r1, [r0, #UTSR0]
skip_uart:
+
+ @ Extra specific setup calls
+ @ The machine type is passed in r0
+ mov r0, r3
+#ifdef CONFIG_SA1100_NANOENGINE
+ teq r0, #32 @ MACH_TYPE_NANOENGINE
+ beq SYMBOL_NAME(bse_setup)
+#endif
+
out: mov pc, lr
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/config.in linux/arch/arm/config.in
--- v2.4.0-test6/linux/arch/arm/config.in Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/config.in Tue Aug 22 11:41:14 2000
@@ -29,6 +29,7 @@
choice 'ARM system type' \
"Archimedes/A5000 CONFIG_ARCH_ARCA5K \
+ Cirrus-CL-PS7500FE CONFIG_ARCH_CLPS7500 \
Co-EBSA285 CONFIG_ARCH_CO285 \
EBSA-110 CONFIG_ARCH_EBSA110 \
FootBridge CONFIG_ARCH_FOOTBRIDGE \
@@ -62,6 +63,7 @@
bool ' Include support for Neponset' CONFIG_ASSABET_NEPONSET
fi
bool ' Include support for Brutus' CONFIG_SA1100_BRUTUS
+ bool ' Include support for CerfBoard' CONFIG_SA1100_CERF
bool ' Include support for Compaq iPAQ H3600 (Bitsy)' CONFIG_SA1100_BITSY
# bool ' Include support for Empeg' CONFIG_SA1100_EMPEG
# bool ' Include support for Itsy' CONFIG_SA1100_ITSY
@@ -69,9 +71,52 @@
# bool ' Include support for PLEB' CONFIG_SA1100_PLEB
bool ' Include support for ThinClient' CONFIG_SA1100_THINCLIENT
bool ' Include support for GraphicsClient' CONFIG_SA1100_GRAPHICSCLIENT
+ bool ' Include support for nanoEngine' CONFIG_SA1100_NANOENGINE
bool ' Include support for Victor' CONFIG_SA1100_VICTOR
# bool ' Include support for Tifon' CONFIG_SA1100_TIFON
-# bool ' Include support for XP860' CONFIG_SA1100_XP860
+ bool ' Include support for XP860' CONFIG_SA1100_XP860
+
+ bool ' Load kernel using Angel Debug Monitor' CONFIG_ANGELBOOT
+
+ # Determine if SA1111 support is required
+ if [ "$CONFIG_ASSABET_NEPONSET" = "y" -o \
+ "$CONFIG_SA1100_XP860" = "y" ]; then
+ define_bool CONFIG_SA1111 y
+ fi
+fi
+
+# Definitions to make life easier
+if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \
+ "$CONFIG_ARCH_RPC" = "y" ]; then
+ define_bool CONFIG_ARCH_ACORN y
+else
+ define_bool CONFIG_ARCH_ACORN n
+fi
+
+# see Documentation/arm/ConfigVars for a description of these
+if [ "$CONFIG_ARCH_CO285" = "y" -o \
+ "$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then
+ define_bool CONFIG_FOOTBRIDGE y
+else
+ define_bool CONFIG_FOOTBRIDGE n
+fi
+if [ "$CONFIG_ARCH_CATS" = "y" -o \
+ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
+ "$CONFIG_ARCH_NETWINDER" = "y" -o \
+ "$CONFIG_ARCH_PERSONAL_SERVER" = "y" ]; then
+ define_bool CONFIG_FOOTBRIDGE_HOST y
+else
+ define_bool CONFIG_FOOTBRIDGE_HOST n
+fi
+if [ "$CONFIG_ARCH_CO285" = "y" -o \
+ "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
+ define_bool CONFIG_FOOTBRIDGE_ADDIN y
+else
+ define_bool CONFIG_FOOTBRIDGE_ADDIN n
+fi
+if [ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
+ "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
+ define_bool CONFIG_ARCH_EBSA285 y
fi
# Figure out whether this system uses 26-bit or 32-bit CPUs.
@@ -113,38 +158,6 @@
fi
# Select various configuration options depending on the machine type
-if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \
- "$CONFIG_ARCH_RPC" = "y" ]; then
- define_bool CONFIG_ARCH_ACORN y
-else
- define_bool CONFIG_ARCH_ACORN n
-fi
-
-if [ "$CONFIG_ARCH_CO285" = "y" -o \
- "$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then
- define_bool CONFIG_FOOTBRIDGE y
-else
- define_bool CONFIG_FOOTBRIDGE n
-fi
-if [ "$CONFIG_ARCH_CATS" = "y" -o \
- "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
- "$CONFIG_ARCH_NETWINDER" = "y" -o \
- "$CONFIG_ARCH_PERSONAL_SERVER" = "y" ]; then
- define_bool CONFIG_FOOTBRIDGE_HOST y
-else
- define_bool CONFIG_FOOTBRIDGE_HOST n
-fi
-if [ "$CONFIG_ARCH_CO285" = "y" -o \
- "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
- define_bool CONFIG_FOOTBRIDGE_ADDIN y
-else
- define_bool CONFIG_FOOTBRIDGE_ADDIN n
-fi
-if [ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
- "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
- define_bool CONFIG_ARCH_EBSA285 y
-fi
-
if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
define_bool CONFIG_DISCONTIGMEM y
else
@@ -167,6 +180,15 @@
define_bool CONFIG_ISA n
define_bool CONFIG_ISA_DMA n
fi
+
+# Do we have a PC-type keyboard in this architecture?
+if [ "$CONFIG_FOOTBRIDGE_HOST" = "y" ]; then
+ define_bool CONFIG_PC_KEYB y
+ define_bool CONFIG_PC_KEYMAP y
+fi
+if [ "$CONFIG_SA1100_ASSABET" = "y" ]; then
+ define_bool CONFIG_PC_KEYMAP y
+fi
endmenu
mainmenu_option next_comment
@@ -199,6 +221,7 @@
fi
if [ "$CONFIG_ARCH_EBSA110" = "y" -o \
"$CONFIG_ARCH_SA1100" = "y" -o \
+ "$CONFIG_ARCH_CLPS7500" = "y" -o \
"$CONFIG_ARCH_PERSONAL_SERVER" = "y" -o \
"$CONFIG_ARCH_CATS" = "y" ]; then
string 'Default kernel command string' CONFIG_CMDLINE ""
@@ -301,6 +324,8 @@
#source drivers/misc/Config.in
+source drivers/media/Config.in
+
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
@@ -329,6 +354,7 @@
fi
source drivers/usb/Config.in
+source drivers/input/Config.in
mainmenu_option next_comment
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/Makefile linux/arch/arm/kernel/Makefile
--- v2.4.0-test6/linux/arch/arm/kernel/Makefile Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/Makefile Sun Aug 13 09:54:15 2000
@@ -5,9 +5,14 @@
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
+USE_STANDARD_AS_RULE := true
+
HEAD_OBJ = head-$(PROCESSOR).o
ENTRY_OBJ = entry-$(PROCESSOR).o
+AFLAGS_head-armv.o := -DTEXTADDR=$(TEXTADDR) -traditional
+AFLAGS_head-armo.o := -DTEXTADDR=$(TEXTADDR) -traditional
+
O_OBJS_arc = dma-arc.o oldlatches.o
O_OBJS_rpc = dma-rpc.o
O_OBJS_footbridge = dma-footbridge.o hw-footbridge.o isa.o
@@ -54,13 +59,7 @@
all: kernel.o $(HEAD_OBJ) init_task.o
-$(HEAD_OBJ): $(HEAD_OBJ:.o=.S)
- $(CC) $(AFLAGS) -DTEXTADDR=$(TEXTADDR) -traditional -c $(HEAD_OBJ:.o=.S) -o $@
-
include $(TOPDIR)/Rules.make
-
-.S.o:
- $(CC) $(AFLAGS) $(AFLAGS_$@) -c -o $*.o $<
# Spell out some dependencies that `make dep' doesn't spot
entry-armv.o: calls.S ../lib/constants.h
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/arch.c linux/arch/arm/kernel/arch.c
--- v2.4.0-test6/linux/arch/arm/kernel/arch.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/arch.c Sun Aug 13 09:54:15 2000
@@ -15,7 +15,7 @@
#include
#include
#include
-#include
+#include
#include "arch.h"
@@ -219,6 +219,17 @@
while (1);
}
+
+static void xp860_power_off(void)
+{
+ GPDR |= GPIO_GPIO20;
+ GPSR = GPIO_GPIO20;
+ mdelay(1000);
+ GPCR = GPIO_GPIO20;
+ while(1);
+}
+
+
extern void select_sa1100_io_desc(void);
#define SET_BANK(__nr,__start,__size) \
mi->bank[__nr].start = (__start), \
@@ -273,6 +284,18 @@
setup_initrd( __phys_to_virt(0xd8000000), 3*1024*1024 );
}
+ else if (machine_is_cerf()) {
+ // 16Meg Ram.
+ SET_BANK( 0, 0xc0000000, 8*1024*1024 );
+ SET_BANK( 1, 0xc8000000, 8*1024*1024 ); // comment this out for 8MB Cerfs
+ mi->nr_banks = 2;
+
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ setup_ramdisk(1, 0, 0, 8192);
+ // Save 2Meg for RAMDisk
+ setup_initrd(0xc0500000, 3*1024*1024);
+ }
+
else if (machine_is_empeg()) {
SET_BANK( 0, 0xc0000000, 4*1024*1024 );
SET_BANK( 1, 0xc8000000, 4*1024*1024 );
@@ -309,6 +332,18 @@
setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 );
}
+ else if (machine_is_nanoengine()) {
+ SET_BANK( 0, 0xc0000000, 32*1024*1024 );
+ mi->nr_banks = 1;
+
+ ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
+ setup_ramdisk( 1, 0, 0, 8192 );
+ setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 );
+
+ /* Get command line parameters passed from the loader (if any) */
+ if( *((char*)0xc0000100) )
+ *cmdline = ((char *)0xc0000100);
+ }
else if (machine_is_tifon()) {
SET_BANK( 0, 0xc0000000, 16*1024*1024 );
SET_BANK( 1, 0xc8000000, 16*1024*1024 );
@@ -335,6 +370,12 @@
pm_power_off = victor_power_off;
}
+ else if (machine_is_xp860()) {
+ SET_BANK( 0, 0xc0000000, 32*1024*1024 );
+ mi->nr_banks = 1;
+
+ pm_power_off = xp860_power_off;
+ }
}
#ifdef CONFIG_SA1100_ASSABET
@@ -356,6 +397,13 @@
FIXUP(fixup_sa1100)
MACHINE_END
#endif
+#ifdef CONFIG_SA1100_CERF
+MACHINE_START(CERF, "Intrinsyc CerfBoard")
+ MAINTAINER("Pieter Truter")
+ BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
+ FIXUP(fixup_sa1100)
+MACHINE_END
+#endif
#ifdef CONFIG_SA1100_EMPEG
MACHINE_START(EMPEG, "empeg MP3 Car Audio Player")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
@@ -377,6 +425,12 @@
#endif
#ifdef CONFIG_SA1100_LART
MACHINE_START(LART, "LART")
+ BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
+ FIXUP(fixup_sa1100)
+MACHINE_END
+#endif
+#ifdef CONFIG_SA1100_NANOENGINE
+MACHINE_START(NANOENGINE, "BSE nanoEngine")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
FIXUP(fixup_sa1100)
MACHINE_END
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/armksyms.c linux/arch/arm/kernel/armksyms.c
--- v2.4.0-test6/linux/arch/arm/kernel/armksyms.c Wed Aug 9 19:19:49 2000
+++ linux/arch/arm/kernel/armksyms.c Sun Aug 13 09:54:15 2000
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
@@ -187,16 +188,17 @@
EXPORT_SYMBOL(__arch_copy_to_user);
EXPORT_SYMBOL(__arch_clear_user);
EXPORT_SYMBOL(__arch_strnlen_user);
-#elif defined(CONFIG_CPU_26)
-EXPORT_SYMBOL(uaccess_kernel);
-EXPORT_SYMBOL(uaccess_user);
-#endif
/* consistent area handling */
EXPORT_SYMBOL(pci_alloc_consistent);
EXPORT_SYMBOL(consistent_alloc);
EXPORT_SYMBOL(consistent_free);
EXPORT_SYMBOL(consistent_sync);
+
+#elif defined(CONFIG_CPU_26)
+EXPORT_SYMBOL(uaccess_kernel);
+EXPORT_SYMBOL(uaccess_user);
+#endif
/* gcc lib functions */
EXPORT_SYMBOL_NOVERS(__gcc_bcmp);
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/bios32.c linux/arch/arm/kernel/bios32.c
--- v2.4.0-test6/linux/arch/arm/kernel/bios32.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/bios32.c Sun Aug 13 09:54:15 2000
@@ -11,7 +11,7 @@
#include
#include
-#include
+#include
#include "bios32.h"
@@ -198,20 +198,35 @@
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
- unsigned long where, size;
- u32 reg;
+ u32 val, check;
+ int reg;
if (debug_pci)
printk("PCI: Assigning %3s %08lx to %s\n",
res->flags & IORESOURCE_IO ? "IO" : "MEM",
res->start, dev->name);
- where = PCI_BASE_ADDRESS_0 + resource * 4;
- size = res->end - res->start;
-
- pci_read_config_dword(dev, where, ®);
- reg = (reg & size) | (((u32)(res->start - root->start)) & ~size);
- pci_write_config_dword(dev, where, reg);
+ val = res->start | (res->flags & PCI_REGION_FLAG_MASK);
+ if (resource < 6) {
+ reg = PCI_BASE_ADDRESS_0 + 4*resource;
+ } else if (resource == PCI_ROM_RESOURCE) {
+ res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ val |= PCI_ROM_ADDRESS_ENABLE;
+ reg = dev->rom_base_reg;
+ } else {
+ /* Somebody might have asked allocation of a
+ * non-standard resource.
+ */
+ return;
+ }
+ pci_write_config_dword(dev, reg, val);
+ pci_read_config_dword(dev, reg, &check);
+ if ((val ^ check) & ((val & PCI_BASE_ADDRESS_SPACE_IO) ?
+ PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
+ printk(KERN_ERR "PCI: Error while updating region "
+ "%s/%d (%08x != %08x)\n", dev->slot_name,
+ resource, val, check);
+ }
}
void __init pcibios_update_irq(struct pci_dev *dev, int irq)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/calls.S linux/arch/arm/kernel/calls.S
--- v2.4.0-test6/linux/arch/arm/kernel/calls.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/kernel/calls.S Fri Aug 11 14:29:05 2000
@@ -226,8 +226,9 @@
.long SYMBOL_NAME(sys_setgid)
/* 215 */ .long SYMBOL_NAME(sys_setfsuid)
.long SYMBOL_NAME(sys_setfsgid)
+ .long SYMBOL_NAME(sys_getdents64)
- .rept NR_syscalls-216
+ .rept NR_syscalls-217
.long SYMBOL_NAME(sys_ni_syscall)
.endr
#endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/debug-armv.S linux/arch/arm/kernel/debug-armv.S
--- v2.4.0-test6/linux/arch/arm/kernel/debug-armv.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/kernel/debug-armv.S Sun Aug 13 09:54:15 2000
@@ -162,12 +162,14 @@
#elif defined(CONFIG_ARCH_L7200)
- .macro addruart,rx
+ .equ io_virt, IO_BASE
+ .equ io_phys, IO_START
+ .macro addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
- moveq \rx, #0x80000000 @ physical base address
- movne \rx, #0xd0000000 @ virtual address
+ moveq \rx, #io_phys @ physical base address
+ movne \rx, #io_virt @ virtual address
add \rx, \rx, #0x00044000 @ Ser1
@ add \rx, \rx, #0x00045000 @ Ser2
.endm
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/dec21285.c linux/arch/arm/kernel/dec21285.c
--- v2.4.0-test6/linux/arch/arm/kernel/dec21285.c Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/kernel/dec21285.c Sun Aug 13 09:54:15 2000
@@ -274,7 +274,7 @@
cfn_mode = __footbridge_cfn_mode();
- printk(KERN_INFO "PCI: DC21285 footbridge, revision %02lX in "
+ printk(KERN_INFO "PCI: DC21285 footbridge, revision %02lX, in "
"%s mode\n", *CSR_CLASSREV & 0xff, cfn_mode ?
"central function" : "addin");
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/dma-arc.c linux/arch/arm/kernel/dma-arc.c
--- v2.4.0-test6/linux/arch/arm/kernel/dma-arc.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/dma-arc.c Sun Aug 13 09:54:15 2000
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include "dma.h"
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/dma-rpc.c linux/arch/arm/kernel/dma-rpc.c
--- v2.4.0-test6/linux/arch/arm/kernel/dma-rpc.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/dma-rpc.c Sun Aug 13 09:54:15 2000
@@ -315,7 +315,7 @@
/*
* This is virtual DMA - we don't need anything here.
*/
-static int sound_enable_disable_dma(dmach_t channel, dma_t *dma)
+static void sound_enable_disable_dma(dmach_t channel, dma_t *dma)
{
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/dma.c linux/arch/arm/kernel/dma.c
--- v2.4.0-test6/linux/arch/arm/kernel/dma.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/dma.c Sun Aug 13 09:54:15 2000
@@ -248,24 +248,23 @@
return -EINVAL;
}
-static int no_dma(void)
+int get_dma_residue(dmach_t channel)
{
return 0;
}
#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a)
-GLOBAL_ALIAS(disable_dma, no_dma);
-GLOBAL_ALIAS(enable_dma, no_dma);
-GLOBAL_ALIAS(free_dma, no_dma);
-GLOBAL_ALIAS(get_dma_residue, no_dma);
-GLOBAL_ALIAS(get_dma_list, no_dma);
-GLOBAL_ALIAS(set_dma_mode, no_dma);
-GLOBAL_ALIAS(set_dma_page, no_dma);
-GLOBAL_ALIAS(set_dma_count, no_dma);
-GLOBAL_ALIAS(set_dma_addr, no_dma);
-GLOBAL_ALIAS(set_dma_sg, no_dma);
-GLOBAL_ALIAS(set_dma_speed, no_dma);
-GLOBAL_ALIAS(init_dma, no_dma);
+GLOBAL_ALIAS(disable_dma, get_dma_residue);
+GLOBAL_ALIAS(enable_dma, get_dma_residue);
+GLOBAL_ALIAS(free_dma, get_dma_residue);
+GLOBAL_ALIAS(get_dma_list, get_dma_residue);
+GLOBAL_ALIAS(set_dma_mode, get_dma_residue);
+GLOBAL_ALIAS(set_dma_page, get_dma_residue);
+GLOBAL_ALIAS(set_dma_count, get_dma_residue);
+GLOBAL_ALIAS(set_dma_addr, get_dma_residue);
+GLOBAL_ALIAS(set_dma_sg, get_dma_residue);
+GLOBAL_ALIAS(set_dma_speed, get_dma_residue);
+GLOBAL_ALIAS(init_dma, get_dma_residue);
#endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/ecard.c linux/arch/arm/kernel/ecard.c
--- v2.4.0-test6/linux/arch/arm/kernel/ecard.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/ecard.c Sun Aug 13 09:54:15 2000
@@ -265,8 +265,7 @@
* Set up the expansion card
* daemon's environment.
*/
-static void
-ecard_init_task(void)
+static void ecard_init_task(int force)
{
/* We want to set up the page tables for the following mapping:
* Virtual Physical
@@ -282,7 +281,8 @@
pgd_t *src_pgd, *dst_pgd;
unsigned int dst_addr = IO_START;
- exec_mmap();
+ if (!force)
+ exec_mmap();
src_pgd = pgd_offset(current->mm, IO_BASE);
dst_pgd = pgd_offset(current->mm, dst_addr);
@@ -309,21 +309,24 @@
static int
ecard_task(void * unused)
{
- current->session = 1;
- current->pgrp = 1;
+ struct task_struct *tsk = current;
+
+ tsk->session = 1;
+ tsk->pgrp = 1;
/*
* We don't want /any/ signals, not even SIGKILL
*/
- sigfillset(¤t->blocked);
- sigemptyset(¤t->signal);
+ sigfillset(&tsk->blocked);
+ sigemptyset(&tsk->signal);
+ recalc_sigpending(tsk);
- strcpy(current->comm, "kecardd");
+ strcpy(tsk->comm, "kecardd");
/*
* Set up the environment
*/
- ecard_init_task();
+ ecard_init_task(0);
while (1) {
struct ecard_request *req;
@@ -332,7 +335,7 @@
req = xchg(&ecard_req, NULL);
if (req == NULL) {
- sigemptyset(¤t->signal);
+ sigemptyset(&tsk->signal);
interruptible_sleep_on(&ecard_wait);
}
} while (req == NULL);
@@ -368,7 +371,7 @@
*/
if ((current == &init_task || in_interrupt()) &&
req->req == req_reset && req->ec == NULL) {
- ecard_init_task();
+ ecard_init_task(1);
ecard_task_reset(req);
} else {
if (ecard_pid <= 0)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/entry-armo.S linux/arch/arm/kernel/entry-armo.S
--- v2.4.0-test6/linux/arch/arm/kernel/entry-armo.S Thu Mar 2 14:36:22 2000
+++ linux/arch/arm/kernel/entry-armo.S Sun Aug 13 09:54:15 2000
@@ -38,17 +38,6 @@
.text
-@ Offsets into task structure
-@ ---------------------------
-@
-#define STATE 0
-#define COUNTER 4
-#define PRIORITY 8
-#define FLAGS 12
-#define SIGPENDING 16
-
-#define PF_TRACESYS 0x20
-
@ Bad Abort numbers
@ -----------------
@
@@ -58,12 +47,6 @@
#define BAD_IRQ 3
#define BAD_UNDEFINSTR 4
-@ OS version number used in SWIs
-@ RISC OS is 0
-@ RISC iX is 8
-@
-#define OS_NUMBER 9
-
@
@ Stack format (ensured by USER_* and SVC_*)
@
@@ -456,6 +439,7 @@
orr lr, lr, #0x08000003 @ Force SVC
bne do_IRQ
mov r4, #0
+ get_current_task r5
b ret_with_reschedule
irq_prio_table
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/entry-armv.S linux/arch/arm/kernel/entry-armv.S
--- v2.4.0-test6/linux/arch/arm/kernel/entry-armv.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/kernel/entry-armv.S Sun Aug 13 09:54:15 2000
@@ -32,8 +32,6 @@
.text
-#define PT_TRACESYS 0x00000002
-
@ Bad Abort numbers
@ -----------------
@
@@ -43,12 +41,6 @@
#define BAD_IRQ 3
#define BAD_UNDEFINSTR 4
-@ OS version number used in SWIs
-@ RISC OS is 0
-@ RISC iX is 8
-@
-#define OS_NUMBER 9
-
@
@ Stack format (ensured by USER_* and SVC_*)
@
@@ -426,12 +418,15 @@
.endm
#elif defined(CONFIG_ARCH_L7200)
-/* Don't use fast interrupts */
+
+ .equ irq_base_addr, IO_BASE_2
+
.macro disable_fiq
.endm
.macro get_irqnr_and_base, irqnr, irqstat, base
- ldr r4, =0xe0001000 @ Virt addr status reg
+ mov r4, #irq_base_addr @ Virt addr IRQ regs
+ add r4, r4, #0x00001000 @ Status reg
ldr \irqstat, [r4] @ get interrupts
mov \irqnr, #0
1001: tst \irqstat, #1
@@ -727,6 +722,7 @@
@
bne do_IRQ
mov r4, #0
+ get_current_task r5
b ret_with_reschedule
.align 5
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/entry-common.S linux/arch/arm/kernel/entry-common.S
--- v2.4.0-test6/linux/arch/arm/kernel/entry-common.S Wed Aug 9 19:19:49 2000
+++ linux/arch/arm/kernel/entry-common.S Sun Aug 13 09:54:15 2000
@@ -1,4 +1,13 @@
#include
+
+#define PT_TRACESYS 0x00000002
+
+@ OS version number used in SWIs
+@ RISC OS is 0
+@ RISC iX is 8
+@
+#define OS_NUMBER 9
+
/*============================================================================
* All exits to user mode from the kernel go through this code.
*/
@@ -22,25 +31,23 @@
add sp, sp, #S_OFF
ret_from_sys_call: @ external entry
get_softirq r0
+ get_current_task r5
ldmia r0, {r0, r1} @ softirq_active, softirq_mask
mov r4, #1 @ flag this as being syscall return
tst r0, r1
blne SYMBOL_NAME(do_softirq)
-ret_with_reschedule: @ external entry (__irq_usr)
- get_current_task r5
+ret_with_reschedule: @ external entry (r5 must be set) (__irq_usr)
ldr r0, [r5, #TSK_NEED_RESCHED]
ldr r1, [r5, #TSK_SIGPENDING]
teq r0, #0
bne ret_reschedule
teq r1, #0 @ check for signals
- bne ret_signal
-
+ blne ret_signal
ret_from_all: restore_user_regs @ internal
ret_signal: mov r1, sp @ internal
- adrsvc al, lr, ret_from_all
mov r2, r4
- b SYMBOL_NAME(do_signal)
+ b SYMBOL_NAME(do_signal) @ note the bl above sets lr
ret_reschedule: adrsvc al, lr, ret_with_reschedule @ internal
b SYMBOL_NAME(schedule)
@@ -48,12 +55,13 @@
.globl ret_from_exception
ret_from_exception: @ external entry
get_softirq r0
+ get_current_task r5
ldmia r0, {r0, r1} @ softirq_active, softirq_mask
mov r4, #0
tst r0, r1
+ ldr r6, [sp, #S_PSR]
blne SYMBOL_NAME(do_softirq)
- ldr r0, [sp, #S_PSR]
- tst r0, #3 @ returning to user mode?
+ tst r6, #3 @ returning to user mode?
beq ret_with_reschedule
b ret_from_all
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/fiq.c linux/arch/arm/kernel/fiq.c
--- v2.4.0-test6/linux/arch/arm/kernel/fiq.c Tue Dec 7 09:32:40 1999
+++ linux/arch/arm/kernel/fiq.c Sun Aug 13 09:54:15 2000
@@ -83,8 +83,11 @@
return 0;
}
-static struct fiq_handler default_owner =
- { NULL, "default", fiq_def_op, NULL };
+static struct fiq_handler default_owner = {
+ name: "default",
+ fiq_op: fiq_def_op,
+};
+
static struct fiq_handler *current_fiq = &default_owner;
int get_fiq_list(char *buf)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/head-armo.S linux/arch/arm/kernel/head-armo.S
--- v2.4.0-test6/linux/arch/arm/kernel/head-armo.S Fri Oct 22 13:21:44 1999
+++ linux/arch/arm/kernel/head-armo.S Sun Aug 13 09:54:15 2000
@@ -1,11 +1,13 @@
/*
* linux/arch/arm/kernel/head-armo.S
*
- * Copyright (C) 1994, 1995, 1996, 1997 Russell King
+ * Copyright (C) 1994-2000 Russell King
*
* 26-bit kernel startup code
*/
+#include
#include
+#include
.globl SYMBOL_NAME(swapper_pg_dir)
.equ SYMBOL_NAME(swapper_pg_dir), 0x0207d000
@@ -17,46 +19,69 @@
ENTRY(stext)
ENTRY(_stext)
__entry: cmp pc, #0x02000000
- ldrlt pc, LC1 @ if 0x01800000, call at 0x02080000
+ ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000
teq r0, #0 @ Check for old calling method
- blne Loldparams @ Move page if old
- adr r5, LC0
- ldmia r5, {r5, r6, sl, sp} @ Setup stack
- mov r4, #0
-1: cmp r5, sl @ Clear BSS
- strcc r4, [r5], #4
+ blne oldparams @ Move page if old
+ adr r0, LC0
+ ldmib r0, {r2-r5, sp} @ Setup stack
+ mov r0, #0
+1: cmp r2, r3 @ Clear BSS
+ strcc r0, [r2], #4
bcc 1b
- mov r0, #0xea000000 @ Point undef instr to continuation
- adr r5, Lcontinue - 12
- orr r5, r0, r5, lsr #2
- str r5, [r4, #4]
- mov r2, r4
- ldr r5, Larm2_id
- swp r0, r0, [r2] @ check for swp (ARM2 can't)
- ldr r5, Larm250_id
- mrc 15, 0, r0, c0, c0 @ check for CP#15 (ARM250 can't)
- mov r5, r0 @ Use processor ID if we do have CP#15
-Lcontinue: str r5, [r6]
- mov r5, #0xeb000000 @ Point undef instr vector to itself
- sub r5, r5, #2
- str r5, [r4, #4]
+
+ bl detect_proc_type
+ str r0, [r4]
+ bl detect_arch_type
+ str r0, [r5]
+
mov fp, #0
b SYMBOL_NAME(start_kernel)
-LC1: .word SYMBOL_NAME(_stext)
-LC0: .word SYMBOL_NAME(__bss_start)
- .word SYMBOL_NAME(processor_id)
- .word SYMBOL_NAME(_end)
- .word SYMBOL_NAME(init_task_union)+8192
-Larm2_id: .long 0x41560200
-Larm250_id: .long 0x41560250
+LC0: .word SYMBOL_NAME(_stext)
+ .word SYMBOL_NAME(__bss_start) @ r2
+ .word SYMBOL_NAME(_end) @ r3
+ .word SYMBOL_NAME(processor_id) @ r4
+ .word SYMBOL_NAME(__machine_arch_type) @ r5
+ .word SYMBOL_NAME(init_task_union)+8192 @ sp
+arm2_id: .long 0x41560200
+arm250_id: .long 0x41560250
.align
-Loldparams: mov r4, #0x02000000
+oldparams: mov r4, #0x02000000
add r3, r4, #0x00080000
add r4, r4, #0x0007c000
1: ldmia r0!, {r5 - r12}
stmia r4!, {r5 - r12}
cmp r4, r3
blt 1b
- movs pc, lr
+ mov pc, lr
+
+/*
+ * We need some way to automatically detect the difference between
+ * these two machines. Unfortunately, it is not possible to detect
+ * the presence of the SuperIO chip, because that will hang the old
+ * Archimedes machines solid.
+ */
+/* DAG: Outdated, these have been combined !!!!!!! */
+detect_arch_type:
+#if defined(CONFIG_ARCH_ARC)
+ mov r0, #MACH_TYPE_ARCHIMEDES
+#elif defined(CONFIG_ARCH_A5K)
+ mov r0, #MACH_TYPE_A5K
+#endif
+ mov pc, lr
+
+detect_proc_type:
+ mov r2, #0xea000000 @ Point undef instr to continuation
+ adr r0, continue - 12
+ orr r0, r2, r0, lsr #2
+ mov r1, #0
+ str r0, [r1, #4]
+ ldr r0, arm2_id
+ swp r2, r2, [r1] @ check for swp (ARM2 can't)
+ ldr r0, arm250_id
+ mrc 15, 0, r0, c0, c0 @ check for CP#15 (ARM250 can't)
+continue: mov r2, #0xeb000000 @ Make undef vector loop
+ sub r2, r2, #2
+ str r2, [r1, #4]
+ mov pc, lr
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/head-armv.S linux/arch/arm/kernel/head-armv.S
--- v2.4.0-test6/linux/arch/arm/kernel/head-armv.S Fri May 12 14:18:55 2000
+++ linux/arch/arm/kernel/head-armv.S Sun Aug 13 09:54:15 2000
@@ -19,6 +19,7 @@
#endif
#define SWAPPER_PGDIR_OFFSET 0x4000
+#define K(a,b,c) ((a) << 24 | (b) << 12 | (c))
.globl SYMBOL_NAME(swapper_pg_dir)
.equ SYMBOL_NAME(swapper_pg_dir), TEXTADDR - 0x8000 + SWAPPER_PGDIR_OFFSET
@@ -27,7 +28,28 @@
.type stext, #function
ENTRY(stext)
ENTRY(_stext)
-
+/*
+ * Entry point. The general rules are:
+ * should be called with r0 == 0
+ * r1 contains the unique architecture number
+ * with MMU is off, I-cache may be on or off, D-cache should be off.
+ * See linux/arch/arm/kernel/arch.c and linux/include/asm-arm/system.h
+ * for the complete list of numbers for r1. If you require a new number,
+ * please follow the instructions given towards the end of
+ * linux/Documentation/arm/README.
+ */
+ mov r12, r0
+/*
+ * NOTE! Any code which is placed here should be done for one of
+ * the following reasons:
+ *
+ * 1. Compatability with old production boot firmware (ie, users
+ * actually have and are booting the kernel with the old firmware)
+ * and therefore will be eventually removed.
+ * 2. Cover the case when there is no boot firmware. This is not
+ * ideal, but in this case, it should ONLY set r0 and r1 to the
+ * appropriate value.
+ */
#ifdef CONFIG_ARCH_NETWINDER
/*
* Compatability cruft for old NetWinder NeTTroms. This
@@ -63,28 +85,18 @@
mov r5, #0
movne pc, r0
- mov r0, #0 @ catch old NeTTroms
mov r1, #5 @ (will go in 2.5)
+ mov r12, #2 << 24 @ scheduled for removal in 2.5.xx
+ orr r12, r12, #5 << 12
#endif
#ifdef CONFIG_ARCH_L7200
/*
* FIXME - No bootloader, so manually set 'r1' with our architecture number.
*/
- mov r0, #0
mov r1, #19
#endif
-/*
- * Entry point. Entry *must* be called with r0 == 0, with the MMU off.
- * r1 contains the unique architecture number. See
- * linux/arch/arm/kernel/arch.c and linux/include/asm-arm/system.h for
- * the complete list. If you require a new number, please follow the
- * instructions given towards the end of Documentation/arm/README.
- */
-__entry: teq r0, #0 @ wrong register vals?
- movne r0, #'i' @ yes, error 'i'
- bne __error
- bl __lookup_processor_type
+__entry: bl __lookup_processor_type
teq r10, #0 @ invalid processor?
moveq r0, #'p' @ yes, error 'p'
beq __error
@@ -98,6 +110,7 @@
@ (return control reg)
__switch_data: .long __mmap_switched
+ .long SYMBOL_NAME(compat)
.long SYMBOL_NAME(__bss_start)
.long SYMBOL_NAME(_end)
.long SYMBOL_NAME(processor_id)
@@ -123,8 +136,9 @@
.align 5
__mmap_switched:
adr r3, __switch_data + 4
- ldmia r3, {r4, r5, r6, r7, r8, sp} @ r4 = __bss_start
+ ldmia r3, {r2, r4, r5, r6, r7, r8, sp}@ r2 = compat
@ sp = stack pointer
+ str r12, [r2]
mov fp, #0 @ Clear BSS
1: cmp r4, r5
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/hw-footbridge.c linux/arch/arm/kernel/hw-footbridge.c
--- v2.4.0-test6/linux/arch/arm/kernel/hw-footbridge.c Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/kernel/hw-footbridge.c Sun Aug 13 09:54:15 2000
@@ -15,7 +15,7 @@
#include
#include
-#include
+#include
#define IRDA_IO_BASE 0x180
#define GP1_IO_BASE 0x338
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/hw-sa1100.c linux/arch/arm/kernel/hw-sa1100.c
--- v2.4.0-test6/linux/arch/arm/kernel/hw-sa1100.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/hw-sa1100.c Sun Aug 13 09:54:15 2000
@@ -17,7 +17,7 @@
#include
#include
-
+#include
/*
* SA1100 GPIO edge detection for IRQs:
@@ -130,12 +130,40 @@
* any other SA-1111 functional blocks must be enabled separately
* using the SKPCR.
*/
+
+ {
+ /*
+ * SA1111 DMA bus master setup
+ */
+ int cas;
+
+ /* SA1111 side */
+ switch ( (MDCNFG>>12) & 0x03 ) {
+ case 0x02:
+ cas = 0; break;
+ case 0x03:
+ cas = 1; break;
+ default:
+ cas = 1; break;
+ }
+ SMCR = 1 /* 1: memory is SDRAM */
+ | ( 1 << 1 ) /* 1:MBGNT is enable */
+ | ( ((MDCNFG >> 4) & 0x07) << 2 ) /* row address lines */
+ | ( cas << 5 ); /* CAS latency */
+
+ /* SA1110 side */
+ GPDR |= 1<<21;
+ GPDR &= ~(1<<22);
+ GAFR |= ( (1<<21) | (1<<22) );
+
+ TUCR |= (1<<10);
+ }
}
#endif
-static void __init hw_sa1100_init(void)
+static int __init hw_sa1100_init(void)
{
if( machine_is_assabet() ){
if(machine_has_neponset()){
@@ -147,7 +175,10 @@
"hasn't been configured in the kernel\n" );
#endif
}
+ } else if (machine_is_xp860()) {
+ sa1111_init();
}
+ return 0;
}
module_init(hw_sa1100_init);
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/irq.c linux/arch/arm/kernel/irq.c
--- v2.4.0-test6/linux/arch/arm/kernel/irq.c Wed Aug 9 19:19:49 2000
+++ linux/arch/arm/kernel/irq.c Sun Aug 13 09:54:15 2000
@@ -31,18 +31,12 @@
#include
#include
-#ifndef cliIF
-#define cliIF()
-#endif
-
/*
- * Maximum IRQ count. Currently, this is arbitary.
- * However, it should not be set too low to prevent
- * false triggering. Conversely, if it is set too
- * high, then you could miss a stuck IRQ.
+ * Maximum IRQ count. Currently, this is arbitary. However, it should
+ * not be set too low to prevent false triggering. Conversely, if it
+ * is set too high, then you could miss a stuck IRQ.
*
- * Maybe we ought to set a timer and re-enable the
- * IRQ at a later time?
+ * Maybe we ought to set a timer and re-enable the IRQ at a later time?
*/
#define MAX_IRQ_CNT 100000
@@ -94,7 +88,6 @@
unsigned long flags;
spin_lock_irqsave(&irq_controller_lock, flags);
- cliIF();
irq_desc[irq].enabled = 0;
irq_desc[irq].mask(irq);
spin_unlock_irqrestore(&irq_controller_lock, flags);
@@ -105,7 +98,6 @@
unsigned long flags;
spin_lock_irqsave(&irq_controller_lock, flags);
- cliIF();
irq_desc[irq].probing = 0;
irq_desc[irq].triggered = 0;
irq_desc[irq].enabled = 1;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/leds-footbridge.c linux/arch/arm/kernel/leds-footbridge.c
--- v2.4.0-test6/linux/arch/arm/kernel/leds-footbridge.c Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/kernel/leds-footbridge.c Sun Aug 13 09:54:15 2000
@@ -25,6 +25,7 @@
#include
#include
+#include
#include
#define LED_STATE_ENABLED 1
@@ -35,7 +36,7 @@
static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
extern spinlock_t gpio_lock;
-#ifdef CONFIG_FOOTBRIDGE
+#if defined(CONFIG_ARCH_EBSA285) || defined(CONFIG_ARCH_CO285)
static void ebsa285_leds_event(led_event_t evt)
{
@@ -76,15 +77,20 @@
#ifdef CONFIG_LEDS_CPU
case led_idle_start:
if (!(led_state & LED_STATE_CLAIMED))
- hw_led_state |= XBUS_LED_RED;
+ hw_led_state |= XBUS_LED_AMBER;
break;
case led_idle_end:
if (!(led_state & LED_STATE_CLAIMED))
- hw_led_state &= ~XBUS_LED_RED;
+ hw_led_state &= ~XBUS_LED_AMBER;
break;
#endif
+ case led_halted:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state &= ~XBUS_LED_RED;
+ break;
+
case led_green_on:
if (led_state & LED_STATE_CLAIMED)
hw_led_state &= ~XBUS_LED_GREEN;
@@ -174,6 +180,11 @@
break;
#endif
+ case led_halted:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state |= GPIO_RED_LED;
+ break;
+
case led_green_on:
if (led_state & LED_STATE_CLAIMED)
hw_led_state |= GPIO_GREEN_LED;
@@ -229,7 +240,7 @@
static int __init leds_init(void)
{
-#ifdef CONFIG_FOOTBRIDGE
+#if defined(CONFIG_ARCH_EBSA285) || defined(CONFIG_ARCH_CO285)
if (machine_is_ebsa285() || machine_is_co285())
leds_event = ebsa285_leds_event;
#endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/leds-sa1100.c linux/arch/arm/kernel/leds-sa1100.c
--- v2.4.0-test6/linux/arch/arm/kernel/leds-sa1100.c Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/kernel/leds-sa1100.c Sun Aug 13 09:54:15 2000
@@ -36,6 +36,7 @@
#include
#include
+#include
#include
@@ -95,6 +96,9 @@
break;
#endif
+ case led_halted:
+ break;
+
case led_green_on:
if (led_state & LED_STATE_CLAIMED)
hw_led_state &= ~BCR_LED_GREEN;
@@ -302,6 +306,100 @@
#endif /* CONFIG_SA1100_LART */
+#ifdef CONFIG_SA1100_CERF
+#define LED_D0 GPIO_GPIO(0)
+#define LED_D1 GPIO_GPIO(1)
+#define LED_D2 GPIO_GPIO(2)
+#define LED_D3 GPIO_GPIO(3)
+#define LED_MASK (LED_D0|LED_D1|LED_D2|LED_D3)
+
+static void cerf_leds_event(led_event_t evt)
+{
+ unsigned long flags;
+
+ save_flags_cli(flags);
+
+ switch (evt) {
+ case led_start:
+ hw_led_state = LED_MASK;
+ led_state = LED_STATE_ENABLED;
+ break;
+
+ case led_stop:
+ led_state &= ~LED_STATE_ENABLED;
+ break;
+
+ case led_claim:
+ led_state |= LED_STATE_CLAIMED;
+ hw_led_state = LED_MASK;
+ break;
+ case led_release:
+ led_state &= ~LED_STATE_CLAIMED;
+ hw_led_state = LED_MASK;
+ break;
+
+#ifdef CONFIG_LEDS_TIMER
+ case led_timer:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state ^= LED_D0;
+ break;
+#endif
+
+#ifdef CONFIG_LEDS_CPU
+ case led_idle_start:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state &= ~LED_D1;
+ break;
+
+ case led_idle_end:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state |= LED_D1;
+ break;
+#endif
+ case led_green_on:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state &= ~LED_D2;
+ break;
+
+ case led_green_off:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state |= LED_D2;
+ break;
+
+ case led_amber_on:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state &= ~LED_D3;
+ break;
+
+ case led_amber_off:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state |= LED_D3;
+ break;
+
+ case led_red_on:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state &= ~LED_D1;
+ break;
+
+ case led_red_off:
+ if (!(led_state & LED_STATE_CLAIMED))
+ hw_led_state |= LED_D1;
+ break;
+
+ default:
+ break;
+ }
+
+ if (led_state & LED_STATE_ENABLED) {
+ GPSR = hw_led_state;
+ GPCR = hw_led_state ^ LED_MASK;
+ }
+
+ restore_flags(flags);
+}
+
+#endif /* CONFIG_SA1100_CERF */
+
static void dummy_leds_event(led_event_t evt)
{
}
@@ -325,7 +423,13 @@
if (machine_is_lart())
leds_event = lart_leds_event;
#endif
-
+#ifdef CONFIG_SA1100_CERF
+ if (machine_is_cerf())
+ {
+ //GPDR |= 0x0000000F;
+ leds_event = cerf_leds_event;
+ }
+#endif
leds_event(led_start);
return 0;
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/oldlatches.c linux/arch/arm/kernel/oldlatches.c
--- v2.4.0-test6/linux/arch/arm/kernel/oldlatches.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/oldlatches.c Sun Aug 13 09:54:15 2000
@@ -1,14 +1,17 @@
/* Support for the latches on the old Archimedes which control the floppy,
* hard disc and printer
*
- * (c) David Alan Gilbert 1995/1996
+ * (c) David Alan Gilbert 1995/1996,2000
*/
#include
#include
#include
+#include
#include
#include
+#include
+#include
static unsigned char latch_a_copy;
static unsigned char latch_b_copy;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
--- v2.4.0-test6/linux/arch/arm/kernel/process.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/process.c Sun Aug 13 09:54:15 2000
@@ -22,6 +22,7 @@
#include
#include
+#include
#include
/*
@@ -32,7 +33,7 @@
#define IDLE_CLOCK_SLOW 2
#define IDLE_CLOCK_FAST 3
-extern char *processor_modes[];
+extern const char *processor_modes[];
extern void setup_mm_for_reboot(char mode);
asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
@@ -109,10 +110,12 @@
void machine_halt(void)
{
+ leds_event(led_halted);
}
void machine_power_off(void)
{
+ leds_event(led_halted);
if (pm_power_off)
pm_power_off();
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/semaphore.c linux/arch/arm/kernel/semaphore.c
--- v2.4.0-test6/linux/arch/arm/kernel/semaphore.c Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/kernel/semaphore.c Mon Aug 14 13:09:07 2000
@@ -7,6 +7,7 @@
*
* Modified for ARM by Russell King
*/
+#include
#include
#include
@@ -53,8 +54,8 @@
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
- tsk->state = TASK_UNINTERRUPTIBLE;
- add_wait_queue(&sem->wait, &wait);
+ tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE;
+ add_wait_queue_exclusive(&sem->wait, &wait);
spin_lock_irq(&semaphore_lock);
sem->sleepers++;
@@ -67,28 +68,28 @@
*/
if (!atomic_add_negative(sleepers - 1, &sem->count)) {
sem->sleepers = 0;
- wake_up(&sem->wait);
break;
}
sem->sleepers = 1; /* us - see -1 above */
spin_unlock_irq(&semaphore_lock);
schedule();
- tsk->state = TASK_UNINTERRUPTIBLE;
+ tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE;
spin_lock_irq(&semaphore_lock);
}
spin_unlock_irq(&semaphore_lock);
remove_wait_queue(&sem->wait, &wait);
tsk->state = TASK_RUNNING;
+ wake_up(&sem->wait);
}
int __down_interruptible(struct semaphore * sem)
{
- int retval;
+ int retval = 0;
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
- tsk->state = TASK_INTERRUPTIBLE;
- add_wait_queue(&sem->wait, &wait);
+ tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE;
+ add_wait_queue_exclusive(&sem->wait, &wait);
spin_lock_irq(&semaphore_lock);
sem->sleepers ++;
@@ -102,12 +103,10 @@
* it has contention. Just correct the count
* and exit.
*/
- retval = -EINTR;
if (signal_pending(current)) {
+ retval = -EINTR;
sem->sleepers = 0;
- if (atomic_add_negative(sleepers, &sem->count))
- break;
- wake_up(&sem->wait);
+ atomic_add(sleepers, &sem->count);
break;
}
@@ -118,8 +117,6 @@
* the lock.
*/
if (!atomic_add_negative(sleepers - 1, &sem->count)) {
- wake_up(&sem->wait);
- retval = 0;
sem->sleepers = 0;
break;
}
@@ -127,12 +124,13 @@
spin_unlock_irq(&semaphore_lock);
schedule();
- tsk->state = TASK_INTERRUPTIBLE;
+ tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE;
spin_lock_irq(&semaphore_lock);
}
spin_unlock_irq(&semaphore_lock);
tsk->state = TASK_RUNNING;
remove_wait_queue(&sem->wait, &wait);
+ wake_up(&sem->wait);
return retval;
}
@@ -147,8 +145,9 @@
int __down_trylock(struct semaphore * sem)
{
int sleepers;
+ unsigned long flags;
- spin_lock_irq(&semaphore_lock);
+ spin_lock_irqsave(&semaphore_lock, flags);
sleepers = sem->sleepers + 1;
sem->sleepers = 0;
@@ -159,7 +158,7 @@
if (!atomic_add_negative(sleepers, &sem->count))
wake_up(&sem->wait);
- spin_unlock_irq(&semaphore_lock);
+ spin_unlock_irqrestore(&semaphore_lock, flags);
return 1;
}
@@ -254,7 +253,8 @@
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 */ schedule();
+ break; /* we must attempt to aquire or bias the lock */
+ schedule();
}
remove_wait_queue(&sem->wait, &wait);
@@ -293,6 +293,102 @@
* registers (r0 to r3 and lr), but not ip, as we use it as a return
* value in some cases..
*/
+#ifdef CONFIG_CPU_26
+asm(" .section .text.lock, \"ax\"
+ .align 5
+ .globl __down_failed
+__down_failed:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bl __down
+ ldmfd sp!, {r0 - r3, pc}^
+
+ .align 5
+ .globl __down_interruptible_failed
+__down_interruptible_failed:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bl __down_interruptible
+ mov ip, r0
+ ldmfd sp!, {r0 - r3, pc}^
+
+ .align 5
+ .globl __down_trylock_failed
+__down_trylock_failed:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bl __down_trylock
+ mov ip, r0
+ ldmfd sp!, {r0 - r3, pc}^
+
+ .align 5
+ .globl __up_wakeup
+__up_wakeup:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bl __up
+ ldmfd sp!, {r0 - r3, pc}^
+
+ .align 5
+ .globl __down_read_failed
+__down_read_failed:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bcc 1f
+1: bl down_read_failed_biased
+ ldmfd sp!, {r0 - r3, pc}^
+2: bl down_read_failed
+ mov r1, pc
+ orr r2, r1, #
+ teqp r2, #0
+
+ ldr r3, [r0]
+ subs r3, r3, #1
+ str r3, [r0]
+ ldmplfd sp!, {r0 - r3, pc}^
+ orrcs r1, r1, #0x20000000 @ Set carry
+ teqp r1, #0
+ bcc 2b
+ b 1b
+
+ .align 5
+ .globl __down_write_failed
+__down_write_failed:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ bcc 1f
+1: bl down_write_failed_biased
+ ldmfd sp!, {r0 - r3, pc}^
+2: bl down_write_failed
+ mov r1, pc
+ orr r2, r1, #128
+ teqp r2, #0
+
+ ldr r3, [r0]
+ subs r3, r3, #"RW_LOCK_BIAS_STR"
+ str r3, [r0]
+ ldmeqfd sp!, {r0 - r3, pc}^
+ orrcs r1, r1, #0x20000000 @ Set carry
+ teqp r1, #0
+ bcc 2b
+ b 1b
+
+ .align 5
+ .globl __rwsem_wake
+__rwsem_wake:
+ stmfd sp!, {r0 - r3, lr}
+ mov r0, ip
+ beq 1f
+ bl rwsem_wake_readers
+ ldmfd sp!, {r0 - r3, pc}^
+1: bl rwsem_wake_writer
+ ldmfd sp!, {r0 - r3, pc}^
+
+ .previous
+ ");
+
+#else
+/* 32 bit version */
asm(" .section .text.lock, \"ax\"
.align 5
.globl __down_failed
@@ -382,3 +478,4 @@
.previous
");
+#endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/setup.c linux/arch/arm/kernel/setup.c
--- v2.4.0-test6/linux/arch/arm/kernel/setup.c Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/kernel/setup.c Sun Aug 13 09:54:15 2000
@@ -19,7 +19,7 @@
#include
#include
#include
-#include
+#include
#include "arch.h"
@@ -40,6 +40,7 @@
extern int _stext, _text, _etext, _edata, _end;
unsigned int processor_id;
+unsigned int compat;
unsigned int __machine_arch_type;
unsigned int system_rev;
unsigned int system_serial_low;
@@ -161,6 +162,11 @@
}
printk("Architecture: %s\n", list->name);
+ if (compat)
+ printk(KERN_WARNING "Using compatability code "
+ "scheduled for removal in v%d.%d.%d\n",
+ compat >> 24, (compat >> 12) & 0x3ff,
+ compat & 0x3ff);
return list;
}
@@ -304,12 +310,6 @@
char *from = default_command_line;
memset(&meminfo, 0, sizeof(meminfo));
-
-#if defined(CONFIG_ARCH_ARC)
- __machine_arch_type = MACH_TYPE_ARCHIMEDES;
-#elif defined(CONFIG_ARCH_A5K)
- __machine_arch_type = MACH_TYPE_A5K;
-#endif
setup_processor();
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/signal.c linux/arch/arm/kernel/signal.c
--- v2.4.0-test6/linux/arch/arm/kernel/signal.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/signal.c Sun Aug 13 09:54:15 2000
@@ -35,37 +35,38 @@
int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
{
+ int err = -EFAULT;;
+
if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
- return -EFAULT;
+ goto out;
+
if (from->si_code < 0)
return __copy_to_user(to, from, sizeof(siginfo_t));
- else {
- int err;
- /* If you change siginfo_t structure, please be sure
- this code is fixed accordingly.
- It should never copy any pad contained in the structure
- to avoid security leaks, but must copy the generic
- 3 ints plus the relevant union member. */
- err = __put_user(from->si_signo, &to->si_signo);
- err |= __put_user(from->si_errno, &to->si_errno);
- err |= __put_user((short)from->si_code, &to->si_code);
- /* First 32bits of unions are always present. */
- err |= __put_user(from->si_pid, &to->si_pid);
- switch (from->si_code >> 16) {
- case __SI_FAULT >> 16:
- break;
- case __SI_CHLD >> 16:
- err |= __put_user(from->si_utime, &to->si_utime);
- err |= __put_user(from->si_stime, &to->si_stime);
- err |= __put_user(from->si_status, &to->si_status);
- default:
- err |= __put_user(from->si_uid, &to->si_uid);
- break;
- /* case __SI_RT: This is not generated by the kernel as of now. */
- }
- return err;
+ /* If you change siginfo_t structure, please be sure
+ this code is fixed accordingly.
+ It should never copy any pad contained in the structure
+ to avoid security leaks, but must copy the generic
+ 3 ints plus the relevant union member. */
+ err = __put_user(from->si_signo, &to->si_signo);
+ err |= __put_user(from->si_errno, &to->si_errno);
+ err |= __put_user((short)from->si_code, &to->si_code);
+ /* First 32bits of unions are always present. */
+ err |= __put_user(from->si_pid, &to->si_pid);
+ switch (from->si_code >> 16) {
+ case __SI_FAULT >> 16:
+ break;
+ case __SI_CHLD >> 16:
+ err |= __put_user(from->si_utime, &to->si_utime);
+ err |= __put_user(from->si_stime, &to->si_stime);
+ err |= __put_user(from->si_status, &to->si_status);
+ default:
+ err |= __put_user(from->si_uid, &to->si_uid);
+ break;
+ /* case __SI_RT: This is not generated by the kernel as of now. */
}
+out:
+ return err;
}
/*
@@ -175,24 +176,24 @@
{
int err = 0;
- err |= __get_user(regs->ARM_r0, &sc->arm_r0);
- err |= __get_user(regs->ARM_r1, &sc->arm_r1);
- err |= __get_user(regs->ARM_r2, &sc->arm_r2);
- err |= __get_user(regs->ARM_r3, &sc->arm_r3);
- err |= __get_user(regs->ARM_r4, &sc->arm_r4);
- err |= __get_user(regs->ARM_r5, &sc->arm_r5);
- err |= __get_user(regs->ARM_r6, &sc->arm_r6);
- err |= __get_user(regs->ARM_r7, &sc->arm_r7);
- err |= __get_user(regs->ARM_r8, &sc->arm_r8);
- err |= __get_user(regs->ARM_r9, &sc->arm_r9);
- err |= __get_user(regs->ARM_r10, &sc->arm_r10);
- err |= __get_user(regs->ARM_fp, &sc->arm_fp);
- err |= __get_user(regs->ARM_ip, &sc->arm_ip);
- err |= __get_user(regs->ARM_sp, &sc->arm_sp);
- err |= __get_user(regs->ARM_lr, &sc->arm_lr);
- err |= __get_user(regs->ARM_pc, &sc->arm_pc);
+ __get_user_error(regs->ARM_r0, &sc->arm_r0, err);
+ __get_user_error(regs->ARM_r1, &sc->arm_r1, err);
+ __get_user_error(regs->ARM_r2, &sc->arm_r2, err);
+ __get_user_error(regs->ARM_r3, &sc->arm_r3, err);
+ __get_user_error(regs->ARM_r4, &sc->arm_r4, err);
+ __get_user_error(regs->ARM_r5, &sc->arm_r5, err);
+ __get_user_error(regs->ARM_r6, &sc->arm_r6, err);
+ __get_user_error(regs->ARM_r7, &sc->arm_r7, err);
+ __get_user_error(regs->ARM_r8, &sc->arm_r8, err);
+ __get_user_error(regs->ARM_r9, &sc->arm_r9, err);
+ __get_user_error(regs->ARM_r10, &sc->arm_r10, err);
+ __get_user_error(regs->ARM_fp, &sc->arm_fp, err);
+ __get_user_error(regs->ARM_ip, &sc->arm_ip, err);
+ __get_user_error(regs->ARM_sp, &sc->arm_sp, err);
+ __get_user_error(regs->ARM_lr, &sc->arm_lr, err);
+ __get_user_error(regs->ARM_pc, &sc->arm_pc, err);
#ifdef CONFIG_CPU_32
- err |= __get_user(regs->ARM_cpsr, &sc->arm_cpsr);
+ __get_user_error(regs->ARM_cpsr, &sc->arm_cpsr, err);
#endif
err |= !valid_user_regs(regs);
@@ -289,30 +290,30 @@
{
int err = 0;
- err |= __put_user (regs->ARM_r0, &sc->arm_r0);
- err |= __put_user (regs->ARM_r1, &sc->arm_r1);
- err |= __put_user (regs->ARM_r2, &sc->arm_r2);
- err |= __put_user (regs->ARM_r3, &sc->arm_r3);
- err |= __put_user (regs->ARM_r4, &sc->arm_r4);
- err |= __put_user (regs->ARM_r5, &sc->arm_r5);
- err |= __put_user (regs->ARM_r6, &sc->arm_r6);
- err |= __put_user (regs->ARM_r7, &sc->arm_r7);
- err |= __put_user (regs->ARM_r8, &sc->arm_r8);
- err |= __put_user (regs->ARM_r9, &sc->arm_r9);
- err |= __put_user (regs->ARM_r10, &sc->arm_r10);
- err |= __put_user (regs->ARM_fp, &sc->arm_fp);
- err |= __put_user (regs->ARM_ip, &sc->arm_ip);
- err |= __put_user (regs->ARM_sp, &sc->arm_sp);
- err |= __put_user (regs->ARM_lr, &sc->arm_lr);
- err |= __put_user (regs->ARM_pc, &sc->arm_pc);
+ __put_user_error(regs->ARM_r0, &sc->arm_r0, err);
+ __put_user_error(regs->ARM_r1, &sc->arm_r1, err);
+ __put_user_error(regs->ARM_r2, &sc->arm_r2, err);
+ __put_user_error(regs->ARM_r3, &sc->arm_r3, err);
+ __put_user_error(regs->ARM_r4, &sc->arm_r4, err);
+ __put_user_error(regs->ARM_r5, &sc->arm_r5, err);
+ __put_user_error(regs->ARM_r6, &sc->arm_r6, err);
+ __put_user_error(regs->ARM_r7, &sc->arm_r7, err);
+ __put_user_error(regs->ARM_r8, &sc->arm_r8, err);
+ __put_user_error(regs->ARM_r9, &sc->arm_r9, err);
+ __put_user_error(regs->ARM_r10, &sc->arm_r10, err);
+ __put_user_error(regs->ARM_fp, &sc->arm_fp, err);
+ __put_user_error(regs->ARM_ip, &sc->arm_ip, err);
+ __put_user_error(regs->ARM_sp, &sc->arm_sp, err);
+ __put_user_error(regs->ARM_lr, &sc->arm_lr, err);
+ __put_user_error(regs->ARM_pc, &sc->arm_pc, err);
#ifdef CONFIG_CPU_32
- err |= __put_user (regs->ARM_cpsr, &sc->arm_cpsr);
+ __put_user_error(regs->ARM_cpsr, &sc->arm_cpsr, err);
#endif
- err |= __put_user (current->thread.trap_no, &sc->trap_no);
- err |= __put_user (current->thread.error_code, &sc->error_code);
- err |= __put_user (current->thread.address, &sc->fault_address);
- err |= __put_user (mask, &sc->oldmask);
+ __put_user_error(current->thread.trap_no, &sc->trap_no, err);
+ __put_user_error(current->thread.error_code, &sc->error_code, err);
+ __put_user_error(current->thread.address, &sc->fault_address, err);
+ __put_user_error(mask, &sc->oldmask, err);
return err;
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/kernel/traps.c linux/arch/arm/kernel/traps.c
--- v2.4.0-test6/linux/arch/arm/kernel/traps.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/kernel/traps.c Sun Aug 13 09:54:15 2000
@@ -30,7 +30,7 @@
extern void c_backtrace (unsigned long fp, int pmode);
-char *processor_modes[]=
+const char *processor_modes[]=
{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
"UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
"USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" ,
@@ -414,7 +414,7 @@
if (data)
printk(KERN_CRIT" - extra data = %p", data);
printk("\n");
- BUG();
+ *(int *)0 = 0;
}
void __readwrite_bug(const char *fn)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/lib/Makefile linux/arch/arm/lib/Makefile
--- v2.4.0-test6/linux/arch/arm/lib/Makefile Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/lib/Makefile Sun Aug 13 09:54:15 2000
@@ -4,6 +4,8 @@
# Copyright (C) 1995-1999 Russell King
#
+USE_STANDARD_AS_RULE := true
+
L_TARGET := lib.a
L_OBJS := changebit.o csumipv6.o csumpartial.o csumpartialcopy.o \
csumpartialcopyuser.o clearbit.o copy_page.o findbit.o \
@@ -35,9 +37,6 @@
L_OBJS += $(L_OBJS_$(MACHINE))
include $(TOPDIR)/Rules.make
-
-.S.o:
- $(CC) $(AFLAGS) -traditional -c -o $*.o $<
constants.h: getconsdata.o extractconstants.pl
$(PERL) extractconstants.pl $(OBJDUMP) > $@
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/lib/uaccess.S linux/arch/arm/lib/uaccess.S
--- v2.4.0-test6/linux/arch/arm/lib/uaccess.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/lib/uaccess.S Sun Aug 13 09:54:15 2000
@@ -76,20 +76,20 @@
blt .c2u_0rem8lp
.c2u_0cpy8lp: ldmia r1!, {r3 - r6}
- stmia r0!, {r3 - r6} @ Shouldn't fault
+ stmia r0!, {r3 - r6} @ Shouldnt fault
ldmia r1!, {r3 - r6}
- stmia r0!, {r3 - r6} @ Shouldn't fault
+ stmia r0!, {r3 - r6} @ Shouldnt fault
subs ip, ip, #32
bpl .c2u_0cpy8lp
.c2u_0rem8lp: cmn ip, #16
ldmgeia r1!, {r3 - r6}
- stmgeia r0!, {r3 - r6} @ Shouldn't fault
+ stmgeia r0!, {r3 - r6} @ Shouldnt fault
tst ip, #8
ldmneia r1!, {r3 - r4}
- stmneia r0!, {r3 - r4} @ Shouldn't fault
+ stmneia r0!, {r3 - r4} @ Shouldnt fault
tst ip, #4
ldrne r3, [r1], #4
- strnet r3, [r0], #4 @ Shouldn't fault
+ strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3
beq .c2u_0fupi
.c2u_0nowords: teq ip, #0
@@ -141,7 +141,7 @@
orr r5, r5, r6, lsl #24
mov r6, r6, lsr #8
orr r6, r6, r7, lsl #24
- stmia r0!, {r3 - r6} @ Shouldn't fault
+ stmia r0!, {r3 - r6} @ Shouldnt fault
subs ip, ip, #16
bpl .c2u_1cpy8lp
.c2u_1rem8lp: tst ip, #8
@@ -150,12 +150,12 @@
orrne r3, r3, r4, lsl #24
movne r4, r4, lsr #8
orrne r4, r4, r7, lsl #24
- stmneia r0!, {r3 - r4} @ Shouldn't fault
+ stmneia r0!, {r3 - r4} @ Shouldnt fault
tst ip, #4
movne r3, r7, lsr #8
ldrne r7, [r1], #4
orrne r3, r3, r7, lsl #24
- strnet r3, [r0], #4 @ Shouldn't fault
+ strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3
beq .c2u_1fupi
.c2u_1nowords: mov r3, r7, lsr #8
@@ -195,7 +195,7 @@
orr r5, r5, r6, lsl #16
mov r6, r6, lsr #16
orr r6, r6, r7, lsl #16
- stmia r0!, {r3 - r6} @ Shouldn't fault
+ stmia r0!, {r3 - r6} @ Shouldnt fault
subs ip, ip, #16
bpl .c2u_2cpy8lp
.c2u_2rem8lp: tst ip, #8
@@ -204,12 +204,12 @@
orrne r3, r3, r4, lsl #16
movne r4, r4, lsr #16
orrne r4, r4, r7, lsl #16
- stmneia r0!, {r3 - r4} @ Shouldn't fault
+ stmneia r0!, {r3 - r4} @ Shouldnt fault
tst ip, #4
movne r3, r7, lsr #16
ldrne r7, [r1], #4
orrne r3, r3, r7, lsl #16
- strnet r3, [r0], #4 @ Shouldn't fault
+ strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3
beq .c2u_2fupi
.c2u_2nowords: mov r3, r7, lsr #16
@@ -249,7 +249,7 @@
orr r5, r5, r6, lsl #8
mov r6, r6, lsr #24
orr r6, r6, r7, lsl #8
- stmia r0!, {r3 - r6} @ Shouldn't fault
+ stmia r0!, {r3 - r6} @ Shouldnt fault
subs ip, ip, #16
bpl .c2u_3cpy8lp
.c2u_3rem8lp: tst ip, #8
@@ -258,12 +258,12 @@
orrne r3, r3, r4, lsl #8
movne r4, r4, lsr #24
orrne r4, r4, r7, lsl #8
- stmneia r0!, {r3 - r4} @ Shouldn't fault
+ stmneia r0!, {r3 - r4} @ Shouldnt fault
tst ip, #4
movne r3, r7, lsr #24
ldrne r7, [r1], #4
orrne r3, r3, r7, lsl #8
- strnet r3, [r0], #4 @ Shouldn't fault
+ strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3
beq .c2u_3fupi
.c2u_3nowords: mov r3, r7, lsr #24
@@ -333,20 +333,20 @@
subs ip, ip, #32
blt .cfu_0rem8lp
-.cfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldn't fault
+.cfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault
stmia r0!, {r3 - r6}
- ldmia r1!, {r3 - r6} @ Shouldn't fault
+ ldmia r1!, {r3 - r6} @ Shouldnt fault
stmia r0!, {r3 - r6}
subs ip, ip, #32
bpl .cfu_0cpy8lp
.cfu_0rem8lp: cmn ip, #16
- ldmgeia r1!, {r3 - r6} @ Shouldn't fault
+ ldmgeia r1!, {r3 - r6} @ Shouldnt fault
stmgeia r0!, {r3 - r6}
tst ip, #8
- ldmneia r1!, {r3 - r4} @ Shouldn't fault
+ ldmneia r1!, {r3 - r4} @ Shouldnt fault
stmneia r0!, {r3 - r4}
tst ip, #4
- ldrnet r3, [r1], #4 @ Shouldn't fault
+ ldrnet r3, [r1], #4 @ Shouldnt fault
strne r3, [r0], #4
ands ip, ip, #3
beq .cfu_0fupi
@@ -392,7 +392,7 @@
blt .cfu_1rem8lp
.cfu_1cpy8lp: mov r3, r7, lsr #8
- ldmia r1!, {r4 - r7} @ Shouldn't fault
+ ldmia r1!, {r4 - r7} @ Shouldnt fault
orr r3, r3, r4, lsl #24
mov r4, r4, lsr #8
orr r4, r4, r5, lsl #24
@@ -405,7 +405,7 @@
bpl .cfu_1cpy8lp
.cfu_1rem8lp: tst ip, #8
movne r3, r7, lsr #8
- ldmneia r1!, {r4, r7} @ Shouldn't fault
+ ldmneia r1!, {r4, r7} @ Shouldnt fault
orrne r3, r3, r4, lsl #24
movne r4, r4, lsr #8
orrne r4, r4, r7, lsl #24
@@ -446,7 +446,7 @@
blt .cfu_2rem8lp
.cfu_2cpy8lp: mov r3, r7, lsr #16
- ldmia r1!, {r4 - r7} @ Shouldn't fault
+ ldmia r1!, {r4 - r7} @ Shouldnt fault
orr r3, r3, r4, lsl #16
mov r4, r4, lsr #16
orr r4, r4, r5, lsl #16
@@ -459,7 +459,7 @@
bpl .cfu_2cpy8lp
.cfu_2rem8lp: tst ip, #8
movne r3, r7, lsr #16
- ldmneia r1!, {r4, r7} @ Shouldn't fault
+ ldmneia r1!, {r4, r7} @ Shouldnt fault
orrne r3, r3, r4, lsl #16
movne r4, r4, lsr #16
orrne r4, r4, r7, lsl #16
@@ -500,7 +500,7 @@
blt .cfu_3rem8lp
.cfu_3cpy8lp: mov r3, r7, lsr #24
- ldmia r1!, {r4 - r7} @ Shouldn't fault
+ ldmia r1!, {r4 - r7} @ Shouldnt fault
orr r3, r3, r4, lsl #8
mov r4, r4, lsr #24
orr r4, r4, r5, lsl #8
@@ -513,7 +513,7 @@
bpl .cfu_3cpy8lp
.cfu_3rem8lp: tst ip, #8
movne r3, r7, lsr #24
- ldmneia r1!, {r4, r7} @ Shouldn't fault
+ ldmneia r1!, {r4, r7} @ Shouldnt fault
orrne r3, r3, r4, lsl #8
movne r4, r4, lsr #24
orrne r4, r4, r7, lsl #8
@@ -597,7 +597,7 @@
* or zero on exception, or n + 1 if too long
*/
ENTRY(__arch_strnlen_user)
- stmfd sp!, {lr}
+ str lr, [sp, #-4]!
mov r2, r0
1:
USER( ldrbt r3, [r0], #1)
@@ -623,7 +623,7 @@
* Returns : number of characters copied
*/
ENTRY(__arch_strncpy_from_user)
- stmfd sp!, {lr}
+ str lr, [sp, #-4]!
add ip, r1, #1
1: subs r2, r2, #1
bmi 2f
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/Makefile linux/arch/arm/mm/Makefile
--- v2.4.0-test6/linux/arch/arm/mm/Makefile Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/mm/Makefile Sun Aug 13 09:54:15 2000
@@ -7,8 +7,10 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
+USE_STANDARD_AS_RULE := true
+
O_TARGET := mm.o
-O_OBJS := consistent.o extable.o fault-$(PROCESSOR).o init.o \
+O_OBJS := extable.o fault-$(PROCESSOR).o init.o \
mm-$(PROCESSOR).o small_page.o
ifeq ($(CONFIG_CPU_26),y)
@@ -31,13 +33,10 @@
ifeq ($(CONFIG_CPU_SA1100),y)
P_OBJS += proc-sa110.o
endif
- O_OBJS += mm-$(MACHINE).o ioremap.o $(sort $(P_OBJS))
+ O_OBJS += mm-$(MACHINE).o consistent.o ioremap.o $(sort $(P_OBJS))
endif
include $(TOPDIR)/Rules.make
-
-.S.o:
- $(CC) $(AFLAGS) $(AFLAGS_$@) -traditional -c -o $*.o $<
# Special dependencies
fault-armv.o: fault-common.c
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/init.c linux/arch/arm/mm/init.c
--- v2.4.0-test6/linux/arch/arm/mm/init.c Wed Aug 9 19:19:49 2000
+++ linux/arch/arm/mm/init.c Sun Aug 13 09:54:15 2000
@@ -18,12 +18,10 @@
#include
#include
#include
-#ifdef CONFIG_BLK_DEV_INITRD
#include
-#endif
-#include
#include
+#include
#include
#include
#include
@@ -151,11 +149,18 @@
end = page + NODE_DATA(node)->node_size;
do {
- if (PageSkip(page)) {
- page = page->next_hash;
- if (page == NULL)
- break;
- }
+/* This is currently broken
+ * PG_skip is used on sparc/sparc64 architectures to "skip" certain
+ * parts of the address space.
+ *
+ * #define PG_skip 10
+ * #define PageSkip(page) (machine_is_riscpc() && test_bit(PG_skip, &(page)->flags))
+ * if (PageSkip(page)) {
+ * page = page->next_hash;
+ * if (page == NULL)
+ * break;
+ * }
+ */
total++;
if (PageReserved(page))
reserved++;
@@ -554,7 +559,7 @@
initpages = &__init_end - &__init_begin;
high_memory = (void *)__va(meminfo.end);
- max_mapnr = MAP_NR(high_memory);
+ max_mapnr = virt_to_page(high_memory) - mem_map;
/*
* We may have non-contiguous memory.
@@ -598,9 +603,9 @@
static inline void free_area(unsigned long addr, unsigned long end, char *s)
{
unsigned int size = (end - addr) >> 10;
- struct page *page = virt_to_page(addr);
- for (; addr < end; addr += PAGE_SIZE, page ++) {
+ for (; addr < end; addr += PAGE_SIZE) {
+ struct page *page = virt_to_page(addr);
ClearPageReserved(page);
set_page_count(page, 1);
free_page(addr);
@@ -608,18 +613,14 @@
}
if (size)
- printk(" %dk %s", size, s);
+ printk("Freeing %s memory: %dK\n", s, size);
}
void free_initmem(void)
{
- printk("Freeing unused kernel memory:");
-
free_area((unsigned long)(&__init_begin),
(unsigned long)(&__init_end),
"init");
-
- printk("\n");
}
#ifdef CONFIG_BLK_DEV_INITRD
@@ -628,17 +629,8 @@
void free_initrd_mem(unsigned long start, unsigned long end)
{
- unsigned long addr;
-
- if (!keep_initrd) {
- for (addr = start; addr < end; addr += PAGE_SIZE) {
- ClearPageReserved(virt_to_page(addr));
- set_page_count(virt_to_page(addr), 1);
- free_page(addr);
- totalram_pages++;
- }
- printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
- }
+ if (!keep_initrd)
+ free_area(start, end, "initrd");
}
static int __init keepinitrd_setup(char *__unused)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/mm-footbridge.c linux/arch/arm/mm/mm-footbridge.c
--- v2.4.0-test6/linux/arch/arm/mm/mm-footbridge.c Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/mm/mm-footbridge.c Sun Aug 13 09:54:15 2000
@@ -48,6 +48,28 @@
#else
/*
+ * The mapping when the footbridge is in add-in mode.
+ */
+#define MAPPING \
+ { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
+ { XBUS_BASE, 0x40000000, XBUS_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
+ { ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
+ { WFLUSH_BASE, DC21285_OUTBOUND_WRITE_FLUSH, WFLUSH_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
+ { FLASH_BASE, DC21285_FLASH, FLASH_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
+ { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, DOMAIN_IO, 0, 1, 0, 0 }
+
+#endif
+
+struct map_desc io_desc[] __initdata = {
+ MAPPING
+};
+
+unsigned int __initdata io_desc_size = SIZE(io_desc);
+
+
+#ifdef CONFIG_FOOTBRIDGE_ADDIN
+
+/*
* These two functions convert virtual addresses to PCI addresses
* and PCI addresses to virtual addresses. Note that it is only
* legal to use these on memory obtained via get_free_page or
@@ -78,22 +100,4 @@
return res;
}
-/*
- * The mapping when the footbridge is in add-in mode.
- */
-#define MAPPING \
- { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
- { XBUS_BASE, 0x40000000, XBUS_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
- { ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
- { WFLUSH_BASE, DC21285_OUTBOUND_WRITE_FLUSH, WFLUSH_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
- { FLASH_BASE, DC21285_FLASH, FLASH_SIZE, DOMAIN_IO, 0, 1, 0, 0 }, \
- { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, DOMAIN_IO, 0, 1, 0, 0 }
-
#endif
-
-struct map_desc io_desc[] __initdata = {
- MAPPING
-};
-
-unsigned int __initdata io_desc_size = SIZE(io_desc);
-
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/mm-l7200.c linux/arch/arm/mm/mm-l7200.c
--- v2.4.0-test6/linux/arch/arm/mm/mm-l7200.c Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/mm/mm-l7200.c Sun Aug 13 09:54:15 2000
@@ -1,9 +1,9 @@
/*
* arch/arm/mm/mm-lusl7200.c
*
- * Extra MM routines for LUSL7200 architecture
+ * Extra MM routines for L7200 architecture
*
- * Copyright (C) 2000 Steven J. Hill
+ * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
*/
#include
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/mm-sa1100.c linux/arch/arm/mm/mm-sa1100.c
--- v2.4.0-test6/linux/arch/arm/mm/mm-sa1100.c Thu Jul 27 17:37:59 2000
+++ linux/arch/arm/mm/mm-sa1100.c Sun Aug 13 09:54:15 2000
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
#include "map.h"
@@ -53,6 +54,15 @@
#endif
};
+static struct map_desc nanoengine_io_desc[] __initdata = {
+#ifdef CONFIG_SA1100_NANOENGINE
+ { 0xd0000000, 0x00000000, 0x02000000, DOMAIN_IO, 1, 1, 0, 0 }, /* Flash bank 0 */
+ { 0xd4000000, 0x10000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* System Registers */
+ { 0xdc000000, 0x18A00000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* Internal PCI Config Space */
+ SA1100_STD_IO_MAPPING
+#endif
+};
+
static struct map_desc bitsy_io_desc[] __initdata = {
#ifdef CONFIG_SA1100_BITSY
{ 0xd0000000, 0x00000000, 0x02000000, DOMAIN_IO, 1, 1, 0, 0 }, /* Flash bank 0 */
@@ -61,6 +71,14 @@
#endif
};
+static struct map_desc cerf_io_desc[] __initdata = {
+#ifdef CONFIG_SA1100_CERF
+ { 0xd8000000, 0x08000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* Crystal Chip */
+ { 0xd0000000, 0x00000000, 0x01000000, DOMAIN_IO, 1, 1, 0, 0 }, /* Flash bank 0 */
+ SA1100_STD_IO_MAPPING
+#endif
+};
+
static struct map_desc empeg_io_desc[] __initdata = {
#ifdef CONFIG_SA1100_EMPEG
{ EMPEG_FLASHBASE, 0x00000000, 0x00200000, DOMAIN_IO, 1, 1, 0, 0 }, /* Flash */
@@ -77,6 +95,14 @@
#endif
};
+static struct map_desc lart_io_desc[] __initdata = {
+#ifdef CONFIG_SA1100_LART
+ { 0xd0000000, 0x00000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /* main flash memory */
+ { 0xd8000000, 0x08000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /* main flash, alternative location */
+ SA1100_STD_IO_MAPPING
+#endif
+};
+
static struct map_desc thinclient_io_desc[] __initdata = {
#ifdef CONFIG_SA1100_THINCLIENT
#if 0
@@ -104,6 +130,14 @@
#endif
};
+static struct map_desc xp860_io_desc[] __initdata = {
+#ifdef CONFIG_SA1100_XP860
+ { 0xd8000000, 0x40000000, 0x00800000, DOMAIN_IO, 1, 1, 0, 0 }, /* SA-1111 */
+ { 0xda000000, 0x10000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* SCSI */
+ { 0xdc000000, 0x18000000, 0x00100000, DOMAIN_IO, 1, 1, 0, 0 }, /* LAN */
+ SA1100_STD_IO_MAPPING
+#endif
+};
static struct map_desc default_io_desc[] __initdata = {
SA1100_STD_IO_MAPPING
@@ -122,15 +156,24 @@
if( machine_is_assabet() ) {
memcpy( io_desc, assabet_io_desc, sizeof(assabet_io_desc) );
io_desc_size = SIZE(assabet_io_desc);
+ } else if( machine_is_nanoengine() ) {
+ memcpy( io_desc, nanoengine_io_desc, sizeof(nanoengine_io_desc) );
+ io_desc_size = SIZE(nanoengine_io_desc);
} else if( machine_is_bitsy() ) {
memcpy( io_desc, bitsy_io_desc, sizeof(bitsy_io_desc) );
io_desc_size = SIZE(bitsy_io_desc);
+ } else if( machine_is_cerf() ) {
+ memcpy( io_desc, cerf_io_desc, sizeof(cerf_io_desc) );
+ io_desc_size = SIZE(cerf_io_desc);
} else if( machine_is_empeg() ) {
memcpy( io_desc, empeg_io_desc, sizeof(empeg_io_desc) );
io_desc_size = SIZE(empeg_io_desc);
} else if( machine_is_graphicsclient() ) {
memcpy( io_desc, graphicsclient_io_desc, sizeof(graphicsclient_io_desc) );
io_desc_size = SIZE(graphicsclient_io_desc);
+ } else if( machine_is_lart() ) {
+ memcpy( io_desc, lart_io_desc, sizeof(lart_io_desc) );
+ io_desc_size = SIZE(lart_io_desc);
} else if( machine_is_thinclient() ) {
memcpy( io_desc, thinclient_io_desc, sizeof(thinclient_io_desc) );
io_desc_size = SIZE(thinclient_io_desc);
@@ -140,6 +183,9 @@
} else if( machine_is_victor() ) {
memcpy( io_desc, victor_io_desc, sizeof(victor_io_desc) );
io_desc_size = SIZE(victor_io_desc);
+ } else if( machine_is_xp860() ) {
+ memcpy( io_desc, xp860_io_desc, sizeof(xp860_io_desc) );
+ io_desc_size = SIZE(xp860_io_desc);
} else {
memcpy( io_desc, default_io_desc, sizeof(default_io_desc) );
io_desc_size = SIZE(default_io_desc);
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/proc-arm720.S linux/arch/arm/mm/proc-arm720.S
--- v2.4.0-test6/linux/arch/arm/mm/proc-arm720.S Mon Jul 10 16:47:19 2000
+++ linux/arch/arm/mm/proc-arm720.S Sun Aug 13 09:54:15 2000
@@ -10,11 +10,13 @@
* Changelog:
* 05-09-2000 SJH Created by moving 720 specific functions
* out of 'proc-arm6,7.S' per RSK discussion
+ * 07-25-2000 SJH Added idle function.
*/
#include
#include
#include
#include
+#include
#include "../lib/constants.h"
/*
@@ -127,8 +129,8 @@
add pc, pc, r2, lsr #22 @ Now branch to the relevent processing routine
movs pc, lr
- b Ldata_unknown
- b Ldata_unknown
+ b Ldata_lateldrhpost @ ldrh rd, [rn], #m/rm
+ b Ldata_lateldrhpre @ ldrh rd, [rn, #m/rm]
b Ldata_unknown
b Ldata_unknown
b Ldata_lateldrpostconst @ ldr rd, [rn], #m
@@ -142,6 +144,7 @@
b Ldata_simple @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m
b Ldata_simple @ ldc rd, [rn, #m]
b Ldata_unknown
+
Ldata_unknown: @ Part of jumptable
mov r0, r2
mov r1, r4
@@ -149,6 +152,33 @@
bl baddataabort
b ret_from_sys_call
+Ldata_lateldrhpre:
+ tst r4, #1 << 21 @ check writeback bit
+ beq Ldata_simple
+Ldata_lateldrhpost:
+ tst r4, #1 << 22 @ check if register or immediate offset
+ beq Ldata_lateldrhpostreg
+Ldata_lateldrhpostconst:
+ and r2, r4, #0xf @ load and clear low nibble of const offset
+ and r5, r4, #0xf00 @ load and clear high nibble of const offset
+ orrs r2, r2, r5, lsr #4 @ create offset
+ beq Ldata_simple @ don't have to do anything if zero
+ and r5, r4, #0xf << 16 @ get Rn
+ ldr r0, [sp, r5, lsr #14]
+ tst r4, #1 << 23 @ U bit
+ subne r7, r0, r2, lsr #20
+ addeq r7, r0, r2, lsr #20
+ b Ldata_saver7
+Ldata_lateldrhpostreg:
+ and r5, r4, #0xf
+ ldr r2, [sp, r5, lsl #2] @ get Rm
+ and r5, r4, #0xf << 16
+ ldr r0, [sp, r5, lsr #14] @ get Rn
+ tst r4, #1 << 23
+ subne r7, r0, r2
+ addeq r7, r0, r2
+ b Ldata_saver7
+
Ldata_lateldrpreconst:
tst r4, #1 << 21 @ check writeback bit
beq Ldata_simple
@@ -219,7 +249,6 @@
* Function: arm720_check_bugs (void)
* : arm720_proc_init (void)
* : arm720_proc_fin (void)
- * : arm720_proc_do_idle (void)
*
* Notes : This processor does not require these
*/
@@ -240,8 +269,22 @@
mcr p15, 0, r0, c1, c0, 0 @ disable caches
mov pc, lr
+/*
+ * Function: arm720_proc_do_idle (void)
+ *
+ * Params : r0 = call type:
+ * 0 = slow idle
+ * 1 = fast idle
+ * 2 = switch to slow processor clock
+ * 3 = switch to fast processor clock
+ *
+ * Purpose : put the processer in proper idle mode
+ */
ENTRY(cpu_arm720_do_idle)
- mov r0, #-EINVAL
+ ldr r2, =IO_BASE @ Virt addr of IO
+ add r2, r2, #0x00050000 @ Start of PMU regs
+ mov r1, #0x01 @ Idle mode
+ str r1, [r2, #4]
mov pc, lr
/*
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/mm/proc-sa110.S linux/arch/arm/mm/proc-sa110.S
--- v2.4.0-test6/linux/arch/arm/mm/proc-sa110.S Fri Jun 23 21:55:07 2000
+++ linux/arch/arm/mm/proc-sa110.S Sun Aug 13 09:54:15 2000
@@ -313,8 +313,8 @@
ldr r1, [r0] @ read instruction causing problem
mrc p15, 0, r0, c6, c0, 0 @ get FAR
mov r1, r1, lsr #19 @ b1 = L
- and r1, r1, #2
mrc p15, 0, r3, c5, c0, 0 @ get FSR
+ and r1, r1, #2
and r3, r3, #255
mov pc, lr
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/nwfpe/Makefile linux/arch/arm/nwfpe/Makefile
--- v2.4.0-test6/linux/arch/arm/nwfpe/Makefile Fri Oct 22 13:21:44 1999
+++ linux/arch/arm/nwfpe/Makefile Sun Aug 13 09:54:15 2000
@@ -4,6 +4,8 @@
# Copyright (C) 1998, 1999 Philip Blundell
#
+USE_STANDARD_AS_RULE := true
+
NWFPE_OBJS := fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o \
fpmodule.o fpopcode.o softfloat.o \
single_cpdo.o double_cpdo.o extended_cpdo.o
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/tools/gen-mach-types linux/arch/arm/tools/gen-mach-types
--- v2.4.0-test6/linux/arch/arm/tools/gen-mach-types Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/tools/gen-mach-types Sun Aug 13 09:54:15 2000
@@ -0,0 +1,73 @@
+#!/bin/awk
+#
+# Awk script to generate include/asm-arm/mach-types.h
+#
+BEGIN { nr = 0 }
+/^#/ { next }
+/^[ ]*$/ { next }
+
+NF == 4 {
+ machine_is[nr] = "machine_is_"$1;
+ config[nr] = "CONFIG_"$2;
+ mach_type[nr] = "MACH_TYPE_"$3;
+ num[nr] = $4; nr++
+ }
+
+NF == 3 {
+ machine_is[nr] = "machine_is_"$1;
+ config[nr] = "CONFIG_"$2;
+ mach_type[nr] = "MACH_TYPE_"$3;
+ num[nr] = ""; nr++
+ }
+
+
+END {
+ printf("/*\n");
+ printf(" * This was automagically generated from %s!\n", FILENAME);
+ printf(" * Do NOT edit\n");
+ printf(" */\n\n");
+ printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
+ printf("#define __ASM_ARM_MACH_TYPE_H\n\n");
+ printf("#include \n\n");
+ printf("#ifndef __ASSEMBLY__\n");
+ printf("/* The type of machine we're running on */\n");
+ printf("extern unsigned int __machine_arch_type;\n");
+ printf("#endif\n\n");
+
+ printf("/* see arch/arm/kernel/arch.c for a description of these */\n");
+ for (i = 0; i < nr; i++)
+ if (num[i] ~ /..*/)
+ printf("#define %-30s %d\n", mach_type[i], num[i]);
+
+ printf("\n");
+
+ for (i = 0; i < nr; i++)
+ if (num[i] ~ /..*/) {
+ printf("#ifdef %s\n", config[i]);
+ printf("# ifdef machine_arch_type\n");
+ printf("# undef machine_arch_type\n");
+ printf("# define machine_arch_type\t__machine_arch_type\n");
+ printf("# else\n");
+ printf("# define machine_arch_type\t%s\n", mach_type[i]);
+ printf("# endif\n");
+ printf("# define %s()\t(machine_arch_type == %s)\n", machine_is[i], mach_type[i]);
+ printf("#else\n");
+ printf("# define %s()\t(0)\n", machine_is[i]);
+ printf("#endif\n\n");
+ }
+
+ printf("/*\n * These have not yet been registered\n */\n");
+ for (i = 0; i < nr; i++)
+ if (num[i] !~ /..*/)
+ printf("/* #define %-30s <> */\n", mach_type[i]);
+
+ for (i = 0; i < nr; i++)
+ if (num[i] !~ /..*/) {
+ printf("#define %s()\t(0)\n", machine_is[i]);
+ }
+
+ printf("\n#ifndef machine_arch_type\n");
+ printf("#define machine_arch_type\t__machine_arch_type\n");
+ printf("#endif\n\n");
+ printf("#endif\n");
+ }
diff -u --recursive --new-file v2.4.0-test6/linux/arch/arm/tools/mach-types linux/arch/arm/tools/mach-types
--- v2.4.0-test6/linux/arch/arm/tools/mach-types Wed Dec 31 16:00:00 1969
+++ linux/arch/arm/tools/mach-types Sun Aug 13 09:54:15 2000
@@ -0,0 +1,44 @@
+# Database of machine macros and numbers
+#
+# To add an entry into this database, please see
+# Documentation/arm/README
+#
+# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
+#
+ebsa110 ARCH_EBSA110 EBSA110 0
+riscpc ARCH_RPC RISCPC 1
+nexuspci ARCH_NEXUSPCI NEXUSPCI 3
+ebsa285 ARCH_EBSA285 EBSA285 4
+netwinder ARCH_NETWINDER NETWINDER 5
+cats ARCH_CATS CATS 6
+tbox ARCH_TBOX TBOX 7
+co285 ARCH_CO285 CO285 8
+clps7110 ARCH_CLPS7110 CLPS7110 9
+arc ARCH_ARC ARCHIMEDES 10
+a5k ARCH_A5K A5K 11
+etoile ARCH_ETOILE ETOILE 12
+lacie_nas ARCH_LACIE_NAS LACIE_NAS 13
+clps7500 ARCH_CLPS7500 CLPS7500 14
+shark ARCH_SHARK SHARK 15
+brutus SA1100_BRUTUS BRUTUS 16
+personal_server ARCH_PERSONAL_SERVER PERSONAL_SERVER 17
+itsy SA1100_ITSY ITSY 18
+l7200 ARCH_L7200 L7200 19
+pleb SA1100_PLEB PLEB 20
+integrator ARCH_INTEGRATOR INTEGRATOR 21
+bitsy SA1100_BITSY BITSY 22
+ixp1200 ARCH_IXP1200 IXP1200 23
+thinclient SA1100_THINCLIENT THINCLIENT 24
+assabet SA1100_ASSABET ASSABET 25
+victor SA1100_VICTOR VICTOR 26
+lart SA1100_LART LART 27
+ranger ARCH_RANGER RANGER 28
+graphicsclient SA1100_GRAPHICSCLIENT GRAPHICSCLIENT 29
+xp860 SA1100_XP860 XP860 30
+cerf SA1100_CERF CERF 31
+nanoengine SA1100_NANOENGINE NANOENGINE 32
+
+# The following are unallocated
+empeg SA1100_EMPEG EMPEG
+tifon SA1100_TIFON TIFON
+penny SA1100_PENNY PENNY
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/Makefile linux/arch/i386/Makefile
--- v2.4.0-test6/linux/arch/i386/Makefile Wed Aug 9 19:19:49 2000
+++ linux/arch/i386/Makefile Fri Aug 18 09:30:51 2000
@@ -45,6 +45,10 @@
CFLAGS += $(shell if $(CC) -march=i586 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i586"; fi)
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)
+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)
endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/config.in linux/arch/i386/config.in
--- v2.4.0-test6/linux/arch/i386/config.in Fri Jul 14 12:12:05 2000
+++ linux/arch/i386/config.in Tue Aug 22 11:57:15 2000
@@ -30,7 +30,8 @@
"386 CONFIG_M386 \
486 CONFIG_M486 \
586/K5/5x86/6x86/6x86MX CONFIG_M586 \
- Pentium-Classic/Pentium-MMX CONFIG_M586TSC \
+ Pentium-Classic CONFIG_M586TSC \
+ Pentium-MMX CONFIG_M586MMX \
Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \
Pentium-III CONFIG_M686FXSR \
K6/K6-II/K6-III CONFIG_MK6 \
@@ -68,6 +69,13 @@
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_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_bool CONFIG_X86_TSC y
@@ -310,10 +318,15 @@
fi
endmenu
+#
+# 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
+
+source drivers/media/Config.in
source fs/Config.in
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/defconfig linux/arch/i386/defconfig
--- v2.4.0-test6/linux/arch/i386/defconfig Wed Aug 9 19:19:49 2000
+++ linux/arch/i386/defconfig Wed Aug 23 11:34:08 2000
@@ -25,6 +25,7 @@
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
CONFIG_M686=y
# CONFIG_M686FXSR is not set
# CONFIG_MK6 is not set
@@ -136,10 +137,8 @@
# CONFIG_IP_MULTICAST is not set
# 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_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
@@ -332,6 +331,7 @@
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set
#
@@ -353,6 +353,7 @@
# CONFIG_TULIP is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
+# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
@@ -427,6 +428,11 @@
# CONFIG_CD_NO_IDESCSI is not set
#
+# Input core support
+#
+# CONFIG_INPUT is not set
+
+#
# Character devices
#
CONFIG_VT=y
@@ -456,6 +462,10 @@
# Joysticks
#
# CONFIG_JOYSTICK is not set
+
+#
+# Input core support is needed for joysticks
+#
# CONFIG_QIC02_TAPE is not set
#
@@ -465,11 +475,6 @@
# 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_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
@@ -492,6 +497,15 @@
#
# CONFIG_PCMCIA_SERIAL_CS is not set
# CONFIG_PCMCIA_SERIAL_CB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_DEV is not set
#
# File systems
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/apic.c linux/arch/i386/kernel/apic.c
--- v2.4.0-test6/linux/arch/i386/kernel/apic.c Thu Jul 27 17:37:59 2000
+++ linux/arch/i386/kernel/apic.c Fri Aug 18 10:16:54 2000
@@ -7,7 +7,8 @@
* Maciej W. Rozycki : Bits for genuine 82489DX APICs;
* thanks to Eric Gilmore
* and Rolf G. Tews
- * for testing these extensively
+ * for testing these extensively.
+ * Maciej W. Rozycki : Various updates and fixes.
*/
#include
@@ -127,6 +128,67 @@
apic_write_around(APIC_SPIV, value);
}
+/*
+ * This is to verify that we're looking at a real local APIC.
+ * Check these against your board if the CPUs aren't getting
+ * started for no apparent reason.
+ */
+int __init verify_local_APIC(void)
+{
+ unsigned int reg0, reg1;
+
+ /*
+ * The version register is read-only in a real APIC.
+ */
+ reg0 = apic_read(APIC_LVR);
+ Dprintk("Getting VERSION: %x\n", reg0);
+ apic_write(APIC_LVR, reg0 ^ APIC_LVR_MASK);
+ reg1 = apic_read(APIC_LVR);
+ Dprintk("Getting VERSION: %x\n", reg1);
+
+ /*
+ * The two version reads above should print the same
+ * numbers. If the second one is different, then we
+ * poke at a non-APIC.
+ */
+ if (reg1 != reg0)
+ return 0;
+
+ /*
+ * Check if the version looks reasonably.
+ */
+ reg1 = GET_APIC_VERSION(reg0);
+ if (reg1 == 0x00 || reg1 == 0xff)
+ return 0;
+ reg1 = get_maxlvt();
+ if (reg1 < 0x02 || reg1 == 0xff)
+ return 0;
+
+ /*
+ * The ID register is read/write in a real APIC.
+ */
+ reg0 = apic_read(APIC_ID);
+ Dprintk("Getting ID: %x\n", reg0);
+ apic_write(APIC_ID, reg0 ^ APIC_ID_MASK);
+ reg1 = apic_read(APIC_ID);
+ Dprintk("Getting ID: %x\n", reg1);
+ apic_write(APIC_ID, reg0);
+ if (reg1 != (reg0 ^ APIC_ID_MASK))
+ return 0;
+
+ /*
+ * The next two are just to see if we have sane values.
+ * They're only really relevant if we're in Virtual Wire
+ * compatibility mode, but most boxes are anymore.
+ */
+ reg0 = apic_read(APIC_LVT0);
+ Dprintk("Getting LVT0: %x\n", reg0);
+ reg1 = apic_read(APIC_LVT1);
+ Dprintk("Getting LVT1: %x\n", reg1);
+
+ return 1;
+}
+
void __init sync_Arb_IDs(void)
{
/*
@@ -682,46 +744,28 @@
* This interrupt should never happen with our APIC/SMP architecture
*/
-static spinlock_t err_lock = SPIN_LOCK_UNLOCKED;
-
asmlinkage void smp_error_interrupt(void)
{
- unsigned long v;
-
- spin_lock(&err_lock);
+ unsigned long v, v1;
+ /* First tickle the hardware, only then report what went on. -- REW */
v = apic_read(APIC_ESR);
- printk(KERN_INFO "APIC error interrupt on CPU#%d, should never happen.\n",
- smp_processor_id());
- printk(KERN_INFO "... APIC ESR0: %08lx\n", v);
-
apic_write(APIC_ESR, 0);
- v |= apic_read(APIC_ESR);
- printk(KERN_INFO "... APIC ESR1: %08lx\n", v);
- /*
- * Be a bit more verbose. (multiple bits can be set)
- */
- if (v & 0x01)
- printk(KERN_INFO "... bit 0: APIC Send CS Error (hw problem).\n");
- if (v & 0x02)
- printk(KERN_INFO "... bit 1: APIC Receive CS Error (hw problem).\n");
- if (v & 0x04)
- printk(KERN_INFO "... bit 2: APIC Send Accept Error.\n");
- if (v & 0x08)
- printk(KERN_INFO "... bit 3: APIC Receive Accept Error.\n");
- if (v & 0x10)
- printk(KERN_INFO "... bit 4: Reserved!.\n");
- if (v & 0x20)
- printk(KERN_INFO "... bit 5: Send Illegal Vector (kernel bug).\n");
- if (v & 0x40)
- printk(KERN_INFO "... bit 6: Received Illegal Vector.\n");
- if (v & 0x80)
- printk(KERN_INFO "... bit 7: Illegal Register Address.\n");
-
+ v1 = apic_read(APIC_ESR);
ack_APIC_irq();
-
irq_err_count++;
- spin_unlock(&err_lock);
+ /* Here is what the APIC error bits mean:
+ 0: Send CS error
+ 1: Receive CS error
+ 2: Send accept error
+ 3: Receive accept error
+ 4: Reserved
+ 5: Send illegal vector
+ 6: Received illegal vector
+ 7: Illegal register address
+ */
+ printk (KERN_ERR "APIC error on CPU%d: %02lx(%02lx)\n",
+ smp_processor_id(), v , v1);
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.4.0-test6/linux/arch/i386/kernel/entry.S Wed Aug 9 19:19:49 2000
+++ linux/arch/i386/kernel/entry.S Fri Aug 11 14:38:31 2000
@@ -641,7 +641,8 @@
.long SYMBOL_NAME(sys_pivot_root)
.long SYMBOL_NAME(sys_mincore)
.long SYMBOL_NAME(sys_madvise)
-
+ .long SYMBOL_NAME(sys_getdents64) /* 220 */
+ .long SYMBOL_NAME(sys_fcntl64)
/*
* NOTE!! This doesn't have to be exact - we just have
@@ -649,6 +650,6 @@
* entries. Don't panic if you notice that this hasn't
* been shrunk every time we add a new system call.
*/
- .rept NR_syscalls-219
+ .rept NR_syscalls-221
.long SYMBOL_NAME(sys_ni_syscall)
.endr
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- v2.4.0-test6/linux/arch/i386/kernel/io_apic.c Wed Aug 9 19:19:49 2000
+++ linux/arch/i386/kernel/io_apic.c Mon Aug 21 08:57:35 2000
@@ -688,7 +688,7 @@
void __init UNEXPECTED_IO_APIC(void)
{
printk(KERN_WARNING " WARNING: unexpected IO-APIC, please mail\n");
- printk(KERN_WARNING " to linux-smp@vger.rutgers.edu\n");
+ printk(KERN_WARNING " to linux-smp@vger.kernel.org\n");
}
void __init print_IO_APIC(void)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/mca.c linux/arch/i386/kernel/mca.c
--- v2.4.0-test6/linux/arch/i386/kernel/mca.c Wed Apr 26 16:34:06 2000
+++ linux/arch/i386/kernel/mca.c Wed Aug 23 12:21:00 2000
@@ -15,7 +15,7 @@
*
* Chris Beauregard August 9th, 1996
* - Rewrote /proc/mca
- *
+ *
* Chris Beauregard January 7th, 1997
* - Added basic NMI-processing
* - Added more information to mca_info structure
@@ -30,8 +30,11 @@
* - Fixed the output of 'Driver Installed' in /proc/mca/pos
* - Made the Integrated Video & SCSI show up even if they have id 0000
*
- * AV November 9th, 1999
- * - switched to regular procfs methods.
+ * Alexander Viro November 9th, 1999
+ * - Switched to regular procfs methods
+ *
+ * Alfred Arnold & David Weinehall August 23rd, 2000
+ * - Added support for Planar POS-registers
*/
#include
@@ -50,9 +53,10 @@
#include
#include
-/* This structure holds MCA information. Each (plug-in) adapter has
+/* This structure holds MCA information. Each (plug-in) adapter has
* eight POS registers. Then the machine may have integrated video and
* SCSI subsystems, which also have eight POS registers.
+ * Finally, the motherboard (planar) has got POS-registers.
* Other miscellaneous information follows.
*/
@@ -92,7 +96,7 @@
/* The mca_info structure pointer. If MCA bus is present, the function
* mca_probe() is invoked. The function puts motherboard, then all
* adapters into setup mode, allocates and fills an MCA_info structure,
- * and points this pointer to the structure. Otherwise the pointer
+ * and points this pointer to the structure. Otherwise the pointer
* is set to zero.
*/
@@ -194,7 +198,7 @@
*/
/* Make sure the MCA bus is present */
-
+
if(!MCA_bus)
return;
printk("Micro Channel bus detected.\n");
@@ -216,7 +220,16 @@
outb_p(0, MCA_ADAPTER_SETUP_REG);
- /* Put motherboard into video setup mode, read integrated video
+ /* Read motherboard POS registers */
+
+ outb_p(0x7f, MCA_MOTHERBOARD_SETUP_REG);
+ mca_info->slot[MCA_MOTHERBOARD].name[0] = 0;
+ for(j=0; j<8; j++) {
+ mca_info->slot[MCA_MOTHERBOARD].pos[j] = inb_p(MCA_POS_REG(j));
+ }
+ mca_configure_adapter_status(MCA_MOTHERBOARD);
+
+ /* Put motherboard into video setup mode, read integrated video
* POS registers, and turn motherboard setup off.
*/
@@ -242,7 +255,7 @@
outb_p(0xf7, MCA_MOTHERBOARD_SETUP_REG);
mca_info->slot[MCA_INTEGSCSI].name[0] = 0;
for(j=0; j<8; j++) {
- if((mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j))) != 0xff)
+ if((mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j))) != 0xff)
{
/* 0xff all across means no device. 0x00 means
* something's broken, but a device is probably there.
@@ -256,17 +269,17 @@
mca_info->which_scsi = 0xf7;
}
}
- if(!mca_info->which_scsi) {
+ if(!mca_info->which_scsi) {
/* Didn't find it at 0xf7, try somewhere else... */
mca_info->which_scsi = 0xfd;
outb_p(0xfd, MCA_MOTHERBOARD_SETUP_REG);
- for(j=0; j<8; j++)
+ for(j=0; j<8; j++)
mca_info->slot[MCA_INTEGSCSI].pos[j] = inb_p(MCA_POS_REG(j));
}
mca_configure_adapter_status(MCA_INTEGSCSI);
-
+
/* Turn off motherboard setup */
outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG);
@@ -311,6 +324,9 @@
} else if(slot == MCA_INTEGVIDEO) {
printk("NMI: caused by MCA integrated video adapter (%s)\n",
mca_info->slot[slot].name);
+ } else if(slot == MCA_MOTHERBOARD) {
+ printk("NMI: caused by motherboard (%s)\n",
+ mca_info->slot[slot].name);
}
/* More info available in POS 6 and 7? */
@@ -375,7 +391,7 @@
*
* Disabled adapters are not reported.
*/
-
+
int mca_find_adapter(int id, int start)
{
if(mca_info == NULL || id == 0xffff) {
@@ -423,7 +439,7 @@
* to scan for further cards when some may already be driven.
*/
-int mca_find_unused_adapter(int id, int start)
+int mca_find_unused_adapter(int id, int start)
{
if(mca_info == NULL || id == 0xffff) {
return MCA_NOTFOUND;
@@ -450,7 +466,7 @@
}
return MCA_NOTFOUND;
-} /* mca_find_unused_adapter() */
+} /* mca_find_unused_adapter() */
EXPORT_SYMBOL(mca_find_unused_adapter);
@@ -465,8 +481,8 @@
* when it scanned the MCA space. The register value is returned.
* Missing or invalid registers report 0.
*/
-
-unsigned char mca_read_stored_pos(int slot, int reg)
+
+unsigned char mca_read_stored_pos(int slot, int reg)
{
if(slot < 0 || slot >= MCA_NUMADAPTERS || mca_info == NULL) return 0;
if(reg < 0 || reg >= 8) return 0;
@@ -487,9 +503,8 @@
* may not be invoked from interrupt context. It handles the
* deep magic required for onboard devices transparently.
*/
-
-unsigned char mca_read_pos(int slot, int reg)
+unsigned char mca_read_pos(int slot, int reg)
{
unsigned int byte = 0;
unsigned long flags;
@@ -524,6 +539,14 @@
byte = inb_p(MCA_POS_REG(reg));
outb_p(0xff, MCA_MOTHERBOARD_SETUP_REG);
+ } else if(slot == MCA_MOTHERBOARD) {
+
+ /* Disable adapter setup, enable motherboard setup */
+ outb_p(0, MCA_ADAPTER_SETUP_REG);
+ outb_p(0x7f, MCA_MOTHERBOARD_SETUP_REG);
+
+ byte = inb_p(MCA_POS_REG(reg));
+ outp_b(0xff, MCA_MOTHERBOARD_SETUP_REG);
} else if(slot < MCA_MAX_SLOT_NR) {
/* Make sure motherboard setup is off */
@@ -556,7 +579,7 @@
* @reg: register to read from
* @byte: byte to write to the POS registers
*
- * Store a POS value directly from the hardware. You should not
+ * Store a POS value directly from the hardware. You should not
* normally need to use this function and should have a very good
* knowledge of MCA bus before you do so. Doing this wrongly can
* damage the hardware.
@@ -574,7 +597,7 @@
* screws up.
*/
-void mca_write_pos(int slot, int reg, unsigned char byte)
+void mca_write_pos(int slot, int reg, unsigned char byte)
{
unsigned long flags;
@@ -615,11 +638,11 @@
* @name: text string for the namen
*
* This function sets the name reported via /proc for this
- * adapter slot. This is for user information only. Setting a
+ * adapter slot. This is for user information only. Setting a
* name deletes any previous name.
*/
-
-void mca_set_adapter_name(int slot, char* name)
+
+void mca_set_adapter_name(int slot, char* name)
{
if(mca_info == NULL) return;
@@ -640,7 +663,7 @@
/**
* mca_set_adapter_procfn - Set the /proc callback
* @slot: slot to configure
- * @procfn: callback function to call for /proc
+ * @procfn: callback function to call for /proc
* @dev: device information passed to the callback
*
* This sets up an information callback for /proc/mca/slot?. The
@@ -648,7 +671,7 @@
* some equally informative context information, or nothing, if you
* prefer), and is expected to put useful information into the
* buffer. The adapter name, ID, and POS registers get printed
- * before this is called though, so don't do it again.
+ * before this is called though, so don't do it again.
*
* This should be called with a %NULL @procfn when a module
* unregisters, thus preventing kernel crashes and other such
@@ -722,8 +745,8 @@
* Return the adapter description if set. If it has not been
* set or the slot is out range then return NULL.
*/
-
-char *mca_get_adapter_name(int slot)
+
+char *mca_get_adapter_name(int slot)
{
if(mca_info == NULL) return 0;
@@ -789,14 +812,12 @@
{
int i, j, len = 0;
- if(MCA_bus && mca_info != NULL)
- {
+ if(MCA_bus && mca_info != NULL) {
/* Format POS registers of eight MCA slots */
- for(i=0; islot[i].pos[j]);
len += sprintf(page+len, " %s\n", mca_info->slot[i].name);
}
@@ -804,19 +825,26 @@
/* Format POS registers of integrated video subsystem */
len += sprintf(page+len, "Video : ");
- for(j=0; j<8; j++)
+ for(j=0; j<8; j++)
len += sprintf(page+len, "%02x ", mca_info->slot[MCA_INTEGVIDEO].pos[j]);
len += sprintf(page+len, " %s\n", mca_info->slot[MCA_INTEGVIDEO].name);
/* Format POS registers of integrated SCSI subsystem */
-
+
len += sprintf(page+len, "SCSI : ");
for(j=0; j<8; j++)
len += sprintf(page+len, "%02x ", mca_info->slot[MCA_INTEGSCSI].pos[j]);
len += sprintf(page+len, " %s\n", mca_info->slot[MCA_INTEGSCSI].name);
+
+ /* Format POS registers of motherboard */
+
+ len += sprintf(page+len, "Planar: ");
+ for(j=0; j<8; j++)
+ len += sprintf(page+len, "%02x ", mca_info->slot[MCA_MOTHERBOARD].pos[j]);
+ len += sprintf(page+len, " %s\n", mca_info->slot[MCA_MOTHERBOARD].name);
} else {
/* Leave it empty if MCA not detected - this should *never*
- * happen!
+ * happen!
*/
}
@@ -843,6 +871,8 @@
len += sprintf(buf+len, "Integrated SCSI Adapter\n");
} else if(slot == MCA_INTEGVIDEO) {
len += sprintf(buf+len, "Integrated Video Adapter\n");
+ } else if(slot == MCA_MOTHERBOARD) {
+ len += sprintf(buf+len, "Motherboard\n");
}
if(p->name[0]) {
@@ -932,6 +962,7 @@
if(i < MCA_MAX_SLOT_NR) sprintf(p->procname,"slot%d", i+1);
else if(i == MCA_INTEGVIDEO) sprintf(p->procname,"video");
else if(i == MCA_INTEGSCSI) sprintf(p->procname,"scsi");
+ else if(i == MCA_MOTHERBOARD) sprintf(p->procname,"planar");
if(!mca_isadapter(i)) continue;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/microcode.c linux/arch/i386/kernel/microcode.c
--- v2.4.0-test6/linux/arch/i386/kernel/microcode.c Wed Aug 9 19:19:49 2000
+++ linux/arch/i386/kernel/microcode.c Tue Aug 22 11:45:12 2000
@@ -67,7 +67,7 @@
static void do_update_one(void *);
/* read()/write()/ioctl() are serialized on this */
-DECLARE_RWSEM(microcode_rwsem);
+static DECLARE_RWSEM(microcode_rwsem);
static struct microcode *microcode; /* array of 2048byte microcode blocks */
static unsigned int microcode_num; /* number of chunks in microcode */
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/mpparse.c linux/arch/i386/kernel/mpparse.c
--- v2.4.0-test6/linux/arch/i386/kernel/mpparse.c Tue May 23 15:31:33 2000
+++ linux/arch/i386/kernel/mpparse.c Mon Aug 21 08:57:35 2000
@@ -170,7 +170,7 @@
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
} else {
printk("Unknown bustype %s\n", str);
- panic("cannot handle bus - mail to linux-smp@vger.rutgers.edu");
+ panic("cannot handle bus - mail to linux-smp@vger.kernel.org");
}
}
@@ -565,7 +565,7 @@
address <<= 4;
smp_scan_config(address, 0x1000);
if (smp_found_config)
- printk(KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact linux-smp@vger.rutgers.edu if you experience SMP problems!\n");
+ printk(KERN_WARNING "WARNING: MP table in the EBDA can be UNSAFE, contact linux-smp@vger.kernel.org if you experience SMP problems!\n");
}
#else
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- v2.4.0-test6/linux/arch/i386/kernel/setup.c Thu Jul 27 17:37:59 2000
+++ linux/arch/i386/kernel/setup.c Wed Aug 23 09:51:45 2000
@@ -16,7 +16,7 @@
* Intel Mobile Pentium II detection fix. Sean Gilley, June 1999.
*
* IDT Winchip tweaks, misc clean ups.
- * Dave Jones , August 1999
+ * Dave Jones , August 1999
*
* Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
*
@@ -27,7 +27,7 @@
* David Parsons , July-August 1999
*
* Cleaned up cache-detection code
- * Dave Jones , October 1999
+ * Dave Jones , October 1999
*
* Added proper L2 cache detection for Coppermine
* Dragan Stancevic , October 1999
@@ -38,7 +38,7 @@
*
* Detection for Celeron coppermine, identify_cpu() overhauled,
* and a few other clean ups.
- * Dave Jones , April 2000
+ * Dave Jones , April 2000
*
* Pentium III FXSR, SSE support
* General FPU state handling cleanups
@@ -48,6 +48,9 @@
* and 8-way type cache happy bunch from Intel:^)
* Dragan Stancevic , May 2000
*
+ * Forward port AMD Duron errata T13 from 2.2.17pre
+ * Dave Jones , August 2000
+ *
*/
/*
@@ -380,8 +383,8 @@
}
}
-void __init add_memory_region(unsigned long start,
- unsigned long size, int type)
+void __init add_memory_region(unsigned long long start,
+ unsigned long long size, int type)
{
int x = e820.nr_map;
@@ -398,12 +401,12 @@
#define E820_DEBUG 1
-static void __init print_e820_map(void)
+static void __init print_memory_map(char *who)
{
int i;
for (i = 0; i < e820.nr_map; i++) {
- printk(" e820: %016Lx @ %016Lx ",
+ printk(" %s: %016Lx @ %016Lx ", who,
e820.map[i].size, e820.map[i].addr);
switch (e820.map[i].type) {
case E820_RAM: printk("(usable)\n");
@@ -449,7 +452,7 @@
unsigned long long start = biosmap->addr;
unsigned long long size = biosmap->size;
unsigned long long end = start + size;
- long type = biosmap->type;
+ unsigned long type = biosmap->type;
/* Overflow in 64 bits? Ignore the memory map. */
if (start > end)
@@ -460,12 +463,12 @@
* Not right. Fix it up.
*/
if (type == E820_RAM) {
- if (start < 0x100000 && end > 0xA0000) {
- if (start < 0xA0000)
- add_memory_region(start, 0xA0000-start, type);
- if (end < 0x100000)
+ if (start < 0x100000ULL && end > 0xA0000ULL) {
+ if (start < 0xA0000ULL)
+ add_memory_region(start, 0xA0000ULL-start, type);
+ if (end < 0x100000ULL)
continue;
- start = 0x100000;
+ start = 0x100000ULL;
size = end - start;
}
}
@@ -482,6 +485,8 @@
void __init setup_memory_region(void)
{
+ char *who = "BIOS-e820";
+
/*
* Try to copy the BIOS-supplied E820-map.
*
@@ -491,14 +496,21 @@
if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
unsigned long mem_size;
- mem_size = (ALT_MEM_K < EXT_MEM_K) ? EXT_MEM_K : ALT_MEM_K;
+ /* compare results from other methods and take the greater */
+ if (ALT_MEM_K < EXT_MEM_K) {
+ mem_size = EXT_MEM_K;
+ who = "BIOS-88";
+ } else {
+ mem_size = ALT_MEM_K;
+ who = "BIOS-e801";
+ }
e820.nr_map = 0;
add_memory_region(0, LOWMEMSIZE(), E820_RAM);
add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
}
printk("BIOS-provided physical RAM map:\n");
- print_e820_map();
+ print_memory_map(who);
} /* setup_memory_region */
@@ -568,7 +580,7 @@
*cmdline_p = command_line;
if (usermem) {
printk("user-defined physical RAM map:\n");
- print_e820_map();
+ print_memory_map("user");
}
}
@@ -925,7 +937,7 @@
break;
}
break;
- case 6: /* An Athlon. We can trust the BIOS probably */
+ case 6: /* An Athlon/Duron. We can trust the BIOS probably */
break;
}
@@ -936,10 +948,19 @@
edx>>24, ecx>>24, edx&0xFF);
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);
+
+ /* 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);
+ }
}
return r;
@@ -1538,7 +1559,7 @@
if(c->x86_vendor == X86_VENDOR_NEXGEN)
c->x86_cache_size = 256; /* A few had 1Mb.. */
-
+
for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) {
if (cpu_models[i].vendor == c->x86_vendor &&
cpu_models[i].x86 == c->x86) {
@@ -1570,8 +1591,8 @@
cyrix_model(&boot_cpu_data);
}
-
-
+
+
static char *cpu_vendor_names[] __initdata = {
"Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
diff -u --recursive --new-file v2.4.0-test6/linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- v2.4.0-test6/linux/arch/i386/kernel/smpboot.c Fri Jun 23 21:55:07 2000
+++ linux/arch/i386/kernel/smpboot.c Fri Aug 18 09:30:51 2000
@@ -883,39 +883,18 @@
phys_cpu_present_map |= (1 << hard_smp_processor_id());
}
- {
- int reg;
-
- /*
- * This is to verify that we're looking at
- * a real local APIC. Check these against
- * your board if the CPUs aren't getting
- * started for no apparent reason.
- */
-
- reg = apic_read(APIC_LVR);
- Dprintk("Getting VERSION: %x\n", reg);
-
- apic_write(APIC_LVR, 0);
- reg = apic_read(APIC_LVR);
- Dprintk("Getting VERSION: %x\n", reg);
-
- /*
- * The two version reads above should print the same
- * NON-ZERO!!! numbers. If the second one is zero,
- * there is a problem with the APIC write/read
- * definitions.
- *
- * The next two are just to see if we have sane values.
- * They're only really relevant if we're in Virtual Wire
- * compatibility mode, but most boxes are anymore.
- */
-
- reg = apic_read(APIC_LVT0);
- Dprintk("Getting LVT0: %x\n", reg);
-
- reg = apic_read(APIC_LVT1);
- Dprintk("Getting LVT1: %x\n", reg);
+ /*
+ * If we couldn't find a local APIC, then get out of here now!
+ */
+ if (!verify_local_APIC()) {
+ printk(KERN_ERR "BIOS bug, local APIC at 0x%lX not detected!...\n", mp_lapic_addr);
+ printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
+#ifndef CONFIG_VISWS
+ io_apic_irqs = 0;
+#endif
+ cpu_online_map = phys_cpu_present_map = 1;
+ smp_num_cpus = 1;
+ goto smp_done;
}
/*
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/config.in linux/arch/ia64/config.in
--- v2.4.0-test6/linux/arch/ia64/config.in Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/config.in Tue Aug 22 11:41:14 2000
@@ -18,15 +18,16 @@
comment 'General setup'
define_bool CONFIG_IA64 y
+define_bool CONFIG_SWIOTLB y # for now...
define_bool CONFIG_ISA n
define_bool CONFIG_SBUS n
choice 'IA-64 system type' \
- "Generic CONFIG_IA64_GENERIC \
+ "generic CONFIG_IA64_GENERIC \
+ DIG-compliant CONFIG_IA64_DIG \
HP-simulator CONFIG_IA64_HP_SIM \
- SN1-simulator CONFIG_IA64_SGI_SN1_SIM \
- DIG-compliant CONFIG_IA64_DIG" Generic
+ SN1-simulator CONFIG_IA64_SGI_SN1_SIM" generic
choice 'Kernel page size' \
"4KB CONFIG_IA64_PAGE_SIZE_4KB \
@@ -38,16 +39,18 @@
define_bool CONFIG_ITANIUM y
define_bool CONFIG_IA64_BRL_EMU y
bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC
- bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC
+ if [ "$CONFIG_ITANIUM_ASTEP_SPECIFIC" = "y" ]; then
+ bool ' Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC
+ fi
+ 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 ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR
bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG
bool ' Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS
bool ' Enable AzusA hacks' CONFIG_IA64_AZUSA_HACKS
- bool ' Emulate PAL/SAL/EFI firmware' CONFIG_IA64_FW_EMU
- bool ' Enable IA64 Machine Check Abort' CONFIG_IA64_MCA
-fi
-
-if [ "$CONFIG_IA64_GENERIC" = "y" ]; then
- define_bool CONFIG_IA64_SOFTSDV_HACKS y
+ bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA
fi
if [ "$CONFIG_IA64_SGI_SN1_SIM" = "y" ]; then
@@ -59,7 +62,7 @@
bool 'SMP support' CONFIG_SMP
bool 'Performance monitor support' CONFIG_PERFMON
-bool '/proc/palinfo support' CONFIG_IA64_PALINFO
+bool '/proc/pal support' CONFIG_IA64_PALINFO
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
@@ -161,9 +164,9 @@
#source drivers/misc/Config.in
-source fs/Config.in
+source drivers/media/Config.in
-source fs/nls/Config.in
+source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
@@ -188,6 +191,7 @@
endmenu
source drivers/usb/Config.in
+source drivers/input/Config.in
fi # !HP_SIM
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/dig/iosapic.c linux/arch/ia64/dig/iosapic.c
--- v2.4.0-test6/linux/arch/ia64/dig/iosapic.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/dig/iosapic.c Fri Aug 11 19:09:06 2000
@@ -22,12 +22,14 @@
#include
#include
+#include
+#include
#include
#include
+#include
+#include
#include
#include
-#include
-#include
#undef DEBUG_IRQ_ROUTING
@@ -315,10 +317,6 @@
*/
outb(0xff, 0xA1);
outb(0xff, 0x21);
-
-#ifndef CONFIG_IA64_DIG
- iosapic_init(IO_SAPIC_DEFAULT_ADDR);
-#endif
}
void
@@ -337,15 +335,23 @@
if (irq < 0 && dev->bus->parent) { /* go back to the bridge */
struct pci_dev * bridge = dev->bus->self;
- /* do the bridge swizzle... */
- pin = (pin + PCI_SLOT(dev->devfn)) % 4;
- irq = iosapic_get_PCI_irq_vector(bridge->bus->number,
- PCI_SLOT(bridge->devfn), pin);
+ /* allow for multiple bridges on an adapter */
+ do {
+ /* do the bridge swizzle... */
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ irq = iosapic_get_PCI_irq_vector(bridge->bus->number,
+ PCI_SLOT(bridge->devfn), pin);
+ } while (irq < 0 && (bridge = bridge->bus->self));
if (irq >= 0)
printk(KERN_WARNING
"PCI: using PPB(B%d,I%d,P%d) to get irq %02x\n",
bridge->bus->number, PCI_SLOT(bridge->devfn),
pin, irq);
+ else
+ printk(KERN_WARNING
+ "PCI: Couldn't map irq for B%d,I%d,P%d\n",
+ bridge->bus->number, PCI_SLOT(bridge->devfn),
+ pin);
}
if (irq >= 0) {
printk("PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %02x\n",
@@ -360,4 +366,35 @@
if (dev->irq >= NR_IRQS)
dev->irq = 15; /* Spurious interrupts */
}
+}
+
+/*
+ * Register an IOSAPIC discovered via ACPI.
+ */
+void __init
+dig_register_iosapic (acpi_entry_iosapic_t *iosapic)
+{
+ unsigned int ver, v;
+ int l, max_pin;
+
+ ver = iosapic_version(iosapic->address);
+ max_pin = (ver >> 16) & 0xff;
+
+ printk("IOSAPIC Version %x.%x: address 0x%lx IRQs 0x%x - 0x%x\n",
+ (ver & 0xf0) >> 4, (ver & 0x0f), iosapic->address,
+ iosapic->irq_base, iosapic->irq_base + max_pin);
+
+ for (l = 0; l <= max_pin; l++) {
+ v = iosapic->irq_base + l;
+ if (v < 16)
+ v = isa_irq_to_vector(v);
+ if (v > IA64_MAX_VECTORED_IRQ) {
+ printk(" !!! bad IOSAPIC interrupt vector: %u\n", v);
+ continue;
+ }
+ /* XXX Check for IOSAPIC collisions */
+ iosapic_addr(v) = (unsigned long) ioremap(iosapic->address, 0);
+ iosapic_baseirq(v) = iosapic->irq_base;
+ }
+ iosapic_init(iosapic->address, iosapic->irq_base);
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/dig/machvec.c linux/arch/ia64/dig/machvec.c
--- v2.4.0-test6/linux/arch/ia64/dig/machvec.c Thu Feb 10 17:11:03 2000
+++ linux/arch/ia64/dig/machvec.c Fri Aug 11 19:09:06 2000
@@ -1,4 +1,2 @@
+#define MACHVEC_PLATFORM_NAME dig
#include
-#include
-
-MACHVEC_DEFINE(dig)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/dig/setup.c linux/arch/ia64/dig/setup.c
--- v2.4.0-test6/linux/arch/ia64/dig/setup.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/dig/setup.c Fri Aug 11 19:09:06 2000
@@ -24,10 +24,6 @@
#include
#include
-#ifdef CONFIG_IA64_FW_EMU
-# include "../../kernel/fw-emu.c"
-#endif
-
/*
* This is here so we can use the CMOS detection in ide-probe.c to
* determine what drives are present. In theory, we don't need this
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/hp/hpsim_machvec.c linux/arch/ia64/hp/hpsim_machvec.c
--- v2.4.0-test6/linux/arch/ia64/hp/hpsim_machvec.c Thu Feb 10 17:11:03 2000
+++ linux/arch/ia64/hp/hpsim_machvec.c Fri Aug 11 19:09:06 2000
@@ -1,4 +1,2 @@
+#define MACHVEC_PLATFORM_NAME hpsim
#include
-#include
-
-MACHVEC_DEFINE(hpsim)
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/ia32/ia32_entry.S linux/arch/ia64/ia32/ia32_entry.S
--- v2.4.0-test6/linux/arch/ia64/ia32/ia32_entry.S Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/ia32/ia32_entry.S Fri Aug 11 19:09:06 2000
@@ -73,7 +73,7 @@
END(ia32_trace_syscall)
GLOBAL_ENTRY(sys32_vfork)
- alloc r16=ar.pfs,2,2,3,0;;
+ alloc r16=ar.pfs,2,2,4,0;;
mov out0=IA64_CLONE_VFORK|IA64_CLONE_VM|SIGCHLD // out0 = clone_flags
br.cond.sptk.few .fork1 // do the work
END(sys32_vfork)
@@ -105,7 +105,7 @@
.align 8
.globl ia32_syscall_table
ia32_syscall_table:
- data8 sys_ni_syscall /* 0 - old "setup(" system call*/
+ data8 sys32_ni_syscall /* 0 - old "setup(" system call*/
data8 sys_exit
data8 sys32_fork
data8 sys_read
@@ -122,25 +122,25 @@
data8 sys_mknod
data8 sys_chmod /* 15 */
data8 sys_lchown
- data8 sys_ni_syscall /* old break syscall holder */
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall /* old break syscall holder */
+ data8 sys32_ni_syscall
data8 sys_lseek
data8 sys_getpid /* 20 */
data8 sys_mount
data8 sys_oldumount
data8 sys_setuid
data8 sys_getuid
- data8 sys_ni_syscall /* sys_stime is not supported on IA64 */ /* 25 */
+ data8 sys32_ni_syscall /* sys_stime is not supported on IA64 */ /* 25 */
data8 sys32_ptrace
data8 sys32_alarm
- data8 sys_ni_syscall
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall
+ data8 sys32_ni_syscall
data8 ia32_utime /* 30 */
- data8 sys_ni_syscall /* old stty syscall holder */
- data8 sys_ni_syscall /* old gtty syscall holder */
+ data8 sys32_ni_syscall /* old stty syscall holder */
+ data8 sys32_ni_syscall /* old gtty syscall holder */
data8 sys_access
data8 sys_nice
- data8 sys_ni_syscall /* 35 */ /* old ftime syscall holder */
+ data8 sys32_ni_syscall /* 35 */ /* old ftime syscall holder */
data8 sys_sync
data8 sys_kill
data8 sys_rename
@@ -149,22 +149,22 @@
data8 sys_dup
data8 sys32_pipe
data8 sys32_times
- data8 sys_ni_syscall /* old prof syscall holder */
+ data8 sys32_ni_syscall /* old prof syscall holder */
data8 sys_brk /* 45 */
data8 sys_setgid
data8 sys_getgid
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall
data8 sys_geteuid
data8 sys_getegid /* 50 */
data8 sys_acct
data8 sys_umount /* recycled never used phys( */
- data8 sys_ni_syscall /* old lock syscall holder */
+ data8 sys32_ni_syscall /* old lock syscall holder */
data8 ia32_ioctl
- data8 sys_fcntl /* 55 */
- data8 sys_ni_syscall /* old mpx syscall holder */
+ data8 sys32_fcntl /* 55 */
+ data8 sys32_ni_syscall /* old mpx syscall holder */
data8 sys_setpgid
- data8 sys_ni_syscall /* old ulimit syscall holder */
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall /* old ulimit syscall holder */
+ data8 sys32_ni_syscall
data8 sys_umask /* 60 */
data8 sys_chroot
data8 sys_ustat
@@ -172,12 +172,12 @@
data8 sys_getppid
data8 sys_getpgrp /* 65 */
data8 sys_setsid
- data8 sys_ni_syscall
- data8 sys_ni_syscall
- data8 sys_ni_syscall
+ data8 sys32_sigaction
+ data8 sys32_ni_syscall
+ data8 sys32_ni_syscall
data8 sys_setreuid /* 70 */
data8 sys_setregid
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall
data8 sys_sigpending
data8 sys_sethostname
data8 sys32_setrlimit /* 75 */
@@ -189,7 +189,7 @@
data8 sys_setgroups
data8 old_select
data8 sys_symlink
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall
data8 sys_readlink /* 85 */
data8 sys_uselib
data8 sys_swapon
@@ -203,7 +203,7 @@
data8 sys_fchown /* 95 */
data8 sys_getpriority
data8 sys_setpriority
- data8 sys_ni_syscall /* old profil syscall holder */
+ data8 sys32_ni_syscall /* old profil syscall holder */
data8 sys32_statfs
data8 sys32_fstatfs /* 100 */
data8 sys_ioperm
@@ -214,11 +214,11 @@
data8 sys32_newstat
data8 sys32_newlstat
data8 sys32_newfstat
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall
data8 sys_iopl /* 110 */
data8 sys_vhangup
- data8 sys_ni_syscall // used to be sys_idle
- data8 sys_ni_syscall
+ data8 sys32_ni_syscall // used to be sys_idle
+ data8 sys32_ni_syscall
data8 sys32_wait4
data8 sys_swapoff /* 115 */
data8 sys_sysinfo
@@ -242,7 +242,7 @@
data8 sys_bdflush
data8 sys_sysfs /* 135 */
data8 sys_personality
- data8 sys_ni_syscall /* for afs_syscall */
+ data8 sys32_ni_syscall /* for afs_syscall */
data8 sys_setfsuid
data8 sys_setfsgid
data8 sys_llseek /* 140 */
@@ -293,8 +293,8 @@
data8 sys_capset /* 185 */
data8 sys_sigaltstack
data8 sys_sendfile
- data8 sys_ni_syscall /* streams1 */
- data8 sys_ni_syscall /* streams2 */
+ data8 sys32_ni_syscall /* streams1 */
+ data8 sys32_ni_syscall /* streams2 */
data8 sys32_vfork /* 190 */
/*
* CAUTION: If any system calls are added beyond this point
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/ia32/sys_ia32.c linux/arch/ia64/ia32/sys_ia32.c
--- v2.4.0-test6/linux/arch/ia64/ia32/sys_ia32.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/ia32/sys_ia32.c Fri Aug 11 19:09:06 2000
@@ -74,10 +74,14 @@
n = 0;
do {
- if ((err = get_user(addr, (int *)A(arg))) != 0)
- return(err);
- if (ap)
- *ap++ = (char *)A(addr);
+ err = get_user(addr, (int *)A(arg));
+ if (IS_ERR(err))
+ return err;
+ if (ap) { /* no access_ok needed, we allocated */
+ err = __put_user((char *)A(addr), ap++);
+ if (IS_ERR(err))
+ return err;
+ }
arg += sizeof(unsigned int);
n++;
} while (addr);
@@ -101,7 +105,11 @@
int na, ne, r, len;
na = nargs(argv, NULL);
+ if (IS_ERR(na))
+ return(na);
ne = nargs(envp, NULL);
+ if (IS_ERR(ne))
+ return(ne);
len = (na + ne + 2) * sizeof(*av);
/*
* kmalloc won't work because the `sys_exec' code will attempt
@@ -121,12 +129,21 @@
if (IS_ERR(av))
return (long)av;
ae = av + na + 1;
- av[na] = (char *)0;
- ae[ne] = (char *)0;
- (void)nargs(argv, av);
- (void)nargs(envp, ae);
+ r = __put_user(0, (av + na));
+ if (IS_ERR(r))
+ goto out;
+ r = __put_user(0, (ae + ne));
+ if (IS_ERR(r))
+ goto out;
+ r = nargs(argv, av);
+ if (IS_ERR(r))
+ goto out;
+ r = nargs(envp, ae);
+ if (IS_ERR(r))
+ goto out;
r = sys_execve(filename, av, ae, regs);
if (IS_ERR(r))
+out:
sys_munmap((unsigned long) av, len);
return(r);
}
@@ -711,7 +728,8 @@
};
static int
-filldir32 (void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
+filldir32 (void *__buf, const char *name, int namlen, off_t offset, ino_t ino,
+ unsigned int d_type)
{
struct linux32_dirent * dirent;
struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
@@ -959,150 +977,85 @@
}
struct iovec32 { unsigned int iov_base; int iov_len; };
+asmlinkage ssize_t sys_readv(unsigned long,const struct iovec *,unsigned long);
+asmlinkage ssize_t sys_writev(unsigned long,const struct iovec *,unsigned long);
-typedef ssize_t (*IO_fn_t)(struct file *, char *, size_t, loff_t *);
-
-static long
-do_readv_writev32(int type, struct file *file, const struct iovec32 *vector,
- u32 count)
+static struct iovec *
+get_iovec32(struct iovec32 *iov32, struct iovec *iov_buf, u32 count, int type)
{
- unsigned long tot_len;
- struct iovec iovstack[UIO_FASTIOV];
- struct iovec *iov=iovstack, *ivp;
- struct inode *inode;
- long retval, i;
- IO_fn_t fn;
+ int i;
+ u32 buf, len;
+ struct iovec *ivp, *iov;
+
+ /* Get the "struct iovec" from user memory */
- /* First get the "struct iovec" from user memory and
- * verify all the pointers
- */
if (!count)
return 0;
- if(verify_area(VERIFY_READ, vector, sizeof(struct iovec32)*count))
- return -EFAULT;
+ if(verify_area(VERIFY_READ, iov32, sizeof(struct iovec32)*count))
+ return(struct iovec *)0;
if (count > UIO_MAXIOV)
- return -EINVAL;
+ return(struct iovec *)0;
if (count > UIO_FASTIOV) {
iov = kmalloc(count*sizeof(struct iovec), GFP_KERNEL);
if (!iov)
- return -ENOMEM;
- }
+ return((struct iovec *)0);
+ } else
+ iov = iov_buf;
- tot_len = 0;
- i = count;
ivp = iov;
- while(i > 0) {
- u32 len;
- u32 buf;
-
- __get_user(len, &vector->iov_len);
- __get_user(buf, &vector->iov_base);
- tot_len += len;
+ for (i = 0; i < count; i++) {
+ if (__get_user(len, &iov32->iov_len) ||
+ __get_user(buf, &iov32->iov_base)) {
+ if (iov != iov_buf)
+ kfree(iov);
+ return((struct iovec *)0);
+ }
+ if (verify_area(type, (void *)A(buf), len)) {
+ if (iov != iov_buf)
+ kfree(iov);
+ return((struct iovec *)0);
+ }
ivp->iov_base = (void *)A(buf);
- ivp->iov_len = (__kernel_size_t) len;
- vector++;
- ivp++;
- i--;
- }
-
- inode = file->f_dentry->d_inode;
- /* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
- if (retval) {
- if (iov != iovstack)
- kfree(iov);
- return retval;
- }
-
- /* Then do the actual IO. Note that sockets need to be handled
- * specially as they have atomicity guarantees and can handle
- * iovec's natively
- */
- if (inode->i_sock) {
- int err;
- err = sock_readv_writev(type, inode, file, iov, count, tot_len);
- if (iov != iovstack)
- kfree(iov);
- return err;
- }
-
- if (!file->f_op) {
- if (iov != iovstack)
- kfree(iov);
- return -EINVAL;
- }
- /* VERIFY_WRITE actually means a read, as we write to user space */
- fn = file->f_op->read;
- if (type == VERIFY_READ)
- fn = (IO_fn_t) file->f_op->write;
- ivp = iov;
- while (count > 0) {
- void * base;
- int len, nr;
-
- base = ivp->iov_base;
- len = ivp->iov_len;
+ ivp->iov_len = (__kernel_size_t)len;
+ iov32++;
ivp++;
- count--;
- nr = fn(file, base, len, &file->f_pos);
- if (nr < 0) {
- if (retval)
- break;
- retval = nr;
- break;
- }
- retval += nr;
- if (nr != len)
- break;
}
- if (iov != iovstack)
- kfree(iov);
- return retval;
+ return(iov);
}
asmlinkage long
sys32_readv(int fd, struct iovec32 *vector, u32 count)
{
- struct file *file;
- long ret = -EBADF;
-
- file = fget(fd);
- if(!file)
- goto bad_file;
-
- if(!(file->f_mode & 1))
- goto out;
+ struct iovec iovstack[UIO_FASTIOV];
+ struct iovec *iov;
+ int ret;
+ mm_segment_t old_fs = get_fs();
- ret = do_readv_writev32(VERIFY_WRITE, file,
- vector, count);
-out:
- fput(file);
-bad_file:
+ if ((iov = get_iovec32(vector, iovstack, count, VERIFY_WRITE)) == (struct iovec *)0)
+ return -EFAULT;
+ set_fs(KERNEL_DS);
+ ret = sys_readv(fd, iov, count);
+ set_fs(old_fs);
+ if (iov != iovstack)
+ kfree(iov);
return ret;
}
asmlinkage long
sys32_writev(int fd, struct iovec32 *vector, u32 count)
{
- struct file *file;
- int ret = -EBADF;
-
- file = fget(fd);
- if(!file)
- goto bad_file;
-
- if(!(file->f_mode & 2))
- goto out;
+ struct iovec iovstack[UIO_FASTIOV];
+ struct iovec *iov;
+ int ret;
+ mm_segment_t old_fs = get_fs();
- down(&file->f_dentry->d_inode->i_sem);
- ret = do_readv_writev32(VERIFY_READ, file,
- vector, count);
- up(&file->f_dentry->d_inode->i_sem);
-out:
- fput(file);
-bad_file:
+ if ((iov = get_iovec32(vector, iovstack, count, VERIFY_READ)) == (struct iovec *)0)
+ return -EFAULT;
+ set_fs(KERNEL_DS);
+ ret = sys_writev(fd, iov, count);
+ set_fs(old_fs);
+ if (iov != iovstack)
+ kfree(iov);
return ret;
}
@@ -1173,21 +1126,22 @@
static inline int
shape_msg(struct msghdr *mp, struct msghdr32 *mp32)
{
+ int ret;
unsigned int i;
if (!access_ok(VERIFY_READ, mp32, sizeof(*mp32)))
return(-EFAULT);
- __get_user(i, &mp32->msg_name);
+ ret = __get_user(i, &mp32->msg_name);
mp->msg_name = (void *)A(i);
- __get_user(mp->msg_namelen, &mp32->msg_namelen);
- __get_user(i, &mp32->msg_iov);
+ ret |= __get_user(mp->msg_namelen, &mp32->msg_namelen);
+ ret |= __get_user(i, &mp32->msg_iov);
mp->msg_iov = (struct iovec *)A(i);
- __get_user(mp->msg_iovlen, &mp32->msg_iovlen);
- __get_user(i, &mp32->msg_control);
+ ret |= __get_user(mp->msg_iovlen, &mp32->msg_iovlen);
+ ret |= __get_user(i, &mp32->msg_control);
mp->msg_control = (void *)A(i);
- __get_user(mp->msg_controllen, &mp32->msg_controllen);
- __get_user(mp->msg_flags, &mp32->msg_flags);
- return(0);
+ ret |= __get_user(mp->msg_controllen, &mp32->msg_controllen);
+ ret |= __get_user(mp->msg_flags, &mp32->msg_flags);
+ return(ret ? -EFAULT : 0);
}
/*
@@ -2341,17 +2295,17 @@
{
struct switch_stack *swp;
struct pt_regs *ptp;
- int i, tos;
+ int i, tos, ret;
int fsrlo, fsrhi;
if (!access_ok(VERIFY_READ, save, sizeof(*save)))
return(-EIO);
- __get_user(tsk->thread.fcr, (unsigned int *)&save->cw);
- __get_user(fsrlo, (unsigned int *)&save->sw);
- __get_user(fsrhi, (unsigned int *)&save->tag);
+ ret = __get_user(tsk->thread.fcr, (unsigned int *)&save->cw);
+ ret |= __get_user(fsrlo, (unsigned int *)&save->sw);
+ ret |= __get_user(fsrhi, (unsigned int *)&save->tag);
tsk->thread.fsr = ((long)fsrhi << 32) | (long)fsrlo;
- __get_user(tsk->thread.fir, (unsigned int *)&save->ipoff);
- __get_user(tsk->thread.fdr, (unsigned int *)&save->dataoff);
+ ret |= __get_user(tsk->thread.fir, (unsigned int *)&save->ipoff);
+ ret |= __get_user(tsk->thread.fdr, (unsigned int *)&save->dataoff);
/*
* Stack frames start with 16-bytes of temp space
*/
@@ -2360,7 +2314,7 @@
tos = (tsk->thread.fsr >> 11) & 3;
for (i = 0; i < 8; i++)
get_fpreg(i, &save->_st[i], ptp, swp, tos);
- return(0);
+ return(ret ? -EFAULT : 0);
}
asmlinkage long sys_ptrace(long, pid_t, unsigned long, unsigned long, long, long, long, long, long);
@@ -2492,6 +2446,105 @@
return ret;
}
+static inline int
+get_flock32(struct flock *kfl, struct flock32 *ufl)
+{
+ int err;
+
+ err = get_user(kfl->l_type, &ufl->l_type);
+ err |= __get_user(kfl->l_whence, &ufl->l_whence);
+ err |= __get_user(kfl->l_start, &ufl->l_start);
+ err |= __get_user(kfl->l_len, &ufl->l_len);
+ err |= __get_user(kfl->l_pid, &ufl->l_pid);
+ return err;
+}
+
+static inline int
+put_flock32(struct flock *kfl, struct flock32 *ufl)
+{
+ int err;
+
+ err = __put_user(kfl->l_type, &ufl->l_type);
+ err |= __put_user(kfl->l_whence, &ufl->l_whence);
+ err |= __put_user(kfl->l_start, &ufl->l_start);
+ err |= __put_user(kfl->l_len, &ufl->l_len);
+ err |= __put_user(kfl->l_pid, &ufl->l_pid);
+ return err;
+}
+
+extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd,
+ unsigned long arg);
+
+asmlinkage long
+sys32_fcntl(unsigned int fd, unsigned int cmd, int arg)
+{
+ struct flock f;
+ mm_segment_t old_fs;
+ long ret;
+
+ switch (cmd) {
+ case F_GETLK:
+ case F_SETLK:
+ case F_SETLKW:
+ if(cmd != F_GETLK && get_flock32(&f, (struct flock32 *)((long)arg)))
+ return -EFAULT;
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
+ ret = sys_fcntl(fd, cmd, (unsigned long)&f);
+ set_fs(old_fs);
+ if(cmd == F_GETLK && put_flock32(&f, (struct flock32 *)((long)arg)))
+ return -EFAULT;
+ return ret;
+ default:
+ /*
+ * `sys_fcntl' lies about arg, for the F_SETOWN
+ * sub-function arg can have a negative value.
+ */
+ return sys_fcntl(fd, cmd, (unsigned long)((long)arg));
+ }
+}
+
+asmlinkage long
+sys32_sigaction (int sig, struct old_sigaction32 *act, struct old_sigaction32 *oact)
+{
+ struct k_sigaction new_ka, old_ka;
+ int ret;
+
+ if (act) {
+ old_sigset32_t mask;
+
+ ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler);
+ ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
+ ret |= __get_user(mask, &act->sa_mask);
+ if (ret)
+ return ret;
+ siginitset(&new_ka.sa.sa_mask, mask);
+ }
+
+ ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
+
+ if (!ret && oact) {
+ ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
+ ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
+ ret |= __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
+ }
+
+ return ret;
+}
+
+asmlinkage long sys_ni_syscall(void);
+
+asmlinkage long
+sys32_ni_syscall(int dummy0, int dummy1, int dummy2, int dummy3,
+ int dummy4, int dummy5, int dummy6, int dummy7, int stack)
+{
+ struct pt_regs *regs = (struct pt_regs *)&stack;
+
+ printk("IA32 syscall #%d issued, maybe we should implement it\n",
+ (int)regs->r1);
+ return(sys_ni_syscall());
+}
+
#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
/* In order to reduce some races, while at the same time doing additional
@@ -2545,61 +2598,6 @@
return sys_ioperm((unsigned long)from, (unsigned long)num, on);
}
-static inline int
-get_flock(struct flock *kfl, struct flock32 *ufl)
-{
- int err;
-
- err = get_user(kfl->l_type, &ufl->l_type);
- err |= __get_user(kfl->l_whence, &ufl->l_whence);
- err |= __get_user(kfl->l_start, &ufl->l_start);
- err |= __get_user(kfl->l_len, &ufl->l_len);
- err |= __get_user(kfl->l_pid, &ufl->l_pid);
- return err;
-}
-
-static inline int
-put_flock(struct flock *kfl, struct flock32 *ufl)
-{
- int err;
-
- err = __put_user(kfl->l_type, &ufl->l_type);
- err |= __put_user(kfl->l_whence, &ufl->l_whence);
- err |= __put_user(kfl->l_start, &ufl->l_start);
- err |= __put_user(kfl->l_len, &ufl->l_len);
- err |= __put_user(kfl->l_pid, &ufl->l_pid);
- return err;
-}
-
-extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd,
- unsigned long arg);
-
-asmlinkage long
-sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
- switch (cmd) {
- case F_GETLK:
- case F_SETLK:
- case F_SETLKW:
- {
- struct flock f;
- mm_segment_t old_fs;
- long ret;
-
- if(get_flock(&f, (struct flock32 *)arg))
- return -EFAULT;
- old_fs = get_fs(); set_fs (KERNEL_DS);
- ret = sys_fcntl(fd, cmd, (unsigned long)&f);
- set_fs (old_fs);
- if(put_flock(&f, (struct flock32 *)arg))
- return -EFAULT;
- return ret;
- }
- default:
- return sys_fcntl(fd, cmd, (unsigned long)arg);
- }
-}
-
struct dqblk32 {
__u32 dqb_bhardlimit;
__u32 dqb_bsoftlimit;
@@ -3861,40 +3859,6 @@
}
extern void check_pending(int signum);
-
-asmlinkage long
-sys32_sigaction (int sig, struct old_sigaction32 *act,
- struct old_sigaction32 *oact)
-{
- struct k_sigaction new_ka, old_ka;
- int ret;
-
- if(sig < 0) {
- current->tss.new_signal = 1;
- sig = -sig;
- }
-
- if (act) {
- old_sigset_t32 mask;
-
- ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler);
- ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
- ret |= __get_user(mask, &act->sa_mask);
- if (ret)
- return ret;
- siginitset(&new_ka.sa.sa_mask, mask);
- }
-
- ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
-
- if (!ret && oact) {
- ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
- ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
- ret |= __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
- }
-
- return ret;
-}
#ifdef CONFIG_MODULES
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/Makefile linux/arch/ia64/kernel/Makefile
--- v2.4.0-test6/linux/arch/ia64/kernel/Makefile Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/Makefile Fri Aug 11 19:09:06 2000
@@ -9,8 +9,8 @@
all: kernel.o head.o init_task.o
-obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \
- pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \
+obj-y := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_sapic.o ivt.o \
+ machvec.o pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \
signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o
obj-$(CONFIG_IA64_GENERIC) += machvec.o
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/acpi.c linux/arch/ia64/kernel/acpi.c
--- v2.4.0-test6/linux/arch/ia64/kernel/acpi.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/kernel/acpi.c Fri Aug 11 19:09:06 2000
@@ -19,10 +19,11 @@
#include
#include
-#include
#include
#include
#include
+#include
+#include
#undef ACPI_DEBUG /* Guess what this does? */
@@ -75,47 +76,6 @@
}
/*
- * Find all IOSAPICs and tag the iosapic_vector structure with the appropriate
- * base addresses.
- */
-static void __init
-acpi_iosapic(char *p)
-{
- /*
- * This is not good. ACPI is not necessarily limited to CONFIG_IA64_SV, yet
- * ACPI does not necessarily imply IOSAPIC either. Perhaps there should be
- * a means for platform_setup() to register ACPI handlers?
- */
-#ifdef CONFIG_IA64_DIG
- acpi_entry_iosapic_t *iosapic = (acpi_entry_iosapic_t *) p;
- unsigned int ver, v;
- int l, max_pin;
-
- ver = iosapic_version(iosapic->address);
- max_pin = (ver >> 16) & 0xff;
-
- printk("IOSAPIC Version %x.%x: address 0x%lx IRQs 0x%x - 0x%x\n",
- (ver & 0xf0) >> 4, (ver & 0x0f), iosapic->address,
- iosapic->irq_base, iosapic->irq_base + max_pin);
-
- for (l = 0; l <= max_pin; l++) {
- v = iosapic->irq_base + l;
- if (v < 16)
- v = isa_irq_to_vector(v);
- if (v > IA64_MAX_VECTORED_IRQ) {
- printk(" !!! bad IOSAPIC interrupt vector: %u\n", v);
- continue;
- }
- /* XXX Check for IOSAPIC collisions */
- iosapic_addr(v) = (unsigned long) ioremap(iosapic->address, 0);
- iosapic_baseirq(v) = iosapic->irq_base;
- }
- iosapic_init(iosapic->address, iosapic->irq_base);
-#endif
-}
-
-
-/*
* Configure legacy IRQ information in iosapic_vector
*/
static void __init
@@ -227,7 +187,7 @@
break;
case ACPI_ENTRY_IO_SAPIC:
- acpi_iosapic(p);
+ platform_register_iosapic((acpi_entry_iosapic_t *) p);
break;
case ACPI_ENTRY_INT_SRC_OVERRIDE:
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/efi.c linux/arch/ia64/kernel/efi.c
--- v2.4.0-test6/linux/arch/ia64/kernel/efi.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/kernel/efi.c Fri Aug 11 19:09:06 2000
@@ -33,9 +33,10 @@
extern efi_status_t efi_call_phys (void *, ...);
struct efi efi;
-
static efi_runtime_services_t *runtime;
+static unsigned long mem_limit = ~0UL;
+
static efi_status_t
phys_get_time (efi_time_t *tm, efi_time_cap_t *tc)
{
@@ -169,15 +170,13 @@
case EFI_BOOT_SERVICES_CODE:
case EFI_BOOT_SERVICES_DATA:
case EFI_CONVENTIONAL_MEMORY:
- if (md->phys_addr > 1024*1024*1024UL) {
- printk("Warning: ignoring %luMB of memory above 1GB!\n",
- md->num_pages >> 8);
- md->type = EFI_UNUSABLE_MEMORY;
- continue;
- }
-
if (!(md->attribute & EFI_MEMORY_WB))
continue;
+ if (md->phys_addr + (md->num_pages << 12) > mem_limit) {
+ if (md->phys_addr > mem_limit)
+ continue;
+ md->num_pages = (mem_limit - md->phys_addr) >> 12;
+ }
if (md->num_pages == 0) {
printk("efi_memmap_walk: ignoring empty region at 0x%lx",
md->phys_addr);
@@ -224,8 +223,8 @@
* ITR to enable safe PAL calls in virtual mode. See IA-64 Processor
* Abstraction Layer chapter 11 in ADAG
*/
-static void
-map_pal_code (void)
+void
+efi_map_pal_code (void)
{
void *efi_map_start, *efi_map_end, *p;
efi_memory_desc_t *md;
@@ -240,13 +239,14 @@
for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
md = p;
- if (md->type != EFI_PAL_CODE) continue;
+ if (md->type != EFI_PAL_CODE)
+ continue;
if (++pal_code_count > 1) {
printk(KERN_ERR "Too many EFI Pal Code memory ranges, dropped @ %lx\n",
md->phys_addr);
continue;
- }
+ }
mask = ~((1 << _PAGE_SIZE_4M)-1); /* XXX should be dynamic? */
vaddr = PAGE_OFFSET + md->phys_addr;
@@ -281,9 +281,28 @@
efi_config_table_t *config_tables;
efi_char16_t *c16;
u64 efi_desc_size;
- char vendor[100] = "unknown";
+ char *cp, *end, vendor[100] = "unknown";
+ extern char saved_command_line[];
int i;
+ /* it's too early to be able to use the standard kernel command line support... */
+ for (cp = saved_command_line; *cp; ) {
+ if (memcmp(cp, "mem=", 4) == 0) {
+ cp += 4;
+ mem_limit = memparse(cp, &end) - 1;
+ if (end != cp)
+ break;
+ cp = end;
+ } else {
+ while (*cp != ' ' && *cp)
+ ++cp;
+ while (*cp == ' ')
+ ++cp;
+ }
+ }
+ if (mem_limit != ~0UL)
+ printk("Ignoring memory above %luMB\n", mem_limit >> 20);
+
efi.systab = __va(ia64_boot_param.efi_systab);
/*
@@ -359,7 +378,7 @@
}
#endif
- map_pal_code();
+ efi_map_pal_code();
}
void
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/entry.S linux/arch/ia64/kernel/entry.S
--- v2.4.0-test6/linux/arch/ia64/kernel/entry.S Wed Aug 9 19:19:49 2000
+++ linux/arch/ia64/kernel/entry.S Fri Aug 11 19:09:06 2000
@@ -106,29 +106,19 @@
alloc r16=ar.pfs,1,0,0,0
DO_SAVE_SWITCH_STACK
UNW(.body)
- // disable interrupts to ensure atomicity for next few instructions:
- mov r17=psr // M-unit
- ;;
- rsm psr.i // M-unit
- dep r18=-1,r0,0,61 // build mask 0x1fffffffffffffff
- ;;
- srlz.d
- ;;
+
adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13
+ dep r18=-1,r0,0,61 // build mask 0x1fffffffffffffff
adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
;;
st8 [r22]=sp // save kernel stack pointer of old task
ld8 sp=[r21] // load kernel stack pointer of new task
and r20=in0,r18 // physical address of "current"
;;
+ mov ar.k6=r20 // copy "current" into ar.k6
mov r8=r13 // return pointer to previously running task
mov r13=in0 // set "current" pointer
- mov ar.k6=r20 // copy "current" into ar.k6
;;
- // restore interrupts
- mov psr.l=r17
- ;;
- srlz.d
DO_LOAD_SWITCH_STACK( )
br.ret.sptk.few rp
END(ia64_switch_to)
@@ -1207,7 +1197,7 @@
data8 sys_newlstat
data8 sys_newfstat
data8 sys_clone2
- data8 ia64_ni_syscall
+ data8 sys_getdents64
data8 ia64_ni_syscall // 1215
data8 ia64_ni_syscall
data8 ia64_ni_syscall
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/head.S linux/arch/ia64/kernel/head.S
--- v2.4.0-test6/linux/arch/ia64/kernel/head.S Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/head.S Fri Aug 11 19:09:06 2000
@@ -181,7 +181,9 @@
GLOBAL_ENTRY(ia64_load_debug_regs)
alloc r16=ar.pfs,1,0,0,0
+#if !(defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC))
lfetch.nta [in0]
+#endif
mov r20=ar.lc // preserve ar.lc
add r19=IA64_NUM_DBG_REGS*8,in0
mov ar.lc=IA64_NUM_DBG_REGS-1
@@ -702,3 +704,74 @@
SET_REG(b5);
#endif /* CONFIG_IA64_BRL_EMU */
+
+#ifdef CONFIG_SMP
+
+ /*
+ * This routine handles spinlock contention. It uses a simple exponential backoff
+ * algorithm to reduce unnecessary bus traffic. The initial delay is selected from
+ * the low-order bits of the cycle counter (a cheap "randomizer"). I'm sure this
+ * could use additional tuning, especially on systems with a large number of CPUs.
+ * Also, I think the maximum delay should be made a function of the number of CPUs in
+ * the system. --davidm 00/08/05
+ *
+ * WARNING: This is not a normal procedure. It gets called from C code without
+ * the compiler knowing about it. Thus, we must not use any scratch registers
+ * beyond those that were declared "clobbered" at the call-site (see spin_lock()
+ * macro). We may not even use the stacked registers, because that could overwrite
+ * output registers. Similarly, we can't use the scratch stack area as it may be
+ * in use, too.
+ *
+ * Inputs:
+ * ar.ccv = 0 (and available for use)
+ * r28 = available for use
+ * r29 = available for use
+ * r30 = non-zero (and available for use)
+ * r31 = address of lock we're trying to acquire
+ * p15 = available for use
+ */
+
+# define delay r28
+# define timeout r29
+# define tmp r30
+
+GLOBAL_ENTRY(ia64_spinlock_contention)
+ mov tmp=ar.itc
+ ;;
+ and delay=0x3f,tmp
+ ;;
+
+.retry: add timeout=tmp,delay
+ shl delay=delay,1
+ ;;
+ dep delay=delay,r0,0,13 // limit delay to 8192 cycles
+ ;;
+ // delay a little...
+.wait: sub tmp=tmp,timeout
+ or delay=0xf,delay // make sure delay is non-zero (otherwise we get stuck with 0)
+ ;;
+ cmp.lt p15,p0=tmp,r0
+ mov tmp=ar.itc
+(p15) br.cond.sptk .wait
+ ;;
+ ld1 tmp=[r31]
+ ;;
+ cmp.ne p15,p0=tmp,r0
+ mov tmp=ar.itc
+(p15) br.cond.sptk.few .retry // lock is still busy
+ ;;
+ // try acquiring lock (we know ar.ccv is still zero!):
+ mov tmp=1
+ ;;
+ IA64_SEMFIX_INSN
+ cmpxchg1.acq tmp=[r31],tmp,ar.ccv
+ ;;
+ cmp.eq p15,p0=tmp,r0
+
+ mov tmp=ar.itc
+(p15) br.ret.sptk.many b7 // got lock -> return
+ br .retry // still no luck, retry
+
+END(ia64_spinlock_contention)
+
+#endif
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/ia64_ksyms.c linux/arch/ia64/kernel/ia64_ksyms.c
--- v2.4.0-test6/linux/arch/ia64/kernel/ia64_ksyms.c Wed Aug 9 19:19:49 2000
+++ linux/arch/ia64/kernel/ia64_ksyms.c Fri Aug 11 19:09:06 2000
@@ -18,6 +18,7 @@
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strncpy);
+EXPORT_SYMBOL(strstr);
EXPORT_SYMBOL(strtok);
#include
@@ -37,6 +38,7 @@
EXPORT_SYMBOL(kernel_thread);
#ifdef CONFIG_SMP
+#include
EXPORT_SYMBOL(synchronize_irq);
#include
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/irq_ia64.c linux/arch/ia64/kernel/irq_ia64.c
--- v2.4.0-test6/linux/arch/ia64/kernel/irq_ia64.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/kernel/irq_ia64.c Fri Aug 11 19:09:06 2000
@@ -117,6 +117,13 @@
{
unsigned long bsp, sp;
+ /*
+ * Note: if the interrupt happened while executing in
+ * the context switch routine (ia64_switch_to), we may
+ * get a spurious stack overflow here. This is
+ * because the register and the memory stack are not
+ * switched atomically.
+ */
asm ("mov %0=ar.bsp" : "=r"(bsp));
asm ("mov %0=sp" : "=r"(sp));
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/ivt.S linux/arch/ia64/kernel/ivt.S
--- v2.4.0-test6/linux/arch/ia64/kernel/ivt.S Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/ivt.S Fri Aug 11 19:09:06 2000
@@ -170,33 +170,27 @@
* The ITLB basically does the same as the VHPT handler except
* that we always insert exactly one instruction TLB entry.
*/
-#if 1
/*
* Attempt to lookup PTE through virtual linear page table.
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r31=pr // save predicates
- ;;
- thash r17=r16 // compute virtual address of L3 PTE
+ mov r16=cr.iha // get virtual address of L3 PTE
;;
- ld8.s r18=[r17] // try to read L3 PTE
+ ld8.s r16=[r16] // try to read L3 PTE
+ mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r18 // did read succeed?
+ tnat.nz p6,p0=r16 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
- itc.i r18
+ itc.i r16
;;
mov pr=r31,-1
rfi
-1: rsm psr.dt // use physical addressing for data
-#else
- mov r16=cr.ifa // get address that caused the TLB miss
+1: mov r16=cr.ifa // get address that caused the TLB miss
;;
rsm psr.dt // use physical addressing for data
-#endif
- mov r31=pr // save the predicate registers
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
@@ -244,33 +238,27 @@
* The DTLB basically does the same as the VHPT handler except
* that we always insert exactly one data TLB entry.
*/
- mov r16=cr.ifa // get address that caused the TLB miss
-#if 1
/*
* Attempt to lookup PTE through virtual linear page table.
* The speculative access will fail if there is no TLB entry
* for the L3 page table page we're trying to access.
*/
- mov r31=pr // save predicates
- ;;
- thash r17=r16 // compute virtual address of L3 PTE
+ mov r16=cr.iha // get virtual address of L3 PTE
;;
- ld8.s r18=[r17] // try to read L3 PTE
+ ld8.s r16=[r16] // try to read L3 PTE
+ mov r31=pr // save predicates
;;
- tnat.nz p6,p0=r18 // did read succeed?
+ tnat.nz p6,p0=r16 // did read succeed?
(p6) br.cond.spnt.many 1f
;;
- itc.d r18
+ itc.d r16
;;
mov pr=r31,-1
rfi
-1: rsm psr.dt // use physical addressing for data
-#else
- rsm psr.dt // use physical addressing for data
- mov r31=pr // save the predicate registers
+1: mov r16=cr.ifa // get address that caused the TLB miss
;;
-#endif
+ 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
@@ -504,7 +492,24 @@
mov r29=b0 // save b0 in case of nested fault)
;;
1: ld8 r18=[r17]
- ;; // avoid raw on r18
+#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.
+ //
+ mov r31=pr // save predicates
+ ;;
+ tbit.nz p6,p0=r18,0 // page present bit set?
+(p6) br.cond.sptk 1f
+ ;; // avoid WAW on p6
+ mov pr=r31,-1
+ br.cond.sptk page_fault // page wasn't present
+1: mov pr=r31,-1
+#else
+ ;; // avoid RAW on r18
+#endif
or r18=_PAGE_A,r18 // set the accessed bit
mov b0=r29 // restore b0
;;
@@ -541,14 +546,6 @@
;;
srlz.d // ensure everyone knows psr.dt is off...
cmp.eq p0,p7=r16,r17 // is this a system call? (p7 <- false, if so)
-#if 1
- // Allow syscalls via the old system call number for the time being. This is
- // so we can transition to the new syscall number in a relatively smooth
- // fashion.
- mov r17=0x80000
- ;;
-(p7) cmp.eq.or.andcm p0,p7=r16,r17 // is this the old syscall number?
-#endif
(p7) br.cond.spnt.many non_syscall
SAVE_MIN // uses r31; defines r2:
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/machvec.c linux/arch/ia64/kernel/machvec.c
--- v2.4.0-test6/linux/arch/ia64/kernel/machvec.c Thu Feb 10 17:11:03 2000
+++ linux/arch/ia64/kernel/machvec.c Sun Aug 13 10:17:16 2000
@@ -1,14 +1,12 @@
+#include
#include
#include
#include
-struct ia64_machine_vector ia64_mv;
+#ifdef CONFIG_IA64_GENERIC
-void
-machvec_noop (void)
-{
-}
+struct ia64_machine_vector ia64_mv;
/*
* Most platforms use this routine for mapping page frame addresses
@@ -45,4 +43,11 @@
}
ia64_mv = *mv;
printk("booting generic kernel on platform %s\n", name);
+}
+
+#endif /* CONFIG_IA64_GENERIC */
+
+void
+machvec_noop (void)
+{
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/pal.S linux/arch/ia64/kernel/pal.S
--- v2.4.0-test6/linux/arch/ia64/kernel/pal.S Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/pal.S Fri Aug 11 19:09:06 2000
@@ -191,3 +191,57 @@
srlz.d // seralize restoration of psr.l
br.ret.sptk.few b0
END(ia64_pal_call_phys_static)
+
+/*
+ * Make a PAL call using the stacked registers in physical mode.
+ *
+ * Inputs:
+ * in0 Index of PAL service
+ * in2 - in3 Remaning PAL arguments
+ */
+GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
+ UNW(.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5))
+ alloc loc1 = ar.pfs,5,5,86,0
+ movl loc2 = pal_entry_point
+1: {
+ mov r28 = in0 // copy procedure index
+ mov loc0 = rp // save rp
+ }
+ .body
+ ;;
+ ld8 loc2 = [loc2] // loc2 <- entry point
+ mov out0 = in0 // first argument
+ mov out1 = in1 // copy arg2
+ mov out2 = in2 // copy arg3
+ mov out3 = in3 // copy arg3
+ ;;
+ mov loc3 = psr // save psr
+ ;;
+ mov loc4=ar.rsc // save RSE configuration
+ dep.z loc2=loc2,0,61 // convert pal entry point to physical
+ ;;
+ mov ar.rsc=r0 // put RSE in enforced lazy, LE mode
+ movl r16=PAL_PSR_BITS_TO_CLEAR
+ movl r17=PAL_PSR_BITS_TO_SET
+ ;;
+ or loc3=loc3,r17 // add in psr the bits to set
+ mov b7 = loc2 // install target to branch reg
+ ;;
+ andcm r16=loc3,r16 // removes bits to clear from psr
+ br.call.sptk.few rp=ia64_switch_mode
+.ret6:
+ br.call.sptk.many rp=b7 // now make the call
+.ret7:
+ mov ar.rsc=r0 // put RSE in enforced lazy, LE mode
+ mov r16=loc3 // r16= original psr
+ br.call.sptk.few rp=ia64_switch_mode // return to virtual mode
+
+.ret8: mov psr.l = loc3 // restore init PSR
+ mov ar.pfs = loc1
+ mov rp = loc0
+ ;;
+ mov ar.rsc=loc4 // restore RSE configuration
+ srlz.d // seralize restoration of psr.l
+ br.ret.sptk.few b0
+END(ia64_pal_call_phys_stacked)
+
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/palinfo.c linux/arch/ia64/kernel/palinfo.c
--- v2.4.0-test6/linux/arch/ia64/kernel/palinfo.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/kernel/palinfo.c Sun Aug 13 10:17:16 2000
@@ -16,24 +16,41 @@
* are empty for now.
* - remove hack to avoid problem with <= 256M RAM for itr.
*/
+#include
#include
#include
#include
#include
#include
+#include
+#if defined(MODVERSIONS)
+#include
+#endif
#include
#include
#include
#include
#include
+#ifdef CONFIG_SMP
+#include
+#endif
+
+MODULE_AUTHOR("Stephane Eranian ");
+MODULE_DESCRIPTION("/proc interface to IA-64 PAL");
/*
- * Hope to get rid of these in a near future
+ * Hope to get rid of this one in a near future
*/
#define IA64_PAL_VERSION_BUG 1
-#define PALINFO_VERSION "0.1"
+#define PALINFO_VERSION "0.3"
+
+#ifdef CONFIG_SMP
+#define cpu_is_online(i) (cpu_online_map & (1UL << i))
+#else
+#define cpu_is_online(i) 1
+#endif
typedef int (*palinfo_func_t)(char*);
@@ -43,7 +60,6 @@
struct proc_dir_entry *entry; /* registered entry (removal) */
} palinfo_entry_t;
-static struct proc_dir_entry *palinfo_dir;
/*
* A bunch of string array to get pretty printing
@@ -95,7 +111,7 @@
#define RSE_HINTS_COUNT (sizeof(rse_hints)/sizeof(const char *))
/*
- * The current resvision of the Volume 2 of
+ * The current revision of the Volume 2 of
* IA-64 Architecture Software Developer's Manual is wrong.
* Table 4-10 has invalid information concerning the ma field:
* Correct table is:
@@ -121,64 +137,31 @@
/*
* Allocate a buffer suitable for calling PAL code in Virtual mode
*
- * The documentation (PAL2.6) requires thius buffer to have a pinned
- * translation to avoid any DTLB faults. For this reason we allocate
- * a page (large enough to hold any possible reply) and use a DTC
- * to hold the translation during the call. A call the free_palbuffer()
- * is required to release ALL resources (page + translation).
- *
- * The size of the page allocated is based on the PAGE_SIZE defined
- * at compile time for the kernel, i.e. >= 4Kb.
+ * The documentation (PAL2.6) allows DTLB misses on the buffer. So
+ * using the TC is enough, no need to pin the entry.
*
- * Return: a pointer to the newly allocated page (virtual address)
+ * We allocate a kernel-sized page (at least 4KB). This is enough to
+ * hold any possible reply.
*/
-static void *
+static inline void *
get_palcall_buffer(void)
{
void *tmp;
tmp = (void *)__get_free_page(GFP_KERNEL);
if (tmp == 0) {
- printk(KERN_ERR "%s: can't get a buffer page\n", __FUNCTION__);
- } else if ( ((u64)tmp - PAGE_OFFSET) > (1<<_PAGE_SIZE_256M) ) { /* XXX: temporary hack */
- unsigned long flags;
-
- /* PSR.ic must be zero to insert new DTR */
- ia64_clear_ic(flags);
-
- /*
- * we only insert of DTR
- *
- * XXX: we need to figure out a way to "allocate" TR(s) to avoid
- * conflicts. Maybe something in an include file like pgtable.h
- * page.h or processor.h
- *
- * ITR0/DTR0: used for kernel code/data
- * ITR1/DTR1: used by HP simulator
- * ITR2/DTR2: used to map PAL code
- */
- ia64_itr(0x2, 3, (u64)tmp,
- pte_val(mk_pte_phys(__pa(tmp), __pgprot(__DIRTY_BITS|_PAGE_PL_0|_PAGE_AR_RW))), PAGE_SHIFT);
-
- ia64_srlz_d ();
-
- __restore_flags(flags);
- }
-
+ printk(KERN_ERR __FUNCTION__" : can't get a buffer page\n");
+ }
return tmp;
}
/*
* Free a palcall buffer allocated with the previous call
- *
- * The translation is also purged.
*/
-static void
+static inline void
free_palcall_buffer(void *addr)
{
__free_page(addr);
- ia64_ptr(0x2, (u64)addr, PAGE_SHIFT);
- ia64_srlz_d ();
}
/*
@@ -564,7 +547,6 @@
int i;
s64 ret;
- /* must be in physical mode */
if ((ret=ia64_pal_proc_get_features(&avail, &status, &control)) != 0) return 0;
for(i=0; i < 64; i++, v++,avail >>=1, status >>=1, control >>=1) {
@@ -577,6 +559,57 @@
return p - page;
}
+static const char *bus_features[]={
+ 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,NULL,
+ NULL,NULL,
+ "Request Bus Parking",
+ "Bus Lock Mask",
+ "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,
+ "Disable Transaction Queuing",
+ "Disable Reponse Error Checking",
+ "Disable Bus Error Checking",
+ "Disable Bus Requester Internal Error Signalling",
+ "Disable Bus Requester Error Signalling",
+ "Disable Bus Initialization Event Checking",
+ "Disable Bus Initialization Event Signalling",
+ "Disable Bus Address Error Checking",
+ "Disable Bus Address Error Signalling",
+ "Disable Bus Data Error Checking"
+};
+
+
+static int
+bus_info(char *page)
+{
+ char *p = page;
+ const char **v = bus_features;
+ pal_bus_features_u_t av, st, ct;
+ u64 avail, status, control;
+ int i;
+ s64 ret;
+
+ if ((ret=ia64_pal_bus_get_features(&av, &st, &ct)) != 0) return 0;
+
+ avail = av.pal_bus_features_val;
+ status = st.pal_bus_features_val;
+ control = ct.pal_bus_features_val;
+
+ for(i=0; i < 64; i++, v++, avail >>=1, status >>=1, control >>=1) {
+ if ( ! *v ) continue;
+ p += sprintf(p, "%-48s : %s%s %s\n", *v,
+ avail & 0x1 ? "" : "NotImpl",
+ avail & 0x1 ? (status & 0x1 ? "On" : "Off"): "",
+ avail & 0x1 ? (control & 0x1 ? "Ctrl" : "NoCtrl"): "");
+ }
+ return p - page;
+}
+
+
/*
* physical mode call for PAL_VERSION is working fine.
* This function is meant to go away once PAL get fixed.
@@ -613,21 +646,25 @@
#endif
if (status != 0) return 0;
- p += sprintf(p, "PAL_vendor : 0x%x (min=0x%x)\n" \
- "PAL_A revision : 0x%x (min=0x%x)\n" \
- "PAL_A model : 0x%x (min=0x%x)\n" \
- "PAL_B mode : 0x%x (min=0x%x)\n" \
- "PAL_B revision : 0x%x (min=0x%x)\n",
+ p += sprintf(p, "PAL_vendor : 0x%02x (min=0x%02x)\n" \
+ "PAL_A : %x.%x.%x (min=%x.%x.%x)\n" \
+ "PAL_B : %x.%x.%x (min=%x.%x.%x)\n",
cur_ver.pal_version_s.pv_pal_vendor,
min_ver.pal_version_s.pv_pal_vendor,
+
+ cur_ver.pal_version_s.pv_pal_a_model>>4,
+ cur_ver.pal_version_s.pv_pal_a_model&0xf,
cur_ver.pal_version_s.pv_pal_a_rev,
- cur_ver.pal_version_s.pv_pal_a_rev,
- cur_ver.pal_version_s.pv_pal_a_model,
- min_ver.pal_version_s.pv_pal_a_model,
+ min_ver.pal_version_s.pv_pal_a_model>>4,
+ min_ver.pal_version_s.pv_pal_a_model&0xf,
+ min_ver.pal_version_s.pv_pal_a_rev,
+
+ cur_ver.pal_version_s.pv_pal_b_model>>4,
+ cur_ver.pal_version_s.pv_pal_b_model&0xf,
cur_ver.pal_version_s.pv_pal_b_rev,
- min_ver.pal_version_s.pv_pal_b_rev,
- cur_ver.pal_version_s.pv_pal_b_model,
- min_ver.pal_version_s.pv_pal_b_model);
+ min_ver.pal_version_s.pv_pal_b_model>>4,
+ min_ver.pal_version_s.pv_pal_b_model&0xf,
+ min_ver.pal_version_s.pv_pal_b_rev);
return p - page;
}
@@ -648,6 +685,9 @@
}
#ifdef IA64_PAL_PERF_MON_INFO_BUG
+ /*
+ * This bug has been fixed in PAL 2.2.9 and higher
+ */
pm_buffer[5]=0x3;
pm_info.pal_perf_mon_info_s.cycles = 0x12;
pm_info.pal_perf_mon_info_s.retired = 0x08;
@@ -708,30 +748,111 @@
return p - page;
}
-
-/*
- * Entry point routine: all calls go trhough this function
- */
static int
-palinfo_read_entry(char *page, char **start, off_t off, int count, int *eof, void *data)
+tr_info(char *page)
{
- palinfo_func_t info = (palinfo_func_t)data;
- int len = info(page);
+ char *p = page;
+ s64 status;
+ pal_tr_valid_u_t tr_valid;
+ u64 tr_buffer[4];
+ pal_vm_info_1_u_t vm_info_1;
+ pal_vm_info_2_u_t vm_info_2;
+ int i, j;
+ u64 max[3], pgm;
+ struct ifa_reg {
+ u64 valid:1;
+ u64 ig:11;
+ u64 vpn:52;
+ } *ifa_reg;
+ struct itir_reg {
+ u64 rv1:2;
+ u64 ps:6;
+ u64 key:24;
+ u64 rv2:32;
+ } *itir_reg;
+ struct gr_reg {
+ u64 p:1;
+ u64 rv1:1;
+ u64 ma:3;
+ u64 a:1;
+ u64 d:1;
+ u64 pl:2;
+ u64 ar:3;
+ u64 ppn:38;
+ u64 rv2:2;
+ u64 ed:1;
+ u64 ig:11;
+ } *gr_reg;
+ struct rid_reg {
+ u64 ig1:1;
+ u64 rv1:1;
+ u64 ig2:6;
+ u64 rid:24;
+ u64 rv2:32;
+ } *rid_reg;
- if (len <= off+count) *eof = 1;
+ if ((status=ia64_pal_vm_summary(&vm_info_1, &vm_info_2)) !=0) {
+ printk("ia64_pal_vm_summary=%ld\n", status);
+ return 0;
+ }
+ max[0] = vm_info_1.pal_vm_info_1_s.max_itr_entry+1;
+ max[1] = vm_info_1.pal_vm_info_1_s.max_dtr_entry+1;
- *start = page + off;
- len -= off;
+ for (i=0; i < 2; i++ ) {
+ for (j=0; j < max[i]; j++) {
- if (len>count) len = count;
- if (len<0) len = 0;
+ status = ia64_pal_tr_read(j, i, tr_buffer, &tr_valid);
+ if (status != 0) {
+ printk(__FUNCTION__ " pal call failed on tr[%d:%d]=%ld\n", i, j, status);
+ continue;
+ }
- return len;
+ ifa_reg = (struct ifa_reg *)&tr_buffer[2];
+
+ if (ifa_reg->valid == 0) continue;
+
+ gr_reg = (struct gr_reg *)tr_buffer;
+ itir_reg = (struct itir_reg *)&tr_buffer[1];
+ rid_reg = (struct rid_reg *)&tr_buffer[3];
+
+ pgm = -1 << (itir_reg->ps - 12);
+ p += sprintf(p, "%cTR%d: av=%d pv=%d dv=%d mv=%d\n" \
+ "\tppn : 0x%lx\n" \
+ "\tvpn : 0x%lx\n" \
+ "\tps : ",
+
+ "ID"[i],
+ j,
+ tr_valid.pal_tr_valid_s.access_rights_valid,
+ tr_valid.pal_tr_valid_s.priv_level_valid,
+ tr_valid.pal_tr_valid_s.dirty_bit_valid,
+ tr_valid.pal_tr_valid_s.mem_attr_valid,
+ (gr_reg->ppn & pgm)<< 12,
+ (ifa_reg->vpn & pgm)<< 12);
+
+ p = bitvector_process(p, 1<< itir_reg->ps);
+
+ p += sprintf(p, "\n\tpl : %d\n" \
+ "\tar : %d\n" \
+ "\trid : %x\n" \
+ "\tp : %d\n" \
+ "\tma : %d\n" \
+ "\td : %d\n",
+ gr_reg->pl,
+ gr_reg->ar,
+ rid_reg->rid,
+ gr_reg->p,
+ gr_reg->ma,
+ gr_reg->d);
+ }
+ }
+ return p - page;
}
+
+
/*
- * List names,function pairs for every entry in /proc/palinfo
- * Must be terminated with the NULL,NULL entry.
+ * List {name,function} pairs for every entry in /proc/palinfo/cpu*
*/
static palinfo_entry_t palinfo_entries[]={
{ "version_info", version_info, },
@@ -742,38 +863,190 @@
{ "processor_info", processor_info, },
{ "perfmon_info", perfmon_info, },
{ "frequency_info", frequency_info, },
- { NULL, NULL,}
+ { "bus_info", bus_info },
+ { "tr_info", tr_info, }
};
+#define NR_PALINFO_ENTRIES (sizeof(palinfo_entries)/sizeof(palinfo_entry_t))
+
+/*
+ * this array is used to keep track of the proc entries we create. This is
+ * required in the module mode when we need to remove all entries. The procfs code
+ * does not do recursion of deletion
+ *
+ * Notes:
+ * - first +1 accounts for the cpuN entry
+ * - second +1 account for toplevel palinfo
+ *
+ */
+#define NR_PALINFO_PROC_ENTRIES (NR_CPUS*(NR_PALINFO_ENTRIES+1)+1)
+
+static struct proc_dir_entry *palinfo_proc_entries[NR_PALINFO_PROC_ENTRIES];
+
+/*
+ * This data structure is used to pass which cpu,function is being requested
+ * It must fit in a 64bit quantity to be passed to the proc callback routine
+ *
+ * In SMP mode, when we get a request for another CPU, we must call that
+ * other CPU using IPI and wait for the result before returning.
+ */
+typedef union {
+ u64 value;
+ struct {
+ unsigned req_cpu: 32; /* for which CPU this info is */
+ unsigned func_id: 32; /* which function is requested */
+ } pal_func_cpu;
+} pal_func_cpu_u_t;
+
+#define req_cpu pal_func_cpu.req_cpu
+#define func_id pal_func_cpu.func_id
+
+#ifdef CONFIG_SMP
+
+/*
+ * used to hold information about final function to call
+ */
+typedef struct {
+ palinfo_func_t func; /* pointer to function to call */
+ char *page; /* buffer to store results */
+ int ret; /* return value from call */
+} palinfo_smp_data_t;
+
+
+/*
+ * this function does the actual final call and he called
+ * from the smp code, i.e., this is the palinfo callback routine
+ */
+static void
+palinfo_smp_call(void *info)
+{
+ palinfo_smp_data_t *data = (palinfo_smp_data_t *)info;
+ /* printk(__FUNCTION__" called on CPU %d\n", smp_processor_id());*/
+ if (data == NULL) {
+ printk(KERN_ERR __FUNCTION__" data pointer is NULL\n");
+ data->ret = 0; /* no output */
+ return;
+ }
+ /* does this actual call */
+ data->ret = (*data->func)(data->page);
+}
+
+/*
+ * function called to trigger the IPI, we need to access a remote CPU
+ * Return:
+ * 0 : error or nothing to output
+ * otherwise how many bytes in the "page" buffer were written
+ */
+static
+int palinfo_handle_smp(pal_func_cpu_u_t *f, char *page)
+{
+ palinfo_smp_data_t ptr;
+ int ret;
+
+ ptr.func = palinfo_entries[f->func_id].proc_read;
+ ptr.page = page;
+ ptr.ret = 0; /* just in case */
+
+ /*printk(__FUNCTION__" calling CPU %d from CPU %d for function %d\n", f->req_cpu,smp_processor_id(), f->func_id);*/
+
+ /* will send IPI to other CPU and wait for completion of remote call */
+ if ((ret=smp_call_function_single(f->req_cpu, palinfo_smp_call, &ptr, 0, 1))) {
+ printk(__FUNCTION__" remote CPU call from %d to %d on function %d: error %d\n", smp_processor_id(), f->req_cpu, f->func_id, ret);
+ return 0;
+ }
+ return ptr.ret;
+}
+#else /* ! CONFIG_SMP */
+static
+int palinfo_handle_smp(pal_func_cpu_u_t *f, char *page)
+{
+ printk(__FUNCTION__" should not be called with non SMP kernel\n");
+ return 0;
+}
+#endif /* CONFIG_SMP */
+
+/*
+ * Entry point routine: all calls go through this function
+ */
+static int
+palinfo_read_entry(char *page, char **start, off_t off, int count, int *eof, void *data)
+{
+ int len=0;
+ pal_func_cpu_u_t *f = (pal_func_cpu_u_t *)&data;
+
+ MOD_INC_USE_COUNT;
+ /*
+ * in SMP mode, we may need to call another CPU to get correct
+ * information. PAL, by definition, is processor specific
+ */
+ if (f->req_cpu == smp_processor_id())
+ len = (*palinfo_entries[f->func_id].proc_read)(page);
+ else
+ len = palinfo_handle_smp(f, page);
+
+ if (len <= off+count) *eof = 1;
+
+ *start = page + off;
+ len -= off;
+
+ if (len>count) len = count;
+ if (len<0) len = 0;
+
+ MOD_DEC_USE_COUNT;
+
+ return len;
+}
static int __init
palinfo_init(void)
{
- palinfo_entry_t *p;
+# define CPUSTR "cpu%d"
+
+ pal_func_cpu_u_t f;
+ struct proc_dir_entry **pdir = palinfo_proc_entries;
+ struct proc_dir_entry *palinfo_dir, *cpu_dir;
+ int i, j;
+ char cpustr[sizeof(CPUSTR)];
printk(KERN_INFO "PAL Information Facility v%s\n", PALINFO_VERSION);
- palinfo_dir = create_proc_entry("palinfo", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
+ palinfo_dir = proc_mkdir("pal", NULL);
+
+ /*
+ * we keep track of created entries in a depth-first order for
+ * cleanup purposes. Each entry is stored into palinfo_proc_entries
+ */
+ for (i=0; i < NR_CPUS; i++) {
+
+ if (!cpu_is_online(i)) continue;
+
+ sprintf(cpustr,CPUSTR, i);
+
+ cpu_dir = proc_mkdir(cpustr, palinfo_dir);
- for (p = palinfo_entries; p->name ; p++){
- p->entry = create_proc_read_entry (p->name, 0, palinfo_dir,
- palinfo_read_entry, p->proc_read);
+ f.req_cpu = i;
+
+ for (j=0; j < NR_PALINFO_ENTRIES; j++) {
+ f.func_id = j;
+ *pdir++ = create_proc_read_entry (palinfo_entries[j].name, 0, cpu_dir,
+ palinfo_read_entry, (void *)f.value);
+ }
+ *pdir++ = cpu_dir;
}
+ *pdir = palinfo_dir;
return 0;
}
-static int __exit
+static void __exit
palinfo_exit(void)
{
- palinfo_entry_t *p;
+ int i = 0;
- for (p = palinfo_entries; p->name ; p++){
- remove_proc_entry (p->name, palinfo_dir);
+ /* remove all nodes: depth first pass */
+ for (i=0; i< NR_PALINFO_PROC_ENTRIES ; i++) {
+ remove_proc_entry (palinfo_proc_entries[i]->name, NULL);
}
- remove_proc_entry ("palinfo", 0);
-
- return 0;
}
module_init(palinfo_init);
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/pci-dma.c linux/arch/ia64/kernel/pci-dma.c
--- v2.4.0-test6/linux/arch/ia64/kernel/pci-dma.c Fri Jun 23 21:55:07 2000
+++ linux/arch/ia64/kernel/pci-dma.c Fri Aug 11 19:09:06 2000
@@ -3,34 +3,509 @@
*
* This implementation is for IA-64 platforms that do not support
* I/O TLBs (aka DMA address translation hardware).
- *
- * XXX This doesn't do the right thing yet. It appears we would have
- * to add additional zones so we can implement the various address
- * mask constraints that we might encounter. A zone for memory < 32
- * bits is obviously necessary...
+ * Copyright (C) 2000 Asit Mallick
+ * Copyright (C) 2000 Goutham Rao
*/
-#include
+#include
+
#include
-#include
#include
+#include
+#include
+#include
#include
+#include
+#include
+
+#ifdef CONFIG_SWIOTLB
+
+#include
+#include
+
+#define ALIGN(val, align) ((unsigned long) (((unsigned long) (val) + ((align) - 1)) & ~((align) - 1)))
+
+/*
+ * log of the size of each IO TLB slab. The number of slabs is command line
+ * controllable.
+ */
+#define IO_TLB_SHIFT 11
+
+/*
+ * Used to do a quick range check in pci_unmap_single and pci_sync_single, to see if the
+ * memory was in fact allocated by this API.
+ */
+static char *io_tlb_start, *io_tlb_end;
+
+/*
+ * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and io_tlb_end.
+ * This is command line adjustable via setup_io_tlb_npages.
+ */
+unsigned long io_tlb_nslabs = 1024;
+
+/*
+ * This is a free list describing the number of free entries available from each index
+ */
+static unsigned int *io_tlb_list;
+static unsigned int io_tlb_index;
+
+/*
+ * We need to save away the original address corresponding to a mapped entry for the sync
+ * operations.
+ */
+static unsigned char **io_tlb_orig_addr;
+
+/*
+ * Protect the above data structures in the map and unmap calls
+ */
+spinlock_t io_tlb_lock = SPIN_LOCK_UNLOCKED;
+
+static int __init
+setup_io_tlb_npages (char *str)
+{
+ io_tlb_nslabs = simple_strtoul(str, NULL, 0) << (PAGE_SHIFT - IO_TLB_SHIFT);
+ return 1;
+}
+__setup("swiotlb=", setup_io_tlb_npages);
+
+/*
+ * Statically reserve bounce buffer space and initialize bounce buffer
+ * data structures for the software IO TLB used to implement the PCI DMA API
+ */
+void
+setup_swiotlb (void)
+{
+ int i;
+
+ /*
+ * Get IO TLB memory from the low pages
+ */
+ io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs * (1 << IO_TLB_SHIFT));
+ if (!io_tlb_start)
+ BUG();
+ io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
+
+ /*
+ * Allocate and initialize the free list array. This array is used
+ * to find contiguous free memory regions of size 2^IO_TLB_SHIFT between
+ * io_tlb_start and io_tlb_end.
+ */
+ io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
+ for (i = 0; i < io_tlb_nslabs; i++)
+ io_tlb_list[i] = io_tlb_nslabs - i;
+ 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);
+}
+
+/*
+ * Allocates bounce buffer and returns its kernel virtual address.
+ */
+static void *
+__pci_map_single (struct pci_dev *hwdev, char *buffer, size_t size, int direction)
+{
+ unsigned long flags;
+ char *dma_addr;
+ unsigned int i, nslots, stride, index, wrap;
+
+ /*
+ * For mappings greater than a page size, we limit the stride (and hence alignment)
+ * to a page size.
+ */
+ nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
+ if (size > (1 << PAGE_SHIFT))
+ stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
+ else
+ stride = nslots;
+
+ if (!nslots)
+ BUG();
+
+ /*
+ * Find suitable number of IO TLB entries size that will fit this request and allocate a buffer
+ * from that IO TLB pool.
+ */
+ spin_lock_irqsave(&io_tlb_lock, flags);
+ {
+ wrap = index = ALIGN(io_tlb_index, stride);
+ do {
+ /*
+ * If we find a slot that indicates we have 'nslots' number of
+ * contiguous buffers, we allocate the buffers from that slot and mark the
+ * entries as '0' indicating unavailable.
+ */
+ if (io_tlb_list[index] >= nslots) {
+ for (i = index; i < index + nslots; i++)
+ io_tlb_list[i] = 0;
+ dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);
+
+ /*
+ * Update the indices to avoid searching in the next round.
+ */
+ io_tlb_index = (index + nslots) < io_tlb_nslabs ? (index + nslots) : 0;
+
+ goto found;
+ }
+ index += stride;
+ if (index >= io_tlb_nslabs)
+ index = 0;
+ } while (index != wrap);
+
+ /*
+ * XXX What is a suitable recovery mechanism here? We cannot
+ * sleep because we are called from with in interrupts!
+ */
+ panic("__pci_map_single: could not allocate software IO TLB (%ld bytes)", size);
+found:
+ }
+ spin_unlock_irqrestore(&io_tlb_lock, flags);
+
+ /*
+ * Save away the mapping from the original address to the DMA address. This is needed
+ * when we sync the memory. Then we sync the buffer if needed.
+ */
+ io_tlb_orig_addr[index] = buffer;
+ if (direction == PCI_DMA_TODEVICE || direction == PCI_DMA_BIDIRECTIONAL)
+ memcpy(dma_addr, buffer, size);
+
+ return dma_addr;
+}
+
+/*
+ * dma_addr is the kernel virtual address of the bounce buffer to unmap.
+ */
+static void
+__pci_unmap_single (struct pci_dev *hwdev, char *dma_addr, size_t size, int direction)
+{
+ unsigned long flags;
+ int i, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
+ int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
+ char *buffer = io_tlb_orig_addr[index];
+
+ /*
+ * First, sync the memory before unmapping the entry
+ */
+ if ((direction == PCI_DMA_FROMDEVICE) || (direction == PCI_DMA_BIDIRECTIONAL))
+ /*
+ * bounce... copy the data back into the original buffer
+ * and delete the bounce buffer.
+ */
+ memcpy(buffer, dma_addr, size);
+
+ /*
+ * Return the buffer to the free list by setting the corresponding entries to indicate
+ * the number of contigous entries available.
+ * While returning the entries to the free list, we merge the entries with slots below
+ * and above the pool being returned.
+ */
+ spin_lock_irqsave(&io_tlb_lock, flags);
+ {
+ int count = ((index + nslots) < io_tlb_nslabs ? io_tlb_list[index + nslots] : 0);
+ /*
+ * Step 1: return the slots to the free list, merging the slots with superceeding slots
+ */
+ for (i = index + nslots - 1; i >= index; i--)
+ io_tlb_list[i] = ++count;
+ /*
+ * Step 2: merge the returned slots with the preceeding slots, if available (non zero)
+ */
+ for (i = index - 1; (i >= 0) && io_tlb_list[i]; i--)
+ io_tlb_list[i] += io_tlb_list[index];
+ }
+ spin_unlock_irqrestore(&io_tlb_lock, flags);
+}
+
+static void
+__pci_sync_single (struct pci_dev *hwdev, char *dma_addr, size_t size, int direction)
+{
+ int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
+ char *buffer = io_tlb_orig_addr[index];
+
+ /*
+ * bounce... copy the data back into/from the original buffer
+ * XXX How do you handle PCI_DMA_BIDIRECTIONAL here ?
+ */
+ if (direction == PCI_DMA_FROMDEVICE)
+ memcpy(buffer, dma_addr, size);
+ else if (direction == PCI_DMA_TODEVICE)
+ memcpy(dma_addr, buffer, size);
+ else
+ BUG();
+}
+
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The PCI address to use is returned.
+ *
+ * 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.
+ */
+dma_addr_t
+pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+{
+ unsigned long pci_addr = virt_to_phys(ptr);
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /*
+ * Check if the PCI device can DMA to ptr... if so, just return ptr
+ */
+ if ((pci_addr & ~hwdev->dma_mask) == 0)
+ /*
+ * Device is bit capable of DMA'ing to the
+ * buffer... just return the PCI address of ptr
+ */
+ return pci_addr;
+
+ /*
+ * get a bounce buffer:
+ */
+ pci_addr = virt_to_phys(__pci_map_single(hwdev, ptr, size, direction));
+
+ /*
+ * Ensure that the address returned is DMA'ble:
+ */
+ if ((pci_addr & ~hwdev->dma_mask) != 0)
+ panic("__pci_map_single: bounce buffer is not DMA'ble");
+
+ return pci_addr;
+}
+
+/*
+ * Unmap a single streaming mode DMA translation. The dma_addr and size
+ * must match what was provided for in a previous pci_map_single call. All
+ * other usages are undefined.
+ *
+ * After this call, reads by the cpu to the buffer are guarenteed to see
+ * whatever the device wrote there.
+ */
+void
+pci_unmap_single (struct pci_dev *hwdev, dma_addr_t pci_addr, size_t size, int direction)
+{
+ char *dma_addr = phys_to_virt(pci_addr);
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
+ __pci_unmap_single(hwdev, dma_addr, size, direction);
+}
+
+/*
+ * Make physical memory consistent for a single
+ * streaming mode DMA translation after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the
+ * buffer using the cpu, yet do not wish to teardown the PCI dma
+ * mapping, you must call this function before doing so. At the
+ * next point you give the PCI dma address back to the card, the
+ * device again owns the buffer.
+ */
+void
+pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t pci_addr, size_t size, int direction)
+{
+ char *dma_addr = phys_to_virt(pci_addr);
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
+ __pci_sync_single(hwdev, dma_addr, size, direction);
+}
+
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA. This is the scather-gather version of the
+ * above pci_map_single interface. Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length. They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ * DMA address/length pairs than there are SG table elements.
+ * (for example via virtual mapping capabilities)
+ * The routine returns the number of addr/length pairs actually
+ * used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+int
+pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
+{
+ int i;
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ for (i = 0; i < nelems; i++, sg++) {
+ sg->orig_address = sg->address;
+ if ((virt_to_phys(sg->address) & ~hwdev->dma_mask) != 0) {
+ sg->address = __pci_map_single(hwdev, sg->address, sg->length, direction);
+ }
+ }
+ return nelems;
+}
+
+/*
+ * Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+void
+pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
+{
+ int i;
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ for (i = 0; i < nelems; i++, sg++)
+ if (sg->orig_address != sg->address) {
+ __pci_unmap_single(hwdev, sg->address, sg->length, direction);
+ sg->address = sg->orig_address;
+ }
+}
+
+/*
+ * Make physical memory consistent for a set of streaming mode DMA
+ * translations after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list,
+ * same rules and usage.
+ */
+void
+pci_dma_sync_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
+{
+ int i;
+
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ for (i = 0; i < nelems; i++, sg++)
+ if (sg->orig_address != sg->address)
+ __pci_sync_single(hwdev, sg->address, sg->length, direction);
+}
+
+#else
+/*
+ * Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
+ *
+ * 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
+pci_map_single (struct pci_dev *hwdev, void *ptr, size_t size, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ return virt_to_bus(ptr);
+}
+
+/*
+ * Unmap a single streaming mode DMA translation. The dma_addr and size
+ * must match what was provided for in a previous pci_map_single call. All
+ * other usages are undefined.
+ *
+ * After this call, reads by the cpu to the buffer are guarenteed to see
+ * whatever the device wrote there.
+ */
+extern inline void
+pci_unmap_single (struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /* Nothing to do */
+}
+/*
+ * Map a set of buffers described by scatterlist in streaming
+ * mode for DMA. This is the scather-gather version of the
+ * above pci_map_single interface. Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length. They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ * DMA address/length pairs than there are SG table elements.
+ * (for example via virtual mapping capabilities)
+ * The routine returns the number of addr/length pairs actually
+ * used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+extern inline int
+pci_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ return nents;
+}
+
+/*
+ * Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+extern inline void
+pci_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /* Nothing to do */
+}
+/*
+ * Make physical memory consistent for a single
+ * streaming mode DMA translation after a transfer.
+ *
+ * If you perform a pci_map_single() but wish to interrogate the
+ * buffer using the cpu, yet do not wish to teardown the PCI dma
+ * mapping, you must call this function before doing so. At the
+ * next point you give the PCI dma address back to the card, the
+ * device again owns the buffer.
+ */
+extern inline void
+pci_dma_sync_single (struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /* Nothing to do */
+}
+
+/*
+ * Make physical memory consistent for a set of streaming mode DMA
+ * translations after a transfer.
+ *
+ * The same as pci_dma_sync_single but for a scatter-gather list,
+ * same rules and usage.
+ */
+extern inline void
+pci_dma_sync_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction)
+{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+ /* Nothing to do */
+}
+
+#endif /* CONFIG_SWIOTLB */
void *
pci_alloc_consistent (struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle)
{
- void *ret;
+ unsigned long pci_addr;
int gfp = GFP_ATOMIC;
+ void *ret;
- if (!hwdev || hwdev->dma_mask == 0xffffffff)
- gfp |= GFP_DMA; /* XXX fix me: should change this to GFP_32BIT or ZONE_32BIT */
+ if (!hwdev || hwdev->dma_mask <= 0xffffffff)
+ gfp |= GFP_DMA; /* XXX fix me: should change this to GFP_32BIT or ZONE_32BIT */
ret = (void *)__get_free_pages(gfp, get_order(size));
+ if (!ret)
+ return NULL;
- if (ret) {
- memset(ret, 0, size);
- *dma_handle = virt_to_bus(ret);
- }
+ memset(ret, 0, size);
+ pci_addr = virt_to_phys(ret);
+ if ((pci_addr & ~hwdev->dma_mask) != 0)
+ panic("pci_alloc_consistent: allocated memory is out of range for PCI device");
+ *dma_handle = pci_addr;
return ret;
}
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/perfmon.c linux/arch/ia64/kernel/perfmon.c
--- v2.4.0-test6/linux/arch/ia64/kernel/perfmon.c Fri Mar 10 16:40:39 2000
+++ linux/arch/ia64/kernel/perfmon.c Fri Aug 11 19:09:06 2000
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
#include
#include
@@ -55,24 +56,23 @@
#define WRITE_PMCS 0xa1
#define READ_PMDS 0xa2
#define STOP_PMCS 0xa3
-#define IA64_COUNTER_MASK 0xffffffffffffff6f
-#define PERF_OVFL_VAL 0xffffffff
+#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;
};
-unsigned long pmds[MAX_PERF_COUNTER];
-struct task_struct *perf_owner=NULL;
+unsigned long pmds[NR_CPUS][MAX_PERF_COUNTER];
asmlinkage unsigned long
sys_perfmonctl (int cmd1, int cmd2, void *ptr)
{
struct perfmon_counter tmp, *cptr = ptr;
- unsigned long pmd, cnum, dcr, flags;
- struct task_struct *p;
- struct pt_regs *regs;
+ unsigned long cnum, dcr, flags;
struct perf_counter;
int i;
@@ -80,22 +80,24 @@
case WRITE_PMCS: /* Writes to PMC's and clears PMDs */
case WRITE_PMCS_AND_START: /* Also starts counting */
- if (!access_ok(VERIFY_READ, cptr, sizeof(struct perf_counter)*cmd2))
- return -EFAULT;
+ if (cmd2 <= 0 || cmd2 > MAX_PERF_COUNTER - used_by_system)
+ return -EINVAL;
- if (cmd2 > MAX_PERF_COUNTER)
+ if (!access_ok(VERIFY_READ, cptr, sizeof(struct perf_counter)*cmd2))
return -EFAULT;
- if (perf_owner && perf_owner != current)
- return -EBUSY;
- perf_owner = current;
+ current->thread.flags |= IA64_THREAD_PM_VALID;
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[tmp.counter_num - 4] = 0;
+ pmds[smp_processor_id()][tmp.counter_num - 4] = 0;
}
if (cmd1 == WRITE_PMCS_AND_START) {
@@ -104,26 +106,13 @@
dcr |= IA64_DCR_PP;
ia64_set_dcr(dcr);
local_irq_restore(flags);
-
- /*
- * This is a no can do. It obviously wouldn't
- * work on SMP where another process may not
- * be blocked at all. We need to put in a perfmon
- * IPI to take care of MP systems. See blurb above.
- */
- lock_kernel();
- for_each_task(p) {
- regs = (struct pt_regs *) (((char *)p) + IA64_STK_OFFSET) -1 ;
- ia64_psr(regs)->pp = 1;
- }
- unlock_kernel();
ia64_set_pmc(0, 0);
}
break;
case READ_PMDS:
- if (cmd2 > MAX_PERF_COUNTER)
- return -EFAULT;
+ if (cmd2 <= 0 || cmd2 > MAX_PERF_COUNTER - used_by_system)
+ return -EINVAL;
if (!access_ok(VERIFY_WRITE, cptr, sizeof(struct perf_counter)*cmd2))
return -EFAULT;
@@ -153,9 +142,13 @@
* when we re-enabled interrupts. When I muck with dcr,
* is the irq_save/restore needed?
*/
- for (i = 0, cnum = 4;i < MAX_PERF_COUNTER; i++, cnum++, cptr++){
- pmd = pmds[i] + (ia64_get_pmd(cnum) & PERF_OVFL_VAL);
- put_user(pmd, &cptr->data);
+ 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);
}
local_irq_save(flags);
__asm__ __volatile__("ssm psr.pp");
@@ -167,30 +160,22 @@
case STOP_PMCS:
ia64_set_pmc(0, 1);
- for (i = 0; i < MAX_PERF_COUNTER; ++i)
- ia64_set_pmc(i, 0);
+ ia64_srlz_d();
+ for (i = 0; i < MAX_PERF_COUNTER - used_by_system; ++i)
+ ia64_set_pmc(4+i, 0);
- local_irq_save(flags);
- dcr = ia64_get_dcr();
- dcr &= ~IA64_DCR_PP;
- ia64_set_dcr(dcr);
- local_irq_restore(flags);
- /*
- * This is a no can do. It obviously wouldn't
- * work on SMP where another process may not
- * be blocked at all. We need to put in a perfmon
- * IPI to take care of MP systems. See blurb above.
- */
- lock_kernel();
- for_each_task(p) {
- regs = (struct pt_regs *) (((char *)p) + IA64_STK_OFFSET) - 1;
- ia64_psr(regs)->pp = 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);
}
- unlock_kernel();
- perf_owner = NULL;
+ current->thread.flags &= ~(IA64_THREAD_PM_VALID);
break;
default:
+ return -EINVAL;
break;
}
return 0;
@@ -202,13 +187,13 @@
unsigned long mask, i, cnum, val;
mask = ia64_get_pmc(0) >> 4;
- for (i = 0, cnum = 4; i < MAX_PERF_COUNTER; cnum++, i++, mask >>= 1) {
+ for (i = 0, cnum = 4; i < MAX_PERF_COUNTER - used_by_system; cnum++, i++, mask >>= 1) {
+ val = 0;
if (mask & 0x1)
- val = PERF_OVFL_VAL;
- else
+ val += PERF_OVFL_VAL + 1;
/* since we got an interrupt, might as well clear every pmd. */
- val = ia64_get_pmd(cnum) & PERF_OVFL_VAL;
- pmds[i] += val;
+ val += ia64_get_pmd(cnum) & PERF_OVFL_VAL;
+ pmds[smp_processor_id()][i] += val;
ia64_set_pmd(cnum, 0);
}
}
@@ -221,20 +206,61 @@
ia64_srlz_d();
}
+static struct irqaction perfmon_irqaction = {
+ handler: perfmon_interrupt,
+ flags: SA_INTERRUPT,
+ name: "perfmon"
+};
+
void
perfmon_init (void)
{
- if (request_irq(PERFMON_IRQ, perfmon_interrupt, 0, "perfmon", NULL)) {
- printk("perfmon_init: could not allocate performance monitor vector %u\n",
- PERFMON_IRQ);
- return;
- }
+ 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);
}
+void
+perfmon_init_percpu (void)
+{
+ ia64_set_pmv(PERFMON_IRQ);
+ ia64_srlz_d();
+}
+
+void
+ia64_save_pm_regs (struct thread_struct *t)
+{
+ int i;
+
+ 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);
+ t->pmod[i] = pmds[smp_processor_id()][i];
+ t->pmc[i] = ia64_get_pmc(4+i);
+ }
+}
+
+void
+ia64_load_pm_regs (struct thread_struct *t)
+{
+ int i;
+
+ for (i=0; i< IA64_NUM_PM_REGS - used_by_system ; 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]);
+ }
+ ia64_set_pmc(0, 0);
+ ia64_srlz_d();
+}
+
#else /* !CONFIG_PERFMON */
+
asmlinkage unsigned long
sys_perfmonctl (int cmd1, int cmd2, void *ptr)
{
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/process.c linux/arch/ia64/kernel/process.c
--- v2.4.0-test6/linux/arch/ia64/kernel/process.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/process.c Fri Aug 11 19:09:06 2000
@@ -27,6 +27,8 @@
#include
#include
+#ifdef CONFIG_IA64_NEW_UNWIND
+
static void
do_show_stack (struct unw_frame_info *info, void *arg)
{
@@ -44,6 +46,8 @@
} while (unw_unwind(info) >= 0);
}
+#endif
+
void
show_stack (struct task_struct *task)
{
@@ -118,15 +122,14 @@
current->nice = 20;
current->counter = -100;
-#ifdef CONFIG_SMP
- if (!current->need_resched)
- min_xtp();
-#endif
while (1) {
- while (!current->need_resched) {
+#ifdef CONFIG_SMP
+ if (!current->need_resched)
+ min_xtp();
+#endif
+ while (!current->need_resched)
continue;
- }
#ifdef CONFIG_SMP
normal_xtp();
#endif
@@ -157,11 +160,12 @@
void
ia64_save_extra (struct task_struct *task)
{
- extern void ia64_save_debug_regs (unsigned long *save_area);
- extern void ia32_save_state (struct thread_struct *thread);
-
if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
ia64_save_debug_regs(&task->thread.dbr[0]);
+#ifdef CONFIG_PERFMON
+ if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
+ ia64_save_pm_regs(&task->thread);
+#endif
if (IS_IA32_PROCESS(ia64_task_regs(task)))
ia32_save_state(&task->thread);
}
@@ -169,11 +173,12 @@
void
ia64_load_extra (struct task_struct *task)
{
- extern void ia64_load_debug_regs (unsigned long *save_area);
- extern void ia32_load_state (struct thread_struct *thread);
-
if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
ia64_load_debug_regs(&task->thread.dbr[0]);
+#ifdef CONFIG_PERFMON
+ if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
+ ia64_load_pm_regs(&task->thread);
+#endif
if (IS_IA32_PROCESS(ia64_task_regs(task)))
ia32_load_state(&task->thread);
}
@@ -530,17 +535,6 @@
if (ia64_get_fpu_owner() == current) {
ia64_set_fpu_owner(0);
}
-}
-
-/*
- * Free remaining state associated with DEAD_TASK. This is called
- * after the parent of DEAD_TASK has collected the exist status of the
- * task via wait().
- */
-void
-release_thread (struct task_struct *dead_task)
-{
- /* nothing to do */
}
unsigned long
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/ptrace.c linux/arch/ia64/kernel/ptrace.c
--- v2.4.0-test6/linux/arch/ia64/kernel/ptrace.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/ptrace.c Fri Aug 11 19:09:06 2000
@@ -549,6 +549,7 @@
ia64_sync_fph (struct task_struct *child)
{
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;
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/sal.c linux/arch/ia64/kernel/sal.c
--- v2.4.0-test6/linux/arch/ia64/kernel/sal.c Wed Apr 26 16:34:06 2000
+++ linux/arch/ia64/kernel/sal.c Fri Aug 11 19:09:06 2000
@@ -156,6 +156,14 @@
struct ia64_sal_desc_platform_feature *pf = (void *) p;
printk("SAL: Platform features ");
+#ifdef CONFIG_IA64_HAVE_IRQREDIR
+ /*
+ * Early versions of SAL say we don't have
+ * IRQ redirection, even though we do...
+ */
+ pf->feature_mask |= (1 << 1);
+#endif
+
if (pf->feature_mask & (1 << 0))
printk("BusLock ");
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/semaphore.c linux/arch/ia64/kernel/semaphore.c
--- v2.4.0-test6/linux/arch/ia64/kernel/semaphore.c Wed Apr 26 16:34:06 2000
+++ linux/arch/ia64/kernel/semaphore.c Fri Aug 11 19:09:06 2000
@@ -222,9 +222,6 @@
void
__down_read_failed (struct rw_semaphore *sem, long count)
{
- struct task_struct *tsk = current;
- DECLARE_WAITQUEUE(wait, tsk);
-
while (1) {
if (count == -1) {
down_read_failed_biased(sem);
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/setup.c linux/arch/ia64/kernel/setup.c
--- v2.4.0-test6/linux/arch/ia64/kernel/setup.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/setup.c Fri Aug 11 19:09:06 2000
@@ -122,6 +122,10 @@
*/
memcpy(&ia64_boot_param, (void *) ZERO_PAGE_ADDR, sizeof(ia64_boot_param));
+ *cmdline_p = __va(ia64_boot_param.command_line);
+ strncpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
+ saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; /* for safety */
+
efi_init();
max_pfn = 0;
@@ -133,19 +137,65 @@
*/
bootmap_start = PAGE_ALIGN(__pa(&_end));
if (ia64_boot_param.initrd_size)
- bootmap_start = PAGE_ALIGN(bootmap_start + ia64_boot_param.initrd_size);
+ bootmap_start = PAGE_ALIGN(bootmap_start
+ + ia64_boot_param.initrd_size);
bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn);
efi_memmap_walk(free_available_memory, 0);
reserve_bootmem(bootmap_start, bootmap_size);
+
#ifdef CONFIG_BLK_DEV_INITRD
initrd_start = ia64_boot_param.initrd_start;
+
if (initrd_start) {
+ u64 start, size;
+# define is_same_page(a,b) (((a)&PAGE_MASK) == ((b)&PAGE_MASK))
+
+#if 1
+ /* XXX for now some backwards compatibility... */
+ if (initrd_start >= PAGE_OFFSET)
+ printk("Warning: boot loader passed virtual address "
+ "for initrd, please upgrade the loader\n");
+ } else
+#endif
+ /*
+ * The loader ONLY passes physical addresses
+ */
+ initrd_start = (unsigned long)__va(initrd_start);
initrd_end = initrd_start+ia64_boot_param.initrd_size;
+ start = initrd_start;
+ size = ia64_boot_param.initrd_size;
+
printk("Initial ramdisk at: 0x%p (%lu bytes)\n",
(void *) initrd_start, ia64_boot_param.initrd_size);
- reserve_bootmem(virt_to_phys(initrd_start), ia64_boot_param.initrd_size);
+
+ /*
+ * The kernel end and the beginning of initrd can be
+ * on the same page. This would cause the page to be
+ * reserved twice. While not harmful, it does lead to
+ * a warning message which can cause confusion. Thus,
+ * we make sure that in this case we only reserve new
+ * pages, i.e., initrd only pages. We need to:
+ *
+ * - align up start
+ * - adjust size of reserved section accordingly
+ *
+ * It should be noted that this operation is only
+ * valid for the reserve_bootmem() call and does not
+ * affect the integrety of the initrd itself.
+ *
+ * reserve_bootmem() considers partial pages as reserved.
+ */
+ if (is_same_page(initrd_start, (unsigned long)&_end)) {
+ start = PAGE_ALIGN(start);
+ size -= start-initrd_start;
+
+ printk("Initial ramdisk & kernel on the same page: "
+ "reserving start=%lx size=%ld bytes\n",
+ start, size);
+ }
+ reserve_bootmem(__pa(start), size);
}
#endif
#if 0
@@ -164,27 +214,21 @@
/* process SAL system table: */
ia64_sal_init(efi.sal_systab);
- *cmdline_p = __va(ia64_boot_param.command_line);
- strncpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; /* for safety */
-
- printk("args to kernel: %s\n", *cmdline_p);
-
#ifdef CONFIG_SMP
bootstrap_processor = hard_smp_processor_id();
current->processor = bootstrap_processor;
#endif
cpu_init(); /* initialize the bootstrap CPU */
+#ifdef CONFIG_IA64_GENERIC
+ machvec_init(acpi_get_sysname());
+#endif
+
if (efi.acpi) {
/* Parse the ACPI tables */
acpi_parse(efi.acpi);
}
-#ifdef CONFIG_IA64_GENERIC
- machvec_init(acpi_get_sysname());
-#endif
-
#ifdef CONFIG_VT
# if defined(CONFIG_VGA_CONSOLE)
conswitchp = &vga_con;
@@ -197,8 +241,16 @@
/* enable IA-64 Machine Check Abort Handling */
ia64_mca_init();
#endif
+
paging_init();
platform_setup(cmdline_p);
+
+#ifdef CONFIG_SWIOTLB
+ {
+ extern void setup_swiotlb (void);
+ setup_swiotlb();
+ }
+#endif
}
/*
diff -u --recursive --new-file v2.4.0-test6/linux/arch/ia64/kernel/smp.c linux/arch/ia64/kernel/smp.c
--- v2.4.0-test6/linux/arch/ia64/kernel/smp.c Thu Jul 27 17:37:59 2000
+++ linux/arch/ia64/kernel/smp.c Fri Aug 11 19:09:06 2000
@@ -320,6 +320,58 @@
#endif /* !CONFIG_ITANIUM_PTCG */
/*
+ * Run a function on another CPU
+ * The function to run. This must be fast and non-blocking.
+ * An arbitrary pointer to pass to the function.
+ * If true, keep retrying until ready.
+ * If true, wait until function has completed on other CPUs.
+ * [RETURNS] 0 on success, else a negative status code.
+ *
+ * Does not return until the remote CPU is nearly ready to execute
+ * or is or has executed.
+ */
+
+int
+smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int retry, int wait)
+{
+ struct smp_call_struct data;
+ long timeout;
+ int cpus = 1;
+
+ if (cpuid == smp_processor_id()) {
+ printk(__FUNCTION__" trying to call self\n");
+ return -EBUSY;
+ }
+
+ data.func = func;
+ data.info = info;
+ data.wait = wait;
+ atomic_set(&data.unstarted_count, cpus);
+ atomic_set(&data.unfinished_count, cpus);
+
+ if (pointer_lock(&smp_call_function_data, &data, retry))
+ return -EBUSY;
+
+ /* Send a message to all other CPUs and wait for them to respond */
+ send_IPI_single(cpuid, IPI_CALL_FUNC);
+
+ /* Wait for response */
+ timeout = jiffies + HZ;
+ while ((atomic_read(&data.unstarted_count) > 0) && time_before(jiffies, timeout))
+ barrier();
+ if (atomic_read(&data.unstarted_count) > 0) {
+ smp_call_function_data = NULL;
+ return -ETIMEDOUT;
+ }
+ if (wait)
+ while (atomic_read(&data.unfinished_count) > 0)
+ barrier();
+ /* unlock pointer */
+ smp_call_function_data = NULL;
+ return 0;
+}
+
+/*
* Run a function on all other CPUs.
* The function to run. This must be fast and non-blocking.
*