diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS Wed Aug 20 04:45:18 2003
+++ b/CREDITS Tue Sep 2 11:40:27 2003
@@ -281,6 +281,14 @@
S: Greenbelt, Maryland 20771
S: USA
+N: Daniele Bellucci
+E: bellucda@tiscali.it
+D: Various Janitor work.
+W: http://web.tiscali.it/bellucda
+S: Via Delle Palme, 9
+S: Terni 05100
+S: Italy
+
N: Randolph Bentson
E: bentson@grieg.seaslug.org
W: http://www.aa.net/~bentson/
@@ -1279,14 +1287,13 @@
N: Christoph Hellwig
E: hch@infradead.org
-E: hch@sgi.com
D: all kinds of driver, filesystem & core kernel hacking
D: freevxfs driver
D: sysvfs maintainer
D: chief codingstyle nitpicker
-S: Auweg 38
-S: 85748 Garching
-S: Germany
+S: Ampferstr. 50 / 4
+S: 6020 Innsbruck
+S: Austria
N: Richard Henderson
E: rth@twiddle.net
diff -Nru a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
--- a/Documentation/DocBook/kernel-locking.tmpl Thu Dec 5 18:56:55 2002
+++ b/Documentation/DocBook/kernel-locking.tmpl Sun Aug 31 16:14:01 2003
@@ -463,7 +463,7 @@
spin_lock_irqsave()
(include/linux/spinlock.h) is a variant
which saves whether interrupts were on or off in a flags word,
- which is passed to spin_lock_irqrestore(). This
+ which is passed to spin_unlock_irqrestore(). This
means that the same code can be used inside an hard irq handler (where
interrupts are already off) and in softirqs (where the irq
disabling is required).
diff -Nru a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl
--- a/Documentation/DocBook/writing_usb_driver.tmpl Tue Oct 29 09:47:57 2002
+++ b/Documentation/DocBook/writing_usb_driver.tmpl Wed Aug 20 09:40:22 2003
@@ -111,12 +111,12 @@
static struct usb_driver skel_driver = {
- name: "skeleton",
- probe: skel_probe,
- disconnect: skel_disconnect,
- fops: &skel_fops,
- minor: USB_SKEL_MINOR_BASE,
- id_table: skel_table,
+ .name = "skeleton",
+ .probe = skel_probe,
+ .disconnect = skel_disconnect,
+ .fops = &skel_fops,
+ .minor = USB_SKEL_MINOR_BASE,
+ .id_table = skel_table,
};
@@ -202,41 +202,21 @@
are passed to the function:
-static void * skel_probe(struct usb_device *dev,
-unsigned int ifnum, const struct usb_device_id *id)
+static int skel_probe(struct usb_interface *interface,
+ const struct usb_device_id *id)
The driver now needs to verify that this device is actually one that it
- can accept. If not, or if any error occurs during initialization, a NULL
- value is returned from the probe function. Otherwise a pointer to a
- private data structure containing the driver's state for this device is
- returned. That pointer is stored in the usb_device structure, and all
- callbacks to the driver pass that pointer.
+ can accept. If so, it returns 0.
+ If not, or if any error occurs during initialization, an errorcode
+ (such as -ENOMEM or -ENODEV)
+ is returned from the probe function.
In the skeleton driver, we determine what end points are marked as bulk-in
and bulk-out. We create buffers to hold the data that will be sent and
received from the device, and a USB urb to write data to the device is
- initialized. Also, we register the device with the devfs subsystem,
- allowing users of devfs to access our device. That registration looks like
- the following:
-
-
-/* initialize the devfs node for this device and register it */
-sprintf(name, "skel%d", skel->minor);
-skel->devfs = devfs_register (usb_devfs_handle,
- name,
- DEVFS_FL_DEFAULT,
- USB_MAJOR,
- USB_SKEL_MINOR_BASE + skel->minor,
- S_IFCHR | S_IRUSR | S_IWUSR |
- S_IRGRP | S_IWGRP | S_IROTH,
- &skel_fops,
- NULL);
-
-
- If the devfs_register function fails, we do not care, as the devfs
- subsystem will report this to the user.
+ initialized.
Conversely, when the device is removed from the USB bus, the disconnect
@@ -254,23 +234,18 @@
the device, any of the functions in the file_operations structure that
were passed to the USB subsystem will be called from a user program trying
to talk to the device. The first function called will be open, as the
- program tries to open the device for I/O. Within the skeleton driver's
- open function we increment the driver's usage count if it is a module with
- a call to MODULE_INC_USE_COUNT. With this macro call, if the driver is
- compiled as a module, the driver cannot be unloaded until a corresponding
- MODULE_DEC_USE_COUNT macro is called. We also increment our private usage
+ program tries to open the device for I/O. We increment our private usage
count and save off a pointer to our internal structure in the file
structure. This is done so that future calls to file operations will
- enable the driver to determine which device the user is addressing. All of
- this is done with the following code:
+ enable the driver to determine which device the user is addressing. All
+ of this is done with the following code:
/* increment our usage count for the module */
-MOD_INC_USE_COUNT;
++skel->open_count;
/* save our object in the file's private structure */
-file->private_data = skel;
+file->private_data = dev;
After the open function is called, the read and write functions are called
@@ -349,75 +324,47 @@
When the user program releases the file handle that it has been using to
- talk to the device, the release function in the driver is called. In this
- function we decrement the module usage count with a call to
- MOD_DEC_USE_COUNT (to match our previous call to MOD_INC_USE_COUNT). We
- also determine if there are any other programs that are currently talking
- to the device (a device may be opened by more than one program at one
- time). If this is the last user of the device, then we shut down any
- possible pending writes that might be currently occurring. This is all
- done with:
-
+ talk to the device, the release function in the driver is called. In this
+ function we decrement our private usage count and wait for possible
+ pending writes:
/* decrement our usage count for the device */
--skel->open_count;
-if (skel->open_count <= 0) {
- /* shutdown any bulk writes that might be going on */
- usb_unlink_urb (skel->write_urb);
- skel->open_count = 0;
-}
-/* decrement our usage count for the module */
-MOD_DEC_USE_COUNT;
One of the more difficult problems that USB drivers must be able to handle
smoothly is the fact that the USB device may be removed from the system at
any point in time, even if a program is currently talking to it. It needs
to be able to shut down any current reads and writes and notify the
- user-space programs that the device is no longer there. The following
- code is an example of how to do this:
+ user-space programs that the device is no longer there. The following
+ code (function skel_delete)
+ is an example of how to do this:
-/* if the device is not opened, then we clean right now */
-if (skel->open_count) {
- minor_table[skel->minor] = NULL;
- if (skel->bulk_in_buffer != NULL)
- kfree (skel->bulk_in_buffer);
- if (skel->bulk_out_buffer != NULL)
- kfree (skel->bulk_out_buffer);
- if (skel->write_urb != NULL)
- usb_free_urb (skel->write_urb);
- kfree (skel);
-} else {
- skel->dev = NULL;
- up (&skel->sem);
+static inline void skel_delete (struct usb_skel *dev)
+{
+ if (dev->bulk_in_buffer != NULL)
+ kfree (dev->bulk_in_buffer);
+ if (dev->bulk_out_buffer != NULL)
+ usb_buffer_free (dev->udev, dev->bulk_out_size,
+ dev->bulk_out_buffer,
+ dev->write_urb->transfer_dma);
+ if (dev->write_urb != NULL)
+ usb_free_urb (dev->write_urb);
+ kfree (dev);
}
- If a program currently has an open handle to the device, we only null the
- usb_device structure in our local structure, as it has now gone away. For
+ If a program currently has an open handle to the device, we reset the flag
+ device_present. For
every read, write, release and other functions that expect a device to be
- present, the driver first checks to see if this usb_device structure is
+ present, the driver first checks this flag to see if the device is
still present. If not, it releases that the device has disappeared, and a
- -ENODEV error is returned to the user-space program. When the release
- function is eventually called, it determines if there is no usb_device
- structure and if not, it does the cleanup that the skel_disconnect
+ -ENODEV error is returned to the user-space program. When the release
+ function is eventually called, it determines if there is no device
+ and if not, it does the cleanup that the skel_disconnect
function normally does if there are no open files on the device (see
Listing 5).
-
-if (skel->dev == NULL) {
- /* the device was unplugged before the file was released */
- minor_table[skel->minor] = NULL;
- if (skel->bulk_in_buffer != NULL)
- kfree (skel->bulk_in_buffer);
- if (skel->bulk_out_buffer != NULL)
- kfree (skel->bulk_out_buffer);
- if (skel->write_urb != NULL)
- usb_free_urb (skel->write_urb);
- kfree (skel);
- goto exit;
-}
-
diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
--- a/Documentation/filesystems/proc.txt Sun Jun 1 14:12:47 2003
+++ b/Documentation/filesystems/proc.txt Sun Aug 31 16:15:48 2003
@@ -25,6 +25,7 @@
1.5 SCSI info
1.6 Parallel port info in /proc/parport
1.7 TTY info in /proc/tty
+ 1.8 Miscellaneous kernel statistics in /proc/stat
2 Modifying System Parameters
2.1 /proc/sys/fs - File system data
@@ -702,6 +703,58 @@
/dev/console /dev/console 5 1 system:console
/dev/tty /dev/tty 5 0 system:/dev/tty
unknown /dev/tty 4 1-63 console
+
+
+1.8 Miscellaneous kernel statistics in /proc/stat
+-------------------------------------------------
+
+Various pieces of information about kernel activity are available in the
+/proc/stat file. All of the numbers reported in this file are aggregates
+since the system first booted. For a quick look, simply cat the file:
+
+ > cat /proc/stat
+ cpu 2255 34 2290 22625563 6290 127 456
+ cpu0 1132 34 1441 11311718 3675 127 438
+ cpu1 1123 0 849 11313845 2614 0 18
+ intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...]
+ ctxt 1990473
+ btime 1062191376
+ processes 2915
+ procs_running 1
+ procs_blocked 0
+
+The very first "cpu" line aggregates the numbers in all of the other "cpuN"
+lines. These numbers identify the amount of time the CPU has spent performing
+different kinds of work. Time units are in USER_HZ (typically hundredths of a
+second). The meanings of the columns are as follows, from left to right:
+
+- user: normal processes executing in user mode
+- nice: niced processes executing in user mode
+- system: processes executing in kernel mode
+- idle: twiddling thumbs
+- iowait: waiting for I/O to complete
+- irq: servicing interrupts
+- softirq: servicing softirqs
+
+The "intr" line gives counts of interrupts serviced since boot time, for each
+of the possible system interrupts. The first column is the total of all
+interrupts serviced; each subsequent column is the total for that particular
+interrupt.
+
+The "ctxt" line gives the total number of context switches across all CPUs.
+
+The "btime" line gives the time at which the system booted, in seconds since
+the Unix epoch.
+
+The "processes" line gives the number of processes and threads created, which
+includes (but is not limited to) those created by calls to the fork() and
+clone() system calls.
+
+The "procs_running" line gives the number of processes currently running on
+CPUs.
+
+The "procs_blocked" line gives the number of processes currently blocked,
+waiting for I/O to complete.
------------------------------------------------------------------------------
diff -Nru a/Documentation/ide.txt b/Documentation/ide.txt
--- a/Documentation/ide.txt Mon May 26 17:48:43 2003
+++ b/Documentation/ide.txt Sun Aug 31 16:13:57 2003
@@ -1,5 +1,5 @@
- Information regarding the Enhanced IDE drive in Linux 2.5
+ Information regarding the Enhanced IDE drive in Linux 2.6
==============================================================================
@@ -242,8 +242,23 @@
and quite likely to cause trouble with
older/odd IDE drives.
+ "hdx=biostimings" : driver will NOT attempt to tune interface speed
+ (DMA/PIO) but always honour BIOS timings.
+
"hdx=slow" : insert a huge pause after each access to the data
port. Should be used only as a last resort.
+
+ "hdx=swapdata" : when the drive is a disk, byte swap all data
+
+ "hdx=bswap" : same as above..........
+
+ "hdx=flash" : allows for more than one ata_flash disk to be
+ registered. In most cases, only one device
+ will be present.
+
+ "hdx=scsi" : the return of the ide-scsi flag, this is useful for
+ allowing ide-floppy, ide-tape, and ide-cdrom|writers
+ to use ide-scsi emulation on a device specific option.
"hdxlun=xx" : set the drive last logical unit
@@ -277,27 +292,41 @@
"idex=noautotune" : driver will NOT attempt to tune interface speed
This is the default for most chipsets,
except the cmd640.
+
+ "idex=biostimings" : driver will NOT attempt to tune interface speed
+ (DMA/PIO) but always honour BIOS timings.
"idex=serialize" : do not overlap operations on idex. Please note
that you will have to specify this option for
both the respecitve primary and secondary channel
to take effect.
+
+ "idex=four" : four drives on idex and ide(x^1) share same ports
"idex=reset" : reset interface after probe
"idex=dma" : automatically configure/use DMA if possible.
-The following are valid ONLY on ide0, which usually corresponds to the first
-ATA interface found on the particular host, and the defaults for the base,ctl
-ports must not be altered.
+ "idex=ata66" : informs the interface that it has an 80c cable
+ for chipsets that are ATA-66 capable, but the
+ ability to bit test for detection is currently
+ unknown.
+
+ "ide=reverse" : formerly called to pci sub-system, but now local.
+
+The following are valid ONLY on ide0 (except dc4030), which usually corresponds
+to the first ATA interface found on the particular host, and the defaults for
+the base,ctl ports must not be altered.
"ide0=dtc2278" : probe/support DTC2278 interface
"ide0=ht6560b" : probe/support HT6560B interface
"ide0=cmd640_vlb" : *REQUIRED* for VLB cards with the CMD640 chip
(not for PCI -- automatically detected)
"ide0=qd65xx" : probe/support qd65xx interface
- "ide0=ali14xx" : probe/support ali14xx chipsets (ALI M1439/M1445)
+ "ide0=ali14xx" : probe/support ali14xx chipsets (ALI M1439/M1443/M1445)
"ide0=umc8672" : probe/support umc8672 chipsets
+ "idex=dc4030" : probe/support Promise DC4030VL interface
+ "ide=doubler" : probe/support IDE doublers on Amiga
There may be more options than shown -- use the source, Luke!
@@ -375,3 +404,6 @@
Wed Apr 17 22:52:44 CEST 2002 edited by Marcin Dalecki, the current
maintainer.
+
+Wed Aug 20 22:31:29 CEST 2003 updated ide boot uptions to current ide.c
+comments at 2.6.0-test4 time. Maciej Soltysiak
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt Mon Aug 18 22:27:07 2003
+++ b/Documentation/kernel-parameters.txt Sun Aug 31 16:14:50 2003
@@ -215,7 +215,10 @@
when calculating gettimeofday(). If specicified timesource
is not avalible, it defaults to PIT.
Format: { pit | tsc | cyclone | ... }
-
+
+ hpet= [IA-32,HPET] option to disable HPET and use PIT.
+ Format: disable
+
cm206= [HW,CD]
Format: { auto | [,][] }
diff -Nru a/Documentation/kmod.txt b/Documentation/kmod.txt
--- a/Documentation/kmod.txt Tue Feb 5 09:40:37 2002
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,68 +0,0 @@
-Kmod: The Kernel Module Loader
-Kirk Petersen
-
-Kmod is a simple replacement for kerneld. It consists of a
-request_module() replacement and a kernel thread called kmod. When the
-kernel requests a module, the kmod wakes up and execve()s modprobe,
-passing it the name that was requested.
-
-If you have the /proc filesystem mounted, you can set the path of
-modprobe (where the kernel looks for it) by doing:
-
- echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
-
-To periodically unload unused modules, put something like the following
-in root's crontab entry:
-
- 0-59/5 * * * * /sbin/rmmod -a
-
-Kmod only loads modules. Kerneld could do more (although
-nothing in the standard kernel used its other features). If you
-require features such as request_route, we suggest that you take
-a similar approach. A simple request_route function could be called,
-and a kroute kernel thread could be sent off to do the work. But
-we should probably keep this to a minimum.
-
-Kerneld also had a mechanism for storing device driver settings. This
-can easily be done with modprobe. When a module is unloaded, modprobe
-could look at a per-driver-configurable location (/proc/sys/drivers/blah)
-for device driver settings and save them to a file. When a module
-is loaded, simply cat that file back to that location in the proc
-filesystem. Or perhaps a script could be a setting in /etc/modules.conf.
-There are many user-land methods that will work (I prefer using /proc,
-myself).
-
-If kerneld worked, why replace it?
-
-- kerneld used SysV IPC, which can now be made into a module. Besides,
- SysV IPC is ugly and should therefore be avoided (well, certainly for
- kernel level stuff)
-
-- both kmod and kerneld end up doing the same thing (calling modprobe),
- so why not skip the middle man?
-
-- removing kerneld related stuff from ipc/msg.c made it 40% smaller
-
-- kmod reports errors through the normal kernel mechanisms, which avoids
- the chicken and egg problem of kerneld and modular Unix domain sockets
-
-
-Keith Owens December 1999
-
-The combination of kmod and modprobe can loop, especially if modprobe uses a
-system call that requires a module. If modules.dep does not exist and modprobe
-was started with the -s option (kmod does this), modprobe tries to syslog() a
-message. syslog() needs Unix sockets, if Unix sockets are modular then kmod
-runs "modprobe -s net-pf-1". This runs a second copy of modprobe which
-complains that modules.dep does not exist, tries to use syslog() and starts yet
-another copy of modprobe. This is not the only possible kmod/modprobe loop,
-just the most common.
-
-To detect loops caused by "modprobe needs a service which is in a module", kmod
-limits the number of concurrent kmod issued modprobes. See MAX_KMOD_CONCURRENT
-in kernel/kmod.c. When this limit is exceeded, the kernel issues message "kmod:
-runaway modprobe loop assumed and stopped".
-
-Note for users building a heavily modularised system. It is a good idea to
-create modules.dep after installing the modules and before booting a kernel for
-the first time. "depmod -ae m.n.p" where m.n.p is the new kernel version.
diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt
--- a/Documentation/kobject.txt Tue Jun 17 15:59:07 2003
+++ b/Documentation/kobject.txt Sun Aug 31 16:14:13 2003
@@ -245,7 +245,9 @@
see the sysfs documentation for more information.
- default_attrs: Default attributes to be exported via sysfs when the
- object is registered.
+ object is registered.Note that the last attribute has to be
+ initialized to NULL ! You can find a complete implementation
+ in drivers/block/genhd.c
Instances of struct kobj_type are not registered; only referenced by
diff -Nru a/Documentation/sonypi.txt b/Documentation/sonypi.txt
--- a/Documentation/sonypi.txt Tue Mar 11 10:20:18 2003
+++ b/Documentation/sonypi.txt Tue Aug 26 09:02:05 2003
@@ -8,7 +8,9 @@
Copyright (C) 2000 Andrew Tridgell
This driver enables access to the Sony Programmable I/O Control Device which
-can be found in many (all ?) Sony Vaio laptops.
+can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be
+limited to new FX series laptops, at least the FX501 and the FX702) lack a
+sonypi device and are not supported at all by this driver.
It will give access (through a user space utility) to some events those laptops
generate, like:
@@ -96,6 +98,7 @@
SONYPI_THUMBPHRASE_MASK 0x0200
SONYPI_MEYE_MASK 0x0400
SONYPI_MEMORYSTICK_MASK 0x0800
+ SONYPI_BATTERY_MASK 0x1000
useinput: if set (which is the default) jogdial events are
forwarded to the input subsystem as mouse wheel
diff -Nru a/Documentation/sysctl/README b/Documentation/sysctl/README
--- a/Documentation/sysctl/README Tue Feb 5 09:40:37 2002
+++ b/Documentation/sysctl/README Sun Aug 31 16:14:14 2003
@@ -55,6 +55,7 @@
by piece basis, or just some 'thematic frobbing'.
The subdirs are about:
+abi/ execution domains & personalities
debug/
dev/ device specific information (eg dev/cdrom/info)
fs/ specific filesystems
diff -Nru a/Documentation/sysctl/abi.txt b/Documentation/sysctl/abi.txt
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/Documentation/sysctl/abi.txt Sun Aug 31 16:14:14 2003
@@ -0,0 +1,54 @@
+Documentation for /proc/sys/abi/* kernel version 2.6.0.test2
+ (c) 2003, Fabian Frederick
+
+For general info : README.
+
+==============================================================
+
+This path is binary emulation relevant aka personality types aka abi.
+When a process is executed, it's linked to an exec_domain whose
+personality is defined using values available from /proc/sys/abi.
+You can find further details about abi in include/linux/personality.h.
+
+Here are the files featuring in 2.6 kernel :
+
+- defhandler_coff
+- defhandler_elf
+- defhandler_lcall7
+- defhandler_libcso
+- fake_utsname
+- trace
+
+===========================================================
+defhandler_coff:
+defined value :
+PER_SCOSVR3
+0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE
+
+===========================================================
+defhandler_elf:
+defined value :
+PER_LINUX
+0
+
+===========================================================
+defhandler_lcall7:
+defined value :
+PER_SVR4
+0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+
+===========================================================
+defhandler_libsco:
+defined value:
+PER_SVR4
+0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+
+===========================================================
+fake_utsname:
+Unused
+
+===========================================================
+trace:
+Unused
+
+===========================================================
diff -Nru a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt
--- a/Documentation/usb/hotplug.txt Fri Dec 27 03:00:19 2002
+++ b/Documentation/usb/hotplug.txt Wed Aug 20 09:40:22 2003
@@ -122,17 +122,17 @@
something like this:
static struct usb_driver mydriver = {
- name: "mydriver",
- id_table: mydriver_id_table,
- probe: my_probe,
- disconnect: my_disconnect,
+ .name = "mydriver",
+ .id_table = mydriver_id_table,
+ .probe = my_probe,
+ .disconnect = my_disconnect,
/*
if using the usb chardev framework:
- minor: MY_USB_MINOR_START,
- fops: my_file_ops,
+ .minor = MY_USB_MINOR_START,
+ .fops = my_file_ops,
if exposing any operations through usbdevfs:
- ioctl: my_ioctl,
+ .ioctl = my_ioctl,
*/
}
diff -Nru a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt
--- a/Documentation/video4linux/meye.txt Tue Feb 18 03:32:29 2003
+++ b/Documentation/video4linux/meye.txt Fri Aug 1 05:47:51 2003
@@ -16,6 +16,23 @@
MJPEG hardware grabbing is supported via a private API (see below).
+Hardware supported:
+-------------------
+
+This driver supports the 'second' version of the MotionEye camera :)
+
+The first version was connected directly on the video bus of the Neomagic
+video card and is unsupported.
+
+The second one, made by Kawasaki Steel is fully supported by this
+driver (PCI vendor/device is 0x136b/0xff01)
+
+The third one, present in recent (more or less last year) Picturebooks
+(C1M* models), is not supported. The manufacturer has given the specs
+to the developers under a NDA (which allows the develoment of a GPL
+driver however), but things are not moving very fast (see
+http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011).
+
Driver options:
---------------
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS Thu Aug 21 09:09:26 2003
+++ b/MAINTAINERS Wed Sep 3 23:39:56 2003
@@ -615,8 +615,6 @@
S: Maintained
DRM DRIVERS
-P: Rik Faith
-M: faith@redhat.com
L: dri-devel@lists.sourceforge.net
S: Supported
@@ -1087,6 +1085,14 @@
L: kbuild-devel@lists.sourceforge.net
W: http://kbuild.sourceforge.net
S: Maintained
+
+KERNEL JANITORS
+P: Several
+L: kernel-janitors@osdl.org
+W: http://www.kerneljanitors.org/
+W: http://sf.net/projects/kernel-janitor/
+W: http://developer.osdl.org/rddunlap/kj-patches/
+S: Maintained
KERNEL NFSD
P: Neil Brown
diff -Nru a/Makefile b/Makefile
--- a/Makefile Fri Aug 22 16:38:51 2003
+++ b/Makefile Thu Sep 4 04:34:53 2003
@@ -268,8 +268,19 @@
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
+no-dot-config-targets := clean mrproper distclean \
+ cscope TAGS tags help %docs check%
+
config-targets := 0
mixed-targets := 0
+dot-config := 1
+
+ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
+ ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
+ dot-config := 0
+ endif
+endif
+
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
config-targets := 1
ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
@@ -309,7 +320,26 @@
core-y := usr/
SUBDIRS :=
--include .config
+ifeq ($(dot-config),1)
+# In this section, we need .config
+
+# Read in dependencies to all Kconfig* files, make sure to run
+# oldconfig if changes are detected.
+-include .config.cmd
+
+include .config
+
+# If .config needs to be updated, it will be done via the dependency
+# that autoconf has on .config.
+# To avoid any implicit rule to kick in, define an empty command
+.config: ;
+
+# If .config is newer than include/linux/autoconf.h, someone tinkered
+# with it and forgot to run make oldconfig
+include/linux/autoconf.h: scripts/fixdep .config
+ $(Q)$(MAKE) $(build)=scripts/kconfig silentoldconfig
+
+endif
include arch/$(ARCH)/Makefile
@@ -338,15 +368,7 @@
# Here goes the main Makefile
# ---------------------------------------------------------------------------
-#
-# If the user gave a *config target, it'll be handled in another
-# section below, since in this case we cannot include .config
-# Same goes for other targets like clean/mrproper etc, which
-# don't need .config, either
-# In this section, we need .config
-
--include .config.cmd
ifndef CONFIG_FRAME_POINTER
CFLAGS += -fomit-frame-pointer
@@ -521,13 +543,6 @@
@scripts/split-include include/linux/autoconf.h include/config
@touch $@
-# if .config is newer than include/linux/autoconf.h, someone tinkered
-# with it and forgot to run make oldconfig
-
-include/linux/autoconf.h: .config scripts/fixdep
- $(Q)$(MAKE) $(build)=scripts/kconfig scripts/kconfig/conf
- ./scripts/kconfig/conf -s arch/$(ARCH)/Kconfig
-
# Generate some files
# ---------------------------------------------------------------------------
@@ -579,6 +594,11 @@
.PHONY: _modinst_
_modinst_:
+ @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+ echo "Warning: you may need to install module-init-tools"; \
+ echo "See http://www.codemonkey.org.uk/post-halloween-2.5.txt";\
+ sleep 1; \
+ fi
@rm -rf $(MODLIB)/kernel
@rm -f $(MODLIB)/build
@mkdir -p $(MODLIB)/kernel
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig Sun Aug 17 01:06:24 2003
+++ b/arch/alpha/Kconfig Sun Aug 31 16:14:22 2003
@@ -597,40 +597,6 @@
source "drivers/pcmcia/Kconfig"
-choice
- prompt "Kernel core (/proc/kcore) format"
- depends on PROC_FS
- default KCORE_ELF
-
-config KCORE_ELF
- bool "ELF"
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool "A.OUT"
- help
- Not necessary unless you're using a very out-of-date binutils
- version. You probably want KCORE_ELF.
-
-endchoice
-
config SRM_ENV
tristate "SRM environment through procfs"
depends on PROC_FS
diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
--- a/arch/alpha/kernel/core_titan.c Sun Aug 17 00:57:42 2003
+++ b/arch/alpha/kernel/core_titan.c Sun Aug 31 16:14:08 2003
@@ -717,12 +717,12 @@
struct alpha_agp_ops titan_agp_ops =
{
- setup: titan_agp_setup,
- cleanup: titan_agp_cleanup,
- configure: titan_agp_configure,
- bind: titan_agp_bind_memory,
- unbind: titan_agp_unbind_memory,
- translate: titan_agp_translate
+ .setup = titan_agp_setup,
+ .cleanup = titan_agp_cleanup,
+ .configure = titan_agp_configure,
+ .bind = titan_agp_bind_memory,
+ .unbind = titan_agp_unbind_memory,
+ .translate = titan_agp_translate
};
alpha_agp_info *
diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig
--- a/arch/arm/Kconfig Tue Aug 19 11:44:53 2003
+++ b/arch/arm/Kconfig Sun Aug 31 16:14:22 2003
@@ -654,39 +654,6 @@
If you do not feel you need a faster FP emulation you should better
choose NWFPE.
-choice
- prompt "Kernel core (/proc/kcore) format"
- default KCORE_ELF
-
-config KCORE_ELF
- bool "ELF"
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool "A.OUT"
- help
- Not necessary unless you're using a very out-of-date binutils
- version. You probably want KCORE_ELF.
-
-endchoice
-
source "fs/Kconfig.binfmt"
source "drivers/base/Kconfig"
diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile Tue Aug 19 11:44:53 2003
+++ b/arch/arm/Makefile Wed Sep 3 10:17:53 2003
@@ -24,17 +24,12 @@
CFLAGS += -mbig-endian
AS += -EB
LD += -EB
+AFLAGS += -mbig-endian
endif
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
comma = ,
-# Select CPU dependent flags. Note that order of declaration is important;
-# the options further down the list override previous items.
-#
-apcs-$(CONFIG_CPU_32) :=-mapcs-32
-apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3
-
# This selects which instruction set is used.
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
@@ -54,37 +49,21 @@
tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
tune-$(CONFIG_CPU_XSCALE) :=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
-# Force -mno-fpu to be passed to the assembler. Some versions of gcc don't
-# do this with -msoft-float
-CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-AFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
+CFLAGS_BOOT :=-mapcs-32 $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
+CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
+AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
#Default value
DATAADDR := .
-ifeq ($(CONFIG_CPU_26),y)
-PROCESSOR := armo
-head-y := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o
-LDFLAGS_BLOB += --oformat elf26-littlearm
- ifeq ($(CONFIG_ROM_KERNEL),y)
- DATAADDR := 0x02080000
- textaddr-y := 0x03800000
- else
- textaddr-y := 0x02080000
- endif
-endif
-
-ifeq ($(CONFIG_CPU_32),y)
PROCESSOR := armv
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
- ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
- LDFLAGS_BLOB += --oformat elf32-bigarm
- else
- LDFLAGS_BLOB += --oformat elf32-littlearm
- endif
-textaddr-y := 0xC0008000
+ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
+ LDFLAGS_BLOB += --oformat elf32-bigarm
+else
+ LDFLAGS_BLOB += --oformat elf32-littlearm
endif
+textaddr-y := 0xC0008000
machine-$(CONFIG_ARCH_ARCA5K) := arc
machine-$(CONFIG_ARCH_RPC) := rpc
@@ -159,16 +138,10 @@
@ln -sf arch-$(INCDIR) include/asm-arm/arch
@touch $@
-include/asm-arm/.proc: $(wildcard include/config/cpu/32.h) $(wildcard include/config/cpu/26.h)
- @echo ' Making asm-arm/proc -> asm-arm/proc-$(PROCESSOR) symlink'
- @rm -f include/asm-arm/proc
- @ln -sf proc-$(PROCESSOR) include/asm-arm/proc
- @touch $@
-
prepare: maketools
.PHONY: maketools FORCE
-maketools: include/asm-arm/.arch include/asm-arm/.proc \
+maketools: include/asm-arm/.arch \
include/asm-arm/constants.h include/linux/version.h FORCE
$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
@@ -184,7 +157,6 @@
MRPROPER_FILES += \
include/asm-arm/arch include/asm-arm/.arch \
- include/asm-arm/proc include/asm-arm/.proc \
include/asm-arm/constants.h* \
include/asm-arm/mach-types.h
@@ -216,7 +188,7 @@
)
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
- include/asm-arm/.arch include/asm-arm/.proc \
+ include/asm-arm/.arch \
include/config/MARKER
include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
diff -Nru a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
--- a/arch/arm/boot/Makefile Tue Apr 15 08:12:47 2003
+++ b/arch/arm/boot/Makefile Wed Aug 13 16:46:20 2003
@@ -42,11 +42,12 @@
ifeq ($(CONFIG_ARCH_SA1100),y)
zreladdr-$(CONFIG_SA1111) := 0xc0208000
endif
- zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000
- zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000
- zreladdr-$(CONFIG_ARCH_IQ80310) := 0xa0008000
- zreladdr-$(CONFIG_ARCH_IQ80321) := 0xa0008000
- zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000
+ zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000
+ zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000
+ zreladdr-$(CONFIG_ARCH_IOP3XX) := 0xa0008000
+params-phys-$(CONFIG_ARCH_IOP3XX) := 0xa0000100
+ zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000
+params-phys-$(CONFIG_ARCH_ADIFCC) := 0xc0000100
ZRELADDR := $(zreladdr-y)
ZTEXTADDR := $(ztextaddr-y)
diff -Nru a/arch/arm/common/amba.c b/arch/arm/common/amba.c
--- a/arch/arm/common/amba.c Fri Aug 15 15:22:52 2003
+++ b/arch/arm/common/amba.c Sun Aug 24 07:16:13 2003
@@ -41,13 +41,35 @@
return amba_lookup(pcdrv->id_table, pcdev) != NULL;
}
+static int amba_suspend(struct device *dev, u32 state)
+{
+ struct amba_driver *drv = to_amba_driver(dev->driver);
+ int ret = 0;
+
+ if (dev->driver && drv->suspend)
+ ret = drv->suspend(to_amba_device(dev), state);
+ return ret;
+}
+
+static int amba_resume(struct device *dev)
+{
+ struct amba_driver *drv = to_amba_driver(dev->driver);
+ int ret = 0;
+
+ if (dev->driver && drv->resume)
+ ret = drv->resume(to_amba_device(dev));
+ return ret;
+}
+
/*
* Primecells are part of the Advanced Microcontroller Bus Architecture,
* so we call the bus "amba".
*/
-struct bus_type amba_bustype = {
- .name = "amba",
- .match = amba_match,
+static struct bus_type amba_bustype = {
+ .name = "amba",
+ .match = amba_match,
+ .suspend = amba_suspend,
+ .resume = amba_resume,
};
static int __init amba_init(void)
@@ -84,18 +106,6 @@
drv->shutdown(to_amba_device(dev));
}
-static int amba_suspend(struct device *dev, u32 state, u32 level)
-{
- struct amba_driver *drv = to_amba_driver(dev->driver);
- return drv->suspend(to_amba_device(dev), state, level);
-}
-
-static int amba_resume(struct device *dev, u32 level)
-{
- struct amba_driver *drv = to_amba_driver(dev->driver);
- return drv->resume(to_amba_device(dev), level);
-}
-
/**
* amba_driver_register - register an AMBA device driver
* @drv: amba device driver structure
@@ -112,8 +122,6 @@
SETFN(probe);
SETFN(remove);
SETFN(shutdown);
- SETFN(suspend);
- SETFN(resume);
return driver_register(&drv->drv);
}
diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
--- a/arch/arm/common/sa1111.c Fri Aug 15 15:22:52 2003
+++ b/arch/arm/common/sa1111.c Sun Aug 24 07:45:04 2003
@@ -790,10 +790,13 @@
struct sa1111 *sachip = dev_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags;
+ unsigned int val;
char *base;
- if (!dev->saved_state && level == SUSPEND_NOTIFY)
- dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
+ if (level != SUSPEND_DISABLE)
+ return 0;
+
+ dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
if (!dev->saved_state)
return -ENOMEM;
@@ -804,36 +807,31 @@
/*
* Save state.
*/
- if (level == SUSPEND_SAVE_STATE) {
- base = sachip->base;
- save->skcr = sa1111_readl(base + SA1111_SKCR);
- save->skpcr = sa1111_readl(base + SA1111_SKPCR);
- save->skcdr = sa1111_readl(base + SA1111_SKCDR);
- save->skaud = sa1111_readl(base + SA1111_SKAUD);
- save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0);
- save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1);
-
- base = sachip->base + SA1111_INTC;
- save->intpol0 = sa1111_readl(base + SA1111_INTPOL0);
- save->intpol1 = sa1111_readl(base + SA1111_INTPOL1);
- save->inten0 = sa1111_readl(base + SA1111_INTEN0);
- save->inten1 = sa1111_readl(base + SA1111_INTEN1);
- save->wakepol0 = sa1111_readl(base + SA1111_WAKEPOL0);
- save->wakepol1 = sa1111_readl(base + SA1111_WAKEPOL1);
- save->wakeen0 = sa1111_readl(base + SA1111_WAKEEN0);
- save->wakeen1 = sa1111_readl(base + SA1111_WAKEEN1);
- }
+ base = sachip->base;
+ save->skcr = sa1111_readl(base + SA1111_SKCR);
+ save->skpcr = sa1111_readl(base + SA1111_SKPCR);
+ save->skcdr = sa1111_readl(base + SA1111_SKCDR);
+ save->skaud = sa1111_readl(base + SA1111_SKAUD);
+ save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0);
+ save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1);
+
+ base = sachip->base + SA1111_INTC;
+ save->intpol0 = sa1111_readl(base + SA1111_INTPOL0);
+ save->intpol1 = sa1111_readl(base + SA1111_INTPOL1);
+ save->inten0 = sa1111_readl(base + SA1111_INTEN0);
+ save->inten1 = sa1111_readl(base + SA1111_INTEN1);
+ save->wakepol0 = sa1111_readl(base + SA1111_WAKEPOL0);
+ save->wakepol1 = sa1111_readl(base + SA1111_WAKEPOL1);
+ save->wakeen0 = sa1111_readl(base + SA1111_WAKEEN0);
+ save->wakeen1 = sa1111_readl(base + SA1111_WAKEEN1);
/*
* Disable.
*/
- if (level == SUSPEND_POWER_DOWN && state == 4) {
- unsigned int val = sa1111_readl(sachip->base + SA1111_SKCR);
-
- sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR);
- sa1111_writel(0, sachip->base + SA1111_SKPWM0);
- sa1111_writel(0, sachip->base + SA1111_SKPWM1);
- }
+ val = sa1111_readl(sachip->base + SA1111_SKCR);
+ sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR);
+ sa1111_writel(0, sachip->base + SA1111_SKPWM0);
+ sa1111_writel(0, sachip->base + SA1111_SKPWM1);
spin_unlock_irqrestore(&sachip->lock, flags);
@@ -857,6 +855,9 @@
unsigned long flags, id;
char *base;
+ if (level != RESUME_ENABLE)
+ return 0;
+
save = (struct sa1111_save_data *)dev->saved_state;
if (!save)
return 0;
@@ -878,39 +879,32 @@
/*
* First of all, wake up the chip.
*/
- if (level == RESUME_POWER_ON) {
- sa1111_wake(sachip);
-
- sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
- sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1);
- }
-
- if (level == RESUME_RESTORE_STATE) {
- base = sachip->base;
- sa1111_writel(save->skcr, base + SA1111_SKCR);
- sa1111_writel(save->skpcr, base + SA1111_SKPCR);
- sa1111_writel(save->skcdr, base + SA1111_SKCDR);
- sa1111_writel(save->skaud, base + SA1111_SKAUD);
- sa1111_writel(save->skpwm0, base + SA1111_SKPWM0);
- sa1111_writel(save->skpwm1, base + SA1111_SKPWM1);
-
- base = sachip->base + SA1111_INTC;
- sa1111_writel(save->intpol0, base + SA1111_INTPOL0);
- sa1111_writel(save->intpol1, base + SA1111_INTPOL1);
- sa1111_writel(save->inten0, base + SA1111_INTEN0);
- sa1111_writel(save->inten1, base + SA1111_INTEN1);
- sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0);
- sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1);
- sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0);
- sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1);
- }
+ sa1111_wake(sachip);
+ sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
+ sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1);
+
+ base = sachip->base;
+ sa1111_writel(save->skcr, base + SA1111_SKCR);
+ sa1111_writel(save->skpcr, base + SA1111_SKPCR);
+ sa1111_writel(save->skcdr, base + SA1111_SKCDR);
+ sa1111_writel(save->skaud, base + SA1111_SKAUD);
+ sa1111_writel(save->skpwm0, base + SA1111_SKPWM0);
+ sa1111_writel(save->skpwm1, base + SA1111_SKPWM1);
+
+ base = sachip->base + SA1111_INTC;
+ sa1111_writel(save->intpol0, base + SA1111_INTPOL0);
+ sa1111_writel(save->intpol1, base + SA1111_INTPOL1);
+ sa1111_writel(save->inten0, base + SA1111_INTEN0);
+ sa1111_writel(save->inten1, base + SA1111_INTEN1);
+ sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0);
+ sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1);
+ sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0);
+ sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1);
spin_unlock_irqrestore(&sachip->lock, flags);
- if (level == RESUME_ENABLE) {
- dev->saved_state = NULL;
- kfree(save);
- }
+ dev->saved_state = NULL;
+ kfree(save);
return 0;
}
@@ -1135,9 +1129,55 @@
return dev->devid == drv->devid;
}
+static int sa1111_bus_suspend(struct device *dev, u32 state)
+{
+ struct sa1111_dev *sadev = SA1111_DEV(dev);
+ struct sa1111_driver *drv = SA1111_DRV(dev->driver);
+ int ret = 0;
+
+ if (drv && drv->suspend)
+ ret = drv->suspend(sadev, state);
+ return ret;
+}
+
+static int sa1111_bus_resume(struct device *dev)
+{
+ struct sa1111_dev *sadev = SA1111_DEV(dev);
+ struct sa1111_driver *drv = SA1111_DRV(dev->driver);
+ int ret = 0;
+
+ if (drv && drv->resume)
+ ret = drv->resume(sadev);
+ return ret;
+}
+
+static int sa1111_bus_probe(struct device *dev)
+{
+ struct sa1111_dev *sadev = SA1111_DEV(dev);
+ struct sa1111_driver *drv = SA1111_DRV(dev->driver);
+ int ret = -ENODEV;
+
+ if (drv->probe)
+ ret = drv->probe(sadev);
+ return ret;
+}
+
+static int sa1111_bus_remove(struct device *dev)
+{
+ struct sa1111_dev *sadev = SA1111_DEV(dev);
+ struct sa1111_driver *drv = SA1111_DRV(dev->driver);
+ int ret = 0;
+
+ if (drv->remove)
+ ret = drv->remove(sadev);
+ return ret;
+}
+
struct bus_type sa1111_bus_type = {
- .name = "RAB",
- .match = sa1111_match,
+ .name = "sa1111-rab",
+ .match = sa1111_match,
+ .suspend = sa1111_bus_suspend,
+ .resume = sa1111_bus_resume,
};
static int sa1111_rab_bus_init(void)
@@ -1147,6 +1187,19 @@
postcore_initcall(sa1111_rab_bus_init);
+int sa1111_driver_register(struct sa1111_driver *driver)
+{
+ driver->drv.probe = sa1111_bus_probe;
+ driver->drv.remove = sa1111_bus_remove;
+ driver->drv.bus = &sa1111_bus_type;
+ return driver_register(&driver->drv);
+}
+
+void sa1111_driver_unregister(struct sa1111_driver *driver)
+{
+ driver_unregister(&driver->drv);
+}
+
EXPORT_SYMBOL(sa1111_check_dma_bug);
EXPORT_SYMBOL(sa1111_select_audio_mode);
EXPORT_SYMBOL(sa1111_set_audio_rate);
@@ -1155,3 +1208,5 @@
EXPORT_SYMBOL(sa1111_disable_device);
EXPORT_SYMBOL(sa1111_pll_clock);
EXPORT_SYMBOL(sa1111_bus_type);
+EXPORT_SYMBOL(sa1111_driver_register);
+EXPORT_SYMBOL(sa1111_driver_unregister);
diff -Nru a/arch/arm/def-configs/iq80310 b/arch/arm/def-configs/iq80310
--- a/arch/arm/def-configs/iq80310 Tue Apr 15 07:34:41 2003
+++ b/arch/arm/def-configs/iq80310 Wed Aug 13 16:46:20 2003
@@ -19,6 +19,12 @@
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
#
# Loadable module support
@@ -34,7 +40,6 @@
#
# CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_ANAKIN is not set
-# CONFIG_ARCH_ARCA5K is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
@@ -50,14 +55,6 @@
# CONFIG_ARCH_SHARK is not set
#
-# Archimedes/A5000 Implementations
-#
-
-#
-# Archimedes/A5000 Implementations (select only ONE)
-#
-
-#
# CLPS711X/EP721X Implementations
#
@@ -73,7 +70,9 @@
# IOP3xx Implementation Options
#
CONFIG_ARCH_IQ80310=y
+# CONFIG_ARCH_IQ80321 is not set
CONFIG_ARCH_IOP310=y
+# CONFIG_ARCH_IOP321 is not set
#
# IOP3xx Chipset Features
@@ -84,6 +83,14 @@
# CONFIG_IOP3XX_PMON is not set
#
+# ADIFCC Implementation Options
+#
+
+#
+# ADI Board Types
+#
+
+#
# Intel PXA250/210 Implementations
#
@@ -96,6 +103,7 @@
#
CONFIG_CPU_32=y
CONFIG_CPU_XSCALE=y
+CONFIG_XS80200=y
CONFIG_CPU_32v5=y
#
@@ -116,9 +124,15 @@
# CONFIG_HOTPLUG is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
# At least one math emulation must be selected
#
CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
@@ -154,6 +168,7 @@
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
#
# RAM/ROM/Flash chip drivers
@@ -164,6 +179,7 @@
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
@@ -172,13 +188,11 @@
#
# Mapping drivers for chip access
#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_NORA is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IQ80310=y
# CONFIG_MTD_EDB7312 is not set
-# CONFIG_MTD_PCI is not set
-# CONFIG_MTD_UCLINUX is not set
#
# Self-contained MTD device drivers
@@ -191,9 +205,9 @@
#
# Disk-On-Chip Device Drivers
#
-# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
#
# NAND Flash Device Drivers
@@ -236,7 +250,6 @@
# CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
@@ -253,7 +266,7 @@
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
-# CONFIG_XFRM_USER is not set
+# CONFIG_INET_IPCOMP is not set
#
# IP: Netfilter Configuration
@@ -264,7 +277,13 @@
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
+# CONFIG_XFRM_USER is not set
#
# SCTP Configuration (EXPERIMENTAL)
@@ -310,6 +329,7 @@
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
+# CONFIG_SMC91X is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
@@ -351,6 +371,11 @@
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
@@ -402,6 +427,7 @@
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
#
# IDE chipset support/bugfixes
@@ -409,7 +435,7 @@
# CONFIG_BLK_DEV_IDEPCI is not set
#
-# SCSI support
+# SCSI device support
#
# CONFIG_SCSI is not set
@@ -481,6 +507,7 @@
#
# I2C Hardware Sensors Chip support
#
+# CONFIG_I2C_SENSOR is not set
#
# L3 serial bus support
@@ -534,6 +561,8 @@
# CONFIG_VIDEO_PMS is not set
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
#
# Radio Adapters
@@ -551,18 +580,29 @@
#
# Supported Frontend Modules
#
-CONFIG_DVB_ALPS_BSRU6=y
+# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_ALPS_BSRV2 is not set
# CONFIG_DVB_ALPS_TDLB7 is not set
# CONFIG_DVB_ALPS_TDMB7 is not set
+# CONFIG_DVB_ATMEL_AT76C651 is not set
+# CONFIG_DVB_CX24110 is not set
# CONFIG_DVB_GRUNDIG_29504_491 is not set
# CONFIG_DVB_GRUNDIG_29504_401 is not set
+# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_VES1820 is not set
+# CONFIG_DVB_TDA1004X is not set
#
-# Supported DVB Adapters
+# Supported SAA7146 based PCI Adapters
#
# CONFIG_DVB_AV7110 is not set
+# CONFIG_DVB_BUDGET is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_SKYSTAR is not set
+# CONFIG_VIDEO_BTCX is not set
#
# File systems
@@ -598,6 +638,7 @@
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
@@ -631,13 +672,13 @@
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
-CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_GSS is not set
# CONFIG_AFS_FS is not set
#
@@ -655,6 +696,7 @@
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
@@ -666,13 +708,6 @@
# CONFIG_FB is not set
#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-
-#
# Sound
#
# CONFIG_SOUND is not set
@@ -695,6 +730,7 @@
# USB support
#
# CONFIG_USB is not set
+# CONFIG_USB_GADGET is not set
#
# Bluetooth support
@@ -714,7 +750,6 @@
# CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_ERRORS=y
-CONFIG_KALLSYMS=y
CONFIG_DEBUG_LL=y
#
diff -Nru a/arch/arm/def-configs/iq80321 b/arch/arm/def-configs/iq80321
--- a/arch/arm/def-configs/iq80321 Sat Aug 2 12:59:32 2003
+++ b/arch/arm/def-configs/iq80321 Wed Aug 13 16:46:20 2003
@@ -9,7 +9,7 @@
#
# Code maturity level options
#
-# CONFIG_EXPERIMENTAL is not set
+CONFIG_EXPERIMENTAL=y
#
# General setup
@@ -19,6 +19,12 @@
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
#
# Loadable module support
@@ -26,6 +32,7 @@
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
@@ -33,7 +40,6 @@
#
# CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_ANAKIN is not set
-# CONFIG_ARCH_ARCA5K is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
@@ -49,14 +55,6 @@
# CONFIG_ARCH_SHARK is not set
#
-# Archimedes/A5000 Implementations
-#
-
-#
-# Archimedes/A5000 Implementations (select only ONE)
-#
-
-#
# CLPS711X/EP721X Implementations
#
@@ -79,6 +77,18 @@
#
# IOP3xx Chipset Features
#
+# CONFIG_IOP3XX_AAU is not set
+# CONFIG_IOP3XX_DMA is not set
+# CONFIG_IOP3XX_MU is not set
+# CONFIG_IOP3XX_PMON is not set
+
+#
+# ADIFCC Implementation Options
+#
+
+#
+# ADI Board Types
+#
#
# Intel PXA250/210 Implementations
@@ -98,6 +108,7 @@
#
# Processor Features
#
+# CONFIG_ARM_THUMB is not set
CONFIG_XSCALE_PMU=y
#
@@ -112,17 +123,25 @@
# CONFIG_HOTPLUG is not set
#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
# At least one math emulation must be selected
#
CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PM is not set
+# CONFIG_PREEMPT is not set
# CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0xa0000000"
CONFIG_ALIGNMENT_TRAP=y
#
@@ -148,6 +167,7 @@
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
#
# RAM/ROM/Flash chip drivers
@@ -158,6 +178,7 @@
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
@@ -166,13 +187,10 @@
#
# Mapping drivers for chip access
#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_NORA is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
-CONFIG_MTD_IQ80321=y
# CONFIG_MTD_EDB7312 is not set
-# CONFIG_MTD_PCI is not set
-# CONFIG_MTD_UCLINUX is not set
#
# Self-contained MTD device drivers
@@ -185,9 +203,9 @@
#
# Disk-On-Chip Device Drivers
#
-# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
#
# NAND Flash Device Drivers
@@ -206,6 +224,7 @@
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
@@ -229,7 +248,6 @@
# CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
@@ -241,24 +259,47 @@
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
-# CONFIG_XFRM_USER is not set
+# CONFIG_INET_IPCOMP is not set
#
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_XFRM_USER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
@@ -279,12 +320,14 @@
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
+# CONFIG_SMC91X is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
@@ -298,6 +341,7 @@
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
# CONFIG_EEPRO100_PIO is not set
@@ -305,6 +349,7 @@
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
@@ -317,13 +362,21 @@
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
@@ -335,6 +388,8 @@
#
# Token Ring devices (depends on LLC=y)
#
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
#
# Wan interfaces
@@ -371,6 +426,7 @@
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
#
# IDE chipset support/bugfixes
@@ -379,11 +435,13 @@
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDE_TCQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_PCI_WIP is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -391,11 +449,13 @@
CONFIG_BLK_DEV_CMD64X=y
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
@@ -408,11 +468,16 @@
# CONFIG_IDEDMA_IVB is not set
#
-# SCSI support
+# SCSI device support
#
# CONFIG_SCSI is not set
#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
# I2O device support
#
# CONFIG_I2O is not set
@@ -450,11 +515,16 @@
#
# Serial drivers
#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_DZ is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
@@ -470,6 +540,7 @@
#
# I2C Hardware Sensors Chip support
#
+# CONFIG_I2C_SENSOR is not set
#
# L3 serial bus support
@@ -522,6 +593,9 @@
#
# CONFIG_VIDEO_PMS is not set
# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
#
# Radio Adapters
@@ -534,6 +608,7 @@
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set
+# CONFIG_VIDEO_BTCX is not set
#
# File systems
@@ -567,16 +642,25 @@
# Pseudo filesystems
#
CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
+# CONFIG_JFFS2_FS_NAND is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
@@ -589,15 +673,19 @@
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
# CONFIG_NFSD is not set
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
-CONFIG_SUNRPC=y
+# CONFIG_INTERMEZZO_FS is not set
+# CONFIG_AFS_FS is not set
#
# Partition Types
@@ -614,6 +702,7 @@
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
@@ -625,13 +714,6 @@
# CONFIG_FB is not set
#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-
-#
# Sound
#
# CONFIG_SOUND is not set
@@ -654,6 +736,7 @@
# USB support
#
# CONFIG_USB is not set
+# CONFIG_USB_GADGET is not set
#
# Bluetooth support
@@ -664,7 +747,7 @@
# Kernel hacking
#
CONFIG_FRAME_POINTER=y
-CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SLAB is not set
@@ -673,7 +756,6 @@
# CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_ERRORS=y
-# CONFIG_KALLSYMS is not set
CONFIG_DEBUG_LL=y
#
diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
--- a/arch/arm/kernel/Makefile Mon Aug 4 20:55:17 2003
+++ b/arch/arm/kernel/Makefile Wed Sep 3 01:25:59 2003
@@ -2,13 +2,11 @@
# Makefile for the linux kernel.
#
-ENTRY_OBJ = entry-$(PROCESSOR).o
-
AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR)
# Object file lists.
-obj-y := arch.o compat.o dma.o $(ENTRY_OBJ) entry-common.o irq.o \
+obj-y := arch.o compat.o dma.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o
@@ -34,6 +32,5 @@
# Spell out some dependencies that `make dep' doesn't spot
$(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
-$(obj)/entry-armo.o: $(obj)/entry-header.S include/asm-arm/constants.h
$(obj)/entry-common.o: $(obj)/entry-header.S include/asm-arm/constants.h \
$(obj)/calls.S
diff -Nru a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
--- a/arch/arm/kernel/apm.c Wed Mar 26 05:00:46 2003
+++ b/arch/arm/kernel/apm.c Sun Aug 31 16:14:08 2003
@@ -26,6 +26,7 @@
#include
#include
+#include /* apm_power_info */
#include
/*
@@ -93,18 +94,7 @@
static const char driver_version[] = "1.13"; /* no spaces */
-/*
- * This structure gets filled in by the machine specific 'get_power_status'
- * implementation. Any fields which are not set default to a safe value.
- */
-struct apm_power_info {
- unsigned char ac_line_status;
- unsigned char battery_status;
- unsigned char battery_flag;
- unsigned char battery_life;
- int time;
- int units;
-};
+
/*
* Compatibility cruft until the IPAQ people move over to the new
@@ -388,18 +378,18 @@
}
static struct file_operations apm_bios_fops = {
- owner: THIS_MODULE,
- read: apm_read,
- poll: apm_poll,
- ioctl: apm_ioctl,
- open: apm_open,
- release: apm_release,
+ .owner = THIS_MODULE,
+ .read = apm_read,
+ .poll = apm_poll,
+ .ioctl = apm_ioctl,
+ .open = apm_open,
+ .release = apm_release,
};
static struct miscdevice apm_device = {
- minor: APM_MINOR_DEV,
- name: "apm_bios",
- fops: &apm_bios_fops
+ .minor = APM_MINOR_DEV,
+ .name = "apm_bios",
+ .fops = &apm_bios_fops
};
diff -Nru a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
--- a/arch/arm/kernel/bios32.c Thu Jul 31 16:47:19 2003
+++ b/arch/arm/kernel/bios32.c Sun Aug 24 06:12:42 2003
@@ -263,7 +263,7 @@
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{
if (debug_pci)
- printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->dev.name);
+ printk("PCI: Assigning IRQ %02d to %s\n", irq, pci_name(dev));
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
}
@@ -362,6 +362,19 @@
isa_bridge = dev;
break;
#endif
+ case PCI_CLASS_BRIDGE_PCI:
+ pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &status);
+ status |= PCI_BRIDGE_CTL_PARITY|PCI_BRIDGE_CTL_MASTER_ABORT;
+ status &= ~(PCI_BRIDGE_CTL_BUS_RESET|PCI_BRIDGE_CTL_FAST_BACK);
+ pci_write_config_word(dev, PCI_BRIDGE_CONTROL, status);
+ break;
+
+ case PCI_CLASS_BRIDGE_CARDBUS:
+ pci_read_config_word(dev, PCI_CB_BRIDGE_CONTROL, &status);
+ status |= PCI_CB_BRIDGE_CTL_PARITY|PCI_CB_BRIDGE_CTL_MASTER_ABORT;
+ pci_write_config_word(dev, PCI_CB_BRIDGE_CONTROL, status);
+ break;
+ }
}
/*
diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
--- a/arch/arm/kernel/ecard.c Fri Aug 15 15:22:53 2003
+++ b/arch/arm/kernel/ecard.c Sun Aug 24 05:44:40 2003
@@ -896,7 +896,7 @@
static ssize_t ecard_show_vendor(struct device *dev, char *buf)
{
struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->manufacturer);
+ return sprintf(buf, "%u\n", ec->cid.manufacturer);
}
static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL);
@@ -904,7 +904,7 @@
static ssize_t ecard_show_device(struct device *dev, char *buf)
{
struct expansion_card *ec = ECARD_DEV(dev);
- return sprintf(buf, "%u\n", ec->product);
+ return sprintf(buf, "%u\n", ec->cid.product);
}
static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL);
diff -Nru a/arch/arm/kernel/entry-armo.S b/arch/arm/kernel/entry-armo.S
--- a/arch/arm/kernel/entry-armo.S Mon Feb 24 12:42:23 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,633 +0,0 @@
-/*
- * linux/arch/arm/kernel/entry-armo.S
- *
- * Copyright (C) 1995,1996,1997,1998 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Low-level vector interface routines
- *
- * Design issues:
- * - We have several modes that each vector can be called from,
- * each with its own set of registers. On entry to any vector,
- * we *must* save the registers used in *that* mode.
- *
- * - This code must be as fast as possible.
- *
- * There are a few restrictions on the vectors:
- * - the SWI vector cannot be called from *any* non-user mode
- *
- * - the FP emulator is *never* called from *any* non-user mode undefined
- * instruction.
- *
- * Ok, so this file may be a mess, but its as efficient as possible while
- * adhering to the above criteria.
- */
-#include
-#include
-#include "entry-header.S"
-
- .text
-
-#ifdef IOC_BASE
-/* IOC / IOMD based hardware */
- .equ ioc_base_high, IOC_BASE & 0xff000000
- .equ ioc_base_low, IOC_BASE & 0x00ff0000
- .macro disable_fiq
- mov r12, #ioc_base_high
- .if ioc_base_low
- orr r12, r12, #ioc_base_low
- .endif
- strb r12, [r12, #0x38] @ Disable FIQ register
- .endm
-
- .macro get_irqnr_and_base, irqnr, base
- mov r4, #ioc_base_high @ point at IOC
- .if ioc_base_low
- orr r4, r4, #ioc_base_low
- .endif
- ldrb \irqnr, [r4, #0x24] @ get high priority first
- adr \base, irq_prio_h
- teq \irqnr, #0
- ldreqb \irqnr, [r4, #0x14] @ get low priority
- adreq \base, irq_prio_l
- .endm
-
-/*
- * Interrupt table (incorporates priority)
- */
- .macro irq_prio_table
-irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
- .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
- .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
- .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
- .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
- .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
- .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
- .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
- .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
- .endm
-#else
-#error Unknown architecture
-#endif
-
-/*=============================================================================
- * For entry-common.S
- */
-
-#if 0
-/*
- * Uncomment these if you wish to get more debugging into about data aborts.
- */
-#define FAULT_CODE_LDRSTRPOST 0x80
-#define FAULT_CODE_LDRSTRPRE 0x40
-#define FAULT_CODE_LDRSTRREG 0x20
-#define FAULT_CODE_LDMSTM 0x10
-#define FAULT_CODE_LDCSTC 0x08
-#endif
-#define FAULT_CODE_PREFETCH 0x04
-#define FAULT_CODE_WRITE 0x02
-#define FAULT_CODE_FORCECOW 0x01
-
-#define SVC_SAVE_ALL \
- str sp, [sp, #-16]! ;\
- str lr, [sp, #8] ;\
- str lr, [sp, #4] ;\
- stmfd sp!, {r0 - r12} ;\
- mov r0, #-1 ;\
- str r0, [sp, #S_OLD_R0] ;\
- zero_fp
-
-#define SVC_IRQ_SAVE_ALL \
- str sp, [sp, #-16]! ;\
- str lr, [sp, #4] ;\
- ldr lr, .LCirq ;\
- ldr lr, [lr] ;\
- str lr, [sp, #8] ;\
- stmfd sp!, {r0 - r12} ;\
- mov r0, #-1 ;\
- str r0, [sp, #S_OLD_R0] ;\
- zero_fp
-
-#define SVC_RESTORE_ALL \
- ldmfd sp, {r0 - pc}^
-
-/*=============================================================================
- * Undefined FIQs
- *-----------------------------------------------------------------------------
- */
-_unexp_fiq: ldr sp, .LCfiq
- mov r12, #IOC_BASE
- strb r12, [r12, #0x38] @ Disable FIQ register
- teqp pc, #0x0c000003
- mov r0, r0
- stmfd sp!, {r0 - r3, ip, lr}
- adr r0, Lfiqmsg
- bl printk
- ldmfd sp!, {r0 - r3, ip, lr}
- teqp pc, #0x0c000001
- mov r0, r0
- movs pc, lr
-
-Lfiqmsg: .ascii "*** Unexpected FIQ\n\0"
- .align
-
-.LCfiq: .word __temp_fiq
-.LCirq: .word __temp_irq
-
-/*=============================================================================
- * Undefined instruction handler
- *-----------------------------------------------------------------------------
- * Handles floating point instructions
- */
-vector_undefinstr:
- tst lr,#3
- bne __und_svc
- save_user_regs
- zero_fp
- teqp pc, #PSR_I_BIT | MODE_SVC
-.Lbug_undef:
- ldr r4, .LC2
- ldr pc, [r4] @ Call FP module USR entry point
-
- .globl fpundefinstr
-fpundefinstr: @ Called by FP module on undefined instr
- mov r0, lr
- mov r1, sp
- teqp pc, #MODE_SVC
- bl do_undefinstr
- b ret_from_exception @ Normal FP exit
-
-__und_svc: SVC_SAVE_ALL @ Non-user mode
- mask_pc r0, lr
- and r2, lr, #3
- sub r0, r0, #4
- mov r1, sp
- bl do_undefinstr
- SVC_RESTORE_ALL
-
-#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE
- /* The FPE is always present */
- .equ fpe_not_present, 0
-#else
-/* We get here if an undefined instruction happens and the floating
- * point emulator is not present. If the offending instruction was
- * a WFS, we just perform a normal return as if we had emulated the
- * operation. This is a hack to allow some basic userland binaries
- * to run so that the emulator module proper can be loaded. --philb
- */
-fpe_not_present:
- adr r10, wfs_mask_data
- ldmia r10, {r4, r5, r6, r7, r8}
- ldr r10, [sp, #S_PC] @ Load PC
- sub r10, r10, #4
- mask_pc r10, r10
- ldrt r10, [r10] @ get instruction
- and r5, r10, r5
- teq r5, r4 @ Is it WFS?
- beq ret_from_exception
- and r5, r10, r8
- teq r5, r6 @ Is it LDF/STF on sp or fp?
- teqne r5, r7
- bne fpundefinstr
- tst r10, #0x00200000 @ Does it have WB
- beq ret_from_exception
- and r4, r10, #255 @ get offset
- and r6, r10, #0x000f0000
- tst r10, #0x00800000 @ +/-
- ldr r5, [sp, r6, lsr #14] @ Load reg
- rsbeq r4, r4, #0
- add r5, r5, r4, lsl #2
- str r5, [sp, r6, lsr #14] @ Save reg
- b ret_from_exception
-
-wfs_mask_data: .word 0x0e200110 @ WFS/RFS
- .word 0x0fef0fff
- .word 0x0d0d0100 @ LDF [sp]/STF [sp]
- .word 0x0d0b0100 @ LDF [fp]/STF [fp]
- .word 0x0f0f0f00
-#endif
-
-.LC2: .word fp_enter
-
-/*=============================================================================
- * Prefetch abort handler
- *-----------------------------------------------------------------------------
- */
-
-vector_prefetch:
- sub lr, lr, #4
- tst lr, #3
- bne __pabt_invalid
- save_user_regs
- teqp pc, #0x00000003 @ NOT a problem - doesn't change mode
- mask_pc r0, lr @ Address of abort
- mov r1, sp @ Tasks registers
- bl do_PrefetchAbort
- teq r0, #0 @ If non-zero, we believe this abort..
- bne ret_from_exception
-#ifdef DEBUG_UNDEF
- adr r0, t
- bl printk
-#endif
- ldr lr, [sp,#S_PC] @ program to test this on. I think its
- b .Lbug_undef @ broken at the moment though!)
-
-__pabt_invalid: SVC_SAVE_ALL
- mov r0, sp @ Prefetch aborts are definitely *not*
- mov r1, #BAD_PREFETCH @ allowed in non-user modes. We cant
- and r2, lr, #3 @ recover from this problem.
- b bad_mode
-
-#ifdef DEBUG_UNDEF
-t: .ascii "*** undef ***\r\n\0"
- .align
-#endif
-
-/*=============================================================================
- * Address exception handler
- *-----------------------------------------------------------------------------
- * These aren't too critical.
- * (they're not supposed to happen).
- * In order to debug the reason for address exceptions in non-user modes,
- * we have to obtain all the registers so that we can see what's going on.
- */
-
-vector_addrexcptn:
- sub lr, lr, #8
- tst lr, #3
- bne Laddrexcptn_not_user
- save_user_regs
- teq pc, #0x00000003
- mask_pc r0, lr @ Point to instruction
- mov r1, sp @ Point to registers
- mov r2, #0x400
- mov lr, pc
- bl do_excpt
- b ret_from_exception
-
-Laddrexcptn_not_user:
- SVC_SAVE_ALL
- and r2, lr, #3
- teq r2, #3
- bne Laddrexcptn_illegal_mode
- teqp pc, #0x00000003 @ NOT a problem - doesn't change mode
- mask_pc r0, lr
- mov r1, sp
- orr r2, r2, #0x400
- bl do_excpt
- ldmia sp, {r0 - lr} @ I cant remember the reason I changed this...
- add sp, sp, #15*4
- movs pc, lr
-
-Laddrexcptn_illegal_mode:
- mov r0, sp
- str lr, [sp, #-4]!
- orr r1, r2, #0x0c000000
- teqp r1, #0 @ change into mode (wont be user mode)
- mov r0, r0
- mov r1, r8 @ Any register from r8 - r14 can be banked
- mov r2, r9
- mov r3, r10
- mov r4, r11
- mov r5, r12
- mov r6, r13
- mov r7, r14
- teqp pc, #0x04000003 @ back to svc
- mov r0, r0
- stmfd sp!, {r1-r7}
- ldmia r0, {r0-r7}
- stmfd sp!, {r0-r7}
- mov r0, sp
- mov r1, #BAD_ADDREXCPTN
- b bad_mode
-
-/*=============================================================================
- * Interrupt (IRQ) handler
- *-----------------------------------------------------------------------------
- * Note: if in user mode, then *no* kernel routine is running, so do not have
- * to save svc lr
- * (r13 points to irq temp save area)
- */
-
-vector_IRQ: ldr r13, .LCirq @ I will leave this one in just in case...
- sub lr, lr, #4
- str lr, [r13]
- tst lr, #3
- bne __irq_svc
- teqp pc, #0x08000003
- mov r0, r0
- ldr lr, .LCirq
- ldr lr, [lr]
- save_user_regs
-
-1: get_irqnr_and_base r6, r5
- teq r6, #0
- ldrneb r0, [r5, r6] @ get IRQ number
- movne r1, sp
- @
- @ routine called with r0 = irq number, r1 = struct pt_regs *
- @
- adr lr, 1b
- orr lr, lr, #0x08000003 @ Force SVC
- bne asm_do_IRQ
-
- mov why, #0
- get_current_task r5
- b ret_to_user
-
- irq_prio_table
-
-__irq_svc: teqp pc, #0x08000003
- mov r0, r0
- SVC_IRQ_SAVE_ALL
- and r2, lr, #3
- teq r2, #3
- bne __irq_invalid
-1: get_irqnr_and_base r6, r5
- teq r6, #0
- ldrneb r0, [r5, r6] @ get IRQ number
- movne r1, sp
- @
- @ routine called with r0 = irq number, r1 = struct pt_regs *
- @
- adr lr, 1b
- orr lr, lr, #0x08000003 @ Force SVC
- bne asm_do_IRQ @ Returns to 1b
- SVC_RESTORE_ALL
-
-__irq_invalid: mov r0, sp
- mov r1, #BAD_IRQ
- b bad_mode
-
-/*=============================================================================
- * Data abort handler code
- *-----------------------------------------------------------------------------
- *
- * This handles both exceptions from user and SVC modes, computes the address
- * range of the problem, and does any correction that is required. It then
- * calls the kernel data abort routine.
- *
- * This is where I wish that the ARM would tell you which address aborted.
- */
-
-vector_data: sub lr, lr, #8 @ Correct lr
- tst lr, #3
- bne Ldata_not_user
- save_user_regs
- teqp pc, #0x00000003 @ NOT a problem - doesn't change mode
- mask_pc r0, lr
- bl Ldata_do
- b ret_from_exception
-
-Ldata_not_user:
- SVC_SAVE_ALL
- and r2, lr, #3
- teq r2, #3
- bne Ldata_illegal_mode
- tst lr, #0x08000000
- teqeqp pc, #0x00000003 @ NOT a problem - doesn't change mode
- mask_pc r0, lr
- bl Ldata_do
- SVC_RESTORE_ALL
-
-Ldata_illegal_mode:
- mov r0, sp
- mov r1, #BAD_DATA
- b bad_mode
-
-Ldata_do: mov r3, sp
- ldr r4, [r0] @ Get instruction
- mov r2, #0
- tst r4, #1 << 20 @ Check to see if it is a write instruction
- orreq r2, r2, #FAULT_CODE_WRITE @ Indicate write instruction
- mov r1, r4, lsr #22 @ Now branch to the relevant processing routine
- and r1, r1, #15 << 2
- add pc, pc, r1
- movs pc, lr
- b Ldata_unknown
- b Ldata_unknown
- b Ldata_unknown
- b Ldata_unknown
- b Ldata_ldrstr_post @ ldr rd, [rn], #m
- b Ldata_ldrstr_numindex @ ldr rd, [rn, #m] @ RegVal
- b Ldata_ldrstr_post @ ldr rd, [rn], rm
- b Ldata_ldrstr_regindex @ ldr rd, [rn, rm]
- b Ldata_ldmstm @ ldm*a rn,
- b Ldata_ldmstm @ ldm*b rn,
- b Ldata_unknown
- b Ldata_unknown
- b Ldata_ldrstr_post @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m
- b Ldata_ldcstc_pre @ ldc rd, [rn, #m]
- b Ldata_unknown
-Ldata_unknown: @ Part of jumptable
- mov r0, r1
- mov r1, r4
- mov r2, r3
- b baddataabort
-
-Ldata_ldrstr_post:
- mov r0, r4, lsr #14 @ Get Rn
- and r0, r0, #15 << 2 @ Mask out reg.
- teq r0, #15 << 2
- ldr r0, [r3, r0] @ Get register
- biceq r0, r0, #PCMASK
- mov r1, r0
-#ifdef FAULT_CODE_LDRSTRPOST
- orr r2, r2, #FAULT_CODE_LDRSTRPOST
-#endif
- b do_DataAbort
-
-Ldata_ldrstr_numindex:
- mov r0, r4, lsr #14 @ Get Rn
- and r0, r0, #15 << 2 @ Mask out reg.
- teq r0, #15 << 2
- ldr r0, [r3, r0] @ Get register
- mov r1, r4, lsl #20
- biceq r0, r0, #PCMASK
- tst r4, #1 << 23
- addne r0, r0, r1, lsr #20
- subeq r0, r0, r1, lsr #20
- mov r1, r0
-#ifdef FAULT_CODE_LDRSTRPRE
- orr r2, r2, #FAULT_CODE_LDRSTRPRE
-#endif
- b do_DataAbort
-
-Ldata_ldrstr_regindex:
- mov r0, r4, lsr #14 @ Get Rn
- and r0, r0, #15 << 2 @ Mask out reg.
- teq r0, #15 << 2
- ldr r0, [r3, r0] @ Get register
- and r7, r4, #15
- biceq r0, r0, #PCMASK
- teq r7, #15 @ Check for PC
- ldr r7, [r3, r7, lsl #2] @ Get Rm
- and r8, r4, #0x60 @ Get shift types
- biceq r7, r7, #PCMASK
- mov r9, r4, lsr #7 @ Get shift amount
- and r9, r9, #31
- teq r8, #0
- moveq r7, r7, lsl r9
- teq r8, #0x20 @ LSR shift
- moveq r7, r7, lsr r9
- teq r8, #0x40 @ ASR shift
- moveq r7, r7, asr r9
- teq r8, #0x60 @ ROR shift
- moveq r7, r7, ror r9
- tst r4, #1 << 23
- addne r0, r0, r7
- subeq r0, r0, r7 @ Apply correction
- mov r1, r0
-#ifdef FAULT_CODE_LDRSTRREG
- orr r2, r2, #FAULT_CODE_LDRSTRREG
-#endif
- b do_DataAbort
-
-Ldata_ldmstm:
- mov r7, #0x11
- orr r7, r7, r7, lsl #8
- and r0, r4, r7
- and r1, r4, r7, lsl #1
- add r0, r0, r1, lsr #1
- and r1, r4, r7, lsl #2
- add r0, r0, r1, lsr #2
- and r1, r4, r7, lsl #3
- add r0, r0, r1, lsr #3
- add r0, r0, r0, lsr #8
- add r0, r0, r0, lsr #4
- and r7, r0, #15 @ r7 = no. of registers to transfer.
- mov r5, r4, lsr #14 @ Get Rn
- and r5, r5, #15 << 2
- ldr r0, [r3, r5] @ Get reg
- eor r6, r4, r4, lsl #2
- tst r6, #1 << 23 @ Check inc/dec ^ writeback
- rsbeq r7, r7, #0
- add r7, r0, r7, lsl #2 @ Do correction (signed)
- subne r1, r7, #1
- subeq r1, r0, #1
- moveq r0, r7
- tst r4, #1 << 21 @ Check writeback
- strne r7, [r3, r5]
- eor r6, r4, r4, lsl #1
- tst r6, #1 << 24 @ Check Pre/Post ^ inc/dec
- addeq r0, r0, #4
- addeq r1, r1, #4
- teq r5, #15*4 @ CHECK FOR PC
- biceq r1, r1, #PCMASK
- biceq r0, r0, #PCMASK
-#ifdef FAULT_CODE_LDMSTM
- orr r2, r2, #FAULT_CODE_LDMSTM
-#endif
- b do_DataAbort
-
-Ldata_ldcstc_pre:
- mov r0, r4, lsr #14 @ Get Rn
- and r0, r0, #15 << 2 @ Mask out reg.
- teq r0, #15 << 2
- ldr r0, [r3, r0] @ Get register
- mov r1, r4, lsl #24 @ Get offset
- biceq r0, r0, #PCMASK
- tst r4, #1 << 23
- addne r0, r0, r1, lsr #24
- subeq r0, r0, r1, lsr #24
- mov r1, r0
-#ifdef FAULT_CODE_LDCSTC
- orr r2, r2, #FAULT_CODE_LDCSTC
-#endif
- b do_DataAbort
-
-
-/*
- * This is the return code to user mode for abort handlers
- */
-ENTRY(ret_from_exception)
- get_current_task tsk
- mov why, #0
- b ret_to_user
-
- .data
-ENTRY(fp_enter)
- .word fpe_not_present
- .text
-/*
- * Register switch for older 26-bit only ARMs
- */
-ENTRY(__switch_to)
- stmfd sp!, {r4 - sl, fp, lr} @ Store most regs on stack
- str sp, [r0, #TSS_SAVE] @ Save sp_SVC
- ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC
- ldmfd sp!, {r4 - sl, fp, pc}^ @ Load all regs saved previously
-
-/*
- *=============================================================================
- * Low-level interface code
- *-----------------------------------------------------------------------------
- * Trap initialisation
- *-----------------------------------------------------------------------------
- *
- * Note - FIQ code has changed. The default is a couple of words in 0x1c, 0x20
- * that call _unexp_fiq. Nowever, we now copy the FIQ routine to 0x1c (removes
- * some excess cycles).
- *
- * What we need to put into 0-0x1c are branches to branch to the kernel.
- */
-
- __INIT
-
-.Ljump_addresses:
- swi SYS_ERROR0
- .word vector_undefinstr - 12
- .word vector_swi - 16
- .word vector_prefetch - 20
- .word vector_data - 24
- .word vector_addrexcptn - 28
- .word vector_IRQ - 32
- .word _unexp_fiq - 36
- b . + 8
-/*
- * initialise the trap system
- */
-ENTRY(__trap_init)
- stmfd sp!, {r4 - r7, lr}
- adr r1, .Ljump_addresses
- ldmia r1, {r1 - r7, ip, lr}
- orr r2, lr, r2, lsr #2
- orr r3, lr, r3, lsr #2
- orr r4, lr, r4, lsr #2
- orr r5, lr, r5, lsr #2
- orr r6, lr, r6, lsr #2
- orr r7, lr, r7, lsr #2
- orr ip, lr, ip, lsr #2
- mov r0, #0
- stmia r0, {r1 - r7, ip}
- ldmfd sp!, {r4 - r7, pc}^
-
- .bss
-__temp_irq: .space 4 @ saved lr_irq
-__temp_fiq: .space 128
diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
--- a/arch/arm/kernel/entry-armv.S Tue Apr 22 05:39:46 2003
+++ b/arch/arm/kernel/entry-armv.S Wed Sep 3 10:17:53 2003
@@ -15,10 +15,12 @@
*/
#include
#include
-#include "entry-header.S"
+
#include
#include
+#include
+#include "entry-header.S"
#ifdef IOC_BASE
/* IOC / IOMD based hardware */
diff -Nru a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
--- a/arch/arm/kernel/entry-common.S Wed Mar 26 05:13:45 2003
+++ b/arch/arm/kernel/entry-common.S Wed Sep 3 10:17:54 2003
@@ -8,8 +8,11 @@
* published by the Free Software Foundation.
*/
#include
-#include "entry-header.S"
+
#include
+#include
+
+#include "entry-header.S"
/*
* We rely on the fact that R0 is at the bottom of the stack (due to
diff -Nru a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
--- a/arch/arm/kernel/entry-header.S Tue Mar 4 16:47:50 2003
+++ b/arch/arm/kernel/entry-header.S Sun Aug 24 06:17:52 2003
@@ -63,13 +63,7 @@
#define S_OFF 8
.macro set_cpsr_c, reg, mode
-#if 1
- /* broken binutils */
- mov \reg, \mode
- msr cpsr_c, \reg
-#else
msr cpsr_c, \mode
-#endif
.endm
.macro disable_irq, temp
diff -Nru a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
--- a/arch/arm/kernel/head.S Tue Apr 8 01:29:38 2003
+++ b/arch/arm/kernel/head.S Wed Sep 3 10:17:54 2003
@@ -16,6 +16,7 @@
#include
#include
#include
+#include
#include
/*
diff -Nru a/arch/arm/kernel/pm.c b/arch/arm/kernel/pm.c
--- a/arch/arm/kernel/pm.c Sat Jun 21 03:42:03 2003
+++ b/arch/arm/kernel/pm.c Sun Aug 24 05:40:01 2003
@@ -36,23 +36,7 @@
if (ret != 0)
goto out;
- /*
- * Tell LDM devices we're going to suspend.
- */
- ret = device_suspend(4, SUSPEND_NOTIFY);
- if (ret != 0)
- goto resume_legacy;
-
- /*
- * Disable, devices, and save state.
- */
- device_suspend(4, SUSPEND_DISABLE);
- device_suspend(4, SUSPEND_SAVE_STATE);
-
- /*
- * Tell devices that they're going to be powered off.
- */
- device_suspend(4, SUSPEND_POWER_DOWN);
+ device_suspend(3);
local_irq_disable();
leds_event(led_stop);
@@ -62,21 +46,8 @@
leds_event(led_start);
local_irq_enable();
- /*
- * Tell devices that they now have power.
- */
- device_resume(RESUME_POWER_ON);
-
- /*
- * Resume LDM devices.
- */
- device_resume(RESUME_RESTORE_STATE);
- device_resume(RESUME_ENABLE);
+ device_resume();
- resume_legacy:
- /*
- * Resume "legacy" devices.
- */
pm_send_all(PM_RESUME, (void *)0);
out:
diff -Nru a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
--- a/arch/arm/kernel/vmlinux.lds.S Mon Aug 4 20:39:42 2003
+++ b/arch/arm/kernel/vmlinux.lds.S Sun Aug 24 04:26:29 2003
@@ -1,21 +1,134 @@
-#include
-
-#ifdef CONFIG_CPU_26
-
-#ifdef CONFIG_ROM_KERNEL
-
-#include "vmlinux-armo-rom.lds.in"
-
+/* ld script to make ARM Linux kernel
+ * taken from the i386 version by Russell King
+ * Written by Martin Mares
+ */
+
+#include
+
+OUTPUT_ARCH(arm)
+ENTRY(stext)
+#ifndef __ARMEB__
+jiffies = jiffies_64;
#else
-
-#include "vmlinux-armo.lds.in"
-
-#endif
-
-#endif
-
-#ifdef CONFIG_CPU_32
-
-#include "vmlinux-armv.lds.in"
-
+jiffies = jiffies_64 + 4;
#endif
+SECTIONS
+{
+ . = TEXTADDR;
+ .init : { /* Init code and data */
+ _stext = .;
+ __init_begin = .;
+ _sinittext = .;
+ *(.init.text)
+ _einittext = .;
+ __proc_info_begin = .;
+ *(.proc.info)
+ __proc_info_end = .;
+ __arch_info_begin = .;
+ *(.arch.info)
+ __arch_info_end = .;
+ __tagtable_begin = .;
+ *(.taglist)
+ __tagtable_end = .;
+ *(.init.data)
+ . = ALIGN(16);
+ __setup_start = .;
+ *(.init.setup)
+ __setup_end = .;
+ __early_begin = .;
+ *(__early_param)
+ __early_end = .;
+ __start___param = .;
+ *(__param)
+ __stop___param = .;
+ __initcall_start = .;
+ *(.initcall1.init)
+ *(.initcall2.init)
+ *(.initcall3.init)
+ *(.initcall4.init)
+ *(.initcall5.init)
+ *(.initcall6.init)
+ *(.initcall7.init)
+ __initcall_end = .;
+ __con_initcall_start = .;
+ *(.con_initcall.init)
+ __con_initcall_end = .;
+ __security_initcall_start = .;
+ *(.security_initcall.init)
+ __security_initcall_end = .;
+ . = ALIGN(32);
+ __initramfs_start = .;
+ usr/built-in.o(.init.ramfs)
+ __initramfs_end = .;
+ . = ALIGN(4096);
+ __init_end = .;
+ }
+
+ /DISCARD/ : { /* Exit code and data */
+ *(.exit.text)
+ *(.exit.data)
+ *(.exitcall.exit)
+ }
+
+ .text : { /* Real text segment */
+ _text = .; /* Text and read-only data */
+ *(.text)
+ *(.fixup)
+ *(.gnu.warning)
+ *(.rodata)
+ *(.rodata.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.got) /* Global offset table */
+
+ _etext = .; /* End of text section */
+ }
+
+ . = ALIGN(16);
+ __ex_table : { /* Exception table */
+ __start___ex_table = .;
+ *(__ex_table)
+ __stop___ex_table = .;
+ }
+
+ RODATA
+
+ . = ALIGN(8192);
+
+ .data : {
+ /*
+ * first, the init task union, aligned
+ * to an 8192 byte boundary.
+ */
+ *(.init.task)
+
+ /*
+ * then the cacheline aligned data
+ */
+ . = ALIGN(32);
+ *(.data.cacheline_aligned)
+
+ /*
+ * and the usual data section
+ */
+ *(.data)
+ CONSTRUCTORS
+
+ _edata = .;
+ }
+
+ .bss : {
+ __bss_start = .; /* BSS */
+ *(.bss)
+ *(COMMON)
+ _end = . ;
+ }
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+}
diff -Nru a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c
--- a/arch/arm/mach-footbridge/netwinder-pci.c Thu Jul 31 16:47:19 2003
+++ b/arch/arm/mach-footbridge/netwinder-pci.c Sun Aug 24 04:37:15 2003
@@ -36,8 +36,8 @@
return IRQ_NETWINDER_ETHER10;
default:
- printk(KERN_ERR "PCI: unknown device in slot %s: %s\n",
- pci_name(dev), dev->dev.name);
+ printk(KERN_ERR "PCI: unknown device in slot %s\n",
+ pci_name(dev));
return 0;
}
}
diff -Nru a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c
--- a/arch/arm/mach-iop3xx/iop321-time.c Tue Apr 15 08:12:47 2003
+++ b/arch/arm/mach-iop3xx/iop321-time.c Wed Aug 13 16:46:20 2003
@@ -51,7 +51,8 @@
return usec;
}
-static void iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
u32 tisr;
@@ -62,6 +63,8 @@
asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr));
do_timer(regs);
+
+ return IRQ_HANDLED;
}
extern unsigned long (*gettimeoffset)(void);
diff -Nru a/arch/arm/mach-iop3xx/iq80310-time.c b/arch/arm/mach-iop3xx/iq80310-time.c
--- a/arch/arm/mach-iop3xx/iq80310-time.c Mon Apr 21 15:43:40 2003
+++ b/arch/arm/mach-iop3xx/iq80310-time.c Wed Aug 13 16:46:20 2003
@@ -88,7 +88,8 @@
}
-static void iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN;
@@ -96,21 +97,9 @@
*timer_en &= ~2;
*timer_en |= 2;
- /*
- * AHEM..HACK
- *
- * Since the timer interrupt is cascaded through the CPLD and
- * the 80312 and the demux code calls do_IRQ, the irq count is
- * going to be at least 2 when we get here and this will cause the
- * kernel to increment the system tick counter even if we're
- * idle. This causes it to look like there's always 100% system
- * time, which is not the case. To get around it, we just decrement
- * the IRQ count before calling do_timer. We increment it again
- * b/c otherwise it will go negative and than bad things happen.
- *
- * -DS
- */
do_timer(regs);
+
+ return IRQ_HANDLED;
}
extern unsigned long (*gettimeoffset)(void);
@@ -126,7 +115,9 @@
volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN;
gettimeoffset = iq80310_gettimeoffset;
+
setup_irq(IRQ_IQ80310_TIMER, &timer_irq);
+
*timer_en = 0;
iq80310_write_timer(LATCH);
*timer_en |= 2;
diff -Nru a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c
--- a/arch/arm/mach-l7200/core.c Tue Jun 4 16:19:02 2002
+++ b/arch/arm/mach-l7200/core.c Wed Sep 3 10:17:54 2003
@@ -11,7 +11,6 @@
#include
#include
-#include
#include
#include
diff -Nru a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
--- a/arch/arm/mach-rpc/riscpc.c Sun Sep 29 09:11:41 2002
+++ b/arch/arm/mach-rpc/riscpc.c Wed Sep 3 10:17:54 2003
@@ -21,7 +21,7 @@
#include
#include
#include
-#include
+#include
#include
#include
diff -Nru a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c
--- a/arch/arm/mach-sa1100/leds-simpad.c Mon Feb 4 23:53:46 2002
+++ b/arch/arm/mach-sa1100/leds-simpad.c Thu Aug 7 11:40:46 2003
@@ -9,6 +9,7 @@
#include
#include
#include
+#include
#include "leds.h"
diff -Nru a/arch/arm/mach-sa1100/leds.c b/arch/arm/mach-sa1100/leds.c
--- a/arch/arm/mach-sa1100/leds.c Wed Dec 11 06:27:36 2002
+++ b/arch/arm/mach-sa1100/leds.c Thu Aug 7 11:40:46 2003
@@ -41,6 +41,8 @@
leds_event = adsbitsy_leds_event;
if (machine_is_pt_system3())
leds_event = system3_leds_event;
+ if (machine_is_simpad())
+ leds_event = simpad_leds_event; /* what about machine registry? including led, apm... -zecke */
leds_event(led_start);
return 0;
diff -Nru a/arch/arm/mach-sa1100/leds.h b/arch/arm/mach-sa1100/leds.h
--- a/arch/arm/mach-sa1100/leds.h Wed Dec 11 06:27:36 2002
+++ b/arch/arm/mach-sa1100/leds.h Thu Aug 7 11:40:46 2003
@@ -11,3 +11,4 @@
extern void graphicsmaster_leds_event(led_event_t evt);
extern void adsbitsy_leds_event(led_event_t evt);
extern void system3_leds_event(led_event_t evt);
+extern void simpad_leds_event(led_event_t evt);
diff -Nru a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
--- a/arch/arm/mm/Makefile Sun Apr 27 16:46:31 2003
+++ b/arch/arm/mm/Makefile Wed Sep 3 01:25:59 2003
@@ -4,20 +4,12 @@
# Object file lists.
-obj-y := init.o extable.o fault-common.o
-obj-m :=
-obj-n :=
-obj- :=
-ifeq ($(CONFIG_CPU_32),y)
-obj-y += consistent.o fault-armv.o ioremap.o mm-armv.o
+obj-y := consistent.o extable.o fault-armv.o fault-common.o \
+ init.o ioremap.o mm-armv.o
obj-$(CONFIG_MODULES) += proc-syms.o
-endif
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
obj-$(CONFIG_DISCONTIGMEM) += discontig.o
-
-# Select the processor-specific files
-p-$(CONFIG_CPU_26) += proc-arm2_3.o
# ARMv3
p-$(CONFIG_CPU_ARM610) += proc-arm6_7.o tlb-v3.o cache-v3.o copypage-v3.o
diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
--- a/arch/arm/mm/mm-armv.c Thu Aug 14 07:58:33 2003
+++ b/arch/arm/mm/mm-armv.c Wed Sep 3 10:17:54 2003
@@ -34,8 +34,8 @@
};
static struct cachepolicy cache_policies[] __initdata = {
- { "uncached", CR1_W|CR1_C, PMD_SECT_UNCACHED },
- { "buffered", CR1_C, PMD_SECT_BUFFERED },
+ { "uncached", CR_W|CR_C, PMD_SECT_UNCACHED },
+ { "buffered", CR_C, PMD_SECT_BUFFERED },
{ "writethrough", 0, PMD_SECT_WT },
#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
{ "writeback", 0, PMD_SECT_WB },
@@ -102,8 +102,8 @@
static int __init noalign_setup(char *__unused)
{
- cr_alignment &= ~CR1_A;
- cr_no_alignment &= ~CR1_A;
+ cr_alignment &= ~CR_A;
+ cr_no_alignment &= ~CR_A;
set_cr(cr_alignment);
return 1;
}
diff -Nru a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
--- a/arch/arm/mm/proc-arm1020.S Sun Apr 27 17:16:24 2003
+++ b/arch/arm/mm/proc-arm1020.S Wed Sep 3 10:17:54 2003
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
/*
diff -Nru a/arch/arm/mm/proc-arm2_3.S b/arch/arm/mm/proc-arm2_3.S
--- a/arch/arm/mm/proc-arm2_3.S Mon Apr 28 14:55:34 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,360 +0,0 @@
-/*
- * linux/arch/arm/mm/proc-arm2,3.S
- *
- * Copyright (C) 1997-1999 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * MMU functions for ARM2,3
- *
- * These are the low level assembler for performing cache
- * and memory functions on ARM2, ARM250 and ARM3 processors.
- */
-#include
-#include
-#include
-#include
-#include
-
-/*
- * MEMC workhorse code. It's both a horse which things it's a pig.
- */
-/*
- * Function: cpu_memc_update_entry(pgd_t *pgd, unsigned long phys_pte, unsigned long addr)
- * Params : pgd Page tables/MEMC mapping
- * : phys_pte physical address, or PTE
- * : addr virtual address
- */
-ENTRY(cpu_memc_update_entry)
- tst r1, #PAGE_PRESENT @ is the page present
- orreq r1, r1, #PAGE_OLD | PAGE_CLEAN
- moveq r2, #0x01f00000
- mov r3, r1, lsr #13 @ convert to physical page nr
- and r3, r3, #0x3fc
- adr ip, memc_phys_table_32
- ldr r3, [ip, r3]
- tst r1, #PAGE_OLD | PAGE_NOT_USER
- biceq r3, r3, #0x200
- tsteq r1, #PAGE_READONLY | PAGE_CLEAN
- biceq r3, r3, #0x300
- mov r2, r2, lsr #15 @ virtual -> nr
- orr r3, r3, r2, lsl #15
- and r2, r2, #0x300
- orr r3, r3, r2, lsl #2
- and r2, r3, #255
- sub r0, r0, #256 * 4
- str r3, [r0, r2, lsl #2]
- strb r3, [r3]
- movs pc, lr
-/*
- * Params : r0 = preserved
- * : r1 = memc table base (preserved)
- * : r2 = page table entry
- * : r3 = preserved
- * : r4 = unused
- * : r5 = memc physical address translation table
- * : ip = virtual address (preserved)
- */
-update_pte:
- mov r4, r2, lsr #13
- and r4, r4, #0x3fc
- ldr r4, [r5, r4] @ covert to MEMC page
-
- tst r2, #PAGE_OLD | PAGE_NOT_USER @ check for MEMC read
- biceq r4, r4, #0x200
- tsteq r2, #PAGE_READONLY | PAGE_CLEAN @ check for MEMC write
- biceq r4, r4, #0x300
-
- orr r4, r4, ip
- and r2, ip, #0x01800000
- orr r4, r4, r2, lsr #13
-
- and r2, r4, #255
- str r4, [r1, r2, lsl #2]
- movs pc, lr
-
-/*
- * Params : r0 = preserved
- * : r1 = memc table base (preserved)
- * : r2 = page table base
- * : r3 = preserved
- * : r4 = unused
- * : r5 = memc physical address translation table
- * : ip = virtual address (updated)
- */
-update_pte_table:
- stmfd sp!, {r0, lr}
- bic r0, r2, #3
-1: ldr r2, [r0], #4 @ get entry
- tst r2, #PAGE_PRESENT @ page present
- blne update_pte @ process pte
- add ip, ip, #32768 @ increment virt addr
- ldr r2, [r0], #4 @ get entry
- tst r2, #PAGE_PRESENT @ page present
- blne update_pte @ process pte
- add ip, ip, #32768 @ increment virt addr
- ldr r2, [r0], #4 @ get entry
- tst r2, #PAGE_PRESENT @ page present
- blne update_pte @ process pte
- add ip, ip, #32768 @ increment virt addr
- ldr r2, [r0], #4 @ get entry
- tst r2, #PAGE_PRESENT @ page present
- blne update_pte @ process pte
- add ip, ip, #32768 @ increment virt addr
- tst ip, #32768 * 31 @ finished?
- bne 1b
- ldmfd sp!, {r0, pc}^
-
-/*
- * Function: cpu_memc_update_all(pgd_t *pgd)
- * Params : pgd Page tables/MEMC mapping
- * Notes : this is optimised for 32k pages
- */
-ENTRY(cpu_memc_update_all)
- stmfd sp!, {r4, r5, lr}
- bl clear_tables
- sub r1, r0, #256 * 4 @ start of MEMC tables
- adr r5, memc_phys_table_32 @ Convert to logical page number
- mov ip, #0 @ virtual address
-1: ldmia r0!, {r2, r3}
- tst r2, #PAGE_PRESENT
- addeq ip, ip, #1048576
- blne update_pte_table
- mov r2, r3
- tst r2, #PAGE_PRESENT
- addeq ip, ip, #1048576
- blne update_pte_table
- teq ip, #32 * 1048576
- bne 1b
- ldmfd sp!, {r4, r5, pc}^
-
-/*
- * Build the table to map from physical page number to memc page number
- */
- .type memc_phys_table_32, #object
-memc_phys_table_32:
- .irp b7, 0x00, 0x80
- .irp b6, 0x00, 0x02
- .irp b5, 0x00, 0x04
- .irp b4, 0x00, 0x01
-
- .irp b3, 0x00, 0x40
- .irp b2, 0x00, 0x20
- .irp b1, 0x00, 0x10
- .irp b0, 0x00, 0x08
- .long 0x03800300 + \b7 + \b6 + \b5 + \b4 + \b3 + \b2 + \b1 + \b0
- .endr
- .endr
- .endr
- .endr
-
- .endr
- .endr
- .endr
- .endr
- .size memc_phys_table_32, . - memc_phys_table_32
-
-/*
- * helper for cpu_memc_update_all, this clears out all
- * mappings, setting them close to the top of memory,
- * and inaccessible (0x01f00000).
- * Params : r0 = page table pointer
- */
-clear_tables: ldr r1, _arm3_switch_mm - 4
- ldr r2, [r1]
- sub r1, r0, #256 * 4 @ start of MEMC tables
- add r2, r1, r2, lsl #2 @ end of tables
- mov r3, #0x03f00000 @ Default mapping (null mapping)
- orr r3, r3, #0x00000f00
- orr r4, r3, #1
- orr r5, r3, #2
- orr ip, r3, #3
-1: stmia r1!, {r3, r4, r5, ip}
- add r3, r3, #4
- add r4, r4, #4
- add r5, r5, #4
- add ip, ip, #4
- stmia r1!, {r3, r4, r5, ip}
- add r3, r3, #4
- add r4, r4, #4
- add r5, r5, #4
- add ip, ip, #4
- teq r1, r2
- bne 1b
- mov pc, lr
-
-/*
- * Function: *_switch_mm(pgd_t *pgd)
- * Params : pgd New page tables/MEMC mapping
- * Purpose : update MEMC hardware with new mapping
- */
- .word page_nr
-_arm3_switch_mm:
- mcr p15, 0, r1, c1, c0, 0 @ flush cache
-_arm2_switch_mm:
- stmfd sp!, {lr}
- ldr r1, _arm3_switch_mm - 4
- ldr r2, [r1]
- sub r0, r0, #256 * 4 @ start of MEMC tables
- add r1, r0, r2, lsl #2 @ end of tables
-1: ldmia r0!, {r2, r3, ip, lr}
- strb r2, [r2]
- strb r3, [r3]
- strb ip, [ip]
- strb lr, [lr]
- ldmia r0!, {r2, r3, ip, lr}
- strb r2, [r2]
- strb r3, [r3]
- strb ip, [ip]
- strb lr, [lr]
- teq r0, r1
- bne 1b
- ldmfd sp!, {pc}^
-
-/*
- * Function: *_proc_init (void)
- * Purpose : Initialise the cache control registers
- */
-_arm3_proc_init:
- mov r0, #0x001f0000
- orr r0, r0, #0x0000ff00
- orr r0, r0, #0x000000ff
- mcr p15, 0, r0, c3, c0 @ ARM3 Cacheable
- mcr p15, 0, r0, c4, c0 @ ARM3 Updateable
- mov r0, #0
- mcr p15, 0, r0, c5, c0 @ ARM3 Disruptive
- mcr p15, 0, r0, c1, c0 @ ARM3 Flush
- mov r0, #3
- mcr p15, 0, r0, c2, c0 @ ARM3 Control
-_arm2_proc_init:
- movs pc, lr
-
-/*
- * Function: *_proc_fin (void)
- * Purpose : Finalise processor (disable caches)
- */
-_arm3_proc_fin: mov r0, #2
- mcr p15, 0, r0, c2, c0
-_arm2_proc_fin: orrs pc, lr, #PSR_I_BIT|PSR_F_BIT
-
-/*
- * Function: *_xchg_1 (int new, volatile void *ptr)
- * Params : new New value to store at...
- * : ptr pointer to byte-wide location
- * Purpose : Performs an exchange operation
- * Returns : Original byte data at 'ptr'
- */
-_arm2_xchg_1: mov r2, pc
- orr r2, r2, #PSR_I_BIT
- teqp r2, #0
- ldrb r2, [r1]
- strb r0, [r1]
- mov r0, r2
- movs pc, lr
-
-_arm3_xchg_1: swpb r0, r0, [r1]
- movs pc, lr
-
-/*
- * Function: *_xchg_4 (int new, volatile void *ptr)
- * Params : new New value to store at...
- * : ptr pointer to word-wide location
- * Purpose : Performs an exchange operation
- * Returns : Original word data at 'ptr'
- */
-_arm2_xchg_4: mov r2, pc
- orr r2, r2, #PSR_I_BIT
- teqp r2, #0
- ldr r2, [r1]
- str r0, [r1]
- mov r0, r2
- movs pc, lr
-
-_arm3_xchg_4: swp r0, r0, [r1]
- movs pc, lr
-
-cpu_arm2_name:
- .asciz "ARM 2"
-cpu_arm250_name:
- .asciz "ARM 250"
-cpu_arm3_name:
- .asciz "ARM 3"
-
- __INIT
-/*
- * Purpose : Function pointers used to access above functions - all calls
- * come through these
- */
- .globl arm2_processor_functions
-arm2_processor_functions:
- .word _arm2_proc_init
- .word _arm2_proc_fin
- .word _arm2_switch_mm
- .word _arm2_xchg_1
- .word _arm2_xchg_4
-
- .globl arm250_processor_functions
-arm250_processor_functions:
- .word _arm2_proc_init
- .word _arm2_proc_fin
- .word _arm2_switch_mm
- .word _arm3_xchg_1
- .word _arm3_xchg_4
-
- .globl arm3_processor_functions
-arm3_processor_functions:
- .word _arm3_proc_init
- .word _arm3_proc_fin
- .word _arm3_switch_mm
- .word _arm3_xchg_1
- .word _arm3_xchg_4
-
-arm2_arch_name: .asciz "armv1"
-arm3_arch_name: .asciz "armv2"
-arm2_elf_name: .asciz "v1"
-arm3_elf_name: .asciz "v2"
- .align
-
- .section ".proc.info", #alloc, #execinstr
-
- .long 0x41560200
- .long 0xfffffff0
- .long 0
- mov pc, lr
- .long arm2_arch_name
- .long arm2_elf_name
- .long 0
- .long cpu_arm2_name
- .long arm2_processor_functions
- .long 0
- .long 0
- .long 0
-
- .long 0x41560250
- .long 0xfffffff0
- .long 0
- mov pc, lr
- .long arm3_arch_name
- .long arm3_elf_name
- .long 0
- .long cpu_arm250_name
- .long arm250_processor_functions
- .long 0
- .long 0
- .long 0
-
- .long 0x41560300
- .long 0xfffffff0
- .long 0
- mov pc, lr
- .long arm3_arch_name
- .long arm3_elf_name
- .long 0
- .long cpu_arm3_name
- .long arm3_processor_functions
- .long 0
- .long 0
- .long 0
-
diff -Nru a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S
--- a/arch/arm/mm/proc-arm6_7.S Mon Apr 28 14:55:34 2003
+++ b/arch/arm/mm/proc-arm6_7.S Wed Sep 3 10:17:55 2003
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
ENTRY(cpu_arm6_dcache_clean_area)
ENTRY(cpu_arm7_dcache_clean_area)
diff -Nru a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
--- a/arch/arm/mm/proc-arm720.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-arm720.S Wed Sep 3 10:17:55 2003
@@ -35,6 +35,7 @@
#include
#include
#include
+#include
#include
/*
diff -Nru a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
--- a/arch/arm/mm/proc-arm920.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-arm920.S Wed Sep 3 10:17:55 2003
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include "proc-macros.S"
/*
diff -Nru a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
--- a/arch/arm/mm/proc-arm922.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-arm922.S Wed Sep 3 10:17:55 2003
@@ -32,6 +32,7 @@
#include
#include
#include
+#include
#include "proc-macros.S"
/*
diff -Nru a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
--- a/arch/arm/mm/proc-arm926.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-arm926.S Wed Sep 3 10:17:55 2003
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include "proc-macros.S"
/*
diff -Nru a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
--- a/arch/arm/mm/proc-sa110.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-sa110.S Wed Sep 3 10:17:55 2003
@@ -18,7 +18,8 @@
#include
#include
#include
-#include
+#include
+#include
/*
* the cache line size of the I and D cache
diff -Nru a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
--- a/arch/arm/mm/proc-sa1100.S Sun Apr 27 17:16:25 2003
+++ b/arch/arm/mm/proc-sa1100.S Wed Sep 3 10:17:56 2003
@@ -23,7 +23,8 @@
#include
#include
#include
-#include
+#include
+#include
/*
* the cache line size of the I and D cache
diff -Nru a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
--- a/arch/arm/mm/proc-xscale.S Sun Apr 27 17:16:26 2003
+++ b/arch/arm/mm/proc-xscale.S Wed Sep 3 10:17:56 2003
@@ -25,8 +25,9 @@
#include
#include
#include
-#include
+#include
#include
+#include
#include "proc-macros.S"
/*
diff -Nru a/arch/arm/vmlinux-armo.lds.in b/arch/arm/vmlinux-armo.lds.in
--- a/arch/arm/vmlinux-armo.lds.in Wed Jun 11 17:40:04 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,114 +0,0 @@
-/* ld script to make ARM Linux kernel
- * taken from the i386 version by Russell King
- * Written by Martin Mares
- */
-
-#include
-
-OUTPUT_ARCH(arm)
-ENTRY(stext)
-jiffies = jiffies_64;
-SECTIONS
-{
- . = TEXTADDR;
- .init : { /* Init code and data */
- _stext = .;
- __init_begin = .;
- _sinittext = .;
- *(.init.text)
- _einittext = .;
- __proc_info_begin = .;
- *(.proc.info)
- __proc_info_end = .;
- __arch_info_begin = .;
- *(.arch.info)
- __arch_info_end = .;
- __tagtable_begin = .;
- *(.taglist)
- __tagtable_end = .;
- *(.init.data)
- . = ALIGN(16);
- __setup_start = .;
- *(.init.setup)
- __setup_end = .;
- __initcall_start = .;
- *(.initcall1.init)
- *(.initcall2.init)
- *(.initcall3.init)
- *(.initcall4.init)
- *(.initcall5.init)
- *(.initcall6.init)
- *(.initcall7.init)
- __initcall_end = .;
- __con_initcall_start = .;
- *(.con_initcall.init)
- __con_initcall_end = .;
- SECURITY_INIT
- . = ALIGN(32768);
- __init_end = .;
- }
-
- .init.task : {
- *(.init.task)
- }
-
- /DISCARD/ : { /* Exit code and data */
- *(.exit.text)
- *(.exit.data)
- *(.exitcall.exit)
- }
-
- .text : { /* Real text segment */
- _text = .; /* Text and read-only data */
- *(.text)
- *(.fixup)
- *(.gnu.warning)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7)
- *(.glue_7t)
- *(.got) /* Global offset table */
-
- _etext = .; /* End of text section */
- }
-
- . = ALIGN(16);
- __ex_table : { /* Exception table */
- __start___ex_table = .;
- *(__ex_table)
- __stop___ex_table = .;
- }
-
- RODATA
-
- .data : {
- /*
- * The cacheline aligned data
- */
- . = ALIGN(32);
- *(.data.cacheline_aligned)
-
- /*
- * and the usual data section
- */
- *(.data)
- CONSTRUCTORS
-
- _edata = .;
- }
-
- .bss : {
- __bss_start = .; /* BSS */
- *(.bss)
- *(COMMON)
- _end = . ;
- }
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
-}
diff -Nru a/arch/arm/vmlinux-armv.lds.in b/arch/arm/vmlinux-armv.lds.in
--- a/arch/arm/vmlinux-armv.lds.in Wed Jun 18 16:33:31 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,134 +0,0 @@
-/* ld script to make ARM Linux kernel
- * taken from the i386 version by Russell King
- * Written by Martin Mares
- */
-
-#include
-
-OUTPUT_ARCH(arm)
-ENTRY(stext)
-#ifndef __ARMEB__
-jiffies = jiffies_64;
-#else
-jiffies = jiffies_64 + 4;
-#endif
-SECTIONS
-{
- . = TEXTADDR;
- .init : { /* Init code and data */
- _stext = .;
- __init_begin = .;
- _sinittext = .;
- *(.init.text)
- _einittext = .;
- __proc_info_begin = .;
- *(.proc.info)
- __proc_info_end = .;
- __arch_info_begin = .;
- *(.arch.info)
- __arch_info_end = .;
- __tagtable_begin = .;
- *(.taglist)
- __tagtable_end = .;
- *(.init.data)
- . = ALIGN(16);
- __setup_start = .;
- *(.init.setup)
- __setup_end = .;
- __early_begin = .;
- *(__early_param)
- __early_end = .;
- __start___param = .;
- *(__param)
- __stop___param = .;
- __initcall_start = .;
- *(.initcall1.init)
- *(.initcall2.init)
- *(.initcall3.init)
- *(.initcall4.init)
- *(.initcall5.init)
- *(.initcall6.init)
- *(.initcall7.init)
- __initcall_end = .;
- __con_initcall_start = .;
- *(.con_initcall.init)
- __con_initcall_end = .;
- __security_initcall_start = .;
- *(.security_initcall.init)
- __security_initcall_end = .;
- . = ALIGN(32);
- __initramfs_start = .;
- usr/built-in.o(.init.ramfs)
- __initramfs_end = .;
- . = ALIGN(4096);
- __init_end = .;
- }
-
- /DISCARD/ : { /* Exit code and data */
- *(.exit.text)
- *(.exit.data)
- *(.exitcall.exit)
- }
-
- .text : { /* Real text segment */
- _text = .; /* Text and read-only data */
- *(.text)
- *(.fixup)
- *(.gnu.warning)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7)
- *(.glue_7t)
- *(.got) /* Global offset table */
-
- _etext = .; /* End of text section */
- }
-
- . = ALIGN(16);
- __ex_table : { /* Exception table */
- __start___ex_table = .;
- *(__ex_table)
- __stop___ex_table = .;
- }
-
- RODATA
-
- . = ALIGN(8192);
-
- .data : {
- /*
- * first, the init task union, aligned
- * to an 8192 byte boundary.
- */
- *(.init.task)
-
- /*
- * then the cacheline aligned data
- */
- . = ALIGN(32);
- *(.data.cacheline_aligned)
-
- /*
- * and the usual data section
- */
- *(.data)
- CONSTRUCTORS
-
- _edata = .;
- }
-
- .bss : {
- __bss_start = .; /* BSS */
- *(.bss)
- *(COMMON)
- _end = . ;
- }
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
-}
diff -Nru a/arch/arm26/Kconfig b/arch/arm26/Kconfig
--- a/arch/arm26/Kconfig Sat Aug 2 14:26:16 2003
+++ b/arch/arm26/Kconfig Sun Aug 31 16:14:22 2003
@@ -146,39 +146,6 @@
You may say N here if you are going to load the Acorn FPEmulator
early in the bootup.
-choice
- prompt "Kernel core (/proc/kcore) format"
- default KCORE_ELF
-
-config KCORE_ELF
- bool "ELF"
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool "A.OUT"
- help
- Not necessary unless you're using a very out-of-date binutils
- version. You probably want KCORE_ELF.
-
-endchoice
-
source "fs/Kconfig.binfmt"
config PREEMPT
diff -Nru a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c
--- a/arch/arm26/kernel/setup.c Thu Jul 3 15:03:57 2003
+++ b/arch/arm26/kernel/setup.c Sun Aug 31 16:14:08 2003
@@ -304,12 +304,12 @@
#if defined(CONFIG_DUMMY_CONSOLE)
struct screen_info screen_info = {
- orig_video_lines: 30,
- orig_video_cols: 80,
- orig_video_mode: 0,
- orig_video_ega_bx: 0,
- orig_video_isVGA: 1,
- orig_video_points: 8
+ .orig_video_lines = 30,
+ .orig_video_cols = 80,
+ .orig_video_mode = 0,
+ .orig_video_ega_bx = 0,
+ .orig_video_isVGA = 1,
+ .orig_video_points = 8
};
static int __init parse_tag_videotext(const struct tag *tag)
diff -Nru a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c
--- a/arch/cris/arch-v10/drivers/eeprom.c Fri Jul 4 03:27:37 2003
+++ b/arch/cris/arch-v10/drivers/eeprom.c Tue Aug 26 09:25:41 2003
@@ -441,9 +441,9 @@
static int eeprom_open(struct inode * inode, struct file * file)
{
- if(minor(inode->i_rdev) != EEPROM_MINOR_NR)
+ if(iminor(inode) != EEPROM_MINOR_NR)
return -ENXIO;
- if(major(inode->i_rdev) != EEPROM_MAJOR_NR)
+ if(imajor(inode) != EEPROM_MAJOR_NR)
return -ENXIO;
if( eeprom.size > 0 )
diff -Nru a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
--- a/arch/cris/arch-v10/drivers/gpio.c Fri Jul 4 03:27:37 2003
+++ b/arch/cris/arch-v10/drivers/gpio.c Tue Aug 26 09:25:40 2003
@@ -386,7 +386,7 @@
gpio_open(struct inode *inode, struct file *filp)
{
struct gpio_private *priv;
- int p = minor(inode->i_rdev);
+ int p = iminor(inode);
if (p > GPIO_MINOR_LAST)
return -EINVAL;
diff -Nru a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
--- a/arch/cris/arch-v10/drivers/pcf8563.c Wed Jul 23 07:38:45 2003
+++ b/arch/cris/arch-v10/drivers/pcf8563.c Sun Aug 31 16:14:08 2003
@@ -57,10 +57,10 @@
int pcf8563_release(struct inode *, struct file *);
static struct file_operations pcf8563_fops = {
- owner: THIS_MODULE,
- ioctl: pcf8563_ioctl,
- open: pcf8563_open,
- release: pcf8563_release,
+ .owner = THIS_MODULE,
+ .ioctl = pcf8563_ioctl,
+ .open = pcf8563_open,
+ .release = pcf8563_release,
};
unsigned char
diff -Nru a/arch/h8300/Kconfig b/arch/h8300/Kconfig
--- a/arch/h8300/Kconfig Thu Aug 21 08:42:22 2003
+++ b/arch/h8300/Kconfig Sun Aug 31 16:14:22 2003
@@ -177,13 +177,6 @@
menu "Executable file formats"
-config KCORE_AOUT
- bool
- default y
-
-config KCORE_ELF
- default y
-
source "fs/Kconfig.binfmt"
endmenu
diff -Nru a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
--- a/arch/h8300/kernel/setup.c Sun Jul 27 20:40:08 2003
+++ b/arch/h8300/kernel/setup.c Sun Aug 31 16:14:08 2003
@@ -91,12 +91,12 @@
}
static const struct console gdb_console = {
- name: "gdb_con",
- write: gdb_console_output,
- device: NULL,
- setup: gdb_console_setup,
- flags: CON_PRINTBUFFER,
- index: -1,
+ .name = "gdb_con",
+ .write = gdb_console_output,
+ .device = NULL,
+ .setup = gdb_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
};
#endif
@@ -260,8 +260,8 @@
}
struct seq_operations cpuinfo_op = {
- start: c_start,
- next: c_next,
- stop: c_stop,
- show: show_cpuinfo,
+ .start = c_start,
+ .next = c_next,
+ .stop = c_stop,
+ .show = show_cpuinfo,
};
diff -Nru a/arch/h8300/platform/h8300h/ints.c b/arch/h8300/platform/h8300h/ints.c
--- a/arch/h8300/platform/h8300h/ints.c Thu Aug 21 08:42:22 2003
+++ b/arch/h8300/platform/h8300h/ints.c Wed Aug 27 08:10:22 2003
@@ -32,15 +32,6 @@
#include
#include
-#define EXT_IRQ0 12
-#define EXT_IRQ1 13
-#define EXT_IRQ2 14
-#define EXT_IRQ3 15
-#define EXT_IRQ4 16
-#define EXT_IRQ5 17
-#define EXT_IRQ6 18
-#define EXT_IRQ7 19
-
/*
* This structure has only 4 elements for speed reasons
*/
@@ -57,17 +48,20 @@
extern unsigned long *interrupt_redirect_table;
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
static inline unsigned long *get_vector_address(void)
{
- unsigned long *rom_vector = (unsigned long *)0x000000;
+ unsigned long *rom_vector = CPU_VECTOR;
unsigned long base,tmp;
int vec_no;
- base = rom_vector[EXT_IRQ0];
+ base = rom_vector[EXT_IRQ0] & ADDR_MASK;
/* check romvector format */
for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ5; vec_no++) {
- if ((base+(vec_no - EXT_IRQ0)*4) != rom_vector[vec_no])
+ if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
return NULL;
}
@@ -171,7 +165,7 @@
irq, irq_list[irq]->devname);
if (irq >= EXT_IRQ0 && irq <= EXT_IRQ5)
*(volatile unsigned char *)IER &= ~(1 << (irq - EXT_IRQ0));
- if ((irq_list[irq] & 0x80000000) == 0) {
+ if (((unsigned long)irq_list[irq] & 0x80000000) == 0) {
kfree(irq_list[irq]);
irq_list[irq] = NULL;
}
@@ -241,8 +235,9 @@
{
}
-static void __init enable_kmalloc(void)
+static int __init enable_kmalloc(void)
{
use_kmalloc = 1;
+ return 0;
}
-__initcall(enable_kmalloc);
+core_initcall(enable_kmalloc);
diff -Nru a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c
--- a/arch/h8300/platform/h8s/ints.c Thu Aug 21 08:42:22 2003
+++ b/arch/h8300/platform/h8s/ints.c Wed Aug 27 08:10:22 2003
@@ -33,23 +33,6 @@
#include
#include
-#define EXT_IRQ0 16
-#define EXT_IRQ1 17
-#define EXT_IRQ2 18
-#define EXT_IRQ3 19
-#define EXT_IRQ4 20
-#define EXT_IRQ5 21
-#define EXT_IRQ6 22
-#define EXT_IRQ7 23
-#define EXT_IRQ8 24
-#define EXT_IRQ9 25
-#define EXT_IRQ10 26
-#define EXT_IRQ11 27
-#define EXT_IRQ12 28
-#define EXT_IRQ13 29
-#define EXT_IRQ14 30
-#define EXT_IRQ15 31
-
/*
* This structure has only 4 elements for speed reasons
*/
@@ -95,17 +78,20 @@
extern unsigned long *interrupt_redirect_table;
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
static inline unsigned long *get_vector_address(void)
{
- volatile unsigned long *rom_vector = (unsigned long *)0x000000;
+ volatile unsigned long *rom_vector = CPU_VECTOR;
unsigned long base,tmp;
int vec_no;
- base = rom_vector[EXT_IRQ0];
+ base = rom_vector[EXT_IRQ0] & ADDR_MASK;
/* check romvector format */
for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ15; vec_no++) {
- if ((base+(vec_no - EXT_IRQ0)*4) != rom_vector[vec_no])
+ if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
return NULL;
}
@@ -307,4 +293,4 @@
use_kmalloc = 1;
return 0;
}
-__initcall(enable_kmalloc);
+core_initcall(enable_kmalloc);
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig Wed Aug 20 12:16:36 2003
+++ b/arch/i386/Kconfig Wed Sep 3 23:40:07 2003
@@ -408,6 +408,20 @@
Otherwise, say N.
+config HPET_TIMER
+ bool "HPET Timer Support"
+ help
+ This enables the use of the HPET for the kernel's internal timer.
+ HPET is the next generation timer replacing legacy 8254s.
+ You can safely choose Y here. However, HPET will only be
+ activated if the platform and the BIOS support this feature.
+ Otherwise the 8254 will be used for timing services.
+
+ Choose N to continue using the legacy 8254 timer.
+
+config HPET_EMULATE_RTC
+ def_bool HPET_TIMER && RTC=y
+
config SMP
bool "Symmetric multi-processing support"
---help---
@@ -1155,40 +1169,6 @@
menu "Executable file formats"
-
-choice
- prompt "Kernel core (/proc/kcore) format"
- depends on PROC_FS
- default KCORE_ELF
-
-config KCORE_ELF
- bool "ELF"
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool "A.OUT"
- help
- Not necessary unless you're using a very out-of-date binutils
- version. You probably want KCORE_ELF.
-
-endchoice
source "fs/Kconfig.binfmt"
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
--- a/arch/i386/kernel/Makefile Mon Aug 18 11:16:59 2003
+++ b/arch/i386/kernel/Makefile Sun Aug 31 16:14:50 2003
@@ -31,6 +31,7 @@
obj-$(CONFIG_MODULES) += module.o
obj-y += sysenter.o vsyscall.o
obj-$(CONFIG_ACPI_SRAT) += srat.o
+obj-$(CONFIG_HPET_TIMER) += time_hpet.o
EXTRA_AFLAGS := -traditional
diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
--- a/arch/i386/kernel/acpi/boot.c Thu Aug 21 11:08:59 2003
+++ b/arch/i386/kernel/acpi/boot.c Sun Aug 31 16:14:49 2003
@@ -41,6 +41,7 @@
#define PREFIX "ACPI: "
extern int acpi_disabled;
+extern int acpi_irq;
extern int acpi_ht;
int acpi_lapic = 0;
@@ -269,6 +270,27 @@
return 0;
}
+#ifdef CONFIG_HPET_TIMER
+extern unsigned long hpet_address;
+
+static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
+{
+ struct acpi_table_hpet *hpet_tbl;
+
+ hpet_tbl = __va(phys);
+
+ if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) {
+ printk(KERN_WARNING PREFIX "HPET timers must be located in "
+ "memory.\n");
+ return -1;
+ }
+
+ hpet_address = hpet_tbl->addr.addrl;
+ printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", hpet_tbl->id,
+ hpet_address);
+ return 0;
+}
+#endif
unsigned long __init
acpi_find_rsdp (void)
@@ -407,7 +429,7 @@
* If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode
*/
- if (acpi_disabled) {
+ if (acpi_disabled || !acpi_irq) {
return 1;
}
@@ -457,6 +479,9 @@
smp_found_config = 1;
clustered_apic_check();
}
+#endif
+#ifdef CONFIG_HPET_TIMER
+ acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
#endif
return 0;
diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
--- a/arch/i386/kernel/apic.c Mon Aug 18 22:27:07 2003
+++ b/arch/i386/kernel/apic.c Fri Aug 29 03:51:17 2003
@@ -34,6 +34,7 @@
#include
#include
#include
+#include
#include
@@ -779,7 +780,8 @@
return count;
}
-void __init wait_8254_wraparound(void)
+/* next tick in 8254 can be caught by catching timer wraparound */
+static void __init wait_8254_wraparound(void)
{
unsigned int curr_count, prev_count=~0;
int delta;
@@ -801,6 +803,12 @@
}
/*
+ * Default initialization for 8254 timers. If we use other timers like HPET,
+ * we override this later
+ */
+void (*wait_timer_tick)(void) = wait_8254_wraparound;
+
+/*
* This function sets up the local APIC timer, with a timeout of
* 'clocks' APIC bus clock. During calibration we actually call
* this function twice on the boot CPU, once with a bogus timeout
@@ -841,7 +849,7 @@
/*
* Wait for IRQ0's slice:
*/
- wait_8254_wraparound();
+ wait_timer_tick();
__setup_APIC_LVTT(clocks);
@@ -884,7 +892,7 @@
* (the current tick might have been already half done)
*/
- wait_8254_wraparound();
+ wait_timer_tick();
/*
* We wrapped around just now. Let's start:
@@ -897,7 +905,7 @@
* Let's wait LOOPS wraprounds:
*/
for (i = 0; i < LOOPS; i++)
- wait_8254_wraparound();
+ wait_timer_tick();
tt2 = apic_read(APIC_TMCCT);
if (cpu_has_tsc)
diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c Thu Aug 21 14:15:08 2003
+++ b/arch/i386/kernel/apm.c Wed Sep 3 23:40:14 2003
@@ -2080,4 +2080,4 @@
MODULE_PARM(smp, "i");
MODULE_PARM_DESC(smp,
"Set this to enable APM use on an SMP platform. Use with caution on older systems");
-
+MODULE_ALIAS_MISCDEV(APM_MINOR_DEV);
diff -Nru a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c
--- a/arch/i386/kernel/cpu/mcheck/non-fatal.c Mon Apr 14 12:08:32 2003
+++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c Wed Sep 3 23:39:56 2003
@@ -1,5 +1,5 @@
/*
- * P4 specific Machine Check Exception Reporting
+ * Non Fatal Machine Check Exception Reporting
*/
#include
diff -Nru a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c
--- a/arch/i386/kernel/cpu/mtrr/if.c Wed May 14 23:43:54 2003
+++ b/arch/i386/kernel/cpu/mtrr/if.c Sun Aug 31 16:14:43 2003
@@ -17,6 +17,22 @@
#define FILE_FCOUNT(f) (((struct seq_file *)((f)->private_data))->private)
+static char *mtrr_strings[MTRR_NUM_TYPES] =
+{
+ "uncachable", /* 0 */
+ "write-combining", /* 1 */
+ "?", /* 2 */
+ "?", /* 3 */
+ "write-through", /* 4 */
+ "write-protect", /* 5 */
+ "write-back", /* 6 */
+};
+
+char *mtrr_attrib_to_str(int x)
+{
+ return (x <= 6) ? mtrr_strings[x] : "?";
+}
+
static int
mtrr_file_add(unsigned long base, unsigned long size,
unsigned int type, char increment, struct file *file, int page)
@@ -300,11 +316,6 @@
# endif /* CONFIG_PROC_FS */
-char * attrib_to_str(int x)
-{
- return (x <= 6) ? mtrr_strings[x] : "?";
-}
-
static int mtrr_seq_show(struct seq_file *seq, void *offset)
{
char factor;
@@ -332,7 +343,7 @@
len += seq_printf(seq,
"reg%02i: base=0x%05lx000 (%4liMB), size=%4i%cB: %s, count=%d\n",
i, base, base >> (20 - PAGE_SHIFT), size, factor,
- attrib_to_str(type), usage_table[i]);
+ mtrr_attrib_to_str(type), usage_table[i]);
}
}
return 0;
diff -Nru a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
--- a/arch/i386/kernel/cpu/mtrr/main.c Thu Aug 21 11:48:14 2003
+++ b/arch/i386/kernel/cpu/mtrr/main.c Sun Aug 31 16:14:43 2003
@@ -111,11 +111,6 @@
num_var_ranges = config & 0xff;
}
-static char * attrib_to_str(int x)
-{
- return (x <= 6) ? mtrr_strings[x] : "?";
-}
-
static void init_table(void)
{
int i, max;
@@ -362,8 +357,8 @@
if (type == MTRR_TYPE_UNCACHABLE)
continue;
printk (KERN_WARNING "mtrr: type mismatch for %lx000,%lx000 old: %s new: %s\n",
- base, size, attrib_to_str(ltype),
- attrib_to_str(type));
+ base, size, mtrr_attrib_to_str(ltype),
+ mtrr_attrib_to_str(type));
goto out;
}
if (increment)
@@ -703,16 +698,4 @@
return -ENXIO;
}
-char *mtrr_strings[MTRR_NUM_TYPES] =
-{
- "uncachable", /* 0 */
- "write-combining", /* 1 */
- "?", /* 2 */
- "?", /* 3 */
- "write-through", /* 4 */
- "write-protect", /* 5 */
- "write-back", /* 6 */
-};
-
subsys_initcall(mtrr_init);
-
diff -Nru a/arch/i386/kernel/cpu/mtrr/mtrr.h b/arch/i386/kernel/cpu/mtrr/mtrr.h
--- a/arch/i386/kernel/cpu/mtrr/mtrr.h Wed Nov 27 22:37:22 2002
+++ b/arch/i386/kernel/cpu/mtrr/mtrr.h Sun Aug 31 16:14:43 2003
@@ -95,5 +95,6 @@
void finalize_mtrr_state(void);
void mtrr_state_warn(void);
+char *mtrr_attrib_to_str(int x);
extern char * mtrr_if_name[];
diff -Nru a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
--- a/arch/i386/kernel/cpuid.c Mon Aug 18 19:46:23 2003
+++ b/arch/i386/kernel/cpuid.c Tue Aug 26 09:25:40 2003
@@ -115,7 +115,7 @@
u32 data[4];
size_t rv;
u32 reg = *ppos;
- int cpu = minor(file->f_dentry->d_inode->i_rdev);
+ int cpu = iminor(file->f_dentry->d_inode);
if ( count % 16 )
return -EINVAL; /* Invalid chunk size */
@@ -133,7 +133,7 @@
static int cpuid_open(struct inode *inode, struct file *file)
{
- int cpu = minor(file->f_dentry->d_inode->i_rdev);
+ int cpu = iminor(file->f_dentry->d_inode);
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (!cpu_online(cpu))
diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
--- a/arch/i386/kernel/mpparse.c Tue Aug 19 21:21:36 2003
+++ b/arch/i386/kernel/mpparse.c Sun Aug 31 16:14:25 2003
@@ -850,7 +850,7 @@
return i;
}
- printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d/n", irq);
+ printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq);
return -1;
}
diff -Nru a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c
--- a/arch/i386/kernel/msr.c Mon Aug 18 19:46:23 2003
+++ b/arch/i386/kernel/msr.c Tue Aug 26 09:25:40 2003
@@ -194,7 +194,7 @@
u32 data[2];
size_t rv;
u32 reg = *ppos;
- int cpu = minor(file->f_dentry->d_inode->i_rdev);
+ int cpu = iminor(file->f_dentry->d_inode);
int err;
if ( count % 8 )
@@ -219,7 +219,7 @@
u32 data[2];
size_t rv;
u32 reg = *ppos;
- int cpu = minor(file->f_dentry->d_inode->i_rdev);
+ int cpu = iminor(file->f_dentry->d_inode);
int err;
if ( count % 8 )
@@ -239,7 +239,7 @@
static int msr_open(struct inode *inode, struct file *file)
{
- int cpu = minor(file->f_dentry->d_inode->i_rdev);
+ int cpu = iminor(file->f_dentry->d_inode);
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (!cpu_online(cpu))
diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
--- a/arch/i386/kernel/process.c Wed Aug 20 10:43:52 2003
+++ b/arch/i386/kernel/process.c Tue Sep 2 00:37:21 2003
@@ -452,7 +452,7 @@
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
- unlazy_fpu(prev_p);
+ __unlazy_fpu(prev_p);
/*
* Reload esp0, LDT and the page table pointer:
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c Thu Aug 21 11:08:59 2003
+++ b/arch/i386/kernel/setup.c Sun Aug 31 16:14:11 2003
@@ -71,6 +71,7 @@
EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT
+ int acpi_irq __initdata = 1; /* enable IRQ */
int acpi_ht __initdata = 1; /* enable HT */
#endif
@@ -542,6 +543,11 @@
else if (!memcmp(from, "acpi=ht", 7)) {
acpi_ht = 1;
if (!acpi_force) acpi_disabled = 1;
+ }
+
+ /* "pci=noacpi" disables ACPI interrupt routing */
+ else if (!memcmp(from, "pci=noacpi", 10)) {
+ acpi_irq = 0;
}
#ifdef CONFIG_X86_LOCAL_APIC
diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
--- a/arch/i386/kernel/time.c Thu Jul 10 22:22:57 2003
+++ b/arch/i386/kernel/time.c Fri Aug 29 03:51:17 2003
@@ -60,6 +60,8 @@
#include
#include
+#include
+
#include
#include "io_ports.h"
@@ -291,8 +293,38 @@
device_initcall(time_init_device);
+#ifdef CONFIG_HPET_TIMER
+extern void (*late_time_init)(void);
+/* Duplicate of time_init() below, with hpet_enable part added */
+void __init hpet_time_init(void)
+{
+ xtime.tv_sec = get_cmos_time();
+ wall_to_monotonic.tv_sec = -xtime.tv_sec;
+ xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
+ wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
+
+ if (hpet_enable() >= 0) {
+ printk("Using HPET for base-timer\n");
+ }
+
+ cur_timer = select_timer();
+ time_init_hook();
+}
+#endif
+
void __init time_init(void)
{
+#ifdef CONFIG_HPET_TIMER
+ if (is_hpet_capable()) {
+ /*
+ * HPET initialization needs to do memory-mapped io. So, let
+ * us do a late initialization after mem_init().
+ */
+ late_time_init = hpet_time_init;
+ return;
+ }
+#endif
+
xtime.tv_sec = get_cmos_time();
wall_to_monotonic.tv_sec = -xtime.tv_sec;
xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
diff -Nru a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/i386/kernel/time_hpet.c Wed Sep 3 23:40:07 2003
@@ -0,0 +1,391 @@
+/*
+ * linux/arch/i386/kernel/time_hpet.c
+ * This code largely copied from arch/x86_64/kernel/time.c
+ * See that file for credits.
+ *
+ * 2003-06-30 Venkatesh Pallipadi - Additional changes for HPET support
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+
+unsigned long hpet_period; /* fsecs / HPET clock */
+unsigned long hpet_tick; /* hpet clks count per tick */
+unsigned long hpet_address; /* hpet memory map physical address */
+
+static int use_hpet; /* can be used for runtime check of hpet */
+static int boot_hpet_disable; /* boottime override for HPET timer */
+static unsigned long hpet_virt_address; /* hpet kernel virtual address */
+
+#define FSEC_TO_USEC (1000000000UL)
+
+int hpet_readl(unsigned long a)
+{
+ return readl(hpet_virt_address + a);
+}
+
+void hpet_writel(unsigned long d, unsigned long a)
+{
+ writel(d, hpet_virt_address + a);
+}
+
+#ifdef CONFIG_X86_LOCAL_APIC
+/*
+ * HPET counters dont wrap around on every tick. They just change the
+ * comparator value and continue. Next tick can be caught by checking
+ * for a change in the comparator value. Used in apic.c.
+ */
+void __init wait_hpet_tick(void)
+{
+ unsigned int start_cmp_val, end_cmp_val;
+
+ start_cmp_val = hpet_readl(HPET_T0_CMP);
+ do {
+ end_cmp_val = hpet_readl(HPET_T0_CMP);
+ } while (start_cmp_val == end_cmp_val);
+}
+#endif
+
+/*
+ * Check whether HPET was found by ACPI boot parse. If yes setup HPET
+ * counter 0 for kernel base timer.
+ */
+int __init hpet_enable(void)
+{
+ unsigned int cfg, id;
+ unsigned long tick_fsec_low, tick_fsec_high; /* tick in femto sec */
+ unsigned long hpet_tick_rem;
+
+ if (boot_hpet_disable)
+ return -1;
+
+ if (!hpet_address) {
+ return -1;
+ }
+ hpet_virt_address = (unsigned long) ioremap_nocache(hpet_address,
+ HPET_MMAP_SIZE);
+ /*
+ * Read the period, compute tick and quotient.
+ */
+ id = hpet_readl(HPET_ID);
+
+ /*
+ * We are checking for value '1' or more in number field.
+ * So, we are OK with HPET_EMULATE_RTC part too, where we need
+ * to have atleast 2 timers.
+ */
+ if (!(id & HPET_ID_NUMBER) ||
+ !(id & HPET_ID_LEGSUP))
+ return -1;
+
+ if (((id & HPET_ID_VENDOR) >> HPET_ID_VENDOR_SHIFT) !=
+ HPET_ID_VENDOR_8086)
+ return -1;
+
+ hpet_period = hpet_readl(HPET_PERIOD);
+ if ((hpet_period < HPET_MIN_PERIOD) || (hpet_period > HPET_MAX_PERIOD))
+ return -1;
+
+ /*
+ * 64 bit math
+ * First changing tick into fsec
+ * Then 64 bit div to find number of hpet clk per tick
+ */
+ ASM_MUL64_REG(tick_fsec_low, tick_fsec_high,
+ KERNEL_TICK_USEC, FSEC_TO_USEC);
+ ASM_DIV64_REG(hpet_tick, hpet_tick_rem,
+ hpet_period, tick_fsec_low, tick_fsec_high);
+
+ if (hpet_tick_rem > (hpet_period >> 1))
+ hpet_tick++; /* rounding the result */
+
+ /*
+ * Stop the timers and reset the main counter.
+ */
+ cfg = hpet_readl(HPET_CFG);
+ cfg &= ~HPET_CFG_ENABLE;
+ hpet_writel(cfg, HPET_CFG);
+ hpet_writel(0, HPET_COUNTER);
+ hpet_writel(0, HPET_COUNTER + 4);
+
+ /*
+ * Set up timer 0, as periodic with first interrupt to happen at
+ * hpet_tick, and period also hpet_tick.
+ */
+ cfg = hpet_readl(HPET_T0_CFG);
+ cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
+ HPET_TN_SETVAL | HPET_TN_32BIT;
+ hpet_writel(cfg, HPET_T0_CFG);
+ hpet_writel(hpet_tick, HPET_T0_CMP);
+
+ /*
+ * Go!
+ */
+ cfg = hpet_readl(HPET_CFG);
+ cfg |= HPET_CFG_ENABLE | HPET_CFG_LEGACY;
+ hpet_writel(cfg, HPET_CFG);
+
+ use_hpet = 1;
+#ifdef CONFIG_X86_LOCAL_APIC
+ wait_timer_tick = wait_hpet_tick;
+#endif
+ return 0;
+}
+
+int is_hpet_enabled(void)
+{
+ return use_hpet;
+}
+
+int is_hpet_capable(void)
+{
+ if (!boot_hpet_disable && hpet_address)
+ return 1;
+ return 0;
+}
+
+static int __init hpet_setup(char* str)
+{
+ if (str) {
+ if (!strncmp("disable", str, 7))
+ boot_hpet_disable = 1;
+ }
+ return 1;
+}
+
+__setup("hpet=", hpet_setup);
+
+#ifdef CONFIG_HPET_EMULATE_RTC
+/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
+ * is enabled, we support RTC interrupt functionality in software.
+ * RTC has 3 kinds of interrupts:
+ * 1) Update Interrupt - generate an interrupt, every sec, when RTC clock
+ * is updated
+ * 2) Alarm Interrupt - generate an interrupt at a specific time of day
+ * 3) Periodic Interrupt - generate periodic interrupt, with frequencies
+ * 2Hz-8192Hz (2Hz-64Hz for non-root user) (all freqs in powers of 2)
+ * (1) and (2) above are implemented using polling at a frequency of
+ * 64 Hz. The exact frequency is a tradeoff between accuracy and interrupt
+ * overhead. (DEFAULT_RTC_INT_FREQ)
+ * For (3), we use interrupts at 64Hz or user specified periodic
+ * frequency, whichever is higher.
+ */
+#include
+#include
+
+extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+
+#define DEFAULT_RTC_INT_FREQ 64
+#define RTC_NUM_INTS 1
+
+static unsigned long UIE_on;
+static unsigned long prev_update_sec;
+
+static unsigned long AIE_on;
+static struct rtc_time alarm_time;
+
+static unsigned long PIE_on;
+static unsigned long PIE_freq = DEFAULT_RTC_INT_FREQ;
+static unsigned long PIE_count;
+
+static unsigned long hpet_rtc_int_freq; /* RTC interrupt frequency */
+
+/*
+ * Timer 1 for RTC, we do not use periodic interrupt feature,
+ * even if HPET supports periodic interrupts on Timer 1.
+ * The reason being, to set up a periodic interrupt in HPET, we need to
+ * stop the main counter. And if we do that everytime someone diables/enables
+ * RTC, we will have adverse effect on main kernel timer running on Timer 0.
+ * So, for the time being, simulate the periodic interrupt in software.
+ *
+ * hpet_rtc_timer_init() is called for the first time and during subsequent
+ * interuppts reinit happens through hpet_rtc_timer_reinit().
+ */
+int hpet_rtc_timer_init(void)
+{
+ unsigned int cfg, cnt;
+ unsigned long flags;
+
+ if (!is_hpet_enabled())
+ return 0;
+ /*
+ * Set the counter 1 and enable the interrupts.
+ */
+ if (PIE_on && (PIE_freq > DEFAULT_RTC_INT_FREQ))
+ hpet_rtc_int_freq = PIE_freq;
+ else
+ hpet_rtc_int_freq = DEFAULT_RTC_INT_FREQ;
+
+ local_irq_save(flags);
+ cnt = hpet_readl(HPET_COUNTER);
+ cnt += ((hpet_tick*HZ)/hpet_rtc_int_freq);
+ hpet_writel(cnt, HPET_T1_CMP);
+ local_irq_restore(flags);
+
+ cfg = hpet_readl(HPET_T1_CFG);
+ cfg |= HPET_TN_ENABLE | HPET_TN_SETVAL | HPET_TN_32BIT;
+ hpet_writel(cfg, HPET_T1_CFG);
+
+ return 1;
+}
+
+static void hpet_rtc_timer_reinit(void)
+{
+ unsigned int cfg, cnt;
+
+ if (!(PIE_on | AIE_on | UIE_on))
+ return;
+
+ if (PIE_on && (PIE_freq > DEFAULT_RTC_INT_FREQ))
+ hpet_rtc_int_freq = PIE_freq;
+ else
+ hpet_rtc_int_freq = DEFAULT_RTC_INT_FREQ;
+
+ /* It is more accurate to use the comparator value than current count.*/
+ cnt = hpet_readl(HPET_T1_CMP);
+ cnt += hpet_tick*HZ/hpet_rtc_int_freq;
+ hpet_writel(cnt, HPET_T1_CMP);
+
+ cfg = hpet_readl(HPET_T1_CFG);
+ cfg |= HPET_TN_ENABLE | HPET_TN_SETVAL | HPET_TN_32BIT;
+ hpet_writel(cfg, HPET_T1_CFG);
+
+ return;
+}
+
+/*
+ * The functions below are called from rtc driver.
+ * Return 0 if HPET is not being used.
+ * Otherwise do the necessary changes and return 1.
+ */
+int hpet_mask_rtc_irq_bit(unsigned long bit_mask)
+{
+ if (!is_hpet_enabled())
+ return 0;
+
+ if (bit_mask & RTC_UIE)
+ UIE_on = 0;
+ if (bit_mask & RTC_PIE)
+ PIE_on = 0;
+ if (bit_mask & RTC_AIE)
+ AIE_on = 0;
+
+ return 1;
+}
+
+int hpet_set_rtc_irq_bit(unsigned long bit_mask)
+{
+ int timer_init_reqd = 0;
+
+ if (!is_hpet_enabled())
+ return 0;
+
+ if (!(PIE_on | AIE_on | UIE_on))
+ timer_init_reqd = 1;
+
+ if (bit_mask & RTC_UIE) {
+ UIE_on = 1;
+ }
+ if (bit_mask & RTC_PIE) {
+ PIE_on = 1;
+ PIE_count = 0;
+ }
+ if (bit_mask & RTC_AIE) {
+ AIE_on = 1;
+ }
+
+ if (timer_init_reqd)
+ hpet_rtc_timer_init();
+
+ return 1;
+}
+
+int hpet_set_alarm_time(unsigned char hrs, unsigned char min, unsigned char sec)
+{
+ if (!is_hpet_enabled())
+ return 0;
+
+ alarm_time.tm_hour = hrs;
+ alarm_time.tm_min = min;
+ alarm_time.tm_sec = sec;
+
+ return 1;
+}
+
+int hpet_set_periodic_freq(unsigned long freq)
+{
+ if (!is_hpet_enabled())
+ return 0;
+
+ PIE_freq = freq;
+ PIE_count = 0;
+
+ return 1;
+}
+
+int hpet_rtc_dropped_irq(void)
+{
+ if (!is_hpet_enabled())
+ return 0;
+
+ return 1;
+}
+
+irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+ struct rtc_time curr_time;
+ unsigned long rtc_int_flag = 0;
+ int call_rtc_interrupt = 0;
+
+ hpet_rtc_timer_reinit();
+
+ if (UIE_on | AIE_on) {
+ rtc_get_rtc_time(&curr_time);
+ }
+ if (UIE_on) {
+ if (curr_time.tm_sec != prev_update_sec) {
+ /* Set update int info, call real rtc int routine */
+ call_rtc_interrupt = 1;
+ rtc_int_flag = RTC_UF;
+ prev_update_sec = curr_time.tm_sec;
+ }
+ }
+ if (PIE_on) {
+ PIE_count++;
+ if (PIE_count >= hpet_rtc_int_freq/PIE_freq) {
+ /* Set periodic int info, call real rtc int routine */
+ call_rtc_interrupt = 1;
+ rtc_int_flag |= RTC_PF;
+ PIE_count = 0;
+ }
+ }
+ if (AIE_on) {
+ if ((curr_time.tm_sec == alarm_time.tm_sec) &&
+ (curr_time.tm_min == alarm_time.tm_min) &&
+ (curr_time.tm_hour == alarm_time.tm_hour)) {
+ /* Set alarm int info, call real rtc int routine */
+ call_rtc_interrupt = 1;
+ rtc_int_flag |= RTC_AF;
+ }
+ }
+ if (call_rtc_interrupt) {
+ rtc_int_flag |= (RTC_IRQF | (RTC_NUM_INTS << 8));
+ rtc_interrupt(rtc_int_flag, dev_id, regs);
+ }
+ return IRQ_HANDLED;
+}
+#endif
+
diff -Nru a/arch/i386/kernel/timers/Makefile b/arch/i386/kernel/timers/Makefile
--- a/arch/i386/kernel/timers/Makefile Sun May 4 23:38:34 2003
+++ b/arch/i386/kernel/timers/Makefile Sun Aug 31 16:14:50 2003
@@ -5,3 +5,4 @@
obj-y := timer.o timer_none.o timer_tsc.o timer_pit.o
obj-$(CONFIG_X86_CYCLONE_TIMER) += timer_cyclone.o
+obj-$(CONFIG_HPET_TIMER) += timer_hpet.o
diff -Nru a/arch/i386/kernel/timers/timer.c b/arch/i386/kernel/timers/timer.c
--- a/arch/i386/kernel/timers/timer.c Wed Jul 2 21:21:34 2003
+++ b/arch/i386/kernel/timers/timer.c Sun Aug 31 16:15:21 2003
@@ -3,10 +3,21 @@
#include
#include
+#ifdef CONFIG_HPET_TIMER
+/*
+ * HPET memory read is slower than tsc reads, but is more dependable as it
+ * always runs at constant frequency and reduces complexity due to
+ * cpufreq. So, we prefer HPET timer to tsc based one. Also, we cannot use
+ * timer_pit when HPET is active. So, we default to timer_tsc.
+ */
+#endif
/* list of timers, ordered by preference, NULL terminated */
static struct timer_opts* timers[] = {
#ifdef CONFIG_X86_CYCLONE_TIMER
&timer_cyclone,
+#endif
+#ifdef CONFIG_HPET_TIMER
+ &timer_hpet,
#endif
&timer_tsc,
&timer_pit,
diff -Nru a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/i386/kernel/timers/timer_hpet.c Sun Aug 31 16:15:29 2003
@@ -0,0 +1,241 @@
+/*
+ * This code largely moved from arch/i386/kernel/time.c.
+ * See comments there for proper credits.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include "io_ports.h"
+#include "mach_timer.h"
+#include
+
+static unsigned long hpet_usec_quotient; /* convert hpet clks to usec */
+static unsigned long tsc_hpet_quotient; /* convert tsc to hpet clks */
+static unsigned long hpet_last; /* hpet counter value at last tick*/
+static unsigned long last_tsc_low; /* lsb 32 bits of Time Stamp Counter */
+static unsigned long last_tsc_high; /* msb 32 bits of Time Stamp Counter */
+static unsigned long long monotonic_base;
+static rwlock_t monotonic_lock = RW_LOCK_UNLOCKED;
+
+/* convert from cycles(64bits) => nanoseconds (64bits)
+ * basic equation:
+ * ns = cycles / (freq / ns_per_sec)
+ * ns = cycles * (ns_per_sec / freq)
+ * ns = cycles * (10^9 / (cpu_mhz * 10^6))
+ * ns = cycles * (10^3 / cpu_mhz)
+ *
+ * Then we use scaling math (suggested by george@mvista.com) to get:
+ * ns = cycles * (10^3 * SC / cpu_mhz) / SC
+ * ns = cycles * cyc2ns_scale / SC
+ *
+ * And since SC is a constant power of two, we can convert the div
+ * into a shift.
+ * -johnstul@us.ibm.com "math is hard, lets go shopping!"
+ */
+static unsigned long cyc2ns_scale;
+#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
+
+static inline void set_cyc2ns_scale(unsigned long cpu_mhz)
+{
+ cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz;
+}
+
+static inline unsigned long long cycles_2_ns(unsigned long long cyc)
+{
+ return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
+}
+
+static unsigned long long monotonic_clock_hpet(void)
+{
+ unsigned long long last_offset, this_offset, base;
+
+ /* atomically read monotonic base & last_offset */
+ read_lock_irq(&monotonic_lock);
+ last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+ base = monotonic_base;
+ read_unlock_irq(&monotonic_lock);
+
+ /* Read the Time Stamp Counter */
+ rdtscll(this_offset);
+
+ /* return the value in ns */
+ return base + cycles_2_ns(this_offset - last_offset);
+}
+
+static unsigned long get_offset_hpet(void)
+{
+ register unsigned long eax, edx;
+
+ eax = hpet_readl(HPET_COUNTER);
+ eax -= hpet_last; /* hpet delta */
+
+ /*
+ * Time offset = (hpet delta) * ( usecs per HPET clock )
+ * = (hpet delta) * ( usecs per tick / HPET clocks per tick)
+ * = (hpet delta) * ( hpet_usec_quotient ) / (2^32)
+ *
+ * Where,
+ * hpet_usec_quotient = (2^32 * usecs per tick)/HPET clocks per tick
+ *
+ * Using a mull instead of a divl saves some cycles in critical path.
+ */
+ ASM_MUL64_REG(eax, edx, hpet_usec_quotient, eax);
+
+ /* our adjusted time offset in microseconds */
+ return edx;
+}
+
+static void mark_offset_hpet(void)
+{
+ unsigned long long this_offset, last_offset;
+ unsigned long offset;
+
+ write_lock(&monotonic_lock);
+ last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+ rdtsc(last_tsc_low, last_tsc_high);
+
+ offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
+ if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) {
+ int lost_ticks = (offset - hpet_last) / hpet_tick;
+ jiffies += lost_ticks;
+ }
+ hpet_last = offset;
+
+ /* update the monotonic base value */
+ this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+ monotonic_base += cycles_2_ns(this_offset - last_offset);
+ write_unlock(&monotonic_lock);
+}
+
+void delay_hpet(unsigned long loops)
+{
+ unsigned long hpet_start, hpet_end;
+ unsigned long eax;
+
+ /* loops is the number of cpu cycles. Convert it to hpet clocks */
+ ASM_MUL64_REG(eax, loops, tsc_hpet_quotient, loops);
+
+ hpet_start = hpet_readl(HPET_COUNTER);
+ do {
+ rep_nop();
+ hpet_end = hpet_readl(HPET_COUNTER);
+ } while ((hpet_end - hpet_start) < (loops));
+}
+
+/* ------ Calibrate the TSC -------
+ * Return 2^32 * (1 / (TSC clocks per usec)) for getting the CPU freq.
+ * Set 2^32 * (1 / (tsc per HPET clk)) for delay_hpet().
+ * calibrate_tsc() calibrates the processor TSC by comparing
+ * it to the HPET timer of known frequency.
+ * Too much 64-bit arithmetic here to do this cleanly in C
+ */
+#define CALIBRATE_CNT_HPET (5 * hpet_tick)
+#define CALIBRATE_TIME_HPET (5 * KERNEL_TICK_USEC)
+
+static unsigned long __init calibrate_tsc(void)
+{
+ unsigned long tsc_startlow, tsc_starthigh;
+ unsigned long tsc_endlow, tsc_endhigh;
+ unsigned long hpet_start, hpet_end;
+ unsigned long result, remain;
+
+ hpet_start = hpet_readl(HPET_COUNTER);
+ rdtsc(tsc_startlow, tsc_starthigh);
+ do {
+ hpet_end = hpet_readl(HPET_COUNTER);
+ } while ((hpet_end - hpet_start) < CALIBRATE_CNT_HPET);
+ rdtsc(tsc_endlow, tsc_endhigh);
+
+ /* 64-bit subtract - gcc just messes up with long longs */
+ __asm__("subl %2,%0\n\t"
+ "sbbl %3,%1"
+ :"=a" (tsc_endlow), "=d" (tsc_endhigh)
+ :"g" (tsc_startlow), "g" (tsc_starthigh),
+ "0" (tsc_endlow), "1" (tsc_endhigh));
+
+ /* Error: ECPUTOOFAST */
+ if (tsc_endhigh)
+ goto bad_calibration;
+
+ /* Error: ECPUTOOSLOW */
+ if (tsc_endlow <= CALIBRATE_TIME_HPET)
+ goto bad_calibration;
+
+ ASM_DIV64_REG(result, remain, tsc_endlow, 0, CALIBRATE_TIME_HPET);
+ if (remain > (tsc_endlow >> 1))
+ result++; /* rounding the result */
+
+ ASM_DIV64_REG(tsc_hpet_quotient, remain, tsc_endlow, 0,
+ CALIBRATE_CNT_HPET);
+ if (remain > (tsc_endlow >> 1))
+ tsc_hpet_quotient++; /* rounding the result */
+
+ return result;
+bad_calibration:
+ /*
+ * the CPU was so fast/slow that the quotient wouldn't fit in
+ * 32 bits..
+ */
+ return 0;
+}
+
+static int __init init_hpet(char* override)
+{
+ unsigned long result, remain;
+
+ /* check clock override */
+ if (override[0] && strncmp(override,"hpet",4))
+ return -ENODEV;
+
+ if (!is_hpet_enabled())
+ return -ENODEV;
+
+ printk("Using HPET for gettimeofday\n");
+ if (cpu_has_tsc) {
+ unsigned long tsc_quotient = calibrate_tsc();
+ if (tsc_quotient) {
+ /* report CPU clock rate in Hz.
+ * The formula is (10^6 * 2^32) / (2^32 * 1 / (clocks/us)) =
+ * clock/second. Our precision is about 100 ppm.
+ */
+ { unsigned long eax=0, edx=1000;
+ ASM_DIV64_REG(cpu_khz, edx, tsc_quotient,
+ eax, edx);
+ printk("Detected %lu.%03lu MHz processor.\n",
+ cpu_khz / 1000, cpu_khz % 1000);
+ }
+ set_cyc2ns_scale(cpu_khz/1000);
+ }
+ }
+
+ /*
+ * Math to calculate hpet to usec multiplier
+ * Look for the comments at get_offset_hpet()
+ */
+ ASM_DIV64_REG(result, remain, hpet_tick, 0, KERNEL_TICK_USEC);
+ if (remain > (hpet_tick >> 1))
+ result++; /* rounding the result */
+ hpet_usec_quotient = result;
+
+ return 0;
+}
+
+/************************************************************/
+
+/* tsc timer_opts struct */
+struct timer_opts timer_hpet = {
+ .init = init_hpet,
+ .mark_offset = mark_offset_hpet,
+ .get_offset = get_offset_hpet,
+ .monotonic_clock = monotonic_clock_hpet,
+ .delay = delay_hpet,
+};
diff -Nru a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c
--- a/arch/i386/kernel/timers/timer_tsc.c Mon Aug 18 06:40:02 2003
+++ b/arch/i386/kernel/timers/timer_tsc.c Sun Aug 31 16:15:21 2003
@@ -19,9 +19,18 @@
#include "io_ports.h"
#include "mach_timer.h"
+#include
+
+#ifdef CONFIG_HPET_TIMER
+static unsigned long hpet_usec_quotient;
+static unsigned long hpet_last;
+struct timer_opts timer_tsc;
+#endif
+
int tsc_disable __initdata = 0;
extern spinlock_t i8253_lock;
+extern volatile unsigned long jiffies;
static int use_tsc;
/* Number of usecs that the last interrupt was delayed */
@@ -232,7 +241,7 @@
#define CALIBRATE_TIME (5 * 1000020/HZ)
-unsigned long __init calibrate_tsc(void)
+static unsigned long __init calibrate_tsc(void)
{
mach_prepare_counter();
@@ -282,6 +291,107 @@
return 0;
}
+#ifdef CONFIG_HPET_TIMER
+static void mark_offset_tsc_hpet(void)
+{
+ unsigned long long this_offset, last_offset;
+ unsigned long offset, temp, hpet_current;
+
+ write_lock(&monotonic_lock);
+ last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+ /*
+ * It is important that these two operations happen almost at
+ * the same time. We do the RDTSC stuff first, since it's
+ * faster. To avoid any inconsistencies, we need interrupts
+ * disabled locally.
+ */
+ /*
+ * Interrupts are just disabled locally since the timer irq
+ * has the SA_INTERRUPT flag set. -arca
+ */
+ /* read Pentium cycle counter */
+
+ hpet_current = hpet_readl(HPET_COUNTER);
+ rdtsc(last_tsc_low, last_tsc_high);
+
+ /* lost tick compensation */
+ offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
+ if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) {
+ int lost_ticks = (offset - hpet_last) / hpet_tick;
+ jiffies += lost_ticks;
+ }
+ hpet_last = hpet_current;
+
+ /* update the monotonic base value */
+ this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low;
+ monotonic_base += cycles_2_ns(this_offset - last_offset);
+ write_unlock(&monotonic_lock);
+
+ /* calculate delay_at_last_interrupt */
+ /*
+ * Time offset = (hpet delta) * ( usecs per HPET clock )
+ * = (hpet delta) * ( usecs per tick / HPET clocks per tick)
+ * = (hpet delta) * ( hpet_usec_quotient ) / (2^32)
+ * Where,
+ * hpet_usec_quotient = (2^32 * usecs per tick)/HPET clocks per tick
+ */
+ delay_at_last_interrupt = hpet_current - offset;
+ ASM_MUL64_REG(temp, delay_at_last_interrupt,
+ hpet_usec_quotient, delay_at_last_interrupt);
+}
+
+/* ------ Calibrate the TSC based on HPET timer -------
+ * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset().
+ * calibrate_tsc() calibrates the processor TSC by comparing
+ * it to the HPET timer of known frequency.
+ * Too much 64-bit arithmetic here to do this cleanly in C
+ */
+
+#define CALIBRATE_CNT_HPET (5 * hpet_tick)
+#define CALIBRATE_TIME_HPET (5 * KERNEL_TICK_USEC)
+
+unsigned long __init calibrate_tsc_hpet(void)
+{
+ unsigned long tsc_startlow, tsc_starthigh;
+ unsigned long tsc_endlow, tsc_endhigh;
+ unsigned long hpet_start, hpet_end;
+ unsigned long result, remain;
+
+ hpet_start = hpet_readl(HPET_COUNTER);
+ rdtsc(tsc_startlow, tsc_starthigh);
+ do {
+ hpet_end = hpet_readl(HPET_COUNTER);
+ } while ((hpet_end - hpet_start) < CALIBRATE_CNT_HPET);
+ rdtsc(tsc_endlow, tsc_endhigh);
+
+ /* 64-bit subtract - gcc just messes up with long longs */
+ __asm__("subl %2,%0\n\t"
+ "sbbl %3,%1"
+ :"=a" (tsc_endlow), "=d" (tsc_endhigh)
+ :"g" (tsc_startlow), "g" (tsc_starthigh),
+ "0" (tsc_endlow), "1" (tsc_endhigh));
+
+ /* Error: ECPUTOOFAST */
+ if (tsc_endhigh)
+ goto bad_calibration;
+
+ /* Error: ECPUTOOSLOW */
+ if (tsc_endlow <= CALIBRATE_TIME_HPET)
+ goto bad_calibration;
+
+ ASM_DIV64_REG(result, remain, tsc_endlow, 0, CALIBRATE_TIME_HPET);
+ if (remain > (tsc_endlow >> 1))
+ result++; /* rounding the result */
+
+ return result;
+bad_calibration:
+ /*
+ * the CPU was so fast/slow that the quotient wouldn't fit in
+ * 32 bits..
+ */
+ return 0;
+}
+#endif
#ifdef CONFIG_CPU_FREQ
static unsigned int ref_freq = 0;
@@ -333,8 +443,16 @@
{
/* check clock override */
- if (override[0] && strncmp(override,"tsc",3))
+ if (override[0] && strncmp(override,"tsc",3)) {
+#ifdef CONFIG_HPET_TIMER
+ if (is_hpet_enabled()) {
+ printk(KERN_ERR "Warning: clock= override failed. Defaulting to tsc\n");
+ } else
+#endif
+ {
return -ENODEV;
+ }
+ }
/*
* If we have APM enabled or the CPU clock speed is variable
@@ -368,7 +486,29 @@
count2 = LATCH; /* initialize counter for mark_offset_tsc() */
if (cpu_has_tsc) {
- unsigned long tsc_quotient = calibrate_tsc();
+ unsigned long tsc_quotient;
+#ifdef CONFIG_HPET_TIMER
+ if (is_hpet_enabled()){
+ unsigned long result, remain;
+ printk("Using TSC for gettimeofday\n");
+ tsc_quotient = calibrate_tsc_hpet();
+ timer_tsc.mark_offset = &mark_offset_tsc_hpet;
+ /*
+ * Math to calculate hpet to usec multiplier
+ * Look for the comments at get_offset_tsc_hpet()
+ */
+ ASM_DIV64_REG(result, remain, hpet_tick,
+ 0, KERNEL_TICK_USEC);
+ if (remain > (hpet_tick >> 1))
+ result++; /* rounding the result */
+
+ hpet_usec_quotient = result;
+ } else
+#endif
+ {
+ tsc_quotient = calibrate_tsc();
+ }
+
if (tsc_quotient) {
fast_gettimeoffset_quotient = tsc_quotient;
use_tsc = 1;
diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
--- a/arch/i386/kernel/traps.c Thu Jun 26 12:11:29 2003
+++ b/arch/i386/kernel/traps.c Tue Sep 2 00:37:21 2003
@@ -745,7 +745,8 @@
* Careful.. There are problems with IBM-designed IRQ13 behaviour.
* Don't touch unless you *really* know how it works.
*
- * Must be called with kernel preemption disabled.
+ * Must be called with kernel preemption disabled (in this case,
+ * local interrupts are disabled at the call-site in entry.S).
*/
asmlinkage void math_state_restore(struct pt_regs regs)
{
diff -Nru a/arch/i386/mach-visws/mpparse.c b/arch/i386/mach-visws/mpparse.c
--- a/arch/i386/mach-visws/mpparse.c Mon Aug 18 19:46:23 2003
+++ b/arch/i386/mach-visws/mpparse.c Sun Aug 31 16:14:17 2003
@@ -38,7 +38,7 @@
void __init MP_processor_info (struct mpc_config_processor *m)
{
int ver, logical_apicid;
- cpumask_t apic_cpus;
+ physid_mask_t apic_cpus;
if (!(m->mpc_cpuflag & CPU_ENABLED))
return;
diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
--- a/arch/i386/mach-voyager/voyager_smp.c Mon Aug 18 19:46:23 2003
+++ b/arch/i386/mach-voyager/voyager_smp.c Sun Aug 31 16:14:42 2003
@@ -130,7 +130,7 @@
{
int cpu;
- for_each_cpu(cpu, mk_cpumask_const(cpu_online_map)) {
+ for_each_cpu(cpu, cpu_online_map) {
if(cpuset & (1<> 2;
if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD)
pci_cache_line_size = 64 >> 2; /* K7 & K8 */
- else if (c->x86 > 6)
+ else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL)
pci_cache_line_size = 128 >> 2; /* P4 */
pcibios_resource_survey();
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig Fri Aug 8 10:02:34 2003
+++ b/arch/ia64/Kconfig Sun Aug 31 16:14:22 2003
@@ -234,8 +234,8 @@
endchoice
config DISCONTIGMEM
- bool "Discontiguous memory support" if (IA64_DIG && NUMA)
- default y if IA64_SGI_SN2 || IA64_GENERIC
+ bool "Discontiguous memory support" if (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC) && NUMA
+ default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
help
Say Y to support efficient handling of discontiguous physical memory,
for architectures which are either NUMA (Non-Uniform Memory Access)
@@ -296,29 +296,6 @@
help
If you are compiling a kernel that will run under SGI's IA-64
simulator (Medusa) then say Y, otherwise say N.
-
-# On IA-64, we always want an ELF /proc/kcore.
-config KCORE_ELF
- bool
- default y
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
config FORCE_MAX_ZONEORDER
int
diff -Nru a/arch/ia64/Makefile b/arch/ia64/Makefile
--- a/arch/ia64/Makefile Tue Aug 19 23:13:39 2003
+++ b/arch/ia64/Makefile Sat Aug 23 10:28:23 2003
@@ -70,6 +70,8 @@
.PHONY: boot compressed check
+all: compressed
+
compressed: vmlinux.gz
vmlinux.gz: vmlinux
@@ -100,6 +102,6 @@
define archhelp
- echo ' compressed - Build compressed kernel image'
+ echo '* compressed - Build compressed kernel image'
echo ' boot - Build vmlinux and bootloader for Ski simulator'
endef
diff -Nru a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
--- a/arch/ia64/hp/common/sba_iommu.c Sun Jul 27 12:01:33 2003
+++ b/arch/ia64/hp/common/sba_iommu.c Sun Aug 31 16:14:08 2003
@@ -1935,10 +1935,10 @@
}
static struct acpi_driver acpi_sba_ioc_driver = {
- name: "IOC IOMMU Driver",
- ids: "HWP0001,HWP0004",
- ops: {
- add: acpi_sba_ioc_add,
+ .name = "IOC IOMMU Driver",
+ .ids = "HWP0001,HWP0004",
+ .ops = {
+ .add = acpi_sba_ioc_add,
},
};
diff -Nru a/arch/ia64/ia32/ia32_ioctl.c b/arch/ia64/ia32/ia32_ioctl.c
--- a/arch/ia64/ia32/ia32_ioctl.c Thu Aug 7 17:00:00 2003
+++ b/arch/ia64/ia32/ia32_ioctl.c Sun Aug 31 16:14:44 2003
@@ -70,7 +70,7 @@
#define IOCTL_TABLE_START \
struct ioctl_trans ioctl_start[] = {
#define IOCTL_TABLE_END \
- }; struct ioctl_trans ioctl_end[0];
+ };
IOCTL_TABLE_START
HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32)
@@ -79,3 +79,5 @@
#include "compat_ioctl.c"
#include
IOCTL_TABLE_END
+
+int ioctl_table_size = ARRAY_SIZE(ioctl_start);
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c Tue Aug 19 23:13:39 2003
+++ b/arch/ia64/ia32/sys_ia32.c Mon Aug 25 14:45:43 2003
@@ -76,7 +76,6 @@
#define OFFSET4K(a) ((a) & 0xfff)
#define PAGE_START(addr) ((addr) & PAGE_MASK)
-#define PAGE_OFF(addr) ((addr) & ~PAGE_MASK)
#define high2lowuid(uid) ((uid) > 65535 ? 65534 : (uid))
#define high2lowgid(gid) ((gid) > 65535 ? 65534 : (gid))
@@ -170,9 +169,9 @@
current->thread.map_base = old_map_base;
current->thread.task_size = old_task_size;
set_fs(USER_DS); /* establish new task-size as the address-limit */
- out:
- kfree(av);
}
+ out:
+ kfree(av);
return r;
}
@@ -271,11 +270,11 @@
if (old_prot) {
/* copy back the old page contents. */
- if (PAGE_OFF(start))
- copy_to_user((void *) PAGE_START(start), page, PAGE_OFF(start));
- if (PAGE_OFF(end))
- copy_to_user((void *) end, page + PAGE_OFF(end),
- PAGE_SIZE - PAGE_OFF(end));
+ if (offset_in_page(start))
+ copy_to_user((void *) PAGE_START(start), page, offset_in_page(start));
+ if (offset_in_page(end))
+ copy_to_user((void *) end, page + offset_in_page(end),
+ PAGE_SIZE - offset_in_page(end));
}
if (!(flags & MAP_ANONYMOUS)) {
@@ -330,7 +329,7 @@
"%s(%d): emulate_mmap() can't share tail (end=0x%lx)\n",
current->comm, current->pid, end);
ret = mmap_subpage(file, max(start, PAGE_START(end)), end, prot, flags,
- (off + len) - PAGE_OFF(end));
+ (off + len) - offset_in_page(end));
if (IS_ERR((void *) ret))
return ret;
pend -= PAGE_SIZE;
@@ -347,14 +346,14 @@
tmp = arch_get_unmapped_area(file, pstart - fudge, pend - pstart, 0, flags);
if (tmp != pstart) {
pstart = tmp;
- start = pstart + PAGE_OFF(off); /* make start congruent with off */
+ start = pstart + offset_in_page(off); /* make start congruent with off */
end = start + len;
pend = PAGE_ALIGN(end);
}
}
poff = off + (pstart - start); /* note: (pstart - start) may be negative */
- is_congruent = (flags & MAP_ANONYMOUS) || (PAGE_OFF(poff) == 0);
+ is_congruent = (flags & MAP_ANONYMOUS) || (offset_in_page(poff) == 0);
if ((flags & MAP_SHARED) && !is_congruent)
printk(KERN_INFO "%s(%d): emulate_mmap() can't share contents of incongruent mmap "
@@ -588,7 +587,7 @@
down(&ia32_mmap_sem);
{
- if (PAGE_OFF(start)) {
+ if (offset_in_page(start)) {
/* start address is 4KB aligned but not page aligned. */
retval = mprotect_subpage(PAGE_START(start), prot);
if (retval < 0)
@@ -599,7 +598,7 @@
goto out; /* retval is already zero... */
}
- if (PAGE_OFF(end)) {
+ if (offset_in_page(end)) {
/* end address is 4KB aligned but not page aligned. */
retval = mprotect_subpage(PAGE_START(end), prot);
if (retval < 0)
diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
--- a/arch/ia64/kernel/acpi.c Wed Aug 6 12:37:03 2003
+++ b/arch/ia64/kernel/acpi.c Tue Aug 26 15:09:18 2003
@@ -130,7 +130,7 @@
int vector = -1;
if (int_type < ACPI_MAX_PLATFORM_INTERRUPTS) {
- /* correctable platform error interrupt */
+ /* corrected platform error interrupt */
vector = platform_intr_list[int_type];
} else
printk(KERN_ERR "acpi_request_vector(): invalid interrupt type\n");
diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
--- a/arch/ia64/kernel/entry.S Sat Aug 16 17:16:48 2003
+++ b/arch/ia64/kernel/entry.S Mon Aug 25 14:47:33 2003
@@ -1473,7 +1473,7 @@
data8 sys_clock_nanosleep
data8 sys_fstatfs64
data8 sys_statfs64
- data8 ia64_ni_syscall
+ data8 sys_fadvise64_64
data8 ia64_ni_syscall // 1260
data8 ia64_ni_syscall
data8 ia64_ni_syscall
diff -Nru a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
--- a/arch/ia64/kernel/fsys.S Thu Jul 10 18:16:32 2003
+++ b/arch/ia64/kernel/fsys.S Mon Aug 25 14:47:33 2003
@@ -678,9 +678,9 @@
data8 0 // clock_gettime
data8 0 // clock_getres // 1255
data8 0 // clock_nanosleep
- data8 0
- data8 0
- data8 0
+ data8 0 // fstatfs64
+ data8 0 // statfs64
+ data8 0 // fadvise64_64
data8 0 // 1260
data8 0
data8 0
diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
--- a/arch/ia64/kernel/mca.c Tue Aug 19 23:13:39 2003
+++ b/arch/ia64/kernel/mca.c Tue Aug 26 13:42:37 2003
@@ -1145,7 +1145,7 @@
ia64_mca_cmc_int_handler(cpe_irq, arg, ptregs);
- for (++cpuid ; !cpu_online(cpuid) && cpuid < NR_CPUS ; cpuid++);
+ for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
if (cpuid < NR_CPUS) {
platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
@@ -1225,7 +1225,7 @@
ia64_mca_cpe_int_handler(cpe_irq, arg, ptregs);
- for (++cpuid ; !cpu_online(cpuid) && cpuid < NR_CPUS ; cpuid++);
+ for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
if (cpuid < NR_CPUS) {
platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c Thu Aug 21 15:45:04 2003
+++ b/arch/ia64/kernel/perfmon.c Sun Aug 31 16:14:08 2003
@@ -2109,7 +2109,7 @@
return 1;
}
static struct dentry_operations pfmfs_dentry_operations = {
- d_delete: pfmfs_delete_dentry,
+ .d_delete = pfmfs_delete_dentry,
};
diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
--- a/arch/ia64/kernel/smpboot.c Mon Aug 18 19:46:23 2003
+++ b/arch/ia64/kernel/smpboot.c Fri Aug 22 15:20:52 2003
@@ -560,7 +560,7 @@
if (cpu_online(cpu))
bogosum += cpu_data(cpu)->loops_per_jiffy;
- printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
+ printk(KERN_INFO "Total of %lu processors activated (%lu.%02lu BogoMIPS).\n",
num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100);
}
diff -Nru a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
--- a/arch/ia64/kernel/sys_ia64.c Wed Jul 9 09:56:58 2003
+++ b/arch/ia64/kernel/sys_ia64.c Mon Aug 25 14:45:43 2003
@@ -242,7 +242,7 @@
asmlinkage unsigned long
sys_mmap (unsigned long addr, unsigned long len, int prot, int flags, int fd, long off)
{
- if ((off & ~PAGE_MASK) != 0)
+ if (offset_in_page(off) != 0)
return -EINVAL;
addr = do_mmap2(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
diff -Nru a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
--- a/arch/ia64/lib/Makefile Fri Jun 20 12:48:24 2003
+++ b/arch/ia64/lib/Makefile Mon Aug 25 09:56:27 2003
@@ -14,9 +14,6 @@
lib-$(CONFIG_PERFMON) += carta_random.o
lib-$(CONFIG_MD_RAID5) += xor.o
-IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
- __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
-
AFLAGS___divdi3.o =
AFLAGS___udivdi3.o = -DUNSIGNED
AFLAGS___moddi3.o = -DMODULO
@@ -27,26 +24,26 @@
AFLAGS___modsi3.o = -DMODULO
AFLAGS___umodsi3.o = -DUNSIGNED -DMODULO
-$(obj)/__divdi3.o: $(src)/idiv64.S
- $(cmd_as_o_S)
+$(obj)/__divdi3.o: $(src)/idiv64.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__udivdi3.o: $(src)/idiv64.S
- $(cmd_as_o_S)
+$(obj)/__udivdi3.o: $(src)/idiv64.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__moddi3.o: $(src)/idiv64.S
- $(cmd_as_o_S)
+$(obj)/__moddi3.o: $(src)/idiv64.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__umoddi3.o: $(src)/idiv64.S
- $(cmd_as_o_S)
+$(obj)/__umoddi3.o: $(src)/idiv64.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__divsi3.o: $(src)/idiv32.S
- $(cmd_as_o_S)
+$(obj)/__divsi3.o: $(src)/idiv32.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__udivsi3.o: $(src)/idiv32.S
- $(cmd_as_o_S)
+$(obj)/__udivsi3.o: $(src)/idiv32.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__modsi3.o: $(src)/idiv32.S
- $(cmd_as_o_S)
+$(obj)/__modsi3.o: $(src)/idiv32.S FORCE
+ $(call if_changed_dep,as_o_S)
-$(obj)/__umodsi3.o: $(src)/idiv32.S
- $(cmd_as_o_S)
+$(obj)/__umodsi3.o: $(src)/idiv32.S FORCE
+ $(call if_changed_dep,as_o_S)
diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
--- a/arch/ia64/mm/numa.c Mon Sep 30 06:38:28 2002
+++ b/arch/ia64/mm/numa.c Thu Aug 21 05:02:28 2003
@@ -42,5 +42,5 @@
paddr < node_memblk[i].start_paddr + node_memblk[i].size)
break;
- return (i < num_memblks) ? node_memblk[i].nid : -1;
+ return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0);
}
diff -Nru a/arch/ia64/sn/io/drivers/ioconfig_bus.c b/arch/ia64/sn/io/drivers/ioconfig_bus.c
--- a/arch/ia64/sn/io/drivers/ioconfig_bus.c Mon May 19 05:42:35 2003
+++ b/arch/ia64/sn/io/drivers/ioconfig_bus.c Sun Aug 31 16:14:08 2003
@@ -346,9 +346,9 @@
}
struct file_operations ioconfig_bus_fops = {
- ioctl:ioconfig_bus_ioctl,
- open:ioconfig_bus_open, /* open */
- release:ioconfig_bus_close /* release */
+ .ioctl = ioconfig_bus_ioctl,
+ .open = ioconfig_bus_open, /* open */
+ .release = ioconfig_bus_close /* release */
};
diff -Nru a/arch/ia64/sn/io/sn2/shub.c b/arch/ia64/sn/io/sn2/shub.c
--- a/arch/ia64/sn/io/sn2/shub.c Mon Aug 4 10:02:37 2003
+++ b/arch/ia64/sn/io/sn2/shub.c Sun Aug 31 16:14:08 2003
@@ -243,7 +243,7 @@
}
struct file_operations shub_mon_fops = {
- ioctl: shubstats_ioctl,
+ .ioctl = shubstats_ioctl,
};
/*
diff -Nru a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
--- a/arch/ia64/sn/kernel/setup.c Sat Aug 16 16:26:35 2003
+++ b/arch/ia64/sn/kernel/setup.c Sun Aug 31 16:14:08 2003
@@ -117,14 +117,14 @@
* VGA color display.
*/
struct screen_info sn_screen_info = {
- orig_x: 0,
- orig_y: 0,
- orig_video_mode: 3,
- orig_video_cols: 80,
- orig_video_ega_bx: 3,
- orig_video_lines: 25,
- orig_video_isVGA: 1,
- orig_video_points: 16
+ .orig_x = 0,
+ .orig_y = 0,
+ .orig_video_mode = 3,
+ .orig_video_cols = 80,
+ .orig_video_ega_bx = 3,
+ .orig_video_lines = 25,
+ .orig_video_isVGA = 1,
+ .orig_video_points = 16
};
/*
diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig
--- a/arch/m68k/Kconfig Sat Aug 2 14:26:16 2003
+++ b/arch/m68k/Kconfig Sun Aug 31 16:14:22 2003
@@ -342,40 +342,6 @@
menu "General setup"
-choice
- prompt "Kernel core (/proc/kcore) format"
- depends on PROC_FS
- default KCORE_ELF
-
-config KCORE_ELF
- bool "ELF"
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool "A.OUT"
- help
- Not necessary unless you're using a very out-of-date binutils
- version. You probably want KCORE_ELF.
-
-endchoice
-
source "fs/Kconfig.binfmt"
config ZORRO
diff -Nru a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/m68k/kernel/vmlinux-std.lds Sun Jun 15 03:46:43 2003
@@ -0,0 +1,97 @@
+/* ld script to make m68k Linux kernel */
+
+#include
+
+OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
+OUTPUT_ARCH(m68k)
+ENTRY(_start)
+jiffies = jiffies_64 + 4;
+SECTIONS
+{
+ . = 0x1000;
+ _text = .; /* Text and read-only data */
+ .text : {
+ *(.text)
+ *(.fixup)
+ *(.gnu.warning)
+ } = 0x4e75
+
+ . = ALIGN(16); /* Exception table */
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
+ RODATA
+
+ _etext = .; /* End of text section */
+
+ .data : { /* Data */
+ *(.data)
+ CONSTRUCTORS
+ }
+
+ .bss : { *(.bss) } /* BSS */
+
+ . = ALIGN(16);
+ .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+ _edata = .; /* End of data section */
+
+ /* will be freed after init */
+ . = ALIGN(4096); /* Init code and data */
+ __init_begin = .;
+ .init.text : {
+ _sinittext = .;
+ *(.init.text)
+ _einittext = .;
+ }
+ .init.data : { *(.init.data) }
+ . = ALIGN(16);
+ __setup_start = .;
+ .init.setup : { *(.init.setup) }
+ __setup_end = .;
+ __start___param = .;
+ __param : { *(__param) }
+ __stop___param = .;
+ __initcall_start = .;
+ .initcall.init : {
+ *(.initcall1.init)
+ *(.initcall2.init)
+ *(.initcall3.init)
+ *(.initcall4.init)
+ *(.initcall5.init)
+ *(.initcall6.init)
+ *(.initcall7.init)
+ }
+ __initcall_end = .;
+ __con_initcall_start = .;
+ .con_initcall.init : { *(.con_initcall.init) }
+ __con_initcall_end = .;
+ SECURITY_INIT
+ . = ALIGN(8192);
+ __initramfs_start = .;
+ .init.ramfs : { *(.init.ramfs) }
+ __initramfs_end = .;
+ . = ALIGN(8192);
+ __init_end = .;
+
+ .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */
+
+ _end = . ;
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.exit.text)
+ *(.exit.data)
+ *(.exitcall.exit)
+ }
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+}
diff -Nru a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/m68k/kernel/vmlinux-sun3.lds Sun Jun 15 03:46:43 2003
@@ -0,0 +1,97 @@
+/* ld script to make m68k Linux kernel */
+
+#include
+
+OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
+OUTPUT_ARCH(m68k)
+ENTRY(_start)
+jiffies = jiffies_64 + 4;
+SECTIONS
+{
+ . = 0xE004000;
+ _text = .; /* Text and read-only data */
+ .text : {
+ *(.head)
+ *(.text)
+ *(.fixup)
+ *(.gnu.warning)
+ } = 0x4e75
+ RODATA
+
+ _etext = .; /* End of text section */
+
+ .data : { /* Data */
+ *(.data)
+ CONSTRUCTORS
+ . = ALIGN(16); /* Exception table */
+ __start___ex_table = .;
+ *(__ex_table)
+ __stop___ex_table = .;
+ }
+ /* End of data goes *here* so that freeing init code works properly. */
+ _edata = .;
+
+ /* will be freed after init */
+ . = ALIGN(8192); /* Init code and data */
+__init_begin = .;
+ .init.text : {
+ _sinittext = .;
+ *(.init.text)
+ _einittext = .;
+ }
+ .init.data : { *(.init.data) }
+ . = ALIGN(16);
+ __setup_start = .;
+ .init.setup : { *(.init.setup) }
+ __setup_end = .;
+ __start___param = .;
+ __param : { *(__param) }
+ __stop___param = .;
+ __initcall_start = .;
+ .initcall.init : {
+ *(.initcall1.init)
+ *(.initcall2.init)
+ *(.initcall3.init)
+ *(.initcall4.init)
+ *(.initcall5.init)
+ *(.initcall6.init)
+ *(.initcall7.init)
+ }
+ __initcall_end = .;
+ __con_initcall_start = .;
+ .con_initcall.init : { *(.con_initcall.init) }
+ __con_initcall_end = .;
+ SECURITY_INIT
+ . = ALIGN(8192);
+ __initramfs_start = .;
+ .init.ramfs : { *(.init.ramfs) }
+ __initramfs_end = .;
+ . = ALIGN(8192);
+ __init_end = .;
+ .init.task : { *(init_task) }
+
+
+ .bss : { *(.bss) } /* BSS */
+
+ _end = . ;
+
+ /* Sections to be discarded */
+ /DISCARD/ : {
+ *(.exit.text)
+ *(.exit.data)
+ *(.exitcall.exit)
+ }
+
+ .crap : {
+ /* Stabs debugging sections. */
+ *(.stab)
+ *(.stabstr)
+ *(.stab.excl)
+ *(.stab.exclstr)
+ *(.stab.index)
+ *(.stab.indexstr)
+ *(.comment)
+ *(.note)
+ }
+
+}
diff -Nru a/arch/m68k/vmlinux-std.lds b/arch/m68k/vmlinux-std.lds
--- a/arch/m68k/vmlinux-std.lds Wed Jun 11 17:40:05 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,97 +0,0 @@
-/* ld script to make m68k Linux kernel */
-
-#include
-
-OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
-OUTPUT_ARCH(m68k)
-ENTRY(_start)
-jiffies = jiffies_64 + 4;
-SECTIONS
-{
- . = 0x1000;
- _text = .; /* Text and read-only data */
- .text : {
- *(.text)
- *(.fixup)
- *(.gnu.warning)
- } = 0x4e75
-
- . = ALIGN(16); /* Exception table */
- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
-
- RODATA
-
- _etext = .; /* End of text section */
-
- .data : { /* Data */
- *(.data)
- CONSTRUCTORS
- }
-
- .bss : { *(.bss) } /* BSS */
-
- . = ALIGN(16);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
- _edata = .; /* End of data section */
-
- /* will be freed after init */
- . = ALIGN(4096); /* Init code and data */
- __init_begin = .;
- .init.text : {
- _sinittext = .;
- *(.init.text)
- _einittext = .;
- }
- .init.data : { *(.init.data) }
- . = ALIGN(16);
- __setup_start = .;
- .init.setup : { *(.init.setup) }
- __setup_end = .;
- __start___param = .;
- __param : { *(__param) }
- __stop___param = .;
- __initcall_start = .;
- .initcall.init : {
- *(.initcall1.init)
- *(.initcall2.init)
- *(.initcall3.init)
- *(.initcall4.init)
- *(.initcall5.init)
- *(.initcall6.init)
- *(.initcall7.init)
- }
- __initcall_end = .;
- __con_initcall_start = .;
- .con_initcall.init : { *(.con_initcall.init) }
- __con_initcall_end = .;
- SECURITY_INIT
- . = ALIGN(8192);
- __initramfs_start = .;
- .init.ramfs : { *(.init.ramfs) }
- __initramfs_end = .;
- . = ALIGN(8192);
- __init_end = .;
-
- .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */
-
- _end = . ;
-
- /* Sections to be discarded */
- /DISCARD/ : {
- *(.exit.text)
- *(.exit.data)
- *(.exitcall.exit)
- }
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
-}
diff -Nru a/arch/m68k/vmlinux-sun3.lds b/arch/m68k/vmlinux-sun3.lds
--- a/arch/m68k/vmlinux-sun3.lds Wed Jun 11 17:40:05 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,97 +0,0 @@
-/* ld script to make m68k Linux kernel */
-
-#include
-
-OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
-OUTPUT_ARCH(m68k)
-ENTRY(_start)
-jiffies = jiffies_64 + 4;
-SECTIONS
-{
- . = 0xE004000;
- _text = .; /* Text and read-only data */
- .text : {
- *(.head)
- *(.text)
- *(.fixup)
- *(.gnu.warning)
- } = 0x4e75
- RODATA
-
- _etext = .; /* End of text section */
-
- .data : { /* Data */
- *(.data)
- CONSTRUCTORS
- . = ALIGN(16); /* Exception table */
- __start___ex_table = .;
- *(__ex_table)
- __stop___ex_table = .;
- }
- /* End of data goes *here* so that freeing init code works properly. */
- _edata = .;
-
- /* will be freed after init */
- . = ALIGN(8192); /* Init code and data */
-__init_begin = .;
- .init.text : {
- _sinittext = .;
- *(.init.text)
- _einittext = .;
- }
- .init.data : { *(.init.data) }
- . = ALIGN(16);
- __setup_start = .;
- .init.setup : { *(.init.setup) }
- __setup_end = .;
- __start___param = .;
- __param : { *(__param) }
- __stop___param = .;
- __initcall_start = .;
- .initcall.init : {
- *(.initcall1.init)
- *(.initcall2.init)
- *(.initcall3.init)
- *(.initcall4.init)
- *(.initcall5.init)
- *(.initcall6.init)
- *(.initcall7.init)
- }
- __initcall_end = .;
- __con_initcall_start = .;
- .con_initcall.init : { *(.con_initcall.init) }
- __con_initcall_end = .;
- SECURITY_INIT
- . = ALIGN(8192);
- __initramfs_start = .;
- .init.ramfs : { *(.init.ramfs) }
- __initramfs_end = .;
- . = ALIGN(8192);
- __init_end = .;
- .init.task : { *(init_task) }
-
-
- .bss : { *(.bss) } /* BSS */
-
- _end = . ;
-
- /* Sections to be discarded */
- /DISCARD/ : {
- *(.exit.text)
- *(.exit.data)
- *(.exitcall.exit)
- }
-
- .crap : {
- /* Stabs debugging sections. */
- *(.stab)
- *(.stabstr)
- *(.stab.excl)
- *(.stab.exclstr)
- *(.stab.index)
- *(.stab.indexstr)
- *(.comment)
- *(.note)
- }
-
-}
diff -Nru a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
--- a/arch/m68knommu/Kconfig Sat Aug 2 14:26:16 2003
+++ b/arch/m68knommu/Kconfig Sun Aug 31 16:14:22 2003
@@ -490,14 +490,6 @@
menu "Executable file formats"
-config KCORE_AOUT
- bool
- default y
-
-config KCORE_ELF
- bool
- default y
-
source "fs/Kconfig.binfmt"
endmenu
diff -Nru a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
--- a/arch/m68knommu/platform/5206/config.c Tue May 27 20:13:12 2003
+++ b/arch/m68knommu/platform/5206/config.c Sat Aug 23 06:07:40 2003
@@ -14,6 +14,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -26,7 +27,7 @@
/***************************************************************************/
void coldfire_tick(void);
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
unsigned long coldfire_timer_offset(void);
void coldfire_trap_init(void);
void coldfire_reset(void);
diff -Nru a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
--- a/arch/m68knommu/platform/5206e/config.c Tue May 27 20:13:12 2003
+++ b/arch/m68knommu/platform/5206e/config.c Sat Aug 23 06:07:40 2003
@@ -12,6 +12,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -26,7 +27,7 @@
/***************************************************************************/
void coldfire_tick(void);
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
unsigned long coldfire_timer_offset(void);
void coldfire_trap_init(void);
void coldfire_reset(void);
diff -Nru a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
--- a/arch/m68knommu/platform/5249/config.c Tue Jun 17 06:35:38 2003
+++ b/arch/m68knommu/platform/5249/config.c Sat Aug 23 06:07:40 2003
@@ -26,7 +26,7 @@
/***************************************************************************/
void coldfire_tick(void);
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
unsigned long coldfire_timer_offset(void);
void coldfire_trap_init(void);
void coldfire_reset(void);
diff -Nru a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
--- a/arch/m68knommu/platform/5272/config.c Tue Jun 17 06:35:38 2003
+++ b/arch/m68knommu/platform/5272/config.c Sat Aug 23 06:07:40 2003
@@ -14,6 +14,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -27,7 +28,7 @@
/***************************************************************************/
void coldfire_tick(void);
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
unsigned long coldfire_timer_offset(void);
void coldfire_trap_init(void);
void coldfire_reset(void);
diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig Mon Jul 28 04:57:50 2003
+++ b/arch/mips/Kconfig Sun Aug 31 16:14:22 2003
@@ -1126,31 +1126,6 @@
menu "Executable file formats"
-config KCORE_ELF
- bool
- default y
- ---help---
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image. This can be used
- in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- You have two choices here: ELF and A.OUT. Selecting ELF will make
- /proc/kcore appear in ELF core format as defined by the Executable
- and Linking Format specification. Selecting A.OUT will choose the
- old "a.out" format which may be necessary for some old versions
- of binutils or on some architectures.
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel so if you
- don't understand what this means or are not a kernel hacker, just
- leave it at its default value ELF.
-
-config KCORE_AOUT
- bool
-
source "fs/Kconfig.binfmt"
config TRAD_SIGNALS
diff -Nru a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c
--- a/arch/mips/au1000/common/dma.c Mon Jun 23 12:12:26 2003
+++ b/arch/mips/au1000/common/dma.c Sun Aug 31 16:14:08 2003
@@ -62,14 +62,14 @@
spinlock_t au1000_dma_spin_lock = SPIN_LOCK_UNLOCKED;
struct dma_chan au1000_dma_table[NUM_AU1000_DMA_CHANNELS] = {
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,},
- {dev_id:-1,}
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,},
+ {.dev_id = -1,}
};
// Device FIFO addresses and default DMA modes
diff -Nru a/arch/mips/kernel/ioctl32.c b/arch/mips/kernel/ioctl32.c
--- a/arch/mips/kernel/ioctl32.c Mon Jul 28 04:57:50 2003
+++ b/arch/mips/kernel/ioctl32.c Sun Aug 31 16:14:44 2003
@@ -810,8 +810,7 @@
#define IOCTL_TABLE_START \
struct ioctl_trans ioctl_start[] = {
#define IOCTL_TABLE_END \
- }; struct ioctl_trans ioctl_end[0];
-
+ };
IOCTL_TABLE_START
#include
@@ -1205,6 +1204,8 @@
COMPATIBLE_IOCTL(RTC_WKALM_SET)
COMPATIBLE_IOCTL(RTC_WKALM_RD)
IOCTL_TABLE_END
+
+int ioctl_table_size = ARRAY_SIZE(ioctl_start);
#define NR_IOCTL_TRANS (sizeof(ioctl_translations) / \
sizeof(ioctl_translations[0]))
diff -Nru a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c
--- a/arch/mips/sibyte/cfe/console.c Mon Jul 28 04:57:50 2003
+++ b/arch/mips/sibyte/cfe/console.c Sun Aug 31 16:14:08 2003
@@ -9,7 +9,6 @@
#include "cfe_error.h"
extern int cfe_cons_handle;
-static kdev_t cfe_consdev;
static void cfe_console_write(struct console *cons, const char *str,
unsigned int count)
@@ -57,15 +56,12 @@
#ifdef CONFIG_SIBYTE_SB1250_DUART
if (!strcmp(consdev, "uart0")) {
setleds("u0cn");
-// cfe_consdev = MKDEV(TTY_MAJOR, SB1250_DUART_MINOR_BASE + 0);
} else if (!strcmp(consdev, "uart1")) {
setleds("u1cn");
-// cfe_consdev = MKDEV(TTY_MAJOR, SB1250_DUART_MINOR_BASE + 1);
#endif
#ifdef CONFIG_VGA_CONSOLE
} else if (!strcmp(consdev, "pcconsole0")) {
setleds("pccn");
-// cfe_consdev = MKDEV(TTY_MAJOR, 0);
#endif
} else
return -ENODEV;
@@ -74,12 +70,12 @@
}
static struct console sb1250_cfe_cons = {
- name: "cfe",
- write: cfe_console_write,
- device: cfe_console_device,
- setup: cfe_console_setup,
- flags: CON_PRINTBUFFER,
- index: -1,
+ .name = "cfe",
+ .write = cfe_console_write,
+ .device = cfe_console_device,
+ .setup = cfe_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = -1,
};
static int __init sb1250_cfe_console_init(void)
diff -Nru a/arch/mips/sibyte/sb1250/bcm1250_tbprof.c b/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
--- a/arch/mips/sibyte/sb1250/bcm1250_tbprof.c Mon Jul 28 04:57:50 2003
+++ b/arch/mips/sibyte/sb1250/bcm1250_tbprof.c Tue Aug 26 09:25:40 2003
@@ -253,7 +253,7 @@
{
int minor;
- minor = minor(inode->i_rdev);
+ minor = iminor(inode);
if (minor != 0) {
return -ENODEV;
}
@@ -278,7 +278,7 @@
{
int minor;
- minor = minor(inode->i_rdev);
+ minor = iminor(inode);
if (minor != 0 || !sbp.open) {
return -ENODEV;
}
diff -Nru a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
--- a/arch/mips/tx4927/common/tx4927_irq.c Mon Apr 14 20:10:10 2003
+++ b/arch/mips/tx4927/common/tx4927_irq.c Sun Aug 31 16:14:08 2003
@@ -149,26 +149,26 @@
#define TX4927_CP0_NAME "TX4927-CP0"
static struct hw_interrupt_type tx4927_irq_cp0_type = {
- typename: TX4927_CP0_NAME,
- startup: tx4927_irq_cp0_startup,
- shutdown: tx4927_irq_cp0_shutdown,
- enable: tx4927_irq_cp0_enable,
- disable: tx4927_irq_cp0_disable,
- ack: tx4927_irq_cp0_mask_and_ack,
- end: tx4927_irq_cp0_end,
- set_affinity: NULL
+ .typename = TX4927_CP0_NAME,
+ .startup = tx4927_irq_cp0_startup,
+ .shutdown = tx4927_irq_cp0_shutdown,
+ .enable = tx4927_irq_cp0_enable,
+ .disable = tx4927_irq_cp0_disable,
+ .ack = tx4927_irq_cp0_mask_and_ack,
+ .end = tx4927_irq_cp0_end,
+ .set_affinity = NULL
};
#define TX4927_PIC_NAME "TX4927-PIC"
static struct hw_interrupt_type tx4927_irq_pic_type = {
- typename: TX4927_PIC_NAME,
- startup: tx4927_irq_pic_startup,
- shutdown: tx4927_irq_pic_shutdown,
- enable: tx4927_irq_pic_enable,
- disable: tx4927_irq_pic_disable,
- ack: tx4927_irq_pic_mask_and_ack,
- end: tx4927_irq_pic_end,
- set_affinity: NULL
+ .typename = TX4927_PIC_NAME,
+ .startup = tx4927_irq_pic_startup,
+ .shutdown = tx4927_irq_pic_shutdown,
+ .enable = tx4927_irq_pic_enable,
+ .disable = tx4927_irq_pic_disable,
+ .ack = tx4927_irq_pic_mask_and_ack,
+ .end = tx4927_irq_pic_end,
+ .set_affinity = NULL
};
#define TX4927_PIC_ACTION(s) { no_action, 0, 0, s, NULL, NULL }
diff -Nru a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c Thu Jul 3 15:17:43 2003
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c Sun Aug 31 16:14:08 2003
@@ -255,14 +255,14 @@
#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
static struct hw_interrupt_type toshiba_rbtx4927_irq_ioc_type = {
- typename:TOSHIBA_RBTX4927_IOC_NAME,
- startup:toshiba_rbtx4927_irq_ioc_startup,
- shutdown:toshiba_rbtx4927_irq_ioc_shutdown,
- enable:toshiba_rbtx4927_irq_ioc_enable,
- disable:toshiba_rbtx4927_irq_ioc_disable,
- ack:toshiba_rbtx4927_irq_ioc_mask_and_ack,
- end:toshiba_rbtx4927_irq_ioc_end,
- set_affinity:NULL
+ .typename = TOSHIBA_RBTX4927_IOC_NAME,
+ .startup = toshiba_rbtx4927_irq_ioc_startup,
+ .shutdown = toshiba_rbtx4927_irq_ioc_shutdown,
+ .enable = toshiba_rbtx4927_irq_ioc_enable,
+ .disable = toshiba_rbtx4927_irq_ioc_disable,
+ .ack = toshiba_rbtx4927_irq_ioc_mask_and_ack,
+ .end = toshiba_rbtx4927_irq_ioc_end,
+ .set_affinity = NULL
};
#define TOSHIBA_RBTX4927_IOC_INTR_ENAB 0xbc002000
#define TOSHIBA_RBTX4927_IOC_INTR_STAT 0xbc002006
@@ -271,14 +271,14 @@
#ifdef CONFIG_TOSHIBA_FPCIB0
#define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
static struct hw_interrupt_type toshiba_rbtx4927_irq_isa_type = {
- typename:TOSHIBA_RBTX4927_ISA_NAME,
- startup:toshiba_rbtx4927_irq_isa_startup,
- shutdown:toshiba_rbtx4927_irq_isa_shutdown,
- enable:toshiba_rbtx4927_irq_isa_enable,
- disable:toshiba_rbtx4927_irq_isa_disable,
- ack:toshiba_rbtx4927_irq_isa_mask_and_ack,
- end:toshiba_rbtx4927_irq_isa_end,
- set_affinity:NULL
+ .typename = TOSHIBA_RBTX4927_ISA_NAME,
+ .startup = toshiba_rbtx4927_irq_isa_startup,
+ .shutdown = toshiba_rbtx4927_irq_isa_shutdown,
+ .enable = toshiba_rbtx4927_irq_isa_enable,
+ .disable = toshiba_rbtx4927_irq_isa_disable,
+ .ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
+ .end = toshiba_rbtx4927_irq_isa_end,
+ .set_affinity = NULL
};
#endif
diff -Nru a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c
--- a/arch/mips/vr41xx/common/vrc4173.c Thu Jul 31 08:59:17 2003
+++ b/arch/mips/vr41xx/common/vrc4173.c Sun Aug 31 16:14:08 2003
@@ -250,10 +250,10 @@
}
static struct pci_driver vrc4173_driver = {
- name: "NEC VRC4173",
- probe: vrc4173_probe,
- remove: NULL,
- id_table: vrc4173_table,
+ .name = "NEC VRC4173",
+ .probe = vrc4173_probe,
+ .remove = NULL,
+ .id_table = vrc4173_table,
};
static int __devinit vrc4173_init(void)
diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig
--- a/arch/parisc/Kconfig Sat Aug 2 14:26:16 2003
+++ b/arch/parisc/Kconfig Sun Aug 31 16:14:22 2003
@@ -161,11 +161,6 @@
menu "Executable file formats"
-config KCORE_ELF
- bool
- depends on PROC_FS
- default y
-
source "fs/Kconfig.binfmt"
endmenu
diff -Nru a/arch/parisc/kernel/ioctl32.c b/arch/parisc/kernel/ioctl32.c
--- a/arch/parisc/kernel/ioctl32.c Fri May 2 10:22:56 2003
+++ b/arch/parisc/kernel/ioctl32.c Sun Aug 31 16:14:44 2003
@@ -1426,7 +1426,7 @@
return -EINVAL;
tty = (struct tty_struct *)file->private_data;
- if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
+ if (tty_paranoia_check(tty, inode, "tty_ioctl"))
return -EINVAL;
if (tty->driver->ioctl != vt_ioctl)
@@ -2458,7 +2458,7 @@
#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl)
#define IOCTL_TABLE_START struct ioctl_trans ioctl_start[] = {
-#define IOCTL_TABLE_END }; struct ioctl_trans ioctl_end[0];
+#define IOCTL_TABLE_END };
IOCTL_TABLE_START
#include
@@ -2631,3 +2631,4 @@
#endif /* DRM */
IOCTL_TABLE_END
+int ioctl_table_size = ARRAY_SIZE(ioctl_start);
diff -Nru a/arch/ppc/8260_io/uart.c b/arch/ppc/8260_io/uart.c
--- a/arch/ppc/8260_io/uart.c Wed Jun 11 12:32:53 2003
+++ b/arch/ppc/8260_io/uart.c Tue Aug 26 09:25:39 2003
@@ -50,6 +50,10 @@
#include
#include
+#ifdef CONFIG_MAGIC_SYSRQ
+#include
+#endif
+
#ifdef CONFIG_SERIAL_CONSOLE
#include
@@ -77,6 +81,14 @@
static struct tty_driver *serial_driver;
static int serial_console_setup(struct console *co, char *options);
+static void serial_console_write(struct console *c, const char *s,
+ unsigned count);
+static kdev_t serial_console_device(struct console *c);
+
+#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+static unsigned long break_pressed; /* break, really ... */
+#endif
+
/*
* Serial driver configuration section. Here are the various options:
*/
@@ -208,6 +220,15 @@
cbd_t *tx_cur;
} ser_info_t;
+static struct console sercons = {
+ .name = "ttyS",
+ .write = serial_console_write,
+ .device = serial_console_device,
+ .setup = serial_console_setup,
+ .flags = CON_PRINTBUFFER,
+ .index = CONFIG_SERIAL_CONSOLE_PORT,
+};
+
static void change_speed(ser_info_t *info);
static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout);
@@ -328,7 +349,7 @@
schedule_work(&info->tqueue);
}
-static _INLINE_ void receive_chars(ser_info_t *info)
+static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs)
{
struct tty_struct *tty = info->tty;
unsigned char ch, *cp;
@@ -450,6 +471,19 @@
}
}
}
+
+#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+ if (break_pressed && info->line == sercons.index) {
+ if (ch != 0 && time_before(jiffies,
+ break_pressed + HZ*5)) {
+ handle_sysrq(ch, regs, NULL, NULL);
+ break_pressed = 0;
+ goto ignore_char;
+ } else
+ break_pressed = 0;
+ }
+#endif
+
if (tty->flip.count >= TTY_FLIPBUF_SIZE)
break;
@@ -458,6 +492,10 @@
tty->flip.count++;
}
+#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+ ignore_char:
+#endif
+
/* This BD is ready to be used again. Clear status.
* Get next BD.
*/
@@ -475,7 +513,36 @@
schedule_delayed_work(&tty->flip.work, 1);
}
-static _INLINE_ void transmit_chars(ser_info_t *info)
+static _INLINE_ void receive_break(ser_info_t *info, struct pt_regs *regs)
+{
+ struct tty_struct *tty = info->tty;
+
+ info->state->icount.brk++;
+
+#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+ if (info->line == sercons.index) {
+ if (!break_pressed) {
+ break_pressed = jiffies;
+ return;
+ } else
+ break_pressed = 0;
+ }
+#endif
+
+ /* Check to see if there is room in the tty buffer for
+ * the break. If not, we exit now, losing the break. FIXME
+ */
+ if ((tty->flip.count + 1) >= TTY_FLIPBUF_SIZE)
+ return;
+ *(tty->flip.flag_buf_ptr++) = TTY_BREAK;
+ *(tty->flip.char_buf_ptr++) = 0;
+ tty->flip.count++;
+
+ queue_task(&tty->flip.tqueue, &tq_timer);
+}
+
+
+static _INLINE_ void transmit_chars(ser_info_t *info, struct pt_regs *regs)
{
if (info->flags & TX_WAKEUP) {
@@ -575,19 +642,23 @@
if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) {
smcp = &immr->im_smc[idx];
events = smcp->smc_smce;
+ if (events & SMCM_BRKE)
+ receive_break(info, regs);
if (events & SMCM_RX)
- receive_chars(info);
+ receive_chars(info, regs);
if (events & SMCM_TX)
- transmit_chars(info);
+ transmit_chars(info, regs);
smcp->smc_smce = events;
}
else {
sccp = &immr->im_scc[idx - SCC_IDX_BASE];
events = sccp->scc_scce;
+ if (events & SMCM_BRKE)
+ receive_break(info, regs);
if (events & SCCM_RX)
- receive_chars(info);
+ receive_chars(info, regs);
if (events & SCCM_TX)
- transmit_chars(info);
+ transmit_chars(info, regs);
sccp->scc_scce = events;
}
@@ -2207,7 +2278,7 @@
static void serial_console_write(struct console *c, const char *s,
unsigned count)
{
-#if defined(CONFIG_KGDB) && !defined(CONFIG_USE_SERIAL2_KGDB)
+#if defined(CONFIG_KGDB_CONSOLE) && !defined(CONFIG_USE_SERIAL2_KGDB)
/* Try to let stub handle output. Returns true if it did. */
if (kgdb_output_string(s, count))
return;
@@ -2391,21 +2462,11 @@
}
#endif
-static kdev_t serial_console_device(struct console *c)
+static struct tty_driver *serial_console_device(struct console *c, int *index)
{
*index = c->index;
return serial_driver;
}
-
-
-static struct console sercons = {
- .name = "ttyS",
- .write = serial_console_write,
- .device = serial_console_device,
- .setup = serial_console_setup,
- .flags = CON_PRINTBUFFER,
- .index = CONFIG_SERIAL_CONSOLE_PORT,
-};
/*
* Register console.
diff -Nru a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c
--- a/arch/ppc/8xx_io/cs4218_tdm.c Tue Jul 15 10:01:29 2003
+++ b/arch/ppc/8xx_io/cs4218_tdm.c Tue Aug 26 09:25:40 2003
@@ -2106,11 +2106,11 @@
*/
cs4218_ctl_write(cs4218_control);
- sound.minDev = MINOR(inode->i_rdev) & 0x0f;
+ sound.minDev = iminor(inode) & 0x0f;
sound.soft = sound.dsp;
sound.hard = sound.dsp;
sound_init();
- if ((MINOR(inode->i_rdev) & 0x0f) == SND_DEV_AUDIO) {
+ if ((iminor(inode) & 0x0f) == SND_DEV_AUDIO) {
sound_set_speed(8000);
sound_set_stereo(0);
sound_set_format(AFMT_MU_LAW);
diff -Nru a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c
--- a/arch/ppc/8xx_io/uart.c Wed Jun 11 12:32:54 2003
+++ b/arch/ppc/8xx_io/uart.c Thu Aug 21 15:10:37 2003
@@ -1068,7 +1068,7 @@
volatile cbd_t *bdp;
unsigned char *cp;
-#ifdef CONFIG_KGDB
+#ifdef CONFIG_KGDB_CONSOLE
/* Try to let stub handle output. Returns true if it did. */
if (kgdb_output_string(buf, count))
return ret;
@@ -2271,7 +2271,7 @@
static void serial_console_write(struct console *c, const char *s,
unsigned count)
{
-#ifdef CONFIG_KGDB
+#ifdef CONFIG_KGDB_CONSOLE
/* Try to let stub handle output. Returns true if it did. */
if (kgdb_output_string(s, count))
return;
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig Mon Aug 4 16:10:57 2003
+++ b/arch/ppc/Kconfig Wed Sep 3 05:16:34 2003
@@ -66,6 +66,9 @@
config 40x
bool "40x"
+config 44x
+ bool "44x"
+
config POWER3
bool "POWER3"
@@ -74,6 +77,11 @@
endchoice
+config PTE_64BIT
+ bool
+ depends on 44x
+ default y
+
source arch/ppc/platforms/4xx/Kconfig
config 8260
@@ -766,8 +774,8 @@
RS/6000 machines are currently not supported by Linux.
config PCI
- bool "PCI support" if 4xx || 8260
- default y if !4xx && !8260 && !8xx && !APUS
+ bool "PCI support" if 40x || 8260
+ default y if !40x && !8260 && !8xx && !APUS
default PCI_PERMEDIA if !4xx && !8260 && !8xx && APUS
default PCI_QSPAN if !4xx && !8260 && 8xx
help
@@ -795,22 +803,6 @@
bool "PCI for Permedia2"
depends on !4xx && !8xx && APUS
-# only elf supported, a.out is not -- Cort
-config KCORE_ELF
- bool
- depends on PROC_FS
- default y
- help
- If you enabled support for /proc file system then the file
- /proc/kcore will contain the kernel core image in ELF format. This
- can be used in gdb:
-
- $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
- This is especially useful if you have compiled the kernel with the
- "-g" option to preserve debugging information. It is mainly used
- for examining kernel data structures on the live kernel.
-
config KERNEL_ELF
bool
default y
@@ -1159,6 +1151,7 @@
config BOOT_LOAD
hex "Link/load address for booting" if BOOT_LOAD_BOOL
default "0x00400000" if 40x || 8xx || 8260
+ default "0x01000000" if 44x
default "0x00800000"
config PIN_TLB
@@ -1277,16 +1270,11 @@
floppy controller, say Y here. Most commonly found in PowerMacs.
config MAC_SERIAL
- tristate "Support for PowerMac serial ports"
+ tristate "Support for PowerMac serial ports (OBSOLETE DRIVER)"
depends on PPC_PMAC
help
- If you have Macintosh style serial ports (8 pin mini-DIN), say Y
- here. If you also have regular serial ports and enable the driver
- for them, you can't currently use the serial console feature.
-
-config SERIAL_CONSOLE
- bool "Support for console on serial port"
- depends on PPC_PMAC && MAC_SERIAL=y
+ This driver is obsolete. Use CONFIG_SERIAL_PMACZILOG in
+ "Character devices --> Serial drivers --> PowerMac z85c30" option.
config ADB
bool "Apple Desktop Bus (ADB) support"
@@ -1426,20 +1414,12 @@
config KGDB
bool "Include kgdb kernel debugger"
depends on DEBUG_KERNEL
+ select DEBUG_INFO
help
Include in-kernel hooks for kgdb, the Linux kernel source level
debugger. See for more information.
Unless you are intending to debug the kernel, say N here.
-config DEBUG_INFO
- bool "Compile the kernel with debug info"
- depends on DEBUG_KERNEL
- help
- If you say Y here the resulting kernel image will include
- debugging info resulting in a larger kernel image.
- Say Y here only if you plan to use gdb to debug the kernel.
- If you don't debug the kernel, you can say N.
-
choice
prompt "Serial Port"
depends on KGDB
@@ -1459,6 +1439,14 @@
endchoice
+config KGDB_CONSOLE
+ bool "Enable serial console thru kgdb port"
+ depends on KGDB && 8xx || 8260
+ help
+ If you enable this, all serial console messages will be sent
+ over the gdb stub.
+ If unsure, say N.
+
config XMON
bool "Include xmon kernel debugger"
depends on DEBUG_KERNEL
@@ -1474,18 +1462,16 @@
Unless you are intending to debug the kernel with one of these
machines, say N here.
-config MORE_COMPILE_OPTIONS
- bool "Add any additional compile options"
- depends on DEBUG_KERNEL && (KGDB || XMON || BDI_SWITCH)
- help
- If you want to add additional CFLAGS to the kernel build, such as -g
- for KGDB or the BDI2000, enable this option and then enter what you
- would like to add in the next question.
-
-config COMPILE_OPTIONS
- string "Additional compile arguments"
- depends on MORE_COMPILE_OPTIONS
- default "-g -ggdb"
+config DEBUG_INFO
+ bool "Compile the kernel with debug info"
+ depends on DEBUG_KERNEL
+ default y if BDI_SWITCH || XMON
+ help
+ If you say Y here the resulting kernel image will include
+ debugging info resulting in a larger kernel image.
+ Say Y here only if you plan to use some sort of debugger to
+ debug the kernel.
+ If you don't debug the kernel, you can say N.
config BOOTX_TEXT
bool "Support for early boot text console (BootX or OpenFirmware only)"
diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile
--- a/arch/ppc/Makefile Sun Jul 27 15:52:30 2003
+++ b/arch/ppc/Makefile Wed Sep 3 05:16:34 2003
@@ -22,9 +22,6 @@
cflags-$(CONFIG_4xx) += -Wa,-m405
cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
-# Use sed to remove the quotes.
-cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
- $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
CFLAGS += $(cflags-y)
@@ -32,7 +29,7 @@
head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
head-$(CONFIG_4xx) := arch/ppc/kernel/head_4xx.o
-head-$(CONFIG_440) := arch/ppc/kernel/head_44x.o
+head-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o
head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o
diff -Nru a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c
--- a/arch/ppc/boot/common/ns16550.c Sat Jun 28 11:06:53 2003
+++ b/arch/ppc/boot/common/ns16550.c Wed Aug 20 10:24:16 2003
@@ -60,7 +60,7 @@
else {
/* Input clock. */
outb(com_port + (UART_DLL << shift),
- (BASE_BAUD / SERIAL_BAUD));
+ (BASE_BAUD / SERIAL_BAUD) & 0xFF);
outb(com_port + (UART_DLM << shift),
(BASE_BAUD / SERIAL_BAUD) >> 8);
/* 8 data, 1 stop, no parity */
diff -Nru a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S
--- a/arch/ppc/boot/common/util.S Tue Feb 25 11:37:43 2003
+++ b/arch/ppc/boot/common/util.S Thu Aug 21 10:17:00 2003
@@ -160,9 +160,22 @@
blr
+/* udelay (on non-601 processors) needs to know the period of the
+ * timebase in nanoseconds. This used to be hardcoded to be 60ns
+ * (period of 66MHz/4). Now a variable is used that is initialized to
+ * 60 for backward compatibility, but it can be overridden as necessary
+ * with code something like this:
+ * extern unsigned long timebase_period_ns;
+ * timebase_period_ns = 1000000000 / bd->bi_tbfreq;
+ */
+ .data
+ .globl timebase_period_ns
+timebase_period_ns:
+ .long 60
+
+ .text
/*
* Delay for a number of microseconds
- * -- Use the BUS timer (assumes 66MHz)
*/
.globl udelay
udelay:
@@ -180,8 +193,13 @@
.udelay_not_601:
mulli r4,r3,1000 /* nanoseconds */
- addi r4,r4,59
- li r5,60
+ /* Change r4 to be the number of ticks using:
+ * (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns
+ * timebase_period_ns defaults to 60 (16.6MHz) */
+ lis r5,timebase_period_ns@h
+ lwz r5,timebase_period_ns@l(r5)
+ addi r4,r4,r5
+ addi r4,r4,-1
divw r4,r4,r5 /* BUS ticks */
1: mftbu r5
mftb r6
diff -Nru a/arch/ppc/boot/include/of1275.h b/arch/ppc/boot/include/of1275.h
--- a/arch/ppc/boot/include/of1275.h Mon Sep 16 21:58:06 2002
+++ b/arch/ppc/boot/include/of1275.h Mon Aug 25 05:13:38 2003
@@ -20,6 +20,7 @@
/* function declarations */
void * claim(unsigned int virt, unsigned int size, unsigned int align);
+int map(unsigned int phys, unsigned int virt, unsigned int size);
void enter(void);
void exit(void);
phandle finddevice(const char *name);
diff -Nru a/arch/ppc/boot/ld.script b/arch/ppc/boot/ld.script
--- a/arch/ppc/boot/ld.script Thu May 29 04:06:53 2003
+++ b/arch/ppc/boot/ld.script Mon Aug 25 05:13:38 2003
@@ -66,7 +66,7 @@
_edata = .;
PROVIDE (edata = .);
- . = ALIGN(8);
+ . = ALIGN(4096);
__bss_start = .;
.bss :
{
diff -Nru a/arch/ppc/boot/of1275/Makefile b/arch/ppc/boot/of1275/Makefile
--- a/arch/ppc/boot/of1275/Makefile Sun Jun 8 01:12:49 2003
+++ b/arch/ppc/boot/of1275/Makefile Mon Aug 25 09:36:40 2003
@@ -3,4 +3,4 @@
#
lib-y := claim.o enter.o exit.o finddevice.o getprop.o ofinit.o \
- ofstdio.o read.o release.o write.o
+ ofstdio.o read.o release.o write.o map.o
diff -Nru a/arch/ppc/boot/of1275/map.c b/arch/ppc/boot/of1275/map.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/boot/of1275/map.c Mon Aug 25 09:36:40 2003
@@ -0,0 +1,50 @@
+
+/*
+ * Copyright (C) Paul Mackerras 1997.
+ * Copyright (C) Leigh Brown 2002.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include "of1275.h"
+#include "nonstdio.h"
+
+extern ihandle of_prom_mmu;
+
+int
+map(unsigned int phys, unsigned int virt, unsigned int size)
+{
+ struct prom_args {
+ char *service;
+ int nargs;
+ int nret;
+ char *method;
+ ihandle mmu_ihandle;
+ int misc;
+ unsigned int phys;
+ unsigned int virt;
+ unsigned int size;
+ int ret0;
+ int ret1;
+ } args;
+
+ if (of_prom_mmu == 0) {
+ printf("map() called, no MMU found\n");
+ return -1;
+ }
+ args.service = "call-method";
+ args.nargs = 6;
+ args.nret = 2;
+ args.method = "map";
+ args.mmu_ihandle = of_prom_mmu;
+ args.misc = -1;
+ args.phys = phys;
+ args.virt = virt;
+ args.size = size;
+ (*of_prom_entry)(&args);
+
+ return (int)args.ret0;
+}
diff -Nru a/arch/ppc/boot/of1275/ofinit.c b/arch/ppc/boot/of1275/ofinit.c
--- a/arch/ppc/boot/of1275/ofinit.c Mon Sep 16 22:18:13 2002
+++ b/arch/ppc/boot/of1275/ofinit.c Mon Aug 25 05:13:38 2003
@@ -11,9 +11,17 @@
#include "of1275.h"
prom_entry of_prom_entry;
+ihandle of_prom_mmu;
void
ofinit(prom_entry prom_ptr)
{
+ phandle chosen;
+
of_prom_entry = prom_ptr;
+
+ if ((chosen = finddevice("/chosen")) == OF_INVALID_HANDLE)
+ return;
+ if (getprop(chosen, "mmu", &of_prom_mmu, sizeof(ihandle)) != 4)
+ return;
}
diff -Nru a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile
--- a/arch/ppc/boot/openfirmware/Makefile Wed Jul 23 08:39:58 2003
+++ b/arch/ppc/boot/openfirmware/Makefile Mon Aug 25 05:13:38 2003
@@ -22,7 +22,7 @@
images := $(boot)/images
OBJCOPY_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment
-COFF_LD_ARGS := -T $(boot)/ld.script -e _start -Ttext 0x00700000 -Bstatic
+COFF_LD_ARGS := -T $(boot)/ld.script -e _start -Ttext 0x00500000 -Bstatic
CHRP_LD_ARGS := -T $(boot)/ld.script -e _start -Ttext 0x00800000
NEWWORLD_LD_ARGS:= -T $(boot)/ld.script -e _start -Ttext 0x01000000
diff -Nru a/arch/ppc/boot/openfirmware/coffmain.c b/arch/ppc/boot/openfirmware/coffmain.c
--- a/arch/ppc/boot/openfirmware/coffmain.c Thu Nov 7 03:31:11 2002
+++ b/arch/ppc/boot/openfirmware/coffmain.c Mon Aug 25 05:13:38 2003
@@ -32,16 +32,16 @@
char *begin_avail, *end_avail;
char *avail_high;
-#define RAM_START 0
-#define RAM_END (RAM_START + 0x800000) /* only 8M mapped with BATs */
-
-#define PROG_START RAM_START
-#define PROG_SIZE 0x00700000
-
#define SCRATCH_SIZE (128 << 10)
static char heap[SCRATCH_SIZE];
+static unsigned long ram_start = 0;
+static unsigned long ram_end = 0x1000000;
+static unsigned long prog_start = 0x800000;
+static unsigned long prog_size = 0x800000;
+
+
typedef void (*kernel_start_t)(int, int, void *);
void boot(int a1, int a2, void *prom)
@@ -52,32 +52,34 @@
unsigned initrd_start, initrd_size;
printf("coffboot starting: loaded at 0x%p\n", &_start);
- setup_bats(RAM_START);
+ setup_bats(ram_start);
initrd_size = (char *)(&__ramdisk_end) - (char *)(&__ramdisk_begin);
if (initrd_size) {
- initrd_start = (RAM_END - initrd_size) & ~0xFFF;
+ initrd_start = (ram_end - initrd_size) & ~0xFFF;
a1 = initrd_start;
a2 = initrd_size;
- claim(initrd_start, RAM_END - initrd_start, 0);
+ claim(initrd_start, ram_end - initrd_start, 0);
printf("initial ramdisk moving 0x%x <- 0x%p (%x bytes)\n\r",
initrd_start, (char *)(&__ramdisk_begin), initrd_size);
memcpy((char *)initrd_start, (char *)(&__ramdisk_begin), initrd_size);
+ prog_size = initrd_start - prog_start;
} else
a2 = 0xdeadbeef;
im = (char *)(&__image_begin);
len = (char *)(&__image_end) - (char *)(&__image_begin);
- /* claim 4MB starting at 0 */
- claim(0, PROG_SIZE, 0);
- dst = (void *) RAM_START;
+ /* claim 4MB starting at PROG_START */
+ claim(prog_start, prog_size, 0);
+ map(prog_start, prog_start, prog_size);
+ dst = (void *) prog_start;
if (im[0] == 0x1f && im[1] == 0x8b) {
/* set up scratch space */
begin_avail = avail_high = avail_ram = heap;
end_avail = heap + sizeof(heap);
printf("heap at 0x%p\n", avail_ram);
printf("gunzipping (0x%p <- 0x%p:0x%p)...", dst, im, im+len);
- gunzip(dst, PROG_SIZE, im, &len);
+ gunzip(dst, prog_size, im, &len);
printf("done %u bytes\n", len);
printf("%u bytes of heap consumed, max in use %u\n",
avail_high - begin_avail, heap_max);
@@ -87,9 +89,9 @@
flush_cache(dst, len);
make_bi_recs(((unsigned long) dst + len), "coffboot", _MACH_Pmac,
- (PROG_START + PROG_SIZE));
+ (prog_start + prog_size));
- sa = (unsigned long)PROG_START;
+ sa = (unsigned long)prog_start;
printf("start address = 0x%x\n", sa);
(*(kernel_start_t)sa)(a1, a2, prom);
diff -Nru a/arch/ppc/boot/openfirmware/misc.S b/arch/ppc/boot/openfirmware/misc.S
--- a/arch/ppc/boot/openfirmware/misc.S Mon Sep 16 21:54:12 2002
+++ b/arch/ppc/boot/openfirmware/misc.S Mon Aug 25 05:13:38 2003
@@ -9,7 +9,7 @@
.text
/*
- * Use the BAT3 registers to map the 1st 8MB of RAM to
+ * Use the BAT2 & 3 registers to map the 1st 16MB of RAM to
* the address given as the 1st argument.
*/
.globl setup_bats
@@ -22,6 +22,10 @@
mtibatl 3,0 /* invalidate BAT first */
ori 3,3,4 /* set up BAT registers for 601 */
li 4,0x7f
+ mtibatu 2,3
+ mtibatl 2,4
+ oris 3,3,0x80
+ oris 4,4,0x80
mtibatu 3,3
mtibatl 3,4
b 5f
@@ -29,6 +33,12 @@
mtibatu 3,0
ori 3,3,0xff /* set up BAT registers for 604 */
li 4,2
+ mtdbatl 2,4
+ mtdbatu 2,3
+ mtibatl 2,4
+ mtibatu 2,3
+ oris 3,3,0x80
+ oris 4,4,0x80
mtdbatl 3,4
mtdbatu 3,3
mtibatl 3,4
diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
--- a/arch/ppc/boot/simple/Makefile Tue Jul 1 17:01:18 2003
+++ b/arch/ppc/boot/simple/Makefile Wed Sep 3 05:16:34 2003
@@ -22,7 +22,6 @@
# get_mem_size(), which is memory controller dependent. Add in the correct
# XXX_memory.o file for this to work, as well as editing the $(MISC) file.
-boot: zImage
boot := arch/ppc/boot
common := $(boot)/common
@@ -32,86 +31,95 @@
# Normally, we use the 'misc.c' file for decompress_kernel and
# whatnot. Sometimes we need to override this however.
-MISC := misc.o
-ifeq ($(CONFIG_IBM_OPENBIOS),y)
-ZIMAGE := zImage-TREE
-ZIMAGEINITRD := zImage.initrd-TREE
-END := treeboot
-TFTPIMAGE := /tftpboot/zImage.$(END)
-MISC := misc-embedded.o
-endif
-ifeq ($(CONFIG_EMBEDDEDBOOT),y)
-TFTPIMAGE := /tftpboot/zImage.embedded
-MISC := misc-embedded.o
-endif
-ifeq ($(CONFIG_EBONY),y)
-ZIMAGE := zImage-TREE
-ZIMAGEINITRD := zImage.initrd-TREE
-END := ebony
-ENTRYPOINT := 0x01000000
-TFTPIMAGE := /tftpboot/zImage.$(END)
-endif
-ifeq ($(CONFIG_EV64260),y)
-EXTRA := misc-ev64260.o
-TFTPIMAGE := /tftpboot/zImage.ev64260
-endif
-ifeq ($(CONFIG_GEMINI),y)
-ZIMAGE := zImage-STRIPELF
-ZIMAGEINITRD := zImage.initrd-STRIPELF
-END := gemini
-TFTPIMAGE := /tftpboot/zImage.$(END)
-endif
-ifeq ($(CONFIG_K2),y)
-EXTRA := legacy.o
-TFTPIMAGE := /tftpboot/zImage.k2
-endif
-# kbuild-2.4 'feature', only one of these will ever by 'y' at a time.
+misc-y := misc.o
+
+#
+# See arch/ppc/kconfig and arch/ppc/platforms/Kconfig
+# for definition of what platform each config option refer to.
+#----------------------------------------------------------------------------
+ zimage-$(CONFIG_IBM_OPENBIOS) := zImage-TREE
+zimageinitrd-$(CONFIG_IBM_OPENBIOS) := zImage.initrd-TREE
+ end-$(CONFIG_IBM_OPENBIOS) := treeboot
+ tftpimage-$(CONFIG_IBM_OPENBIOS) := /tftpboot/zImage.$(end-y)
+ misc-$(CONFIG_IBM_OPENBIOS) := misc-embedded.o
+
+ tftpimage-$(CONFIG_EMBEDDEDBOOT) := /tftpboot/zImage.embedded
+ misc-$(CONFIG_EMBEDDEDBOOT) := misc-embedded.o
+
+ zimage-$(CONFIG_EBONY) := zImage-TREE
+zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE
+ end-$(CONFIG_EBONY) := ebony
+ entrypoint-$(CONFIG_EBONY) := 0x01000000
+ tftpimage-$(CONFIG_EBONY) := /tftpboot/zImage.$(end-y)
+
+ zimage-$(CONFIG_OCOTEA) := zImage-TREE
+zimageinitrd-$(CONFIG_OCOTEA) := zImage.initrd-TREE
+ end-$(CONFIG_OCOTEA) := ocotea
+ entrypoint-$(CONFIG_OCOTEA) := 0x01000000
+ tftpimage-$(CONFIG_OCOTEA) := /tftpboot/zImage.$(end-y)
+
+ extra.o-$(CONFIG_EV64260) := direct.o misc-ev64260.o
+ tftpimage-$(CONFIG_EV64260) := /tftpboot/zImage.ev64260
+
+ zimage-$(CONFIG_GEMINI) := zImage-STRIPELF
+zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF
+ end-$(CONFIG_GEMINI) := gemini
+ tftpimage-$(CONFIG_GEMINI) := /tftpboot/zImage.$(end-y)
+
+ extra.o-$(CONFIG_K2) := legacy.o
+ tftpimage-$(CONFIG_K2) := /tftpboot/zImage.k2
+
+# kconfig 'feature', only one of these will ever by 'y' at a time.
# The rest will be unset.
-ifeq ($(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750)$(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS),y)
-ZIMAGE := zImage-PPLUS
-ZIMAGEINITRD := zImage.initrd-PPLUS
-TFTPIMAGE := /tftpboot/zImage.pplus
-ZNETBOOT := zImage.pplus
-ZNETBOOTRD := zImage.initrd.pplus
-endif
-ifeq ($(CONFIG_PPLUS),y)
-EXTRA := legacy.o
-endif
-ifeq ($(CONFIG_PCORE)$(CONFIG_POWERPMC250),y)
-ZIMAGE := zImage-STRIPELF
-ZIMAGEINITRD := zImage.initrd-STRIPELF
-EXTRA := chrpmap.o
-END := pcore
-TFTPIMAGE := /tftpboot/zImage.$(END)
-endif
-ifeq ($(CONFIG_SANDPOINT),y)
-TFTPIMAGE := /tftpboot/zImage.sandpoint
-endif
-ifeq ($(CONFIG_SPRUCE),y)
-ZIMAGE := zImage-TREE
-ZIMAGEINITRD := zImage.initrd-TREE
-END := spruce
-ENTRYPOINT := 0x00800000
-MISC := misc-spruce.o
-TFTPIMAGE := /tftpboot/zImage.$(END)
-endif
-ifeq ($(CONFIG_SMP),y)
-TFTPIMAGE += .smp
-endif
-ifeq ($(CONFIG_REDWOOD_4),y)
+multi := $(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750) \
+$(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS)
+ zimage-$(multi) := zImage-PPLUS
+zimageinitrd-$(multi) := zImage.initrd-PPLUS
+ tftpimage-$(multi) := /tftpboot/zImage.pplus
+ znetboot-$(multi) := zImage.pplus
+ znetbootrd-$(multi) := zImage.initrd.pplus
+
+# Overrides previous assingment
+ extra.o-$(CONFIG_PPLUS) := legacy.o
+
+ zimage-$(CONFIG_PCORE) := zImage-STRIPELF
+zimageinitrd-$(CONFIG_PCORE) := zImage.initrd-STRIPELF
+ extra.o-$(CONFIG_PCORE) := chrpmap.o
+ end-$(CONFIG_PCORE) := pcore
+ tftpimage-$(CONFIG_PCORE) := /tftpboot/zImage.$(end-y)
+
+ zimage-$(CONFIG_POWERPMC250) := zImage-STRIPELF
+zimageinitrd-$(CONFIG_POWERPMC250) := zImage.initrd-STRIPELF
+ extra.o-$(CONFIG_POWERPMC250) := chrpmap.o
+ end-$(CONFIG_POWERPMC250) := pcore
+ tftpimage-$(CONFIG_POWERPMC250) := /tftpboot/zImage.$(end-y)
+
+ tftpimage-$(CONFIG_SANDPOINT) := /tftpboot/zImage.sandpoint
+
+ zimage-$(CONFIG_SPRUCE) := zImage-TREE
+zimageinitrd-$(CONFIG_SPRUCE) := zImage.initrd-TREE
+ end-$(CONFIG_SPRUCE) := spruce
+ entrypoint-$(CONFIG_SPRUCE) := 0x00800000
+ misc-$(CONFIG_SPRUCE) := misc-spruce.o
+ tftpimage-$(CONFIG_SPRUCE) := /tftpboot/zImage.$(end-y)
+
+
+# tftp image is prefixed with .smp if compiled for SMP
+tftpimage-$(CONFIG_SMP) += .smp
+
# This is a treeboot that needs init functions until the
# boot rom is sorted out (i.e. this is short lived)
-EXTRA_AFLAGS := -Wa,-m405
-EXTRA := rw4/rw4_init.o rw4/rw4_init_brd.o
-endif
+extra-aflags-$(CONFIG_REDWOOD_4) := -Wa,-m405
+extra.o-$(CONFIG_REDWOOD_4) := rw4/rw4_init.o rw4/rw4_init_brd.o
+EXTRA_AFLAGS := $(extra-aflags-y)
# Linker args. This specifies where the image will be run at.
-LD_ARGS = -T $(boot)/ld.script \
- -Ttext $(CONFIG_BOOT_LOAD) -Bstatic
+LD_ARGS := -T $(boot)/ld.script \
+ -Ttext $(CONFIG_BOOT_LOAD) -Bstatic
OBJCOPY_ARGS := -O elf32-powerpc
# head.o and relocate.o must be at the start.
-boot-y := head.o relocate.o $(EXTRA) $(MISC)
+boot-y := head.o relocate.o $(extra.o-y) $(misc-y)
boot-$(CONFIG_40x) += embed_config.o
boot-$(CONFIG_8xx) += embed_config.o
boot-$(CONFIG_8260) += embed_config.o
@@ -160,40 +168,40 @@
-R .stabstr -R .sysmap
# Sort-of dummy rules, that let us format the image we want.
-zImage: $(images)/$(ZIMAGE) $(obj)/zvmlinux
+zImage: $(images)/$(zimage-y) $(obj)/zvmlinux
cp -f $(obj)/zvmlinux $(images)/zImage.elf
rm -f $(obj)/zvmlinux
-zImage.initrd: $(images)/$(ZIMAGEINITRD) $(obj)/zvmlinux.initrd
+zImage.initrd: $(images)/$(zimageinitrd-y) $(obj)/zvmlinux.initrd
cp -f $(obj)/zvmlinux.initrd $(images)/zImage.initrd.elf
rm -f $(obj)/zvmlinux.initrd
znetboot: zImage
ifneq ($(ZNETBOOT),)
- cp $(images)/$(ZNETBOOT) $(TFTPIMAGE)
+ cp $(images)/$(ZNETBOOT) $(tftpimage-y)
else
- cp $(images)/zImage.* $(TFTPIMAGE)
+ cp $(images)/zImage.* $(tftpimage-y)
endif
znetboot.initrd: zImage.initrd
-ifneq ($(ZNETBOOTRD),)
- cp $(images)/$(ZNETBOOTRD) $(TFTPIMAGE)
+ifneq ($(znetbootrd-y),)
+ cp $(images)/$(znetbootrd-y) $(tftpimage-y)
else
- cp $(images)/zImage.* $(TFTPIMAGE)
+ cp $(images)/zImage.* $(tftpimage-y)
endif
$(images)/zImage-STRIPELF: $(obj)/zvmlinux
- dd if=$(obj)/zvmlinux of=$(images)/zImage.$(END) skip=64 bs=1k
+ dd if=$(obj)/zvmlinux of=$(images)/zImage.$(end-y) skip=64 bs=1k
$(images)/zImage.initrd-STRIPELF: $(obj)/zvmlinux.initrd
- dd if=$(obj)/zvmlinux.initrd of=$(images)/zImage.initrd.$(END) \
+ dd if=$(obj)/zvmlinux.initrd of=$(images)/zImage.initrd.$(end-y) \
skip=64 bs=1k
$(images)/zImage-TREE: $(obj)/zvmlinux $(MKTREE)
- $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(END) $(ENTRYPOINT)
+ $(MKTREE) $(obj)/zvmlinux $(images)/zImage.$(end-y) $(ENTRYPOINT)
$(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
- $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \
+ $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \
$(ENTRYPOINT)
$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT)
diff -Nru a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c
--- a/arch/ppc/boot/simple/embed_config.c Sat Mar 22 17:18:48 2003
+++ b/arch/ppc/boot/simple/embed_config.c Thu Aug 21 10:17:00 2003
@@ -20,6 +20,7 @@
#ifdef CONFIG_40x
#include
#endif
+extern unsigned long timebase_period_ns;
/* For those boards that don't provide one.
*/
@@ -768,6 +769,7 @@
#if defined(CONFIG_REDWOOD_5) || defined (CONFIG_REDWOOD_6)
bd->bi_tbfreq = 27 * 1000 * 1000;
#endif
+ timebase_period_ns = 1000000000 / bd->bi_tbfreq;
}
#endif /* CONFIG_BEECH */
#endif /* CONFIG_IBM_OPENBIOS */
diff -Nru a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c
--- a/arch/ppc/boot/simple/misc-embedded.c Thu Jun 5 18:06:12 2003
+++ b/arch/ppc/boot/simple/misc-embedded.c Wed Aug 20 15:44:31 2003
@@ -75,7 +75,7 @@
extern void embed_config(bd_t **bp);
unsigned long
-decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp)
+load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp)
{
char *cp, ch;
int timer = 0, zimage_size;
diff -Nru a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c
--- a/arch/ppc/boot/simple/misc-spruce.c Tue Feb 11 15:48:52 2003
+++ b/arch/ppc/boot/simple/misc-spruce.c Wed Aug 20 15:44:31 2003
@@ -147,7 +147,7 @@
#define MEM_B2EA 0x60
unsigned long
-decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
+load_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
{
int timer = 0;
char *cp, ch;
diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
--- a/arch/ppc/boot/simple/misc.c Tue Feb 11 15:48:52 2003
+++ b/arch/ppc/boot/simple/misc.c Wed Sep 3 05:16:34 2003
@@ -25,6 +25,9 @@
#include
#include
#include
+#ifdef CONFIG_44x
+#include
+#endif
#include "nonstdio.h"
#include "zlib.h"
@@ -80,6 +83,16 @@
serial_fixups();
com_port = serial_init(0, NULL);
+#ifdef CONFIG_44x
+ /* Reset MAL */
+ mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR);
+ /* Wait for reset */
+ while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {};
+ /* Reset EMAC */
+ *(volatile unsigned long *)PPC44x_EMAC0_MR0 = 0x20000000;
+ __asm__ __volatile__("eieio");
+#endif
+
#if defined(CONFIG_LOPEC) || defined(CONFIG_PAL4)
/*
* Call get_mem_size(), which is memory controller dependent,
@@ -251,4 +264,11 @@
serial_close(com_port);
return (struct bi_record *)rec_loc;
+}
+
+/* Allow decompress_kernel to be hooked into. This is the default. */
+void * __attribute__ ((weak))
+load_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
+{
+ return decompress_kernel(load_addr, num_words, cksum);
}
diff -Nru a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S
--- a/arch/ppc/boot/simple/relocate.S Tue Feb 11 15:48:52 2003
+++ b/arch/ppc/boot/simple/relocate.S Wed Aug 20 15:44:31 2003
@@ -183,7 +183,7 @@
mr r4,r7 /* Program length */
mr r5,r6 /* Checksum */
mr r6,r11 /* Residual data */
- bl decompress_kernel
+ bl load_kernel
/*
* Make sure the kernel knows we don't have things set in
diff -Nru a/arch/ppc/boot/utils/mktree.c b/arch/ppc/boot/utils/mktree.c
--- a/arch/ppc/boot/utils/mktree.c Sun Sep 15 21:51:58 2002
+++ b/arch/ppc/boot/utils/mktree.c Thu Aug 21 15:00:42 2003
@@ -86,7 +86,7 @@
}
cksum = 0;
- cp = (uint *)&bt;
+ cp = (void *)&bt;
for (i=0; i
+ *
+ * Copyright 2002-2003 MontaVista Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * Macros
+ */
+
+#define SET_IVOR(vector_number, vector_label) \
+ li r26,vector_label@l; \
+ mtspr SPRN_IVOR##vector_number,r26; \
+ sync
+
+/* As with the other PowerPC ports, it is expected that when code
+ * execution begins here, the following registers contain valid, yet
+ * optional, information:
+ *
+ * r3 - Board info structure pointer (DRAM, frequency, MAC address, etc.)
+ * r4 - Starting address of the init RAM disk
+ * r5 - Ending address of the init RAM disk
+ * r6 - Start of kernel command line string (e.g. "mem=128")
+ * r7 - End of kernel command line string
+ *
+ */
+ .text
+_GLOBAL(_stext)
+_GLOBAL(_start)
+ /*
+ * Reserve a word at a fixed location to store the address
+ * of abatron_pteptrs
+ */
+ nop
+/*
+ * Save parameters we are passed
+ */
+ mr r31,r3
+ mr r30,r4
+ mr r29,r5
+ mr r28,r6
+ mr r27,r7
+ li r24,0 /* CPU number */
+
+/*
+ * Set up the initial MMU state
+ *
+ * We are still executing code at the virtual address
+ * mappings set by the firmware for the base of RAM.
+ *
+ * We first invalidate all TLB entries but the one
+ * we are running from. We then load the KERNELBASE
+ * mappings so we can begin to use kernel addresses
+ * natively and so the interrupt vector locations are
+ * permanently pinned (necessary since Book E
+ * implementations always have translation enabled).
+ *
+ * TODO: Use the known TLB entry we are running from to
+ * determine which physical region we are located
+ * in. This can be used to determine where in RAM
+ * (on a shared CPU system) or PCI memory space
+ * (on a DRAMless system) we are located.
+ * For now, we assume a perfect world which means
+ * we are located at the base of DRAM (physical 0).
+ */
+
+/*
+ * Search TLB for entry that we are currently using.
+ * Invalidate all entries but the one we are using.
+ */
+ /* Load our current PID->MMUCR TID and MSR IS->MMUCR STS */
+ mfspr r3,SPRN_MMUCR /* Get MMUCR */
+ lis r4,PPC44x_MMUCR_STS@h
+ ori r4,r4,PPC44x_MMUCR_TID@l /* Create mask */
+ andc r3,r3,r4 /* Clear out TID/STS bits */
+ mfspr r4,SPRN_PID /* Get PID */
+ or r3,r3,r4 /* Set TID bits */
+ mfmsr r5 /* Get MSR */
+ andi. r5,r5,MSR_IS@l /* TS=1? */
+ beq wmmucr /* If not, leave STS=0 */
+ oris r3,r3,PPC44x_MMUCR_STS@h /* Set STS=1 */
+wmmucr: mtspr SPRN_MMUCR,r3 /* Put MMUCR */
+ sync
+
+ bl invstr /* Find our address */
+invstr: mflr r5 /* Make it accessible */
+ tlbsx r23,0,r5 /* Find entry we are in */
+ li r4,0 /* Start at TLB entry 0 */
+ li r3,0 /* Set PAGEID inval value */
+1: cmpw r23,r4 /* Is this our entry? */
+ beq skpinv /* If so, skip the inval */
+ tlbwe r3,r4,PPC44x_TLB_PAGEID /* If not, inval the entry */
+skpinv: addi r4,r4,1 /* Increment */
+ cmpwi r4,64 /* Are we done? */
+ bne 1b /* If not, repeat */
+ isync /* If so, context change */
+
+/*
+ * Configure and load pinned entries into TLB slots 62 and 63.
+ */
+
+ lis r3,KERNELBASE@h /* Load the kernel virtual address */
+ ori r3,r3,KERNELBASE@l
+
+ /* Kernel is at the base of RAM */
+ li r4, 0 /* Load the kernel physical address */
+
+ /* Load the kernel PID = 0 */
+ li r0,0
+ mtspr SPRN_PID,r0
+ sync
+
+ /* Load the kernel TID = 0 */
+ mfspr r5,SPRN_MMUCR
+ lis r6, PPC44x_MMUCR_TID@h
+ ori r6,r6,PPC44x_MMUCR_TID@l
+ andc r5,r5,r6
+ mtspr SPRN_MMUCR,r5
+ sync
+
+ /* pageid fields */
+ clrrwi r3,r3,10 /* Mask off the effective page number */
+ ori r3,r3,(PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M))
+
+ /* xlat fields */
+ clrrwi r4,r4,10 /* Mask off the real page number */
+ /* ERPN is 0 for first 4GB page */
+
+ /* attrib fields */
+ /* Added guarded bit to protect against speculative loads/stores */
+ li r5,0
+ ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G)
+
+ li r0,62 /* TLB slot 62 */
+
+ tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
+ tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
+ tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */
+
+ /* Force context change */
+ mfmsr r0
+ mtspr SRR1, r0
+ lis r0,3f@h
+ ori r0,r0,3f@l
+ mtspr SRR0,r0
+ sync
+ rfi
+
+ /* If necessary, invalidate original entry we used */
+3: cmpwi r23,62
+ beq 4f
+ li r6,0
+ tlbwe r6,r23,PPC44x_TLB_PAGEID
+ sync
+
+4: ori r3,r3,PPC44x_TLB_TS /* TS = 1 */
+
+ li r0,63 /* TLB slot 63 */
+
+ tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
+ tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
+ tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */
+
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+ /*
+ * Add temporary UART mapping for early debug. This
+ * mapping must be identical to that used by the early
+ * bootloader code since the same asm/serial.h parameters
+ * are used for polled operation.
+ */
+ /* pageid fields */
+ lis r3,0xe000
+ ori r3,r3,(PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M))
+
+ /* xlat fields */
+ lis r4,0x4000 /* RPN is 0x40000000 */
+ ori r4,r4,0x0001 /* ERPN is 1 for second 4GB page */
+
+ /* attrib fields */
+ li r5,0
+ ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
+
+ li r0,60 /* TLB slot 60 */
+
+ tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
+ tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
+ tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */
+
+ ori r3,r3,PPC44x_TLB_TS /* Translation state 1 */
+
+ li r0,61 /* TLB slot 61 */
+
+ tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
+ tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
+ tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */
+#endif /* CONFIG_SERIAL_TEXT_DEBUG */
+
+ /* Force context change */
+ isync
+
+ /* Establish the interrupt vector offsets */
+ SET_IVOR(0, CriticalInput);
+ SET_IVOR(1, MachineCheck);
+ SET_IVOR(2, DataStorage);
+ SET_IVOR(3, InstructionStorage);
+ SET_IVOR(4, ExternalInput);
+ SET_IVOR(5, Alignment);
+ SET_IVOR(6, Program);
+ SET_IVOR(7, FloatingPointUnavailable);
+ SET_IVOR(8, SystemCall);
+ SET_IVOR(9, AuxillaryProcessorUnavailable);
+ SET_IVOR(10, Decrementer);
+ SET_IVOR(11, FixedIntervalTimer);
+ SET_IVOR(12, WatchdogTimer);
+ SET_IVOR(13, DataTLBError);
+ SET_IVOR(14, InstructionTLBError);
+ SET_IVOR(15, Debug);
+
+ /* Establish the interrupt vector base */
+ lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
+ mtspr SPRN_IVPR,r4
+
+ /*
+ * This is where the main kernel code starts.
+ */
+
+ /* ptr to current */
+ lis r2,init_task@h
+ ori r2,r2,init_task@l
+
+ /* ptr to current thread */
+ addi r4,r2,THREAD /* init task's THREAD */
+ mtspr SPRG3,r4
+
+ /* stack */
+ lis r1,init_thread_union@h
+ ori r1,r1,init_thread_union@l
+ li r0,0
+ stwu r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1)
+
+ bl early_init
+
+/*
+ * Decide what sort of machine this is and initialize the MMU.
+ */
+ mr r3,r31
+ mr r4,r30
+ mr r5,r29
+ mr r6,r28
+ mr r7,r27
+ bl machine_init
+ bl MMU_init
+
+ /* Setup PTE pointers for the Abatron bdiGDB */
+ lis r6, swapper_pg_dir@h
+ ori r6, r6, swapper_pg_dir@l
+ lis r5, abatron_pteptrs@h
+ ori r5, r5, abatron_pteptrs@l
+ lis r4, KERNELBASE@h
+ ori r4, r4, KERNELBASE@l
+ stw r5, 0(r4) /* Save abatron_pteptrs at a fixed location */
+ stw r6, 0(r5)
+
+ /* Let's move on */
+ lis r4,start_kernel@h
+ ori r4,r4,start_kernel@l
+ lis r3,MSR_KERNEL@h
+ ori r3,r3,MSR_KERNEL@l
+ mtspr SRR0,r4
+ mtspr SRR1,r3
+ rfi /* change context and jump to start_kernel */
+
+/*
+ * Interrupt vector entry code
+ *
+ * The Book E MMUs are always on so we don't need to handle
+ * interrupts in real mode as with previous PPC processors. In
+ * this case we handle interrupts in the kernel virtual address
+ * space.
+ *
+ * Interrupt vectors are dynamically placed relative to the
+ * interrupt prefix as determined by the address of interrupt_base.
+ * The interrupt vectors offsets are programmed using the labels
+ * for each interrupt vector entry.
+ *
+ * Interrupt vectors must be aligned on a 16 byte boundary.
+ * We align on a 32 byte cache line boundary for good measure.
+ */
+
+#define NORMAL_EXCEPTION_PROLOG \
+ mtspr SPRN_SPRG0,r10; /* save two registers to work with */\
+ mtspr SPRN_SPRG1,r11; \
+ mtspr SPRN_SPRG2,r1; \
+ mfcr r10; /* save CR in r10 for now */\
+ mfspr r11,SPRN_SRR1; /* check whether user or kernel */\
+ andi. r11,r11,MSR_PR; \
+ beq 1f; \
+ mfspr r1,SPRG3; /* if from user, start at top of */\
+ lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\
+ addi r1,r1,THREAD_SIZE; \
+1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\
+ tophys(r11,r1); \
+ stw r10,_CCR(r11); /* save various registers */\
+ stw r12,GPR12(r11); \
+ stw r9,GPR9(r11); \
+ mfspr r10,SPRG0; \
+ stw r10,GPR10(r11); \
+ mfspr r12,SPRG1; \
+ stw r12,GPR11(r11); \
+ mflr r10; \
+ stw r10,_LINK(r11); \
+ mfspr r10,SPRG2; \
+ mfspr r12,SRR0; \
+ stw r10,GPR1(r11); \
+ mfspr r9,SRR1; \
+ stw r10,0(r11); \
+ rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
+ stw r0,GPR0(r11); \
+ SAVE_4GPRS(3, r11); \
+ SAVE_2GPRS(7, r11)
+
+/*
+ * Exception prolog for critical exceptions. This is a little different
+ * from the normal exception prolog above since a critical exception
+ * can potentially occur at any point during normal exception processing.
+ * Thus we cannot use the same SPRG registers as the normal prolog above.
+ * Instead we use a couple of words of memory at low physical addresses.
+ * This is OK since we don't support SMP on these processors.
+ */
+/* XXX but we don't have RAM mapped at 0 in space 0 -- paulus. */
+#define CRITICAL_EXCEPTION_PROLOG \
+ stw r10,crit_r10@l(0); /* save two registers to work with */\
+ stw r11,crit_r11@l(0); \
+ mfspr r10,SPRG0; \
+ stw r10,crit_sprg0@l(0); \
+ mfspr r10,SPRG1; \
+ stw r10,crit_sprg1@l(0); \
+ mfspr r10,SPRG4R; \
+ stw r10,crit_sprg4@l(0); \
+ mfspr r10,SPRG5R; \
+ stw r10,crit_sprg5@l(0); \
+ mfspr r10,SPRG6R; \
+ stw r10,crit_sprg6@l(0); \
+ mfspr r10,SPRG7R; \
+ stw r10,crit_sprg7@l(0); \
+ mfspr r10,SPRN_PID; \
+ stw r10,crit_pid@l(0); \
+ mfspr r10,SRR0; \
+ stw r10,crit_srr0@l(0); \
+ mfspr r10,SRR1; \
+ stw r10,crit_srr1@l(0); \
+ mfcr r10; /* save CR in r10 for now */\
+ mfspr r11,SPRN_CSRR1; /* check whether user or kernel */\
+ andi. r11,r11,MSR_PR; \
+ lis r11,critical_stack_top@h; \
+ ori r11,r11,critical_stack_top@l; \
+ beq 1f; \
+ /* COMING FROM USER MODE */ \
+ mfspr r11,SPRG3; /* if from user, start at top of */\
+ lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
+ addi r11,r11,THREAD_SIZE; \
+1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\
+ tophys(r11,r11); \
+ stw r10,_CCR(r11); /* save various registers */\
+ stw r12,GPR12(r11); \
+ stw r9,GPR9(r11); \
+ mflr r10; \
+ stw r10,_LINK(r11); \
+ mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\
+ stw r12,_DEAR(r11); /* since they may have had stuff */\
+ mfspr r9,SPRN_ESR; /* in them at the point where the */\
+ stw r9,_ESR(r11); /* exception was taken */\
+ mfspr r12,CSRR0; \
+ stw r1,GPR1(r11); \
+ mfspr r9,CSRR1; \
+ stw r1,0(r11); \
+ tovirt(r1,r11); \
+ rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\
+ stw r0,GPR0(r11); \
+ SAVE_4GPRS(3, r11); \
+ SAVE_2GPRS(7, r11)
+
+/*
+ * Exception vectors.
+ */
+#define START_EXCEPTION(label) \
+ .align 5; \
+label:
+
+#define FINISH_EXCEPTION(func) \
+ bl transfer_to_handler_full; \
+ .long func; \
+ .long ret_from_except_full
+
+#define EXCEPTION(n, label, hdlr, xfer) \
+ START_EXCEPTION(label); \
+ NORMAL_EXCEPTION_PROLOG; \
+ addi r3,r1,STACK_FRAME_OVERHEAD; \
+ xfer(n, hdlr)
+
+#define CRITICAL_EXCEPTION(n, label, hdlr) \
+ START_EXCEPTION(label); \
+ CRITICAL_EXCEPTION_PROLOG; \
+ addi r3,r1,STACK_FRAME_OVERHEAD; \
+ EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
+ NOCOPY, transfer_to_handler_full, \
+ ret_from_except_full)
+
+#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \
+ li r10,trap; \
+ stw r10,TRAP(r11); \
+ lis r10,msr@h; \
+ ori r10,r10,msr@l; \
+ copyee(r10, r9); \
+ bl tfer; \
+ .long hdlr; \
+ .long ret
+
+#define COPY_EE(d, s) rlwimi d,s,0,16,16
+#define NOCOPY(d, s)
+
+#define EXC_XFER_STD(n, hdlr) \
+ EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
+ ret_from_except_full)
+
+#define EXC_XFER_LITE(n, hdlr) \
+ EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+ ret_from_except)
+
+#define EXC_XFER_EE(n, hdlr) \
+ EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \
+ ret_from_except_full)
+
+#define EXC_XFER_EE_LITE(n, hdlr) \
+ EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \
+ ret_from_except)
+
+interrupt_base:
+ /* Critical Input Interrupt */
+ CRITICAL_EXCEPTION(0x0100, CriticalInput, UnknownException)
+
+ /* Machine Check Interrupt */
+ CRITICAL_EXCEPTION(0x0200, MachineCheck, MachineCheckException)
+
+ /* Data Storage Interrupt */
+ START_EXCEPTION(DataStorage)
+ mtspr SPRG0, r10 /* Save some working registers */
+ mtspr SPRG1, r11
+ mtspr SPRG4W, r12
+ mtspr SPRG5W, r13
+ mtspr SPRG6W, r14
+ mfcr r11
+ mtspr SPRG7W, r11
+
+ /*
+ * Check if it was a store fault, if not then bail
+ * because a user tried to access a kernel or
+ * read-protected page. Otherwise, get the
+ * offending address and handle it.
+ */
+ mfspr r10, SPRN_ESR
+ andis. r10, r10, ESR_ST@h
+ beq 2f
+
+ mfspr r10, SPRN_DEAR /* Get faulting address */
+
+ /* If we are faulting a kernel address, we have to use the
+ * kernel page tables.
+ */
+ andis. r11, r10, 0x8000
+ beq 3f
+ lis r11, swapper_pg_dir@h
+ ori r11, r11, swapper_pg_dir@l
+
+ mfspr r12,SPRN_MMUCR /* Set TID to 0 */
+ li r13,PPC44x_MMUCR_TID@l
+ andc r12,r12,r13
+ mtspr SPRN_MMUCR,r12
+
+ b 4f
+
+ /* Get the PGD for the current thread */
+3:
+ mfspr r11,SPRG3
+ lwz r11,PGDIR(r11)
+
+ /* Load MMUCR with our PID and STS= */
+ mfspr r12,SPRN_MMUCR /* Get MMUCR */
+ lis r13,PPC44x_MMUCR_STS@h
+ ori r13,r13,PPC44x_MMUCR_TID@l /* Create mask */
+ andc r12,r12,r13 /* Clear out TID/STS bits */
+ mfspr r13,SPRN_PID /* Get PID */
+ or r12,r12,r13 /* Set TID bits */
+ mfspr r14,SPRN_SRR1 /* Get SRR1 */
+ andi. r14,r14,MSR_IS@l /* TS=1? */
+ beq 4f /* If not, leave STS=0 */
+ oris r12,r12,PPC44x_MMUCR_STS@h /* Set STS=1 */
+ mtspr SPRN_MMUCR,r12
+4:
+ rlwinm r12, r10, 13, 19, 29 /* Compute pgdir/pmd offset */
+ lwzx r11, r12, r11 /* Get pgd/pmd entry */
+ rlwinm. r12, r11, 0, 0, 20 /* Extract pt base address */
+ beq 2f /* Bail if no table */
+
+ rlwimi r12, r10, 23, 20, 28 /* Compute pte address */
+ lwz r11, 4(r12) /* Get pte entry */
+
+ andi. r13, r11, _PAGE_RW /* Is it writeable? */
+ beq 2f /* Bail if not */
+
+ /* Update 'changed'.
+ */
+ ori r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+ stw r11, 4(r12) /* Update Linux page table */
+
+ /* FIXME: Staticly setting some permissions */
+ li r13, 0x003f /* Set UX,UW,UR,SX,SW,SR */
+ andi. r11,r11,0xffff /* Clear MS 16 bits */
+ /* FIXME: Force attributes */
+ ori r11,r11, 0x0100 /* Set G */
+ /* FIXME: Already set in PTE */
+ rlwimi r11,r13,0,26,31 /* Insert static perms */
+
+ lis r13,0xffff
+ ori r13,r13,0x0fff /* Set U0-U3 mask */
+ and r11,r11,r13 /* Clear U0-U3 */
+
+ /* find the TLB index that caused the fault. It has to be here. */
+ tlbsx r14, 0, r10
+
+ tlbwe r11, r14, PPC44x_TLB_ATTRIB /* Write ATTRIB */
+
+ /* Done...restore registers and get out of here.
+ */
+ mfspr r11, SPRG7R
+ mtcr r11
+ mfspr r14, SPRG6R
+ mfspr r13, SPRG5R
+ mfspr r12, SPRG4R
+
+ mfspr r11, SPRG1
+ mfspr r10, SPRG0
+ rfi /* Force context change */
+
+2:
+ /*
+ * The bailout. Restore registers to pre-exception conditions
+ * and call the heavyweights to help us out.
+ */
+ mfspr r11, SPRG7R
+ mtcr r11
+ mfspr r14, SPRG6R
+ mfspr r13, SPRG5R
+ mfspr r12, SPRG4R
+
+ mfspr r11, SPRG1
+ mfspr r10, SPRG0
+ b data_access
+
+ /* Instruction Storage Interrupt */
+ START_EXCEPTION(InstructionStorage)
+ NORMAL_EXCEPTION_PROLOG
+ mr r4,r12 /* Pass SRR0 as arg2 */
+ li r5,0 /* Pass zero as arg3 */
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ EXC_XFER_EE_LITE(0x0400, do_page_fault)
+
+ /* External Input Interrupt */
+ EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+
+ /* Alignment Interrupt */
+ START_EXCEPTION(Alignment)
+ NORMAL_EXCEPTION_PROLOG
+ mfspr r4,SPRN_DEAR /* Grab the DEAR and save it */
+ stw r4,_DEAR(r11)
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ EXC_XFER_EE(0x0600, AlignmentException)
+
+ /* Program Interrupt */
+ START_EXCEPTION(Program)
+ NORMAL_EXCEPTION_PROLOG
+ mfspr r4,SPRN_ESR /* Grab the ESR and save it */
+ stw r4,_ESR(r11)
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ EXC_XFER_EE(0x700, ProgramCheckException)
+
+ /* Floating Point Unavailable Interrupt */
+ EXCEPTION(0x2010, FloatingPointUnavailable, UnknownException, EXC_XFER_EE)
+
+ /* System Call Interrupt */
+ START_EXCEPTION(SystemCall)
+ NORMAL_EXCEPTION_PROLOG
+ EXC_XFER_EE_LITE(0x0c00, DoSyscall)
+
+ /* Auxillary Processor Unavailable Interrupt */
+ EXCEPTION(0x2020, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE)
+
+ /* Decrementer Interrupt */
+ START_EXCEPTION(Decrementer)
+ NORMAL_EXCEPTION_PROLOG
+ lis r0,TSR_DIS@h /* Setup the DEC interrupt mask */
+ mtspr SPRN_TSR,r0 /* Clear the DEC interrupt */
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ EXC_XFER_LITE(0x1000, timer_interrupt)
+
+ /* Fixed Internal Timer Interrupt */
+ /* TODO: Add FIT support */
+ EXCEPTION(0x1010, FixedIntervalTimer, UnknownException, EXC_XFER_EE)
+
+ /* Watchdog Timer Interrupt */
+ /* TODO: Add watchdog support */
+ CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException)
+
+ /* Data TLB Error Interrupt */
+ START_EXCEPTION(DataTLBError)
+ mtspr SPRG0, r10 /* Save some working registers */
+ mtspr SPRG1, r11
+ mtspr SPRG4W, r12
+ mtspr SPRG5W, r13
+ mtspr SPRG6W, r14
+ mfcr r11
+ mtspr SPRG7W, r11
+ mfspr r10, SPRN_DEAR /* Get faulting address */
+
+ /* If we are faulting a kernel address, we have to use the
+ * kernel page tables.
+ */
+ andis. r11, r10, 0x8000
+ beq 3f
+ lis r11, swapper_pg_dir@h
+ ori r11, r11, swapper_pg_dir@l
+
+ mfspr r12,SPRN_MMUCR /* Set TID to 0 */
+ li r13,PPC44x_MMUCR_TID@l
+ andc r12,r12,r13
+ mtspr SPRN_MMUCR,r12
+
+ b 4f
+
+ /* Get the PGD for the current thread */
+3:
+ mfspr r11,SPRG3
+ lwz r11,PGDIR(r11)
+
+ /* Load PID into MMUCR TID */
+ li r13,PPC44x_MMUCR_TID@l /* Create mask */
+ andc r12,r12,r13 /* Clear out TID/STS bits */
+ mfspr r13,SPRN_PID /* Get PID */
+ or r12,r12,r13
+ mtspr SPRN_MMUCR,r12
+4:
+ rlwinm r12, r10, 13, 19, 29 /* Compute pgdir/pmd offset */
+ lwzx r11, r12, r11 /* Get pgd/pmd entry */
+ rlwinm. r12, r11, 0, 0, 20 /* Extract pt base address */
+ beq 2f /* Bail if no table */
+
+ rlwimi r12, r10, 23, 20, 28 /* Compute pte address */
+ lwz r11, 4(r12) /* Get pte entry */
+ andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
+ beq 2f /* Bail if not present */
+
+ ori r11, r11, _PAGE_ACCESSED
+ stw r11, 4(r12)
+
+ /* Jump to common tlb load */
+ b finish_tlb_load
+
+2:
+ /* The bailout. Restore registers to pre-exception conditions
+ * and call the heavyweights to help us out.
+ */
+ mfspr r11, SPRG7R
+ mtcr r11
+ mfspr r14, SPRG6R
+ mfspr r13, SPRG5R
+ mfspr r12, SPRG4R
+ mfspr r11, SPRG1
+ mfspr r10, SPRG0
+ b data_access
+
+ /* Instruction TLB Error Interrupt */
+ /*
+ * Nearly the same as above, except we get our
+ * information from different registers and bailout
+ * to a different point.
+ */
+ START_EXCEPTION(InstructionTLBError)
+ mtspr SPRG0, r10 /* Save some working registers */
+ mtspr SPRG1, r11
+ mtspr SPRG4W, r12
+ mtspr SPRG5W, r13
+ mtspr SPRG6W, r14
+ mfcr r11
+ mtspr SPRG7W, r11
+ mfspr r10, SRR0 /* Get faulting address */
+
+ /* If we are faulting a kernel address, we have to use the
+ * kernel page tables.
+ */
+ andis. r11, r10, 0x8000
+ beq 3f
+ lis r11, swapper_pg_dir@h
+ ori r11, r11, swapper_pg_dir@l
+
+ mfspr r12,SPRN_MMUCR /* Set TID to 0 */
+ li r13,PPC44x_MMUCR_TID@l
+ andc r12,r12,r13
+ mtspr SPRN_MMUCR,r12
+
+ b 4f
+
+ /* Get the PGD for the current thread */
+3:
+ mfspr r11,SPRG3
+ lwz r11,PGDIR(r11)
+
+ /* Load PID into MMUCR TID */
+ li r13,PPC44x_MMUCR_TID@l /* Create mask */
+ andc r12,r13,r13 /* Clear out TID/STS bits */
+ mfspr r13,SPRN_PID /* Get PID */
+ or r12,r12,r13
+ mtspr SPRN_MMUCR,r12
+
+4:
+ rlwinm r12, r10, 13, 19, 29 /* Compute pgdir/pmd offset */
+ lwzx r11, r12, r11 /* Get pgd/pmd entry */
+ rlwinm. r12, r11, 0, 0, 20 /* Extract pt base address */
+ beq 2f /* Bail if no table */
+
+ rlwimi r12, r10, 23, 20, 28 /* Compute pte address */
+ lwz r11, 4(r12) /* Get pte entry */
+ andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
+ beq 2f /* Bail if not present */
+
+ ori r11, r11, _PAGE_ACCESSED
+ stw r11, 4(r12)
+
+ /* Jump to common TLB load point */
+ b finish_tlb_load
+
+2:
+ /* The bailout. Restore registers to pre-exception conditions
+ * and call the heavyweights to help us out.
+ */
+ mfspr r11, SPRG7R
+ mtcr r11
+ mfspr r14, SPRG6R
+ mfspr r13, SPRG5R
+ mfspr r12, SPRG4R
+ mfspr r11, SPRG1
+ mfspr r10, SPRG0
+ b InstructionStorage
+
+/* Check for a single step debug exception while in an exception
+ * handler before state has been saved. This is to catch the case
+ * where an instruction that we are trying to single step causes
+ * an exception (eg ITLB/DTLB miss) and thus the first instruction of
+ * the exception handler generates a single step debug exception.
+ *
+ * If we get a debug trap on the first instruction of an exception handler,
+ * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is
+ * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR).
+ * The exception handler was handling a non-critical interrupt, so it will
+ * save (and later restore) the MSR via SPRN_SRR1, which will still have
+ * the MSR_DE bit set.
+ */
+ /* Debug Interrupt */
+ CRITICAL_EXCEPTION(0x2000, Debug, DebugException)
+#if 0
+ START_EXCEPTION(Debug)
+ /* This first instruction was already executed by the exception
+ * handler and must be the first instruction of every exception
+ * handler.
+ */
+ mtspr SPRN_SPRG0,r10 /* Save some working registers... */
+ mtspr SPRN_SPRG1,r11
+ mtspr SPRN_SPRG4W,r12
+ mfcr r10 /* ..and the cr because we change it */
+
+ mfspr r11,SPRN_CSRR1 /* MSR at the time of fault */
+ andi. r11,r11,MSR_PR
+ bne+ 2f /* trapped from problem state */
+
+ mfspr r11,SPRN_CSRR0 /* Faulting instruction address */
+ lis r12, KERNELBASE@h
+ ori r12, r12, KERNELBASE@l
+ cmplw r11,r12
+ blt+ 2f /* addr below exception vectors */
+
+ lis r12, Debug@h
+ ori r12, r12, Debug@l
+ cmplw r11,r12
+ bgt+ 2f /* addr above TLB exception vectors */
+
+ lis r11,DBSR_IC@h /* Remove the trap status */
+ mtspr SPRN_DBSR,r11
+
+ mfspr r11,SPRN_CSRR1
+ rlwinm r11,r11,0,23,21 /* clear MSR_DE */
+ mtspr SPRN_CSRR1, r11 /* restore MSR at rcfi without DE */
+
+ mtcrf 0xff,r10 /* restore registers */
+ mfspr r12,SPRN_SPRG4R
+ mfspr r11,SPRN_SPRG1
+ mfspr r10,SPRN_SPRG0
+
+ sync
+ rfci /* return to the exception handler */
+ b . /* prevent prefetch past rfci */
+
+2:
+ mtcrf 0xff,r10 /* restore registers */
+ mfspr r12,SPRN_SPRG4R
+ mfspr r11,SPRN_SPRG1
+ mfspr r10,SPRN_SPRG0
+
+ CRIT_EXCEPTION_PROLOG
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ li r7,CRIT_EXC;
+ li r9,MSR_KERNEL
+ FINISH_EXCEPTION(DebugException)
+#endif
+
+/*
+ * Local functions
+ */
+ /*
+ * Data TLB exceptions will bail out to this point
+ * if they can't resolve the lightweight TLB fault.
+ */
+data_access:
+ NORMAL_EXCEPTION_PROLOG
+ mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */
+ stw r5,_ESR(r11)
+ mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */
+ stw r4,_DEAR(r11)
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ EXC_XFER_EE_LITE(0x0300, do_page_fault)
+
+/*
+
+ * Both the instruction and data TLB miss get to this
+ * point to load the TLB.
+ * r10 - EA of fault
+ * r11 - available to use
+ * r12 - Pointer to the 64-bit PTE
+ * r13 - available to use
+ * r14 - available to use
+ * MMUCR - loaded with proper value when we get here
+ * Upon exit, we reload everything and RFI.
+ */
+finish_tlb_load:
+ /*
+ * We set execute, because we don't have the granularity to
+ * properly set this at the page level (Linux problem).
+ * If shared is set, we cause a zero PID->TID load.
+ * Many of these bits are software only. Bits we don't set
+ * here we (properly should) assume have the appropriate value.
+ */
+
+ /* Load the next available TLB index */
+ lis r13, tlb_44x_index@h
+ ori r13, r13, tlb_44x_index@l
+ lwz r14, 0(r13)
+ /* Load the TLB high watermark */
+ lis r13, tlb_44x_hwater@h
+ ori r13, r13, tlb_44x_hwater@l
+ lwz r11, 0(r13)
+
+
+ /* Increment, rollover, and store TLB index */
+ addi r14, r14, 1
+ cmpw 0, r14, r11 /* reserve entries 62-63 for kernel */
+ ble 7f
+ li r14, 0
+7:
+ /* Load the next available TLB index */
+ lis r13, tlb_44x_index@h
+ ori r13, r13, tlb_44x_index@l
+ stw r14, 0(r13)
+
+6:
+ lwz r13, 0(r12) /* Get MS word of PTE */
+ lwz r11, 4(r12) /* Get LS word of PTE */
+ rlwimi r13, r11, 0, 0 , 19 /* Insert RPN */
+ tlbwe r13, r14, PPC44x_TLB_XLAT /* Write XLAT */
+
+ /*
+ * Create PAGEID. This is the faulting address plus
+ * a set of static bits. The static bits are page
+ * size and valid. Bits 20 and 21 should be zero
+ * for a page size of 4KB.
+ */
+ li r12, 0x0210 /* Set size and valid */
+ mfspr r13, SPRN_SRR1 /* Get SRR1 */
+ andi. r13, r13, MSR_IS@l
+ beq 7f
+ ori r12, r12, PPC44x_TLB_TS@l /* Set TS=1 */
+7: rlwimi r10, r12, 0, 20, 31 /* Insert statics */
+ tlbwe r10, r14, PPC44x_TLB_PAGEID /* Write PAGEID */
+
+ /* FIXME: Staticly setting some permissions */
+ li r13, 0x002d /* Set UX,UR,SX,SR */
+ andi. r11, r11, 0xffff /* Clear MS 16 bits */
+ andi. r12, r11, 0x0002 /* _PAGE_HWWRITE? */
+ beq 8f
+ ori r13, r13, 0x0002 /* Set SW */
+ /* FIXME: Force attributes */
+8: ori r11, r11, 0x0100 /* Set G */
+ /* FIXME: Already set in PTE */
+ rlwimi r11, r13, 0, 26, 31 /* Insert static perms */
+
+ lis r13,0xffff
+ ori r13,r13,0x0fff /* Set U0-U3 mask */
+ and r11,r11,r13 /* Clear U0-U3 */
+ tlbwe r11, r14, PPC44x_TLB_ATTRIB /* Write ATTRIB */
+
+ /* Done...restore registers and get out of here.
+ */
+ mfspr r11, SPRG7R
+ mtcr r11
+ mfspr r14, SPRG6R
+ mfspr r13, SPRG5R
+ mfspr r12, SPRG4R
+ mfspr r11, SPRG1
+ mfspr r10, SPRG0
+ rfi /* Force context change */
+
+/*
+ * Global functions
+ */
+
+/*
+ * extern void giveup_altivec(struct task_struct *prev)
+ *
+ * The 44x core does not have an AltiVec unit.
+ */
+_GLOBAL(giveup_altivec)
+ blr
+
+/*
+ * extern void giveup_fpu(struct task_struct *prev)
+ *
+ * The 44x core does not have an FPU.
+ */
+_GLOBAL(giveup_fpu)
+ blr
+
+/*
+ * extern void abort(void)
+ *
+ * At present, this routine just applies a system reset.
+ */
+_GLOBAL(abort)
+ mfspr r13,SPRN_DBCR0
+ oris r13,r13,DBCR_RST(DBCR_RST_SYSTEM)@h
+ mtspr SPRN_DBCR0,r13
+
+_GLOBAL(set_context)
+
+#ifdef CONFIG_BDI_SWITCH
+ /* Context switch the PTE pointer for the Abatron BDI2000.
+ * The PGDIR is the second parameter.
+ */
+ lis r5, abatron_pteptrs@h
+ ori r5, r5, abatron_pteptrs@l
+ stw r4, 0x4(r5)
+#endif
+ mtspr SPRN_PID,r3
+ isync /* Force context change */
+ blr
+
+/*
+ * We put a few things here that have to be page-aligned. This stuff
+ * goes at the beginning of the data segment, which is page-aligned.
+ */
+ .data
+_GLOBAL(sdata)
+_GLOBAL(empty_zero_page)
+ .space 4096
+
+/*
+ * To support >32-bit physical addresses, we use an 8KB pgdir.
+ */
+_GLOBAL(swapper_pg_dir)
+ .space 8192
+
+/* Stack for handling critical exceptions from kernel mode */
+ .section .bss
+critical_stack_bottom:
+ .space 4096
+critical_stack_top:
+ .previous
+
+/*
+ * This space gets a copy of optional info passed to us by the bootstrap
+ * which is used to pass parameters into the kernel like root=/dev/sda1, etc.
+ */
+_GLOBAL(cmd_line)
+ .space 512
+
+/*
+ * Room for two PTE pointers, usually the kernel and current user pointers
+ * to their respective root page table.
+ */
+abatron_pteptrs:
+ .space 8
+
+/*
+ * This area is used for temporarily saving registers during the
+ * critical exception prolog.
+ */
+crit_save:
+_GLOBAL(crit_r10)
+ .space 4
+_GLOBAL(crit_r11)
+ .space 4
+_GLOBAL(crit_sprg0)
+ .space 4
+_GLOBAL(crit_sprg1)
+ .space 4
+_GLOBAL(crit_sprg4)
+ .space 4
+_GLOBAL(crit_sprg5)
+ .space 4
+_GLOBAL(crit_sprg6)
+ .space 4
+_GLOBAL(crit_sprg7)
+ .space 4
+_GLOBAL(crit_pid)
+ .space 4
+_GLOBAL(crit_srr0)
+ .space 4
+_GLOBAL(crit_srr1)
+ .space 4
diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
--- a/arch/ppc/kernel/misc.S Tue Jul 15 04:47:19 2003
+++ b/arch/ppc/kernel/misc.S Wed Sep 3 05:16:34 2003
@@ -405,16 +405,20 @@
sync /* Flush to memory before changing mapping */
tlbia
isync /* Flush shadow TLB */
-#elif defined(CONFIG_440)
+#elif defined(CONFIG_44x)
lis r3,0
sync
1:
- tlbwe r3,r3,PPC440_TLB_PAGEID
+ tlbwe r3,r3,PPC44x_TLB_PAGEID
addi r3,r3,1
- cmpwi 0,r3,61
+ /* Load high watermark */
+ lis r4,tlb_44x_hwater@h
+ ori r4,r4,tlb_44x_hwater@l
+ lwz r5,0(r4)
+ cmpw 0,r3,r5
ble 1b
isync
-#else /* !(CONFIG_40x || CONFIG_440) */
+#else /* !(CONFIG_40x || CONFIG_44x) */
#if defined(CONFIG_SMP)
rlwinm r8,r1,0,0,18
lwz r8,TI_CPU(r8)
@@ -465,17 +469,17 @@
tlbwe r3, r3, TLB_TAG
isync
10:
-#elif defined(CONFIG_440)
+#elif defined(CONFIG_44x)
mfspr r4,SPRN_MMUCR /* Get MMUCR */
- lis r5,PPC440_MMUCR_STS@h
- ori r5,r5,PPC440_MMUCR_TID@l /* Create mask */
+ lis r5,PPC44x_MMUCR_STS@h
+ ori r5,r5,PPC44x_MMUCR_TID@l /* Create mask */
andc r4,r4,r5 /* Clear out TID/STS bits */
mfspr r5,SPRN_PID /* Get PID */
or r4,r4,r5 /* Set TID bits */
mfmsr r6 /* Get MSR */
andi. r6,r6,MSR_IS@l /* TS=1? */
beq 11f /* If not, leave STS=0 */
- oris r4,r4,PPC440_MMUCR_STS@h /* Set STS=1 */
+ oris r4,r4,PPC44x_MMUCR_STS@h /* Set STS=1 */
11: mtspr SPRN_MMUCR, r4 /* Put MMUCR */
tlbsx. r3, 0, r3
@@ -486,10 +490,10 @@
* the V bit in the TLB_PAGEID, loading this
* value will invalidate the TLB entry.
*/
- tlbwe r3, r3, PPC440_TLB_PAGEID
+ tlbwe r3, r3, PPC44x_TLB_PAGEID
isync
10:
-#else /* !(CONFIG_40x || CONFIG_440) */
+#else /* !(CONFIG_40x || CONFIG_44x) */
#if defined(CONFIG_SMP)
rlwinm r8,r1,0,0,18
lwz r8,TI_CPU(r8)
@@ -658,9 +662,9 @@
#ifdef CONFIG_NOT_COHERENT_CACHE
/*
* 40x cores have 8K or 16K dcache and 32 byte line size.
- * 440 has a 32K dcache and 32 byte line size.
+ * 44x has a 32K dcache and 32 byte line size.
* 8xx has 1, 2, 4, 8K variants.
- * For now, cover the worst case of the 440.
+ * For now, cover the worst case of the 44x.
* Must be called with external interrupts disabled.
*/
#define CACHE_NWAYS 64
@@ -1380,3 +1384,4 @@
.long sys_utimes
.long sys_statfs64
.long sys_fstatfs64
+ .long ppc_fadvise64_64
diff -Nru a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c
--- a/arch/ppc/kernel/ppc-stub.c Mon Jun 30 10:10:33 2003
+++ b/arch/ppc/kernel/ppc-stub.c Mon Aug 25 11:39:55 2003
@@ -106,6 +106,7 @@
#include
#include
+#include
#include
#include
#include
@@ -136,7 +137,7 @@
/* typedef void (*trapfunc_t)(void); */
static void kgdb_fault_handler(struct pt_regs *regs);
-static void handle_exception (struct pt_regs *regs);
+static int handle_exception (struct pt_regs *regs);
#if 0
/* Install an exception handler for kgdb */
@@ -186,7 +187,7 @@
* return 0.
*/
static unsigned char *
-mem2hex(char *mem, char *buf, int count)
+mem2hex(const char *mem, char *buf, int count)
{
unsigned char ch;
unsigned short tmp_s;
@@ -460,14 +461,12 @@
int kgdb_bpt(struct pt_regs *regs)
{
- handle_exception(regs);
- return 1;
+ return handle_exception(regs);
}
int kgdb_sstep(struct pt_regs *regs)
{
- handle_exception(regs);
- return 1;
+ return handle_exception(regs);
}
void kgdb(struct pt_regs *regs)
@@ -477,16 +476,14 @@
int kgdb_iabr_match(struct pt_regs *regs)
{
- printk("kgdb doesn't support iabr, what?!?\n");
- handle_exception(regs);
- return 1;
+ printk(KERN_ERR "kgdb doesn't support iabr, what?!?\n");
+ return handle_exception(regs);
}
int kgdb_dabr_match(struct pt_regs *regs)
{
- printk("kgdb doesn't support dabr, what?!?\n");
- handle_exception(regs);
- return 1;
+ printk(KERN_ERR "kgdb doesn't support dabr, what?!?\n");
+ return handle_exception(regs);
}
/* Convert the hardware trap type code to a unix signal number. */
@@ -559,7 +556,7 @@
/*
* This function does all command processing for interfacing to gdb.
*/
-static void
+static int
handle_exception (struct pt_regs *regs)
{
int sigval;
@@ -568,14 +565,19 @@
char *ptr;
unsigned int msr;
+ /* We don't handle user-mode breakpoints. */
+ if (user_mode(regs))
+ return 0;
+
if (debugger_fault_handler) {
debugger_fault_handler(regs);
panic("kgdb longjump failed!\n");
}
if (kgdb_active) {
- printk("interrupt while in kgdb, returning\n");
- return;
+ printk(KERN_ERR "interrupt while in kgdb, returning\n");
+ return 0;
}
+
kgdb_active = 1;
kgdb_started = 1;
@@ -783,7 +785,7 @@
printk("remcomInBuffer: %s\n", remcomInBuffer);
printk("remcomOutBuffer: %s\n", remcomOutBuffer);
}
- return;
+ return 1;
case 's':
kgdb_flush_cache_all();
@@ -800,7 +802,7 @@
printk("remcomInBuffer: %s\n", remcomInBuffer);
printk("remcomOutBuffer: %s\n", remcomOutBuffer);
}
- return;
+ return 1;
case 'r': /* Reset (if user process..exit ???)*/
panic("kgdb reset.");
@@ -828,11 +830,11 @@
return;
}
- asm(" .globl breakinst
- breakinst: .long 0x7d821008
- ");
+ asm(" .globl breakinst \n\
+ breakinst: .long 0x7d821008");
}
+#ifdef CONFIG_KGDB_CONSOLE
/* Output string in GDB O-packet format if GDB has connected. If nothing
output, returns 0 (caller must then handle output). */
int
@@ -852,3 +854,4 @@
return 1;
}
+#endif
diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
--- a/arch/ppc/kernel/ppc_ksyms.c Tue Jul 1 10:57:22 2003
+++ b/arch/ppc/kernel/ppc_ksyms.c Wed Sep 3 05:16:34 2003
@@ -155,6 +155,9 @@
EXPORT_SYMBOL(iopa);
EXPORT_SYMBOL(mm_ptov);
EXPORT_SYMBOL(ioremap);
+#ifdef CONFIG_44x
+EXPORT_SYMBOL(ioremap64);
+#endif
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
@@ -200,6 +203,7 @@
EXPORT_SYMBOL(flush_icache_user_range);
EXPORT_SYMBOL(flush_dcache_page);
EXPORT_SYMBOL(flush_tlb_kernel_range);
+EXPORT_SYMBOL(flush_tlb_page);
#ifdef CONFIG_ALTIVEC
EXPORT_SYMBOL(last_task_used_altivec);
EXPORT_SYMBOL(giveup_altivec);
@@ -259,6 +263,15 @@
EXPORT_SYMBOL(pci_busdev_to_OF_node);
EXPORT_SYMBOL(pci_device_to_OF_node);
EXPORT_SYMBOL(pci_device_from_OF_node);
+EXPORT_SYMBOL(of_find_node_by_name);
+EXPORT_SYMBOL(of_find_node_by_type);
+EXPORT_SYMBOL(of_find_compatible_node);
+EXPORT_SYMBOL(of_find_node_by_path);
+EXPORT_SYMBOL(of_find_all_nodes);
+EXPORT_SYMBOL(of_get_parent);
+EXPORT_SYMBOL(of_get_next_child);
+EXPORT_SYMBOL(of_node_get);
+EXPORT_SYMBOL(of_node_put);
#endif /* CONFIG_PPC_OF */
#if defined(CONFIG_BOOTX_TEXT)
EXPORT_SYMBOL(btext_update_display);
@@ -343,7 +356,7 @@
EXPORT_SYMBOL(cpm_install_handler);
EXPORT_SYMBOL(cpm_free_handler);
#endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx) || defined(CONFIG_40x)
+#if defined(CONFIG_8xx) || defined(CONFIG_4xx)
EXPORT_SYMBOL(__res);
#endif
#if defined(CONFIG_8xx)
diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c Mon Aug 18 19:46:23 2003
+++ b/arch/ppc/kernel/setup.c Mon Aug 25 11:11:43 2003
@@ -624,12 +624,10 @@
#if defined(CONFIG_KGDB)
kgdb_map_scc();
set_debug_traps();
- if (strstr(cmd_line, "nokgdb"))
- printk("kgdb default breakpoint deactivated on command line\n");
- else {
+ if (strstr(cmd_line, "gdb")) {
if (ppc_md.progress)
ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000);
- printk("kgdb default breakpoint activated\n");
+ printk("kgdb breakpoint activated\n");
breakpoint();
}
#endif
diff -Nru a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
--- a/arch/ppc/kernel/smp.c Mon Aug 18 19:46:23 2003
+++ b/arch/ppc/kernel/smp.c Fri Aug 22 19:58:08 2003
@@ -47,8 +47,8 @@
DEFINE_PER_CPU(unsigned int, prof_multiplier);
DEFINE_PER_CPU(unsigned int, prof_counter);
unsigned long cache_decay_ticks = HZ/100;
-unsigned long cpu_online_map = cpumask_of_cpu(0);
-unsigned long cpu_possible_map = 1UL;
+cpumask_t cpu_online_map;
+cpumask_t cpu_possible_map;
int smp_hw_index[NR_CPUS];
struct thread_info *secondary_ti;
@@ -336,7 +336,7 @@
void __init smp_prepare_cpus(unsigned int max_cpus)
{
- int num_cpus;
+ int num_cpus, i;
/* Fixup boot cpu */
smp_store_cpu_info(smp_processor_id());
@@ -350,7 +350,8 @@
/* Probe platform for CPUs: always linear. */
num_cpus = smp_ops->probe();
- cpu_possible_map = (1 << num_cpus)-1;
+ for (i = 0; i < num_cpus; ++i)
+ cpu_set(i, cpu_possible_map);
/* Backup CPU 0 state */
__save_cpu_setup();
diff -Nru a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c
--- a/arch/ppc/kernel/syscalls.c Tue Jul 15 04:49:49 2003
+++ b/arch/ppc/kernel/syscalls.c Fri Aug 22 19:15:18 2003
@@ -262,4 +262,14 @@
return error;
}
+/*
+ * We put the arguments in a different order so we only use 6
+ * registers for arguments, rather than 7 as sys_fadvise64_64 needs
+ * (because `offset' goes in r5/r6).
+ */
+long ppc_fadvise64_64(int fd, int advice, loff_t offset, loff_t len)
+{
+ return sys_fadvise64_64(fd, offset, len, advice);
+}
+
cond_syscall(sys_pciconfig_iobase);
diff -Nru a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/mm/44x_mmu.c Wed Sep 3 02:10:22 2003
@@ -0,0 +1,162 @@
+/*
+ * Modifications by Matt Porter (mporter@mvista.com) to support
+ * PPC44x Book E processors.
+ *
+ * This file contains the routines for initializing the MMU
+ * on the 4xx series of chips.
+ * -- paulus
+ *
+ * Derived from arch/ppc/mm/init.c:
+ * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
+ *
+ * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
+ * and Cort Dougan (PReP) (cort@cs.nmt.edu)
+ * Copyright (C) 1996 Paul Mackerras
+ * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
+ *
+ * Derived from "arch/i386/mm/init.c"
+ * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "mmu_decl.h"
+#include "mem_pieces.h"
+
+extern char etext[], _stext[];
+extern struct mem_pieces phys_avail;
+
+/* Used by the 44x TLB replacement exception handler.
+ * Just needed it declared someplace.
+ */
+unsigned int tlb_44x_index = 0;
+unsigned int tlb_44x_hwater = 61;
+
+/*
+ * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
+ */
+static void __init
+ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
+{
+ unsigned long attrib;
+
+ __asm__ __volatile__("\
+ clrrwi %2,%2,10\n\
+ ori %2,%2,%4\n\
+ clrrwi %1,%1,10\n\
+ li %0,0\n\
+ ori %0,%0,%5\n\
+ tlbwe %2,%3,%6\n\
+ tlbwe %1,%3,%7\n\
+ tlbwe %0,%3,%8"
+ :
+ : "r" (attrib), "r" (phys), "r" (virt), "r" (slot),
+ "i" (PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M)),
+ "i" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
+ "i" (PPC44x_TLB_PAGEID),
+ "i" (PPC44x_TLB_XLAT),
+ "i" (PPC44x_TLB_ATTRIB));
+}
+
+/*
+ * Configure PPC44x TLB for AS0 exception processing.
+ */
+static void __init
+ppc44x_tlb_config(void)
+{
+ unsigned int pinned_tlbs = 1;
+ int i;
+
+ /*
+ * If lowmem is not on a pin tlb entry size boundary,
+ * then reserve the last page of system memory. This
+ * eliminates the possibility of a speculative dcache
+ * fetch past the end of system memory that would
+ * result in a machine check exception.
+ */
+ if (total_lowmem | (PPC44x_PIN_SIZE - 1))
+ mem_pieces_remove(&phys_avail, total_lowmem - PAGE_SIZE, PAGE_SIZE, 1);
+
+ /* Determine number of entries necessary to cover lowmem */
+ pinned_tlbs = (unsigned int)
+ (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT);
+
+ /* Write upper watermark to save location */
+ tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
+
+ /* If necessary, set additional pinned TLBs */
+ if (pinned_tlbs > 1)
+ for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) {
+ unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE;
+ ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr);
+ }
+}
+
+/*
+ * MMU_init_hw does the chip-specific initialization of the MMU hardware.
+ */
+void __init MMU_init_hw(void)
+{
+ flush_instruction_cache();
+
+ ppc44x_tlb_config();
+}
+
+/* TODO: Add large page lowmem mapping support */
+unsigned long __init mmu_mapin_ram(void)
+{
+ unsigned long v, s, f = _PAGE_GUARDED;
+ phys_addr_t p;
+
+ v = KERNELBASE;
+ p = PPC_MEMSTART;
+
+ for (s = 0; s < total_lowmem; s += PAGE_SIZE) {
+ if ((char *) v >= _stext && (char *) v < etext)
+ f |= _PAGE_RAM_TEXT;
+ else
+ f |= _PAGE_RAM;
+ map_page(v, p, f);
+ v += PAGE_SIZE;
+ p += PAGE_SIZE;
+ }
+
+ if (ppc_md.progress)
+ ppc_md.progress("MMU:mmu_mapin_ram done", 0x401);
+
+ return s;
+}
diff -Nru a/arch/ppc/mm/Makefile b/arch/ppc/mm/Makefile
--- a/arch/ppc/mm/Makefile Sat Jan 4 00:44:11 2003
+++ b/arch/ppc/mm/Makefile Wed Sep 3 05:16:34 2003
@@ -11,4 +11,5 @@
obj-$(CONFIG_PPC_STD_MMU) += hashtable.o ppc_mmu.o tlb.o
obj-$(CONFIG_40x) += 4xx_mmu.o
+obj-$(CONFIG_44x) += 44x_mmu.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += cachemap.o
diff -Nru a/arch/ppc/mm/cachemap.c b/arch/ppc/mm/cachemap.c
--- a/arch/ppc/mm/cachemap.c Tue May 20 22:22:44 2003
+++ b/arch/ppc/mm/cachemap.c Wed Sep 3 05:16:34 2003
@@ -48,7 +48,7 @@
#include
#include
-int map_page(unsigned long va, unsigned long pa, int flags);
+int map_page(unsigned long va, phys_addr_t pa, int flags);
/* This function will allocate the requested contiguous pages and
* map them into the kernel's vmalloc() space. This is done so we
@@ -61,7 +61,8 @@
{
int order, err;
struct page *page, *free, *end;
- unsigned long pa, flags, offset;
+ phys_addr_t pa;
+ unsigned long flags, offset;
struct vm_struct *area = NULL;
unsigned long va = 0;
diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
--- a/arch/ppc/mm/init.c Wed Jun 4 20:48:59 2003
+++ b/arch/ppc/mm/init.c Wed Sep 3 05:16:34 2003
@@ -6,6 +6,7 @@
* and Cort Dougan (PReP) (cort@cs.nmt.edu)
* Copyright (C) 1996 Paul Mackerras
* Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
+ * PPC44x/36-bit changes by Matt Porter (mporter@mvista.com)
*
* Derived from "arch/i386/mm/init.c"
* Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
diff -Nru a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h
--- a/arch/ppc/mm/mmu_decl.h Sat Jan 4 03:05:41 2003
+++ b/arch/ppc/mm/mmu_decl.h Wed Sep 3 05:16:34 2003
@@ -20,9 +20,10 @@
*
*/
#include
+#include
extern void mapin_ram(void);
-extern int map_page(unsigned long va, unsigned long pa, int flags);
+extern int map_page(unsigned long va, phys_addr_t pa, int flags);
extern void setbat(int index, unsigned long virt, unsigned long phys,
unsigned int size, int flags);
extern void reserve_phys_mem(unsigned long start, unsigned long size);
diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c Thu Jun 5 18:11:52 2003
+++ b/arch/ppc/mm/pgtable.c Wed Sep 3 05:16:34 2003
@@ -55,11 +55,18 @@
#define p_mapped_by_bats(x) (0UL)
#endif /* HAVE_BATS */
+#ifdef CONFIG_44x
+/* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
+#define PGDIR_ORDER 1
+#else
+#define PGDIR_ORDER 0
+#endif
+
pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *ret;
- if ((ret = (pgd_t *)__get_free_page(GFP_KERNEL)) != NULL)
+ if ((ret = (pgd_t *)__get_free_pages(GFP_KERNEL, PGDIR_ORDER)) != NULL)
clear_page(ret);
return ret;
}
@@ -110,16 +117,33 @@
__free_page(pte);
}
+#ifndef CONFIG_44x
+void *
+ioremap(phys_addr_t addr, unsigned long size)
+{
+ return __ioremap(addr, size, _PAGE_NO_CACHE);
+}
+#else /* CONFIG_44x */
void *
-ioremap(unsigned long addr, unsigned long size)
+ioremap64(unsigned long long addr, unsigned long size)
{
return __ioremap(addr, size, _PAGE_NO_CACHE);
}
void *
-__ioremap(unsigned long addr, unsigned long size, unsigned long flags)
+ioremap(phys_addr_t addr, unsigned long size)
+{
+ phys_addr_t addr64 = fixup_bigphys_addr(addr, size);;
+
+ return ioremap64(addr64, size);
+}
+#endif /* CONFIG_44x */
+
+void *
+__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
{
- unsigned long p, v, i;
+ unsigned long v, i;
+ phys_addr_t p;
int err;
/*
@@ -144,7 +168,7 @@
*/
if ( mem_init_done && (p < virt_to_phys(high_memory)) )
{
- printk("__ioremap(): phys addr %0lx is RAM lr %p\n", p,
+ printk("__ioremap(): phys addr "PTE_FMT" is RAM lr %p\n", p,
__builtin_return_address(0));
return NULL;
}
@@ -195,7 +219,7 @@
}
out:
- return (void *) (v + (addr & ~PAGE_MASK));
+ return (void *) (v + ((unsigned long)addr & ~PAGE_MASK));
}
void iounmap(void *addr)
@@ -211,7 +235,7 @@
}
int
-map_page(unsigned long va, unsigned long pa, int flags)
+map_page(unsigned long va, phys_addr_t pa, int flags)
{
pmd_t *pd;
pte_t *pg;
@@ -261,7 +285,7 @@
* virt, phys, size must all be page-aligned.
* This should only be called before ioremap is called.
*/
-void __init io_block_mapping(unsigned long virt, unsigned long phys,
+void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
unsigned int size, int flags)
{
int i;
diff -Nru a/arch/ppc/ocp/ocp-probe.c b/arch/ppc/ocp/ocp-probe.c
--- a/arch/ppc/ocp/ocp-probe.c Wed Jan 15 19:45:18 2003
+++ b/arch/ppc/ocp/ocp-probe.c Wed Sep 3 05:40:20 2003
@@ -62,7 +62,6 @@
(unsigned long) dev->paddr, dev->irq, dev->pm);
/* now put in global tree */
- strcpy(dev->dev.name, dev->name);
sprintf(dev->dev.bus_id, "%d", index);
dev->dev.parent = ocp_bus;
dev->dev.bus = &ocp_bus_type;
@@ -80,7 +79,7 @@
return NULL;
memset(b, 0, sizeof(struct device));
strcpy(b->bus_id, "ocp");
- strcpy(b->name, "Host/OCP Bridge");
+
device_register(b);
return b;
diff -Nru a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
--- a/arch/ppc/platforms/4xx/Kconfig Tue Aug 12 14:57:51 2003
+++ b/arch/ppc/platforms/4xx/Kconfig Wed Sep 3 05:16:34 2003
@@ -1,6 +1,6 @@
config 4xx
bool
- depends on 40x
+ depends on 40x || 44x
default y
menu "IBM 4xx options"
@@ -57,6 +57,23 @@
endchoice
+choice
+ prompt "Machine Type"
+ depends on 44x
+ default EBONY
+
+config EBONY
+ bool "Ebony"
+ help
+ This option enables support for the IBM PPC440GP evaluation board.
+
+config OCOTEA
+ bool "Ocotea"
+ help
+ This option enables support for the IBM PPC440GX evaluation board.
+
+endchoice
+
config EP405PC
bool "EP405PC Support"
depends on EP405
@@ -70,6 +87,26 @@
depends on ASH
default y
+config 440GP
+ bool
+ depends on EBONY
+ default y
+
+config 440GX
+ bool
+ depends on OCOTEA
+ default y
+
+config 440
+ bool
+ depends on 440GP
+ default y
+
+config 440A
+ bool
+ depends on 440GX
+ default y
+
# All 405-based cores up until the 405GPR and 405EP have this errata.
config IBM405_ERR77
bool
@@ -82,9 +119,25 @@
depends on 40x && !405GPR
default y
+
+config PIN_TLB
+ bool
+ depends on 44x
+ default y
+
+config BOOKE
+ bool
+ depends on 44x
+ default y
+
config IBM_OCP
bool
- depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
+ depends on ASH || BEECH || CEDAR || CPCI405 || EBONY || EP405 || OCOTEA || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
+ default y
+
+config IBM_EMAC4
+ bool
+ depends on 440GX
default y
config NP405L
diff -Nru a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
--- a/arch/ppc/platforms/4xx/Makefile Mon Feb 3 14:19:36 2003
+++ b/arch/ppc/platforms/4xx/Makefile Wed Sep 3 05:16:34 2003
@@ -5,8 +5,10 @@
obj-$(CONFIG_BEECH) += beech.o
obj-$(CONFIG_CEDAR) += cedar.o
obj-$(CONFIG_CPCI405) += cpci405.o
+obj-$(CONFIG_EBONY) += ebony.o
obj-$(CONFIG_EP405) += ep405.o
obj-$(CONFIG_OAK) += oak.o
+obj-$(CONFIG_OCOTEA) += ocotea.o
obj-$(CONFIG_REDWOOD_4) += redwood.o
obj-$(CONFIG_REDWOOD_5) += redwood5.o
obj-$(CONFIG_REDWOOD_6) += redwood6.o
@@ -21,4 +23,6 @@
obj-$(CONFIG_REDWOOD_6) += ibmstbx25.o
obj-$(CONFIG_NP4GS3) += ibmnp4gs.o
obj-$(CONFIG_405LP) += ibm405lp.o
+obj-$(CONFIG_EBONY) += ibm440gp.o
+obj-$(CONFIG_OCOTEA) += ibm440gx.o
obj-$(CONFIG_405GPR) += ibm405gpr.o
diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/platforms/4xx/ebony.c Wed Sep 3 02:14:10 2003
@@ -0,0 +1,536 @@
+/*
+ * arch/ppc/platforms/ebony.c
+ *
+ * Ebony board specific routines
+ *
+ * Matt Porter
+ *
+ * Copyright 2002 MontaVista Software Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include