diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS Mon Sep 8 12:51:05 2003
+++ b/CREDITS Mon Sep 8 12:51:05 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/Changes b/Documentation/Changes
--- a/Documentation/Changes Mon Sep 8 12:51:06 2003
+++ b/Documentation/Changes Mon Sep 8 12:51:06 2003
@@ -54,7 +54,7 @@
o util-linux 2.10o # fdformat --version
o module-init-tools 0.9.9 # depmod -V
o e2fsprogs 1.29 # tune2fs
-o jfsutils 1.0.14 # fsck.jfs -V
+o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.1.0 # xfs_db -V
o pcmcia-cs 3.1.21 # cardmgr -V
diff -Nru a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
--- a/Documentation/DocBook/kernel-locking.tmpl Mon Sep 8 12:51:04 2003
+++ b/Documentation/DocBook/kernel-locking.tmpl Mon Sep 8 12:51:04 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/scsidrivers.tmpl b/Documentation/DocBook/scsidrivers.tmpl
--- a/Documentation/DocBook/scsidrivers.tmpl Mon Sep 8 12:51:03 2003
+++ b/Documentation/DocBook/scsidrivers.tmpl Mon Sep 8 12:51:03 2003
@@ -16,20 +16,40 @@
- 2002-04-27
+ 2003-08-11
2002
+ 2003
Douglas Gilbert
+
- Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no Invariant Sections, with no Front-Cover Texts,
- and with no Back-Cover Texts. A copy of the license is included
- in the section entitled "GNU Free Documentation License".
+ This documentation 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.
+
+
+
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ MA 02111-1307 USA
+
+
+
+ For more details see the file COPYING in the source
+ distribution of Linux.
diff -Nru a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl
--- a/Documentation/DocBook/writing_usb_driver.tmpl Mon Sep 8 12:51:04 2003
+++ b/Documentation/DocBook/writing_usb_driver.tmpl Mon Sep 8 12:51:04 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/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
--- a/Documentation/cpu-freq/cpu-drivers.txt Mon Sep 8 12:51:06 2003
+++ b/Documentation/cpu-freq/cpu-drivers.txt Mon Sep 8 12:51:06 2003
@@ -64,6 +64,12 @@
cpufreq_driver.exit - A pointer to a per-CPU cleanup function.
+cpufreq_driver.resume - A pointer to a per-CPU resume function
+ which is called with interrupts disabled
+ and _before_ the pre-suspend frequency
+ and/or policy is restored by a call to
+ ->target or ->setpolicy.
+
cpufreq_driver.attr - A pointer to a NULL-terminated list of
"struct freq_attr" which allow to
export values to sysfs.
@@ -119,7 +125,7 @@
You need to make sure that at least one valid frequency (or operating
range) is within policy->min and policy->max. If necessary, increase
-policy->max fist, and only if this is no solution, decreas policy->min.
+policy->max first, and only if this is no solution, decrease policy->min.
1.4 target or setpolicy?
diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
--- a/Documentation/filesystems/proc.txt Mon Sep 8 12:51:03 2003
+++ b/Documentation/filesystems/proc.txt Mon Sep 8 12:51:03 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/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt
--- a/Documentation/filesystems/sysfs.txt Mon Sep 8 12:51:03 2003
+++ b/Documentation/filesystems/sysfs.txt Mon Sep 8 12:51:03 2003
@@ -116,7 +116,7 @@
Subsystem-Specific Callbacks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-When a subsystem defines a new attribute type, they must implement a
+When a subsystem defines a new attribute type, it must implement a
set of sysfs operations for forwarding read and write calls to the
show and store methods of the attribute owners.
@@ -204,7 +204,7 @@
can be done using strlen().
- show() or store() can always return errors. If a bad value comes
- through, be sure and return an error.
+ through, be sure to return an error.
- The object passed to the methods will be pinned in memory via sysfs
referencing counting its embedded object. However, the physical
@@ -229,7 +229,7 @@
(Note that the real implementation doesn't allow userspace to set the
-name for a device).
+name for a device.)
Top Level Directory Layout
diff -Nru a/Documentation/ide.txt b/Documentation/ide.txt
--- a/Documentation/ide.txt Mon Sep 8 12:51:05 2003
+++ b/Documentation/ide.txt Mon Sep 8 12:51:05 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/ioctl-number.txt b/Documentation/ioctl-number.txt
--- a/Documentation/ioctl-number.txt Mon Sep 8 12:51:06 2003
+++ b/Documentation/ioctl-number.txt Mon Sep 8 12:51:06 2003
@@ -30,7 +30,9 @@
The second argument to _IO, _IOW, _IOR, or _IOWR is a sequence number
to distinguish ioctls from each other. The third argument to _IOW,
_IOR, or _IOWR is the type of the data going into the kernel or coming
-out of the kernel (e.g. 'int' or 'struct foo').
+out of the kernel (e.g. 'int' or 'struct foo'). NOTE! Do NOT use
+sizeof(arg) as the third argument as this results in your ioctl thinking
+it passes an argument of type size_t.
Some devices use their major number as the identifier; this is OK, as
long as it is unique. Some devices are irregular and don't follow any
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt Mon Sep 8 12:51:06 2003
+++ b/Documentation/kernel-parameters.txt Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:04 2003
+++ /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 Mon Sep 8 12:51:03 2003
+++ b/Documentation/kobject.txt Mon Sep 8 12:51:03 2003
@@ -87,7 +87,7 @@
calling kobject_add(). An initialized kobject may be used for
reference counting.
-Note: calling kobject_init(), then kobject_add() is functionally
+Note: calling kobject_init() then kobject_add() is functionally
equivalent to calling kobject_register().
When a kobject is unregistered, it is removed from its kset's list,
@@ -108,10 +108,10 @@
NOTE!!!
-It is _imperative_ that you supply a desctructor for dynamically
+It is _imperative_ that you supply a destructor for dynamically
allocated kobjects to free them if you are using kobject reference
-counts. The reference count controls the duration of the lifetime of
-the object. If it goes to 0, then it is assumed that the object will
+counts. The reference count controls the lifetime of the object.
+If it goes to 0, then it is assumed that the object will
be freed and cannot be used.
More importantly, you must free the object there, and not immediately
@@ -169,7 +169,7 @@
The type that the kobjects are embedded in is described by the ktype
-pointer. The subsystem that the kobject belongs to is pointed to by
+pointer. The subsystem that the kobject belongs to is pointed to by the
subsys pointer.
A kset contains a kobject itself, meaning that it may be registered in
@@ -180,7 +180,7 @@
For example, a block device is an object (struct gendisk) that is
contained in a set of block devices. It may also contain a set of
partitions (struct hd_struct) that have been found on the device. The
-following code snippet illustrates how to properly express this.
+following code snippet illustrates how to express this properly.
struct gendisk * disk;
...
@@ -215,7 +215,7 @@
ksets are represented in sysfs when their embedded kobjects are
registered. They follow the same rules of parenting, with one
exception. If a kset does not have a parent, nor is its embedded
-kobject part of another kset, the kset's parent becomes it's dominant
+kobject part of another kset, the kset's parent becomes its dominant
subsystem.
If the kset does not have a parent, its directory is created at the
@@ -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
@@ -260,7 +262,7 @@
A subsystem represents a significant entity of code that maintains an
arbitrary number of sets of objects of various types. Since the number
-of ksets, and the type of objects they contain, are variable, a
+of ksets and the type of objects they contain are variable, a
generic representation of a subsystem is minimal.
@@ -292,7 +294,7 @@
semaphore.
-4.2 Programming Interface.
+4.2 subsystem Programming Interface.
The subsystem programming interface is simple and does not offer the
flexibility that the kset and kobject programming interfaces do. They
@@ -303,7 +305,7 @@
4.3 Helpers
-A number of macros are available to make dealing with subsystems, and
+A number of macros are available to make dealing with subsystems and
their embedded objects easier.
diff -Nru a/Documentation/pcwd-watchdog.txt b/Documentation/pcwd-watchdog.txt
--- a/Documentation/pcwd-watchdog.txt Mon Sep 8 12:51:04 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,134 +0,0 @@
- Berkshire Products PC Watchdog Card
- Support for ISA Cards Revision A and C
- Documentation and Driver by Ken Hollis
-
- The PC Watchdog is a card that offers the same type of functionality that
- the WDT card does, only it doesn't require an IRQ to run. Furthermore,
- the Revision C card allows you to monitor any IO Port to automatically
- trigger the card into being reset. This way you can make the card
- monitor hard drive status, or anything else you need.
-
- The Watchdog Driver has one basic role: to talk to the card and send
- signals to it so it doesn't reset your computer ... at least during
- normal operation.
-
- The Watchdog Driver will automatically find your watchdog card, and will
- attach a running driver for use with that card. After the watchdog
- drivers have initialized, you can then talk to the card using the PC
- Watchdog program, available from http://ftp.bitgate.com/pcwd/.
-
- I suggest putting a "watchdog -d" before the beginning of an fsck, and
- a "watchdog -e -t 1" immediately after the end of an fsck. (Remember
- to run the program with an "&" to run it in the background!)
-
- If you want to write a program to be compatible with the PC Watchdog
- driver, simply do the following:
-
--- Snippet of code --
-/*
- * Watchdog Driver Test Program
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-int fd;
-
-/*
- * This function simply sends an IOCTL to the driver, which in turn ticks
- * the PC Watchdog card to reset its internal timer so it doesn't trigger
- * a computer reset.
- */
-void keep_alive(void)
-{
- int dummy;
-
- ioctl(fd, WDIOC_KEEPALIVE, &dummy);
-}
-
-/*
- * The main program. Run the program with "-d" to disable the card,
- * or "-e" to enable the card.
- */
-int main(int argc, char *argv[])
-{
- fd = open("/dev/watchdog", O_WRONLY);
-
- if (fd == -1) {
- fprintf(stderr, "Watchdog device not enabled.\n");
- fflush(stderr);
- exit(-1);
- }
-
- if (argc > 1) {
- if (!strncasecmp(argv[1], "-d", 2)) {
- ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD);
- fprintf(stderr, "Watchdog card disabled.\n");
- fflush(stderr);
- exit(0);
- } else if (!strncasecmp(argv[1], "-e", 2)) {
- ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD);
- fprintf(stderr, "Watchdog card enabled.\n");
- fflush(stderr);
- exit(0);
- } else {
- fprintf(stderr, "-d to disable, -e to enable.\n");
- fprintf(stderr, "run by itself to tick the card.\n");
- fflush(stderr);
- exit(0);
- }
- } else {
- fprintf(stderr, "Watchdog Ticking Away!\n");
- fflush(stderr);
- }
-
- while(1) {
- keep_alive();
- sleep(1);
- }
-}
--- End snippet --
-
- Other IOCTL functions include:
-
- WDIOC_GETSUPPORT
- This returns the support of the card itself. This
- returns in structure "PCWDS" which returns:
- options = WDIOS_TEMPPANIC
- (This card supports temperature)
- firmware_version = xxxx
- (Firmware version of the card)
-
- WDIOC_GETSTATUS
- This returns the status of the card, with the bits of
- WDIOF_* bitwise-anded into the value. (The comments
- are in linux/pcwd.h)
-
- WDIOC_GETBOOTSTATUS
- This returns the status of the card that was reported
- at bootup.
-
- WDIOC_GETTEMP
- This returns the temperature of the card. (You can also
- read /dev/watchdog, which gives a temperature update
- every second.)
-
- WDIOC_SETOPTIONS
- This lets you set the options of the card. You can either
- enable or disable the card this way.
-
- WDIOC_KEEPALIVE
- This pings the card to tell it not to reset your computer.
-
- And that's all she wrote!
-
- -- Ken Hollis
- (kenji@bitgate.com)
-
-(This documentation may be out of date. Check
- http://ftp.bitgate.com/pcwd/ for the absolute latest additions.)
diff -Nru a/Documentation/sonypi.txt b/Documentation/sonypi.txt
--- a/Documentation/sonypi.txt Mon Sep 8 12:51:03 2003
+++ b/Documentation/sonypi.txt Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/Documentation/sysctl/README Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:04 2003
+++ b/Documentation/usb/hotplug.txt Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/Documentation/video4linux/meye.txt Mon Sep 8 12:51:05 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/Documentation/watchdog/pcwd-watchdog.txt b/Documentation/watchdog/pcwd-watchdog.txt
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/Documentation/watchdog/pcwd-watchdog.txt Mon Sep 8 12:51:04 2003
@@ -0,0 +1,134 @@
+ Berkshire Products PC Watchdog Card
+ Support for ISA Cards Revision A and C
+ Documentation and Driver by Ken Hollis
+
+ The PC Watchdog is a card that offers the same type of functionality that
+ the WDT card does, only it doesn't require an IRQ to run. Furthermore,
+ the Revision C card allows you to monitor any IO Port to automatically
+ trigger the card into being reset. This way you can make the card
+ monitor hard drive status, or anything else you need.
+
+ The Watchdog Driver has one basic role: to talk to the card and send
+ signals to it so it doesn't reset your computer ... at least during
+ normal operation.
+
+ The Watchdog Driver will automatically find your watchdog card, and will
+ attach a running driver for use with that card. After the watchdog
+ drivers have initialized, you can then talk to the card using the PC
+ Watchdog program, available from http://ftp.bitgate.com/pcwd/.
+
+ I suggest putting a "watchdog -d" before the beginning of an fsck, and
+ a "watchdog -e -t 1" immediately after the end of an fsck. (Remember
+ to run the program with an "&" to run it in the background!)
+
+ If you want to write a program to be compatible with the PC Watchdog
+ driver, simply do the following:
+
+-- Snippet of code --
+/*
+ * Watchdog Driver Test Program
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+int fd;
+
+/*
+ * This function simply sends an IOCTL to the driver, which in turn ticks
+ * the PC Watchdog card to reset its internal timer so it doesn't trigger
+ * a computer reset.
+ */
+void keep_alive(void)
+{
+ int dummy;
+
+ ioctl(fd, WDIOC_KEEPALIVE, &dummy);
+}
+
+/*
+ * The main program. Run the program with "-d" to disable the card,
+ * or "-e" to enable the card.
+ */
+int main(int argc, char *argv[])
+{
+ fd = open("/dev/watchdog", O_WRONLY);
+
+ if (fd == -1) {
+ fprintf(stderr, "Watchdog device not enabled.\n");
+ fflush(stderr);
+ exit(-1);
+ }
+
+ if (argc > 1) {
+ if (!strncasecmp(argv[1], "-d", 2)) {
+ ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD);
+ fprintf(stderr, "Watchdog card disabled.\n");
+ fflush(stderr);
+ exit(0);
+ } else if (!strncasecmp(argv[1], "-e", 2)) {
+ ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD);
+ fprintf(stderr, "Watchdog card enabled.\n");
+ fflush(stderr);
+ exit(0);
+ } else {
+ fprintf(stderr, "-d to disable, -e to enable.\n");
+ fprintf(stderr, "run by itself to tick the card.\n");
+ fflush(stderr);
+ exit(0);
+ }
+ } else {
+ fprintf(stderr, "Watchdog Ticking Away!\n");
+ fflush(stderr);
+ }
+
+ while(1) {
+ keep_alive();
+ sleep(1);
+ }
+}
+-- End snippet --
+
+ Other IOCTL functions include:
+
+ WDIOC_GETSUPPORT
+ This returns the support of the card itself. This
+ returns in structure "PCWDS" which returns:
+ options = WDIOS_TEMPPANIC
+ (This card supports temperature)
+ firmware_version = xxxx
+ (Firmware version of the card)
+
+ WDIOC_GETSTATUS
+ This returns the status of the card, with the bits of
+ WDIOF_* bitwise-anded into the value. (The comments
+ are in linux/pcwd.h)
+
+ WDIOC_GETBOOTSTATUS
+ This returns the status of the card that was reported
+ at bootup.
+
+ WDIOC_GETTEMP
+ This returns the temperature of the card. (You can also
+ read /dev/watchdog, which gives a temperature update
+ every second.)
+
+ WDIOC_SETOPTIONS
+ This lets you set the options of the card. You can either
+ enable or disable the card this way.
+
+ WDIOC_KEEPALIVE
+ This pings the card to tell it not to reset your computer.
+
+ And that's all she wrote!
+
+ -- Ken Hollis
+ (kenji@bitgate.com)
+
+(This documentation may be out of date. Check
+ http://ftp.bitgate.com/pcwd/ for the absolute latest additions.)
diff -Nru a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/Documentation/watchdog/watchdog-api.txt Mon Sep 8 12:51:03 2003
@@ -0,0 +1,390 @@
+The Linux Watchdog driver API.
+
+Copyright 2002 Christer Weingel
+
+Some parts of this document are copied verbatim from the sbc60xxwdt
+driver which is (c) Copyright 2000 Jakob Oestergaard
+
+This document describes the state of the Linux 2.4.18 kernel.
+
+Introduction:
+
+A Watchdog Timer (WDT) is a hardware circuit that can reset the
+computer system in case of a software fault. You probably knew that
+already.
+
+Usually a userspace daemon will notify the kernel watchdog driver via the
+/dev/watchdog special device file that userspace is still alive, at
+regular intervals. When such a notification occurs, the driver will
+usually tell the hardware watchdog that everything is in order, and
+that the watchdog should wait for yet another little while to reset
+the system. If userspace fails (RAM error, kernel bug, whatever), the
+notifications cease to occur, and the hardware watchdog will reset the
+system (causing a reboot) after the timeout occurs.
+
+The Linux watchdog API is a rather AD hoc construction and different
+drivers implement different, and sometimes incompatible, parts of it.
+This file is an attempt to document the existing usage and allow
+future driver writers to use it as a reference.
+
+The simplest API:
+
+All drivers support the basic mode of operation, where the watchdog
+activates as soon as /dev/watchdog is opened and will reboot unless
+the watchdog is pinged within a certain time, this time is called the
+timeout or margin. The simplest way to ping the watchdog is to write
+some data to the device. So a very simple watchdog daemon would look
+like this:
+
+int main(int argc, const char *argv[]) {
+ int fd=open("/dev/watchdog",O_WRONLY);
+ if (fd==-1) {
+ perror("watchdog");
+ exit(1);
+ }
+ while(1) {
+ write(fd, "\0", 1);
+ sleep(10);
+ }
+}
+
+A more advanced driver could for example check that a HTTP server is
+still responding before doing the write call to ping the watchdog.
+
+When the device is closed, the watchdog is disabled. This is not
+always such a good idea, since if there is a bug in the watchdog
+daemon and it crashes the system will not reboot. Because of this,
+some of the drivers support the configuration option "Disable watchdog
+shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when
+compiling the kernel, there is no way of disabling the watchdog once
+it has been started. So, if the watchdog dameon crashes, the system
+will reboot after the timeout has passed.
+
+Some other drivers will not disable the watchdog, unless a specific
+magic character 'V' has been sent /dev/watchdog just before closing
+the file. If the userspace daemon closes the file without sending
+this special character, the driver will assume that the daemon (and
+userspace in general) died, and will stop pinging the watchdog without
+disabling it first. This will then cause a reboot.
+
+The ioctl API:
+
+All conforming drivers also support an ioctl API.
+
+Pinging the watchdog using an ioctl:
+
+All drivers that have an ioctl interface support at least one ioctl,
+KEEPALIVE. This ioctl does exactly the same thing as a write to the
+watchdog device, so the main loop in the above program could be
+replaced with:
+
+ while (1) {
+ ioctl(fd, WDIOC_KEEPALIVE, 0);
+ sleep(10);
+ }
+
+the argument to the ioctl is ignored.
+
+Setting and getting the timeout:
+
+For some drivers it is possible to modify the watchdog timeout on the
+fly with the SETTIMEOUT ioctl, those drivers have the WDIOF_SETTIMEOUT
+flag set in their option field. The argument is an integer
+representing the timeout in seconds. The driver returns the real
+timeout used in the same variable, and this timeout might differ from
+the requested one due to limitation of the hardware.
+
+ int timeout = 45;
+ ioctl(fd, WDIOC_SETTIMEOUT, &timeout);
+ printf("The timeout was set to %d seconds\n", timeout);
+
+This example might actually print "The timeout was set to 60 seconds"
+if the device has a granularity of minutes for its timeout.
+
+Starting with the Linux 2.4.18 kernel, it is possible to query the
+current timeout using the GETTIMEOUT ioctl.
+
+ ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
+ printf("The timeout was is %d seconds\n", timeout);
+
+Envinronmental monitoring:
+
+All watchdog drivers are required return more information about the system,
+some do temperature, fan and power level monitoring, some can tell you
+the reason for the last reboot of the system. The GETSUPPORT ioctl is
+available to ask what the device can do:
+
+ struct watchdog_info ident;
+ ioctl(fd, WDIOC_GETSUPPORT, &ident);
+
+the fields returned in the ident struct are:
+
+ identity a string identifying the watchdog driver
+ firmware_version the firmware version of the card if available
+ options a flags describing what the device supports
+
+the options field can have the following bits set, and describes what
+kind of information that the GET_STATUS and GET_BOOT_STATUS ioctls can
+return. [FIXME -- Is this correct?]
+
+ WDIOF_OVERHEAT Reset due to CPU overheat
+
+The machine was last rebooted by the watchdog because the thermal limit was
+exceeded
+
+ WDIOF_FANFAULT Fan failed
+
+A system fan monitored by the watchdog card has failed
+
+ WDIOF_EXTERN1 External relay 1
+
+External monitoring relay/source 1 was triggered. Controllers intended for
+real world applications include external monitoring pins that will trigger
+a reset.
+
+ WDIOF_EXTERN2 External relay 2
+
+External monitoring relay/source 2 was triggered
+
+ WDIOF_POWERUNDER Power bad/power fault
+
+The machine is showing an undervoltage status
+
+ WDIOF_CARDRESET Card previously reset the CPU
+
+The last reboot was caused by the watchdog card
+
+ WDIOF_POWEROVER Power over voltage
+
+The machine is showing an overvoltage status. Note that if one level is
+under and one over both bits will be set - this may seem odd but makes
+sense.
+
+ WDIOF_KEEPALIVEPING Keep alive ping reply
+
+The watchdog saw a keepalive ping since it was last queried.
+
+ WDIOF_SETTIMEOUT Can set/get the timeout
+
+
+For those drivers that return any bits set in the option field, the
+GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current
+status, and the status at the last reboot, respectively.
+
+ int flags;
+ ioctl(fd, WDIOC_GETSTATUS, &flags);
+
+ or
+
+ ioctl(fd, WDIOC_GETBOOTSTATUS, &flags);
+
+Note that not all devices support these two calls, and some only
+support the GETBOOTSTATUS call.
+
+Some drivers can measure the temperature using the GETTEMP ioctl. The
+returned value is the temperature in degrees farenheit.
+
+ int temperature;
+ ioctl(fd, WDIOC_GETTEMP, &temperature);
+
+Finally the SETOPTIONS ioctl can be used to control some aspects of
+the cards operation; right now the pcwd driver is the only one
+supporting thiss ioctl.
+
+ int options = 0;
+ ioctl(fd, WDIOC_SETOPTIONS, options);
+
+The following options are available:
+
+ WDIOS_DISABLECARD Turn off the watchdog timer
+ WDIOS_ENABLECARD Turn on the watchdog timer
+ WDIOS_TEMPPANIC Kernel panic on temperature trip
+
+[FIXME -- better explanations]
+
+Implementations in the current drivers in the kernel tree:
+
+Here I have tried to summarize what the different drivers support and
+where they do strange things compared to the other drivers.
+
+acquirewdt.c -- Acquire Single Board Computer
+
+ This driver has a hardcoded timeout of 1 minute
+
+ Supports CONFIG_WATCHDOG_NOWAYOUT
+
+ GETSUPPORT returns KEEPALIVEPING. GETSTATUS will return 1 if
+ the device is open, 0 if not. [FIXME -- isn't this rather
+ silly? To be able to use the ioctl, the device must be open
+ and so GETSTATUS will always return 1].
+
+advantechwdt.c -- Advantech Single Board Computer
+
+ Timeout that defaults to 60 seconds, supports SETTIMEOUT.
+
+ Supports CONFIG_WATCHDOG_NOWAYOUT
+
+ GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
+ The GETSTATUS call returns if the device is open or not.
+ [FIXME -- silliness again?]
+
+eurotechwdt.c -- Eurotech CPU-1220/1410
+
+ The timeout can be set using the SETTIMEOUT ioctl and defaults
+ to 60 seconds.
+
+ Also has a module parameter "ev", event type which controls
+ what should happen on a timeout, the string "int" or anything
+ else that causes a reboot. [FIXME -- better description]
+
+ Supports CONFIG_WATCHDOG_NOWAYOUT
+
+ GETSUPPORT returns CARDRESET and WDIOF_SETTIMEOUT but
+ GETSTATUS is not supported and GETBOOTSTATUS just returns 0.
+
+i810-tco.c -- Intel 810 chipset
+
+ Also has support for a lot of other i8x0 stuff, but the
+ watchdog is one of the things.
+
+ The timeout is set using the module parameter "i810_margin",
+ which is in steps of 0.6 seconds where 2
+
+ Custom Linux Driver And Program Development
+
+
+The following watchdog drivers are currently implemented:
+
+ ICS WDT501-P
+ ICS WDT501-P (no fan tachometer)
+ ICS WDT500-P
+ Software Only
+ SA1100 Internal Watchdog
+ Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)
+
+
+All six interfaces provide /dev/watchdog, which when open must be written
+to within a timeout or the machine will reboot. Each write delays the reboot
+time another timeout. In the case of the software watchdog the ability to
+reboot will depend on the state of the machines and interrupts. The hardware
+boards physically pull the machine down off their own onboard timers and
+will reboot from almost anything.
+
+A second temperature monitoring interface is available on the WDT501P cards
+and some Berkshire cards. This provides /dev/temperature. This is the machine
+internal temperature in degrees Fahrenheit. Each read returns a single byte
+giving the temperature.
+
+The third interface logs kernel messages on additional alert events.
+
+Both software and hardware watchdog drivers are available in the standard
+kernel. If you are using the software watchdog, you probably also want
+to use "panic=60" as a boot argument as well.
+
+The wdt card cannot be safely probed for. Instead you need to pass
+wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
+
+The SA1100 watchdog module can be configured with the "sa1100_margin"
+commandline argument which specifies timeout value in seconds.
+
+The i810 TCO watchdog modules can be configured with the "i810_margin"
+commandline argument which specifies the counter initial value. The counter
+is decremented every 0.6 seconds and default to 50 (30 seconds). Values can
+range between 3 and 63.
+
+The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
+WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
+and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
+documentation for the 82801AA and 82801AB datasheet).
+
+Features
+--------
+ WDT501P WDT500P Software Berkshire i810 TCO SA1100WD
+Reboot Timer X X X X X X
+External Reboot X X o o o X
+I/O Port Monitor o o o X o o
+Temperature X o o X o o
+Fan Speed X o o o o o
+Power Under X o o o o o
+Power Over X o o o o o
+Overheat X o o o o o
+
+The external event interfaces on the WDT boards are not currently supported.
+Minor numbers are however allocated for it.
+
+
+Example Watchdog Driver
+-----------------------
+
+#include
+#include
+#include
+
+int main(int argc, const char *argv[])
+{
+ int fd=open("/dev/watchdog",O_WRONLY);
+ if(fd==-1)
+ {
+ perror("watchdog");
+ exit(1);
+ }
+ while(1)
+ {
+ write(fd,"\0",1);
+ fsync(fd);
+ sleep(10);
+ }
+}
+
+
+Contact Information
+
+People keep asking about the WDT watchdog timer hardware: The phone contacts
+for Industrial Computer Source are:
+
+Industrial Computer Source
+http://www.indcompsrc.com
+ICS Advent, San Diego
+6260 Sequence Dr.
+San Diego, CA 92121-4371
+Phone (858) 677-0877
+FAX: (858) 677-0895
+>
+ICS Advent Europe, UK
+Oving Road
+Chichester,
+West Sussex,
+PO19 4ET, UK
+Phone: 00.44.1243.533900
+
+
+and please mention Linux when enquiring.
+
+For full information about the PCWD cards see the pcwd-watchdog.txt document.
diff -Nru a/Documentation/watchdog-api.txt b/Documentation/watchdog-api.txt
--- a/Documentation/watchdog-api.txt Mon Sep 8 12:51:03 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,390 +0,0 @@
-The Linux Watchdog driver API.
-
-Copyright 2002 Christer Weingel
-
-Some parts of this document are copied verbatim from the sbc60xxwdt
-driver which is (c) Copyright 2000 Jakob Oestergaard
-
-This document describes the state of the Linux 2.4.18 kernel.
-
-Introduction:
-
-A Watchdog Timer (WDT) is a hardware circuit that can reset the
-computer system in case of a software fault. You probably knew that
-already.
-
-Usually a userspace daemon will notify the kernel watchdog driver via the
-/dev/watchdog special device file that userspace is still alive, at
-regular intervals. When such a notification occurs, the driver will
-usually tell the hardware watchdog that everything is in order, and
-that the watchdog should wait for yet another little while to reset
-the system. If userspace fails (RAM error, kernel bug, whatever), the
-notifications cease to occur, and the hardware watchdog will reset the
-system (causing a reboot) after the timeout occurs.
-
-The Linux watchdog API is a rather AD hoc construction and different
-drivers implement different, and sometimes incompatible, parts of it.
-This file is an attempt to document the existing usage and allow
-future driver writers to use it as a reference.
-
-The simplest API:
-
-All drivers support the basic mode of operation, where the watchdog
-activates as soon as /dev/watchdog is opened and will reboot unless
-the watchdog is pinged within a certain time, this time is called the
-timeout or margin. The simplest way to ping the watchdog is to write
-some data to the device. So a very simple watchdog daemon would look
-like this:
-
-int main(int argc, const char *argv[]) {
- int fd=open("/dev/watchdog",O_WRONLY);
- if (fd==-1) {
- perror("watchdog");
- exit(1);
- }
- while(1) {
- write(fd, "\0", 1);
- sleep(10);
- }
-}
-
-A more advanced driver could for example check that a HTTP server is
-still responding before doing the write call to ping the watchdog.
-
-When the device is closed, the watchdog is disabled. This is not
-always such a good idea, since if there is a bug in the watchdog
-daemon and it crashes the system will not reboot. Because of this,
-some of the drivers support the configuration option "Disable watchdog
-shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when
-compiling the kernel, there is no way of disabling the watchdog once
-it has been started. So, if the watchdog dameon crashes, the system
-will reboot after the timeout has passed.
-
-Some other drivers will not disable the watchdog, unless a specific
-magic character 'V' has been sent /dev/watchdog just before closing
-the file. If the userspace daemon closes the file without sending
-this special character, the driver will assume that the daemon (and
-userspace in general) died, and will stop pinging the watchdog without
-disabling it first. This will then cause a reboot.
-
-The ioctl API:
-
-All conforming drivers also support an ioctl API.
-
-Pinging the watchdog using an ioctl:
-
-All drivers that have an ioctl interface support at least one ioctl,
-KEEPALIVE. This ioctl does exactly the same thing as a write to the
-watchdog device, so the main loop in the above program could be
-replaced with:
-
- while (1) {
- ioctl(fd, WDIOC_KEEPALIVE, 0);
- sleep(10);
- }
-
-the argument to the ioctl is ignored.
-
-Setting and getting the timeout:
-
-For some drivers it is possible to modify the watchdog timeout on the
-fly with the SETTIMEOUT ioctl, those drivers have the WDIOF_SETTIMEOUT
-flag set in their option field. The argument is an integer
-representing the timeout in seconds. The driver returns the real
-timeout used in the same variable, and this timeout might differ from
-the requested one due to limitation of the hardware.
-
- int timeout = 45;
- ioctl(fd, WDIOC_SETTIMEOUT, &timeout);
- printf("The timeout was set to %d seconds\n", timeout);
-
-This example might actually print "The timeout was set to 60 seconds"
-if the device has a granularity of minutes for its timeout.
-
-Starting with the Linux 2.4.18 kernel, it is possible to query the
-current timeout using the GETTIMEOUT ioctl.
-
- ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
- printf("The timeout was is %d seconds\n", timeout);
-
-Envinronmental monitoring:
-
-All watchdog drivers are required return more information about the system,
-some do temperature, fan and power level monitoring, some can tell you
-the reason for the last reboot of the system. The GETSUPPORT ioctl is
-available to ask what the device can do:
-
- struct watchdog_info ident;
- ioctl(fd, WDIOC_GETSUPPORT, &ident);
-
-the fields returned in the ident struct are:
-
- identity a string identifying the watchdog driver
- firmware_version the firmware version of the card if available
- options a flags describing what the device supports
-
-the options field can have the following bits set, and describes what
-kind of information that the GET_STATUS and GET_BOOT_STATUS ioctls can
-return. [FIXME -- Is this correct?]
-
- WDIOF_OVERHEAT Reset due to CPU overheat
-
-The machine was last rebooted by the watchdog because the thermal limit was
-exceeded
-
- WDIOF_FANFAULT Fan failed
-
-A system fan monitored by the watchdog card has failed
-
- WDIOF_EXTERN1 External relay 1
-
-External monitoring relay/source 1 was triggered. Controllers intended for
-real world applications include external monitoring pins that will trigger
-a reset.
-
- WDIOF_EXTERN2 External relay 2
-
-External monitoring relay/source 2 was triggered
-
- WDIOF_POWERUNDER Power bad/power fault
-
-The machine is showing an undervoltage status
-
- WDIOF_CARDRESET Card previously reset the CPU
-
-The last reboot was caused by the watchdog card
-
- WDIOF_POWEROVER Power over voltage
-
-The machine is showing an overvoltage status. Note that if one level is
-under and one over both bits will be set - this may seem odd but makes
-sense.
-
- WDIOF_KEEPALIVEPING Keep alive ping reply
-
-The watchdog saw a keepalive ping since it was last queried.
-
- WDIOF_SETTIMEOUT Can set/get the timeout
-
-
-For those drivers that return any bits set in the option field, the
-GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current
-status, and the status at the last reboot, respectively.
-
- int flags;
- ioctl(fd, WDIOC_GETSTATUS, &flags);
-
- or
-
- ioctl(fd, WDIOC_GETBOOTSTATUS, &flags);
-
-Note that not all devices support these two calls, and some only
-support the GETBOOTSTATUS call.
-
-Some drivers can measure the temperature using the GETTEMP ioctl. The
-returned value is the temperature in degrees farenheit.
-
- int temperature;
- ioctl(fd, WDIOC_GETTEMP, &temperature);
-
-Finally the SETOPTIONS ioctl can be used to control some aspects of
-the cards operation; right now the pcwd driver is the only one
-supporting thiss ioctl.
-
- int options = 0;
- ioctl(fd, WDIOC_SETOPTIONS, options);
-
-The following options are available:
-
- WDIOS_DISABLECARD Turn off the watchdog timer
- WDIOS_ENABLECARD Turn on the watchdog timer
- WDIOS_TEMPPANIC Kernel panic on temperature trip
-
-[FIXME -- better explanations]
-
-Implementations in the current drivers in the kernel tree:
-
-Here I have tried to summarize what the different drivers support and
-where they do strange things compared to the other drivers.
-
-acquirewdt.c -- Acquire Single Board Computer
-
- This driver has a hardcoded timeout of 1 minute
-
- Supports CONFIG_WATCHDOG_NOWAYOUT
-
- GETSUPPORT returns KEEPALIVEPING. GETSTATUS will return 1 if
- the device is open, 0 if not. [FIXME -- isn't this rather
- silly? To be able to use the ioctl, the device must be open
- and so GETSTATUS will always return 1].
-
-advantechwdt.c -- Advantech Single Board Computer
-
- Timeout that defaults to 60 seconds, supports SETTIMEOUT.
-
- Supports CONFIG_WATCHDOG_NOWAYOUT
-
- GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
- The GETSTATUS call returns if the device is open or not.
- [FIXME -- silliness again?]
-
-eurotechwdt.c -- Eurotech CPU-1220/1410
-
- The timeout can be set using the SETTIMEOUT ioctl and defaults
- to 60 seconds.
-
- Also has a module parameter "ev", event type which controls
- what should happen on a timeout, the string "int" or anything
- else that causes a reboot. [FIXME -- better description]
-
- Supports CONFIG_WATCHDOG_NOWAYOUT
-
- GETSUPPORT returns CARDRESET and WDIOF_SETTIMEOUT but
- GETSTATUS is not supported and GETBOOTSTATUS just returns 0.
-
-i810-tco.c -- Intel 810 chipset
-
- Also has support for a lot of other i8x0 stuff, but the
- watchdog is one of the things.
-
- The timeout is set using the module parameter "i810_margin",
- which is in steps of 0.6 seconds where 2
-
- Custom Linux Driver And Program Development
-
-
-The following watchdog drivers are currently implemented:
-
- ICS WDT501-P
- ICS WDT501-P (no fan tachometer)
- ICS WDT500-P
- Software Only
- SA1100 Internal Watchdog
- Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)
-
-
-All six interfaces provide /dev/watchdog, which when open must be written
-to within a timeout or the machine will reboot. Each write delays the reboot
-time another timeout. In the case of the software watchdog the ability to
-reboot will depend on the state of the machines and interrupts. The hardware
-boards physically pull the machine down off their own onboard timers and
-will reboot from almost anything.
-
-A second temperature monitoring interface is available on the WDT501P cards
-and some Berkshire cards. This provides /dev/temperature. This is the machine
-internal temperature in degrees Fahrenheit. Each read returns a single byte
-giving the temperature.
-
-The third interface logs kernel messages on additional alert events.
-
-Both software and hardware watchdog drivers are available in the standard
-kernel. If you are using the software watchdog, you probably also want
-to use "panic=60" as a boot argument as well.
-
-The wdt card cannot be safely probed for. Instead you need to pass
-wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
-
-The SA1100 watchdog module can be configured with the "sa1100_margin"
-commandline argument which specifies timeout value in seconds.
-
-The i810 TCO watchdog modules can be configured with the "i810_margin"
-commandline argument which specifies the counter initial value. The counter
-is decremented every 0.6 seconds and default to 50 (30 seconds). Values can
-range between 3 and 63.
-
-The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
-WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
-and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
-documentation for the 82801AA and 82801AB datasheet).
-
-Features
---------
- WDT501P WDT500P Software Berkshire i810 TCO SA1100WD
-Reboot Timer X X X X X X
-External Reboot X X o o o X
-I/O Port Monitor o o o X o o
-Temperature X o o X o o
-Fan Speed X o o o o o
-Power Under X o o o o o
-Power Over X o o o o o
-Overheat X o o o o o
-
-The external event interfaces on the WDT boards are not currently supported.
-Minor numbers are however allocated for it.
-
-
-Example Watchdog Driver
------------------------
-
-#include
-#include
-#include
-
-int main(int argc, const char *argv[])
-{
- int fd=open("/dev/watchdog",O_WRONLY);
- if(fd==-1)
- {
- perror("watchdog");
- exit(1);
- }
- while(1)
- {
- write(fd,"\0",1);
- fsync(fd);
- sleep(10);
- }
-}
-
-
-Contact Information
-
-People keep asking about the WDT watchdog timer hardware: The phone contacts
-for Industrial Computer Source are:
-
-Industrial Computer Source
-http://www.indcompsrc.com
-ICS Advent, San Diego
-6260 Sequence Dr.
-San Diego, CA 92121-4371
-Phone (858) 677-0877
-FAX: (858) 677-0895
->
-ICS Advent Europe, UK
-Oving Road
-Chichester,
-West Sussex,
-PO19 4ET, UK
-Phone: 00.44.1243.533900
-
-
-and please mention Linux when enquiring.
-
-For full information about the PCWD cards see the pcwd-watchdog.txt document.
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS Mon Sep 8 12:51:05 2003
+++ b/MAINTAINERS Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/Makefile Mon Sep 8 12:51:05 2003
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 0
-EXTRAVERSION = -test4
+EXTRAVERSION = -test5
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
@@ -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,13 +320,32 @@
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
# Let architecture Makefiles change CPPFLAGS if needed
-CFLAGS += $(CPPFLAGS) $(CFLAGS)
-AFLAGS += $(CPPFLAGS) $(AFLAGS)
+CFLAGS := $(CPPFLAGS) $(CFLAGS)
+AFLAGS := $(CPPFLAGS) $(AFLAGS)
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/
@@ -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
@@ -808,15 +828,20 @@
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
-checkconfig:
+configcheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w scripts/checkconfig.pl
-checkincludes:
+includecheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w scripts/checkincludes.pl
+
+versioncheck:
+ find * $(RCS_FIND_IGNORE) \
+ -name '*.[hcS]' -type f -print | sort \
+ | xargs $(PERL) -w scripts/checkversion.pl
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- a/arch/alpha/Kconfig Mon Sep 8 12:51:05 2003
+++ b/arch/alpha/Kconfig Mon Sep 8 12:51:05 2003
@@ -11,6 +11,9 @@
now Hewlett-Packard. The Alpha Linux project has a home page at
.
+config 64BIT
+ def_bool y
+
config MMU
bool
default y
@@ -596,40 +599,6 @@
to use devices as you hotplug them.
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"
diff -Nru a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
--- a/arch/alpha/kernel/core_titan.c Mon Sep 8 12:51:04 2003
+++ b/arch/alpha/kernel/core_titan.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/Kconfig Mon Sep 8 12:51:05 2003
@@ -542,39 +542,15 @@
bool
depends on CPU_FREQ && SA1100_LART
default y
+ select CPU_FREQ_DEFAULT_GOV_USERSPACE
+ select CPU_FREQ_24_API if SYSCTL
config CPU_FREQ_SA1110
bool
depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3)
default y
-
-if (CPU_FREQ_SA1100 || CPU_FREQ_SA1110)
-
-config CPU_FREQ_GOV_USERSPACE
- tristate
- depends on CPU_FREQ
- default y
-
-config CPU_FREQ_24_API
- bool
- depends on CPU_FREQ_GOV_USERSPACE && SYSCTL
- default y
-
-config CPU_FREQ_PROC_INTF
- tristate "/proc/cpufreq interface (deprecated)"
- depends on CPU_FREQ && PROC_FS
- help
- This enables the /proc/cpufreq interface for controlling
- CPUFreq. Please note that it is recommended to use the sysfs
- interface instead (which is built automatically).
-
- For details, take a look at linux/Documentation/cpufreq.
-
- If in doubt, say N.
-
-endif
-
-# CPUfreq on Integrator can use the generic cpufreq core
+ select CPU_FREQ_DEFAULT_GOV_USERSPACE
+ select CPU_FREQ_24_API if SYSCTL
config CPU_FREQ_INTEGRATOR
tristate "CPUfreq driver for ARM Integrator CPUs"
@@ -587,7 +563,7 @@
If in doubt, say Y.
-if (CPU_FREQ_INTEGRATOR)
+if (CPU_FREQ_INTEGRATOR) || (CPU_FREQ_SA1110) || (CPU_FREQ_SA1100)
source "drivers/cpufreq/Kconfig"
@@ -653,39 +629,6 @@
for scientific calculations, but you have to check this for yourself.
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"
diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile Mon Sep 8 12:51:04 2003
+++ b/arch/arm/Makefile Mon Sep 8 12:51:04 2003
@@ -24,22 +24,17 @@
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
# testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call check_gcc,-march=armv5te,-march=armv4 -Wa$(comma)-mxscale)
+arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call check_gcc,-march=armv5te,-march=armv4)
arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4
arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3
@@ -52,39 +47,24 @@
tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
-tune-$(CONFIG_CPU_XSCALE) :=$(call check_gcc,-mtune=xscale,-mtune=strongarm110)
+tune-$(CONFIG_CPU_XSCALE) :=$(call check_gcc,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
-# 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
+# Need -Uarm for gcc < 3.x
+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 +139,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 +158,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 +189,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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/boot/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/arm/common/amba.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:06 2003
+++ b/arch/arm/common/sa1111.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/def-configs/iq80310 Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/def-configs/iq80321 Mon Sep 8 12:51:03 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 Sep 8 12:51:05 2003
+++ b/arch/arm/kernel/Makefile Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:06 2003
+++ b/arch/arm/kernel/apm.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:04 2003
+++ b/arch/arm/kernel/bios32.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/kernel/ecard.c Mon Sep 8 12:51:05 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 Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/arm/kernel/entry-armv.S Mon Sep 8 12:51:04 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 */
@@ -770,8 +772,8 @@
preempt_return:
ldr r0, [r8, #TI_PREEMPT] @ read preempt value
teq r0, r7
- strne r0, [r0, -r0] @ bug()
str r9, [r8, #TI_PREEMPT] @ restore preempt count
+ strne r0, [r0, -r0] @ bug()
#endif
ldr r0, [sp, #S_PSR] @ irqs are already disabled
msr spsr, r0
@@ -906,8 +908,8 @@
#ifdef CONFIG_PREEMPT
ldr r0, [r8, #TI_PREEMPT]
teq r0, r7
- strne r0, [r0, -r0]
str r9, [r8, #TI_PREEMPT]
+ strne r0, [r0, -r0]
mov tsk, r8
#else
get_thread_info tsk
diff -Nru a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
--- a/arch/arm/kernel/entry-common.S Mon Sep 8 12:51:03 2003
+++ b/arch/arm/kernel/entry-common.S Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/arm/kernel/entry-header.S Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/kernel/head.S Mon Sep 8 12:51:03 2003
@@ -16,6 +16,7 @@
#include
#include
#include
+#include
#include
/*
@@ -119,9 +120,9 @@
orr r0, r0, #2 @ ...........A.
#endif
mcr p15, 0, r0, c1, c0, 0 @ write control reg
- mrc p15, 0, r0, c1, c0, 0 @ read it back.
- mov r0, r0
- mov r0, r0
+ mrc p15, 0, r3, c0, c0, 0 @ read id reg
+ mov r3, r3
+ mov r3, r3
mov pc, lr
/*
diff -Nru a/arch/arm/kernel/pm.c b/arch/arm/kernel/pm.c
--- a/arch/arm/kernel/pm.c Mon Sep 8 12:51:06 2003
+++ b/arch/arm/kernel/pm.c Mon Sep 8 12:51:06 2003
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
#include
#include
@@ -36,47 +37,25 @@
if (ret != 0)
goto out;
- /*
- * Tell LDM devices we're going to suspend.
- */
- ret = device_suspend(4, SUSPEND_NOTIFY);
- if (ret != 0)
+ ret = device_suspend(3);
+ if (ret)
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);
-
local_irq_disable();
leds_event(led_stop);
+ sysdev_suspend(3);
+
ret = pm_do_suspend();
+ sysdev_resume();
+
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/setup.c b/arch/arm/kernel/setup.c
--- a/arch/arm/kernel/setup.c Mon Sep 8 12:51:05 2003
+++ b/arch/arm/kernel/setup.c Mon Sep 8 12:51:05 2003
@@ -28,6 +28,7 @@
#include
#include
#include
+#include
#include
#include
diff -Nru a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
--- a/arch/arm/kernel/vmlinux.lds.S Mon Sep 8 12:51:03 2003
+++ b/arch/arm/kernel/vmlinux.lds.S Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-footbridge/netwinder-pci.c Mon Sep 8 12:51:03 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-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
--- a/arch/arm/mach-integrator/cpu.c Mon Sep 8 12:51:04 2003
+++ b/arch/arm/mach-integrator/cpu.c Mon Sep 8 12:51:04 2003
@@ -170,7 +170,7 @@
vco.r = 22;
/* set default policy and cpuinfo */
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.max_freq = 160000;
policy->cpuinfo.min_freq = 12000;
policy->cpuinfo.transition_latency = 1000; /* 1 ms, assumed */
diff -Nru a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
--- a/arch/arm/mach-integrator/impd1.c Mon Sep 8 12:51:04 2003
+++ b/arch/arm/mach-integrator/impd1.c Mon Sep 8 12:51:04 2003
@@ -186,7 +186,7 @@
memset(d, 0, sizeof(struct amba_device));
snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
- "lm%x:%5.5x", pdev->id, idev->offset >> 12);
+ "lm%x:%5.5lx", pdev->id, idev->offset >> 12);
d->dev.parent = &pdev->dev;
d->res.start = res->start + idev->offset;
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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mach-iop3xx/iop321-time.c Mon Sep 8 12:51:05 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 Sep 8 12:51:05 2003
+++ b/arch/arm/mach-iop3xx/iq80310-time.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-l7200/core.c Mon Sep 8 12:51:03 2003
@@ -11,7 +11,6 @@
#include
#include
-#include
#include
#include
diff -Nru a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
--- a/arch/arm/mach-pxa/pm.c Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mach-pxa/pm.c Mon Sep 8 12:51:05 2003
@@ -12,6 +12,7 @@
*/
#include
+#include
#include
#include
@@ -63,15 +64,11 @@
{
unsigned long sleep_save[SLEEP_SAVE_SIZE];
unsigned long checksum = 0;
+ unsigned long delta;
int i;
- cli();
- clf();
-
- leds_event(led_stop);
-
/* preserve current time */
- RCNR = xtime.tv_sec;
+ delta = xtime.tv_sec - RCNR;
/*
* Temporary solution. This won't be necessary once
@@ -184,15 +181,11 @@
RESTORE(FFIER);
/* restore current time */
- xtime.tv_sec = RCNR;
+ xtime.tv_sec = RCNR + delta;
#ifdef DEBUG
printk(KERN_DEBUG "*** made it back from resume\n");
#endif
-
- leds_event(led_start);
-
- sti();
return 0;
}
diff -Nru a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
--- a/arch/arm/mach-rpc/riscpc.c Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mach-rpc/riscpc.c Mon Sep 8 12:51:05 2003
@@ -21,7 +21,7 @@
#include
#include
#include
-#include
+#include
#include
#include
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
--- a/arch/arm/mach-sa1100/cpu-sa1100.c Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-sa1100/cpu-sa1100.c Mon Sep 8 12:51:03 2003
@@ -222,7 +222,7 @@
if (policy->cpu != 0)
return -EINVAL;
policy->cur = policy->min = policy->max = sa11x0_getspeed();
- policy->policy = CPUFREQ_POLICY_POWERSAVE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = 59000;
policy->cpuinfo.max_freq = 287000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
--- a/arch/arm/mach-sa1100/cpu-sa1110.c Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c Mon Sep 8 12:51:03 2003
@@ -270,8 +270,12 @@
* We wait 20ms to be safe.
*/
sdram_set_refresh(2);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(20 * HZ / 1000);
+ if (!irqs_disabled()) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(20 * HZ / 1000);
+ } else {
+ mdelay(20);
+ }
/*
* Reprogram the DRAM timings with interrupts disabled, and
@@ -317,7 +321,7 @@
if (policy->cpu != 0)
return -EINVAL;
policy->cur = policy->min = policy->max = sa11x0_getspeed();
- policy->policy = CPUFREQ_POLICY_POWERSAVE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = 59000;
policy->cpuinfo.max_freq = 287000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
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 Sep 8 12:51:04 2003
+++ b/arch/arm/mach-sa1100/leds-simpad.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-sa1100/leds.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mach-sa1100/leds.h Mon Sep 8 12:51:05 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/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
--- a/arch/arm/mach-sa1100/pm.c Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mach-sa1100/pm.c Mon Sep 8 12:51:03 2003
@@ -57,9 +57,11 @@
int pm_do_suspend(void)
{
unsigned long sleep_save[SLEEP_SAVE_SIZE];
+ unsigned long delta, gpio;
/* preserve current time */
- RCNR = xtime.tv_sec;
+ delta = xtime.tv_sec - RCNR;
+ gpio = GPLR;
/* save vital registers */
SAVE(OSCR);
@@ -112,6 +114,9 @@
RESTORE(Ser1SDCR0);
+ GPSR = gpio;
+ GPCR = ~gpio;
+
/*
* Clear the peripheral sleep-hold bit.
*/
@@ -125,7 +130,7 @@
RESTORE(OIER);
/* restore current time */
- xtime.tv_sec = RCNR;
+ xtime.tv_sec = RCNR + delta;
return 0;
}
diff -Nru a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
--- a/arch/arm/mm/Makefile Mon Sep 8 12:51:06 2003
+++ b/arch/arm/mm/Makefile Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/mm-armv.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mm/proc-arm1020.S Mon Sep 8 12:51:03 2003
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
/*
@@ -78,7 +79,7 @@
stmfd sp!, {lr}
mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
msr cpsr_c, ip
- bl cpu_arm1020_cache_clean_invalidate_all
+ bl arm1020_flush_kern_cache_all
mrc p15, 0, r0, c1, c0, 0 @ ctrl register
bic r0, r0, #0x1000 @ ...i............
bic r0, r0, #0x000e @ ............wca.
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 Sep 8 12:51:04 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 Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-arm6_7.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-arm720.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/arm/mm/proc-arm920.S Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-arm922.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-arm926.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/arm/mm/proc-sa110.S Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-sa1100.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm/mm/proc-xscale.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/arm26/Kconfig Mon Sep 8 12:51:05 2003
@@ -96,6 +96,7 @@
directly from ROM or flash. If unsure, say N.
config ZBOOT_ROM_TEXT
+ depends on ZBOOT_ROM
hex "Compressed ROM boot loader base address"
default "0"
help
@@ -103,6 +104,7 @@
should not change this value.
config ZBOOT_ROM_BSS
+ depends on ZBOOT_ROM
hex "Compressed ROM boot loader BSS address"
default "0"
help
@@ -110,6 +112,12 @@
while the decompressor is running. Unless you have special requirements,
you should not change this value.
+config XIP_KERNEL
+ bool "Execute In Place (XIP) kernel image"
+ help
+ Select this option to create a kernel that can be programed into
+ the OS ROMs.
+
config HOTPLUG
bool "Support for hot-pluggable devices"
---help---
@@ -145,39 +153,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"
diff -Nru a/arch/arm26/Makefile b/arch/arm26/Makefile
--- a/arch/arm26/Makefile Mon Sep 8 12:51:04 2003
+++ b/arch/arm26/Makefile Mon Sep 8 12:51:04 2003
@@ -12,8 +12,6 @@
AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
-#CFLAGS +=-pipe
-CFLAGS :=$(CFLAGS:-O2=-Os)
ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS +=-fno-omit-frame-pointer -mno-sched-prolog
@@ -29,21 +27,17 @@
CFLAGS +=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
AFLAGS +=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu
-#Default value
-DATAADDR := .
-
-ifeq ($(CONFIG_CPU_26),y)
head-y := arch/arm26/machine/head.o arch/arm26/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf32-littlearm
- ifeq ($(CONFIG_ROM_KERNEL),y)
- DATAADDR := 0x02080000
- textaddr-y := 0x03800000
- else
- textaddr-y := 0x02080000
- endif
+
+ifeq ($(CONFIG_XIP_KERNEL),y)
+ TEXTADDR := 0x03880000
+ DATAADDR := 0x02080000
+else
+ TEXTADDR := 0x02080000
+ DATAADDR := .
endif
-TEXTADDR := $(textaddr-y)
ifeq ($(incdir-y),)
incdir-y :=
endif
@@ -74,7 +68,7 @@
bzImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
-zImage Image bootpImage: vmlinux
+zImage Image bootpImage xipImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
zinstall install: vmlinux
diff -Nru a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile
--- a/arch/arm26/boot/Makefile Mon Sep 8 12:51:06 2003
+++ b/arch/arm26/boot/Makefile Mon Sep 8 12:51:06 2003
@@ -36,7 +36,7 @@
export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS
-targets := Image zImage bootpImage
+targets := Image zImage bootpImage xipImage
$(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy)
@@ -48,6 +48,15 @@
$(obj)/compressed/vmlinux: vmlinux FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
+
+ifeq ($(CONFIG_XIP_KERNEL),y)
+$(obj)/xipImage: vmlinux FORCE
+ $(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
+ $(OBJCOPY) -S -O binary -R .init -R .text -R .comment -R __ex_table -R __ksymtab vmlinux vmlinux-data.bin
+ cat vmlinux-text.bin vmlinux-data.bin > $@
+ $(RM) -f vmlinux-text.bin vmlinux-data.bin
+ @echo ' Kernel: $@ is ready'
+endif
.PHONY: initrd
initrd:
diff -Nru a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c
--- a/arch/arm26/kernel/ecard.c Mon Sep 8 12:51:06 2003
+++ b/arch/arm26/kernel/ecard.c Mon Sep 8 12:51:06 2003
@@ -580,7 +580,7 @@
#define ec_set_resource(ec,nr,st,sz,flg) \
do { \
- (ec)->resource[nr].name = ec->dev.name; \
+ (ec)->resource[nr].name = ec->dev.bus_id; \
(ec)->resource[nr].start = st; \
(ec)->resource[nr].end = (st) + (sz) - 1; \
(ec)->resource[nr].flags = flg; \
@@ -621,7 +621,17 @@
return sprintf(buf, "%u\n", ec->irq);
}
-static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL);
+static ssize_t ecard_show_vendor(struct device *dev, char *buf)
+{
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->cid.manufacturer);
+}
+
+static ssize_t ecard_show_device(struct device *dev, char *buf)
+{
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->cid.product);
+}
static ssize_t ecard_show_dma(struct device *dev, char *buf)
{
@@ -629,8 +639,6 @@
return sprintf(buf, "%u\n", ec->dma);
}
-static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL);
-
static ssize_t ecard_show_resources(struct device *dev, char *buf)
{
struct expansion_card *ec = ECARD_DEV(dev);
@@ -646,6 +654,10 @@
return str - buf;
}
+static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL);
+static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL);
+static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL);
+static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL);
static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL);
/*
@@ -717,8 +729,6 @@
}
snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot);
- snprintf(ec->dev.name, sizeof(ec->dev.name), "ecard %04x:%04x",
- ec->cid.manufacturer, ec->cid.product);
ec->dev.parent = NULL;
ec->dev.bus = &ecard_bus_type;
ec->dev.dma_mask = &ec->dma_mask;
@@ -745,6 +755,8 @@
device_create_file(&ec->dev, &dev_attr_dma);
device_create_file(&ec->dev, &dev_attr_irq);
device_create_file(&ec->dev, &dev_attr_resource);
+ device_create_file(&ec->dev, &dev_attr_vendor);
+ device_create_file(&ec->dev, &dev_attr_device);
return 0;
diff -Nru a/arch/arm26/kernel/entry.S b/arch/arm26/kernel/entry.S
--- a/arch/arm26/kernel/entry.S Mon Sep 8 12:51:03 2003
+++ b/arch/arm26/kernel/entry.S Mon Sep 8 12:51:03 2003
@@ -47,7 +47,7 @@
@
@ Stack format (ensured by USER_* and SVC_*)
@
-#define S_FRAME_SIZE 72
+#define S_FRAME_SIZE 72 @ FIXME: Really?
#define S_OLD_R0 64
#define S_PSR 60
#define S_PC 60
@@ -77,11 +77,11 @@
.endm
.macro slow_restore_user_regs
- ldmia sp, {r0 - lr}^
- mov r0, r0
- ldr lr, [sp, #15*4]
- add sp, sp, #15*4+8
- movs pc, lr
+ ldmia sp, {r0 - lr}^ @ restore the user regs
+ mov r0, r0 @ no-op
+ ldr lr, [sp, #15*4] @ get user PC
+ add sp, sp, #15*4+8 @ free stack
+ movs pc, lr @ return
.endm
.macro fast_restore_user_regs
@@ -514,31 +514,37 @@
* Handles floating point instructions
*/
vector_undefinstr:
- tst lr,#3
- bne __und_svc
+ tst lr, #MODE_SVC26 @ did we come from a non-user mode?
+ bne __und_svc @ yes - deal with it.
+/* Otherwise, fall through for the user-space (common) case. */
save_user_regs
- zero_fp
- teqp pc, #PSR_I_BIT | MODE_SVC26
+ zero_fp @ zero frame pointer
+ teqp pc, #PSR_I_BIT | MODE_SVC26 @ disable IRQs
.Lbug_undef:
ldr r4, .LC2
- ldr pc, [r4] @ Call FP module USR entry point
+ ldr pc, [r4] @ Call FP module entry point
+/* FIXME - should we trap for a null pointer here? */
- .globl fpundefinstr
-fpundefinstr: @ Called by FP module on undefined instr
+/* The SVC mode case */
+__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
+
+/* We get here if the FP emulator doesnt handle the undef instr.
+ * If the insn WAS handled, the emulator jumps to ret_from_exception by itself/
+ */
+ .globl fpundefinstr
+fpundefinstr:
mov r0, lr
mov r1, sp
teqp pc, #MODE_SVC26
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
@@ -548,6 +554,7 @@
* 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
+ * FIXME - probably a broken useless hack...
*/
fpe_not_present:
adr r10, wfs_mask_data
@@ -587,14 +594,14 @@
* Prefetch abort handler
*-----------------------------------------------------------------------------
*/
-
+#define DEBUG_UNDEF
/* remember: lr = USR pc */
vector_prefetch:
sub lr, lr, #4
- tst lr, #3
+ tst lr, #MODE_SVC26
bne __pabt_invalid
save_user_regs
- teqp pc, #MODE_SVC26
+ teqp pc, #MODE_SVC26 @ Enable IRQs...
mask_pc r0, lr @ Address of abort
mov r1, sp @ Tasks registers
bl do_PrefetchAbort
@@ -604,7 +611,7 @@
adr r0, t
bl printk
#endif
- ldr lr, [sp,#S_PC] @ program to test this on. I think its
+ ldr lr, [sp,#S_PC] @ FIXME program to test this on. I think its
b .Lbug_undef @ broken at the moment though!)
__pabt_invalid: SVC_SAVE_ALL
@@ -707,7 +714,7 @@
bne asm_do_IRQ
mov why, #0
- get_thread_info r5
+ get_thread_info tsk @ FIXME - was r5, but seemed wrong.
b ret_to_user
irq_prio_table
diff -Nru a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c
--- a/arch/arm26/kernel/irq.c Mon Sep 8 12:51:05 2003
+++ b/arch/arm26/kernel/irq.c Mon Sep 8 12:51:05 2003
@@ -36,6 +36,9 @@
#include
#include
+//FIXME - this ought to be in a header IMO
+void __init arc_init_irq(void);
+
/*
* Maximum IRQ count. Currently, this is arbitary. However, it should
* not be set too low to prevent false triggering. Conversely, if it
diff -Nru a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c
--- a/arch/arm26/kernel/setup.c Mon Sep 8 12:51:03 2003
+++ b/arch/arm26/kernel/setup.c Mon Sep 8 12:51:03 2003
@@ -58,6 +58,10 @@
extern void bootmem_init(struct meminfo *);
extern int root_mountflags;
extern int _stext, _text, _etext, _edata, _end;
+#ifdef CONFIG_XIP_KERNEL
+extern int _endtext, _sdata;
+#endif
+
unsigned int processor_id;
unsigned int __machine_arch_type;
@@ -121,6 +125,7 @@
for (list = &__proc_info_begin; list < &__proc_info_end ; list++)
if ((processor_id & list->cpu_mask) == list->cpu_val)
break;
+
/*
* If processor type is unrecognised, then we
* can do nothing...
@@ -220,7 +225,11 @@
kernel_code.start = init_mm.start_code;
kernel_code.end = init_mm.end_code - 1;
+#ifdef CONFIG_XIP_KERNEL
+ kernel_data.start = init_mm.start_data;
+#else
kernel_data.start = init_mm.end_code;
+#endif
kernel_data.end = init_mm.brk - 1;
for (i = 0; i < mi->nr_banks; i++) {
@@ -304,12 +313,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)
@@ -456,7 +465,10 @@
else
machine_name = "UNKNOWN";
- //FIXME - this may need altering when we get ROM images working
+ //FIXME - the tag struct is always copied here but this is a block
+ // of RAM that is accidentally reserved along with video RAM. perhaps
+ // it would be a good idea to explicitly reserve this?
+
tags = (struct tag *)0x0207c000;
/*
@@ -474,7 +486,12 @@
}
init_mm.start_code = (unsigned long) &_text;
+#ifndef CONFIG_XIP_KERNEL
init_mm.end_code = (unsigned long) &_etext;
+#else
+ init_mm.end_code = (unsigned long) &_endtext;
+ init_mm.start_data = (unsigned long) &_sdata;
+#endif
init_mm.end_data = (unsigned long) &_edata;
init_mm.brk = (unsigned long) &_end;
diff -Nru a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in Mon Sep 8 12:51:06 2003
@@ -0,0 +1,133 @@
+/* ld script to make ARM Linux kernel
+ * taken from the i386 version by Russell King
+ * Written by Martin Mares
+ * borrowed from Russels ARM port by Ian Molton
+ */
+
+#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 = .;
+ . = 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 = .;
+ . = ALIGN(32);
+ __initramfs_start = .;
+ usr/built-in.o(.init.ramfs)
+ __initramfs_end = .;
+ . = ALIGN(32768);
+ __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
+
+ _endtext = .;
+
+ . = DATAADDR;
+
+ _sdata = .;
+
+ .data : {
+ /*
+ * first, the init thread union, aligned
+ * to an 8192 byte boundary.
+ */
+ *(.init.task)
+
+ /*
+ * The cacheline aligned data
+ */
+ . = ALIGN(32);
+ *(.data.cacheline_aligned)
+
+ /*
+ * and the usual data section
+ */
+ *(.data)
+ CONSTRUCTORS
+
+ *(.init.data)
+
+ _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/kernel/vmlinux-arm26.lds.in b/arch/arm26/kernel/vmlinux-arm26.lds.in
--- /dev/null Wed Dec 31 16:00:00 1969
+++ b/arch/arm26/kernel/vmlinux-arm26.lds.in Mon Sep 8 12:51:03 2003
@@ -0,0 +1,128 @@
+/* ld script to make ARM Linux kernel
+ * taken from the i386 version by Russell King
+ * Written by Martin Mares
+ * borrowed from Russels ARM port by Ian Molton and subsequently modified.
+ */
+
+#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 = .;
+ __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 = .;
+ . = ALIGN(32);
+ __initramfs_start = .;
+ usr/built-in.o(.init.ramfs)
+ __initramfs_end = .;
+ . = ALIGN(32768);
+ __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)
+
+ /*
+ * 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/kernel/vmlinux.lds.S b/arch/arm26/kernel/vmlinux.lds.S
--- a/arch/arm26/kernel/vmlinux.lds.S Mon Sep 8 12:51:05 2003
+++ b/arch/arm26/kernel/vmlinux.lds.S Mon Sep 8 12:51:05 2003
@@ -1,12 +1,12 @@
#include
-#ifdef CONFIG_ROM_KERNEL
+#ifdef CONFIG_XIP_KERNEL
-#include "vmlinux-armo-rom.lds.in"
+#include "vmlinux-arm26-xip.lds.in"
#else
-#include "vmlinux-armo.lds.in"
+#include "vmlinux-arm26.lds.in"
#endif
diff -Nru a/arch/arm26/machine/head.S b/arch/arm26/machine/head.S
--- a/arch/arm26/machine/head.S Mon Sep 8 12:51:05 2003
+++ b/arch/arm26/machine/head.S Mon Sep 8 12:51:05 2003
@@ -24,12 +24,13 @@
ENTRY(stext)
__entry: cmp pc, #0x02000000
ldrlt pc, LC0 @ if 0x01800000, call at 0x02080000
- teq r0, #0 @ Check for old calling method
+ teq r0, #0 @ Check for old calling method
blne oldparams @ Move page if old
adr r0, LC0
- ldmib r0, {r2-r5, sp} @ Setup stack
- mov r0, #0
-1: cmp r2, r3 @ Clear BSS
+ ldmib r0, {r2-r5, sp} @ Setup stack (and fetch other values)
+
+ mov r0, #0 @ Clear BSS
+1: cmp r2, r3
strcc r0, [r2], #4
bcc 1b
@@ -38,6 +39,17 @@
bl detect_arch_type
str r0, [r5]
+#ifdef CONFIG_XIP_KERNEL
+ ldr r3, ETEXT @ data section copy
+ ldr r4, SDATA
+ ldr r5, EDATA
+1:
+ ldr r6, [r3], #4
+ str r6, [r4], #4
+ cmp r4, r5
+ blt 1b
+#endif
+
mov fp, #0
b start_kernel
@@ -47,8 +59,14 @@
.word processor_id @ r4
.word __machine_arch_type @ r5
.word init_thread_union+8192 @ sp
-arm2_id: .long 0x41560200
-arm250_id: .long 0x41560250
+#ifdef CONFIG_XIP_KERNEL
+ETEXT: .word _endtext
+SDATA: .word _sdata
+EDATA: .word __bss_start
+#endif
+
+arm2_id: .long 0x41560200 @ ARM2 and 250 dont have a CPUID
+arm250_id: .long 0x41560250 @ So we create some after probing for them
.align
oldparams: mov r4, #0x02000000
diff -Nru a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c
--- a/arch/arm26/mm/fault.c Mon Sep 8 12:51:04 2003
+++ b/arch/arm26/mm/fault.c Mon Sep 8 12:51:04 2003
@@ -123,7 +123,7 @@
show_pte(tsk->mm, addr);
show_regs(regs);
//dump_backtrace(regs, tsk); // FIXME ARM32 dropped this - why?
- while(1);
+ while(1); //FIXME - hack to stop debug going nutso
#endif
tsk->thread.address = addr;
@@ -212,7 +212,7 @@
tsk = current;
mm = tsk->mm;
- printk("do_page_fault: pid: %d\n", tsk->pid);
+ printk("do_page_fault: pid: %d %08x\n", tsk->pid, addr);
/*
* If we're in an interrupt or have no user
* context, we must not take the fault..
@@ -241,6 +241,7 @@
/*
* If we are in kernel mode at this point, we
* have no context to handle this fault with.
+ * FIXME - is this test right?
*/
if (!user_mode(regs)){
goto no_context;
diff -Nru a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c
--- a/arch/arm26/mm/init.c Mon Sep 8 12:51:06 2003
+++ b/arch/arm26/mm/init.c Mon Sep 8 12:51:06 2003
@@ -32,15 +32,18 @@
#include
#include
-//#include
#include
+
#define TABLE_SIZE PTRS_PER_PTE * sizeof(pte_t))
struct mmu_gather mmu_gathers[NR_CPUS];
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern char _stext, _text, _etext, _end, __init_begin, __init_end;
+#ifdef CONFIG_XIP_KERNEL
+extern char _endtext, _sdata;
+#endif
extern unsigned long phys_initrd_start;
extern unsigned long phys_initrd_size;
@@ -152,6 +155,7 @@
find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
{
unsigned int memend_pfn = 0;
+
numnodes = 1;
np->bootmap_pages = 0;
@@ -187,45 +191,6 @@
}
/*
- * Reserve the various regions of node 0
- */
-static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages)
-{
- pg_data_t *pgdat = NODE_DATA(0);
-
- /*
- * Register the kernel text and data with bootmem.
- * Note that this can only be in node 0.
- */
- reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext);
-
- /*
- * And don't forget to reserve the allocator bitmap,
- * which will be freed later.
- */
- reserve_bootmem_node(pgdat, bootmap_pfn << PAGE_SHIFT,
- bootmap_pages << PAGE_SHIFT);
-
- /*
- * These should likewise go elsewhere. They pre-reserve
- * the screen memory region at the start of main system
- * memory.
- */
- reserve_bootmem_node(pgdat, 0x02000000, 0x00080000);
-
-#ifdef CONFIG_BLK_DEV_INITRD
- initrd_start = phys_initrd_start;
- initrd_end = initrd_start + phys_initrd_size;
-
- /* Achimedes machines only have one node, so initrd is in node 0 */
- reserve_bootmem_node(pgdat, __pa(initrd_start),
- initrd_end - initrd_start);
-#endif
-
-}
-
-
-/*
* Initialise the bootmem allocator for all nodes. This is called
* early during the architecture specific initialisation.
*/
@@ -233,6 +198,7 @@
{
struct node_info node_info;
unsigned int bootmap_pfn;
+ pg_data_t *pgdat = NODE_DATA(0);
find_memend_and_nodes(mi, &node_info);
@@ -247,18 +213,54 @@
/*
* Initialise the bootmem allocator.
*/
- init_bootmem_node(NODE_DATA(node), bootmap_pfn, node_info.start, node_info.end);
+ init_bootmem_node(pgdat, bootmap_pfn, node_info.start, node_info.end);
/*
* Register all available RAM in this node with the bootmem allocator.
*/
- free_bootmem_node(NODE_DATA(node), mi->bank->start, mi->bank->size);
+ free_bootmem_node(pgdat, mi->bank->start, mi->bank->size);
- /*
- * Reserve ram for stuff like initrd, video, kernel, etc.
- */
+ /*
+ * Register the kernel text and data with bootmem.
+ * Note: with XIP we dont register .text since
+ * its in ROM.
+ */
+#ifdef CONFIG_XIP_KERNEL
+ reserve_bootmem_node(pgdat, __pa(&_sdata), &_end - &_sdata);
+#else
+ reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext);
+#endif
+
+ /*
+ * And don't forget to reserve the allocator bitmap,
+ * which will be freed later.
+ */
+ reserve_bootmem_node(pgdat, bootmap_pfn << PAGE_SHIFT,
+ node_info.bootmap_pages << PAGE_SHIFT);
+
+ /*
+ * These should likewise go elsewhere. They pre-reserve
+ * the screen memory region at the start of main system
+ * memory. FIXME - screen RAM is not 512K!
+ */
+ reserve_bootmem_node(pgdat, 0x02000000, 0x00080000);
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ initrd_start = phys_initrd_start;
+ initrd_end = initrd_start + phys_initrd_size;
+
+ /* Achimedes machines only have one node, so initrd is in node 0 */
+#ifdef CONFIG_XIP_KERNEL
+ /* Only reserve initrd space if it is in RAM */
+ if(initrd_start && initrd_start < 0x03000000){
+#else
+ if(initrd_start){
+#endif
+ reserve_bootmem_node(pgdat, __pa(initrd_start),
+ initrd_end - initrd_start);
+ }
+#endif /* CONFIG_BLK_DEV_INITRD */
- reserve_node_zero(bootmap_pfn, node_info.bootmap_pages);
}
@@ -299,16 +301,15 @@
pgdat = NODE_DATA(0);
bdata = pgdat->bdata;
-
zone_size[0] = bdata->node_low_pfn -
(bdata->node_boot_start >> PAGE_SHIFT);
if (!zone_size[0])
BUG();
free_area_init_node(0, pgdat, 0, zone_size,
- bdata->node_boot_start >> PAGE_SHIFT, 0);
+ bdata->node_boot_start >> PAGE_SHIFT, zhole_size);
- mem_map = contig_page_data.node_mem_map;
+ mem_map = NODE_DATA(0)->node_mem_map;
/*
* finish off the bad pages once
@@ -345,8 +346,15 @@
pg_data_t *pgdat = NODE_DATA(0);
extern int sysctl_overcommit_memory;
- datapages = &_end - &_etext;
+
+ /* Note: data pages includes BSS */
+#ifdef CONFIG_XIP_KERNEL
+ codepages = &_endtext - &_text;
+ datapages = &_end - &_sdata;
+#else
codepages = &_etext - &_text;
+ datapages = &_end - &_etext;
+#endif
initpages = &__init_end - &__init_begin;
high_memory = (void *)__va(meminfo.end);
@@ -356,15 +364,14 @@
if (pgdat->node_spanned_pages != 0)
totalram_pages += free_all_bootmem_node(pgdat);
- printk(KERN_INFO "Memory:");
-
num_physpages = meminfo.bank[0].size >> PAGE_SHIFT;
- printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
+ printk(KERN_INFO "Memory: %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
"%dK data, %dK init)\n",
(unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
codepages >> 10, datapages >> 10, initpages >> 10);
+
/*
* Turn on overcommit on tiny machines
*/
@@ -374,11 +381,12 @@
}
}
-void free_initmem(void)
-{
+void free_initmem(void){
+#ifndef CONFIG_XIP_KERNEL
free_area((unsigned long)(&__init_begin),
(unsigned long)(&__init_end),
"init");
+#endif
}
#ifdef CONFIG_BLK_DEV_INITRD
@@ -387,7 +395,12 @@
void free_initrd_mem(unsigned long start, unsigned long end)
{
+#ifdef CONFIG_XIP_KERNEL
+ /* Only bin initrd if it is in RAM... */
+ if(!keep_initrd && start < 0x03000000)
+#else
if (!keep_initrd)
+#endif
free_area(start, end, "initrd");
}
diff -Nru a/arch/arm26/vmlinux-armo.lds.in b/arch/arm26/vmlinux-armo.lds.in
--- a/arch/arm26/vmlinux-armo.lds.in Mon Sep 8 12:51:03 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,128 +0,0 @@
-/* ld script to make ARM Linux kernel
- * taken from the i386 version by Russell King
- * Written by Martin Mares
- * borrowed from Russels ARM port by Ian Molton
- */
-
-#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 = .;
- __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 = .;
- . = ALIGN(32);
- __initramfs_start = .;
- usr/built-in.o(.init.ramfs)
- __initramfs_end = .;
- . = ALIGN(32768);
- __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)
-
- /*
- * 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/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c
--- a/arch/cris/arch-v10/drivers/eeprom.c Mon Sep 8 12:51:04 2003
+++ b/arch/cris/arch-v10/drivers/eeprom.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/cris/arch-v10/drivers/gpio.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/cris/arch-v10/drivers/pcf8563.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/h8300/Kconfig Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/h8300/kernel/setup.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/h8300/platform/h8300h/ints.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/h8300/platform/h8s/ints.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/Kconfig Mon Sep 8 12:51:03 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/boot/Makefile b/arch/i386/boot/Makefile
--- a/arch/i386/boot/Makefile Mon Sep 8 12:51:04 2003
+++ b/arch/i386/boot/Makefile Mon Sep 8 12:51:04 2003
@@ -58,8 +58,7 @@
$(call if_changed,ld)
$(obj)/compressed/vmlinux: FORCE
- $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \
- IMAGE_OFFSET=$(IMAGE_OFFSET) $@
+ $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
# Set this if you want to pass append arguments to the zdisk/fdimage kernel
FDARGS =
diff -Nru a/arch/i386/boot98/Makefile b/arch/i386/boot98/Makefile
--- a/arch/i386/boot98/Makefile Mon Sep 8 12:51:04 2003
+++ b/arch/i386/boot98/Makefile Mon Sep 8 12:51:04 2003
@@ -58,8 +58,7 @@
$(call if_changed,ld)
$(obj)/compressed/vmlinux: FORCE
- $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \
- IMAGE_OFFSET=$(IMAGE_OFFSET) $@
+ $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
# Set this if you want to pass append arguments to the zdisk/fdimage kernel
FDARGS =
diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig
--- a/arch/i386/defconfig Mon Sep 8 12:51:05 2003
+++ b/arch/i386/defconfig Mon Sep 8 12:51:05 2003
@@ -718,7 +718,7 @@
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD_8151 is not set
+# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=y
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
--- a/arch/i386/kernel/Makefile Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/i386/kernel/acpi/boot.c Mon Sep 8 12:51:05 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 Sep 8 12:51:06 2003
+++ b/arch/i386/kernel/apic.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/apm.c Mon Sep 8 12:51:03 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/cpufreq/acpi.c b/arch/i386/kernel/cpu/cpufreq/acpi.c
--- a/arch/i386/kernel/cpu/cpufreq/acpi.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/cpufreq/acpi.c Mon Sep 8 12:51:03 2003
@@ -580,7 +580,7 @@
if (perf->states[i].transition_latency > policy->cpuinfo.transition_latency)
policy->cpuinfo.transition_latency = perf->states[i].transition_latency;
}
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cur = perf->states[pr->limit.state.px].core_frequency * 1000;
/* table init */
diff -Nru a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c
--- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c Mon Sep 8 12:51:04 2003
@@ -216,7 +216,7 @@
}
/* cpuinfo and default policy values */
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = elanfreq_get_cpu_frequency();
diff -Nru a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
--- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c Mon Sep 8 12:51:04 2003
@@ -434,7 +434,7 @@
policy->min = maxfreq / POLICY_MIN_DIV;
policy->max = maxfreq;
policy->cur = curfreq;
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = maxfreq / max_duration;
policy->cpuinfo.max_freq = maxfreq;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c Mon Sep 8 12:51:03 2003
@@ -10,10 +10,11 @@
* +---------------------+----------+---------------------------------+
* | Marketing name | Codename | longhaul version / features. |
* +---------------------+----------+---------------------------------+
- * | Samuel/CyrixIII | C5A | v1 : multipliers only |
+ * | Samuel/CyrixIII | C5A | v1 : multipliers only |
* | Samuel2/C3 | C3E/C5B | v1 : multiplier only |
- * | Ezra | C5C | v2 : multipliers & voltage |
- * | Ezra-T | C5M/C5N | v3 : multipliers, voltage & FSB |
+ * | Ezra | C5C | v2 : multipliers & voltage |
+ * | Ezra-T | C5M | v3 : multipliers, voltage & FSB |
+ * | Nehemiah | C5N | v3 : multipliers, voltage & FSB |
* +---------------------+----------+---------------------------------+
*
* BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
@@ -54,197 +55,6 @@
#define __hlt() __asm__ __volatile__("hlt": : :"memory")
-/*
- * Clock ratio tables.
- * The eblcr ones specify the ratio read from the CPU.
- * The clock_ratio ones specify what to write to the CPU.
- */
-
-/* VIA C3 Samuel 1 & Samuel 2 (stepping 0)*/
-static int __initdata longhaul1_clock_ratio[16] = {
- -1, /* 0000 -> RESERVED */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- -1, /* 0011 -> RESERVED */
- -1, /* 0100 -> RESERVED */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 55, /* 0111 -> 5.5x */
- 60, /* 1000 -> 6.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 50, /* 1011 -> 5.0x */
- 65, /* 1100 -> 6.5x */
- 75, /* 1101 -> 7.5x */
- -1, /* 1110 -> RESERVED */
- -1, /* 1111 -> RESERVED */
-};
-
-static int __initdata samuel1_eblcr[16] = {
- 50, /* 0000 -> RESERVED */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- -1, /* 0011 -> RESERVED */
- 55, /* 0100 -> 5.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- -1, /* 0111 -> RESERVED */
- -1, /* 1000 -> RESERVED */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 60, /* 1011 -> 6.0x */
- -1, /* 1100 -> RESERVED */
- 75, /* 1101 -> 7.5x */
- -1, /* 1110 -> RESERVED */
- 65, /* 1111 -> 6.5x */
-};
-
-/* VIA C3 Samuel2 Stepping 1->15 & VIA C3 Ezra */
-static int __initdata longhaul2_clock_ratio[16] = {
- 100, /* 0000 -> 10.0x */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- 90, /* 0011 -> 9.0x */
- 95, /* 0100 -> 9.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 55, /* 0111 -> 5.5x */
- 60, /* 1000 -> 6.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 50, /* 1011 -> 5.0x */
- 65, /* 1100 -> 6.5x */
- 75, /* 1101 -> 7.5x */
- 85, /* 1110 -> 8.5x */
- 120, /* 1111 -> 12.0x */
-};
-
-static int __initdata samuel2_eblcr[16] = {
- 50, /* 0000 -> 5.0x */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- 100, /* 0011 -> 10.0x */
- 55, /* 0100 -> 5.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 110, /* 0111 -> 11.0x */
- 90, /* 1000 -> 9.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 60, /* 1011 -> 6.0x */
- 120, /* 1100 -> 12.0x */
- 75, /* 1101 -> 7.5x */
- 130, /* 1110 -> 13.0x */
- 65, /* 1111 -> 6.5x */
-};
-
-static int __initdata ezra_eblcr[16] = {
- 50, /* 0000 -> 5.0x */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- 100, /* 0011 -> 10.0x */
- 55, /* 0100 -> 5.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 95, /* 0111 -> 9.5x */
- 90, /* 1000 -> 9.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 60, /* 1011 -> 6.0x */
- 120, /* 1100 -> 12.0x */
- 75, /* 1101 -> 7.5x */
- 85, /* 1110 -> 8.5x */
- 65, /* 1111 -> 6.5x */
-};
-
-/* VIA C5M. */
-static int __initdata longhaul3_clock_ratio[32] = {
- 100, /* 0000 -> 10.0x */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- 90, /* 0011 -> 9.0x */
- 95, /* 0100 -> 9.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 55, /* 0111 -> 5.5x */
- 60, /* 1000 -> 6.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 50, /* 1011 -> 5.0x */
- 65, /* 1100 -> 6.5x */
- 75, /* 1101 -> 7.5x */
- 85, /* 1110 -> 8.5x */
- 120, /* 1111 -> 12.0x */
-
- -1, /* 0000 -> RESERVED (10.0x) */
- 110, /* 0001 -> 11.0x */
- 120, /* 0010 -> 12.0x */
- -1, /* 0011 -> RESERVED (9.0x)*/
- 105, /* 0100 -> 10.5x */
- 115, /* 0101 -> 11.5x */
- 125, /* 0110 -> 12.5x */
- 135, /* 0111 -> 13.5x */
- 140, /* 1000 -> 14.0x */
- 150, /* 1001 -> 15.0x */
- 160, /* 1010 -> 16.0x */
- 130, /* 1011 -> 13.0x */
- 145, /* 1100 -> 14.5x */
- 155, /* 1101 -> 15.5x */
- -1, /* 1110 -> RESERVED (13.0x) */
- -1, /* 1111 -> RESERVED (12.0x) */
-};
-
-static int __initdata c5m_eblcr[32] = {
- 50, /* 0000 -> 5.0x */
- 30, /* 0001 -> 3.0x */
- 40, /* 0010 -> 4.0x */
- 100, /* 0011 -> 10.0x */
- 55, /* 0100 -> 5.5x */
- 35, /* 0101 -> 3.5x */
- 45, /* 0110 -> 4.5x */
- 95, /* 0111 -> 9.5x */
- 90, /* 1000 -> 9.0x */
- 70, /* 1001 -> 7.0x */
- 80, /* 1010 -> 8.0x */
- 60, /* 1011 -> 6.0x */
- 120, /* 1100 -> 12.0x */
- 75, /* 1101 -> 7.5x */
- 85, /* 1110 -> 8.5x */
- 65, /* 1111 -> 6.5x */
-
- -1, /* 0000 -> RESERVED (9.0x) */
- 110, /* 0001 -> 11.0x */
- 120, /* 0010 -> 12.0x */
- -1, /* 0011 -> RESERVED (10.0x)*/
- 135, /* 0100 -> 13.5x */
- 115, /* 0101 -> 11.5x */
- 125, /* 0110 -> 12.5x */
- 105, /* 0111 -> 10.5x */
- 130, /* 1000 -> 13.0x */
- 150, /* 1001 -> 15.0x */
- 160, /* 1010 -> 16.0x */
- 140, /* 1011 -> 14.0x */
- -1, /* 1100 -> RESERVED (12.0x) */
- 155, /* 1101 -> 15.5x */
- -1, /* 1110 -> RESERVED (13.0x) */
- 145, /* 1111 -> 14.5x */
-};
-
-/* Voltage scales. Div by 1000 to get actual voltage. */
-static int __initdata vrm85scales[32] = {
- 1250, 1200, 1150, 1100, 1050, 1800, 1750, 1700,
- 1650, 1600, 1550, 1500, 1450, 1400, 1350, 1300,
- 1275, 1225, 1175, 1125, 1075, 1825, 1775, 1725,
- 1675, 1625, 1575, 1525, 1475, 1425, 1375, 1325,
-};
-
-static int __initdata mobilevrmscales[32] = {
- 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650,
- 1600, 1550, 1500, 1450, 1500, 1350, 1300, -1,
- 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100,
- 1075, 1050, 1025, 1000, 975, 950, 925, -1,
-};
-
/* Clock ratios multiplied by 10 */
static int clock_ratio[32];
static int eblcr_table[32];
@@ -254,18 +64,24 @@
static struct cpufreq_frequency_table *longhaul_table;
-static int longhaul_get_cpu_fsb (void)
+static unsigned int calc_speed (int mult, int fsb)
+{
+ return ((mult/10)*fsb) + ((mult%10)*(fsb/2));
+}
+
+
+static unsigned int longhaul_get_cpu_fsb (void)
{
+ unsigned long lo, hi;
unsigned int eblcr_fsb_table[] = { 66, 133, 100, -1 };
- unsigned long invalue=0,lo, hi;
+ unsigned int invalue=0;
if (fsb == 0) {
rdmsr (MSR_IA32_EBL_CR_POWERON, lo, hi);
invalue = (lo & (1<<18|1<<19)) >>18;
- return eblcr_fsb_table[invalue];
- } else {
- return fsb;
+ fsb = eblcr_fsb_table[invalue];
}
+ return fsb;
}
@@ -292,26 +108,27 @@
static void longhaul_setstate (unsigned int clock_ratio_index)
{
- int vidindex, i;
+ int speed, mult;
struct cpufreq_freqs freqs;
union msr_longhaul longhaul;
union msr_bcr2 bcr2;
- if (clock_ratio[clock_ratio_index] == -1)
+ mult = clock_ratio[clock_ratio_index];
+ if (mult == -1)
return;
- if (((clock_ratio[clock_ratio_index] * fsb * 100) > highest_speed) ||
- ((clock_ratio[clock_ratio_index] * fsb * 100) < lowest_speed))
+ speed = calc_speed (mult, fsb);
+ if ((speed > highest_speed) || (speed < lowest_speed))
return;
- freqs.old = longhaul_get_cpu_mult() * longhaul_get_cpu_fsb() * 100;
- freqs.new = clock_ratio[clock_ratio_index] * fsb * 100;
+ freqs.old = calc_speed (longhaul_get_cpu_mult(), fsb);
+ freqs.new = speed;
freqs.cpu = 0; /* longhaul.c is UP only driver */
-
+
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
- dprintk (KERN_INFO PFX "FSB:%d Mult(x10):%d\n",
- fsb * 100, clock_ratio[clock_ratio_index]);
+ dprintk (KERN_INFO PFX "FSB:%d Mult:%d.%dx\n", fsb,
+ mult/10, mult%10);
switch (longhaul_version) {
case 1:
@@ -329,6 +146,14 @@
wrmsrl (MSR_VIA_BCR2, bcr2.val);
break;
+ /*
+ * Longhaul v2. (Ezra [C5C])
+ * We can scale voltage with this too, but that's currently
+ * disabled until we come up with a decent 'match freq to voltage'
+ * algorithm.
+ * We also need to do the voltage/freq setting in order depending
+ * on the direction of scaling (like we do in powernow-k7.c)
+ */
case 2:
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
@@ -337,39 +162,16 @@
/* We must program the revision key only with values we
* know about, not blindly copy it from 0:3 */
longhaul.bits.RevisionKey = 1;
-
- if (can_scale_voltage) {
- /* PB: TODO fix this up */
- vidindex = (((highest_speed-lowest_speed) / (fsb/2)) -
- ((highest_speed-((clock_ratio[clock_ratio_index] * fsb * 100)/1000)) / (fsb/2)));
- for (i=0;i<32;i++) {
- dprintk (KERN_INFO "VID hunting. Looking for %d, found %d\n",
- minvid+(vidindex*25), voltage_table[i]);
- if (voltage_table[i]==(minvid + (vidindex * 25)))
- break;
- }
- if (i==32)
- goto bad_voltage;
-
- dprintk (KERN_INFO PFX "Desired vid index=%d\n", i);
-#if 0
- longhaul.bits.SoftVID = i;
- longhaul.bits.EnableSoftVID = 1;
-#endif
- }
-/* FIXME: Do voltage and freq seperatly like we do in powernow-k7 */
-bad_voltage:
wrmsrl (MSR_VIA_LONGHAUL, longhaul.val);
__hlt();
- rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
- longhaul.bits.EnableSoftBusRatio = 0;
- if (can_scale_voltage)
- longhaul.bits.EnableSoftVID = 0;
- longhaul.bits.RevisionKey = 1;
- wrmsrl (MSR_VIA_LONGHAUL, longhaul.val);
break;
+ /*
+ * Longhaul v3. (Ezra-T [C5M], Nehemiag [C5N])
+ * This can also do voltage scaling, but see above.
+ * Ezra-T was alleged to do FSB scaling too, but it never worked in practice.
+ */
case 3:
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val);
longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
@@ -378,7 +180,6 @@
/* We must program the revision key only with values we
* know about, not blindly copy it from 0:3 */
longhaul.bits.RevisionKey = 3; /* SoftVID & SoftBSEL */
-
wrmsrl(MSR_VIA_LONGHAUL, longhaul.val);
__hlt();
@@ -403,6 +204,8 @@
unsigned int j, k = 0;
union msr_longhaul longhaul;
+ fsb = longhaul_get_cpu_fsb();
+
switch (longhaul_version) {
case 1:
/* Ugh, Longhaul v1 didn't have the min/max MSRs.
@@ -430,23 +233,25 @@
break;
}
- highest_speed = maxmult * fsb * 100;
- lowest_speed = minmult * fsb * 100;
- dprintk (KERN_INFO PFX "MinMult(x10)=%d MaxMult(x10)=%d\n",
- minmult, maxmult);
- dprintk (KERN_INFO PFX "Lowestspeed=%d Highestspeed=%d\n",
- lowest_speed, highest_speed);
+ dprintk (KERN_INFO PFX "MinMult=%d.%dx MaxMult=%d.%dx\n",
+ minmult/10, minmult%10, maxmult/10, maxmult%10);
+ highest_speed = calc_speed (maxmult, fsb);
+ lowest_speed = calc_speed (minmult,fsb);
+ dprintk (KERN_INFO PFX "FSB: %dMHz Lowestspeed=%dMHz Highestspeed=%dMHz\n",
+ fsb, lowest_speed, highest_speed);
longhaul_table = kmalloc((numscales + 1) * sizeof(struct cpufreq_frequency_table), GFP_KERNEL);
if(!longhaul_table)
return -ENOMEM;
- for (j=0; (j maxmult) || ((unsigned int)clock_ratio[j] < minmult))
+ if (ratio > maxmult || ratio < minmult)
continue;
- longhaul_table[k].frequency= clock_ratio[j] * fsb * 100;
+ longhaul_table[k].frequency = calc_speed (ratio, fsb);
longhaul_table[k].index = (j << 8);
k++;
}
@@ -541,10 +346,12 @@
static int longhaul_cpu_init (struct cpufreq_policy *policy)
{
struct cpuinfo_x86 *c = cpu_data;
+ char *cpuname=NULL;
int ret;
switch (c->x86_model) {
- case 6: /* VIA C3 Samuel C5A */
+ case 6:
+ cpuname = "C3 'Samuel' [C5A]";
longhaul_version=1;
memcpy (clock_ratio, longhaul1_clock_ratio, sizeof(longhaul1_clock_ratio));
memcpy (eblcr_table, samuel1_eblcr, sizeof(samuel1_eblcr));
@@ -553,11 +360,13 @@
case 7: /* C5B / C5C */
switch (c->x86_mask) {
case 0:
+ cpuname = "C3 'Samuel 2' [C5B]";
longhaul_version=1;
memcpy (clock_ratio, longhaul1_clock_ratio, sizeof(longhaul1_clock_ratio));
memcpy (eblcr_table, samuel2_eblcr, sizeof(samuel2_eblcr));
break;
case 1 ... 15:
+ cpuname = "C3 'Ezra' [C5C]";
longhaul_version=2;
memcpy (clock_ratio, longhaul2_clock_ratio, sizeof(longhaul2_clock_ratio));
memcpy (eblcr_table, ezra_eblcr, sizeof(ezra_eblcr));
@@ -565,17 +374,26 @@
}
break;
- case 8: /* C5M/C5N */
- return -ENODEV; // Waiting on updated docs from VIA before this is usable
+ case 8:
+ cpuname = "C3 'Ezra-T [C5M]";
longhaul_version=3;
numscales=32;
memcpy (clock_ratio, longhaul3_clock_ratio, sizeof(longhaul3_clock_ratio));
memcpy (eblcr_table, c5m_eblcr, sizeof(c5m_eblcr));
break;
+ /*
+ case 9:
+ cpuname = "C3 'Nehemiah' [C5N]";
+ longhaul_version=3;
+ numscales=32;
+ */
+ default:
+ cpuname = "Unknown";
+ break;
}
- printk (KERN_INFO PFX "VIA CPU detected. Longhaul version %d supported\n",
- longhaul_version);
+ printk (KERN_INFO PFX "VIA %s CPU detected. Longhaul v%d supported.\n",
+ cpuname, longhaul_version);
if ((longhaul_version==2 || longhaul_version==3) && (dont_scale_voltage==0))
longhaul_setup_voltagescaling();
@@ -584,10 +402,9 @@
if (ret != 0)
return ret;
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-
- policy->cur = (unsigned int) (longhaul_get_cpu_fsb() * longhaul_get_cpu_mult() * 100);
+ policy->cur = calc_speed (longhaul_get_cpu_mult(), fsb);
return cpufreq_frequency_table_cpuinfo(policy, longhaul_table);
}
@@ -604,14 +421,20 @@
{
struct cpuinfo_x86 *c = cpu_data;
- if ((c->x86_vendor != X86_VENDOR_CENTAUR) || (c->x86 !=6) )
+ if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6)
return -ENODEV;
switch (c->x86_model) {
case 6 ... 7:
return cpufreq_register_driver(&longhaul_driver);
case 8:
- return -ENODEV;
+ printk (KERN_INFO PFX "Ezra-T unsupported: Waiting on updated docs "
+ "from VIA before this is usable.\n");
+ break;
+ case 9:
+ printk (KERN_INFO PFX "Nehemiah unsupported: Waiting on working silicon "
+ "from VIA before this is usable.\n");
+ break;
default:
printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n");
}
diff -Nru a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.h Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h Mon Sep 8 12:51:04 2003
@@ -47,3 +47,204 @@
unsigned long long val;
};
+/*
+ * Clock ratio tables. Div/Mod by 10 to get ratio.
+ * The eblcr ones specify the ratio read from the CPU.
+ * The clock_ratio ones specify what to write to the CPU.
+ */
+
+/*
+ * VIA C3 Samuel 1 & Samuel 2 (stepping 0)
+ */
+static int __initdata longhaul1_clock_ratio[16] = {
+ -1, /* 0000 -> RESERVED */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ -1, /* 0011 -> RESERVED */
+ -1, /* 0100 -> RESERVED */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 55, /* 0111 -> 5.5x */
+ 60, /* 1000 -> 6.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 50, /* 1011 -> 5.0x */
+ 65, /* 1100 -> 6.5x */
+ 75, /* 1101 -> 7.5x */
+ -1, /* 1110 -> RESERVED */
+ -1, /* 1111 -> RESERVED */
+};
+
+static int __initdata samuel1_eblcr[16] = {
+ 50, /* 0000 -> RESERVED */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ -1, /* 0011 -> RESERVED */
+ 55, /* 0100 -> 5.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ -1, /* 0111 -> RESERVED */
+ -1, /* 1000 -> RESERVED */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 60, /* 1011 -> 6.0x */
+ -1, /* 1100 -> RESERVED */
+ 75, /* 1101 -> 7.5x */
+ -1, /* 1110 -> RESERVED */
+ 65, /* 1111 -> 6.5x */
+};
+
+/*
+ * VIA C3 Samuel2 Stepping 1->15 & VIA C3 Ezra
+ */
+static int __initdata longhaul2_clock_ratio[16] = {
+ 100, /* 0000 -> 10.0x */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ 90, /* 0011 -> 9.0x */
+ 95, /* 0100 -> 9.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 55, /* 0111 -> 5.5x */
+ 60, /* 1000 -> 6.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 50, /* 1011 -> 5.0x */
+ 65, /* 1100 -> 6.5x */
+ 75, /* 1101 -> 7.5x */
+ 85, /* 1110 -> 8.5x */
+ 120, /* 1111 -> 12.0x */
+};
+
+static int __initdata samuel2_eblcr[16] = {
+ 50, /* 0000 -> 5.0x */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ 100, /* 0011 -> 10.0x */
+ 55, /* 0100 -> 5.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 110, /* 0111 -> 11.0x */
+ 90, /* 1000 -> 9.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 60, /* 1011 -> 6.0x */
+ 120, /* 1100 -> 12.0x */
+ 75, /* 1101 -> 7.5x */
+ 130, /* 1110 -> 13.0x */
+ 65, /* 1111 -> 6.5x */
+};
+
+static int __initdata ezra_eblcr[16] = {
+ 50, /* 0000 -> 5.0x */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ 100, /* 0011 -> 10.0x */
+ 55, /* 0100 -> 5.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 95, /* 0111 -> 9.5x */
+ 90, /* 1000 -> 9.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 60, /* 1011 -> 6.0x */
+ 120, /* 1100 -> 12.0x */
+ 75, /* 1101 -> 7.5x */
+ 85, /* 1110 -> 8.5x */
+ 65, /* 1111 -> 6.5x */
+};
+
+/*
+ * VIA C3 (Ezra-T) [C5M].
+ */
+static int __initdata longhaul3_clock_ratio[32] = {
+ 100, /* 0000 -> 10.0x */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ 90, /* 0011 -> 9.0x */
+ 95, /* 0100 -> 9.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 55, /* 0111 -> 5.5x */
+ 60, /* 1000 -> 6.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 50, /* 1011 -> 5.0x */
+ 65, /* 1100 -> 6.5x */
+ 75, /* 1101 -> 7.5x */
+ 85, /* 1110 -> 8.5x */
+ 120, /* 1111 -> 12.0x */
+
+ -1, /* 0000 -> RESERVED (10.0x) */
+ 110, /* 0001 -> 11.0x */
+ 120, /* 0010 -> 12.0x */
+ -1, /* 0011 -> RESERVED (9.0x)*/
+ 105, /* 0100 -> 10.5x */
+ 115, /* 0101 -> 11.5x */
+ 125, /* 0110 -> 12.5x */
+ 135, /* 0111 -> 13.5x */
+ 140, /* 1000 -> 14.0x */
+ 150, /* 1001 -> 15.0x */
+ 160, /* 1010 -> 16.0x */
+ 130, /* 1011 -> 13.0x */
+ 145, /* 1100 -> 14.5x */
+ 155, /* 1101 -> 15.5x */
+ -1, /* 1110 -> RESERVED (13.0x) */
+ -1, /* 1111 -> RESERVED (12.0x) */
+};
+
+static int __initdata c5m_eblcr[32] = {
+ 50, /* 0000 -> 5.0x */
+ 30, /* 0001 -> 3.0x */
+ 40, /* 0010 -> 4.0x */
+ 100, /* 0011 -> 10.0x */
+ 55, /* 0100 -> 5.5x */
+ 35, /* 0101 -> 3.5x */
+ 45, /* 0110 -> 4.5x */
+ 95, /* 0111 -> 9.5x */
+ 90, /* 1000 -> 9.0x */
+ 70, /* 1001 -> 7.0x */
+ 80, /* 1010 -> 8.0x */
+ 60, /* 1011 -> 6.0x */
+ 120, /* 1100 -> 12.0x */
+ 75, /* 1101 -> 7.5x */
+ 85, /* 1110 -> 8.5x */
+ 65, /* 1111 -> 6.5x */
+
+ -1, /* 0000 -> RESERVED (9.0x) */
+ 110, /* 0001 -> 11.0x */
+ 120, /* 0010 -> 12.0x */
+ -1, /* 0011 -> RESERVED (10.0x)*/
+ 135, /* 0100 -> 13.5x */
+ 115, /* 0101 -> 11.5x */
+ 125, /* 0110 -> 12.5x */
+ 105, /* 0111 -> 10.5x */
+ 130, /* 1000 -> 13.0x */
+ 150, /* 1001 -> 15.0x */
+ 160, /* 1010 -> 16.0x */
+ 140, /* 1011 -> 14.0x */
+ -1, /* 1100 -> RESERVED (12.0x) */
+ 155, /* 1101 -> 15.5x */
+ -1, /* 1110 -> RESERVED (13.0x) */
+ 145, /* 1111 -> 14.5x */
+};
+
+
+/*
+ * Voltage scales. Div/Mod by 1000 to get actual voltage.
+ * Which scale to use depends on the VRM type in use.
+ */
+static int __initdata vrm85scales[32] = {
+ 1250, 1200, 1150, 1100, 1050, 1800, 1750, 1700,
+ 1650, 1600, 1550, 1500, 1450, 1400, 1350, 1300,
+ 1275, 1225, 1175, 1125, 1075, 1825, 1775, 1725,
+ 1675, 1625, 1575, 1525, 1475, 1425, 1375, 1325,
+};
+
+static int __initdata mobilevrmscales[32] = {
+ 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650,
+ 1600, 1550, 1500, 1450, 1500, 1350, 1300, -1,
+ 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100,
+ 1075, 1050, 1025, 1000, 975, 950, 925, -1,
+};
+
diff -Nru a/arch/i386/kernel/cpu/cpufreq/longrun.c b/arch/i386/kernel/cpu/cpufreq/longrun.c
--- a/arch/i386/kernel/cpu/cpufreq/longrun.c Mon Sep 8 12:51:05 2003
+++ b/arch/i386/kernel/cpu/cpufreq/longrun.c Mon Sep 8 12:51:05 2003
@@ -120,7 +120,8 @@
policy->cpuinfo.min_freq,
policy->cpuinfo.max_freq);
- if (policy->policy == CPUFREQ_POLICY_GOVERNOR)
+ if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) &&
+ (policy->policy != CPUFREQ_POLICY_PERFORMANCE))
return -EINVAL;
return 0;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c Mon Sep 8 12:51:05 2003
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c Mon Sep 8 12:51:05 2003
@@ -211,7 +211,7 @@
cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu);
/* cpuinfo and default policy values */
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 1000;
policy->cur = stock_freq;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c Mon Sep 8 12:51:03 2003
@@ -157,7 +157,7 @@
}
/* cpuinfo and default policy values */
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = busfreq * max_multiplier;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c Mon Sep 8 12:51:03 2003
@@ -1,6 +1,7 @@
/*
* AMD K7 Powernow driver.
* (C) 2003 Dave Jones on behalf of SuSE Labs.
+ * (C) 2003 Dave Jones
*
* Licensed under the terms of the GNU GPL License version 2.
* Based upon datasheets & sample CPUs kindly provided by AMD.
@@ -325,6 +326,8 @@
p+=2;
}
}
+ printk (KERN_INFO PFX "No PST tables match this cpuid (0x%x)\n", etuple);
+ printk ("This is indicative of a broken BIOS. Email davej@redhat.com\n");
return -EINVAL;
}
p++;
@@ -372,7 +375,7 @@
printk (KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n",
minimum_speed, maximum_speed);
- policy->policy = CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = latency;
policy->cur = maximum_speed;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Mon Sep 8 12:51:04 2003
@@ -201,9 +201,7 @@
freq = get_cur_freq();
- policy->policy = (freq == centrino_model->max_freq) ?
- CPUFREQ_POLICY_PERFORMANCE :
- CPUFREQ_POLICY_POWERSAVE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 10; /* 10uS transition latency */
policy->cur = freq;
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c Mon Sep 8 12:51:03 2003
@@ -299,8 +299,7 @@
(speed / 1000));
/* cpuinfo and default policy values */
- policy->policy = (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ?
- CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE;
+ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = speed;
@@ -309,7 +308,7 @@
static struct cpufreq_driver speedstep_driver = {
- .name = "speedstep",
+ .name = "speedstep-ich",
.verify = speedstep_verify,
.target = speedstep_target,
.init = speedstep_cpu_init,
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 Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/mtrr/if.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/mtrr/main.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpu/mtrr/mtrr.h Mon Sep 8 12:51:03 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 Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/cpuid.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/mpparse.c Mon Sep 8 12:51:04 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 Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/msr.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/process.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/setup.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:04 2003
+++ b/arch/i386/kernel/time.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/timers/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:06 2003
+++ b/arch/i386/kernel/timers/timer.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:06 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 Sep 8 12:51:05 2003
+++ b/arch/i386/kernel/timers/timer_tsc.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/i386/kernel/traps.c Mon Sep 8 12:51:03 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 Sep 8 12:51:03 2003
+++ b/arch/i386/mach-visws/mpparse.c Mon Sep 8 12:51:03 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 Sep 8 12:51:04 2003
+++ b/arch/i386/mach-voyager/voyager_smp.c Mon Sep 8 12:51:04 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/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c
--- a/arch/i386/pci/pcbios.c Mon Sep 8 12:51:03 2003
+++ b/arch/i386/pci/pcbios.c Mon Sep 8 12:51:03 2003
@@ -430,7 +430,8 @@
"xor %%ah, %%ah\n"
"1:"
: "=a" (ret),
- "=b" (map)
+ "=b" (map),
+ "+m" (opt)
: "0" (PCIBIOS_GET_ROUTING_OPTIONS),
"1" (0),
"D" ((long) &opt),
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig Mon Sep 8 12:51:06 2003
+++ b/arch/ia64/Kconfig Mon Sep 8 12:51:06 2003
@@ -18,6 +18,9 @@
page at and a mailing list at
linux-ia64@linuxia64.org.
+config 64BIT
+ def_bool y
+
config MMU
bool
default y
@@ -234,8 +237,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 +299,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 Mon Sep 8 12:51:03 2003
+++ b/arch/ia64/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ia64/hp/common/sba_iommu.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ia64/ia32/ia32_ioctl.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ia64/ia32/sys_ia32.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/ia64/kernel/acpi.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ia64/kernel/entry.S Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ia64/kernel/fsys.S Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:04 2003
+++ b/arch/ia64/kernel/mca.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:06 2003
+++ b/arch/ia64/kernel/perfmon.c Mon Sep 8 12:51:06 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 Sep 8 12:51:03 2003
+++ b/arch/ia64/kernel/smpboot.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ia64/kernel/sys_ia64.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:06 2003
+++ b/arch/ia64/lib/Makefile Mon Sep 8 12:51:06 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 8 12:51:03 2003
+++ b/arch/ia64/mm/numa.c Mon Sep 8 12:51:03 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 Sep 8 12:51:05 2003
+++ b/arch/ia64/sn/io/drivers/ioconfig_bus.c Mon Sep 8 12:51:05 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/hwgfs/ramfs.c b/arch/ia64/sn/io/hwgfs/ramfs.c
--- a/arch/ia64/sn/io/hwgfs/ramfs.c Mon Sep 8 12:51:05 2003
+++ b/arch/ia64/sn/io/hwgfs/ramfs.c Mon Sep 8 12:51:05 2003
@@ -56,7 +56,7 @@
.memory_backed = 1, /* Does not contribute to dirty memory */
};
-struct inode *hwgfs_get_inode(struct super_block *sb, int mode, dev_t dev)
+static struct inode *hwgfs_get_inode(struct super_block *sb, int mode, dev_t dev)
{
struct inode * inode = new_inode(sb);
@@ -66,7 +66,6 @@
inode->i_gid = current->fsgid;
inode->i_blksize = PAGE_CACHE_SIZE;
inode->i_blocks = 0;
- inode->i_rdev = NODEV;
inode->i_mapping->a_ops = &hwgfs_aops;
inode->i_mapping->backing_dev_info = &hwgfs_backing_dev_info;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
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 Sep 8 12:51:05 2003
+++ b/arch/ia64/sn/io/sn2/shub.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ia64/sn/kernel/setup.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/m68k/Kconfig Mon Sep 8 12:51:05 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/atari/stram.c b/arch/m68k/atari/stram.c
--- a/arch/m68k/atari/stram.c Mon Sep 8 12:51:05 2003
+++ b/arch/m68k/atari/stram.c Mon Sep 8 12:51:05 2003
@@ -34,12 +34,6 @@
#include
-#ifdef CONFIG_STRAM_SWAP
-#define MAJOR_NR Z2RAM_MAJOR
-#define do_z2_request do_stram_request
-#define DEVICE_NR(device) (minor(device))
-#endif
-
#undef DEBUG
#ifdef DEBUG
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 Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 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 Mon Sep 8 12:51: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 Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/m68knommu/Kconfig Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/m68knommu/platform/5206/config.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/m68knommu/platform/5206e/config.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/m68knommu/platform/5249/config.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/m68knommu/platform/5272/config.c Mon Sep 8 12:51:04 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 Sep 8 12:51:04 2003
+++ b/arch/mips/Kconfig Mon Sep 8 12:51:04 2003
@@ -11,6 +11,9 @@
64-bit processing, otherwise say N. You must say Y for kernels for
SGI IP27 (Origin 200 and 2000). If in doubt say N.
+config 64BIT
+ def_bool MIPS64
+
config MIPS32
bool
depends on MIPS64 = 'n'
@@ -1125,31 +1128,6 @@
endmenu
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"
diff -Nru a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c
--- a/arch/mips/au1000/common/dma.c Mon Sep 8 12:51:06 2003
+++ b/arch/mips/au1000/common/dma.c Mon Sep 8 12:51:06 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 Sep 8 12:51:04 2003
+++ b/arch/mips/kernel/ioctl32.c Mon Sep 8 12:51:04 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 Sep 8 12:51:05 2003
+++ b/arch/mips/sibyte/cfe/console.c Mon Sep 8 12:51:05 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 Sep 8 12:51:04 2003
+++ b/arch/mips/sibyte/sb1250/bcm1250_tbprof.c Mon Sep 8 12:51:04 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 Sep 8 12:51:06 2003
+++ b/arch/mips/tx4927/common/tx4927_irq.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:04 2003
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/mips/vr41xx/common/vrc4173.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/parisc/Kconfig Mon Sep 8 12:51:05 2003
@@ -103,6 +103,9 @@
enable this option otherwise. The 64bit kernel is significantly bigger
and slower than the 32bit one.
+config 64BIT
+ def_bool PARISC64
+
config PDC_NARROW
bool "32-bit firmware"
depends on PARISC64
@@ -160,11 +163,6 @@
menu "Executable file formats"
-
-config KCORE_ELF
- bool
- depends on PROC_FS
- default y
source "fs/Kconfig.binfmt"
diff -Nru a/arch/parisc/kernel/ioctl32.c b/arch/parisc/kernel/ioctl32.c
--- a/arch/parisc/kernel/ioctl32.c Mon Sep 8 12:51:03 2003
+++ b/arch/parisc/kernel/ioctl32.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/8260_io/uart.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/8xx_io/cs4218_tdm.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/8xx_io/uart.c Mon Sep 8 12:51:05 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 Sep 8 12:51:06 2003
+++ b/arch/ppc/Kconfig Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:06 2003
+++ b/arch/ppc/boot/common/ns16550.c Mon Sep 8 12:51:06 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 Mon Sep 8 12:51:06 2003
+++ b/arch/ppc/boot/common/util.S Mon Sep 8 12:51:06 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 8 12:51:03 2003
+++ b/arch/ppc/boot/include/of1275.h Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/boot/ld.script Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/ppc/boot/of1275/Makefile Mon Sep 8 12:51:04 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 Sep 8 12:51:06 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 8 12:51:05 2003
+++ b/arch/ppc/boot/of1275/ofinit.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/ppc/boot/openfirmware/Makefile Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/boot/openfirmware/coffmain.c Mon Sep 8 12:51:05 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 8 12:51:05 2003
+++ b/arch/ppc/boot/openfirmware/misc.S Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/boot/simple/Makefile Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/boot/simple/embed_config.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:03 2003
+++ b/arch/ppc/boot/simple/misc-embedded.c Mon Sep 8 12:51:03 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/boot/simple/misc-spruce.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/boot/simple/misc.c Mon Sep 8 12:51:05 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 Mon Sep 8 12:51:04 2003
+++ b/arch/ppc/boot/simple/relocate.S Mon Sep 8 12:51:04 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 Mon Sep 8 12:51:05 2003
+++ b/arch/ppc/boot/utils/mktree.c Mon Sep 8 12:51:05 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=