Commit 30b922bc authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-ntfs.bkbits.net/ntfs-tng-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents dfeb4845 4a1b6295
...@@ -2,7 +2,7 @@ BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \ ...@@ -2,7 +2,7 @@ BOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \
kernel-api.sgml parportbook.sgml kernel-hacking.sgml \ kernel-api.sgml parportbook.sgml kernel-hacking.sgml \
kernel-locking.sgml via-audio.sgml mousedrivers.sgml sis900.sgml \ kernel-locking.sgml via-audio.sgml mousedrivers.sgml sis900.sgml \
deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \ deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \
writing_usb_driver.sgml writing_usb_driver.sgml scsidrivers.sgml
PS := $(patsubst %.sgml, %.ps, $(BOOKS)) PS := $(patsubst %.sgml, %.ps, $(BOOKS))
PDF := $(patsubst %.sgml, %.pdf, $(BOOKS)) PDF := $(patsubst %.sgml, %.pdf, $(BOOKS))
...@@ -69,6 +69,9 @@ tulip-user.sgml: tulip-user.tmpl ...@@ -69,6 +69,9 @@ tulip-user.sgml: tulip-user.tmpl
writing_usb_driver.sgml: writing_usb_driver.tmpl writing_usb_driver.sgml: writing_usb_driver.tmpl
$(TOPDIR)/scripts/docgen <$< >$@ $(TOPDIR)/scripts/docgen <$< >$@
scsidrivers.sgml : scsidrivers.tmpl
$(TOPDIR)/scripts/docgen <$< >$@
sis900.sgml: sis900.tmpl $(TOPDIR)/drivers/net/sis900.c sis900.sgml: sis900.tmpl $(TOPDIR)/drivers/net/sis900.c
$(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/sis900.c \ $(TOPDIR)/scripts/docgen $(TOPDIR)/drivers/net/sis900.c \
<sis900.tmpl >sis900.sgml <sis900.tmpl >sis900.sgml
......
<!-- -*- sgml -*- -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"[]>
<book id="scsidrivers">
<bookinfo>
<title>SCSI Subsystem Interfaces</title>
<authorgroup>
<author>
<firstname>Douglas</firstname>
<surname>Gilbert</surname>
<affiliation>
<address>
<email>dgilbert@interlog.com</email>
</address>
</affiliation>
</author>
</authorgroup>
<pubdate>2002-04-27</pubdate>
<copyright>
<year>2002</year>
<holder>Douglas Gilbert</holder>
</copyright>
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts,
and with no Back-Cover Texts. A copy of the license is included
in the section entitled "GNU Free Documentation License".
</para>
</legalnotice>
</bookinfo>
<toc></toc>
<chapter id="intro">
<title>Introduction</title>
<para>
This document outlines the interface between the Linux scsi mid level
and lower level drivers. Lower level drivers are variously called HBA
(host bus adapter) drivers, host drivers (HD) or pseudo adapter drivers.
The latter alludes to the fact that a lower level driver may be a
bridge to another IO subsystem (and the "ide-scsi" driver is an example
of this). There can be many lower level drivers active in a running
system, but only one per hardware type. For example, the aic7xxx driver
controls adaptec controllers based on the 7xxx chip series. Most lower
level drivers can control one or more scsi hosts (a.k.a. scsi initiators).
</para>
<para>
This document can been found in an ASCII text file in the linux kernel
source: <filename>drivers/scsi/scsi_mid_low_api.txt</filename> .
It currently hold a little more information than this document. The
<filename>drivers/scsi/hosts.h</filename> and <filename>
drivers/scsi/scsi.h</filename> headers contain descriptions of members
of important structures for the scsi subsystem.
</para>
</chapter>
<chapter id="driver_struct">
<title>Driver structure</title>
<para>
Traditionally a lower level driver for the scsi subsystem has been
at least two files in the drivers/scsi directory. For example, a
driver called "xyz" has a header file "xyz.h" and a source file
"xyz.c". [Actually there is no good reason why this couldn't all
be in one file.] Some drivers that have been ported to several operating
systems (e.g. aic7xxx which has separate files for generic and
OS-specific code) have more than two files. Such drivers tend to have
their own directory under the drivers/scsi directory.
</para>
<para>
scsi_module.c is normally included at the end of a lower
level driver. For it to work a declaration like this is needed before
it is included:
<programlisting>
static Scsi_Host_Template driver_template = DRIVER_TEMPLATE;
/* DRIVER_TEMPLATE should contain pointers to supported interface
functions. Scsi_Host_Template is defined hosts.h */
#include "scsi_module.c"
</programlisting>
</para>
<para>
The scsi_module.c assumes the name "driver_template" is appropriately
defined. It contains 2 functions:
<orderedlist>
<listitem><para>
init_this_scsi_driver() called during builtin and module driver
initialization: invokes mid level's scsi_register_host()
</para></listitem>
<listitem><para>
exit_this_scsi_driver() called during closedown: invokes
mid level's scsi_unregister_host()
</para></listitem>
</orderedlist>
</para>
<para>
When a new, lower level driver is being added to Linux, the following
files (all found in the drivers/scsi directory) will need some attention:
Makefile, Config.help and Config.in . It is probably best to look at what
an existing lower level driver does in this regard.
</para>
</chapter>
<chapter id="intfunctions">
<title>Interface Functions</title>
!Edrivers/scsi/scsi_mid_low_api.txt
</chapter>
<chapter id="locks">
<title>Locks</title>
<para>
Each Scsi_Host instance has a spin_lock called Scsi_Host::default_lock
which is initialized in scsi_register() [found in hosts.c]. Within the
same function the Scsi_Host::host_lock pointer is initialized to point
at default_lock with the scsi_assign_lock() function. Thereafter
lock and unlock operations performed by the mid level use the
Scsi_Host::host_lock pointer.
</para>
<para>
Lower level drivers can override the use of Scsi_Host::default_lock by
using scsi_assign_lock(). The earliest opportunity to do this would
be in the detect() function after it has invoked scsi_register(). It
could be replaced by a coarser grain lock (e.g. per driver) or a
lock of equal granularity (i.e. per host). Using finer grain locks
(e.g. per scsi device) may be possible by juggling locks in
queuecommand().
</para>
</chapter>
<chapter id="changes">
<title>Changes since lk 2.4 series</title>
<para>
io_request_lock has been replaced by several finer grained locks. The lock
relevant to lower level drivers is Scsi_Host::host_lock and there is one
per scsi host.
</para>
<para>
The older error handling mechanism has been removed. This means the
lower level interface functions abort() and reset() have been removed.
</para>
<para>
In the 2.4 series the scsi subsystem configuration descriptions were
aggregated with the configuration descriptions from all other Linux
subsystems in the Documentation/Configure.help file. In the 2.5 series,
the scsi subsystem now has its own (much smaller) drivers/scsi/Config.help
file.
</para>
</chapter>
<chapter id="credits">
<title>Credits</title>
<para>
The following people have contributed to this document:
<orderedlist>
<listitem><para>
Mike Anderson <email>andmike@us.ibm.com</email>
</para></listitem>
<listitem><para>
James Bottomley <email>James.Bottomley@steeleye.com</email>
</para></listitem>
<listitem><para>
Patrick Mansfield <email>patmans@us.ibm.com</email>
</para></listitem>
</orderedlist>
</para>
</chapter>
</book>
...@@ -69,10 +69,10 @@ setattr: no yes ...@@ -69,10 +69,10 @@ setattr: no yes
permission: yes no permission: yes no
getattr: (see below) getattr: (see below)
revalidate: no (see below) revalidate: no (see below)
setxattr: yes no setxattr: no yes
getxattr: yes no getxattr: no yes
listxattr: yes no listxattr: no yes
removexattr: yes no removexattr: no yes
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_sem on Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_sem on
victim. victim.
cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
......
...@@ -81,13 +81,20 @@ can relax your locking. ...@@ -81,13 +81,20 @@ can relax your locking.
[mandatory] [mandatory]
->lookup(), ->truncate(), ->create(), ->unlink(), ->mknod(), ->mkdir(), ->lookup(), ->truncate(), ->create(), ->unlink(), ->mknod(), ->mkdir(),
->rmdir(), ->link(), ->lseek(), ->symlink() and ->rename() are called ->rmdir(), ->link(), ->lseek(), ->symlink(), ->rename() and ->readdir()
without BKL now. Grab it on the entry, drop upon return - that will are called without BKL now. Grab it on the entry, drop upon return - that
guarantee the same locking you used to have. If your method or its will guarantee the same locking you used to have. If your method or its
parts do not need BKL - better yet, now you can shift lock_kernel() and parts do not need BKL - better yet, now you can shift lock_kernel() and
unlock_kernel() so that they would protect exactly what needs to be unlock_kernel() so that they would protect exactly what needs to be
protected. protected.
---
[mandatory]
BKL is also moved from around sb operations. ->write_super() Is now called
without BKL held. BKL should have been shifted into individual fs sb_op
functions. If you don't need it, remove it.
--- ---
[informational] [informational]
......
...@@ -43,7 +43,7 @@ Several options can be passed to the sonypi driver, either by adding them ...@@ -43,7 +43,7 @@ Several options can be passed to the sonypi driver, either by adding them
to /etc/modules.conf file, when the driver is compiled as a module or by to /etc/modules.conf file, when the driver is compiled as a module or by
adding the following to the kernel command line (in your bootloader): adding the following to the kernel command line (in your bootloader):
sonypi=minor[[[[,camera],fnkeyinit],verbose],compat] sonypi=minor[[[[[,camera],fnkeyinit],verbose],compat],nojogdial]
where: where:
...@@ -71,6 +71,9 @@ where: ...@@ -71,6 +71,9 @@ where:
(prior to version 1.5) and does not work anymore, (prior to version 1.5) and does not work anymore,
add this option and report to the author. add this option and report to the author.
nojogdial: gives more accurate PKEY events on those Vaio models
which don't have a jogdial (like the FX series).
Module use: Module use:
----------- -----------
......
...@@ -556,9 +556,9 @@ L: ext3-users@redhat.com ...@@ -556,9 +556,9 @@ L: ext3-users@redhat.com
S: Maintained S: Maintained
FARSYNC SYNCHRONOUS DRIVER FARSYNC SYNCHRONOUS DRIVER
P: Bob Dunlop P: Kevin Curtis
M: rjd@xyzzy.clara.co.uk M: kevin.curtis@farsite.co.uk
M: bob.dunlop@farsite.co.uk M: kevin.curtis@farsite.co.uk
W: http://www.farsite.co.uk/ W: http://www.farsite.co.uk/
S: Supported S: Supported
...@@ -737,16 +737,12 @@ L: linux-kernel@vger.kernel.org ...@@ -737,16 +737,12 @@ L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
IEEE 1394 SUBSYSTEM IEEE 1394 SUBSYSTEM
P: Andreas Bombe P: Ben Collins
M: andreas.bombe@munich.netsurf.de M: bcollins@debian.org
L: linux1394-devel@lists.sourceforge.net L: linux1394-devel@lists.sourceforge.net
W: http://linux1394.sourceforge.net/ W: http://linux1394.sourceforge.net/
S: Maintained S: Maintained
IEEE 1394 AIC5800 DRIVER
L: linux1394-devel@lists.sourceforge.net
S: Orphan
IEEE 1394 OHCI DRIVER IEEE 1394 OHCI DRIVER
P: Ben Collins P: Ben Collins
M: bcollins@debian.org M: bcollins@debian.org
...@@ -801,6 +797,12 @@ W: http://www.inter-mezzo.org/ ...@@ -801,6 +797,12 @@ W: http://www.inter-mezzo.org/
L: intermezzo-discuss@lists.sourceforge.net L: intermezzo-discuss@lists.sourceforge.net
S: Maintained S: Maintained
IOC3 DRIVER
P: Ralf Baechle
M: ralf@oss.sgi.com
L: linux-mips@oss.sgi.com
S: Maintained
IP MASQUERADING: IP MASQUERADING:
P: Juanjo Ciarlante P: Juanjo Ciarlante
M: jjciarla@raiz.uncu.edu.ar M: jjciarla@raiz.uncu.edu.ar
...@@ -935,6 +937,13 @@ W: http://www.linuxppc.org/ ...@@ -935,6 +937,13 @@ W: http://www.linuxppc.org/
L: linuxppc-dev@lists.linuxppc.org L: linuxppc-dev@lists.linuxppc.org
S: Maintained S: Maintained
LINUX FOR 64BIT POWERPC
P: David Engebretsen
M: engebret@us.ibm.com
W: http://linuxppc64.org
L: linuxppc64-dev@lists.linuxppc.org
S: Supported
LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP Dynamic Disks) LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP Dynamic Disks)
P: Richard Russon (FlatCap) P: Richard Russon (FlatCap)
M: ldm@flatcap.org M: ldm@flatcap.org
...@@ -1198,8 +1207,10 @@ L: linux-abi-devel@lists.sourceforge.net ...@@ -1198,8 +1207,10 @@ L: linux-abi-devel@lists.sourceforge.net
S: Maintained S: Maintained
PCI ID DATABASE PCI ID DATABASE
P: Jens Maurer P: Martin Mares
M: jmaurer@cck.uni-kl.de M: mj@ucw.cz
L: pciids-devel@lists.sourceforge.net
W: http://pciids.sourceforge.net/
S: Maintained S: Maintained
PCI SOUND DRIVERS (ES1370, ES1371 and SONICVIBES) PCI SOUND DRIVERS (ES1370, ES1371 and SONICVIBES)
...@@ -1387,11 +1398,11 @@ M: mingo@redhat.com ...@@ -1387,11 +1398,11 @@ M: mingo@redhat.com
S: Maintained S: Maintained
SIS 5513 IDE CONTROLLER DRIVER SIS 5513 IDE CONTROLLER DRIVER
P: Lionel Bouton P: Lionel Bouton
M: Lionel.Bouton@inet6.fr M: Lionel.Bouton@inet6.fr
W: http://inet6.dyn.dhs.org/sponsoring/sis5513/index.html W: http://inet6.dyn.dhs.org/sponsoring/sis5513/index.html
W: http://gyver.homeip.net/sis5513/index.html W: http://gyver.homeip.net/sis5513/index.html
S: Maintained S: Maintained
SIS 900/7016 FAST ETHERNET DRIVER SIS 900/7016 FAST ETHERNET DRIVER
P: Ollie Lho P: Ollie Lho
...@@ -1508,26 +1519,24 @@ M: hch@infradead.org ...@@ -1508,26 +1519,24 @@ M: hch@infradead.org
S: Maintained S: Maintained
TI GRAPH LINK USB (SilverLink) CABLE DRIVER TI GRAPH LINK USB (SilverLink) CABLE DRIVER
P: Romain Lievin P: Romain Lievin
M: roms@lpg.ticalc.org M: roms@lpg.ticalc.org
P: Julien Blache P: Julien Blache
M: jb@technologeek.org M: jb@technologeek.org
S: Maintained S: Maintained
TIEMAN VOYAGER USB BRAILLE DISPLAY DRIVER TIEMAN VOYAGER USB BRAILLE DISPLAY DRIVER
P: Stephane Dalton P: Stephane Dalton
M: sdalton@videotron.ca M: sdalton@videotron.ca
P: Stphane Doyon P: Stphane Doyon
M: s.doyon@videotron.ca M: s.doyon@videotron.ca
S: Maintained S: Maintained
TLAN NETWORK DRIVER TLAN NETWORK DRIVER
P: Torben Mathiasen P: Samuel Chessman
M: torben.mathiasen@compaq.com M: chessman@tux.org
M: torben@kernel.dk L: tlan-devel@lists.sourceforge.net
L: tlan@vuser.vu.union.edu W: http://sourceforge.net/projects/tlan/
L: linux-net@vger.kernel.org
W: http://tlan.kernel.dk
S: Maintained S: Maintained
TOKEN-RING NETWORK DRIVER TOKEN-RING NETWORK DRIVER
...@@ -1629,6 +1638,12 @@ M: dbrownell@users.sourceforge.net ...@@ -1629,6 +1638,12 @@ M: dbrownell@users.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net
S: Maintained S: Maintained
USB EHCI DRIVER
P: David Brownell
M: dbrownell@users.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
USB HID/HIDBP/INPUT DRIVERS USB HID/HIDBP/INPUT DRIVERS
P: Vojtech Pavlik P: Vojtech Pavlik
M: vojtech@suse.cz M: vojtech@suse.cz
...@@ -1731,7 +1746,7 @@ S: Maintained ...@@ -1731,7 +1746,7 @@ S: Maintained
USB SERIAL CYBERJACK PINPAD/E-COM DRIVER USB SERIAL CYBERJACK PINPAD/E-COM DRIVER
L: linux-usb-users@lists.sourceforge.net L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net
S: Supported S: Maintained
USB AUERSWALD DRIVER USB AUERSWALD DRIVER
P: Wolfgang Muees P: Wolfgang Muees
......
...@@ -38,7 +38,7 @@ __beginning: mov r4, r0 @ save the entry to the firmware ...@@ -38,7 +38,7 @@ __beginning: mov r4, r0 @ save the entry to the firmware
adr r1, __ofw_data adr r1, __ofw_data
add r2, r1, #4 add r2, r1, #4
mov lr, pc mov lr, pc
b SYMBOL_NAME(ofw_init) b ofw_init
mov r1, #0 mov r1, #0
adr r2, __mmu_off @ calculate physical address adr r2, __mmu_off @ calculate physical address
...@@ -109,7 +109,7 @@ __go_on: ...@@ -109,7 +109,7 @@ __go_on:
add sp, sp, #128 add sp, sp, #128
adr r0, __ofw_data adr r0, __ofw_data
mov lr, pc mov lr, pc
b SYMBOL_NAME(create_params) b create_params
mov r8, #0 mov r8, #0
mov r7, #15 mov r7, #15
...@@ -185,7 +185,7 @@ not_relocated: mov r0, #0 ...@@ -185,7 +185,7 @@ not_relocated: mov r0, #0
mov r5, r2 @ decompress after malloc space mov r5, r2 @ decompress after malloc space
mov r0, r5 mov r0, r5
mov r3, r7 mov r3, r7
bl SYMBOL_NAME(decompress_kernel) bl decompress_kernel
add r0, r0, #127 add r0, r0, #127
bic r0, r0, #127 @ align the kernel length bic r0, r0, #127 @ align the kernel length
...@@ -219,7 +219,7 @@ not_relocated: mov r0, #0 ...@@ -219,7 +219,7 @@ not_relocated: mov r0, #0
*/ */
wont_overwrite: mov r0, r4 wont_overwrite: mov r0, r4
mov r3, r7 mov r3, r7
bl SYMBOL_NAME(decompress_kernel) bl decompress_kernel
b call_kernel b call_kernel
.type LC0, #object .type LC0, #object
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
#define FLASH 0x08 #define FLASH 0x08
#define INVERSE 0x10 #define INVERSE 0x10
LC0: .word SYMBOL_NAME(bytes_per_char_h) LC0: .word bytes_per_char_h
.word SYMBOL_NAME(video_size_row) .word video_size_row
.word SYMBOL_NAME(acorndata_8x8) .word acorndata_8x8
.word SYMBOL_NAME(con_charconvtable) .word con_charconvtable
ENTRY(ll_write_char) ENTRY(ll_write_char)
stmfd sp!, {r4 - r7, lr} stmfd sp!, {r4 - r7, lr}
......
This diff is collapsed.
...@@ -147,7 +147,7 @@ _unexp_fiq: ldr sp, .LCfiq ...@@ -147,7 +147,7 @@ _unexp_fiq: ldr sp, .LCfiq
mov r0, r0 mov r0, r0
stmfd sp!, {r0 - r3, ip, lr} stmfd sp!, {r0 - r3, ip, lr}
adr r0, Lfiqmsg adr r0, Lfiqmsg
bl SYMBOL_NAME(printk) bl printk
ldmfd sp!, {r0 - r3, ip, lr} ldmfd sp!, {r0 - r3, ip, lr}
teqp pc, #0x0c000001 teqp pc, #0x0c000001
mov r0, r0 mov r0, r0
...@@ -174,12 +174,12 @@ vector_undefinstr: ...@@ -174,12 +174,12 @@ vector_undefinstr:
ldr r4, .LC2 ldr r4, .LC2
ldr pc, [r4] @ Call FP module USR entry point ldr pc, [r4] @ Call FP module USR entry point
.globl SYMBOL_NAME(fpundefinstr) .globl fpundefinstr
SYMBOL_NAME(fpundefinstr): @ Called by FP module on undefined instr fpundefinstr: @ Called by FP module on undefined instr
mov r0, lr mov r0, lr
mov r1, sp mov r1, sp
teqp pc, #MODE_SVC teqp pc, #MODE_SVC
bl SYMBOL_NAME(do_undefinstr) bl do_undefinstr
b ret_from_exception @ Normal FP exit b ret_from_exception @ Normal FP exit
__und_svc: SVC_SAVE_ALL @ Non-user mode __und_svc: SVC_SAVE_ALL @ Non-user mode
...@@ -187,7 +187,7 @@ __und_svc: SVC_SAVE_ALL @ Non-user mode ...@@ -187,7 +187,7 @@ __und_svc: SVC_SAVE_ALL @ Non-user mode
and r2, lr, #3 and r2, lr, #3
sub r0, r0, #4 sub r0, r0, #4
mov r1, sp mov r1, sp
bl SYMBOL_NAME(do_undefinstr) bl do_undefinstr
SVC_RESTORE_ALL SVC_RESTORE_ALL
#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE #if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE
...@@ -232,7 +232,7 @@ wfs_mask_data: .word 0x0e200110 @ WFS/RFS ...@@ -232,7 +232,7 @@ wfs_mask_data: .word 0x0e200110 @ WFS/RFS
.word 0x0f0f0f00 .word 0x0f0f0f00
#endif #endif
.LC2: .word SYMBOL_NAME(fp_enter) .LC2: .word fp_enter
/*============================================================================= /*=============================================================================
* Prefetch abort handler * Prefetch abort handler
...@@ -247,12 +247,12 @@ vector_prefetch: ...@@ -247,12 +247,12 @@ vector_prefetch:
teqp pc, #0x00000003 @ NOT a problem - doesnt change mode teqp pc, #0x00000003 @ NOT a problem - doesnt change mode
mask_pc r0, lr @ Address of abort mask_pc r0, lr @ Address of abort
mov r1, sp @ Tasks registers mov r1, sp @ Tasks registers
bl SYMBOL_NAME(do_PrefetchAbort) bl do_PrefetchAbort
teq r0, #0 @ If non-zero, we believe this abort.. teq r0, #0 @ If non-zero, we believe this abort..
bne ret_from_exception bne ret_from_exception
#ifdef DEBUG_UNDEF #ifdef DEBUG_UNDEF
adr r0, t adr r0, t
bl SYMBOL_NAME(printk) bl printk
#endif #endif
ldr lr, [sp,#S_PC] @ program to test this on. I think its ldr lr, [sp,#S_PC] @ program to test this on. I think its
b .Lbug_undef @ broken at the moment though!) b .Lbug_undef @ broken at the moment though!)
...@@ -261,7 +261,7 @@ __pabt_invalid: SVC_SAVE_ALL ...@@ -261,7 +261,7 @@ __pabt_invalid: SVC_SAVE_ALL
mov r0, sp @ Prefetch aborts are definitely *not* mov r0, sp @ Prefetch aborts are definitely *not*
mov r1, #BAD_PREFETCH @ allowed in non-user modes. We cant mov r1, #BAD_PREFETCH @ allowed in non-user modes. We cant
and r2, lr, #3 @ recover from this problem. and r2, lr, #3 @ recover from this problem.
b SYMBOL_NAME(bad_mode) b bad_mode
#ifdef DEBUG_UNDEF #ifdef DEBUG_UNDEF
t: .ascii "*** undef ***\r\n\0" t: .ascii "*** undef ***\r\n\0"
...@@ -287,7 +287,7 @@ vector_addrexcptn: ...@@ -287,7 +287,7 @@ vector_addrexcptn:
mov r1, sp @ Point to registers mov r1, sp @ Point to registers
mov r2, #0x400 mov r2, #0x400
mov lr, pc mov lr, pc
bl SYMBOL_NAME(do_excpt) bl do_excpt
b ret_from_exception b ret_from_exception
Laddrexcptn_not_user: Laddrexcptn_not_user:
...@@ -299,7 +299,7 @@ Laddrexcptn_not_user: ...@@ -299,7 +299,7 @@ Laddrexcptn_not_user:
mask_pc r0, lr mask_pc r0, lr
mov r1, sp mov r1, sp
orr r2, r2, #0x400 orr r2, r2, #0x400
bl SYMBOL_NAME(do_excpt) bl do_excpt
ldmia sp, {r0 - lr} @ I cant remember the reason I changed this... ldmia sp, {r0 - lr} @ I cant remember the reason I changed this...
add sp, sp, #15*4 add sp, sp, #15*4
movs pc, lr movs pc, lr
...@@ -324,7 +324,7 @@ Laddrexcptn_illegal_mode: ...@@ -324,7 +324,7 @@ Laddrexcptn_illegal_mode:
stmfd sp!, {r0-r7} stmfd sp!, {r0-r7}
mov r0, sp mov r0, sp
mov r1, #BAD_ADDREXCPTN mov r1, #BAD_ADDREXCPTN
b SYMBOL_NAME(bad_mode) b bad_mode
/*============================================================================= /*=============================================================================
* Interrupt (IRQ) handler * Interrupt (IRQ) handler
...@@ -382,7 +382,7 @@ __irq_svc: teqp pc, #0x08000003 ...@@ -382,7 +382,7 @@ __irq_svc: teqp pc, #0x08000003
__irq_invalid: mov r0, sp __irq_invalid: mov r0, sp
mov r1, #BAD_IRQ mov r1, #BAD_IRQ
b SYMBOL_NAME(bad_mode) b bad_mode
/*============================================================================= /*=============================================================================
* Data abort handler code * Data abort handler code
...@@ -418,7 +418,7 @@ Ldata_not_user: ...@@ -418,7 +418,7 @@ Ldata_not_user:
Ldata_illegal_mode: Ldata_illegal_mode:
mov r0, sp mov r0, sp
mov r1, #BAD_DATA mov r1, #BAD_DATA
b SYMBOL_NAME(bad_mode) b bad_mode
Ldata_do: mov r3, sp Ldata_do: mov r3, sp
ldr r4, [r0] @ Get instruction ldr r4, [r0] @ Get instruction
...@@ -460,7 +460,7 @@ Ldata_ldrstr_post: ...@@ -460,7 +460,7 @@ Ldata_ldrstr_post:
#ifdef FAULT_CODE_LDRSTRPOST #ifdef FAULT_CODE_LDRSTRPOST
orr r2, r2, #FAULT_CODE_LDRSTRPOST orr r2, r2, #FAULT_CODE_LDRSTRPOST
#endif #endif
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
Ldata_ldrstr_numindex: Ldata_ldrstr_numindex:
mov r0, r4, lsr #14 @ Get Rn mov r0, r4, lsr #14 @ Get Rn
...@@ -476,7 +476,7 @@ Ldata_ldrstr_numindex: ...@@ -476,7 +476,7 @@ Ldata_ldrstr_numindex:
#ifdef FAULT_CODE_LDRSTRPRE #ifdef FAULT_CODE_LDRSTRPRE
orr r2, r2, #FAULT_CODE_LDRSTRPRE orr r2, r2, #FAULT_CODE_LDRSTRPRE
#endif #endif
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
Ldata_ldrstr_regindex: Ldata_ldrstr_regindex:
mov r0, r4, lsr #14 @ Get Rn mov r0, r4, lsr #14 @ Get Rn
...@@ -506,7 +506,7 @@ Ldata_ldrstr_regindex: ...@@ -506,7 +506,7 @@ Ldata_ldrstr_regindex:
#ifdef FAULT_CODE_LDRSTRREG #ifdef FAULT_CODE_LDRSTRREG
orr r2, r2, #FAULT_CODE_LDRSTRREG orr r2, r2, #FAULT_CODE_LDRSTRREG
#endif #endif
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
Ldata_ldmstm: Ldata_ldmstm:
mov r7, #0x11 mov r7, #0x11
...@@ -543,7 +543,7 @@ Ldata_ldmstm: ...@@ -543,7 +543,7 @@ Ldata_ldmstm:
#ifdef FAULT_CODE_LDMSTM #ifdef FAULT_CODE_LDMSTM
orr r2, r2, #FAULT_CODE_LDMSTM orr r2, r2, #FAULT_CODE_LDMSTM
#endif #endif
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
Ldata_ldcstc_pre: Ldata_ldcstc_pre:
mov r0, r4, lsr #14 @ Get Rn mov r0, r4, lsr #14 @ Get Rn
...@@ -559,7 +559,7 @@ Ldata_ldcstc_pre: ...@@ -559,7 +559,7 @@ Ldata_ldcstc_pre:
#ifdef FAULT_CODE_LDCSTC #ifdef FAULT_CODE_LDCSTC
orr r2, r2, #FAULT_CODE_LDCSTC orr r2, r2, #FAULT_CODE_LDCSTC
#endif #endif
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
/* /*
......
...@@ -653,7 +653,7 @@ __und_invalid: sub sp, sp, #S_FRAME_SIZE ...@@ -653,7 +653,7 @@ __und_invalid: sub sp, sp, #S_FRAME_SIZE
stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0 stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0
mov r0, sp mov r0, sp
and r2, r6, #31 @ int mode and r2, r6, #31 @ int mode
b SYMBOL_NAME(bad_mode) b bad_mode
#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE #if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE
/* The FPE is always present */ /* The FPE is always present */
...@@ -725,7 +725,7 @@ __dabt_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -725,7 +725,7 @@ __dabt_svc: sub sp, sp, #S_FRAME_SIZE
#endif #endif
msr cpsr_c, r9 msr cpsr_c, r9
mov r2, sp mov r2, sp
bl SYMBOL_NAME(do_DataAbort) bl do_DataAbort
set_cpsr_c r0, #PSR_I_BIT | MODE_SVC set_cpsr_c r0, #PSR_I_BIT | MODE_SVC
ldr r0, [sp, #S_PSR] ldr r0, [sp, #S_PSR]
msr spsr, r0 msr spsr, r0
...@@ -778,7 +778,7 @@ svc_preempt: teq r9, #0 @ was preempt count = 0 ...@@ -778,7 +778,7 @@ svc_preempt: teq r9, #0 @ was preempt count = 0
mov r7, #PREEMPT_ACTIVE mov r7, #PREEMPT_ACTIVE
str r7, [r8, #TI_PREEMPT] @ set PREEMPT_ACTIVE str r7, [r8, #TI_PREEMPT] @ set PREEMPT_ACTIVE
1: set_cpsr_c r2, #MODE_SVC @ enable IRQs 1: set_cpsr_c r2, #MODE_SVC @ enable IRQs
bl SYMBOL_NAME(schedule) bl schedule
set_cpsr_c r0, #PSR_I_BIT | MODE_SVC @ disable IRQs set_cpsr_c r0, #PSR_I_BIT | MODE_SVC @ disable IRQs
ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS
tst r0, #_TIF_NEED_RESCHED tst r0, #_TIF_NEED_RESCHED
...@@ -801,7 +801,7 @@ __und_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -801,7 +801,7 @@ __und_svc: sub sp, sp, #S_FRAME_SIZE
mov r0, r5 @ unsigned long pc mov r0, r5 @ unsigned long pc
mov r1, sp @ struct pt_regs *regs mov r1, sp @ struct pt_regs *regs
bl SYMBOL_NAME(do_undefinstr) bl do_undefinstr
1: set_cpsr_c r0, #PSR_I_BIT | MODE_SVC 1: set_cpsr_c r0, #PSR_I_BIT | MODE_SVC
ldr lr, [sp, #S_PSR] @ Get SVC cpsr ldr lr, [sp, #S_PSR] @ Get SVC cpsr
...@@ -823,7 +823,7 @@ __pabt_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -823,7 +823,7 @@ __pabt_svc: sub sp, sp, #S_FRAME_SIZE
msr cpsr_c, r9 msr cpsr_c, r9
mov r0, r2 @ address (pc) mov r0, r2 @ address (pc)
mov r1, sp @ regs mov r1, sp @ regs
bl SYMBOL_NAME(do_PrefetchAbort) @ call abort handler bl do_PrefetchAbort @ call abort handler
set_cpsr_c r0, #PSR_I_BIT | MODE_SVC set_cpsr_c r0, #PSR_I_BIT | MODE_SVC
ldr r0, [sp, #S_PSR] ldr r0, [sp, #S_PSR]
msr spsr, r0 msr spsr, r0
...@@ -834,11 +834,11 @@ __pabt_svc: sub sp, sp, #S_FRAME_SIZE ...@@ -834,11 +834,11 @@ __pabt_svc: sub sp, sp, #S_FRAME_SIZE
.LCund: .word __temp_und .LCund: .word __temp_und
.LCabt: .word __temp_abt .LCabt: .word __temp_abt
#ifdef MULTI_ABORT #ifdef MULTI_ABORT
.LCprocfns: .word SYMBOL_NAME(processor) .LCprocfns: .word processor
#endif #endif
.LCfp: .word SYMBOL_NAME(fp_enter) .LCfp: .word fp_enter
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
.LCirq_stat: .word SYMBOL_NAME(irq_stat) .LCirq_stat: .word irq_stat
#endif #endif
irq_prio_table irq_prio_table
...@@ -867,7 +867,7 @@ __dabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go ...@@ -867,7 +867,7 @@ __dabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go
set_cpsr_c r2, #MODE_SVC @ Enable interrupts set_cpsr_c r2, #MODE_SVC @ Enable interrupts
mov r2, sp mov r2, sp
adrsvc al, lr, ret_from_exception adrsvc al, lr, ret_from_exception
b SYMBOL_NAME(do_DataAbort) b do_DataAbort
.align 5 .align 5
__irq_usr: sub sp, sp, #S_FRAME_SIZE __irq_usr: sub sp, sp, #S_FRAME_SIZE
...@@ -929,7 +929,7 @@ fpundefinstr: set_cpsr_c r0, #MODE_SVC @ Enable interrupts ...@@ -929,7 +929,7 @@ fpundefinstr: set_cpsr_c r0, #MODE_SVC @ Enable interrupts
mov r0, lr mov r0, lr
mov r1, sp mov r1, sp
adrsvc al, lr, ret_from_exception adrsvc al, lr, ret_from_exception
b SYMBOL_NAME(do_undefinstr) b do_undefinstr
.align 5 .align 5
__pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go __pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go
...@@ -944,7 +944,7 @@ __pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go ...@@ -944,7 +944,7 @@ __pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go
set_cpsr_c r0, #MODE_SVC @ Enable interrupts set_cpsr_c r0, #MODE_SVC @ Enable interrupts
mov r0, r5 @ address (pc) mov r0, r5 @ address (pc)
mov r1, sp @ regs mov r1, sp @ regs
bl SYMBOL_NAME(do_PrefetchAbort) @ call abort handler bl do_PrefetchAbort @ call abort handler
/* fall through */ /* fall through */
/* /*
* This is the return code to user mode for abort handlers * This is the return code to user mode for abort handlers
...@@ -1230,9 +1230,9 @@ __temp_abt: .word 0 @ Saved lr_abt ...@@ -1230,9 +1230,9 @@ __temp_abt: .word 0 @ Saved lr_abt
.word 0 @ Saved spsr_abt .word 0 @ Saved spsr_abt
.word -1 @ old_r0 .word -1 @ old_r0
.globl SYMBOL_NAME(cr_alignment) .globl cr_alignment
.globl SYMBOL_NAME(cr_no_alignment) .globl cr_no_alignment
SYMBOL_NAME(cr_alignment): cr_alignment:
.space 4 .space 4
SYMBOL_NAME(cr_no_alignment): cr_no_alignment:
.space 4 .space 4
...@@ -49,7 +49,7 @@ ret_fast_work: ...@@ -49,7 +49,7 @@ ret_fast_work:
b work_pending b work_pending
work_resched: work_resched:
bl SYMBOL_NAME(schedule) bl schedule
/* /*
* "slow" syscall return path. "why" tells us if this was a real syscall. * "slow" syscall return path. "why" tells us if this was a real syscall.
*/ */
...@@ -70,7 +70,7 @@ no_work_pending: ...@@ -70,7 +70,7 @@ no_work_pending:
__do_notify_resume: __do_notify_resume:
mov r0, sp @ 'regs' mov r0, sp @ 'regs'
mov r2, why @ 'syscall' mov r2, why @ 'syscall'
b SYMBOL_NAME(do_notify_resume) @ note the bl above sets lr b do_notify_resume @ note the bl above sets lr
/* /*
* This is how we return from a fork. * This is how we return from a fork.
...@@ -86,7 +86,7 @@ ENTRY(ret_from_fork) ...@@ -86,7 +86,7 @@ ENTRY(ret_from_fork)
beq ret_slow_syscall beq ret_slow_syscall
mov r1, sp mov r1, sp
mov r0, #1 @ trace exit [IP = 1] mov r0, #1 @ trace exit [IP = 1]
bl SYMBOL_NAME(syscall_trace) bl syscall_trace
b ret_slow_syscall b ret_slow_syscall
...@@ -154,8 +154,8 @@ ENTRY(vector_swi) ...@@ -154,8 +154,8 @@ ENTRY(vector_swi)
2: mov why, #0 @ no longer a real syscall 2: mov why, #0 @ no longer a real syscall
cmp scno, #ARMSWI_OFFSET cmp scno, #ARMSWI_OFFSET
eor r0, scno, #OS_NUMBER << 20 @ put OS number back eor r0, scno, #OS_NUMBER << 20 @ put OS number back
bcs SYMBOL_NAME(arm_syscall) bcs arm_syscall
b SYMBOL_NAME(sys_ni_syscall) @ not private func b sys_ni_syscall @ not private func
/* /*
* This is the really slow path. We're going to be doing * This is the really slow path. We're going to be doing
...@@ -164,7 +164,7 @@ ENTRY(vector_swi) ...@@ -164,7 +164,7 @@ ENTRY(vector_swi)
__sys_trace: __sys_trace:
add r1, sp, #S_OFF add r1, sp, #S_OFF
mov r0, #0 @ trace entry [IP = 0] mov r0, #0 @ trace entry [IP = 0]
bl SYMBOL_NAME(syscall_trace) bl syscall_trace
adrsvc al, lr, __sys_trace_return @ return address adrsvc al, lr, __sys_trace_return @ return address
add r1, sp, #S_R0 + S_OFF @ pointer to regs add r1, sp, #S_R0 + S_OFF @ pointer to regs
...@@ -177,14 +177,14 @@ __sys_trace_return: ...@@ -177,14 +177,14 @@ __sys_trace_return:
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
mov r1, sp mov r1, sp
mov r0, #1 @ trace exit [IP = 1] mov r0, #1 @ trace exit [IP = 1]
bl SYMBOL_NAME(syscall_trace) bl syscall_trace
b ret_slow_syscall b ret_slow_syscall
.align 5 .align 5
#ifdef CONFIG_ALIGNMENT_TRAP #ifdef CONFIG_ALIGNMENT_TRAP
.type __cr_alignment, #object .type __cr_alignment, #object
__cr_alignment: __cr_alignment:
.word SYMBOL_NAME(cr_alignment) .word cr_alignment
#endif #endif
.type sys_call_table, #object .type sys_call_table, #object
...@@ -197,7 +197,7 @@ ENTRY(sys_call_table) ...@@ -197,7 +197,7 @@ ENTRY(sys_call_table)
@ r0 = syscall number @ r0 = syscall number
@ r5 = syscall table @ r5 = syscall table
.type sys_syscall, #function .type sys_syscall, #function
SYMBOL_NAME(sys_syscall): sys_syscall:
eor scno, r0, #OS_NUMBER << 20 eor scno, r0, #OS_NUMBER << 20
cmp scno, #NR_syscalls @ check range cmp scno, #NR_syscalls @ check range
stmleia sp, {r5, r6} @ shuffle args stmleia sp, {r5, r6} @ shuffle args
...@@ -210,35 +210,35 @@ SYMBOL_NAME(sys_syscall): ...@@ -210,35 +210,35 @@ SYMBOL_NAME(sys_syscall):
sys_fork_wrapper: sys_fork_wrapper:
add r0, sp, #S_OFF add r0, sp, #S_OFF
b SYMBOL_NAME(sys_fork) b sys_fork
sys_vfork_wrapper: sys_vfork_wrapper:
add r0, sp, #S_OFF add r0, sp, #S_OFF
b SYMBOL_NAME(sys_vfork) b sys_vfork
sys_execve_wrapper: sys_execve_wrapper:
add r3, sp, #S_OFF add r3, sp, #S_OFF
b SYMBOL_NAME(sys_execve) b sys_execve
sys_clone_wapper: sys_clone_wapper:
add r2, sp, #S_OFF add r2, sp, #S_OFF
b SYMBOL_NAME(sys_clone) b sys_clone
sys_sigsuspend_wrapper: sys_sigsuspend_wrapper:
add r3, sp, #S_OFF add r3, sp, #S_OFF
b SYMBOL_NAME(sys_sigsuspend) b sys_sigsuspend
sys_rt_sigsuspend_wrapper: sys_rt_sigsuspend_wrapper:
add r2, sp, #S_OFF add r2, sp, #S_OFF
b SYMBOL_NAME(sys_rt_sigsuspend) b sys_rt_sigsuspend
sys_sigreturn_wrapper: sys_sigreturn_wrapper:
add r0, sp, #S_OFF add r0, sp, #S_OFF
b SYMBOL_NAME(sys_sigreturn) b sys_sigreturn
sys_rt_sigreturn_wrapper: sys_rt_sigreturn_wrapper:
add r0, sp, #S_OFF add r0, sp, #S_OFF
b SYMBOL_NAME(sys_rt_sigreturn) b sys_rt_sigreturn
sys_sigaltstack_wrapper: sys_sigaltstack_wrapper:
ldr r2, [sp, #S_OFF + S_SP] ldr r2, [sp, #S_OFF + S_SP]
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#error TEXTADDR must start at 0xXXXX8000 #error TEXTADDR must start at 0xXXXX8000
#endif #endif
.globl SYMBOL_NAME(swapper_pg_dir) .globl swapper_pg_dir
.equ SYMBOL_NAME(swapper_pg_dir), TEXTADDR - 0x4000 .equ swapper_pg_dir, TEXTADDR - 0x4000
.macro pgtbl, reg, rambase .macro pgtbl, reg, rambase
adr \reg, stext adr \reg, stext
...@@ -144,13 +144,13 @@ __entry: ...@@ -144,13 +144,13 @@ __entry:
.type __switch_data, %object .type __switch_data, %object
__switch_data: .long __mmap_switched __switch_data: .long __mmap_switched
.long SYMBOL_NAME(compat) .long compat
.long SYMBOL_NAME(__bss_start) .long __bss_start
.long SYMBOL_NAME(_end) .long _end
.long SYMBOL_NAME(processor_id) .long processor_id
.long SYMBOL_NAME(__machine_arch_type) .long __machine_arch_type
.long SYMBOL_NAME(cr_alignment) .long cr_alignment
.long SYMBOL_NAME(init_thread_union)+8192 .long init_thread_union+8192
.type __ret, %function .type __ret, %function
__ret: ldr lr, __switch_data __ret: ldr lr, __switch_data
...@@ -187,7 +187,7 @@ __mmap_switched: ...@@ -187,7 +187,7 @@ __mmap_switched:
#endif #endif
bic r2, r0, #2 @ Clear 'A' bit bic r2, r0, #2 @ Clear 'A' bit
stmia r8, {r0, r2} @ Save control register values stmia r8, {r0, r2} @ Save control register values
b SYMBOL_NAME(start_kernel) b start_kernel
......
...@@ -60,7 +60,7 @@ ENTRY(c_backtrace) ...@@ -60,7 +60,7 @@ ENTRY(c_backtrace)
adr r0, .Lfe adr r0, .Lfe
mov r1, save mov r1, save
bic r2, r2, mask bic r2, r2, mask
bl SYMBOL_NAME(printk) @ print pc and link register bl printk @ print pc and link register
sub r0, frame, #16 sub r0, frame, #16
1002: ldr r1, [save, #4] @ get instruction at function+4 1002: ldr r1, [save, #4] @ get instruction at function+4
...@@ -89,7 +89,7 @@ ENTRY(c_backtrace) ...@@ -89,7 +89,7 @@ ENTRY(c_backtrace)
.align 0 .align 0
1004: ldr r0, =.Lbad 1004: ldr r0, =.Lbad
mov r1, frame mov r1, frame
bl SYMBOL_NAME(printk) bl printk
LOADREGS(fd, sp!, {r4 - r8, pc}) LOADREGS(fd, sp!, {r4 - r8, pc})
.ltorg .ltorg
.previous .previous
...@@ -121,12 +121,12 @@ ENTRY(c_backtrace) ...@@ -121,12 +121,12 @@ ENTRY(c_backtrace)
ldr r2, [stack], #-4 ldr r2, [stack], #-4
mov r1, reg mov r1, reg
adr r0, .Lfp adr r0, .Lfp
bl SYMBOL_NAME(printk) bl printk
2: subs reg, reg, #1 2: subs reg, reg, #1
bpl 1b bpl 1b
teq r7, #0 teq r7, #0
adrne r0, .Lcr adrne r0, .Lcr
blne SYMBOL_NAME(printk) blne printk
mov r0, stack mov r0, stack
LOADREGS(fd, sp!, {instr, reg, stack, r7, pc}) LOADREGS(fd, sp!, {instr, reg, stack, r7, pc})
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <asm/assembler.h> #include <asm/assembler.h>
.text .text
LC0: .word SYMBOL_NAME(loops_per_jiffy) LC0: .word loops_per_jiffy
/* /*
* 0 <= r0 <= 2000 * 0 <= r0 <= 2000
...@@ -53,5 +53,5 @@ ENTRY(__delay) ...@@ -53,5 +53,5 @@ ENTRY(__delay)
RETINSTR(movls,pc,lr) RETINSTR(movls,pc,lr)
subs r0, r0, #1 subs r0, r0, #1
#endif #endif
bhi SYMBOL_NAME(__delay) bhi __delay
RETINSTR(mov,pc,lr) RETINSTR(mov,pc,lr)
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
#include <asm/assembler.h> #include <asm/assembler.h>
.text .text
.global SYMBOL_NAME(floppy_fiqin_end) .global floppy_fiqin_end
ENTRY(floppy_fiqin_start) ENTRY(floppy_fiqin_start)
subs r9, r9, #1 subs r9, r9, #1
ldrgtb r12, [r11, #-4] ldrgtb r12, [r11, #-4]
ldrleb r12, [r11], #0 ldrleb r12, [r11], #0
strb r12, [r10], #1 strb r12, [r10], #1
subs pc, lr, #4 subs pc, lr, #4
SYMBOL_NAME(floppy_fiqin_end): floppy_fiqin_end:
.global SYMBOL_NAME(floppy_fiqout_end) .global floppy_fiqout_end
ENTRY(floppy_fiqout_start) ENTRY(floppy_fiqout_start)
subs r9, r9, #1 subs r9, r9, #1
ldrgeb r12, [r10], #1 ldrgeb r12, [r10], #1
...@@ -29,4 +29,4 @@ ENTRY(floppy_fiqout_start) ...@@ -29,4 +29,4 @@ ENTRY(floppy_fiqout_start)
subles pc, lr, #4 subles pc, lr, #4
strb r12, [r11, #-4] strb r12, [r11, #-4]
subs pc, lr, #4 subs pc, lr, #4
SYMBOL_NAME(floppy_fiqout_end): floppy_fiqout_end:
...@@ -52,7 +52,7 @@ ENTRY(insl) ...@@ -52,7 +52,7 @@ ENTRY(insl)
ENTRY(outsl) ENTRY(outsl)
adr r0, .iosl_warning adr r0, .iosl_warning
mov r1, lr mov r1, lr
b SYMBOL_NAME(printk) b printk
@ Purpose: write a memc register @ Purpose: write a memc register
@ Proto : void memc_write(int register, int value); @ Proto : void memc_write(int register, int value);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.insw_bad_alignment: .insw_bad_alignment:
adr r0, .insw_bad_align_msg adr r0, .insw_bad_align_msg
mov r2, lr mov r2, lr
b SYMBOL_NAME(panic) b panic
.insw_bad_align_msg: .insw_bad_align_msg:
.asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
.align .align
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.insw_bad_alignment: .insw_bad_alignment:
adr r0, .insw_bad_align_msg adr r0, .insw_bad_align_msg
mov r2, lr mov r2, lr
b SYMBOL_NAME(panic) b panic
.insw_bad_align_msg: .insw_bad_align_msg:
.asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
.align .align
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.outsw_bad_alignment: .outsw_bad_alignment:
adr r0, .outsw_bad_align_msg adr r0, .outsw_bad_align_msg
mov r2, lr mov r2, lr
b SYMBOL_NAME(panic) b panic
.outsw_bad_align_msg: .outsw_bad_align_msg:
.asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
.align .align
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.outsw_bad_alignment: .outsw_bad_alignment:
adr r0, .outsw_bad_align_msg adr r0, .outsw_bad_align_msg
mov r2, lr mov r2, lr
b SYMBOL_NAME(panic) b panic
.outsw_bad_align_msg: .outsw_bad_align_msg:
.asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
.align .align
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
.text .text
.globl SYMBOL_NAME(uaccess_user) .globl uaccess_user
SYMBOL_NAME(uaccess_user): uaccess_user:
.word uaccess_user_put_byte .word uaccess_user_put_byte
.word uaccess_user_get_byte .word uaccess_user_get_byte
.word uaccess_user_put_half .word uaccess_user_put_half
...@@ -84,8 +84,8 @@ USER( ldrt r0, [r0]) ...@@ -84,8 +84,8 @@ USER( ldrt r0, [r0])
.globl SYMBOL_NAME(uaccess_kernel) .globl uaccess_kernel
SYMBOL_NAME(uaccess_kernel): uaccess_kernel:
.word uaccess_kernel_put_byte .word uaccess_kernel_put_byte
.word uaccess_kernel_get_byte .word uaccess_kernel_get_byte
.word uaccess_kernel_put_half .word uaccess_kernel_put_half
...@@ -154,7 +154,7 @@ uaccess_kernel_get_word: ...@@ -154,7 +154,7 @@ uaccess_kernel_get_word:
*/ */
uaccess_kernel_copy: uaccess_kernel_copy:
stmfd sp!, {lr} stmfd sp!, {lr}
bl SYMBOL_NAME(memcpy) bl memcpy
mov r0, #0 mov r0, #0
ldmfd sp!, {pc}^ ldmfd sp!, {pc}^
......
...@@ -544,7 +544,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault ...@@ -544,7 +544,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault
ldr r1, [sp], #4 @ unsigned long count ldr r1, [sp], #4 @ unsigned long count
subs r4, r1, r2 @ bytes left to copy subs r4, r1, r2 @ bytes left to copy
movne r1, r4 movne r1, r4
blne SYMBOL_NAME(__memzero) blne __memzero
mov r0, r4 mov r0, r4
LOADREGS(fd,sp!, {r4 - r7, pc}) LOADREGS(fd,sp!, {r4 - r7, pc})
.previous .previous
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
.globl SYMBOL_NAME(swapper_pg_dir) .globl swapper_pg_dir
.equ SYMBOL_NAME(swapper_pg_dir), 0x0207d000 .equ swapper_pg_dir, 0x0207d000
/* /*
* Entry point. * Entry point.
...@@ -38,14 +38,14 @@ __entry: cmp pc, #0x02000000 ...@@ -38,14 +38,14 @@ __entry: cmp pc, #0x02000000
str r0, [r5] str r0, [r5]
mov fp, #0 mov fp, #0
b SYMBOL_NAME(start_kernel) b start_kernel
LC0: .word SYMBOL_NAME(_stext) LC0: .word _stext
.word SYMBOL_NAME(__bss_start) @ r2 .word __bss_start @ r2
.word SYMBOL_NAME(_end) @ r3 .word _end @ r3
.word SYMBOL_NAME(processor_id) @ r4 .word processor_id @ r4
.word SYMBOL_NAME(__machine_arch_type) @ r5 .word __machine_arch_type @ r5
.word SYMBOL_NAME(init_task_union)+8192 @ sp .word init_task_union+8192 @ sp
arm2_id: .long 0x41560200 arm2_id: .long 0x41560200
arm250_id: .long 0x41560250 arm250_id: .long 0x41560250
.align .align
......
...@@ -72,12 +72,12 @@ ENTRY(sa1100_cpu_suspend) ...@@ -72,12 +72,12 @@ ENTRY(sa1100_cpu_suspend)
@ delay 90us and set CPU PLL to lowest speed @ delay 90us and set CPU PLL to lowest speed
@ fixes resume problem on high speed SA1110 @ fixes resume problem on high speed SA1110
mov r0, #90 mov r0, #90
bl SYMBOL_NAME(udelay) bl udelay
ldr r0, =PPCR ldr r0, =PPCR
mov r1, #0 mov r1, #0
str r1, [r0] str r1, [r0]
mov r0, #90 mov r0, #90
bl SYMBOL_NAME(udelay) bl udelay
/* setup up register contents for jump to page containing SA1110 SDRAM controller bug fix suspend code /* setup up register contents for jump to page containing SA1110 SDRAM controller bug fix suspend code
......
...@@ -189,7 +189,7 @@ clear_tables: ldr r1, _arm3_set_pgd - 4 ...@@ -189,7 +189,7 @@ clear_tables: ldr r1, _arm3_set_pgd - 4
* Params : pgd New page tables/MEMC mapping * Params : pgd New page tables/MEMC mapping
* Purpose : update MEMC hardware with new mapping * Purpose : update MEMC hardware with new mapping
*/ */
.word SYMBOL_NAME(page_nr) .word page_nr
_arm3_set_pgd: mcr p15, 0, r1, c1, c0, 0 @ flush cache _arm3_set_pgd: mcr p15, 0, r1, c1, c0, 0 @ flush cache
_arm2_set_pgd: stmfd sp!, {lr} _arm2_set_pgd: stmfd sp!, {lr}
ldr r1, _arm3_set_pgd - 4 ldr r1, _arm3_set_pgd - 4
...@@ -285,8 +285,8 @@ _arm3_name: .asciz "ARM 3" ...@@ -285,8 +285,8 @@ _arm3_name: .asciz "ARM 3"
* Purpose : Function pointers used to access above functions - all calls * Purpose : Function pointers used to access above functions - all calls
* come through these * come through these
*/ */
.globl SYMBOL_NAME(arm2_processor_functions) .globl arm2_processor_functions
SYMBOL_NAME(arm2_processor_functions): arm2_processor_functions:
.word _arm2_3_check_bugs .word _arm2_3_check_bugs
.word _arm2_proc_init .word _arm2_proc_init
.word _arm2_proc_fin .word _arm2_proc_fin
...@@ -298,8 +298,8 @@ cpu_arm2_info: ...@@ -298,8 +298,8 @@ cpu_arm2_info:
.long armvlsi_name .long armvlsi_name
.long _arm2_name .long _arm2_name
.globl SYMBOL_NAME(arm250_processor_functions) .globl arm250_processor_functions
SYMBOL_NAME(arm250_processor_functions): arm250_processor_functions:
.word _arm2_3_check_bugs .word _arm2_3_check_bugs
.word _arm2_proc_init .word _arm2_proc_init
.word _arm2_proc_fin .word _arm2_proc_fin
...@@ -311,8 +311,8 @@ cpu_arm250_info: ...@@ -311,8 +311,8 @@ cpu_arm250_info:
.long armvlsi_name .long armvlsi_name
.long _arm250_name .long _arm250_name
.globl SYMBOL_NAME(arm3_processor_functions) .globl arm3_processor_functions
SYMBOL_NAME(arm3_processor_functions): arm3_processor_functions:
.word _arm2_3_check_bugs .word _arm2_3_check_bugs
.word _arm3_proc_init .word _arm3_proc_init
.word _arm3_proc_fin .word _arm3_proc_fin
...@@ -340,7 +340,7 @@ arm3_elf_name: .asciz "v2" ...@@ -340,7 +340,7 @@ arm3_elf_name: .asciz "v2"
.long arm2_elf_name .long arm2_elf_name
.long 0 .long 0
.long cpu_arm2_info .long cpu_arm2_info
.long SYMBOL_NAME(arm2_processor_functions) .long arm2_processor_functions
.long 0 .long 0
.long 0 .long 0
...@@ -352,7 +352,7 @@ arm3_elf_name: .asciz "v2" ...@@ -352,7 +352,7 @@ arm3_elf_name: .asciz "v2"
.long arm3_elf_name .long arm3_elf_name
.long 0 .long 0
.long cpu_arm250_info .long cpu_arm250_info
.long SYMBOL_NAME(arm250_processor_functions) .long arm250_processor_functions
.long 0 .long 0
.long 0 .long 0
...@@ -364,7 +364,7 @@ arm3_elf_name: .asciz "v2" ...@@ -364,7 +364,7 @@ arm3_elf_name: .asciz "v2"
.long arm3_elf_name .long arm3_elf_name
.long 0 .long 0
.long cpu_arm3_info .long cpu_arm3_info
.long SYMBOL_NAME(arm3_processor_functions) .long arm3_processor_functions
.long 0 .long 0
.long 0 .long 0
...@@ -392,3 +392,26 @@ CONFIG_ETRAX_RESCUE_SER2 ...@@ -392,3 +392,26 @@ CONFIG_ETRAX_RESCUE_SER2
CONFIG_ETRAX_RESCUE_SER3 CONFIG_ETRAX_RESCUE_SER3
Use serial port 3 as the rescue port. Use serial port 3 as the rescue port.
CONFIG_ETRAX_POWERBUTTON_BIT
Configure where power button is connected.
CONFIG_ETRAX_ROOT_DEVICE
Specifies the device that should be mounted as root file system
when booting from flash. The axisflashmap driver adds an additional
mtd partition for the appended root file system image, so this option
should normally be the mtdblock device for the partition after the
last partition in the partition table.
CONFIG_ETRAX_SHUTDOWN_BIT
Configure what pin on CSPO-port that is used for controlling power
supply.
CONFIG_ETRAX_SOFT_SHUTDOWN
Enable this if Etrax is used with a power-supply that can be turned
off and on with PS_ON signal. Gives the possibility to detect
powerbutton and then do a power off after unmounting disks.
CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
By enabling this you make sure that the watchdog does not bite while
printing oopses. Recommended for development systems but not for
production releases.
...@@ -572,3 +572,39 @@ CONFIG_ETRAX_PARALLEL_PORT0 ...@@ -572,3 +572,39 @@ CONFIG_ETRAX_PARALLEL_PORT0
CONFIG_ETRAX_PARALLEL_PORT1 CONFIG_ETRAX_PARALLEL_PORT1
Say Y here to enable parallel port 1. Say Y here to enable parallel port 1.
CONFIG_ETRAX_ETHERNET_LPSLAVE
This option enables a slave ETRAX 100 or ETRAX 100LX, connected to a
master ETRAX 100 or ETRAX 100LX through par0 and par1, to act as an
Ethernet controller.
CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS
Enable if the slave has it's own LEDs.
CONFIG_ETRAX_IDE
Enable this to get support for ATA/IDE. You can't use parallel
ports or SCSI ports at the same time.
CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
Selecting LED_on_when_link will light the LED when there is a
connection and will flash off when there is activity.
Selecting LED_on_when_activity will light the LED only when
there is activity.
This setting will also affect the behaviour of other activity LEDs
e.g. Bluetooth.
CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK
Selecting LED_on_when_link will light the LED when there is a
connection and will flash off when there is activity.
Selecting LED_on_when_activity will light the LED only when
there is activity.
This setting will also affect the behaviour of other activity LEDs
e.g. Bluetooth.
CONFIG_ETRAX_SERIAL_PORT0
Enables the ETRAX 100 serial driver for ser0 (ttyS0)
Normally you want this on, unless you use external DMA 1 that uses
the same DMA channels.
...@@ -313,7 +313,7 @@ e100_open(struct net_device *dev) ...@@ -313,7 +313,7 @@ e100_open(struct net_device *dev)
IO_STATE(R_PAR0_CONFIG, iautofd, noninv) | IO_STATE(R_PAR0_CONFIG, iautofd, noninv) |
/* Not used in reverse direction, don't care */ /* Not used in reverse direction, don't care */
IO_STATE(R_PAR0_CONFIG, istrb, noninv) | IO_STATE(R_PAR0_CONFIG, istrb, noninv) |
/* Not connected, don't care / /* Not connected, don't care */
IO_STATE(R_PAR0_CONFIG, iinit, noninv) | IO_STATE(R_PAR0_CONFIG, iinit, noninv) |
/* perror is GND and reverse wants 0, noninv */ /* perror is GND and reverse wants 0, noninv */
IO_STATE(R_PAR0_CONFIG, iperr, noninv) | IO_STATE(R_PAR0_CONFIG, iperr, noninv) |
......
This diff is collapsed.
...@@ -826,6 +826,10 @@ CONFIG_X86_MCE_NONFATAL ...@@ -826,6 +826,10 @@ CONFIG_X86_MCE_NONFATAL
or out-of-spec (ie, overclocked) hardware. or out-of-spec (ie, overclocked) hardware.
This option only does something on hardware with Intel P6 style MCE. This option only does something on hardware with Intel P6 style MCE.
(Pentium Pro and above, AMD Athlon/Duron) (Pentium Pro and above, AMD Athlon/Duron)
CONFIG_X86_MCE_P4THERMAL
Enabling this feature will cause a message to be printed when the P4
enters thermal throttling.
CONFIG_TOSHIBA CONFIG_TOSHIBA
This adds a driver to safely access the System Management Mode of This adds a driver to safely access the System Management Mode of
......
...@@ -37,7 +37,7 @@ startup_32: ...@@ -37,7 +37,7 @@ startup_32:
movl %eax,%fs movl %eax,%fs
movl %eax,%gs movl %eax,%gs
lss SYMBOL_NAME(stack_start),%esp lss stack_start,%esp
xorl %eax,%eax xorl %eax,%eax
1: incl %eax # check that A20 really IS enabled 1: incl %eax # check that A20 really IS enabled
movl %eax,0x000000 # loop forever if it isn't movl %eax,0x000000 # loop forever if it isn't
...@@ -55,8 +55,8 @@ startup_32: ...@@ -55,8 +55,8 @@ startup_32:
* Clear BSS * Clear BSS
*/ */
xorl %eax,%eax xorl %eax,%eax
movl $ SYMBOL_NAME(_edata),%edi movl $_edata,%edi
movl $ SYMBOL_NAME(_end),%ecx movl $_end,%ecx
subl %edi,%ecx subl %edi,%ecx
cld cld
rep rep
...@@ -68,7 +68,7 @@ startup_32: ...@@ -68,7 +68,7 @@ startup_32:
movl %esp,%eax movl %esp,%eax
pushl %esi # real mode pointer as second arg pushl %esi # real mode pointer as second arg
pushl %eax # address of structure as first arg pushl %eax # address of structure as first arg
call SYMBOL_NAME(decompress_kernel) call decompress_kernel
orl %eax,%eax orl %eax,%eax
jnz 3f jnz 3f
popl %esi # discard address popl %esi # discard address
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
* if CX/DX have been changed in the e801 call and if so use AX/BX . * if CX/DX have been changed in the e801 call and if so use AX/BX .
* Michael Miller, April 2001 <michaelm@mjmm.org> * Michael Miller, April 2001 <michaelm@mjmm.org>
* *
* New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes
* by Robert Schwebel, December 2001 <robert@schwebel.de>
*
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -651,8 +654,19 @@ end_move_self: # now we are at the right place ...@@ -651,8 +654,19 @@ end_move_self: # now we are at the right place
# #
# Enable A20. This is at the very best an annoying procedure. # Enable A20. This is at the very best an annoying procedure.
# A20 code ported from SYSLINUX 1.52-1.63 by H. Peter Anvin. # A20 code ported from SYSLINUX 1.52-1.63 by H. Peter Anvin.
# AMD Elan bug fix by Robert Schwebel.
# #
#if defined(CONFIG_MELAN)
movb $0x02, %al # alternate A20 gate
outb %al, $0x92 # this works on SC410/SC520
a20_elan_wait:
call a20_test
jz a20_elan_wait
jmp a20_done
#endif
A20_TEST_LOOPS = 32 # Iterations per wait A20_TEST_LOOPS = 32 # Iterations per wait
A20_ENABLE_LOOPS = 255 # Total loops to try A20_ENABLE_LOOPS = 255 # Total loops to try
......
...@@ -154,7 +154,9 @@ if [ "$CONFIG_MWINCHIP3D" = "y" ]; then ...@@ -154,7 +154,9 @@ if [ "$CONFIG_MWINCHIP3D" = "y" ]; then
fi fi
bool 'Machine Check Exception' CONFIG_X86_MCE bool 'Machine Check Exception' CONFIG_X86_MCE
dep_bool 'Check for non-fatal errors' CONFIG_X86_MCE_NONFATAL $CONFIG_X86_MCE dep_bool 'Check for non-fatal errors on Athlon/Duron' CONFIG_X86_MCE_NONFATAL $CONFIG_X86_MCE
dep_bool 'check for P4 thermal throttling interrupt.' CONFIG_X86_MCE_P4THERMAL $CONFIG_X86_MCE $CONFIG_X86_LOCAL_APIC
tristate 'Toshiba Laptop support' CONFIG_TOSHIBA tristate 'Toshiba Laptop support' CONFIG_TOSHIBA
tristate 'Dell laptop support' CONFIG_I8K tristate 'Dell laptop support' CONFIG_I8K
......
...@@ -58,7 +58,8 @@ CONFIG_X86_TSC=y ...@@ -58,7 +58,8 @@ CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y CONFIG_X86_GOOD_APIC=y
CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_MCE=y CONFIG_X86_MCE=y
# CONFIG_X86_MCE_NONFATAL is not set CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
# CONFIG_TOSHIBA is not set # CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set # CONFIG_I8K is not set
# CONFIG_MICROCODE is not set # CONFIG_MICROCODE is not set
......
...@@ -36,7 +36,7 @@ wakeup_code: ...@@ -36,7 +36,7 @@ wakeup_code:
orl $0x80000001, %eax orl $0x80000001, %eax
movl %eax, %cr0 movl %eax, %cr0
ljmpl $__KERNEL_CS,$SYMBOL_NAME(wakeup_pmode_return) ljmpl $__KERNEL_CS,$wakeup_pmode_return
.code32 .code32
ALIGN ALIGN
......
...@@ -78,6 +78,13 @@ void clear_local_APIC(void) ...@@ -78,6 +78,13 @@ void clear_local_APIC(void)
apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED); apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED);
} }
/* lets not touch this if we didn't frob it */
#ifdef CONFIG_X86_MCE_P4THERMAL
if (maxlvt >= 5) {
v = apic_read(APIC_LVTTHMR);
apic_write_around(APIC_LVTTHMR, v | APIC_LVT_MASKED);
}
#endif
/* /*
* Clean APIC state for other OSs: * Clean APIC state for other OSs:
*/ */
...@@ -88,6 +95,11 @@ void clear_local_APIC(void) ...@@ -88,6 +95,11 @@ void clear_local_APIC(void)
apic_write_around(APIC_LVTERR, APIC_LVT_MASKED); apic_write_around(APIC_LVTERR, APIC_LVT_MASKED);
if (maxlvt >= 4) if (maxlvt >= 4)
apic_write_around(APIC_LVTPC, APIC_LVT_MASKED); apic_write_around(APIC_LVTPC, APIC_LVT_MASKED);
#ifdef CONFIG_X86_MCE_P4THERMAL
if (maxlvt >= 5)
apic_write_around(APIC_LVTTHMR, APIC_LVT_MASKED);
#endif
v = GET_APIC_VERSION(apic_read(APIC_LVR)); v = GET_APIC_VERSION(apic_read(APIC_LVR));
if (APIC_INTEGRATED(v)) { /* !82489DX */ if (APIC_INTEGRATED(v)) { /* !82489DX */
if (maxlvt > 3) /* Due to Pentium errata 3AP and 11AP. */ if (maxlvt > 3) /* Due to Pentium errata 3AP and 11AP. */
...@@ -472,6 +484,7 @@ static void apic_pm_suspend(void *data) ...@@ -472,6 +484,7 @@ static void apic_pm_suspend(void *data)
apic_pm_state.apic_tmict = apic_read(APIC_TMICT); apic_pm_state.apic_tmict = apic_read(APIC_TMICT);
apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); apic_pm_state.apic_tdcr = apic_read(APIC_TDCR);
apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
__save_flags(flags); __save_flags(flags);
__cli(); __cli();
disable_local_APIC(); disable_local_APIC();
......
...@@ -578,7 +578,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in, ...@@ -578,7 +578,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS __asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t" "pushl %%edi\n\t"
"pushl %%ebp\n\t" "pushl %%ebp\n\t"
"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" "lcall *%%cs:apm_bios_entry\n\t"
"setc %%al\n\t" "setc %%al\n\t"
"popl %%ebp\n\t" "popl %%ebp\n\t"
"popl %%edi\n\t" "popl %%edi\n\t"
...@@ -625,7 +625,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax) ...@@ -625,7 +625,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
__asm__ __volatile__(APM_DO_ZERO_SEGS __asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t" "pushl %%edi\n\t"
"pushl %%ebp\n\t" "pushl %%ebp\n\t"
"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" "lcall *%%cs:apm_bios_entry\n\t"
"setc %%bl\n\t" "setc %%bl\n\t"
"popl %%ebp\n\t" "popl %%ebp\n\t"
"popl %%edi\n\t" "popl %%edi\n\t"
......
/*
* arch/i386/kernel/bluesmoke.c - x86 Machine Check Exception Reporting
*/
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -19,21 +22,12 @@ static int mce_disabled __initdata = 0; ...@@ -19,21 +22,12 @@ static int mce_disabled __initdata = 0;
static int banks; static int banks;
/*
* If we get an MCE, we don't know what state the caches/TLB's are
* going to be in, so we throw them all away.
*/
static void inline flush_all (void)
{
__asm__ __volatile__ ("invd": : );
__flush_tlb();
}
#ifdef CONFIG_X86_MCE_P4THERMAL
/* /*
* P4/Xeon Thermal transition interrupt handler * P4/Xeon Thermal transition interrupt handler
*/ */
#ifdef CONFIG_X86_LOCAL_APIC
static void intel_thermal_interrupt(struct pt_regs *regs) static void intel_thermal_interrupt(struct pt_regs *regs)
{ {
u32 l, h; u32 l, h;
...@@ -49,7 +43,6 @@ static void intel_thermal_interrupt(struct pt_regs *regs) ...@@ -49,7 +43,6 @@ static void intel_thermal_interrupt(struct pt_regs *regs)
printk(KERN_INFO "CPU#%d: Temperature/speed normal\n", cpu); printk(KERN_INFO "CPU#%d: Temperature/speed normal\n", cpu);
} }
} }
#endif
static void unexpected_thermal_interrupt(struct pt_regs *regs) static void unexpected_thermal_interrupt(struct pt_regs *regs)
{ {
...@@ -71,14 +64,13 @@ asmlinkage void smp_thermal_interrupt(struct pt_regs regs) ...@@ -71,14 +64,13 @@ asmlinkage void smp_thermal_interrupt(struct pt_regs regs)
static void __init intel_init_thermal(struct cpuinfo_x86 *c) static void __init intel_init_thermal(struct cpuinfo_x86 *c)
{ {
#ifdef CONFIG_X86_LOCAL_APIC
u32 l, h; u32 l, h;
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
/* Thermal monitoring */ /* Thermal monitoring */
if (!test_bit(X86_FEATURE_ACPI, c->x86_capability)) if (!test_bit(X86_FEATURE_ACPI, c->x86_capability))
return; /* -ENODEV */ return; /* -ENODEV */
/* Clock modulation */ /* Clock modulation */
if (!test_bit(X86_FEATURE_ACC, c->x86_capability)) if (!test_bit(X86_FEATURE_ACC, c->x86_capability))
return; /* -ENODEV */ return; /* -ENODEV */
...@@ -96,16 +88,16 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c) ...@@ -96,16 +88,16 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c)
printk(KERN_INFO "CPU#%d: Thermal monitoring enabled\n", cpu); printk(KERN_INFO "CPU#%d: Thermal monitoring enabled\n", cpu);
} }
/* check wether a vector already exists */ /* check whether a vector already exists */
l = apic_read(APIC_LVTTHMR); l = apic_read(APIC_LVTTHMR);
if (l & 0xff) { if (l & 0xff) {
printk(KERN_DEBUG "CPU#%d: Thermal LVT already handled\n", cpu); printk(KERN_DEBUG "CPU#%d: Thermal LVT already handled\n", cpu);
return; /* -EBUSY */ return; /* -EBUSY */
} }
wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h); wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h);
printk(KERN_INFO "CPU#%d: Thermal monitoring enabled\n", cpu); printk(KERN_INFO "CPU#%d: Thermal monitoring enabled\n", cpu);
/* The temperature transition interrupt handler setup */ /* The temperature transition interrupt handler setup */
l = THERMAL_APIC_VECTOR; /* our delivery vector */ l = THERMAL_APIC_VECTOR; /* our delivery vector */
l |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ l |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */
...@@ -120,8 +112,9 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c) ...@@ -120,8 +112,9 @@ static void __init intel_init_thermal(struct cpuinfo_x86 *c)
apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
return; return;
#endif
} }
#endif /* CONFIG_X86_MCE_P4THERMAL */
/* /*
* Machine Check Handler For PII/PIII * Machine Check Handler For PII/PIII
...@@ -134,32 +127,26 @@ static void intel_machine_check(struct pt_regs * regs, long error_code) ...@@ -134,32 +127,26 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
u32 mcgstl, mcgsth; u32 mcgstl, mcgsth;
int i; int i;
flush_all();
rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth); rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
if(mcgstl&(1<<0)) /* Recoverable ? */ if(mcgstl&(1<<0)) /* Recoverable ? */
recover=0; recover=0;
printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", smp_processor_id(), mcgsth, mcgstl); printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", smp_processor_id(), mcgsth, mcgstl);
for(i=0;i<banks;i++) for (i=0;i<banks;i++) {
{
rdmsr(MSR_IA32_MC0_STATUS+i*4,low, high); rdmsr(MSR_IA32_MC0_STATUS+i*4,low, high);
if(high&(1<<31)) if(high&(1<<31)) {
{
if(high&(1<<29)) if(high&(1<<29))
recover|=1; recover|=1;
if(high&(1<<25)) if(high&(1<<25))
recover|=2; recover|=2;
printk(KERN_EMERG "Bank %d: %08x%08x", i, high, low); printk(KERN_EMERG "Bank %d: %08x%08x", i, high, low);
high&=~(1<<31); high&=~(1<<31);
if(high&(1<<27)) if(high&(1<<27)) {
{
rdmsr(MSR_IA32_MC0_MISC+i*4, alow, ahigh); rdmsr(MSR_IA32_MC0_MISC+i*4, alow, ahigh);
printk("[%08x%08x]", ahigh, alow); printk("[%08x%08x]", ahigh, alow);
} }
if(high&(1<<26)) if(high&(1<<26)) {
{
rdmsr(MSR_IA32_MC0_ADDR+i*4, alow, ahigh); rdmsr(MSR_IA32_MC0_ADDR+i*4, alow, ahigh);
printk(" at %08x%08x", ahigh, alow); printk(" at %08x%08x", ahigh, alow);
} }
...@@ -170,7 +157,7 @@ static void intel_machine_check(struct pt_regs * regs, long error_code) ...@@ -170,7 +157,7 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
wmb(); wmb();
} }
} }
if(recover&2) if(recover&2)
panic("CPU context corrupt"); panic("CPU context corrupt");
if(recover&1) if(recover&1)
...@@ -183,7 +170,7 @@ static void intel_machine_check(struct pt_regs * regs, long error_code) ...@@ -183,7 +170,7 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
/* /*
* Machine check handler for Pentium class Intel * Machine check handler for Pentium class Intel
*/ */
static void pentium_machine_check(struct pt_regs * regs, long error_code) static void pentium_machine_check(struct pt_regs * regs, long error_code)
{ {
u32 loaddr, hi, lotype; u32 loaddr, hi, lotype;
...@@ -197,7 +184,7 @@ static void pentium_machine_check(struct pt_regs * regs, long error_code) ...@@ -197,7 +184,7 @@ static void pentium_machine_check(struct pt_regs * regs, long error_code)
/* /*
* Machine check handler for WinChip C6 * Machine check handler for WinChip C6
*/ */
static void winchip_machine_check(struct pt_regs * regs, long error_code) static void winchip_machine_check(struct pt_regs * regs, long error_code)
{ {
printk(KERN_EMERG "CPU#%d: Machine Check Exception.\n", smp_processor_id()); printk(KERN_EMERG "CPU#%d: Machine Check Exception.\n", smp_processor_id());
...@@ -225,47 +212,50 @@ asmlinkage void do_machine_check(struct pt_regs * regs, long error_code) ...@@ -225,47 +212,50 @@ asmlinkage void do_machine_check(struct pt_regs * regs, long error_code)
#ifdef CONFIG_X86_MCE_NONFATAL #ifdef CONFIG_X86_MCE_NONFATAL
struct timer_list mce_timer; static struct timer_list mce_timer;
static int timerset = 0;
#define MCE_RATE 15*HZ /* timer rate is 15s */
static void mce_checkregs (unsigned int cpu) static void mce_checkregs (void *info)
{ {
u32 low, high; u32 low, high;
int i; int i;
unsigned int *cpu = info;
if (cpu!=smp_processor_id()) BUG_ON (*cpu != smp_processor_id());
BUG();
for (i=0; i<banks; i++) { for (i=0; i<banks; i++) {
rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high); rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
if ((low | high) != 0) { if ((low | high) != 0) {
flush_all();
printk (KERN_EMERG "MCE: The hardware reports a non fatal, correctable incident occured on CPU %d.\n", smp_processor_id()); printk (KERN_EMERG "MCE: The hardware reports a non fatal, correctable incident occured on CPU %d.\n", smp_processor_id());
printk (KERN_EMERG "Bank %d: %08x%08x\n", i, high, low); printk (KERN_EMERG "Bank %d: %08x%08x\n", i, high, low);
/* Scrub the error so we don't pick it up in 5 seconds time. */ /* Scrub the error so we don't pick it up in MCE_RATE seconds time. */
wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL); wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
/* Serialize */ /* Serialize */
wmb(); wmb();
} }
} }
/* Refresh the timer. */
mce_timer.expires = jiffies + 5 * HZ;
add_timer (&mce_timer);
} }
static void mce_timerfunc (unsigned long data) static void mce_timerfunc (unsigned long data)
{ {
int i; unsigned int i;
for (i=0; i<smp_num_cpus; i++) { for (i=0; i<smp_num_cpus; i++) {
if (i == smp_processor_id()) if (i == smp_processor_id())
mce_checkregs(i); mce_checkregs(&i);
else else
smp_call_function (mce_checkregs, i, 1, 1); smp_call_function (mce_checkregs, &i, 1, 1);
} }
/* Refresh the timer. */
mce_timer.expires = jiffies + MCE_RATE;
add_timer (&mce_timer);
} }
#endif #endif
...@@ -286,11 +276,11 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c) ...@@ -286,11 +276,11 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c)
if( !test_bit(X86_FEATURE_MCE, c->x86_capability) ) if( !test_bit(X86_FEATURE_MCE, c->x86_capability) )
return; return;
/* /*
* Pentium machine check * Pentium machine check
*/ */
if(c->x86 == 5) if(c->x86 == 5)
{ {
/* Default P5 to off as its often misconnected */ /* Default P5 to off as its often misconnected */
...@@ -308,20 +298,20 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c) ...@@ -308,20 +298,20 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c)
printk(KERN_INFO "Intel old style machine check reporting enabled on CPU#%d.\n", smp_processor_id()); printk(KERN_INFO "Intel old style machine check reporting enabled on CPU#%d.\n", smp_processor_id());
return; return;
} }
/* /*
* Check for PPro style MCA * Check for PPro style MCA
*/ */
if( !test_bit(X86_FEATURE_MCA, c->x86_capability) ) if( !test_bit(X86_FEATURE_MCA, c->x86_capability) )
return; return;
/* Ok machine check is available */ /* Ok machine check is available */
machine_check_vector = intel_machine_check; machine_check_vector = intel_machine_check;
wmb(); wmb();
if(done==0) if(done==0)
printk(KERN_INFO "Intel machine check architecture supported.\n"); printk(KERN_INFO "Intel machine check architecture supported.\n");
rdmsr(MSR_IA32_MCG_CAP, l, h); rdmsr(MSR_IA32_MCG_CAP, l, h);
...@@ -343,8 +333,12 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c) ...@@ -343,8 +333,12 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c)
set_in_cr4(X86_CR4_MCE); set_in_cr4(X86_CR4_MCE);
printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", smp_processor_id()); printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", smp_processor_id());
intel_init_thermal(c); #ifdef CONFIG_X86_MCE_P4THERMAL
/* Only enable thermal throttling warning on Pentium 4. */
if (c->x86_vendor == X86_VENDOR_INTEL && c->x86 == 15)
intel_init_thermal(c);
#endif
done=1; done=1;
} }
...@@ -352,7 +346,7 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c) ...@@ -352,7 +346,7 @@ static void __init intel_mcheck_init(struct cpuinfo_x86 *c)
/* /*
* Set up machine check reporting on the Winchip C6 series * Set up machine check reporting on the Winchip C6 series
*/ */
static void __init winchip_mcheck_init(struct cpuinfo_x86 *c) static void __init winchip_mcheck_init(struct cpuinfo_x86 *c)
{ {
u32 lo, hi; u32 lo, hi;
...@@ -377,6 +371,7 @@ static void __init winchip_mcheck_init(struct cpuinfo_x86 *c) ...@@ -377,6 +371,7 @@ static void __init winchip_mcheck_init(struct cpuinfo_x86 *c)
void __init mcheck_init(struct cpuinfo_x86 *c) void __init mcheck_init(struct cpuinfo_x86 *c)
{ {
if(mce_disabled==1) if(mce_disabled==1)
return; return;
...@@ -387,12 +382,17 @@ void __init mcheck_init(struct cpuinfo_x86 *c) ...@@ -387,12 +382,17 @@ void __init mcheck_init(struct cpuinfo_x86 *c)
if(c->x86 == 6) { if(c->x86 == 6) {
intel_mcheck_init(c); intel_mcheck_init(c);
#ifdef CONFIG_X86_MCE_NONFATAL #ifdef CONFIG_X86_MCE_NONFATAL
/* Set the timer to check for non-fatal errors every 5 seconds */ if (timerset == 0) {
init_timer (&mce_timer); /* Set the timer to check for non-fatal
mce_timer.expires = jiffies + 5 * HZ; errors every MCE_RATE seconds */
mce_timer.data = 0; init_timer (&mce_timer);
mce_timer.function = &mce_timerfunc; mce_timer.expires = jiffies + MCE_RATE;
add_timer (&mce_timer); mce_timer.data = 0;
mce_timer.function = &mce_timerfunc;
add_timer (&mce_timer);
timerset = 1;
printk(KERN_INFO "Machine check exception polling timer started.\n");
}
#endif #endif
} }
break; break;
......
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* References to members of the boot_cpu_data structure. * References to members of the boot_cpu_data structure.
*/ */
#define CPU_PARAMS SYMBOL_NAME(boot_cpu_data) #define CPU_PARAMS boot_cpu_data
#define X86 CPU_PARAMS+0 #define X86 CPU_PARAMS+0
#define X86_VENDOR CPU_PARAMS+1 #define X86_VENDOR CPU_PARAMS+1
#define X86_MODEL CPU_PARAMS+2 #define X86_MODEL CPU_PARAMS+2
...@@ -120,8 +120,8 @@ startup_32: ...@@ -120,8 +120,8 @@ startup_32:
* No need to cld as DF is already clear from cld above... * No need to cld as DF is already clear from cld above...
*/ */
xorl %eax,%eax xorl %eax,%eax
movl $ SYMBOL_NAME(__bss_start),%edi movl $__bss_start,%edi
movl $ SYMBOL_NAME(_end),%ecx movl $_end,%ecx
subl %edi,%ecx subl %edi,%ecx
rep rep
stosb stosb
...@@ -145,7 +145,7 @@ startup_32: ...@@ -145,7 +145,7 @@ startup_32:
* *
* Note: %esi still has the pointer to the real-mode data. * Note: %esi still has the pointer to the real-mode data.
*/ */
movl $ SYMBOL_NAME(empty_zero_page),%edi movl $empty_zero_page,%edi
movl $512,%ecx movl $512,%ecx
cld cld
rep rep
...@@ -154,7 +154,7 @@ startup_32: ...@@ -154,7 +154,7 @@ startup_32:
movl $512,%ecx movl $512,%ecx
rep rep
stosl stosl
movl SYMBOL_NAME(empty_zero_page)+NEW_CL_POINTER,%esi movl empty_zero_page+NEW_CL_POINTER,%esi
andl %esi,%esi andl %esi,%esi
jnz 2f # New command line protocol jnz 2f # New command line protocol
cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
...@@ -162,7 +162,7 @@ startup_32: ...@@ -162,7 +162,7 @@ startup_32:
movzwl OLD_CL_OFFSET,%esi movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi addl $(OLD_CL_BASE_ADDR),%esi
2: 2:
movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi movl $empty_zero_page+2048,%edi
movl $512,%ecx movl $512,%ecx
rep rep
movsl movsl
...@@ -263,11 +263,11 @@ is386: pushl %ecx # restore original EFLAGS ...@@ -263,11 +263,11 @@ is386: pushl %ecx # restore original EFLAGS
cmpb $1,%cl cmpb $1,%cl
je 1f # the first CPU calls start_kernel je 1f # the first CPU calls start_kernel
# all other CPUs call initialize_secondary # all other CPUs call initialize_secondary
call SYMBOL_NAME(initialize_secondary) call initialize_secondary
jmp L6 jmp L6
1: 1:
#endif #endif
call SYMBOL_NAME(start_kernel) call start_kernel
L6: L6:
jmp L6 # main should never return here, but jmp L6 # main should never return here, but
# just in case, we know what happens. # just in case, we know what happens.
...@@ -309,7 +309,7 @@ setup_idt: ...@@ -309,7 +309,7 @@ setup_idt:
movw %dx,%ax /* selector = 0x0010 = cs */ movw %dx,%ax /* selector = 0x0010 = cs */
movw $0x8E00,%dx /* interrupt gate - dpl=0, present */ movw $0x8E00,%dx /* interrupt gate - dpl=0, present */
lea SYMBOL_NAME(idt_table),%edi lea idt_table,%edi
mov $256,%ecx mov $256,%ecx
rp_sidt: rp_sidt:
movl %eax,(%edi) movl %eax,(%edi)
...@@ -320,7 +320,7 @@ rp_sidt: ...@@ -320,7 +320,7 @@ rp_sidt:
ret ret
ENTRY(stack_start) ENTRY(stack_start)
.long SYMBOL_NAME(init_thread_union)+8192 .long init_thread_union+8192
.long __KERNEL_DS .long __KERNEL_DS
/* This is the default interrupt "handler" :-) */ /* This is the default interrupt "handler" :-) */
...@@ -338,7 +338,7 @@ ignore_int: ...@@ -338,7 +338,7 @@ ignore_int:
movl %eax,%ds movl %eax,%ds
movl %eax,%es movl %eax,%es
pushl $int_msg pushl $int_msg
call SYMBOL_NAME(printk) call printk
popl %eax popl %eax
popl %ds popl %ds
popl %es popl %es
...@@ -356,21 +356,21 @@ ignore_int: ...@@ -356,21 +356,21 @@ ignore_int:
#define GDT_ENTRIES (__TSS(NR_CPUS)) #define GDT_ENTRIES (__TSS(NR_CPUS))
.globl SYMBOL_NAME(idt) .globl idt
.globl SYMBOL_NAME(gdt) .globl gdt
ALIGN ALIGN
.word 0 .word 0
idt_descr: idt_descr:
.word IDT_ENTRIES*8-1 # idt contains 256 entries .word IDT_ENTRIES*8-1 # idt contains 256 entries
SYMBOL_NAME(idt): idt:
.long SYMBOL_NAME(idt_table) .long idt_table
.word 0 .word 0
gdt_descr: gdt_descr:
.word GDT_ENTRIES*8-1 .word GDT_ENTRIES*8-1
SYMBOL_NAME(gdt): gdt:
.long SYMBOL_NAME(gdt_table) .long gdt_table
/* /*
* This is initialized to create an identity-mapping at 0-8M (for bootup * This is initialized to create an identity-mapping at 0-8M (for bootup
......
...@@ -391,6 +391,11 @@ void __init init_IRQ(void) ...@@ -391,6 +391,11 @@ void __init init_IRQ(void)
/* IPI vectors for APIC spurious and error interrupts */ /* IPI vectors for APIC spurious and error interrupts */
set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt); set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
set_intr_gate(ERROR_APIC_VECTOR, error_interrupt); set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
/* thermal monitor LVT interrupt */
#ifdef CONFIG_X86_MCE_P4THERMAL
set_intr_gate(THERMAL_APIC_VECTOR, smp_thermal_interrupt);
#endif
#endif #endif
/* /*
......
...@@ -12,37 +12,137 @@ ...@@ -12,37 +12,137 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/slab.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/ldt.h> #include <asm/ldt.h>
#include <asm/desc.h> #include <asm/desc.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *mm)
{
if (current->mm)
load_LDT(&current->mm->context);
}
#endif
static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
{
void *oldldt;
void *newldt;
int oldsize;
if (mincount <= pc->size)
return 0;
oldsize = pc->size;
mincount = (mincount+511)&(~511);
if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
else
newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
if (!newldt)
return -ENOMEM;
if (oldsize)
memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
oldldt = pc->ldt;
memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
wmb();
pc->ldt = newldt;
pc->size = mincount;
if (reload) {
load_LDT(pc);
#ifdef CONFIG_SMP
if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
smp_call_function(flush_ldt, 0, 1, 1);
#endif
}
wmb();
if (oldsize) {
if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(oldldt);
else
kfree(oldldt);
}
return 0;
}
static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
{
int err = alloc_ldt(new, old->size, 0);
if (err < 0) {
printk(KERN_WARNING "ldt allocation failed\n");
new->size = 0;
return err;
}
memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
return 0;
}
/* /*
* read_ldt() is not really atomic - this is not a problem since * we do not have to muck with descriptors here, that is
* synchronization of reads and writes done to the LDT has to be * done in switch_mm() as needed.
* assured by user-space anyway. Writes are atomic, to protect
* the security checks done on new descriptors.
*/ */
int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
struct mm_struct * old_mm;
int retval = 0;
init_MUTEX(&mm->context.sem);
mm->context.size = 0;
old_mm = current->mm;
if (old_mm && old_mm->context.size > 0) {
down(&old_mm->context.sem);
retval = copy_ldt(&mm->context, &old_mm->context);
up(&old_mm->context.sem);
}
return retval;
}
/*
* No need to lock the MM as we are the last user
*/
void release_segments(struct mm_struct *mm)
{
if (mm->context.size) {
clear_LDT();
if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(mm->context.ldt);
else
kfree(mm->context.ldt);
mm->context.size = 0;
}
}
static int read_ldt(void * ptr, unsigned long bytecount) static int read_ldt(void * ptr, unsigned long bytecount)
{ {
int err; int err;
unsigned long size; unsigned long size;
struct mm_struct * mm = current->mm; struct mm_struct * mm = current->mm;
err = 0; if (!mm->context.size)
if (!mm->context.segments) return 0;
goto out; if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
size = LDT_ENTRIES*LDT_ENTRY_SIZE; down(&mm->context.sem);
size = mm->context.size*LDT_ENTRY_SIZE;
if (size > bytecount) if (size > bytecount)
size = bytecount; size = bytecount;
err = size; err = 0;
if (copy_to_user(ptr, mm->context.segments, size)) if (copy_to_user(ptr, mm->context.ldt, size))
err = -EFAULT; err = -EFAULT;
out: up(&mm->context.sem);
return err; if (err < 0)
return err;
if (size != bytecount) {
/* zero-fill the rest */
clear_user(ptr+size, bytecount-size);
}
return bytecount;
} }
static int read_default_ldt(void * ptr, unsigned long bytecount) static int read_default_ldt(void * ptr, unsigned long bytecount)
...@@ -53,7 +153,7 @@ static int read_default_ldt(void * ptr, unsigned long bytecount) ...@@ -53,7 +153,7 @@ static int read_default_ldt(void * ptr, unsigned long bytecount)
err = 0; err = 0;
address = &default_ldt[0]; address = &default_ldt[0];
size = sizeof(struct desc_struct); size = 5*sizeof(struct desc_struct);
if (size > bytecount) if (size > bytecount)
size = bytecount; size = bytecount;
...@@ -88,24 +188,14 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode) ...@@ -88,24 +188,14 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
goto out; goto out;
} }
/* down(&mm->context.sem);
* the GDT index of the LDT is allocated dynamically, and is if (ldt_info.entry_number >= mm->context.size) {
* limited by MAX_LDT_DESCRIPTORS. error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
*/ if (error < 0)
down_write(&mm->mmap_sem);
if (!mm->context.segments) {
void * segments = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
error = -ENOMEM;
if (!segments)
goto out_unlock; goto out_unlock;
memset(segments, 0, LDT_ENTRIES*LDT_ENTRY_SIZE);
wmb();
mm->context.segments = segments;
mm->context.cpuvalid = 1UL << smp_processor_id();
load_LDT(mm);
} }
lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.segments); lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
/* Allow LDTs to be cleared by the user. */ /* Allow LDTs to be cleared by the user. */
if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
...@@ -143,7 +233,7 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode) ...@@ -143,7 +233,7 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
error = 0; error = 0;
out_unlock: out_unlock:
up_write(&mm->mmap_sem); up(&mm->context.sem);
out: out:
return error; return error;
} }
......
...@@ -116,6 +116,8 @@ static char __init *mpc_family(int family,int model) ...@@ -116,6 +116,8 @@ static char __init *mpc_family(int family,int model)
case 0x0F: case 0x0F:
if (model == 0x00) if (model == 0x00)
return("Pentium 4(tm)"); return("Pentium 4(tm)");
if (model == 0x02)
return("XEON(tm)");
if (model == 0x0F) if (model == 0x0F)
return("Special controller"); return("Special controller");
} }
......
...@@ -421,8 +421,9 @@ static struct pci_ops * __devinit pci_check_direct(void) ...@@ -421,8 +421,9 @@ static struct pci_ops * __devinit pci_check_direct(void)
pci_sanity_check(&pci_direct_conf1)) { pci_sanity_check(&pci_direct_conf1)) {
outl (tmp, 0xCF8); outl (tmp, 0xCF8);
__restore_flags(flags); __restore_flags(flags);
printk("PCI: Using configuration type 1\n"); printk(KERN_INFO "PCI: Using configuration type 1\n");
request_region(0xCF8, 8, "PCI conf1"); if (!request_region(0xCF8, 8, "PCI conf1"))
return NULL;
return &pci_direct_conf1; return &pci_direct_conf1;
} }
outl (tmp, 0xCF8); outl (tmp, 0xCF8);
...@@ -438,8 +439,9 @@ static struct pci_ops * __devinit pci_check_direct(void) ...@@ -438,8 +439,9 @@ static struct pci_ops * __devinit pci_check_direct(void)
if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 && if (inb (0xCF8) == 0x00 && inb (0xCFA) == 0x00 &&
pci_sanity_check(&pci_direct_conf2)) { pci_sanity_check(&pci_direct_conf2)) {
__restore_flags(flags); __restore_flags(flags);
printk("PCI: Using configuration type 2\n"); printk(KERN_INFO "PCI: Using configuration type 2\n");
request_region(0xCF8, 4, "PCI conf2"); if (!request_region(0xCF8, 4, "PCI conf2"))
return NULL;
return &pci_direct_conf2; return &pci_direct_conf2;
} }
} }
...@@ -546,10 +548,10 @@ static unsigned long bios32_service(unsigned long service) ...@@ -546,10 +548,10 @@ static unsigned long bios32_service(unsigned long service)
case 0: case 0:
return address + entry; return address + entry;
case 0x80: /* Not present */ case 0x80: /* Not present */
printk("bios32_service(0x%lx): not present\n", service); printk(KERN_WARNING "bios32_service(0x%lx): not present\n", service);
return 0; return 0;
default: /* Shouldn't happen */ default: /* Shouldn't happen */
printk("bios32_service(0x%lx): returned 0x%x -- BIOS bug!\n", printk(KERN_WARNING "bios32_service(0x%lx): returned 0x%x -- BIOS bug!\n",
service, return_code); service, return_code);
return 0; return 0;
} }
...@@ -599,7 +601,7 @@ static int __devinit check_pcibios(void) ...@@ -599,7 +601,7 @@ static int __devinit check_pcibios(void)
status, signature); status, signature);
return 0; return 0;
} }
printk("PCI: PCI BIOS revision %x.%02x entry at 0x%lx, last bus=%d\n", printk(KERN_INFO "PCI: PCI BIOS revision %x.%02x entry at 0x%lx, last bus=%d\n",
major_ver, minor_ver, pcibios_entry, pcibios_last_bus); major_ver, minor_ver, pcibios_entry, pcibios_last_bus);
#ifdef CONFIG_PCI_DIRECT #ifdef CONFIG_PCI_DIRECT
if (!(hw_mech & PCIBIOS_HW_TYPE1)) if (!(hw_mech & PCIBIOS_HW_TYPE1))
...@@ -901,7 +903,7 @@ static void __devinit pcibios_sort(void) ...@@ -901,7 +903,7 @@ static void __devinit pcibios_sort(void)
} }
} }
if (ln == &pci_devices) { if (ln == &pci_devices) {
printk("PCI: BIOS reporting unknown device %02x:%02x\n", bus, devfn); printk(KERN_WARNING "PCI: BIOS reporting unknown device %02x:%02x\n", bus, devfn);
/* /*
* We must not continue scanning as several buggy BIOSes * We must not continue scanning as several buggy BIOSes
* return garbage after the last device. Grr. * return garbage after the last device. Grr.
...@@ -910,7 +912,7 @@ static void __devinit pcibios_sort(void) ...@@ -910,7 +912,7 @@ static void __devinit pcibios_sort(void)
} }
} }
if (!found) { if (!found) {
printk("PCI: Device %02x:%02x not found by BIOS\n", printk(KERN_WARNING "PCI: Device %02x:%02x not found by BIOS\n",
dev->bus->number, dev->devfn); dev->bus->number, dev->devfn);
list_del(&dev->global_list); list_del(&dev->global_list);
list_add_tail(&dev->global_list, &sorted_devices); list_add_tail(&dev->global_list, &sorted_devices);
...@@ -970,7 +972,7 @@ struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void) ...@@ -970,7 +972,7 @@ struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
rt->size = opt.size + sizeof(struct irq_routing_table); rt->size = opt.size + sizeof(struct irq_routing_table);
rt->exclusive_irqs = map; rt->exclusive_irqs = map;
memcpy(rt->slots, (void *) page, opt.size); memcpy(rt->slots, (void *) page, opt.size);
printk("PCI: Using BIOS Interrupt Routing Table\n"); printk(KERN_INFO "PCI: Using BIOS Interrupt Routing Table\n");
} }
} }
free_page(page); free_page(page);
...@@ -1035,7 +1037,7 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b) ...@@ -1035,7 +1037,7 @@ static void __devinit pcibios_fixup_ghosts(struct pci_bus *b)
} }
if (!seen_host_bridge) if (!seen_host_bridge)
return; return;
printk("PCI: Ignoring ghost devices on bus %02x\n", b->number); printk(KERN_WARNING "PCI: Ignoring ghost devices on bus %02x\n", b->number);
ln = &b->devices; ln = &b->devices;
while (ln->next != &b->devices) { while (ln->next != &b->devices) {
...@@ -1073,7 +1075,7 @@ static void __devinit pcibios_fixup_peer_bridges(void) ...@@ -1073,7 +1075,7 @@ static void __devinit pcibios_fixup_peer_bridges(void)
if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) && if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) &&
l != 0x0000 && l != 0xffff) { l != 0x0000 && l != 0xffff) {
DBG("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l); DBG("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l);
printk("PCI: Discovered peer bus %02x\n", n); printk(KERN_INFO "PCI: Discovered peer bus %02x\n", n);
pci_scan_bus(n, pci_root_ops, NULL); pci_scan_bus(n, pci_root_ops, NULL);
break; break;
} }
...@@ -1117,7 +1119,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d) ...@@ -1117,7 +1119,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d)
*/ */
u8 busno; u8 busno;
pci_read_config_byte(d, 0x4a, &busno); pci_read_config_byte(d, 0x4a, &busno);
printk("PCI: i440KX/GX host bridge %s: secondary bus %02x\n", d->slot_name, busno); printk(KERN_INFO "PCI: i440KX/GX host bridge %s: secondary bus %02x\n", d->slot_name, busno);
pci_scan_bus(busno, pci_root_ops, NULL); pci_scan_bus(busno, pci_root_ops, NULL);
pcibios_last_bus = -1; pcibios_last_bus = -1;
} }
...@@ -1130,11 +1132,23 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d) ...@@ -1130,11 +1132,23 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d)
*/ */
int i; int i;
printk("PCI: Fixing base address flags for device %s\n", d->slot_name); printk(KERN_WARNING "PCI: Fixing base address flags for device %s\n", d->slot_name);
for(i=0; i<4; i++) for(i=0; i<4; i++)
d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
} }
static void __devinit pci_fixup_ncr53c810(struct pci_dev *d)
{
/*
* NCR 53C810 returns class code 0 (at least on some systems).
* Fix class to be PCI_CLASS_STORAGE_SCSI
*/
if (!d->class) {
printk("PCI: fixing NCR 53C810 class code for %s\n", d->slot_name);
d->class = PCI_CLASS_STORAGE_SCSI << 8;
}
}
static void __devinit pci_fixup_ide_bases(struct pci_dev *d) static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
{ {
int i; int i;
...@@ -1226,6 +1240,7 @@ struct pci_fixup pcibios_fixups[] = { ...@@ -1226,6 +1240,7 @@ struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810 },
{ 0 } { 0 }
}; };
...@@ -1261,6 +1276,8 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) ...@@ -1261,6 +1276,8 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum)
void __devinit pcibios_config_init(void) void __devinit pcibios_config_init(void)
{ {
struct pci_ops *tmp=NULL;
/* /*
* Try all known PCI access methods. Note that we support using * Try all known PCI access methods. Note that we support using
* both PCI BIOS and direct access, with a preference for direct. * both PCI BIOS and direct access, with a preference for direct.
...@@ -1275,6 +1292,7 @@ void __devinit pcibios_config_init(void) ...@@ -1275,6 +1292,7 @@ void __devinit pcibios_config_init(void)
pci_config_write = pci_bios_write; pci_config_write = pci_bios_write;
} }
#endif #endif
tmp = pci_root_ops;
#ifdef CONFIG_PCI_DIRECT #ifdef CONFIG_PCI_DIRECT
if ((pci_probe & (PCI_PROBE_CONF1 | PCI_PROBE_CONF2)) if ((pci_probe & (PCI_PROBE_CONF1 | PCI_PROBE_CONF2))
...@@ -1290,6 +1308,10 @@ void __devinit pcibios_config_init(void) ...@@ -1290,6 +1308,10 @@ void __devinit pcibios_config_init(void)
} }
#endif #endif
/* if direct access failed, fall back to BIOS access. */
if (pci_root_ops == NULL)
pci_root_ops = tmp;
return; return;
} }
......
...@@ -475,23 +475,6 @@ void show_regs(struct pt_regs * regs) ...@@ -475,23 +475,6 @@ void show_regs(struct pt_regs * regs)
show_trace(&regs->esp); show_trace(&regs->esp);
} }
/*
* No need to lock the MM as we are the last user
*/
void release_segments(struct mm_struct *mm)
{
void * ldt = mm->context.segments;
/*
* free the LDT
*/
if (ldt) {
mm->context.segments = NULL;
clear_LDT();
vfree(ldt);
}
}
/* /*
* Create a kernel thread * Create a kernel thread
*/ */
...@@ -544,42 +527,17 @@ void flush_thread(void) ...@@ -544,42 +527,17 @@ void flush_thread(void)
void release_thread(struct task_struct *dead_task) void release_thread(struct task_struct *dead_task)
{ {
if (dead_task->mm) { if (dead_task->mm) {
void * ldt = dead_task->mm->context.segments;
// temporary debugging check // temporary debugging check
if (ldt) { if (dead_task->mm->context.size) {
printk("WARNING: dead process %8s still has LDT? <%p>\n", printk("WARNING: dead process %8s still has LDT? <%p/%d>\n",
dead_task->comm, ldt); dead_task->comm,
dead_task->mm->context.ldt,
dead_task->mm->context.size);
BUG(); BUG();
} }
} }
} }
/*
* we do not have to muck with descriptors here, that is
* done in switch_mm() as needed.
*/
void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
{
struct mm_struct * old_mm;
void *old_ldt, *ldt;
ldt = NULL;
old_mm = current->mm;
if (old_mm && (old_ldt = old_mm->context.segments) != NULL) {
/*
* Completely new LDT, we initialize it from the parent:
*/
ldt = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
if (!ldt)
printk(KERN_WARNING "ldt allocation failed\n");
else
memcpy(ldt, old_ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
}
new_mm->context.segments = ldt;
new_mm->context.cpuvalid = ~0UL; /* valid on all CPU's - they can't have stale data */
}
/* /*
* Save a segment. * Save a segment.
*/ */
......
...@@ -2875,7 +2875,7 @@ void __init cpu_init (void) ...@@ -2875,7 +2875,7 @@ void __init cpu_init (void)
set_tss_desc(nr,t); set_tss_desc(nr,t);
gdt_table[__TSS(nr)].b &= 0xfffffdff; gdt_table[__TSS(nr)].b &= 0xfffffdff;
load_TR(nr); load_TR(nr);
load_LDT(&init_mm); load_LDT(&init_mm.context);
/* Clear %fs and %gs. */ /* Clear %fs and %gs. */
asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
......
...@@ -67,5 +67,5 @@ gdt_48: ...@@ -67,5 +67,5 @@ gdt_48:
.word 0x0800 # gdt limit = 2048, 256 GDT entries .word 0x0800 # gdt limit = 2048, 256 GDT entries
.long gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU) .long gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU)
.globl SYMBOL_NAME(trampoline_end) .globl trampoline_end
SYMBOL_NAME_LABEL(trampoline_end) trampoline_end:
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#define EXCEPTION SYMBOL_NAME(FPU_exception) #define EXCEPTION FPU_exception
#define PARAM1 8(%ebp) #define PARAM1 8(%ebp)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
of the stack frame of math_emulate() */ of the stack frame of math_emulate() */
#define SETUP_DATA_AREA(arg) FPU_info = (struct info *) &arg #define SETUP_DATA_AREA(arg) FPU_info = (struct info *) &arg
#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.segments)[(s) >> 3]) #define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
#define SEG_D_SIZE(x) ((x).b & (3 << 21)) #define SEG_D_SIZE(x) ((x).b & (3 << 21))
#define SEG_G_BIT(x) ((x).b & (1 << 23)) #define SEG_G_BIT(x) ((x).b & (1 << 23))
#define SEG_GRANULARITY(x) (((x).b & (1 << 23)) ? 4096 : 1) #define SEG_GRANULARITY(x) (((x).b & (1 << 23)) ? 4096 : 1)
......
...@@ -83,7 +83,7 @@ L_underflow: ...@@ -83,7 +83,7 @@ L_underflow:
/* Convert the exponent to 80x87 form. */ /* Convert the exponent to 80x87 form. */
addw EXTENDED_Ebias,EXP(%ebx) addw EXTENDED_Ebias,EXP(%ebx)
push %ebx push %ebx
call SYMBOL_NAME(arith_underflow) call arith_underflow
pop %ebx pop %ebx
jmp L_exit jmp L_exit
...@@ -91,7 +91,7 @@ L_overflow: ...@@ -91,7 +91,7 @@ L_overflow:
/* Convert the exponent to 80x87 form. */ /* Convert the exponent to 80x87 form. */
addw EXTENDED_Ebias,EXP(%ebx) addw EXTENDED_Ebias,EXP(%ebx)
push %ebx push %ebx
call SYMBOL_NAME(arith_overflow) call arith_overflow
pop %ebx pop %ebx
jmp L_exit jmp L_exit
......
...@@ -447,7 +447,7 @@ fpu_Arith_exit: ...@@ -447,7 +447,7 @@ fpu_Arith_exit:
L_precision_lost_up: L_precision_lost_up:
push %edx push %edx
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_up) call set_precision_flag_up
popl %eax popl %eax
popl %edx popl %edx
jmp L_no_precision_loss jmp L_no_precision_loss
...@@ -459,7 +459,7 @@ L_precision_lost_up: ...@@ -459,7 +459,7 @@ L_precision_lost_up:
L_precision_lost_down: L_precision_lost_down:
push %edx push %edx
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_down) call set_precision_flag_down
popl %eax popl %eax
popl %edx popl %edx
jmp L_no_precision_loss jmp L_no_precision_loss
...@@ -617,7 +617,7 @@ LPseudoDenormal: ...@@ -617,7 +617,7 @@ LPseudoDenormal:
*/ */
L_underflow_to_zero: L_underflow_to_zero:
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_down) call set_precision_flag_down
popl %eax popl %eax
push %eax push %eax
...@@ -636,7 +636,7 @@ L_underflow_to_zero: ...@@ -636,7 +636,7 @@ L_underflow_to_zero:
L_overflow: L_overflow:
addw EXTENDED_Ebias,EXP(%edi) /* Set for unmasked response. */ addw EXTENDED_Ebias,EXP(%edi) /* Set for unmasked response. */
push %edi push %edi
call SYMBOL_NAME(arith_overflow) call arith_overflow
pop %edi pop %edi
jmp fpu_reg_round_signed_special_exit jmp fpu_reg_round_signed_special_exit
......
...@@ -168,8 +168,8 @@ asmlinkage void IRQ_NAME(n); \ ...@@ -168,8 +168,8 @@ asmlinkage void IRQ_NAME(n); \
/* Dummy function to allow asm with operands. */ \ /* Dummy function to allow asm with operands. */ \
void atari_slow_irq_##n##_dummy (void) { \ void atari_slow_irq_##n##_dummy (void) { \
__asm__ (__ALIGN_STR "\n" \ __asm__ (__ALIGN_STR "\n" \
SYMBOL_NAME_STR(atari_slow_irq_) #n "_handler:\t" \ "atari_slow_irq_" #n "_handler:\t" \
" addql #1,"SYMBOL_NAME_STR(irq_stat)"+8\n" /* local_irq_count */ \ " addql #1,irq_stat+8\n" /* local_irq_count */ \
SAVE_ALL_INT "\n" \ SAVE_ALL_INT "\n" \
GET_CURRENT(%%d0) "\n" \ GET_CURRENT(%%d0) "\n" \
" andb #~(1<<(%c3&7)),%a4:w\n" /* mask this interrupt */ \ " andb #~(1<<(%c3&7)),%a4:w\n" /* mask this interrupt */ \
...@@ -190,7 +190,7 @@ SYMBOL_NAME_STR(atari_slow_irq_) #n "_handler:\t" \ ...@@ -190,7 +190,7 @@ SYMBOL_NAME_STR(atari_slow_irq_) #n "_handler:\t" \
" orw #0x0600,%%sr\n" \ " orw #0x0600,%%sr\n" \
" andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \ " andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \
" orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \ " orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \
" jbra "SYMBOL_NAME_STR(ret_from_interrupt)"\n" \ " jbra ret_from_interrupt\n" \
: : "i" (&kstat.irqs[0][n+8]), "i" (&irq_handler[n+8]), \ : : "i" (&kstat.irqs[0][n+8]), "i" (&irq_handler[n+8]), \
"n" (PT_OFF_SR), "n" (n), \ "n" (PT_OFF_SR), "n" (n), \
"i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \ "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \
...@@ -272,10 +272,10 @@ asmlinkage void atari_prio_irq_handler( void ); ...@@ -272,10 +272,10 @@ asmlinkage void atari_prio_irq_handler( void );
/* Dummy function to allow asm with operands. */ /* Dummy function to allow asm with operands. */
void atari_fast_prio_irq_dummy (void) { void atari_fast_prio_irq_dummy (void) {
__asm__ (__ALIGN_STR "\n" __asm__ (__ALIGN_STR "\n"
SYMBOL_NAME_STR(atari_fast_irq_handler) ": "atari_fast_irq_handler:
orw #0x700,%%sr /* disable all interrupts */ orw #0x700,%%sr /* disable all interrupts */
"SYMBOL_NAME_STR(atari_prio_irq_handler) ":\t atari_prio_irq_handler:\t
addql #1,"SYMBOL_NAME_STR(irq_stat)"+8\n" /* local_irq_count */ addql #1,irq_stat+8\n" /* local_irq_count */
SAVE_ALL_INT "\n" SAVE_ALL_INT "\n"
GET_CURRENT(%%d0) " GET_CURRENT(%%d0) "
/* get vector number from stack frame and convert to source */ /* get vector number from stack frame and convert to source */
...@@ -285,7 +285,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ": ...@@ -285,7 +285,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ":
addw #(0x40-8-0x18),%%d0 addw #(0x40-8-0x18),%%d0
1: lea %a0,%%a0 1: lea %a0,%%a0
addql #1,%%a0@(%%d0:l:4) addql #1,%%a0@(%%d0:l:4)
lea "SYMBOL_NAME_STR(irq_handler)",%%a0 lea irq_handler,%%a0
lea %%a0@(%%d0:l:8),%%a0 lea %%a0@(%%d0:l:8),%%a0
pea %%sp@ /* push frame address */ pea %%sp@ /* push frame address */
movel %%a0@(4),%%sp@- /* push handler data */ movel %%a0@(4),%%sp@- /* push handler data */
...@@ -294,7 +294,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ": ...@@ -294,7 +294,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ":
jsr %%a0@ /* and call the handler */ jsr %%a0@ /* and call the handler */
addql #8,%%sp addql #8,%%sp
addql #4,%%sp addql #4,%%sp
jbra "SYMBOL_NAME_STR(ret_from_interrupt) jbra ret_from_interrupt"
: : "i" (&kstat.irqs[0]), "n" (PT_OFF_FORMATVEC) : : "i" (&kstat.irqs[0]), "n" (PT_OFF_FORMATVEC)
); );
} }
...@@ -306,7 +306,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ": ...@@ -306,7 +306,7 @@ SYMBOL_NAME_STR(atari_fast_irq_handler) ":
asmlinkage void falcon_hblhandler(void); asmlinkage void falcon_hblhandler(void);
asm(".text\n" asm(".text\n"
__ALIGN_STR "\n" __ALIGN_STR "\n"
SYMBOL_NAME_STR(falcon_hblhandler) ": "falcon_hblhandler:
orw #0x200,%sp@ /* set saved ipl to 2 */ orw #0x200,%sp@ /* set saved ipl to 2 */
rte"); rte");
......
...@@ -73,9 +73,9 @@ real_dz: ...@@ -73,9 +73,9 @@ real_dz:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Inexact exception | Inexact exception
...@@ -164,9 +164,9 @@ inex_done: ...@@ -164,9 +164,9 @@ inex_done:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Overflow exception | Overflow exception
...@@ -190,9 +190,9 @@ ovfl_done: ...@@ -190,9 +190,9 @@ ovfl_done:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Underflow exception | Underflow exception
...@@ -216,9 +216,9 @@ unfl_done: ...@@ -216,9 +216,9 @@ unfl_done:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Signalling NAN exception | Signalling NAN exception
...@@ -238,9 +238,9 @@ real_snan: ...@@ -238,9 +238,9 @@ real_snan:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Operand Error exception | Operand Error exception
...@@ -260,9 +260,9 @@ real_operr: ...@@ -260,9 +260,9 @@ real_operr:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
...@@ -288,9 +288,9 @@ real_bsun: ...@@ -288,9 +288,9 @@ real_bsun:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| F-line exception | F-line exception
...@@ -309,9 +309,9 @@ real_fline: ...@@ -309,9 +309,9 @@ real_fline:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Unsupported data type exception | Unsupported data type exception
...@@ -331,9 +331,9 @@ real_unsupp: ...@@ -331,9 +331,9 @@ real_unsupp:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
movel %sp,%sp@- | stack frame pointer argument movel %sp,%sp@- | stack frame pointer argument
bsrl SYMBOL_NAME(trap_c) bsrl trap_c
addql #4,%sp addql #4,%sp
bral SYMBOL_NAME(ret_from_exception) bral ret_from_exception
| |
| Trace exception | Trace exception
...@@ -341,7 +341,7 @@ real_unsupp: ...@@ -341,7 +341,7 @@ real_unsupp:
.global real_trace .global real_trace
real_trace: real_trace:
| |
bral SYMBOL_NAME(trap) bral trap
| |
| fpsp_fmt_error --- exit point for frame format error | fpsp_fmt_error --- exit point for frame format error
...@@ -382,7 +382,7 @@ fpsp_done: ...@@ -382,7 +382,7 @@ fpsp_done:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
tstl %curptr@(TASK_NEEDRESCHED) tstl %curptr@(TASK_NEEDRESCHED)
jne SYMBOL_NAME(ret_from_exception) | deliver signals, jne ret_from_exception | deliver signals,
| reschedule etc.. | reschedule etc..
RESTORE_ALL RESTORE_ALL
...@@ -505,7 +505,7 @@ in_ea: ...@@ -505,7 +505,7 @@ in_ea:
.section .fixup,#alloc,#execinstr .section .fixup,#alloc,#execinstr
.even .even
1: 1:
jbra SYMBOL_NAME(fpsp040_die) jbra fpsp040_die
.section __ex_table,#alloc .section __ex_table,#alloc
.align 4 .align 4
......
...@@ -80,7 +80,7 @@ _060_real_ovfl: ...@@ -80,7 +80,7 @@ _060_real_ovfl:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
...@@ -99,7 +99,7 @@ _060_real_unfl: ...@@ -99,7 +99,7 @@ _060_real_unfl:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_operr(): | _060_real_operr():
...@@ -118,7 +118,7 @@ _060_real_operr: ...@@ -118,7 +118,7 @@ _060_real_operr:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_snan(): | _060_real_snan():
...@@ -137,7 +137,7 @@ _060_real_snan: ...@@ -137,7 +137,7 @@ _060_real_snan:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_dz(): | _060_real_dz():
...@@ -156,7 +156,7 @@ _060_real_dz: ...@@ -156,7 +156,7 @@ _060_real_dz:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_inex(): | _060_real_inex():
...@@ -175,7 +175,7 @@ _060_real_inex: ...@@ -175,7 +175,7 @@ _060_real_inex:
fsave -(%sp) fsave -(%sp)
move.w #0x6000,0x2(%sp) move.w #0x6000,0x2(%sp)
frestore (%sp)+ frestore (%sp)+
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_bsun(): | _060_real_bsun():
...@@ -197,7 +197,7 @@ _060_real_bsun: ...@@ -197,7 +197,7 @@ _060_real_bsun:
andi.b #0xfe,(%sp) andi.b #0xfe,(%sp)
fmove.l (%sp)+,%fpsr fmove.l (%sp)+,%fpsr
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_fline(): | _060_real_fline():
...@@ -211,7 +211,7 @@ _060_real_bsun: ...@@ -211,7 +211,7 @@ _060_real_bsun:
| |
.global _060_real_fline .global _060_real_fline
_060_real_fline: _060_real_fline:
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_fpu_disabled(): | _060_real_fpu_disabled():
...@@ -250,7 +250,7 @@ _060_real_fpu_disabled: ...@@ -250,7 +250,7 @@ _060_real_fpu_disabled:
| |
.global _060_real_trap .global _060_real_trap
_060_real_trap: _060_real_trap:
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
|############################################################################ |############################################################################
......
...@@ -76,8 +76,8 @@ _060_isp_done: ...@@ -76,8 +76,8 @@ _060_isp_done:
SAVE_ALL_INT SAVE_ALL_INT
GET_CURRENT(%d0) GET_CURRENT(%d0)
tstl %curptr@(TASK_NEEDRESCHED) tstl %curptr@(TASK_NEEDRESCHED)
jne SYMBOL_NAME(ret_from_exception) | deliver signals, jne ret_from_exception | deliver signals,
| reschedule etc.. | reschedule etc..
RESTORE_ALL RESTORE_ALL
| |
...@@ -113,7 +113,7 @@ _060_real_chk: ...@@ -113,7 +113,7 @@ _060_real_chk:
| bral _060_real_trace | bral _060_real_trace
real_chk_end: real_chk_end:
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
| |
| _060_real_divbyzero: | _060_real_divbyzero:
...@@ -153,7 +153,7 @@ _060_real_divbyzero: ...@@ -153,7 +153,7 @@ _060_real_divbyzero:
| bral _060_real_trace | bral _060_real_trace
real_divbyzero_end: real_divbyzero_end:
bral SYMBOL_NAME(trap) | jump to trap handler bral trap | jump to trap handler
|########################## |##########################
......
...@@ -358,7 +358,7 @@ copyinae: ...@@ -358,7 +358,7 @@ copyinae:
| |
.global _060_real_trace .global _060_real_trace
_060_real_trace: _060_real_trace:
bral SYMBOL_NAME(trap) bral trap
| |
| _060_real_access(): | _060_real_access():
...@@ -374,7 +374,7 @@ _060_real_trace: ...@@ -374,7 +374,7 @@ _060_real_trace:
| |
.global _060_real_access .global _060_real_access
_060_real_access: _060_real_access:
bral SYMBOL_NAME(buserr) bral buserr
......
This diff is collapsed.
This diff is collapsed.
...@@ -408,7 +408,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, void *fp, ...@@ -408,7 +408,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, void *fp,
"2: movesl %4@+,%2\n\t" "2: movesl %4@+,%2\n\t"
"3: movel %2,%/a0@+\n\t" "3: movel %2,%/a0@+\n\t"
" dbra %1,2b\n\t" " dbra %1,2b\n\t"
" bral " SYMBOL_NAME_STR(ret_from_signal) "\n" " bral ret_from_signal\n"
"4:\n" "4:\n"
".section __ex_table,\"a\"\n" ".section __ex_table,\"a\"\n"
" .align 4\n" " .align 4\n"
...@@ -507,7 +507,7 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, ...@@ -507,7 +507,7 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
"2: movesl %4@+,%2\n\t" "2: movesl %4@+,%2\n\t"
"3: movel %2,%/a0@+\n\t" "3: movel %2,%/a0@+\n\t"
" dbra %1,2b\n\t" " dbra %1,2b\n\t"
" bral " SYMBOL_NAME_STR(ret_from_signal) "\n" " bral ret_from_signal\n"
"4:\n" "4:\n"
".section __ex_table,\"a\"\n" ".section __ex_table,\"a\"\n"
" .align 4\n" " .align 4\n"
......
This diff is collapsed.
...@@ -64,7 +64,7 @@ e_vector vectors[256] = { ...@@ -64,7 +64,7 @@ e_vector vectors[256] = {
/* nmi handler for the Amiga */ /* nmi handler for the Amiga */
asm(".text\n" asm(".text\n"
__ALIGN_STR "\n" __ALIGN_STR "\n"
SYMBOL_NAME_STR(nmihandler) ": rte"); "nmihandler: rte");
/* /*
* this must be called very early as the kernel might * this must be called very early as the kernel might
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
ENTRY(__down_failed) ENTRY(__down_failed)
moveml %a0/%d0/%d1,-(%sp) moveml %a0/%d0/%d1,-(%sp)
movel %a1,-(%sp) movel %a1,-(%sp)
jbsr SYMBOL_NAME(__down) jbsr __down
movel (%sp)+,%a1 movel (%sp)+,%a1
moveml (%sp)+,%a0/%d0/%d1 moveml (%sp)+,%a0/%d0/%d1
rts rts
...@@ -27,7 +27,7 @@ ENTRY(__down_failed_interruptible) ...@@ -27,7 +27,7 @@ ENTRY(__down_failed_interruptible)
movel %a0,-(%sp) movel %a0,-(%sp)
movel %d1,-(%sp) movel %d1,-(%sp)
movel %a1,-(%sp) movel %a1,-(%sp)
jbsr SYMBOL_NAME(__down_interruptible) jbsr __down_interruptible
movel (%sp)+,%a1 movel (%sp)+,%a1
movel (%sp)+,%d1 movel (%sp)+,%d1
movel (%sp)+,%a0 movel (%sp)+,%a0
...@@ -37,7 +37,7 @@ ENTRY(__down_failed_trylock) ...@@ -37,7 +37,7 @@ ENTRY(__down_failed_trylock)
movel %a0,-(%sp) movel %a0,-(%sp)
movel %d1,-(%sp) movel %d1,-(%sp)
movel %a1,-(%sp) movel %a1,-(%sp)
jbsr SYMBOL_NAME(__down_trylock) jbsr __down_trylock
movel (%sp)+,%a1 movel (%sp)+,%a1
movel (%sp)+,%d1 movel (%sp)+,%d1
movel (%sp)+,%a0 movel (%sp)+,%a0
...@@ -46,7 +46,7 @@ ENTRY(__down_failed_trylock) ...@@ -46,7 +46,7 @@ ENTRY(__down_failed_trylock)
ENTRY(__up_wakeup) ENTRY(__up_wakeup)
moveml %a0/%d0/%d1,-(%sp) moveml %a0/%d0/%d1,-(%sp)
movel %a1,-(%sp) movel %a1,-(%sp)
jbsr SYMBOL_NAME(__up) jbsr __up
movel (%sp)+,%a1 movel (%sp)+,%a1
moveml (%sp)+,%a0/%d0/%d1 moveml (%sp)+,%a0/%d0/%d1
rts rts
......
...@@ -27,7 +27,9 @@ volatile struct baboon *baboon; ...@@ -27,7 +27,9 @@ volatile struct baboon *baboon;
void baboon_irq(int, void *, struct pt_regs *); void baboon_irq(int, void *, struct pt_regs *);
#if 0
extern int macide_ack_intr(struct ata_channel *); extern int macide_ack_intr(struct ata_channel *);
#endif
/* /*
* Baboon initialization. * Baboon initialization.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -85,8 +85,8 @@ extern bd_t m8xx_board_info; ...@@ -85,8 +85,8 @@ extern bd_t m8xx_board_info;
/* for pcmcia sandisk */ /* for pcmcia sandisk */
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
#define MAX_HWIFS 1 # define MAX_HWIFS 1
#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) # define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
#endif #endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -20,7 +20,7 @@ ENTRY(memmove) ...@@ -20,7 +20,7 @@ ENTRY(memmove)
jmp @r0 jmp @r0
nop nop
.balign 4 .balign 4
2: .long SYMBOL_NAME(memcpy) 2: .long memcpy
1: 1:
sub r5,r4 ! From here, r4 has the distance to r0 sub r5,r4 ! From here, r4 has the distance to r0
tst r6,r6 tst r6,r6
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment