Commit 08ceb06f authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.99pre7-2

parent ca4592ba
......@@ -787,9 +787,9 @@ ftp://metalab.unc.edu/pub/Linux/hardware/pciutils-2.1.5.tar.gz
Powertweak
==========
The 0.1.2 release:
http://linux.powertweak.com/files/powertweak-0.1.2.tgz
ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/powertweak/powertweak-0.1.2.tgz
The 0.1.13 release:
http://linux.powertweak.com/files/powertweak-0.1.13.tgz
ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/powertweak/powertweak-0.1.13.tgz
Xosview
=======
......
......@@ -9850,7 +9850,7 @@ CONFIG_USB_MDC800
Say Y here if you want to connect this type of still camera to
your computer's USB port. This driver can be used with gphoto 0.4.3
and higher (look at http://www.gphoto.org ).
To use it create a device node with "mknod /dev/mustek c 10 171" and
To use it create a device node with "mknod /dev/mustek c 180 32" and
configure it in your software.
This code is also available as a module ( = code which can be
......@@ -10444,6 +10444,8 @@ CONFIG_NTFS_RW
damaged. Also, make sure to run chkdsk from within Microsoft
Windows NT after having performed any writes to a NTFS partition
from Linux to detect any problems as early as possible.
Please note that write support is limited to Windows NT4 and
earlier versions.
If unsure, say N.
......
......@@ -12,6 +12,9 @@ volume sets on top of the md driver, although mirror and stripe
sets should work as well - if the md driver can be talked into
using the same layout as Windows NT.
Please note that the experimental write support is limited to
Windows NT4 and earlier versions.
The ntfs driver supports the following mount options:
iocharset=name Character set to use when returning file names.
Unlike VFAT, NTFS suppresses names that contain
......
Documentation/networking/vortex.txt
Andrew Morton <andrewm@uow.edu.au>
30 April 2000
This document describes the usage and errata of the 3Com "Vortex" device
driver for Linux.
driver for Linux, 3c59x.c.
The driver was written by Donald Becker <becker@cesdis.gsfc.nasa.gov>
......@@ -8,7 +13,14 @@ Please report problems to one or more of:
Andrew Morton <andrewm@uow.edu.au>
Netdev mailing list <netdev@oss.sgi.com>
Linux kernel mailing list <linux-kernel@vger.rutgers.edu>
Please note the 'Reporting and Diagnosing Problems' section at the end
of this file.
Since kernel 2.3.99-pre6, this driver incorporates the support for the
3c575-series Cardbus cards which used to be handled by 3c575_cb.c.
This driver supports the following hardware:
......@@ -42,55 +54,133 @@ This driver supports the following hardware:
3c450 Cyclone/unknown
3Com Boomerang (unknown version)
When loaded as a module the following variables may be set:
name type description
debug int The debug message level, 0 (no messages) to 6 (wordy).
options int[] The media type override and card operation settings
(See list below.)
An example of loading the vortex module is
insmod 3c59x.o debug=1 options=0,,12
This sets the debug message level to minimal messages, sets the first card to
the 10baseT transceiver, the second to the EEPROM-set transceiver, and the
third card to operate in full-duplex mode using its 100baseTx transceiver.
(Note: card ordering is set by the PCI BIOS.)
Module parameters
=================
There are several parameters which may be provided to the driver when
its module is loaded. These are usually placed in /etc/modules.conf
(used to be conf.modules). Example:
options 3c59x debug=3 rx_copybreak=300
If you are using the PCMCIA tools (cardmgr) then theoptions may be
placed in /etc/pcmcia/config.opts:
module "3c59x" opts "debug=3 extra_reset=1"
The supported parameters are:
debug=N
Where N is a number from 0 to 7. Anything above 3 produces a lot
of output in your system logs. debug=1 is default.
options=N1,N2,N3,...
Possible media type settings
Each number in the list provides an option to the corresponding
network card. So if you have two 3c905's and you wish to provide
them with option 0x204 you would use:
options=0x204,0x204
The individual options are composed of a number of bitfields which
have the following meanings:
ssible media type settings
0 10baseT
1 10Mbs AUI
2 undefined
3 10base2 (BNC)
4 100base-TX
5 100base-FX
6 MII (not yet available)
7 <Use default setting>
6 MII (Media Independent Interface)
7 Use default setting from EEPROM
8 Autonegotiate
9 External MII
10 Use default setting from EEPROM
8 Full-duplex bit
8 10baseT full-duplex
12 100baseTx full-duplex
16 Bus-master enable bit (experimental use only!)
When generating a value for the 'options' setting, the above media
selection values may be OR'ed (or added to) the following:
Details of the device driver implementation are at the top of the source file.
512 (0x200) Force full-duplex
16 (0x10) Bus-master enable bit (Old Vortex cards only)
Additional documentation is available at Don Becker's Linux Drivers site:
For example:
insmod 3c59x options=0x204
will force full-duplex 100base-TX, rather than allowing the usual
autonegotiation.
full_duplex=N1,N2,N3...
Similar to bit 9 of 'options'. Forces the corresponding card into
full-duplex mode.
rx_copybreak=M
The driver preallocates 32 full-sized (1536 byte) network buffers
for receiving. When a packet arrives, the driver has to decide
whether to leave the packet in its full-sized buffer, or to allocate
a smaller buffer and copy the packet across into it.
This is a speed/space tradeoff.
The value of rx_copybreak is used to decide when to make the copy.
If the packet size is less than rx_copybreak, the packet is copied.
The default value for rx_copybreak is 200 bytes.
max_interrupt_work=N
The driver's interrupt service routine can handle many receive and
transmit packets in a single invokation. It does this in a loop.
The value of max_interrupt_work governs how mnay times the interrupt
service routine will loop. The default value is 32 loops. If this
is exceeded the interrupt service routine gives up and generates a
warning message "eth0: Too much work in interrupt".
extra_reset=N
Where N is 0 or 1 (default 0).
Some network cards (notably 3CCFE575CT Cardbus) do not initialise
correctly and need an extra transmitter reset. If you find that the
card comes up receiving but not transmitting, try giving the module
the 'extra_reset=1' option.
compaq_ioaddr=N
compaq_irq=N
compaq_device_id=N
"Variables to work-around the Compaq PCI BIOS32 problem"....
http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
Additional resources
--------------------
Details of the device driver implementation are at the top of the source file.
Additional documentation is available at Don Becker's Linux Drivers site:
http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
Donald Becker's driver development site:
http://www.scyld.com
http://cesdis.gsfc.nasa.gov/linux/
Don's vortex-diag program is useful for inspecting the NIC's state:
http://www.scyld.com/diag/#pci-diags
http://cesdis.gsfc.nasa.gov/linux/diag/vortex-diag.c
Don's mii-diag program may be used for inspecting and manipulating the
NIC's Media Independent Interface subsystem:
http://www.scyld.com/diag/#mii-diag
http://cesdis.gsfc.nasa.gov/linux/diag/#mii-diag
3Com's documentation for many NICs, including the ones supported by
......@@ -104,8 +194,16 @@ series kernel is available at
http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3
Autonegotiation notes
---------------------
The driver uses a one-minute heartbeat for adapting to changes in
the external LAN environment. This means that when, for example, a
machine is unplugged from a hubbed 10baseT LAN plugged into a
switched 100baseT LAN, the throughput will be quite dreadful for up
to sixty seconds. Be patient.
Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
On a side note, adding HAS_NWAY seems to share a problem with the
Cisco 6509 switch. Specifically, you need to change the spanning
......@@ -114,3 +212,32 @@ Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
we've noticed for a while but haven't had the time to track down.
Reporting and diagnosing problems
---------------------------------
If the driver plays up, there are a number of things you can do analyse
the problem and to help others do this:
- Turn on debugging in the driver
Add 'debug=7' to /etc/modules.conf (/etc/conf.modules)
Change 'vortex_debug' to 7 in the source code.
- Send all kernel logs, starting with the first probe of the card.
- Run 'mii-diag -v' to show the state of the Media Independent
Interface. If the card sometimes works and sometimes doesn't, run
'mii-diag -v' in both states.
- Please run 'vortex-diag -aaee' in both good and bad states. This
show the NIC's registers and EEPROM contents.
- Describe your setup: 10baseT, 100baseT, full/half duplex, etc.
- Note any additional module insertion commands you're using.
- Try different media type settings (see above).
- Try inserting the module with 'extra_reset=1' (or compile this into
the driver).
Copyright (C) 1999, 2000 David E. Nelson
Mar. 23, 2000
April 26, 2000
CHANGES
- Amended for Linux-2.3.40
- Amended for Linux-2.3.99-pre6-3
- Updated for multiple scanner support
INTRODUCTION
This document will hopefully provide enough info on how to get SANE
......@@ -15,9 +14,12 @@ working with a Hewlett Packard USB capable scanner using the USB
interface. The majority of HP Scanners support the Scanner Control
Language (SCL) which is both published by HP and supported by SANE.
The only HP Scanners that I'm aware of that do not support SCL are the
4200C and the 3300C. All other HP scanners with USB interfaces should
work (4100C, 5200C, 6200C, and 6300C). Of course as HP releases new
scanners this information may change.
4200C ,3300C, and the PhotoSmart S20. All other HP scanners with USB
interfaces should work (4100C, 5200C, 6200C, and 6300C) as do models
that are derived from the models above. ie the 6350C which is a 6300C
with a transparency adaptor included with the scanner at time of
purchase. Of course as HP releases new scanners this information may
change.
REQUIREMENTS
......@@ -37,9 +39,9 @@ At the time of this writing, version 0.83 was available.
OK, I'VE INSTALLED SANE. SO WHAT DO I DO NOW?
NOTE: $INSTALL_DIR is the location where SANE is installed. It may
be /usr/local, /usr, /opt or somewhere else. If you don't know, ask
your system administrator.
NOTE: $INSTALL_DIR is the location where SANE is installed. It may be
/usr/local, /usr, /opt or somewhere else. If you don't know, ask your
system administrator.
1) Make sure that you have the libsane-hp.* libraries under the
$INSTALL_DIR/lib/sane/ directory. If you don't, then the HP backend
......@@ -56,17 +58,18 @@ files: dll.conf, hp.conf.
option connect-device
NOTE: If you are using multiple scanners, make sure to have the correct
devince, ie /dev/usbscanner0. See scanner.txt for more info.
device, ie /dev/usbscanner0. See scanner.txt for more info.
3) You should now be able to use SANE (xscanimage or scanimage).
Don't forget to read any relevant man pages regarding the usage of
SANE. If you have other entries uncommented in dll.conf, you may have
to specify the device to (x)scanimage. Again, `man` is your friend.
The xscanimage (1) man page has info on how to get 'The Gimp' to work
with xscanimage. Note that Gimp support must be compiled into SANE
for it work. If you are dealing with a RedHat system, this means that
you'll also need to install the gimp-devel rpm package.
SANE. If you have other entries uncommented in 'dll.conf', you may
have to specify the device to (x)scanimage. Again, `man` is your
friend. The xscanimage (1) man page has info on how to get 'The Gimp'
to work with xscanimage. Note that Gimp support must be compiled into
SANE for it to work. If you are dealing with a RedHat system, this
means that you'll also need to install the gimp-devel rpm package
prior to compiling SANE.
NOTE: The issues regarding core dumping by (x)scanimage have (or seem
to be thus far) been resolved with version 0.2+ of the USB scanner
......
Copyright (C) 1999, 2000 David E. Nelson
Mar. 23, 2000
April 26, 2000
CHANGES
- Amended for linux-2.3.40
- Amended for linux-2.3.99-pre6-3
- Appended hp_scan.c to end of this README
- Removed most references to HP
- Updated uhci/ohci host controller info
- Updated support for multiple scanner support
- Updated supported scanners list
- Updated usbdevfs info
- Spellcheck
OVERVIEW
This README will address issues regarding how to configure the kernel
This README addresses issues regarding how to configure the kernel
to access a USB scanner. Although the driver was originally conceived
for USB HP scanners, it's general enough so that it can be used with
other scanners. Also, one can now pass the USB Vendor and Product
ID's using module parameters for unknown scanners. Refer to the
document scanner_hp_sane.txt for guidance on how to configure SANE to
document scanner-hp-sane.txt for guidance on how to configure SANE to
use a USB HP Scanner.
......@@ -41,11 +42,11 @@ more information on accomplishing this.
A Linux kernel with USB Scanner support enabled.
'lspci' which is only needed to determine the type of USB hardware
available in your machine.
available/installed in your machine.
CONFIGURATION
Using `lspci -v`, determine the type of USB hardware available.
Using `lspci -v`, determine the type of USB hardware available/installed.
If you see something like:
......@@ -68,7 +69,10 @@ kernel, select 'Support for USB', 'OHCI/UHCI' depending on your
hardware (determined from the steps above), 'USB Scanner support', and
'Preliminary USB device filesystem'. Compile and install the modules
(you may need to execute `depmod -a` to update the module
dependencies). Testing was performed only as modules, YMMV.
dependencies). If any of the USB sections were compiled into the
kernel, a reboot is necessary. NOTE: Updating the boot disk with
'lilo' may also be required. Testing was performed only as modules,
YMMV.
Beginning with version 0.4 of the driver, up to 16 scanners can be
connected/used simultaneously. If you intend to use more than
......@@ -82,14 +86,15 @@ one scanner at a time:
`mknod /dev/usb/scanner15 180 63`
If you forsee using only one scanner:
If you foresee using only one scanner it is best to:
`mknod /dev/usbscanner0 c 180 48`
`ln -s /dev/usbscanner0 /dev/usbscanner`
Set appropriate permissions for /dev/usbscanner[0-15] (don't forget
about group and world permissions). Both read and write permissions
are required for proper operation.
are required for proper operation. For example:
`chmod 666 /dev/usbscanner0`
Load the appropriate modules (if compiled as modules):
......@@ -108,12 +113,23 @@ be used to test the scanner device if it's an HP scanner that supports
SCL (Scanner Control Language). Known HP scanner that support SCL are
the 4100, 5200, 6200, the 6300 -- note that the 4200 is *not*
supported since it does not understand SCL; it's also strongly
suspected that the 3300 is not SCL compliant. Hp_scan.c's purpose is
to test the driver without having to retrieve/configure SANE.
Hp_scan.c will scan the entire bed and put the output into a file
called 'out.dat' in the current directory. The data in the file is
raw data so it's not very useful for imaging.
suspected that the 3300 and the PhotoSmart S20 are not SCL compliant.
Hp_scan.c's purpose is to test the driver without having to
retrieve/configure SANE. Hp_scan.c will scan the entire bed and put
the output into a file called 'out.dat' in the current directory. The
data in the file is raw data so it's not very useful for imaging.
MESSAGES
On occassion the message 'usb_control/bulk_msg: timeout' or something
similar will appear in '/var/adm/messages' or on the console or both,
depending on how your system is configured. This is a side effect
that scanners are sometimes very slow at warming up and/or
initialiazing. In most cases, however, only several of these messages
should appear and is generally considered to be normal. If you see
a message of the type 'excessive NAK's received' then this should
be considered abnormal and generally indicates that the USB system is
unable to communicate with the scanner for some particular reason.
SUPPORTED SCANNERS
......@@ -126,71 +142,96 @@ At the time of this writing, the following scanners were supported by
scanner.c:
Acer
Prisa AcerScan 620U
Prisa Acerscan 620U & 640U (!)
Prisa AcerScan 620U (!)
Agfa
SnapScan 1212U, SnapScan Touch
SnapScan 1212U
Another SnapScan 1212U (?)
SnapScan Touch
Colorado -- See Primax/Colorado below
Epson -- See Seiko/Epson below
Genius
ColorPage Vivid Pro
ColorPage-Vivid Pro
Hewlett Packard
3300, 4100, 4200, 5200, 6200, 6300, PhotoSmart S20
3300C
4100C
4200C
PhotoSmart S20
5200C
6200C
6300C
Microtek
ScanMaker X6-X6U, Phantom 336CX - C3, Phantom C6, ScanMaker V6USL,
ScanMaker X6 - X6U
Phantom 336CX - C3
Phantom 336CX - C3 #2
Phantom C6
ScanMaker V6USL
ScanMaker V6USL #2
ScanMaker V6UL - SpicyU
Mustek
1200 CU
Primax/Colorado
G2-300 #1
G2-600 #1
G2E-300 #1
ReadyScan 636i
G2-300 #2
G2-600 #2
G2E-300 #2
G2E-600
Colorado USB 9600
Colorado USB 19200
Colorado 600u
Colorado 1200u
Seiko/Epson Corp.
Perfection 636U and 636Photo
Perfection 610
Perfection 1200U and 1200Photo
Umax
Astra 1220U
Astra 1236U
Astra 2000U
Astra 2200U
Visioneer
OneTouch 5300
OneTouch 7600 duplicate ID (!)
6100
G2-300, G2-600, G2E-300, G2E-600, ReadyScan 636i, Colorado USB
19200, Colorado 600u, Colorado 1200u
Seiko/Epson
Perfection Perfection 610, Perfection 636U/636Photo, Perfection
1200U/1200Photo
Umax
MODULE PARAMETERS
Astra 1220U, 1236U, 2000U
If you have a device that you wish to experiment with or try using
this driver with, but the Vendor and Product ID's are not coded in,
don't despair. If the driver was compiled as a module, you can pass
options to the driver. Simply add
Visioneer
options scanner vendor=0x#### product=0x****
OneTouch 5300, OneTouch 7600, 6100,
to the /etc/modules.conf file replacing the #'s and the *'s with the
correct ID's. The ID's can be retrieved from the messages file or
using `cat /proc/bus/usb/devices`. Note that USB /proc support must be
enabled during kernel configuration. If the 'scanner' module is
already loaded into memory, it must be reloaded for the module
parameters to take effect. In essence, `rmmod scanner; modprobe
scanner` must be performed.
**NOTE**: In later kernels (2.3.38+), a new filesystem was introduced,
usbdevfs. To mount the filesystem, issue the command (as root):
User Specified. See MODULE PARAMETERS for details.
mount -t usbdevfs /proc/bus/usb /proc/bus/usb
An alternative and more permanent method would be to add
MODULE PARAMETERS
none /proc/bus/usb usbdevfs defaults 0 0
If you have a device that you wish to experiment with or try using
this driver with, but the Vendor and Product ID's are not coded in,
don't despair. If the driver was compiled as a module, you can pass
options to the driver. Simply add 'options scanner vendor=0x####
product=0x****' to the conf.modules/modules.conf file replacing the
#'s and the *'s with the correct ID's. The ID's can be retrieved from
the messages file or using `cat /proc/bus/usb/devices` if USB /proc
support was selected during kernel configuration. **NOTE**:In later
kernels (2.3.38+), a new filesystem was introduced, usbdevfs. To
mount the filesystem, issue the command `mount -t usbdevfs
/proc/bus/usb /proc/bus/usb`. You can then issue ` cat
/proc/bus/usb/devices` to extract USB device information.
to /etc/fstab. This will mount usbdevfs at each reboot. You can then
issue `cat /proc/bus/usb/devices` to extract USB device information.
BUGS
If you encounter any problems feel free to drop me an email.
Just look at the list of fixes in the source files. So, if you
encounter any problems feel free to drop me an email.
David /\/elson
dnelson@jump.net
......
......@@ -863,7 +863,7 @@ S: Maintained
RAGE128 FRAMEBUFFER DISPLAY DRIVER
P: Brad Douglas
M: brad@neruo.com
L: linux-fbdev@vuser.vc.union.edu
L: linux-fbdev@vuser.vu.union.edu
S: Maintained
RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
......
......@@ -330,12 +330,18 @@ int pcibios_enable_resources(struct pci_dev *dev)
* If we set up a device for bus mastering, we need to check the latency
* timer as certain crappy BIOSes forget to set it properly.
*/
unsigned int pcibios_max_latency = 255;
void pcibios_set_master(struct pci_dev *dev)
{
u8 lat;
pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
if (lat < 16) {
printk("PCI: Increasing latency timer of device %s to 64\n", dev->slot_name);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
}
if (lat < 16)
lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
else if (lat > pcibios_max_latency)
lat = pcibios_max_latency;
else
return;
printk("PCI: Setting latency timer of device %s to %d\n", dev->slot_name, lat);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}
......@@ -25,6 +25,8 @@ extern unsigned int pci_probe;
/* pci-i386.c */
extern unsigned int pcibios_max_latency;
void pcibios_resource_survey(void);
int pcibios_enable_resources(struct pci_dev *);
......@@ -64,5 +66,6 @@ struct irq_routing_table {
extern unsigned int pcibios_irq_mask;
void pcibios_irq_init(void);
void pcibios_fixup_irqs(void);
int pcibios_lookup_irq(struct pci_dev *dev, int assign);
......@@ -125,11 +125,22 @@ static void eisa_set_level_irq(unsigned int irq)
}
}
static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
static unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
pirq--;
if (pirq < 8) {
u8 x;
unsigned reg = 0x48 + (pirq >> 1);
pci_read_config_byte(router, reg, &x);
return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
}
return 0;
}
static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
static unsigned char irqmap[16] = {
0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15
};
static unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
unsigned int val = irqmap[irq];
pirq--;
if (val && pirq < 8) {
......@@ -211,7 +222,7 @@ static struct irq_router pirq_routers[] = {
{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_0, pirq_piix_get, pirq_piix_set },
{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, pirq_piix_get, pirq_piix_set },
{ "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, pirq_piix_get, pirq_piix_set },
{ "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL, pirq_ali_set },
{ "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set },
{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, pirq_via_get, pirq_via_set },
{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, pirq_via_get, pirq_via_set },
{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, pirq_via_get, pirq_via_set },
......@@ -236,7 +247,9 @@ static void __init pirq_find_router(void)
}
#endif
if (!(pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn))) {
DBG("PCI: Interrupt router not found\n");
DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
/* fall back to default router */
pirq_router = pirq_routers + sizeof(pirq_routers) / sizeof(pirq_routers[0]) - 1;
return;
}
if (rt->rtr_vendor) {
......@@ -354,12 +367,9 @@ int pcibios_lookup_irq(struct pci_dev *dev, int assign)
return 1;
}
void __init pcibios_fixup_irqs(void)
void __init pcibios_irq_init(void)
{
struct pci_dev *dev;
u8 pin;
DBG("PCI: IRQ fixup\n");
DBG("PCI: IRQ init\n");
pirq_table = pirq_find_routing_table();
#ifdef CONFIG_PCI_BIOS
if (!pirq_table && (pci_probe & PCI_BIOS_IRQ_SCAN))
......@@ -369,7 +379,14 @@ void __init pcibios_fixup_irqs(void)
pirq_peer_trick();
pirq_find_router();
}
}
void __init pcibios_fixup_irqs(void)
{
struct pci_dev *dev;
u8 pin;
DBG("PCI: IRQ fixup\n");
pci_for_each_dev(dev) {
/*
* If the BIOS has set an out of range IRQ number, just ignore it.
......
......@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <asm/segment.h>
#include <asm/io.h>
......@@ -208,6 +209,7 @@ static struct pci_ops * __init pci_check_direct(void)
outl (tmp, 0xCF8);
__restore_flags(flags);
printk("PCI: Using configuration type 1\n");
request_region(0xCF8, 8, "PCI conf1");
return &pci_direct_conf1;
}
outl (tmp, 0xCF8);
......@@ -224,6 +226,7 @@ static struct pci_ops * __init pci_check_direct(void)
pci_sanity_check(&pci_direct_conf2)) {
__restore_flags(flags);
printk("PCI: Using configuration type 2\n");
request_region(0xCF8, 4, "PCI conf2");
return &pci_direct_conf2;
}
}
......@@ -912,6 +915,16 @@ static void __init pci_fixup_ide_trash(struct pci_dev *d)
d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
}
static void __init pci_fixup_latency(struct pci_dev *d)
{
/*
* SiS 5597 and 5598 chipsets require latency timer set to
* at most 32 to avoid lockups.
*/
DBG("PCI: Setting max latency to 32\n");
pcibios_max_latency = 32;
}
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx },
......@@ -921,6 +934,8 @@ struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, pci_fixup_ide_trash },
{ PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency },
{ 0 }
};
......@@ -969,8 +984,9 @@ void __init pcibios_init(void)
printk("PCI: Probing PCI hardware\n");
pci_root_bus = pci_scan_bus(0, pci_root_ops, NULL);
pcibios_fixup_irqs();
pcibios_irq_init();
pcibios_fixup_peer_bridges();
pcibios_fixup_irqs();
pcibios_resource_survey();
#ifdef CONFIG_PCI_BIOS
......
......@@ -32,10 +32,14 @@
* Added proper L2 cache detection for Coppermine
* Dragan Stancevic <visitor@valinux.com>, October 1999
*
* Added the origninal array for capability flags but forgot to credit
* Added the original array for capability flags but forgot to credit
* myself :) (~1998) Fixed/cleaned up some cpu_model_info and other stuff
* Jauder Ho <jauderho@carumba.com>, January 2000
*
* Detection for Celeron coppermine, identify_cpu() overhauled,
* and a few other clean ups.
* Dave Jones <dave@powertweak.com>, April 2000
*
*/
/*
......@@ -794,7 +798,7 @@ void __init setup_arch(char **cmdline_p)
static int __init get_model_name(struct cpuinfo_x86 *c)
{
unsigned int n, dummy, *v, ecx, edx;
unsigned int n, dummy, *v;
/* Actually we must have cpuid or we could never have
* figured out that this was AMD/Cyrix from the vendor info :-).
......@@ -809,29 +813,6 @@ static int __init get_model_name(struct cpuinfo_x86 *c)
cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
c->x86_model_id[48] = 0;
/* Set MTRR capability flag if appropriate */
if(c->x86_vendor==X86_VENDOR_AMD)
{
if(boot_cpu_data.x86 == 5) {
if((boot_cpu_data.x86_model == 9) ||
((boot_cpu_data.x86_model == 8) &&
(boot_cpu_data.x86_mask >= 8)))
c->x86_capability |= X86_FEATURE_MTRR;
}
if (n >= 0x80000005){
cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
printk("CPU: L1 I Cache: %dK L1 D Cache: %dK\n",
ecx>>24, edx>>24);
c->x86_cache_size=(ecx>>24)+(edx>>24);
}
if (n >= 0x80000006){
cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
printk("CPU: L2 Cache: %dK\n", ecx>>16);
c->x86_cache_size=(ecx>>16);
}
}
return 1;
}
......@@ -839,14 +820,24 @@ static int __init amd_model(struct cpuinfo_x86 *c)
{
u32 l, h;
unsigned long flags;
unsigned int n, dummy, ecx, edx;
int mbytes = max_mapnr >> (20-PAGE_SHIFT);
int r=get_model_name(c);
/*
* Now do the cache operations.
* Set MTRR capability flag if appropriate
*/
if(boot_cpu_data.x86 == 5) {
if((boot_cpu_data.x86_model == 9) ||
((boot_cpu_data.x86_model == 8) &&
(boot_cpu_data.x86_mask >= 8)))
c->x86_capability |= X86_FEATURE_MTRR;
}
/*
* Now do the cache operations.
*/
switch(c->x86)
{
case 5:
......@@ -903,6 +894,20 @@ static int __init amd_model(struct cpuinfo_x86 *c)
case 6: /* An Athlon. We can trust the BIOS probably */
break;
}
cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
if (n >= 0x80000005) {
cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
printk("CPU: L1 I Cache: %dK L1 D Cache: %dK\n",
ecx>>24, edx>>24);
c->x86_cache_size=(ecx>>24)+(edx>>24);
}
if (n >= 0x80000006) {
cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
printk("CPU: L2 Cache: %dK\n", ecx>>16);
c->x86_cache_size=(ecx>>16);
}
return r;
}
......@@ -1256,7 +1261,7 @@ static struct cpu_model_info cpu_models[] __initdata = {
void __init identify_cpu(struct cpuinfo_x86 *c)
{
int i;
int i=0;
char *p = NULL;
c->loops_per_sec = loops_per_sec;
......@@ -1264,27 +1269,28 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
get_cpu_vendor(c);
if (c->x86_vendor == X86_VENDOR_UNKNOWN &&
c->cpuid_level < 0)
switch (c->x86_vendor) {
case X86_VENDOR_UNKNOWN:
if (c->cpuid_level < 0)
return;
break;
if (c->x86_vendor == X86_VENDOR_CYRIX) {
case X86_VENDOR_CYRIX:
cyrix_model(c);
return;
}
if (c->x86_vendor == X86_VENDOR_AMD && amd_model(c))
case X86_VENDOR_AMD:
if (amd_model(c))
return;
break;
if (c->x86_vendor == X86_VENDOR_CENTAUR) {
case X86_VENDOR_CENTAUR:
centaur_model(c);
return;
}
if (c->cpuid_level > 0 && c->x86_vendor == X86_VENDOR_INTEL)
{
if(c->x86_capability&(1<<18))
{
case X86_VENDOR_INTEL:
if(c->x86_capability&(1<<18)) {
/* Disable processor serial number on Intel Pentium III
from code by Phil Karn */
unsigned long lo,hi;
......@@ -1293,7 +1299,6 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
wrmsr(0x119,lo,hi);
printk(KERN_INFO "Pentium-III serial number disabled.\n");
}
}
if (c->cpuid_level > 1) {
/* supports eax=2 call */
......@@ -1336,28 +1341,46 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
}
}
for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) {
if (cpu_models[i].vendor == c->x86_vendor &&
cpu_models[i].x86 == c->x86) {
if (c->x86_model <= 16)
p = cpu_models[i].model_names[c->x86_model];
/* Names for the Pentium II/Celeron processors
detectable only by also checking the cache size.
Dixon is NOT a Celeron. */
if ((cpu_models[i].vendor == X86_VENDOR_INTEL)
&& (cpu_models[i].x86 == 6))
{
if(c->x86_model == 5 && c->x86_cache_size == 0)
if (cpu_models[i].x86 == 6) {
switch (c->x86_model) {
case 5:
if (c->x86_cache_size == 0)
p = "Celeron (Covington)";
else if(c->x86_model == 6 && c->x86_cache_size == 128)
p = "Celeron (Mendocino)";
else if(c->x86_model == 5 && c->x86_cache_size == 256)
if (c->x86_cache_size == 256)
p = "Mobile Pentium II (Dixon)";
break;
case 6:
if (c->x86_cache_size == 128)
p = "Celeron (Mendocino)";
break;
case 8:
if (c->x86_cache_size == 128)
p = "Celeron (Coppermine)";
break;
}
}
if (p!=NULL)
goto name_decoded;
break;
}
for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) {
if (cpu_models[i].vendor == c->x86_vendor &&
cpu_models[i].x86 == c->x86) {
if (c->x86_model <= 16)
p = cpu_models[i].model_names[c->x86_model];
}
}
name_decoded:
if (p) {
strcpy(c->x86_model_id, p);
return;
......@@ -1375,9 +1398,8 @@ void __init dodgy_tsc(void)
get_cpu_vendor(&boot_cpu_data);
if(boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)
{
return;
}
cyrix_model(&boot_cpu_data);
}
......@@ -1528,6 +1550,7 @@ int get_cpuinfo(char * buffer)
for ( i = 0 ; i < 32 ; i++ )
if ( c->x86_capability & (1 << i) )
p += sprintf(p, " %s", x86_cap_flags[i]);
p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n",
(c->loops_per_sec+2500)/500000,
((c->loops_per_sec+2500)/5000) % 100);
......
......@@ -192,12 +192,17 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* make sure we exit gracefully rather than endlessly redo
* the fault.
*/
{
int fault = handle_mm_fault(mm, vma, address, write);
if (fault < 0)
goto out_of_memory;
if (!fault)
switch (handle_mm_fault(mm, vma, address, write)) {
case 1:
tsk->min_flt++;
break;
case 2:
tsk->maj_flt++;
break;
case 0:
goto do_sigbus;
default:
goto out_of_memory;
}
/*
......
#
# MPC8260 Communication options
#
if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
mainmenu_option next_comment
comment 'MPC8260 Communication Options'
bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
if [ "$CONFIG_SCC_ENET" = "y" ]; then
bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
if [ "$CONFIG_SCC1_ENET" != "y" ]; then
bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
fi
fi
bool 'FCC Ethernet' CONFIG_FCC_ENET
if [ "$CONFIG_FCC_ENET" = "y" ]; then
bool 'Ethernet on FCC1' CONFIG_FCC1_ENET
if [ "$CONFIG_FCC1_ENET" != "y" ]; then
bool 'Ethernet on FCC2' CONFIG_FCC2_ENET
fi
fi
endmenu
fi
#
# Makefile for the linux MPC8xx ppc-specific parts of comm processor
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := 8260_io.a
O_OBJS = commproc.o uart.o
ifdef CONFIG_FCC_ENET
O_OBJS += fcc.o
endif
ifdef CONFIG_SCC_ENET
O_OBJS += enet.o
endif
include $(TOPDIR)/Rules.make
/*
* General Purpose functions for the global management of the
* 8260 Communication Processor Module.
* Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
* Copyright (c) 2000 MontaVista Software, Inc (source@mvista.com)
* 2.3.99 Updates
*
* In addition to the individual control of the communication
* channels, there are a few functions that globally affect the
* communication processor.
*
* Buffer descriptors must be allocated from the dual ported memory
* space. The allocator for that is here. When the communication
* process is reset, we reclaim the memory available. There is
* currently no deallocator for this memory.
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/bootmem.h>
#include <asm/irq.h>
#include <asm/mpc8260.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/immap_8260.h>
#include <asm/cpm_8260.h>
static uint dp_alloc_base; /* Starting offset in DP ram */
static uint dp_alloc_top; /* Max offset + 1 */
static uint host_buffer; /* One page of host buffer */
static uint host_end; /* end + 1 */
cpm8260_t *cpmp; /* Pointer to comm processor space */
/* We allocate this here because it is used almost exclusively for
* the communication processor devices.
*/
immap_t *immr;
void
m8260_cpm_reset(void)
{
volatile immap_t *imp;
volatile cpm8260_t *commproc;
uint vpgaddr;
immr = imp = (volatile immap_t *)IMAP_ADDR;
commproc = &imp->im_cpm;
/* Reclaim the DP memory for our use.
*/
dp_alloc_base = CPM_DATAONLY_BASE;
dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE;
/* Set the host page for allocation.
*/
host_buffer =
(uint) alloc_bootmem_pages(PAGE_SIZE * NUM_CPM_HOST_PAGES);
host_end = host_buffer + (PAGE_SIZE * NUM_CPM_HOST_PAGES);
vpgaddr = host_buffer;
/* Tell everyone where the comm processor resides.
*/
cpmp = (cpm8260_t *)commproc;
}
/* Allocate some memory from the dual ported ram. We may want to
* enforce alignment restrictions, but right now everyone is a good
* citizen.
*/
uint
m8260_cpm_dpalloc(uint size)
{
uint retloc;
if ((dp_alloc_base + size) >= dp_alloc_top)
return(CPM_DP_NOSPACE);
retloc = dp_alloc_base;
dp_alloc_base += size;
return(retloc);
}
/* We also own one page of host buffer space for the allocation of
* UART "fifos" and the like.
*/
uint
m8260_cpm_hostalloc(uint size)
{
uint retloc;
if ((host_buffer + size) >= host_end)
return(0);
retloc = host_buffer;
host_buffer += size;
return(retloc);
}
/* Set a baud rate generator. This needs lots of work. There are
* eight BRGs, which can be connected to the CPM channels or output
* as clocks. The BRGs are in two different block of internal
* memory mapped space.
* The baud rate clock is the system clock divided by something.
* It was set up long ago during the initial boot phase and is
* is given to us.
* Baud rate clocks are zero-based in the driver code (as that maps
* to port numbers). Documentation uses 1-based numbering.
*/
#define BRG_INT_CLK (((bd_t *)__res)->bi_brgfreq * 1000000)
#define BRG_UART_CLK (BRG_INT_CLK/16)
/* This function is used by UARTS, or anything else that uses a 16x
* oversampled clock.
*/
void
m8260_cpm_setbrg(uint brg, uint rate)
{
volatile uint *bp;
/* This is good enough to get SMCs running.....
*/
if (brg < 4) {
bp = (uint *)&immr->im_brgc1;
}
else {
bp = (uint *)&immr->im_brgc5;
brg -= 4;
}
bp += brg;
*bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
}
/* This function is used to set high speed synchronous baud rate
* clocks.
*/
void
m8260_cpm_fastbrg(uint brg, uint rate, int div16)
{
volatile uint *bp;
/* This is good enough to get SMCs running.....
*/
if (brg < 4) {
bp = (uint *)&immr->im_brgc1;
}
else {
bp = (uint *)&immr->im_brgc5;
brg -= 4;
}
bp += brg;
*bp = ((BRG_INT_CLK / rate) << 1) | CPM_BRG_EN;
if (div16)
*bp |= CPM_BRG_DIV16;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@ ASFLAGS =
LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -D__powerpc__
CFLAGS := $(CFLAGS) -D__powerpc__ -fsigned-char \
-msoft-float -pipe -fno-builtin -ffixed-r2 -Wno-uninitialized \
-msoft-float -pipe -ffixed-r2 -Wno-uninitialized \
-mmultiple -mstring
CPP = $(CC) -E $(CFLAGS)
......@@ -75,6 +75,11 @@ SUBDIRS += arch/ppc/8xx_io
DRIVERS += arch/ppc/8xx_io/8xx_io.a
endif
ifdef CONFIG_8260
SUBDIRS += arch/ppc/8260_io
DRIVERS += arch/ppc/8260_io/8260_io.a
endif
ifdef CONFIG_APUS
SUBDIRS += arch/ppc/amiga
ARCHIVES += arch/ppc/amiga/amiga.o
......@@ -98,6 +103,7 @@ $(BOOT_TARGETS): $(CHECKS) vmlinux
endif
ifdef CONFIG_6xx
ifndef CONFIG_8260
$(BOOT_TARGETS): $(CHECKS) vmlinux
@$(MAKECOFFBOOT) $@
@$(MAKEBOOT) $@
......@@ -114,6 +120,12 @@ endif
@$(MAKECOFFBOOT) $@
@$(MAKEBOOT) $@
@$(MAKECHRPBOOT) $@
else
# 8260 is custom 6xx
$(BOOT_TARGETS): $(CHECKS) vmlinux
@$(MAKECOFFBOOT) $@
@$(MAKEMBXBOOT) $@
endif
endif
ifdef CONFIG_PPC64
......
......@@ -18,9 +18,14 @@ choice 'Processor Type' \
"6xx/7xx/7400 CONFIG_6xx \
4xx CONFIG_4xx \
630/Power3(64-Bit) CONFIG_PPC64 \
82xx CONFIG_82xx \
8260 CONFIG_8260 \
8xx CONFIG_8xx" 6xx
if [ "$CONFIG_8260" = "y" ]; then
define_bool CONFIG_6xx y
define_bool CONFIG_SERIAL_CONSOLE y
fi
if [ "$CONFIG_4xx" = "y" ]; then
choice 'Machine Type' \
"Oak CONFIG_OAK \
......@@ -49,6 +54,7 @@ if [ "$CONFIG_6xx" = "y" ]; then
choice 'Machine Type' \
"PowerMac/PReP/MTX/CHRP CONFIG_ALL_PPC \
Gemini CONFIG_GEMINI \
EST8260 CONFIG_EST8260 \
APUS CONFIG_APUS" PowerMac/PReP/MTX/CHRP
fi
......@@ -56,6 +62,10 @@ if [ "$CONFIG_PPC64" = "y" ]; then
define_bool CONFIG_ALL_PPC y
fi
if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then
define_bool CONFIG_ALL_PPC n
fi
bool 'Symmetric multi-processing support' CONFIG_SMP
if [ "$CONFIG_6xx" = "y" ];then
bool 'AltiVec Support' CONFIG_ALTIVEC
......@@ -86,7 +96,7 @@ define_bool CONFIG_ISA n
define_bool CONFIG_SBUS n
if [ "$CONFIG_APUS" = "y" -o "$CONFIG_4xx" = "y" -o \
"$CONFIG_82xx" = "y" ]; then
"$CONFIG_8260" = "y" ]; then
define_bool CONFIG_PCI n
else
if [ "$CONFIG_6xx" = "y" -o "$CONFIG_PPC64" = "y" ]; then
......@@ -144,7 +154,6 @@ if [ "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then
bool 'Support for ADB mouse' CONFIG_ADBMOUSE
fi
bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
bool 'Support for TotalImpact TotalMP' CONFIG_TOTALMP
bool 'Support for early boot text console (BootX only)' CONFIG_BOOTX_TEXT
bool 'Support for Motorola Hot Swap' CONFIG_MOTOROLA_HOTSWAP
fi
......@@ -226,6 +235,8 @@ fi
source net/ax25/Config.in
source net/irda/Config.in
mainmenu_option next_comment
comment 'ISDN subsystem'
......@@ -266,6 +277,10 @@ if [ "$CONFIG_8xx" = "y" ]; then
source arch/ppc/8xx_io/Config.in
fi
if [ "$CONFIG_8260" = "y" ]; then
source arch/ppc/8260_io/Config.in
fi
source drivers/usb/Config.in
mainmenu_option next_comment
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -31,7 +31,7 @@ CONFIG_CHRP=y
endif
O_OBJS := entry.o traps.o irq.o idle.o time.o process.o signal.o syscalls.o \
misc.o bitops.o ptrace.o align.o ppc_htab.o semaphore.o
misc.o ptrace.o align.o ppc_htab.o semaphore.o bitops.o
ifndef CONFIG_8xx
O_OBJS += hashtable.o
......@@ -45,10 +45,6 @@ ifdef CONFIG_KGDB
O_OBJS += ppc-stub.o
endif
ifdef CONFIG_TOTALMP
O_OBJS += totalmp.o
endif
ifdef CONFIG_PMAC_PBOOK
O_OBJS += sleep.o
endif
......@@ -100,6 +96,9 @@ endif
ifeq ($(CONFIG_GEMINI),y)
O_OBJS += gemini_prom.o gemini_pci.o gemini_setup.o open_pic.o
endif
ifeq ($(CONFIG_8260),y)
O_OBJS += m8260_setup.o ppc8260_pic.o
endif
all: $(KHEAD) kernel.o
......
......@@ -14,6 +14,7 @@
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/cache.h>
struct aligninfo {
unsigned char len;
......@@ -38,6 +39,8 @@ struct aligninfo {
#define S 0x40 /* single-precision fp, or byte-swap value */
#define HARD 0x80 /* string, stwcx. */
#define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */
/*
* The PowerPC stores certain bits of the instruction that caused the
* alignment exception in the DSISR register. This array maps those
......@@ -220,9 +223,27 @@ fix_alignment(struct pt_regs *regs)
areg = regs->dsisr & 0x1f; /* register to update */
instr = (regs->dsisr >> 10) & 0x7f;
#endif
nb = aligninfo[instr].len;
if (nb == 0)
return 0; /* too hard or invalid instruction bits */
if (nb == 0) {
long *p;
int i;
if (instr != DCBZ)
return 0; /* too hard or invalid instruction */
/*
* The dcbz (data cache block zero) instruction
* gives an alignment fault if used on non-cacheable
* memory. We handle the fault mainly for the
* case when we are running with the cache disabled
* for debugging.
*/
p = (long *) (regs->dar & -L1_CACHE_BYTES);
for (i = 0; i < L1_CACHE_BYTES / sizeof(long); ++i)
p[i] = 0;
return 1;
}
flags = aligninfo[instr].flags;
/* For the 4xx-family processors, the 'dar' field of the
......
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.
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