#!/bin/sh -x
# This is a shell archive
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
# existing files will NOT be overwritten unless -c is specified
#
# This is part 01 of a 77 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
#
if test -r _shar_seq_.tmp; then
echo "Must unpack archives in sequence!"
echo "Please unpack part `cat _shar_seq_.tmp` next"
exit 1
fi
# ============= patch-2.4.11-dontuse ==============
if test -f 'patch-2.4.11-dontuse' -a X"$1" != X"-c"; then
echo 'x - skipping patch-2.4.11-dontuse (File already exists)'
rm -f _shar_wnt_.tmp;
else
> _shar_wnt_.tmp;
echo 'x - extracting patch-2.4.11-dontuse (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'patch-2.4.11-dontuse' &&
diff -u --recursive --new-file v2.4.10/linux/COPYING linux/COPYING
--- v2.4.10/linux/COPYING Fri Sep 8 11:15:58 2000
+++ linux/COPYING Tue Oct 9 15:00:06 2001
@@ -7,8 +7,8 @@
X kernel) is copyrighted by me and others who actually wrote it.
X
X Also note that the only valid version of the GPL as far as the kernel
- is concerned is _this_ license (ie v2), unless explicitly otherwise
- stated.
+ is concerned is _this_ particular version of the license (ie v2, not
+ v2.2 or v3.x or whatever), unless explicitly otherwise stated.
X
X Linus Torvalds
X
diff -u --recursive --new-file v2.4.10/linux/CREDITS linux/CREDITS
--- v2.4.10/linux/CREDITS Sun Sep 23 11:40:54 2001
+++ linux/CREDITS Fri Oct 5 12:04:50 2001
@@ -603,6 +603,13 @@
X S: Guildford, GU1 3DA
X S: United Kingdom
X
+N: Cristian Mihail Craciunescu
+W: http://www.dnt.ro/~cristi/
+E: cri...@dnt.ro
+D: Support for Xircom PGSDB9 (firmware and host driver)
+S: Bucharest
+S: Romania
+
X N: Laurence Culhane
X E: l...@holmes.demon.co.uk
X D: Wrote the initial alpha SLIP code
@@ -837,7 +844,6 @@
X S: USA
X
X N: Johannes Erdfelt
-E: jerd...@valinux.com
X E: joha...@erdfelt.com
X D: Linux/IA-64 bootloader and kernel goop, USB
X S: 6350 Stoneridge Mall Road
diff -u --recursive --new-file v2.4.10/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.4.10/linux/Documentation/Configure.help Sun Sep 23 11:40:54 2001
+++ linux/Documentation/Configure.help Tue Oct 9 15:13:03 2001
@@ -119,18 +119,39 @@
X SMP-FAQ on the WWW at http://www.irisa.fr/prive/mentre/smp-faq/ .
X
X If you don't know what to do here, say N.
+
+Multiquad support for NUMA systems
+CONFIG_MULTIQUAD
+ This option is used for getting Linux to run on a (IBM/Sequent) NUMA
+ multiquad box. This changes the way that processors are bootstrapped,
+ and uses Clustered Logical APIC addressing mode instead of Flat Logical.
+ You will need a new lynxer.elf file to flash your firmware with - send
+ email to Martin...@us.ibm.com
X
-APIC and IO-APIC Support on Uniprocessors
+IO-APIC Support on Uniprocessors
X CONFIG_X86_UP_IOAPIC
- APIC (Advanced Programmable Interrupt Controller) is a scheme for
- delivering hardware interrupt requests to the CPU. It is commonly
- used on systems with several CPU's. If you have a single-CPU system
- which uses APIC, you can say Y here to use it. If you say Y here
- even though your machine doesn't have APIC, then the kernel will
- still run with no slowdown at all.
+ An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
+ SMP-capable replacement for PC-style interrupt controllers. Most
+ SMP systems and a small number of uniprocessor systems have one.
+ If you have a single-CPU system with an IO-APIC, you can say Y here
+ to use it. If you say Y here even though your machine doesn't have
+ an IO-APIC, then the kernel will still run with no slowdown at all.
+
+ If you have a system with several CPUs, you do not need to say Y
+ here: the IO-APIC will be used automatically.
+
+Local APIC Support on Uniprocessors
+CONFIG_X86_UP_APIC
+ A local APIC (Advanced Programmable Interrupt Controller) is an
+ integrated interrupt controller in the CPU. If you have a single-CPU
+ system which has a processor with a local APIC, you can say Y here to
+ enable and use it. If you say Y here even though your machine doesn't
+ have a local APIC, then the kernel will still run with no slowdown at
+ all. The local APIC supports CPU-generated self-interrupts (timer,
+ performance counters), and the NMI watchdog which detects hard lockups.
X
- If you have system with several CPU's, you do not need to say Y
- here: APIC will be used automatically.
+ If you have a system with several CPUs, you do not need to say Y
+ here: the local APIC will be used automatically.
X
X Kernel math emulation
X CONFIG_MATH_EMULATION
@@ -1143,6 +1164,29 @@
X devices (hard disks, CD-ROM drives, etc.) that are connected to the
X builtin IDE interface.
X
+MPC8xx IDE support
+CONFIG_BLK_DEV_MPC8xx_IDE
+ This option provides support for IDE on Motorola MPC8xx Systems.
+ Please see 'Type of MPC8xx IDE interface' for details.
+
+ If unsure, say N.
+
+Type of MPC8xx IDE interface
+CONFIG_IDE_8xx_PCCARD
+ Select how the IDE devices are connected to the MPC8xx system:
+
+ 8xx_PCCARD uses the 8xx internal PCMCIA interface in combination
+ with a PC Card (e.g. ARGOSY portable Hard Disk Adapter),
+ ATA PC Card HDDs or ATA PC Flash Cards (example: TQM8xxL
+ systems)
+
+ 8xx_DIRECT is used for directly connected IDE devices using the 8xx
+ internal PCMCIA interface (example: IVMS8 systems)
+
+ EXT_DIRECT is used for IDE devices directly connected to the 8xx
+ bus using some glue logic, but _not_ the 8xx internal
+ PCMCIA interface (example: IDIF860 systems)
+
X ICS IDE interface support
X CONFIG_BLK_DEV_IDE_ICSIDE
X On Acorn systems, say Y here if you wish to use the ICS IDE
@@ -2554,10 +2598,10 @@
X module, say M here and read Documentation/modules.txt. The module
X will be called agpgart.o.
X
-Intel 440LX/BX/GX/815/840/850 support
+Intel 440LX/BX/GX/815/830M/840/850 support
X CONFIG_AGP_INTEL
X This option gives you AGP support for the GLX component of the
- XFree86 4.x on Intel 440LX/BX/GX, 815, 840 and 850 chipsets.
+ XFree86 4.x on Intel 440LX/BX/GX, 815, 830M, 840 and 850 chipsets.
X
X For the moment, you should probably say N, unless you want to test
X the GLX component for XFree86 3.3.6, which can be downloaded from
@@ -2565,9 +2609,9 @@
X
X Intel I810/I810 DC100/I810e support
X CONFIG_AGP_I810
- This option gives you AGP support for the Xserver on the Intel 810
- and 815 chipset boards for their on-board integrated graphics. This
- is required to do any useful video modes with these boards.
+ This option gives you AGP support for the Xserver on the Intel 810,
+ 830M and 815 chipset boards for their on-board integrated graphics.
+ This is required to do any useful video modes with these boards.
X
X VIA chipset support
X CONFIG_AGP_VIA
@@ -7593,6 +7637,53 @@
X location). You also want to check out the PCMCIA-HOWTO, available
X from http://www.linuxdoc.org/docs.html#howto .
X
+Hermes chipset 802.11b support (Orinoco/Prism2/Symbol cards)
+CONFIG_HERMES
+ A driver for 802.11b wireless cards based based on the "Hermes" or
+ Intersil HFA384x (Prism 2) MAC controller. This includes the vast
+ majority of the PCMCIA 802.11b cards (which are nearly all rebadges)
+ - except for the Cisco/Aironet cards. Cards supported include the
+ Apple Airport (not a PCMCIA card), WavelanIEEE/Orinoco,
+ Cabletron/EnteraSys Roamabout, ELSA AirLancer, MELCO Buffalo, Avaya,
+ IBM High Rate Wireless, Farralon Syyline, Samsung MagicLAN, Netgear
+ MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel
+ PRO/Wireless, and Symbol Spectrum24 High Rate amongst others.
+
+ This option includes the guts of the driver, but in order to
+ actually use a card you will also need to enable support for PCMCIA
+ Hermes cards, PLX9052 based PCI adaptors or the Apple Airport below.
+
+ You will also very likely also need the Wireless Tools in order to
+ configure your card and that /etc/pcmcia/wireless.opts works :
+ http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
+
+Apple Airport support (built-in)
+CONFIG_APPLE_AIRPORT
+ Enable support for the Apple Airport card (which is essentially a
+ Lucent Orinoco card with a non-standard interface) built into some
+ newer Apple Macintosh machines.
+
+Hermes 802.11b in PLX9052 based PCI adaptor support
+CONFIG_PLX_HERMES
+ Enable support for PCMCIA cards supported by the "Hermes" (aka
+ orinoco_cs) driver when used in PLX9052 based PCI adaptors. These
+ adaptors are not a full PCMCIA controller but act as a more limited
+ PCI <-> PCMCIA bridge. Several vendors sell such adaptors so that
+ 802.11b PCMCIA cards can be used in desktop machines. The Netgear
+ MA301 is such an adaptor.
+
+ Support for these adaptors is so far still incomplete and buggy.
+ You have been warned.
+
+Hermes PCMCIA card support
+CONFIG_PCMCIA_HERMES
+ Enable support for PCMCIA 802.11b cards using the Hermes or Intersil
+ HFA384x (Prism 2) chipset. To use your PC-cards, you will need
+ supporting software from David Hinds' pcmcia-cs package (see the
+ file Documentation/Changes for location). You also want to check out
+ the PCMCIA-HOWTO, available from
+ http://www.linuxdoc.org/docs.html#howto .
+
X Hermes support (Orinoco/WavelanIEEE/PrismII/Symbol 802.11b cards)
X CONFIG_PCMCIA_HERMES
X A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
@@ -15708,25 +15799,18 @@
X Creative EMU10K1 based PCI sound cards
X CONFIG_SOUND_EMU10K1
X Say Y or M if you have a PCI sound card using the EMU10K1 chipset,
- such as the Creative SBLive!, SB PCI512 or Emu-APS.
+ such as the various Creative SBLive!, SB PCI512 or Emu-APS.
X
- For more information about the degree of support for the different
- card models please check:
-
- http://opensource.creative.com
+ For more information on this driver and the degree of support for the
+ different card models please check <http://opensource.creative.com>.
X
X It is now possible to load dsp microcode patches into the EMU10K1
X chip. These patches are used to implement real time sound processing
- effects which include for example: signal routing, bass/treble control,
- AC3 passthrough, ...
- Userspace tools to create new patches and load/unload them can be found
- at the above link. You need to get the source snapshot and then type:
-
- % make tools
- % make install-tools
-
- in the top directory.
-
+ effects which include for example: signal routing, bass/treble
+ control, AC3 passthrough, ...
+ Userspace tools to create new patches and load/unload them can be
+ found at <http://opensource.creative.com/dist.html>.
+
X Creative EMU10K1 MIDI
X CONFIG_MIDI_EMU10K1
X Say Y if you want to be able to use the OSS /dev/sequencer interface.
@@ -18481,6 +18565,16 @@
X and Sony PCG-505TX. If you want to compile it as a module, say M
X here and read Documentation/modules.txt. The module will be called
X smc-ircc.o.
+
+VLSI 82C147 PCI-IrDA Controller Driver
+CONFIG_VLSI_FIR
+ Say Y here if you want to build support for the VLSI 82C147
+ PCI-IrDA Controller. This controller is used by the HP OmniBook 800
+ and 5500 notebooks. The driver provides support for SIR, MIR and
+ FIR (4Mbps) speeds.
+
+ If you want to compile it as a module, say M here and read
+ <file:Documentation/modules.txt>. The module will be called vlsi_ir.o.
X
X Serial dongle support
X CONFIG_DONGLE
diff -u --recursive --new-file v2.4.10/linux/Documentation/DocBook/Makefile linux/Documentation/DocBook/Makefile
--- v2.4.10/linux/Documentation/DocBook/Makefile Sun Sep 23 11:40:54 2001
+++ linux/Documentation/DocBook/Makefile Fri Oct 5 12:06:51 2001
@@ -141,17 +141,18 @@
X OUT := $(patsubst %.sgml, %.out, $(BOOKS))
X
X clean:
- -$(RM) core *~
- -$(RM) $(BOOKS)
- -$(RM) $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
- -$(RM) $(JPG-parportbook) $(EPS-parportbook)
- -$(RM) $(C-procfs-example)
+ rm -f core *~
+ rm -f $(BOOKS)
+ rm -f $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
+ rm -f $(JPG-parportbook) $(EPS-parportbook)
+ rm -f $(C-procfs-example)
X
X mrproper: clean
- -$(RM) $(PS) $(PDF)
- -$(RM) -r $(HTML)
- -$(RM) .depend
- -$(RM) $(TOPDIR)/scripts/mkdep-docbook
+ rm -f $(PS) $(PDF)
+ rm -f -r $(HTML)
+ rm -f .depend
+ rm -f $(TOPDIR)/scripts/mkdep-docbook
+ rm -rf DBTOHTML_OUTPUT*
X
X %.ps : %.sgml
X @(which db2ps > /dev/null 2>&1) || \
@@ -169,7 +170,7 @@
X @(which db2html > /dev/null 2>&1) || \
X (echo "*** You need to install DocBook stylesheets ***"; \
X exit 1)
- -$(RM) -r $@
+ rm -rf $@
X db2html $<
X if [ ! -z "$(JPG-$@)" ]; then cp $(JPG-$@) $@; fi
X
diff -u --recursive --new-file v2.4.10/linux/Documentation/DocBook/kernel-api.tmpl linux/Documentation/DocBook/kernel-api.tmpl
--- v2.4.10/linux/Documentation/DocBook/kernel-api.tmpl Sun Sep 23 11:40:54 2001
+++ linux/Documentation/DocBook/kernel-api.tmpl Fri Oct 5 12:06:51 2001
@@ -187,11 +187,6 @@
X !Edrivers/block/ll_rw_blk.c
X </chapter>
X
- <chapter id="part">
- <title>Partition Handling</title>
-!Edrivers/block/genhd.c
- </chapter>
-
X <chapter id="miscdev">
X <title>Miscellaneous Devices</title>
X !Edrivers/char/misc.c
diff -u --recursive --new-file v2.4.10/linux/Documentation/DocBook/kernel-hacking.tmpl linux/Documentation/DocBook/kernel-hacking.tmpl
--- v2.4.10/linux/Documentation/DocBook/kernel-hacking.tmpl Sat May 19 17:43:05 2001
+++ linux/Documentation/DocBook/kernel-hacking.tmpl Fri Oct 5 12:06:51 2001
@@ -976,17 +976,35 @@
X </para>
X </sect1>
X
- <sect1 id="sym-exportsymtab">
- <title><function>EXPORT_SYMTAB</function></title>
+ <sect1 id="sym-exportnosymbols">
+ <title><symbol>EXPORT_NO_SYMBOLS</symbol>
+ <filename class=headerfile>include/linux/module.h</filename></title>
+
+ <para>
+ If a module exports no symbols then you can specify
+ <programlisting>
+EXPORT_NO_SYMBOLS;
+ </programlisting>
+ anywhere in the module.
+ In kernel 2.4 and earlier, if a module contains neither
+ <function>EXPORT_SYMBOL()</function> nor
+ <symbol>EXPORT_NO_SYMBOLS</symbol> then the module defaults to
+ exporting all non-static global symbols.
+ In kernel 2.5 onwards you must explicitly specify whether a module
+ exports symbols or not.
+ </para>
+ </sect1>
X
- <para>
- For convenience, a module usually exports all non-file-scope
- symbols (ie. all those not declared <type>static</type>). If this
- is defined before
+ <sect1 id="sym-exportsymbols-gpl">
+ <title><function>EXPORT_SYMBOL_GPL()</function>
+ <filename class=headerfile>include/linux/module.h</filename></title>
X
- <filename class=headerfile>include/linux/module.h</filename> is
- included, then only symbols explicit exported with
- <function>EXPORT_SYMBOL()</function> will be exported.
+ <para>
+ Similar to <function>EXPORT_SYMBOL()</function> except that the
+ symbols exported by <function>EXPORT_SYMBOL_GPL()</function> can
+ only be seen by modules with a
+ <function>MODULE_LICENCE()</function> that specifies a GPL
+ compatible license.
X </para>
X </sect1>
X </chapter>
@@ -1241,9 +1259,19 @@
X Edit the <filename>Makefile</filename>: the CONFIG variables are
X exported here so you can conditionalize compilation with `ifeq'.
X If your file exports symbols then add the names to
- <varname>MX_OBJS</varname> or <varname>OX_OBJS</varname> instead
- of <varname>M_OBJS</varname> or <varname>O_OBJS</varname>, so
- that genksyms will find them.
+ <varname>export-objs</varname> so that genksyms will find them.
+ <caution>
+ <para>
+ There is a restriction on the kernel build system that objects
+ which export symbols must have globally unique names.
+ If your object does not have a globally unique name then the
+ standard fix is to move the
+ <function>EXPORT_SYMBOL()</function> statements to their own
+ object with a unique name.
+ This is why several systems have separate exporting objects,
+ usually suffixed with ksyms.
+ </para>
+ </caution>
X </para>
X </listitem>
X
diff -u --recursive --new-file v2.4.10/linux/Documentation/DocBook/mousedrivers.tmpl linux/Documentation/DocBook/mousedrivers.tmpl
--- v2.4.10/linux/Documentation/DocBook/mousedrivers.tmpl Thu Jan 4 12:50:12 2001
+++ linux/Documentation/DocBook/mousedrivers.tmpl Sun Sep 30 12:26:05 2001
@@ -241,16 +241,12 @@
X
X <programlisting>
X struct file_operations our_mouse_fops = {
- NULL, /* Mice don't seek */
- read_mouse, /* You can read a mouse */
- write_mouse, /* This won't do a lot */
- NULL, /* No readdir - not a directory */
- poll_mouse, /* Poll */
- NULL, /* No ioctl calls */
- NULL, /* No mmap */
- open_mouse, /* Called on open */
- NULL, /* Flush - 2.2+ only */
- close_mouse, /* Called on close */
+ owner: THIS_MODULE, /* Automatic usage management */
+ read: read_mouse, /* You can read a mouse */
+ write: write_mouse, /* This won't do a lot */
+ poll: poll_mouse, /* Poll */
+ open: open_mouse, /* Called on open */
+ release: close_mouse, /* Called on close */
X };
X </programlisting>
X
@@ -262,6 +258,18 @@
X configuration interfaces via ioctl calls.
X </para>
X <para>
+ The syntax we use is not standard C as such. GCC provides the ability
+ to initialise fields by name, and this generally makes the method table
+ much easier to read than counting through NULL pointers and remembering
+ the order by hand.
+ </para>
+ <para>
+ The owner field is used to manage the locking of module load an
+ unloading. It is obviously important that a module is not unloaded while
+ in use. When your device is opened the module specified by "owner" is
+ locked. When it is finally released the module is unlocked.
+ </para>
+ <para>
X The open and close routines need to manage enabling and disabling the
X interrupts for the mouse as well as stopping the mouse being unloaded
X when it is no longer required.
@@ -278,12 +286,9 @@
X if(mouse_users++)
X return 0;
X
- MOD_INC_USE_COUNT;
-
X if(request_irq(mouse_intr, OURMOUSE_IRQ, 0, "ourmouse", NULL))
X {
X mouse_users--;
- MOD_DEC_USE_COUNT;
X return -EBUSY;
X }
X mouse_dx = 0;
@@ -301,11 +306,6 @@
X <returnvalue>0</returnvalue> for success.
X </para>
X <para>
- Firstly we use <function>MOD_INC_USE_COUNT</function> to ensure that
- while the mouse is open nobody will unload it and cause a nasty crash.
- We must do this before we sleep - and grabbing the interrupt might sleep.
- </para>
- <para>
X We grab the interrupt and thus start mouse interrupts. If the interrupt
X has been borrowed by some other driver then <function>request_irq</function>
X will fail and we will return an error. If we were capable of sharing an
@@ -328,7 +328,6 @@
X if(--mouse_users)
X return 0;
X free_irq(OURMOUSE_IRQ, NULL);
- MOD_DEC_USE_COUNT;
X return 0;
X }
X </programlisting>
@@ -336,8 +335,7 @@
X We count off a user and provided that there are still other users need
X take no further action. The last person closing the mouse causes us to
X free up the interrupt. This stops interrupts from the mouse from using
- our CPU time, and lets us use <function>MOD_DEC_USE_COUNT</function> so
- that the mouse can now be unloaded.
+ our CPU time, and ensures that the mouse can now be unloaded.
X </para>
X <para>
X We can fill in the write handler at this point as the write function for
@@ -718,14 +716,14 @@
X struct wait_queue wait = { current, NULL };
X
X add_wait_queue(&mouse_wait, &wait);
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
X
X while(!mouse_event)
X {
X if(file->f_flags&O_NDELAY)
X {
X remove_wait_queue(&mouse_wait, &wait);
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
X return -EWOULDBLOCK;
X }
X if(signal_pending(current))
@@ -735,11 +733,11 @@
X return -ERESTARTSYS;
X }
X schedule();
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
X }
X
X remove_wait_wait(&mouse_wait, &wait);
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
X </programlisting>
X
X <para>
@@ -889,18 +887,13 @@
X
X <programlisting>
X struct file_operations our_mouse_fops = {
- NULL, /* Mice don't seek */
- read_mouse, /* You can read a mouse */
- write_mouse, /* This won't do a lot */
- NULL, /* No readdir - not a directory */
- poll_mouse, /* Poll */
- NULL, /* No ioctl calls */
- NULL, /* No mmap */
- open_mouse, /* Called on open */
- NULL, /* Flush */
- close_mouse, /* Called on close */
- NULL, /* No fsync on a mouse */
- fasync_mouse, /* Asynchronous I/O */
+ owner: THIS_MODULE
+ read: read_mouse, /* You can read a mouse */
+ write: write_mouse, /* This won't do a lot */
+ poll: poll_mouse, /* Poll */
+ open: open_mouse, /* Called on open */
+ release: close_mouse, /* Called on close */
+ fasync: fasync_mouse, /* Asynchronous I/O */
X };
X </programlisting>
X
diff -u --recursive --new-file v2.4.10/linux/Documentation/DocBook/tulip-user.tmpl linux/Documentation/DocBook/tulip-user.tmpl
--- v2.4.10/linux/Documentation/DocBook/tulip-user.tmpl Wed Apr 18 14:40:06 2001
+++ linux/Documentation/DocBook/tulip-user.tmpl Fri Oct 5 12:06:51 2001
@@ -90,7 +90,7 @@
X
X </chapter>
X
- <chapter id="drvr_compat">
+ <chapter id="drvr-compat">
X <title>Driver Compatibility</title>
X
X <para>
@@ -111,7 +111,7 @@
X </para>
X </chapter>
X
- <chapter id="board_settings">
+ <chapter id="board-settings">
X <title>Board-specific Settings</title>
X
X <para>
@@ -129,7 +129,7 @@
X </para>
X </chapter>
X
- <chapter id="driver_operation">
+ <chapter id="driver-operation">
X <title>Driver Operation</title>
X
X <sect1><title>Ring buffers</title>
diff -u --recursive --new-file v2.4.10/linux/Documentation/arm/SA1100/Assabet linux/Documentation/arm/SA1100/Assabet
--- v2.4.10/linux/Documentation/arm/SA1100/Assabet Sun Sep 23 11:40:54 2001
+++ linux/Documentation/arm/SA1100/Assabet Thu Oct 4 15:13:18 2001
@@ -126,7 +126,7 @@
X Using JFFS2
X -----------
X
-Using JFFS2 (the Second Journaling Flash File System) is probably the most
+Using JFFS2 (the Second Journalling Flash File System) is probably the most
X convenient way to store a writable filesystem into flash. JFFS2 is used in
X conjunction with the MTD layer which is responsible for low-level flash
X management. More information on the Linux MTD can be found on-line at:
diff -u --recursive --new-file v2.4.10/linux/Documentation/fb/matroxfb.txt linux/Documentation/fb/matroxfb.txt
--- v2.4.10/linux/Documentation/fb/matroxfb.txt Tue Jul 3 17:08:18 2001
+++ linux/Documentation/fb/matroxfb.txt Sun Sep 30 12:26:08 2001
@@ -216,6 +216,13 @@
X secondary (TV) output - if DFP is active, TV output must be
X inactive and vice versa. DFP always uses same timing as primary
X (monitor) output.
+dfp:X - use settings X for digital flat panel interface. X is number from
+ 0 to 0xFF, and meaning of each individual bit is described in
+ G400 manual, in description of DAC register 0x1F. For normal operation
+ you should set all bits to zero, except lowest bit. This lowest bit
+ selects who is source of display clocks, whether G400, or panel.
+ Default value is now read back from hardware - so you should specify
+ this value only if you are also using `init' parameter.
X vesa:X - selects startup videomode. X is number from 0 to 0x1FF, see table
X above for detailed explanation. Default is 640x480x8bpp if driver
X has 8bpp support. Otherwise first available of 640x350x4bpp,
@@ -280,6 +287,8 @@
X + interlaced text mode is not supported; it looks like hardware limitation,
X but I'm not sure.
X + Gxx0 SGRAM/SDRAM is not autodetected.
+ + If you are using more than one framebuffer device, you must boot kernel
+ with 'video=scrollback:0'.
X + maybe more...
X And following misfeatures:
X + SVGALib does not restore screen on exit.
diff -u --recursive --new-file v2.4.10/linux/Documentation/filesystems/devfs/ChangeLog linux/Documentation/filesystems/devfs/ChangeLog
--- v2.4.10/linux/Documentation/filesystems/devfs/ChangeLog Sun Sep 23 11:40:54 2001
+++ linux/Documentation/filesystems/devfs/ChangeLog Mon Oct 8 11:38:51 2001
@@ -1755,3 +1755,7 @@
X - Ported to kernel 2.4.10-pre11
X
X - Set inode->i_mapping->a_ops for block nodes in <get_vfs_inode>
+===============================================================================
+Changes for patch v193
+
+- Went back to global rwsem for symlinks (refcount scheme no good)
diff -u --recursive --new-file v2.4.10/linux/Documentation/filesystems/fat_cvf.txt linux/Documentation/filesystems/fat_cvf.txt
--- v2.4.10/linux/Documentation/filesystems/fat_cvf.txt Fri Jul 28 12:50:51 2000
+++ linux/Documentation/filesystems/fat_cvf.txt Mon Oct 1 13:45:42 2001
@@ -112,7 +112,7 @@
X int (*mount_cvf) (struct super_block*sb,char*options);
X int (*unmount_cvf) (struct super_block*sb);
X [...]
- void (*cvf_zero_cluster) (struct inode*inode,int clusternr);
+ void (*zero_out_cluster) (struct inode*, int clusternr);
X }
X
X This structure defines the capabilities of a CVF module. It must be filled
@@ -161,8 +161,8 @@
X functions. NULL means use the original FAT driver functions instead.
X If you really want "no action", write a function that does nothing and
X hang it in instead.
- - cvf_zero_cluster:
- The cvf_zero_cluster function is called when the fat driver wants to
+ - zero_out_cluster:
+ The zero_out_cluster function is called when the fat driver wants to
X zero out a (new) cluster. This is important for directories (mkdir).
X If it is NULL, the FAT driver defaults to overwriting the whole
X cluster with zeros. Note that clusternr is absolute, not relative
diff -u --recursive --new-file v2.4.10/linux/Documentation/filesystems/ntfs.txt linux/Documentation/filesystems/ntfs.txt
--- v2.4.10/linux/Documentation/filesystems/ntfs.txt Sun Sep 23 11:40:54 2001
+++ linux/Documentation/filesystems/ntfs.txt Sun Sep 30 11:42:44 2001
@@ -98,6 +98,14 @@
X ChangeLog
X =========
X
+NTFS 1.1.20:
+ - Fixed two bugs in ntfs_readwrite_attr(). Thanks to Jan Kara for
+ spotting the out of bounds one.
+ - Check return value of set_blocksize() in ntfs_read_super() and make
+ use of get_hardsect_size() to determine the minimum block size.
+ - Fix return values of ntfs_vcn_to_lcn(). This should stop
+ peoples start of partition being overwritten at random.
+
X NTFS 1.1.19:
X - Fixed ntfs_getdir_unsorted(), ntfs_readdir() and ntfs_printcb() to
X cope with arbitrary cluster sizes. Very important for Win2k+. Also,
diff -u --recursive --new-file v2.4.10/linux/Documentation/networking/8139too.txt linux/Documentation/networking/8139too.txt
--- v2.4.10/linux/Documentation/networking/8139too.txt Wed Jul 25 17:10:17 2001
+++ linux/Documentation/networking/8139too.txt Tue Oct 9 15:13:02 2001
@@ -164,7 +164,7 @@
X
X 1) Work with Donald to merge fixes and updates into his driver.
X
-2) ethtool support
+2) ETHTOOL_SSET support
X
X 3) PPC platform has stability problems. (XXX: verify this is still true)
X
@@ -175,8 +175,6 @@
X
X 9) Better documentation. (patches welcome)
X
-11) RTL8139C support untested.
-
X 12) 10base-T support flaky or slow (todo: verify this is still true)
X
X
@@ -184,6 +182,14 @@
X
X Change History
X --------------
+
+Version 0.9.19 - October 9, 2001
+
+* Eliminate buffer copy for unaligned Tx's (manfred)
+* Better RX error recovery (manfred)
+* Wake-On-LAN and ETHTOOL_GSET support (Kalle Niemitalo)
+* Fix assertion in PIO mode (various)
+
X
X Version 0.9.18 - July 6, 2001
X
diff -u --recursive --new-file v2.4.10/linux/Documentation/oops-tracing.txt linux/Documentation/oops-tracing.txt
--- v2.4.10/linux/Documentation/oops-tracing.txt Tue Oct 3 09:24:41 2000
+++ linux/Documentation/oops-tracing.txt Sun Sep 30 12:26:08 2001
@@ -201,3 +201,26 @@
X 820 4th St. N.
X Fargo, ND 58122
X Phone: 701-234-7556
+
+
+---------------------------------------------------------------------------
+Tainted kernels:
+
+Some oops reports contain the string 'Tainted: ' after the program
+counter, this indicates that the kernel has been tainted by some
+mechanism. The string is followed by a series of position sensitive
+characters, each representing a particular tainted value.
+
+ 1: 'G' if all modules loaded have a GPL or compatible license, 'P' if
+ any proprietary module has been loaded. Modules without a
+ MODULE_LICENSE or with a MODULE_LICENSE that is not recognised by
+ insmod as GPL compatible are assumed to be proprietary.
+
+ 2: 'F' if any module was force loaded by insmod -f, ' ' if all
+ modules were loaded normally.
+
+The primary reason for the 'Tainted: ' string is to tell kernel
+debuggers if this is a clean kernel or if anything unusual has
+occurred. Tainting is permanent, even if an offending module is
+unloading the tainted value remains to indicate that the kernel is not
+trustworthy.
diff -u --recursive --new-file v2.4.10/linux/Documentation/sysctl/kernel.txt linux/Documentation/sysctl/kernel.txt
--- v2.4.10/linux/Documentation/sysctl/kernel.txt Mon Jan 10 18:15:58 2000
+++ linux/Documentation/sysctl/kernel.txt Sun Sep 30 12:26:08 2001
@@ -39,6 +39,7 @@
X - rtsig-max
X - sg-big-buff [ generic SCSI device (sg) ]
X - shmmax [ sysv ipc ]
+- tainted
X - version
X - zero-paged [ PPC only ]
X
@@ -217,6 +218,19 @@
X on the maximum shared memory segment size that can be created.
X Shared memory segments up to 1Gb are now supported in the
X kernel. This value defaults to SHMMAX.
+
+==============================================================
+
+tainted:
+
+Non-zero if the kernel has been tainted. Numeric values, which
+can be ORed together:
+
+ 1 - A module with a non-GPL license has been loaded, this
+ includes modules with no license.
+ Set by modutils >= 2.4.9.
+ 2 - A module was force loaded by insmod -f.
+ Set by modutils >= 2.4.9.
X
X ==============================================================
X
diff -u --recursive --new-file v2.4.10/linux/Documentation/usb/CREDITS linux/Documentation/usb/CREDITS
--- v2.4.10/linux/Documentation/usb/CREDITS Mon Oct 2 12:02:16 2000
+++ linux/Documentation/usb/CREDITS Fri Oct 5 12:04:50 2001
@@ -8,7 +8,7 @@
X David Brownell <dbro...@users.sourceforge.net>
X Alan Cox <al...@lxorguk.ukuu.org.uk>
X Randy Dunlap <randy....@intel.com>
- Johannes Erdfelt <jerd...@sventech.com>
+ Johannes Erdfelt <joha...@erdfelt.com>
X Deti Fliegl <de...@fliegl.de>
X ham <h...@unsuave.com>
X Bradley M Keryan <ker...@andrew.cmu.edu>
diff -u --recursive --new-file v2.4.10/linux/MAINTAINERS linux/MAINTAINERS
--- v2.4.10/linux/MAINTAINERS Sun Sep 23 11:40:54 2001
+++ linux/MAINTAINERS Fri Oct 5 12:29:28 2001
@@ -132,6 +132,14 @@
X W: http://www.uni-karlsruhe.de/~Robert.Siemer/Private/
X S: Maintained
X
+ACP/MWAVE MODEM
+P: Paul B Schroeder
+M: pau...@us.ibm.com
+P: Mike Sullivan
+M: sull...@us.ibm.com
+W: http://www.ibm.com/linux/ltc/
+S: Supported
+
X ACPI
X P: Andy Grover
X M: andrew...@intel.com
@@ -329,6 +337,12 @@
X M: h...@zytor.com
X S: Maintained
X
+CRAMFS FILESYSTEM
+P: Daniel Quinlan
+M: qui...@transmeta.com
+W: http://sourceforge.net/projects/cramfs/
+S: Maintained
+
X CREDITS FILE
X P: John A. Martin
X M: j...@acm.org
@@ -1473,7 +1487,6 @@
X
X USB HUB
X P: Johannes Erdfelt
-M: jerd...@valinux.com
X M: joha...@erdfelt.com
X L: linux-u...@lists.sourceforge.net
X L: linux-u...@lists.sourceforge.net
@@ -1578,7 +1591,6 @@
X
X USB SUBSYSTEM
X P: Johannes Erdfelt
-M: jerd...@valinux.com
X M: joha...@erdfelt.com
X L: linux-u...@lists.sourceforge.net
X L: linux-u...@lists.sourceforge.net
diff -u --recursive --new-file v2.4.10/linux/Makefile linux/Makefile
--- v2.4.10/linux/Makefile Sun Sep 23 11:40:54 2001
+++ linux/Makefile Tue Oct 9 16:43:18 2001
@@ -1,6 +1,6 @@
X VERSION = 2
X PATCHLEVEL = 4
-SUBLEVEL = 10
+SUBLEVEL = 11
X EXTRAVERSION =
X
X KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
diff -u --recursive --new-file v2.4.10/linux/README linux/README
--- v2.4.10/linux/README Sun Mar 25 18:24:31 2001
+++ linux/README Fri Oct 5 12:10:00 2001
@@ -192,11 +192,7 @@
X to the place where your regular bootable kernel is found.
X
X For some, this is on a floppy disk, in which case you can copy the
- kernel bzImage file to /dev/fd0 to make a bootable floppy. Please note
- that you can not boot a kernel by directly dumping it to a 720k
- double-density 3.5" floppy. In this case, it is highly recommended
- that you install LILO on your double-density boot floppy or switch to
- high-density floppies.
+ kernel bzImage file to /dev/fd0 to make a bootable floppy.
X
X If you boot Linux from the hard drive, chances are you use LILO which
X uses the kernel image as specified in the file /etc/lilo.conf. The
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/boot/Makefile linux/arch/alpha/boot/Makefile
--- v2.4.10/linux/arch/alpha/boot/Makefile Mon Sep 25 12:36:09 2000
+++ linux/arch/alpha/boot/Makefile Thu Oct 4 18:47:08 2001
@@ -59,7 +59,7 @@
X echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T
X ifdef INITRD
X [ -f $(INITRD) ] || exit 1
- echo "#define INITRD_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
+ echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
X endif
X cmp -s $@T $@ || mv -f $@T $@
X rm -f $@T
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/boot/bootp.c linux/arch/alpha/boot/bootp.c
--- v2.4.10/linux/arch/alpha/boot/bootp.c Mon Jun 19 17:59:32 2000
+++ linux/arch/alpha/boot/bootp.c Thu Oct 4 18:47:08 2001
@@ -147,7 +147,7 @@
X */
X static long nbytes;
X static char envval[256] __attribute__((aligned(8)));
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
X static unsigned long initrd_start;
X #endif
X
@@ -164,7 +164,7 @@
X }
X pal_init();
X
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
X /* The initrd must be page-aligned. See below for the
X cause of the magic number 5. */
X initrd_start = ((START_ADDR + 5*KERNEL_SIZE) | (PAGE_SIZE-1)) + 1;
@@ -192,17 +192,17 @@
X *
X * Sigh... */
X
-#ifdef INITRD_SIZE
- load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_SIZE);
+#ifdef INITRD_IMAGE_SIZE
+ load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_IMAGE_SIZE);
X #endif
X load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
X load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
X
X memset((char*)ZERO_PGE, 0, PAGE_SIZE);
X strcpy((char*)ZERO_PGE, envval);
-#ifdef INITRD_SIZE
+#ifdef INITRD_IMAGE_SIZE
X ((long *)(ZERO_PGE+256))[0] = initrd_start;
- ((long *)(ZERO_PGE+256))[1] = INITRD_SIZE;
+ ((long *)(ZERO_PGE+256))[1] = INITRD_IMAGE_SIZE;
X #endif
X
X runkernel();
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v2.4.10/linux/arch/alpha/config.in Mon Aug 27 12:41:37 2001
+++ linux/arch/alpha/config.in Thu Oct 4 18:47:08 2001
@@ -142,15 +142,18 @@
X then
X define_bool CONFIG_ALPHA_EV6 y
X define_bool CONFIG_ALPHA_TSUNAMI y
+ bool 'EV67 (or later) CPU (speed > 600MHz)?' CONFIG_ALPHA_EV67
X fi
X if [ "$CONFIG_ALPHA_SHARK" = "y" ]
X then
+ define_bool CONFIG_ALPHA_EV6 y
X define_bool CONFIG_ALPHA_EV67 y
X define_bool CONFIG_ALPHA_TSUNAMI y
X fi
X if [ "$CONFIG_ALPHA_WILDFIRE" = "y" -o "$CONFIG_ALPHA_TITAN" = "y" ]
X then
- define_bool CONFIG_ALPHA_EV6 y
+ define_bool CONFIG_ALPHA_EV6 y
+ define_bool CONFIG_ALPHA_EV67 y
X fi
X if [ "$CONFIG_ALPHA_RAWHIDE" = "y" ]
X then
@@ -170,6 +173,7 @@
X then
X define_bool CONFIG_ALPHA_IRONGATE y
X define_bool CONFIG_ALPHA_EV6 y
+ define_bool CONFIG_ALPHA_EV67 y
X fi
X
X if [ "$CONFIG_ALPHA_JENSEN" = "y" -o "$CONFIG_ALPHA_MIKASA" = "y" \
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/irq_alpha.c linux/arch/alpha/kernel/irq_alpha.c
--- v2.4.10/linux/arch/alpha/kernel/irq_alpha.c Sun Sep 23 11:40:55 2001
+++ linux/arch/alpha/kernel/irq_alpha.c Thu Oct 4 18:47:08 2001
@@ -108,11 +108,6 @@
X wrent(entInt, 0);
X
X alpha_mv.init_irq();
-
- /* If we had wanted SRM console printk echoing early, undo it now. */
- if (alpha_using_srm && srmcons_output) {
- unregister_srm_console();
- }
X }
X
X /*
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
--- v2.4.10/linux/arch/alpha/kernel/process.c Sun Sep 23 11:40:55 2001
+++ linux/arch/alpha/kernel/process.c Sun Sep 30 12:26:08 2001
@@ -214,7 +214,8 @@
X {
X printk("\n");
X printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
- printk("ps: %04lx pc: [<%016lx>] CPU %d\n", regs->ps, regs->pc, smp_processor_id());
+ printk("ps: %04lx pc: [<%016lx>] CPU %d %s\n",
+ regs->ps, regs->pc, smp_processor_id(), print_tainted());
X printk("rp: [<%016lx>] sp: %p\n", regs->r26, regs+1);
X printk(" r0: %016lx r1: %016lx r2: %016lx r3: %016lx\n",
X regs->r0, regs->r1, regs->r2, regs->r3);
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
--- v2.4.10/linux/arch/alpha/kernel/setup.c Mon Aug 27 12:41:38 2001
+++ linux/arch/alpha/kernel/setup.c Thu Oct 4 18:47:08 2001
@@ -63,12 +63,20 @@
X /* Which processor we booted from. */
X int boot_cpuid;
X
-/* Using SRM callbacks for initial console output. This works from
- setup_arch() time through the end of init_IRQ(), as those places
- are under our control.
-
- By default, OFF; set it with a bootcommand arg of "srmcons".
-*/
+/*
+ * Using SRM callbacks for initial console output. This works from
+ * setup_arch() time through the end of time_init(), as those places
+ * are under our (Alpha) control.
+
+ * "srmcons" specified in the boot command arguments allows us to
+ * see kernel messages during the period of time before the true
+ * console device is "registered" during console_init(). As of this
+ * version (2.4.10), time_init() is the last Alpha-specific code
+ * called before console_init(), so we put "unregister" code
+ * there to prevent schizophrenic console behavior later... ;-}
+ *
+ * By default, OFF; set it with a bootcommand arg of "srmcons".
+ */
X int srmcons_output = 0;
X
X /* Enforce a memory size limit; useful for testing. By default, none. */
@@ -85,7 +93,7 @@
X
X static struct alpha_machine_vector *get_sysvec(long, long, long);
X static struct alpha_machine_vector *get_sysvec_byname(const char *);
-static void get_sysnames(long, long, char **, char **);
+static void get_sysnames(long, long, long, char **, char **);
X
X static char command_line[COMMAND_LINE_SIZE];
X char saved_command_line[COMMAND_LINE_SIZE];
@@ -537,14 +545,14 @@
X /*
X * Indentify and reconfigure for the current system.
X */
+ cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
+
X get_sysnames(hwrpb->sys_type, hwrpb->sys_variation,
- &type_name, &var_name);
+ cpu->type, &type_name, &var_name);
X if (*var_name == '0')
X var_name = "";
X
X if (!vec) {
- cpu = (struct percpu_struct*)
- ((char*)hwrpb + hwrpb->processor_offset);
X vec = get_sysvec(hwrpb->sys_type, hwrpb->sys_variation,
X cpu->type);
X }
@@ -801,6 +809,8 @@
X /* Member ID is a bit-field. */
X long member = (variation >> 10) & 0x3f;
X
+ cpu &= 0xffffffff; /* make it usable */
+
X switch (type) {
X case ST_DEC_ALCOR:
X if (member < N(alcor_indices))
@@ -809,6 +819,10 @@
X case ST_DEC_EB164:
X if (member < N(eb164_indices))
X vec = eb164_vecs[eb164_indices[member]];
+ /* PC164 may show as EB164 variation with EV56 CPU,
+ but, since no true EB164 had anything but EV5... */
+ if (vec == &eb164_mv && cpu == EV56_CPU)
+ vec = &pc164_mv;
X break;
X case ST_DEC_EB64P:
X if (member < N(eb64p_indices))
@@ -827,21 +841,18 @@
X vec = tsunami_vecs[tsunami_indices[member]];
X break;
X case ST_DEC_1000:
- cpu &= 0xffffffff;
X if (cpu == EV5_CPU || cpu == EV56_CPU)
X vec = &mikasa_primo_mv;
X else
X vec = &mikasa_mv;
X break;
X case ST_DEC_NORITAKE:
- cpu &= 0xffffffff;
X if (cpu == EV5_CPU || cpu == EV56_CPU)
X vec = &noritake_primo_mv;
X else
X vec = &noritake_mv;
X break;
X case ST_DEC_2100_A500:
- cpu &= 0xffffffff;
X if (cpu == EV5_CPU || cpu == EV56_CPU)
X vec = &sable_gamma_mv;
X else
@@ -905,7 +916,7 @@
X }
X
X static void
-get_sysnames(long type, long variation,
+get_sysnames(long type, long variation, long cpu,
X char **type_name, char **variation_name)
X {
X long member;
@@ -938,12 +949,18 @@
X
X member = (variation >> 10) & 0x3f; /* member ID is a bit-field */
X
+ cpu &= 0xffffffff; /* make it usable */
+
X switch (type) { /* select by family */
X default: /* default to variation "0" for now */
X break;
X case ST_DEC_EB164:
X if (member < N(eb164_indices))
X *variation_name = eb164_names[eb164_indices[member]];
+ /* PC164 may show as EB164 variation, but with EV56 CPU,
+ so, since no true EB164 had anything but EV5... */
+ if (eb164_indices[member] == 0 && cpu == EV56_CPU)
+ *variation_name = eb164_names[1]; /* make it PC164 */
X break;
X case ST_DEC_ALCOR:
X if (member < N(alcor_indices))
@@ -1054,7 +1071,7 @@
X cpu_name = cpu_names[cpu_index];
X
X get_sysnames(hwrpb->sys_type, hwrpb->sys_variation,
- &systype_name, &sysvariation_name);
+ cpu->type, &systype_name, &sysvariation_name);
X
X nr_processors = get_nr_processors(cpu, hwrpb->nr_processors);
X
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
--- v2.4.10/linux/arch/alpha/kernel/smp.c Sun Sep 23 11:40:55 2001
+++ linux/arch/alpha/kernel/smp.c Mon Oct 8 12:37:11 2001
@@ -171,13 +171,6 @@
X /* Set interrupt vector. */
X wrent(entInt, 0);
X
- /* Setup the scheduler for this processor. */
- init_idle();
-
- /* ??? This should be in init_idle. */
- atomic_inc(&init_mm.mm_count);
- current->active_mm = &init_mm;
-
X /* Get our local ticker going. */
X smp_setup_percpu_timer(cpuid);
X
@@ -207,6 +200,12 @@
X DBGS(("smp_callin: commencing CPU %d current %p\n",
X cpuid, current));
X
+ /* Setup the scheduler for this processor. */
+ init_idle();
+
+ /* ??? This should be in init_idle. */
+ atomic_inc(&init_mm.mm_count);
+ current->active_mm = &init_mm;
X /* Do nothing. */
X cpu_idle();
X }
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/sys_cabriolet.c linux/arch/alpha/kernel/sys_cabriolet.c
--- v2.4.10/linux/arch/alpha/kernel/sys_cabriolet.c Wed Jan 24 15:16:23 2001
+++ linux/arch/alpha/kernel/sys_cabriolet.c Thu Oct 4 18:47:08 2001
@@ -106,12 +106,12 @@
X }
X
X static void __init
-cabriolet_init_irq(void)
+common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r))
X {
X init_i8259a_irqs();
X
X if (alpha_using_srm) {
- alpha_mv.device_interrupt = srm_device_interrupt;
+ alpha_mv.device_interrupt = srm_dev_int;
X init_srm_irqs(35, 0);
X }
X else {
@@ -131,29 +131,47 @@
X setup_irq(16+4, &isa_cascade_irqaction);
X }
X
+static void __init
+cabriolet_init_irq(void)
+{
+ common_init_irq(srm_device_interrupt);
+}
+
X #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_PC164)
+/* In theory, the PC164 has the same interrupt hardware as the other
+ Cabriolet based systems. However, something got screwed up late
+ in the development cycle which broke the interrupt masking hardware.
+ Repeat, it is not possible to mask and ack interrupts. At all.
+
+ In an attempt to work around this, while processing interrupts,
+ we do not allow the IPL to drop below what it is currently. This
+ prevents the possibility of recursion.
+
+ ??? Another option might be to force all PCI devices to use edge
+ triggered rather than level triggered interrupts. That might be
+ too invasive though. */
+
X static void
-pc164_device_interrupt(unsigned long v, struct pt_regs *r)
+pc164_srm_device_interrupt(unsigned long v, struct pt_regs *r)
X {
- /* In theory, the PC164 has the same interrupt hardware as
- the other Cabriolet based systems. However, something
- got screwed up late in the development cycle which broke
- the interrupt masking hardware. Repeat, it is not
- possible to mask and ack interrupts. At all.
-
- In an attempt to work around this, while processing
- interrupts, we do not allow the IPL to drop below what
- it is currently. This prevents the possibility of
- recursion.
-
- ??? Another option might be to force all PCI devices
- to use edge triggered rather than level triggered
- interrupts. That might be too invasive though. */
+ __min_ipl = getipl();
+ srm_device_interrupt(v, r);
+ __min_ipl = 0;
+}
X
+static void
+pc164_device_interrupt(unsigned long v, struct pt_regs *r)
+{
X __min_ipl = getipl();
X cabriolet_device_interrupt(v, r);
X __min_ipl = 0;
X }
+
+static void __init
+pc164_init_irq(void)
+{
+ common_init_irq(pc164_srm_device_interrupt);
+}
X #endif
X
X /*
@@ -419,7 +437,7 @@
X device_interrupt: pc164_device_interrupt,
X
X init_arch: cia_init_arch,
- init_irq: cabriolet_init_irq,
+ init_irq: pc164_init_irq,
X init_rtc: common_init_rtc,
X init_pci: alphapc164_init_pci,
X pci_map_irq: alphapc164_map_irq,
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
--- v2.4.10/linux/arch/alpha/kernel/time.c Mon Aug 27 12:41:38 2001
+++ linux/arch/alpha/kernel/time.c Thu Oct 4 18:47:08 2001
@@ -332,6 +332,21 @@
X alpha_mv.init_rtc();
X
X do_get_fast_time = do_gettimeofday;
+
+ /*
+ * If we had wanted SRM console printk echoing early, undo it now.
+ *
+ * "srmcons" specified in the boot command arguments allows us to
+ * see kernel messages during the period of time before the true
+ * console device is "registered" during console_init(). As of this
+ * version (2.4.10), time_init() is the last Alpha-specific code
+ * called before console_init(), so we put this "unregister" code
+ * here to prevent schizophrenic console behavior later... ;-}
+ */
+ if (alpha_using_srm && srmcons_output) {
+ unregister_srm_console();
+ srmcons_output = 0;
+ }
X }
X
X /*
diff -u --recursive --new-file v2.4.10/linux/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
--- v2.4.10/linux/arch/alpha/kernel/traps.c Sun Sep 23 11:40:55 2001
+++ linux/arch/alpha/kernel/traps.c Sun Sep 30 12:26:08 2001
@@ -53,8 +53,8 @@
X void
X dik_show_regs(struct pt_regs *regs, unsigned long *r9_15)
X {
- printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n",
- regs->pc, regs->r26, regs->ps);
+ printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx %s\n",
+ regs->pc, regs->r26, regs->ps, print_tainted());
X printk("v0 = %016lx t0 = %016lx t1 = %016lx\n",
X regs->r0, regs->r1, regs->r2);
X printk("t2 = %016lx t3 = %016lx t4 = %016lx\n",
diff -u --recursive --new-file v2.4.10/linux/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
--- v2.4.10/linux/arch/arm/kernel/process.c Sun Sep 23 11:40:55 2001
+++ linux/arch/arm/kernel/process.c Sun Sep 30 12:26:08 2001
@@ -158,10 +158,10 @@
X
X flags = condition_codes(regs);
X
- printk("pc : [<%08lx>] lr : [<%08lx>]\n"
+ printk("pc : [<%08lx>] lr : [<%08lx>] %s\n"
X "sp : %08lx ip : %08lx fp : %08lx\n",
X instruction_pointer(regs),
- regs->ARM_lr, regs->ARM_sp,
+ regs->ARM_lr, print_tainted(), regs->ARM_sp,
X regs->ARM_ip, regs->ARM_fp);
X printk("r10: %08lx r9 : %08lx r8 : %08lx\n",
X regs->ARM_r10, regs->ARM_r9,
diff -u --recursive --new-file v2.4.10/linux/arch/cris/Makefile linux/arch/cris/Makefile
--- v2.4.10/linux/arch/cris/Makefile Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/Makefile Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.20 2001/07/05 10:07:58 jonashg Exp $
+# $Id: Makefile,v 1.22 2001/10/01 14:42:38 bjornw Exp $
X # cris/Makefile
X #
X # This file is included by the global makefile so that you can add your own
@@ -29,23 +29,25 @@
X -e s/@CONFIG_ETRAX_DRAM_SIZE_M@/$(CONFIG_ETRAX_DRAM_SIZE)/ \
X < $(LD_SCRIPT) > $(LD_SCRIPT).tmp; \
X else true; \
- fi && $(CROSS_COMPILE)ld -mcriself
+ fi && $(CROSS_COMPILE)gcc -mlinux -nostdlib
X
-LINKFLAGS =-qmagic -mcriself -T $(LD_SCRIPT).tmp
+LINKFLAGS = -mlinux -T $(LD_SCRIPT).tmp
X
X # objcopy is used to make binary images from the resulting linked file
X
X OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
X
X # normally, gcc on a linux box adds __linux__ but we do it "manually"
-# gcc-cris defaults to a.out, we need ELF, so -melf
+# -mlinux enables -march=v10, -fno-underscores among others
X
-CFLAGS := $(CFLAGS) -march=v10 -fno-strict-aliasing -pipe -D__linux__
+CFLAGS := $(CFLAGS) -mlinux -fno-strict-aliasing -pipe -D__linux__
X
X ifdef CONFIG_ETRAX_KGDB
X CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
X CFLAGS += -fno-omit-frame-pointer
X endif
+
+AFLAGS += -mlinux
X
X HEAD := arch/cris/kernel/head.o
X
diff -u --recursive --new-file v2.4.10/linux/arch/cris/boot/rescue/Makefile linux/arch/cris/boot/rescue/Makefile
--- v2.4.10/linux/arch/cris/boot/rescue/Makefile Fri Apr 6 10:42:55 2001
+++ linux/arch/cris/boot/rescue/Makefile Mon Oct 8 11:43:54 2001
@@ -4,9 +4,9 @@
X ifndef TOPDIR
X TOPDIR = ../../../..
X endif
-CC = gcc-cris -I $(TOPDIR)/include
+CC = gcc-cris -mlinux -I $(TOPDIR)/include
X CFLAGS = -O2
-LD = ld-cris
+LD = gcc-cris -mlinux -nostdlib
X OBJCOPY = objcopy-cris
X
X all: rescue.bin testrescue.bin kimagerescue.bin
@@ -48,3 +48,7 @@
X rm -f *.o *.bin
X
X fastdep:
+
+modules:
+
+modules-install:
diff -u --recursive --new-file v2.4.10/linux/arch/cris/boot/rescue/head.S linux/arch/cris/boot/rescue/head.S
--- v2.4.10/linux/arch/cris/boot/rescue/head.S Tue May 1 16:04:56 2001
+++ linux/arch/cris/boot/rescue/head.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: head.S,v 1.7 2001/04/18 12:05:07 bjornw Exp $
+/* $Id: head.S,v 1.8 2001/10/03 17:15:15 bjornw Exp $
X *
X * Rescue code, made to reside at the beginning of the
X * flash-memory. when it starts, it checks a partition
@@ -134,12 +134,12 @@
X ;; change 1's to 0's without erasing the sector, it is possible to add new
X ;; code after this and altering the jumptarget in an upgrade.
X
-jtcd: move.d [jumptarget], r0
- cmp.d 0xffffffff, r0
+jtcd: move.d [jumptarget], $r0
+ cmp.d 0xffffffff, $r0
X beq no_newjump
X nop
X
- jump [r0]
+ jump [$r0]
X
X jumptarget:
X .dword 0xffffffff ; can be overwritten later to insert new code
@@ -151,69 +151,69 @@
X ;; we now should go through the checksum-table and check the listed
X ;; partitions for errors.
X
- move.d PTABLE_START, r3
- move.d [r3], r0
- cmp.d NOP_DI, r0 ; make sure the nop/di is there...
+ move.d PTABLE_START, $r3
+ move.d [$r3], $r0
+ cmp.d NOP_DI, $r0 ; make sure the nop/di is there...
X bne do_rescue
X nop
X
X ;; skip the code transparency block (10 bytes).
X
- addq 10, r3
+ addq 10, $r3
X
X ;; check for correct magic
X
- move.w [r3+], r0
- cmp.w PTABLE_MAGIC, r0
+ move.w [$r3+], $r0
+ cmp.w PTABLE_MAGIC, $r0
X bne do_rescue ; didn't recognize - trig rescue
X nop
X
X ;; check for correct ptable checksum
X
- movu.w [r3+], r2 ; ptable length
- move.d r2, r8 ; save for later, length of total ptable
- addq 28, r8 ; account for the rest
- move.d [r3+], r4 ; ptable checksum
- move.d r3, r1
+ movu.w [$r3+], $r2 ; ptable length
+ move.d $r2, $r8 ; save for later, length of total ptable
+ addq 28, $r8 ; account for the rest
+ move.d [$r3+], $r4 ; ptable checksum
+ move.d $r3, $r1
X jsr checksum ; r1 source, r2 length, returns in r0
X
- cmp.d r0, r4
+ cmp.d $r0, $r4
X bne do_rescue ; didn't match - trig rescue
X nop
X
X ;; ptable is ok. validate each entry.
X
- moveq -1, r7
+ moveq -1, $r7
X
-ploop: move.d [r3+], r1 ; partition offset (from ptable start)
+ploop: move.d [$r3+], $r1 ; partition offset (from ptable start)
X bne notfirst ; check if its the partition containing ptable
X nop ; yes..
- move.d r8, r1 ; for its checksum check, skip the ptable
- move.d [r3+], r2 ; partition length
- sub.d r8, r2 ; minus the ptable length
+ move.d $r8, $r1 ; for its checksum check, skip the ptable
+ move.d [$r3+], $r2 ; partition length
+ sub.d $r8, $r2 ; minus the ptable length
X ba bosse
X nop
X notfirst:
- cmp.d -1, r1 ; the end of the ptable ?
+ cmp.d -1, $r1 ; the end of the ptable ?
X beq flash_ok ; if so, the flash is validated
- move.d [r3+], r2 ; partition length
-bosse: move.d [r3+], r5 ; checksum
- move.d [r3+], r4 ; type and flags
- addq 16, r3 ; skip the reserved bytes
- btstq 16, r4 ; check ro flag
+ move.d [$r3+], $r2 ; partition length
+bosse: move.d [$r3+], $r5 ; checksum
+ move.d [$r3+], $r4 ; type and flags
+ addq 16, $r3 ; skip the reserved bytes
+ btstq 16, $r4 ; check ro flag
X bpl ploop ; rw partition, skip validation
X nop
- btstq 17, r4 ; check bootable flag
+ btstq 17, $r4 ; check bootable flag
X bpl 1f
X nop
- move.d r1, r7 ; remember boot partition offset
+ move.d $r1, $r7 ; remember boot partition offset
X 1:
X
- add.d PTABLE_START, r1
+ add.d PTABLE_START, $r1
X
X jsr checksum ; checksum the partition
X
- cmp.d r0, r5
+ cmp.d $r0, $r5
X beq ploop ; checksums matched, go to next entry
X nop
X
@@ -223,92 +223,92 @@
X ;; setup port PA and PB default initial directions and data
X ;; (so we can flash LEDs, and so that DTR and others are set)
X
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0
- move.b r0, [R_PORT_PA_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0
- move.b r0, [R_PORT_PA_DATA]
-
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0
- move.b r0, [R_PORT_PB_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0
- move.b r0, [R_PORT_PB_DATA]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
+ move.b $r0, [R_PORT_PA_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
+ move.b $r0, [R_PORT_PA_DATA]
+
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
+ move.b $r0, [R_PORT_PB_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
+ move.b $r0, [R_PORT_PB_DATA]
X
X ;; setup the serial port at 115200 baud
X
- moveq 0, r0
- move.d r0, [SERXOFF]
+ moveq 0, $r0
+ move.d $r0, [SERXOFF]
X
- move.b 0x99, r0
- move.b r0, [SERBAUD] ; 115.2kbaud for both transmit and receive
+ move.b 0x99, $r0
+ move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit and receive
X
- move.b 0x40, r0 ; rec enable
- move.b r0, [SERRECC]
+ move.b 0x40, $r0 ; rec enable
+ move.b $r0, [SERRECC]
X
- moveq 0, r1 ; "timer" to clock out a LED red flash
- move.d CODE_START, r3 ; destination counter
- movu.w CODE_LENGTH, r4 ; length
+ moveq 0, $r1 ; "timer" to clock out a LED red flash
+ move.d CODE_START, $r3 ; destination counter
+ movu.w CODE_LENGTH, $r4; length
X
X wait_ser:
- addq 1, r1
+ addq 1, $r1
X #ifndef CONFIG_ETRAX_NO_LEDS
X #ifdef CONFIG_ETRAX_PA_LEDS
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r2
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r2
X #endif
X #ifdef CONFIG_ETRAX_PB_LEDS
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r2
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r2
X #endif
- move.d (1 << CONFIG_ETRAX_LED1R) | (1 << CONFIG_ETRAX_LED2R), r0
- btstq 16, r1
+ move.d (1 << CONFIG_ETRAX_LED1R) | (1 << CONFIG_ETRAX_LED2R), $r0
+ btstq 16, $r1
X bpl 1f
X nop
- or.d r0, r2 ; set bit
+ or.d $r0, $r2 ; set bit
X ba 2f
X nop
-1: not r0 ; clear bit
- and.d r0, r2
+1: not $r0 ; clear bit
+ and.d $r0, $r2
X 2:
X #ifdef CONFIG_ETRAX_PA_LEDS
- move.b r2, [R_PORT_PA_DATA]
+ move.b $r2, [R_PORT_PA_DATA]
X #endif
X #ifdef CONFIG_ETRAX_PB_LEDS
- move.b r2, [R_PORT_PB_DATA]
+ move.b $r2, [R_PORT_PB_DATA]
X #endif
X #ifdef CONFIG_ETRAX_90000000_LEDS
- move.b r2, [0x90000000]
+ move.b $r2, [0x90000000]
X #endif
X #endif
X
X ;; check if we got something on the serial port
X
- move.b [SERSTAT], r0
- btstq 0, r0 ; data_avail
+ move.b [SERSTAT], $r0
+ btstq 0, $r0 ; data_avail
X bpl wait_ser
X nop
X
X ;; got something - copy the byte and loop
X
- move.b [SERRDAT], r0
- move.b r0, [r3+]
+ move.b [SERRDAT], $r0
+ move.b $r0, [$r3+]
X
- subq 1, r4 ; decrease length
+ subq 1, $r4 ; decrease length
X bne wait_ser
X nop
X
X ;; jump into downloaded code
X
- move.d RAM_INIT_MAGIC, r8 ; Tell next product that DRAM is initialized
+ move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized
X jump CODE_START
X
X flash_ok:
X ;; check r7, which contains either -1 or the partition to boot from
X
- cmp.d -1, r7
+ cmp.d -1, $r7
X bne 1f
X nop
- move.d PTABLE_START, r7; otherwise use the ptable start
+ move.d PTABLE_START, $r7; otherwise use the ptable start
X 1:
- move.d RAM_INIT_MAGIC, r8 ; Tell next product that DRAM is initialized
- jump r7 ; boot!
+ move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized
+ jump $r7 ; boot!
X
X
X ;; Helper subroutines
@@ -318,9 +318,9 @@
X ;; r2 - length in bytes
X ;; result will be in r0
X checksum:
- moveq 0, r0
-1: addu.b [r1+], r0
- subq 1, r2
+ moveq 0, $r0
+1: addu.b [$r1+], $r0
+ subq 1, $r2
X bne 1b
X nop
X ret
diff -u --recursive --new-file v2.4.10/linux/arch/cris/boot/rescue/kimagerescue.S linux/arch/cris/boot/rescue/kimagerescue.S
--- v2.4.10/linux/arch/cris/boot/rescue/kimagerescue.S Tue May 1 16:04:56 2001
+++ linux/arch/cris/boot/rescue/kimagerescue.S Mon Oct 8 11:43:54 2001
SHAR_EOF
true || echo 'restore of patch-2.4.11-dontuse failed'
fi
echo 'End of part 01'
echo 'File patch-2.4.11-dontuse is continued in part 02'
echo "02" > _shar_seq_.tmp
exit 0
#!/bin/sh -x
# this is part 02 of a 77 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.4.11-dontuse continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 02; then
echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.4.11-dontuse'
else
echo 'x - continuing with patch-2.4.11-dontuse'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.4.11-dontuse' &&
@@ -1,4 +1,4 @@
-/* $Id: kimagerescue.S,v 1.4 2001/04/18 12:04:46 bjornw Exp $
+/* $Id: kimagerescue.S,v 1.5 2001/10/03 17:15:15 bjornw Exp $
X *
X * Rescue code to be prepended on a kimage and copied to the
X * rescue serial port.
@@ -56,15 +56,15 @@
X ;; setup port PA and PB default initial directions and data
X ;; (so we can flash LEDs, and so that DTR and others are set)
X
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0
- move.b r0, [R_PORT_PA_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0
- move.b r0, [R_PORT_PA_DATA]
-
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0
- move.b r0, [R_PORT_PB_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0
- move.b r0, [R_PORT_PB_DATA]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
+ move.b $r0, [R_PORT_PA_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
+ move.b $r0, [R_PORT_PA_DATA]
+
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
+ move.b $r0, [R_PORT_PB_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
+ move.b $r0, [R_PORT_PB_DATA]
X
X ;; We need to setup the bus registers before we start using the DRAM
X #include "../../lib/dram_init.S"
@@ -74,68 +74,68 @@
X ;; We assume 8 MB is the minimum DRAM in an eLinux
X ;; product and put the sp at the top for now.
X
- move.d 0x40800000, sp
+ move.d 0x40800000, $sp
X
X ;; setup the serial port at 115200 baud
X
- moveq 0, r0
- move.d r0, [SERXOFF]
+ moveq 0, $r0
+ move.d $r0, [SERXOFF]
X
- move.b 0x99, r0
- move.b r0, [SERBAUD] ; 115.2kbaud for both transmit and receive
+ move.b 0x99, $r0
+ move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit and receive
X
- move.b 0x40, r0 ; rec enable
- move.b r0, [SERRECC]
+ move.b 0x40, $r0 ; rec enable
+ move.b $r0, [SERRECC]
X
X
- moveq 0, r1 ; "timer" to clock out a LED red flash
- move.d CODE_START, r3 ; destination counter
- move.d CODE_LENGTH, r4 ; length
- move.d TIMEOUT_VALUE, r5 ; "timeout" until jump
+ moveq 0, $r1 ; "timer" to clock out a LED red flash
+ move.d CODE_START, $r3 ; destination counter
+ move.d CODE_LENGTH, $r4 ; length
+ move.d TIMEOUT_VALUE, $r5 ; "timeout" until jump
X
X wait_ser:
- addq 1, r1
- subq 1, r5 ; decrease timeout
+ addq 1, $r1
+ subq 1, $r5 ; decrease timeout
X beq jump_start ; timed out
X nop
X #endif
X
X ;; check if we got something on the serial port
X
- move.b [SERSTAT], r0
- btstq 0, r0 ; data_avail
+ move.b [SERSTAT], $r0
+ btstq 0, $r0 ; data_avail
X bpl wait_ser
X nop
X
X ;; got something - copy the byte and loop
X
- move.b [SERRDAT], r0
- move.b r0, [r3+]
- move.d TIMEOUT_VALUE, r5 ; reset "timeout"
- subq 1, r4 ; decrease length
+ move.b [SERRDAT], $r0
+ move.b $r0, [$r3+]
+ move.d TIMEOUT_VALUE, $r5 ; reset "timeout"
+ subq 1, $r4 ; decrease length
X bne wait_ser
X nop
X jump_start:
diff -u --recursive --new-file v2.4.10/linux/arch/cris/boot/rescue/rescue.ld linux/arch/cris/boot/rescue/rescue.ld
--- v2.4.10/linux/arch/cris/boot/rescue/rescue.ld Fri Apr 6 10:42:55 2001
+++ linux/arch/cris/boot/rescue/rescue.ld Mon Oct 8 11:43:54 2001
@@ -8,13 +8,13 @@
X {
X .text :
X {
- _stext = . ;
+ stext = . ;
X *(.text)
- _etext = . ;
+ etext = . ;
X } > flash
X .data :
X {
X *(.data)
- _edata = . ;
+ edata = . ;
X } > flash
X }
diff -u --recursive --new-file v2.4.10/linux/arch/cris/boot/rescue/testrescue.S linux/arch/cris/boot/rescue/testrescue.S
--- v2.4.10/linux/arch/cris/boot/rescue/testrescue.S Tue May 1 16:04:56 2001
+++ linux/arch/cris/boot/rescue/testrescue.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: testrescue.S,v 1.2 2001/04/18 12:05:07 bjornw Exp $
+/* $Id: testrescue.S,v 1.3 2001/10/03 17:15:15 bjornw Exp $
X *
X * Simple testcode to download by the rescue block.
X * Just lits some LEDs to show it was downloaded correctly.
@@ -13,10 +13,10 @@
X
X nop
X nop
- moveq -1, r2
- move.b r2, [R_PORT_PA_DIR]
- moveq 0, r2
- move.b r2, [R_PORT_PA_DATA]
+ moveq -1, $r2
+ move.b $r2, [R_PORT_PA_DIR]
+ moveq 0, $r2
+ move.b $r2, [R_PORT_PA_DATA]
X
X endless:
X nop
diff -u --recursive --new-file v2.4.10/linux/arch/cris/config.in linux/arch/cris/config.in
--- v2.4.10/linux/arch/cris/config.in Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/config.in Mon Oct 8 11:43:54 2001
@@ -14,6 +14,15 @@
X endmenu
X
X mainmenu_option next_comment
+comment 'Loadable module support'
+bool 'Enable loadable module support' CONFIG_MODULES
+if [ "$CONFIG_MODULES" = "y" ]; then
+ bool ' Set version information on all module symbols' CONFIG_MODVERSIONS
+ bool ' Kernel module loader' CONFIG_KMOD
+fi
+endmenu
+
+mainmenu_option next_comment
X comment 'General setup'
X
X bool 'Networking support' CONFIG_NET
@@ -49,10 +58,8 @@
X int 'DRAM size (dec, in MB)' CONFIG_ETRAX_DRAM_SIZE 8
X
X int 'Buswidth of flash in bytes' CONFIG_ETRAX_FLASH_BUSWIDTH 2
-bool 'Use flash mirroring (for cramfs)' CONFIG_ETRAX_FLASH_MIRRORING_FOR_CRAMFS
-if [ "$CONFIG_ETRAX_FLASH_MIRRORING_FOR_CRAMFS" = "y" ]; then
- int ' Individual flash chip size (in MB)' CONFIG_ETRAX_FLASH_SIZE 2
-fi
+
+string 'Root device name' CONFIG_ETRAX_ROOT_DEVICE "/dev/mtdblock3"
X
X choice 'Product LED port' \
X "Port-PA-LEDs CONFIG_ETRAX_PA_LEDS \
diff -u --recursive --new-file v2.4.10/linux/arch/cris/cris.ld linux/arch/cris/cris.ld
--- v2.4.10/linux/arch/cris/cris.ld Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/cris.ld Mon Oct 8 11:43:54 2001
@@ -11,32 +11,37 @@
X SECTIONS
X {
X . = @CONFIG_ETRAX_DRAM_VIRTUAL_BASE@;
- _dram_start = .;
- _ibr_start = .;
+ dram_start = .;
+ ibr_start = .;
X . = . + 0x4000; /* see head.S and pages reserved at the start */
X
X _text = .; /* Text and read-only data */
- _text_start = .; /* lots of aliases */
+ text_start = .; /* lots of aliases */
X _stext = .;
X __stext = .;
X .text : {
X *(.text)
X *(.fixup)
X *(.text.__*)
- *(.rodata)
- *(.rodata.__*)
X }
+ .text.lock : { *(.text.lock) } /* out-of-line lock text */
+
+ _etext = . ; /* End of text section */
+ __etext = .;
+
+ .rodata : { *(.rodata) *(.rodata.__*) }
+ .kstrtab : { *(.kstrtab) }
X
X . = ALIGN(4); /* Exception table */
X __start___ex_table = .;
X __ex_table : { *(__ex_table) }
X __stop___ex_table = .;
X
- _etext = . ; /* End of text section */
- __etext = .;
+ __start___ksymtab = .; /* Kernel symbol table */
+ __ksymtab : { *(__ksymtab) }
+ __stop___ksymtab = .;
X
X . = ALIGN (4);
- ___data_rom_start = . ;
X ___data_start = . ;
X __Sdata = . ;
X .data : { /* Data */
@@ -49,17 +54,17 @@
X .data.init_task : { *(.data.init_task) }
X
X . = ALIGN(8192); /* Init code and data */
- ___init_begin = .;
+ __init_begin = .;
X .text.init : { *(.text.init) }
X .data.init : { *(.data.init) }
X . = ALIGN(16);
- ___setup_start = .;
+ __setup_start = .;
X .setup.init : { *(.setup.init) }
- ___setup_end = .;
+ __setup_end = .;
X .initcall.init : {
- ___initcall_start = .;
+ __initcall_start = .;
X *(.initcall.init);
- ___initcall_end = .;
+ __initcall_end = .;
X
X /* We fill to the next page, so we can discard all init
X pages without needing to consider what payload might be
@@ -68,7 +73,7 @@
X . = ALIGN (8192);
X }
X __vmlinux_end = .; /* last address of the physical file */
- ___init_end = .;
+ __init_end = .;
X
X __data_end = . ; /* Move to _edata ? */
X __bss_start = .; /* BSS */
@@ -88,5 +93,5 @@
X *(.exitcall.exit)
X }
X
- _dram_end = _dram_start + @CONFIG_ETRAX_DRAM_SIZE_M@*1024*1024;
+ dram_end = dram_start + @CONFIG_ETRAX_DRAM_SIZE_M@*1024*1024;
X }
diff -u --recursive --new-file v2.4.10/linux/arch/cris/defconfig linux/arch/cris/defconfig
--- v2.4.10/linux/arch/cris/defconfig Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/defconfig Mon Oct 8 11:43:54 2001
@@ -31,6 +31,7 @@
X CONFIG_ETRAX_DRAM_VIRTUAL_BASE=60000000
X CONFIG_ETRAX_DRAM_SIZE=8
X CONFIG_ETRAX_FLASH_BUSWIDTH=2
+CONFIG_ETRAX_ROOT_DEVICE="/dev/mtdblock3"
X CONFIG_ETRAX_PA_LEDS=y
X # CONFIG_ETRAX_PB_LEDS is not set
X # CONFIG_ETRAX_CSP0_LEDS is not set
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/Config.in linux/arch/cris/drivers/Config.in
--- v2.4.10/linux/arch/cris/drivers/Config.in Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/drivers/Config.in Mon Oct 8 11:43:54 2001
@@ -23,15 +23,17 @@
X
X bool 'Serial-port support' CONFIG_ETRAX_SERIAL
X if [ "$CONFIG_ETRAX_SERIAL" = "y" ]; then
- comment ' Port 0 is always enabled'
- bool ' Ser0 DTR, RI, DSR, CD on PB' CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
- if [ "$CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB" = "y" ]; then
- int ' Ser0 DTR on PB bit' CONFIG_ETRAX_SER0_DTR_ON_PB_BIT 4
- int ' Ser0 RI on PB bit' CONFIG_ETRAX_SER0_RI_ON_PB_BIT 5
- int ' Ser0 DSR on PB bit' CONFIG_ETRAX_SER0_DSR_ON_PB_BIT 6
- int ' Ser0 CD on PB bit' CONFIG_ETRAX_SER0_CD_ON_PB_BIT 7
+ bool ' Serial port 0 enabled' CONFIG_ETRAX_SERIAL_PORT0
+ if [ "$CONFIG_ETRAX_SERIAL_PORT0" = "y" ]; then
+ bool ' Ser0 DTR, RI, DSR, CD on PB' CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+ if [ "$CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB" = "y" ]; then
+ int ' Ser0 DTR on PB bit' CONFIG_ETRAX_SER0_DTR_ON_PB_BIT 4
+ int ' Ser0 RI on PB bit' CONFIG_ETRAX_SER0_RI_ON_PB_BIT 5
+ int ' Ser0 DSR on PB bit' CONFIG_ETRAX_SER0_DSR_ON_PB_BIT 6
+ int ' Ser0 CD on PB bit' CONFIG_ETRAX_SER0_CD_ON_PB_BIT 7
+ fi
X fi
-
+
X bool ' Serial port 1 enabled' CONFIG_ETRAX_SERIAL_PORT1
X if [ "$CONFIG_ETRAX_SERIAL_PORT1" = "y" ]; then
X bool ' Ser1 DTR, RI, DSR, CD on PB' CONFIG_ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
@@ -137,6 +139,7 @@
X
X define_bool CONFIG_MTD_CHAR y
X define_bool CONFIG_MTD_BLOCK y
+ define_bool CONFIG_MTD_PARTITIONS y
X fi
X
X bool 'I2C support' CONFIG_ETRAX_I2C
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/axisflashmap.c linux/arch/cris/drivers/axisflashmap.c
--- v2.4.10/linux/arch/cris/drivers/axisflashmap.c Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/drivers/axisflashmap.c Mon Oct 8 11:43:54 2001
@@ -11,6 +11,12 @@
X * partition split defined below.
X *
X * $Log: axisflashmap.c,v $
+ * Revision 1.14 2001/09/21 07:14:10 jonashg
+ * Made root filesystem (cramfs) use mtdblock driver when booting from flash.
+ *
+ * Revision 1.13 2001/08/15 13:57:35 jonashg
+ * Entire MTD updated to the linux 2.4.7 version.
+ *
X * Revision 1.12 2001/06/11 09:50:30 jonashg
X * Oops, 2MB is 0x200000 bytes.
X *
@@ -84,6 +90,8 @@
X
X #define WINDOW_SIZE (128 * 1024 * 1024)
X
+extern unsigned long romfs_start, romfs_length, romfs_in_flash; /* From head.S */
+
X /*
X * Map driver
X *
@@ -229,11 +237,11 @@
X printk(KERN_NOTICE "Axis flash mapping: %x at %x\n",
X WINDOW_SIZE, FLASH_CACHED_ADDR);
X
- mymtd = (struct mtd_info *)do_cfi_probe(&axis_map);
+ mymtd = (struct mtd_info *)do_map_probe("cfi", &axis_map);
X
X #ifdef CONFIG_MTD_AMDSTD
X if (!mymtd) {
- mymtd = (struct mtd_info *)do_amd_flash_probe(&axis_map);
+ mymtd = (struct mtd_info *)do_map_probe("amd_flash", &axis_map);
X }
X #endif
X
@@ -310,11 +318,23 @@
X use_default_ptable = !ptable_ok;
X }
X
- if(use_default_ptable) {
+ if (use_default_ptable) {
X printk(" Using default partition table\n");
X return add_mtd_partitions(mymtd, axis_default_partitions,
X NUM_DEFAULT_PARTITIONS);
X } else {
+ if (romfs_in_flash) {
+ axis_partitions[pidx].name = "romfs";
+ axis_partitions[pidx].size = romfs_length;
+ axis_partitions[pidx].offset = romfs_start -
+ FLASH_CACHED_ADDR;
+ axis_partitions[pidx].mask_flags |= MTD_WRITEABLE;
+
+ printk(" Adding readonly partition for romfs image:\n");
+ printk(pmsg, pidx, axis_partitions[pidx].offset,
+ axis_partitions[pidx].size);
+ pidx++;
+ }
X return add_mtd_partitions(mymtd, axis_partitions, pidx);
X }
X }
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/ethernet.c linux/arch/cris/drivers/ethernet.c
--- v2.4.10/linux/arch/cris/drivers/ethernet.c Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/drivers/ethernet.c Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: ethernet.c,v 1.17 2001/06/11 12:43:46 olof Exp $
+/* $Id: ethernet.c,v 1.18 2001/10/03 14:40:43 jonashg Exp $
X *
X * e100net.c: A network driver for the ETRAX 100LX network controller.
X *
@@ -7,6 +7,9 @@
X * The outline of this driver comes from skeleton.c.
X *
X * $Log: ethernet.c,v $
+ * Revision 1.18 2001/10/03 14:40:43 jonashg
+ * Update rx_bytes counter.
+ *
X * Revision 1.17 2001/06/11 12:43:46 olof
X * Modified defines for network LED behavior
X *
@@ -833,6 +836,7 @@
X }
X
X length += myNextRxDesc->hw_len; /* use hw_len for the last descr */
+ ((struct net_local *)dev->priv)->stats.rx_bytes += length;
X
X #ifdef ETHDEBUG
X printk("Got a packet of length %d:\n", length);
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/lpslave/bintocarr.pl linux/arch/cris/drivers/lpslave/bintocarr.pl
--- v2.4.10/linux/arch/cris/drivers/lpslave/bintocarr.pl Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/drivers/lpslave/bintocarr.pl Mon Oct 8 11:43:54 2001
@@ -1,5 +1,5 @@
X #!/usr/bin/perl -w
-# $Id: bintocarr.pl,v 1.3 2001/06/08 08:46:50 olof Exp $
+# $Id: bintocarr.pl,v 1.4 2001/08/08 08:18:13 bjarne Exp $
X # Copy of mkjulbin.pl made by Olof
X # convert a binary stdin to a C-file containing a char array of the input
X # first argument is the symbol name
@@ -7,7 +7,8 @@
X $symbol = shift @ARGV;
X
X print "#include <linux/init.h>\n\n";
-print "unsigned char $symbol", "[] __initdata = {\n";
+#print "unsigned char $symbol", "[] __initdata = {\n";
+print "unsigned char $symbol", "[] = {\n";
X
X my $char;
X
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/parport.c linux/arch/cris/drivers/parport.c
--- v2.4.10/linux/arch/cris/drivers/parport.c Sun Sep 23 11:40:55 2001
+++ linux/arch/cris/drivers/parport.c Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: parport.c,v 1.7 2001/06/25 16:17:30 jonashg Exp $
+/* $Id: parport.c,v 1.8 2001/09/26 11:51:52 bjornw Exp $
X *
X * Elinux parallel port driver
X * NOTE!
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/serial.c linux/arch/cris/drivers/serial.c
--- v2.4.10/linux/arch/cris/drivers/serial.c Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/drivers/serial.c Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: serial.c,v 1.13 2001/05/09 12:40:31 johana Exp $
+/* $Id: serial.c,v 1.18 2001/09/24 09:27:22 pkj Exp $
X *
X * Serial port driver for the ETRAX 100LX chip
X *
@@ -7,6 +7,30 @@
X * Many, many authors. Based once upon a time on serial.c for 16x50.
X *
X * $Log: serial.c,v $
+ * Revision 1.18 2001/09/24 09:27:22 pkj
+ * Completed ext_baud_table[] in cflag_to_baud() and cflag_to_etrax_baud().
+ *
+ * Revision 1.17 2001/08/24 11:32:49 ronny
+ * More fixes for the CONFIG_ETRAX_SERIAL_PORT0 define.
+ *
+ * Revision 1.16 2001/08/24 07:56:22 ronny
+ * Added config ifdefs around ser0 irq requests.
+ *
+ * Revision 1.15 2001/08/16 09:10:31 bjarne
+ * serial.c - corrected the initialization of rs_table, the wrong defines
+ * where used.
+ * Corrected a test in timed_flush_handler.
+ * Changed configured to enabled.
+ * serial.h - Changed configured to enabled.
+ *
+ * Revision 1.14 2001/08/15 07:31:23 bjarne
+ * Introduced two new members to the e100_serial struct.
+ * configured - Will be set to 1 if the port has been configured in .config
+ * uses_dma - Should be set to 1 if the port uses DMA. Currently it is set to 1
+ * when a port is opened. This is used to limit the DMA interrupt
+ * routines to only manipulate DMA channels actually used by the
+ * serial driver.
+ *
X * Revision 1.13 2001/05/09 12:40:31 johana
X * Use DMA_NBR and IRQ_NBR defines from dma.h and irq.h
X *
@@ -202,7 +226,7 @@
X *
X */
X
-static char *serial_version = "$Revision: 1.13 $";
+static char *serial_version = "$Revision: 1.18 $";
X
X #include <linux/config.h>
X #include <linux/version.h>
@@ -333,28 +357,52 @@
X R_DMA_CH6_STATUS, R_DMA_CH6_HWSW,
X R_DMA_CH7_CLR_INTR, R_DMA_CH7_FIRST, R_DMA_CH7_CMD,
X R_DMA_CH7_STATUS, R_DMA_CH7_HWSW,
- STD_FLAGS, DEF_RX, DEF_TX, 2 }, /* ttyS0 */
+ STD_FLAGS, DEF_RX, DEF_TX, 2,
+#ifdef CONFIG_ETRAX_SERIAL_PORT0
+ 1
+#else
+ 0
+#endif
+}, /* ttyS0 */
X #ifndef CONFIG_SVINTO_SIM
X { DEF_BAUD, (unsigned char *)R_SERIAL1_CTRL, 1U << 16, /* uses DMA 8 and 9 */
X R_DMA_CH8_CLR_INTR, R_DMA_CH8_FIRST, R_DMA_CH8_CMD,
X R_DMA_CH8_STATUS, R_DMA_CH8_HWSW,
X R_DMA_CH9_CLR_INTR, R_DMA_CH9_FIRST, R_DMA_CH9_CMD,
X R_DMA_CH9_STATUS, R_DMA_CH9_HWSW,
- STD_FLAGS, DEF_RX, DEF_TX, 3 }, /* ttyS1 */
+ STD_FLAGS, DEF_RX, DEF_TX, 3 ,
+#ifdef CONFIG_ETRAX_SERIAL_PORT1
+ 1
+#else
+ 0
+#endif
+}, /* ttyS1 */
X
X { DEF_BAUD, (unsigned char *)R_SERIAL2_CTRL, 1U << 4, /* uses DMA 2 and 3 */
X R_DMA_CH2_CLR_INTR, R_DMA_CH2_FIRST, R_DMA_CH2_CMD,
X R_DMA_CH2_STATUS, R_DMA_CH2_HWSW,
X R_DMA_CH3_CLR_INTR, R_DMA_CH3_FIRST, R_DMA_CH3_CMD,
X R_DMA_CH3_STATUS, R_DMA_CH3_HWSW,
- STD_FLAGS, DEF_RX, DEF_TX, 0 }, /* ttyS2 */
+ STD_FLAGS, DEF_RX, DEF_TX, 0,
+#ifdef CONFIG_ETRAX_SERIAL_PORT2
+ 1
+#else
+ 0
+#endif
+ }, /* ttyS2 */
X
X { DEF_BAUD, (unsigned char *)R_SERIAL3_CTRL, 1U << 8, /* uses DMA 4 and 5 */
X R_DMA_CH4_CLR_INTR, R_DMA_CH4_FIRST, R_DMA_CH4_CMD,
X R_DMA_CH4_STATUS, R_DMA_CH4_HWSW,
X R_DMA_CH5_CLR_INTR, R_DMA_CH5_FIRST, R_DMA_CH5_CMD,
X R_DMA_CH5_STATUS, R_DMA_CH5_HWSW,
- STD_FLAGS, DEF_RX, DEF_TX, 1 } /* ttyS3 */
+ STD_FLAGS, DEF_RX, DEF_TX, 1,
+#ifdef CONFIG_ETRAX_SERIAL_PORT3
+ 1
+#else
+ 0
+#endif
+ } /* ttyS3 */
X #endif
X };
X
@@ -544,11 +592,12 @@
X static int baud_table[] = {
X 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
X 4800, 9600, 19200, 38400 };
-
+
X static int ext_baud_table[] = {
- 0, 57600, 115200, 230400, 460800, 921600, 1843200, 6250000 };
-
- if(cflag & CBAUDEX)
+ 0, 57600, 115200, 230400, 460800, 921600, 1843200, 6250000,
+ 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ if (cflag & CBAUDEX)
X return ext_baud_table[(cflag & CBAUD) & ~CBAUDEX];
X else
X return baud_table[cflag & CBAUD];
@@ -560,19 +609,19 @@
X cflag_to_etrax_baud(unsigned int cflag)
X {
X char retval;
-
+
X static char baud_table[] = {
X -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, -1, 3, 4, 5, 6, 7 };
-
+
X static char ext_baud_table[] = {
- -1, 8, 9, 10, 11, 12, 13, 14 };
-
- if(cflag & CBAUDEX)
+ -1, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1 };
+
+ if (cflag & CBAUDEX)
X retval = ext_baud_table[(cflag & CBAUD) & ~CBAUDEX];
X else
X retval = baud_table[cflag & CBAUD];
-
- if(retval < 0) {
+
+ if (retval < 0) {
X printk("serdriver tried setting invalid baud rate, flags %x.\n", cflag);
X retval = 5; /* choose default 9600 instead */
X }
@@ -1266,6 +1315,8 @@
X
X for(i = 0; i < NR_PORTS; i++) {
X info = rs_table + i;
+ if (!info->uses_dma)
+ continue;
X /* check for dma_descr (dont need to check for dma_eop in output dma for serial */
X if(ireg & info->irq) {
X /* we can send a new dma bunch. make it so. */
@@ -1303,6 +1354,8 @@
X
X for(i = 0; i < NR_PORTS; i++) {
X info = rs_table + i;
+ if (!info->uses_dma)
+ continue;
X /* check for both dma_eop and dma_descr for the input dma channel */
X if(ireg & ((info->irq << 2) | (info->irq << 3))) {
X /* we have received something */
@@ -1340,7 +1393,7 @@
X
X for(i = 0; i < NR_PORTS; i++) {
X info = rs_table + i;
- if(!(info->flags & ASYNC_INITIALIZED))
+ if(!info->enabled || !(info->flags & ASYNC_INITIALIZED))
X continue;
X
X /* istatusadr (bit 6-0) hold number of bytes in fifo
@@ -1394,8 +1447,9 @@
X unsigned char rstat;
X
X for(i = 0; i < NR_PORTS; i++) {
-
X info = rs_table + i;
+ if (!info->uses_dma)
+ continue;
X rstat = info->port[REG_STATUS];
X
X if(*R_IRQ_MASK1_RD & (1U << (8+2*info->line))) { /* This line caused the irq */
@@ -1553,6 +1607,7 @@
X * Reset the DMA channels and make sure their interrupts are cleared
X */
X
+ info->uses_dma = 1;
X *info->icmdadr = IO_STATE(R_DMA_CH6_CMD, cmd, reset);
X *info->ocmdadr = IO_STATE(R_DMA_CH6_CMD, cmd, reset);
X
@@ -2753,23 +2808,11 @@
X if (line < 0 || line >= NR_PORTS)
X return -ENODEV;
X
- /* dont allow opening ports that are not enabled in the HW config */
-#ifndef CONFIG_ETRAX_SERIAL_PORT1
- if (line == 1)
- return -ENODEV;
-#endif
-#ifndef CONFIG_ETRAX_SERIAL_PORT2
- if (line == 2)
- return -ENODEV;
-#endif
-#ifndef CONFIG_ETRAX_SERIAL_PORT3
- if (line == 3)
- return -ENODEV;
-#endif
-
X /* find the corresponding e100_serial struct in the table */
X
X info = rs_table + line;
+ /* dont allow the opening of ports that are not enabled in the HW config */
+ if (!info->enabled) return -ENODEV;
X
X #ifdef SERIAL_DEBUG_OPEN
X printk("[%d] rs_open %s%d, count = %d\n", current->pid,
@@ -2911,6 +2954,8 @@
X len += sprintf(page, "serinfo:1.0 driver:%s\n",
X serial_version);
X for (i = 0; i < NR_PORTS && len < 4000; i++) {
+ if (!rs_table[i].enabled)
+ continue;
X l = line_info(page + len, &rs_table[i]);
X len += l;
X if (len+begin > off+count)
@@ -3022,6 +3067,7 @@
X /* do some initializing for the separate ports */
X
X for (i = 0, info = rs_table; i < NR_PORTS; i++,info++) {
+ info->uses_dma = 0;
X info->line = i;
X info->tty = 0;
X info->type = PORT_ETRAX;
@@ -3043,18 +3089,21 @@
X init_waitqueue_head(&info->close_wait);
X info->xmit.buf = 0;
X info->xmit.tail = info->xmit.head = 0;
-
- printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n",
- serial_driver.name, info->line, (unsigned int)info->port);
+ if (info->enabled) {
+ printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n",
+ serial_driver.name, info->line, (unsigned int)info->port);
+ }
X }
X
X #ifndef CONFIG_SVINTO_SIM
X /* Not needed in simulator. May only complicate stuff. */
X /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */
+#ifdef CONFIG_ETRAX_SERIAL_PORT0
X if(request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 0 dma tr", NULL))
X panic("irq22");
X if(request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 0 dma rec", NULL))
X panic("irq23");
+#endif
X #ifdef SERIAL_HANDLE_EARLY_ERRORS
X if(request_irq(SERIAL_IRQ_NBR, ser_interrupt, SA_INTERRUPT, "serial ", NULL))
X panic("irq8");
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/serial.h linux/arch/cris/drivers/serial.h
--- v2.4.10/linux/arch/cris/drivers/serial.h Tue May 1 16:04:56 2001
+++ linux/arch/cris/drivers/serial.h Mon Oct 8 11:43:54 2001
@@ -45,7 +45,11 @@
X u8 rx_ctrl; /* shadow for R_SERIALx_REC_CTRL */
X u8 tx_ctrl; /* shadow for R_SERIALx_TR_CTRL */
X u8 iseteop; /* bit number for R_SET_EOP for the input dma */
+ int enabled; /* Set to 1 if the port is enabled in HW config */
+
+
X /* end of fields defined in rs_table[] in .c-file */
+ int uses_dma; /* Set to 1 if DMA should be used */
X unsigned char fifo_didmagic; /* a fifo eop has been forced */
X
X struct etrax_dma_descr tr_descr, rec_descr;
diff -u --recursive --new-file v2.4.10/linux/arch/cris/drivers/usb-host.c linux/arch/cris/drivers/usb-host.c
--- v2.4.10/linux/arch/cris/drivers/usb-host.c Sun Sep 23 11:40:55 2001
+++ linux/arch/cris/drivers/usb-host.c Mon Oct 8 11:43:54 2001
@@ -3,7 +3,7 @@
X *
X * Copyright (c) 2001 Axis Communications AB.
X *
- * $Id: usb-host.c,v 1.9 2001/05/09 12:54:12 johana Exp $
+ * $Id: usb-host.c,v 1.11 2001/09/26 11:52:16 bjornw Exp $
X *
X */
X
@@ -34,7 +34,7 @@
X #define ETRAX_USB_RX_IRQ USB_DMA_RX_IRQ_NBR
X #define ETRAX_USB_TX_IRQ USB_DMA_TX_IRQ_NBR
X
-static const char *usb_hcd_version = "$Revision: 1.9 $";
+static const char *usb_hcd_version = "$Revision: 1.11 $";
X
X #undef KERN_DEBUG
X #define KERN_DEBUG ""
@@ -792,6 +792,8 @@
X cli();
X
X if (test_bit(epid, (void *)&ep_usage_bitmask)) {
+ restore_flags(flags);
+
X warn("Trying to setup used epid %d", epid);
X DBFEXIT;
X return;
@@ -828,12 +830,16 @@
X
X save_flags(flags);
X cli();
+
X *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid);
X nop();
- while (*R_USB_EPT_DATA & IO_MASK(R_USB_EPT_DATA, hold))printk("+");
+ while (*R_USB_EPT_DATA & IO_MASK(R_USB_EPT_DATA, hold))
+ printk("+");
X *R_USB_EPT_DATA = 0;
X clear_bit(epid, (void *)&ep_usage_bitmask);
+
X restore_flags(flags);
+
X dbg_ep("epid: %d freed", epid);
X
X DBFEXIT;
@@ -861,6 +867,8 @@
X (IO_EXTRACT(R_USB_EPT_DATA, ep, data) == endpoint) &&
X (IO_EXTRACT(R_USB_EPT_DATA, low_speed, data) == slow) &&
X (IO_EXTRACT(R_USB_EPT_DATA, max_len, data) == maxp)) {
+ restore_flags(flags);
+
X dbg_ep("Found ep_id %d for devnum %d, endpoint %d",
X i, devnum, endpoint);
X DBFEXIT;
@@ -1337,6 +1345,7 @@
X TxCtrlEPList[epid].sub = virt_to_phys(sb_desc_1);
X TxCtrlEPList[epid].hw_len = 0;
X TxCtrlEPList[epid].command |= IO_STATE(USB_EP_command, enable, yes);
+
X restore_flags(flags);
X
X dump_ep_desc(&TxCtrlEPList[epid]);
@@ -1775,8 +1784,10 @@
X
X save_flags(flags);
X cli();
+
X *R_USB_EPT_INDEX = IO_FIELD(R_USB_EPT_INDEX, value, epid); nop();
X r_usb_ept_data = *R_USB_EPT_DATA;
+
X restore_flags(flags);
X
X if (r_usb_ept_data & IO_MASK(R_USB_EPT_DATA, hold)) {
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/Makefile linux/arch/cris/kernel/Makefile
--- v2.4.10/linux/arch/cris/kernel/Makefile Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/kernel/Makefile Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.7 2001/07/05 01:11:48 hp Exp $
+# $Id: Makefile,v 1.8 2001/10/01 14:44:07 bjornw Exp $
X #
X # Makefile for the linux kernel.
X #
@@ -20,6 +20,7 @@
X ptrace.o setup.o time.o sys_cris.o shadows.o \
X debugport.o semaphore.o
X
+obj-$(CONFIG_MODULES) += ksyms.o
X obj-$(CONFIG_ETRAX_KGDB) += kgdb.o
X
X # This dependency isn't caught by mkdep. See entry.S.
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/entry.S linux/arch/cris/kernel/entry.S
--- v2.4.10/linux/arch/cris/kernel/entry.S Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/kernel/entry.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.31 2001/07/25 16:07:42 bjornw Exp $
+/* $Id: entry.S,v 1.34 2001/10/01 14:45:03 bjornw Exp $
X *
X * linux/arch/cris/entry.S
X *
@@ -7,6 +7,15 @@
X * Authors: Bjorn Wesen (bjo...@axis.com)
X *
X * $Log: entry.S,v $
+ * Revision 1.34 2001/10/01 14:45:03 bjornw
+ * Removed underscores and added register prefixes
+ *
+ * Revision 1.33 2001/08/21 13:48:01 jonashg
+ * Added fix by HP to avoid oops when doing a hard_reset_now.
+ *
+ * Revision 1.32 2001/08/14 04:32:02 hp
+ * In _resume, add comment why R9 is saved; don't sound like it's call-saved.
+ *
X * Revision 1.31 2001/07/25 16:07:42 bjornw
X * softirq_active/mask -> softirq_pending only
X *
@@ -166,22 +175,22 @@
X
X ;; functions exported from this file
X
- .globl _system_call
- .globl _ret_from_intr
- .globl _ret_from_sys_call
- .globl _resume
- .globl _multiple_interrupt
- .globl _hwbreakpoint
- .globl _IRQ1_interrupt
- .globl _timer_interrupt
- .globl _timer_shortcut
- .globl _spurious_interrupt
- .globl _hw_bp_trigs
- .globl _mmu_bus_fault
- .globl _do_sigtrap
- .globl _gdb_handle_breakpoint
+ .globl system_call
+ .globl ret_from_intr
+ .globl ret_from_sys_call
+ .globl resume
+ .globl multiple_interrupt
+ .globl hwbreakpoint
+ .globl IRQ1_interrupt
+ .globl timer_interrupt
+ .globl timer_shortcut
+ .globl spurious_interrupt
+ .globl hw_bp_trigs
+ .globl mmu_bus_fault
+ .globl do_sigtrap
+ .globl gdb_handle_breakpoint
X
- .globl _sys_call_table
+ .globl sys_call_table
X
X ;; Get values and offsets into various structs. The file isn't
X ;; suitable for consumption by the preprocessor, so don't use
@@ -196,38 +205,38 @@
X
X ;; handle software irqs
X
-handle_softirq:
- move.d r9,r1
- jsr _do_softirq ; call the C routine for softirq handling
- move.d r1,r9
+_handle_softirq:
+ move.d $r9, $r1
+ jsr do_softirq ; call the C routine for softirq handling
+ move.d $r1, $r9
X
X ;; fall-through
X
-_ret_from_intr:
+ret_from_intr:
X ;; check for resched only if we're going back to user-mode
X
- move ccr, r0
- btstq 8, r0 ; U-flag
- bpl Rexit ; go back directly
+ move $ccr, $r0
+ btstq 8, $r0 ; U-flag
+ bpl _Rexit ; go back directly
X nop
- ba ret_with_reschedule ; go back but check schedule and signals first
+ ba _ret_with_reschedule ; go back but check schedule and signals first
X nop
X
-reschedule:
+_reschedule:
X ;; keep r9 intact
- move.d r9,r1
- jsr _schedule
- ba _ret_from_sys_call
- move.d r1,r9
+ move.d $r9, $r1
+ jsr schedule
+ ba ret_from_sys_call
+ move.d $r1, $r9
X
X ;; return but call do_signal first
-signal_return:
+_signal_return:
X ei ; we can get here from an interrupt
- move.d r9,r10 ; do_signals syscall/irq param
- moveq 0,r11 ; oldset param - 0 in this case
- move.d sp,r12 ; another argument to do_signal (the regs param)
- jsr _do_signal ; arch/cris/kernel/signal.c
- ba Rexit
+ move.d $r9, $r10 ; do_signals syscall/irq param
+ moveq 0, $r11 ; oldset param - 0 in this case
+ move.d $sp, $r12 ; another argument to do_signal (the regs param)
+ jsr do_signal ; arch/cris/kernel/signal.c
+ ba _Rexit
X nop
X
X ;; The system_call is called by a BREAK instruction, which works like
@@ -246,112 +255,114 @@
X ;; really designed so that the fast-path does not force cache-loading of non-used
X ;; instructions. Only the non-common cases cause the outlined code to run..
X
-_system_call:
+system_call:
X ;; stack-frame similar to the irq heads, which is reversed in ret_from_sys_call
- move brp,[sp=sp-16] ; instruction pointer and room for a fake SBFS frame
- push srp
- push dccr
- push mof
- subq 14*4,sp ; make room for r0-r13
- movem r13,[sp] ; push r0-r13
- push r10 ; push orig_r10
- clear.d [sp=sp-4] ; frametype == 0, normal stackframe
+ move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame
+ push $srp
+ push $dccr
+ push $mof
+ subq 14*4, $sp ; make room for r0-r13
+ movem $r13, [$sp] ; push r0-r13
+ push $r10 ; push orig_r10
+ clear.d [$sp=$sp-4] ; frametype == 0, normal stackframe
X
- movs.w -ENOSYS,r0
- move.d r0,[sp+LR10] ; put the default return value in r10 in the frame
+ movs.w -ENOSYS, $r0
+ move.d $r0, [$sp+LR10] ; put the default return value in r10 in the frame
X
X ;; check if this process is syscall-traced
X
- movs.w -8192,r0 ; THREAD_SIZE == 8192
- and.d sp,r0
+ movs.w -8192, $r0 ; THREAD_SIZE == 8192
+ and.d $sp, $r0
X
- move.d [r0+LTASK_PTRACE],r0
- btstq PT_TRACESYS_BIT, r0
- bmi tracesys
+ move.d [$r0+LTASK_PTRACE], $r0
+ btstq PT_TRACESYS_BIT, $r0
+ bmi _tracesys
X nop
X
X ;; check for sanity in the requested syscall number
X
- cmpu.w NR_syscalls,r9
- bcc _ret_from_sys_call
- lslq 2,r9 ; multiply by 4, in the delay slot
+ cmpu.w NR_syscalls, $r9
+ bcc ret_from_sys_call
+ lslq 2, $r9 ; multiply by 4, in the delay slot
X
X ;; as a bonus 7th parameter, we give the location on the stack
X ;; of the register structure itself. some syscalls need this.
X
- push sp
+ push $sp
X
X ;; the parameter carrying registers r10, r11, r12 and 13 are intact.
X ;; the fifth and sixth parameters (if any) was in mof and srp
X ;; respectively, and we need to put them on the stack.
X
- push srp
- push mof
+ push $srp
+ push $mof
X
- jsr [r9+_sys_call_table] ; actually do the system call
- addq 3*4,sp ; pop the mof, srp and regs parameters
- move.d r10,[sp+LR10] ; save the return value
+ jsr [$r9+sys_call_table] ; actually do the system call
+ addq 3*4, $sp ; pop the mof, srp and regs parameters
+ move.d $r10, [$sp+LR10] ; save the return value
X
- moveq 1,r9 ; "parameter" to ret_from_sys_call to show it was a sys call
+ moveq 1, $r9 ; "parameter" to ret_from_sys_call to show it was a sys call
X
X ;; fall through into ret_from_sys_call to return
X
-_ret_from_sys_call:
+ret_from_sys_call:
X ;; r9 is a parameter - if 1, we came from a syscall, if 0, from an irq
X
X ;; check if any bottom halves need service
X
- test.d [_irq_stat] ; softirq_pending
- bne handle_softirq
+ test.d [irq_stat] ; softirq_pending
+ bne _handle_softirq
X nop
X
-ret_with_reschedule:
+_ret_with_reschedule:
X ;; first get the current task-struct pointer (see top for defs)
X
- move.d sp, r0
- and.d -8192, r0 ; THREAD_SIZE == 8192
+ move.d $sp, $r0
+ and.d -8192, $r0 ; THREAD_SIZE == 8192
X
X ;; see if we want to reschedule into another process
X
- test.d [r0+LTASK_NEEDRESCHED]
- bne reschedule
+ test.d [$r0+LTASK_NEEDRESCHED]
+ bne _reschedule
X nop
X
X ;; see if we need to run signal checks (important that r9 is intact here)
X
- test.d [r0+LTASK_SIGPENDING]
- bne signal_return
+ test.d [$r0+LTASK_SIGPENDING]
+ bne _signal_return
X nop
X
-Rexit:
+_Rexit:
X ;; this epilogue MUST match the prologues in multiple_interrupt, irq.h and ptregs.h
- pop r10 ; frametype
- bne RBFexit ; was not CRIS_FRAME_NORMAL, handle otherwise
- addq 4,sp ; skip orig_r10, in delayslot
- movem [sp+],r13 ; registers r0-r13
- pop mof ; multiply overflow register
- pop dccr ; condition codes
- pop srp ; subroutine return pointer
+ pop $r10 ; frametype
+ bne _RBFexit ; was not CRIS_FRAME_NORMAL, handle otherwise
+ addq 4, $sp ; skip orig_r10, in delayslot
+ movem [$sp+], $r13 ; registers r0-r13
+ pop $mof ; multiply overflow register
+ pop $dccr ; condition codes
+ pop $srp ; subroutine return pointer
X ;; now we have a 4-word SBFS frame which we do not want to restore
X ;; using RBF since it was not stacked with SBFS. instead we would like to
X ;; just get the PC value to restart it with, and skip the rest of
X ;; the frame.
- move [sp=sp+16], p8 ; pop the SBFS frame from the sp
- jmpu [sp-16] ; return through the irp field in the sbfs frame
+ ;; Also notice that it's important to use instructions here that
+ ;; keep the interrupts disabled (since we've already popped DCCR)
+ move [$sp=$sp+16], $p8; pop the SBFS frame from the sp
+ jmpu [$sp-16] ; return through the irp field in the sbfs frame
+
+_RBFexit:
+ movem [$sp+], $r13 ; registers r0-r13, in delay slot
+ pop $mof ; multiply overflow register
+ pop $dccr ; condition codes
+ pop $srp ; subroutine return pointer
+ rbf [$sp+] ; return by popping the CPU status
X
-RBFexit:
- movem [sp+],r13 ; registers r0-r13, in delay slot
- pop mof ; multiply overflow register
- pop dccr ; condition codes
- pop srp ; subroutine return pointer
- rbf [sp+] ; return by popping the CPU status
-
-tracesys:
+_tracesys:
X ;; this first invocation of syscall_trace _requires_ that
X ;; LR10 in the frame contains -ENOSYS (as is set in the beginning
X ;; of system_call).
X
- jsr _syscall_trace
+ jsr syscall_trace
X
X ;; now we should more or less do the same things as in the system_call
X ;; but since our argument regs got clobbered during syscall_trace and
@@ -360,177 +371,188 @@
X
X ;; check for sanity in the requested syscall number
X
- move.d [sp+LR9], r9
- movs.w -ENOSYS, r10
- cmpu.w NR_syscalls,r9
+ move.d [$sp+LR9], $r9
+ movs.w -ENOSYS, $r10
+ cmpu.w NR_syscalls, $r9
X bcc 1f
- lslq 2,r9 ; multiply by 4, in the delay slot
+ lslq 2, $r9 ; multiply by 4, in the delay slot
X
X ;; read the system call vector entry into r9
X
- move.d [r9+_sys_call_table],r9
+ move.d [$r9+sys_call_table], $r9
X
X ;; restore r10, r11, r12, r13, mof and srp into the needed registers
X
- move.d [sp+LORIG_R10], r10 ; LR10 is already filled with -ENOSYS.
- move.d [sp+LR11], r11
- move.d [sp+LR12], r12
- move.d [sp+LR13], r13
- move [sp+LMOF], mof
- move [sp+LSRP], srp
+ move.d [$sp+LORIG_R10], $r10 ; LR10 is already filled with -ENOSYS.
+ move.d [$sp+LR11], $r11
+ move.d [$sp+LR12], $r12
+ move.d [$sp+LR13], $r13
+ move [$sp+LMOF], $mof
+ move [$sp+LSRP], $srp
X
X ;; as a bonus 7th parameter, we give the location on the stack
X ;; of the register structure itself. some syscalls need this.
X
- push sp
+ push $sp
X
X ;; the fifth and sixth parameters needs to be put on the stack for
X ;; the system call to find them
X
- push srp
- push mof
+ push $srp
+ push $mof
X
- jsr r9 ; actually call the system-call
- addq 3*4,sp ; pop the srp, mof and regs parameters
+ jsr $r9 ; actually call the system-call
+ addq 3*4, $sp ; pop the srp, mof and regs parameters
X
-1: move.d r10,[sp+LR10] ; save the return value
+1: move.d $r10, [$sp+LR10]; save the return value
X
X ;; second call of syscall_trace, to let it grab the results
X
- jsr _syscall_trace
+ jsr syscall_trace
X
- moveq 1,r9 ; "parameter" to ret_from_sys_call to show it was a sys call
- ba _ret_from_sys_call
+ moveq 1, $r9 ; "parameter" to ret_from_sys_call to show it was a sys call
+ ba ret_from_sys_call
X nop
X
- ;; _resume performs the actual task-switching, by switching stack pointers
+ ;; resume performs the actual task-switching, by switching stack pointers
X ;; input arguments: r10 = prev, r11 = next, r12 = thread offset in task struct
X ;; returns old current in r10
X ;;
X ;; TODO: see the i386 version. The switch_to which calls resume in our version
X ;; could really be an inline asm of this.
X
-_resume:
- push srp ; we keep the old/new PC on the stack
- add.d r12, r10 ; r10 = current tasks tss
- move dccr, [r10+LTHREAD_DCCR] ; save irq enable state
+resume:
+ push $srp ; we keep the old/new PC on the stack
+ add.d $r12, $r10 ; r10 = current tasks tss
+ move $dccr, [$r10+LTHREAD_DCCR] ; save irq enable state
X di
X
- move usp, [r10+LTHREAD_USP] ; save user-mode stackpointer
+ move $usp, [$r10+LTHREAD_USP] ; save user-mode stackpointer
X
- subq 10*4, sp
- movem r9, [sp] ; save non-scratch registers
+ ;; See copy_thread for the reason why register R9 is saved.
+ subq 10*4, $sp
+ movem $r9, [$sp] ; save non-scratch registers and R9.
X
- move.d sp, [r10+LTHREAD_KSP] ; save the kernel stack pointer for the old task
- move.d sp, r10 ; return last running task in r10
- and.d -8192, r10 ; get task ptr from stackpointer
- add.d r12, r11 ; find the new tasks tss
- move.d [r11+LTHREAD_KSP], sp ; switch into the new stackframe by restoring kernel sp
+ move.d $sp, [$r10+LTHREAD_KSP] ; save the kernel stack pointer for the old task
+ move.d $sp, $r10 ; return last running task in r10
+ and.d -8192, $r10 ; get task ptr from stackpointer
+ add.d $r12, $r11 ; find the new tasks tss
+ move.d [$r11+LTHREAD_KSP], $sp ; switch into the new stackframe by restoring kernel sp
X
- movem [sp+], r9 ; restore non-scratch registers
+ movem [$sp+], $r9 ; restore non-scratch registers and R9.
X
- move [r11+LTHREAD_USP], usp ; restore user-mode stackpointer
+ move [$r11+LTHREAD_USP], $usp ; restore user-mode stackpointer
X
- move [r11+LTHREAD_DCCR], dccr ; restore irq enable status
- jump [sp+] ; restore PC
+ move [$r11+LTHREAD_DCCR], $dccr ; restore irq enable status
+ jump [$sp+] ; restore PC
X
X ;; This is the MMU bus fault handler.
X ;; It needs to stack the CPU status and overall is different
X ;; from the other interrupt handlers.
X
-_mmu_bus_fault:
- sbfs [sp=sp-16] ; push the internal CPU status
+mmu_bus_fault:
+ sbfs [$sp=$sp-16] ; push the internal CPU status
X ;; the first longword in the sbfs frame was the interrupted PC
X ;; which fits nicely with the "IRP" slot in pt_regs normally used to
X ;; contain the return address. used by Oops to print kernel errors..
- push srp ; make a stackframe similar to pt_regs
- push dccr
- push mof
+ push $srp ; make a stackframe similar to pt_regs
+ push $dccr
+ push $mof
X di
- subq 14*4, sp
- movem r13, [sp]
- push r10 ; dummy orig_r10
- moveq 1, r10
- push r10 ; frametype == 1, BUSFAULT frame type
+ subq 14*4, $sp
+ movem $r13, [$sp]
+ push $r10 ; dummy orig_r10
+ moveq 1, $r10
+ push $r10 ; frametype == 1, BUSFAULT frame type
X
- moveq 0, r9 ; busfault is equivalent to an irq
+ moveq 0, $r9 ; busfault is equivalent to an irq
X
- move.d sp, r10 ; pt_regs argument to handle_mmu_bus_fault
+ move.d $sp, $r10 ; pt_regs argument to handle_mmu_bus_fault
X
- jsr _handle_mmu_bus_fault ; in arch/cris/mm/fault.c
+ jsr handle_mmu_bus_fault ; in arch/cris/mm/fault.c
X
X ;; now we need to return through the normal path, we cannot just
X ;; do the RBFexit since we might have killed off the running
X ;; process due to a SEGV, scheduled due to a page blocking or
X ;; whatever.
X
- ba _ret_from_intr
+ ba ret_from_intr
X nop
X
X ;; special handlers for breakpoint and NMI
X #if 0
-_hwbreakpoint:
- push dccr
+hwbreakpoint:
+ push $dccr
X di
- push r10
- push r11
- push r12
- push r13
+ push $r10
+ push $r11
+ push $r12
+ push $r13
X clearf b
- move brp,r11
- move.d [_hw_bp_msg],r10
- jsr _printk
+ move $brp,$r11
+ move.d [hw_bp_msg],$r10
+ jsr printk
X setf b
- pop r13
- pop r12
- pop r11
- pop r10
- pop dccr
+ pop $r13
+ pop $r12
+ pop $r11
+ pop $r10
+ pop $dccr
X retb
X nop
X #else
-_hwbreakpoint:
- push dccr
+hwbreakpoint:
+ push $dccr
X di
X #if 1
- push r10
- push r11
- move.d [_hw_bp_trig_ptr],r10
- move.d [r10],r11
- cmp.d 42,r11
- beq nobp
- nop
- move brp,r11
- move.d r11,[r10+]
- move.d r10,[_hw_bp_trig_ptr]
-nobp: pop r11
- pop r10
+ push $r10
+ push $r11
+ move.d [hw_bp_trig_ptr],$r10
+ move.d [$r10],$r11
+ cmp.d 42,$r11
+ beq 1f
+ nop
+ move $brp,$r11
+ move.d $r11,[$r10+]
+ move.d $r10,[hw_bp_trig_ptr]
+1: pop $r11
+ pop $r10
X #endif
- pop dccr
+ pop $dccr
X retb
X nop
X #endif
X
-_IRQ1_interrupt:
+IRQ1_interrupt:
X
X #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM)
X ;; If we receive a watchdog interrupt while it is not expected, then set
X ;; up a canonical frame and dump register contents before dying.
X
X ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!!
- move brp,[sp=sp-16] ; instruction pointer and room for a fake SBFS frame
- push srp
- push dccr
- push mof
+ move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame
+ push $srp
+ push $dccr
+ push $mof
X di
- subq 14*4,sp
- movem r13,[sp]
- push r10 ; push orig_r10
- clear.d [sp=sp-4] ; frametype == 0, normal frame
+ subq 14*4, $sp
+ movem $r13, [$sp]
+ push $r10 ; push orig_r10
+ clear.d [$sp=$sp-4] ; frametype == 0, normal frame
X
X ;; We don't check that we actually were bit by the watchdog as opposed to
X ;; an external NMI, since there is currently no handler for external NMI.
X
+;; Check if we're waiting for reset to happen, as signalled by
+;; hard_reset_now setting cause_of_death to a magic value. If so, just
+;; get stuck until reset happens.
+ .comm cause_of_death, 4 ;; Don't declare this anywhere.
+ move.d [cause_of_death], $r10
+ cmp.d 0xbedead, $r10
+_killed_by_death:
+ beq _killed_by_death
+ nop
+
X ;; We'll see this in ksymoops dumps.
X Watchdog_bite:
X
@@ -540,134 +562,134 @@
X ;; Change the watchdog key to an arbitrary 3-bit value and restart the
X ;; watchdog.
X #define WD_INIT 2
- moveq IO_FIELD (R_WATCHDOG, key, WD_INIT), r10
- move.d R_WATCHDOG, r11
+ moveq IO_FIELD (R_WATCHDOG, key, WD_INIT), $r10
+ move.d R_WATCHDOG, $r11
X
- move.d r10,[r11]
+ move.d $r10, [$r11]
X moveq IO_FIELD (R_WATCHDOG, key, \
X IO_EXTRACT (R_WATCHDOG, key, \
X IO_MASK (R_WATCHDOG, key)) \
X ^ WD_INIT) \
- | IO_STATE (R_WATCHDOG, enable, start),r10
- move.d r10,[r11]
+ | IO_STATE (R_WATCHDOG, enable, start), $r10
+ move.d $r10, [$r11]
X
X ;; Note that we don't do "setf m" here (or after two necessary NOPs),
X ;; since *not* doing that saves us from re-entrancy checks. We don't want
X ;; to get here again due to possible subsequent NMIs; we want the watchdog
X ;; to reset us.
X
- move.d watchdogmsg,r10
- jsr _printk
+ move.d _watchdogmsg,$r10
+ jsr printk
X
- move.d sp,r10
- jsr _show_registers
+ move.d $sp, $r10
+ jsr show_registers
X
X ;; This nop is here so we see the "Watchdog_bite" label in ksymoops dumps
-;; rather than "_spurious_interrupt".
+;; rather than "spurious_interrupt".
X nop
-;; At this point we drop down into _spurious_interrupt, which will do a
+;; At this point we drop down into spurious_interrupt, which will do a
X ;; hard reset.
X
X .section .rodata,"a"
-watchdogmsg:
+_watchdogmsg:
X .ascii "Oops: bitten by watchdog\n\0"
X .previous
X
X #endif /* CONFIG_ETRAX_WATCHDOG and not CONFIG_SVINTO_SIM */
X
-_spurious_interrupt:
+spurious_interrupt:
X di
- jump _hard_reset_now
+ jump hard_reset_now
X
X ;; this handles the case when multiple interrupts arrive at the same time
X ;; we jump to the first set interrupt bit in a priority fashion
X ;; the hardware will call the unserved interrupts after the handler finishes
X
-_multiple_interrupt:
+multiple_interrupt:
X ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!!
- move irp,[sp=sp-16] ; instruction pointer and room for a fake SBFS frame
- push srp
- push dccr
- push mof
+ move $irp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame
+ push $srp
+ push $dccr
+ push $mof
X di
- subq 14*4,sp
- movem r13,[sp]
- push r10 ; push orig_r10
- clear.d [sp=sp-4] ; frametype == 0, normal frame
-
- move.d _irq_shortcuts + 8,r1
- moveq 2,r2 ; first bit we care about is the timer0 irq
- move.d [R_VECT_MASK_RD],r0 ; read the irq bits that triggered the multiple irq
-multloop:
- btst r2,r0 ; check for the irq given by bit r2
- bmi do_shortcut ; actually do the shortcut
- nop
- addq 1,r2 ; next vector bit
- addq 4,r1 ; next vector
- cmp.b 32,r2
- bne multloop ; process all irq's up to and including number 31
+ subq 14*4, $sp
+ movem $r13, [$sp]
+ push $r10 ; push orig_r10
+ clear.d [$sp=$sp-4] ; frametype == 0, normal frame
+
+ move.d irq_shortcuts + 8, $r1
+ moveq 2, $r2 ; first bit we care about is the timer0 irq
+ move.d [R_VECT_MASK_RD], $r0; read the irq bits that triggered the multiple irq
+1:
+ btst $r2, $r0 ; check for the irq given by bit r2
+ bmi _do_shortcut ; actually do the shortcut
+ nop
+ addq 1, $r2 ; next vector bit
+ addq 4, $r1 ; next vector
+ cmp.b 32, $r2
+ bne 1b ; process all irq's up to and including number 31
X nop
X
X ;; strange, we didn't get any set vector bits.. oh well, just return
X
- ba Rexit
+ ba _Rexit
X nop
X
-do_shortcut:
- test.d [r1]
- beq Rexit
+_do_shortcut:
+ test.d [$r1]
+ beq _Rexit
X nop
- jump [r1] ; jump to the irq handlers shortcut
+ jump [$r1] ; jump to the irq handlers shortcut
X
-_do_sigtrap:
+do_sigtrap:
X ;;
X ;; SIGTRAP the process that executed the break instruction.
X ;; Make a frame that Rexit in entry.S expects.
X ;;
- move brp,[sp=sp-16] ; Push BRP while faking a cpu status record.
- push srp ; Push subroutine return pointer.
- push dccr ; Push condition codes.
- push mof ; Push multiply overflow reg.
+ move $brp, [$sp=$sp-16] ; Push BRP while faking a cpu status record.
+ push $srp ; Push subroutine return pointer.
+ push $dccr ; Push condition codes.
+ push $mof ; Push multiply overflow reg.
X di ; Need to disable irq's at this point.
- subq 14*4,sp ; Make room for r0-r13.
- movem r13,[sp] ; Push the r0-r13 registers.
- push r10 ; Push orig_r10.
- clear.d [sp=sp-4] ; Frametype - this is a normal stackframe.
-
- movs.w -8192,r9 ; THREAD_SIZE == 8192
- and.d sp,r9
- move.d [r9+LTASK_PID],r10 ; current->pid as arg1.
- moveq 5,r11 ; SIGTRAP as arg2.
- jsr _sys_kill
- jump _ret_from_intr ; Use the return routine for interrupts.
-
-_gdb_handle_breakpoint:
- push dccr
- push r0
+ subq 14*4, $sp ; Make room for r0-r13.
+ movem $r13, [$sp] ; Push the r0-r13 registers.
+ push $r10 ; Push orig_r10.
+ clear.d [$sp=$sp-4] ; Frametype - this is a normal stackframe.
+
+ movs.w -8192,$r9 ; THREAD_SIZE == 8192
+ and.d $sp, $r9
+ move.d [$r9+LTASK_PID], $r10 ; current->pid as arg1.
+ moveq 5, $r11 ; SIGTRAP as arg2.
+ jsr sys_kill
+ jump ret_from_intr ; Use the return routine for interrupts.
+
+gdb_handle_breakpoint:
+ push $dccr
+ push $r0
X #ifdef CONFIG_ETRAX_KGDB
- move dccr,r0 ; U-flag not affected by previous insns.
- btstq 8,r0 ; Test the U-flag.
+ move $dccr, $r0 ; U-flag not affected by previous insns.
+ btstq 8, $r0 ; Test the U-flag.
X bmi _ugdb_handle_breakpoint ; Go to user mode debugging.
X nop ; Empty delay slot (cannot pop r0 here).
- pop r0 ; Restore r0.
- ba _kgdb_handle_breakpoint ; Go to kernel debugging.
- pop dccr ; Restore dccr in delay slot.
+ pop $r0 ; Restore r0.
+ ba kgdb_handle_breakpoint ; Go to kernel debugging.
+ pop $dccr ; Restore dccr in delay slot.
X #endif
X
X _ugdb_handle_breakpoint:
- move brp,r0 ; Use r0 temporarily for calculation.
- subq 2,r0 ; Set to address of previous instruction.
- move r0,brp
- pop r0 ; Restore r0.
- ba _do_sigtrap ; SIGTRAP the offending process.
- pop dccr ; Restore dccr in delay slot.
+ move $brp, $r0 ; Use r0 temporarily for calculation.
+ subq 2, $r0 ; Set to address of previous instruction.
+ move $r0, $brp
+ pop $r0 ; Restore r0.
+ ba do_sigtrap ; SIGTRAP the offending process.
+ pop $dccr ; Restore dccr in delay slot.
X
X .data
X
-_hw_bp_trigs:
+hw_bp_trigs:
X .space 64*4
-_hw_bp_trig_ptr:
- .dword _hw_bp_trigs
+hw_bp_trig_ptr:
+ .dword hw_bp_trigs
X
X /*
X * This is the mechanism for creating a new kernel thread.
@@ -686,47 +708,47 @@
X /* r10 r11 r12 */
X
X .text
- .global _kernel_thread
-_kernel_thread:
+ .global kernel_thread
+kernel_thread:
X
X /* Save ARG for later. */
- move.d r11,r13
+ move.d $r11, $r13
X
X /* r11 is argument 2 to clone, the flags */
- move.d r12,r11
- or.w LCLONE_VM,r11
+ move.d $r12, $r11
+ or.w LCLONE_VM, $r11
X
X /* Save FN for later. */
- move.d r10,r12
+ move.d $r10, $r12
X
X /* r9 contains syscall number, to sys_clone */
- movu.w __NR_clone,r9
+ movu.w __NR_clone, $r9
X
X /* r10 is argument 1 to clone */
- clear.d r10
+ clear.d $r10
X
X /* call sys_clone, this will fork */
X break 13
X
X /* parent or child? child returns 0 here. */
- test.d r10
+ test.d $r10
X
X /* jump if parent */
X bne 1f
X nop /* delay slot */
X
X /* set argument to function to call */
- move.d r13,r10
+ move.d $r13, $r10
X
X /* call specified function */
- jsr r12
+ jsr $r12
X /* If we ever return from the function, something bad has happened. */
X
X /* r9 is sys_exit syscall number */
- movu.w __NR_exit,r9
+ movu.w __NR_exit, $r9
X
X /* Give a really bad exit-value */
- moveq -1,r10
+ moveq -1, $r10
X
X /* call sys_exit, killing the child */
X break 13
@@ -734,16 +756,8 @@
X ret
X nop /* delay slot */
X
-
-/* The file include/linux/linkage.h is wrong for compiling the
- Linux/CRIS kernel. We currently have C symbols in the kernel (only
- the kernel) prefixed with _, hence, we need to redefine SYMBOL_NAME. */
-
-#undef SYMBOL_NAME
-#define SYMBOL_NAME(X) _##X
-
X .section .rodata,"a"
-_sys_call_table:
+sys_call_table:
X .long SYMBOL_NAME(sys_ni_syscall) /* 0 - old "setup()" system call*/
X .long SYMBOL_NAME(sys_exit)
X .long SYMBOL_NAME(sys_fork)
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/head.S linux/arch/cris/kernel/head.S
--- v2.4.10/linux/arch/cris/kernel/head.S Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/kernel/head.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: head.S,v 1.36 2001/06/29 12:39:31 pkj Exp $
+/* $Id: head.S,v 1.40 2001/10/03 14:59:57 pkj Exp $
X *
X * Head of the kernel - alter with care
X *
@@ -7,6 +7,18 @@
X * Authors: Bjorn Wesen (bjo...@axis.com)
X *
X * $Log: head.S,v $
+ * Revision 1.40 2001/10/03 14:59:57 pkj
+ * Added support for resetting the Bluetooth hardware.
+ *
+ * Revision 1.39 2001/10/01 14:45:03 bjornw
+ * Removed underscores and added register prefixes
+ *
+ * Revision 1.38 2001/09/21 07:14:11 jonashg
+ * Made root filesystem (cramfs) use mtdblock driver when booting from flash.
+ *
+ * Revision 1.37 2001/09/11 13:44:29 orjanf
+ * Decouple usage of serial ports for debug and kgdb.
+ *
X * Revision 1.36 2001/06/29 12:39:31 pkj
X * Added support for mirroring the first flash to just below the
X * second one, to make them look consecutive to cramfs.
@@ -144,11 +156,11 @@
X
X ;; exported symbols
X
- .globl _etrax_irv
- .globl _romfs_start
- .globl _romfs_length
- .globl _romfs_in_flash
- .globl _swapper_pg_dir
+ .globl etrax_irv
+ .globl romfs_start
+ .globl romfs_length
+ .globl romfs_in_flash
+ .globl swapper_pg_dir
X
X .text
X
@@ -184,13 +196,13 @@
X move.d IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \
X | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb) \
X | IO_FIELD (R_MMU_KBASE_HI, base_9, 9) \
- | IO_FIELD (R_MMU_KBASE_HI, base_8, 8), r0
- move.d r0, [R_MMU_KBASE_HI]
+ | IO_FIELD (R_MMU_KBASE_HI, base_8, 8), $r0
+ move.d $r0, [R_MMU_KBASE_HI]
X
X ; temporary map of 0x40->0x40 and 0x60->0x40
X move.d IO_FIELD (R_MMU_KBASE_LO, base_6, 4) \
- | IO_FIELD (R_MMU_KBASE_LO, base_4, 4), r0
- move.d r0, [R_MMU_KBASE_LO]
+ | IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0
+ move.d $r0, [R_MMU_KBASE_LO]
X
X ; mmu enable, segs e,c,b,a,6,5,4,0 segment mapped
X move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \
@@ -212,18 +224,18 @@
X | IO_STATE (R_MMU_CONFIG, seg_3, page) \
X | IO_STATE (R_MMU_CONFIG, seg_2, page) \
X | IO_STATE (R_MMU_CONFIG, seg_1, page) \
- | IO_STATE (R_MMU_CONFIG, seg_0, seg), r0
- move.d r0, [R_MMU_CONFIG]
+ | IO_STATE (R_MMU_CONFIG, seg_0, seg), $r0
+ move.d $r0, [R_MMU_CONFIG]
X #else
X ; kseg mappings
X move.d IO_FIELD (R_MMU_KBASE_HI, base_e, 8) \
X | IO_FIELD (R_MMU_KBASE_HI, base_c, 4) \
- | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb), r0
- move.d r0, [R_MMU_KBASE_HI]
+ | IO_FIELD (R_MMU_KBASE_HI, base_b, 0xb), $r0
+ move.d $r0, [R_MMU_KBASE_HI]
X
X ; temporary map of 0x40->0x40 and 0x00->0x00
- move.d IO_FIELD (R_MMU_KBASE_LO, base_4, 4), r0
- move.d r0, [R_MMU_KBASE_LO]
+ move.d IO_FIELD (R_MMU_KBASE_LO, base_4, 4), $r0
+ move.d $r0, [R_MMU_KBASE_LO]
X
X ; mmu enable, segs f,e,c,b,4,0 segment mapped
X move.d IO_STATE (R_MMU_CONFIG, mmu_enable, enable) \
@@ -245,8 +257,8 @@
X | IO_STATE (R_MMU_CONFIG, seg_3, page) \
X | IO_STATE (R_MMU_CONFIG, seg_2, page) \
X | IO_STATE (R_MMU_CONFIG, seg_1, page) \
- | IO_STATE (R_MMU_CONFIG, seg_0, seg), r0
- move.d r0, [R_MMU_CONFIG]
+ | IO_STATE (R_MMU_CONFIG, seg_0, seg), $r0
+ move.d $r0, [R_MMU_CONFIG]
X #endif
X
X ;; Now we need to sort out the segments and their locations in RAM or
@@ -270,31 +282,31 @@
X
X ;; Check if we start from DRAM or FLASH by testing PC
X
- move.d pc,r0
- and.d 0x7fffffff,r0 ; get rid of the non-cache bit
- cmp.d 0x10000,r0 ; arbitrary... just something above this code
- blo inflash0
+ move.d $pc,$r0
+ and.d 0x7fffffff,$r0 ; get rid of the non-cache bit
+ cmp.d 0x10000,$r0 ; arbitrary... just something above this code
+ blo _inflash0
X nop
X
- jump inram ; enter cached ram
+ jump _inram ; enter cached ram
X
X ;; Jumpgate for branches.
-inflash0:
- jump inflash
+_inflash0:
+ jump _inflash
X
X ;; Put this in a suitable section where we can reclaim storage
X ;; after init.
X .section ".text.init"
-inflash:
+_inflash:
X ;; We need to initialze DRAM registers before we start using the DRAM
X
- cmp.d RAM_INIT_MAGIC, r8 ; Already initialized?
- beq dram_init_finished
+ cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized?
+ beq _dram_init_finished
X nop
X
X #include "../lib/dram_init.S"
X
-dram_init_finished:
+_dram_init_finished:
X ;; Copy text+data to DRAM
X ;; This is fragile - the calculation of r4 as the image size depends
X ;; on that the labels below actually are the first and last positions
@@ -307,14 +319,14 @@
X ;; and when run with compression, the kernel is actually unpacked to
X ;; DRAM and we never get here in the first place :))
X
- moveq 0, r0 ; source
- move.d _text_start, r1 ; destination
- move.d __vmlinux_end, r2 ; end destination
- move.d r2, r4
- sub.d r1, r4 ; r4=__vmlinux_end in flash, used below
-1: move.w [r0+], r3
- move.w r3, [r1+]
- cmp.d r2, r1
+ moveq 0, $r0 ; source
+ move.d text_start, $r1 ; destination
+ move.d __vmlinux_end, $r2 ; end destination
+ move.d $r2, $r4
+ sub.d $r1, $r4 ; r4=__vmlinux_end in flash, used below
+1: move.w [$r0+], $r3
+ move.w $r3, [$r1+]
+ cmp.d $r2, $r1
X blo 1b
X nop
X
@@ -322,33 +334,33 @@
X ;; There might be none, but that does not matter because
X ;; we don't do anything than read some bytes here.
X
- moveq 0, r0
- move.d r0, [_romfs_length] ; default if there is no cramfs
+ moveq 0, $r0
+ move.d $r0, [romfs_length] ; default if there is no cramfs
X
- move.d [r4], r0 ; cramfs_super.magic
- cmp.d CRAMFS_MAGIC, r0
+ move.d [$r4], $r0 ; cramfs_super.magic
+ cmp.d CRAMFS_MAGIC, $r0
SHAR_EOF
true || echo 'restore of patch-2.4.11-dontuse failed'
fi
echo 'End of part 02'
echo 'File patch-2.4.11-dontuse is continued in part 03'
echo "03" > _shar_seq_.tmp
exit 0
#!/bin/sh -x
# this is part 03 of a 77 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.4.11-dontuse continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 03; then
echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.4.11-dontuse'
else
echo 'x - continuing with patch-2.4.11-dontuse'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.4.11-dontuse' &&
X bne 1f
X nop
- move.d [r4 + 4], r0 ; cramfs_super.size
- move.d r0, [_romfs_length]
+ move.d [$r4 + 4], $r0 ; cramfs_super.size
+ move.d $r0, [romfs_length]
X #ifdef CONFIG_CRIS_LOW_MAP
- add.d 0x50000000, r4 ; add flash start in virtual memory (cached)
+ add.d 0x50000000, $r4 ; add flash start in virtual memory (cached)
X #else
- add.d 0xf0000000, r4 ; add flash start in virtual memory (cached)
+ add.d 0xf0000000, $r4 ; add flash start in virtual memory (cached)
X #endif
- move.d r4, [_romfs_start]
+ move.d $r4, [romfs_start]
X 1:
- moveq 1, r0
- move.d r0, [_romfs_in_flash]
+ moveq 1, $r0
+ move.d $r0, [romfs_in_flash]
X
- jump start_it ; enter code, cached this time
+ jump _start_it ; enter code, cached this time
X
-inram:
+_inram:
X ;; Move the ROM fs to after BSS end. This assumes that the cramfs
X ;; second longword contains the length of the cramfs
X
- moveq 0, r0
- move.d r0, [_romfs_length] ; default if there is no cramfs
+ moveq 0, $r0
+ move.d $r0, [romfs_length] ; default if there is no cramfs
X
X ;; The kernel could have been unpacked to DRAM by the loader, but
X ;; the cramfs image could still be in the Flash directly after the
@@ -360,120 +372,117 @@
X ;; garbage but we do sanity checks on it, the chance that it points
X ;; to a cramfs magic is small.. )
X
- cmp.d 0x0ffffff8, r9
- bhs no_romfs_in_flash ; r9 points outside the flash area
+ cmp.d 0x0ffffff8, $r9
+ bhs _no_romfs_in_flash ; r9 points outside the flash area
X nop
- move.d [r9], r0 ; cramfs_super.magic
- cmp.d CRAMFS_MAGIC, r0
- bne no_romfs_in_flash
+ move.d [$r9], $r0 ; cramfs_super.magic
+ cmp.d CRAMFS_MAGIC, $r0
+ bne _no_romfs_in_flash
X nop
- move.d [r9+4], r0 ; cramfs_super.length
- move.d r0, [_romfs_length]
+ move.d [$r9+4], $r0 ; cramfs_super.length
+ move.d $r0, [romfs_length]
X #ifdef CONFIG_CRIS_LOW_MAP
- add.d 0x50000000, r9 ; add flash start in virtual memory (cached)
+ add.d 0x50000000, $r9 ; add flash start in virtual memory (cached)
X #else
- add.d 0xf0000000, r9 ; add flash start in virtual memory (cached)
+ add.d 0xf0000000, $r9 ; add flash start in virtual memory (cached)
X #endif
-#ifdef CONFIG_ETRAX_FLASH_MIRRORING_FOR_CRAMFS
- add.d MEM_CSE1_START-CONFIG_ETRAX_FLASH_SIZE*0x100000, r9 ; move flash start to upper mirror
-#endif
- move.d r9, [_romfs_start]
+ move.d $r9, [romfs_start]
X
- moveq 1, r0
- move.d r0, [_romfs_in_flash]
+ moveq 1, $r0
+ move.d $r0, [romfs_in_flash]
X
- jump start_it ; enter code, cached this time
+ jump _start_it ; enter code, cached this time
X
-no_romfs_in_flash:
+_no_romfs_in_flash:
X ;; Check if there is a cramfs (magic value).
X ;; Notice that we check for cramfs magic value - which is
X ;; the "rom fs" we'll possibly use in 2.4 if not JFFS (which does
X ;; not need this mechanism anyway)
X
- move.d __vmlinux_end, r0 ; the image will be after the vmlinux end address
- move.d [r0], r1 ; cramfs assumes same endian on host/target
- cmp.d CRAMFS_MAGIC, r1; magic value in cramfs superblock
+ move.d __vmlinux_end, $r0; the image will be after the vmlinux end address
+ move.d [$r0], $r1 ; cramfs assumes same endian on host/target
+ cmp.d CRAMFS_MAGIC, $r1; magic value in cramfs superblock
X bne 1f
X nop
X
X ;; Ok. What is its size ?
X
- move.d [r0 + 4], r2 ; cramfs_super.size (again, no need to swapwb)
+ move.d [$r0 + 4], $r2 ; cramfs_super.size (again, no need to swapwb)
X
X ;; We want to copy it to the end of the BSS
X
- move.d _end, r1
+ move.d _end, $r1
X
X ;; Remember values so cramfs and setup can find this info
X
- move.d r1, [_romfs_start] ; new romfs location
- move.d r2, [_romfs_length]
+ move.d $r1, [romfs_start] ; new romfs location
+ move.d $r2, [romfs_length]
X
X ;; We need to copy it backwards, since they can be overlapping
X
- add.d r2, r0
- add.d r2, r1
+ add.d $r2, $r0
+ add.d $r2, $r1
X
X ;; Go ahead. Make my loop.
X
- lsrq 1, r2 ; size is in bytes, we copy words
+ lsrq 1, $r2 ; size is in bytes, we copy words
X
-1: move.w [r0=r0-2],r3
- move.w r3,[r1=r1-2]
- subq 1, r2
+1: move.w [$r0=$r0-2],$r3
+ move.w $r3,[$r1=$r1-2]
+ subq 1, $r2
X bne 1b
X nop
X
X ;; Dont worry that the BSS is tainted. It will be cleared later.
X
- moveq 0, r0
- move.d r0, [_romfs_in_flash]
+ moveq 0, $r0
+ move.d $r0, [romfs_in_flash]
X
- jump start_it ; better skip the additional cramfs check below
+ jump _start_it ; better skip the additional cramfs check below
X
-start_it:
+_start_it:
X ;; the kernel stack is overlayed with the task structure for each
X ;; task. thus the initial kernel stack is in the same page as the
X ;; init_task (but starts in the top of the page, size 8192)
- move.d _init_task_union + 8192,sp
- move.d _ibr_start,r0 ; this symbol is set by the linker script
- move r0,ibr
- move.d r0,[_etrax_irv] ; set the interrupt base register and pointer
+ move.d init_task_union + 8192, $sp
+ move.d ibr_start,$r0 ; this symbol is set by the linker script
+ move $r0,$ibr
+ move.d $r0,[etrax_irv] ; set the interrupt base register and pointer
X
X ;; Clear BSS region, from _bss_start to _end
X
- move.d __bss_start, r0
- move.d _end, r1
-1: clear.d [r0+]
- cmp.d r1, r0
+ move.d __bss_start, $r0
+ move.d _end, $r1
+1: clear.d [$r0+]
+ cmp.d $r1, $r0
X blo 1b
X nop
X
X #ifdef CONFIG_BLK_DEV_ETRAXIDE
X ;; disable ATA before enabling it in genconfig below
- moveq 0,r0
- move.d r0,[R_ATA_CTRL_DATA]
- move.d r0,[R_ATA_TRANSFER_CNT]
- move.d r0,[R_ATA_CONFIG]
+ moveq 0,$r0
+ move.d $r0,[R_ATA_CTRL_DATA]
+ move.d $r0,[R_ATA_TRANSFER_CNT]
+ move.d $r0,[R_ATA_CONFIG]
X #if 0
- move.d R_PORT_G_DATA,r1
- move.d r0,[r1]; assert ATA bus-reset
+ move.d R_PORT_G_DATA, $r1
+ move.d $r0, [$r1]; assert ATA bus-reset
X nop
X nop
X nop
X nop
X nop
X nop
- move.d 0x08000000,r0
- move.d r0,[r1]
+ move.d 0x08000000,$r0
+ move.d $r0,[$r1]
X #endif
X #endif
X
X #ifdef CONFIG_JULIETTE
X ;; configure external DMA channel 0 before enabling it in genconfig
X
- moveq 0,r0
- move.d r0,[R_EXT_DMA_0_ADDR]
+ moveq 0,$r0
+ move.d $r0,[R_EXT_DMA_0_ADDR]
X ; cnt enable, word size, output, stop, size 0
X move.d IO_STATE (R_EXT_DMA_0_CMD, cnt, enable) \
X | IO_STATE (R_EXT_DMA_0_CMD, rqpol, ahigh) \
@@ -482,168 +491,216 @@
X | IO_STATE (R_EXT_DMA_0_CMD, wid, word) \
X | IO_STATE (R_EXT_DMA_0_CMD, dir, output) \
X | IO_STATE (R_EXT_DMA_0_CMD, run, stop) \
- | IO_FIELD (R_EXT_DMA_0_CMD, trf_count, 0),r0
- move.d r0,[R_EXT_DMA_0_CMD]
+ | IO_FIELD (R_EXT_DMA_0_CMD, trf_count, 0),$r0
+ move.d $r0,[R_EXT_DMA_0_CMD]
X
X ;; reset dma4 and wait for completion
X
- moveq IO_STATE (R_DMA_CH4_CMD, cmd, reset),r0
- move.b r0,[R_DMA_CH4_CMD]
-w4u: move.b [R_DMA_CH4_CMD],r0
- and.b IO_MASK (R_DMA_CH4_CMD, cmd),r0
- cmp.b IO_STATE (R_DMA_CH4_CMD, cmd, reset),r0
- beq w4u
+ moveq IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0
+ move.b $r0,[R_DMA_CH4_CMD]
+1: move.b [R_DMA_CH4_CMD],$r0
+ and.b IO_MASK (R_DMA_CH4_CMD, cmd),$r0
+ cmp.b IO_STATE (R_DMA_CH4_CMD, cmd, reset),$r0
+ beq 1b
X nop
X
X ;; reset dma5 and wait for completion
X
- moveq IO_STATE (R_DMA_CH5_CMD, cmd, reset),r0
- move.b r0,[R_DMA_CH5_CMD]
-w5u: move.b [R_DMA_CH5_CMD],r0
- and.b IO_MASK (R_DMA_CH5_CMD, cmd),r0
- cmp.b IO_STATE (R_DMA_CH5_CMD, cmd, reset),r0
- beq w5u
+ moveq IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0
+ move.b $r0,[R_DMA_CH5_CMD]
+1: move.b [R_DMA_CH5_CMD],$r0
+ and.b IO_MASK (R_DMA_CH5_CMD, cmd),$r0
+ cmp.b IO_STATE (R_DMA_CH5_CMD, cmd, reset),$r0
+ beq 1b
X nop
X #endif
X
X ;; Etrax product HW genconfig setup
X
- moveq 0,r0
-#if !defined(CONFIG_ETRAX_KGDB) && !defined(CONFIG_DMA_MEMCPY)
- ; DMA channels 6 and 7 to ser0, kgdb doesnt want DMA
+ moveq 0,$r0
+#if (!defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT0)) \
+ && !defined(CONFIG_DMA_MEMCPY)
+ ; DMA channels 6 and 7 to se$r0, kgdb doesnt want DMA
X or.d IO_STATE (R_GEN_CONFIG, dma7, serial0) \
- | IO_STATE (R_GEN_CONFIG, dma6, serial0),r0
+ | IO_STATE (R_GEN_CONFIG, dma6, serial0),$r0
X #endif
-#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT1)
+#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT1)
+ ; DMA channels 8 and 9 to ser1, kgdb doesnt want DMA
X or.d IO_STATE (R_GEN_CONFIG, dma9, serial1) \
- | IO_STATE (R_GEN_CONFIG, dma8, serial1),r0
+ | IO_STATE (R_GEN_CONFIG, dma8, serial1),$r0
X #endif
X #ifdef CONFIG_DMA_MEMCPY
X ; 6/7 memory-memory DMA
X or.d IO_STATE (R_GEN_CONFIG, dma7, intdma6) \
- | IO_STATE (R_GEN_CONFIG, dma6, intdma7),r0
+ | IO_STATE (R_GEN_CONFIG, dma6, intdma7),$r0
X #endif
X #ifdef CONFIG_ETRAX_SERIAL_PORT2
- ; DMA channels 2 and 3 to serport 2, port 2 enabled
+ ; Enable serial port 2
+ or.w IO_STATE (R_GEN_CONFIG, ser2, select),$r0
+#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT2)
+ ; DMA channels 2 and 3 to ser2, kgdb doesnt want DMA
X or.d IO_STATE (R_GEN_CONFIG, dma3, serial2) \
- | IO_STATE (R_GEN_CONFIG, dma2, serial2) \
- | IO_STATE (R_GEN_CONFIG, ser2, select),r0
+ | IO_STATE (R_GEN_CONFIG, dma2, serial2),$r0
+#endif
X #endif
X #if defined(CONFIG_ETRAX_SERIAL_PORT3) || defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1)
- ; DMA channels 4 and 5 to serport 3, port 3 enabled
+ ; Enable serial port 3
+ or.w IO_STATE (R_GEN_CONFIG, ser3, select),$r0
+#if !defined(CONFIG_ETRAX_KGDB) || !defined(CONFIG_ETRAX_DEBUG_PORT3)
+ ; DMA channels 4 and 5 to ser3, kgdb doesnt want DMA
X or.d IO_STATE (R_GEN_CONFIG, dma5, serial3) \
- | IO_STATE (R_GEN_CONFIG, dma4, serial3) \
- | IO_STATE (R_GEN_CONFIG, ser3, select),r0
-#endif
+ | IO_STATE (R_GEN_CONFIG, dma4, serial3),$r0
+#endif
+#endif
X #if defined(CONFIG_ETRAX_PARALLEL_PORT0) || defined(CONFIG_ETRAX_ETHERNET_LPSLAVE)
X ; parport 0 enabled using DMA 2/3
- or.w IO_STATE (R_GEN_CONFIG, par0, select),r0
+ or.w IO_STATE (R_GEN_CONFIG, pa$r0, select),$r0
X #endif
X #if defined(CONFIG_ETRAX_PARALLEL_PORT1) || defined(CONFIG_ETRAX_ETHERNET_LPSLAVE)
X ; parport 1 enabled using DMA 4/5
- or.w IO_STATE (R_GEN_CONFIG, par1, select),r0
+ or.w IO_STATE (R_GEN_CONFIG, par1, select),$r0
X #endif
X #ifdef CONFIG_ETRAX_IDE
X ; DMA channels 2 and 3 to ATA, ATA enabled
X or.d IO_STATE (R_GEN_CONFIG, dma3, ata) \
X | IO_STATE (R_GEN_CONFIG, dma2, ata) \
- | IO_STATE (R_GEN_CONFIG, ata, select),r0
+ | IO_STATE (R_GEN_CONFIG, ata, select),$r0
X #endif
X
X #ifdef CONFIG_ETRAX_USB_HOST_PORT1
X ; Set the USB port 1 enable bit
- or.d IO_STATE (R_GEN_CONFIG, usb1, select),r0
+ or.d IO_STATE (R_GEN_CONFIG, usb1, select),$r0
X #endif
X #ifdef CONFIG_ETRAX_USB_HOST_PORT2
X ; Set the USB port 2 enable bit
- or.d IO_STATE (R_GEN_CONFIG, usb2, select),r0
+ or.d IO_STATE (R_GEN_CONFIG, usb2, select),$r0
X #endif
X #ifdef CONFIG_ETRAX_USB_HOST
X ; Connect DMA channels 8 and 9 to USB
X and.d (~(IO_MASK (R_GEN_CONFIG, dma9) \
X | IO_MASK (R_GEN_CONFIG, dma8))) \
X | IO_STATE (R_GEN_CONFIG, dma9, usb) \
- | IO_STATE (R_GEN_CONFIG, dma8, usb),r0
+ | IO_STATE (R_GEN_CONFIG, dma8, usb),$r0
X #endif
X
X #ifdef CONFIG_JULIETTE
X ; DMA channels 4 and 5 to EXTDMA0, for Juliette
X or.d IO_STATE (R_GEN_CONFIG, dma5, extdma0) \
- | IO_STATE (R_GEN_CONFIG, dma4, extdma0),r0
+ | IO_STATE (R_GEN_CONFIG, dma4, extdma0),$r0
+#endif
+
+#if defined(CONFIG_BLUETOOTH) && (defined(CONFIG_BLUETOOTH_RESET_G10) || defined(CONFIG_BLUETOOTH_RESET_G11))
+ or.d IO_STATE (R_GEN_CONFIG, g8_15dir, out),$r0
X #endif
- move.d r0,[_genconfig_shadow] ; init a shadow register of R_GEN_CONFIG
+
+ move.d $r0,[genconfig_shadow] ; init a shadow register of R_GEN_CONFIG
X
X #ifndef CONFIG_SVINTO_SIM
- move.d r0,[R_GEN_CONFIG]
+ move.d $r0,[R_GEN_CONFIG]
X
X #if 0
- moveq 4,r0
- move.b r0,[R_DMA_CH6_CMD] ; reset (ser0 dma out)
- move.b r0,[R_DMA_CH7_CMD] ; reset (ser0 dma in)
-w61: move.b [R_DMA_CH6_CMD],r0 ; wait for reset cycle to finish
- and.b 7,r0
- cmp.b 4,r0
- beq w61
- nop
-w71: move.b [R_DMA_CH7_CMD],r0 ; wait for reset cycle to finish
- and.b 7,r0
- cmp.b 4,r0
- beq w71
+ moveq 4,$r0
+ move.b $r0,[R_DMA_CH6_CMD] ; reset (ser0 dma out)
+ move.b $r0,[R_DMA_CH7_CMD] ; reset (ser0 dma in)
+1: move.b [R_DMA_CH6_CMD],$r0 ; wait for reset cycle to finish
+ and.b 7,$r0
+ cmp.b 4,$r0
+ beq 1b
+ nop
+1: move.b [R_DMA_CH7_CMD],$r0 ; wait for reset cycle to finish
+ and.b 7,$r0
+ cmp.b 4,$r0
+ beq 1b
X nop
X #endif
X
- moveq IO_STATE (R_DMA_CH8_CMD, cmd, reset),r0
- move.b r0,[R_DMA_CH8_CMD] ; reset (ser1 dma out)
- move.b r0,[R_DMA_CH9_CMD] ; reset (ser1 dma in)
-w81: move.b [R_DMA_CH8_CMD],r0 ; wait for reset cycle to finish
- and.b IO_MASK (R_DMA_CH8_CMD, cmd),r0
- cmp.b IO_STATE (R_DMA_CH8_CMD, cmd, reset),r0
- beq w81
- nop
-w91: move.b [R_DMA_CH9_CMD],r0 ; wait for reset cycle to finish
- and.b IO_MASK (R_DMA_CH9_CMD, cmd),r0
- cmp.b IO_STATE (R_DMA_CH9_CMD, cmd, reset),r0
- beq w91
+ moveq IO_STATE (R_DMA_CH8_CMD, cmd, reset),$r0
+ move.b $r0,[R_DMA_CH8_CMD] ; reset (ser1 dma out)
+ move.b $r0,[R_DMA_CH9_CMD] ; reset (ser1 dma in)
+1: move.b [R_DMA_CH8_CMD],$r0 ; wait for reset cycle to finish
+ andq IO_MASK (R_DMA_CH8_CMD, cmd),$r0
+ cmpq IO_STATE (R_DMA_CH8_CMD, cmd, reset),$r0
+ beq 1b
+ nop
+1: move.b [R_DMA_CH9_CMD],$r0 ; wait for reset cycle to finish
+ andq IO_MASK (R_DMA_CH9_CMD, cmd),$r0
+ cmpq IO_STATE (R_DMA_CH9_CMD, cmd, reset),$r0
+ beq 1b
X nop
X
X ;; setup port PA and PB default initial directions and data
X ;; including their shadow registers
X
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR,r0
- move.b r0,[_port_pa_dir_shadow]
- move.b r0,[R_PORT_PA_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA,r0
- move.b r0,[_port_pa_data_shadow]
- move.b r0,[R_PORT_PA_DATA]
-
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG,r0
- move.b r0,[_port_pb_config_shadow]
- move.b r0,[R_PORT_PB_CONFIG]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR,r0
- move.b r0,[_port_pb_dir_shadow]
- move.b r0,[R_PORT_PB_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA,r0
- move.b r0,[_port_pb_data_shadow]
- move.b r0,[R_PORT_PB_DATA]
- move.d 0, r0
- move.d r0,[_port_pb_i2c_shadow]
- move.d r0, [R_PORT_PB_I2C]
-
- moveq 0,r0
- move.d r0,[_port_g_data_shadow]
- move.d r0,[R_PORT_G_DATA]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR,$r0
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PA7)
+ or.b IO_STATE (R_PORT_PA_DIR, dir7, output),$r0
+#endif
+ move.b $r0,[port_pa_dir_shadow]
+ move.b $r0,[R_PORT_PA_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA,$r0
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PA7)
+#if defined(CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH)
+ and.b ~(1 << 7),$r0
+#else
+ or.b (1 << 7),$r0
+#endif
+#endif
+ move.b $r0,[port_pa_data_shadow]
+ move.b $r0,[R_PORT_PA_DATA]
+
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG,$r0
+ move.b $r0,[port_pb_config_shadow]
+ move.b $r0,[R_PORT_PB_CONFIG]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR,$r0
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PB5)
+ or.b IO_STATE (R_PORT_PB_DIR, dir5, output),$r0
+#endif
+ move.b $r0,[port_pb_dir_shadow]
+ move.b $r0,[R_PORT_PB_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA,$r0
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_PB5)
+#if defined(CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH)
+ and.b ~(1 << 5),$r0
+#else
+ or.b (1 << 5),$r0
+#endif
+#endif
+ move.b $r0,[port_pb_data_shadow]
+ move.b $r0,[R_PORT_PB_DATA]
+
+ moveq 0, $r0
+ move.d $r0,[port_pb_i2c_shadow]
+ move.d $r0, [R_PORT_PB_I2C]
+
+ moveq 0,$r0
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_G10)
+#if defined(CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH)
+ and.d ~(1 << 10),$r0
+#else
+ or.d (1 << 10),$r0
+#endif
+#endif
+#if defined(CONFIG_BLUETOOTH) && defined(CONFIG_BLUETOOTH_RESET_G11)
+#if defined(CONFIG_BLUETOOTH_RESET_ACTIVE_HIGH)
+ and.d ~(1 << 11),$r0
+#else
+ or.d (1 << 11),$r0
+#endif
+#endif
+ move.d $r0,[port_g_data_shadow]
+ move.d $r0,[R_PORT_G_DATA]
X
X ;; setup the serial port 0 at 115200 baud for debug purposes
X
X moveq IO_STATE (R_SERIAL0_XOFF, tx_stop, enable) \
X | IO_STATE (R_SERIAL0_XOFF, auto_xoff, disable) \
- | IO_FIELD (R_SERIAL0_XOFF, xoff_char, 0),r0
- move.d r0,[R_SERIAL0_XOFF]
+ | IO_FIELD (R_SERIAL0_XOFF, xoff_char, 0),$r0
+ move.d $r0,[R_SERIAL0_XOFF]
X
X ; 115.2kbaud for both transmit and receive
X move.b IO_STATE (R_SERIAL0_BAUD, tr_baud, c115k2Hz) \
- | IO_STATE (R_SERIAL0_BAUD, rec_baud, c115k2Hz),r0
- move.b r0,[R_SERIAL0_BAUD]
+ | IO_STATE (R_SERIAL0_BAUD, rec_baud, c115k2Hz),$r0
+ move.b $r0,[R_SERIAL0_BAUD]
X
X ; Set up and enable the serial0 receiver.
X move.b IO_STATE (R_SERIAL0_REC_CTRL, dma_err, stop) \
@@ -653,8 +710,8 @@
X | IO_STATE (R_SERIAL0_REC_CTRL, rec_stick_par, normal) \
X | IO_STATE (R_SERIAL0_REC_CTRL, rec_par, even) \
X | IO_STATE (R_SERIAL0_REC_CTRL, rec_par_en, disable) \
- | IO_STATE (R_SERIAL0_REC_CTRL, rec_bitnr, rec_8bit),r0
- move.b r0,[R_SERIAL0_REC_CTRL]
+ | IO_STATE (R_SERIAL0_REC_CTRL, rec_bitnr, rec_8bit),$r0
+ move.b $r0,[R_SERIAL0_REC_CTRL]
X
X ; Set up and enable the serial0 transmitter.
X move.b IO_FIELD (R_SERIAL0_TR_CTRL, txd, 0) \
@@ -664,20 +721,20 @@
X | IO_STATE (R_SERIAL0_TR_CTRL, tr_stick_par, normal) \
X | IO_STATE (R_SERIAL0_TR_CTRL, tr_par, even) \
X | IO_STATE (R_SERIAL0_TR_CTRL, tr_par_en, disable) \
- | IO_STATE (R_SERIAL0_TR_CTRL, tr_bitnr, tr_8bit),r0
- move.b r0,[R_SERIAL0_TR_CTRL]
+ | IO_STATE (R_SERIAL0_TR_CTRL, tr_bitnr, tr_8bit),$r0
+ move.b $r0,[R_SERIAL0_TR_CTRL]
X
X ;; setup the serial port 1 at 115200 baud for debug purposes
X
X moveq IO_STATE (R_SERIAL1_XOFF, tx_stop, enable) \
X | IO_STATE (R_SERIAL1_XOFF, auto_xoff, disable) \
- | IO_FIELD (R_SERIAL1_XOFF, xoff_char, 0),r0
- move.d r0,[R_SERIAL1_XOFF]
+ | IO_FIELD (R_SERIAL1_XOFF, xoff_char, 0),$r0
+ move.d $r0,[R_SERIAL1_XOFF]
X
X ; 115.2kbaud for both transmit and receive
X move.b IO_STATE (R_SERIAL1_BAUD, tr_baud, c115k2Hz) \
- | IO_STATE (R_SERIAL1_BAUD, rec_baud, c115k2Hz),r0
- move.b r0,[R_SERIAL1_BAUD]
+ | IO_STATE (R_SERIAL1_BAUD, rec_baud, c115k2Hz),$r0
+ move.b $r0,[R_SERIAL1_BAUD]
X
X ; Set up and enable the serial1 receiver.
X move.b IO_STATE (R_SERIAL1_REC_CTRL, dma_err, stop) \
@@ -687,8 +744,8 @@
X | IO_STATE (R_SERIAL1_REC_CTRL, rec_stick_par, normal) \
X | IO_STATE (R_SERIAL1_REC_CTRL, rec_par, even) \
X | IO_STATE (R_SERIAL1_REC_CTRL, rec_par_en, disable) \
- | IO_STATE (R_SERIAL1_REC_CTRL, rec_bitnr, rec_8bit),r0
- move.b r0,[R_SERIAL1_REC_CTRL]
+ | IO_STATE (R_SERIAL1_REC_CTRL, rec_bitnr, rec_8bit),$r0
+ move.b $r0,[R_SERIAL1_REC_CTRL]
X
X ; Set up and enable the serial1 transmitter.
X move.b IO_FIELD (R_SERIAL1_TR_CTRL, txd, 0) \
@@ -698,8 +755,8 @@
X | IO_STATE (R_SERIAL1_TR_CTRL, tr_stick_par, normal) \
X | IO_STATE (R_SERIAL1_TR_CTRL, tr_par, even) \
X | IO_STATE (R_SERIAL1_TR_CTRL, tr_par_en, disable) \
- | IO_STATE (R_SERIAL1_TR_CTRL, tr_bitnr, tr_8bit),r0
- move.b r0,[R_SERIAL1_TR_CTRL]
+ | IO_STATE (R_SERIAL1_TR_CTRL, tr_bitnr, tr_8bit),$r0
+ move.b $r0,[R_SERIAL1_TR_CTRL]
X
X
X #ifdef CONFIG_ETRAX_SERIAL_PORT3
@@ -707,13 +764,13 @@
X
X moveq IO_STATE (R_SERIAL3_XOFF, tx_stop, enable) \
X | IO_STATE (R_SERIAL3_XOFF, auto_xoff, disable) \
- | IO_FIELD (R_SERIAL3_XOFF, xoff_char, 0),r0
- move.d r0,[R_SERIAL3_XOFF]
+ | IO_FIELD (R_SERIAL3_XOFF, xoff_char, 0),$r0
+ move.d $r0,[R_SERIAL3_XOFF]
X
X ; 115.2kbaud for both transmit and receive
X move.b IO_STATE (R_SERIAL3_BAUD, tr_baud, c115k2Hz) \
- | IO_STATE (R_SERIAL3_BAUD, rec_baud, c115k2Hz),r0
- move.b r0,[R_SERIAL3_BAUD]
+ | IO_STATE (R_SERIAL3_BAUD, rec_baud, c115k2Hz),$r0
+ move.b $r0,[R_SERIAL3_BAUD]
X
X ; Set up and enable the serial3 receiver.
X move.b IO_STATE (R_SERIAL3_REC_CTRL, dma_err, stop) \
@@ -723,8 +780,8 @@
X | IO_STATE (R_SERIAL3_REC_CTRL, rec_stick_par, normal) \
X | IO_STATE (R_SERIAL3_REC_CTRL, rec_par, even) \
X | IO_STATE (R_SERIAL3_REC_CTRL, rec_par_en, disable) \
- | IO_STATE (R_SERIAL3_REC_CTRL, rec_bitnr, rec_8bit),r0
- move.b r0,[R_SERIAL3_REC_CTRL]
+ | IO_STATE (R_SERIAL3_REC_CTRL, rec_bitnr, rec_8bit),$r0
+ move.b $r0,[R_SERIAL3_REC_CTRL]
X
X ; Set up and enable the serial3 transmitter.
X move.b IO_FIELD (R_SERIAL3_TR_CTRL, txd, 0) \
@@ -734,31 +791,31 @@
X | IO_STATE (R_SERIAL3_TR_CTRL, tr_stick_par, normal) \
X | IO_STATE (R_SERIAL3_TR_CTRL, tr_par, even) \
X | IO_STATE (R_SERIAL3_TR_CTRL, tr_par_en, disable) \
- | IO_STATE (R_SERIAL3_TR_CTRL, tr_bitnr, tr_8bit),r0
- move.b r0,[R_SERIAL3_TR_CTRL]
+ | IO_STATE (R_SERIAL3_TR_CTRL, tr_bitnr, tr_8bit),$r0
+ move.b $r0,[R_SERIAL3_TR_CTRL]
X #endif
X
X #endif /* CONFIG_SVINTO_SIM */
X
- jump _start_kernel ; jump into the C-function _start_kernel in init/main.c
+ jump start_kernel ; jump into the C-function start_kernel in init/main.c
X
X .data
-_etrax_irv:
+etrax_irv:
X .dword 0
-_romfs_start:
+romfs_start:
X .dword 0
-_romfs_length:
+romfs_length:
X .dword 0
-_romfs_in_flash:
+romfs_in_flash:
X .dword 0
X
X ;; put some special pages at the beginning of the kernel aligned
X ;; to page boundaries - the kernel cannot start until after this
X
X #ifdef CONFIG_CRIS_LOW_MAP
-_swapper_pg_dir = 0x60002000
+swapper_pg_dir = 0x60002000
X #else
-_swapper_pg_dir = 0xc0002000
+swapper_pg_dir = 0xc0002000
X #endif
X
X .section ".data.init"
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/ksyms.c linux/arch/cris/kernel/ksyms.c
--- v2.4.10/linux/arch/cris/kernel/ksyms.c Thu Feb 8 16:32:44 2001
+++ linux/arch/cris/kernel/ksyms.c Mon Oct 8 11:43:54 2001
@@ -1,2 +1,65 @@
-/* no kernel support yet */
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/user.h>
+#include <linux/elfcore.h>
+#include <linux/sched.h>
+#include <linux/in6.h>
+#include <linux/interrupt.h>
+#include <linux/smp_lock.h>
+#include <linux/pm.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/tty.h>
+
+#include <asm/semaphore.h>
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+#include <asm/checksum.h>
+#include <asm/io.h>
+#include <asm/hardirq.h>
+#include <asm/delay.h>
+#include <asm/irq.h>
+#include <asm/pgtable.h>
+
+extern void dump_thread(struct pt_regs *, struct user *);
+extern unsigned long get_cmos_time(void);
+extern void __ashrdi3(void);
+
+/* platform dependent support */
+
+EXPORT_SYMBOL(dump_thread);
+EXPORT_SYMBOL(enable_irq);
+EXPORT_SYMBOL(disable_irq);
+EXPORT_SYMBOL(kernel_thread);
+EXPORT_SYMBOL(get_cmos_time);
+
+EXPORT_SYMBOL(strtok);
+EXPORT_SYMBOL(strpbrk);
+EXPORT_SYMBOL(simple_strtol);
+EXPORT_SYMBOL(strstr);
+
+EXPORT_SYMBOL(strchr);
+EXPORT_SYMBOL(strcmp);
+EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL(strncat);
+EXPORT_SYMBOL(strncmp);
+EXPORT_SYMBOL(__ashrdi3);
+
+/* other stuff */
+
+EXPORT_SYMBOL(strncpy_from_user);
+EXPORT_SYMBOL(__strncpy_from_user);
+EXPORT_SYMBOL(__generic_copy_from_user);
+EXPORT_SYMBOL(__generic_copy_to_user);
+EXPORT_SYMBOL(strnlen_user);
+EXPORT_SYMBOL(__copy_user_zeroing);
+EXPORT_SYMBOL(__copy_user);
+
+#undef memcpy
+#undef memset
+extern void * memset(void *,int,__kernel_size_t);
+extern void * memcpy(void *,const void *,__kernel_size_t);
+EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL_NOVERS(memset);
+
X
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/process.c linux/arch/cris/kernel/process.c
--- v2.4.10/linux/arch/cris/kernel/process.c Sun Sep 23 11:40:55 2001
+++ linux/arch/cris/kernel/process.c Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.16 2001/06/21 02:00:40 hp Exp $
+/* $Id: process.c,v 1.20 2001/10/03 08:21:39 jonashg Exp $
X *
X * linux/arch/cris/kernel/process.c
X *
@@ -8,6 +8,18 @@
X * Authors: Bjorn Wesen (bjo...@axis.com)
X *
X * $Log: process.c,v $
+ * Revision 1.20 2001/10/03 08:21:39 jonashg
+ * cause_of_death does not exist if CONFIG_SVINTO_SIM is defined.
+ *
+ * Revision 1.19 2001/09/26 11:52:54 bjornw
+ * INIT_MMAP is gone in 2.4.10
+ *
+ * Revision 1.18 2001/08/21 21:43:51 hp
+ * Move last watchdog fix inside #ifdef CONFIG_ETRAX_WATCHDOG
+ *
+ * Revision 1.17 2001/08/21 13:48:01 jonashg
+ * Added fix by HP to avoid oops when doing a hard_reset_now.
+ *
X * Revision 1.16 2001/06/21 02:00:40 hp
X * * entry.S: Include asm/unistd.h.
X * (_sys_call_table): Use section .rodata, not .data.
@@ -118,10 +130,20 @@
X
X void hard_reset_now (void)
X {
+ /*
+ * Don't declare this variable elsewhere. We don't want any other
+ * code to know about it than the watchdog handler in entry.S and
+ * this code, implementing hard reset through the watchdog.
+ */
+ extern int cause_of_death;
+
X printk("*** HARD RESET ***\n");
X cli();
X
-#ifndef CONFIG_ETRAX_WATCHDOG
+#if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM)
+ cause_of_death = 0xbedead;
+
+#else
X /* Since we dont plan to keep on reseting the watchdog,
X the key can be arbitrary hence three */
X *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, 3) |
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/ptrace.c linux/arch/cris/kernel/ptrace.c
--- v2.4.10/linux/arch/cris/kernel/ptrace.c Sun Sep 23 11:40:55 2001
+++ linux/arch/cris/kernel/ptrace.c Mon Oct 8 11:43:54 2001
@@ -8,6 +8,9 @@
X * Authors: Bjorn Wesen
X *
X * $Log: ptrace.c,v $
+ * Revision 1.7 2001/09/26 11:53:49 bjornw
+ * PTRACE_DETACH works more simple in 2.4.10
+ *
X * Revision 1.6 2001/07/25 16:08:47 bjornw
X * PTRACE_ATTACH bulk moved into arch-independant code in 2.4.7
X *
@@ -89,7 +92,7 @@
X */
X void ptrace_disable(struct task_struct *child)
X {
- /* Todo - pending singlesteps? */
+ /* Todo - pending singlesteps? */
X }
X
X /* Note that this implementation of ptrace behaves differently from vanilla
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/setup.c linux/arch/cris/kernel/setup.c
--- v2.4.10/linux/arch/cris/kernel/setup.c Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/kernel/setup.c Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.18 2001/06/28 04:47:16 hp Exp $
+/* $Id: setup.c,v 1.21 2001/10/01 14:45:35 bjornw Exp $
X *
X * linux/arch/cris/kernel/setup.c
X *
@@ -166,7 +166,17 @@
X saving anything that might be there. */
X
X *cmdline_p = command_line;
- strcpy(command_line, "root=/dev/rom"); /* use the appended romdisk as root */
+
+ if (romfs_in_flash) {
+ strncpy(command_line, "root=", COMMAND_LINE_SIZE);
+ strncpy(command_line+5, CONFIG_ETRAX_ROOT_DEVICE,
+ COMMAND_LINE_SIZE-5);
+
+ /* Save command line copy for /proc/cmdline */
+
+ memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+ saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+ }
X
X /* give credit for the CRIS port */
X
@@ -213,15 +223,10 @@
X int get_cpuinfo(char *buffer)
X {
X int revision;
-#ifndef CONFIG_SVINTO_SIM
- unsigned char tmp;
X
- __asm__ volatile ("move vr,%0" : "=rm" (tmp));
- revision = tmp;
-#else
- /* Fake a revision for the simulator */
- revision = 7;
-#endif
+ /* read the version register in the CPU and print some stuff */
+
+ revision = rdvr();
X
X return sprintf(buffer,
X "cpu\t\t: CRIS\n"
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/signal.c linux/arch/cris/kernel/signal.c
--- v2.4.10/linux/arch/cris/kernel/signal.c Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/kernel/signal.c Mon Oct 8 11:43:54 2001
@@ -64,6 +64,7 @@
X err |= __put_user(from->si_pid, &to->si_pid);
X switch (from->si_code >> 16) {
X case __SI_FAULT >> 16:
+ err |= __put_user(from->si_addr, &to->si_addr);
X break;
X case __SI_CHLD >> 16:
X err |= __put_user(from->si_utime, &to->si_utime);
@@ -347,6 +348,11 @@
X
X err |= __copy_to_user(sc, regs, sizeof(struct pt_regs));
X
+ /* Set the frametype to CRIS_FRAME_NORMAL for the execution of
+ the signal handler. The frametype will be restored to its previous
+ value in restore_sigcontext. */
+ regs->frametype = CRIS_FRAME_NORMAL;
+
X /* then some other stuff */
X
X err |= __put_user(mask, &sc->oldmask);
@@ -476,10 +482,10 @@
X } else {
X /* trampoline - the desired return ip is the retcode itself */
X return_ip = (unsigned long)&frame->retcode;
- /* This is movu.w __NR_sigreturn, r9; break 13; */
- err |= __put_user(0x9c5f, (short *)(frame->retcode+0));
- err |= __put_user(__NR_sigreturn, (short *)(frame->retcode+2));
- err |= __put_user(0xe93d, (short *)(frame->retcode+4));
+ /* This is movu.w __NR_rt_sigreturn, r9; break 13; */
+ err |= __put_user(0x9c5f, (short *)(frame->retcode+0));
+ err |= __put_user(__NR_rt_sigreturn, (short *)(frame->retcode+2));
+ err |= __put_user(0xe93d, (short *)(frame->retcode+4));
X }
X
X if (err)
@@ -492,6 +498,8 @@
X regs->irp = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */
X regs->srp = return_ip; /* what we enter LATER */
X regs->r10 = sig; /* first argument is signo */
+ regs->r11 = (unsigned long) &frame->info; /* second argument is (siginfo_t *) */
+ regs->r12 = 0; /* third argument is unused */
X
X /* actually move the usp to reflect the stacked frame */
X
diff -u --recursive --new-file v2.4.10/linux/arch/cris/kernel/traps.c linux/arch/cris/kernel/traps.c
--- v2.4.10/linux/arch/cris/kernel/traps.c Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/kernel/traps.c Sun Sep 30 12:26:08 2001
@@ -138,8 +138,8 @@
X register. */
X unsigned long usp = rdusp();
X
- printk("IRP: %08lx SRP: %08lx DCCR: %08lx USP: %08lx MOF: %08lx\n",
- regs->irp, regs->srp, regs->dccr, usp, regs->mof );
+ printk("IRP: %08lx SRP: %08lx DCCR: %08lx USP: %08lx MOF: %08lx %s\n",
+ regs->irp, regs->srp, regs->dccr, usp, regs->mof, print_tainted());
X printk(" r0: %08lx r1: %08lx r2: %08lx r3: %08lx\n",
X regs->r0, regs->r1, regs->r2, regs->r3);
X printk(" r4: %08lx r5: %08lx r6: %08lx r7: %08lx\n",
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/checksum.S linux/arch/cris/lib/checksum.S
--- v2.4.10/linux/arch/cris/lib/checksum.S Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/lib/checksum.S Mon Oct 8 11:43:54 2001
@@ -1,12 +1,12 @@
-/* $Id: checksum.S,v 1.5 2001/05/29 11:40:14 markusl Exp $
+/* $Id: checksum.S,v 1.6 2001/10/01 14:47:35 bjornw Exp $
X * A fast checksum routine using movem
X * Copyright (c) 1998-2001 Axis Communications AB
X *
X * csum_partial(const unsigned char * buff, int len, unsigned int sum)
X */
X
- .globl _csum_partial
-_csum_partial:
+ .globl csum_partial
+csum_partial:
X
X ;; r10 - src
X ;; r11 - length
@@ -16,8 +16,8 @@
X ;; we also do _NOT_ want to compute a checksum over more than the
X ;; actual length when length < 40
X
- cmpu.w 80,r11
- blo word_loop
+ cmpu.w 80,$r11
+ blo _word_loop
X nop
X
X ;; need to save the registers we use below in the movem loop
@@ -25,100 +25,100 @@
X ;; only r0 - r8 have to be saved, the other ones are clobber-able
X ;; according to the ABI
X
- subq 9*4,sp
- movem r8,[sp]
+ subq 9*4,$sp
+ movem $r8,[$sp]
X
X ;; do a movem checksum
X
- subq 10*4,r11 ; update length for the first loop
+ subq 10*4,$r11 ; update length for the first loop
X
-mloop: movem [r10+],r9 ; read 10 longwords
+_mloop: movem [$r10+],$r9 ; read 10 longwords
X
X ;; perform dword checksumming on the 10 longwords
X
- add.d r0,r12
+ add.d $r0,$r12
X ax
- add.d r1,r12
+ add.d $r1,$r12
X ax
- add.d r2,r12
+ add.d $r2,$r12
X ax
- add.d r3,r12
+ add.d $r3,$r12
X ax
- add.d r4,r12
+ add.d $r4,$r12
X ax
- add.d r5,r12
+ add.d $r5,$r12
X ax
- add.d r6,r12
+ add.d $r6,$r12
X ax
- add.d r7,r12
+ add.d $r7,$r12
X ax
- add.d r8,r12
+ add.d $r8,$r12
X ax
- add.d r9,r12
+ add.d $r9,$r12
X
X ;; fold the carry into the checksum, to avoid having to loop the carry
X ;; back into the top
X
X ax
- addq 0,r12
+ addq 0,$r12
X ax ; do it again, since we might have generated a carry
- addq 0,r12
+ addq 0,$r12
X
- subq 10*4,r11
- bge mloop
+ subq 10*4,$r11
+ bge _mloop
X nop
X
- addq 10*4,r11 ; compensate for last loop underflowing length
+ addq 10*4,$r11 ; compensate for last loop underflowing length
X
- movem [sp+],r8 ; restore regs
+ movem [$sp+],$r8 ; restore regs
X
-word_loop:
+_word_loop:
X ;; only fold if there is anything to fold.
X
- cmpq 0,r12
- beq no_fold
+ cmpq 0,$r12
+ beq _no_fold
X
X ;; fold 32-bit checksum into a 16-bit checksum, to avoid carries below.
X ;; r9 and r13 can be used as temporaries.
X
- moveq -1,r9 ; put 0xffff in r9, faster than move.d 0xffff,r9
- lsrq 16,r9
+ moveq -1,$r9 ; put 0xffff in r9, faster than move.d 0xffff,r9
+ lsrq 16,$r9
X
- move.d r12,r13
- lsrq 16,r13 ; r13 = checksum >> 16
- and.d r9,r12 ; checksum = checksum & 0xffff
- add.d r13,r12 ; checksum += r13
- move.d r12,r13 ; do the same again, maybe we got a carry last add
- lsrq 16,r13
- and.d r9,r12
- add.d r13,r12
-
-no_fold:
- cmpq 2,r11
- blt no_words
+ move.d $r12,$r13
+ lsrq 16,$r13 ; r13 = checksum >> 16
+ and.d $r9,$r12 ; checksum = checksum & 0xffff
+ add.d $r13,$r12 ; checksum += r13
+ move.d $r12,$r13 ; do the same again, maybe we got a carry last add
+ lsrq 16,$r13
+ and.d $r9,$r12
+ add.d $r13,$r12
+
+_no_fold:
+ cmpq 2,$r11
+ blt _no_words
X nop
X
X ;; checksum the rest of the words
X
- subq 2,r11
+ subq 2,$r11
X
-wloop: subq 2,r11
- bge wloop
- addu.w [r10+],r12
+_wloop: subq 2,$r11
+ bge _wloop
+ addu.w [$r10+],$r12
X
- addq 2,r11
+ addq 2,$r11
X
-no_words:
+_no_words:
X ;; see if we have one odd byte more
- cmpq 1,r11
- beq do_byte
+ cmpq 1,$r11
+ beq _do_byte
X nop
X ret
- move.d r12, r10
+ move.d $r12, $r10
X
-do_byte:
+_do_byte:
X ;; copy and checksum the last byte
- addu.b [r10],r12
+ addu.b [$r10],$r12
X ret
- move.d r12, r10
+ move.d $r12, $r10
X
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/checksumcopy.S linux/arch/cris/lib/checksumcopy.S
--- v2.4.10/linux/arch/cris/lib/checksumcopy.S Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/lib/checksumcopy.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: checksumcopy.S,v 1.6 2001/06/28 03:57:16 hp Exp $
+/* $Id: checksumcopy.S,v 1.7 2001/10/01 14:47:35 bjornw Exp $
X * A fast checksum+copy routine using movem
X * Copyright (c) 1998, 2001 Axis Communications AB
X *
@@ -8,8 +8,8 @@
X * int len, unsigned int sum)
X */
X
- .globl _csum_partial_copy_nocheck
-_csum_partial_copy_nocheck:
+ .globl csum_partial_copy_nocheck
+csum_partial_copy_nocheck:
X
X ;; r10 - src
X ;; r11 - dst
@@ -20,8 +20,8 @@
X ;; we also do _NOT_ want to compute a checksum over more than the
X ;; actual length when length < 40
X
- cmpu.w 80,r12
- blo word_loop
+ cmpu.w 80, $r12
+ blo _word_loop
X nop
X
X ;; need to save the registers we use below in the movem loop
@@ -29,104 +29,104 @@
X ;; only r0 - r8 have to be saved, the other ones are clobber-able
X ;; according to the ABI
X
- subq 9*4,sp
- movem r8,[sp]
+ subq 9*4, $sp
+ movem $r8, [$sp]
X
X ;; do a movem copy and checksum
X
- subq 10*4,r12 ; update length for the first loop
+ subq 10*4, $r12 ; update length for the first loop
X
-mloop: movem [r10+],r9 ; read 10 longwords
+_mloop: movem [$r10+],$r9 ; read 10 longwords
X 1: ;; A failing userspace access will have this as PC.
- movem r9,[r11+] ; write 10 longwords
+ movem $r9,[$r11+] ; write 10 longwords
X
X ;; perform dword checksumming on the 10 longwords
X
- add.d r0,r13
+ add.d $r0,$r13
X ax
- add.d r1,r13
+ add.d $r1,$r13
X ax
- add.d r2,r13
+ add.d $r2,$r13
X ax
- add.d r3,r13
+ add.d $r3,$r13
X ax
- add.d r4,r13
+ add.d $r4,$r13
X ax
- add.d r5,r13
+ add.d $r5,$r13
X ax
- add.d r6,r13
+ add.d $r6,$r13
X ax
- add.d r7,r13
+ add.d $r7,$r13
X ax
- add.d r8,r13
+ add.d $r8,$r13
X ax
- add.d r9,r13
+ add.d $r9,$r13
X
X ;; fold the carry into the checksum, to avoid having to loop the carry
X ;; back into the top
X
X ax
- addq 0,r13
+ addq 0,$r13
X ax ; do it again, since we might have generated a carry
- addq 0,r13
+ addq 0,$r13
X
- subq 10*4,r12
- bge mloop
+ subq 10*4,$r12
+ bge _mloop
X nop
X
- addq 10*4,r12 ; compensate for last loop underflowing length
+ addq 10*4,$r12 ; compensate for last loop underflowing length
X
- movem [sp+],r8 ; restore regs
+ movem [$sp+],$r8 ; restore regs
X
-word_loop:
+_word_loop:
X ;; only fold if there is anything to fold.
X
- cmpq 0,r13
- beq no_fold
+ cmpq 0,$r13
+ beq _no_fold
X
X ;; fold 32-bit checksum into a 16-bit checksum, to avoid carries below
X ;; r9 can be used as temporary.
X
- move.d r13,r9
- lsrq 16,r9 ; r0 = checksum >> 16
- and.d 0xffff,r13 ; checksum = checksum & 0xffff
- add.d r9,r13 ; checksum += r0
- move.d r13,r9 ; do the same again, maybe we got a carry last add
- lsrq 16,r9
- and.d 0xffff,r13
- add.d r9,r13
-
-no_fold:
- cmpq 2,r12
- blt no_words
+ move.d $r13,$r9
+ lsrq 16,$r9 ; r0 = checksum >> 16
+ and.d 0xffff,$r13 ; checksum = checksum & 0xffff
+ add.d $r9,$r13 ; checksum += r0
+ move.d $r13,$r9 ; do the same again, maybe we got a carry last add
+ lsrq 16,$r9
+ and.d 0xffff,$r13
+ add.d $r9,$r13
+
+_no_fold:
+ cmpq 2,$r12
+ blt _no_words
X nop
X
X ;; copy and checksum the rest of the words
X
- subq 2,r12
+ subq 2,$r12
X
-wloop: move.w [r10+],r9
+_wloop: move.w [$r10+],$r9
X 2: ;; A failing userspace access will have this as PC.
- addu.w r9,r13
- subq 2,r12
- bge wloop
- move.w r9,[r11+]
+ addu.w $r9,$r13
+ subq 2,$r12
+ bge _wloop
+ move.w $r9,[$r11+]
X
- addq 2,r12
+ addq 2,$r12
X
-no_words:
+_no_words:
X ;; see if we have one odd byte more
- cmpq 1,r12
- beq do_byte
+ cmpq 1,$r12
+ beq _do_byte
X nop
X ret
- move.d r13, r10
+ move.d $r13, $r10
X
-do_byte:
+_do_byte:
X ;; copy and checksum the last byte
- move.b [r10],r9
+ move.b [$r10],$r9
X 3: ;; A failing userspace access will have this as PC.
- addu.b r9,r13
- move.b r9,[r11]
+ addu.b $r9,$r13
+ move.b $r9,[$r11]
X ret
- move.d r13, r10
+ move.d $r13, $r10
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/csumcpfruser.S linux/arch/cris/lib/csumcpfruser.S
--- v2.4.10/linux/arch/cris/lib/csumcpfruser.S Sun Aug 12 13:27:58 2001
+++ linux/arch/cris/lib/csumcpfruser.S Mon Oct 8 11:43:54 2001
@@ -21,7 +21,7 @@
X It is conveniently located on the stack, so the normal function body
X does not have to handle it. */
X
-#define _csum_partial_copy_nocheck _csum_partial_copy_from_user
+#define csum_partial_copy_nocheck csum_partial_copy_from_user
X
X /* There are local labels numbered 1, 2 and 3 present to mark the
X different from-user accesses. */
@@ -31,30 +31,30 @@
X
X ;; Here from the movem loop; restore stack.
X 4:
- movem [sp+],r8
+ movem [$sp+],$r8
X ;; r12 is already decremented. Add back chunk_size-2.
- addq 40-2,r12
+ addq 40-2,$r12
X
X ;; Here from the word loop; r12 is off by 2; add it back.
X 5:
- addq 2,r12
+ addq 2,$r12
X
X ;; Here from a failing single byte.
X 6:
X
X ;; Signal in *errptr that we had a failing access.
- moveq -EFAULT,r9
- move.d r9,[[sp]]
+ moveq -EFAULT,$r9
+ move.d $r9,[[$sp]]
X
X ;; Clear the rest of the destination area using memset. Preserve the
X ;; checksum for the readable bytes.
- push srp
- push r13
- move.d r11,r10
- clear.d r11
- jsr _memset
- pop r10
- jump [sp+]
+ push $srp
+ push $r13
+ move.d $r11,$r10
+ clear.d $r11
+ jsr memset
+ pop $r10
+ jump [$sp+]
X
X .previous
X .section __ex_table,"a"
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/dram_init.S linux/arch/cris/lib/dram_init.S
--- v2.4.10/linux/arch/cris/lib/dram_init.S Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/lib/dram_init.S Mon Oct 8 11:43:54 2001
@@ -1,4 +1,4 @@
-/* $Id: dram_init.S,v 1.8 2001/05/15 07:12:45 hp Exp $
+/* $Id: dram_init.S,v 1.10 2001/10/04 12:00:21 martinnn Exp $
X *
X * DRAM/SDRAM initialization - alter with care
X * This file is intended to be included from other assembler files
@@ -11,6 +11,12 @@
X * Authors: Mikael Starvik (sta...@axis.com)
X *
X * $Log: dram_init.S,v $
+ * Revision 1.10 2001/10/04 12:00:21 martinnn
+ * Added missing underscores.
+ *
+ * Revision 1.9 2001/10/01 14:47:35 bjornw
+ * Added register prefixes and removed underscores
+ *
X * Revision 1.8 2001/05/15 07:12:45 hp
X * Copy warning from head.S about r8 and r9
X *
@@ -52,24 +58,24 @@
X ;; They should not be used in the code below.
X
X #ifndef CONFIG_SVINTO_SIM
- move.d CONFIG_ETRAX_DEF_R_WAITSTATES, r0
- move.d r0, [R_WAITSTATES]
+ move.d CONFIG_ETRAX_DEF_R_WAITSTATES, $r0
+ move.d $r0, [R_WAITSTATES]
X
- move.d CONFIG_ETRAX_DEF_R_BUS_CONFIG, r0
- move.d r0, [R_BUS_CONFIG]
+ move.d CONFIG_ETRAX_DEF_R_BUS_CONFIG, $r0
+ move.d $r0, [R_BUS_CONFIG]
X
X #ifndef CONFIG_ETRAX_SDRAM
- move.d CONFIG_ETRAX_DEF_R_DRAM_CONFIG, r0
- move.d r0, [R_DRAM_CONFIG]
+ move.d CONFIG_ETRAX_DEF_R_DRAM_CONFIG, $r0
+ move.d $r0, [R_DRAM_CONFIG]
X
- move.d CONFIG_ETRAX_DEF_R_DRAM_TIMING, r0
- move.d r0, [R_DRAM_TIMING]
+ move.d CONFIG_ETRAX_DEF_R_DRAM_TIMING, $r0
+ move.d $r0, [R_DRAM_TIMING]
X #else
X ; Refer to ETRAX 100LX Designers Reference for a description of SDRAM initialization
X
X ; Bank configuration
- move.d CONFIG_ETRAX_DEF_R_SDRAM_CONFIG, r0
- move.d r0, [R_SDRAM_CONFIG]
+ move.d CONFIG_ETRAX_DEF_R_SDRAM_CONFIG, $r0
+ move.d $r0, [R_SDRAM_CONFIG]
X
X ; Calculate value of mrs_data
X ; CAS latency = 2 && bus_width = 32 => 0x40
@@ -77,71 +83,69 @@
X ; CAS latency = 2 && bus_width = 16 => 0x20
X ; CAS latency = 3 && bus_width = 16 => 0x30
X
- move.d 0x40, r2 ; Assume 32 bits and CAS latency = 2
- move.d CONFIG_ETRAX_DEF_R_SDRAM_TIMING, r1
- move.d r1, r3
- and.d 0x03, r1 ; Get CAS latency
- and.d 0x1000, r3 ; 50 or 100 MHz?
- beq speed_50
- nop
-speed_100:
- cmp.d 0x00, r1 ; CAS latency = 2?
- beq bw_check
- nop
- or.d 0x20, r2 ; CAS latency = 3
- ba bw_check
- nop
-speed_50:
- cmp.d 0x01, r1 ; CAS latency = 2?
- beq bw_check
- nop
- or.d 0x20, r2 ; CAS latency = 3
-bw_check:
- move.d CONFIG_ETRAX_DEF_R_SDRAM_CONFIG, r1
- and.d 0x800000, r1 ; DRAM width is bit 23
- bne set_timing
+ move.d 0x40, $r2 ; Assume 32 bits and CAS latency = 2
+ move.d CONFIG_ETRAX_DEF_R_SDRAM_TIMING, $r1
+ move.d $r1, $r3
+ and.d 0x03, $r1 ; Get CAS latency
+ and.d 0x1000, $r3 ; 50 or 100 MHz?
+ beq _speed_50
+ nop
+_speed_100:
+ cmp.d 0x00, $r1 ; CAS latency = 2?
+ beq _bw_check
+ nop
+ or.d 0x20, $r2 ; CAS latency = 3
+ ba _bw_check
+ nop
+_speed_50:
+ cmp.d 0x01, $r1 ; CAS latency = 2?
+ beq _bw_check
+ nop
+ or.d 0x20, $r2 ; CAS latency = 3
+_bw_check:
+ move.d CONFIG_ETRAX_DEF_R_SDRAM_CONFIG, $r1
+ and.d 0x800000, $r1 ; DRAM width is bit 23
+ bne _set_timing
X nop
- lsrq 1, r2 ; 16 bits. Shift down value.
+ lsrq 1, $r2 ; 16 bits. Shift down value.
X
X ; Set timing parameters. Starts master clock
-set_timing:
- move.d CONFIG_ETRAX_DEF_R_SDRAM_TIMING, r1
- and.d 0x8000f9ff, r1 ; Make sure mrs data and command is 0
- or.d 0x80000000, r1 ; Make sure sdram enable bit is set
- move.d r1, r5
- or.d 0x0000c000, r1 ; ref = disable
- lslq 16, r2 ; mrs data starts at bit 16
- or.d r2, r1
- move.d r1, [R_SDRAM_TIMING]
+_set_timing:
+ move.d CONFIG_ETRAX_DEF_R_SDRAM_TIMING, $r1
+ and.d 0x8000f9ff, $r1 ; Make sure mrs data and command is 0
+ or.d 0x80000000, $r1 ; Make sure sdram enable bit is set
+ move.d $r1, $r5
+ or.d 0x0000c000, $r1 ; ref = disable
+ lslq 16, $r2 ; mrs data starts at bit 16
+ or.d $r2, $r1
+ move.d $r1, [R_SDRAM_TIMING]
X
X ; Wait 200us
- move.d 10000, r2
-sdram_loop:
- bne sdram_loop
- subq 1, r2
+ move.d 10000, $r2
+1: bne 1b
+ subq 1, $r2
X
X ; Issue initialization command sequence
- move.d sdram_commands_start, r2
- move.d sdram_commands_end, r3
-command_loop:
- clear.d r4
- move.b [r2+], r4
- lslq 9, r4 ; Command starts at bit 9
- or.d r1, r4
- move.d r4, [R_SDRAM_TIMING]
+ move.d _sdram_commands_start, $r2
+ move.d _sdram_commands_end, $r3
+1: clear.d $r4
+ move.b [$r2+], $r4
+ lslq 9, $r4 ; Command starts at bit 9
+ or.d $r1, $r4
+ move.d $r4, [R_SDRAM_TIMING]
X nop ; Wait five nop cycles between each command
X nop
X nop
X nop
X nop
- cmp.d r2, r3
- bne command_loop
+ cmp.d $r2, $r3
+ bne 1b
X nop
- move.d r5, [R_SDRAM_TIMING]
- ba sdram_commands_end
+ move.d $r5, [R_SDRAM_TIMING]
+ ba _sdram_commands_end
X nop
X
-sdram_commands_start:
+_sdram_commands_start:
X .byte 3 ; Precharge
X .byte 0 ; nop
X .byte 2 ; refresh
@@ -162,6 +166,6 @@
X .byte 0 ; nop
X .byte 1 ; mrs
X .byte 0 ; nop
-sdram_commands_end:
+_sdram_commands_end:
X #endif
X #endif
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/memset.c linux/arch/cris/lib/memset.c
--- v2.4.10/linux/arch/cris/lib/memset.c Tue May 1 16:04:56 2001
+++ linux/arch/cris/lib/memset.c Mon Oct 8 11:43:54 2001
@@ -56,12 +56,12 @@
X
X /* Ugh. This is fragile at best. Check with newer GCC releases, if
X they compile cascaded "x |= x << 8" sanely! */
- __asm__("movu.b %0,r13\n\t"
- "lslq 8,r13\n\t"
- "move.b %0,r13\n\t"
- "move.d r13,%0\n\t"
- "lslq 16,r13\n\t"
- "or.d r13,%0"
+ __asm__("movu.b %0,$r13\n\t"
+ "lslq 8,$r13\n\t"
+ "move.b %0,$r13\n\t"
+ "move.d $r13,%0\n\t"
+ "lslq 16,$r13\n\t"
+ "or.d $r13,%0"
X : "=r" (lc) : "0" (lc) : "r13");
X
X {
@@ -118,36 +118,36 @@
X ;; Save the registers we'll clobber in the movem process
X ;; on the stack. Don't mention them to gcc, it will only be
X ;; upset.
- subq 11*4,sp
- movem r10,[sp]
+ subq 11*4,$sp
+ movem $r10,[$sp]
X
- move.d r11,r0
- move.d r11,r1
- move.d r11,r2
- move.d r11,r3
- move.d r11,r4
- move.d r11,r5
- move.d r11,r6
- move.d r11,r7
- move.d r11,r8
- move.d r11,r9
- move.d r11,r10
+ move.d $r11,$r0
+ move.d $r11,$r1
+ move.d $r11,$r2
+ move.d $r11,$r3
+ move.d $r11,$r4
+ move.d $r11,$r5
+ move.d $r11,$r6
+ move.d $r11,$r7
+ move.d $r11,$r8
+ move.d $r11,$r9
+ move.d $r11,$r10
X
X ;; Now we've got this:
X ;; r13 - dst
X ;; r12 - n
X
X ;; Update n for the first loop
- subq 12*4,r12
+ subq 12*4,$r12
X 0:
- subq 12*4,r12
+ subq 12*4,$r12
X bge 0b
- movem r11,[r13+]
+ movem $r11,[$r13+]
X
- addq 12*4,r12 ;; compensate for last loop underflowing n
+ addq 12*4,$r12 ;; compensate for last loop underflowing n
X
X ;; Restore registers from stack
- movem [sp+],r10"
+ movem [$sp+],$r10"
X
X /* Outputs */ : "=r" (dst), "=r" (n)
X /* Inputs */ : "0" (dst), "1" (n), "r" (lc));
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/string.c linux/arch/cris/lib/string.c
--- v2.4.10/linux/arch/cris/lib/string.c Tue May 1 16:04:56 2001
+++ linux/arch/cris/lib/string.c Mon Oct 8 11:43:54 2001
@@ -102,8 +102,8 @@
X ;;
X ;; Save the registers we'll use in the movem process
X ;; on the stack.
- subq 11*4,sp
- movem r10,[sp]
+ subq 11*4,$sp
+ movem $r10,[$sp]
X
X ;; Now we've got this:
X ;; r11 - src
@@ -111,17 +111,17 @@
X ;; r12 - n
X
X ;; Update n for the first loop
- subq 44,r12
+ subq 44,$r12
X 0:
- movem [r11+],r10
- subq 44,r12
+ movem [$r11+],$r10
+ subq 44,$r12
X bge 0b
- movem r10,[r13+]
+ movem $r10,[$r13+]
X
- addq 44,r12 ;; compensate for last loop underflowing n
+ addq 44,$r12 ;; compensate for last loop underflowing n
X
X ;; Restore registers from stack
- movem [sp+],r10"
+ movem [$sp+],$r10"
X
X /* Outputs */ : "=r" (dst), "=r" (src), "=r" (n)
X /* Inputs */ : "0" (dst), "1" (src), "2" (n));
diff -u --recursive --new-file v2.4.10/linux/arch/cris/lib/usercopy.c linux/arch/cris/lib/usercopy.c
--- v2.4.10/linux/arch/cris/lib/usercopy.c Wed Jul 25 17:10:17 2001
+++ linux/arch/cris/lib/usercopy.c Mon Oct 8 11:43:54 2001
@@ -95,8 +95,8 @@
X ;;
X ;; Save the registers we'll use in the movem process
X ;; on the stack.
- subq 11*4,sp
- movem r10,[sp]
+ subq 11*4,$sp
+ movem $r10,[$sp]
X
X ;; Now we've got this:
X ;; r11 - src
@@ -104,7 +104,7 @@
X ;; r12 - n
X
X ;; Update n for the first loop
- subq 44,r12
+ subq 44,$r12
X
X ; Since the noted PC of a faulting instruction in a delay-slot of a taken
X ; branch, is that of the branch target, we actually point at the from-movem
@@ -113,15 +113,15 @@
X ; after *that* movem.
X
X 0:
- movem [r11+],r10
- subq 44,r12
+ movem [$r11+],$r10
+ subq 44,$r12
X bge 0b
- movem r10,[r13+]
+ movem $r10,[$r13+]
X 1:
- addq 44,r12 ;; compensate for last loop underflowing n
+ addq 44,$r12 ;; compensate for last loop underflowing n
X
X ;; Restore registers from stack
- movem [sp+],r10
+ movem [$sp+],$r10
X 2:
X .section .fixup,\"ax\"
X
@@ -130,14 +130,14 @@
X ; performance penalty for sany use; the program will segfault soon enough.
X
X 3:
- move.d [sp],r10
- addq 44,r10
- move.d r10,[sp]
+ move.d [$sp],$r10
+ addq 44,$r10
+ move.d $r10,[$sp]
X jump 0b
X 4:
- movem [sp+],r10
- addq 44,r10
- addq 44,r12
+ movem [$sp+],$r10
+ addq 44,$r10
+ addq 44,$r12
X jump 2b
X
X .previous
@@ -255,8 +255,8 @@
X ;;
X ;; Save the registers we'll use in the movem process
X ;; on the stack.
- subq 11*4,sp
- movem r10,[sp]
+ subq 11*4,$sp
+ movem $r10,[$sp]
X
X ;; Now we've got this:
X ;; r11 - src
@@ -264,18 +264,18 @@
X ;; r12 - n
X
X ;; Update n for the first loop
- subq 44,r12
+ subq 44,$r12
X 0:
- movem [r11+],r10
+ movem [$r11+],$r10
X 1:
- subq 44,r12
+ subq 44,$r12
X bge 0b
- movem r10,[r13+]
+ movem $r10,[$r13+]
X
- addq 44,r12 ;; compensate for last loop underflowing n
+ addq 44,$r12 ;; compensate for last loop underflowing n
X 8:
X ;; Restore registers from stack
- movem [sp+],r10
+ movem [$sp+],$r10
X
X .section .fixup,\"ax\"
X
@@ -287,57 +287,57 @@
X ;; the SIZE bytes at PAGE after the first fault.
X
X 3:
- move.d [sp],r10
+ move.d [$sp],$r10
X
X ;; Number of remaining bytes, cleared but not copied, is r12 + 44.
X
- add.d r12,r10
- addq 44,r10
+ add.d $r12,$r10
+ addq 44,$r10
X
- move.d r10,[sp]
- clear.d r0
- clear.d r1
- clear.d r2
- clear.d r3
- clear.d r4
- clear.d r5
- clear.d r6
- clear.d r7
- clear.d r8
- clear.d r9
- clear.d r10
+ move.d $r10,[$sp]
+ clear.d $r0
+ clear.d $r1
+ clear.d $r2
+ clear.d $r3
+ clear.d $r4
+ clear.d $r5
+ clear.d $r6
+ clear.d $r7
+ clear.d $r8
+ clear.d $r9
+ clear.d $r10
X
X ;; Perform clear similar to the copy-loop.
X
X 4:
- subq 44,r12
+ subq 44,$r12
X bge 4b
- movem r10,[r13+]
+ movem $r10,[$r13+]
X
X ;; Clear by four for the remaining multiples.
X
- addq 40,r12
+ addq 40,$r12
X bmi 6f
X nop
X 5:
- subq 4,r12
+ subq 4,$r12
X bpl 5b
- clear.d [r13+]
+ clear.d [$r13+]
X 6:
- addq 4,r12
+ addq 4,$r12
X beq 7f
X nop
X
- subq 1,r12
+ subq 1,$r12
X beq 7f
- clear.b [r13+]
+ clear.b [$r13+]
X
- subq 1,r12
+ subq 1,$r12
X beq 7f
- clear.b [r13+]
+ clear.b [$r13+]
X
- clear.d r12
- clear.b [r13+]
+ clear.d $r12
+ clear.b [$r13+]
X 7:
X jump 8b
X
@@ -451,50 +451,50 @@
X ;; Save the registers we'll clobber in the movem process
X ;; on the stack. Don't mention them to gcc, it will only be
X ;; upset.
- subq 11*4,sp
- movem r10,[sp]
+ subq 11*4,$sp
+ movem $r10,[$sp]
X
- clear.d r0
- clear.d r1
- clear.d r2
- clear.d r3
- clear.d r4
- clear.d r5
- clear.d r6
- clear.d r7
- clear.d r8
- clear.d r9
- clear.d r10
- clear.d r11
+ clear.d $r0
+ clear.d $r1
+ clear.d $r2
+ clear.d $r3
+ clear.d $r4
+ clear.d $r5
+ clear.d $r6
+ clear.d $r7
+ clear.d $r8
+ clear.d $r9
+ clear.d $r10
+ clear.d $r11
X
X ;; Now we've got this:
X ;; r13 - dst
X ;; r12 - n
X
X ;; Update n for the first loop
- subq 12*4,r12
+ subq 12*4,$r12
X 0:
- subq 12*4,r12
+ subq 12*4,$r12
X bge 0b
- movem r11,[r13+]
+ movem $r11,[$r13+]
X 1:
- addq 12*4,r12 ;; compensate for last loop underflowing n
+ addq 12*4,$r12 ;; compensate for last loop underflowing n
X
X ;; Restore registers from stack
- movem [sp+],r10
+ movem [$sp+],$r10
X 2:
X .section .fixup,\"ax\"
X 3:
- move.d [sp],r10
- addq 12*4,r10
- move.d r10,[sp]
- clear.d r10
+ move.d [$sp],$r10
+ addq 12*4,$r10
+ move.d $r10,[$sp]
+ clear.d $r10
X jump 0b
X
X 4:
- movem [sp+],r10
- addq 12*4,r10
- addq 12*4,r12
+ movem [$sp+],$r10
+ addq 12*4,$r10
+ addq 12*4,$r12
X jump 2b
X
X .previous
diff -u --recursive --new-file v2.4.10/linux/arch/cris/mm/extable.c linux/arch/cris/mm/extable.c
--- v2.4.10/linux/arch/cris/mm/extable.c Tue May 1 16:04:56 2001
+++ linux/arch/cris/mm/extable.c Mon Oct 8 11:43:54 2001
@@ -1,13 +1,19 @@
X /*
X * linux/arch/cris/mm/extable.c
+ *
+ * $Log: extable.c,v $
+ * Revision 1.3 2001/09/27 13:52:40 bjornw
+ * Harmonize underscore-ness with other parts
+ *
+ *
X */
X
X #include <linux/config.h>
X #include <linux/module.h>
X #include <asm/uaccess.h>
X
-extern const struct exception_table_entry _start___ex_table[];
-extern const struct exception_table_entry _stop___ex_table[];
+extern const struct exception_table_entry __start___ex_table[];
+extern const struct exception_table_entry __stop___ex_table[];
X
X static inline unsigned long
X search_one_table(const struct exception_table_entry *first,
@@ -37,7 +43,7 @@
X
X #ifndef CONFIG_MODULES
X /* There is only the kernel to search. */
- return search_one_table(_start___ex_table, _stop___ex_table-1, addr);
+ return search_one_table(__start___ex_table, __stop___ex_table-1, addr);
X #else
X /* The kernel is the last "module" -- no need to treat it special. */
X struct module *mp;
diff -u --recursive --new-file v2.4.10/linux/arch/i386/boot/compressed/misc.c linux/arch/i386/boot/compressed/misc.c
--- v2.4.10/linux/arch/i386/boot/compressed/misc.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/boot/compressed/misc.c Thu Oct 4 18:42:54 2001
@@ -123,6 +123,10 @@
X static int vidport;
X static int lines, cols;
X
+#ifdef CONFIG_MULTIQUAD
+static void *xquad_portio = NULL;
+#endif
+
X #include "../../../../lib/inflate.c"
X
X static void *malloc(int size)
diff -u --recursive --new-file v2.4.10/linux/arch/i386/config.in linux/arch/i386/config.in
--- v2.4.10/linux/arch/i386/config.in Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/config.in Thu Oct 4 18:42:54 2001
@@ -170,11 +170,16 @@
X bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR
X bool 'Symmetric multi-processing support' CONFIG_SMP
X if [ "$CONFIG_SMP" != "y" ]; then
- bool 'APIC and IO-APIC support on uniprocessors' CONFIG_X86_UP_IOAPIC
+ bool 'Local APIC support on uniprocessors' CONFIG_X86_UP_APIC
+ dep_bool 'IO-APIC support on uniprocessors' CONFIG_X86_UP_IOAPIC $CONFIG_X86_UP_APIC
+ if [ "$CONFIG_X86_UP_APIC" = "y" ]; then
+ define_bool CONFIG_X86_LOCAL_APIC y
+ fi
X if [ "$CONFIG_X86_UP_IOAPIC" = "y" ]; then
X define_bool CONFIG_X86_IO_APIC y
- define_bool CONFIG_X86_LOCAL_APIC y
X fi
+else
+ bool 'Multiquad NUMA system' CONFIG_MULTIQUAD
X fi
X
X if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
diff -u --recursive --new-file v2.4.10/linux/arch/i386/defconfig linux/arch/i386/defconfig
--- v2.4.10/linux/arch/i386/defconfig Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/defconfig Mon Oct 8 13:29:26 2001
@@ -59,6 +59,7 @@
X # CONFIG_MATH_EMULATION is not set
X # CONFIG_MTRR is not set
X CONFIG_SMP=y
+# CONFIG_MULTIQUAD is not set
X CONFIG_HAVE_DEC_LOCK=y
X
X #
@@ -311,7 +312,6 @@
X # CONFIG_SCSI_INITIO is not set
X # CONFIG_SCSI_INIA100 is not set
X # CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_NCR_D700 is not set
X # CONFIG_SCSI_NCR53C7xx is not set
X # CONFIG_SCSI_NCR53C8XX is not set
X CONFIG_SCSI_SYM53C8XX=y
@@ -604,6 +604,7 @@
X # CONFIG_VFAT_FS is not set
X # CONFIG_EFS_FS is not set
X # CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
X # CONFIG_CRAMFS is not set
X CONFIG_TMPFS=y
X # CONFIG_RAMFS is not set
@@ -737,6 +738,7 @@
X # CONFIG_USB_MDC800 is not set
X # CONFIG_USB_SCANNER is not set
X # CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_HPUSBSCSI is not set
X
X #
X # USB Multimedia devices
@@ -753,6 +755,7 @@
X #
X # CONFIG_USB_PEGASUS is not set
X # CONFIG_USB_CATC is not set
+# CONFIG_USB_CDCETHER is not set
X # CONFIG_USB_KAWETH is not set
X # CONFIG_USB_USBNET is not set
X
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/apic.c linux/arch/i386/kernel/apic.c
--- v2.4.10/linux/arch/i386/kernel/apic.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/apic.c Thu Oct 4 18:42:54 2001
@@ -48,7 +48,7 @@
X return maxlvt;
X }
X
-static void clear_local_APIC(void)
+void clear_local_APIC(void)
X {
X int maxlvt;
X unsigned long v;
@@ -254,6 +254,14 @@
X {
X unsigned long value, ver, maxlvt;
X
+ /* Pound the ESR really hard over the head with a big hammer - mbligh */
+ if (esr_disable) {
+ apic_write(APIC_ESR, 0);
+ apic_write(APIC_ESR, 0);
+ apic_write(APIC_ESR, 0);
+ apic_write(APIC_ESR, 0);
+ }
+
X value = apic_read(APIC_LVR);
X ver = GET_APIC_VERSION(value);
X
@@ -262,8 +270,10 @@
X
X /*
X * Double-check wether this APIC is really registered.
+ * This is meaningless in clustered apic mode, so we skip it.
X */
- if (!test_bit(GET_APIC_ID(apic_read(APIC_ID)), &phys_cpu_present_map))
+ if (!clustered_apic_mode &&
+ !test_bit(GET_APIC_ID(apic_read(APIC_ID)), &phys_cpu_present_map))
X BUG();
X
X /*
@@ -272,19 +282,22 @@
X * document number 292116). So here it goes...
X */
X
- /*
- * Put the APIC into flat delivery mode.
- * Must be "all ones" explicitly for 82489DX.
- */
- apic_write_around(APIC_DFR, 0xffffffff);
+ if (!clustered_apic_mode) {
+ /*
+ * In clustered apic mode, the firmware does this for us
+ * Put the APIC into flat delivery mode.
+ * Must be "all ones" explicitly for 82489DX.
SHAR_EOF
true || echo 'restore of patch-2.4.11-dontuse failed'
fi
echo 'End of part 03'
echo 'File patch-2.4.11-dontuse is continued in part 04'
echo "04" > _shar_seq_.tmp
exit 0
#!/bin/sh -x
# this is part 04 of a 77 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.4.11-dontuse continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 04; then
echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.4.11-dontuse'
else
echo 'x - continuing with patch-2.4.11-dontuse'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.4.11-dontuse' &&
+ */
+ apic_write_around(APIC_DFR, 0xffffffff);
X
- /*
- * Set up the logical destination ID.
- */
- value = apic_read(APIC_LDR);
- value &= ~APIC_LDR_MASK;
- value |= (1<<(smp_processor_id()+24));
- apic_write_around(APIC_LDR, value);
+ /*
+ * Set up the logical destination ID.
+ */
+ value = apic_read(APIC_LDR);
+ value &= ~APIC_LDR_MASK;
+ value |= (1<<(smp_processor_id()+24));
+ apic_write_around(APIC_LDR, value);
+ }
X
X /*
X * Set Task Priority to 'accept all'. We never change this
@@ -367,7 +380,7 @@
X value |= APIC_LVT_LEVEL_TRIGGER;
X apic_write_around(APIC_LVT1, value);
X
- if (APIC_INTEGRATED(ver)) { /* !82489DX */
+ if (APIC_INTEGRATED(ver) && !esr_disable) { /* !82489DX */
X maxlvt = get_maxlvt();
X if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
X apic_write(APIC_ESR, 0);
@@ -383,8 +396,18 @@
X apic_write(APIC_ESR, 0);
X value = apic_read(APIC_ESR);
X printk("ESR value after enabling vector: %08lx\n", value);
- } else
- printk("No ESR for 82489DX.\n");
+ } else {
+ if (esr_disable)
+ /*
+ * Something untraceble is creating bad interrupts on
+ * secondary quads ... for the moment, just leave the
+ * ESR disabled - we can't do anything useful with the
+ * errors anyway - mbligh
+ */
+ printk("Leaving ESR disabled.\n");
+ else
+ printk("No ESR for 82489DX.\n");
+ }
X
X if (nmi_watchdog == NMI_LOCAL_APIC)
X setup_apic_nmi_watchdog();
@@ -598,7 +621,7 @@
X }
X set_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability);
X mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
- boot_cpu_id = 0;
+ boot_cpu_physical_apicid = 0;
X if (nmi_watchdog != NMI_NONE)
X nmi_watchdog = NMI_LOCAL_APIC;
X
@@ -636,8 +659,8 @@
X * Fetch the APIC ID of the BSP in case we have a
X * default configuration (or the MP table is broken).
X */
- if (boot_cpu_id == -1U)
- boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID));
+ if (boot_cpu_physical_apicid == -1U)
+ boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID));
X
X #ifdef CONFIG_X86_IO_APIC
X {
@@ -1077,9 +1100,9 @@
X /*
X * Complain if the BIOS pretends there is one.
X */
- if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_id])) {
+ if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
X printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
- boot_cpu_id);
+ boot_cpu_physical_apicid);
X return -1;
X }
X
@@ -1088,7 +1111,7 @@
X connect_bsp_APIC();
X
X phys_cpu_present_map = 1;
- apic_write_around(APIC_ID, boot_cpu_id);
+ apic_write_around(APIC_ID, boot_cpu_physical_apicid);
X
X apic_pm_init2();
X
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
--- v2.4.10/linux/arch/i386/kernel/apm.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/apm.c Sun Sep 30 12:26:42 2001
@@ -689,7 +689,6 @@
X (void) apm_set_power_state(APM_STATE_OFF);
X }
X
-#ifdef CONFIG_MAGIC_SYSRQ
X /*
X * Magic sysrq key and handler for the power off function
X */
@@ -703,7 +702,6 @@
X help_msg: "Off",
X action_msg: "Power Off\n"
X };
-#endif
X
X
X #ifdef CONFIG_APM_DO_ENABLE
@@ -1672,7 +1670,7 @@
X apm_info.realmode_power_off = 1;
X /* User can override, but default is to trust DMI */
X if (apm_disabled != -1)
- apm_info.disabled = 1;
+ apm_info.disabled = apm_disabled;
X
X /*
X * Fix for the Compaq Contura 3/25c which reports BIOS version 0.1
@@ -1699,8 +1697,7 @@
X }
X
X if (apm_info.disabled) {
- if(apm_disabled == 1)
- printk(KERN_NOTICE "apm: disabled on user request.\n");
+ printk(KERN_NOTICE "apm: disabled on user request.\n");
X return -ENODEV;
X }
X if ((smp_num_cpus > 1) && !power_off) {
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.4.10/linux/arch/i386/kernel/entry.S Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/entry.S Mon Oct 8 10:39:58 2001
@@ -44,7 +44,6 @@
X #include <linux/sys.h>
X #include <linux/linkage.h>
X #include <asm/segment.h>
-#define ASSEMBLY
X #include <asm/smp.h>
X
X EBX = 0x00
@@ -620,6 +619,8 @@
X .long SYMBOL_NAME(sys_getdents64) /* 220 */
X .long SYMBOL_NAME(sys_fcntl64)
X .long SYMBOL_NAME(sys_ni_syscall) /* reserved for TUX */
+ .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */
+ .long SYMBOL_NAME(sys_gettid)
X
X .rept NR_syscalls-(.-sys_call_table)/4
X .long SYMBOL_NAME(sys_ni_syscall)
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- v2.4.10/linux/arch/i386/kernel/io_apic.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/io_apic.c Thu Oct 4 18:42:54 2001
@@ -44,11 +44,6 @@
X */
X int nr_ioapic_registers[MAX_IO_APICS];
X
-#if CONFIG_SMP
-# define TARGET_CPUS cpu_online_map
-#else
-# define TARGET_CPUS 0x01
-#endif
X /*
X * Rough estimation of how many shared IRQs there are, can
X * be changed anytime.
@@ -603,7 +598,7 @@
X memset(&entry,0,sizeof(entry));
X
X entry.delivery_mode = dest_LowestPrio;
- entry.dest_mode = 1; /* logical delivery */
+ entry.dest_mode = INT_DELIVERY_MODE;
X entry.mask = 0; /* enable IRQ */
X entry.dest.logical.logical_dest = TARGET_CPUS;
X
@@ -677,7 +672,7 @@
X * We use logical delivery to get the timer IRQ
X * to the first CPU.
X */
- entry.dest_mode = 1; /* logical delivery */
+ entry.dest_mode = INT_DELIVERY_MODE;
X entry.mask = 0; /* unmask IRQ now */
X entry.dest.logical.logical_dest = TARGET_CPUS;
X entry.delivery_mode = dest_LowestPrio;
@@ -1016,6 +1011,9 @@
X unsigned char old_id;
X unsigned long flags;
X
+ if (clustered_apic_mode)
+ /* We don't have a good way to do this yet - hack */
+ phys_id_present_map = (u_long) 0xf;
X /*
X * Set the IOAPIC ID to the value stored in the MPC table.
X */
@@ -1053,7 +1051,11 @@
X i);
X phys_id_present_map |= 1 << i;
X mp_ioapics[apic].mpc_apicid = i;
+ } else {
+ printk("Setting %d in the phys_id_present_map\n", mp_ioapics[apic].mpc_apicid);
+ phys_id_present_map |= 1 << mp_ioapics[apic].mpc_apicid;
X }
+
X
X /*
X * We need to adjust the IRQ routing table
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/mpparse.c linux/arch/i386/kernel/mpparse.c
--- v2.4.10/linux/arch/i386/kernel/mpparse.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/mpparse.c Thu Oct 4 18:42:54 2001
@@ -54,7 +54,7 @@
X unsigned long mp_lapic_addr;
X
X /* Processor that is doing the boot up */
-unsigned int boot_cpu_id = -1U;
+unsigned int boot_cpu_physical_apicid = -1U;
X /* Internal processor count */
X static unsigned int num_processors;
X
@@ -180,8 +180,9 @@
X
X if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
X Dprintk(" Bootup CPU\n");
- boot_cpu_id = m->mpc_apicid;
+ boot_cpu_physical_apicid = m->mpc_apicid;
X }
+
X num_processors++;
X
X if (m->mpc_apicid > MAX_APICS) {
@@ -191,7 +192,12 @@
X }
X ver = m->mpc_apicver;
X
- phys_cpu_present_map |= 1 << m->mpc_apicid;
+ if (clustered_apic_mode)
+ /* Crude temporary hack. Assumes processors are sequential */
+ phys_cpu_present_map |= 1 << (num_processors-1);
+ else
+ phys_cpu_present_map |= 1 << m->mpc_apicid;
+
X /*
X * Validate version
X */
@@ -376,6 +382,10 @@
X break;
X }
X }
+ }
+ if (clustered_apic_mode && nr_ioapics > 2) {
+ /* don't initialise IO apics on secondary quads */
+ nr_ioapics = 2;
X }
X if (!num_processors)
X printk(KERN_ERR "SMP mptable: no processors registered!\n");
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/pci-pc.c linux/arch/i386/kernel/pci-pc.c
--- v2.4.10/linux/arch/i386/kernel/pci-pc.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/pci-pc.c Tue Oct 9 16:17:38 2001
@@ -261,18 +261,14 @@
X u32 data;
X result = pci_conf2_read(0, dev->bus->number, PCI_SLOT(dev->devfn),
X PCI_FUNC(dev->devfn), where, 2, &data);
- *value = (u8)data;
+ *value = (u16)data;
X return result;
X }
X
X static int pci_conf2_read_config_dword(struct pci_dev *dev, int where, u32 *value)
X {
- int result;
- u32 data;
- result = pci_conf2_read(0, dev->bus->number, PCI_SLOT(dev->devfn),
- PCI_FUNC(dev->devfn), where, 4, &data);
- *value = (u8)data;
- return result;
+ return pci_conf2_read(0, dev->bus->number, PCI_SLOT(dev->devfn),
+ PCI_FUNC(dev->devfn), where, 4, value);
X }
X
X static int pci_conf2_write_config_byte(struct pci_dev *dev, int where, u8 value)
@@ -1154,6 +1150,26 @@
X d->irq = 9;
X }
X
+/*
+ * Nobody seems to know what this does. Damn.
+ *
+ * But it does seem to fix some unspecified problem
+ * with 'movntq' copies on Athlons.
+ *
+ * VIA 8363 chipset:
+ * - bit 7 at offset 0x55: Debug (RW)
+ */
+static void __init pci_fixup_via_athlon_bug(struct pci_dev *d)
+{
+ u8 v;
+ pci_read_config_byte(d, 0x55, &v);
+ if (v & 0x80) {
+ printk("Trying to stomp on Athlon bug...\n");
+ v &= 0x7f; /* clear bit 55.7 */
+ pci_write_config_byte(d, 0x55, v);
+ }
+}
+
X struct pci_fixup pcibios_fixups[] = {
X { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx },
X { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx },
@@ -1173,6 +1189,7 @@
X { PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency },
X { PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency },
X { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci_fixup_piix4_acpi },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_athlon_bug },
X { 0 }
X };
X
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- v2.4.10/linux/arch/i386/kernel/process.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/process.c Thu Oct 4 18:42:54 2001
@@ -376,7 +376,7 @@
X if ((reboot_cpu == -1) ||
X (reboot_cpu > (NR_CPUS -1)) ||
X !(phys_cpu_present_map & (1<<cpuid)))
- reboot_cpu = boot_cpu_id;
+ reboot_cpu = boot_cpu_physical_apicid;
X
X reboot_smp = 0; /* use this as a flag to only go through this once*/
X /* re-run this function on the other CPUs
@@ -442,7 +442,7 @@
X printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
X if (regs->xcs & 3)
X printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
- printk(" EFLAGS: %08lx\n",regs->eflags);
+ printk(" EFLAGS: %08lx %s\n",regs->eflags, print_tainted());
X printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
X regs->eax,regs->ebx,regs->ecx,regs->edx);
X printk("ESI: %08lx EDI: %08lx EBP: %08lx",
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- v2.4.10/linux/arch/i386/kernel/setup.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/setup.c Fri Oct 5 14:45:00 2001
@@ -2422,6 +2422,10 @@
X if (!(cpu_online_map & (1<<n)))
X continue;
X #endif
+ /* Stupid hack */
+ if (p - buffer > (3*PAGE_SIZE)/4)
+ break;
+
X p += sprintf(p,"processor\t: %d\n"
X "vendor_id\t: %s\n"
X "cpu family\t: %d\n"
@@ -2479,7 +2483,7 @@
X return p - buffer;
X }
X
-static unsigned long cpu_initialized __initdata = 0;
+unsigned long cpu_initialized __initdata = 0;
X
X /*
X * cpu_init() initializes state that is per-CPU. Some data is already
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- v2.4.10/linux/arch/i386/kernel/smp.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/smp.c Thu Oct 4 18:42:54 2001
@@ -20,6 +20,7 @@
X
X #include <asm/mtrr.h>
X #include <asm/pgalloc.h>
+#include <asm/smpboot.h>
X
X /*
X * Some notes on x86 processor bugs affecting SMP operation:
@@ -148,28 +149,12 @@
X apic_write_around(APIC_ICR, cfg);
X }
X
-static inline void send_IPI_allbutself(int vector)
-{
- /*
- * if there are no other CPUs in the system then
- * we get an APIC send error if we try to broadcast.
- * thus we have to avoid sending IPIs in this case.
- */
- if (smp_num_cpus > 1)
- __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
-}
-
-static inline void send_IPI_all(int vector)
-{
- __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
-}
-
X void send_IPI_self(int vector)
X {
X __send_IPI_shortcut(APIC_DEST_SELF, vector);
X }
X
-static inline void send_IPI_mask(int mask, int vector)
+static inline void send_IPI_mask_bitmask(int mask, int vector)
X {
X unsigned long cfg;
X unsigned long flags;
@@ -177,27 +162,120 @@
X __save_flags(flags);
X __cli();
X
+
X /*
X * Wait for idle.
X */
X apic_wait_icr_idle();
-
+
X /*
X * prepare target chip field
X */
X cfg = __prepare_ICR2(mask);
X apic_write_around(APIC_ICR2, cfg);
-
+
X /*
X * program the ICR
X */
X cfg = __prepare_ICR(0, vector);
-
+
X /*
X * Send the IPI. The write to APIC_ICR fires this off.
X */
X apic_write_around(APIC_ICR, cfg);
+
X __restore_flags(flags);
+}
+
+static inline void send_IPI_mask_sequence(int mask, int vector)
+{
+ unsigned long cfg, flags;
+ unsigned int query_cpu, query_mask;
+
+ /*
+ * Hack. The clustered APIC addressing mode doesn't allow us to send
+ * to an arbitrary mask, so I do a unicasts to each CPU instead. This
+ * should be modified to do 1 message per cluster ID - mbligh
+ */
+
+ __save_flags(flags);
+ __cli();
+
+ for (query_cpu = 0; query_cpu < NR_CPUS; ++query_cpu) {
+ query_mask = 1 << query_cpu;
+ if (query_mask & mask) {
+
+ /*
+ * Wait for idle.
+ */
+ apic_wait_icr_idle();
+
+ /*
+ * prepare target chip field
+ */
+ cfg = __prepare_ICR2(cpu_to_logical_apicid(query_cpu));
+ apic_write_around(APIC_ICR2, cfg);
+
+ /*
+ * program the ICR
+ */
+ cfg = __prepare_ICR(0, vector);
+
+ /*
+ * Send the IPI. The write to APIC_ICR fires this off.
+ */
+ apic_write_around(APIC_ICR, cfg);
+ }
+ }
+ __restore_flags(flags);
+}
+
+static inline void send_IPI_mask(int mask, int vector)
+{
+ if (clustered_apic_mode)
+ send_IPI_mask_sequence(mask, vector);
+ else
+ send_IPI_mask_bitmask(mask, vector);
+}
+
+static inline void send_IPI_allbutself(int vector)
+{
+ /*
+ * if there are no other CPUs in the system then
+ * we get an APIC send error if we try to broadcast.
+ * thus we have to avoid sending IPIs in this case.
+ */
+ if (!(smp_num_cpus > 1))
+ return;
+
+ if (clustered_apic_mode) {
+ // Pointless. Use send_IPI_mask to do this instead
+ int cpu;
+
+ if (smp_num_cpus > 1) {
+ for (cpu = 0; cpu < smp_num_cpus; ++cpu) {
+ if (cpu != smp_processor_id())
+ send_IPI_mask(1 << cpu, vector);
+ }
+ }
+ } else {
+ __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
+ return;
+ }
+}
+
+static inline void send_IPI_all(int vector)
+{
+ if (clustered_apic_mode) {
+ // Pointless. Use send_IPI_mask to do this instead
+ int cpu;
+
+ for (cpu = 0; cpu < smp_num_cpus; ++cpu) {
+ send_IPI_mask(1 << cpu, vector);
+ }
+ } else {
+ __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
+ }
X }
X
X /*
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c
--- v2.4.10/linux/arch/i386/kernel/smpboot.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/smpboot.c Thu Oct 4 18:42:54 2001
@@ -29,6 +29,7 @@
X * Ingo Molnar : various cleanups and rewrites
X * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug.
X * Maciej W. Rozycki : Bits for genuine 82489DX APICs
+ * Martin J. Bligh : Added support for multi-quad systems
X */
X
X #include <linux/config.h>
@@ -44,6 +45,7 @@
X #include <linux/mc146818rtc.h>
X #include <asm/mtrr.h>
X #include <asm/pgalloc.h>
+#include <asm/smpboot.h>
X
X /* Set if we find a B stepping CPU */
X static int smp_b_stepping;
@@ -57,11 +59,6 @@
X /* Bitmask of currently online CPUs */
X unsigned long cpu_online_map;
X
-/* which CPU (physical APIC ID) maps to which logical CPU number */
-volatile int x86_apicid_to_cpu[NR_CPUS];
-/* which logical CPU number maps to which CPU (physical APIC ID) */
-volatile int x86_cpu_to_apicid[NR_CPUS];
-
X static volatile unsigned long cpu_callin_map;
X static volatile unsigned long cpu_callout_map;
X
@@ -357,7 +354,8 @@
X * our local APIC. We have to wait for the IPI or we'll
X * lock up on an APIC access.
X */
- while (!atomic_read(&init_deasserted));
+ if (!clustered_apic_mode)
+ while (!atomic_read(&init_deasserted));
X
X /*
X * (This works even if the APIC is not enabled.)
@@ -406,9 +404,15 @@
X */
X
X Dprintk("CALLIN, before setup_local_APIC().\n");
+ /*
+ * Because we use NMIs rather than the INIT-STARTUP sequence to
+ * bootstrap the CPUs, the APIC may be in a wierd state. Kick it.
+ */
+ if (clustered_apic_mode)
+ clear_local_APIC();
X setup_local_APIC();
X
- sti();
+ __sti();
X
X #ifdef CONFIG_MTRR
X /*
@@ -501,6 +505,61 @@
X return do_fork(CLONE_VM|CLONE_PID, 0, ®s, 0);
X }
X
+/* which physical APIC ID maps to which logical CPU number */
+volatile int physical_apicid_2_cpu[MAX_APICID];
+/* which logical CPU number maps to which physical APIC ID */
+volatile int cpu_2_physical_apicid[NR_CPUS];
+
+/* which logical APIC ID maps to which logical CPU number */
+volatile int logical_apicid_2_cpu[MAX_APICID];
+/* which logical CPU number maps to which logical APIC ID */
+volatile int cpu_2_logical_apicid[NR_CPUS];
+
+static inline void init_cpu_to_apicid(void)
+/* Initialize all maps between cpu number and apicids */
+{
+ int apicid, cpu;
+
+ for (apicid = 0; apicid < MAX_APICID; apicid++) {
+ physical_apicid_2_cpu[apicid] = -1;
+ logical_apicid_2_cpu[apicid] = -1;
+ }
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ cpu_2_physical_apicid[cpu] = -1;
+ cpu_2_logical_apicid[cpu] = -1;
+ }
+}
+
+static inline void map_cpu_to_boot_apicid(int cpu, int apicid)
+/*
+ * set up a mapping between cpu and apicid. Uses logical apicids for multiquad,
+ * else physical apic ids
+ */
+{
+ if (clustered_apic_mode) {
+ logical_apicid_2_cpu[apicid] = cpu;
+ cpu_2_logical_apicid[cpu] = apicid;
+ } else {
+ physical_apicid_2_cpu[apicid] = cpu;
+ cpu_2_physical_apicid[cpu] = apicid;
+ }
+}
+
+static inline void unmap_cpu_to_boot_apicid(int cpu, int apicid)
+/*
+ * undo a mapping between cpu and apicid. Uses logical apicids for multiquad,
+ * else physical apic ids
+ */
+{
+ if (clustered_apic_mode) {
+ logical_apicid_2_cpu[apicid] = -1;
+ cpu_2_logical_apicid[cpu] = -1;
+ } else {
+ physical_apicid_2_cpu[apicid] = -1;
+ cpu_2_physical_apicid[cpu] = -1;
+ }
+}
+
X #if APIC_DEBUG
X static inline void inquire_remote_apic(int apicid)
X {
@@ -539,89 +598,65 @@
X }
X #endif
X
-static void __init do_boot_cpu (int apicid)
+static int wakeup_secondary_via_NMI(int logical_apicid)
+/*
+ * Poke the other CPU in the eye to wake it up. Remember that the normal
+ * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
+ * won't ... remember to clear down the APIC, etc later.
+ */
X {
- struct task_struct *idle;
- unsigned long send_status, accept_status, boot_status, maxlvt;
- int timeout, num_starts, j, cpu;
- unsigned long start_eip;
-
- cpu = ++cpucount;
- /*
- * We can't use kernel_thread since we must avoid to
- * reschedule the child.
- */
- if (fork_by_hand() < 0)
- panic("failed fork for CPU %d", cpu);
-
- /*
- * We remove it from the pidhash and the runqueue
- * once we got the process:
- */
- idle = init_task.prev_task;
- if (!idle)
- panic("No idle process for CPU %d", cpu);
-
- idle->processor = cpu;
- x86_cpu_to_apicid[cpu] = apicid;
- x86_apicid_to_cpu[apicid] = cpu;
- idle->has_cpu = 1; /* we schedule the first task manually */
- idle->thread.eip = (unsigned long) start_secondary;
+ unsigned long send_status = 0, accept_status = 0;
+ int timeout, maxlvt;
X
- del_from_runqueue(idle);
- unhash_process(idle);
- init_tasks[cpu] = idle;
+ /* Target chip */
+ apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(logical_apicid));
X
- /* start_eip had better be page-aligned! */
- start_eip = setup_trampoline();
+ /* Boot on the stack */
+ /* Kick the second */
+ apic_write_around(APIC_ICR, APIC_DM_NMI | APIC_DEST_LOGICAL);
X
- /* So we see what's up */
- printk("Booting processor %d/%d eip %lx\n", cpu, apicid, start_eip);
- stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle);
+ Dprintk("Waiting for send to finish...\n");
+ timeout = 0;
+ do {
+ Dprintk("+");
+ udelay(100);
+ send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
+ } while (send_status && (timeout++ < 1000));
X
X /*
- * This grunge runs the startup process for
- * the targeted processor.
+ * Give the other CPU some time to accept the IPI.
X */
-
- atomic_set(&init_deasserted, 0);
-
- Dprintk("Setting warm reset code and vector.\n");
-
- CMOS_WRITE(0xa, 0xf);
- local_flush_tlb();
- Dprintk("1.\n");
- *((volatile unsigned short *) phys_to_virt(0x469)) = start_eip >> 4;
- Dprintk("2.\n");
- *((volatile unsigned short *) phys_to_virt(0x467)) = start_eip & 0xf;
- Dprintk("3.\n");
-
+ udelay(200);
X /*
- * Be paranoid about clearing APIC errors.
+ * Due to the Pentium erratum 3AP.
X */
- if (APIC_INTEGRATED(apic_version[apicid])) {
+ maxlvt = get_maxlvt();
+ if (maxlvt > 3) {
X apic_read_around(APIC_SPIV);
X apic_write(APIC_ESR, 0);
- apic_read(APIC_ESR);
X }
+ accept_status = (apic_read(APIC_ESR) & 0xEF);
+ Dprintk("NMI sent.\n");
X
- /*
- * Status is now clean
- */
- send_status = 0;
- accept_status = 0;
- boot_status = 0;
+ if (send_status)
+ printk("APIC never delivered???\n");
+ if (accept_status)
+ printk("APIC delivery error (%lx).\n", accept_status);
X
- /*
- * Starting actual IPI sequence...
- */
+ return (send_status | accept_status);
+}
+
+static int wakeup_secondary_via_INIT(int phys_apicid, unsigned long start_eip)
+{
+ unsigned long send_status = 0, accept_status = 0;
+ int maxlvt, timeout, num_starts, j;
X
X Dprintk("Asserting INIT.\n");
X
X /*
X * Turn INIT on target chip
X */
- apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
+ apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
X
X /*
X * Send IPI
@@ -642,7 +677,7 @@
X Dprintk("Deasserting INIT.\n");
X
X /* Target chip */
- apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
+ apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
X
X /* Send IPI */
X apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_DM_INIT);
@@ -661,10 +696,9 @@
X * Should we send STARTUP IPIs ?
X *
X * Determine this based on the APIC version.
- * If we don't have an integrated APIC, don't
- * send the STARTUP IPIs.
+ * If we don't have an integrated APIC, don't send the STARTUP IPIs.
X */
- if (APIC_INTEGRATED(apic_version[apicid]))
+ if (APIC_INTEGRATED(apic_version[phys_apicid]))
X num_starts = 2;
X else
X num_starts = 0;
@@ -688,7 +722,7 @@
X */
X
X /* Target chip */
- apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
+ apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
X
X /* Boot on the stack */
X /* Kick the second */
@@ -732,7 +766,104 @@
X if (accept_status)
X printk("APIC delivery error (%lx).\n", accept_status);
X
- if (!send_status && !accept_status) {
+ return (send_status | accept_status);
+}
+
+extern unsigned long cpu_initialized;
+
+static void __init do_boot_cpu (int apicid)
+/*
+ * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
+ * (ie clustered apic addressing mode), this is a LOGICAL apic ID.
+ */
+{
+ struct task_struct *idle;
+ unsigned long boot_error = 0;
+ int timeout, cpu;
+ unsigned long start_eip;
+ unsigned short nmi_high, nmi_low;
+
+ cpu = ++cpucount;
+ /*
+ * We can't use kernel_thread since we must avoid to
+ * reschedule the child.
+ */
+ if (fork_by_hand() < 0)
+ panic("failed fork for CPU %d", cpu);
+
+ /*
+ * We remove it from the pidhash and the runqueue
+ * once we got the process:
+ */
+ idle = init_task.prev_task;
+ if (!idle)
+ panic("No idle process for CPU %d", cpu);
+
+ idle->processor = cpu;
+
+ map_cpu_to_boot_apicid(cpu, apicid);
+
+ idle->has_cpu = 1; /* we schedule the first task manually */
+ idle->thread.eip = (unsigned long) start_secondary;
+
+ del_from_runqueue(idle);
+ unhash_process(idle);
+ init_tasks[cpu] = idle;
+
+ /* start_eip had better be page-aligned! */
+ start_eip = setup_trampoline();
+
+ /* So we see what's up */
+ printk("Booting processor %d/%d eip %lx\n", cpu, apicid, start_eip);
+ stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle);
+
+ /*
+ * This grunge runs the startup process for
+ * the targeted processor.
+ */
+
+ atomic_set(&init_deasserted, 0);
+
+ Dprintk("Setting warm reset code and vector.\n");
+
+ if (clustered_apic_mode) {
+ /* stash the current NMI vector, so we can put things back */
+ nmi_high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
+ nmi_low = *((volatile unsigned short *) TRAMPOLINE_LOW);
+ }
+
+ CMOS_WRITE(0xa, 0xf);
+ local_flush_tlb();
+ Dprintk("1.\n");
+ *((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
+ Dprintk("2.\n");
+ *((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
+ Dprintk("3.\n");
+
+ /*
+ * Be paranoid about clearing APIC errors.
+ */
+ if (!clustered_apic_mode && APIC_INTEGRATED(apic_version[apicid])) {
+ apic_read_around(APIC_SPIV);
+ apic_write(APIC_ESR, 0);
+ apic_read(APIC_ESR);
+ }
+
+ /*
+ * Status is now clean
+ */
+ boot_error = 0;
+
+ /*
+ * Starting actual IPI sequence...
+ */
+
+ if (clustered_apic_mode)
+ boot_error = wakeup_secondary_via_NMI(apicid);
+ else
+ boot_error = wakeup_secondary_via_INIT(apicid, start_eip);
+
+ if (!boot_error) {
X /*
X * allow APs to start initializing.
X */
@@ -756,7 +887,7 @@
X print_cpu_info(&cpu_data[cpu]);
X Dprintk("CPU has booted.\n");
X } else {
- boot_status = 1;
+ boot_error= 1;
X if (*((volatile unsigned char *)phys_to_virt(8192))
X == 0xA5)
X /* trampoline started but...? */
@@ -765,18 +896,28 @@
X /* trampoline code not run */
X printk("Not responding.\n");
X #if APIC_DEBUG
- inquire_remote_apic(apicid);
+ if (!clustered_apic_mode)
+ inquire_remote_apic(apicid);
X #endif
X }
X }
- if (send_status || accept_status || boot_status) {
- x86_cpu_to_apicid[cpu] = -1;
- x86_apicid_to_cpu[apicid] = -1;
+ if (boot_error) {
+ /* Try to put things back the way they were before ... */
+ unmap_cpu_to_boot_apicid(cpu, apicid);
+ clear_bit(cpu, &cpu_callout_map); /* was set here (do_boot_cpu()) */
+ clear_bit(cpu, &cpu_initialized); /* was set by cpu_init() */
+ clear_bit(cpu, &cpu_online_map); /* was set in smp_callin() */
X cpucount--;
X }
X
X /* mark "stuck" area as not stuck */
X *((volatile unsigned long *)phys_to_virt(8192)) = 0;
+
+ if(clustered_apic_mode) {
+ printk("Restoring NMI vector\n");
+ *((volatile unsigned short *) TRAMPOLINE_HIGH) = nmi_high;
+ *((volatile unsigned short *) TRAMPOLINE_LOW) = nmi_low;
+ }
X }
X
X cycles_t cacheflush_time;
@@ -826,9 +967,20 @@
X extern int prof_old_multiplier[NR_CPUS];
X extern int prof_counter[NR_CPUS];
X
+static int boot_cpu_logical_apicid;
+/* Where the IO area was mapped on multiquad, always 0 otherwise */
+void *xquad_portio = NULL;
+
X void __init smp_boot_cpus(void)
X {
- int apicid, cpu;
+ int apicid, cpu, bit;
+
+ if (clustered_apic_mode) {
+ /* remap the 1st quad's 256k range for cross-quad I/O */
+ xquad_portio = ioremap (XQUAD_PORTIO_BASE, XQUAD_PORTIO_LEN);
+ printk("Cross quad port I/O vaddr 0x%08lx, len %08lx\n",
+ (u_long) xquad_portio, (u_long) XQUAD_PORTIO_LEN);
+ }
X
X #ifdef CONFIG_MTRR
X /* Must be done before other processors booted */
@@ -839,13 +991,14 @@
X * and the per-CPU profiling counter/multiplier
X */
X
- for (apicid = 0; apicid < NR_CPUS; apicid++) {
- x86_apicid_to_cpu[apicid] = -1;
- prof_counter[apicid] = 1;
- prof_old_multiplier[apicid] = 1;
- prof_multiplier[apicid] = 1;
+ for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ prof_counter[cpu] = 1;
+ prof_old_multiplier[cpu] = 1;
+ prof_multiplier[cpu] = 1;
X }
X
+ init_cpu_to_apicid();
+
X /*
X * Setup boot CPU information
X */
@@ -857,8 +1010,9 @@
X * We have the boot CPU online for sure.
X */
X set_bit(0, &cpu_online_map);
- x86_apicid_to_cpu[boot_cpu_id] = 0;
- x86_cpu_to_apicid[0] = boot_cpu_id;
+ boot_cpu_logical_apicid = logical_smp_processor_id();
+ map_cpu_to_boot_apicid(0, boot_cpu_apicid);
+
X global_irq_holder = 0;
X current->processor = 0;
X init_idle();
@@ -884,20 +1038,22 @@
X /*
X * Should not be necessary because the MP table should list the boot
X * CPU too, but we do it for the sake of robustness anyway.
+ * Makes no sense to do this check in clustered apic mode, so skip it
X */
- if (!test_bit(boot_cpu_id, &phys_cpu_present_map)) {
+ if (!clustered_apic_mode &&
+ !test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map)) {
X printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
- boot_cpu_id);
+ boot_cpu_physical_apicid);
X phys_cpu_present_map |= (1 << hard_smp_processor_id());
X }
X
X /*
X * If we couldn't find a local APIC, then get out of here now!
X */
- if (APIC_INTEGRATED(apic_version[boot_cpu_id]) &&
+ if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid]) &&
X !test_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability)) {
X printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
- boot_cpu_id);
+ boot_cpu_physical_apicid);
X printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
X #ifndef CONFIG_VISWS
X io_apic_irqs = 0;
@@ -926,22 +1082,27 @@
X connect_bsp_APIC();
X setup_local_APIC();
X
- if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_id)
+ if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_physical_apicid)
X BUG();
X
X /*
- * Now scan the CPU present map and fire up the other CPUs.
+ * Scan the CPU present map and fire up the other CPUs via do_boot_cpu
+ *
+ * In clustered apic mode, phys_cpu_present_map is a constructed thus:
+ * bits 0-3 are quad0, 4-7 are quad1, etc. A perverse twist on the
+ * clustered apic ID.
X */
X Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
X
- for (apicid = 0; apicid < NR_CPUS; apicid++) {
+ for (bit = 0; bit < NR_CPUS; bit++) {
+ apicid = cpu_present_to_apicid(bit);
X /*
X * Don't even attempt to start the boot CPU!
X */
- if (apicid == boot_cpu_id)
+ if (apicid == boot_cpu_apicid)
X continue;
X
- if (!(phys_cpu_present_map & (1 << apicid)))
+ if (!(phys_cpu_present_map & (1 << bit)))
X continue;
X if ((max_cpus >= 0) && (max_cpus <= cpucount+1))
X continue;
@@ -951,9 +1112,10 @@
X /*
X * Make sure we unmap all failed CPUs
X */
- if ((x86_apicid_to_cpu[apicid] == -1) &&
- (phys_cpu_present_map & (1 << apicid)))
- printk("phys CPU #%d not responding - cannot use it.\n",apicid);
+ if ((boot_apicid_to_cpu(apicid) == -1) &&
+ (phys_cpu_present_map & (1 << bit)))
+ printk("CPU #%d not responding - cannot use it.\n",
+ apicid);
X }
X
X /*
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/trampoline.S linux/arch/i386/kernel/trampoline.S
--- v2.4.10/linux/arch/i386/kernel/trampoline.S Mon Feb 7 19:59:39 2000
+++ linux/arch/i386/kernel/trampoline.S Thu Oct 4 18:42:54 2001
@@ -36,7 +36,9 @@
X
X ENTRY(trampoline_data)
X r_base = .
-
+#ifdef CONFIG_MULTIQUAD
+ wbinvd
+#endif /* CONFIG_MULTIQUAD */
X mov %cs, %ax # Code and data in the same place
X mov %ax, %ds
X
diff -u --recursive --new-file v2.4.10/linux/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
--- v2.4.10/linux/arch/i386/kernel/traps.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/kernel/traps.c Sun Sep 30 12:26:08 2001
@@ -200,8 +200,8 @@
X esp = regs->esp;
X ss = regs->xss & 0xffff;
X }
- printk("CPU: %d\nEIP: %04x:[<%08lx>]\nEFLAGS: %08lx\n",
- smp_processor_id(), 0xffff & regs->xcs, regs->eip, regs->eflags);
+ printk("CPU: %d\nEIP: %04x:[<%08lx>] %s\nEFLAGS: %08lx\n",
+ smp_processor_id(), 0xffff & regs->xcs, regs->eip, print_tainted(), regs->eflags);
X printk("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
X regs->eax, regs->ebx, regs->ecx, regs->edx);
X printk("esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n",
diff -u --recursive --new-file v2.4.10/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
--- v2.4.10/linux/arch/i386/mm/fault.c Sun Sep 23 11:40:55 2001
+++ linux/arch/i386/mm/fault.c Tue Oct 9 15:13:03 2001
@@ -17,6 +17,7 @@
X #include <linux/smp_lock.h>
X #include <linux/interrupt.h>
X #include <linux/init.h>
+#include <linux/tty.h>
X #include <linux/vt_kern.h> /* For unblank_screen() */
X
X #include <asm/system.h>
diff -u --recursive --new-file v2.4.10/linux/arch/ia64/kernel/process.c linux/arch/ia64/kernel/process.c
--- v2.4.10/linux/arch/ia64/kernel/process.c Sun Aug 12 13:27:58 2001
+++ linux/arch/ia64/kernel/process.c Sun Sep 30 12:26:08 2001
@@ -63,8 +63,8 @@
X {
X unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
X
- printk("\npsr : %016lx ifs : %016lx ip : [<%016lx>]\n",
- regs->cr_ipsr, regs->cr_ifs, ip);
+ printk("\npsr : %016lx ifs : %016lx ip : [<%016lx>] %s\n",
+ regs->cr_ipsr, regs->cr_ifs, ip, print_tainted());
X printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
X regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
X printk("rnat: %016lx bsps: %016lx pr : %016lx\n",
diff -u --recursive --new-file v2.4.10/linux/arch/m68k/kernel/process.c linux/arch/m68k/kernel/process.c
--- v2.4.10/linux/arch/m68k/kernel/process.c Sun Sep 23 11:40:55 2001
+++ linux/arch/m68k/kernel/process.c Sun Sep 30 12:26:08 2001
@@ -109,8 +109,8 @@
X void show_regs(struct pt_regs * regs)
X {
X printk("\n");
- printk("Format %02x Vector: %04x PC: %08lx Status: %04x\n",
- regs->format, regs->vector, regs->pc, regs->sr);
+ printk("Format %02x Vector: %04x PC: %08lx Status: %04x %s\n",
+ regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
X printk("ORIG_D0: %08lx D0: %08lx A2: %08lx A1: %08lx\n",
X regs->orig_d0, regs->d0, regs->a2, regs->a1);
X printk("A0: %08lx D5: %08lx D4: %08lx\n",
diff -u --recursive --new-file v2.4.10/linux/arch/mips/au1000/common/serial.c linux/arch/mips/au1000/common/serial.c
--- v2.4.10/linux/arch/mips/au1000/common/serial.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips/au1000/common/serial.c Fri Oct 5 12:06:51 2001
@@ -68,9 +68,6 @@
X * End of serial driver configuration section.
X */
X
-#ifdef MODVERSIONS
-#include <linux/modversions.h>
-#endif
X #include <linux/module.h>
X
X #include <linux/types.h>
diff -u --recursive --new-file v2.4.10/linux/arch/mips/dec/wbflush.c linux/arch/mips/dec/wbflush.c
--- v2.4.10/linux/arch/mips/dec/wbflush.c Thu Feb 24 22:52:30 2000
+++ linux/arch/mips/dec/wbflush.c Fri Oct 5 12:06:51 2001
@@ -103,8 +103,6 @@
X {
X }
X
-#ifdef EXPORT_SYMTAB
X #include <linux/module.h>
X
X EXPORT_SYMBOL(__wbflush);
-#endif
diff -u --recursive --new-file v2.4.10/linux/arch/mips/mm/mips32.c linux/arch/mips/mm/mips32.c
--- v2.4.10/linux/arch/mips/mm/mips32.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips/mm/mips32.c Sun Sep 30 12:26:08 2001
@@ -739,8 +739,8 @@
X regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]);
X
X /* Saved cp0 registers. */
- printk("epc : %08lx\nStatus: %08lx\nCause : %08lx\n",
- regs->cp0_epc, regs->cp0_status, regs->cp0_cause);
+ printk("epc : %08lx %s\nStatus: %08lx\nCause : %08lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_status, regs->cp0_cause);
X }
X
X void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
diff -u --recursive --new-file v2.4.10/linux/arch/mips/mm/r2300.c linux/arch/mips/mm/r2300.c
--- v2.4.10/linux/arch/mips/mm/r2300.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips/mm/r2300.c Sun Sep 30 12:26:08 2001
@@ -665,8 +665,10 @@
X /*
X * Saved cp0 registers
X */
- printk("epc : %08lx\nStatus: %08x\nCause : %08x\n",
- (unsigned long) regs->cp0_epc, (unsigned int) regs->cp0_status,
+ printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n",
+ (unsigned long) regs->cp0_epc,
+ print_tainted(),
+ (unsigned int) regs->cp0_status,
X (unsigned int) regs->cp0_cause);
X }
X
diff -u --recursive --new-file v2.4.10/linux/arch/mips/mm/r4xx0.c linux/arch/mips/mm/r4xx0.c
--- v2.4.10/linux/arch/mips/mm/r4xx0.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips/mm/r4xx0.c Sun Sep 30 12:26:08 2001
@@ -2364,8 +2364,8 @@
X regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]);
X
X /* Saved cp0 registers. */
- printk("epc : %08lx\nStatus: %08lx\nCause : %08lx\n",
- regs->cp0_epc, regs->cp0_status, regs->cp0_cause);
+ printk("epc : %08lx %s\nStatus: %08lx\nCause : %08lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_status, regs->cp0_cause);
X }
X
X void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
diff -u --recursive --new-file v2.4.10/linux/arch/mips/mm/r5432.c linux/arch/mips/mm/r5432.c
--- v2.4.10/linux/arch/mips/mm/r5432.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips/mm/r5432.c Sun Sep 30 12:26:08 2001
@@ -765,8 +765,8 @@
X regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]);
X
X /* Saved cp0 registers. */
- printk("epc : %08lx\nStatus: %08lx\nCause : %08lx\n",
- regs->cp0_epc, regs->cp0_status, regs->cp0_cause);
+ printk("epc : %08lx %s\nStatus: %08lx\nCause : %08lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_status, regs->cp0_cause);
X }
X
X void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
diff -u --recursive --new-file v2.4.10/linux/arch/mips/mm/rm7k.c linux/arch/mips/mm/rm7k.c
--- v2.4.10/linux/arch/mips/mm/rm7k.c Wed Jul 25 17:10:18 2001
+++ linux/arch/mips/mm/rm7k.c Sun Sep 30 12:26:08 2001
@@ -507,8 +507,8 @@
X regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]);
X
X /* Saved cp0 registers. */
- printk(KERN_INFO "epc : %08lx\nStatus: %08lx\nCause : %08lx\n",
- regs->cp0_epc, regs->cp0_status, regs->cp0_cause);
+ printk(KERN_INFO "epc : %08lx %s\nStatus: %08lx\nCause : %08lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_status, regs->cp0_cause);
X }
X
X void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
diff -u --recursive --new-file v2.4.10/linux/arch/mips64/mm/andes.c linux/arch/mips64/mm/andes.c
--- v2.4.10/linux/arch/mips64/mm/andes.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips64/mm/andes.c Sun Sep 30 12:26:08 2001
@@ -326,8 +326,8 @@
X printk("Lo : %016lx\n", regs->lo);
X
X /* Saved cp0 registers. */
- printk("epc : %016lx\nbadvaddr: %016lx\n",
- regs->cp0_epc, regs->cp0_badvaddr);
+ printk("epc : %016lx %s\nbadvaddr: %016lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_badvaddr);
X printk("Status : %08x\nCause : %08x\n",
X (unsigned int) regs->cp0_status, (unsigned int) regs->cp0_cause);
X }
diff -u --recursive --new-file v2.4.10/linux/arch/mips64/mm/r4xx0.c linux/arch/mips64/mm/r4xx0.c
--- v2.4.10/linux/arch/mips64/mm/r4xx0.c Sun Sep 23 11:40:55 2001
+++ linux/arch/mips64/mm/r4xx0.c Sun Sep 30 12:26:08 2001
@@ -2109,8 +2109,8 @@
X printk("Lo : %016lx\n", regs->lo);
X
X /* Saved cp0 registers. */
- printk("epc : %016lx\nbadvaddr: %016lx\n",
- regs->cp0_epc, regs->cp0_badvaddr);
+ printk("epc : %016lx %s\nbadvaddr: %016lx\n",
+ regs->cp0_epc, print_tainted(), regs->cp0_badvaddr);
X printk("Status : %08x\nCause : %08x\n",
X (unsigned int) regs->cp0_status, (unsigned int) regs->cp0_cause);
X }
diff -u --recursive --new-file v2.4.10/linux/arch/parisc/hpux/entry_hpux.S linux/arch/parisc/hpux/entry_hpux.S
--- v2.4.10/linux/arch/parisc/hpux/entry_hpux.S Tue Dec 5 12:29:39 2000
+++ linux/arch/parisc/hpux/entry_hpux.S Fri Oct 5 12:22:07 2001
@@ -6,8 +6,6 @@
X */
X
X
-#define ASSEMBLY
-
X #include <linux/sys.h>
X #include <linux/linkage.h>
X #include <asm/unistd.h>
diff -u --recursive --new-file v2.4.10/linux/arch/parisc/kernel/traps.c linux/arch/parisc/kernel/traps.c
--- v2.4.10/linux/arch/parisc/kernel/traps.c Wed Dec 6 11:46:39 2000
+++ linux/arch/parisc/kernel/traps.c Sun Sep 30 12:26:08 2001
@@ -82,7 +82,7 @@
X
X printk(" YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\nPSW: ");
X printbinary(regs->gr[0], 32);
- printk("\n");
+ printk(" %s\n", print_tainted());
X
X for (i = 0; i < 32; i += 4) {
X int j;
diff -u --recursive --new-file v2.4.10/linux/arch/parisc/mm/pa11.c linux/arch/parisc/mm/pa11.c
--- v2.4.10/linux/arch/parisc/mm/pa11.c Tue Dec 5 12:29:39 2000
+++ linux/arch/parisc/mm/pa11.c Sun Sep 30 12:26:08 2001
@@ -127,8 +127,9 @@
X /*
X * Saved cp0 registers
X */
- printk("epc : %08lx\nStatus: %08x\nCause : %08x\n",
- (unsigned long) regs->cp0_epc, (unsigned int) regs->cp0_status,
+ printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n",
+ (unsigned long) regs->cp0_epc, print_tainted(),
+ (unsigned int) regs->cp0_status,
X (unsigned int) regs->cp0_cause);
X }
X
diff -u --recursive --new-file v2.4.10/linux/arch/parisc/mm/pa20.c linux/arch/parisc/mm/pa20.c
--- v2.4.10/linux/arch/parisc/mm/pa20.c Tue Dec 5 12:29:39 2000
+++ linux/arch/parisc/mm/pa20.c Sun Sep 30 12:26:08 2001
@@ -127,8 +127,9 @@
X /*
X * Saved cp0 registers
X */
- printk("epc : %08lx\nStatus: %08x\nCause : %08x\n",
- (unsigned long) regs->cp0_epc, (unsigned int) regs->cp0_status,
+ printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n",
+ (unsigned long) regs->cp0_epc, print_tainted(),
+ (unsigned int) regs->cp0_status,
X (unsigned int) regs->cp0_cause);
X }
X
diff -u --recursive --new-file v2.4.10/linux/arch/ppc/8260_io/enet.c linux/arch/ppc/8260_io/enet.c
--- v2.4.10/linux/arch/ppc/8260_io/enet.c Mon May 21 17:04:46 2001
+++ linux/arch/ppc/8260_io/enet.c Mon Oct 8 11:40:13 2001
@@ -1,5 +1,5 @@
X /*
- * BK Id: SCCS/s.enet.c 1.6 05/17/01 18:14:19 cort
+ * BK Id: SCCS/s.enet.c 1.9 09/14/01 18:01:16 trini
X */
X /*
X * Ethernet driver for Motorola MPC8260.
@@ -13,7 +13,7 @@
X * This version of the driver is somewhat selectable for the different
X * processor/board combinations. It works for the boards I know about
X * now, and should be easily modified to include others. Some of the
- * configuration information is contained in "commproc.h" and the
+ * configuration information is contained in <asm/commproc.h> and the
X * remainder is here.
X *
X * Buffer descriptors are kept in the CPM dual port RAM, and the frame
diff -u --recursive --new-file v2.4.10/linux/arch/ppc/8xx_io/commproc.c linux/arch/ppc/8xx_io/commproc.c
--- v2.4.10/linux/arch/ppc/8xx_io/commproc.c Tue Jul 3 17:08:18 2001
+++ linux/arch/ppc/8xx_io/commproc.c Mon Oct 8 11:40:13 2001
@@ -1,5 +1,5 @@
X /*
- * BK Id: SCCS/s.commproc.c 1.11 06/15/01 13:00:20 paulus
+ * BK Id: SCCS/s.commproc.c 1.13 09/14/01 18:01:16 trini
X */
X
X /*
@@ -36,7 +36,7 @@
X #include <asm/page.h>
X #include <asm/pgtable.h>
X #include <asm/8xx_immap.h>
-#include "commproc.h"
+#include <asm/commproc.h>
X
X static uint dp_alloc_base; /* Starting offset in DP ram */
X static uint dp_alloc_top; /* Max offset + 1 */
diff -u --recursive --new-file v2.4.10/linux/arch/ppc/8xx_io/commproc.h linux/arch/ppc/8xx_io/commproc.h
--- v2.4.10/linux/arch/ppc/8xx_io/commproc.h Tue Jul 3 17:08:18 2001
+++ linux/arch/ppc/8xx_io/commproc.h Wed Dec 31 16:00:00 1969
@@ -1,796 +0,0 @@
-/*
- * BK Id: SCCS/s.commproc.h 1.13 06/15/01 13:00:20 paulus
- */
-
-/*
- * MPC8xx Communication Processor Module.
- * Copyright (c) 1997 Dan Malek (dma...@jlc.net)
- *
- * This file contains structures and information for the communication
- * processor channels. Some CPM control and status is available
- * throught the MPC8xx internal memory map. See immap.h for details.
- * This file only contains what I need for the moment, not the total
- * CPM capabilities. I (or someone else) will add definitions as they
- * are needed. -- Dan
- *
- * On the MBX board, EPPC-Bug loads CPM microcode into the first 512
- * bytes of the DP RAM and relocates the I2C parameter area to the
- * IDMA1 space. The remaining DP RAM is available for buffer descriptors
- * or other use.
- */
-#ifndef __CPM_8XX__
-#define __CPM_8XX__
-
-#include <linux/config.h>
-#include <asm/8xx_immap.h>
-
-/* CPM Command register.
-*/
-#define CPM_CR_RST ((ushort)0x8000)
-#define CPM_CR_OPCODE ((ushort)0x0f00)
-#define CPM_CR_CHAN ((ushort)0x00f0)
-#define CPM_CR_FLG ((ushort)0x0001)
-
-/* Some commands (there are more...later)
-*/
-#define CPM_CR_INIT_TRX ((ushort)0x0000)
-#define CPM_CR_INIT_RX ((ushort)0x0001)
-#define CPM_CR_INIT_TX ((ushort)0x0002)
-#define CPM_CR_HUNT_MODE ((ushort)0x0003)
-#define CPM_CR_STOP_TX ((ushort)0x0004)
-#define CPM_CR_RESTART_TX ((ushort)0x0006)
-#define CPM_CR_SET_GADDR ((ushort)0x0008)
-
-/* Channel numbers.
-*/
-#define CPM_CR_CH_SCC1 ((ushort)0x0000)
-#define CPM_CR_CH_I2C ((ushort)0x0001) /* I2C and IDMA1 */
-#define CPM_CR_CH_SCC2 ((ushort)0x0004)
-#define CPM_CR_CH_SPI ((ushort)0x0005) /* SPI / IDMA2 / Timers */
-#define CPM_CR_CH_SCC3 ((ushort)0x0008)
-#define CPM_CR_CH_SMC1 ((ushort)0x0009) /* SMC1 / DSP1 */
-#define CPM_CR_CH_SCC4 ((ushort)0x000c)
-#define CPM_CR_CH_SMC2 ((ushort)0x000d) /* SMC2 / DSP2 */
-
-#define mk_cr_cmd(CH, CMD) ((CMD << 8) | (CH << 4))
-
-/* The dual ported RAM is multi-functional. Some areas can be (and are
- * being) used for microcode. There is an area that can only be used
- * as data ram for buffer descriptors, which is all we use right now.
- * Currently the first 512 and last 256 bytes are used for microcode.
- */
-#define CPM_DATAONLY_BASE ((uint)0x0800)
-#define CPM_DATAONLY_SIZE ((uint)0x0700)
-#define CPM_DP_NOSPACE ((uint)0x7fffffff)
-
-/* Export the base address of the communication processor registers
- * and dual port ram.
- */
-extern cpm8xx_t *cpmp; /* Pointer to comm processor */
-uint m8xx_cpm_dpalloc(uint size);
-uint m8xx_cpm_hostalloc(uint size);
-void m8xx_cpm_setbrg(uint brg, uint rate);
-
-/* Buffer descriptors used by many of the CPM protocols.
-*/
-typedef struct cpm_buf_desc {
- ushort cbd_sc; /* Status and Control */
- ushort cbd_datlen; /* Data length in buffer */
- uint cbd_bufaddr; /* Buffer address in host memory */
-} cbd_t;
-
-#define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */
-#define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
-#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
-#define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
-#define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame */
-#define BD_SC_CM ((ushort)0x0200) /* Continous mode */
-#define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */
-#define BD_SC_P ((ushort)0x0100) /* xmt preamble */
-#define BD_SC_BR ((ushort)0x0020) /* Break received */
-#define BD_SC_FR ((ushort)0x0010) /* Framing error */
-#define BD_SC_PR ((ushort)0x0008) /* Parity error */
-#define BD_SC_OV ((ushort)0x0002) /* Overrun */
-#define BD_SC_CD ((ushort)0x0001) /* ?? */
-
-/* Parameter RAM offsets.
-*/
-#define PROFF_SCC1 ((uint)0x0000)
-#define PROFF_IIC ((uint)0x0080)
-#define PROFF_SCC2 ((uint)0x0100)
-#define PROFF_SCC3 ((uint)0x0200)
-#define PROFF_SMC1 ((uint)0x0280)
-#define PROFF_SCC4 ((uint)0x0300)
-#define PROFF_SMC2 ((uint)0x0380)
-
-/* Define enough so I can at least use the serial port as a UART.
- * The MBX uses SMC1 as the host serial port.
- */
-typedef struct smc_uart {
- ushort smc_rbase; /* Rx Buffer descriptor base address */
- ushort smc_tbase; /* Tx Buffer descriptor base address */
- u_char smc_rfcr; /* Rx function code */
- u_char smc_tfcr; /* Tx function code */
- ushort smc_mrblr; /* Max receive buffer length */
- uint smc_rstate; /* Internal */
- uint smc_idp; /* Internal */
- ushort smc_rbptr; /* Internal */
- ushort smc_ibc; /* Internal */
- uint smc_rxtmp; /* Internal */
- uint smc_tstate; /* Internal */
- uint smc_tdp; /* Internal */
- ushort smc_tbptr; /* Internal */
- ushort smc_tbc; /* Internal */
- uint smc_txtmp; /* Internal */
- ushort smc_maxidl; /* Maximum idle characters */
- ushort smc_tmpidl; /* Temporary idle counter */
- ushort smc_brklen; /* Last received break length */
- ushort smc_brkec; /* rcv'd break condition counter */
- ushort smc_brkcr; /* xmt break count register */
- ushort smc_rmask; /* Temporary bit mask */
-} smc_uart_t;
-
-/* Function code bits.
-*/
-#define SMC_EB ((u_char)0x10) /* Set big endian byte order */
-
-/* SMC uart mode register.
-*/
-#define SMCMR_REN ((ushort)0x0001)
-#define SMCMR_TEN ((ushort)0x0002)
-#define SMCMR_DM ((ushort)0x000c)
-#define SMCMR_SM_GCI ((ushort)0x0000)
-#define SMCMR_SM_UART ((ushort)0x0020)
-#define SMCMR_SM_TRANS ((ushort)0x0030)
-#define SMCMR_SM_MASK ((ushort)0x0030)
-#define SMCMR_PM_EVEN ((ushort)0x0100) /* Even parity, else odd */
-#define SMCMR_REVD SMCMR_PM_EVEN
-#define SMCMR_PEN ((ushort)0x0200) /* Parity enable */
-#define SMCMR_BS SMCMR_PEN
-#define SMCMR_SL ((ushort)0x0400) /* Two stops, else one */
-#define SMCR_CLEN_MASK ((ushort)0x7800) /* Character length */
-#define smcr_mk_clen(C) (((C) << 11) & SMCR_CLEN_MASK)
-
-/* SMC2 as Centronics parallel printer. It is half duplex, in that
- * it can only receive or transmit. The parameter ram values for
- * each direction are either unique or properly overlap, so we can
- * include them in one structure.
- */
-typedef struct smc_centronics {
- ushort scent_rbase;
- ushort scent_tbase;
- u_char scent_cfcr;
- u_char scent_smask;
- ushort scent_mrblr;
- uint scent_rstate;
- uint scent_r_ptr;
- ushort scent_rbptr;
- ushort scent_r_cnt;
- uint scent_rtemp;
- uint scent_tstate;
- uint scent_t_ptr;
- ushort scent_tbptr;
- ushort scent_t_cnt;
- uint scent_ttemp;
- ushort scent_max_sl;
- ushort scent_sl_cnt;
- ushort scent_character1;
- ushort scent_character2;
- ushort scent_character3;
- ushort scent_character4;
- ushort scent_character5;
- ushort scent_character6;
- ushort scent_character7;
- ushort scent_character8;
- ushort scent_rccm;
- ushort scent_rccr;
-} smc_cent_t;
-
-/* Centronics Status Mask Register.
-*/
-#define SMC_CENT_F ((u_char)0x08)
-#define SMC_CENT_PE ((u_char)0x04)
-#define SMC_CENT_S ((u_char)0x02)
-
-/* SMC Event and Mask register.
-*/
-#define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */
-#define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */
-#define SMCM_TXE ((unsigned char)0x10) /* When in Transparent Mode */
-#define SMCM_BSY ((unsigned char)0x04)
-#define SMCM_TX ((unsigned char)0x02)
-#define SMCM_RX ((unsigned char)0x01)
-
-/* Baud rate generators.
-*/
-#define CPM_BRG_RST ((uint)0x00020000)
-#define CPM_BRG_EN ((uint)0x00010000)
-#define CPM_BRG_EXTC_INT ((uint)0x00000000)
-#define CPM_BRG_EXTC_CLK2 ((uint)0x00004000)
-#define CPM_BRG_EXTC_CLK6 ((uint)0x00008000)
-#define CPM_BRG_ATB ((uint)0x00002000)
-#define CPM_BRG_CD_MASK ((uint)0x00001ffe)
-#define CPM_BRG_DIV16 ((uint)0x00000001)
-
-/* SCCs.
-*/
-#define SCC_GSMRH_IRP ((uint)0x00040000)
-#define SCC_GSMRH_GDE ((uint)0x00010000)
-#define SCC_GSMRH_TCRC_CCITT ((uint)0x00008000)
-#define SCC_GSMRH_TCRC_BISYNC ((uint)0x00004000)
-#define SCC_GSMRH_TCRC_HDLC ((uint)0x00000000)
-#define SCC_GSMRH_REVD ((uint)0x00002000)
-#define SCC_GSMRH_TRX ((uint)0x00001000)
-#define SCC_GSMRH_TTX ((uint)0x00000800)
-#define SCC_GSMRH_CDP ((uint)0x00000400)
-#define SCC_GSMRH_CTSP ((uint)0x00000200)
-#define SCC_GSMRH_CDS ((uint)0x00000100)
-#define SCC_GSMRH_CTSS ((uint)0x00000080)
-#define SCC_GSMRH_TFL ((uint)0x00000040)
-#define SCC_GSMRH_RFW ((uint)0x00000020)
-#define SCC_GSMRH_TXSY ((uint)0x00000010)
-#define SCC_GSMRH_SYNL16 ((uint)0x0000000c)
-#define SCC_GSMRH_SYNL8 ((uint)0x00000008)
-#define SCC_GSMRH_SYNL4 ((uint)0x00000004)
-#define SCC_GSMRH_RTSM ((uint)0x00000002)
-#define SCC_GSMRH_RSYN ((uint)0x00000001)
-
-#define SCC_GSMRL_SIR ((uint)0x80000000) /* SCC2 only */
-#define SCC_GSMRL_EDGE_NONE ((uint)0x60000000)
-#define SCC_GSMRL_EDGE_NEG ((uint)0x40000000)
-#define SCC_GSMRL_EDGE_POS ((uint)0x20000000)
-#define SCC_GSMRL_EDGE_BOTH ((uint)0x00000000)
-#define SCC_GSMRL_TCI ((uint)0x10000000)
-#define SCC_GSMRL_TSNC_3 ((uint)0x0c000000)
-#define SCC_GSMRL_TSNC_4 ((uint)0x08000000)
-#define SCC_GSMRL_TSNC_14 ((uint)0x04000000)
-#define SCC_GSMRL_TSNC_INF ((uint)0x00000000)
-#define SCC_GSMRL_RINV ((uint)0x02000000)
-#define SCC_GSMRL_TINV ((uint)0x01000000)
-#define SCC_GSMRL_TPL_128 ((uint)0x00c00000)
-#define SCC_GSMRL_TPL_64 ((uint)0x00a00000)
-#define SCC_GSMRL_TPL_48 ((uint)0x00800000)
-#define SCC_GSMRL_TPL_32 ((uint)0x00600000)
-#define SCC_GSMRL_TPL_16 ((uint)0x00400000)
-#define SCC_GSMRL_TPL_8 ((uint)0x00200000)
-#define SCC_GSMRL_TPL_NONE ((uint)0x00000000)
-#define SCC_GSMRL_TPP_ALL1 ((uint)0x00180000)
-#define SCC_GSMRL_TPP_01 ((uint)0x00100000)
-#define SCC_GSMRL_TPP_10 ((uint)0x00080000)
-#define SCC_GSMRL_TPP_ZEROS ((uint)0x00000000)
-#define SCC_GSMRL_TEND ((uint)0x00040000)
-#define SCC_GSMRL_TDCR_32 ((uint)0x00030000)
-#define SCC_GSMRL_TDCR_16 ((uint)0x00020000)
-#define SCC_GSMRL_TDCR_8 ((uint)0x00010000)
-#define SCC_GSMRL_TDCR_1 ((uint)0x00000000)
-#define SCC_GSMRL_RDCR_32 ((uint)0x0000c000)
-#define SCC_GSMRL_RDCR_16 ((uint)0x00008000)
-#define SCC_GSMRL_RDCR_8 ((uint)0x00004000)
-#define SCC_GSMRL_RDCR_1 ((uint)0x00000000)
-#define SCC_GSMRL_RENC_DFMAN ((uint)0x00003000)
-#define SCC_GSMRL_RENC_MANCH ((uint)0x00002000)
-#define SCC_GSMRL_RENC_FM0 ((uint)0x00001000)
-#define SCC_GSMRL_RENC_NRZI ((uint)0x00000800)
-#define SCC_GSMRL_RENC_NRZ ((uint)0x00000000)
-#define SCC_GSMRL_TENC_DFMAN ((uint)0x00000600)
-#define SCC_GSMRL_TENC_MANCH ((uint)0x00000400)
-#define SCC_GSMRL_TENC_FM0 ((uint)0x00000200)
-#define SCC_GSMRL_TENC_NRZI ((uint)0x00000100)
-#define SCC_GSMRL_TENC_NRZ ((uint)0x00000000)
-#define SCC_GSMRL_DIAG_LE ((uint)0x000000c0) /* Loop and echo */
-#define SCC_GSMRL_DIAG_ECHO ((uint)0x00000080)
-#define SCC_GSMRL_DIAG_LOOP ((uint)0x00000040)
-#define SCC_GSMRL_DIAG_NORM ((uint)0x00000000)
-#define SCC_GSMRL_ENR ((uint)0x00000020)
-#define SCC_GSMRL_ENT ((uint)0x00000010)
-#define SCC_GSMRL_MODE_ENET ((uint)0x0000000c)
-#define SCC_GSMRL_MODE_DDCMP ((uint)0x00000009)
-#define SCC_GSMRL_MODE_BISYNC ((uint)0x00000008)
-#define SCC_GSMRL_MODE_V14 ((uint)0x00000007)
-#define SCC_GSMRL_MODE_AHDLC ((uint)0x00000006)
-#define SCC_GSMRL_MODE_PROFIBUS ((uint)0x00000005)
-#define SCC_GSMRL_MODE_UART ((uint)0x00000004)
-#define SCC_GSMRL_MODE_SS7 ((uint)0x00000003)
-#define SCC_GSMRL_MODE_ATALK ((uint)0x00000002)
-#define SCC_GSMRL_MODE_HDLC ((uint)0x00000000)
-
-#define SCC_TODR_TOD ((ushort)0x8000)
-
-/* SCC Event and Mask register.
-*/
-#define SCCM_TXE ((unsigned char)0x10)
-#define SCCM_BSY ((unsigned char)0x04)
-#define SCCM_TX ((unsigned char)0x02)
-#define SCCM_RX ((unsigned char)0x01)
-
-typedef struct scc_param {
- ushort scc_rbase; /* Rx Buffer descriptor base address */
- ushort scc_tbase; /* Tx Buffer descriptor base address */
- u_char scc_rfcr; /* Rx function code */
- u_char scc_tfcr; /* Tx function code */
- ushort scc_mrblr; /* Max receive buffer length */
- uint scc_rstate; /* Internal */
- uint scc_idp; /* Internal */
- ushort scc_rbptr; /* Internal */
- ushort scc_ibc; /* Internal */
- uint scc_rxtmp; /* Internal */
- uint scc_tstate; /* Internal */
- uint scc_tdp; /* Internal */
- ushort scc_tbptr; /* Internal */
- ushort scc_tbc; /* Internal */
- uint scc_txtmp; /* Internal */
- uint scc_rcrc; /* Internal */
- uint scc_tcrc; /* Internal */
-} sccp_t;
-
-/* Function code bits.
-*/
-#define SCC_EB ((u_char)0x10) /* Set big endian byte order */
-
-/* CPM Ethernet through SCCx.
- */
-typedef struct scc_enet {
- sccp_t sen_genscc;
- uint sen_cpres; /* Preset CRC */
- uint sen_cmask; /* Constant mask for CRC */
- uint sen_crcec; /* CRC Error counter */
- uint sen_alec; /* alignment error counter */
- uint sen_disfc; /* discard frame counter */
- ushort sen_pads; /* Tx short frame pad character */
- ushort sen_retlim; /* Retry limit threshold */
- ushort sen_retcnt; /* Retry limit counter */
- ushort sen_maxflr; /* maximum frame length register */
- ushort sen_minflr; /* minimum frame length register */
- ushort sen_maxd1; /* maximum DMA1 length */
- ushort sen_maxd2; /* maximum DMA2 length */
- ushort sen_maxd; /* Rx max DMA */
- ushort sen_dmacnt; /* Rx DMA counter */
- ushort sen_maxb; /* Max BD byte count */
- ushort sen_gaddr1; /* Group address filter */
- ushort sen_gaddr2;
- ushort sen_gaddr3;
- ushort sen_gaddr4;
- uint sen_tbuf0data0; /* Save area 0 - current frame */
- uint sen_tbuf0data1; /* Save area 1 - current frame */
- uint sen_tbuf0rba; /* Internal */
- uint sen_tbuf0crc; /* Internal */
- ushort sen_tbuf0bcnt; /* Internal */
- ushort sen_paddrh; /* physical address (MSB) */
- ushort sen_paddrm;
- ushort sen_paddrl; /* physical address (LSB) */
- ushort sen_pper; /* persistence */
- ushort sen_rfbdptr; /* Rx first BD pointer */
- ushort sen_tfbdptr; /* Tx first BD pointer */
- ushort sen_tlbdptr; /* Tx last BD pointer */
- uint sen_tbuf1data0; /* Save area 0 - current frame */
- uint sen_tbuf1data1; /* Save area 1 - current frame */
- uint sen_tbuf1rba; /* Internal */
- uint sen_tbuf1crc; /* Internal */
- ushort sen_tbuf1bcnt; /* Internal */
- ushort sen_txlen; /* Tx Frame length counter */
- ushort sen_iaddr1; /* Individual address filter */
- ushort sen_iaddr2;
- ushort sen_iaddr3;
- ushort sen_iaddr4;
- ushort sen_boffcnt; /* Backoff counter */
-
- /* NOTE: Some versions of the manual have the following items
- * incorrectly documented. Below is the proper order.
- */
- ushort sen_taddrh; /* temp address (MSB) */
- ushort sen_taddrm;
- ushort sen_taddrl; /* temp address (LSB) */
-} scc_enet_t;
-
-/*** MBX ************************************************************/
-
-#ifdef CONFIG_MBX
-/* Bits in parallel I/O port registers that have to be set/cleared
- * to configure the pins for SCC1 use. The TCLK and RCLK seem unique
- * to the MBX860 board. Any two of the four available clocks could be
- * used, and the MPC860 cookbook manual has an example using different
SHAR_EOF
true || echo 'restore of patch-2.4.11-dontuse failed'
fi
echo 'End of part 04'
echo 'File patch-2.4.11-dontuse is continued in part 05'
echo "05" > _shar_seq_.tmp
exit 0