diff --git a/[refs] b/[refs]
index d145c0801d70..bf18080516b6 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 4a61f17378c2cdd9bd8f34ef8bd7422861d0c1f1
+refs/heads/master: 038b0a6d8d32db934bba6a24e74e76e4e327a94f
diff --git a/trunk/CREDITS b/trunk/CREDITS
index 5329ead9c672..dba3e6334691 100644
--- a/trunk/CREDITS
+++ b/trunk/CREDITS
@@ -2240,12 +2240,6 @@ D: tc: HFSC scheduler
S: Freiburg
S: Germany
-N: Paul E. McKenney
-E: paulmck@us.ibm.com
-W: http://www.rdrop.com/users/paulmck/
-D: RCU and variants
-D: rcutorture module
-
N: Mike McLagan
E: mike.mclagan@linux.org
W: http://www.invlogic.com/~mmclagan
@@ -2987,10 +2981,6 @@ S: 69 rue Dunois
S: 75013 Paris
S: France
-N: Dipankar Sarma
-E: dipankar@in.ibm.com
-D: RCU
-
N: Hannu Savolainen
E: hannu@opensound.com
D: Maintainer of the sound drivers until 2.1.x days.
@@ -3303,12 +3293,6 @@ S: 3 Ballow Crescent
S: MacGregor A.C.T 2615
S: Australia
-N: Josh Triplett
-E: josh@freedesktop.org
-P: 1024D/D0FE7AFB B24A 65C9 1D71 2AC2 DE87 CA26 189B 9946 D0FE 7AFB
-D: rcutorture maintainer
-D: lock annotations, finding and fixing lock bugs
-
N: Winfried Trümper
E: winni@xpilot.org
W: http://www.shop.de/~winni/
@@ -3578,11 +3562,11 @@ S: Fargo, North Dakota 58122
S: USA
N: Steven Whitehouse
-E: steve@chygwyn.com
+E: SteveW@ACM.org
W: http://www.chygwyn.com/~steve
-D: Linux DECnet project
+D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html
D: Minor debugging of other networking protocols.
-D: Misc bug fixes and GFS2 filesystem development
+D: Misc bug fixes and filesystem development
N: Hans-Joachim Widmaier
E: hjw@zvw.de
diff --git a/trunk/Documentation/DocBook/kernel-api.tmpl b/trunk/Documentation/DocBook/kernel-api.tmpl
index 2b5ac604948c..49c745720f47 100644
--- a/trunk/Documentation/DocBook/kernel-api.tmpl
+++ b/trunk/Documentation/DocBook/kernel-api.tmpl
@@ -158,7 +158,6 @@ X!Ilib/string.c
!Emm/filemap.c
!Emm/memory.c
!Emm/vmalloc.c
-!Imm/page_alloc.c
!Emm/mempool.c
!Emm/page-writeback.c
!Emm/truncate.c
diff --git a/trunk/Documentation/DocBook/libata.tmpl b/trunk/Documentation/DocBook/libata.tmpl
index 07a635590b36..c684abf0d3b2 100644
--- a/trunk/Documentation/DocBook/libata.tmpl
+++ b/trunk/Documentation/DocBook/libata.tmpl
@@ -14,7 +14,7 @@
- 2003-2006
+ 2003-2005
Jeff Garzik
diff --git a/trunk/Documentation/RCU/checklist.txt b/trunk/Documentation/RCU/checklist.txt
index f4dffadbcb00..1d50cf0c905e 100644
--- a/trunk/Documentation/RCU/checklist.txt
+++ b/trunk/Documentation/RCU/checklist.txt
@@ -221,41 +221,3 @@ over a rather long period of time, but improvements are always welcome!
disable irq on a given acquisition of that lock will result in
deadlock as soon as the RCU callback happens to interrupt that
acquisition's critical section.
-
-13. SRCU (srcu_read_lock(), srcu_read_unlock(), and synchronize_srcu())
- may only be invoked from process context. Unlike other forms of
- RCU, it -is- permissible to block in an SRCU read-side critical
- section (demarked by srcu_read_lock() and srcu_read_unlock()),
- hence the "SRCU": "sleepable RCU". Please note that if you
- don't need to sleep in read-side critical sections, you should
- be using RCU rather than SRCU, because RCU is almost always
- faster and easier to use than is SRCU.
-
- Also unlike other forms of RCU, explicit initialization
- and cleanup is required via init_srcu_struct() and
- cleanup_srcu_struct(). These are passed a "struct srcu_struct"
- that defines the scope of a given SRCU domain. Once initialized,
- the srcu_struct is passed to srcu_read_lock(), srcu_read_unlock()
- and synchronize_srcu(). A given synchronize_srcu() waits only
- for SRCU read-side critical sections governed by srcu_read_lock()
- and srcu_read_unlock() calls that have been passd the same
- srcu_struct. This property is what makes sleeping read-side
- critical sections tolerable -- a given subsystem delays only
- its own updates, not those of other subsystems using SRCU.
- Therefore, SRCU is less prone to OOM the system than RCU would
- be if RCU's read-side critical sections were permitted to
- sleep.
-
- The ability to sleep in read-side critical sections does not
- come for free. First, corresponding srcu_read_lock() and
- srcu_read_unlock() calls must be passed the same srcu_struct.
- Second, grace-period-detection overhead is amortized only
- over those updates sharing a given srcu_struct, rather than
- being globally amortized as they are for other forms of RCU.
- Therefore, SRCU should be used in preference to rw_semaphore
- only in extremely read-intensive situations, or in situations
- requiring SRCU's read-side deadlock immunity or low read-side
- realtime latency.
-
- Note that, rcu_assign_pointer() and rcu_dereference() relate to
- SRCU just as they do to other forms of RCU.
diff --git a/trunk/Documentation/RCU/rcu.txt b/trunk/Documentation/RCU/rcu.txt
index f84407cba816..02e27bf1d365 100644
--- a/trunk/Documentation/RCU/rcu.txt
+++ b/trunk/Documentation/RCU/rcu.txt
@@ -45,8 +45,7 @@ o How can I see where RCU is currently used in the Linux kernel?
Search for "rcu_read_lock", "rcu_read_unlock", "call_rcu",
"rcu_read_lock_bh", "rcu_read_unlock_bh", "call_rcu_bh",
- "srcu_read_lock", "srcu_read_unlock", "synchronize_rcu",
- "synchronize_net", and "synchronize_srcu".
+ "synchronize_rcu", and "synchronize_net".
o What guidelines should I follow when writing code that uses RCU?
diff --git a/trunk/Documentation/RCU/torture.txt b/trunk/Documentation/RCU/torture.txt
index 25a3c3f7d378..a4948591607d 100644
--- a/trunk/Documentation/RCU/torture.txt
+++ b/trunk/Documentation/RCU/torture.txt
@@ -28,15 +28,6 @@ nreaders This is the number of RCU reading threads supported.
To properly exercise RCU implementations with preemptible
read-side critical sections.
-nfakewriters This is the number of RCU fake writer threads to run. Fake
- writer threads repeatedly use the synchronous "wait for
- current readers" function of the interface selected by
- torture_type, with a delay between calls to allow for various
- different numbers of writers running in parallel.
- nfakewriters defaults to 4, which provides enough parallelism
- to trigger special cases caused by multiple writers, such as
- the synchronize_srcu() early return optimization.
-
stat_interval The number of seconds between output of torture
statistics (via printk()). Regardless of the interval,
statistics are printed when the module is unloaded.
@@ -53,12 +44,9 @@ test_no_idle_hz Whether or not to test the ability of RCU to operate in
a kernel that disables the scheduling-clock interrupt to
idle CPUs. Boolean parameter, "1" to test, "0" otherwise.
-torture_type The type of RCU to test: "rcu" for the rcu_read_lock() API,
- "rcu_sync" for rcu_read_lock() with synchronous reclamation,
- "rcu_bh" for the rcu_read_lock_bh() API, "rcu_bh_sync" for
- rcu_read_lock_bh() with synchronous reclamation, "srcu" for
- the "srcu_read_lock()" API, and "sched" for the use of
- preempt_disable() together with synchronize_sched().
+torture_type The type of RCU to test: "rcu" for the rcu_read_lock()
+ API, "rcu_bh" for the rcu_read_lock_bh() API, and "srcu"
+ for the "srcu_read_lock()" API.
verbose Enable debug printk()s. Default is disabled.
@@ -130,21 +118,6 @@ o "Free-Block Circulation": Shows the number of torture structures
as it is only incremented if a torture structure's counter
somehow gets incremented farther than it should.
-Different implementations of RCU can provide implementation-specific
-additional information. For example, SRCU provides the following:
-
- srcu-torture: rtc: f8cf46a8 ver: 355 tfle: 0 rta: 356 rtaf: 0 rtf: 346 rtmbe: 0
- srcu-torture: Reader Pipe: 559738 939 0 0 0 0 0 0 0 0 0
- srcu-torture: Reader Batch: 560434 243 0 0 0 0 0 0 0 0
- srcu-torture: Free-Block Circulation: 355 354 353 352 351 350 349 348 347 346 0
- srcu-torture: per-CPU(idx=1): 0(0,1) 1(0,1) 2(0,0) 3(0,1)
-
-The first four lines are similar to those for RCU. The last line shows
-the per-CPU counter state. The numbers in parentheses are the values
-of the "old" and "current" counters for the corresponding CPU. The
-"idx" value maps the "old" and "current" values to the underlying array,
-and is useful for debugging.
-
USAGE
diff --git a/trunk/Documentation/RCU/whatisRCU.txt b/trunk/Documentation/RCU/whatisRCU.txt
index e0d6d99b8f9b..820fee236967 100644
--- a/trunk/Documentation/RCU/whatisRCU.txt
+++ b/trunk/Documentation/RCU/whatisRCU.txt
@@ -778,8 +778,6 @@ Markers for RCU read-side critical sections:
rcu_read_unlock
rcu_read_lock_bh
rcu_read_unlock_bh
- srcu_read_lock
- srcu_read_unlock
RCU pointer/list traversal:
@@ -806,7 +804,6 @@ RCU grace period:
synchronize_net
synchronize_sched
synchronize_rcu
- synchronize_srcu
call_rcu
call_rcu_bh
diff --git a/trunk/Documentation/ecryptfs.txt b/trunk/Documentation/ecryptfs.txt
deleted file mode 100644
index 01d8a08351ac..000000000000
--- a/trunk/Documentation/ecryptfs.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-eCryptfs: A stacked cryptographic filesystem for Linux
-
-eCryptfs is free software. Please see the file COPYING for details.
-For documentation, please see the files in the doc/ subdirectory. For
-building and installation instructions please see the INSTALL file.
-
-Maintainer: Phillip Hellewell
-Lead developer: Michael A. Halcrow
-Developers: Michael C. Thompson
- Kent Yoder
-Web Site: http://ecryptfs.sf.net
-
-This software is currently undergoing development. Make sure to
-maintain a backup copy of any data you write into eCryptfs.
-
-eCryptfs requires the userspace tools downloadable from the
-SourceForge site:
-
-http://sourceforge.net/projects/ecryptfs/
-
-Userspace requirements include:
- - David Howells' userspace keyring headers and libraries (version
- 1.0 or higher), obtainable from
- http://people.redhat.com/~dhowells/keyutils/
- - Libgcrypt
-
-
-NOTES
-
-In the beta/experimental releases of eCryptfs, when you upgrade
-eCryptfs, you should copy the files to an unencrypted location and
-then copy the files back into the new eCryptfs mount to migrate the
-files.
-
-
-MOUNT-WIDE PASSPHRASE
-
-Create a new directory into which eCryptfs will write its encrypted
-files (i.e., /root/crypt). Then, create the mount point directory
-(i.e., /mnt/crypt). Now it's time to mount eCryptfs:
-
-mount -t ecryptfs /root/crypt /mnt/crypt
-
-You should be prompted for a passphrase and a salt (the salt may be
-blank).
-
-Try writing a new file:
-
-echo "Hello, World" > /mnt/crypt/hello.txt
-
-The operation will complete. Notice that there is a new file in
-/root/crypt that is at least 12288 bytes in size (depending on your
-host page size). This is the encrypted underlying file for what you
-just wrote. To test reading, from start to finish, you need to clear
-the user session keyring:
-
-keyctl clear @u
-
-Then umount /mnt/crypt and mount again per the instructions given
-above.
-
-cat /mnt/crypt/hello.txt
-
-
-NOTES
-
-eCryptfs version 0.1 should only be mounted on (1) empty directories
-or (2) directories containing files only created by eCryptfs. If you
-mount a directory that has pre-existing files not created by eCryptfs,
-then behavior is undefined. Do not run eCryptfs in higher verbosity
-levels unless you are doing so for the sole purpose of debugging or
-development, since secret values will be written out to the system log
-in that case.
-
-
-Mike Halcrow
-mhalcrow@us.ibm.com
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 24f3c63b3017..42b95e0ad558 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -29,6 +29,14 @@ Who: Adrian Bunk
---------------------------
+What: drivers that were depending on OBSOLETE_OSS_DRIVER
+ (config options already removed)
+When: before 2.6.19
+Why: OSS drivers with ALSA replacements
+Who: Adrian Bunk
+
+---------------------------
+
What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
When: November 2006
Why: Deprecated in favour of the new ioctl-based rawiso interface, which is
diff --git a/trunk/Documentation/filesystems/gfs2.txt b/trunk/Documentation/filesystems/gfs2.txt
deleted file mode 100644
index 593004b6bbab..000000000000
--- a/trunk/Documentation/filesystems/gfs2.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Global File System
-------------------
-
-http://sources.redhat.com/cluster/
-
-GFS is a cluster file system. It allows a cluster of computers to
-simultaneously use a block device that is shared between them (with FC,
-iSCSI, NBD, etc). GFS reads and writes to the block device like a local
-file system, but also uses a lock module to allow the computers coordinate
-their I/O so file system consistency is maintained. One of the nifty
-features of GFS is perfect consistency -- changes made to the file system
-on one machine show up immediately on all other machines in the cluster.
-
-GFS uses interchangable inter-node locking mechanisms. Different lock
-modules can plug into GFS and each file system selects the appropriate
-lock module at mount time. Lock modules include:
-
- lock_nolock -- allows gfs to be used as a local file system
-
- lock_dlm -- uses a distributed lock manager (dlm) for inter-node locking
- The dlm is found at linux/fs/dlm/
-
-In addition to interfacing with an external locking manager, a gfs lock
-module is responsible for interacting with external cluster management
-systems. Lock_dlm depends on user space cluster management systems found
-at the URL above.
-
-To use gfs as a local file system, no external clustering systems are
-needed, simply:
-
- $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
- $ mount -t gfs2 /dev/block_device /dir
-
-GFS2 is not on-disk compatible with previous versions of GFS.
-
-The following man pages can be found at the URL above:
- gfs2_fsck to repair a filesystem
- gfs2_grow to expand a filesystem online
- gfs2_jadd to add journals to a filesystem online
- gfs2_tool to manipulate, examine and tune a filesystem
- gfs2_quota to examine and change quota values in a filesystem
- mount.gfs2 to help mount(8) mount a filesystem
- mkfs.gfs2 to make a filesystem
diff --git a/trunk/Documentation/kbuild/kconfig-language.txt b/trunk/Documentation/kbuild/kconfig-language.txt
index 125093c3ef76..7f34778dd23b 100644
--- a/trunk/Documentation/kbuild/kconfig-language.txt
+++ b/trunk/Documentation/kbuild/kconfig-language.txt
@@ -1,7 +1,7 @@
Introduction
------------
-The configuration database is a collection of configuration options
+The configuration database is collection of configuration options
organized in a tree structure:
+- Code maturity level options
diff --git a/trunk/Documentation/kbuild/makefiles.txt b/trunk/Documentation/kbuild/makefiles.txt
index 50f4eddf899c..e2cbd59cf2d0 100644
--- a/trunk/Documentation/kbuild/makefiles.txt
+++ b/trunk/Documentation/kbuild/makefiles.txt
@@ -390,7 +390,7 @@ more details, with real examples.
The kernel may be built with several different versions of
$(CC), each supporting a unique set of features and options.
kbuild provide basic support to check for valid options for $(CC).
- $(CC) is usually the gcc compiler, but other alternatives are
+ $(CC) is useally the gcc compiler, but other alternatives are
available.
as-option
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index ff571f9298e0..12b3b24bfd2f 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -289,6 +289,9 @@ and is between 256 and 4096 characters. It is defined in the file
autotest [IA64]
+ awe= [HW,OSS] AWE32/SB32/AWE64 wave table synth
+ Format: ,,
+
aztcd= [HW,CD] Aztech CD268 CDROM driver
Format: ,0x79 (?)
@@ -533,6 +536,10 @@ and is between 256 and 4096 characters. It is defined in the file
Default value is 0.
Value can be changed at runtime via /selinux/enforce.
+ es1370= [HW,OSS]
+ Format: [,]
+ See also header of sound/oss/es1370.c.
+
es1371= [HW,OSS]
Format: ,[,[]]
See also header of sound/oss/es1371.c.
@@ -573,6 +580,9 @@ and is between 256 and 4096 characters. It is defined in the file
gscd= [HW,CD]
Format:
+ gus= [HW,OSS]
+ Format: ,,,
+
gvp11= [HW,SCSI]
hashdist= [KNL,NUMA] Large hashes allocated during boot
@@ -831,6 +841,12 @@ and is between 256 and 4096 characters. It is defined in the file
(machvec) in a generic kernel.
Example: machvec=hpzx1_swiotlb
+ mad16= [HW,OSS] Format:
+ ,,,,,,
+
+ maui= [HW,OSS]
+ Format: ,
+
max_loop= [LOOP] Maximum number of loopback devices that can
be mounted
Format: <1-256>
@@ -1098,6 +1114,9 @@ and is between 256 and 4096 characters. It is defined in the file
opl3= [HW,OSS]
Format:
+ opl3sa= [HW,OSS]
+ Format: ,,,,,
+
opl3sa2= [HW,OSS] Format:
,,,,,,,[,,
Run specified binary instead of /init from the ramdisk,
@@ -1432,6 +1455,9 @@ and is between 256 and 4096 characters. It is defined in the file
sg_def_reserved_size= [SCSI]
+ sgalaxy= [HW,OSS]
+ Format: ,,,,
+
shapers= [NET]
Maximal number of shapers.
@@ -1572,6 +1598,9 @@ and is between 256 and 4096 characters. It is defined in the file
snd-ymfpci= [HW,ALSA]
+ sonicvibes= [HW,OSS]
+ Format:
+
sonycd535= [HW,CD]
Format: [,]
diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt
index 27b457c09729..1ccc8a515b44 100644
--- a/trunk/Documentation/powerpc/booting-without-of.txt
+++ b/trunk/Documentation/powerpc/booting-without-of.txt
@@ -1440,258 +1440,6 @@ platforms are moved over to use the flattened-device-tree model.
descriptor-types-mask = <012b0ebf>;
};
- h) Board Control and Status (BCSR)
-
- Required properties:
-
- - device_type : Should be "board-control"
- - reg : Offset and length of the register set for the device
-
- Example:
-
- bcsr@f8000000 {
- device_type = "board-control";
- reg = ;
- };
-
- i) Freescale QUICC Engine module (QE)
- This represents qe module that is installed on PowerQUICC II Pro.
- Hopefully it will merge backward compatibility with CPM/CPM2.
- Basically, it is a bus of devices, that could act more or less
- as a complete entity (UCC, USB etc ). All of them should be siblings on
- the "root" qe node, using the common properties from there.
- The description below applies to the the qe of MPC8360 and
- more nodes and properties would be extended in the future.
-
- i) Root QE device
-
- Required properties:
- - device_type : should be "qe";
- - model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
- - reg : offset and length of the device registers.
- - bus-frequency : the clock frequency for QUICC Engine.
-
- Recommended properties
- - brg-frequency : the internal clock source frequency for baud-rate
- generators in Hz.
-
- Example:
- qe@e0100000 {
- #address-cells = <1>;
- #size-cells = <1>;
- #interrupt-cells = <2>;
- device_type = "qe";
- model = "QE";
- ranges = <0 e0100000 00100000>;
- reg = ;
- brg-frequency = <0>;
- bus-frequency = <179A7B00>;
- }
-
-
- ii) SPI (Serial Peripheral Interface)
-
- Required properties:
- - device_type : should be "spi".
- - compatible : should be "fsl_spi".
- - mode : the spi operation mode, it can be "cpu" or "qe".
- - reg : Offset and length of the register set for the device
- - interrupts : where a is the interrupt number and b is a
- field that represents an encoding of the sense and level
- information for the interrupt. This should be encoded based on
- the information in section 2) depending on the type of interrupt
- controller you have.
- - interrupt-parent : the phandle for the interrupt controller that
- services interrupts for this device.
-
- Example:
- spi@4c0 {
- device_type = "spi";
- compatible = "fsl_spi";
- reg = <4c0 40>;
- interrupts = <82 0>;
- interrupt-parent = <700>;
- mode = "cpu";
- };
-
-
- iii) USB (Universal Serial Bus Controller)
-
- Required properties:
- - device_type : should be "usb".
- - compatible : could be "qe_udc" or "fhci-hcd".
- - mode : the could be "host" or "slave".
- - reg : Offset and length of the register set for the device
- - interrupts : where a is the interrupt number and b is a
- field that represents an encoding of the sense and level
- information for the interrupt. This should be encoded based on
- the information in section 2) depending on the type of interrupt
- controller you have.
- - interrupt-parent : the phandle for the interrupt controller that
- services interrupts for this device.
-
- Example(slave):
- usb@6c0 {
- device_type = "usb";
- compatible = "qe_udc";
- reg = <6c0 40>;
- interrupts = <8b 0>;
- interrupt-parent = <700>;
- mode = "slave";
- };
-
-
- iv) UCC (Unified Communications Controllers)
-
- Required properties:
- - device_type : should be "network", "hldc", "uart", "transparent"
- "bisync" or "atm".
- - compatible : could be "ucc_geth" or "fsl_atm" and so on.
- - model : should be "UCC".
- - device-id : the ucc number(1-8), corresponding to UCCx in UM.
- - reg : Offset and length of the register set for the device
- - interrupts : where a is the interrupt number and b is a
- field that represents an encoding of the sense and level
- information for the interrupt. This should be encoded based on
- the information in section 2) depending on the type of interrupt
- controller you have.
- - interrupt-parent : the phandle for the interrupt controller that
- services interrupts for this device.
- - pio-handle : The phandle for the Parallel I/O port configuration.
- - rx-clock : represents the UCC receive clock source.
- 0x00 : clock source is disabled;
- 0x1~0x10 : clock source is BRG1~BRG16 respectively;
- 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
- - tx-clock: represents the UCC transmit clock source;
- 0x00 : clock source is disabled;
- 0x1~0x10 : clock source is BRG1~BRG16 respectively;
- 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
-
- Required properties for network device_type:
- - mac-address : list of bytes representing the ethernet address.
- - phy-handle : The phandle for the PHY connected to this controller.
-
- Example:
- ucc@2000 {
- device_type = "network";
- compatible = "ucc_geth";
- model = "UCC";
- device-id = <1>;
- reg = <2000 200>;
- interrupts = ;
- interrupt-parent = <700>;
- mac-address = [ 00 04 9f 00 23 23 ];
- rx-clock = "none";
- tx-clock = "clk9";
- phy-handle = <212000>;
- pio-handle = <140001>;
- };
-
-
- v) Parallel I/O Ports
-
- This node configures Parallel I/O ports for CPUs with QE support.
- The node should reside in the "soc" node of the tree. For each
- device that using parallel I/O ports, a child node should be created.
- See the definition of the Pin configuration nodes below for more
- information.
-
- Required properties:
- - device_type : should be "par_io".
- - reg : offset to the register set and its length.
- - num-ports : number of Parallel I/O ports
-
- Example:
- par_io@1400 {
- reg = <1400 100>;
- #address-cells = <1>;
- #size-cells = <0>;
- device_type = "par_io";
- num-ports = <7>;
- ucc_pin@01 {
- ......
- };
-
-
- vi) Pin configuration nodes
-
- Required properties:
- - linux,phandle : phandle of this node; likely referenced by a QE
- device.
- - pio-map : array of pin configurations. Each pin is defined by 6
- integers. The six numbers are respectively: port, pin, dir,
- open_drain, assignment, has_irq.
- - port : port number of the pin; 0-6 represent port A-G in UM.
- - pin : pin number in the port.
- - dir : direction of the pin, should encode as follows:
-
- 0 = The pin is disabled
- 1 = The pin is an output
- 2 = The pin is an input
- 3 = The pin is I/O
-
- - open_drain : indicates the pin is normal or wired-OR:
-
- 0 = The pin is actively driven as an output
- 1 = The pin is an open-drain driver. As an output, the pin is
- driven active-low, otherwise it is three-stated.
-
- - assignment : function number of the pin according to the Pin Assignment
- tables in User Manual. Each pin can have up to 4 possible functions in
- QE and two options for CPM.
- - has_irq : indicates if the pin is used as source of exteral
- interrupts.
-
- Example:
- ucc_pin@01 {
- linux,phandle = <140001>;
- pio-map = <
- /* port pin dir open_drain assignment has_irq */
- 0 3 1 0 1 0 /* TxD0 */
- 0 4 1 0 1 0 /* TxD1 */
- 0 5 1 0 1 0 /* TxD2 */
- 0 6 1 0 1 0 /* TxD3 */
- 1 6 1 0 3 0 /* TxD4 */
- 1 7 1 0 1 0 /* TxD5 */
- 1 9 1 0 2 0 /* TxD6 */
- 1 a 1 0 2 0 /* TxD7 */
- 0 9 2 0 1 0 /* RxD0 */
- 0 a 2 0 1 0 /* RxD1 */
- 0 b 2 0 1 0 /* RxD2 */
- 0 c 2 0 1 0 /* RxD3 */
- 0 d 2 0 1 0 /* RxD4 */
- 1 1 2 0 2 0 /* RxD5 */
- 1 0 2 0 2 0 /* RxD6 */
- 1 4 2 0 2 0 /* RxD7 */
- 0 7 1 0 1 0 /* TX_EN */
- 0 8 1 0 1 0 /* TX_ER */
- 0 f 2 0 1 0 /* RX_DV */
- 0 10 2 0 1 0 /* RX_ER */
- 0 0 2 0 1 0 /* RX_CLK */
- 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
- 2 8 2 0 1 0>; /* GTX125 - CLK9 */
- };
-
- vii) Multi-User RAM (MURAM)
-
- Required properties:
- - device_type : should be "muram".
- - mode : the could be "host" or "slave".
- - ranges : Should be defined as specified in 1) to describe the
- translation of MURAM addresses.
- - data-only : sub-node which defines the address area under MURAM
- bus that can be allocated as data/parameter
-
- Example:
-
- muram@10000 {
- device_type = "muram";
- ranges = <0 00010000 0000c000>;
-
- data-only@0{
- reg = <0 c000>;
- };
- };
More devices will be defined as this spec matures.
diff --git a/trunk/Documentation/sound/oss/AWE32 b/trunk/Documentation/sound/oss/AWE32
new file mode 100644
index 000000000000..b5908a66ff55
--- /dev/null
+++ b/trunk/Documentation/sound/oss/AWE32
@@ -0,0 +1,76 @@
+ Installing and using Creative AWE midi sound under Linux.
+
+This documentation is devoted to the Creative Sound Blaster AWE32, AWE64 and
+SB32.
+
+1) Make sure you have an ORIGINAL Creative SB32, AWE32 or AWE64 card. This
+ is important, because the driver works only with real Creative cards.
+
+2) The first thing you need to do is re-compile your kernel with support for
+ your sound card. Run your favourite tool to configure the kernel and when
+ you get to the "Sound" menu you should enable support for the following:
+
+ Sound card support,
+ OSS sound modules,
+ 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support,
+ AWE32 synth
+
+ If your card is "Plug and Play" you will also need to enable these two
+ options, found under the "Plug and Play configuration" menu:
+
+ Plug and Play support
+ ISA Plug and Play support
+
+ Now compile and install the kernel in normal fashion. If you don't know
+ how to do this you can find instructions for this in the README file
+ located in the root directory of the kernel source.
+
+3) Before you can start playing midi files you will have to load a sound
+ bank file. The utility needed for doing this is called "sfxload", and it
+ is one of the utilities found in a package called "awesfx". If this
+ package is not available in your distribution you can download the AWE
+ snapshot from Creative Labs Open Source website:
+
+ http://www.opensource.creative.com/snapshot.html
+
+ Once you have unpacked the AWE snapshot you will see a "awesfx"
+ directory. Follow the instructions in awesfx/docs/INSTALL to install the
+ utilities in this package. After doing this, sfxload should be installed
+ as:
+
+ /usr/local/bin/sfxload
+
+ To enable AWE general midi synthesis you should also get the sound bank
+ file for general midi from:
+
+ http://members.xoom.com/yar/synthgm.sbk.gz
+
+ Copy it to a directory of your choice, and unpack it there.
+
+4) Edit /etc/modprobe.conf, and insert the following lines at the end of the
+ file:
+
+ alias sound-slot-0 sb
+ alias sound-service-0-1 awe_wave
+ install awe_wave /sbin/modprobe --first-time -i awe_wave && /usr/local/bin/sfxload PATH_TO_SOUND_BANK_FILE
+
+ You will of course have to change "PATH_TO_SOUND_BANK_FILE" to the full
+ path of the sound bank file. That will enable the Sound Blaster and AWE
+ wave synthesis. To play midi files you should get one of these programs if
+ you don't already have them:
+
+ Playmidi: http://playmidi.openprojects.net
+
+ AWEMidi Player (drvmidi) Included in the previously mentioned AWE
+ snapshot.
+
+ You will probably have to pass the "-e" switch to playmidi to have it use
+ your midi device. drvmidi should work without switches.
+
+ If something goes wrong please e-mail me. All comments and suggestions are
+ welcome.
+
+ Yaroslav Rosomakho (alons55@dialup.ptt.ru)
+ http://www.yar.opennet.ru
+
+Last Updated: Feb 3 2001
diff --git a/trunk/Documentation/sound/oss/CMI8338 b/trunk/Documentation/sound/oss/CMI8338
new file mode 100644
index 000000000000..387d058c3f95
--- /dev/null
+++ b/trunk/Documentation/sound/oss/CMI8338
@@ -0,0 +1,85 @@
+Audio driver for CM8338/CM8738 chips by Chen-Li Tien
+
+
+HARDWARE SUPPORTED
+================================================================================
+C-Media CMI8338
+C-Media CMI8738
+On-board C-Media chips
+
+
+STEPS TO BUILD DRIVER
+================================================================================
+
+ 1. Backup the Config.in and Makefile in the sound driver directory
+ (/usr/src/linux/driver/sound).
+ The Configure.help provide help when you config driver in step
+ 4, please backup the original one (/usr/src/linux/Document) and
+ copy this file.
+ The cmpci is document for the driver in detail, please copy it
+ to /usr/src/linux/Document/sound so you can refer it. Backup if
+ there is already one.
+
+ 2. Extract the tar file by 'tar xvzf cmpci-xx.tar.gz' in the above
+ directory.
+
+ 3. Change directory to /usr/src/linux
+
+ 4. Config cm8338 driver by 'make menuconfig', 'make config' or
+ 'make xconfig' command.
+
+ 5. Please select Sound Card (CONFIG_SOUND=m) support and CMPCI
+ driver (CONFIG_SOUND_CMPCI=m) as modules. Resident mode not tested.
+ For driver option, please refer 'DRIVER PARAMETER'
+
+ 6. Compile the kernel if necessary.
+
+ 7. Compile the modules by 'make modules'.
+
+ 8. Install the modules by 'make modules_install'
+
+
+INSTALL DRIVER
+================================================================================
+
+ 1. Before first time to run the driver, create module dependency by
+ 'depmod -a'
+
+ 2. To install the driver manually, enter 'modprobe cmpci'.
+
+ 3. Driver installation for various distributions:
+
+ a. Slackware 4.0
+ Add the 'modprobe cmpci' command in your /etc/rc.d/rc.modules
+ file.so you can start the driver automatically each time booting.
+
+ b. Caldera OpenLinux 2.2
+ Use LISA to load the cmpci module.
+
+ c. RedHat 6.0 and S.u.S.E. 6.1
+ Add following command in /etc/conf.modules:
+
+ alias sound cmpci
+
+ also visit http://www.cmedia.com.tw for installation instruction.
+
+DRIVER PARAMETER
+================================================================================
+
+ Some functions for the cm8738 can be configured in Kernel Configuration
+ or modules parameters. Set these parameters to 1 to enable.
+
+ mpuio: I/O ports base for MPU-401, 0 if disabled.
+ fmio: I/O ports base for OPL-3, 0 if disabled.
+ spdif_inverse:Inverse the S/PDIF-in signal, this depends on your
+ CD-ROM or DVD-ROM.
+ spdif_loop: Enable S/PDIF loop, this route S/PDIF-in to S/PDIF-out
+ directly.
+ speakers: Number of speakers used.
+ use_line_as_rear:Enable this if you want to use line-in as
+ rear-out.
+ use_line_as_bass:Enable this if you want to use line-in as
+ bass-out.
+ joystick: Enable joystick. You will need to install Linux joystick
+ driver.
+
diff --git a/trunk/Documentation/sound/oss/INSTALL.awe b/trunk/Documentation/sound/oss/INSTALL.awe
new file mode 100644
index 000000000000..310f42ca1e83
--- /dev/null
+++ b/trunk/Documentation/sound/oss/INSTALL.awe
@@ -0,0 +1,134 @@
+================================================================
+ INSTALLATION OF AWE32 SOUND DRIVER FOR LINUX
+ Takashi Iwai
+================================================================
+
+----------------------------------------------------------------
+* Attention to SB-PnP Card Users
+
+If you're using PnP cards, the initialization of PnP is required
+before loading this driver. You have now three options:
+ 1. Use isapnptools.
+ 2. Use in-kernel isapnp support.
+ 3. Initialize PnP on DOS/Windows, then boot linux by loadlin.
+In this document, only the case 1 case is treated.
+
+----------------------------------------------------------------
+* Installation on Red Hat 5.0 Sound Driver
+
+Please use install-rh.sh under RedHat5.0 directory.
+DO NOT USE install.sh below.
+See INSTALL.RH for more details.
+
+----------------------------------------------------------------
+* Installation/Update by Shell Script
+
+ 1. Become root
+
+ % su
+
+ 2. If you have never configured the kernel tree yet, run make config
+ once (to make dependencies and symlinks).
+
+ # cd /usr/src/linux
+ # make xconfig
+
+ 3. Run install.sh script
+
+ # sh ./install.sh
+
+ 4. Configure your kernel
+
+ (for Linux 2.[01].x user)
+ # cd /usr/src/linux
+ # make xconfig (or make menuconfig)
+
+ (for Linux 1.2.x user)
+ # cd /usr/src/linux
+ # make config
+
+ Answer YES to both "lowlevel drivers" and "AWE32 wave synth" items
+ in Sound menu. ("lowlevel drivers" will appear only in 2.x
+ kernel.)
+
+ 5. Make your kernel (and modules), and install them as usual.
+
+ 5a. make kernel image
+ # make zImage
+
+ 5b. make modules and install them
+ # make modules && make modules_install
+
+ 5c. If you're using lilo, copy the kernel image and run lilo.
+ Otherwise, copy the kernel image to suitable directory or
+ media for your system.
+
+ 6. Reboot the kernel if necessary.
+ - If you updated only the modules, you don't have to reboot
+ the system. Just remove the old sound modules here.
+ in
+ # rmmod sound.o (linux-2.0 or OSS/Free)
+ # rmmod awe_wave.o (linux-2.1)
+
+ 7. If your AWE card is a PnP and not initialized yet, you'll have to
+ do it by isapnp tools. Otherwise, skip to 8.
+
+ This section described only a brief explanation. For more
+ details, please see the AWE64-Mini-HOWTO or isapnp tools FAQ.
+
+ 7a. If you have no isapnp.conf file, generate it by pnpdump.
+ Otherwise, skip to 7d.
+ # pnpdump > /etc/isapnp.conf
+
+ 7b. Edit isapnp.conf file. Comment out the appropriate
+ lines containing desirable I/O ports, DMA and IRQs.
+ Don't forget to enable (ACT Y) line.
+
+ 7c. Add two i/o ports (0xA20 and 0xE20) in WaveTable part.
+ ex)
+ (CONFIGURE CTL0048/58128 (LD 2
+ # ANSI string -->WaveTable<--
+ (IO 0 (BASE 0x0620))
+ (IO 1 (BASE 0x0A20))
+ (IO 2 (BASE 0x0E20))
+ (ACT Y)
+ ))
+
+ 7d. Load the config file.
+ CAUTION: This will reset all PnP cards!
+
+ # isapnp /etc/isapnp.conf
+
+ 8. Load the sound module (if you configured it as a module):
+
+ for 2.0 kernel or OSS/Free monolithic module:
+
+ # modprobe sound.o
+
+ for 2.1 kernel:
+
+ # modprobe sound
+ # insmod uart401
+ # insmod sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
+ (These values depend on your settings.)
+ # insmod awe_wave
+ (Be sure to load awe_wave after sb!)
+
+ See Documentation/sound/oss/AWE32 for
+ more details.
+
+ 9. (only for obsolete systems) If you don't have /dev/sequencer
+ device file, make it according to Readme.linux file on
+ /usr/src/linux/drivers/sound. (Run a shell script included in
+ that file). <-- This file no longer exists in the recent kernels!
+
+ 10. OK, load your own soundfont file, and enjoy MIDI!
+
+ % sfxload synthgm.sbk
+ % drvmidi foo.mid
+
+ 11. For more advanced use (eg. dynamic loading, virtual bank and
+ etc.), please read the awedrv FAQ or the instructions in awesfx
+ and awemidi packages.
+
+Good luck!
diff --git a/trunk/Documentation/sound/oss/MAD16 b/trunk/Documentation/sound/oss/MAD16
new file mode 100644
index 000000000000..865dbd848742
--- /dev/null
+++ b/trunk/Documentation/sound/oss/MAD16
@@ -0,0 +1,56 @@
+(This recipe has been edited to update the configuration symbols,
+ and change over to modprobe.conf for 2.6)
+
+From: Shaw Carruthers
+
+I have been using mad16 sound for some time now with no problems, current
+kernel 2.1.89
+
+lsmod shows:
+
+mad16 5176 0
+sb 22044 0 [mad16]
+uart401 5576 0 [mad16 sb]
+ad1848 14176 1 [mad16]
+sound 61928 0 [mad16 sb uart401 ad1848]
+
+.config has:
+
+CONFIG_SOUND=m
+CONFIG_SOUND_ADLIB=m
+CONFIG_SOUND_MAD16=m
+CONFIG_SOUND_YM3812=m
+
+modprobe.conf has:
+
+alias char-major-14-* mad16
+options sb mad16=1
+options mad16 io=0x530 irq=7 dma=0 dma16=1 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
+
+
+To get the built in mixer to work this needs to be:
+
+options adlib_card io=0x388 # FM synthesizer
+options sb mad16=1
+options mad16 io=0x530 irq=7 dma=0 dma16=1 mpu_io=816 mpu_irq=5 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
+
+The addition of the "mpu_io=816 mpu_irq=5" to the mad16 options line is
+
+------------------------------------------------------------------------
+The mad16 module in addition supports the following options:
+
+option: meaning: default:
+joystick=0,1 disabled, enabled disabled
+cdtype=0x00,0x02,0x04, disabled, Sony CDU31A, disabled
+ 0x06,0x08,0x0a Mitsumi, Panasonic,
+ Secondary IDE, Primary IDE
+cdport=0x340,0x320, 0x340
+ 0x330,0x360
+cdirq=0,3,5,7,9,10,11 disabled, IRQ3, ... disabled
+cddma=0,5,6,7 disabled, DMA5, ... DMA5 for Mitsumi or IDE
+cddma=0,1,2,3 disabled, DMA1, ... DMA3 for Sony or Panasonic
+opl4=0,1 OPL3, OPL4 OPL3
+
+for more details see linux/drivers/sound/mad16.c
+
+Rui Sousa
diff --git a/trunk/Documentation/sound/oss/Maestro b/trunk/Documentation/sound/oss/Maestro
new file mode 100644
index 000000000000..4a80eb3f8e00
--- /dev/null
+++ b/trunk/Documentation/sound/oss/Maestro
@@ -0,0 +1,123 @@
+ An OSS/Lite Driver for the ESS Maestro family of sound cards
+
+ Zach Brown, December 1999
+
+Driver Status and Availability
+------------------------------
+
+The most recent version of this driver will hopefully always be available at
+ http://www.zabbo.net/maestro/
+
+I will try and maintain the most recent stable version of the driver
+in both the stable and development kernel lines.
+
+ESS Maestro Chip Family
+-----------------------
+
+There are 3 main variants of the ESS Maestro PCI sound chip. The first
+is the Maestro 1. It was originally produced by Platform Tech as the
+'AGOGO'. It can be recognized by Platform Tech's PCI ID 0x1285 with
+0x0100 as the device ID. It was put on some sound boards and a few laptops.
+ESS bought the design and cleaned it up as the Maestro 2. This starts
+their marking with the ESS vendor ID 0x125D and the 'year' device IDs.
+The Maestro 2 claims 0x1968 while the Maestro 2e has 0x1978.
+
+The various families of Maestro are mostly identical as far as this
+driver is concerned. It doesn't touch the DSP parts that differ (though
+it could for FM synthesis).
+
+Driver OSS Behavior
+--------------------
+
+This OSS driver exports /dev/mixer and /dev/dsp to applications, which
+mostly adhere to the OSS spec. This driver doesn't register itself
+with /dev/sndstat, so don't expect information to appear there.
+
+The /dev/dsp device exported behaves almost as expected. Playback is
+supported in all the various lovely formats. 8/16bit stereo/mono from
+8khz to 48khz, and mmap()ing for playback behaves. Capture/recording
+is limited due to oddities with the Maestro hardware. One can only
+record in 16bit stereo. For recording the maestro uses non interleaved
+stereo buffers so that mmap()ing the incoming data does not result in
+a ring buffer of LRLR data. mmap()ing of the read buffers is therefore
+disallowed until this can be cleaned up.
+
+/dev/mixer is an interface to the AC'97 codec on the Maestro. It is
+worth noting that there are a variety of AC'97s that can be wired to
+the Maestro. Which is used is entirely up to the hardware implementor.
+This should only be visible to the user by the presence, or lack, of
+'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
+
+The driver doesn't support MIDI or FM playback at the moment. Typically
+the Maestro is wired to an MPU MIDI chip, but some hardware implementations
+don't. We need to assemble a white list of hardware implementations that
+have MIDI wired properly before we can claim to support it safely.
+
+Compiling and Installing
+------------------------
+
+With the drivers inclusion into the kernel, compiling and installing
+is the same as most OSS/Lite modular sound drivers. Compilation
+of the driver is enabled through the CONFIG_SOUND_MAESTRO variable
+in the config system.
+
+It may be modular or statically linked. If it is modular it should be
+installed with the rest of the modules for the kernel on the system.
+Typically this will be in /lib/modules/ somewhere. 'alias sound maestro'
+should also be added to your module configs (typically /etc/conf.modules)
+if you're using modular OSS/Lite sound and want to default to using a
+maestro chip.
+
+As this is a PCI device, the module does not need to be informed of
+any IO or IRQ resources it should use, it devines these from the
+system. Sometimes, on sucky PCs, the BIOS fails to allocated resources
+for the maestro. This will result in a message like:
+ maestro: PCI subsystem reports IRQ 0, this might not be correct.
+from the kernel. Should this happen the sound chip most likely will
+not operate correctly. To solve this one has to dig through their BIOS
+(typically entered by hitting a hot key at boot time) and figure out
+what magic needs to happen so that the BIOS will reward the maestro with
+an IRQ. This operation is incredibly system specific, so you're on your
+own. Sometimes the magic lies in 'PNP Capable Operating System' settings.
+
+There are very few options to the driver. One is 'debug' which will
+tell the driver to print minimal debugging information as it runs. This
+can be collected with 'dmesg' or through the klogd daemon.
+
+The other, more interesting option, is 'dsps_order'. Typically at
+install time the driver will only register one available /dev/dsp device
+for its use. The 'dsps_order' module parameter allows for more devices
+to be allocated, as a power of two. Up to 4 devices can be registered
+( dsps_order=2 ). These devices act as fully distinct units and use
+separate channels in the maestro.
+
+Power Management
+----------------
+
+As of version 0.14, this driver has a minimal understanding of PCI
+Power Management. If it finds a valid power management capability
+on the PCI device it will attempt to use the power management
+functions of the maestro. It will only do this on Maestro 2Es and
+only on machines that are known to function well. You can
+force the use of power management by setting the 'use_pm' module
+option to 1, or can disable it entirely by setting it to 0.
+
+When using power management, the driver does a few things
+differently. It will keep the chip in a lower power mode
+when the module is inserted but /dev/dsp is not open. This
+allows the mixer to function but turns off the clocks
+on other parts of the chip. When /dev/dsp is opened the chip
+is brought into full power mode, and brought back down
+when it is closed. It also powers down the chip entirely
+when the module is removed or the machine is shutdown. This
+can have nonobvious consequences. CD audio may not work
+after a power managing driver is removed. Also, software that
+doesn't understand power management may not be able to talk
+to the powered down chip until the machine goes through a hard
+reboot to bring it back.
+
+.. more details ..
+------------------
+
+drivers/sound/maestro.c contains comments that hopefully explain
+the maestro implementation.
diff --git a/trunk/Documentation/sound/oss/Maestro3 b/trunk/Documentation/sound/oss/Maestro3
new file mode 100644
index 000000000000..a113718e8034
--- /dev/null
+++ b/trunk/Documentation/sound/oss/Maestro3
@@ -0,0 +1,92 @@
+ An OSS/Lite Driver for the ESS Maestro3 family of sound chips
+
+ Zach Brown, January 2001
+
+Driver Status and Availability
+------------------------------
+
+The most recent version of this driver will hopefully always be available at
+ http://www.zabbo.net/maestro3/
+
+I will try and maintain the most recent stable version of the driver
+in both the stable and development kernel lines.
+
+Historically I've sucked pretty hard at actually doing that, however.
+
+ESS Maestro3 Chip Family
+-----------------------
+
+The 'Maestro3' is much like the Maestro2 chip. The noted improvement
+is the removal of the silicon in the '2' that did PCM mixing. All that
+work is now done through a custom DSP called the ASSP, the Asynchronus
+Specific Signal Processor.
+
+The 'Allegro' is a baby version of the Maestro3. I'm not entirely clear
+on the extent of the differences, but the driver supports them both :)
+
+The 'Allegro' shows up as PCI ID 0x1988 and the Maestro3 as 0x1998,
+both under ESS's vendor ID of 0x125D. The Maestro3 can also show up as
+0x199a when hardware strapping is used.
+
+The chip can also act as a multi function device. The modem IDs follow
+the audio multimedia device IDs. (so the modem part of an Allegro shows
+up as 0x1989)
+
+Driver OSS Behavior
+--------------------
+
+This OSS driver exports /dev/mixer and /dev/dsp to applications, which
+mostly adhere to the OSS spec. This driver doesn't register itself
+with /dev/sndstat, so don't expect information to appear there.
+
+The /dev/dsp device exported behaves as expected. Playback is
+supported in all the various lovely formats. 8/16bit stereo/mono from
+8khz to 48khz, with both read()/write(), and mmap().
+
+/dev/mixer is an interface to the AC'97 codec on the Maestro3. It is
+worth noting that there are a variety of AC'97s that can be wired to
+the Maestro3. Which is used is entirely up to the hardware implementor.
+This should only be visible to the user by the presence, or lack, of
+'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
+The Allegro has an onchip AC'97.
+
+The driver doesn't support MIDI or FM playback at the moment.
+
+Compiling and Installing
+------------------------
+
+With the drivers inclusion into the kernel, compiling and installing
+is the same as most OSS/Lite modular sound drivers. Compilation
+of the driver is enabled through the CONFIG_SOUND_MAESTRO3 variable
+in the config system.
+
+It may be modular or statically linked. If it is modular it should be
+installed with the rest of the modules for the kernel on the system.
+Typically this will be in /lib/modules/ somewhere. 'alias sound-slot-0
+maestro3' should also be added to your module configs (typically
+/etc/modprobe.conf) if you're using modular OSS/Lite sound and want to
+default to using a maestro3 chip.
+
+There are very few options to the driver. One is 'debug' which will
+tell the driver to print minimal debugging information as it runs. This
+can be collected with 'dmesg' or through the klogd daemon.
+
+One is 'external_amp', which tells the driver to attempt to enable
+an external amplifier. This defaults to '1', you can tell the driver
+not to bother enabling such an amplifier by setting it to '0'.
+
+And the last is 'gpio_pin', which tells the driver which GPIO pin number
+the external amp uses (0-15), The Allegro uses 8 by default, all others 1.
+If everything loads correctly and seems to be working but you get no sound,
+try tweaking this value.
+
+Systems known to need a different value
+ Panasonic ToughBook CF-72: gpio_pin=13
+
+Power Management
+----------------
+
+This driver has a minimal understanding of PCI Power Management. It will
+try and power down the chip when the system is suspended, and power
+it up with it is resumed. It will also try and power down the chip
+when the machine is shut down.
diff --git a/trunk/Documentation/sound/oss/NEWS b/trunk/Documentation/sound/oss/NEWS
new file mode 100644
index 000000000000..a81e0ef72ae9
--- /dev/null
+++ b/trunk/Documentation/sound/oss/NEWS
@@ -0,0 +1,42 @@
+Linux 2.4 Sound Changes
+2000-September-25
+Christoph Hellwig,
+
+
+
+=== isapnp support
+
+The Linux 2.4 Kernel does have reliable in-kernel isapnp support.
+Some drivers (sb.o, ad1816.o awe_wave.o) do now support automatically
+detecting and configuring isapnp devices.
+If you have a not yet supported isapnp soundcard, mail me the content
+of '/proc/isapnp' on your system and some information about your card
+and its driver(s) so I can try to get isapnp working for it.
+
+
+
+=== soundcard resources on kernel commandline
+
+Before Linux 2.4 you had to specify the resources for sounddrivers
+statically linked into the kernel at compile time
+(in make config/menuconfig/xconfig). In Linux 2.4 the resources are
+now specified at the boot-time kernel commandline (e.g. the lilo
+'append=' line or everything that's after the kernel name in grub).
+Read the Configure.help entry for your card for the parameters.
+
+
+=== softoss is gone
+
+In Linux 2.4 the softoss in-kernel software synthesizer is no more aviable.
+Use a user space software synthesizer like timidity instead.
+
+
+
+=== /dev/sndstat and /proc/sound are gone
+
+In older Linux versions those files exported some information about the
+OSS/Free configuration to userspace. In Linux 2.3 they were removed because
+they did not support the growing number of pci soundcards and there were
+some general problems with this interface.
+
+
diff --git a/trunk/Documentation/sound/oss/OPL3-SA b/trunk/Documentation/sound/oss/OPL3-SA
new file mode 100644
index 000000000000..66a91835d918
--- /dev/null
+++ b/trunk/Documentation/sound/oss/OPL3-SA
@@ -0,0 +1,52 @@
+OPL3-SA1 sound driver (opl3sa.o)
+
+---
+Note: This howto only describes how to setup the OPL3-SA1 chip; this info
+does not apply to the SA2, SA3, or SA4.
+---
+
+The Yamaha OPL3-SA1 sound chip is usually found built into motherboards, and
+it's a decent little chip offering a WSS mode, a SB Pro emulation mode, MPU401
+and OPL3 FM Synth capabilities.
+
+You can enable inclusion of the driver via CONFIG_SOUND_OPL3SA1=m, or
+CONFIG_SOUND_OPL3SA1=y through 'make config/xconfig/menuconfig'.
+
+You'll need to know all of the relevant info (irq, dma, and io port) for the
+chip's WSS mode, since that is the mode the kernel sound driver uses, and of
+course you'll also need to know about where the MPU401 and OPL3 ports and
+IRQs are if you want to use those.
+
+Here's the skinny on how to load it as a module:
+
+ modprobe opl3sa io=0x530 irq=11 dma=0 dma2=1 mpu_io=0x330 mpu_irq=5
+
+Module options in detail:
+
+ io: This is the WSS's port base.
+ irq: This is the WSS's IRQ.
+ dma: This is the WSS's DMA line. In my BIOS setup screen this was
+ listed as "WSS Play DMA"
+ dma2: This is the WSS's secondary DMA line. My BIOS calls it the
+ "WSS capture DMA"
+
+ mpu_io: This is the MPU401's port base.
+ mpu_irq: This is the MPU401's IRQ.
+
+If you'd like to use the OPL3 FM Synthesizer, make sure you enable
+CONFIG_SOUND_YM3812 (in 'make config'). That'll build the opl3.o module.
+
+Then a simple 'insmod opl3 io=0x388', and you now have FM Synth.
+
+You can also use the SoftOSS software synthesizer instead of the builtin OPL3.
+Here's how:
+
+Say 'y' or 'm' to "SoftOSS software wave table engine" in make config.
+
+If you said yes, the software synth is available once you boot your new
+kernel.
+
+If you chose to build it as a module, just insmod the resulting softoss2.o
+
+Questions? Comments?
+
diff --git a/trunk/Documentation/sound/oss/README.awe b/trunk/Documentation/sound/oss/README.awe
new file mode 100644
index 000000000000..80054cd8fcde
--- /dev/null
+++ b/trunk/Documentation/sound/oss/README.awe
@@ -0,0 +1,218 @@
+================================================================
+ AWE32 Sound Driver for Linux / FreeBSD
+ version 0.4.3; Nov. 1, 1998
+
+ Takashi Iwai
+================================================================
+
+* GENERAL NOTES
+
+This is a sound driver extension for SoundBlaster AWE32 and other
+compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64 & etc) to enable
+the wave synth operations. The driver is provided for Linux 1.2.x
+and 2.[012].x kernels, as well as FreeBSD, on Intel x86 and DEC
+Alpha systems.
+
+This driver was written by Takashi Iwai ,
+and provided "as is". The original source (awedrv-0.4.3.tar.gz) and
+binary packages are available on the following URL:
+ http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/
+Note that since the author is apart from this web site, the update is
+not frequent now.
+
+
+* NOTE TO LINUX USERS
+
+To enable this driver on linux-2.[01].x kernels, you need turn on
+"AWE32 synth" options in sound menu when configure your linux kernel
+and modules. The precise installation procedure is described in the
+AWE64-Mini-HOWTO and linux-kernel/Documetation/sound/AWE32.
+
+If you're using PnP cards, the card must be initialized before loading
+the sound driver. There're several options to do this:
+ - Initialize the card via ISA PnP tools, and load the sound module.
+ - Initialize the card on DOS, and load linux by loadlin.exe
+ - Use PnP kernel driver (for Linux-2.x.x)
+The detailed instruction for the solution using isapnp tools is found
+in many documents like above. A brief instruction is also included in
+the installation document of this package.
+For PnP driver project, please refer to the following URL:
+ http://www-jcr.lmh.ox.ac.uk/~pnp/
+
+
+* USING THE DRIVER
+
+The awedrv has several different playing modes to realize easy channel
+allocation for MIDI songs. To hear the exact sound quality, you need
+to obtain the extended sequencer program, drvmidi or playmidi-2.5.
+
+For playing MIDI files, you *MUST* load the soundfont file on the
+driver previously by sfxload utility. Otherwise you'll here no sounds
+at all! All the utilities and driver source packages are found in the
+above URL. The sfxload program is included in the package
+awesfx-0.4.3.tgz. Binary packages are available there, too. See the
+instruction in each package for installation.
+
+Loading a soundfont file is very simple. Just execute the command
+
+ % sfxload synthgm.sbk
+
+Then, sfxload transfers the file "synthgm.sbk" to the driver.
+Both SF1 and SF2 formats are accepted.
+
+Now you can hear midi musics by a midi player.
+
+ % drvmidi foo.mid
+
+If you run MIDI player after MOD player, you need to load soundfont
+files again, since MOD player programs clear the previous loaded
+samples by their own data.
+
+If you have only 512kb on the sound card, I recommend to use dynamic
+sample loading via -L option of drvmidi. 2MB GM/GS soundfont file is
+available in most midi files.
+
+ % sfxload synthgm
+ % drvmidi -L 2mbgmgs foo.mid
+
+This makes a big difference (believe me)! For more details, please
+refer to the FAQ list which is available on the URL above.
+
+The current chorus, reverb and equalizer status can be changed by
+aweset utility program (included in awesfx package). Note that
+some awedrv-native programs (like drvmidi and xmp) will change the
+current settings by themselves. The aweset program is effective
+only for other programs like playmidi.
+
+Enjoy.
+
+
+* COMPILE FLAGS
+
+Compile conditions are defined in awe_config.h.
+
+[Compatibility Conditions]
+The following flags are defined automatically when using installation
+shell script.
+
+- AWE_MODULE_SUPPORT
+ indicates your Linux kernel supports module for each sound card
+ (in recent 2.1 or 2.2 kernels and unofficial patched 2.0 kernels
+ as distributed in the RH5.0 package).
+ This flag is automatically set when you're using 2.1.x kernels.
+ You can pass the base address and memory size via the following
+ module options,
+ io = base I/O port address (eg. 0x620)
+ memsize = DRAM size in kilobytes (eg. 512)
+ As default, AWE driver probes these values automatically.
+
+
+[Hardware Conditions]
+You DON'T have to define the following two values.
+Define them only when the driver couldn't detect the card properly.
+
+- AWE_DEFAULT_BASE_ADDR (default: not defined)
+ specifies the base port address of your AWE32 card.
+ 0 means to autodetect the address.
+
+- AWE_DEFAULT_MEM_SIZE (default: not defined)
+ specifies the memory size of your AWE32 card in kilobytes.
+ -1 means to autodetect its size.
+
+
+[Sample Table Size]
+From ver.0.4.0, sample tables are allocated dynamically (except
+Linux-1.2.x system), so you need NOT to touch these parameters.
+Linux-1.2.x users may need to increase these values to appropriate size
+if the sound card is equipped with more DRAM.
+
+- AWE_MAX_SF_LISTS, AWE_MAX_SAMPLES, AWE_MAX_INFOS
+
+
+[Other Conditions]
+
+- AWE_ALWAYS_INIT_FM (default: not defined)
+ indicates the AWE driver always initialize FM passthrough even
+ without DRAM on board. Emu8000 chip has a restriction for playing
+ samples on DRAM that at least two channels must be occupied as
+ passthrough channels.
+
+- AWE_DEBUG_ON (default: defined)
+ turns on debugging messages if defined.
+
+- AWE_HAS_GUS_COMPATIBILITY (default: defined)
+ Enables GUS compatibility mode if defined, reading GUS patches and
+ GUS control commands. Define this option to use GMOD or other
+ GUS module players.
+
+- CONFIG_AWE32_MIDIEMU (default: defined)
+ Adds a MIDI emulation device by Emu8000 wavetable. The emulation
+ device can be accessed as an external MIDI, and sends the MIDI
+ control codes directly. XG and GS sysex/NRPN are accepted.
+ No MIDI input is supported.
+
+- CONFIG_AWE32_MIXER (default: not defined)
+ Adds a mixer device for AWE32 bass/treble equalizer control.
+ You can access this device using /dev/mixer?? (usually mixer01).
+
+- AWE_USE_NEW_VOLUME_CALC (default: defined)
+ Use the new method to calculate the volume change as compatible
+ with DOS/Win drivers. This option can be toggled via aweset
+ program, or drvmidi player.
+
+- AWE_CHECK_VTARGET (default: defined)
+ Check the current volume target value when searching for an
+ empty channel to allocate a new voice. This is experimentally
+ implemented in this version. (probably, this option doesn't
+ affect the sound quality severely...)
+
+- AWE_ALLOW_SAMPLE_SHARING (default: defined)
+ Allow sample sharing for differently loaded patches.
+ This function is available only together with awesfx-0.4.3p3.
+ Note that this is still an experimental option.
+
+- DEF_FM_CHORUS_DEPTH (default: 0x10)
+ The default strength to be sent to the chorus effect engine.
+ From 0 to 0xff. Larger numbers may often cause weird sounds.
+
+- DEF_FM_REVERB_DEPTH (default: 0x10)
+ The default strength to be sent to the reverb effect engine.
+ From 0 to 0xff. Larger numbers may often cause weird sounds.
+
+
+* ACKNOWLEDGMENTS
+
+Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for much advice
+on programming of AWE32. Much code is brought from his AWE32-native
+MOD player, ALMP.
+The port of awedrv to FreeBSD is done by Randall Hopper
+(rhh@ct.picker.com).
+The new volume calculation routine was derived from Mark Weaver's
+ADIP compatible routines.
+I also thank linux-awe-ml members for their efforts
+to reboot their system many times :-)
+
+
+* TODO'S
+
+- Complete DOS/Win compatibility
+- DSP-like output
+
+
+* COPYRIGHT
+
+Copyright (C) 1996-1998 Takashi Iwai
+
+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.
+
+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., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/trunk/Documentation/sound/oss/Wavefront b/trunk/Documentation/sound/oss/Wavefront
new file mode 100644
index 000000000000..16f57ea43052
--- /dev/null
+++ b/trunk/Documentation/sound/oss/Wavefront
@@ -0,0 +1,339 @@
+ An OSS/Free Driver for WaveFront soundcards
+ (Turtle Beach Maui, Tropez, Tropez Plus)
+
+ Paul Barton-Davis, July 1998
+
+ VERSION 0.2.5
+
+Driver Status
+-------------
+
+Requires: Kernel 2.1.106 or later (the driver is included with kernels
+2.1.109 and above)
+
+As of 7/22/1998, this driver is currently in *BETA* state. This means
+that it compiles and runs, and that I use it on my system (Linux
+2.1.106) with some reasonably demanding applications and uses. I
+believe the code is approaching an initial "finished" state that
+provides bug-free support for the Tropez Plus.
+
+Please note that to date, the driver has ONLY been tested on a Tropez
+Plus. I would very much like to hear (and help out) people with Tropez
+and Maui cards, since I think the driver can support those cards as
+well.
+
+Finally, the driver has not been tested (or even compiled) as a static
+(non-modular) part of the kernel. Alan Cox's good work in modularizing
+OSS/Free for Linux makes this rather unnecessary.
+
+Some Questions
+--------------
+
+**********************************************************************
+0) What does this driver do that the maui driver did not ?
+**********************************************************************
+
+* can fully initialize a WaveFront card from cold boot - no DOS
+ utilities needed
+* working patch/sample/program loading and unloading (the maui
+ driver didn't document how to make this work, and assumed
+ user-level preparation of the patch data for writing
+ to the board. ick.)
+* full user-level access to all WaveFront commands
+* for the Tropez Plus, (primitive) control of the YSS225 FX processor
+* Virtual MIDI mode supported - 2 MIDI devices accessible via the
+ WaveFront's MPU401/UART emulation. One
+ accesses the WaveFront synth, the other accesses the
+ external MIDI connector. Full MIDI read/write semantics
+ for both devices.
+* OSS-compliant /dev/sequencer interface for the WaveFront synth,
+ including native and GUS-format patch downloading.
+* semi-intelligent patch management (prototypical at this point)
+
+**********************************************************************
+1) What to do about MIDI interfaces ?
+**********************************************************************
+
+The Tropez Plus (and perhaps other WF cards) can in theory support up
+to 2 physical MIDI interfaces. One of these is connected to the
+ICS2115 chip (the WaveFront synth itself) and is controlled by
+MPU/UART-401 emulation code running as part of the WaveFront OS. The
+other is controlled by the CS4232 chip present on the board. However,
+physical access to the CS4232 connector is difficult, and it is
+unlikely (though not impossible) that you will want to use it.
+
+An older version of this driver introduced an additional kernel config
+variable which controlled whether or not the CS4232 MIDI interface was
+configured. Because of Alan Cox's work on modularizing the sound
+drivers, and now backporting them to 2.0.34 kernels, there seems to be
+little reason to support "static" configuration variables, and so this
+has been abandoned in favor of *only* module parameters. Specifying
+"mpuio" and "mpuirq" for the cs4232 parameter will result in the
+CS4232 MIDI interface being configured; leaving them unspecified will
+leave it unconfigured (and thus unusable).
+
+BTW, I have heard from one Tropez+ user that the CS4232 interface is
+more reliable than the ICS2115 one. I have had no problems with the
+latter, and I don't have the right cable to test the former one
+out. Reports welcome.
+
+**********************************************************************
+2) Why does line XXX of the code look like this .... ?
+**********************************************************************
+
+Either because it's not finished yet, or because you're a better coder
+than I am, or because you don't understand some aspect of how the card
+or the code works.
+
+I absolutely welcome comments, criticisms and suggestions about the
+design and implementation of the driver.
+
+**********************************************************************
+3) What files are included ?
+**********************************************************************
+
+ drivers/sound/README.wavefront -- this file
+
+ drivers/sound/wavefront.patch -- patches for the 2.1.106 sound drivers
+ needed to make the rest of this work
+ DO NOT USE IF YOU'VE APPLIED THEM
+ BEFORE, OR HAVE 2.1.109 OR ABOVE
+
+ drivers/sound/wavfront.c -- the driver
+ drivers/sound/ys225.h -- data declarations for FX config
+ drivers/sound/ys225.c -- data definitions for FX config
+ drivers/sound/wf_midi.c -- the "uart401" driver
+ to support virtual MIDI mode.
+ include/wavefront.h -- the header file
+ Documentation/sound/oss/Tropez+ -- short docs on configuration
+
+**********************************************************************
+4) How do I compile/install/use it ?
+**********************************************************************
+
+PART ONE: install the source code into your sound driver directory
+
+ cd
+ tar -zxvf
+
+PART TWO: apply the patches
+
+ DO THIS ONLY IF YOU HAVE A KERNEL VERSION BELOW 2.1.109
+ AND HAVE NOT ALREADY INSTALLED THE PATCH(ES).
+
+ cd drivers/sound
+ patch < wavefront.patch
+
+PART THREE: configure your kernel
+
+ cd
+ make xconfig (or whichever config option you use)
+
+ - choose YES for Sound Support
+ - choose MODULE (M) for OSS Sound Modules
+ - choose MODULE(M) to YM3812/OPL3 support
+ - choose MODULE(M) for WaveFront support
+ - choose MODULE(M) for CS4232 support
+
+ - choose "N" for everything else (unless you have other
+ soundcards you want support for)
+
+
+ make boot
+ .
+ .
+ .
+
+ make modules
+ .
+ .
+ .
+ make modules_install
+
+Here's my autoconf.h SOUND section:
+
+/*
+ * Sound
+ */
+#define CONFIG_SOUND 1
+#undef CONFIG_SOUND_OSS
+#define CONFIG_SOUND_OSS_MODULE 1
+#undef CONFIG_SOUND_PAS
+#undef CONFIG_SOUND_SB
+#undef CONFIG_SOUND_ADLIB
+#undef CONFIG_SOUND_GUS
+#undef CONFIG_SOUND_MPU401
+#undef CONFIG_SOUND_PSS
+#undef CONFIG_SOUND_MSS
+#undef CONFIG_SOUND_SSCAPE
+#undef CONFIG_SOUND_TRIX
+#undef CONFIG_SOUND_MAD16
+#undef CONFIG_SOUND_WAVEFRONT
+#define CONFIG_SOUND_WAVEFRONT_MODULE 1
+#undef CONFIG_SOUND_CS4232
+#define CONFIG_SOUND_CS4232_MODULE 1
+#undef CONFIG_SOUND_MAUI
+#undef CONFIG_SOUND_SGALAXY
+#undef CONFIG_SOUND_OPL3SA1
+#undef CONFIG_SOUND_SOFTOSS
+#undef CONFIG_SOUND_YM3812
+#define CONFIG_SOUND_YM3812_MODULE 1
+#undef CONFIG_SOUND_VMIDI
+#undef CONFIG_SOUND_UART6850
+/*
+ * Additional low level sound drivers
+ */
+#undef CONFIG_LOWLEVEL_SOUND
+
+************************************************************
+6) How do I configure my card ?
+************************************************************
+
+You need to edit /etc/modprobe.conf. Here's mine (edited to show the
+relevant details):
+
+ # Sound system
+ alias char-major-14-* wavefront
+ alias synth0 wavefront
+ alias mixer0 cs4232
+ alias audio0 cs4232
+ install wavefront /sbin/modprobe cs4232 && /sbin/modprobe -i wavefront && /sbin/modprobe opl3
+ options wavefront io=0x200 irq=9
+ options cs4232 synthirq=9 synthio=0x200 io=0x530 irq=5 dma=1 dma2=0
+ options opl3 io=0x388
+
+Things to note:
+
+ the wavefront options "io" and "irq" ***MUST*** match the "synthio"
+ and "synthirq" cs4232 options.
+
+ you can do without the opl3 module if you don't
+ want to use the OPL/[34] FM synth on the soundcard
+
+ the opl3 io parameter is conventionally not adjustable.
+ In theory, any not-in-use IO port address would work, but
+ just use 0x388 and stick with the crowd.
+
+**********************************************************************
+7) What about firmware ?
+**********************************************************************
+
+Turtle Beach have not given me permission to distribute their firmware
+for the ICS2115. However, if you have a WaveFront card, then you
+almost certainly have the firmware, and if not, its freely available
+on their website, at:
+
+ http://www.tbeach.com/tbs/downloads/scardsdown.htm#tropezplus
+
+The file is called WFOS2001.MOT (for the Tropez+).
+
+This driver, however, doesn't use the pure firmware as distributed,
+but instead relies on a somewhat processed form of it. You can
+generate this very easily. Following an idea from Andrew Veliath's
+Pinnacle driver, the following flex program will generate the
+processed version:
+
+---- cut here -------------------------
+%option main
+%%
+^S[28].*\r$ printf ("%c%.*s", yyleng-1,yyleng-1,yytext);
+<> { fputc ('\0', stdout); return; }
+\n {}
+. {}
+---- cut here -------------------------
+
+To use it, put the above in file (say, ws.l) compile it like this:
+
+ shell> flex -ows.c ws.l
+ shell> cc -o ws ws.c
+
+and then use it like this:
+
+ ws < my-copy-of-the-oswf.mot-file > /etc/sound/wavefront.os
+
+If you put it somewhere else, you'll always have to use the wf_ospath
+module parameter (see below) or alter the source code.
+
+**********************************************************************
+7) How do I get it working ?
+**********************************************************************
+
+Optionally, you can reboot with the "new" kernel (even though the only
+changes have really been made to a module).
+
+Then, as root do:
+
+ modprobe wavefront
+
+You should get something like this in /var/log/messages:
+
+ WaveFront: firmware 1.20 already loaded.
+
+or
+
+ WaveFront: no response to firmware probe, assume raw.
+
+then:
+
+ WaveFront: waiting for memory configuration ...
+ WaveFront: hardware version 1.64
+ WaveFront: available DRAM 8191k
+ WaveFront: 332 samples used (266 real, 13 aliases, 53 multi), 180 empty
+ WaveFront: 128 programs slots in use
+ WaveFront: 256 patch slots filled, 142 in use
+
+The whole process takes about 16 seconds, the longest waits being
+after reporting the hardware version (during the firmware download),
+and after reporting program status (during patch status inquiry). Its
+shorter (about 10 secs) if the firmware is already loaded (i.e. only
+warm reboots since the last firmware load).
+
+The "available DRAM" line will vary depending on how much added RAM
+your card has. Mine has 8MB.
+
+To check basically functionality, use play(1) or splay(1) to send a
+.WAV or other audio file through the audio portion. Then use playmidi
+to play a General MIDI file. Try the "-D 0" to hear the
+difference between sending MIDI to the WaveFront and using the OPL/3,
+which is the default (I think ...). If you have an external synth(s)
+hooked to the soundcard, you can use "-e" to route to the
+external synth(s) (in theory, -D 1 should work as well, but I think
+there is a bug in playmidi which prevents this from doing what it
+should).
+
+**********************************************************************
+8) What are the module parameters ?
+**********************************************************************
+
+Its best to read wavefront.c for this, but here is a summary:
+
+integers:
+ wf_raw - if set, ignore apparent presence of firmware
+ loaded onto the ICS2115, reset the whole
+ board, and initialize it from scratch. (default = 0)
+
+ fx_raw - if set, always initialize the YSS225 processor
+ on the Tropez plus. (default = 1)
+
+ < The next 4 are basically for kernel hackers to allow
+ tweaking the driver for testing purposes. >
+
+ wait_usecs - loop timer used when waiting for
+ status conditions on the board.
+ The default is 150.
+
+ debug_default - debugging flags. See sound/wavefront.h
+ for WF_DEBUG_* values. Default is zero.
+ Setting this allows you to debug the
+ driver during module installation.
+strings:
+ ospath - path to get to the pre-processed OS firmware.
+ (default: /etc/sound/wavefront.os)
+
+**********************************************************************
+9) Who should I contact if I have problems?
+**********************************************************************
+
+Just me: Paul Barton-Davis
+
+
diff --git a/trunk/Documentation/sound/oss/es1370 b/trunk/Documentation/sound/oss/es1370
new file mode 100644
index 000000000000..7b38b1a096a3
--- /dev/null
+++ b/trunk/Documentation/sound/oss/es1370
@@ -0,0 +1,70 @@
+/proc/sound, /dev/sndstat
+-------------------------
+
+/proc/sound and /dev/sndstat is not supported by the
+driver. To find out whether the driver succeeded loading,
+check the kernel log (dmesg).
+
+
+ALaw/uLaw sample formats
+------------------------
+
+This driver does not support the ALaw/uLaw sample formats.
+ALaw is the default mode when opening a sound device
+using OSS/Free. The reason for the lack of support is
+that the hardware does not support these formats, and adding
+conversion routines to the kernel would lead to very ugly
+code in the presence of the mmap interface to the driver.
+And since xquake uses mmap, mmap is considered important :-)
+and no sane application uses ALaw/uLaw these days anyway.
+In short, playing a Sun .au file as follows:
+
+cat my_file.au > /dev/dsp
+
+does not work. Instead, you may use the play script from
+Chris Bagwell's sox-12.14 package (available from the URL
+below) to play many different audio file formats.
+The script automatically determines the audio format
+and does do audio conversions if necessary.
+http://home.sprynet.com/sprynet/cbagwell/projects.html
+
+
+Blocking vs. nonblocking IO
+---------------------------
+
+Unlike OSS/Free this driver honours the O_NONBLOCK file flag
+not only during open, but also during read and write.
+This is an effort to make the sound driver interface more
+regular. Timidity has problems with this; a patch
+is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
+(Timidity patched will also run on OSS/Free).
+
+
+MIDI UART
+---------
+
+The driver supports a simple MIDI UART interface, with
+no ioctl's supported.
+
+
+MIDI synthesizer
+----------------
+
+This soundcard does not have any hardware MIDI synthesizer;
+MIDI synthesis has to be done in software. To allow this
+the driver/soundcard supports two PCM (/dev/dsp) interfaces.
+The second one goes to the mixer "synth" setting and supports
+only a limited set of sampling rates (44100, 22050, 11025, 5512).
+By setting lineout to 1 on the driver command line
+(eg. insmod es1370 lineout=1) it is even possible on some
+cards to convert the LINEIN jack into a second LINEOUT jack, thus
+making it possible to output four independent audio channels!
+
+There is a freely available software package that allows
+MIDI file playback on this soundcard called Timidity.
+See http://www.cgs.fi/~tt/timidity/.
+
+
+
+Thomas Sailer
+t.sailer@alumni.ethz.ch
diff --git a/trunk/Documentation/sound/oss/rme96xx b/trunk/Documentation/sound/oss/rme96xx
new file mode 100644
index 000000000000..87d7b7b65fa1
--- /dev/null
+++ b/trunk/Documentation/sound/oss/rme96xx
@@ -0,0 +1,767 @@
+Beta release of the rme96xx (driver for RME 96XX cards like the
+"Hammerfall" and the "Hammerfall light")
+
+Important: The driver module has to be installed on a freshly rebooted system,
+otherwise the driver might not be able to acquire its buffers.
+
+features:
+
+ - OSS programming interface (i.e. runs with standard OSS soundsoftware)
+ - OSS/Multichannel interface (OSS multichannel is done by just aquiring
+ more than 2 channels). The driver does not use more than one device
+ ( yet .. this feature may be implemented later )
+ - more than one RME card supported
+
+The driver uses a specific multichannel interface, which I will document
+when the driver gets stable. (take a look at the defines in rme96xx.h,
+which adds blocked multichannel formats i.e instead of
+lrlrlrlr --> llllrrrr etc.
+
+Use the "rmectrl" programm to look at the status of the card ..
+or use xrmectrl, a GUI interface for the ctrl program.
+
+What you can do with the rmectrl program is to set the stereo device for
+OSS emulation (e.g. if you use SPDIF out).
+
+You do:
+
+./ctrl offset 24 24
+
+which makes the stereo device use channels 25 and 26.
+
+Guenter Geiger
+
+copy the first part of the attached source code into rmectrl.c
+and the second part into xrmectrl (or get the program from
+http://gige.xdv.org/pages/soft/pages/rme)
+
+to compile: gcc -o rmectrl rmectrl.c
+------------------------------ snip ------------------------------------
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "rme96xx.h"
+
+/*
+ remctrl.c
+ (C) 2000 Guenter Geiger
+ HP20020201 - Heiko Purnhagen
+*/
+
+/* # define DEVICE_NAME "/dev/mixer" */
+# define DEVICE_NAME "/dev/mixer1"
+
+
+void usage(void)
+{
+ fprintf(stderr,"usage: rmectrl [/dev/mixer] [command [options]]\n\n");
+ fprintf(stderr,"where command is one of:\n");
+ fprintf(stderr," help show this help\n");
+ fprintf(stderr," status show status bits\n");
+ fprintf(stderr," control show control bits\n");
+ fprintf(stderr," mix show mixer/offset status\n");
+ fprintf(stderr," master set sync master\n");
+ fprintf(stderr," pro set spdif out pro\n");
+ fprintf(stderr," emphasis set spdif out emphasis\n");
+ fprintf(stderr," dolby set spdif out no audio\n");
+ fprintf(stderr," optout set spdif out optical\n");
+ fprintf(stderr," wordclock set sync wordclock\n");
+ fprintf(stderr," spdifin set spdif in (0=optical,1=coax,2=intern)\n");
+ fprintf(stderr," syncref set sync source (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n");
+ fprintf(stderr," adat1cd set ADAT1 on internal CD\n");
+ fprintf(stderr," offset set dev (0..3) offset (0..25)\n");
+ exit(-1);
+}
+
+
+int main(int argc, char* argv[])
+{
+ int cards;
+ int ret;
+ int i;
+ double ft;
+ int fd, fdwr;
+ int param,orig;
+ rme_status_t stat;
+ rme_ctrl_t ctrl;
+ char *device;
+ int argidx;
+
+ if (argc < 2)
+ usage();
+
+ if (*argv[1]=='/') {
+ device = argv[1];
+ argidx = 2;
+ }
+ else {
+ device = DEVICE_NAME;
+ argidx = 1;
+ }
+
+ fprintf(stdout,"mixer device %s\n",device);
+ if ((fd = open(device,O_RDONLY)) < 0) {
+ fprintf(stdout,"opening device failed\n");
+ exit(-1);
+ }
+
+ if ((fdwr = open(device,O_WRONLY)) < 0) {
+ fprintf(stdout,"opening device failed\n");
+ exit(-1);
+ }
+
+ if (argc < argidx+1)
+ usage();
+
+ if (!strcmp(argv[argidx],"help"))
+ usage();
+ if (!strcmp(argv[argidx],"-h"))
+ usage();
+ if (!strcmp(argv[argidx],"--help"))
+ usage();
+
+ if (!strcmp(argv[argidx],"status")) {
+ ioctl(fd,SOUND_MIXER_PRIVATE2,&stat);
+ fprintf(stdout,"stat.irq %d\n",stat.irq);
+ fprintf(stdout,"stat.lockmask %d\n",stat.lockmask);
+ fprintf(stdout,"stat.sr48 %d\n",stat.sr48);
+ fprintf(stdout,"stat.wclock %d\n",stat.wclock);
+ fprintf(stdout,"stat.bufpoint %d\n",stat.bufpoint);
+ fprintf(stdout,"stat.syncmask %d\n",stat.syncmask);
+ fprintf(stdout,"stat.doublespeed %d\n",stat.doublespeed);
+ fprintf(stdout,"stat.tc_busy %d\n",stat.tc_busy);
+ fprintf(stdout,"stat.tc_out %d\n",stat.tc_out);
+ fprintf(stdout,"stat.crystalrate %d (0=64k 3=96k 4=88.2k 5=48k 6=44.1k 7=32k)\n",stat.crystalrate);
+ fprintf(stdout,"stat.spdif_error %d\n",stat.spdif_error);
+ fprintf(stdout,"stat.bufid %d\n",stat.bufid);
+ fprintf(stdout,"stat.tc_valid %d\n",stat.tc_valid);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"control")) {
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ fprintf(stdout,"ctrl.start %d\n",ctrl.start);
+ fprintf(stdout,"ctrl.latency %d (0=64 .. 7=8192)\n",ctrl.latency);
+ fprintf(stdout,"ctrl.master %d\n",ctrl.master);
+ fprintf(stdout,"ctrl.ie %d\n",ctrl.ie);
+ fprintf(stdout,"ctrl.sr48 %d\n",ctrl.sr48);
+ fprintf(stdout,"ctrl.spare %d\n",ctrl.spare);
+ fprintf(stdout,"ctrl.doublespeed %d\n",ctrl.doublespeed);
+ fprintf(stdout,"ctrl.pro %d\n",ctrl.pro);
+ fprintf(stdout,"ctrl.emphasis %d\n",ctrl.emphasis);
+ fprintf(stdout,"ctrl.dolby %d\n",ctrl.dolby);
+ fprintf(stdout,"ctrl.opt_out %d\n",ctrl.opt_out);
+ fprintf(stdout,"ctrl.wordclock %d\n",ctrl.wordclock);
+ fprintf(stdout,"ctrl.spdif_in %d (0=optical,1=coax,2=intern)\n",ctrl.spdif_in);
+ fprintf(stdout,"ctrl.sync_ref %d (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n",ctrl.sync_ref);
+ fprintf(stdout,"ctrl.spdif_reset %d\n",ctrl.spdif_reset);
+ fprintf(stdout,"ctrl.spdif_select %d\n",ctrl.spdif_select);
+ fprintf(stdout,"ctrl.spdif_clock %d\n",ctrl.spdif_clock);
+ fprintf(stdout,"ctrl.spdif_write %d\n",ctrl.spdif_write);
+ fprintf(stdout,"ctrl.adat1_cd %d\n",ctrl.adat1_cd);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"mix")) {
+ rme_mixer mix;
+ int i;
+
+ for (i=0; i<4; i++) {
+ mix.devnr = i;
+ ioctl(fd,SOUND_MIXER_PRIVATE1,&mix);
+ if (mix.devnr == i) {
+ fprintf(stdout,"devnr %d\n",mix.devnr);
+ fprintf(stdout,"mix.i_offset %2d (0-25)\n",mix.i_offset);
+ fprintf(stdout,"mix.o_offset %2d (0-25)\n",mix.o_offset);
+ }
+ }
+ exit (0);
+ }
+
+/* the control flags */
+
+ if (argc < argidx+2)
+ usage();
+
+ if (!strcmp(argv[argidx],"master")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("master = %d\n",val);
+ ctrl.master = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"pro")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("pro = %d\n",val);
+ ctrl.pro = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"emphasis")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("emphasis = %d\n",val);
+ ctrl.emphasis = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"dolby")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("dolby = %d\n",val);
+ ctrl.dolby = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"optout")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("optout = %d\n",val);
+ ctrl.opt_out = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"wordclock")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("wordclock = %d\n",val);
+ ctrl.wordclock = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"spdifin")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("spdifin = %d\n",val);
+ ctrl.spdif_in = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"syncref")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("syncref = %d\n",val);
+ ctrl.sync_ref = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+ if (!strcmp(argv[argidx],"adat1cd")) {
+ int val = atoi(argv[argidx+1]);
+ ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
+ printf("adat1cd = %d\n",val);
+ ctrl.adat1_cd = val;
+ ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
+ exit (0);
+ }
+
+/* setting offset */
+
+ if (argc < argidx+4)
+ usage();
+
+ if (!strcmp(argv[argidx],"offset")) {
+ rme_mixer mix;
+
+ mix.devnr = atoi(argv[argidx+1]);
+
+ mix.i_offset = atoi(argv[argidx+2]);
+ mix.o_offset = atoi(argv[argidx+3]);
+ ioctl(fdwr,SOUND_MIXER_PRIVATE1,&mix);
+ fprintf(stdout,"devnr %d\n",mix.devnr);
+ fprintf(stdout,"mix.i_offset to %d\n",mix.i_offset);
+ fprintf(stdout,"mix.o_offset to %d\n",mix.o_offset);
+ exit (0);
+ }
+
+ usage();
+ exit (0); /* to avoid warning */
+}
+
+
+---------------------------- --------------------------------
+#!/usr/bin/wish
+
+# xrmectrl
+# (C) 2000 Guenter Geiger
+# HP20020201 - Heiko Purnhagen
+
+#set defaults "-relief ridged"
+set CTRLPROG "./rmectrl"
+if {$argc} {
+ set CTRLPROG "$CTRLPROG $argv"
+}
+puts "CTRLPROG $CTRLPROG"
+
+frame .butts
+button .butts.exit -text "Exit" -command "exit" -relief ridge
+#button .butts.state -text "State" -command "get_all"
+
+pack .butts.exit -side left
+pack .butts -side bottom
+
+
+#
+# STATUS
+#
+
+frame .status
+
+# Sampling Rate
+
+frame .status.sr
+label .status.sr.text -text "Sampling Rate" -justify left
+radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times
+radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times
+radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times
+radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times
+
+pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3
+
+# Lock
+
+frame .status.lock
+label .status.lock.text -text "Lock" -justify left
+checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times
+checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times
+checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times
+
+pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3
+
+# Sync
+
+frame .status.sync
+label .status.sync.text -text "Sync" -justify left
+checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times
+checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times
+checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times
+
+pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3
+
+# Timecode
+
+frame .status.tc
+label .status.tc.text -text "Timecode" -justify left
+checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times
+checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times
+checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times
+
+pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3
+
+# SPDIF In
+
+frame .status.spdif
+label .status.spdif.text -text "SPDIF In" -justify left
+label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times
+checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times
+
+pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3
+
+pack .status.sr .status.lock .status.sync .status.tc .status.spdif -side left -fill x -anchor n -expand 1
+
+
+#
+# CONTROL
+#
+
+proc setprof {} {
+ global CTRLPROG
+ global spprof
+ exec $CTRLPROG pro $spprof
+}
+
+proc setemph {} {
+ global CTRLPROG
+ global spemph
+ exec $CTRLPROG emphasis $spemph
+}
+
+proc setnoaud {} {
+ global CTRLPROG
+ global spnoaud
+ exec $CTRLPROG dolby $spnoaud
+}
+
+proc setoptical {} {
+ global CTRLPROG
+ global spoptical
+ exec $CTRLPROG optout $spoptical
+}
+
+proc setspdifin {} {
+ global CTRLPROG
+ global spdifin
+ exec $CTRLPROG spdifin [expr $spdifin - 1]
+}
+
+proc setsyncsource {} {
+ global CTRLPROG
+ global syncsource
+ exec $CTRLPROG syncref [expr $syncsource -1]
+}
+
+
+proc setmaster {} {
+ global CTRLPROG
+ global master
+ exec $CTRLPROG master $master
+}
+
+proc setwordclock {} {
+ global CTRLPROG
+ global wordclock
+ exec $CTRLPROG wordclock $wordclock
+}
+
+proc setadat1cd {} {
+ global CTRLPROG
+ global adat1cd
+ exec $CTRLPROG adat1cd $adat1cd
+}
+
+
+frame .control
+
+# SPDIF In & SPDIF Out
+
+
+frame .control.spdif
+
+frame .control.spdif.in
+label .control.spdif.in.text -text "SPDIF In" -justify left
+radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times
+radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times
+radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times
+
+checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times
+
+pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd
+
+label .control.spdif.space
+
+frame .control.spdif.out
+label .control.spdif.out.text -text "SPDIF Out" -justify left
+checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times
+checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times
+checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times
+checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times
+
+pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom
+
+pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1
+
+# Sync Mode & Sync Source
+
+frame .control.sync
+frame .control.sync.mode
+label .control.sync.mode.text -text "Sync Mode" -justify left
+checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times
+checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times
+
+pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc
+
+label .control.sync.space
+
+frame .control.sync.src
+label .control.sync.src.text -text "Sync Source" -justify left
+radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times
+radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times
+radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times
+radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times
+
+pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom
+
+pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1
+
+label .control.space -text "" -width 10
+
+# Buffer Size
+
+frame .control.buf
+label .control.buf.text -text "Buffer Size (Latency)" -justify left
+radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times
+radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times
+radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times
+radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times
+radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times
+radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times
+radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times
+radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times
+
+pack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3
+
+# Offset
+
+frame .control.offset
+
+frame .control.offset.in
+label .control.offset.in.text -text "Offset In" -justify left
+label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
+label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
+label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
+label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
+
+pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3
+
+label .control.offset.space
+
+frame .control.offset.out
+label .control.offset.out.text -text "Offset Out" -justify left
+label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
+label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
+label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
+label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
+
+pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom
+
+pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1
+
+
+pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1
+
+
+label .statustext -text Status -justify center -relief ridge
+label .controltext -text Control -justify center -relief ridge
+
+label .statusspace
+label .controlspace
+
+pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1
+
+
+proc get_bit {output sstr} {
+ set idx1 [string last [concat $sstr 1] $output]
+ set idx1 [expr $idx1 != -1]
+ return $idx1
+}
+
+proc get_val {output sstr} {
+ set val [string wordend $output [string last $sstr $output]]
+ set val [string range $output $val [expr $val+1]]
+ return $val
+}
+
+proc get_val2 {output sstr} {
+ set val [string wordend $output [string first $sstr $output]]
+ set val [string range $output $val [expr $val+2]]
+ return $val
+}
+
+proc get_control {} {
+ global spprof
+ global spemph
+ global spnoaud
+ global spoptical
+ global spdifin
+ global ssrate
+ global master
+ global wordclock
+ global syncsource
+ global CTRLPROG
+
+ set f [open "| $CTRLPROG control" r+]
+ set ooo [read $f 1000]
+ close $f
+# puts $ooo
+
+ set spprof [ get_bit $ooo "pro"]
+ set spemph [ get_bit $ooo "emphasis"]
+ set spnoaud [ get_bit $ooo "dolby"]
+ set spoptical [ get_bit $ooo "opt_out"]
+ set spdifin [ expr [ get_val $ooo "spdif_in"] + 1]
+ set ssrate [ expr [ get_val $ooo "latency"] + 1]
+ set master [ expr [ get_val $ooo "master"]]
+ set wordclock [ expr [ get_val $ooo "wordclock"]]
+ set syncsource [ expr [ get_val $ooo "sync_ref"] + 1]
+}
+
+proc get_status {} {
+ global srate
+ global ctrlcom
+
+ global adatlock1
+ global adatlock2
+ global adatlock3
+
+ global adatsync1
+ global adatsync2
+ global adatsync3
+
+ global tcbusy
+ global tcout
+ global tcvalid
+
+ global spdiferr
+ global crystal
+ global .status.spdif.text
+ global CTRLPROG
+
+
+ set f [open "| $CTRLPROG status" r+]
+ set ooo [read $f 1000]
+ close $f
+# puts $ooo
+
+# samplerate
+
+ set idx1 [string last "sr48 1" $ooo]
+ set idx2 [string last "doublespeed 1" $ooo]
+ if {$idx1 >= 0} {
+ set fact1 48000
+ } else {
+ set fact1 44100
+ }
+
+ if {$idx2 >= 0} {
+ set fact2 2
+ } else {
+ set fact2 1
+ }
+ set srate [expr $fact1 * $fact2]
+# ADAT lock
+
+ set val [get_val $ooo lockmask]
+ set adatlock1 0
+ set adatlock2 0
+ set adatlock3 0
+ if {[expr $val & 1]} {
+ set adatlock3 1
+ }
+ if {[expr $val & 2]} {
+ set adatlock2 1
+ }
+ if {[expr $val & 4]} {
+ set adatlock1 1
+ }
+
+# ADAT sync
+ set val [get_val $ooo syncmask]
+ set adatsync1 0
+ set adatsync2 0
+ set adatsync3 0
+
+ if {[expr $val & 1]} {
+ set adatsync3 1
+ }
+ if {[expr $val & 2]} {
+ set adatsync2 1
+ }
+ if {[expr $val & 4]} {
+ set adatsync1 1
+ }
+
+# TC busy
+
+ set tcbusy [get_bit $ooo "busy"]
+ set tcout [get_bit $ooo "out"]
+ set tcvalid [get_bit $ooo "valid"]
+ set spdiferr [expr [get_bit $ooo "spdif_error"] == 0]
+
+# 000=64kHz, 100=88.2kHz, 011=96kHz
+# 111=32kHz, 110=44.1kHz, 101=48kHz
+
+ set val [get_val $ooo crystalrate]
+
+ set crystal "--.- kHz"
+ if {$val == 0} {
+ set crystal "64 kHz"
+ }
+ if {$val == 4} {
+ set crystal "88.2 kHz"
+ }
+ if {$val == 3} {
+ set crystal "96 kHz"
+ }
+ if {$val == 7} {
+ set crystal "32 kHz"
+ }
+ if {$val == 6} {
+ set crystal "44.1 kHz"
+ }
+ if {$val == 5} {
+ set crystal "48 kHz"
+ }
+ .status.spdif.sr configure -text $crystal
+}
+
+proc get_offset {} {
+ global inoffset
+ global outoffset
+ global CTRLPROG
+
+ set f [open "| $CTRLPROG mix" r+]
+ set ooo [read $f 1000]
+ close $f
+# puts $ooo
+
+ if { [string match "*devnr*" $ooo] } {
+ set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
+ set val [get_val2 $ooo i_offset]
+ .control.offset.in.off0 configure -text "dev\#0: $val"
+ set val [get_val2 $ooo o_offset]
+ .control.offset.out.off0 configure -text "dev\#0: $val"
+ } else {
+ .control.offset.in.off0 configure -text "dev\#0: -"
+ .control.offset.out.off0 configure -text "dev\#0: -"
+ }
+ if { [string match "*devnr*" $ooo] } {
+ set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
+ set val [get_val2 $ooo i_offset]
+ .control.offset.in.off1 configure -text "dev\#1: $val"
+ set val [get_val2 $ooo o_offset]
+ .control.offset.out.off1 configure -text "dev\#1: $val"
+ } else {
+ .control.offset.in.off1 configure -text "dev\#1: -"
+ .control.offset.out.off1 configure -text "dev\#1: -"
+ }
+ if { [string match "*devnr*" $ooo] } {
+ set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
+ set val [get_val2 $ooo i_offset]
+ .control.offset.in.off2 configure -text "dev\#2: $val"
+ set val [get_val2 $ooo o_offset]
+ .control.offset.out.off2 configure -text "dev\#2: $val"
+ } else {
+ .control.offset.in.off2 configure -text "dev\#2: -"
+ .control.offset.out.off2 configure -text "dev\#2: -"
+ }
+ if { [string match "*devnr*" $ooo] } {
+ set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
+ set val [get_val2 $ooo i_offset]
+ .control.offset.in.off3 configure -text "dev\#3: $val"
+ set val [get_val2 $ooo o_offset]
+ .control.offset.out.off3 configure -text "dev\#3: $val"
+ } else {
+ .control.offset.in.off3 configure -text "dev\#3: -"
+ .control.offset.out.off3 configure -text "dev\#3: -"
+ }
+}
+
+
+proc get_all {} {
+get_status
+get_control
+get_offset
+}
+
+# main
+while {1} {
+ after 200
+ get_all
+ update
+}
diff --git a/trunk/Documentation/sound/oss/solo1 b/trunk/Documentation/sound/oss/solo1
new file mode 100644
index 000000000000..95c4c83422b3
--- /dev/null
+++ b/trunk/Documentation/sound/oss/solo1
@@ -0,0 +1,70 @@
+Recording
+---------
+
+Recording does not work on the author's card, but there
+is at least one report of it working on later silicon.
+The chip behaves differently than described in the data sheet,
+likely due to a chip bug. Working around this would require
+the help of ESS (for example by publishing an errata sheet),
+but ESS has not done so far.
+
+Also, the chip only supports 24 bit addresses for recording,
+which means it cannot work on some Alpha mainboards.
+
+
+/proc/sound, /dev/sndstat
+-------------------------
+
+/proc/sound and /dev/sndstat is not supported by the
+driver. To find out whether the driver succeeded loading,
+check the kernel log (dmesg).
+
+
+ALaw/uLaw sample formats
+------------------------
+
+This driver does not support the ALaw/uLaw sample formats.
+ALaw is the default mode when opening a sound device
+using OSS/Free. The reason for the lack of support is
+that the hardware does not support these formats, and adding
+conversion routines to the kernel would lead to very ugly
+code in the presence of the mmap interface to the driver.
+And since xquake uses mmap, mmap is considered important :-)
+and no sane application uses ALaw/uLaw these days anyway.
+In short, playing a Sun .au file as follows:
+
+cat my_file.au > /dev/dsp
+
+does not work. Instead, you may use the play script from
+Chris Bagwell's sox-12.14 package (or later, available from the URL
+below) to play many different audio file formats.
+The script automatically determines the audio format
+and does do audio conversions if necessary.
+http://home.sprynet.com/sprynet/cbagwell/projects.html
+
+
+Blocking vs. nonblocking IO
+---------------------------
+
+Unlike OSS/Free this driver honours the O_NONBLOCK file flag
+not only during open, but also during read and write.
+This is an effort to make the sound driver interface more
+regular. Timidity has problems with this; a patch
+is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
+(Timidity patched will also run on OSS/Free).
+
+
+MIDI UART
+---------
+
+The driver supports a simple MIDI UART interface, with
+no ioctl's supported.
+
+
+MIDI synthesizer
+----------------
+
+The card has an OPL compatible FM synthesizer.
+
+Thomas Sailer
+t.sailer@alumni.ethz.ch
diff --git a/trunk/Documentation/sound/oss/sonicvibes b/trunk/Documentation/sound/oss/sonicvibes
new file mode 100644
index 000000000000..84dee2e0b37d
--- /dev/null
+++ b/trunk/Documentation/sound/oss/sonicvibes
@@ -0,0 +1,81 @@
+/proc/sound, /dev/sndstat
+-------------------------
+
+/proc/sound and /dev/sndstat is not supported by the
+driver. To find out whether the driver succeeded loading,
+check the kernel log (dmesg).
+
+
+ALaw/uLaw sample formats
+------------------------
+
+This driver does not support the ALaw/uLaw sample formats.
+ALaw is the default mode when opening a sound device
+using OSS/Free. The reason for the lack of support is
+that the hardware does not support these formats, and adding
+conversion routines to the kernel would lead to very ugly
+code in the presence of the mmap interface to the driver.
+And since xquake uses mmap, mmap is considered important :-)
+and no sane application uses ALaw/uLaw these days anyway.
+In short, playing a Sun .au file as follows:
+
+cat my_file.au > /dev/dsp
+
+does not work. Instead, you may use the play script from
+Chris Bagwell's sox-12.14 package (available from the URL
+below) to play many different audio file formats.
+The script automatically determines the audio format
+and does do audio conversions if necessary.
+http://home.sprynet.com/sprynet/cbagwell/projects.html
+
+
+Blocking vs. nonblocking IO
+---------------------------
+
+Unlike OSS/Free this driver honours the O_NONBLOCK file flag
+not only during open, but also during read and write.
+This is an effort to make the sound driver interface more
+regular. Timidity has problems with this; a patch
+is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
+(Timidity patched will also run on OSS/Free).
+
+
+MIDI UART
+---------
+
+The driver supports a simple MIDI UART interface, with
+no ioctl's supported.
+
+
+MIDI synthesizer
+----------------
+
+The card both has an OPL compatible FM synthesizer as well as
+a wavetable synthesizer.
+
+I haven't managed so far to get the OPL synth running.
+
+Using the wavetable synthesizer requires allocating
+1-4MB of physically contiguous memory, which isn't possible
+currently on Linux without ugly hacks like the bigphysarea
+patch. Therefore, the driver doesn't support wavetable
+synthesis.
+
+
+No support from S3
+------------------
+
+I do not get any support from S3. Therefore, the driver
+still has many problems. For example, although the manual
+states that the chip should be able to access the sample
+buffer anywhere in 32bit address space, I haven't managed to
+get it working with buffers above 16M. Therefore, the card
+has the same disadvantages as ISA soundcards.
+
+Given that the card is also very noisy, and if you haven't
+already bought it, you should strongly opt for one of the
+comparatively priced Ensoniq products.
+
+
+Thomas Sailer
+t.sailer@alumni.ethz.ch
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 17becb9b1a96..1c6223d3ce70 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -898,16 +898,6 @@ M: jack@suse.cz
L: linux-kernel@vger.kernel.org
S: Maintained
-DISTRIBUTED LOCK MANAGER
-P: Patrick Caulfield
-M: pcaulfie@redhat.com
-P: David Teigland
-M: teigland@redhat.com
-L: cluster-devel@redhat.com
-W: http://sources.redhat.com/cluster/
-T: git kernel.org:/pub/scm/linux/kernel/git/steve/gfs-2.6.git
-S: Supported
-
DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER
P: Tobias Ringstrom
M: tori@unhappy.mine.nu
@@ -987,13 +977,6 @@ L: ebtables-devel@lists.sourceforge.net
W: http://ebtables.sourceforge.net/
S: Maintained
-ECRYPT FILE SYSTEM
-P: Mike Halcrow, Phillip Hellewell
-M: mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
-L: ecryptfs-devel@lists.sourceforge.net
-W: http://ecryptfs.sourceforge.net/
-S: Supported
-
EDAC-CORE
P: Doug Thompson
M: norsk5@xmission.com
@@ -1183,14 +1166,6 @@ M: khc@pm.waw.pl
W: http://www.kernel.org/pub/linux/utils/net/hdlc/
S: Maintained
-GFS2 FILE SYSTEM
-P: Steven Whitehouse
-M: swhiteho@redhat.com
-L: cluster-devel@redhat.com
-W: http://sources.redhat.com/cluster/
-T: git kernel.org:/pub/scm/linux/kernel/git/steve/gfs-2.6.git
-S: Supported
-
GIGASET ISDN DRIVERS
P: Hansjoerg Lipp
M: hjlipp@web.de
@@ -1918,6 +1893,11 @@ M: rroesler@syskonnect.de
W: http://www.syskonnect.com
S: Supported
+MAESTRO PCI SOUND DRIVERS
+P: Zach Brown
+M: zab@zabbo.net
+S: Odd Fixes
+
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
P: Michael Kerrisk
M: mtk-manpages@gmx.net
@@ -2454,19 +2434,6 @@ M: mporter@kernel.crashing.org
L: linux-kernel@vger.kernel.org
S: Maintained
-READ-COPY UPDATE (RCU)
-P: Dipankar Sarma
-M: dipankar@in.ibm.com
-W: http://www.rdrop.com/users/paulmck/rclock/
-L: linux-kernel@vger.kernel.org
-S: Supported
-
-RCUTORTURE MODULE
-P: Josh Triplett
-M: josh@freedesktop.org
-L: linux-kernel@vger.kernel.org
-S: Maintained
-
REAL TIME CLOCK DRIVER
P: Paul Gortmaker
M: p_gortmaker@yahoo.com
@@ -2887,11 +2854,6 @@ M: hlhung3i@gmail.com
W: http://tcp-lp-mod.sourceforge.net/
S: Maintained
-TI FLASH MEDIA INTERFACE DRIVER
-P: Alex Dubov
-M: oakad@yahoo.com
-S: Maintained
-
TI OMAP RANDOM NUMBER GENERATOR SUPPORT
P: Deepak Saxena
M: dsaxena@plexity.net
@@ -3415,6 +3377,12 @@ M: Henk.Vergonet@gmail.com
L: usbb2k-api-dev@nongnu.org
S: Maintained
+YMFPCI YAMAHA PCI SOUND (Use ALSA instead)
+P: Pete Zaitcev
+M: zaitcev@yahoo.com
+L: linux-kernel@vger.kernel.org
+S: Obsolete
+
Z8530 DRIVER FOR AX.25
P: Joerg Reuter
M: jreuter@yaina.de
diff --git a/trunk/Makefile b/trunk/Makefile
index adb2c748e105..4c6c5e32ef96 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -1321,7 +1321,7 @@ define xtags
--langdef=kconfig \
--language-force=kconfig \
--regex-kconfig='/^[[:blank:]]*config[[:blank:]]+([[:alnum:]_]+)/\1/'; \
- $(all-defconfigs) | xargs -r $1 -a \
+ $(all-defconfigs) | xargs $1 -a \
--langdef=dotconfig \
--language-force=dotconfig \
--regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \
@@ -1329,7 +1329,7 @@ define xtags
$(all-sources) | xargs $1 -a; \
$(all-kconfigs) | xargs $1 -a \
--regex='/^[ \t]*config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \
- $(all-defconfigs) | xargs -r $1 -a \
+ $(all-defconfigs) | xargs $1 -a \
--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
else \
$(all-sources) | xargs $1 -a; \
diff --git a/trunk/arch/alpha/kernel/setup.c b/trunk/arch/alpha/kernel/setup.c
index fd4a8fa0c93d..a94e6d93e2ee 100644
--- a/trunk/arch/alpha/kernel/setup.c
+++ b/trunk/arch/alpha/kernel/setup.c
@@ -21,7 +21,6 @@
#include
#include
#include
-#include /* CONFIG_ALPHA_LCA etc */
#include
#include
#include
diff --git a/trunk/arch/alpha/kernel/systbls.S b/trunk/arch/alpha/kernel/systbls.S
index 4342cea1a926..f6cfe8ce3f96 100644
--- a/trunk/arch/alpha/kernel/systbls.S
+++ b/trunk/arch/alpha/kernel/systbls.S
@@ -4,7 +4,6 @@
* The system call table.
*/
-#include /* CONFIG_OSF4_COMPAT */
#include
.data
diff --git a/trunk/arch/arm/kernel/crunch.c b/trunk/arch/arm/kernel/crunch.c
index 748175921f9b..cec83783206e 100644
--- a/trunk/arch/arm/kernel/crunch.c
+++ b/trunk/arch/arm/kernel/crunch.c
@@ -10,7 +10,6 @@
*/
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/kernel/iwmmxt-notifier.c b/trunk/arch/arm/kernel/iwmmxt-notifier.c
index 44a86c33796e..0d1a1db40062 100644
--- a/trunk/arch/arm/kernel/iwmmxt-notifier.c
+++ b/trunk/arch/arm/kernel/iwmmxt-notifier.c
@@ -15,7 +15,6 @@
*/
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-at91rm9200/board-1arm.c b/trunk/arch/arm/mach-at91rm9200/board-1arm.c
index 36eecd7161f5..971c3e2d8e36 100644
--- a/trunk/arch/arm/mach-at91rm9200/board-1arm.c
+++ b/trunk/arch/arm/mach-at91rm9200/board-1arm.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-at91rm9200/board-carmeva.c b/trunk/arch/arm/mach-at91rm9200/board-carmeva.c
index 50e513681ae6..98208740e7c5 100644
--- a/trunk/arch/arm/mach-at91rm9200/board-carmeva.c
+++ b/trunk/arch/arm/mach-at91rm9200/board-carmeva.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-at91rm9200/board-eb9200.c b/trunk/arch/arm/mach-at91rm9200/board-eb9200.c
index c6e0d51fbea0..65e867ba2df3 100644
--- a/trunk/arch/arm/mach-at91rm9200/board-eb9200.c
+++ b/trunk/arch/arm/mach-at91rm9200/board-eb9200.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-at91rm9200/board-kafa.c b/trunk/arch/arm/mach-at91rm9200/board-kafa.c
index 91e301924f2c..6ef3c4879829 100644
--- a/trunk/arch/arm/mach-at91rm9200/board-kafa.c
+++ b/trunk/arch/arm/mach-at91rm9200/board-kafa.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-at91rm9200/board-kb9202.c b/trunk/arch/arm/mach-at91rm9200/board-kb9202.c
index 272fe43bceca..35a954a44b1b 100644
--- a/trunk/arch/arm/mach-at91rm9200/board-kb9202.c
+++ b/trunk/arch/arm/mach-at91rm9200/board-kb9202.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-ep93xx/edb9302.c b/trunk/arch/arm/mach-ep93xx/edb9302.c
index 62a8efd23256..0315615b74da 100644
--- a/trunk/arch/arm/mach-ep93xx/edb9302.c
+++ b/trunk/arch/arm/mach-ep93xx/edb9302.c
@@ -10,7 +10,6 @@
* your option) any later version.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-ep93xx/edb9312.c b/trunk/arch/arm/mach-ep93xx/edb9312.c
index 9e399211108c..e310e4d72990 100644
--- a/trunk/arch/arm/mach-ep93xx/edb9312.c
+++ b/trunk/arch/arm/mach-ep93xx/edb9312.c
@@ -11,7 +11,6 @@
* your option) any later version.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-ep93xx/edb9315.c b/trunk/arch/arm/mach-ep93xx/edb9315.c
index ef7482faad81..249ca9e57bc6 100644
--- a/trunk/arch/arm/mach-ep93xx/edb9315.c
+++ b/trunk/arch/arm/mach-ep93xx/edb9315.c
@@ -10,7 +10,6 @@
* your option) any later version.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-ep93xx/edb9315a.c b/trunk/arch/arm/mach-ep93xx/edb9315a.c
index fa958e9d6ddd..7ca0e6170a41 100644
--- a/trunk/arch/arm/mach-ep93xx/edb9315a.c
+++ b/trunk/arch/arm/mach-ep93xx/edb9315a.c
@@ -10,7 +10,6 @@
* your option) any later version.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-lh7a40x/clcd.c b/trunk/arch/arm/mach-lh7a40x/clcd.c
index 93751fee793d..1992db4c2523 100644
--- a/trunk/arch/arm/mach-lh7a40x/clcd.c
+++ b/trunk/arch/arm/mach-lh7a40x/clcd.c
@@ -8,7 +8,7 @@
* version 2 as published by the Free Software Foundation.
*
*/
-#include
+
#include
#include
#include
diff --git a/trunk/arch/arm/mach-lh7a40x/clocks.c b/trunk/arch/arm/mach-lh7a40x/clocks.c
index 2291afe9f23e..7530a95c15a6 100644
--- a/trunk/arch/arm/mach-lh7a40x/clocks.c
+++ b/trunk/arch/arm/mach-lh7a40x/clocks.c
@@ -8,7 +8,6 @@
*
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-omap2/pm-domain.c b/trunk/arch/arm/mach-omap2/pm-domain.c
index 5e20e740cde5..2494091a078b 100644
--- a/trunk/arch/arm/mach-omap2/pm-domain.c
+++ b/trunk/arch/arm/mach-omap2/pm-domain.c
@@ -15,7 +15,6 @@
* published by the Free Software Foundation.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-pnx4008/gpio.c b/trunk/arch/arm/mach-pnx4008/gpio.c
index e1ce050d8fe0..1ab84ced7b5a 100644
--- a/trunk/arch/arm/mach-pnx4008/gpio.c
+++ b/trunk/arch/arm/mach-pnx4008/gpio.c
@@ -14,7 +14,6 @@
* or implied.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-pnx4008/sleep.S b/trunk/arch/arm/mach-pnx4008/sleep.S
index 93c802bac269..fea1e17a3650 100644
--- a/trunk/arch/arm/mach-pnx4008/sleep.S
+++ b/trunk/arch/arm/mach-pnx4008/sleep.S
@@ -11,7 +11,6 @@
* or implied.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-pnx4008/time.c b/trunk/arch/arm/mach-pnx4008/time.c
index 756228ddd035..b986065cd0f3 100644
--- a/trunk/arch/arm/mach-pnx4008/time.c
+++ b/trunk/arch/arm/mach-pnx4008/time.c
@@ -11,7 +11,6 @@
* or implied.
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-pxa/leds-trizeps4.c b/trunk/arch/arm/mach-pxa/leds-trizeps4.c
index 14cfc85e44b5..2271d20ffeda 100644
--- a/trunk/arch/arm/mach-pxa/leds-trizeps4.c
+++ b/trunk/arch/arm/mach-pxa/leds-trizeps4.c
@@ -10,7 +10,6 @@
* published by the Free Software Foundation.
*/
-#include
#include
#include
diff --git a/trunk/arch/arm/tools/gen-mach-types b/trunk/arch/arm/tools/gen-mach-types
index 2f9c9b5dd260..ce319ef64bc1 100644
--- a/trunk/arch/arm/tools/gen-mach-types
+++ b/trunk/arch/arm/tools/gen-mach-types
@@ -28,7 +28,6 @@ END {
printf(" */\n\n");
printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
printf("#define __ASM_ARM_MACH_TYPE_H\n\n");
- printf("#include \n\n");
printf("#ifndef __ASSEMBLY__\n");
printf("/* The type of machine we're running on */\n");
printf("extern unsigned int __machine_arch_type;\n");
diff --git a/trunk/arch/arm26/lib/ecard.S b/trunk/arch/arm26/lib/ecard.S
index b4633150f01c..658bc4529c9d 100644
--- a/trunk/arch/arm26/lib/ecard.S
+++ b/trunk/arch/arm26/lib/ecard.S
@@ -7,7 +7,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#include /* for CONFIG_CPU_nn */
#include
#include
#include
diff --git a/trunk/arch/arm26/lib/io-acorn.S b/trunk/arch/arm26/lib/io-acorn.S
index f6c3e30b1b4f..5f62ade5be39 100644
--- a/trunk/arch/arm26/lib/io-acorn.S
+++ b/trunk/arch/arm26/lib/io-acorn.S
@@ -7,7 +7,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#include /* for CONFIG_CPU_nn */
#include
#include
#include
diff --git a/trunk/arch/frv/kernel/time.c b/trunk/arch/frv/kernel/time.c
index 7e55884135ed..44a9aebc4f5a 100644
--- a/trunk/arch/frv/kernel/time.c
+++ b/trunk/arch/frv/kernel/time.c
@@ -10,7 +10,6 @@
* 2 of the License, or (at your option) any later version.
*/
-#include /* CONFIG_HEARTBEAT */
#include
#include
#include
diff --git a/trunk/arch/h8300/kernel/time.c b/trunk/arch/h8300/kernel/time.c
index e569d17b4ae6..8abab3bc2b6f 100644
--- a/trunk/arch/h8300/kernel/time.c
+++ b/trunk/arch/h8300/kernel/time.c
@@ -16,7 +16,6 @@
* "A Kernel Model for Precision Timekeeping" by Dave Mills
*/
-#include /* CONFIG_HEARTBEAT */
#include
#include
#include
diff --git a/trunk/arch/i386/kernel/acpi/boot.c b/trunk/arch/i386/kernel/acpi/boot.c
index 92f79cdd9a48..1aaea6ab8c46 100644
--- a/trunk/arch/i386/kernel/acpi/boot.c
+++ b/trunk/arch/i386/kernel/acpi/boot.c
@@ -62,6 +62,8 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
#include
#endif /* CONFIG_X86_LOCAL_APIC */
+static inline int gsi_irq_sharing(int gsi) { return gsi; }
+
#endif /* X86 */
#define BAD_MADT_ENTRY(entry, end) ( \
@@ -466,7 +468,12 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
{
- *irq = gsi;
+#ifdef CONFIG_X86_IO_APIC
+ if (use_pci_vector() && !platform_legacy_irq(gsi))
+ *irq = IO_APIC_VECTOR(gsi);
+ else
+#endif
+ *irq = gsi_irq_sharing(gsi);
return 0;
}
diff --git a/trunk/arch/i386/kernel/i8259.c b/trunk/arch/i386/kernel/i8259.c
index d07ed31f11e3..ea5f4e7958d8 100644
--- a/trunk/arch/i386/kernel/i8259.c
+++ b/trunk/arch/i386/kernel/i8259.c
@@ -34,15 +34,35 @@
* moves to arch independent land
*/
-static int i8259A_auto_eoi;
DEFINE_SPINLOCK(i8259A_lock);
+
+static void end_8259A_irq (unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) &&
+ irq_desc[irq].action)
+ enable_8259A_irq(irq);
+}
+
+#define shutdown_8259A_irq disable_8259A_irq
+
+static int i8259A_auto_eoi;
+
static void mask_and_ack_8259A(unsigned int);
-static struct irq_chip i8259A_chip = {
- .name = "XT-PIC",
- .mask = disable_8259A_irq,
- .unmask = enable_8259A_irq,
- .mask_ack = mask_and_ack_8259A,
+unsigned int startup_8259A_irq(unsigned int irq)
+{
+ enable_8259A_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static struct hw_interrupt_type i8259A_irq_type = {
+ .typename = "XT-PIC",
+ .startup = startup_8259A_irq,
+ .shutdown = shutdown_8259A_irq,
+ .enable = enable_8259A_irq,
+ .disable = disable_8259A_irq,
+ .ack = mask_and_ack_8259A,
+ .end = end_8259A_irq,
};
/*
@@ -113,7 +133,7 @@ void make_8259A_irq(unsigned int irq)
{
disable_irq_nosync(irq);
io_apic_irqs &= ~(1<
#include
#include
-#include
-#include
-#include
#include
#include
@@ -41,8 +38,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -91,6 +86,15 @@ static struct irq_pin_list {
int apic, pin, next;
} irq_2_pin[PIN_MAP_SIZE];
+int vector_irq[NR_VECTORS] __read_mostly = { [0 ... NR_VECTORS - 1] = -1};
+#ifdef CONFIG_PCI_MSI
+#define vector_to_irq(vector) \
+ (platform_legacy_irq(vector) ? vector : vector_irq[vector])
+#else
+#define vector_to_irq(vector) (vector)
+#endif
+
+
union entry_union {
struct { u32 w1, w2; };
struct IO_APIC_route_entry entry;
@@ -276,7 +280,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
break;
entry = irq_2_pin + entry->next;
}
- set_native_irq_info(irq, cpumask);
+ set_irq_info(irq, cpumask);
spin_unlock_irqrestore(&ioapic_lock, flags);
}
@@ -1177,45 +1181,46 @@ static inline int IO_APIC_irq_trigger(int irq)
/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 };
-static int __assign_irq_vector(int irq)
+int assign_irq_vector(int irq)
{
static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
+ unsigned long flags;
int vector;
- BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
+ BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS);
- if (IO_APIC_VECTOR(irq) > 0)
- return IO_APIC_VECTOR(irq);
+ spin_lock_irqsave(&vector_lock, flags);
+ if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) {
+ spin_unlock_irqrestore(&vector_lock, flags);
+ return IO_APIC_VECTOR(irq);
+ }
+next:
current_vector += 8;
if (current_vector == SYSCALL_VECTOR)
- current_vector += 8;
+ goto next;
if (current_vector >= FIRST_SYSTEM_VECTOR) {
offset++;
- if (!(offset % 8))
+ if (!(offset%8)) {
+ spin_unlock_irqrestore(&vector_lock, flags);
return -ENOSPC;
+ }
current_vector = FIRST_DEVICE_VECTOR + offset;
}
vector = current_vector;
- IO_APIC_VECTOR(irq) = vector;
-
- return vector;
-}
-
-static int assign_irq_vector(int irq)
-{
- unsigned long flags;
- int vector;
+ vector_irq[vector] = irq;
+ if (irq != AUTO_ASSIGN)
+ IO_APIC_VECTOR(irq) = vector;
- spin_lock_irqsave(&vector_lock, flags);
- vector = __assign_irq_vector(irq);
spin_unlock_irqrestore(&vector_lock, flags);
return vector;
}
-static struct irq_chip ioapic_chip;
+
+static struct hw_interrupt_type ioapic_level_type;
+static struct hw_interrupt_type ioapic_edge_type;
#define IOAPIC_AUTO -1
#define IOAPIC_EDGE 0
@@ -1223,14 +1228,16 @@ static struct irq_chip ioapic_chip;
static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
{
+ unsigned idx;
+
+ idx = use_pci_vector() && !platform_legacy_irq(irq) ? vector : irq;
+
if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
trigger == IOAPIC_LEVEL)
- set_irq_chip_and_handler(irq, &ioapic_chip,
- handle_fasteoi_irq);
+ irq_desc[idx].chip = &ioapic_level_type;
else
- set_irq_chip_and_handler(irq, &ioapic_chip,
- handle_edge_irq);
- set_intr_gate(vector, interrupt[irq]);
+ irq_desc[idx].chip = &ioapic_edge_type;
+ set_intr_gate(vector, interrupt[idx]);
}
static void __init setup_IO_APIC_irqs(void)
@@ -1339,8 +1346,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
* The timer IRQ doesn't have to know that behind the
* scene we have a 8259A-master in AEOI mode ...
*/
- irq_desc[0].chip = &ioapic_chip;
- set_irq_handler(0, handle_edge_irq);
+ irq_desc[0].chip = &ioapic_edge_type;
/*
* Add it to the IO-APIC irq-routing table:
@@ -1475,12 +1481,17 @@ void __init print_IO_APIC(void)
);
}
}
+ if (use_pci_vector())
+ printk(KERN_INFO "Using vector-based indexing\n");
printk(KERN_DEBUG "IRQ to pin mappings:\n");
for (i = 0; i < NR_IRQS; i++) {
struct irq_pin_list *entry = irq_2_pin + i;
if (entry->pin < 0)
continue;
- printk(KERN_DEBUG "IRQ%d ", i);
+ if (use_pci_vector() && !platform_legacy_irq(i))
+ printk(KERN_DEBUG "IRQ%d ", IO_APIC_VECTOR(i));
+ else
+ printk(KERN_DEBUG "IRQ%d ", i);
for (;;) {
printk("-> %d:%d", entry->apic, entry->pin);
if (!entry->next)
@@ -1907,8 +1918,6 @@ static int __init timer_irq_works(void)
*/
/*
- * Startup quirk:
- *
* Starting up a edge-triggered IO-APIC interrupt is
* nasty - we need to make sure that we get the edge.
* If it is already asserted for some reason, we need
@@ -1916,10 +1925,8 @@ static int __init timer_irq_works(void)
*
* This is not complete - we should be able to fake
* an edge even if it isn't on the 8259A...
- *
- * (We do this for level-triggered IRQs too - it cannot hurt.)
*/
-static unsigned int startup_ioapic_irq(unsigned int irq)
+static unsigned int startup_edge_ioapic_irq(unsigned int irq)
{
int was_pending = 0;
unsigned long flags;
@@ -1936,18 +1943,47 @@ static unsigned int startup_ioapic_irq(unsigned int irq)
return was_pending;
}
-static void ack_ioapic_irq(unsigned int irq)
+/*
+ * Once we have recorded IRQ_PENDING already, we can mask the
+ * interrupt for real. This prevents IRQ storms from unhandled
+ * devices.
+ */
+static void ack_edge_ioapic_irq(unsigned int irq)
{
- move_native_irq(irq);
+ move_irq(irq);
+ if ((irq_desc[irq].status & (IRQ_PENDING | IRQ_DISABLED))
+ == (IRQ_PENDING | IRQ_DISABLED))
+ mask_IO_APIC_irq(irq);
ack_APIC_irq();
}
-static void ack_ioapic_quirk_irq(unsigned int irq)
+/*
+ * Level triggered interrupts can just be masked,
+ * and shutting down and starting up the interrupt
+ * is the same as enabling and disabling them -- except
+ * with a startup need to return a "was pending" value.
+ *
+ * Level triggered interrupts are special because we
+ * do not touch any IO-APIC register while handling
+ * them. We ack the APIC in the end-IRQ handler, not
+ * in the start-IRQ-handler. Protection against reentrance
+ * from the same interrupt is still provided, both by the
+ * generic IRQ layer and by the fact that an unacked local
+ * APIC does not accept IRQs.
+ */
+static unsigned int startup_level_ioapic_irq (unsigned int irq)
+{
+ unmask_IO_APIC_irq(irq);
+
+ return 0; /* don't check for pending */
+}
+
+static void end_level_ioapic_irq (unsigned int irq)
{
unsigned long v;
int i;
- move_native_irq(irq);
+ move_irq(irq);
/*
* It appears there is an erratum which affects at least version 0x11
* of I/O APIC (that's the 82093AA and cores integrated into various
@@ -1982,26 +2018,105 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
}
}
-static int ioapic_retrigger_irq(unsigned int irq)
+#ifdef CONFIG_PCI_MSI
+static unsigned int startup_edge_ioapic_vector(unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ return startup_edge_ioapic_irq(irq);
+}
+
+static void ack_edge_ioapic_vector(unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ move_native_irq(vector);
+ ack_edge_ioapic_irq(irq);
+}
+
+static unsigned int startup_level_ioapic_vector (unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ return startup_level_ioapic_irq (irq);
+}
+
+static void end_level_ioapic_vector (unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ move_native_irq(vector);
+ end_level_ioapic_irq(irq);
+}
+
+static void mask_IO_APIC_vector (unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ mask_IO_APIC_irq(irq);
+}
+
+static void unmask_IO_APIC_vector (unsigned int vector)
+{
+ int irq = vector_to_irq(vector);
+
+ unmask_IO_APIC_irq(irq);
+}
+
+#ifdef CONFIG_SMP
+static void set_ioapic_affinity_vector (unsigned int vector,
+ cpumask_t cpu_mask)
+{
+ int irq = vector_to_irq(vector);
+
+ set_native_irq_info(vector, cpu_mask);
+ set_ioapic_affinity_irq(irq, cpu_mask);
+}
+#endif
+#endif
+
+static int ioapic_retrigger(unsigned int irq)
{
send_IPI_self(IO_APIC_VECTOR(irq));
return 1;
}
-static struct irq_chip ioapic_chip __read_mostly = {
- .name = "IO-APIC",
- .startup = startup_ioapic_irq,
- .mask = mask_IO_APIC_irq,
- .unmask = unmask_IO_APIC_irq,
- .ack = ack_ioapic_irq,
- .eoi = ack_ioapic_quirk_irq,
+/*
+ * Level and edge triggered IO-APIC interrupts need different handling,
+ * so we use two separate IRQ descriptors. Edge triggered IRQs can be
+ * handled with the level-triggered descriptor, but that one has slightly
+ * more overhead. Level-triggered interrupts cannot be handled with the
+ * edge-triggered handler, without risking IRQ storms and other ugly
+ * races.
+ */
+static struct hw_interrupt_type ioapic_edge_type __read_mostly = {
+ .typename = "IO-APIC-edge",
+ .startup = startup_edge_ioapic,
+ .shutdown = shutdown_edge_ioapic,
+ .enable = enable_edge_ioapic,
+ .disable = disable_edge_ioapic,
+ .ack = ack_edge_ioapic,
+ .end = end_edge_ioapic,
#ifdef CONFIG_SMP
- .set_affinity = set_ioapic_affinity_irq,
+ .set_affinity = set_ioapic_affinity,
#endif
- .retrigger = ioapic_retrigger_irq,
+ .retrigger = ioapic_retrigger,
};
+static struct hw_interrupt_type ioapic_level_type __read_mostly = {
+ .typename = "IO-APIC-level",
+ .startup = startup_level_ioapic,
+ .shutdown = shutdown_level_ioapic,
+ .enable = enable_level_ioapic,
+ .disable = disable_level_ioapic,
+ .ack = mask_and_ack_level_ioapic,
+ .end = end_level_ioapic,
+#ifdef CONFIG_SMP
+ .set_affinity = set_ioapic_affinity,
+#endif
+ .retrigger = ioapic_retrigger,
+};
static inline void init_IO_APIC_traps(void)
{
@@ -2020,6 +2135,11 @@ static inline void init_IO_APIC_traps(void)
*/
for (irq = 0; irq < NR_IRQS ; irq++) {
int tmp = irq;
+ if (use_pci_vector()) {
+ if (!platform_legacy_irq(tmp))
+ if ((tmp = vector_to_irq(tmp)) == -1)
+ continue;
+ }
if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
/*
* Hmm.. We don't have an entry for this,
@@ -2030,21 +2150,20 @@ static inline void init_IO_APIC_traps(void)
make_8259A_irq(irq);
else
/* Strange. Oh, well.. */
- irq_desc[irq].chip = &no_irq_chip;
+ irq_desc[irq].chip = &no_irq_type;
}
}
}
-/*
- * The local APIC irq-chip implementation:
- */
-
-static void ack_apic(unsigned int irq)
+static void enable_lapic_irq (unsigned int irq)
{
- ack_APIC_irq();
+ unsigned long v;
+
+ v = apic_read(APIC_LVT0);
+ apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED);
}
-static void mask_lapic_irq (unsigned int irq)
+static void disable_lapic_irq (unsigned int irq)
{
unsigned long v;
@@ -2052,19 +2171,21 @@ static void mask_lapic_irq (unsigned int irq)
apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED);
}
-static void unmask_lapic_irq (unsigned int irq)
+static void ack_lapic_irq (unsigned int irq)
{
- unsigned long v;
-
- v = apic_read(APIC_LVT0);
- apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED);
+ ack_APIC_irq();
}
-static struct irq_chip lapic_chip __read_mostly = {
- .name = "local-APIC-edge",
- .mask = mask_lapic_irq,
- .unmask = unmask_lapic_irq,
- .eoi = ack_apic,
+static void end_lapic_irq (unsigned int i) { /* nothing */ }
+
+static struct hw_interrupt_type lapic_irq_type __read_mostly = {
+ .typename = "local-APIC-edge",
+ .startup = NULL, /* startup_irq() not used for IRQ0 */
+ .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */
+ .enable = enable_lapic_irq,
+ .disable = disable_lapic_irq,
+ .ack = ack_lapic_irq,
+ .end = end_lapic_irq
};
static void setup_nmi (void)
@@ -2235,7 +2356,7 @@ static inline void check_timer(void)
printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
disable_8259A_irq(0);
- set_irq_chip_and_handler(0, &lapic_chip, handle_fasteoi_irq);
+ irq_desc[0].chip = &lapic_irq_type;
apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
enable_8259A_irq(0);
@@ -2410,238 +2531,6 @@ static int __init ioapic_init_sysfs(void)
device_initcall(ioapic_init_sysfs);
-/*
- * Dynamic irq allocate and deallocation
- */
-int create_irq(void)
-{
- /* Allocate an unused irq */
- int irq, new, vector;
- unsigned long flags;
-
- irq = -ENOSPC;
- spin_lock_irqsave(&vector_lock, flags);
- for (new = (NR_IRQS - 1); new >= 0; new--) {
- if (platform_legacy_irq(new))
- continue;
- if (irq_vector[new] != 0)
- continue;
- vector = __assign_irq_vector(new);
- if (likely(vector > 0))
- irq = new;
- break;
- }
- spin_unlock_irqrestore(&vector_lock, flags);
-
- if (irq >= 0) {
- set_intr_gate(vector, interrupt[irq]);
- dynamic_irq_init(irq);
- }
- return irq;
-}
-
-void destroy_irq(unsigned int irq)
-{
- unsigned long flags;
-
- dynamic_irq_cleanup(irq);
-
- spin_lock_irqsave(&vector_lock, flags);
- irq_vector[irq] = 0;
- spin_unlock_irqrestore(&vector_lock, flags);
-}
-
-/*
- * MSI mesage composition
- */
-#ifdef CONFIG_PCI_MSI
-static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg)
-{
- int vector;
- unsigned dest;
-
- vector = assign_irq_vector(irq);
- if (vector >= 0) {
- dest = cpu_mask_to_apicid(TARGET_CPUS);
-
- msg->address_hi = MSI_ADDR_BASE_HI;
- msg->address_lo =
- MSI_ADDR_BASE_LO |
- ((INT_DEST_MODE == 0) ?
- MSI_ADDR_DEST_MODE_PHYSICAL:
- MSI_ADDR_DEST_MODE_LOGICAL) |
- ((INT_DELIVERY_MODE != dest_LowestPrio) ?
- MSI_ADDR_REDIRECTION_CPU:
- MSI_ADDR_REDIRECTION_LOWPRI) |
- MSI_ADDR_DEST_ID(dest);
-
- msg->data =
- MSI_DATA_TRIGGER_EDGE |
- MSI_DATA_LEVEL_ASSERT |
- ((INT_DELIVERY_MODE != dest_LowestPrio) ?
- MSI_DATA_DELIVERY_FIXED:
- MSI_DATA_DELIVERY_LOWPRI) |
- MSI_DATA_VECTOR(vector);
- }
- return vector;
-}
-
-#ifdef CONFIG_SMP
-static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
-{
- struct msi_msg msg;
- unsigned int dest;
- cpumask_t tmp;
- int vector;
-
- cpus_and(tmp, mask, cpu_online_map);
- if (cpus_empty(tmp))
- tmp = TARGET_CPUS;
-
- vector = assign_irq_vector(irq);
- if (vector < 0)
- return;
-
- dest = cpu_mask_to_apicid(mask);
-
- read_msi_msg(irq, &msg);
-
- msg.data &= ~MSI_DATA_VECTOR_MASK;
- msg.data |= MSI_DATA_VECTOR(vector);
- msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
- msg.address_lo |= MSI_ADDR_DEST_ID(dest);
-
- write_msi_msg(irq, &msg);
- set_native_irq_info(irq, mask);
-}
-#endif /* CONFIG_SMP */
-
-/*
- * IRQ Chip for MSI PCI/PCI-X/PCI-Express Devices,
- * which implement the MSI or MSI-X Capability Structure.
- */
-static struct irq_chip msi_chip = {
- .name = "PCI-MSI",
- .unmask = unmask_msi_irq,
- .mask = mask_msi_irq,
- .ack = ack_ioapic_irq,
-#ifdef CONFIG_SMP
- .set_affinity = set_msi_irq_affinity,
-#endif
- .retrigger = ioapic_retrigger_irq,
-};
-
-int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev)
-{
- struct msi_msg msg;
- int ret;
- ret = msi_compose_msg(dev, irq, &msg);
- if (ret < 0)
- return ret;
-
- write_msi_msg(irq, &msg);
-
- set_irq_chip_and_handler(irq, &msi_chip, handle_edge_irq);
-
- return 0;
-}
-
-void arch_teardown_msi_irq(unsigned int irq)
-{
- return;
-}
-
-#endif /* CONFIG_PCI_MSI */
-
-/*
- * Hypertransport interrupt support
- */
-#ifdef CONFIG_HT_IRQ
-
-#ifdef CONFIG_SMP
-
-static void target_ht_irq(unsigned int irq, unsigned int dest)
-{
- u32 low, high;
- low = read_ht_irq_low(irq);
- high = read_ht_irq_high(irq);
-
- low &= ~(HT_IRQ_LOW_DEST_ID_MASK);
- high &= ~(HT_IRQ_HIGH_DEST_ID_MASK);
-
- low |= HT_IRQ_LOW_DEST_ID(dest);
- high |= HT_IRQ_HIGH_DEST_ID(dest);
-
- write_ht_irq_low(irq, low);
- write_ht_irq_high(irq, high);
-}
-
-static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
-{
- unsigned int dest;
- cpumask_t tmp;
-
- cpus_and(tmp, mask, cpu_online_map);
- if (cpus_empty(tmp))
- tmp = TARGET_CPUS;
-
- cpus_and(mask, tmp, CPU_MASK_ALL);
-
- dest = cpu_mask_to_apicid(mask);
-
- target_ht_irq(irq, dest);
- set_native_irq_info(irq, mask);
-}
-#endif
-
-static struct hw_interrupt_type ht_irq_chip = {
- .name = "PCI-HT",
- .mask = mask_ht_irq,
- .unmask = unmask_ht_irq,
- .ack = ack_ioapic_irq,
-#ifdef CONFIG_SMP
- .set_affinity = set_ht_irq_affinity,
-#endif
- .retrigger = ioapic_retrigger_irq,
-};
-
-int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
-{
- int vector;
-
- vector = assign_irq_vector(irq);
- if (vector >= 0) {
- u32 low, high;
- unsigned dest;
- cpumask_t tmp;
-
- cpus_clear(tmp);
- cpu_set(vector >> 8, tmp);
- dest = cpu_mask_to_apicid(tmp);
-
- high = HT_IRQ_HIGH_DEST_ID(dest);
-
- low = HT_IRQ_LOW_BASE |
- HT_IRQ_LOW_DEST_ID(dest) |
- HT_IRQ_LOW_VECTOR(vector) |
- ((INT_DEST_MODE == 0) ?
- HT_IRQ_LOW_DM_PHYSICAL :
- HT_IRQ_LOW_DM_LOGICAL) |
- HT_IRQ_LOW_RQEOI_EDGE |
- ((INT_DELIVERY_MODE != dest_LowestPrio) ?
- HT_IRQ_LOW_MT_FIXED :
- HT_IRQ_LOW_MT_ARBITRATED) |
- HT_IRQ_LOW_IRQ_MASKED;
-
- write_ht_irq_low(irq, low);
- write_ht_irq_high(irq, high);
-
- set_irq_chip_and_handler(irq, &ht_irq_chip, handle_edge_irq);
- }
- return vector;
-}
-#endif /* CONFIG_HT_IRQ */
-
/* --------------------------------------------------------------------------
ACPI-based IOAPIC Configuration
-------------------------------------------------------------------------- */
@@ -2795,7 +2684,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
ioapic_write_entry(ioapic, pin, entry);
spin_lock_irqsave(&ioapic_lock, flags);
- set_native_irq_info(irq, TARGET_CPUS);
+ set_native_irq_info(use_pci_vector() ? entry.vector : irq, TARGET_CPUS);
spin_unlock_irqrestore(&ioapic_lock, flags);
return 0;
diff --git a/trunk/arch/i386/kernel/irq.c b/trunk/arch/i386/kernel/irq.c
index 3dd2e180151b..5fe547cd8f9f 100644
--- a/trunk/arch/i386/kernel/irq.c
+++ b/trunk/arch/i386/kernel/irq.c
@@ -55,7 +55,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
{
/* high bit used in ret_from_ code */
int irq = ~regs->orig_eax;
- struct irq_desc *desc = irq_desc + irq;
#ifdef CONFIG_4KSTACKS
union irq_ctx *curctx, *irqctx;
u32 *isp;
@@ -95,7 +94,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
* current stack (which is the irq stack already after all)
*/
if (curctx != irqctx) {
- int arg1, arg2, arg3, ebx;
+ int arg1, arg2, ebx;
/* build the stack frame on the IRQ stack */
isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
@@ -111,17 +110,16 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
(curctx->tinfo.preempt_count & SOFTIRQ_MASK);
asm volatile(
- " xchgl %%ebx,%%esp \n"
- " call *%%edi \n"
+ " xchgl %%ebx,%%esp \n"
+ " call __do_IRQ \n"
" movl %%ebx,%%esp \n"
- : "=a" (arg1), "=d" (arg2), "=c" (arg3), "=b" (ebx)
- : "0" (irq), "1" (desc), "2" (regs), "3" (isp),
- "D" (desc->handle_irq)
- : "memory", "cc"
+ : "=a" (arg1), "=d" (arg2), "=b" (ebx)
+ : "0" (irq), "1" (regs), "2" (isp)
+ : "memory", "cc", "ecx"
);
} else
#endif
- desc->handle_irq(irq, desc, regs);
+ __do_IRQ(irq, regs);
irq_exit();
@@ -255,8 +253,7 @@ int show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
#endif
- seq_printf(p, " %8s", irq_desc[i].chip->name);
- seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq));
+ seq_printf(p, " %14s", irq_desc[i].chip->typename);
seq_printf(p, " %s", action->name);
for (action=action->next; action; action = action->next)
diff --git a/trunk/arch/i386/lib/semaphore.S b/trunk/arch/i386/lib/semaphore.S
index 01f80b5c45d2..ef6ad9e1a609 100644
--- a/trunk/arch/i386/lib/semaphore.S
+++ b/trunk/arch/i386/lib/semaphore.S
@@ -13,7 +13,6 @@
* rw semaphores implemented November 1999 by Benjamin LaHaise
*/
-#include
#include
#include
#include
diff --git a/trunk/arch/i386/pci/irq.c b/trunk/arch/i386/pci/irq.c
index 47f02af74be3..4a8995c9c762 100644
--- a/trunk/arch/i386/pci/irq.c
+++ b/trunk/arch/i386/pci/irq.c
@@ -981,6 +981,10 @@ static void __init pcibios_fixup_irqs(void)
pci_name(bridge), 'A' + pin, irq);
}
if (irq >= 0) {
+ if (use_pci_vector() &&
+ !platform_legacy_irq(irq))
+ irq = IO_APIC_VECTOR(irq);
+
printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
pci_name(dev), 'A' + pin, irq);
dev->irq = irq;
@@ -1165,3 +1169,33 @@ static int pirq_enable_irq(struct pci_dev *dev)
}
return 0;
}
+
+int pci_vector_resources(int last, int nr_released)
+{
+ int count = nr_released;
+
+ int next = last;
+ int offset = (last % 8);
+
+ while (next < FIRST_SYSTEM_VECTOR) {
+ next += 8;
+#ifdef CONFIG_X86_64
+ if (next == IA32_SYSCALL_VECTOR)
+ continue;
+#else
+ if (next == SYSCALL_VECTOR)
+ continue;
+#endif
+ count++;
+ if (next >= FIRST_SYSTEM_VECTOR) {
+ if (offset%8) {
+ next = FIRST_DEVICE_VECTOR + offset;
+ offset++;
+ continue;
+ }
+ count--;
+ }
+ }
+
+ return count;
+}
diff --git a/trunk/arch/ia64/kernel/Makefile b/trunk/arch/ia64/kernel/Makefile
index cfa099b04cda..31497496eb4b 100644
--- a/trunk/arch/ia64/kernel/Makefile
+++ b/trunk/arch/ia64/kernel/Makefile
@@ -30,7 +30,6 @@ obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
obj-$(CONFIG_AUDIT) += audit.o
-obj-$(CONFIG_PCI_MSI) += msi_ia64.o
mca_recovery-y += mca_drv.o mca_drv_asm.o
obj-$(CONFIG_IA64_ESI) += esi.o
diff --git a/trunk/arch/ia64/kernel/irq_ia64.c b/trunk/arch/ia64/kernel/irq_ia64.c
index ab2d19c3661f..aafca18ab33b 100644
--- a/trunk/arch/ia64/kernel/irq_ia64.c
+++ b/trunk/arch/ia64/kernel/irq_ia64.c
@@ -30,7 +30,6 @@
#include
#include
#include
-#include
#include
#include
@@ -106,25 +105,6 @@ reserve_irq_vector (int vector)
return test_and_set_bit(pos, ia64_vector_mask);
}
-/*
- * Dynamic irq allocate and deallocation for MSI
- */
-int create_irq(void)
-{
- int vector = assign_irq_vector(AUTO_ASSIGN);
-
- if (vector >= 0)
- dynamic_irq_init(vector);
-
- return vector;
-}
-
-void destroy_irq(unsigned int irq)
-{
- dynamic_irq_cleanup(irq);
- free_irq_vector(irq);
-}
-
#ifdef CONFIG_SMP
# define IS_RESCHEDULE(vec) (vec == IA64_IPI_RESCHEDULE)
#else
diff --git a/trunk/arch/ia64/kernel/msi_ia64.c b/trunk/arch/ia64/kernel/msi_ia64.c
deleted file mode 100644
index 822e59a1b822..000000000000
--- a/trunk/arch/ia64/kernel/msi_ia64.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * MSI hooks for standard x86 apic
- */
-
-#include
-#include
-#include
-#include
-
-/*
- * Shifts for APIC-based data
- */
-
-#define MSI_DATA_VECTOR_SHIFT 0
-#define MSI_DATA_VECTOR(v) (((u8)v) << MSI_DATA_VECTOR_SHIFT)
-
-#define MSI_DATA_DELIVERY_SHIFT 8
-#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_SHIFT)
-#define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_SHIFT)
-
-#define MSI_DATA_LEVEL_SHIFT 14
-#define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT)
-#define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT)
-
-#define MSI_DATA_TRIGGER_SHIFT 15
-#define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT)
-#define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT)
-
-/*
- * Shift/mask fields for APIC-based bus address
- */
-
-#define MSI_TARGET_CPU_SHIFT 4
-#define MSI_ADDR_HEADER 0xfee00000
-
-#define MSI_ADDR_DESTID_MASK 0xfff0000f
-#define MSI_ADDR_DESTID_CPU(cpu) ((cpu) << MSI_TARGET_CPU_SHIFT)
-
-#define MSI_ADDR_DESTMODE_SHIFT 2
-#define MSI_ADDR_DESTMODE_PHYS (0 << MSI_ADDR_DESTMODE_SHIFT)
-#define MSI_ADDR_DESTMODE_LOGIC (1 << MSI_ADDR_DESTMODE_SHIFT)
-
-#define MSI_ADDR_REDIRECTION_SHIFT 3
-#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT)
-#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT)
-
-static struct irq_chip ia64_msi_chip;
-
-#ifdef CONFIG_SMP
-static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask)
-{
- struct msi_msg msg;
- u32 addr;
-
- read_msi_msg(irq, &msg);
-
- addr = msg.address_lo;
- addr &= MSI_ADDR_DESTID_MASK;
- addr |= MSI_ADDR_DESTID_CPU(cpu_physical_id(first_cpu(cpu_mask)));
- msg.address_lo = addr;
-
- write_msi_msg(irq, &msg);
- set_native_irq_info(irq, cpu_mask);
-}
-#endif /* CONFIG_SMP */
-
-int ia64_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
-{
- struct msi_msg msg;
- unsigned long dest_phys_id;
- unsigned int vector;
-
- dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map));
- vector = irq;
-
- msg.address_hi = 0;
- msg.address_lo =
- MSI_ADDR_HEADER |
- MSI_ADDR_DESTMODE_PHYS |
- MSI_ADDR_REDIRECTION_CPU |
- MSI_ADDR_DESTID_CPU(dest_phys_id);
-
- msg.data =
- MSI_DATA_TRIGGER_EDGE |
- MSI_DATA_LEVEL_ASSERT |
- MSI_DATA_DELIVERY_FIXED |
- MSI_DATA_VECTOR(vector);
-
- write_msi_msg(irq, &msg);
- set_irq_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
-
- return 0;
-}
-
-void ia64_teardown_msi_irq(unsigned int irq)
-{
- return; /* no-op */
-}
-
-static void ia64_ack_msi_irq(unsigned int irq)
-{
- move_native_irq(irq);
- ia64_eoi();
-}
-
-static int ia64_msi_retrigger_irq(unsigned int irq)
-{
- unsigned int vector = irq;
- ia64_resend_irq(vector);
-
- return 1;
-}
-
-/*
- * Generic ops used on most IA64 platforms.
- */
-static struct irq_chip ia64_msi_chip = {
- .name = "PCI-MSI",
- .mask = mask_msi_irq,
- .unmask = unmask_msi_irq,
- .ack = ia64_ack_msi_irq,
-#ifdef CONFIG_SMP
- .set_affinity = ia64_set_msi_irq_affinity,
-#endif
- .retrigger = ia64_msi_retrigger_irq,
-};
-
-
-int arch_setup_msi_irq(unsigned int irq, struct pci_dev *pdev)
-{
- if (platform_setup_msi_irq)
- return platform_setup_msi_irq(irq, pdev);
-
- return ia64_setup_msi_irq(irq, pdev);
-}
-
-void arch_teardown_msi_irq(unsigned int irq)
-{
- if (platform_teardown_msi_irq)
- return platform_teardown_msi_irq(irq);
-
- return ia64_teardown_msi_irq(irq);
-}
diff --git a/trunk/arch/ia64/pci/pci.c b/trunk/arch/ia64/pci/pci.c
index b30be7c48ba8..15c7c670da39 100644
--- a/trunk/arch/ia64/pci/pci.c
+++ b/trunk/arch/ia64/pci/pci.c
@@ -810,3 +810,12 @@ pcibios_prep_mwi (struct pci_dev *dev)
}
return rc;
}
+
+int pci_vector_resources(int last, int nr_released)
+{
+ int count = nr_released;
+
+ count += (IA64_LAST_DEVICE_VECTOR - last);
+
+ return count;
+}
diff --git a/trunk/arch/ia64/sn/kernel/Makefile b/trunk/arch/ia64/sn/kernel/Makefile
index 2d78f34dd763..ab9c48c88012 100644
--- a/trunk/arch/ia64/sn/kernel/Makefile
+++ b/trunk/arch/ia64/sn/kernel/Makefile
@@ -19,4 +19,3 @@ xp-y := xp_main.o xp_nofault.o
obj-$(CONFIG_IA64_SGI_SN_XP) += xpc.o
xpc-y := xpc_main.o xpc_channel.o xpc_partition.o
obj-$(CONFIG_IA64_SGI_SN_XP) += xpnet.o
-obj-$(CONFIG_PCI_MSI) += msi_sn.o
diff --git a/trunk/arch/m32r/mm/mmu.S b/trunk/arch/m32r/mm/mmu.S
index 0c28f11d6677..9a4d40b3d6a2 100644
--- a/trunk/arch/m32r/mm/mmu.S
+++ b/trunk/arch/m32r/mm/mmu.S
@@ -6,7 +6,6 @@
/* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */
-#include /* CONFIG_MMU */
#include
#include
#include
diff --git a/trunk/arch/m68k/kernel/time.c b/trunk/arch/m68k/kernel/time.c
index 6cfc984380d9..28b2fefa4513 100644
--- a/trunk/arch/m68k/kernel/time.c
+++ b/trunk/arch/m68k/kernel/time.c
@@ -10,7 +10,6 @@
* "A Kernel Model for Precision Timekeeping" by Dave Mills
*/
-#include /* CONFIG_HEARTBEAT */
#include
#include
#include
diff --git a/trunk/arch/m68knommu/platform/532x/config.c b/trunk/arch/m68knommu/platform/532x/config.c
index ceef9bc181ea..c7d6ad513820 100644
--- a/trunk/arch/m68knommu/platform/532x/config.c
+++ b/trunk/arch/m68knommu/platform/532x/config.c
@@ -17,7 +17,6 @@
/***************************************************************************/
-#include
#include
#include
#include
diff --git a/trunk/arch/m68knommu/platform/68328/romvec.S b/trunk/arch/m68knommu/platform/68328/romvec.S
index 3e7fe1e14913..31084466eae8 100644
--- a/trunk/arch/m68knommu/platform/68328/romvec.S
+++ b/trunk/arch/m68knommu/platform/68328/romvec.S
@@ -10,8 +10,6 @@
* Copyright 2006 Greg Ungerer
*/
-#include
-
.global _start
.global _buserr
.global trap
diff --git a/trunk/arch/parisc/Kconfig b/trunk/arch/parisc/Kconfig
index d2101237442e..6dd0ea8f88e0 100644
--- a/trunk/arch/parisc/Kconfig
+++ b/trunk/arch/parisc/Kconfig
@@ -127,7 +127,7 @@ config PA11
config PREFETCH
def_bool y
- depends on PA8X00 || PA7200
+ depends on PA8X00
config 64BIT
bool "64-bit kernel"
diff --git a/trunk/arch/parisc/hpux/fs.c b/trunk/arch/parisc/hpux/fs.c
index 2d58b92b57e3..6e79dbf3f6bd 100644
--- a/trunk/arch/parisc/hpux/fs.c
+++ b/trunk/arch/parisc/hpux/fs.c
@@ -96,7 +96,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
put_user(namlen, &dirent->d_namlen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
- dirent = (void __user *)dirent + reclen;
+ ((char *) dirent) += reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
diff --git a/trunk/arch/parisc/kernel/binfmt_elf32.c b/trunk/arch/parisc/kernel/binfmt_elf32.c
index 1e64e7b88110..d1833f164bbe 100644
--- a/trunk/arch/parisc/kernel/binfmt_elf32.c
+++ b/trunk/arch/parisc/kernel/binfmt_elf32.c
@@ -87,7 +87,7 @@ struct elf_prpsinfo32
*/
#define SET_PERSONALITY(ex, ibcs2) \
- set_thread_flag(TIF_32BIT); \
+ current->personality = PER_LINUX32; \
current->thread.map_base = DEFAULT_MAP_BASE32; \
current->thread.task_size = DEFAULT_TASK_SIZE32 \
@@ -102,3 +102,25 @@ cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
}
#include "../../../fs/binfmt_elf.c"
+
+/* Set up a separate execution domain for ELF32 binaries running
+ * on an ELF64 kernel */
+
+static struct exec_domain parisc32_exec_domain = {
+ .name = "Linux/ELF32",
+ .pers_low = PER_LINUX32,
+ .pers_high = PER_LINUX32,
+};
+
+static int __init parisc32_exec_init(void)
+{
+ /* steal the identity signal mappings from the default domain */
+ parisc32_exec_domain.signal_map = default_exec_domain.signal_map;
+ parisc32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
+
+ register_exec_domain(&parisc32_exec_domain);
+
+ return 0;
+}
+
+__initcall(parisc32_exec_init);
diff --git a/trunk/arch/parisc/kernel/cache.c b/trunk/arch/parisc/kernel/cache.c
index 0be51e92a2fc..bc7c4a4e26a1 100644
--- a/trunk/arch/parisc/kernel/cache.c
+++ b/trunk/arch/parisc/kernel/cache.c
@@ -35,12 +35,15 @@ int icache_stride __read_mostly;
EXPORT_SYMBOL(dcache_stride);
+#if defined(CONFIG_SMP)
/* On some machines (e.g. ones with the Merced bus), there can be
* only a single PxTLB broadcast at a time; this must be guaranteed
* by software. We put a spinlock around all TLB flushes to
* ensure this.
*/
DEFINE_SPINLOCK(pa_tlb_lock);
+EXPORT_SYMBOL(pa_tlb_lock);
+#endif
struct pdc_cache_info cache_info __read_mostly;
#ifndef CONFIG_PA20
@@ -88,8 +91,7 @@ update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
flush_kernel_dcache_page(page);
clear_bit(PG_dcache_dirty, &page->flags);
- } else if (parisc_requires_coherency())
- flush_kernel_dcache_page(page);
+ }
}
void
@@ -368,45 +370,3 @@ void parisc_setup_cache_timing(void)
printk(KERN_INFO "Setting cache flush threshold to %x (%d CPUs online)\n", parisc_cache_flush_threshold, num_online_cpus());
}
-
-extern void purge_kernel_dcache_page(unsigned long);
-extern void clear_user_page_asm(void *page, unsigned long vaddr);
-
-void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
-{
- purge_kernel_dcache_page((unsigned long)page);
- purge_tlb_start();
- pdtlb_kernel(page);
- purge_tlb_end();
- clear_user_page_asm(page, vaddr);
-}
-EXPORT_SYMBOL(clear_user_page);
-
-void flush_kernel_dcache_page_addr(void *addr)
-{
- flush_kernel_dcache_page_asm(addr);
- purge_tlb_start();
- pdtlb_kernel(addr);
- purge_tlb_end();
-}
-EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
-
-void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
- struct page *pg)
-{
- /* no coherency needed (all in kmap/kunmap) */
- copy_user_page_asm(vto, vfrom);
- if (!parisc_requires_coherency())
- flush_kernel_dcache_page_asm(vto);
-}
-EXPORT_SYMBOL(copy_user_page);
-
-#ifdef CONFIG_PA8X00
-
-void kunmap_parisc(void *addr)
-{
- if (parisc_requires_coherency())
- flush_kernel_dcache_page_addr(addr);
-}
-EXPORT_SYMBOL(kunmap_parisc);
-#endif
diff --git a/trunk/arch/parisc/kernel/entry.S b/trunk/arch/parisc/kernel/entry.S
index 340b5e8d67ba..192357a3b9fe 100644
--- a/trunk/arch/parisc/kernel/entry.S
+++ b/trunk/arch/parisc/kernel/entry.S
@@ -30,7 +30,6 @@
#include
-#include /* for L1_CACHE_SHIFT */
#include /* for LDREG/STREG defines */
#include
#include
@@ -479,7 +478,11 @@
bb,>=,n \pmd,_PxD_PRESENT_BIT,\fault
DEP %r0,31,PxD_FLAG_SHIFT,\pmd /* clear flags */
copy \pmd,%r9
- SHLREG %r9,PxD_VALUE_SHIFT,\pmd
+#ifdef CONFIG_64BIT
+ shld %r9,PxD_VALUE_SHIFT,\pmd
+#else
+ shlw %r9,PxD_VALUE_SHIFT,\pmd
+#endif
EXTR \va,31-PAGE_SHIFT,ASM_BITS_PER_PTE,\index
DEP %r0,31,PAGE_SHIFT,\pmd /* clear offset */
shladd \index,BITS_PER_PTE_ENTRY,\pmd,\pmd
@@ -967,7 +970,11 @@ intr_return:
/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
** irq_stat[] is defined using ____cacheline_aligned.
*/
- SHLREG %r1,L1_CACHE_SHIFT,%r20
+#ifdef CONFIG_64BIT
+ shld %r1, 6, %r20
+#else
+ shlw %r1, 5, %r20
+#endif
add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
#endif /* CONFIG_SMP */
@@ -1069,7 +1076,7 @@ intr_do_preempt:
BL preempt_schedule_irq, %r2
nop
- b,n intr_restore /* ssm PSW_SM_I done by intr_restore */
+ b intr_restore /* ssm PSW_SM_I done by intr_restore */
#endif /* CONFIG_PREEMPT */
.import do_signal,code
@@ -2108,7 +2115,11 @@ syscall_check_bh:
ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
- SHLREG %r26,L1_CACHE_SHIFT,%r20
+#ifdef CONFIG_64BIT
+ shld %r26, 6, %r20
+#else
+ shlw %r26, 5, %r20
+#endif
add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */
#endif /* CONFIG_SMP */
diff --git a/trunk/arch/parisc/kernel/hardware.c b/trunk/arch/parisc/kernel/hardware.c
index 18ba4cb9159b..3058bffd8a2c 100644
--- a/trunk/arch/parisc/kernel/hardware.c
+++ b/trunk/arch/parisc/kernel/hardware.c
@@ -231,7 +231,6 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
{HPHW_NPROC,0x5E6,0x4,0x91,"Keystone/Matterhorn W2 650"},
{HPHW_NPROC,0x5E7,0x4,0x91,"Caribe W2 800"},
{HPHW_NPROC,0x5E8,0x4,0x91,"Pikes Peak W2"},
- {HPHW_NPROC,0x5EB,0x4,0x91,"Perf/Leone 875 W2+"},
{HPHW_NPROC,0x5FF,0x4,0x91,"Hitachi W"},
{HPHW_NPROC,0x600,0x4,0x81,"Gecko (712/60)"},
{HPHW_NPROC,0x601,0x4,0x81,"Gecko 80 (712/80)"},
@@ -585,10 +584,8 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
{HPHW_CONSOLE, 0x01A, 0x0001F, 0x00, "Jason/Anole 64 Null Console"},
{HPHW_CONSOLE, 0x01B, 0x0001F, 0x00, "Jason/Anole 100 Null Console"},
{HPHW_FABRIC, 0x004, 0x000AA, 0x80, "Halfdome DNA Central Agent"},
- {HPHW_FABRIC, 0x005, 0x000AA, 0x80, "Keystone DNA Central Agent"},
{HPHW_FABRIC, 0x007, 0x000AA, 0x80, "Caribe DNA Central Agent"},
{HPHW_FABRIC, 0x004, 0x000AB, 0x00, "Halfdome TOGO Fabric Crossbar"},
- {HPHW_FABRIC, 0x005, 0x000AB, 0x00, "Keystone TOGO Fabric Crossbar"},
{HPHW_FABRIC, 0x004, 0x000AC, 0x00, "Halfdome Sakura Fabric Router"},
{HPHW_FIO, 0x025, 0x0002E, 0x80, "Armyknife Optional X.25"},
{HPHW_FIO, 0x004, 0x0004F, 0x0, "8-Port X.25 EISA-ACC (AMSO)"},
diff --git a/trunk/arch/parisc/kernel/head.S b/trunk/arch/parisc/kernel/head.S
index 3e79e62f7b0b..eaad2328fea1 100644
--- a/trunk/arch/parisc/kernel/head.S
+++ b/trunk/arch/parisc/kernel/head.S
@@ -12,8 +12,6 @@
* Initial Version 04-23-1999 by Helge Deller
*/
-#include /* for CONFIG_SMP */
-
#include
#include
#include
diff --git a/trunk/arch/parisc/kernel/irq.c b/trunk/arch/parisc/kernel/irq.c
index 9bdd0197ceb7..5b8803cc3d69 100644
--- a/trunk/arch/parisc/kernel/irq.c
+++ b/trunk/arch/parisc/kernel/irq.c
@@ -45,17 +45,6 @@ extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *);
*/
static volatile unsigned long cpu_eiem = 0;
-/*
-** ack bitmap ... habitually set to 1, but reset to zero
-** between ->ack() and ->end() of the interrupt to prevent
-** re-interruption of a processing interrupt.
-*/
-static volatile unsigned long global_ack_eiem = ~0UL;
-/*
-** Local bitmap, same as above but for per-cpu interrupts
-*/
-static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
-
static void cpu_disable_irq(unsigned int irq)
{
unsigned long eirr_bit = EIEM_MASK(irq);
@@ -73,6 +62,13 @@ static void cpu_enable_irq(unsigned int irq)
cpu_eiem |= eirr_bit;
+ /* FIXME: while our interrupts aren't nested, we cannot reset
+ * the eiem mask if we're already in an interrupt. Once we
+ * implement nested interrupts, this can go away
+ */
+ if (!in_interrupt())
+ set_eiem(cpu_eiem);
+
/* This is just a simple NOP IPI. But what it does is cause
* all the other CPUs to do a set_eiem(cpu_eiem) at the end
* of the interrupt handler */
@@ -88,45 +84,13 @@ static unsigned int cpu_startup_irq(unsigned int irq)
void no_ack_irq(unsigned int irq) { }
void no_end_irq(unsigned int irq) { }
-void cpu_ack_irq(unsigned int irq)
-{
- unsigned long mask = EIEM_MASK(irq);
- int cpu = smp_processor_id();
-
- /* Clear in EIEM so we can no longer process */
- if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
- per_cpu(local_ack_eiem, cpu) &= ~mask;
- else
- global_ack_eiem &= ~mask;
-
- /* disable the interrupt */
- set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
- /* and now ack it */
- mtctl(mask, 23);
-}
-
-void cpu_end_irq(unsigned int irq)
-{
- unsigned long mask = EIEM_MASK(irq);
- int cpu = smp_processor_id();
-
- /* set it in the eiems---it's no longer in process */
- if (CHECK_IRQ_PER_CPU(irq_desc[irq].status))
- per_cpu(local_ack_eiem, cpu) |= mask;
- else
- global_ack_eiem |= mask;
-
- /* enable the interrupt */
- set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
-}
-
#ifdef CONFIG_SMP
int cpu_check_affinity(unsigned int irq, cpumask_t *dest)
{
int cpu_dest;
/* timer and ipi have to always be received on all CPUs */
- if (CHECK_IRQ_PER_CPU(irq)) {
+ if (irq == TIMER_IRQ || irq == IPI_IRQ) {
/* Bad linux design decision. The mask has already
* been set; we must reset it */
irq_desc[irq].affinity = CPU_MASK_ALL;
@@ -155,8 +119,8 @@ static struct hw_interrupt_type cpu_interrupt_type = {
.shutdown = cpu_disable_irq,
.enable = cpu_enable_irq,
.disable = cpu_disable_irq,
- .ack = cpu_ack_irq,
- .end = cpu_end_irq,
+ .ack = no_ack_irq,
+ .end = no_end_irq,
#ifdef CONFIG_SMP
.set_affinity = cpu_set_affinity_irq,
#endif
@@ -245,7 +209,7 @@ int show_interrupts(struct seq_file *p, void *v)
** Then use that to get the Transaction address and data.
*/
-int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
+int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *type, void *data)
{
if (irq_desc[irq].action)
return -EBUSY;
@@ -334,69 +298,82 @@ unsigned int txn_alloc_data(unsigned int virt_irq)
return virt_irq - CPU_IRQ_BASE;
}
-static inline int eirr_to_irq(unsigned long eirr)
-{
-#ifdef CONFIG_64BIT
- int bit = fls64(eirr);
-#else
- int bit = fls(eirr);
-#endif
- return (BITS_PER_LONG - bit) + TIMER_IRQ;
-}
-
/* ONLY called from entry.S:intr_extint() */
void do_cpu_irq_mask(struct pt_regs *regs)
{
unsigned long eirr_val;
- int irq, cpu = smp_processor_id();
-#ifdef CONFIG_SMP
- cpumask_t dest;
-#endif
- local_irq_disable();
irq_enter();
- eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem &
- per_cpu(local_ack_eiem, cpu);
- if (!eirr_val)
- goto set_out;
- irq = eirr_to_irq(eirr_val);
+ /*
+ * Don't allow TIMER or IPI nested interrupts.
+ * Allowing any single interrupt to nest can lead to that CPU
+ * handling interrupts with all enabled interrupts unmasked.
+ */
+ set_eiem(0UL);
+ /* 1) only process IRQs that are enabled/unmasked (cpu_eiem)
+ * 2) We loop here on EIRR contents in order to avoid
+ * nested interrupts or having to take another interrupt
+ * when we could have just handled it right away.
+ */
+ for (;;) {
+ unsigned long bit = (1UL << (BITS_PER_LONG - 1));
+ unsigned int irq;
+ eirr_val = mfctl(23) & cpu_eiem;
+ if (!eirr_val)
+ break;
+
+ mtctl(eirr_val, 23); /* reset bits we are going to process */
+
+ /* Work our way from MSb to LSb...same order we alloc EIRs */
+ for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
#ifdef CONFIG_SMP
- dest = irq_desc[irq].affinity;
- if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
- !cpu_isset(smp_processor_id(), dest)) {
- int cpu = first_cpu(dest);
-
- printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
- irq, smp_processor_id(), cpu);
- gsc_writel(irq + CPU_IRQ_BASE,
- cpu_data[cpu].hpa);
- goto set_out;
- }
+ cpumask_t dest = irq_desc[irq].affinity;
#endif
- __do_IRQ(irq, regs);
+ if (!(bit & eirr_val))
+ continue;
- out:
- irq_exit();
- return;
+ /* clear bit in mask - can exit loop sooner */
+ eirr_val &= ~bit;
- set_out:
- set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu));
- goto out;
+#ifdef CONFIG_SMP
+ /* FIXME: because generic set affinity mucks
+ * with the affinity before sending it to us
+ * we can get the situation where the affinity is
+ * wrong for our CPU type interrupts */
+ if (irq != TIMER_IRQ && irq != IPI_IRQ &&
+ !cpu_isset(smp_processor_id(), dest)) {
+ int cpu = first_cpu(dest);
+
+ printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n",
+ irq, smp_processor_id(), cpu);
+ gsc_writel(irq + CPU_IRQ_BASE,
+ cpu_data[cpu].hpa);
+ continue;
+ }
+#endif
+
+ __do_IRQ(irq, regs);
+ }
+ }
+
+ set_eiem(cpu_eiem); /* restore original mask */
+ irq_exit();
}
+
static struct irqaction timer_action = {
.handler = timer_interrupt,
.name = "timer",
- .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_PERCPU,
+ .flags = IRQF_DISABLED,
};
#ifdef CONFIG_SMP
static struct irqaction ipi_action = {
.handler = ipi_interrupt,
.name = "IPI",
- .flags = IRQF_DISABLED | IRQF_PERCPU,
+ .flags = IRQF_DISABLED,
};
#endif
diff --git a/trunk/arch/parisc/kernel/processor.c b/trunk/arch/parisc/kernel/processor.c
index fb81e5687e7c..99d7fca93104 100644
--- a/trunk/arch/parisc/kernel/processor.c
+++ b/trunk/arch/parisc/kernel/processor.c
@@ -143,9 +143,8 @@ static int __init processor_probe(struct parisc_device *dev)
p = &cpu_data[cpuid];
boot_cpu_data.cpu_count++;
- /* initialize counters - CPU 0 gets it_value set in time_init() */
- if (cpuid)
- memset(p, 0, sizeof(struct cpuinfo_parisc));
+ /* initialize counters */
+ memset(p, 0, sizeof(struct cpuinfo_parisc));
p->loops_per_jiffy = loops_per_jiffy;
p->dev = dev; /* Save IODC data in case we need it */
diff --git a/trunk/arch/parisc/kernel/signal.c b/trunk/arch/parisc/kernel/signal.c
index ee6653edeb7a..bb83880c5ee3 100644
--- a/trunk/arch/parisc/kernel/signal.c
+++ b/trunk/arch/parisc/kernel/signal.c
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include