diff --git a/[refs] b/[refs]
index 2f7318ee88d8..0dea8dc01d02 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 8995b161eb142b843094dd614b80e4cce1d66352
+refs/heads/master: 3a51f7c40437077ac4a463307e9a4ae6b78755a8
diff --git a/trunk/.gitignore b/trunk/.gitignore
index 3f8fb686b59c..5014bfa48ac1 100644
--- a/trunk/.gitignore
+++ b/trunk/.gitignore
@@ -10,7 +10,6 @@
*.a
*.s
*.ko
-*.so
*.mod.c
#
@@ -24,7 +23,6 @@ Module.symvers
# Generated include files
#
include/asm
-include/asm-*/asm-offsets.h
include/config
include/linux/autoconf.h
include/linux/compile.h
diff --git a/trunk/CREDITS b/trunk/CREDITS
index 521f00d1b549..1b4f8694fa48 100644
--- a/trunk/CREDITS
+++ b/trunk/CREDITS
@@ -1883,7 +1883,6 @@ N: Jaya Kumar
E: jayalk@intworks.biz
W: http://www.intworks.biz
D: Arc monochrome LCD framebuffer driver, x86 reboot fixups
-D: pirq addr, CS5535 alsa audio driver
S: Gurgaon, India
S: Kuala Lumpur, Malaysia
diff --git a/trunk/Documentation/DocBook/kernel-api.tmpl b/trunk/Documentation/DocBook/kernel-api.tmpl
index 3c47a3f0dc55..767433bdbc40 100644
--- a/trunk/Documentation/DocBook/kernel-api.tmpl
+++ b/trunk/Documentation/DocBook/kernel-api.tmpl
@@ -369,7 +369,6 @@ X!Edrivers/acpi/motherboard.c
X!Edrivers/acpi/bus.c
-->
!Edrivers/acpi/scan.c
-!Idrivers/acpi/scan.c
diff --git a/trunk/Documentation/DocBook/usb.tmpl b/trunk/Documentation/DocBook/usb.tmpl
index 320af25de3a2..15ce0f21e5e0 100644
--- a/trunk/Documentation/DocBook/usb.tmpl
+++ b/trunk/Documentation/DocBook/usb.tmpl
@@ -253,7 +253,6 @@
!Edrivers/usb/core/urb.c
!Edrivers/usb/core/message.c
!Edrivers/usb/core/file.c
-!Edrivers/usb/core/driver.c
!Edrivers/usb/core/usb.c
!Edrivers/usb/core/hub.c
diff --git a/trunk/Documentation/SubmittingPatches b/trunk/Documentation/SubmittingPatches
index 1d47e6c09dc6..237d54c44bc5 100644
--- a/trunk/Documentation/SubmittingPatches
+++ b/trunk/Documentation/SubmittingPatches
@@ -158,7 +158,7 @@ Even if the maintainer did not respond in step #4, make sure to ALWAYS
copy the maintainer when you change their code.
For small patches you may want to CC the Trivial Patch Monkey
-trivial@kernel.org managed by Adrian Bunk; which collects "trivial"
+trivial@rustcorp.com.au set up by Rusty Russell; which collects "trivial"
patches. Trivial patches must qualify for one of the following rules:
Spelling fixes in documentation
Spelling fixes which could break grep(1).
@@ -171,7 +171,7 @@ patches. Trivial patches must qualify for one of the following rules:
since people copy, as long as it's trivial)
Any fix by the author/maintainer of the file. (ie. patch monkey
in re-transmission mode)
-URL:
+URL:
diff --git a/trunk/Documentation/arm/00-INDEX b/trunk/Documentation/arm/00-INDEX
index 2c6a3b38967e..d753fe59a248 100644
--- a/trunk/Documentation/arm/00-INDEX
+++ b/trunk/Documentation/arm/00-INDEX
@@ -16,7 +16,5 @@ empeg
- Empeg documentation
mem_alignment
- alignment abort handler documentation
-memory.txt
- - description of the virtual memory layout
nwfpe
- NWFPE floating point emulator documentation
diff --git a/trunk/Documentation/block/biodoc.txt b/trunk/Documentation/block/biodoc.txt
index 8e63831971d5..0fe01c805480 100644
--- a/trunk/Documentation/block/biodoc.txt
+++ b/trunk/Documentation/block/biodoc.txt
@@ -31,7 +31,7 @@ The following people helped with review comments and inputs for this
document:
Christoph Hellwig
Arjan van de Ven
- Randy Dunlap
+ Randy Dunlap
Andre Hedrick
The following people helped with fixes/contributions to the bio patches
@@ -263,8 +263,14 @@ A flag in the bio structure, BIO_BARRIER is used to identify a barrier i/o.
The generic i/o scheduler would make sure that it places the barrier request and
all other requests coming after it after all the previous requests in the
queue. Barriers may be implemented in different ways depending on the
-driver. For more details regarding I/O barriers, please read barrier.txt
-in this directory.
+driver. A SCSI driver for example could make use of ordered tags to
+preserve the necessary ordering with a lower impact on throughput. For IDE
+this might be two sync cache flush: a pre and post flush when encountering
+a barrier write.
+
+There is a provision for queues to indicate what kind of barriers they
+can provide. This is as of yet unmerged, details will be added here once it
+is in the kernel.
1.2.2 Request Priority/Latency
diff --git a/trunk/Documentation/cpu-freq/governors.txt b/trunk/Documentation/cpu-freq/governors.txt
index f4b8dc4237e6..933fae74c337 100644
--- a/trunk/Documentation/cpu-freq/governors.txt
+++ b/trunk/Documentation/cpu-freq/governors.txt
@@ -27,7 +27,6 @@ Contents:
2.2 Powersave
2.3 Userspace
2.4 Ondemand
-2.5 Conservative
3. The Governor Interface in the CPUfreq Core
@@ -111,64 +110,9 @@ directory.
The CPUfreq govenor "ondemand" sets the CPU depending on the
current usage. To do this the CPU must have the capability to
-switch the frequency very quickly. There are a number of sysfs file
-accessible parameters:
-
-sampling_rate: measured in uS (10^-6 seconds), this is how often you
-want the kernel to look at the CPU usage and to make decisions on
-what to do about the frequency. Typically this is set to values of
-around '10000' or more.
-
-show_sampling_rate_(min|max): the minimum and maximum sampling rates
-available that you may set 'sampling_rate' to.
-
-up_threshold: defines what the average CPU usaged between the samplings
-of 'sampling_rate' needs to be for the kernel to make a decision on
-whether it should increase the frequency. For example when it is set
-to its default value of '80' it means that between the checking
-intervals the CPU needs to be on average more than 80% in use to then
-decide that the CPU frequency needs to be increased.
-
-sampling_down_factor: this parameter controls the rate that the CPU
-makes a decision on when to decrease the frequency. When set to its
-default value of '5' it means that at 1/5 the sampling_rate the kernel
-makes a decision to lower the frequency. Five "lower rate" decisions
-have to be made in a row before the CPU frequency is actually lower.
-If set to '1' then the frequency decreases as quickly as it increases,
-if set to '2' it decreases at half the rate of the increase.
-
-ignore_nice_load: this parameter takes a value of '0' or '1', when set
-to '0' (its default) then all processes are counted towards towards the
-'cpu utilisation' value. When set to '1' then processes that are
-run with a 'nice' value will not count (and thus be ignored) in the
-overal usage calculation. This is useful if you are running a CPU
-intensive calculation on your laptop that you do not care how long it
-takes to complete as you can 'nice' it and prevent it from taking part
-in the deciding process of whether to increase your CPU frequency.
-
-
-2.5 Conservative
-----------------
-
-The CPUfreq governor "conservative", much like the "ondemand"
-governor, sets the CPU depending on the current usage. It differs in
-behaviour in that it gracefully increases and decreases the CPU speed
-rather than jumping to max speed the moment there is any load on the
-CPU. This behaviour more suitable in a battery powered environment.
-The governor is tweaked in the same manner as the "ondemand" governor
-through sysfs with the addition of:
-
-freq_step: this describes what percentage steps the cpu freq should be
-increased and decreased smoothly by. By default the cpu frequency will
-increase in 5% chunks of your maximum cpu frequency. You can change this
-value to anywhere between 0 and 100 where '0' will effectively lock your
-CPU at a speed regardless of its load whilst '100' will, in theory, make
-it behave identically to the "ondemand" governor.
-
-down_threshold: same as the 'up_threshold' found for the "ondemand"
-governor but for the opposite direction. For example when set to its
-default value of '20' it means that if the CPU usage needs to be below
-20% between samples to have the frequency decreased.
+switch the frequency very fast.
+
+
3. The Governor Interface in the CPUfreq Core
=============================================
diff --git a/trunk/Documentation/dvb/README.dvb-usb b/trunk/Documentation/dvb/README.dvb-usb
index 46b78b7331c2..ac0797ea646c 100644
--- a/trunk/Documentation/dvb/README.dvb-usb
+++ b/trunk/Documentation/dvb/README.dvb-usb
@@ -50,12 +50,12 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
0. History & News:
2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
2005-05-30 - added basic isochronous support to the dvb-usb-framework
- added support for Conexant Hybrid reference design and Nebula DigiTV USB
+ added support for Conexant Hybrid reference design and Nebula DigiTV USB
2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
2005-04-02 - re-enabled and improved remote control code.
2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
- TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
+ TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
(change from dvb-dibusb to dvb-usb)
2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
@@ -64,50 +64,50 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
2005-01-31 - distorted streaming is gone for USB1.1 devices
2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
- - first almost working version for HanfTek UMT-010
- - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
+ - first almost working version for HanfTek UMT-010
+ - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
2005-01-10 - refactoring completed, now everything is very delightful
- - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
- Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
+ - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
+ Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
2004-12-26 - refactored the dibusb-driver, splitted into separate files
- - i2c-probing enabled
+ - i2c-probing enabled
2004-12-06 - possibility for demod i2c-address probing
- - new usb IDs (Compro, Artec)
+ - new usb IDs (Compro, Artec)
2004-11-23 - merged changes from DiB3000MC_ver2.1
- - revised the debugging
- - possibility to deliver the complete TS for USB2.0
+ - revised the debugging
+ - possibility to deliver the complete TS for USB2.0
2004-11-21 - first working version of the dib3000mc/p frontend driver.
2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
2004-11-07 - added remote control support. Thanks to David Matthews.
2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
- - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
- - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
- better settled there (added xfer_ops-struct)
- - created a common files for frontends (mc/p/mb)
+ - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
+ - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
+ better settled there (added xfer_ops-struct)
+ - created a common files for frontends (mc/p/mb)
2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
- to Amaury Demol for reporting
- - changed usb TS transfer method (several urbs, stopping transfer
- before setting a new pid)
+ to Amaury Demol for reporting
+ - changed usb TS transfer method (several urbs, stopping transfer
+ before setting a new pid)
2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
- to Christian Motschke for reporting
+ to Christian Motschke for reporting
2004-09-05 - released the dibusb device and dib3000mb-frontend driver
(old news for vp7041.c)
2004-07-15 - found out, by accident, that the device has a TUA6010XS for
- PLL
+ PLL
2004-07-12 - figured out, that the driver should also work with the
- CTS Portable (Chinese Television System)
+ CTS Portable (Chinese Television System)
2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
- properly with firmware extracted from 2.422
- - #if for 2.6.4 (dvb), compile issue
- - changed firmware handling, see vp7041.txt sec 1.1
+ properly with firmware extracted from 2.422
+ - #if for 2.6.4 (dvb), compile issue
+ - changed firmware handling, see vp7041.txt sec 1.1
2004-07-02 - some tuner modifications, v0.1, cleanups, first public
2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
- runs fine now
+ runs fine now
2004-06-27 - able to watch and switching channels (pre-alpha)
- - no section filtering yet
+ - no section filtering yet
2004-06-06 - first TS received, but kernel oops :/
2004-05-14 - firmware loader is working
2004-05-11 - start writing the driver
diff --git a/trunk/Documentation/dvb/README.flexcop b/trunk/Documentation/dvb/README.flexcop
index 5515469de7cf..a50c70f9ca72 100644
--- a/trunk/Documentation/dvb/README.flexcop
+++ b/trunk/Documentation/dvb/README.flexcop
@@ -174,7 +174,7 @@ Debugging
Everything which is identical in the following table, can be put into a common
flexcop-module.
- PCI USB
+ PCI USB
-------------------------------------------------------------------------------
Different:
Register access: accessing IO memory USB control message
diff --git a/trunk/Documentation/dvb/avermedia.txt b/trunk/Documentation/dvb/avermedia.txt
index 2dc260b2b0a4..09020ebd202b 100644
--- a/trunk/Documentation/dvb/avermedia.txt
+++ b/trunk/Documentation/dvb/avermedia.txt
@@ -1,6 +1,6 @@
HOWTO: Get An Avermedia DVB-T working under Linux
- ______________________________________________
+ ______________________________________________
Table of Contents
Assumptions and Introduction
diff --git a/trunk/Documentation/dvb/cards.txt b/trunk/Documentation/dvb/cards.txt
index 9e10092440e1..19329cf7b097 100644
--- a/trunk/Documentation/dvb/cards.txt
+++ b/trunk/Documentation/dvb/cards.txt
@@ -16,7 +16,7 @@ Hardware supported by the linuxtv.org DVB drivers
shielding, and the whole metal box has its own part number.
-o Frontends drivers:
+o Frontends drivers:
- dvb_dummy_fe: for testing...
DVB-S:
- ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
@@ -24,7 +24,7 @@ o Frontends drivers:
- grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
- stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
- LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
+ LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
DVB-C:
- ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
@@ -35,8 +35,8 @@ o Frontends drivers:
- grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
- tda1004x : Philips tda10045h (td1344 or tdm1316l PLL)
- nxt6000 : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
- Comtech DVBT-6k07 (SP5730 PLL)
- (NxtWave Communications NXT6000 demodulator)
+ Comtech DVBT-6k07 (SP5730 PLL)
+ (NxtWave Communications NXT6000 demodulator)
- sp887x : Microtune 7202D
- dib3000mb : DiBcom 3000-MB demodulator
DVB-S/C/T:
diff --git a/trunk/Documentation/dvb/contributors.txt b/trunk/Documentation/dvb/contributors.txt
index 4c33cced5f65..2cbd2d0f6fdf 100644
--- a/trunk/Documentation/dvb/contributors.txt
+++ b/trunk/Documentation/dvb/contributors.txt
@@ -15,7 +15,7 @@ Michael Holzt
Diego Picciani
for CyberLogin for Linux which allows logging onto EON
- (in case you are wondering where CyberLogin is, EON changed its login
+ (in case you are wondering where CyberLogin is, EON changed its login
procedure and CyberLogin is no longer used.)
Martin Schaller
@@ -57,7 +57,7 @@ Augusto Cardoso
Davor Emard
for his work on the budget drivers, the demux code,
the module unloading problems, ...
-
+
Hans-Frieder Vogt
for his work on calculating and checking the crc's for the
TechnoTrend/Hauppauge DEC driver firmware
diff --git a/trunk/Documentation/dvb/readme.txt b/trunk/Documentation/dvb/readme.txt
index f5c50b22de3b..754c98c6ad94 100644
--- a/trunk/Documentation/dvb/readme.txt
+++ b/trunk/Documentation/dvb/readme.txt
@@ -20,7 +20,7 @@ http://linuxtv.org/downloads/
What's inside this directory:
-"cards.txt"
+"cards.txt"
contains a list of supported hardware.
"contributors.txt"
@@ -37,7 +37,7 @@ that require it.
contains detailed informations about the
TT DEC2000/DEC3000 USB DVB hardware.
-"bt8xx.txt"
+"bt8xx.txt"
contains detailed installation instructions for the
various bt8xx based "budget" DVB cards
(Nebula, Pinnacle PCTV, Twinhan DST)
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 9474501dd6cc..9b743198f77a 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -47,6 +47,17 @@ Who: Paul E. McKenney
---------------------------
+What: IEEE1394 Audio and Music Data Transmission Protocol driver,
+ Connection Management Procedures driver
+When: November 2005
+Files: drivers/ieee1394/{amdtp,cmp}*
+Why: These are incomplete, have never worked, and are better implemented
+ in userland via raw1394 (see http://freebob.sourceforge.net/ for
+ example.)
+Who: Jody McIntyre
+
+---------------------------
+
What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
When: November 2005
Why: Deprecated in favour of the new ioctl-based rawiso interface, which is
@@ -71,6 +82,15 @@ Who: Mauro Carvalho Chehab
---------------------------
+What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid
+When: November 2005
+Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c
+Why: Match the other drivers' name for the same function, duplicate names
+ will be available until removal of old names.
+Who: Grant Coady
+
+---------------------------
+
What: remove EXPORT_SYMBOL(panic_timeout)
When: April 2006
Files: kernel/panic.c
diff --git a/trunk/Documentation/filesystems/00-INDEX b/trunk/Documentation/filesystems/00-INDEX
index 74052d22d868..bcfbab899b37 100644
--- a/trunk/Documentation/filesystems/00-INDEX
+++ b/trunk/Documentation/filesystems/00-INDEX
@@ -12,16 +12,14 @@ cifs.txt
- description of the CIFS filesystem
coda.txt
- description of the CODA filesystem.
-configfs/
- - directory containing configfs documentation and example code.
cramfs.txt
- info on the cram filesystem for small storage (ROMs etc)
devfs/
- directory containing devfs documentation.
-dlmfs.txt
- - info on the userspace interface to the OCFS2 DLM.
ext2.txt
- info, mount options and specifications for the Ext2 filesystem.
+fat_cvf.txt
+ - info on the Compressed Volume Files extension to the FAT filesystem
hpfs.txt
- info and mount options for the OS/2 HPFS.
isofs.txt
@@ -34,8 +32,6 @@ ntfs.txt
- info and mount options for the NTFS filesystem (Windows NT).
proc.txt
- info on Linux's /proc filesystem.
-ocfs2.txt
- - info and mount options for the OCFS2 clustered filesystem.
romfs.txt
- Description of the ROMFS filesystem.
smbfs.txt
diff --git a/trunk/Documentation/filesystems/configfs/configfs.txt b/trunk/Documentation/filesystems/configfs/configfs.txt
deleted file mode 100644
index c4ff96b7c4e0..000000000000
--- a/trunk/Documentation/filesystems/configfs/configfs.txt
+++ /dev/null
@@ -1,434 +0,0 @@
-
-configfs - Userspace-driven kernel object configuation.
-
-Joel Becker
-
-Updated: 31 March 2005
-
-Copyright (c) 2005 Oracle Corporation,
- Joel Becker
-
-
-[What is configfs?]
-
-configfs is a ram-based filesystem that provides the converse of
-sysfs's functionality. Where sysfs is a filesystem-based view of
-kernel objects, configfs is a filesystem-based manager of kernel
-objects, or config_items.
-
-With sysfs, an object is created in kernel (for example, when a device
-is discovered) and it is registered with sysfs. Its attributes then
-appear in sysfs, allowing userspace to read the attributes via
-readdir(3)/read(2). It may allow some attributes to be modified via
-write(2). The important point is that the object is created and
-destroyed in kernel, the kernel controls the lifecycle of the sysfs
-representation, and sysfs is merely a window on all this.
-
-A configfs config_item is created via an explicit userspace operation:
-mkdir(2). It is destroyed via rmdir(2). The attributes appear at
-mkdir(2) time, and can be read or modified via read(2) and write(2).
-As with sysfs, readdir(3) queries the list of items and/or attributes.
-symlink(2) can be used to group items together. Unlike sysfs, the
-lifetime of the representation is completely driven by userspace. The
-kernel modules backing the items must respond to this.
-
-Both sysfs and configfs can and should exist together on the same
-system. One is not a replacement for the other.
-
-[Using configfs]
-
-configfs can be compiled as a module or into the kernel. You can access
-it by doing
-
- mount -t configfs none /config
-
-The configfs tree will be empty unless client modules are also loaded.
-These are modules that register their item types with configfs as
-subsystems. Once a client subsystem is loaded, it will appear as a
-subdirectory (or more than one) under /config. Like sysfs, the
-configfs tree is always there, whether mounted on /config or not.
-
-An item is created via mkdir(2). The item's attributes will also
-appear at this time. readdir(3) can determine what the attributes are,
-read(2) can query their default values, and write(2) can store new
-values. Like sysfs, attributes should be ASCII text files, preferably
-with only one value per file. The same efficiency caveats from sysfs
-apply. Don't mix more than one attribute in one attribute file.
-
-Like sysfs, configfs expects write(2) to store the entire buffer at
-once. When writing to configfs attributes, userspace processes should
-first read the entire file, modify the portions they wish to change, and
-then write the entire buffer back. Attribute files have a maximum size
-of one page (PAGE_SIZE, 4096 on i386).
-
-When an item needs to be destroyed, remove it with rmdir(2). An
-item cannot be destroyed if any other item has a link to it (via
-symlink(2)). Links can be removed via unlink(2).
-
-[Configuring FakeNBD: an Example]
-
-Imagine there's a Network Block Device (NBD) driver that allows you to
-access remote block devices. Call it FakeNBD. FakeNBD uses configfs
-for its configuration. Obviously, there will be a nice program that
-sysadmins use to configure FakeNBD, but somehow that program has to tell
-the driver about it. Here's where configfs comes in.
-
-When the FakeNBD driver is loaded, it registers itself with configfs.
-readdir(3) sees this just fine:
-
- # ls /config
- fakenbd
-
-A fakenbd connection can be created with mkdir(2). The name is
-arbitrary, but likely the tool will make some use of the name. Perhaps
-it is a uuid or a disk name:
-
- # mkdir /config/fakenbd/disk1
- # ls /config/fakenbd/disk1
- target device rw
-
-The target attribute contains the IP address of the server FakeNBD will
-connect to. The device attribute is the device on the server.
-Predictably, the rw attribute determines whether the connection is
-read-only or read-write.
-
- # echo 10.0.0.1 > /config/fakenbd/disk1/target
- # echo /dev/sda1 > /config/fakenbd/disk1/device
- # echo 1 > /config/fakenbd/disk1/rw
-
-That's it. That's all there is. Now the device is configured, via the
-shell no less.
-
-[Coding With configfs]
-
-Every object in configfs is a config_item. A config_item reflects an
-object in the subsystem. It has attributes that match values on that
-object. configfs handles the filesystem representation of that object
-and its attributes, allowing the subsystem to ignore all but the
-basic show/store interaction.
-
-Items are created and destroyed inside a config_group. A group is a
-collection of items that share the same attributes and operations.
-Items are created by mkdir(2) and removed by rmdir(2), but configfs
-handles that. The group has a set of operations to perform these tasks
-
-A subsystem is the top level of a client module. During initialization,
-the client module registers the subsystem with configfs, the subsystem
-appears as a directory at the top of the configfs filesystem. A
-subsystem is also a config_group, and can do everything a config_group
-can.
-
-[struct config_item]
-
- struct config_item {
- char *ci_name;
- char ci_namebuf[UOBJ_NAME_LEN];
- struct kref ci_kref;
- struct list_head ci_entry;
- struct config_item *ci_parent;
- struct config_group *ci_group;
- struct config_item_type *ci_type;
- struct dentry *ci_dentry;
- };
-
- void config_item_init(struct config_item *);
- void config_item_init_type_name(struct config_item *,
- const char *name,
- struct config_item_type *type);
- struct config_item *config_item_get(struct config_item *);
- void config_item_put(struct config_item *);
-
-Generally, struct config_item is embedded in a container structure, a
-structure that actually represents what the subsystem is doing. The
-config_item portion of that structure is how the object interacts with
-configfs.
-
-Whether statically defined in a source file or created by a parent
-config_group, a config_item must have one of the _init() functions
-called on it. This initializes the reference count and sets up the
-appropriate fields.
-
-All users of a config_item should have a reference on it via
-config_item_get(), and drop the reference when they are done via
-config_item_put().
-
-By itself, a config_item cannot do much more than appear in configfs.
-Usually a subsystem wants the item to display and/or store attributes,
-among other things. For that, it needs a type.
-
-[struct config_item_type]
-
- struct configfs_item_operations {
- void (*release)(struct config_item *);
- ssize_t (*show_attribute)(struct config_item *,
- struct configfs_attribute *,
- char *);
- ssize_t (*store_attribute)(struct config_item *,
- struct configfs_attribute *,
- const char *, size_t);
- int (*allow_link)(struct config_item *src,
- struct config_item *target);
- int (*drop_link)(struct config_item *src,
- struct config_item *target);
- };
-
- struct config_item_type {
- struct module *ct_owner;
- struct configfs_item_operations *ct_item_ops;
- struct configfs_group_operations *ct_group_ops;
- struct configfs_attribute **ct_attrs;
- };
-
-The most basic function of a config_item_type is to define what
-operations can be performed on a config_item. All items that have been
-allocated dynamically will need to provide the ct_item_ops->release()
-method. This method is called when the config_item's reference count
-reaches zero. Items that wish to display an attribute need to provide
-the ct_item_ops->show_attribute() method. Similarly, storing a new
-attribute value uses the store_attribute() method.
-
-[struct configfs_attribute]
-
- struct configfs_attribute {
- char *ca_name;
- struct module *ca_owner;
- mode_t ca_mode;
- };
-
-When a config_item wants an attribute to appear as a file in the item's
-configfs directory, it must define a configfs_attribute describing it.
-It then adds the attribute to the NULL-terminated array
-config_item_type->ct_attrs. When the item appears in configfs, the
-attribute file will appear with the configfs_attribute->ca_name
-filename. configfs_attribute->ca_mode specifies the file permissions.
-
-If an attribute is readable and the config_item provides a
-ct_item_ops->show_attribute() method, that method will be called
-whenever userspace asks for a read(2) on the attribute. The converse
-will happen for write(2).
-
-[struct config_group]
-
-A config_item cannot live in a vaccum. The only way one can be created
-is via mkdir(2) on a config_group. This will trigger creation of a
-child item.
-
- struct config_group {
- struct config_item cg_item;
- struct list_head cg_children;
- struct configfs_subsystem *cg_subsys;
- struct config_group **default_groups;
- };
-
- void config_group_init(struct config_group *group);
- void config_group_init_type_name(struct config_group *group,
- const char *name,
- struct config_item_type *type);
-
-
-The config_group structure contains a config_item. Properly configuring
-that item means that a group can behave as an item in its own right.
-However, it can do more: it can create child items or groups. This is
-accomplished via the group operations specified on the group's
-config_item_type.
-
- struct configfs_group_operations {
- struct config_item *(*make_item)(struct config_group *group,
- const char *name);
- struct config_group *(*make_group)(struct config_group *group,
- const char *name);
- int (*commit_item)(struct config_item *item);
- void (*drop_item)(struct config_group *group,
- struct config_item *item);
- };
-
-A group creates child items by providing the
-ct_group_ops->make_item() method. If provided, this method is called from mkdir(2) in the group's directory. The subsystem allocates a new
-config_item (or more likely, its container structure), initializes it,
-and returns it to configfs. Configfs will then populate the filesystem
-tree to reflect the new item.
-
-If the subsystem wants the child to be a group itself, the subsystem
-provides ct_group_ops->make_group(). Everything else behaves the same,
-using the group _init() functions on the group.
-
-Finally, when userspace calls rmdir(2) on the item or group,
-ct_group_ops->drop_item() is called. As a config_group is also a
-config_item, it is not necessary for a seperate drop_group() method.
-The subsystem must config_item_put() the reference that was initialized
-upon item allocation. If a subsystem has no work to do, it may omit
-the ct_group_ops->drop_item() method, and configfs will call
-config_item_put() on the item on behalf of the subsystem.
-
-IMPORTANT: drop_item() is void, and as such cannot fail. When rmdir(2)
-is called, configfs WILL remove the item from the filesystem tree
-(assuming that it has no children to keep it busy). The subsystem is
-responsible for responding to this. If the subsystem has references to
-the item in other threads, the memory is safe. It may take some time
-for the item to actually disappear from the subsystem's usage. But it
-is gone from configfs.
-
-A config_group cannot be removed while it still has child items. This
-is implemented in the configfs rmdir(2) code. ->drop_item() will not be
-called, as the item has not been dropped. rmdir(2) will fail, as the
-directory is not empty.
-
-[struct configfs_subsystem]
-
-A subsystem must register itself, ususally at module_init time. This
-tells configfs to make the subsystem appear in the file tree.
-
- struct configfs_subsystem {
- struct config_group su_group;
- struct semaphore su_sem;
- };
-
- int configfs_register_subsystem(struct configfs_subsystem *subsys);
- void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
-
- A subsystem consists of a toplevel config_group and a semaphore.
-The group is where child config_items are created. For a subsystem,
-this group is usually defined statically. Before calling
-configfs_register_subsystem(), the subsystem must have initialized the
-group via the usual group _init() functions, and it must also have
-initialized the semaphore.
- When the register call returns, the subsystem is live, and it
-will be visible via configfs. At that point, mkdir(2) can be called and
-the subsystem must be ready for it.
-
-[An Example]
-
-The best example of these basic concepts is the simple_children
-subsystem/group and the simple_child item in configfs_example.c It
-shows a trivial object displaying and storing an attribute, and a simple
-group creating and destroying these children.
-
-[Hierarchy Navigation and the Subsystem Semaphore]
-
-There is an extra bonus that configfs provides. The config_groups and
-config_items are arranged in a hierarchy due to the fact that they
-appear in a filesystem. A subsystem is NEVER to touch the filesystem
-parts, but the subsystem might be interested in this hierarchy. For
-this reason, the hierarchy is mirrored via the config_group->cg_children
-and config_item->ci_parent structure members.
-
-A subsystem can navigate the cg_children list and the ci_parent pointer
-to see the tree created by the subsystem. This can race with configfs'
-management of the hierarchy, so configfs uses the subsystem semaphore to
-protect modifications. Whenever a subsystem wants to navigate the
-hierarchy, it must do so under the protection of the subsystem
-semaphore.
-
-A subsystem will be prevented from acquiring the semaphore while a newly
-allocated item has not been linked into this hierarchy. Similarly, it
-will not be able to acquire the semaphore while a dropping item has not
-yet been unlinked. This means that an item's ci_parent pointer will
-never be NULL while the item is in configfs, and that an item will only
-be in its parent's cg_children list for the same duration. This allows
-a subsystem to trust ci_parent and cg_children while they hold the
-semaphore.
-
-[Item Aggregation Via symlink(2)]
-
-configfs provides a simple group via the group->item parent/child
-relationship. Often, however, a larger environment requires aggregation
-outside of the parent/child connection. This is implemented via
-symlink(2).
-
-A config_item may provide the ct_item_ops->allow_link() and
-ct_item_ops->drop_link() methods. If the ->allow_link() method exists,
-symlink(2) may be called with the config_item as the source of the link.
-These links are only allowed between configfs config_items. Any
-symlink(2) attempt outside the configfs filesystem will be denied.
-
-When symlink(2) is called, the source config_item's ->allow_link()
-method is called with itself and a target item. If the source item
-allows linking to target item, it returns 0. A source item may wish to
-reject a link if it only wants links to a certain type of object (say,
-in its own subsystem).
-
-When unlink(2) is called on the symbolic link, the source item is
-notified via the ->drop_link() method. Like the ->drop_item() method,
-this is a void function and cannot return failure. The subsystem is
-responsible for responding to the change.
-
-A config_item cannot be removed while it links to any other item, nor
-can it be removed while an item links to it. Dangling symlinks are not
-allowed in configfs.
-
-[Automatically Created Subgroups]
-
-A new config_group may want to have two types of child config_items.
-While this could be codified by magic names in ->make_item(), it is much
-more explicit to have a method whereby userspace sees this divergence.
-
-Rather than have a group where some items behave differently than
-others, configfs provides a method whereby one or many subgroups are
-automatically created inside the parent at its creation. Thus,
-mkdir("parent) results in "parent", "parent/subgroup1", up through
-"parent/subgroupN". Items of type 1 can now be created in
-"parent/subgroup1", and items of type N can be created in
-"parent/subgroupN".
-
-These automatic subgroups, or default groups, do not preclude other
-children of the parent group. If ct_group_ops->make_group() exists,
-other child groups can be created on the parent group directly.
-
-A configfs subsystem specifies default groups by filling in the
-NULL-terminated array default_groups on the config_group structure.
-Each group in that array is populated in the configfs tree at the same
-time as the parent group. Similarly, they are removed at the same time
-as the parent. No extra notification is provided. When a ->drop_item()
-method call notifies the subsystem the parent group is going away, it
-also means every default group child associated with that parent group.
-
-As a consequence of this, default_groups cannot be removed directly via
-rmdir(2). They also are not considered when rmdir(2) on the parent
-group is checking for children.
-
-[Committable Items]
-
-NOTE: Committable items are currently unimplemented.
-
-Some config_items cannot have a valid initial state. That is, no
-default values can be specified for the item's attributes such that the
-item can do its work. Userspace must configure one or more attributes,
-after which the subsystem can start whatever entity this item
-represents.
-
-Consider the FakeNBD device from above. Without a target address *and*
-a target device, the subsystem has no idea what block device to import.
-The simple example assumes that the subsystem merely waits until all the
-appropriate attributes are configured, and then connects. This will,
-indeed, work, but now every attribute store must check if the attributes
-are initialized. Every attribute store must fire off the connection if
-that condition is met.
-
-Far better would be an explicit action notifying the subsystem that the
-config_item is ready to go. More importantly, an explicit action allows
-the subsystem to provide feedback as to whether the attibutes are
-initialized in a way that makes sense. configfs provides this as
-committable items.
-
-configfs still uses only normal filesystem operations. An item is
-committed via rename(2). The item is moved from a directory where it
-can be modified to a directory where it cannot.
-
-Any group that provides the ct_group_ops->commit_item() method has
-committable items. When this group appears in configfs, mkdir(2) will
-not work directly in the group. Instead, the group will have two
-subdirectories: "live" and "pending". The "live" directory does not
-support mkdir(2) or rmdir(2) either. It only allows rename(2). The
-"pending" directory does allow mkdir(2) and rmdir(2). An item is
-created in the "pending" directory. Its attributes can be modified at
-will. Userspace commits the item by renaming it into the "live"
-directory. At this point, the subsystem recieves the ->commit_item()
-callback. If all required attributes are filled to satisfaction, the
-method returns zero and the item is moved to the "live" directory.
-
-As rmdir(2) does not work in the "live" directory, an item must be
-shutdown, or "uncommitted". Again, this is done via rename(2), this
-time from the "live" directory back to the "pending" one. The subsystem
-is notified by the ct_group_ops->uncommit_object() method.
-
-
diff --git a/trunk/Documentation/filesystems/configfs/configfs_example.c b/trunk/Documentation/filesystems/configfs/configfs_example.c
deleted file mode 100644
index f3c6e4946f98..000000000000
--- a/trunk/Documentation/filesystems/configfs/configfs_example.c
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * vim: noexpandtab ts=8 sts=0 sw=8:
- *
- * configfs_example.c - This file is a demonstration module containing
- * a number of configfs subsystems.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
- *
- * Based on sysfs:
- * sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel
- *
- * configfs Copyright (C) 2005 Oracle. All rights reserved.
- */
-
-#include
-#include
-#include
-
-#include
-
-
-
-/*
- * 01-childless
- *
- * This first example is a childless subsystem. It cannot create
- * any config_items. It just has attributes.
- *
- * Note that we are enclosing the configfs_subsystem inside a container.
- * This is not necessary if a subsystem has no attributes directly
- * on the subsystem. See the next example, 02-simple-children, for
- * such a subsystem.
- */
-
-struct childless {
- struct configfs_subsystem subsys;
- int showme;
- int storeme;
-};
-
-struct childless_attribute {
- struct configfs_attribute attr;
- ssize_t (*show)(struct childless *, char *);
- ssize_t (*store)(struct childless *, const char *, size_t);
-};
-
-static inline struct childless *to_childless(struct config_item *item)
-{
- return item ? container_of(to_configfs_subsystem(to_config_group(item)), struct childless, subsys) : NULL;
-}
-
-static ssize_t childless_showme_read(struct childless *childless,
- char *page)
-{
- ssize_t pos;
-
- pos = sprintf(page, "%d\n", childless->showme);
- childless->showme++;
-
- return pos;
-}
-
-static ssize_t childless_storeme_read(struct childless *childless,
- char *page)
-{
- return sprintf(page, "%d\n", childless->storeme);
-}
-
-static ssize_t childless_storeme_write(struct childless *childless,
- const char *page,
- size_t count)
-{
- unsigned long tmp;
- char *p = (char *) page;
-
- tmp = simple_strtoul(p, &p, 10);
- if (!p || (*p && (*p != '\n')))
- return -EINVAL;
-
- if (tmp > INT_MAX)
- return -ERANGE;
-
- childless->storeme = tmp;
-
- return count;
-}
-
-static ssize_t childless_description_read(struct childless *childless,
- char *page)
-{
- return sprintf(page,
-"[01-childless]\n"
-"\n"
-"The childless subsystem is the simplest possible subsystem in\n"
-"configfs. It does not support the creation of child config_items.\n"
-"It only has a few attributes. In fact, it isn't much different\n"
-"than a directory in /proc.\n");
-}
-
-static struct childless_attribute childless_attr_showme = {
- .attr = { .ca_owner = THIS_MODULE, .ca_name = "showme", .ca_mode = S_IRUGO },
- .show = childless_showme_read,
-};
-static struct childless_attribute childless_attr_storeme = {
- .attr = { .ca_owner = THIS_MODULE, .ca_name = "storeme", .ca_mode = S_IRUGO | S_IWUSR },
- .show = childless_storeme_read,
- .store = childless_storeme_write,
-};
-static struct childless_attribute childless_attr_description = {
- .attr = { .ca_owner = THIS_MODULE, .ca_name = "description", .ca_mode = S_IRUGO },
- .show = childless_description_read,
-};
-
-static struct configfs_attribute *childless_attrs[] = {
- &childless_attr_showme.attr,
- &childless_attr_storeme.attr,
- &childless_attr_description.attr,
- NULL,
-};
-
-static ssize_t childless_attr_show(struct config_item *item,
- struct configfs_attribute *attr,
- char *page)
-{
- struct childless *childless = to_childless(item);
- struct childless_attribute *childless_attr =
- container_of(attr, struct childless_attribute, attr);
- ssize_t ret = 0;
-
- if (childless_attr->show)
- ret = childless_attr->show(childless, page);
- return ret;
-}
-
-static ssize_t childless_attr_store(struct config_item *item,
- struct configfs_attribute *attr,
- const char *page, size_t count)
-{
- struct childless *childless = to_childless(item);
- struct childless_attribute *childless_attr =
- container_of(attr, struct childless_attribute, attr);
- ssize_t ret = -EINVAL;
-
- if (childless_attr->store)
- ret = childless_attr->store(childless, page, count);
- return ret;
-}
-
-static struct configfs_item_operations childless_item_ops = {
- .show_attribute = childless_attr_show,
- .store_attribute = childless_attr_store,
-};
-
-static struct config_item_type childless_type = {
- .ct_item_ops = &childless_item_ops,
- .ct_attrs = childless_attrs,
- .ct_owner = THIS_MODULE,
-};
-
-static struct childless childless_subsys = {
- .subsys = {
- .su_group = {
- .cg_item = {
- .ci_namebuf = "01-childless",
- .ci_type = &childless_type,
- },
- },
- },
-};
-
-
-/* ----------------------------------------------------------------- */
-
-/*
- * 02-simple-children
- *
- * This example merely has a simple one-attribute child. Note that
- * there is no extra attribute structure, as the child's attribute is
- * known from the get-go. Also, there is no container for the
- * subsystem, as it has no attributes of its own.
- */
-
-struct simple_child {
- struct config_item item;
- int storeme;
-};
-
-static inline struct simple_child *to_simple_child(struct config_item *item)
-{
- return item ? container_of(item, struct simple_child, item) : NULL;
-}
-
-static struct configfs_attribute simple_child_attr_storeme = {
- .ca_owner = THIS_MODULE,
- .ca_name = "storeme",
- .ca_mode = S_IRUGO | S_IWUSR,
-};
-
-static struct configfs_attribute *simple_child_attrs[] = {
- &simple_child_attr_storeme,
- NULL,
-};
-
-static ssize_t simple_child_attr_show(struct config_item *item,
- struct configfs_attribute *attr,
- char *page)
-{
- ssize_t count;
- struct simple_child *simple_child = to_simple_child(item);
-
- count = sprintf(page, "%d\n", simple_child->storeme);
-
- return count;
-}
-
-static ssize_t simple_child_attr_store(struct config_item *item,
- struct configfs_attribute *attr,
- const char *page, size_t count)
-{
- struct simple_child *simple_child = to_simple_child(item);
- unsigned long tmp;
- char *p = (char *) page;
-
- tmp = simple_strtoul(p, &p, 10);
- if (!p || (*p && (*p != '\n')))
- return -EINVAL;
-
- if (tmp > INT_MAX)
- return -ERANGE;
-
- simple_child->storeme = tmp;
-
- return count;
-}
-
-static void simple_child_release(struct config_item *item)
-{
- kfree(to_simple_child(item));
-}
-
-static struct configfs_item_operations simple_child_item_ops = {
- .release = simple_child_release,
- .show_attribute = simple_child_attr_show,
- .store_attribute = simple_child_attr_store,
-};
-
-static struct config_item_type simple_child_type = {
- .ct_item_ops = &simple_child_item_ops,
- .ct_attrs = simple_child_attrs,
- .ct_owner = THIS_MODULE,
-};
-
-
-static struct config_item *simple_children_make_item(struct config_group *group, const char *name)
-{
- struct simple_child *simple_child;
-
- simple_child = kmalloc(sizeof(struct simple_child), GFP_KERNEL);
- if (!simple_child)
- return NULL;
-
- memset(simple_child, 0, sizeof(struct simple_child));
-
- config_item_init_type_name(&simple_child->item, name,
- &simple_child_type);
-
- simple_child->storeme = 0;
-
- return &simple_child->item;
-}
-
-static struct configfs_attribute simple_children_attr_description = {
- .ca_owner = THIS_MODULE,
- .ca_name = "description",
- .ca_mode = S_IRUGO,
-};
-
-static struct configfs_attribute *simple_children_attrs[] = {
- &simple_children_attr_description,
- NULL,
-};
-
-static ssize_t simple_children_attr_show(struct config_item *item,
- struct configfs_attribute *attr,
- char *page)
-{
- return sprintf(page,
-"[02-simple-children]\n"
-"\n"
-"This subsystem allows the creation of child config_items. These\n"
-"items have only one attribute that is readable and writeable.\n");
-}
-
-static struct configfs_item_operations simple_children_item_ops = {
- .show_attribute = simple_children_attr_show,
-};
-
-/*
- * Note that, since no extra work is required on ->drop_item(),
- * no ->drop_item() is provided.
- */
-static struct configfs_group_operations simple_children_group_ops = {
- .make_item = simple_children_make_item,
-};
-
-static struct config_item_type simple_children_type = {
- .ct_item_ops = &simple_children_item_ops,
- .ct_group_ops = &simple_children_group_ops,
- .ct_attrs = simple_children_attrs,
-};
-
-static struct configfs_subsystem simple_children_subsys = {
- .su_group = {
- .cg_item = {
- .ci_namebuf = "02-simple-children",
- .ci_type = &simple_children_type,
- },
- },
-};
-
-
-/* ----------------------------------------------------------------- */
-
-/*
- * 03-group-children
- *
- * This example reuses the simple_children group from above. However,
- * the simple_children group is not the subsystem itself, it is a
- * child of the subsystem. Creation of a group in the subsystem creates
- * a new simple_children group. That group can then have simple_child
- * children of its own.
- */
-
-struct simple_children {
- struct config_group group;
-};
-
-static struct config_group *group_children_make_group(struct config_group *group, const char *name)
-{
- struct simple_children *simple_children;
-
- simple_children = kmalloc(sizeof(struct simple_children),
- GFP_KERNEL);
- if (!simple_children)
- return NULL;
-
- memset(simple_children, 0, sizeof(struct simple_children));
-
- config_group_init_type_name(&simple_children->group, name,
- &simple_children_type);
-
- return &simple_children->group;
-}
-
-static struct configfs_attribute group_children_attr_description = {
- .ca_owner = THIS_MODULE,
- .ca_name = "description",
- .ca_mode = S_IRUGO,
-};
-
-static struct configfs_attribute *group_children_attrs[] = {
- &group_children_attr_description,
- NULL,
-};
-
-static ssize_t group_children_attr_show(struct config_item *item,
- struct configfs_attribute *attr,
- char *page)
-{
- return sprintf(page,
-"[03-group-children]\n"
-"\n"
-"This subsystem allows the creation of child config_groups. These\n"
-"groups are like the subsystem simple-children.\n");
-}
-
-static struct configfs_item_operations group_children_item_ops = {
- .show_attribute = group_children_attr_show,
-};
-
-/*
- * Note that, since no extra work is required on ->drop_item(),
- * no ->drop_item() is provided.
- */
-static struct configfs_group_operations group_children_group_ops = {
- .make_group = group_children_make_group,
-};
-
-static struct config_item_type group_children_type = {
- .ct_item_ops = &group_children_item_ops,
- .ct_group_ops = &group_children_group_ops,
- .ct_attrs = group_children_attrs,
-};
-
-static struct configfs_subsystem group_children_subsys = {
- .su_group = {
- .cg_item = {
- .ci_namebuf = "03-group-children",
- .ci_type = &group_children_type,
- },
- },
-};
-
-/* ----------------------------------------------------------------- */
-
-/*
- * We're now done with our subsystem definitions.
- * For convenience in this module, here's a list of them all. It
- * allows the init function to easily register them. Most modules
- * will only have one subsystem, and will only call register_subsystem
- * on it directly.
- */
-static struct configfs_subsystem *example_subsys[] = {
- &childless_subsys.subsys,
- &simple_children_subsys,
- &group_children_subsys,
- NULL,
-};
-
-static int __init configfs_example_init(void)
-{
- int ret;
- int i;
- struct configfs_subsystem *subsys;
-
- for (i = 0; example_subsys[i]; i++) {
- subsys = example_subsys[i];
-
- config_group_init(&subsys->su_group);
- init_MUTEX(&subsys->su_sem);
- ret = configfs_register_subsystem(subsys);
- if (ret) {
- printk(KERN_ERR "Error %d while registering subsystem %s\n",
- ret,
- subsys->su_group.cg_item.ci_namebuf);
- goto out_unregister;
- }
- }
-
- return 0;
-
-out_unregister:
- for (; i >= 0; i--) {
- configfs_unregister_subsystem(example_subsys[i]);
- }
-
- return ret;
-}
-
-static void __exit configfs_example_exit(void)
-{
- int i;
-
- for (i = 0; example_subsys[i]; i++) {
- configfs_unregister_subsystem(example_subsys[i]);
- }
-}
-
-module_init(configfs_example_init);
-module_exit(configfs_example_exit);
-MODULE_LICENSE("GPL");
diff --git a/trunk/Documentation/filesystems/dlmfs.txt b/trunk/Documentation/filesystems/dlmfs.txt
deleted file mode 100644
index 9afab845a906..000000000000
--- a/trunk/Documentation/filesystems/dlmfs.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-dlmfs
-==================
-A minimal DLM userspace interface implemented via a virtual file
-system.
-
-dlmfs is built with OCFS2 as it requires most of its infrastructure.
-
-Project web page: http://oss.oracle.com/projects/ocfs2
-Tools web page: http://oss.oracle.com/projects/ocfs2-tools
-OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
-
-All code copyright 2005 Oracle except when otherwise noted.
-
-CREDITS
-=======
-
-Some code taken from ramfs which is Copyright (C) 2000 Linus Torvalds
-and Transmeta Corp.
-
-Mark Fasheh
-
-Caveats
-=======
-- Right now it only works with the OCFS2 DLM, though support for other
- DLM implementations should not be a major issue.
-
-Mount options
-=============
-None
-
-Usage
-=====
-
-If you're just interested in OCFS2, then please see ocfs2.txt. The
-rest of this document will be geared towards those who want to use
-dlmfs for easy to setup and easy to use clustered locking in
-userspace.
-
-Setup
-=====
-
-dlmfs requires that the OCFS2 cluster infrastructure be in
-place. Please download ocfs2-tools from the above url and configure a
-cluster.
-
-You'll want to start heartbeating on a volume which all the nodes in
-your lockspace can access. The easiest way to do this is via
-ocfs2_hb_ctl (distributed with ocfs2-tools). Right now it requires
-that an OCFS2 file system be in place so that it can automatically
-find it's heartbeat area, though it will eventually support heartbeat
-against raw disks.
-
-Please see the ocfs2_hb_ctl and mkfs.ocfs2 manual pages distributed
-with ocfs2-tools.
-
-Once you're heartbeating, DLM lock 'domains' can be easily created /
-destroyed and locks within them accessed.
-
-Locking
-=======
-
-Users may access dlmfs via standard file system calls, or they can use
-'libo2dlm' (distributed with ocfs2-tools) which abstracts the file
-system calls and presents a more traditional locking api.
-
-dlmfs handles lock caching automatically for the user, so a lock
-request for an already acquired lock will not generate another DLM
-call. Userspace programs are assumed to handle their own local
-locking.
-
-Two levels of locks are supported - Shared Read, and Exlcusive.
-Also supported is a Trylock operation.
-
-For information on the libo2dlm interface, please see o2dlm.h,
-distributed with ocfs2-tools.
-
-Lock value blocks can be read and written to a resource via read(2)
-and write(2) against the fd obtained via your open(2) call. The
-maximum currently supported LVB length is 64 bytes (though that is an
-OCFS2 DLM limitation). Through this mechanism, users of dlmfs can share
-small amounts of data amongst their nodes.
-
-mkdir(2) signals dlmfs to join a domain (which will have the same name
-as the resulting directory)
-
-rmdir(2) signals dlmfs to leave the domain
-
-Locks for a given domain are represented by regular inodes inside the
-domain directory. Locking against them is done via the open(2) system
-call.
-
-The open(2) call will not return until your lock has been granted or
-an error has occurred, unless it has been instructed to do a trylock
-operation. If the lock succeeds, you'll get an fd.
-
-open(2) with O_CREAT to ensure the resource inode is created - dlmfs does
-not automatically create inodes for existing lock resources.
-
-Open Flag Lock Request Type
---------- -----------------
-O_RDONLY Shared Read
-O_RDWR Exclusive
-
-Open Flag Resulting Locking Behavior
---------- --------------------------
-O_NONBLOCK Trylock operation
-
-You must provide exactly one of O_RDONLY or O_RDWR.
-
-If O_NONBLOCK is also provided and the trylock operation was valid but
-could not lock the resource then open(2) will return ETXTBUSY.
-
-close(2) drops the lock associated with your fd.
-
-Modes passed to mkdir(2) or open(2) are adhered to locally. Chown is
-supported locally as well. This means you can use them to restrict
-access to the resources via dlmfs on your local node only.
-
-The resource LVB may be read from the fd in either Shared Read or
-Exclusive modes via the read(2) system call. It can be written via
-write(2) only when open in Exclusive mode.
-
-Once written, an LVB will be visible to other nodes who obtain Read
-Only or higher level locks on the resource.
-
-See Also
-========
-http://opendlm.sourceforge.net/cvsmirror/opendlm/docs/dlmbook_final.pdf
-
-For more information on the VMS distributed locking API.
diff --git a/trunk/Documentation/filesystems/ext3.txt b/trunk/Documentation/filesystems/ext3.txt
index 9840d5b8d5b9..9ab7f446f7ad 100644
--- a/trunk/Documentation/filesystems/ext3.txt
+++ b/trunk/Documentation/filesystems/ext3.txt
@@ -57,19 +57,19 @@ oldalloc This disables the Orlov block allocator and enables the
we'd like to get some feedback if it's the contrary for
you.
-user_xattr Enables Extended User Attributes. Additionally, you need
- to have extended attribute support enabled in the kernel
- configuration (CONFIG_EXT3_FS_XATTR). See the attr(5)
- manual page and http://acl.bestbits.at to learn more
- about extended attributes.
-
-nouser_xattr Disables Extended User Attributes.
-
-acl Enables POSIX Access Control Lists support. Additionally,
- you need to have ACL support enabled in the kernel
- configuration (CONFIG_EXT3_FS_POSIX_ACL). See the acl(5)
- manual page and http://acl.bestbits.at for more
- information.
+user_xattr (*) Enables POSIX Extended Attributes. It's enabled by
+ default, however you need to confifure its support
+ (CONFIG_EXT3_FS_XATTR). This is neccesary if you want
+ to use POSIX Acces Control Lists support. You can visit
+ http://acl.bestbits.at to know more about POSIX Extended
+ attributes.
+
+nouser_xattr Disables POSIX Extended Attributes.
+
+acl (*) Enables POSIX Access Control Lists support. This is
+ enabled by default, however you need to configure
+ its support (CONFIG_EXT3_FS_POSIX_ACL). If you want
+ to know more about ACLs visit http://acl.bestbits.at
noacl This option disables POSIX Access Control List support.
diff --git a/trunk/Documentation/filesystems/ocfs2.txt b/trunk/Documentation/filesystems/ocfs2.txt
deleted file mode 100644
index f2595caf052e..000000000000
--- a/trunk/Documentation/filesystems/ocfs2.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-OCFS2 filesystem
-==================
-OCFS2 is a general purpose extent based shared disk cluster file
-system with many similarities to ext3. It supports 64 bit inode
-numbers, and has automatically extending metadata groups which may
-also make it attractive for non-clustered use.
-
-You'll want to install the ocfs2-tools package in order to at least
-get "mount.ocfs2" and "ocfs2_hb_ctl".
-
-Project web page: http://oss.oracle.com/projects/ocfs2
-Tools web page: http://oss.oracle.com/projects/ocfs2-tools
-OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
-
-All code copyright 2005 Oracle except when otherwise noted.
-
-CREDITS:
-Lots of code taken from ext3 and other projects.
-
-Authors in alphabetical order:
-Joel Becker
-Zach Brown
-Mark Fasheh
-Kurt Hackel
-Sunil Mushran
-Manish Singh
-
-Caveats
-=======
-Features which OCFS2 does not support yet:
- - sparse files
- - extended attributes
- - shared writeable mmap
- - loopback is supported, but data written will not
- be cluster coherent.
- - quotas
- - cluster aware flock
- - Directory change notification (F_NOTIFY)
- - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
- - POSIX ACLs
- - readpages / writepages (not user visible)
-
-Mount options
-=============
-
-OCFS2 supports the following mount options:
-(*) == default
-
-barrier=1 This enables/disables barriers. barrier=0 disables it,
- barrier=1 enables it.
-errors=remount-ro(*) Remount the filesystem read-only on an error.
-errors=panic Panic and halt the machine if an error occurs.
-intr (*) Allow signals to interrupt cluster operations.
-nointr Do not allow signals to interrupt cluster
- operations.
diff --git a/trunk/Documentation/filesystems/vfs.txt b/trunk/Documentation/filesystems/vfs.txt
index e56e842847d3..ee4c0a8b8db7 100644
--- a/trunk/Documentation/filesystems/vfs.txt
+++ b/trunk/Documentation/filesystems/vfs.txt
@@ -162,8 +162,9 @@ get_sb() method fills in is the "s_op" field. This is a pointer to
a "struct super_operations" which describes the next level of the
filesystem implementation.
-Usually, a filesystem uses one of the generic get_sb() implementations
-and provides a fill_super() method instead. The generic methods are:
+Usually, a filesystem uses generic one of the generic get_sb()
+implementations and provides a fill_super() method instead. The
+generic methods are:
get_sb_bdev: mount a filesystem residing on a block device
diff --git a/trunk/Documentation/hwmon/w83627hf b/trunk/Documentation/hwmon/w83627hf
index 5d23776e9907..78f37c2d602e 100644
--- a/trunk/Documentation/hwmon/w83627hf
+++ b/trunk/Documentation/hwmon/w83627hf
@@ -54,16 +54,13 @@ If you really want i2c accesses for these Super I/O chips,
use the w83781d driver. However this is not the preferred method
now that this ISA driver has been developed.
-The w83627_HF_ uses pins 110-106 as VID0-VID4. The w83627_THF_ uses the
-same pins as GPIO[0:4]. Technically, the w83627_THF_ does not support a
-VID reading. However the two chips have the identical 128 pin package. So,
-it is possible or even likely for a w83627thf to have the VID signals routed
-to these pins despite their not being labeled for that purpose. Therefore,
-the w83627thf driver interprets these as VID. If the VID on your board
-doesn't work, first see doc/vid in the lm_sensors package[1]. If that still
-doesn't help, you may just ignore the bogus VID reading with no harm done.
+Technically, the w83627thf does not support a VID reading. However, it's
+possible or even likely that your mainboard maker has routed these signals
+to a specific set of general purpose IO pins (the Asus P4C800-E is one such
+board). The w83627thf driver now interprets these as VID. If the VID on
+your board doesn't work, first see doc/vid in the lm_sensors package. If
+that still doesn't help, email us at lm-sensors@lm-sensors.org.
-For further information on this driver see the w83781d driver documentation.
-
-[1] http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc/vid
+For further information on this driver see the w83781d driver
+documentation.
diff --git a/trunk/Documentation/i2c/busses/i2c-nforce2 b/trunk/Documentation/i2c/busses/i2c-nforce2
index d751282d9b2a..e379e182e64f 100644
--- a/trunk/Documentation/i2c/busses/i2c-nforce2
+++ b/trunk/Documentation/i2c/busses/i2c-nforce2
@@ -5,8 +5,7 @@ Supported adapters:
* nForce2 Ultra 400 MCP 10de:0084
* nForce3 Pro150 MCP 10de:00D4
* nForce3 250Gb MCP 10de:00E4
- * nForce4 MCP 10de:0052
- * nForce4 MCP-04 10de:0034
+ * nForce4 MCP 10de:0052
Datasheet: not publically available, but seems to be similar to the
AMD-8111 SMBus 2.0 adapter.
diff --git a/trunk/Documentation/i2c/busses/i2c-parport b/trunk/Documentation/i2c/busses/i2c-parport
index d9f23c0763f1..9f1d0082da18 100644
--- a/trunk/Documentation/i2c/busses/i2c-parport
+++ b/trunk/Documentation/i2c/busses/i2c-parport
@@ -17,7 +17,6 @@ It currently supports the following devices:
* Velleman K8000 adapter
* ELV adapter
* Analog Devices evaluation boards (ADM1025, ADM1030, ADM1031, ADM1032)
- * Barco LPT->DVI (K5800236) adapter
These devices use different pinout configurations, so you have to tell
the driver what you have, using the type module parameter. There is no
diff --git a/trunk/Documentation/i2c/porting-clients b/trunk/Documentation/i2c/porting-clients
index f03c2a02f806..184fac2377aa 100644
--- a/trunk/Documentation/i2c/porting-clients
+++ b/trunk/Documentation/i2c/porting-clients
@@ -1,13 +1,10 @@
-Revision 6, 2005-11-20
+Revision 5, 2005-07-29
Jean Delvare
Greg KH
This is a guide on how to convert I2C chip drivers from Linux 2.4 to
Linux 2.6. I have been using existing drivers (lm75, lm78) as examples.
Then I converted a driver myself (lm83) and updated this document.
-Note that this guide is strongly oriented towards hardware monitoring
-drivers. Many points are still valid for other type of drivers, but
-others may be irrelevant.
There are two sets of points below. The first set concerns technical
changes. The second set concerns coding policy. Both are mandatory.
@@ -25,20 +22,16 @@ Technical changes:
#include
#include
#include
- #include
#include
- #include /* for ISA drivers */
#include /* for hardware monitoring drivers */
#include
#include /* if you need VRM support */
- #include /* for class registration */
#include /* if you have I/O operations */
Please respect this inclusion order. Some extra headers may be
required for a given driver (e.g. "lm75.h").
* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, ISA addresses
- are no more handled by the i2c core. Address ranges are no more
- supported either, define each individual address separately.
+ are no more handled by the i2c core.
SENSORS_INSMOD_ becomes I2C_CLIENT_INSMOD_.
* [Client data] Get rid of sysctl_id. Try using standard names for
@@ -55,23 +48,23 @@ Technical changes:
int kind);
static void lm75_init_client(struct i2c_client *client);
static int lm75_detach_client(struct i2c_client *client);
- static struct lm75_data lm75_update_device(struct device *dev);
+ static void lm75_update_client(struct i2c_client *client);
* [Sysctl] All sysctl stuff is of course gone (defines, ctl_table
and functions). Instead, you have to define show and set functions for
each sysfs file. Only define set for writable values. Take a look at an
- existing 2.6 driver for details (it87 for example). Don't forget
+ existing 2.6 driver for details (lm78 for example). Don't forget
to define the attributes for each file (this is that step that
links callback functions). Use the file names specified in
- Documentation/hwmon/sysfs-interface for the individual files. Also
+ Documentation/i2c/sysfs-interface for the individual files. Also
convert the units these files read and write to the specified ones.
If you need to add a new type of file, please discuss it on the
sensors mailing list by providing a
- patch to the Documentation/hwmon/sysfs-interface file.
+ patch to the Documentation/i2c/sysfs-interface file.
* [Attach] For I2C drivers, the attach function should make sure
- that the adapter's class has I2C_CLASS_HWMON (or whatever class is
- suitable for your driver), using the following construct:
+ that the adapter's class has I2C_CLASS_HWMON, using the
+ following construct:
if (!(adapter->class & I2C_CLASS_HWMON))
return 0;
ISA-only drivers of course don't need this.
@@ -79,72 +72,63 @@ Technical changes:
* [Detect] As mentioned earlier, the flags parameter is gone.
The type_name and client_name strings are replaced by a single
- name string, which will be filled with a lowercase, short string.
+ name string, which will be filled with a lowercase, short string
+ (typically the driver name, e.g. "lm75").
In i2c-only drivers, drop the i2c_is_isa_adapter check, it's
useless. Same for isa-only drivers, as the test would always be
true. Only hybrid drivers (which are quite rare) still need it.
- The labels used for error paths are reduced to the number needed.
- It is advised that the labels are given descriptive names such as
- exit and exit_free. Don't forget to properly set err before
+ The errorN labels are reduced to the number needed. If that number
+ is 2 (i2c-only drivers), it is advised that the labels are named
+ exit and exit_free. For i2c+isa drivers, labels should be named
+ ERROR0, ERROR1 and ERROR2. Don't forget to properly set err before
jumping to error labels. By the way, labels should be left-aligned.
Use kzalloc instead of kmalloc.
Use i2c_set_clientdata to set the client data (as opposed to
a direct access to client->data).
- Use strlcpy instead of strcpy or snprintf to copy the client name.
+ Use strlcpy instead of strcpy to copy the client name.
Replace the sysctl directory registration by calls to
device_create_file. Move the driver initialization before any
sysfs file creation.
- Register the client with the hwmon class (using hwmon_device_register)
- if applicable.
Drop client->id.
Drop any 24RF08 corruption prevention you find, as this is now done
at the i2c-core level, and doing it twice voids it.
- Don't add I2C_CLIENT_ALLOW_USE to client->flags, it's the default now.
* [Init] Limits must not be set by the driver (can be done later in
user-space). Chip should not be reset default (although a module
- parameter may be used to force it), and initialization should be
+ parameter may be used to force is), and initialization should be
limited to the strictly necessary steps.
-* [Detach] Remove the call to i2c_deregister_entry. Do not log an
- error message if i2c_detach_client fails, as i2c-core will now do
- it for you.
- Unregister from the hwmon class if applicable.
-
-* [Update] The function prototype changed, it is now
- passed a device structure, which you have to convert to a client
- using to_i2c_client(dev). The update function should return a
- pointer to the client data.
- Don't access client->data directly, use i2c_get_clientdata(client)
- instead.
- Use time_after() instead of direct jiffies comparison.
-
-* [Interface] Make sure there is a MODULE_LICENSE() line, at the bottom
- of the file (after MODULE_AUTHOR() and MODULE_DESCRIPTION(), in this
- order).
-
-* [Driver] The flags field of the i2c_driver structure is gone.
- I2C_DF_NOTIFY is now the default behavior.
- The i2c_driver structure has a driver member, which is itself a
- structure, those name member should be initialized to a driver name
- string. i2c_driver itself has no name member anymore.
+* [Detach] Get rid of data, remove the call to
+ i2c_deregister_entry. Do not log an error message if
+ i2c_detach_client fails, as i2c-core will now do it for you.
+
+* [Update] Don't access client->data directly, use
+ i2c_get_clientdata(client) instead.
+
+* [Interface] Init function should not print anything. Make sure
+ there is a MODULE_LICENSE() line, at the bottom of the file
+ (after MODULE_AUTHOR() and MODULE_DESCRIPTION(), in this order).
Coding policy:
* [Copyright] Use (C), not (c), for copyright.
* [Debug/log] Get rid of #ifdef DEBUG/#endif constructs whenever you
- can. Calls to printk for debugging purposes are replaced by calls to
- dev_dbg where possible, else to pr_debug. Here is an example of how
- to call it (taken from lm75_detect):
+ can. Calls to printk/pr_debug for debugging purposes are replaced
+ by calls to dev_dbg. Here is an example on how to call it (taken
+ from lm75_detect):
dev_dbg(&client->dev, "Starting lm75 update\n");
Replace other printk calls with the dev_info, dev_err or dev_warn
function, as appropriate.
-* [Constants] Constants defines (registers, conversions) should be
- aligned. This greatly improves readability.
- Alignments are achieved by the means of tabs, not spaces. Remember
- that tabs are set to 8 in the Linux kernel code.
+* [Constants] Constants defines (registers, conversions, initial
+ values) should be aligned. This greatly improves readability.
+ Same goes for variables declarations. Alignments are achieved by the
+ means of tabs, not spaces. Remember that tabs are set to 8 in the
+ Linux kernel code.
+
+* [Structure definition] The name field should be standardized. All
+ lowercase and as simple as the driver name itself (e.g. "lm75").
* [Layout] Avoid extra empty lines between comments and what they
comment. Respect the coding style (see Documentation/CodingStyle),
diff --git a/trunk/Documentation/i2c/writing-clients b/trunk/Documentation/i2c/writing-clients
index 3a057c8e5507..d19993cc0604 100644
--- a/trunk/Documentation/i2c/writing-clients
+++ b/trunk/Documentation/i2c/writing-clients
@@ -25,9 +25,9 @@ routines, a client structure specific information like the actual I2C
address.
static struct i2c_driver foo_driver = {
- .driver = {
- .name = "foo",
- },
+ .owner = THIS_MODULE,
+ .name = "Foo version 2.3 driver",
+ .flags = I2C_DF_NOTIFY,
.attach_adapter = &foo_attach_adapter,
.detach_client = &foo_detach_client,
.command = &foo_command /* may be NULL */
@@ -36,6 +36,10 @@ static struct i2c_driver foo_driver = {
The name field must match the driver name, including the case. It must not
contain spaces, and may be up to 31 characters long.
+Don't worry about the flags field; just put I2C_DF_NOTIFY into it. This
+means that your driver will be notified when new adapters are found.
+This is almost always what you want.
+
All other fields are for call-back functions which will be explained
below.
@@ -492,13 +496,17 @@ Note that some functions are marked by `__init', and some data structures
by `__init_data'. Hose functions and structures can be removed after
kernel booting (or module loading) is completed.
-
Command function
================
A generic ioctl-like function call back is supported. You will seldom
-need this, and its use is deprecated anyway, so newer design should not
-use it. Set it to NULL.
+need this. You may even set it to NULL.
+
+ /* No commands defined */
+ int foo_command(struct i2c_client *client, unsigned int cmd, void *arg)
+ {
+ return 0;
+ }
Sending and receiving
diff --git a/trunk/Documentation/kbuild/modules.txt b/trunk/Documentation/kbuild/modules.txt
index 7e77f93634ea..c91caf7eb303 100644
--- a/trunk/Documentation/kbuild/modules.txt
+++ b/trunk/Documentation/kbuild/modules.txt
@@ -18,7 +18,6 @@ In this document you will find information about:
=== 5. Include files
--- 5.1 How to include files from the kernel include dir
--- 5.2 External modules using an include/ dir
- --- 5.3 External modules using several directories
=== 6. Module installation
--- 6.1 INSTALL_MOD_PATH
--- 6.2 INSTALL_MOD_DIR
@@ -39,7 +38,7 @@ included in the kernel tree.
What is covered within this file is mainly information to authors
of modules. The author of an external modules should supply
a makefile that hides most of the complexity so one only has to type
-'make' to build the module. A complete example will be present in
+'make' to buld the module. A complete example will be present in
chapter ¤. Creating a kbuild file for an external module".
@@ -70,7 +69,7 @@ when building an external module.
--- 2.2 Available targets
- $KDIR refers to the path to the kernel source top-level directory
+ $KDIR refers to path to kernel source top-level directory
make -C $KDIR M=`pwd`
Will build the module(s) located in current directory.
@@ -88,11 +87,11 @@ when building an external module.
make -C $KDIR M=$PWD modules_install
Install the external module(s).
Installation default is in /lib/modules//extra,
- but may be prefixed with INSTALL_MOD_PATH - see separate chapter.
+ but may be prefixed with INSTALL_MOD_PATH - see separate chater.
make -C $KDIR M=$PWD clean
Remove all generated files for the module - the kernel
- source directory is not modified.
+ source directory is not moddified.
make -C $KDIR M=`pwd` help
help will list the available target when building external
@@ -100,7 +99,7 @@ when building an external module.
--- 2.3 Available options:
- $KDIR refers to the path to the kernel source top-level directory
+ $KDIR refer to path to kernel src
make -C $KDIR
Used to specify where to find the kernel source.
@@ -207,11 +206,11 @@ following files:
KERNELDIR := /lib/modules/`uname -r`/build
all::
- $(MAKE) -C $(KERNELDIR) M=`pwd` $@
+ $(MAKE) -C $KERNELDIR M=`pwd` $@
# Module specific targets
genbin:
- echo "X" > 8123_bin.o_shipped
+ echo "X" > 8123_bini.o_shipped
endif
@@ -342,52 +341,13 @@ directory and therefore needs to deal with this in their kbuild file.
EXTRA_CFLAGS := -Iinclude
8123-y := 8123_if.o 8123_pci.o 8123_bin.o
- Note that in the assignment there is no space between -I and the path.
- This is a kbuild limitation: there must be no space present.
-
---- 5.3 External modules using several directories
-
- If an external module does not follow the usual kernel style but
- decide to spread files over several directories then kbuild can
- support this too.
-
- Consider the following example:
-
- |
- +- src/complex_main.c
- | +- hal/hardwareif.c
- | +- hal/include/hardwareif.h
- +- include/complex.h
-
- To build a single module named complex.ko we then need the following
- kbuild file:
-
- Kbuild:
- obj-m := complex.o
- complex-y := src/complex_main.o
- complex-y += src/hal/hardwareif.o
-
- EXTRA_CFLAGS := -I$(src)/include
- EXTRA_CFLAGS += -I$(src)src/hal/include
-
-
- kbuild knows how to handle .o files located in another directory -
- although this is NOT reccommended practice. The syntax is to specify
- the directory relative to the directory where the Kbuild file is
- located.
-
- To find the .h files we have to explicitly tell kbuild where to look
- for the .h files. When kbuild executes current directory is always
- the root of the kernel tree (argument to -C) and therefore we have to
- tell kbuild how to find the .h files using absolute paths.
- $(src) will specify the absolute path to the directory where the
- Kbuild file are located when being build as an external module.
- Therefore -I$(src)/ is used to point out the directory of the Kbuild
- file and any additional path are just appended.
+ Note that in the assingment there is no space between -I and the path.
+ This is a kbuild limitation and no space must be present.
+
=== 6. Module installation
-Modules which are included in the kernel are installed in the directory:
+Modules which are included in the kernel is installed in the directory:
/lib/modules/$(KERNELRELEASE)/kernel
@@ -405,7 +365,7 @@ External modules are installed in the directory:
=> Install dir: /frodo/lib/modules/$(KERNELRELEASE)/kernel
INSTALL_MOD_PATH may be set as an ordinary shell variable or as in the
- example above be specified on the command line when calling make.
+ example above be specified on the commandline when calling make.
INSTALL_MOD_PATH has effect both when installing modules included in
the kernel as well as when installing external modules.
@@ -424,7 +384,7 @@ External modules are installed in the directory:
=== 7. Module versioning
-Module versioning is enabled by the CONFIG_MODVERSIONS tag.
+Module versioning are enabled by the CONFIG_MODVERSIONS tag.
Module versioning is used as a simple ABI consistency check. The Module
versioning creates a CRC value of the full prototype for an exported symbol and
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index acb010bb087b..5dffcfefc3c7 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -633,14 +633,6 @@ running once the system is up.
inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver
Format:
- combined_mode= [HW] control which driver uses IDE ports in combined
- mode: legacy IDE driver, libata, or both
- (in the libata case, libata.atapi_enabled=1 may be
- useful as well). Note that using the ide or libata
- options may affect your device naming (e.g. by
- changing hdc to sdb).
- Format: combined (default), ide, or libata
-
inttest= [IA64]
io7= [HW] IO7 for Marvel based alpha systems
@@ -910,14 +902,6 @@ running once the system is up.
nfsroot= [NFS] nfs root filesystem for disk-less boxes.
See Documentation/nfsroot.txt.
- nfs.callback_tcpport=
- [NFS] set the TCP port on which the NFSv4 callback
- channel should listen.
-
- nfs.idmap_cache_timeout=
- [NFS] set the maximum lifetime for idmapper cache
- entries.
-
nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels
no387 [BUGS=IA-32] Tells the kernel to use the 387 maths
@@ -1176,10 +1160,6 @@ running once the system is up.
Limit processor to maximum C-state
max_cstate=9 overrides any DMI blacklist limit.
- processor.nocst [HW,ACPI]
- Ignore the _CST method to determine C-states,
- instead using the legacy FADT method
-
prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
before loading.
See Documentation/ramdisk.txt.
diff --git a/trunk/Documentation/keys.txt b/trunk/Documentation/keys.txt
index 6304db59bfe4..31154882000a 100644
--- a/trunk/Documentation/keys.txt
+++ b/trunk/Documentation/keys.txt
@@ -860,6 +860,24 @@ The structure has a number of fields, some of which are mandatory:
It is safe to sleep in this method.
+ (*) int (*duplicate)(struct key *key, const struct key *source);
+
+ If this type of key can be duplicated, then this method should be
+ provided. It is called to copy the payload attached to the source into the
+ new key. The data length on the new key will have been updated and the
+ quota adjusted already.
+
+ This method will be called with the source key's semaphore read-locked to
+ prevent its payload from being changed, thus RCU constraints need not be
+ applied to the source key.
+
+ This method does not have to lock the destination key in order to attach a
+ payload. The fact that KEY_FLAG_INSTANTIATED is not set in key->flags
+ prevents anything else from gaining access to the key.
+
+ It is safe to sleep in this method.
+
+
(*) int (*update)(struct key *key, const void *data, size_t datalen);
If this type of key can be updated, then this method should be provided.
diff --git a/trunk/Documentation/md.txt b/trunk/Documentation/md.txt
index 03a13c462cf2..23e6cce40f9c 100644
--- a/trunk/Documentation/md.txt
+++ b/trunk/Documentation/md.txt
@@ -51,30 +51,6 @@ superblock can be autodetected and run at boot time.
The kernel parameter "raid=partitionable" (or "raid=part") means
that all auto-detected arrays are assembled as partitionable.
-Boot time assembly of degraded/dirty arrays
--------------------------------------------
-
-If a raid5 or raid6 array is both dirty and degraded, it could have
-undetectable data corruption. This is because the fact that it is
-'dirty' means that the parity cannot be trusted, and the fact that it
-is degraded means that some datablocks are missing and cannot reliably
-be reconstructed (due to no parity).
-
-For this reason, md will normally refuse to start such an array. This
-requires the sysadmin to take action to explicitly start the array
-desipite possible corruption. This is normally done with
- mdadm --assemble --force ....
-
-This option is not really available if the array has the root
-filesystem on it. In order to support this booting from such an
-array, md supports a module parameter "start_dirty_degraded" which,
-when set to 1, bypassed the checks and will allows dirty degraded
-arrays to be started.
-
-So, to boot with a root filesystem of a dirty degraded raid[56], use
-
- md-mod.start_dirty_degraded=1
-
Superblock formats
------------------
@@ -165,70 +141,6 @@ All md devices contain:
in a fully functional array. If this is not yet known, the file
will be empty. If an array is being resized (not currently
possible) this will contain the larger of the old and new sizes.
- Some raid level (RAID1) allow this value to be set while the
- array is active. This will reconfigure the array. Otherwise
- it can only be set while assembling an array.
-
- chunk_size
- This is the size if bytes for 'chunks' and is only relevant to
- raid levels that involve striping (1,4,5,6,10). The address space
- of the array is conceptually divided into chunks and consecutive
- chunks are striped onto neighbouring devices.
- The size should be atleast PAGE_SIZE (4k) and should be a power
- of 2. This can only be set while assembling an array
-
- component_size
- For arrays with data redundancy (i.e. not raid0, linear, faulty,
- multipath), all components must be the same size - or at least
- there must a size that they all provide space for. This is a key
- part or the geometry of the array. It is measured in sectors
- and can be read from here. Writing to this value may resize
- the array if the personality supports it (raid1, raid5, raid6),
- and if the component drives are large enough.
-
- metadata_version
- This indicates the format that is being used to record metadata
- about the array. It can be 0.90 (traditional format), 1.0, 1.1,
- 1.2 (newer format in varying locations) or "none" indicating that
- the kernel isn't managing metadata at all.
-
- level
- The raid 'level' for this array. The name will often (but not
- always) be the same as the name of the module that implements the
- level. To be auto-loaded the module must have an alias
- md-$LEVEL e.g. md-raid5
- This can be written only while the array is being assembled, not
- after it is started.
-
- new_dev
- This file can be written but not read. The value written should
- be a block device number as major:minor. e.g. 8:0
- This will cause that device to be attached to the array, if it is
- available. It will then appear at md/dev-XXX (depending on the
- name of the device) and further configuration is then possible.
-
- sync_speed_min
- sync_speed_max
- This are similar to /proc/sys/dev/raid/speed_limit_{min,max}
- however they only apply to the particular array.
- If no value has been written to these, of if the word 'system'
- is written, then the system-wide value is used. If a value,
- in kibibytes-per-second is written, then it is used.
- When the files are read, they show the currently active value
- followed by "(local)" or "(system)" depending on whether it is
- a locally set or system-wide value.
-
- sync_completed
- This shows the number of sectors that have been completed of
- whatever the current sync_action is, followed by the number of
- sectors in total that could need to be processed. The two
- numbers are separated by a '/' thus effectively showing one
- value, a fraction of the process that is complete.
-
- sync_speed
- This shows the current actual speed, in K/sec, of the current
- sync_action. It is averaged over the last 30 seconds.
-
As component devices are added to an md array, they appear in the 'md'
directory as new directories named
@@ -255,38 +167,6 @@ Each directory contains:
of being recoverred to
This list make grow in future.
- errors
- An approximate count of read errors that have been detected on
- this device but have not caused the device to be evicted from
- the array (either because they were corrected or because they
- happened while the array was read-only). When using version-1
- metadata, this value persists across restarts of the array.
-
- This value can be written while assembling an array thus
- providing an ongoing count for arrays with metadata managed by
- userspace.
-
- slot
- This gives the role that the device has in the array. It will
- either be 'none' if the device is not active in the array
- (i.e. is a spare or has failed) or an integer less than the
- 'raid_disks' number for the array indicating which possition
- it currently fills. This can only be set while assembling an
- array. A device for which this is set is assumed to be working.
-
- offset
- This gives the location in the device (in sectors from the
- start) where data from the array will be stored. Any part of
- the device before this offset us not touched, unless it is
- used for storing metadata (Formats 1.1 and 1.2).
-
- size
- The amount of the device, after the offset, that can be used
- for storage of data. This will normally be the same as the
- component_size. This can be written while assembling an
- array. If a value less than the current component_size is
- written, component_size will be reduced to this value.
-
An active md device will also contain and entry for each active device
in the array. These are named
diff --git a/trunk/Documentation/networking/gianfar.txt b/trunk/Documentation/networking/gianfar.txt
deleted file mode 100644
index ad474ea07d07..000000000000
--- a/trunk/Documentation/networking/gianfar.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-The Gianfar Ethernet Driver
-Sysfs File description
-
-Author: Andy Fleming
-Updated: 2005-07-28
-
-SYSFS
-
-Several of the features of the gianfar driver are controlled
-through sysfs files. These are:
-
-bd_stash:
-To stash RX Buffer Descriptors in the L2, echo 'on' or '1' to
-bd_stash, echo 'off' or '0' to disable
-
-rx_stash_len:
-To stash the first n bytes of the packet in L2, echo the number
-of bytes to buf_stash_len. echo 0 to disable.
-
-WARNING: You could really screw these up if you set them too low or high!
-fifo_threshold:
-To change the number of bytes the controller needs in the
-fifo before it starts transmission, echo the number of bytes to
-fifo_thresh. Range should be 0-511.
-
-fifo_starve:
-When the FIFO has less than this many bytes during a transmit, it
-enters starve mode, and increases the priority of TX memory
-transactions. To change, echo the number of bytes to
-fifo_starve. Range should be 0-511.
-
-fifo_starve_off:
-Once in starve mode, the FIFO remains there until it has this
-many bytes. To change, echo the number of bytes to
-fifo_starve_off. Range should be 0-511.
-
-CHECKSUM OFFLOADING
-
-The eTSEC controller (first included in parts from late 2005 like
-the 8548) has the ability to perform TCP, UDP, and IP checksums
-in hardware. The Linux kernel only offloads the TCP and UDP
-checksums (and always performs the pseudo header checksums), so
-the driver only supports checksumming for TCP/IP and UDP/IP
-packets. Use ethtool to enable or disable this feature for RX
-and TX.
-
-VLAN
-
-In order to use VLAN, please consult Linux documentation on
-configuring VLANs. The gianfar driver supports hardware insertion and
-extraction of VLAN headers, but not filtering. Filtering will be
-done by the kernel.
-
-MULTICASTING
-
-The gianfar driver supports using the group hash table on the
-TSEC (and the extended hash table on the eTSEC) for multicast
-filtering. On the eTSEC, the exact-match MAC registers are used
-before the hash tables. See Linux documentation on how to join
-multicast groups.
-
-PADDING
-
-The gianfar driver supports padding received frames with 2 bytes
-to align the IP header to a 16-byte boundary, when supported by
-hardware.
-
-ETHTOOL
-
-The gianfar driver supports the use of ethtool for many
-configuration options. You must run ethtool only on currently
-open interfaces. See ethtool documentation for details.
diff --git a/trunk/Documentation/networking/ip-sysctl.txt b/trunk/Documentation/networking/ip-sysctl.txt
index 2b7cf19a06ad..ebc09a159f62 100644
--- a/trunk/Documentation/networking/ip-sysctl.txt
+++ b/trunk/Documentation/networking/ip-sysctl.txt
@@ -46,29 +46,6 @@ ipfrag_secret_interval - INTEGER
for the hash secret) for IP fragments.
Default: 600
-ipfrag_max_dist - INTEGER
- ipfrag_max_dist is a non-negative integer value which defines the
- maximum "disorder" which is allowed among fragments which share a
- common IP source address. Note that reordering of packets is
- not unusual, but if a large number of fragments arrive from a source
- IP address while a particular fragment queue remains incomplete, it
- probably indicates that one or more fragments belonging to that queue
- have been lost. When ipfrag_max_dist is positive, an additional check
- is done on fragments before they are added to a reassembly queue - if
- ipfrag_max_dist (or more) fragments have arrived from a particular IP
- address between additions to any IP fragment queue using that source
- address, it's presumed that one or more fragments in the queue are
- lost. The existing fragment queue will be dropped, and a new one
- started. An ipfrag_max_dist value of zero disables this check.
-
- Using a very small value, e.g. 1 or 2, for ipfrag_max_dist can
- result in unnecessarily dropping fragment queues when normal
- reordering of packets occurs, which could lead to poor application
- performance. Using a very large value, e.g. 50000, increases the
- likelihood of incorrectly reassembling IP fragments that originate
- from different IP datagrams, which could result in data corruption.
- Default: 64
-
INET peer storage:
inet_peer_threshold - INTEGER
diff --git a/trunk/Documentation/pcmcia/driver-changes.txt b/trunk/Documentation/pcmcia/driver-changes.txt
index 97420f08c786..403e7b4dcdd4 100644
--- a/trunk/Documentation/pcmcia/driver-changes.txt
+++ b/trunk/Documentation/pcmcia/driver-changes.txt
@@ -1,16 +1,5 @@
This file details changes in 2.6 which affect PCMCIA card driver authors:
-* Unify detach and REMOVAL event code, as well as attach and INSERTION
- code (as of 2.6.16)
- void (*remove) (struct pcmcia_device *dev);
- int (*probe) (struct pcmcia_device *dev);
-
-* Move suspend, resume and reset out of event handler (as of 2.6.16)
- int (*suspend) (struct pcmcia_device *dev);
- int (*resume) (struct pcmcia_device *dev);
- should be initialized in struct pcmcia_driver, and handle
- (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events
-
* event handler initialization in struct pcmcia_driver (as of 2.6.13)
The event handler is notified of all events, and must be initialized
as the event() callback in the driver's struct pcmcia_driver.
diff --git a/trunk/Documentation/pm.txt b/trunk/Documentation/pm.txt
index 79c0f32a760e..2ea1149bf6b0 100644
--- a/trunk/Documentation/pm.txt
+++ b/trunk/Documentation/pm.txt
@@ -218,7 +218,7 @@ proceed in the opposite direction.
Q: Who do I contact for additional information about
enabling power management for my specific driver/device?
-ACPI Development mailing list: linux-acpi@vger.kernel.org
+ACPI Development mailing list: acpi-devel@lists.sourceforge.net
System Interface -- OBSOLETE, DO NOT USE!
----------------*************************
diff --git a/trunk/Documentation/power/interface.txt b/trunk/Documentation/power/interface.txt
index bd4ffb5bd49a..f5ebda5f4276 100644
--- a/trunk/Documentation/power/interface.txt
+++ b/trunk/Documentation/power/interface.txt
@@ -41,14 +41,3 @@ to. Writing to this file will accept one of
It will only change to 'firmware' or 'platform' if the system supports
it.
-/sys/power/image_size controls the size of the image created by
-the suspend-to-disk mechanism. It can be written a string
-representing a non-negative integer that will be used as an upper
-limit of the image size, in megabytes. The suspend-to-disk mechanism will
-do its best to ensure the image size will not exceed that number. However,
-if this turns out to be impossible, it will try to suspend anyway using the
-smallest image possible. In particular, if "0" is written to this file, the
-suspend image will be as small as possible.
-
-Reading from this file will display the current image size limit, which
-is set to 500 MB by default.
diff --git a/trunk/Documentation/power/swsusp.txt b/trunk/Documentation/power/swsusp.txt
index cd0fcd89a6f0..b0d50840788e 100644
--- a/trunk/Documentation/power/swsusp.txt
+++ b/trunk/Documentation/power/swsusp.txt
@@ -27,11 +27,6 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state
echo platform > /sys/power/disk; echo disk > /sys/power/state
-If you want to limit the suspend image size to N megabytes, do
-
-echo N > /sys/power/image_size
-
-before suspend (it is limited to 500 MB by default).
Encrypted suspend image:
------------------------
diff --git a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
index 67a11a36270c..e75d7474322c 100644
--- a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
+++ b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
@@ -115,7 +115,7 @@ Current PPC64 Linux EEH Implementation
At this time, a generic EEH recovery mechanism has been implemented,
so that individual device drivers do not need to be modified to support
EEH recovery. This generic mechanism piggy-backs on the PCI hotplug
-infrastructure, and percolates events up through the userspace/udev
+infrastructure, and percolates events up through the hotplug/udev
infrastructure. Followiing is a detailed description of how this is
accomplished.
@@ -172,7 +172,7 @@ A handler for the EEH notifier_block events is implemented in
drivers/pci/hotplug/pSeries_pci.c, called handle_eeh_events().
It saves the device BAR's and then calls rpaphp_unconfig_pci_adapter().
This last call causes the device driver for the card to be stopped,
-which causes uevents to go out to user space. This triggers
+which causes hotplug events to go out to user space. This triggers
user-space scripts that might issue commands such as "ifdown eth0"
for ethernet cards, and so on. This handler then sleeps for 5 seconds,
hoping to give the user-space scripts enough time to complete.
@@ -258,30 +258,29 @@ rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c
calls
pci_destroy_dev (struct pci_dev *) {
calls
- device_unregister (&dev->dev) { // in /drivers/base/core.c
+ device_unregister (&dev->dev) { // in /drivers/base/core.c
calls
- device_del(struct device * dev) { // in /drivers/base/core.c
+ device_del(struct device * dev) { // in /drivers/base/core.c
calls
- kobject_del() { //in /libs/kobject.c
+ kobject_del() { //in /libs/kobject.c
calls
- kobject_uevent() { // in /libs/kobject.c
+ kobject_hotplug() { // in /libs/kobject.c
calls
- kset_uevent() { // in /lib/kobject.c
+ kset_hotplug() { // in /lib/kobject.c
calls
- kset->uevent_ops->uevent() // which is really just
+ kset->hotplug_ops->hotplug() which is really just
a call to
- dev_uevent() { // in /drivers/base/core.c
+ dev_hotplug() { // in /drivers/base/core.c
calls
- dev->bus->uevent() which is really just a call to
- pci_uevent () { // in drivers/pci/hotplug.c
+ dev->bus->hotplug() which is really just a call to
+ pci_hotplug () { // in drivers/pci/hotplug.c
which prints device name, etc....
}
}
- then kobject_uevent() sends a netlink uevent to userspace
- --> userspace uevent
- (during early boot, nobody listens to netlink events and
- kobject_uevent() executes uevent_helper[], which runs the
- event process /sbin/hotplug)
+ then kset_hotplug() calls
+ call_usermodehelper () with
+ argv[0]=hotplug_path[] which is "/sbin/hotplug"
+ --> event to userspace,
}
}
kobject_del() then calls sysfs_remove_dir(), which would
diff --git a/trunk/Documentation/scsi/ChangeLog.megaraid b/trunk/Documentation/scsi/ChangeLog.megaraid
index 09f6300eda4b..5331d91432c7 100644
--- a/trunk/Documentation/scsi/ChangeLog.megaraid
+++ b/trunk/Documentation/scsi/ChangeLog.megaraid
@@ -1,38 +1,3 @@
-Release Date : Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju
-Current Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
-Older Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
-
-1. Sorted out PCI IDs to remove megaraid support overlaps.
- Based on the patch from Daniel, sorted out PCI IDs along with
- charactor node name change from 'megadev' to 'megadev_legacy' to avoid
- conflict.
- ---
- Hopefully we'll be getting the build restriction zapped much sooner,
- but we should also be thinking about totally removing the hardware
- support overlap in the megaraid drivers.
-
- This patch pencils in a date of Feb 06 for this, and performs some
- printk abuse in hope that existing legacy users might pick up on what's
- going on.
-
- Signed-off-by: Daniel Drake
- ---
-
-2. Fixed a issue: megaraid always fails to reset handler.
- ---
- I found that the megaraid driver always fails to reset the
- adapter with the following message:
- megaraid: resetting the host...
- megaraid mbox: reset sequence completed successfully
- megaraid: fast sync command timed out
- megaraid: reservation reset failed
- when the "Cluster mode" of the adapter BIOS is enabled.
- So, whenever the reset occurs, the adapter goes to
- offline and just become unavailable.
-
- Jun'ichi Nomura [mailto:jnomura@mtc.biglobe.ne.jp]
- ---
-
Release Date : Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju
Current Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
diff --git a/trunk/Documentation/scsi/scsi_mid_low_api.txt b/trunk/Documentation/scsi/scsi_mid_low_api.txt
index 8bbae3e1abdf..66565d42288f 100644
--- a/trunk/Documentation/scsi/scsi_mid_low_api.txt
+++ b/trunk/Documentation/scsi/scsi_mid_low_api.txt
@@ -150,8 +150,7 @@ scsi devices of which only the first 2 respond:
LLD mid level LLD
===-------------------=========--------------------===------
scsi_host_alloc() -->
-scsi_add_host() ---->
-scsi_scan_host() -------+
+scsi_add_host() --------+
|
slave_alloc()
slave_configure() --> scsi_adjust_queue_depth()
@@ -197,7 +196,7 @@ of the issues involved. See the section on reference counting below.
The hotplug concept may be extended to SCSI devices. Currently, when an
-HBA is added, the scsi_scan_host() function causes a scan for SCSI devices
+HBA is added, the scsi_add_host() function causes a scan for SCSI devices
attached to the HBA's SCSI transport. On newer SCSI transports the HBA
may become aware of a new SCSI device _after_ the scan has completed.
An LLD can use this sequence to make the mid level aware of a SCSI device:
@@ -373,7 +372,7 @@ names all start with "scsi_".
Summary:
scsi_activate_tcq - turn on tag command queueing
scsi_add_device - creates new scsi device (lu) instance
- scsi_add_host - perform sysfs registration and set up transport class
+ scsi_add_host - perform sysfs registration and SCSI bus scan.
scsi_adjust_queue_depth - change the queue depth on a SCSI device
scsi_assign_lock - replace default host_lock with given lock
scsi_bios_ptable - return copy of block device's partition table
@@ -387,7 +386,6 @@ Summary:
scsi_remove_device - detach and remove a SCSI device
scsi_remove_host - detach and remove all SCSI devices owned by host
scsi_report_bus_reset - report scsi _bus_ reset observed
- scsi_scan_host - scan SCSI bus
scsi_track_queue_full - track successive QUEUE_FULL events
scsi_unblock_requests - allow further commands to be queued to given host
scsi_unregister - [calls scsi_host_put()]
@@ -427,10 +425,10 @@ void scsi_activate_tcq(struct scsi_device *sdev, int depth)
* Might block: yes
*
* Notes: This call is usually performed internally during a scsi
- * bus scan when an HBA is added (i.e. scsi_scan_host()). So it
+ * bus scan when an HBA is added (i.e. scsi_add_host()). So it
* should only be called if the HBA becomes aware of a new scsi
- * device (lu) after scsi_scan_host() has completed. If successful
- * this call can lead to slave_alloc() and slave_configure() callbacks
+ * device (lu) after scsi_add_host() has completed. If successful
+ * this call we lead to slave_alloc() and slave_configure() callbacks
* into the LLD.
*
* Defined in: drivers/scsi/scsi_scan.c
@@ -441,7 +439,7 @@ struct scsi_device * scsi_add_device(struct Scsi_Host *shost,
/**
- * scsi_add_host - perform sysfs registration and set up transport class
+ * scsi_add_host - perform sysfs registration and SCSI bus scan.
* @shost: pointer to scsi host instance
* @dev: pointer to struct device of type scsi class
*
@@ -450,11 +448,7 @@ struct scsi_device * scsi_add_device(struct Scsi_Host *shost,
* Might block: no
*
* Notes: Only required in "hotplug initialization model" after a
- * successful call to scsi_host_alloc(). This function does not
- * scan the bus; this can be done by calling scsi_scan_host() or
- * in some other transport-specific way. The LLD must set up
- * the transport template before calling this function and may only
- * access the transport class data after this function has been called.
+ * successful call to scsi_host_alloc().
*
* Defined in: drivers/scsi/hosts.c
**/
@@ -565,7 +559,7 @@ void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
* area for the LLD's exclusive use.
* Both associated refcounting objects have their refcount set to 1.
* Full registration (in sysfs) and a bus scan are performed later when
- * scsi_add_host() and scsi_scan_host() are called.
+ * scsi_add_host() is called.
*
* Defined in: drivers/scsi/hosts.c .
**/
@@ -704,19 +698,6 @@ int scsi_remove_host(struct Scsi_Host *shost)
void scsi_report_bus_reset(struct Scsi_Host * shost, int channel)
-/**
- * scsi_scan_host - scan SCSI bus
- * @shost: a pointer to a scsi host instance
- *
- * Might block: yes
- *
- * Notes: Should be called after scsi_add_host()
- *
- * Defined in: drivers/scsi/scsi_scan.c
- **/
-void scsi_scan_host(struct Scsi_Host *shost)
-
-
/**
* scsi_track_queue_full - track successive QUEUE_FULL events on given
* device to determine if and when there is a need
@@ -1452,7 +1433,7 @@ The following people have contributed to this document:
Christoph Hellwig
Doug Ledford
Andries Brouwer
- Randy Dunlap
+ Randy Dunlap
Alan Stern
diff --git a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
index d2578013e829..2f27f391c7cc 100644
--- a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -105,7 +105,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Each of top level sound card module takes the following options.
index - index (slot #) of sound card
- - Values: 0 through 31 or negative
+ - Values: 0 through 7 or negative
- If nonnegative, assign that index number
- if negative, interpret as a bitmask of permissible
indices; the first free permitted index is assigned
@@ -134,7 +134,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - second DMA # for AD1816A chip (PnP setup)
clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz)
- This module supports multiple cards, autoprobe and PnP.
+ Module supports up to 8 cards, autoprobe and PnP.
Module snd-ad1848
-----------------
@@ -145,11 +145,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # for AD1848 chip
dma1 - DMA # for AD1848 chip (0,1,3)
- This module supports multiple cards. It does not support autoprobe
+ Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
- The power-management is supported.
-
Module snd-ad1889
-----------------
@@ -158,7 +156,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
ac97_quirk - AC'97 workaround for strange hardware
See the description of intel8x0 module for details.
- This module supports multiple cards.
+ This module supports up to 8 cards.
Module snd-ali5451
------------------
@@ -186,9 +184,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 (PnP setup)
fm_port - port # for OPL3 FM (PnP setup)
- This module supports multiple cards, autoprobe and PnP.
-
- The power-management is supported.
+ Module supports up to 8 cards, autoprobe and PnP.
Module snd-als4000
------------------
@@ -198,9 +194,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
joystick_port - port # for legacy joystick support.
0 = disabled (default), 1 = auto-detect
- This module supports multiple cards, autoprobe and PnP.
-
- The power-management is supported.
+ Module supports up to 8 cards, autoprobe and PnP.
Module snd-atiixp
-----------------
@@ -219,8 +213,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
implementation depends on the motherboard, and you'll need to
choose the correct one via spdif_aclink module option.
- The power-management is supported.
-
Module snd-atiixp-modem
-----------------------
@@ -231,8 +223,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note: The default index value of this module is -2, i.e. the first
slot is excluded.
- The power-management is supported.
-
Module snd-au8810, snd-au8820, snd-au8830
-----------------------------------------
@@ -273,10 +263,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma1 - 1st DMA # for AZT2320 (WSS) chip (PnP setup)
dma2 - 2nd DMA # for AZT2320 (WSS) chip (PnP setup)
- This module supports multiple cards, PnP and autoprobe.
+ Module supports up to 8 cards, PnP and autoprobe.
- The power-management is supported.
-
Module snd-azt3328
------------------
@@ -284,7 +272,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
joystick - Enable joystick (default off)
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-bt87x
----------------
@@ -294,7 +282,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
digital_rate - Override the default digital rate (Hz)
load_all - Load the driver even if the card model isn't known
- This module supports multiple cards.
+ Module supports up to 8 cards.
Note: The default index value of this module is -2, i.e. the first
slot is excluded.
@@ -304,7 +292,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Creative Audigy LS and SB Live 24bit
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-cmi8330
@@ -320,9 +308,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
sbdma8 - 8bit DMA # for CMI8330 chip (SB16)
sbdma16 - 16bit DMA # for CMI8330 chip (SB16)
- This module supports multiple cards and autoprobe.
-
- The power-management is supported.
+ Module supports up to 8 cards and autoprobe.
Module snd-cmipci
-----------------
@@ -335,10 +321,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
(default = 1)
joystick_port - Joystick port address (0 = disable, 1 = auto-detect)
- This module supports autoprobe and multiple cards.
+ Module supports autoprobe and multiple chips (max 8).
- The power-management is supported.
-
Module snd-cs4231
-----------------
@@ -351,7 +335,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma1 - first DMA # for CS4231 chip
dma2 - second DMA # for CS4231 chip
- This module supports multiple cards. This module does not support autoprobe
+ Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
The power-management is supported.
@@ -371,7 +355,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards. This module does not support autoprobe
+ Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
The power-management is supported.
@@ -392,7 +376,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - second DMA # for CS4236 chip (0,1,3), -1 = disable
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards. This module does not support autoprobe
+ Module supports up to 8 cards. This module does not support autoprobe
(if ISA PnP is not used) thus main port and control port must be
specified!!! Other ports are optional.
@@ -405,7 +389,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dual_codec - Secondary codec ID (0 = disable, default)
- This module supports multiple cards.
+ Module supports up to 8 cards.
The power-management is supported.
@@ -419,20 +403,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
thinkpad - Force to enable Thinkpad's CLKRUN control.
mmap_valid - Support OSS mmap mode (default = 0).
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Usually external amp and CLKRUN controls are detected automatically
from PCI sub vendor/device ids. If they don't work, give the options
above explicitly.
The power-management is supported.
- Module snd-cs5535audio
- ----------------------
-
- Module for multifunction CS5535 companion PCI device
-
- This module supports multiple cards.
-
Module snd-dt019x
-----------------
@@ -446,11 +423,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 (PnP setup)
dma8 - DMA # (PnP setup)
- This module supports multiple cards. This module is enabled only with
+ Module supports up to 8 cards. This module is enabled only with
ISA PnP support.
- The power-management is supported.
-
Module snd-dummy
----------------
@@ -458,8 +433,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
or input, but you may use this module for any application which
requires a sound card (like RealPlayer).
- The power-management is supported.
-
Module snd-emu10k1
------------------
@@ -477,7 +450,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
given in MB unit. Default value is 128.
enable_ir - enable IR
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Input & Output configurations [extin/extout]
* Creative Card wo/Digital out [0x0003/0x1f03]
@@ -493,14 +466,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
* Creative Card 5.1 (c) 2003 [0x3fc3/0x7cff]
* Creative Card all ins and outs [0x3fff/0x7fff]
- The power-management is supported.
-
Module snd-emu10k1x
-------------------
Module for Creative Emu10k1X (SB Live Dell OEM version)
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-ens1370
------------------
@@ -511,7 +482,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
joystick - Enable joystick (default off)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Module snd-ens1371
------------------
@@ -524,7 +495,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
joystick_port - port # for joystick (0x200,0x208,0x210,0x218),
0 = disable (default), 1 = auto-detect
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Module snd-es968
----------------
@@ -535,10 +506,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # for ES968 (SB8) chip (PnP setup)
dma1 - DMA # for ES968 (SB8) chip (PnP setup)
- This module supports multiple cards, PnP and autoprobe.
+ Module supports up to 8 cards, PnP and autoprobe.
- The power-management is supported.
-
Module snd-es1688
-----------------
@@ -550,7 +519,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 port (5,7,9,10)
dma8 - DMA # for ES-1688 chip (0,1,3)
- This module supports multiple cards and autoprobe (without MPU-401 port).
+ Module supports up to 8 cards and autoprobe (without MPU-401 port).
Module snd-es18xx
-----------------
@@ -565,8 +534,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - first DMA # for ES-18xx chip (0,1,3)
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards, ISA PnP and autoprobe (without MPU-401
- port if native ISA PnP routines are not used).
+ Module supports up to 8 cards ISA PnP and autoprobe (without MPU-401 port
+ if native ISA PnP routines are not used).
When dma2 is equal with dma1, the driver works as half-duplex.
The power-management is supported.
@@ -576,9 +545,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on ESS Solo-1 (ES1938,ES1946) chips.
- This module supports multiple cards and autoprobe.
-
- The power-management is supported.
+ Module supports up to 8 cards and autoprobe.
Module snd-es1968
-----------------
@@ -594,7 +561,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
enable_mpu - enable MPU401 (0 = off, 1 = on, 2 = auto (default))
joystick - enable joystick (default off)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
The power-management is supported.
@@ -610,10 +577,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
- High 16-bits are video (radio) device number + 1
- example: 0x10002 (MediaForte 256-PCPR, device 1)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
- The power-management is supported.
-
Module snd-gusclassic
---------------------
@@ -627,7 +592,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Module snd-gusextreme
---------------------
@@ -646,7 +611,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
- This module supports multiple cards and autoprobe (without MPU-401 port).
+ Module supports up to 8 cards and autoprobe (without MPU-401 port).
Module snd-gusmax
-----------------
@@ -661,7 +626,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Module snd-hda-intel
--------------------
@@ -723,14 +688,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
(Usually SD_LPLIB register is more accurate than the
position buffer.)
- The power-management is supported.
-
Module snd-hdsp
---------------
Module for RME Hammerfall DSP audio interface(s)
- This module supports multiple cards.
+ Module supports up to 8 cards.
Note: The firmware data can be automatically loaded via hotplug
when CONFIG_FW_LOADER is set. Otherwise, you need to load
@@ -788,7 +751,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever)
in msec resolution, default value is 500 (0.5 sec)
- This module supports multiple cards and autoprobe. Note: The consumer part
+ Module supports up to 8 cards and autoprobe. Note: The consumer part
is not used with all Envy24 based cards (for example in the MidiMan Delta
serie).
@@ -824,7 +787,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
aureon71, universe, k8x800, phase22, phase28, ms300,
av710
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Note: The supported board is detected by reading EEPROM or PCI
SSID (if EEPROM isn't available). You can override the
@@ -876,8 +839,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note: The default index value of this module is -2, i.e. the first
slot is excluded.
- The power-management is supported.
-
Module snd-interwave
--------------------
@@ -894,7 +855,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
effect - 1 = InterWave effects enable (default 0);
requires 8 voices
- This module supports multiple cards, autoprobe and ISA PnP.
+ Module supports up to 8 cards, autoprobe and ISA PnP.
Module snd-interwave-stb
------------------------
@@ -914,14 +875,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
effect - 1 = InterWave effects enable (default 0);
requires 8 voices
- This module supports multiple cards, autoprobe and ISA PnP.
+ Module supports up to 8 cards, autoprobe and ISA PnP.
Module snd-korg1212
-------------------
Module for Korg 1212 IO PCI card
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-maestro3
-------------------
@@ -933,7 +894,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
-1 for default pin (8 for allegro, 1 for
others)
- This module supports autoprobe and multiple chips.
+ Module supports autoprobe and multiple chips (max 8).
Note: the binding of amplifier is dependent on hardware.
If there is no sound even though all channels are unmuted, try to
@@ -948,7 +909,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Digigram miXart8 sound cards.
- This module supports multiple cards.
+ Module supports multiple cards.
Note: One miXart8 board will be represented as 4 alsa cards.
See MIXART.txt for details.
@@ -967,7 +928,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ number or -1 (disable)
pnp - PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple devices and PnP.
+ Module supports multiple devices (max 8) and PnP.
Module snd-mtpav
----------------
@@ -1053,7 +1014,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards and ISA PnP. It does not support
+ Module supports up to 8 cards and ISA PnP. This module does not support
autoprobe (if ISA PnP is not used) thus all ports must be specified!!!
The power-management is supported.
@@ -1103,13 +1064,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This module supports only one card, autoprobe and PnP.
- Module snd-pcxhr
- ----------------
-
- Module for Digigram PCXHR boards
-
- This module supports multiple cards.
-
Module snd-powermac (on ppc only)
---------------------------------
@@ -1130,22 +1084,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
For ARM architecture only.
- The power-management is supported.
-
Module snd-rme32
----------------
Module for RME Digi32, Digi32 Pro and Digi32/8 (Sek'd Prodif32,
Prodif96 and Prodif Gold) sound cards.
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-rme96
----------------
Module for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST sound cards.
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-rme9652
------------------
@@ -1155,7 +1107,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
precise_ptr - Enable precise pointer (doesn't work reliably).
(default = 0)
- This module supports multiple cards.
+ Module supports up to 8 cards.
Note: snd-page-alloc module does the job which snd-hammerfall-mem
module did formerly. It will allocate the buffers in advance
@@ -1172,8 +1124,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module supports only one card.
Module has no enable and index options.
- The power-management is supported.
-
Module snd-sb8
--------------
@@ -1185,10 +1135,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # for SB DSP chip (5,7,9,10)
dma8 - DMA # for SB DSP chip (1,3)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
- The power-management is supported.
-
Module snd-sb16 and snd-sbawe
-----------------------------
@@ -1207,7 +1155,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
csp - ASP/CSP chip support - 0 = disable (default), 1 = enable
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards, autoprobe and ISA PnP.
+ Module supports up to 8 cards, autoprobe and ISA PnP.
Note: To use Vibra16X cards in 16-bit half duplex mode, you must
disable 16bit DMA with dma16 = -1 module parameter.
@@ -1215,8 +1163,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
half duplex mode through 8-bit DMA channel by disabling their
16-bit DMA channel.
- The power-management is supported.
-
Module snd-sgalaxy
------------------
@@ -1227,9 +1173,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # (7,9,10,11)
dma1 - DMA #
- This module supports multiple cards.
-
- The power-management is supported.
+ Module supports up to 8 cards.
Module snd-sscape
-----------------
@@ -1241,7 +1185,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - MPU-401 IRQ # (PnP setup)
dma - DMA # (PnP setup)
- This module supports multiple cards. ISA PnP must be enabled.
+ Module supports up to 8 cards. ISA PnP must be enabled.
You need sscape_ctl tool in alsa-tools package for loading
the microcode.
@@ -1250,21 +1194,21 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for AMD7930 sound chips found on Sparcs.
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-sun-cs4231 (on sparc only)
-------------------------------------
Module for CS4231 sound chips found on Sparcs.
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-sun-dbri (on sparc only)
-----------------------------------
Module for DBRI sound chips found on Sparcs.
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-wavefront
--------------------
@@ -1284,7 +1228,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
dma2 - DMA2 # for CS4232 PCM interface.
isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
- This module supports multiple cards and ISA PnP.
+ Module supports up to 8 cards and ISA PnP.
Module snd-sonicvibes
---------------------
@@ -1296,7 +1240,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
- SoundCard must have onboard SRAM for this.
mge - Mic Gain Enable - 1 = enable, 0 = disable (default)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
Module snd-serial-u16550
------------------------
@@ -1315,7 +1259,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
0 = Soundcanvas, 1 = MS-124T, 2 = MS-124W S/A,
3 = MS-124W M/B, 4 = Generic
- This module supports multiple cards. This module does not support autoprobe
+ Module supports up to 8 cards. This module does not support autoprobe
thus the main port must be specified!!! Other options are optional.
Module snd-trident
@@ -1334,7 +1278,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
pcm_channels - max channels (voices) reserved for PCM
wavetable_size - max wavetable size in kB (4-?kb)
- This module supports multiple cards and autoprobe.
+ Module supports up to 8 cards and autoprobe.
The power-management is supported.
@@ -1346,14 +1290,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
vid - Vendor ID for the device (optional)
pid - Product ID for the device (optional)
- This module supports multiple devices, autoprobe and hotplugging.
+ This module supports up to 8 cards, autoprobe and hotplugging.
Module snd-usb-usx2y
--------------------
Module for Tascam USB US-122, US-224 and US-428 devices.
- This module supports multiple devices, autoprobe and hotplugging.
+ This module supports up to 8 cards, autoprobe and hotplugging.
Note: you need to load the firmware via usx2yloader utility included
in alsa-tools and alsa-firmware packages.
@@ -1412,8 +1356,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note: for the MPU401 on VIA823x, use snd-mpu401 driver
additionally. The mpu_port option is for VIA686 chips only.
- The power-management is supported.
-
Module snd-via82xx-modem
------------------------
@@ -1426,8 +1368,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note: The default index value of this module is -2, i.e. the first
slot is excluded.
- The power-management is supported.
-
Module snd-virmidi
------------------
@@ -1435,9 +1375,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This module creates virtual rawmidi devices which communicate
to the corresponding ALSA sequencer ports.
- midi_devs - MIDI devices # (1-4, default=4)
+ midi_devs - MIDI devices # (1-8, default=4)
- This module supports multiple cards.
+ Module supports up to 8 cards.
Module snd-vx222
----------------
@@ -1447,7 +1387,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mic - Enable Microphone on V222 Mic (NYI)
ibl - Capture IBL size. (default = 0, minimum size)
- This module supports multiple cards.
+ Module supports up to 8 cards.
When the driver is compiled as a module and the hotplug firmware
is supported, the firmware data is loaded via hotplug automatically.
@@ -1466,8 +1406,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
size is chosen. The possible IBL values can be found in
/proc/asound/cardX/vx-status proc file.
- The power-management is supported.
-
Module snd-vxpocket
-------------------
@@ -1475,7 +1413,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
ibl - Capture IBL size. (default = 0, minimum size)
- This module supports multiple cards. The module is compiled only when
+ Module supports up to 8 cards. The module is compiled only when
PCMCIA is supported on kernel.
With the older 2.6.x kernel, to activate the driver via the card
@@ -1496,8 +1434,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note2: snd-vxp440 driver is merged to snd-vxpocket driver since
ALSA 1.0.10.
- The power-management is supported.
-
Module snd-ymfpci
-----------------
@@ -1511,7 +1447,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1 (auto-detect)
rear_switch - enable shared rear/line-in switch (bool)
- This module supports autoprobe and multiple chips.
+ Module supports autoprobe and multiple chips (max 8).
The power-management is supported.
@@ -1522,8 +1458,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Note: the driver is build only when CONFIG_ISA is set.
- The power-management is supported.
-
AC97 Quirk Option
=================
@@ -1540,7 +1474,7 @@ the proper value with this option.
The following strings are accepted:
- default Don't override the default setting
- - none Disable the quirk
+ - disable Disable the quirk
- hp_only Bind Master and Headphone controls as a single control
- swap_hp Swap headphone and master controls
- swap_surround Swap master and surround controls
diff --git a/trunk/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/trunk/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 4963d83d1511..260334c98d95 100644
--- a/trunk/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/trunk/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -18,8 +18,8 @@
- November 17, 2005
- 0.3.6
+ October 6, 2005
+ 0.3.5
@@ -403,8 +403,9 @@
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
/* definition of the chip-specific record */
- struct mychip {
- struct snd_card *card;
+ typedef struct snd_mychip mychip_t;
+ struct snd_mychip {
+ snd_card_t *card;
// rest of implementation will be in the section
// "PCI Resource Managements"
};
@@ -412,7 +413,7 @@
/* chip-specific destructor
* (see "PCI Resource Managements")
*/
- static int snd_mychip_free(struct mychip *chip)
+ static int snd_mychip_free(mychip_t *chip)
{
.... // will be implemented later...
}
@@ -420,21 +421,22 @@
/* component-destructor
* (see "Management of Cards and Components")
*/
- static int snd_mychip_dev_free(struct snd_device *device)
+ static int snd_mychip_dev_free(snd_device_t *device)
{
- return snd_mychip_free(device->device_data);
+ mychip_t *chip = device->device_data;
+ return snd_mychip_free(chip);
}
/* chip-specific constructor
* (see "Management of Cards and Components")
*/
- static int __devinit snd_mychip_create(struct snd_card *card,
+ static int __devinit snd_mychip_create(snd_card_t *card,
struct pci_dev *pci,
- struct mychip **rchip)
+ mychip_t **rchip)
{
- struct mychip *chip;
+ mychip_t *chip;
int err;
- static struct snd_device_ops ops = {
+ static snd_device_ops_t ops = {
.dev_free = snd_mychip_dev_free,
};
@@ -472,8 +474,8 @@
const struct pci_device_id *pci_id)
{
static int dev;
- struct snd_card *card;
- struct mychip *chip;
+ snd_card_t *card;
+ mychip_t *chip;
int err;
/* (1) */
@@ -580,7 +582,7 @@
@@ -603,7 +605,7 @@
@@ -828,7 +830,7 @@
After the card is created, you can attach the components
(devices) to the card instance. On ALSA driver, a component is
- represented as a struct snd_device object.
+ represented as a snd_device_t object.
A component can be a PCM instance, a control interface, a raw
MIDI interface, etc. Each of such instances has one component
entry.
@@ -889,11 +891,14 @@
The chip-specific information, e.g. the i/o port address, its
resource pointer, or the irq number, is stored in the
chip-specific record.
+ Usually, the chip-specific record is typedef'ed as
+ xxx_t like the following:
@@ -913,12 +918,12 @@
- whether struct mychip is the type of the chip record.
+ whether mychip_t is the type of the chip record.
@@ -927,7 +932,7 @@
private_data;
+ mychip_t *chip = (mychip_t *)card->private_data;
]]>
@@ -949,8 +954,8 @@
@@ -995,7 +1000,7 @@
device_data);
+ mychip_t *chip = device->device_data;
+ return snd_mychip_free(chip);
}
]]>
@@ -1081,15 +1087,15 @@
PCI Resource Managements Example
port = pci_resource_start(pci, 0);
if (request_irq(pci->irq, snd_mychip_interrupt,
- SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) {
+ SA_INTERRUPT|SA_SHIRQ, "My Chip",
+ (void *)chip)) {
printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
snd_mychip_free(chip);
return -EBUSY;
@@ -1261,14 +1268,14 @@
Now assume that this PCI device has an I/O port with 8 bytes
- and an interrupt. Then struct mychip will have the
+ and an interrupt. Then mychip_t will have the
following fields:
irq, snd_mychip_interrupt,
- SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) {
+ SA_INTERRUPT|SA_SHIRQ, "My Chip",
+ (void *)chip)) {
printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
snd_mychip_free(chip);
return -EBUSY;
@@ -1364,7 +1372,7 @@
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{
- struct mychip *chip = dev_id;
+ mychip_t *chip = dev_id;
....
return IRQ_HANDLED;
}
@@ -1479,7 +1487,7 @@
iobase_virt)
@@ -1529,7 +1537,7 @@
Registration of Device Struct
At some point, typically after calling snd_device_new(),
- you need to register the struct device of the chip
+ you need to register the struct device of the chip
you're handling for udev and co. ALSA provides a macro for compatibility with
older kernels. Simply call like the following:
@@ -1731,7 +1739,7 @@
....
/* hardware definition */
- static struct snd_pcm_hardware snd_mychip_playback_hw = {
+ static snd_pcm_hardware_t snd_mychip_playback_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1750,7 +1758,7 @@
};
/* hardware definition */
- static struct snd_pcm_hardware snd_mychip_capture_hw = {
+ static snd_pcm_hardware_t snd_mychip_capture_hw = {
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1769,10 +1777,10 @@
};
/* open callback */
- static int snd_mychip_playback_open(struct snd_pcm_substream *substream)
+ static int snd_mychip_playback_open(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
- struct snd_pcm_runtime *runtime = substream->runtime;
+ mychip_t *chip = snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
runtime->hw = snd_mychip_playback_hw;
// more hardware-initialization will be done here
@@ -1780,19 +1788,19 @@
}
/* close callback */
- static int snd_mychip_playback_close(struct snd_pcm_substream *substream)
+ static int snd_mychip_playback_close(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
+ mychip_t *chip = snd_pcm_substream_chip(substream);
// the hardware-specific codes will be here
return 0;
}
/* open callback */
- static int snd_mychip_capture_open(struct snd_pcm_substream *substream)
+ static int snd_mychip_capture_open(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
- struct snd_pcm_runtime *runtime = substream->runtime;
+ mychip_t *chip = snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
runtime->hw = snd_mychip_capture_hw;
// more hardware-initialization will be done here
@@ -1800,33 +1808,33 @@
}
/* close callback */
- static int snd_mychip_capture_close(struct snd_pcm_substream *substream)
+ static int snd_mychip_capture_close(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
+ mychip_t *chip = snd_pcm_substream_chip(substream);
// the hardware-specific codes will be here
return 0;
}
/* hw_params callback */
- static int snd_mychip_pcm_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *hw_params)
+ static int snd_mychip_pcm_hw_params(snd_pcm_substream_t *substream,
+ snd_pcm_hw_params_t * hw_params)
{
return snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
}
/* hw_free callback */
- static int snd_mychip_pcm_hw_free(struct snd_pcm_substream *substream)
+ static int snd_mychip_pcm_hw_free(snd_pcm_substream_t *substream)
{
return snd_pcm_lib_free_pages(substream);
}
/* prepare callback */
- static int snd_mychip_pcm_prepare(struct snd_pcm_substream *substream)
+ static int snd_mychip_pcm_prepare(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
- struct snd_pcm_runtime *runtime = substream->runtime;
+ mychip_t *chip = snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
/* set up the hardware with the current configuration
* for example...
@@ -1841,7 +1849,7 @@
}
/* trigger callback */
- static int snd_mychip_pcm_trigger(struct snd_pcm_substream *substream,
+ static int snd_mychip_pcm_trigger(snd_pcm_substream_t *substream,
int cmd)
{
switch (cmd) {
@@ -1858,9 +1866,9 @@
/* pointer callback */
static snd_pcm_uframes_t
- snd_mychip_pcm_pointer(struct snd_pcm_substream *substream)
+ snd_mychip_pcm_pointer(snd_pcm_substream_t *substream)
{
- struct mychip *chip = snd_pcm_substream_chip(substream);
+ mychip_t *chip = snd_pcm_substream_chip(substream);
unsigned int current_ptr;
/* get the current hardware pointer */
@@ -1869,7 +1877,7 @@
}
/* operators */
- static struct snd_pcm_ops snd_mychip_playback_ops = {
+ static snd_pcm_ops_t snd_mychip_playback_ops = {
.open = snd_mychip_playback_open,
.close = snd_mychip_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1881,7 +1889,7 @@
};
/* operators */
- static struct snd_pcm_ops snd_mychip_capture_ops = {
+ static snd_pcm_ops_t snd_mychip_capture_ops = {
.open = snd_mychip_capture_open,
.close = snd_mychip_capture_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -1897,9 +1905,9 @@
*/
/* create a pcm device */
- static int __devinit snd_mychip_new_pcm(struct mychip *chip)
+ static int __devinit snd_mychip_new_pcm(mychip_t *chip)
{
- struct snd_pcm *pcm;
+ snd_pcm_t *pcm;
int err;
if ((err = snd_pcm_new(chip->card, "My Chip", 0, 1, 1,
@@ -1936,9 +1944,9 @@
card, "My Chip", 0, 1, 1,
@@ -1981,13 +1989,13 @@
specify more numbers, but they must be handled properly in
open/close, etc. callbacks. When you need to know which
substream you are referring to, then it can be obtained from
- struct snd_pcm_substream data passed to each callback
+ snd_pcm_substream_t data passed to each callback
as follows:
number;
]]>
@@ -2016,7 +2024,7 @@
PCM Instance with a Destructor
my_private_pcm_data);
// do what you like else
....
}
- static int __devinit snd_mychip_new_pcm(struct mychip *chip)
+ static int __devinit snd_mychip_new_pcm(mychip_t *chip)
{
- struct snd_pcm *pcm;
+ snd_pcm_t *pcm;
....
/* allocate your own data */
chip->my_private_pcm_data = kmalloc(...);
@@ -2141,7 +2149,7 @@
@@ -2244,7 +2252,7 @@ struct _snd_pcm_runtime {
Hardware Description
- The hardware descriptor (struct snd_pcm_hardware)
+ The hardware descriptor (snd_pcm_hardware_t)
contains the definitions of the fundamental hardware
configuration. Above all, you'll need to define this in
@@ -2259,7 +2267,7 @@ struct _snd_pcm_runtime {
runtime;
+ snd_pcm_runtime_t *runtime = substream->runtime;
...
runtime->hw = snd_mychip_playback_hw; /* common definition */
if (chip->model == VERY_OLD_ONE)
@@ -2274,7 +2282,7 @@ struct _snd_pcm_runtime {
PAUSE bit means that the pcm supports the
pause operation, while the
RESUME bit means that the pcm supports
- the full suspend/resume operation.
- If PAUSE flag is set,
- the trigger callback below
- must handle the corresponding (pause push/release) commands.
- The suspend/resume trigger commands can be defined even without
- RESUME flag. See
- Power Management section for details.
+ the suspend/resume operation. If these flags
+ are set, the trigger callback below
+ must handle the corresponding commands.
@@ -2509,7 +2512,7 @@ struct _snd_pcm_runtime {
Running Status
The running status can be referred via runtime->status.
- This is the pointer to struct snd_pcm_mmap_status
+ This is the pointer to snd_pcm_mmap_status_t
record. For example, you can get the current DMA hardware
pointer via runtime->status->hw_ptr.
@@ -2517,7 +2520,7 @@ struct _snd_pcm_runtime {
The DMA application pointer can be referred via
runtime->control, which points
- struct snd_pcm_mmap_control record.
+ snd_pcm_mmap_control_t record.
However, accessing directly to this value is not recommended.
@@ -2539,9 +2542,9 @@ struct _snd_pcm_runtime {
runtime->private_data = data;
@@ -2583,7 +2586,7 @@ struct _snd_pcm_runtime {
The callback function takes at least the argument with
- snd_pcm_substream pointer. For retrieving the
+ snd_pcm_substream_t pointer. For retrieving the
chip record from the given substream instance, you can use the
following macro.
@@ -2591,7 +2594,7 @@ struct _snd_pcm_runtime {
@@ -2613,7 +2616,7 @@ struct _snd_pcm_runtime {
@@ -2628,10 +2631,10 @@ struct _snd_pcm_runtime {
runtime;
+ mychip_t *chip = snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
runtime->hw = snd_mychip_playback_hw;
return 0;
@@ -2664,7 +2667,7 @@ struct _snd_pcm_runtime {
@@ -2679,7 +2682,7 @@ struct _snd_pcm_runtime {
runtime->private_data);
@@ -2706,8 +2709,8 @@ struct _snd_pcm_runtime {
@@ -2782,7 +2785,7 @@ struct _snd_pcm_runtime {
@@ -2817,7 +2820,7 @@ struct _snd_pcm_runtime {
@@ -2866,7 +2869,7 @@ struct _snd_pcm_runtime {
@@ -2908,8 +2911,8 @@ struct _snd_pcm_runtime {
- When the pcm supports the suspend/resume operation,
- regardless of full or partial suspend/resume support,
+ When the pcm supports the suspend/resume operation
+ (i.e. SNDRV_PCM_INFO_RESUME flag is set),
SUSPEND and RESUME
commands must be handled, too.
These commands are issued when the power-management status is
@@ -2918,8 +2921,6 @@ struct _snd_pcm_runtime {
do suspend and resume of the pcm substream, and usually, they
are identical with STOP and
START commands, respectively.
- See
- Power Management section for details.
@@ -2938,7 +2939,7 @@ struct _snd_pcm_runtime {
@@ -3066,7 +3067,7 @@ struct _snd_pcm_runtime {
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{
- struct mychip *chip = dev_id;
+ mychip_t *chip = dev_id;
spin_lock(&chip->lock);
....
if (pcm_irq_invoked(chip)) {
@@ -3110,7 +3111,7 @@ struct _snd_pcm_runtime {
static irqreturn_t snd_mychip_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{
- struct mychip *chip = dev_id;
+ mychip_t *chip = dev_id;
spin_lock(&chip->lock);
....
if (pcm_irq_invoked(chip)) {
@@ -3220,13 +3221,13 @@ struct _snd_pcm_runtime {
snd_pcm_hardware stucture (or in any
+ specified in the snd_pcm_hardware_t stucture (or in any
other constraint_list). You can build a rule like this:
Example of Hardware Constraints for Channels
min < 2) {
@@ -3298,13 +3298,12 @@ struct _snd_pcm_runtime {
Example of Hardware Constraints for Channels
bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
@@ -3377,13 +3376,13 @@ struct _snd_pcm_runtime {
callbacks: info,
get and
put. Then, define a
- struct snd_kcontrol_new record, such as:
+ snd_kcontrol_new_t record, such as:
Definition of a Control
The info callback is used to get
the detailed information of this control. This must store the
- values of the given struct snd_ctl_elem_info
+ values of the given snd_ctl_elem_info_t
object. For example, for a boolean control with a single
element will be:
@@ -3608,8 +3607,8 @@ struct _snd_pcm_runtime {
Example of info callback
type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@@ -3643,8 +3642,8 @@ struct _snd_pcm_runtime {
Example of get callback
value.integer.value[0] = get_some_value(chip);
return 0;
}
@@ -3718,8 +3717,8 @@ struct _snd_pcm_runtime {
private_value & 0xff;
int shift = (kcontrol->private_value >> 16) & 0xff;
@@ -3755,10 +3754,10 @@ struct _snd_pcm_runtime {
Example of put callback
current_value !=
ucontrol->value.integer.value[0]) {
@@ -3815,7 +3814,7 @@ struct _snd_pcm_runtime {
where my_control is the
- struct snd_kcontrol_new object defined above, and chip
+ snd_kcontrol_new_t object defined above, and chip
is the object pointer to be passed to
kcontrol->private_data
which can be referred in callbacks.
@@ -3823,7 +3822,7 @@ struct _snd_pcm_runtime {
snd_ctl_new1() allocates a new
- snd_kcontrol instance (that's why the definition
+ snd_kcontrol_t instance (that's why the definition
of my_control can be with
__devinitdata
prefix), and snd_ctl_add assigns the given
@@ -3850,7 +3849,7 @@ struct _snd_pcm_runtime {
control id pointer for the notification. The event-mask
specifies the types of notification, for example, in the above
example, the change of control values is notified.
- The id pointer is the pointer of struct snd_ctl_elem_id
+ The id pointer is the pointer of snd_ctl_elem_id_t
to be notified.
You can find some examples in es1938.c or
es1968.c for hardware volume interrupts.
@@ -3883,35 +3882,35 @@ struct _snd_pcm_runtime {
Example of AC97 Interface
private_data;
+ mychip_t *chip = ac97->private_data;
....
// read a register value here from the codec
return the_register_value;
}
- static void snd_mychip_ac97_write(struct snd_ac97 *ac97,
+ static void snd_mychip_ac97_write(ac97_t *ac97,
unsigned short reg, unsigned short val)
{
- struct mychip *chip = ac97->private_data;
+ mychip_t *chip = ac97->private_data;
....
// write the given register value to the codec
}
- static int snd_mychip_ac97(struct mychip *chip)
+ static int snd_mychip_ac97(mychip_t *chip)
{
- struct snd_ac97_bus *bus;
- struct snd_ac97_template ac97;
+ ac97_bus_t *bus;
+ ac97_template_t ac97;
int err;
- static struct snd_ac97_bus_ops ops = {
+ static ac97_bus_ops_t ops = {
.write = snd_mychip_ac97_write,
.read = snd_mychip_ac97_read,
};
@@ -3938,8 +3937,8 @@ struct _snd_pcm_runtime {
- And then call snd_ac97_mixer() with an
- struct snd_ac97_template
+ And then call snd_ac97_mixer() with an ac97_template_t
record together with the bus pointer created above.
private_data;
+ mychip_t *chip = ac97->private_data;
....
return the_register_value;
}
@@ -4018,7 +4016,7 @@ struct _snd_pcm_runtime {
@@ -4165,7 +4163,7 @@ struct _snd_pcm_runtime {
Multiple Codecs
When there are several codecs on the same card, you need to
- call snd_ac97_mixer() multiple times with
+ call snd_ac97_new() multiple times with
ac97.num=1 or greater. The num field
specifies the codec
number.
@@ -4214,7 +4212,7 @@ struct _snd_pcm_runtime {
@@ -4255,17 +4253,17 @@ struct _snd_pcm_runtime {
Usually, the port address corresponds to the command port and
port + 1 corresponds to the data port. If not, you may change
the cport field of
- struct snd_mpu401 manually
- afterward. However, snd_mpu401 pointer is not
+ mpu401_t manually
+ afterward. However, mpu401_t pointer is not
returned explicitly by
snd_mpu401_uart_new(). You need to cast
rmidi->private_data to
- snd_mpu401 explicitly,
+ mpu401_t explicitly,
private_data;
]]>
@@ -4361,7 +4359,7 @@ struct _snd_pcm_runtime {
card, "MyMIDI", 0, outs, ins, &rmidi);
if (err < 0)
return err;
@@ -4421,7 +4419,7 @@ struct _snd_pcm_runtime {
streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams) {
- substream = list_entry(list, struct snd_rawmidi_substream, list);
+ substream = list_entry(list, snd_rawmidi_substream_t, list);
sprintf(substream->name, "My MIDI Port %d", substream->number + 1);
}
/* same for SNDRV_RAWMIDI_STREAM_INPUT */
@@ -4465,12 +4463,12 @@ struct _snd_pcm_runtime {
If there is more than one port, your callbacks can determine the
- port index from the struct snd_rawmidi_substream data passed to each
+ port index from the snd_rawmidi_substream_t data passed to each
callback:
number;
]]>
@@ -4483,7 +4481,7 @@ struct _snd_pcm_runtime {
@@ -4501,7 +4499,7 @@ struct _snd_pcm_runtime {
@@ -4524,7 +4522,7 @@ struct _snd_pcm_runtime {
@@ -4549,7 +4547,7 @@ struct _snd_pcm_runtime {
@@ -4605,7 +4603,7 @@ struct _snd_pcm_runtime {
@@ -4649,7 +4647,7 @@ struct _snd_pcm_runtime {
@@ -4663,7 +4661,7 @@ struct _snd_pcm_runtime {
This callback is optional. If you do not set
- drain in the struct snd_rawmidi_ops
+ drain in the snd_rawmidi_ops_t
structure, ALSA will simply wait for 50 milliseconds
instead.
@@ -4705,7 +4703,7 @@ struct _snd_pcm_runtime {
@@ -4738,7 +4736,7 @@ struct _snd_pcm_runtime {
@@ -4769,7 +4767,7 @@ struct _snd_pcm_runtime {
@@ -4806,7 +4804,7 @@ struct _snd_pcm_runtime {
@@ -4825,7 +4823,7 @@ struct _snd_pcm_runtime {
private_data = p;
hw->private_free = mydata_free;
]]>
@@ -4837,9 +4835,9 @@ struct _snd_pcm_runtime {
private_data;
+ mydata_t *p = hw->private_data;
kfree(p);
}
]]>
@@ -5063,9 +5061,9 @@ struct _snd_pcm_runtime {
@@ -5146,7 +5144,7 @@ struct _snd_pcm_runtime {
@@ -5213,7 +5211,7 @@ struct _snd_pcm_runtime {
dma_private;
+ snd_pcm_sgbuf_t *sgbuf = (snd_pcm_sgbuf_t*)substream->dma_private;
]]>
@@ -5268,7 +5266,7 @@ struct _snd_pcm_runtime {
#include
/* get the physical page pointer on the given offset */
- static struct page *mychip_page(struct snd_pcm_substream *substream,
+ static struct page *mychip_page(snd_pcm_substream_t *substream,
unsigned long offset)
{
void *pageptr = substream->runtime->dma_area + offset;
@@ -5303,7 +5301,7 @@ struct _snd_pcm_runtime {
@@ -5347,8 +5345,8 @@ struct _snd_pcm_runtime {
@@ -5363,10 +5361,10 @@ struct _snd_pcm_runtime {
private_data;
+ chip_t *chip = entry->private_data;
snd_iprintf(buffer, "This is my chip!\n");
snd_iprintf(buffer, "Port = %ld\n", chip->port);
@@ -5455,7 +5453,7 @@ struct _snd_pcm_runtime {
CONFIG_PM.
-
- If the driver supports the suspend/resume
- fully, that is, the device can be
- properly resumed to the status at the suspend is called,
- you can set SNDRV_PCM_INFO_RESUME flag
- to pcm info field. Usually, this is possible when the
- registers of ths chip can be safely saved and restored to the
- RAM. If this is set, the trigger callback is called with
- SNDRV_PCM_TRIGGER_RESUME after resume
- callback is finished.
-
-
-
- Even if the driver doesn't support PM fully but only the
- partial suspend/resume is possible, it's still worthy to
- implement suspend/resume callbacks. In such a case, applications
- would reset the status by calling
- snd_pcm_prepare() and restart the stream
- appropriately. Hence, you can define suspend/resume callbacks
- below but don't set SNDRV_PCM_INFO_RESUME
- info flag to the PCM.
-
-
-
- Note that the trigger with SUSPEND can be always called when
- snd_pcm_suspend_all is called,
- regardless of SNDRV_PCM_INFO_RESUME flag.
- The RESUME flag affects only the behavior
- of snd_pcm_resume().
- (Thus, in theory,
- SNDRV_PCM_TRIGGER_RESUME isn't needed
- to be handled in the trigger callback when no
- SNDRV_PCM_INFO_RESUME flag is set. But,
- it's better to keep it for compatibility reason.)
-
- In the earlier version of ALSA drivers, a common
- power-management layer was provided, but it has been removed.
- The driver needs to define the suspend/resume hooks according to
- the bus the device is assigned. In the case of PCI driver, the
- callbacks look like below:
+ ALSA provides the common power-management layer. Each card driver
+ needs to have only low-level suspend and resume callbacks.
- Retrieve the card and the chip data.
- Call snd_power_change_state() with
- SNDRV_CTL_POWER_D3hot to change the
- power status.
+ Retrieve the chip data from pm_private_data field.Call snd_pcm_suspend_all() to suspend the running PCM streams.
- If AC97 codecs are used, call
- snd_ac97_resume() for each codec.Save the register values if necessary.Stop the hardware if necessary.
- Disable the PCI device by calling
- pci_disable_device(). Then, call
- pci_save_state() at last.
+ Disable the PCI device by calling pci_disable_device().
@@ -5577,24 +5530,18 @@ struct _snd_pcm_runtime {
private_data;
+ mychip_t *chip = card->pm_private_data;
/* (2) */
- snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
- /* (3) */
snd_pcm_suspend_all(chip->pcm);
- /* (4) */
- snd_ac97_suspend(chip->ac97);
- /* (5) */
+ /* (3) */
snd_mychip_save_registers(chip);
- /* (6) */
+ /* (4) */
snd_mychip_stop_hardware(chip);
- /* (7) */
- pci_disable_device(pci);
- pci_save_state(pci);
+ /* (5) */
+ pci_disable_device(chip->pci);
return 0;
}
]]>
@@ -5606,17 +5553,14 @@ struct _snd_pcm_runtime {
The scheme of the real resume job is as following.
- Retrieve the card and the chip data.
- Set up PCI. First, call pci_restore_state().
- Then enable the pci device again by calling pci_enable_device().
- Call pci_set_master() if necessary, too.
+ Retrieve the chip data from pm_private_data field.
+ Enable the pci device again by calling
+ pci_enable_device().Re-initialize the chip.Restore the saved registers if necessary.Resume the mixer, e.g. calling
snd_ac97_resume().Restart the hardware (if any).
- Call snd_power_change_state() with
- SNDRV_CTL_POWER_D0 to notify the processes.
@@ -5626,15 +5570,12 @@ struct _snd_pcm_runtime {
private_data;
+ mychip_t *chip = card->pm_private_data;
/* (2) */
- pci_restore_state(pci);
- pci_enable_device(pci);
- pci_set_master(pci);
+ pci_enable_device(chip->pci);
/* (3) */
snd_mychip_reinit_chip(chip);
/* (4) */
@@ -5643,8 +5584,6 @@ struct _snd_pcm_runtime {
snd_ac97_resume(chip->ac97);
/* (6) */
snd_mychip_restart_chip(chip);
- /* (7) */
- snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
]]>
@@ -5653,23 +5592,8 @@ struct _snd_pcm_runtime {
- As shown in the above, it's better to save registers after
- suspending the PCM operations via
- snd_pcm_suspend_all() or
- snd_pcm_suspend(). It means that the PCM
- streams are already stoppped when the register snapshot is
- taken. But, remind that you don't have to restart the PCM
- stream in the resume callback. It'll be restarted via
- trigger call with SNDRV_PCM_TRIGGER_RESUME
- when necessary.
-
-
-
- OK, we have all callbacks now. Let's set them up. In the
- initialization of the card, make sure that you can get the chip
- data from the card instance, typically via
- private_data field, in case you
- created the chip data individually.
+ OK, we have all callbacks now. Let's set up them now. In the
+ initialization of the card, add the following:
@@ -5678,56 +5602,33 @@ struct _snd_pcm_runtime {
const struct pci_device_id *pci_id)
{
....
- struct snd_card *card;
- struct mychip *chip;
+ snd_card_t *card;
+ mychip_t *chip;
....
- card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL);
- ....
- chip = kzalloc(sizeof(*chip), GFP_KERNEL);
- ....
- card->private_data = chip;
- ....
- }
-]]>
-
-
-
- When you created the chip data with
- snd_card_new(), it's anyway accessible
- via private_data field.
-
-
-
-private_data;
+ snd_card_set_pm_callback(card, snd_my_suspend, snd_my_resume, chip);
....
}
]]>
+ Here you don't have to put ifdef CONFIG_PM around, since it's already
+ checked in the header and expanded to empty if not needed.
- If you need a space for saving the registers, allocate the
- buffer for it here, too, since it would be fatal
+ If you need a space for saving the registers, you'll need to
+ allocate the buffer for it here, too, since it would be fatal
if you cannot allocate a memory in the suspend phase.
The allocated buffer should be released in the corresponding
destructor.
- And next, set suspend/resume callbacks to the pci_driver.
+ And next, set suspend/resume callbacks to the pci_driver,
+ This can be done by passing a macro SND_PCI_PM_CALLBACKS
+ in the pci_driver struct. This macro is expanded to the correct
+ (global) callbacks if CONFIG_PM is set.
@@ -5737,10 +5638,7 @@ struct _snd_pcm_runtime {
.id_table = snd_my_ids,
.probe = snd_my_probe,
.remove = __devexit_p(snd_my_remove),
- #ifdef CONFIG_PM
- .suspend = snd_my_suspend,
- .resume = snd_my_resume,
- #endif
+ SND_PCI_PM_CALLBACKS
};
]]>
diff --git a/trunk/Documentation/sound/alsa/Procfile.txt b/trunk/Documentation/sound/alsa/Procfile.txt
index 1fe48846d78f..25c5d648aef6 100644
--- a/trunk/Documentation/sound/alsa/Procfile.txt
+++ b/trunk/Documentation/sound/alsa/Procfile.txt
@@ -138,22 +138,6 @@ card*/codec97#0/ac97#?-?+regs
# echo 02 9f1f > /proc/asound/card0/codec97#0/ac97#0-0+regs
-USB Audio Streams
------------------
-
-card*/stream*
- Shows the assignment and the current status of each audio stream
- of the given card. This information is very useful for debugging.
-
-
-HD-Audio Codecs
----------------
-
-card*/codec#*
- Shows the general codec information and the attribute of each
- widget node.
-
-
Sequencer Information
---------------------
diff --git a/trunk/Documentation/sound/alsa/hda_codec.txt b/trunk/Documentation/sound/alsa/hda_codec.txt
index 0be57ed81302..e9d07b8f1acb 100644
--- a/trunk/Documentation/sound/alsa/hda_codec.txt
+++ b/trunk/Documentation/sound/alsa/hda_codec.txt
@@ -63,7 +63,7 @@ The bus instance is created via snd_hda_bus_new(). You need to pass
the card instance, the template, and the pointer to store the
resultant bus instance.
-int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
+int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp,
struct hda_bus **busp);
It returns zero if successful. A negative return value means any
@@ -166,14 +166,14 @@ The ops field contains the following callback functions:
struct hda_pcm_ops {
int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
- struct snd_pcm_substream *substream);
+ snd_pcm_substream_t *substream);
int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
- struct snd_pcm_substream *substream);
+ snd_pcm_substream_t *substream);
int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
unsigned int stream_tag, unsigned int format,
- struct snd_pcm_substream *substream);
+ snd_pcm_substream_t *substream);
int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
- struct snd_pcm_substream *substream);
+ snd_pcm_substream_t *substream);
};
All are non-NULL, so you can call them safely without NULL check.
@@ -284,7 +284,7 @@ parameter, and PCI subsystem IDs. If the matching entry is found, it
returns the config field value.
snd_hda_add_new_ctls() can be used to create and add control entries.
-Pass the zero-terminated array of struct snd_kcontrol_new. The same array
+Pass the zero-terminated array of snd_kcontrol_new_t. The same array
can be passed to snd_hda_resume_ctls() for resume.
Note that this will call control->put callback of these entries. So,
put callback should check codec->in_resume and force to restore the
@@ -292,7 +292,7 @@ given value if it's non-zero even if the value is identical with the
cached value.
Macros HDA_CODEC_VOLUME(), HDA_CODEC_MUTE() and their variables can be
-used for the entry of struct snd_kcontrol_new.
+used for the entry of snd_kcontrol_new_t.
The input MUX helper callbacks for such a control are provided, too:
snd_hda_input_mux_info() and snd_hda_input_mux_put(). See
diff --git a/trunk/Documentation/sysrq.txt b/trunk/Documentation/sysrq.txt
index ad0bedf678b3..baf17b381588 100644
--- a/trunk/Documentation/sysrq.txt
+++ b/trunk/Documentation/sysrq.txt
@@ -202,13 +202,17 @@ you must call __handle_sysrq_nolock instead.
* I have more questions, who can I ask?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+You may feel free to send email to myrdraal@deathsdoor.com, and I will
+respond as soon as possible.
+ -Myrdraal
+
And I'll answer any questions about the registration system you got, also
responding as soon as possible.
-Crutcher
* Credits
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Written by Mydraal
+Written by Mydraal
Updated by Adam Sulmicki
Updated by Jeremy M. Dolan 2001/01/28 10:15:59
Added to by Crutcher Dunnavant
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 7e780906d34c..77bb08606912 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -182,7 +182,7 @@ S: Supported
ACPI
P: Len Brown
M: len.brown@intel.com
-L: linux-acpi@vger.kernel.org
+L: acpi-devel@lists.sourceforge.net
W: http://acpi.sourceforge.net/
T: git kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
S: Maintained
@@ -258,13 +258,6 @@ P: Ivan Kokshaysky
M: ink@jurassic.park.msu.ru
S: Maintained for 2.4; PCI support for 2.6.
-AMD GEODE PROCESSOR/CHIPSET SUPPORT
-P: Jordan Crouse
-M: info-linux@geode.amd.com
-L: info-linux@geode.amd.com
-W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
-S: Supported
-
APM DRIVER
P: Stephen Rothwell
M: sfr@canb.auug.org.au
@@ -543,7 +536,7 @@ P: Mauro Carvalho Chehab
M: mchehab@brturbo.com.br
L: video4linux-list@redhat.com
W: http://linuxtv.org
-T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
+T: quilt http://www.linuxtv.org/download/quilt/
S: Maintained
BUSLOGIC SCSI DRIVER
@@ -561,11 +554,6 @@ W: http://us1.samba.org/samba/Linux_CIFS_client.html
T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
S: Supported
-CONFIGFS
-P: Joel Becker
-M: Joel Becker
-S: Supported
-
CIRRUS LOGIC GENERIC FBDEV DRIVER
P: Jeff Garzik
M: jgarzik@pobox.com
@@ -662,11 +650,6 @@ L: linux-crypto@vger.kernel.org
T: git kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
S: Maintained
-CS5535 Audio ALSA driver
-P: Jaya Kumar
-M: jayakumar.alsa@gmail.com
-S: Maintained
-
CYBERPRO FB DRIVER
P: Russell King
M: rmk@arm.linux.org.uk
@@ -696,6 +679,13 @@ M: pc300@cyclades.com
W: http://www.cyclades.com/
S: Supported
+DAC960 RAID CONTROLLER DRIVER
+P: Dave Olien
+M dmo@osdl.org
+W: http://www.osdl.org/archive/dmo/DAC960
+L: linux-kernel@vger.kernel.org
+S: Maintained
+
DAMA SLAVE for AX.25
P: Joerg Reuter
M: jreuter@yaina.de
@@ -844,7 +834,7 @@ P: LinuxTV.org Project
M: linux-dvb-maintainer@linuxtv.org
L: linux-dvb@linuxtv.org (subscription required)
W: http://linuxtv.org/
-T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
+T: quilt http://www.linuxtv.org/download/quilt/
S: Supported
EATA-DMA SCSI DRIVER
@@ -1235,7 +1225,7 @@ IEEE 1394 SUBSYSTEM
P: Ben Collins
M: bcollins@debian.org
P: Jody McIntyre
-M: scjody@modernduck.com
+M: scjody@steamballoon.com
L: linux1394-devel@lists.sourceforge.net
W: http://www.linux1394.org/
T: git kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394.git
@@ -1245,14 +1235,14 @@ IEEE 1394 OHCI DRIVER
P: Ben Collins
M: bcollins@debian.org
P: Jody McIntyre
-M: scjody@modernduck.com
+M: scjody@steamballoon.com
L: linux1394-devel@lists.sourceforge.net
W: http://www.linux1394.org/
S: Maintained
IEEE 1394 PCILYNX DRIVER
P: Jody McIntyre
-M: scjody@modernduck.com
+M: scjody@steamballoon.com
L: linux1394-devel@lists.sourceforge.net
W: http://www.linux1394.org/
S: Maintained
@@ -1294,8 +1284,8 @@ T: git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
S: Supported
INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
-P: Dmitry Torokhov
-M: dtor_core@ameritech.net
+P: Vojtech Pavlik
+M: vojtech@suse.cz
L: linux-input@atrey.karlin.mff.cuni.cz
L: linux-joystick@atrey.karlin.mff.cuni.cz
T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
@@ -1475,6 +1465,7 @@ P: Several
L: kernel-janitors@osdl.org
W: http://www.kerneljanitors.org/
W: http://sf.net/projects/kernel-janitor/
+W: http://developer.osdl.org/rddunlap/kj-patches/
S: Maintained
KERNEL NFSD
@@ -1485,11 +1476,17 @@ W: http://nfs.sourceforge.net/
W: http://www.cse.unsw.edu.au/~neilb/patches/linux-devel/
S: Maintained
+KERNEL EVENT LAYER (KOBJECT_UEVENT)
+P: Robert Love
+M: rml@novell.com
+L: linux-kernel@vger.kernel.org
+S: Maintained
+
KEXEC
P: Eric Biederman
P: Randy Dunlap
M: ebiederm@xmission.com
-M: rdunlap@xenotime.net
+M: rddunlap@osdl.org
W: http://www.xmission.com/~ebiederm/files/kexec/
L: linux-kernel@vger.kernel.org
L: fastboot@osdl.org
@@ -1903,15 +1900,6 @@ M: ajoshi@shell.unixbox.com
L: linux-nvidia@lists.surfsouth.com
S: Maintained
-ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
-P: Mark Fasheh
-M: mark.fasheh@oracle.com
-P: Kurt Hackel
-M: kurt.hackel@oracle.com
-L: ocfs2-devel@oss.oracle.com
-W: http://oss.oracle.com/projects/ocfs2/
-S: Supported
-
OLYMPIC NETWORK DRIVER
P: Peter De Shrijver
M: p2@ace.ulyssis.student.kuleuven.ac.be
@@ -2599,6 +2587,7 @@ S: Maintained
UDF FILESYSTEM
P: Ben Fennema
M: bfennema@falcon.csc.calpoly.edu
+L: linux_udf@hpesjro.fc.hp.com
W: http://linux-udf.sourceforge.net
S: Maintained
@@ -2651,12 +2640,6 @@ L: linux-usb-users@lists.sourceforge.net
L: linux-usb-devel@lists.sourceforge.net
S: Maintained
-USB ISP116X DRIVER
-P: Olav Kongas
-M: ok@artecdesign.ee
-L: linux-usb-devel@lists.sourceforge.net
-S: Maintained
-
USB KAWASAKI LSI DRIVER
P: Oliver Neukum
M: oliver@neukum.name
@@ -2668,7 +2651,7 @@ USB MASS STORAGE DRIVER
P: Matthew Dharm
M: mdharm-usb@one-eyed-alien.net
L: linux-usb-users@lists.sourceforge.net
-L: usb-storage@lists.one-eyed-alien.net
+L: linux-usb-devel@lists.sourceforge.net
S: Maintained
W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
@@ -2913,13 +2896,7 @@ P: Mauro Carvalho Chehab
M: mchehab@brturbo.com.br
L: video4linux-list@redhat.com
W: http://linuxtv.org
-T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
-S: Maintained
-
-VT8231 HARDWARE MONITOR DRIVER
-P: Roger Lucas
-M: roger@planbit.co.uk
-L: lm-sensors@lm-sensors.org
+T: quilt http://www.linuxtv.org/download/quilt/
S: Maintained
W1 DALLAS'S 1-WIRE BUS
diff --git a/trunk/Makefile b/trunk/Makefile
index 599e744d3e33..b1c458c2522d 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -1,8 +1,8 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 15
-EXTRAVERSION =
-NAME=Sliding Snow Leopard
+EXTRAVERSION =-rc5
+NAME=Affluent Albatross
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
@@ -286,6 +286,10 @@ export quiet Q KBUILD_VERBOSE
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+# For backward compatibility
+check_gcc = $(warning check_gcc is deprecated - use cc-option) \
+ $(call cc-option, $(1),$(2))
+
# cc-option-yn
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
@@ -404,7 +408,7 @@ outputmakefile:
# of make so .config is not included in this case either (for *config).
no-dot-config-targets := clean mrproper distclean \
- cscope TAGS tags help %docs check%
+ cscope TAGS tags help %docs check% kernelrelease
config-targets := 0
mixed-targets := 0
@@ -477,20 +481,18 @@ ifeq ($(dot-config),1)
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
--include .kconfig.d
+-include .config.cmd
include .config
# If .config needs to be updated, it will be done via the dependency
# that autoconf has on .config.
# To avoid any implicit rule to kick in, define an empty command
-.config .kconfig.d: ;
+.config: ;
# If .config is newer than include/linux/autoconf.h, someone tinkered
-# with it and forgot to run make oldconfig.
-# If kconfig.d is missing then we are probarly in a cleaned tree so
-# we execute the config step to be sure to catch updated Kconfig files
-include/linux/autoconf.h: .kconfig.d .config
+# with it and forgot to run make oldconfig
+include/linux/autoconf.h: .config
$(Q)mkdir -p include/linux
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
@@ -1064,7 +1066,7 @@ help:
@echo ' all - Build all targets marked with [*]'
@echo '* vmlinux - Build the bare kernel'
@echo '* modules - Build all modules'
- @echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
+ @echo ' modules_install - Install all modules'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
@@ -1238,11 +1240,8 @@ cscope: FORCE
quiet_cmd_TAGS = MAKE $@
define cmd_TAGS
rm -f $@; \
- ETAGSF=`etags --version | grep -i exuberant >/dev/null && \
- echo "-I __initdata,__exitdata,__acquires,__releases \
- -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
- --extra=+f --c-kinds=+px"`; \
- $(all-sources) | xargs etags $$ETAGSF -a
+ ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
+ $(all-sources) | xargs etags $$ETAGSF -a
endef
TAGS: FORCE
@@ -1252,11 +1251,8 @@ TAGS: FORCE
quiet_cmd_tags = MAKE $@
define cmd_tags
rm -f $@; \
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && \
- echo "-I __initdata,__exitdata,__acquires,__releases \
- -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
- --extra=+f --c-kinds=+px"`; \
- $(all-sources) | xargs ctags $$CTAGSF -a
+ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
+ $(all-sources) | xargs ctags $$CTAGSF -a
endef
tags: FORCE
diff --git a/trunk/arch/alpha/Kconfig b/trunk/arch/alpha/Kconfig
index 153337ff1d7b..786491f9ceb2 100644
--- a/trunk/arch/alpha/Kconfig
+++ b/trunk/arch/alpha/Kconfig
@@ -40,19 +40,6 @@ config GENERIC_IOMAP
bool
default n
-config GENERIC_HARDIRQS
- bool
- default y
-
-config GENERIC_IRQ_PROBE
- bool
- default y
-
-config AUTO_IRQ_AFFINITY
- bool
- depends on SMP
- default y
-
source "init/Kconfig"
diff --git a/trunk/arch/alpha/kernel/alpha_ksyms.c b/trunk/arch/alpha/kernel/alpha_ksyms.c
index f3e98f837784..24ae9a366073 100644
--- a/trunk/arch/alpha/kernel/alpha_ksyms.c
+++ b/trunk/arch/alpha/kernel/alpha_ksyms.c
@@ -175,6 +175,7 @@ EXPORT_SYMBOL(up);
*/
#ifdef CONFIG_SMP
+EXPORT_SYMBOL(synchronize_irq);
EXPORT_SYMBOL(flush_tlb_mm);
EXPORT_SYMBOL(flush_tlb_range);
EXPORT_SYMBOL(flush_tlb_page);
diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c
index 76be5cf0de13..b6114f5c0d2b 100644
--- a/trunk/arch/alpha/kernel/irq.c
+++ b/trunk/arch/alpha/kernel/irq.c
@@ -32,25 +32,214 @@
#include
#include
+/*
+ * Controller mappings for all interrupt sources:
+ */
+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
+ [0 ... NR_IRQS-1] = {
+ .handler = &no_irq_type,
+ .lock = SPIN_LOCK_UNLOCKED
+ }
+};
+
+static void register_irq_proc(unsigned int irq);
+
volatile unsigned long irq_err_count;
-void ack_bad_irq(unsigned int irq)
+/*
+ * Special irq handlers.
+ */
+
+irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
+{
+ return IRQ_NONE;
+}
+
+/*
+ * Generic no controller code
+ */
+
+static void no_irq_enable_disable(unsigned int irq) { }
+static unsigned int no_irq_startup(unsigned int irq) { return 0; }
+
+static void
+no_irq_ack(unsigned int irq)
{
irq_err_count++;
printk(KERN_CRIT "Unexpected IRQ trap at vector %u\n", irq);
}
+struct hw_interrupt_type no_irq_type = {
+ .typename = "none",
+ .startup = no_irq_startup,
+ .shutdown = no_irq_enable_disable,
+ .enable = no_irq_enable_disable,
+ .disable = no_irq_enable_disable,
+ .ack = no_irq_ack,
+ .end = no_irq_enable_disable,
+};
+
+int
+handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
+ struct irqaction *action)
+{
+ int status = 1; /* Force the "do bottom halves" bit */
+ int ret;
+
+ do {
+ if (!(action->flags & SA_INTERRUPT))
+ local_irq_enable();
+ else
+ local_irq_disable();
+
+ ret = action->handler(irq, action->dev_id, regs);
+ if (ret == IRQ_HANDLED)
+ status |= action->flags;
+ action = action->next;
+ } while (action);
+ if (status & SA_SAMPLE_RANDOM)
+ add_interrupt_randomness(irq);
+ local_irq_disable();
+
+ return status;
+}
+
+/*
+ * Generic enable/disable code: this just calls
+ * down into the PIC-specific version for the actual
+ * hardware disable after having gotten the irq
+ * controller lock.
+ */
+void inline
+disable_irq_nosync(unsigned int irq)
+{
+ irq_desc_t *desc = irq_desc + irq;
+ unsigned long flags;
+
+ spin_lock_irqsave(&desc->lock, flags);
+ if (!desc->depth++) {
+ desc->status |= IRQ_DISABLED;
+ desc->handler->disable(irq);
+ }
+ spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+/*
+ * Synchronous version of the above, making sure the IRQ is
+ * no longer running on any other IRQ..
+ */
+void
+disable_irq(unsigned int irq)
+{
+ disable_irq_nosync(irq);
+ synchronize_irq(irq);
+}
+
+void
+enable_irq(unsigned int irq)
+{
+ irq_desc_t *desc = irq_desc + irq;
+ unsigned long flags;
+
+ spin_lock_irqsave(&desc->lock, flags);
+ switch (desc->depth) {
+ case 1: {
+ unsigned int status = desc->status & ~IRQ_DISABLED;
+ desc->status = status;
+ if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
+ desc->status = status | IRQ_REPLAY;
+ hw_resend_irq(desc->handler,irq);
+ }
+ desc->handler->enable(irq);
+ /* fall-through */
+ }
+ default:
+ desc->depth--;
+ break;
+ case 0:
+ printk(KERN_ERR "enable_irq() unbalanced from %p\n",
+ __builtin_return_address(0));
+ }
+ spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+int
+setup_irq(unsigned int irq, struct irqaction * new)
+{
+ int shared = 0;
+ struct irqaction *old, **p;
+ unsigned long flags;
+ irq_desc_t *desc = irq_desc + irq;
+
+ if (desc->handler == &no_irq_type)
+ return -ENOSYS;
+
+ /*
+ * Some drivers like serial.c use request_irq() heavily,
+ * so we have to be careful not to interfere with a
+ * running system.
+ */
+ if (new->flags & SA_SAMPLE_RANDOM) {
+ /*
+ * This function might sleep, we want to call it first,
+ * outside of the atomic block.
+ * Yes, this might clear the entropy pool if the wrong
+ * driver is attempted to be loaded, without actually
+ * installing a new handler, but is this really a problem,
+ * only the sysadmin is able to do this.
+ */
+ rand_initialize_irq(irq);
+ }
+
+ /*
+ * The following block of code has to be executed atomically
+ */
+ spin_lock_irqsave(&desc->lock,flags);
+ p = &desc->action;
+ if ((old = *p) != NULL) {
+ /* Can't share interrupts unless both agree to */
+ if (!(old->flags & new->flags & SA_SHIRQ)) {
+ spin_unlock_irqrestore(&desc->lock,flags);
+ return -EBUSY;
+ }
+
+ /* add new interrupt at end of irq queue */
+ do {
+ p = &old->next;
+ old = *p;
+ } while (old);
+ shared = 1;
+ }
+
+ *p = new;
+
+ if (!shared) {
+ desc->depth = 0;
+ desc->status &=
+ ~(IRQ_DISABLED|IRQ_AUTODETECT|IRQ_WAITING|IRQ_INPROGRESS);
+ desc->handler->startup(irq);
+ }
+ spin_unlock_irqrestore(&desc->lock,flags);
+
+ return 0;
+}
+
+static struct proc_dir_entry * root_irq_dir;
+static struct proc_dir_entry * irq_dir[NR_IRQS];
+
#ifdef CONFIG_SMP
+static struct proc_dir_entry * smp_affinity_entry[NR_IRQS];
static char irq_user_affinity[NR_IRQS];
+static cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
-int
-select_smp_affinity(unsigned int irq)
+static void
+select_smp_affinity(int irq)
{
static int last_cpu;
int cpu = last_cpu + 1;
- if (!irq_desc[irq].handler->set_affinity || irq_user_affinity[irq])
- return 1;
+ if (! irq_desc[irq].handler->set_affinity || irq_user_affinity[irq])
+ return;
while (!cpu_possible(cpu))
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
@@ -58,10 +247,208 @@ select_smp_affinity(unsigned int irq)
irq_affinity[irq] = cpumask_of_cpu(cpu);
irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu));
- return 0;
}
+
+static int
+irq_affinity_read_proc (char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]);
+ if (count - len < 2)
+ return -EINVAL;
+ len += sprintf(page + len, "\n");
+ return len;
+}
+
+static int
+irq_affinity_write_proc(struct file *file, const char __user *buffer,
+ unsigned long count, void *data)
+{
+ int irq = (long) data, full_count = count, err;
+ cpumask_t new_value;
+
+ if (!irq_desc[irq].handler->set_affinity)
+ return -EIO;
+
+ err = cpumask_parse(buffer, count, new_value);
+
+ /* The special value 0 means release control of the
+ affinity to kernel. */
+ cpus_and(new_value, new_value, cpu_online_map);
+ if (cpus_empty(new_value)) {
+ irq_user_affinity[irq] = 0;
+ select_smp_affinity(irq);
+ }
+ /* Do not allow disabling IRQs completely - it's a too easy
+ way to make the system unusable accidentally :-) At least
+ one online CPU still has to be targeted. */
+ else {
+ irq_affinity[irq] = new_value;
+ irq_user_affinity[irq] = 1;
+ irq_desc[irq].handler->set_affinity(irq, new_value);
+ }
+
+ return full_count;
+}
+
#endif /* CONFIG_SMP */
+#define MAX_NAMELEN 10
+
+static void
+register_irq_proc (unsigned int irq)
+{
+ char name [MAX_NAMELEN];
+
+ if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
+ irq_dir[irq])
+ return;
+
+ memset(name, 0, MAX_NAMELEN);
+ sprintf(name, "%d", irq);
+
+ /* create /proc/irq/1234 */
+ irq_dir[irq] = proc_mkdir(name, root_irq_dir);
+
+#ifdef CONFIG_SMP
+ if (irq_desc[irq].handler->set_affinity) {
+ struct proc_dir_entry *entry;
+ /* create /proc/irq/1234/smp_affinity */
+ entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
+
+ if (entry) {
+ entry->nlink = 1;
+ entry->data = (void *)(long)irq;
+ entry->read_proc = irq_affinity_read_proc;
+ entry->write_proc = irq_affinity_write_proc;
+ }
+
+ smp_affinity_entry[irq] = entry;
+ }
+#endif
+}
+
+void
+init_irq_proc (void)
+{
+ int i;
+
+ /* create /proc/irq */
+ root_irq_dir = proc_mkdir("irq", NULL);
+
+#ifdef CONFIG_SMP
+ /* create /proc/irq/prof_cpu_mask */
+ create_prof_cpu_mask(root_irq_dir);
+#endif
+
+ /*
+ * Create entries for all existing IRQs.
+ */
+ for (i = 0; i < ACTUAL_NR_IRQS; i++) {
+ if (irq_desc[i].handler == &no_irq_type)
+ continue;
+ register_irq_proc(i);
+ }
+}
+
+int
+request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
+ unsigned long irqflags, const char * devname, void *dev_id)
+{
+ int retval;
+ struct irqaction * action;
+
+ if (irq >= ACTUAL_NR_IRQS)
+ return -EINVAL;
+ if (!handler)
+ return -EINVAL;
+
+#if 1
+ /*
+ * Sanity-check: shared interrupts should REALLY pass in
+ * a real dev-ID, otherwise we'll have trouble later trying
+ * to figure out which interrupt is which (messes up the
+ * interrupt freeing logic etc).
+ */
+ if ((irqflags & SA_SHIRQ) && !dev_id) {
+ printk(KERN_ERR
+ "Bad boy: %s (at %p) called us without a dev_id!\n",
+ devname, __builtin_return_address(0));
+ }
+#endif
+
+ action = (struct irqaction *)
+ kmalloc(sizeof(struct irqaction), GFP_KERNEL);
+ if (!action)
+ return -ENOMEM;
+
+ action->handler = handler;
+ action->flags = irqflags;
+ cpus_clear(action->mask);
+ action->name = devname;
+ action->next = NULL;
+ action->dev_id = dev_id;
+
+#ifdef CONFIG_SMP
+ select_smp_affinity(irq);
+#endif
+
+ retval = setup_irq(irq, action);
+ if (retval)
+ kfree(action);
+ return retval;
+}
+
+EXPORT_SYMBOL(request_irq);
+
+void
+free_irq(unsigned int irq, void *dev_id)
+{
+ irq_desc_t *desc;
+ struct irqaction **p;
+ unsigned long flags;
+
+ if (irq >= ACTUAL_NR_IRQS) {
+ printk(KERN_CRIT "Trying to free IRQ%d\n", irq);
+ return;
+ }
+
+ desc = irq_desc + irq;
+ spin_lock_irqsave(&desc->lock,flags);
+ p = &desc->action;
+ for (;;) {
+ struct irqaction * action = *p;
+ if (action) {
+ struct irqaction **pp = p;
+ p = &action->next;
+ if (action->dev_id != dev_id)
+ continue;
+
+ /* Found - now remove it from the list of entries. */
+ *pp = action->next;
+ if (!desc->action) {
+ desc->status |= IRQ_DISABLED;
+ desc->handler->shutdown(irq);
+ }
+ spin_unlock_irqrestore(&desc->lock,flags);
+
+#ifdef CONFIG_SMP
+ /* Wait to make sure it's not being used on
+ another CPU. */
+ while (desc->status & IRQ_INPROGRESS)
+ barrier();
+#endif
+ kfree(action);
+ return;
+ }
+ printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
+ spin_unlock_irqrestore(&desc->lock,flags);
+ return;
+ }
+}
+
+EXPORT_SYMBOL(free_irq);
+
int
show_interrupts(struct seq_file *p, void *v)
{
@@ -144,6 +531,10 @@ handle_irq(int irq, struct pt_regs * regs)
* 0 return value means that this irq is already being
* handled by some other CPU. (or is disabled)
*/
+ int cpu = smp_processor_id();
+ irq_desc_t *desc = irq_desc + irq;
+ struct irqaction * action;
+ unsigned int status;
static unsigned int illegal_count=0;
if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) {
@@ -155,8 +546,229 @@ handle_irq(int irq, struct pt_regs * regs)
}
irq_enter();
- local_irq_disable();
- __do_IRQ(irq, regs);
- local_irq_enable();
+ kstat_cpu(cpu).irqs[irq]++;
+ spin_lock_irq(&desc->lock); /* mask also the higher prio events */
+ desc->handler->ack(irq);
+ /*
+ * REPLAY is when Linux resends an IRQ that was dropped earlier.
+ * WAITING is used by probe to mark irqs that are being tested.
+ */
+ status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
+ status |= IRQ_PENDING; /* we _want_ to handle it */
+
+ /*
+ * If the IRQ is disabled for whatever reason, we cannot
+ * use the action we have.
+ */
+ action = NULL;
+ if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
+ action = desc->action;
+ status &= ~IRQ_PENDING; /* we commit to handling */
+ status |= IRQ_INPROGRESS; /* we are handling it */
+ }
+ desc->status = status;
+
+ /*
+ * If there is no IRQ handler or it was disabled, exit early.
+ * Since we set PENDING, if another processor is handling
+ * a different instance of this same irq, the other processor
+ * will take care of it.
+ */
+ if (!action)
+ goto out;
+
+ /*
+ * Edge triggered interrupts need to remember pending events.
+ * This applies to any hw interrupts that allow a second
+ * instance of the same irq to arrive while we are in handle_irq
+ * or in the handler. But the code here only handles the _second_
+ * instance of the irq, not the third or fourth. So it is mostly
+ * useful for irq hardware that does not mask cleanly in an
+ * SMP environment.
+ */
+ for (;;) {
+ spin_unlock(&desc->lock);
+ handle_IRQ_event(irq, regs, action);
+ spin_lock(&desc->lock);
+
+ if (!(desc->status & IRQ_PENDING)
+ || (desc->status & IRQ_LEVEL))
+ break;
+ desc->status &= ~IRQ_PENDING;
+ }
+ desc->status &= ~IRQ_INPROGRESS;
+out:
+ /*
+ * The ->end() handler has to deal with interrupts which got
+ * disabled while the handler was running.
+ */
+ desc->handler->end(irq);
+ spin_unlock(&desc->lock);
+
irq_exit();
}
+
+/*
+ * IRQ autodetection code..
+ *
+ * This depends on the fact that any interrupt that
+ * comes in on to an unassigned handler will get stuck
+ * with "IRQ_WAITING" cleared and the interrupt
+ * disabled.
+ */
+unsigned long
+probe_irq_on(void)
+{
+ int i;
+ irq_desc_t *desc;
+ unsigned long delay;
+ unsigned long val;
+
+ /* Something may have generated an irq long ago and we want to
+ flush such a longstanding irq before considering it as spurious. */
+ for (i = NR_IRQS-1; i >= 0; i--) {
+ desc = irq_desc + i;
+
+ spin_lock_irq(&desc->lock);
+ if (!irq_desc[i].action)
+ irq_desc[i].handler->startup(i);
+ spin_unlock_irq(&desc->lock);
+ }
+
+ /* Wait for longstanding interrupts to trigger. */
+ for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
+ /* about 20ms delay */ barrier();
+
+ /* enable any unassigned irqs (we must startup again here because
+ if a longstanding irq happened in the previous stage, it may have
+ masked itself) first, enable any unassigned irqs. */
+ for (i = NR_IRQS-1; i >= 0; i--) {
+ desc = irq_desc + i;
+
+ spin_lock_irq(&desc->lock);
+ if (!desc->action) {
+ desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
+ if (desc->handler->startup(i))
+ desc->status |= IRQ_PENDING;
+ }
+ spin_unlock_irq(&desc->lock);
+ }
+
+ /*
+ * Wait for spurious interrupts to trigger
+ */
+ for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
+ /* about 100ms delay */ barrier();
+
+ /*
+ * Now filter out any obviously spurious interrupts
+ */
+ val = 0;
+ for (i=0; ilock);
+ status = desc->status;
+
+ if (status & IRQ_AUTODETECT) {
+ /* It triggered already - consider it spurious. */
+ if (!(status & IRQ_WAITING)) {
+ desc->status = status & ~IRQ_AUTODETECT;
+ desc->handler->shutdown(i);
+ } else
+ if (i < 32)
+ val |= 1 << i;
+ }
+ spin_unlock_irq(&desc->lock);
+ }
+
+ return val;
+}
+
+EXPORT_SYMBOL(probe_irq_on);
+
+/*
+ * Return a mask of triggered interrupts (this
+ * can handle only legacy ISA interrupts).
+ */
+unsigned int
+probe_irq_mask(unsigned long val)
+{
+ int i;
+ unsigned int mask;
+
+ mask = 0;
+ for (i = 0; i < NR_IRQS; i++) {
+ irq_desc_t *desc = irq_desc + i;
+ unsigned int status;
+
+ spin_lock_irq(&desc->lock);
+ status = desc->status;
+
+ if (status & IRQ_AUTODETECT) {
+ /* We only react to ISA interrupts */
+ if (!(status & IRQ_WAITING)) {
+ if (i < 16)
+ mask |= 1 << i;
+ }
+
+ desc->status = status & ~IRQ_AUTODETECT;
+ desc->handler->shutdown(i);
+ }
+ spin_unlock_irq(&desc->lock);
+ }
+
+ return mask & val;
+}
+
+/*
+ * Get the result of the IRQ probe.. A negative result means that
+ * we have several candidates (but we return the lowest-numbered
+ * one).
+ */
+
+int
+probe_irq_off(unsigned long val)
+{
+ int i, irq_found, nr_irqs;
+
+ nr_irqs = 0;
+ irq_found = 0;
+ for (i=0; ilock);
+ status = desc->status;
+
+ if (status & IRQ_AUTODETECT) {
+ if (!(status & IRQ_WAITING)) {
+ if (!nr_irqs)
+ irq_found = i;
+ nr_irqs++;
+ }
+ desc->status = status & ~IRQ_AUTODETECT;
+ desc->handler->shutdown(i);
+ }
+ spin_unlock_irq(&desc->lock);
+ }
+
+ if (nr_irqs > 1)
+ irq_found = -irq_found;
+ return irq_found;
+}
+
+EXPORT_SYMBOL(probe_irq_off);
+
+#ifdef CONFIG_SMP
+void synchronize_irq(unsigned int irq)
+{
+ /* is there anything to synchronize with? */
+ if (!irq_desc[irq].action)
+ return;
+
+ while (irq_desc[irq].status & IRQ_INPROGRESS)
+ barrier();
+}
+#endif
diff --git a/trunk/arch/alpha/kernel/machvec_impl.h b/trunk/arch/alpha/kernel/machvec_impl.h
index 11f996f24fde..4959b7a3e1e6 100644
--- a/trunk/arch/alpha/kernel/machvec_impl.h
+++ b/trunk/arch/alpha/kernel/machvec_impl.h
@@ -41,7 +41,7 @@
#define CAT1(x,y) x##y
#define CAT(x,y) CAT1(x,y)
-#define DO_DEFAULT_RTC .rtc_port = 0x70
+#define DO_DEFAULT_RTC rtc_port: 0x70
#define DO_EV4_MMU \
.max_asn = EV4_MAX_ASN, \
diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig
index 16a5d522b2f2..4b15f5f1e254 100644
--- a/trunk/arch/arm/Kconfig
+++ b/trunk/arch/arm/Kconfig
@@ -154,7 +154,6 @@ config ARCH_RPC
select FIQ
select TIMER_ACORN
select ARCH_MAY_HAVE_PC_FDC
- select ISA_DMA_API
help
On the Acorn Risc-PC, Linux can support the internal IDE disk and
CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -207,7 +206,6 @@ config ARCH_IMX
config ARCH_H720X
bool "Hynix-HMS720x-based"
- select ISA_DMA_API
help
This enables support for systems based on the Hynix HMS720x
@@ -292,14 +290,12 @@ config ISA
(MCA) or VESA. ISA is an older system, now being displaced by PCI;
newer boards don't support it. If you have ISA, say Y, otherwise N.
-# Select ISA DMA controller support
config ISA_DMA
bool
- select ISA_DMA_API
-# Select ISA DMA interface
config ISA_DMA_API
bool
+ default y
config PCI
bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB
@@ -660,6 +656,7 @@ source "kernel/power/Kconfig"
config APM
tristate "Advanced Power Management Emulation"
+ depends on PM_LEGACY
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile
index afaf3a1e903c..81bd2193fe6d 100644
--- a/trunk/arch/arm/Makefile
+++ b/trunk/arch/arm/Makefile
@@ -8,7 +8,7 @@
# Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p --no-undefined -X
-CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
+CPPFLAGS_vmlinux.lds = -DKERNEL_RAM_ADDR=$(TEXTADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
#CFLAGS +=-pipe
@@ -65,7 +65,7 @@ CHECKFLAGS += -D__arm__
#Default value
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
-textofs-y := 0x00008000
+textaddr-y := 0xC0008000
machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_EBSA110) := ebsa110
@@ -73,20 +73,22 @@ textofs-y := 0x00008000
incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
machine-$(CONFIG_FOOTBRIDGE) := footbridge
incdir-$(CONFIG_FOOTBRIDGE) := ebsa285
+textaddr-$(CONFIG_ARCH_CO285) := 0x60008000
machine-$(CONFIG_ARCH_CO285) := footbridge
incdir-$(CONFIG_ARCH_CO285) := ebsa285
machine-$(CONFIG_ARCH_SHARK) := shark
machine-$(CONFIG_ARCH_SA1100) := sa1100
ifeq ($(CONFIG_ARCH_SA1100),y)
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
- textofs-$(CONFIG_SA1111) := 0x00208000
+textaddr-$(CONFIG_SA1111) := 0xc0208000
endif
machine-$(CONFIG_ARCH_PXA) := pxa
machine-$(CONFIG_ARCH_L7200) := l7200
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
machine-$(CONFIG_ARCH_CAMELOT) := epxa10db
- textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
+textaddr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000
machine-$(CONFIG_ARCH_CLPS711X) := clps711x
+textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_IOP3XX) := iop3xx
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
machine-$(CONFIG_ARCH_IXP2000) := ixp2000
@@ -108,8 +110,7 @@ CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL
export CFLAGS_3c589_cs.o
endif
-# The byte offset of the kernel image in RAM from the start of RAM.
-TEXT_OFFSET := $(textofs-y)
+TEXTADDR := $(textaddr-y)
ifeq ($(incdir-y),)
incdir-y := $(machine-y)
@@ -122,7 +123,7 @@ else
MACHINE :=
endif
-export TEXT_OFFSET GZFLAGS
+export TEXTADDR GZFLAGS
# Do we have FASTFPE?
FASTFPE :=arch/arm/fastfpe
diff --git a/trunk/arch/arm/boot/Makefile b/trunk/arch/arm/boot/Makefile
index a174d63395ea..937a353bc37c 100644
--- a/trunk/arch/arm/boot/Makefile
+++ b/trunk/arch/arm/boot/Makefile
@@ -15,7 +15,7 @@ include $(srctree)/$(MACHINE)/Makefile.boot
endif
# Note: the following conditions must always be true:
-# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
+# ZRELADDR == virt_to_phys(TEXTADDR)
# PARAMS_PHYS must be within 4MB of ZRELADDR
# INITRD_PHYS must be in RAM
ZRELADDR := $(zreladdr-y)
diff --git a/trunk/arch/arm/common/Kconfig b/trunk/arch/arm/common/Kconfig
index d7509c7a3c5e..666ba393575b 100644
--- a/trunk/arch/arm/common/Kconfig
+++ b/trunk/arch/arm/common/Kconfig
@@ -23,8 +23,5 @@ config SHARP_LOCOMO
config SHARP_PARAM
bool
-config SHARPSL_PM
- bool
-
config SHARP_SCOOP
bool
diff --git a/trunk/arch/arm/common/Makefile b/trunk/arch/arm/common/Makefile
index ec8d17c96906..a87886564b19 100644
--- a/trunk/arch/arm/common/Makefile
+++ b/trunk/arch/arm/common/Makefile
@@ -3,6 +3,7 @@
#
obj-y += rtctime.o
+obj-$(CONFIG_ARM_AMBA) += amba.o
obj-$(CONFIG_ARM_GIC) += gic.o
obj-$(CONFIG_ICST525) += icst525.o
obj-$(CONFIG_ICST307) += icst307.o
@@ -12,5 +13,4 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o
obj-$(CONFIG_TIMER_ACORN) += time-acorn.o
obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
-obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
diff --git a/trunk/drivers/amba/bus.c b/trunk/arch/arm/common/amba.c
similarity index 98%
rename from trunk/drivers/amba/bus.c
rename to trunk/arch/arm/common/amba.c
index 1bbdd1693d57..e1013112c354 100644
--- a/trunk/drivers/amba/bus.c
+++ b/trunk/arch/arm/common/amba.c
@@ -12,10 +12,10 @@
#include
#include
#include
-#include
#include
#include
+#include
#include
#define to_amba_device(d) container_of(d, struct amba_device, dev)
@@ -45,7 +45,7 @@ static int amba_match(struct device *dev, struct device_driver *drv)
}
#ifdef CONFIG_HOTPLUG
-static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, int bufsz)
+static int amba_hotplug(struct device *dev, char **envp, int nr_env, char *buf, int bufsz)
{
struct amba_device *pcdev = to_amba_device(dev);
@@ -58,7 +58,7 @@ static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, i
return 0;
}
#else
-#define amba_uevent NULL
+#define amba_hotplug NULL
#endif
static int amba_suspend(struct device *dev, pm_message_t state)
@@ -88,7 +88,7 @@ static int amba_resume(struct device *dev)
static struct bus_type amba_bustype = {
.name = "amba",
.match = amba_match,
- .uevent = amba_uevent,
+ .hotplug = amba_hotplug,
.suspend = amba_suspend,
.resume = amba_resume,
};
diff --git a/trunk/arch/arm/common/scoop.c b/trunk/arch/arm/common/scoop.c
index b6de43e73699..0c3cbd9a388b 100644
--- a/trunk/arch/arm/common/scoop.c
+++ b/trunk/arch/arm/common/scoop.c
@@ -33,6 +33,7 @@ void reset_scoop(struct device *dev)
SCOOP_REG(sdev->base,SCOOP_MCR) = 0x0100; // 00
SCOOP_REG(sdev->base,SCOOP_CDR) = 0x0000; // 04
+ SCOOP_REG(sdev->base,SCOOP_CPR) = 0x0000; // 0C
SCOOP_REG(sdev->base,SCOOP_CCR) = 0x0000; // 10
SCOOP_REG(sdev->base,SCOOP_IMR) = 0x0000; // 18
SCOOP_REG(sdev->base,SCOOP_IRM) = 0x00FF; // 14
@@ -153,7 +154,6 @@ int __init scoop_probe(struct platform_device *pdev)
SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140;
reset_scoop(&pdev->dev);
- SCOOP_REG(devptr->base, SCOOP_CPR) = 0x0000;
SCOOP_REG(devptr->base, SCOOP_GPCR) = inf->io_dir & 0xffff;
SCOOP_REG(devptr->base, SCOOP_GPWR) = inf->io_out & 0xffff;
diff --git a/trunk/arch/arm/common/sharpsl_pm.c b/trunk/arch/arm/common/sharpsl_pm.c
deleted file mode 100644
index 978d32e82d39..000000000000
--- a/trunk/arch/arm/common/sharpsl_pm.c
+++ /dev/null
@@ -1,839 +0,0 @@
-/*
- * Battery and Power Management code for the Sharp SL-C7xx and SL-Cxx00
- * series of PDAs
- *
- * Copyright (c) 2004-2005 Richard Purdie
- *
- * Based on code written by Sharp for 2.4 kernels
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- */
-
-#undef DEBUG
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/*
- * Constants
- */
-#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */
-#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */
-#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */
-#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */
-#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */
-#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */
-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */
-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 10 /* 10 msec */
-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN 10 /* 10 msec */
-#define SHARPSL_CHARGE_WAIT_TIME 15 /* 15 msec */
-#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */
-#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */
-
-#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
-#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
-#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */
-#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */
-#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
-#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
-
-/*
- * Prototypes
- */
-static int sharpsl_off_charge_battery(void);
-static int sharpsl_check_battery_temp(void);
-static int sharpsl_check_battery_voltage(void);
-static int sharpsl_ac_check(void);
-static int sharpsl_fatal_check(void);
-static int sharpsl_average_value(int ad);
-static void sharpsl_average_clear(void);
-static void sharpsl_charge_toggle(void *private_);
-static void sharpsl_battery_thread(void *private_);
-
-
-/*
- * Variables
- */
-struct sharpsl_pm_status sharpsl_pm;
-DECLARE_WORK(toggle_charger, sharpsl_charge_toggle, NULL);
-DECLARE_WORK(sharpsl_bat, sharpsl_battery_thread, NULL);
-
-
-static int get_percentage(int voltage)
-{
- int i = sharpsl_pm.machinfo->bat_levels - 1;
- struct battery_thresh *thresh;
-
- if (sharpsl_pm.charge_mode == CHRG_ON)
- thresh=sharpsl_pm.machinfo->bat_levels_acin;
- else
- thresh=sharpsl_pm.machinfo->bat_levels_noac;
-
- while (i > 0 && (voltage > thresh[i].voltage))
- i--;
-
- return thresh[i].percentage;
-}
-
-static int get_apm_status(int voltage)
-{
- int low_thresh, high_thresh;
-
- if (sharpsl_pm.charge_mode == CHRG_ON) {
- high_thresh = sharpsl_pm.machinfo->status_high_acin;
- low_thresh = sharpsl_pm.machinfo->status_low_acin;
- } else {
- high_thresh = sharpsl_pm.machinfo->status_high_noac;
- low_thresh = sharpsl_pm.machinfo->status_low_noac;
- }
-
- if (voltage >= high_thresh)
- return APM_BATTERY_STATUS_HIGH;
- if (voltage >= low_thresh)
- return APM_BATTERY_STATUS_LOW;
- return APM_BATTERY_STATUS_CRITICAL;
-}
-
-void sharpsl_battery_kick(void)
-{
- schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125));
-}
-EXPORT_SYMBOL(sharpsl_battery_kick);
-
-
-static void sharpsl_battery_thread(void *private_)
-{
- int voltage, percent, apm_status, i = 0;
-
- if (!sharpsl_pm.machinfo)
- return;
-
- sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_ONLINE : APM_AC_OFFLINE);
-
- /* Corgi cannot confirm when battery fully charged so periodically kick! */
- if (machine_is_corgi() && (sharpsl_pm.charge_mode == CHRG_ON)
- && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL))
- schedule_work(&toggle_charger);
-
- while(1) {
- voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
-
- if (voltage > 0) break;
- if (i++ > 5) {
- voltage = sharpsl_pm.machinfo->bat_levels_noac[0].voltage;
- dev_warn(sharpsl_pm.dev, "Warning: Cannot read main battery!\n");
- break;
- }
- }
-
- voltage = sharpsl_average_value(voltage);
- apm_status = get_apm_status(voltage);
- percent = get_percentage(voltage);
-
- /* At low battery voltages, the voltage has a tendency to start
- creeping back up so we try to avoid this here */
- if ((sharpsl_pm.battstat.ac_status == APM_AC_ONLINE) || (apm_status == APM_BATTERY_STATUS_HIGH) || percent <= sharpsl_pm.battstat.mainbat_percent) {
- sharpsl_pm.battstat.mainbat_voltage = voltage;
- sharpsl_pm.battstat.mainbat_status = apm_status;
- sharpsl_pm.battstat.mainbat_percent = percent;
- }
-
- dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %d\n", voltage,
- sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
-
- /* If battery is low. limit backlight intensity to save power. */
- if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
- && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
- (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) {
- if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) {
- corgibl_limit_intensity(1);
- sharpsl_pm.flags |= SHARPSL_BL_LIMIT;
- }
- } else if (sharpsl_pm.flags & SHARPSL_BL_LIMIT) {
- corgibl_limit_intensity(0);
- sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
- }
-
- /* Suspend if critical battery level */
- if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
- && (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL)
- && !(sharpsl_pm.flags & SHARPSL_APM_QUEUED)) {
- sharpsl_pm.flags |= SHARPSL_APM_QUEUED;
- dev_err(sharpsl_pm.dev, "Fatal Off\n");
- apm_queue_event(APM_CRITICAL_SUSPEND);
- }
-
- schedule_delayed_work(&sharpsl_bat, SHARPSL_BATCHK_TIME);
-}
-
-void sharpsl_pm_led(int val)
-{
- if (val == SHARPSL_LED_ERROR) {
- dev_err(sharpsl_pm.dev, "Charging Error!\n");
- } else if (val == SHARPSL_LED_ON) {
- dev_dbg(sharpsl_pm.dev, "Charge LED On\n");
-
- } else {
- dev_dbg(sharpsl_pm.dev, "Charge LED Off\n");
-
- }
-}
-
-static void sharpsl_charge_on(void)
-{
- dev_dbg(sharpsl_pm.dev, "Turning Charger On\n");
-
- sharpsl_pm.full_count = 0;
- sharpsl_pm.charge_mode = CHRG_ON;
- schedule_delayed_work(&toggle_charger, msecs_to_jiffies(250));
- schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(500));
-}
-
-static void sharpsl_charge_off(void)
-{
- dev_dbg(sharpsl_pm.dev, "Turning Charger Off\n");
-
- sharpsl_pm.machinfo->charge(0);
- sharpsl_pm_led(SHARPSL_LED_OFF);
- sharpsl_pm.charge_mode = CHRG_OFF;
-
- schedule_work(&sharpsl_bat);
-}
-
-static void sharpsl_charge_error(void)
-{
- sharpsl_pm_led(SHARPSL_LED_ERROR);
- sharpsl_pm.machinfo->charge(0);
- sharpsl_pm.charge_mode = CHRG_ERROR;
-}
-
-static void sharpsl_charge_toggle(void *private_)
-{
- dev_dbg(sharpsl_pm.dev, "Toogling Charger at time: %lx\n", jiffies);
-
- if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) {
- sharpsl_charge_off();
- return;
- } else if ((sharpsl_check_battery_temp() < 0) || (sharpsl_ac_check() < 0)) {
- sharpsl_charge_error();
- return;
- }
-
- sharpsl_pm_led(SHARPSL_LED_ON);
- sharpsl_pm.machinfo->charge(0);
- mdelay(SHARPSL_CHARGE_WAIT_TIME);
- sharpsl_pm.machinfo->charge(1);
-
- sharpsl_pm.charge_start_time = jiffies;
-}
-
-static void sharpsl_ac_timer(unsigned long data)
-{
- int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
-
- dev_dbg(sharpsl_pm.dev, "AC Status: %d\n",acin);
-
- sharpsl_average_clear();
- if (acin && (sharpsl_pm.charge_mode != CHRG_ON))
- sharpsl_charge_on();
- else if (sharpsl_pm.charge_mode == CHRG_ON)
- sharpsl_charge_off();
-
- schedule_work(&sharpsl_bat);
-}
-
-
-irqreturn_t sharpsl_ac_isr(int irq, void *dev_id, struct pt_regs *fp)
-{
- /* Delay the event slightly to debounce */
- /* Must be a smaller delay than the chrg_full_isr below */
- mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250));
-
- return IRQ_HANDLED;
-}
-
-static void sharpsl_chrg_full_timer(unsigned long data)
-{
- dev_dbg(sharpsl_pm.dev, "Charge Full at time: %lx\n", jiffies);
-
- sharpsl_pm.full_count++;
-
- if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) {
- dev_dbg(sharpsl_pm.dev, "Charge Full: AC removed - stop charging!\n");
- if (sharpsl_pm.charge_mode == CHRG_ON)
- sharpsl_charge_off();
- } else if (sharpsl_pm.full_count < 2) {
- dev_dbg(sharpsl_pm.dev, "Charge Full: Count too low\n");
- schedule_work(&toggle_charger);
- } else if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) {
- dev_dbg(sharpsl_pm.dev, "Charge Full: Interrupt generated too slowly - retry.\n");
- schedule_work(&toggle_charger);
- } else {
- sharpsl_charge_off();
- sharpsl_pm.charge_mode = CHRG_DONE;
- dev_dbg(sharpsl_pm.dev, "Charge Full: Charging Finished\n");
- }
-}
-
-/* Charging Finished Interrupt (Not present on Corgi) */
-/* Can trigger at the same time as an AC staus change so
- delay until after that has been processed */
-irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp)
-{
- if (sharpsl_pm.flags & SHARPSL_SUSPENDED)
- return IRQ_HANDLED;
-
- /* delay until after any ac interrupt */
- mod_timer(&sharpsl_pm.chrg_full_timer, jiffies + msecs_to_jiffies(500));
-
- return IRQ_HANDLED;
-}
-
-irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id, struct pt_regs *fp)
-{
- int is_fatal = 0;
-
- if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) {
- dev_err(sharpsl_pm.dev, "Battery now Unlocked! Suspending.\n");
- is_fatal = 1;
- }
-
- if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL)) {
- dev_err(sharpsl_pm.dev, "Fatal Batt Error! Suspending.\n");
- is_fatal = 1;
- }
-
- if (!(sharpsl_pm.flags & SHARPSL_APM_QUEUED) && is_fatal) {
- sharpsl_pm.flags |= SHARPSL_APM_QUEUED;
- apm_queue_event(APM_CRITICAL_SUSPEND);
- }
-
- return IRQ_HANDLED;
-}
-
-/*
- * Maintain an average of the last 10 readings
- */
-#define SHARPSL_CNV_VALUE_NUM 10
-static int sharpsl_ad_index;
-
-static void sharpsl_average_clear(void)
-{
- sharpsl_ad_index = 0;
-}
-
-static int sharpsl_average_value(int ad)
-{
- int i, ad_val = 0;
- static int sharpsl_ad[SHARPSL_CNV_VALUE_NUM+1];
-
- if (sharpsl_pm.battstat.mainbat_status != APM_BATTERY_STATUS_HIGH) {
- sharpsl_ad_index = 0;
- return ad;
- }
-
- sharpsl_ad[sharpsl_ad_index] = ad;
- sharpsl_ad_index++;
- if (sharpsl_ad_index >= SHARPSL_CNV_VALUE_NUM) {
- for (i=0; i < (SHARPSL_CNV_VALUE_NUM-1); i++)
- sharpsl_ad[i] = sharpsl_ad[i+1];
- sharpsl_ad_index = SHARPSL_CNV_VALUE_NUM - 1;
- }
- for (i=0; i < sharpsl_ad_index; i++)
- ad_val += sharpsl_ad[i];
-
- return (ad_val / sharpsl_ad_index);
-}
-
-/*
- * Take an array of 5 integers, remove the maximum and minimum values
- * and return the average.
- */
-static int get_select_val(int *val)
-{
- int i, j, k, temp, sum = 0;
-
- /* Find MAX val */
- temp = val[0];
- j=0;
- for (i=1; i<5; i++) {
- if (temp < val[i]) {
- temp = val[i];
- j = i;
- }
- }
-
- /* Find MIN val */
- temp = val[4];
- k=4;
- for (i=3; i>=0; i--) {
- if (temp > val[i]) {
- temp = val[i];
- k = i;
- }
- }
-
- for (i=0; i<5; i++)
- if (i != j && i != k )
- sum += val[i];
-
- dev_dbg(sharpsl_pm.dev, "Average: %d from values: %d, %d, %d, %d, %d\n", sum/3, val[0], val[1], val[2], val[3], val[4]);
-
- return (sum/3);
-}
-
-static int sharpsl_check_battery_temp(void)
-{
- int val, i, buff[5];
-
- /* Check battery temperature */
- for (i=0; i<5; i++) {
- mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP);
- sharpsl_pm.machinfo->measure_temp(1);
- mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP);
- buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_TEMP);
- sharpsl_pm.machinfo->measure_temp(0);
- }
-
- val = get_select_val(buff);
-
- dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val);
- if (val > SHARPSL_CHARGE_ON_TEMP)
- return -1;
-
- return 0;
-}
-
-static int sharpsl_check_battery_voltage(void)
-{
- int val, i, buff[5];
-
- /* disable charge, enable discharge */
- sharpsl_pm.machinfo->charge(0);
- sharpsl_pm.machinfo->discharge(1);
- mdelay(SHARPSL_WAIT_DISCHARGE_ON);
-
- if (sharpsl_pm.machinfo->discharge1)
- sharpsl_pm.machinfo->discharge1(1);
-
- /* Check battery voltage */
- for (i=0; i<5; i++) {
- buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
- mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
- }
-
- if (sharpsl_pm.machinfo->discharge1)
- sharpsl_pm.machinfo->discharge1(0);
-
- sharpsl_pm.machinfo->discharge(0);
-
- val = get_select_val(buff);
- dev_dbg(sharpsl_pm.dev, "Battery Voltage: %d\n", val);
-
- if (val < SHARPSL_CHARGE_ON_VOLT)
- return -1;
-
- return 0;
-}
-
-static int sharpsl_ac_check(void)
-{
- int temp, i, buff[5];
-
- for (i=0; i<5; i++) {
- buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT);
- mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN);
- }
-
- temp = get_select_val(buff);
- dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n",temp);
-
- if ((temp > SHARPSL_CHARGE_ON_ACIN_HIGH) || (temp < SHARPSL_CHARGE_ON_ACIN_LOW)) {
- dev_err(sharpsl_pm.dev, "Error: AC check failed.\n");
- return -1;
- }
-
- return 0;
-}
-
-#ifdef CONFIG_PM
-static int sharpsl_pm_suspend(struct platform_device *pdev, pm_message_t state)
-{
- sharpsl_pm.flags |= SHARPSL_SUSPENDED;
- flush_scheduled_work();
-
- if (sharpsl_pm.charge_mode == CHRG_ON)
- sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG;
- else
- sharpsl_pm.flags &= ~SHARPSL_DO_OFFLINE_CHRG;
-
- return 0;
-}
-
-static int sharpsl_pm_resume(struct platform_device *pdev)
-{
- /* Clear the reset source indicators as they break the bootloader upon reboot */
- RCSR = 0x0f;
- sharpsl_average_clear();
- sharpsl_pm.flags &= ~SHARPSL_APM_QUEUED;
- sharpsl_pm.flags &= ~SHARPSL_SUSPENDED;
-
- return 0;
-}
-
-static void corgi_goto_sleep(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state)
-{
- dev_dbg(sharpsl_pm.dev, "Time is: %08x\n",RCNR);
-
- dev_dbg(sharpsl_pm.dev, "Offline Charge Activate = %d\n",sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG);
- /* not charging and AC-IN! */
-
- if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN))) {
- dev_dbg(sharpsl_pm.dev, "Activating Offline Charger...\n");
- sharpsl_pm.charge_mode = CHRG_OFF;
- sharpsl_pm.flags &= ~SHARPSL_DO_OFFLINE_CHRG;
- sharpsl_off_charge_battery();
- }
-
- sharpsl_pm.machinfo->presuspend();
-
- PEDR = 0xffffffff; /* clear it */
-
- sharpsl_pm.flags &= ~SHARPSL_ALARM_ACTIVE;
- if ((sharpsl_pm.charge_mode == CHRG_ON) && ((alarm_enable && ((alarm_time - RCNR) > (SHARPSL_BATCHK_TIME_SUSPEND + 30))) || !alarm_enable)) {
- RTSR &= RTSR_ALE;
- RTAR = RCNR + SHARPSL_BATCHK_TIME_SUSPEND;
- dev_dbg(sharpsl_pm.dev, "Charging alarm at: %08x\n",RTAR);
- sharpsl_pm.flags |= SHARPSL_ALARM_ACTIVE;
- } else if (alarm_enable) {
- RTSR &= RTSR_ALE;
- RTAR = alarm_time;
- dev_dbg(sharpsl_pm.dev, "User alarm at: %08x\n",RTAR);
- } else {
- dev_dbg(sharpsl_pm.dev, "No alarms set.\n");
- }
-
- pxa_pm_enter(state);
-
- sharpsl_pm.machinfo->postsuspend();
-
- dev_dbg(sharpsl_pm.dev, "Corgi woken up from suspend: %08x\n",PEDR);
-}
-
-static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state)
-{
- if (!sharpsl_pm.machinfo->should_wakeup(!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE) && alarm_enable) )
- {
- if (!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE)) {
- dev_dbg(sharpsl_pm.dev, "No user triggered wakeup events and not charging. Strange. Suspend.\n");
- corgi_goto_sleep(alarm_time, alarm_enable, state);
- return 1;
- }
- if(sharpsl_off_charge_battery()) {
- dev_dbg(sharpsl_pm.dev, "Charging. Suspend...\n");
- corgi_goto_sleep(alarm_time, alarm_enable, state);
- return 1;
- }
- dev_dbg(sharpsl_pm.dev, "User triggered wakeup in offline charger.\n");
- }
-
- if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || (sharpsl_fatal_check() < 0) )
- {
- dev_err(sharpsl_pm.dev, "Fatal condition. Suspend.\n");
- corgi_goto_sleep(alarm_time, alarm_enable, state);
- return 1;
- }
-
- return 0;
-}
-
-static int corgi_pxa_pm_enter(suspend_state_t state)
-{
- unsigned long alarm_time = RTAR;
- unsigned int alarm_status = ((RTSR & RTSR_ALE) != 0);
-
- dev_dbg(sharpsl_pm.dev, "SharpSL suspending for first time.\n");
-
- corgi_goto_sleep(alarm_time, alarm_status, state);
-
- while (corgi_enter_suspend(alarm_time,alarm_status,state))
- {}
-
- dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n");
-
- return 0;
-}
-#endif
-
-
-/*
- * Check for fatal battery errors
- * Fatal returns -1
- */
-static int sharpsl_fatal_check(void)
-{
- int buff[5], temp, i, acin;
-
- dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n");
-
- /* Check AC-Adapter */
- acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
-
- if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
- sharpsl_pm.machinfo->charge(0);
- udelay(100);
- sharpsl_pm.machinfo->discharge(1); /* enable discharge */
- mdelay(SHARPSL_WAIT_DISCHARGE_ON);
- }
-
- if (sharpsl_pm.machinfo->discharge1)
- sharpsl_pm.machinfo->discharge1(1);
-
- /* Check battery : check inserting battery ? */
- for (i=0; i<5; i++) {
- buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
- mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
- }
-
- if (sharpsl_pm.machinfo->discharge1)
- sharpsl_pm.machinfo->discharge1(0);
-
- if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
- udelay(100);
- sharpsl_pm.machinfo->charge(1);
- sharpsl_pm.machinfo->discharge(0);
- }
-
- temp = get_select_val(buff);
- dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %d\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT));
-
- if ((acin && (temp < SHARPSL_FATAL_ACIN_VOLT)) ||
- (!acin && (temp < SHARPSL_FATAL_NOACIN_VOLT)))
- return -1;
- return 0;
-}
-
-static int sharpsl_off_charge_error(void)
-{
- dev_err(sharpsl_pm.dev, "Offline Charger: Error occured.\n");
- sharpsl_pm.machinfo->charge(0);
- sharpsl_pm_led(SHARPSL_LED_ERROR);
- sharpsl_pm.charge_mode = CHRG_ERROR;
- return 1;
-}
-
-/*
- * Charging Control while suspended
- * Return 1 - go straight to sleep
- * Return 0 - sleep or wakeup depending on other factors
- */
-static int sharpsl_off_charge_battery(void)
-{
- int time;
-
- dev_dbg(sharpsl_pm.dev, "Charge Mode: %d\n", sharpsl_pm.charge_mode);
-
- if (sharpsl_pm.charge_mode == CHRG_OFF) {
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Step 1\n");
-
- /* AC Check */
- if ((sharpsl_ac_check() < 0) || (sharpsl_check_battery_temp() < 0))
- return sharpsl_off_charge_error();
-
- /* Start Charging */
- sharpsl_pm_led(SHARPSL_LED_ON);
- sharpsl_pm.machinfo->charge(0);
- mdelay(SHARPSL_CHARGE_WAIT_TIME);
- sharpsl_pm.machinfo->charge(1);
-
- sharpsl_pm.charge_mode = CHRG_ON;
- sharpsl_pm.full_count = 0;
-
- return 1;
- } else if (sharpsl_pm.charge_mode != CHRG_ON) {
- return 1;
- }
-
- if (sharpsl_pm.full_count == 0) {
- int time;
-
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Step 2\n");
-
- if ((sharpsl_check_battery_temp() < 0) || (sharpsl_check_battery_voltage() < 0))
- return sharpsl_off_charge_error();
-
- sharpsl_pm.machinfo->charge(0);
- mdelay(SHARPSL_CHARGE_WAIT_TIME);
- sharpsl_pm.machinfo->charge(1);
- sharpsl_pm.charge_mode = CHRG_ON;
-
- mdelay(SHARPSL_CHARGE_CO_CHECK_TIME);
-
- time = RCNR;
- while(1) {
- /* Check if any wakeup event had occured */
- if (sharpsl_pm.machinfo->charger_wakeup() != 0)
- return 0;
- /* Check for timeout */
- if ((RCNR - time) > SHARPSL_WAIT_CO_TIME)
- return 1;
- if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) {
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Charge full occured. Retrying to check\n");
- sharpsl_pm.full_count++;
- sharpsl_pm.machinfo->charge(0);
- mdelay(SHARPSL_CHARGE_WAIT_TIME);
- sharpsl_pm.machinfo->charge(1);
- return 1;
- }
- }
- }
-
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Step 3\n");
-
- mdelay(SHARPSL_CHARGE_CO_CHECK_TIME);
-
- time = RCNR;
- while(1) {
- /* Check if any wakeup event had occured */
- if (sharpsl_pm.machinfo->charger_wakeup() != 0)
- return 0;
- /* Check for timeout */
- if ((RCNR-time) > SHARPSL_WAIT_CO_TIME) {
- if (sharpsl_pm.full_count > SHARPSL_CHARGE_RETRY_CNT) {
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Not charged sufficiently. Retrying.\n");
- sharpsl_pm.full_count = 0;
- }
- sharpsl_pm.full_count++;
- return 1;
- }
- if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) {
- dev_dbg(sharpsl_pm.dev, "Offline Charger: Charging complete.\n");
- sharpsl_pm_led(SHARPSL_LED_OFF);
- sharpsl_pm.machinfo->charge(0);
- sharpsl_pm.charge_mode = CHRG_DONE;
- return 1;
- }
- }
-}
-
-
-static ssize_t battery_percentage_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
- return sprintf(buf, "%d\n",sharpsl_pm.battstat.mainbat_percent);
-}
-
-static ssize_t battery_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
- return sprintf(buf, "%d\n",sharpsl_pm.battstat.mainbat_voltage);
-}
-
-static DEVICE_ATTR(battery_percentage, 0444, battery_percentage_show, NULL);
-static DEVICE_ATTR(battery_voltage, 0444, battery_voltage_show, NULL);
-
-extern void (*apm_get_power_status)(struct apm_power_info *);
-
-static void sharpsl_apm_get_power_status(struct apm_power_info *info)
-{
- info->ac_line_status = sharpsl_pm.battstat.ac_status;
-
- if (sharpsl_pm.charge_mode == CHRG_ON)
- info->battery_status = APM_BATTERY_STATUS_CHARGING;
- else
- info->battery_status = sharpsl_pm.battstat.mainbat_status;
-
- info->battery_flag = (1 << info->battery_status);
- info->battery_life = sharpsl_pm.battstat.mainbat_percent;
-}
-
-static struct pm_ops sharpsl_pm_ops = {
- .pm_disk_mode = PM_DISK_FIRMWARE,
- .prepare = pxa_pm_prepare,
- .enter = corgi_pxa_pm_enter,
- .finish = pxa_pm_finish,
-};
-
-static int __init sharpsl_pm_probe(struct platform_device *pdev)
-{
- if (!pdev->dev.platform_data)
- return -EINVAL;
-
- sharpsl_pm.dev = &pdev->dev;
- sharpsl_pm.machinfo = pdev->dev.platform_data;
- sharpsl_pm.charge_mode = CHRG_OFF;
- sharpsl_pm.flags = 0;
-
- init_timer(&sharpsl_pm.ac_timer);
- sharpsl_pm.ac_timer.function = sharpsl_ac_timer;
-
- init_timer(&sharpsl_pm.chrg_full_timer);
- sharpsl_pm.chrg_full_timer.function = sharpsl_chrg_full_timer;
-
- sharpsl_pm.machinfo->init();
-
- device_create_file(&pdev->dev, &dev_attr_battery_percentage);
- device_create_file(&pdev->dev, &dev_attr_battery_voltage);
-
- apm_get_power_status = sharpsl_apm_get_power_status;
-
- pm_set_ops(&sharpsl_pm_ops);
-
- mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250));
-
- return 0;
-}
-
-static int sharpsl_pm_remove(struct platform_device *pdev)
-{
- pm_set_ops(NULL);
-
- device_remove_file(&pdev->dev, &dev_attr_battery_percentage);
- device_remove_file(&pdev->dev, &dev_attr_battery_voltage);
-
- sharpsl_pm.machinfo->exit();
-
- del_timer_sync(&sharpsl_pm.chrg_full_timer);
- del_timer_sync(&sharpsl_pm.ac_timer);
-
- return 0;
-}
-
-static struct platform_driver sharpsl_pm_driver = {
- .probe = sharpsl_pm_probe,
- .remove = sharpsl_pm_remove,
- .suspend = sharpsl_pm_suspend,
- .resume = sharpsl_pm_resume,
- .driver = {
- .name = "sharpsl-pm",
- },
-};
-
-static int __devinit sharpsl_pm_init(void)
-{
- return platform_driver_register(&sharpsl_pm_driver);
-}
-
-static void sharpsl_pm_exit(void)
-{
- platform_driver_unregister(&sharpsl_pm_driver);
-}
-
-late_initcall(sharpsl_pm_init);
-module_exit(sharpsl_pm_exit);
diff --git a/trunk/arch/arm/configs/ixp4xx_defconfig b/trunk/arch/arm/configs/ixp4xx_defconfig
index 613afab62720..f74c926beb42 100644
--- a/trunk/arch/arm/configs/ixp4xx_defconfig
+++ b/trunk/arch/arm/configs/ixp4xx_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15
-# Tue Jan 3 03:20:40 2006
+# Linux kernel version: 2.6.14-rc1-git5
+# Tue Sep 20 17:26:28 2005
#
CONFIG_ARM=y
CONFIG_MMU=y
@@ -33,7 +33,6 @@ CONFIG_SYSCTL=y
CONFIG_KOBJECT_UEVENT=y
# CONFIG_IKCONFIG is not set
CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
@@ -43,6 +42,7 @@ CONFIG_BUG=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
@@ -61,23 +61,6 @@ CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
-#
-# Block layer
-#
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
#
# System Type
#
@@ -100,7 +83,6 @@ CONFIG_ARCH_IXP4XX=y
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_AAEC2000 is not set
@@ -120,7 +102,6 @@ CONFIG_MACH_IXDPG425=y
CONFIG_MACH_IXDP465=y
CONFIG_ARCH_IXCDP1100=y
CONFIG_ARCH_PRPMC1100=y
-CONFIG_MACH_NAS100D=y
CONFIG_ARCH_IXDP4XX=y
CONFIG_CPU_IXP46X=y
# CONFIG_MACH_GTWX5715 is not set
@@ -174,7 +155,6 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
CONFIG_ALIGNMENT_TRAP=y
#
@@ -193,7 +173,6 @@ CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs"
# At least one emulation must be selected
#
CONFIG_FPE_NWFPE=y
-# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
#
@@ -208,8 +187,6 @@ CONFIG_BINFMT_ELF=y
# Power management options
#
CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
CONFIG_APM=y
#
@@ -294,10 +271,6 @@ CONFIG_IP_VS_SH=m
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
# CONFIG_NETFILTER_NETLINK is not set
#
@@ -313,7 +286,6 @@ CONFIG_IP_NF_IRC=m
# CONFIG_IP_NF_NETBIOS_NS is not set
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
-# CONFIG_IP_NF_PPTP is not set
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
@@ -347,7 +319,6 @@ CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -409,18 +380,10 @@ CONFIG_ECONET=m
CONFIG_ECONET_AUNUDP=y
CONFIG_ECONET_NATIVE=y
CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CLK_JIFFIES=y
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set
@@ -434,10 +397,8 @@ CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
CONFIG_NET_CLS_TCINDEX=m
@@ -446,14 +407,13 @@ CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_CLS_U32_PERF is not set
+# CONFIG_NET_CLS_IND is not set
# CONFIG_CLS_U32_MARK is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_EMATCH is not set
# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y
-# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
#
# Network testing
@@ -476,11 +436,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-# CONFIG_CONNECTOR is not set
-
#
# Memory Technology Devices (MTD)
#
@@ -503,7 +458,6 @@ CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
-# CONFIG_RFD_FTL is not set
#
# RAM/ROM/Flash chip drivers
@@ -538,6 +492,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IXP4XX=y
+# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PLATRAM is not set
@@ -567,11 +522,6 @@ CONFIG_MTD_NAND_IDS=m
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_NANDSIM is not set
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
#
# Parallel port support
#
@@ -598,6 +548,14 @@ CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
# CONFIG_ATA_OVER_ETH is not set
#
@@ -710,7 +668,6 @@ CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_SMC91X is not set
# CONFIG_DM9000 is not set
@@ -782,7 +739,6 @@ CONFIG_NET_RADIO=y
#
# Wireless 802.11b ISA/PCI cards support
#
-# CONFIG_AIRO is not set
CONFIG_HERMES=y
# CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set
@@ -826,7 +782,6 @@ CONFIG_WAN_ROUTER_DRIVERS=y
#
# ATM drivers
#
-# CONFIG_ATM_DUMMY is not set
CONFIG_ATM_TCP=m
# CONFIG_ATM_LANAI is not set
# CONFIG_ATM_ENI is not set
@@ -947,7 +902,6 @@ CONFIG_IXP4XX_WATCHDOG=y
# TPM devices
#
# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
#
# I2C support
@@ -1000,7 +954,6 @@ CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
@@ -1082,10 +1035,6 @@ CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB is not set
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
#
# USB Gadget Support
#
@@ -1161,7 +1110,6 @@ CONFIG_RAMFS=y
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
-# CONFIG_JFFS2_SUMMARY is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
@@ -1242,9 +1190,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
CONFIG_FRAME_POINTER=y
-# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_ERRORS=y
diff --git a/trunk/arch/arm/kernel/Makefile b/trunk/arch/arm/kernel/Makefile
index de94b0f3ee2a..c11169b5ed9a 100644
--- a/trunk/arch/arm/kernel/Makefile
+++ b/trunk/arch/arm/kernel/Makefile
@@ -2,16 +2,15 @@
# Makefile for the linux kernel.
#
-AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
+AFLAGS_head.o := -DKERNEL_RAM_ADDR=$(TEXTADDR)
# Object file lists.
-obj-y := compat.o entry-armv.o entry-common.o irq.o \
+obj-y := compat.o dma.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o
obj-$(CONFIG_APM) += apm.o
-obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o
obj-$(CONFIG_FOOTBRIDGE) += isa.o
obj-$(CONFIG_FIQ) += fiq.o
diff --git a/trunk/arch/arm/kernel/apm.c b/trunk/arch/arm/kernel/apm.c
index b9df1b782bb1..a2843be05557 100644
--- a/trunk/arch/arm/kernel/apm.c
+++ b/trunk/arch/arm/kernel/apm.c
@@ -20,6 +20,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -80,7 +81,6 @@ struct apm_user {
*/
static int suspends_pending;
static int apm_disabled;
-static int arm_apm_active;
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
@@ -477,9 +477,9 @@ static int kapmd(void *arg)
apm_event_t event;
wait_event_interruptible(kapmd_wait,
- !queue_empty(&kapmd_queue) || !arm_apm_active);
+ !queue_empty(&kapmd_queue) || !pm_active);
- if (!arm_apm_active)
+ if (!pm_active)
break;
spin_lock_irq(&kapmd_queue_lock);
@@ -522,11 +522,16 @@ static int __init apm_init(void)
return -ENODEV;
}
- arm_apm_active = 1;
+ if (PM_IS_ACTIVE()) {
+ printk(KERN_NOTICE "apm: overridden by ACPI.\n");
+ return -EINVAL;
+ }
+
+ pm_active = 1;
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
if (ret < 0) {
- arm_apm_active = 0;
+ pm_active = 0;
return ret;
}
@@ -538,7 +543,7 @@ static int __init apm_init(void)
if (ret != 0) {
remove_proc_entry("apm", NULL);
- arm_apm_active = 0;
+ pm_active = 0;
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}
@@ -551,7 +556,7 @@ static void __exit apm_exit(void)
misc_deregister(&apm_device);
remove_proc_entry("apm", NULL);
- arm_apm_active = 0;
+ pm_active = 0;
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}
diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S
index 55076a75e5bf..2ad4aa2a1536 100644
--- a/trunk/arch/arm/kernel/calls.S
+++ b/trunk/arch/arm/kernel/calls.S
@@ -131,7 +131,7 @@ __syscall_start:
.long sys_wait4
/* 115 */ .long sys_swapoff
.long sys_sysinfo
- .long sys_ipc
+ .long sys_ipc_wrapper
.long sys_fsync
.long sys_sigreturn_wrapper
/* 120 */ .long sys_clone_wrapper
@@ -254,7 +254,7 @@ __syscall_start:
.long sys_fremovexattr
.long sys_tkill
.long sys_sendfile64
-/* 240 */ .long sys_futex
+/* 240 */ .long sys_futex_wrapper
.long sys_sched_setaffinity
.long sys_sched_getaffinity
.long sys_io_setup
@@ -284,7 +284,7 @@ __syscall_start:
.long sys_fstatfs64
.long sys_tgkill
.long sys_utimes
-/* 270 */ .long sys_arm_fadvise64_64
+/* 270 */ .long sys_arm_fadvise64_64_wrapper
.long sys_pciconfig_iobase
.long sys_pciconfig_read
.long sys_pciconfig_write
@@ -333,7 +333,7 @@ __syscall_start:
.long sys_inotify_init
.long sys_inotify_add_watch
.long sys_inotify_rm_watch
- .long sys_mbind
+ .long sys_mbind_wrapper
/* 320 */ .long sys_get_mempolicy
.long sys_set_mempolicy
__syscall_end:
diff --git a/trunk/arch/arm/kernel/dma-isa.c b/trunk/arch/arm/kernel/dma-isa.c
index 03532769a97f..e9a36304ec3e 100644
--- a/trunk/arch/arm/kernel/dma-isa.c
+++ b/trunk/arch/arm/kernel/dma-isa.c
@@ -18,7 +18,7 @@
*/
#include
#include
-#include
+#include
#include
#include
@@ -65,41 +65,37 @@ static void isa_enable_dma(dmach_t channel, dma_t *dma)
{
if (dma->invalid) {
unsigned long address, length;
- unsigned int mode;
- enum dma_data_direction direction;
+ unsigned int mode, direction;
mode = channel & 3;
switch (dma->dma_mode & DMA_MODE_MASK) {
case DMA_MODE_READ:
mode |= ISA_DMA_MODE_READ;
- direction = DMA_FROM_DEVICE;
+ direction = PCI_DMA_FROMDEVICE;
break;
case DMA_MODE_WRITE:
mode |= ISA_DMA_MODE_WRITE;
- direction = DMA_TO_DEVICE;
+ direction = PCI_DMA_TODEVICE;
break;
case DMA_MODE_CASCADE:
mode |= ISA_DMA_MODE_CASCADE;
- direction = DMA_BIDIRECTIONAL;
+ direction = PCI_DMA_BIDIRECTIONAL;
break;
default:
- direction = DMA_NONE;
+ direction = PCI_DMA_NONE;
break;
}
- if (!dma->sg) {
+ if (!dma->using_sg) {
/*
* Cope with ISA-style drivers which expect cache
* coherence.
*/
- dma->sg = &dma->buf;
- dma->sgcount = 1;
- dma->buf.length = dma->count;
- dma->buf.dma_address = dma_map_single(NULL,
- dma->addr, dma->count,
+ dma->buf.dma_address = pci_map_single(NULL,
+ dma->buf.__address, dma->buf.length,
direction);
}
diff --git a/trunk/arch/arm/kernel/dma.c b/trunk/arch/arm/kernel/dma.c
index 5a0f4bc5da95..2b7883884234 100644
--- a/trunk/arch/arm/kernel/dma.c
+++ b/trunk/arch/arm/kernel/dma.c
@@ -12,6 +12,8 @@
* DMA facilities.
*/
#include
+#include
+#include
#include
#include
#include
@@ -21,7 +23,8 @@
#include
DEFINE_SPINLOCK(dma_spin_lock);
-EXPORT_SYMBOL(dma_spin_lock);
+
+#if MAX_DMA_CHANNELS > 0
static dma_t dma_chan[MAX_DMA_CHANNELS];
@@ -78,7 +81,6 @@ int request_dma(dmach_t channel, const char *device_id)
busy:
return -EBUSY;
}
-EXPORT_SYMBOL(request_dma);
/*
* Free DMA channel
@@ -110,7 +112,6 @@ void free_dma(dmach_t channel)
bad_dma:
printk(KERN_ERR "dma: trying to free DMA%d\n", channel);
}
-EXPORT_SYMBOL(free_dma);
/* Set DMA Scatter-Gather list
*/
@@ -124,15 +125,15 @@ void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg)
dma->sg = sg;
dma->sgcount = nr_sg;
+ dma->using_sg = 1;
dma->invalid = 1;
}
-EXPORT_SYMBOL(set_dma_sg);
/* Set DMA address
*
* Copy address to the structure, and set the invalid bit
*/
-void __set_dma_addr (dmach_t channel, void *addr)
+void set_dma_addr (dmach_t channel, unsigned long physaddr)
{
dma_t *dma = dma_chan + channel;
@@ -140,11 +141,12 @@ void __set_dma_addr (dmach_t channel, void *addr)
printk(KERN_ERR "dma%d: altering DMA address while "
"DMA active\n", channel);
- dma->sg = NULL;
- dma->addr = addr;
+ dma->sg = &dma->buf;
+ dma->sgcount = 1;
+ dma->buf.__address = bus_to_virt(physaddr);
+ dma->using_sg = 0;
dma->invalid = 1;
}
-EXPORT_SYMBOL(__set_dma_addr);
/* Set DMA byte count
*
@@ -158,11 +160,12 @@ void set_dma_count (dmach_t channel, unsigned long count)
printk(KERN_ERR "dma%d: altering DMA count while "
"DMA active\n", channel);
- dma->sg = NULL;
- dma->count = count;
+ dma->sg = &dma->buf;
+ dma->sgcount = 1;
+ dma->buf.length = count;
+ dma->using_sg = 0;
dma->invalid = 1;
}
-EXPORT_SYMBOL(set_dma_count);
/* Set DMA direction mode
*/
@@ -177,7 +180,6 @@ void set_dma_mode (dmach_t channel, dmamode_t mode)
dma->dma_mode = mode;
dma->invalid = 1;
}
-EXPORT_SYMBOL(set_dma_mode);
/* Enable DMA channel
*/
@@ -198,7 +200,6 @@ void enable_dma (dmach_t channel)
printk(KERN_ERR "dma%d: trying to enable free DMA\n", channel);
BUG();
}
-EXPORT_SYMBOL(enable_dma);
/* Disable DMA channel
*/
@@ -219,7 +220,6 @@ void disable_dma (dmach_t channel)
printk(KERN_ERR "dma%d: trying to disable free DMA\n", channel);
BUG();
}
-EXPORT_SYMBOL(disable_dma);
/*
* Is the specified DMA channel active?
@@ -233,7 +233,6 @@ void set_dma_page(dmach_t channel, char pagenr)
{
printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel);
}
-EXPORT_SYMBOL(set_dma_page);
void set_dma_speed(dmach_t channel, int cycle_ns)
{
@@ -244,7 +243,6 @@ void set_dma_speed(dmach_t channel, int cycle_ns)
ret = dma->d_ops->setspeed(channel, dma, cycle_ns);
dma->speed = ret;
}
-EXPORT_SYMBOL(set_dma_speed);
int get_dma_residue(dmach_t channel)
{
@@ -256,12 +254,49 @@ int get_dma_residue(dmach_t channel)
return ret;
}
-EXPORT_SYMBOL(get_dma_residue);
-static int __init init_dma(void)
+void __init init_dma(void)
{
arch_dma_init(dma_chan);
+}
+
+#else
+
+int request_dma(dmach_t channel, const char *device_id)
+{
+ return -EINVAL;
+}
+
+int get_dma_residue(dmach_t channel)
+{
return 0;
}
-core_initcall(init_dma);
+#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a)
+GLOBAL_ALIAS(disable_dma, get_dma_residue);
+GLOBAL_ALIAS(enable_dma, get_dma_residue);
+GLOBAL_ALIAS(free_dma, get_dma_residue);
+GLOBAL_ALIAS(get_dma_list, get_dma_residue);
+GLOBAL_ALIAS(set_dma_mode, get_dma_residue);
+GLOBAL_ALIAS(set_dma_page, get_dma_residue);
+GLOBAL_ALIAS(set_dma_count, get_dma_residue);
+GLOBAL_ALIAS(set_dma_addr, get_dma_residue);
+GLOBAL_ALIAS(set_dma_sg, get_dma_residue);
+GLOBAL_ALIAS(set_dma_speed, get_dma_residue);
+GLOBAL_ALIAS(init_dma, get_dma_residue);
+
+#endif
+
+EXPORT_SYMBOL(request_dma);
+EXPORT_SYMBOL(free_dma);
+EXPORT_SYMBOL(enable_dma);
+EXPORT_SYMBOL(disable_dma);
+EXPORT_SYMBOL(set_dma_addr);
+EXPORT_SYMBOL(set_dma_count);
+EXPORT_SYMBOL(set_dma_mode);
+EXPORT_SYMBOL(set_dma_page);
+EXPORT_SYMBOL(get_dma_residue);
+EXPORT_SYMBOL(set_dma_sg);
+EXPORT_SYMBOL(set_dma_speed);
+
+EXPORT_SYMBOL(dma_spin_lock);
diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S
index a52baedf6262..d9fb819bf7cc 100644
--- a/trunk/arch/arm/kernel/entry-armv.S
+++ b/trunk/arch/arm/kernel/entry-armv.S
@@ -18,6 +18,8 @@
#include
#include
#include
+#include /* should be moved into entry-macro.S */
+#include /* should be moved into entry-macro.S */
#include
#include "entry-header.S"
@@ -609,47 +611,6 @@ ENTRY(__switch_to)
.globl __kuser_helper_start
__kuser_helper_start:
-/*
- * Reference prototype:
- *
- * void __kernel_memory_barrier(void)
- *
- * Input:
- *
- * lr = return address
- *
- * Output:
- *
- * none
- *
- * Clobbered:
- *
- * the Z flag might be lost
- *
- * Definition and user space usage example:
- *
- * typedef void (__kernel_dmb_t)(void);
- * #define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0)
- *
- * Apply any needed memory barrier to preserve consistency with data modified
- * manually and __kuser_cmpxchg usage.
- *
- * This could be used as follows:
- *
- * #define __kernel_dmb() \
- * asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \
- * : : : "lr","cc" )
- */
-
-__kuser_memory_barrier: @ 0xffff0fa0
-
-#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP)
- mcr p15, 0, r0, c7, c10, 5 @ dmb
-#endif
- mov pc, lr
-
- .align 5
-
/*
* Reference prototype:
*
@@ -681,8 +642,6 @@ __kuser_memory_barrier: @ 0xffff0fa0
* The C flag is also set if *ptr was changed to allow for assembly
* optimization in the calling code.
*
- * Note: this routine already includes memory barriers as needed.
- *
* For example, a user space atomic_add implementation could look like this:
*
* #define atomic_add(ptr, val) \
@@ -739,16 +698,10 @@ __kuser_cmpxchg: @ 0xffff0fc0
#else
-#ifdef CONFIG_SMP
- mcr p15, 0, r0, c7, c10, 5 @ dmb
-#endif
ldrex r3, [r2]
subs r3, r3, r0
strexeq r3, r1, [r2]
rsbs r0, r3, #0
-#ifdef CONFIG_SMP
- mcr p15, 0, r0, c7, c10, 5 @ dmb
-#endif
mov pc, lr
#endif
diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S
index e2b42997ad33..f7f183075237 100644
--- a/trunk/arch/arm/kernel/entry-common.S
+++ b/trunk/arch/arm/kernel/entry-common.S
@@ -145,7 +145,7 @@ ENTRY(vector_swi)
#endif
enable_irq
- stmdb sp!, {r4, r5} @ push fifth and sixth args
+ str r4, [sp, #-S_OFF]! @ push fifth arg
get_thread_info tsk
ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
@@ -204,7 +204,7 @@ ENTRY(sys_call_table)
* Special system call wrappers
*/
@ r0 = syscall number
-@ r8 = syscall table
+@ r5 = syscall table
.type sys_syscall, #function
sys_syscall:
eor scno, r0, #__NR_SYSCALL_BASE
@@ -255,6 +255,22 @@ sys_sigaltstack_wrapper:
ldr r2, [sp, #S_OFF + S_SP]
b do_sigaltstack
+sys_futex_wrapper:
+ str r5, [sp, #4] @ push sixth arg
+ b sys_futex
+
+sys_arm_fadvise64_64_wrapper:
+ str r5, [sp, #4] @ push r5 to stack
+ b sys_arm_fadvise64_64
+
+sys_mbind_wrapper:
+ str r5, [sp, #4]
+ b sys_mbind
+
+sys_ipc_wrapper:
+ str r5, [sp, #4] @ push sixth arg
+ b sys_ipc
+
/*
* Note: off_4k (r5) is always units of 4K. If we can't do the requested
* offset, we return EINVAL.
diff --git a/trunk/arch/arm/kernel/head.S b/trunk/arch/arm/kernel/head.S
index 1e985f2cd70f..d7d69fd7039f 100644
--- a/trunk/arch/arm/kernel/head.S
+++ b/trunk/arch/arm/kernel/head.S
@@ -33,8 +33,6 @@
#define MACHINFO_PGOFFIO 12
#define MACHINFO_NAME 16
-#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET)
-
/*
* swapper_pg_dir is the virtual address of the initial page table.
* We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must
diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c
index 869c466e6258..d7099dbbb879 100644
--- a/trunk/arch/arm/kernel/irq.c
+++ b/trunk/arch/arm/kernel/irq.c
@@ -1027,6 +1027,7 @@ void __init init_irq_proc(void)
void __init init_IRQ(void)
{
struct irqdesc *desc;
+ extern void init_dma(void);
int irq;
#ifdef CONFIG_SMP
@@ -1040,6 +1041,7 @@ void __init init_IRQ(void)
}
init_arch_irq();
+ init_dma();
}
static int __init noirqdebug_setup(char *str)
diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c
index 055bf5d28894..6055e1427ba3 100644
--- a/trunk/arch/arm/kernel/module.c
+++ b/trunk/arch/arm/kernel/module.c
@@ -101,8 +101,6 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
break;
case R_ARM_PC24:
- case R_ARM_CALL:
- case R_ARM_JUMP24:
offset = (*(u32 *)loc & 0x00ffffff) << 2;
if (offset & 0x02000000)
offset -= 0x04000000;
diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c
index 54a21bdcba5c..30494aab829a 100644
--- a/trunk/arch/arm/kernel/process.c
+++ b/trunk/arch/arm/kernel/process.c
@@ -28,9 +28,10 @@
#include
#include
+#include
+#include
#include
#include
-#include
#include
#include
diff --git a/trunk/arch/arm/kernel/ptrace.c b/trunk/arch/arm/kernel/ptrace.c
index 2b84f78d7b0f..9a340e790da5 100644
--- a/trunk/arch/arm/kernel/ptrace.c
+++ b/trunk/arch/arm/kernel/ptrace.c
@@ -242,15 +242,6 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
*/
long aluop1, aluop2, ccbit;
- if ((insn & 0x0fffffd0) == 0x012fff10) {
- /*
- * bx or blx
- */
- alt = get_user_reg(child, insn & 15);
- break;
- }
-
-
if ((insn & 0xf000) != 0xf000)
break;
diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c
index 2cab741ad0f8..85774165e9fd 100644
--- a/trunk/arch/arm/kernel/setup.c
+++ b/trunk/arch/arm/kernel/setup.c
@@ -26,6 +26,8 @@
#include
#include
+#include
+#include
#include
#include
#include
diff --git a/trunk/arch/arm/kernel/time.c b/trunk/arch/arm/kernel/time.c
index d7d932c02866..fc4729106a32 100644
--- a/trunk/arch/arm/kernel/time.c
+++ b/trunk/arch/arm/kernel/time.c
@@ -29,6 +29,9 @@
#include
#include
+#include
+#include
+#include
#include
#include
#include
diff --git a/trunk/arch/arm/kernel/traps.c b/trunk/arch/arm/kernel/traps.c
index c9fe6f5f7ee3..45e9ea6cd2a5 100644
--- a/trunk/arch/arm/kernel/traps.c
+++ b/trunk/arch/arm/kernel/traps.c
@@ -23,6 +23,7 @@
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/arm/kernel/vmlinux.lds.S b/trunk/arch/arm/kernel/vmlinux.lds.S
index 2b254e88595c..9a47770114d4 100644
--- a/trunk/arch/arm/kernel/vmlinux.lds.S
+++ b/trunk/arch/arm/kernel/vmlinux.lds.S
@@ -17,13 +17,15 @@ jiffies = jiffies_64;
jiffies = jiffies_64 + 4;
#endif
-SECTIONS
-{
#ifdef CONFIG_XIP_KERNEL
- . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
+#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
#else
- . = PAGE_OFFSET + TEXT_OFFSET;
+#define TEXTADDR KERNEL_RAM_ADDR
#endif
+
+SECTIONS
+{
+ . = TEXTADDR;
.init : { /* Init code and data */
_stext = .;
_sinittext = .;
@@ -102,7 +104,7 @@ SECTIONS
#ifdef CONFIG_XIP_KERNEL
__data_loc = ALIGN(4); /* location in binary */
- . = PAGE_OFFSET + TEXT_OFFSET;
+ . = KERNEL_RAM_ADDR;
#else
. = ALIGN(THREAD_SIZE);
__data_loc = .;
diff --git a/trunk/arch/arm/mach-aaec2000/clock.c b/trunk/arch/arm/mach-aaec2000/clock.c
index 1c84c60941e1..0340ddc4824e 100644
--- a/trunk/arch/arm/mach-aaec2000/clock.c
+++ b/trunk/arch/arm/mach-aaec2000/clock.c
@@ -15,9 +15,9 @@
#include
#include
#include
-#include
#include
+#include
#include "clock.h"
@@ -58,6 +58,17 @@ void clk_disable(struct clk *clk)
}
EXPORT_SYMBOL(clk_disable);
+int clk_use(struct clk *clk)
+{
+ return 0;
+}
+EXPORT_SYMBOL(clk_use);
+
+void clk_unuse(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_unuse);
+
unsigned long clk_get_rate(struct clk *clk)
{
return clk->rate;
diff --git a/trunk/arch/arm/mach-aaec2000/core.c b/trunk/arch/arm/mach-aaec2000/core.c
index dce4815cf53c..4e706d9ad368 100644
--- a/trunk/arch/arm/mach-aaec2000/core.c
+++ b/trunk/arch/arm/mach-aaec2000/core.c
@@ -20,11 +20,11 @@
#include
#include
#include
-#include
#include
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/arm/mach-aaec2000/core.h b/trunk/arch/arm/mach-aaec2000/core.h
index b6029a95f19c..daefc0ea14a1 100644
--- a/trunk/arch/arm/mach-aaec2000/core.h
+++ b/trunk/arch/arm/mach-aaec2000/core.h
@@ -9,7 +9,7 @@
*
*/
-#include
+#include
struct sys_timer;
diff --git a/trunk/arch/arm/mach-clps711x/dma.c b/trunk/arch/arm/mach-clps711x/dma.c
new file mode 100644
index 000000000000..af5a4de38eac
--- /dev/null
+++ b/trunk/arch/arm/mach-clps711x/dma.c
@@ -0,0 +1,27 @@
+/*
+ * linux/arch/arm/mach-clps711x/dma.c
+ *
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+
+#include
+#include
+
+void __init arch_dma_init(dma_t *dma)
+{
+}
diff --git a/trunk/arch/arm/mach-epxa10db/dma.c b/trunk/arch/arm/mach-epxa10db/dma.c
new file mode 100644
index 000000000000..0151e9f1c066
--- /dev/null
+++ b/trunk/arch/arm/mach-epxa10db/dma.c
@@ -0,0 +1,28 @@
+/*
+ * linux/arch/arm/mach-epxa10db/dma.c
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+
+#include
+#include
+
+void __init arch_dma_init(dma_t *dma)
+{
+}
diff --git a/trunk/arch/arm/mach-footbridge/dma.c b/trunk/arch/arm/mach-footbridge/dma.c
index 7a54578b51af..a6b1396b0951 100644
--- a/trunk/arch/arm/mach-footbridge/dma.c
+++ b/trunk/arch/arm/mach-footbridge/dma.c
@@ -15,7 +15,6 @@
#include
#include
-#include
#include
#include
diff --git a/trunk/arch/arm/mach-imx/mx1ads.c b/trunk/arch/arm/mach-imx/mx1ads.c
index c9e0cd8ed016..708e1b3faa14 100644
--- a/trunk/arch/arm/mach-imx/mx1ads.c
+++ b/trunk/arch/arm/mach-imx/mx1ads.c
@@ -29,27 +29,27 @@
#include "generic.h"
#include
-static struct resource cs89x0_resources[] = {
+static struct resource mx1ads_resources[] = {
[0] = {
- .start = IMX_CS4_PHYS + 0x300,
- .end = IMX_CS4_PHYS + 0x300 + 16,
+ .start = IMX_CS4_VIRT,
+ .end = IMX_CS4_VIRT + 16,
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = IRQ_GPIOC(17),
- .end = IRQ_GPIOC(17),
+ .start = 13,
+ .end = 13,
.flags = IORESOURCE_IRQ,
},
};
-static struct platform_device cs89x0_device = {
- .name = "cirrus-cs89x0",
- .num_resources = ARRAY_SIZE(cs89x0_resources),
- .resource = cs89x0_resources,
+static struct platform_device mx1ads_device = {
+ .name = "mx1ads",
+ .num_resources = ARRAY_SIZE(mx1ads_resources),
+ .resource = mx1ads_resources,
};
static struct platform_device *devices[] __initdata = {
- &cs89x0_device,
+ &mx1ads_device,
};
static void __init
@@ -61,10 +61,45 @@ mx1ads_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
}
+static struct map_desc mx1ads_io_desc[] __initdata = {
+ {
+ .virtual = IMX_CS0_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS0_PHYS),
+ .length = IMX_CS0_SIZE,
+ .type = MT_DEVICE
+ }, {
+ .virtual = IMX_CS1_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS1_PHYS),
+ .length = IMX_CS1_SIZE,
+ .type = MT_DEVICE
+ }, {
+ .virtual = IMX_CS2_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS2_PHYS),
+ .length = IMX_CS2_SIZE,
+ .type = MT_DEVICE
+ }, {
+ .virtual = IMX_CS3_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS3_PHYS),
+ .length = IMX_CS3_SIZE,
+ .type = MT_DEVICE
+ }, {
+ .virtual = IMX_CS4_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS4_PHYS),
+ .length = IMX_CS4_SIZE,
+ .type = MT_DEVICE
+ }, {
+ .virtual = IMX_CS5_VIRT,
+ .pfn = __phys_to_pfn(IMX_CS5_PHYS),
+ .length = IMX_CS5_SIZE,
+ .type = MT_DEVICE
+ }
+};
+
static void __init
mx1ads_map_io(void)
{
imx_map_io();
+ iotable_init(mx1ads_io_desc, ARRAY_SIZE(mx1ads_io_desc));
}
MACHINE_START(MX1ADS, "Motorola MX1ADS")
diff --git a/trunk/arch/arm/mach-integrator/clock.c b/trunk/arch/arm/mach-integrator/clock.c
index 40684e01e865..73c360685cad 100644
--- a/trunk/arch/arm/mach-integrator/clock.c
+++ b/trunk/arch/arm/mach-integrator/clock.c
@@ -14,9 +14,9 @@
#include
#include
#include
-#include
#include
+#include
#include
#include "clock.h"
@@ -58,6 +58,17 @@ void clk_disable(struct clk *clk)
}
EXPORT_SYMBOL(clk_disable);
+int clk_use(struct clk *clk)
+{
+ return 0;
+}
+EXPORT_SYMBOL(clk_use);
+
+void clk_unuse(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_unuse);
+
unsigned long clk_get_rate(struct clk *clk)
{
return clk->rate;
diff --git a/trunk/arch/arm/mach-integrator/core.c b/trunk/arch/arm/mach-integrator/core.c
index 20071a2767cc..dacbf504dae2 100644
--- a/trunk/arch/arm/mach-integrator/core.c
+++ b/trunk/arch/arm/mach-integrator/core.c
@@ -15,11 +15,11 @@
#include
#include
#include
-#include
#include
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-integrator/dma.c b/trunk/arch/arm/mach-integrator/dma.c
new file mode 100644
index 000000000000..aae6f23cd72b
--- /dev/null
+++ b/trunk/arch/arm/mach-integrator/dma.c
@@ -0,0 +1,35 @@
+/*
+ * linux/arch/arm/mach-integrator/dma.c
+ *
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+void __init arch_dma_init(dma_t *dma)
+{
+}
diff --git a/trunk/arch/arm/mach-integrator/impd1.c b/trunk/arch/arm/mach-integrator/impd1.c
index a85d471c5bfa..a4bafee77a06 100644
--- a/trunk/arch/arm/mach-integrator/impd1.c
+++ b/trunk/arch/arm/mach-integrator/impd1.c
@@ -18,11 +18,11 @@
#include
#include
#include
-#include
-#include
#include
#include