diff --git a/[refs] b/[refs]
index 46b520cc2b53..aa45cae8e127 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: 466c19063b4b426d5c362572787cb249fbf4296b
+refs/heads/master: 728674a7e466628df2aeec6d11a2ae1ef968fb67
diff --git a/trunk/Documentation/ABI/stable/thermal-notification b/trunk/Documentation/ABI/stable/thermal-notification
deleted file mode 100644
index 9723e8b7aeb3..000000000000
--- a/trunk/Documentation/ABI/stable/thermal-notification
+++ /dev/null
@@ -1,4 +0,0 @@
-What: A notification mechanism for thermal related events
-Description:
- This interface enables notification for thermal related events.
- The notification is in the form of a netlink event.
diff --git a/trunk/Documentation/DocBook/80211.tmpl b/trunk/Documentation/DocBook/80211.tmpl
index 8906648f962b..03641a08e275 100644
--- a/trunk/Documentation/DocBook/80211.tmpl
+++ b/trunk/Documentation/DocBook/80211.tmpl
@@ -268,6 +268,10 @@
!Finclude/net/mac80211.h ieee80211_ops
!Finclude/net/mac80211.h ieee80211_alloc_hw
!Finclude/net/mac80211.h ieee80211_register_hw
+!Finclude/net/mac80211.h ieee80211_get_tx_led_name
+!Finclude/net/mac80211.h ieee80211_get_rx_led_name
+!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
+!Finclude/net/mac80211.h ieee80211_get_radio_led_name
!Finclude/net/mac80211.h ieee80211_unregister_hw
!Finclude/net/mac80211.h ieee80211_free_hw
@@ -378,23 +382,6 @@
-
- LED support
-
- Mac80211 supports various ways of blinking LEDs. Wherever possible,
- device LEDs should be exposed as LED class devices and hooked up to
- the appropriate trigger, which will then be triggered appropriately
- by mac80211.
-
-!Finclude/net/mac80211.h ieee80211_get_tx_led_name
-!Finclude/net/mac80211.h ieee80211_get_rx_led_name
-!Finclude/net/mac80211.h ieee80211_get_assoc_led_name
-!Finclude/net/mac80211.h ieee80211_get_radio_led_name
-!Finclude/net/mac80211.h ieee80211_tpt_blink
-!Finclude/net/mac80211.h ieee80211_tpt_led_trigger_flags
-!Finclude/net/mac80211.h ieee80211_create_tpt_led_trigger
-
-
Hardware crypto acceleration
!Pinclude/net/mac80211.h Hardware crypto acceleration
diff --git a/trunk/Documentation/IPMI.txt b/trunk/Documentation/IPMI.txt
index b2bea15137d2..69dd29ed824e 100644
--- a/trunk/Documentation/IPMI.txt
+++ b/trunk/Documentation/IPMI.txt
@@ -533,33 +533,6 @@ completion during sending a panic event.
Other Pieces
------------
-Get the detailed info related with the IPMI device
---------------------------------------------------
-
-Some users need more detailed information about a device, like where
-the address came from or the raw base device for the IPMI interface.
-You can use the IPMI smi_watcher to catch the IPMI interfaces as they
-come or go, and to grab the information, you can use the function
-ipmi_get_smi_info(), which returns the following structure:
-
-struct ipmi_smi_info {
- enum ipmi_addr_src addr_src;
- struct device *dev;
- union {
- struct {
- void *acpi_handle;
- } acpi_info;
- } addr_info;
-};
-
-Currently special info for only for SI_ACPI address sources is
-returned. Others may be added as necessary.
-
-Note that the dev pointer is included in the above structure, and
-assuming ipmi_smi_get_info returns success, you must call put_device
-on the dev pointer.
-
-
Watchdog
--------
diff --git a/trunk/Documentation/acpi/apei/output_format.txt b/trunk/Documentation/acpi/apei/output_format.txt
deleted file mode 100644
index 9146952c612a..000000000000
--- a/trunk/Documentation/acpi/apei/output_format.txt
+++ /dev/null
@@ -1,122 +0,0 @@
- APEI output format
- ~~~~~~~~~~~~~~~~~~
-
-APEI uses printk as hardware error reporting interface, the output
-format is as follow.
-
- :=
-APEI generic hardware error status
-severity: ,
-section: , severity: ,
-flags:
-
-fru_id:
-fru_text:
-section_type:
-
-
-* := recoverable | fatal | corrected | info
-
-# :=
-[primary][, containment warning][, reset][, threshold exceeded]\
-[, resource not accessible][, latent error]
-
- := generic processor error | memory error | \
-PCIe error | unknown,
-
- :=
- | | \
- |
-
- :=
-[processor_type: , ]
-[processor_isa: , ]
-[error_type:
-]
-[operation: , ]
-[flags:
-]
-[level: ]
-[version_info: ]
-[processor_id: ]
-[target_address: ]
-[requestor_id: ]
-[responder_id: ]
-[IP: ]
-
-* := IA32/X64 | IA64
-
-* := IA32 | IA64 | X64
-
-# :=
-[cache error][, TLB error][, bus error][, micro-architectural error]
-
-* := unknown or generic | data read | data write | \
-instruction execution
-
-# :=
-[restartable][, precise IP][, overflow][, corrected]
-
- :=
-[error_status: ]
-[physical_address: ]
-[physical_address_mask: ]
-[node: ]
-[card: ]
-[module: ]
-[bank: ]
-[device: ]
-[row: ]
-[column: ]
-[bit_position: ]
-[requestor_id: ]
-[responder_id: ]
-[target_id: ]
-[error_type: , ]
-
-* :=
-unknown | no error | single-bit ECC | multi-bit ECC | \
-single-symbol chipkill ECC | multi-symbol chipkill ECC | master abort | \
-target abort | parity error | watchdog timeout | invalid address | \
-mirror Broken | memory sparing | scrub corrected error | \
-scrub uncorrected error
-
- :=
-[port_type: , ]
-[version: .]
-[command: , status: ]
-[device_id: ::.
-slot:
-secondary_bus:
-vendor_id: , device_id:
-class_code: ]
-[serial number: , ]
-[bridge: secondary_status: , control: ]
-
-* := PCIe end point | legacy PCI end point | \
-unknown | unknown | root port | upstream switch port | \
-downstream switch port | PCIe to PCI/PCI-X bridge | \
-PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \
-root complex event collector
-
-Where, [] designate corresponding content is optional
-
-All description with * has the following format:
-
-field: ,
-
-Where value of should be the position of "string" in description. Otherwise, will be "unknown".
-
-All description with # has the following format:
-
-field:
-
-
-Where each string in corresponding to one set bit of
-. The bit position is the position of "string" in description.
-
-For more detailed explanation of every field, please refer to UEFI
-specification version 2.3 or later, section Appendix N: Common
-Platform Error Record.
diff --git a/trunk/Documentation/cgroups/blkio-controller.txt b/trunk/Documentation/cgroups/blkio-controller.txt
index 4ed7b5ceeed2..d6da611f8f63 100644
--- a/trunk/Documentation/cgroups/blkio-controller.txt
+++ b/trunk/Documentation/cgroups/blkio-controller.txt
@@ -89,33 +89,6 @@ Throttling/Upper Limit policy
Limits for writes can be put using blkio.write_bps_device file.
-Hierarchical Cgroups
-====================
-- Currently none of the IO control policy supports hierarhical groups. But
- cgroup interface does allow creation of hierarhical cgroups and internally
- IO policies treat them as flat hierarchy.
-
- So this patch will allow creation of cgroup hierarhcy but at the backend
- everything will be treated as flat. So if somebody created a hierarchy like
- as follows.
-
- root
- / \
- test1 test2
- |
- test3
-
- CFQ and throttling will practically treat all groups at same level.
-
- pivot
- / | \ \
- root test1 test2 test3
-
- Down the line we can implement hierarchical accounting/control support
- and also introduce a new cgroup file "use_hierarchy" which will control
- whether cgroup hierarchy is viewed as flat or hierarchical by the policy..
- This is how memory controller also has implemented the things.
-
Various user visible config options
===================================
CONFIG_BLK_CGROUP
diff --git a/trunk/Documentation/device-mapper/dm-crypt.txt b/trunk/Documentation/device-mapper/dm-crypt.txt
index 59293ac4a5d0..524de926290d 100644
--- a/trunk/Documentation/device-mapper/dm-crypt.txt
+++ b/trunk/Documentation/device-mapper/dm-crypt.txt
@@ -8,7 +8,7 @@ Parameters:
Encryption cipher and an optional IV generation mode.
- (In format cipher[:keycount]-chainmode-ivopts:ivmode).
+ (In format cipher-chainmode-ivopts:ivmode).
Examples:
des
aes-cbc-essiv:sha256
@@ -20,11 +20,6 @@ Parameters:
Key used for encryption. It is encoded as a hexadecimal number.
You can only use key sizes that are valid for the selected cipher.
-
- Multi-key compatibility mode. You can define keys and
- then sectors are encrypted according to their offsets (sector 0 uses key0;
- sector 1 uses key1 etc.). must be a power of two.
-
The IV offset is a sector count that is added to the sector number
before creating the IV.
diff --git a/trunk/Documentation/device-mapper/dm-raid.txt b/trunk/Documentation/device-mapper/dm-raid.txt
deleted file mode 100644
index 33b6b7071ac8..000000000000
--- a/trunk/Documentation/device-mapper/dm-raid.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-Device-mapper RAID (dm-raid) is a bridge from DM to MD. It
-provides a way to use device-mapper interfaces to access the MD RAID
-drivers.
-
-As with all device-mapper targets, the nominal public interfaces are the
-constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO
-and STATUSTYPE_TABLE). The CTR table looks like the following:
-
-1: raid \
-2: <#raid_params> \
-3: <#raid_devs> ..
-
-Line 1 contains the standard first three arguments to any device-mapper
-target - the start, length, and target type fields. The target type in
-this case is "raid".
-
-Line 2 contains the arguments that define the particular raid
-type/personality/level, the required arguments for that raid type, and
-any optional arguments. Possible raid types include: raid4, raid5_la,
-raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (raid1 is
-planned for the future.) The list of required and optional parameters
-is the same for all the current raid types. The required parameters are
-positional, while the optional parameters are given as key/value pairs.
-The possible parameters are as follows:
- Chunk size in sectors.
- [[no]sync] Force/Prevent RAID initialization
- [rebuild ] Rebuild the drive indicated by the index
- [daemon_sleep ] Time between bitmap daemon work to clear bits
- [min_recovery_rate ] Throttle RAID initialization
- [max_recovery_rate ] Throttle RAID initialization
- [max_write_behind ] See '-write-behind=' (man mdadm)
- [stripe_cache ] Stripe cache size for higher RAIDs
-
-Line 3 contains the list of devices that compose the array in
-metadata/data device pairs. If the metadata is stored separately, a '-'
-is given for the metadata device position. If a drive has failed or is
-missing at creation time, a '-' can be given for both the metadata and
-data drives for a given position.
-
-NB. Currently all metadata devices must be specified as '-'.
-
-Examples:
-# RAID4 - 4 data drives, 1 parity
-# No metadata devices specified to hold superblock/bitmap info
-# Chunk size of 1MiB
-# (Lines separated for easy reading)
-0 1960893648 raid \
- raid4 1 2048 \
- 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
-
-# RAID4 - 4 data drives, 1 parity (no metadata devices)
-# Chunk size of 1MiB, force RAID initialization,
-# min recovery rate at 20 kiB/sec/disk
-0 1960893648 raid \
- raid4 4 2048 min_recovery_rate 20 sync\
- 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
-
-Performing a 'dmsetup table' should display the CTR table used to
-construct the mapping (with possible reordering of optional
-parameters).
-
-Performing a 'dmsetup status' will yield information on the state and
-health of the array. The output is as follows:
-1: raid \
-2: <#devices> <1 health char for each dev>
-
-Line 1 is standard DM output. Line 2 is best shown by example:
- 0 1960893648 raid raid4 5 AAAAA 2/490221568
-Here we can see the RAID type is raid4, there are 5 devices - all of
-which are 'A'live, and the array is 2/490221568 complete with recovery.
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 8c594c45b6a1..07eb3f624998 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -248,17 +248,6 @@ Who: Zhang Rui
---------------------------
-What: CONFIG_ACPI_PROCFS_POWER
-When: 2.6.39
-Why: sysfs I/F for ACPI power devices, including AC and Battery,
- has been working in upstream kenrel since 2.6.24, Sep 2007.
- In 2.6.37, we make the sysfs I/F always built in and this option
- disabled by default.
- Remove this option and the ACPI power procfs interface in 2.6.39.
-Who: Zhang Rui
-
----------------------------
-
What: /proc/acpi/button
When: August 2007
Why: /proc/acpi/button has been replaced by events to the input layer
@@ -601,13 +590,3 @@ Why: The functions have been superceded by cancel_delayed_work_sync()
Who: Tejun Heo
----------------------------
-
-What: Legacy, non-standard chassis intrusion detection interface.
-When: June 2011
-Why: The adm9240, w83792d and w83793 hardware monitoring drivers have
- legacy interfaces for chassis intrusion detection. A standard
- interface has been added to each driver, so the legacy interface
- can be removed.
-Who: Jean Delvare
-
-----------------------------
diff --git a/trunk/Documentation/filesystems/Locking b/trunk/Documentation/filesystems/Locking
index 4471a416c274..977d8919cc69 100644
--- a/trunk/Documentation/filesystems/Locking
+++ b/trunk/Documentation/filesystems/Locking
@@ -19,8 +19,6 @@ prototypes:
void (*d_release)(struct dentry *);
void (*d_iput)(struct dentry *, struct inode *);
char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
- struct vfsmount *(*d_automount)(struct path *path);
- int (*d_manage)(struct dentry *, bool);
locking rules:
rename_lock ->d_lock may block rcu-walk
@@ -31,8 +29,6 @@ d_delete: no yes no no
d_release: no no yes no
d_iput: no no yes no
d_dname: no no no no
-d_automount: no no yes no
-d_manage: no no yes (ref-walk) maybe
--------------------------- inode_operations ---------------------------
prototypes:
@@ -60,6 +56,7 @@ ata *);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
void (*truncate_range)(struct inode *, loff_t, loff_t);
+ long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len);
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
locking rules:
@@ -87,6 +84,7 @@ getxattr: no
listxattr: no
removexattr: yes
truncate_range: yes
+fallocate: no
fiemap: no
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim.
@@ -345,6 +343,7 @@ prototypes:
int (*fl_grant)(struct file_lock *, struct file_lock *, int);
void (*fl_release_private)(struct file_lock *);
void (*fl_break)(struct file_lock *); /* break_lease callback */
+ int (*fl_mylease)(struct file_lock *, struct file_lock *);
int (*fl_change)(struct file_lock **, int);
locking rules:
@@ -354,6 +353,7 @@ fl_notify: yes no
fl_grant: no no
fl_release_private: maybe no
fl_break: yes no
+fl_mylease: yes no
fl_change yes no
--------------------------- buffer_head -----------------------------------
@@ -435,7 +435,6 @@ prototypes:
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *,
size_t, unsigned int);
int (*setlease)(struct file *, long, struct file_lock **);
- long (*fallocate)(struct file *, int, loff_t, loff_t);
};
locking rules:
diff --git a/trunk/Documentation/filesystems/porting b/trunk/Documentation/filesystems/porting
index dfbcd1b00b0a..07a32b42cf9c 100644
--- a/trunk/Documentation/filesystems/porting
+++ b/trunk/Documentation/filesystems/porting
@@ -365,8 +365,8 @@ must be done in the RCU callback.
[recommended]
vfs now tries to do path walking in "rcu-walk mode", which avoids
atomic operations and scalability hazards on dentries and inodes (see
-Documentation/filesystems/path-lookup.txt). d_hash and d_compare changes
-(above) are examples of the changes required to support this. For more complex
+Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above)
+are examples of the changes required to support this. For more complex
filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so
no changes are required to the filesystem. However, this is costly and loses
the benefits of rcu-walk mode. We will begin to add filesystem callbacks that
@@ -383,14 +383,5 @@ Documentation/filesystems/vfs.txt for more details.
permission and check_acl are inode permission checks that are called
on many or all directory inodes on the way down a path walk (to check for
-exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU).
-See Documentation/filesystems/vfs.txt for more details.
-
---
-[mandatory]
- In ->fallocate() you must check the mode option passed in. If your
-filesystem does not support hole punching (deallocating space in the middle of a
-file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
-Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
-so the i_size should not change when hole punching, even when puching the end of
-a file off.
+exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See
+Documentation/filesystems/vfs.txt for more details.
diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt
index 23cae6548d3a..9471225212c4 100644
--- a/trunk/Documentation/filesystems/proc.txt
+++ b/trunk/Documentation/filesystems/proc.txt
@@ -375,7 +375,6 @@ Anonymous: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
-Locked: 374 kB
The first of these lines shows the same information as is displayed for the
mapping in /proc/PID/maps. The remaining lines show the size of the mapping
@@ -671,8 +670,6 @@ varies by architecture and compile options. The following is from a
> cat /proc/meminfo
-The "Locked" indicates whether the mapping is locked in memory or not.
-
MemTotal: 16344972 kB
MemFree: 13634064 kB
@@ -1323,10 +1320,6 @@ scaled linearly with /proc//oom_score_adj.
Writing to /proc//oom_score_adj or /proc//oom_adj will change the
other with its scaled value.
-The value of /proc//oom_score_adj may be reduced no lower than the last
-value set by a CAP_SYS_RESOURCE process. To reduce the value any lower
-requires CAP_SYS_RESOURCE.
-
NOTICE: /proc//oom_adj is deprecated and will be removed, please see
Documentation/feature-removal-schedule.txt.
diff --git a/trunk/Documentation/filesystems/vfs.txt b/trunk/Documentation/filesystems/vfs.txt
index 94cf97b901d7..fbb324e2bd43 100644
--- a/trunk/Documentation/filesystems/vfs.txt
+++ b/trunk/Documentation/filesystems/vfs.txt
@@ -415,8 +415,8 @@ otherwise noted.
permission: called by the VFS to check for access rights on a POSIX-like
filesystem.
- May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk
- mode, the filesystem must check the permission without blocking or
+ May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk
+ mode, the filesystem must check the permission without blocking or
storing to the inode.
If a situation is encountered that rcu-walk cannot handle, return
@@ -864,8 +864,6 @@ struct dentry_operations {
void (*d_release)(struct dentry *);
void (*d_iput)(struct dentry *, struct inode *);
char *(*d_dname)(struct dentry *, char *, int);
- struct vfsmount *(*d_automount)(struct path *);
- int (*d_manage)(struct dentry *, bool, bool);
};
d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -932,47 +930,6 @@ struct dentry_operations {
at the end of the buffer, and returns a pointer to the first char.
dynamic_dname() helper function is provided to take care of this.
- d_automount: called when an automount dentry is to be traversed (optional).
- This should create a new VFS mount record and return the record to the
- caller. The caller is supplied with a path parameter giving the
- automount directory to describe the automount target and the parent
- VFS mount record to provide inheritable mount parameters. NULL should
- be returned if someone else managed to make the automount first. If
- the vfsmount creation failed, then an error code should be returned.
- If -EISDIR is returned, then the directory will be treated as an
- ordinary directory and returned to pathwalk to continue walking.
-
- If a vfsmount is returned, the caller will attempt to mount it on the
- mountpoint and will remove the vfsmount from its expiration list in
- the case of failure. The vfsmount should be returned with 2 refs on
- it to prevent automatic expiration - the caller will clean up the
- additional ref.
-
- This function is only used if DCACHE_NEED_AUTOMOUNT is set on the
- dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the
- inode being added.
-
- d_manage: called to allow the filesystem to manage the transition from a
- dentry (optional). This allows autofs, for example, to hold up clients
- waiting to explore behind a 'mountpoint' whilst letting the daemon go
- past and construct the subtree there. 0 should be returned to let the
- calling process continue. -EISDIR can be returned to tell pathwalk to
- use this directory as an ordinary directory and to ignore anything
- mounted on it and not to check the automount flag. Any other error
- code will abort pathwalk completely.
-
- If the 'mounting_here' parameter is true, then namespace_sem is being
- held by the caller and the function should not initiate any mounts or
- unmounts that it will then wait for.
-
- If the 'rcu_walk' parameter is true, then the caller is doing a
- pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
- and the caller can be asked to leave it and call again by returing
- -ECHILD.
-
- This function is only used if DCACHE_MANAGE_TRANSIT is set on the
- dentry being transited from.
-
Example :
static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)
diff --git a/trunk/Documentation/gpio.txt b/trunk/Documentation/gpio.txt
index 792faa3c06cf..a492d92bb098 100644
--- a/trunk/Documentation/gpio.txt
+++ b/trunk/Documentation/gpio.txt
@@ -135,7 +135,7 @@ setting up a platform_device using the GPIO, is mark its direction:
int gpio_direction_input(unsigned gpio);
int gpio_direction_output(unsigned gpio, int value);
-The return value is zero for success, else a negative errno. It should
+The return value is zero for success, else a negative errno. It must
be checked, since the get/set calls don't have error returns and since
misconfiguration is possible. You should normally issue these calls from
a task context. However, for spinlock-safe GPIOs it's OK to use them
diff --git a/trunk/Documentation/hwmon/adm9240 b/trunk/Documentation/hwmon/adm9240
index 36e8ec6aa868..2c6f1fed4618 100644
--- a/trunk/Documentation/hwmon/adm9240
+++ b/trunk/Documentation/hwmon/adm9240
@@ -155,7 +155,7 @@ connected to a normally open switch.
The ADM9240 provides an internal open drain on this line, and may output
a 20 ms active low pulse to reset an external Chassis Intrusion latch.
-Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.
+Clear the CI latch by writing value 1 to the sysfs chassis_clear file.
Alarm flags reported as 16-bit word
diff --git a/trunk/Documentation/hwmon/ads7828 b/trunk/Documentation/hwmon/ads7828
index 2bbebe6f771f..75bc4beaf447 100644
--- a/trunk/Documentation/hwmon/ads7828
+++ b/trunk/Documentation/hwmon/ads7828
@@ -9,7 +9,7 @@ Supported chips:
http://focus.ti.com/lit/ds/symlink/ads7828.pdf
Authors:
- Steve Hardy
+ Steve Hardy
Module Parameters
-----------------
diff --git a/trunk/Documentation/hwmon/dme1737 b/trunk/Documentation/hwmon/dme1737
index 4d2935145a1c..fc5df7654d63 100644
--- a/trunk/Documentation/hwmon/dme1737
+++ b/trunk/Documentation/hwmon/dme1737
@@ -42,7 +42,7 @@ Description
This driver implements support for the hardware monitoring capabilities of the
SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,
and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors
-temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and
+temp[1-3] (2 remote diodes and 1 internal), 7 voltages in[0-6] (6 external and
1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
automatically.
@@ -105,7 +105,6 @@ SCH5127:
in4: V1_IN 0V - 1.5V
in5: VTR (+3.3V standby) 0V - 4.38V
in6: Vbat (+3.0V) 0V - 4.38V
- in7: Vtrip (+1.5V) 0V - 1.99V
Each voltage input has associated min and max limits which trigger an alarm
when crossed.
@@ -218,10 +217,10 @@ cpu0_vid RO CPU core reference voltage in
vrm RW Voltage regulator module version
number.
-in[0-7]_input RO Measured voltage in millivolts.
-in[0-7]_min RW Low limit for voltage input.
-in[0-7]_max RW High limit for voltage input.
-in[0-7]_alarm RO Voltage input alarm. Returns 1 if
+in[0-6]_input RO Measured voltage in millivolts.
+in[0-6]_min RW Low limit for voltage input.
+in[0-6]_max RW High limit for voltage input.
+in[0-6]_alarm RO Voltage input alarm. Returns 1 if
voltage input is or went outside the
associated min-max range, 0 otherwise.
@@ -325,4 +324,3 @@ fan5 opt opt
pwm5 opt opt
fan6 opt opt
pwm6 opt opt
-in7 yes
diff --git a/trunk/Documentation/hwmon/lm93 b/trunk/Documentation/hwmon/lm93
index f3b2ad2ceb01..7a10616d0b44 100644
--- a/trunk/Documentation/hwmon/lm93
+++ b/trunk/Documentation/hwmon/lm93
@@ -6,10 +6,6 @@ Supported chips:
Prefix 'lm93'
Addresses scanned: I2C 0x2c-0x2e
Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf
- * National Semiconductor LM94
- Prefix 'lm94'
- Addresses scanned: I2C 0x2c-0x2e
- Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf
Authors:
Mark M. Hoffman
@@ -60,9 +56,6 @@ previous motherboard management ASICs and uses some of the LM85's features
for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual
processor Xeon class motherboard with a minimum of external components.
-LM94 is also supported in LM93 compatible mode. Extra sensors and features of
-LM94 are not supported.
-
User Interface
--------------
diff --git a/trunk/Documentation/hwmon/w83627hf b/trunk/Documentation/hwmon/w83627hf
index 8432e1118173..fb145e5e722a 100644
--- a/trunk/Documentation/hwmon/w83627hf
+++ b/trunk/Documentation/hwmon/w83627hf
@@ -91,25 +91,3 @@ isaset -y -f 0x2e 0xaa
The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but
0x4e/0x4f is also possible.
-
-Voltage pin mapping
--------------------
-
-Here is a summary of the voltage pin mapping for the W83627THF. This
-can be useful to convert data provided by board manufacturers into
-working libsensors configuration statements.
-
- W83627THF |
- Pin | Name | Register | Sysfs attribute
------------------------------------------------------
- 100 | CPUVCORE | 20h | in0
- 99 | VIN0 | 21h | in1
- 98 | VIN1 | 22h | in2
- 97 | VIN2 | 24h | in4
- 114 | AVCC | 23h | in3
- 61 | 5VSB | 50h (bank 5) | in7
- 74 | VBAT | 51h (bank 5) | in8
-
-For other supported devices, you'll have to take the hard path and
-look up the information in the datasheet yourself (and then add it
-to this document please.)
diff --git a/trunk/Documentation/hwmon/w83793 b/trunk/Documentation/hwmon/w83793
index 6cc5f639b721..51171a83165b 100644
--- a/trunk/Documentation/hwmon/w83793
+++ b/trunk/Documentation/hwmon/w83793
@@ -92,7 +92,7 @@ This driver implements support for Winbond W83793G/W83793R chips.
* Chassis
If the case open alarm triggers, it will stay in this state unless cleared
- by writing 0 to the sysfs file "intrusion0_alarm".
+ by any write to the sysfs file "chassis".
* VID and VRM
The VRM version is detected automatically, don't modify the it unless you
diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt
index b72e071a3e5b..55fe7599bc8e 100644
--- a/trunk/Documentation/kernel-parameters.txt
+++ b/trunk/Documentation/kernel-parameters.txt
@@ -199,6 +199,11 @@ and is between 256 and 4096 characters. It is defined in the file
unusable. The "log_buf_len" parameter may be useful
if you need to capture more output.
+ acpi_display_output= [HW,ACPI]
+ acpi_display_output=vendor
+ acpi_display_output=video
+ See above.
+
acpi_irq_balance [HW,ACPI]
ACPI will balance active IRQs
default in APIC mode
diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c
index d9da7e148538..dc73bc54cc4e 100644
--- a/trunk/Documentation/lguest/lguest.c
+++ b/trunk/Documentation/lguest/lguest.c
@@ -39,9 +39,6 @@
#include
#include
#include
-#include
-#include
-
#include
#include
#include
@@ -301,27 +298,20 @@ static void *map_zeroed_pages(unsigned int num)
/*
* We use a private mapping (ie. if we write to the page, it will be
- * copied). We allocate an extra two pages PROT_NONE to act as guard
- * pages against read/write attempts that exceed allocated space.
+ * copied).
*/
- addr = mmap(NULL, getpagesize() * (num+2),
- PROT_NONE, MAP_PRIVATE, fd, 0);
-
+ addr = mmap(NULL, getpagesize() * num,
+ PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0);
if (addr == MAP_FAILED)
err(1, "Mmapping %u pages of /dev/zero", num);
- if (mprotect(addr + getpagesize(), getpagesize() * num,
- PROT_READ|PROT_WRITE) == -1)
- err(1, "mprotect rw %u pages failed", num);
-
/*
* One neat mmap feature is that you can close the fd, and it
* stays mapped.
*/
close(fd);
- /* Return address after PROT_NONE page */
- return addr + getpagesize();
+ return addr;
}
/* Get some more pages for a device. */
@@ -353,7 +343,7 @@ static void map_at(int fd, void *addr, unsigned long offset, unsigned long len)
* done to it. This allows us to share untouched memory between
* Guests.
*/
- if (mmap(addr, len, PROT_READ|PROT_WRITE,
+ if (mmap(addr, len, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED)
return;
@@ -583,10 +573,10 @@ static void *_check_pointer(unsigned long addr, unsigned int size,
unsigned int line)
{
/*
- * Check if the requested address and size exceeds the allocated memory,
- * or addr + size wraps around.
+ * We have to separately check addr and addr+size, because size could
+ * be huge and addr + size might wrap around.
*/
- if ((addr + size) > guest_limit || (addr + size) < addr)
+ if (addr >= guest_limit || addr + size >= guest_limit)
errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr);
/*
* We return a pointer for the caller's convenience, now we know it's
@@ -1882,8 +1872,6 @@ static struct option opts[] = {
{ "block", 1, NULL, 'b' },
{ "rng", 0, NULL, 'r' },
{ "initrd", 1, NULL, 'i' },
- { "username", 1, NULL, 'u' },
- { "chroot", 1, NULL, 'c' },
{ NULL },
};
static void usage(void)
@@ -1906,12 +1894,6 @@ int main(int argc, char *argv[])
/* If they specify an initrd file to load. */
const char *initrd_name = NULL;
- /* Password structure for initgroups/setres[gu]id */
- struct passwd *user_details = NULL;
-
- /* Directory to chroot to */
- char *chroot_path = NULL;
-
/* Save the args: we "reboot" by execing ourselves again. */
main_args = argv;
@@ -1968,14 +1950,6 @@ int main(int argc, char *argv[])
case 'i':
initrd_name = optarg;
break;
- case 'u':
- user_details = getpwnam(optarg);
- if (!user_details)
- err(1, "getpwnam failed, incorrect username?");
- break;
- case 'c':
- chroot_path = optarg;
- break;
default:
warnx("Unknown argument %s", argv[optind]);
usage();
@@ -2047,37 +2021,6 @@ int main(int argc, char *argv[])
/* If we exit via err(), this kills all the threads, restores tty. */
atexit(cleanup_devices);
- /* If requested, chroot to a directory */
- if (chroot_path) {
- if (chroot(chroot_path) != 0)
- err(1, "chroot(\"%s\") failed", chroot_path);
-
- if (chdir("/") != 0)
- err(1, "chdir(\"/\") failed");
-
- verbose("chroot done\n");
- }
-
- /* If requested, drop privileges */
- if (user_details) {
- uid_t u;
- gid_t g;
-
- u = user_details->pw_uid;
- g = user_details->pw_gid;
-
- if (initgroups(user_details->pw_name, g) != 0)
- err(1, "initgroups failed");
-
- if (setresgid(g, g, g) != 0)
- err(1, "setresgid failed");
-
- if (setresuid(u, u, u) != 0)
- err(1, "setresuid failed");
-
- verbose("Dropping privileges completed\n");
- }
-
/* Finally, run the Guest. This doesn't return. */
run_guest();
}
diff --git a/trunk/Documentation/lguest/lguest.txt b/trunk/Documentation/lguest/lguest.txt
index dad99978a6a8..6ccaf8e1a00e 100644
--- a/trunk/Documentation/lguest/lguest.txt
+++ b/trunk/Documentation/lguest/lguest.txt
@@ -117,11 +117,6 @@ Running Lguest:
for general information on how to get bridging to work.
-- Random number generation. Using the --rng option will provide a
- /dev/hwrng in the guest that will read from the host's /dev/random.
- Use this option in conjunction with rng-tools (see ../hw_random.txt)
- to provide entropy to the guest kernel's /dev/random.
-
There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest
Good luck!
diff --git a/trunk/Documentation/magic-number.txt b/trunk/Documentation/magic-number.txt
index 4b12abcb2ad3..505f19607542 100644
--- a/trunk/Documentation/magic-number.txt
+++ b/trunk/Documentation/magic-number.txt
@@ -150,7 +150,7 @@ NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h
ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
-CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h
+CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h
DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h
YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
diff --git a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
index 3c1eddd9fcc7..d0eb696d32e8 100644
--- a/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/trunk/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -974,6 +974,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
See hdspm.txt for details.
+ Module snd-hifier
+ -----------------
+
+ Module for the MediaTek/TempoTec HiFier Fantasia sound card.
+
+ This module supports autoprobe and multiple cards.
+
Module snd-ice1712
------------------
@@ -1524,20 +1531,15 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module snd-oxygen
-----------------
- Module for sound cards based on the C-Media CMI8786/8787/8788 chip:
+ Module for sound cards based on the C-Media CMI8788 chip:
* Asound A-8788
- * Asus Xonar DG
* AuzenTech X-Meridian
- * AuzenTech X-Meridian 2G
* Bgears b-Enspirer
* Club3D Theatron DTS
* HT-Omega Claro (plus)
* HT-Omega Claro halo (XT)
- * Kuroutoshikou CMI8787-HG2PCI
* Razer Barracuda AC-1
* Sondigo Inferno
- * TempoTec HiFier Fantasia
- * TempoTec HiFier Serenade
This module supports autoprobe and multiple cards.
@@ -2004,9 +2006,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module snd-virtuoso
-------------------
- Module for sound cards based on the Asus AV66/AV100/AV200 chips,
- i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX,
- HDAV1.3 (Deluxe), and HDAV1.3 Slim.
+ Module for sound cards based on the Asus AV100/AV200 chips,
+ i.e., Xonar D1, DX, D2, D2X, DS, HDAV1.3 (Deluxe), Essence ST
+ (Deluxe) and Essence STX.
This module supports autoprobe and multiple cards.
diff --git a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt
index 16ae4300c747..37c6aad5e590 100644
--- a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -149,6 +149,7 @@ ALC882/883/885/888/889
acer-aspire-7730g Acer Aspire 7730G
acer-aspire-8930g Acer Aspire 8930G
medion Medion Laptops
+ medion-md2 Medion MD2
targa-dig Targa/MSI
targa-2ch-dig Targa/MSI with 2-channel
targa-8ch-dig Targa/MSI with 8-channel (MSI GX620)
diff --git a/trunk/Documentation/target/tcm_mod_builder.py b/trunk/Documentation/target/tcm_mod_builder.py
deleted file mode 100755
index dbeb8a0d7175..000000000000
--- a/trunk/Documentation/target/tcm_mod_builder.py
+++ /dev/null
@@ -1,1094 +0,0 @@
-#!/usr/bin/python
-# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
-#
-# Copyright (c) 2010 Rising Tide Systems
-# Copyright (c) 2010 Linux-iSCSI.org
-#
-# Author: nab@kernel.org
-#
-import os, sys
-import subprocess as sub
-import string
-import re
-import optparse
-
-tcm_dir = ""
-
-fabric_ops = []
-fabric_mod_dir = ""
-fabric_mod_port = ""
-fabric_mod_init_port = ""
-
-def tcm_mod_err(msg):
- print msg
- sys.exit(1)
-
-def tcm_mod_create_module_subdir(fabric_mod_dir_var):
-
- if os.path.isdir(fabric_mod_dir_var) == True:
- return 1
-
- print "Creating fabric_mod_dir: " + fabric_mod_dir_var
- ret = os.mkdir(fabric_mod_dir_var)
- if ret:
- tcm_mod_err("Unable to mkdir " + fabric_mod_dir_var)
-
- return
-
-def tcm_mod_build_FC_include(fabric_mod_dir_var, fabric_mod_name):
- global fabric_mod_port
- global fabric_mod_init_port
- buf = ""
-
- f = fabric_mod_dir_var + "/" + fabric_mod_name + "_base.h"
- print "Writing file: " + f
-
- p = open(f, 'w');
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
- buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
- buf += "\n"
- buf += "struct " + fabric_mod_name + "_nacl {\n"
- buf += " /* Binary World Wide unique Port Name for FC Initiator Nport */\n"
- buf += " u64 nport_wwpn;\n"
- buf += " /* ASCII formatted WWPN for FC Initiator Nport */\n"
- buf += " char nport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
- buf += " struct se_node_acl se_node_acl;\n"
- buf += "};\n"
- buf += "\n"
- buf += "struct " + fabric_mod_name + "_tpg {\n"
- buf += " /* FC lport target portal group tag for TCM */\n"
- buf += " u16 lport_tpgt;\n"
- buf += " /* Pointer back to " + fabric_mod_name + "_lport */\n"
- buf += " struct " + fabric_mod_name + "_lport *lport;\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_tpg() */\n"
- buf += " struct se_portal_group se_tpg;\n"
- buf += "};\n"
- buf += "\n"
- buf += "struct " + fabric_mod_name + "_lport {\n"
- buf += " /* SCSI protocol the lport is providing */\n"
- buf += " u8 lport_proto_id;\n"
- buf += " /* Binary World Wide unique Port Name for FC Target Lport */\n"
- buf += " u64 lport_wwpn;\n"
- buf += " /* ASCII formatted WWPN for FC Target Lport */\n"
- buf += " char lport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_lport() */\n"
- buf += " struct se_wwn lport_wwn;\n"
- buf += "};\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
-
- fabric_mod_port = "lport"
- fabric_mod_init_port = "nport"
-
- return
-
-def tcm_mod_build_SAS_include(fabric_mod_dir_var, fabric_mod_name):
- global fabric_mod_port
- global fabric_mod_init_port
- buf = ""
-
- f = fabric_mod_dir_var + "/" + fabric_mod_name + "_base.h"
- print "Writing file: " + f
-
- p = open(f, 'w');
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
- buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
- buf += "\n"
- buf += "struct " + fabric_mod_name + "_nacl {\n"
- buf += " /* Binary World Wide unique Port Name for SAS Initiator port */\n"
- buf += " u64 iport_wwpn;\n"
- buf += " /* ASCII formatted WWPN for Sas Initiator port */\n"
- buf += " char iport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
- buf += " struct se_node_acl se_node_acl;\n"
- buf += "};\n\n"
- buf += "struct " + fabric_mod_name + "_tpg {\n"
- buf += " /* SAS port target portal group tag for TCM */\n"
- buf += " u16 tport_tpgt;\n"
- buf += " /* Pointer back to " + fabric_mod_name + "_tport */\n"
- buf += " struct " + fabric_mod_name + "_tport *tport;\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_tpg() */\n"
- buf += " struct se_portal_group se_tpg;\n"
- buf += "};\n\n"
- buf += "struct " + fabric_mod_name + "_tport {\n"
- buf += " /* SCSI protocol the tport is providing */\n"
- buf += " u8 tport_proto_id;\n"
- buf += " /* Binary World Wide unique Port Name for SAS Target port */\n"
- buf += " u64 tport_wwpn;\n"
- buf += " /* ASCII formatted WWPN for SAS Target port */\n"
- buf += " char tport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_tport() */\n"
- buf += " struct se_wwn tport_wwn;\n"
- buf += "};\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
-
- fabric_mod_port = "tport"
- fabric_mod_init_port = "iport"
-
- return
-
-def tcm_mod_build_iSCSI_include(fabric_mod_dir_var, fabric_mod_name):
- global fabric_mod_port
- global fabric_mod_init_port
- buf = ""
-
- f = fabric_mod_dir_var + "/" + fabric_mod_name + "_base.h"
- print "Writing file: " + f
-
- p = open(f, 'w');
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
- buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
- buf += "\n"
- buf += "struct " + fabric_mod_name + "_nacl {\n"
- buf += " /* ASCII formatted InitiatorName */\n"
- buf += " char iport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
- buf += " struct se_node_acl se_node_acl;\n"
- buf += "};\n\n"
- buf += "struct " + fabric_mod_name + "_tpg {\n"
- buf += " /* iSCSI target portal group tag for TCM */\n"
- buf += " u16 tport_tpgt;\n"
- buf += " /* Pointer back to " + fabric_mod_name + "_tport */\n"
- buf += " struct " + fabric_mod_name + "_tport *tport;\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_tpg() */\n"
- buf += " struct se_portal_group se_tpg;\n"
- buf += "};\n\n"
- buf += "struct " + fabric_mod_name + "_tport {\n"
- buf += " /* SCSI protocol the tport is providing */\n"
- buf += " u8 tport_proto_id;\n"
- buf += " /* ASCII formatted TargetName for IQN */\n"
- buf += " char tport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
- buf += " /* Returned by " + fabric_mod_name + "_make_tport() */\n"
- buf += " struct se_wwn tport_wwn;\n"
- buf += "};\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
-
- fabric_mod_port = "tport"
- fabric_mod_init_port = "iport"
-
- return
-
-def tcm_mod_build_base_includes(proto_ident, fabric_mod_dir_val, fabric_mod_name):
-
- if proto_ident == "FC":
- tcm_mod_build_FC_include(fabric_mod_dir_val, fabric_mod_name)
- elif proto_ident == "SAS":
- tcm_mod_build_SAS_include(fabric_mod_dir_val, fabric_mod_name)
- elif proto_ident == "iSCSI":
- tcm_mod_build_iSCSI_include(fabric_mod_dir_val, fabric_mod_name)
- else:
- print "Unsupported proto_ident: " + proto_ident
- sys.exit(1)
-
- return
-
-def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
- buf = ""
-
- f = fabric_mod_dir_var + "/" + fabric_mod_name + "_configfs.c"
- print "Writing file: " + f
-
- p = open(f, 'w');
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n\n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n\n"
- buf += "#include <" + fabric_mod_name + "_base.h>\n"
- buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n"
-
- buf += "/* Local pointer to allocated TCM configfs fabric module */\n"
- buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n"
-
- buf += "static struct se_node_acl *" + fabric_mod_name + "_make_nodeacl(\n"
- buf += " struct se_portal_group *se_tpg,\n"
- buf += " struct config_group *group,\n"
- buf += " const char *name)\n"
- buf += "{\n"
- buf += " struct se_node_acl *se_nacl, *se_nacl_new;\n"
- buf += " struct " + fabric_mod_name + "_nacl *nacl;\n"
-
- if proto_ident == "FC" or proto_ident == "SAS":
- buf += " u64 wwpn = 0;\n"
-
- buf += " u32 nexus_depth;\n\n"
- buf += " /* " + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n"
- buf += " return ERR_PTR(-EINVAL); */\n"
- buf += " se_nacl_new = " + fabric_mod_name + "_alloc_fabric_acl(se_tpg);\n"
- buf += " if (!(se_nacl_new))\n"
- buf += " return ERR_PTR(-ENOMEM);\n"
- buf += "//#warning FIXME: Hardcoded nexus depth in " + fabric_mod_name + "_make_nodeacl()\n"
- buf += " nexus_depth = 1;\n"
- buf += " /*\n"
- buf += " * se_nacl_new may be released by core_tpg_add_initiator_node_acl()\n"
- buf += " * when converting a NodeACL from demo mode -> explict\n"
- buf += " */\n"
- buf += " se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new,\n"
- buf += " name, nexus_depth);\n"
- buf += " if (IS_ERR(se_nacl)) {\n"
- buf += " " + fabric_mod_name + "_release_fabric_acl(se_tpg, se_nacl_new);\n"
- buf += " return se_nacl;\n"
- buf += " }\n"
- buf += " /*\n"
- buf += " * Locate our struct " + fabric_mod_name + "_nacl and set the FC Nport WWPN\n"
- buf += " */\n"
- buf += " nacl = container_of(se_nacl, struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
-
- if proto_ident == "FC" or proto_ident == "SAS":
- buf += " nacl->" + fabric_mod_init_port + "_wwpn = wwpn;\n"
-
- buf += " /* " + fabric_mod_name + "_format_wwn(&nacl->" + fabric_mod_init_port + "_name[0], " + fabric_mod_name.upper() + "_NAMELEN, wwpn); */\n\n"
- buf += " return se_nacl;\n"
- buf += "}\n\n"
- buf += "static void " + fabric_mod_name + "_drop_nodeacl(struct se_node_acl *se_acl)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
- buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
- buf += " kfree(nacl);\n"
- buf += "}\n\n"
-
- buf += "static struct se_portal_group *" + fabric_mod_name + "_make_tpg(\n"
- buf += " struct se_wwn *wwn,\n"
- buf += " struct config_group *group,\n"
- buf += " const char *name)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + "*" + fabric_mod_port + " = container_of(wwn,\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg;\n"
- buf += " unsigned long tpgt;\n"
- buf += " int ret;\n\n"
- buf += " if (strstr(name, \"tpgt_\") != name)\n"
- buf += " return ERR_PTR(-EINVAL);\n"
- buf += " if (strict_strtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX)\n"
- buf += " return ERR_PTR(-EINVAL);\n\n"
- buf += " tpg = kzalloc(sizeof(struct " + fabric_mod_name + "_tpg), GFP_KERNEL);\n"
- buf += " if (!(tpg)) {\n"
- buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_tpg\");\n"
- buf += " return ERR_PTR(-ENOMEM);\n"
- buf += " }\n"
- buf += " tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n"
- buf += " tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n"
- buf += " ret = core_tpg_register(&" + fabric_mod_name + "_fabric_configfs->tf_ops, wwn,\n"
- buf += " &tpg->se_tpg, (void *)tpg,\n"
- buf += " TRANSPORT_TPG_TYPE_NORMAL);\n"
- buf += " if (ret < 0) {\n"
- buf += " kfree(tpg);\n"
- buf += " return NULL;\n"
- buf += " }\n"
- buf += " return &tpg->se_tpg;\n"
- buf += "}\n\n"
- buf += "static void " + fabric_mod_name + "_drop_tpg(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n\n"
- buf += " core_tpg_deregister(se_tpg);\n"
- buf += " kfree(tpg);\n"
- buf += "}\n\n"
-
- buf += "static struct se_wwn *" + fabric_mod_name + "_make_" + fabric_mod_port + "(\n"
- buf += " struct target_fabric_configfs *tf,\n"
- buf += " struct config_group *group,\n"
- buf += " const char *name)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + ";\n"
-
- if proto_ident == "FC" or proto_ident == "SAS":
- buf += " u64 wwpn = 0;\n\n"
-
- buf += " /* if (" + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n"
- buf += " return ERR_PTR(-EINVAL); */\n\n"
- buf += " " + fabric_mod_port + " = kzalloc(sizeof(struct " + fabric_mod_name + "_" + fabric_mod_port + "), GFP_KERNEL);\n"
- buf += " if (!(" + fabric_mod_port + ")) {\n"
- buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_" + fabric_mod_port + "\");\n"
- buf += " return ERR_PTR(-ENOMEM);\n"
- buf += " }\n"
-
- if proto_ident == "FC" or proto_ident == "SAS":
- buf += " " + fabric_mod_port + "->" + fabric_mod_port + "_wwpn = wwpn;\n"
-
- buf += " /* " + fabric_mod_name + "_format_wwn(&" + fabric_mod_port + "->" + fabric_mod_port + "_name[0], " + fabric_mod_name.upper() + "__NAMELEN, wwpn); */\n\n"
- buf += " return &" + fabric_mod_port + "->" + fabric_mod_port + "_wwn;\n"
- buf += "}\n\n"
- buf += "static void " + fabric_mod_name + "_drop_" + fabric_mod_port + "(struct se_wwn *wwn)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = container_of(wwn,\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n"
- buf += " kfree(" + fabric_mod_port + ");\n"
- buf += "}\n\n"
- buf += "static ssize_t " + fabric_mod_name + "_wwn_show_attr_version(\n"
- buf += " struct target_fabric_configfs *tf,\n"
- buf += " char *page)\n"
- buf += "{\n"
- buf += " return sprintf(page, \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n"
- buf += " \"on \"UTS_RELEASE\"\\n\", " + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n"
- buf += " utsname()->machine);\n"
- buf += "}\n\n"
- buf += "TF_WWN_ATTR_RO(" + fabric_mod_name + ", version);\n\n"
- buf += "static struct configfs_attribute *" + fabric_mod_name + "_wwn_attrs[] = {\n"
- buf += " &" + fabric_mod_name + "_wwn_version.attr,\n"
- buf += " NULL,\n"
- buf += "};\n\n"
-
- buf += "static struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n"
- buf += " .get_fabric_name = " + fabric_mod_name + "_get_fabric_name,\n"
- buf += " .get_fabric_proto_ident = " + fabric_mod_name + "_get_fabric_proto_ident,\n"
- buf += " .tpg_get_wwn = " + fabric_mod_name + "_get_fabric_wwn,\n"
- buf += " .tpg_get_tag = " + fabric_mod_name + "_get_tag,\n"
- buf += " .tpg_get_default_depth = " + fabric_mod_name + "_get_default_depth,\n"
- buf += " .tpg_get_pr_transport_id = " + fabric_mod_name + "_get_pr_transport_id,\n"
- buf += " .tpg_get_pr_transport_id_len = " + fabric_mod_name + "_get_pr_transport_id_len,\n"
- buf += " .tpg_parse_pr_out_transport_id = " + fabric_mod_name + "_parse_pr_out_transport_id,\n"
- buf += " .tpg_check_demo_mode = " + fabric_mod_name + "_check_false,\n"
- buf += " .tpg_check_demo_mode_cache = " + fabric_mod_name + "_check_true,\n"
- buf += " .tpg_check_demo_mode_write_protect = " + fabric_mod_name + "_check_true,\n"
- buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n"
- buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n"
- buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n"
- buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n"
- buf += " .release_cmd_to_pool = " + fabric_mod_name + "_release_cmd,\n"
- buf += " .release_cmd_direct = " + fabric_mod_name + "_release_cmd,\n"
- buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n"
- buf += " .close_session = " + fabric_mod_name + "_close_session,\n"
- buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n"
- buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n"
- buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n"
- buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n"
- buf += " .sess_get_initiator_sid = NULL,\n"
- buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n"
- buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n"
- buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n"
- buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n"
- buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n"
- buf += " .new_cmd_failure = " + fabric_mod_name + "_new_cmd_failure,\n"
- buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
- buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n"
- buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n"
- buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n"
- buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n"
- buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n"
- buf += " .pack_lun = " + fabric_mod_name + "_pack_lun,\n"
- buf += " /*\n"
- buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n"
- buf += " */\n"
- buf += " .fabric_make_wwn = " + fabric_mod_name + "_make_" + fabric_mod_port + ",\n"
- buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n"
- buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n"
- buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n"
- buf += " .fabric_post_link = NULL,\n"
- buf += " .fabric_pre_unlink = NULL,\n"
- buf += " .fabric_make_np = NULL,\n"
- buf += " .fabric_drop_np = NULL,\n"
- buf += " .fabric_make_nodeacl = " + fabric_mod_name + "_make_nodeacl,\n"
- buf += " .fabric_drop_nodeacl = " + fabric_mod_name + "_drop_nodeacl,\n"
- buf += "};\n\n"
-
- buf += "static int " + fabric_mod_name + "_register_configfs(void)\n"
- buf += "{\n"
- buf += " struct target_fabric_configfs *fabric;\n"
- buf += " int ret;\n\n"
- buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n"
- buf += " \" on \"UTS_RELEASE\"\\n\"," + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n"
- buf += " utsname()->machine);\n"
- buf += " /*\n"
- buf += " * Register the top level struct config_item_type with TCM core\n"
- buf += " */\n"
- buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \"" + fabric_mod_name[4:] + "\");\n"
- buf += " if (!(fabric)) {\n"
- buf += " printk(KERN_ERR \"target_fabric_configfs_init() failed\\n\");\n"
- buf += " return -ENOMEM;\n"
- buf += " }\n"
- buf += " /*\n"
- buf += " * Setup fabric->tf_ops from our local " + fabric_mod_name + "_ops\n"
- buf += " */\n"
- buf += " fabric->tf_ops = " + fabric_mod_name + "_ops;\n"
- buf += " /*\n"
- buf += " * Setup default attribute lists for various fabric->tf_cit_tmpl\n"
- buf += " */\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_wwn_cit.ct_attrs = " + fabric_mod_name + "_wwn_attrs;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_base_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_attrib_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_param_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_np_base_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_base_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_attrib_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_auth_cit.ct_attrs = NULL;\n"
- buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_param_cit.ct_attrs = NULL;\n"
- buf += " /*\n"
- buf += " * Register the fabric for use within TCM\n"
- buf += " */\n"
- buf += " ret = target_fabric_configfs_register(fabric);\n"
- buf += " if (ret < 0) {\n"
- buf += " printk(KERN_ERR \"target_fabric_configfs_register() failed\"\n"
- buf += " \" for " + fabric_mod_name.upper() + "\\n\");\n"
- buf += " return ret;\n"
- buf += " }\n"
- buf += " /*\n"
- buf += " * Setup our local pointer to *fabric\n"
- buf += " */\n"
- buf += " " + fabric_mod_name + "_fabric_configfs = fabric;\n"
- buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Set fabric -> " + fabric_mod_name + "_fabric_configfs\\n\");\n"
- buf += " return 0;\n"
- buf += "};\n\n"
- buf += "static void " + fabric_mod_name + "_deregister_configfs(void)\n"
- buf += "{\n"
- buf += " if (!(" + fabric_mod_name + "_fabric_configfs))\n"
- buf += " return;\n\n"
- buf += " target_fabric_configfs_deregister(" + fabric_mod_name + "_fabric_configfs);\n"
- buf += " " + fabric_mod_name + "_fabric_configfs = NULL;\n"
- buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Cleared " + fabric_mod_name + "_fabric_configfs\\n\");\n"
- buf += "};\n\n"
-
- buf += "static int __init " + fabric_mod_name + "_init(void)\n"
- buf += "{\n"
- buf += " int ret;\n\n"
- buf += " ret = " + fabric_mod_name + "_register_configfs();\n"
- buf += " if (ret < 0)\n"
- buf += " return ret;\n\n"
- buf += " return 0;\n"
- buf += "};\n\n"
- buf += "static void " + fabric_mod_name + "_exit(void)\n"
- buf += "{\n"
- buf += " " + fabric_mod_name + "_deregister_configfs();\n"
- buf += "};\n\n"
-
- buf += "#ifdef MODULE\n"
- buf += "MODULE_DESCRIPTION(\"" + fabric_mod_name.upper() + " series fabric driver\");\n"
- buf += "MODULE_LICENSE(\"GPL\");\n"
- buf += "module_init(" + fabric_mod_name + "_init);\n"
- buf += "module_exit(" + fabric_mod_name + "_exit);\n"
- buf += "#endif\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
-
- return
-
-def tcm_mod_scan_fabric_ops(tcm_dir):
-
- fabric_ops_api = tcm_dir + "include/target/target_core_fabric_ops.h"
-
- print "Using tcm_mod_scan_fabric_ops: " + fabric_ops_api
- process_fo = 0;
-
- p = open(fabric_ops_api, 'r')
-
- line = p.readline()
- while line:
- if process_fo == 0 and re.search('struct target_core_fabric_ops {', line):
- line = p.readline()
- continue
-
- if process_fo == 0:
- process_fo = 1;
- line = p.readline()
- # Search for function pointer
- if not re.search('\(\*', line):
- continue
-
- fabric_ops.append(line.rstrip())
- continue
-
- line = p.readline()
- # Search for function pointer
- if not re.search('\(\*', line):
- continue
-
- fabric_ops.append(line.rstrip())
-
- p.close()
- return
-
-def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
- buf = ""
- bufi = ""
-
- f = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.c"
- print "Writing file: " + f
-
- p = open(f, 'w')
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- fi = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.h"
- print "Writing file: " + fi
-
- pi = open(fi, 'w')
- if not pi:
- tcm_mod_err("Unable to open file: " + fi)
-
- buf = "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n\n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include \n"
- buf += "#include <" + fabric_mod_name + "_base.h>\n"
- buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n"
-
- buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " return 1;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_check_true(struct se_portal_group *);\n"
-
- buf += "int " + fabric_mod_name + "_check_false(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_check_false(struct se_portal_group *);\n"
-
- total_fabric_ops = len(fabric_ops)
- i = 0
-
- while i < total_fabric_ops:
- fo = fabric_ops[i]
- i += 1
-# print "fabric_ops: " + fo
-
- if re.search('get_fabric_name', fo):
- buf += "char *" + fabric_mod_name + "_get_fabric_name(void)\n"
- buf += "{\n"
- buf += " return \"" + fabric_mod_name[4:] + "\";\n"
- buf += "}\n\n"
- bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n"
- continue
-
- if re.search('get_fabric_proto_ident', fo):
- buf += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
- buf += " u8 proto_id;\n\n"
- buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
- if proto_ident == "FC":
- buf += " case SCSI_PROTOCOL_FCP:\n"
- buf += " default:\n"
- buf += " proto_id = fc_get_fabric_proto_ident(se_tpg);\n"
- buf += " break;\n"
- elif proto_ident == "SAS":
- buf += " case SCSI_PROTOCOL_SAS:\n"
- buf += " default:\n"
- buf += " proto_id = sas_get_fabric_proto_ident(se_tpg);\n"
- buf += " break;\n"
- elif proto_ident == "iSCSI":
- buf += " case SCSI_PROTOCOL_ISCSI:\n"
- buf += " default:\n"
- buf += " proto_id = iscsi_get_fabric_proto_ident(se_tpg);\n"
- buf += " break;\n"
-
- buf += " }\n\n"
- buf += " return proto_id;\n"
- buf += "}\n\n"
- bufi += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *);\n"
-
- if re.search('get_wwn', fo):
- buf += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n\n"
- buf += " return &" + fabric_mod_port + "->" + fabric_mod_port + "_name[0];\n"
- buf += "}\n\n"
- bufi += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *);\n"
-
- if re.search('get_tag', fo):
- buf += "u16 " + fabric_mod_name + "_get_tag(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " return tpg->" + fabric_mod_port + "_tpgt;\n"
- buf += "}\n\n"
- bufi += "u16 " + fabric_mod_name + "_get_tag(struct se_portal_group *);\n"
-
- if re.search('get_default_depth', fo):
- buf += "u32 " + fabric_mod_name + "_get_default_depth(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " return 1;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_get_default_depth(struct se_portal_group *);\n"
-
- if re.search('get_pr_transport_id\)\(', fo):
- buf += "u32 " + fabric_mod_name + "_get_pr_transport_id(\n"
- buf += " struct se_portal_group *se_tpg,\n"
- buf += " struct se_node_acl *se_nacl,\n"
- buf += " struct t10_pr_registration *pr_reg,\n"
- buf += " int *format_code,\n"
- buf += " unsigned char *buf)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
- buf += " int ret = 0;\n\n"
- buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
- if proto_ident == "FC":
- buf += " case SCSI_PROTOCOL_FCP:\n"
- buf += " default:\n"
- buf += " ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code, buf);\n"
- buf += " break;\n"
- elif proto_ident == "SAS":
- buf += " case SCSI_PROTOCOL_SAS:\n"
- buf += " default:\n"
- buf += " ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code, buf);\n"
- buf += " break;\n"
- elif proto_ident == "iSCSI":
- buf += " case SCSI_PROTOCOL_ISCSI:\n"
- buf += " default:\n"
- buf += " ret = iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code, buf);\n"
- buf += " break;\n"
-
- buf += " }\n\n"
- buf += " return ret;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_get_pr_transport_id(struct se_portal_group *,\n"
- bufi += " struct se_node_acl *, struct t10_pr_registration *,\n"
- bufi += " int *, unsigned char *);\n"
-
- if re.search('get_pr_transport_id_len\)\(', fo):
- buf += "u32 " + fabric_mod_name + "_get_pr_transport_id_len(\n"
- buf += " struct se_portal_group *se_tpg,\n"
- buf += " struct se_node_acl *se_nacl,\n"
- buf += " struct t10_pr_registration *pr_reg,\n"
- buf += " int *format_code)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
- buf += " int ret = 0;\n\n"
- buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
- if proto_ident == "FC":
- buf += " case SCSI_PROTOCOL_FCP:\n"
- buf += " default:\n"
- buf += " ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code);\n"
- buf += " break;\n"
- elif proto_ident == "SAS":
- buf += " case SCSI_PROTOCOL_SAS:\n"
- buf += " default:\n"
- buf += " ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code);\n"
- buf += " break;\n"
- elif proto_ident == "iSCSI":
- buf += " case SCSI_PROTOCOL_ISCSI:\n"
- buf += " default:\n"
- buf += " ret = iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
- buf += " format_code);\n"
- buf += " break;\n"
-
-
- buf += " }\n\n"
- buf += " return ret;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_get_pr_transport_id_len(struct se_portal_group *,\n"
- bufi += " struct se_node_acl *, struct t10_pr_registration *,\n"
- bufi += " int *);\n"
-
- if re.search('parse_pr_out_transport_id\)\(', fo):
- buf += "char *" + fabric_mod_name + "_parse_pr_out_transport_id(\n"
- buf += " struct se_portal_group *se_tpg,\n"
- buf += " const char *buf,\n"
- buf += " u32 *out_tid_len,\n"
- buf += " char **port_nexus_ptr)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
- buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
- buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
- buf += " char *tid = NULL;\n\n"
- buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
- if proto_ident == "FC":
- buf += " case SCSI_PROTOCOL_FCP:\n"
- buf += " default:\n"
- buf += " tid = fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
- buf += " port_nexus_ptr);\n"
- elif proto_ident == "SAS":
- buf += " case SCSI_PROTOCOL_SAS:\n"
- buf += " default:\n"
- buf += " tid = sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
- buf += " port_nexus_ptr);\n"
- elif proto_ident == "iSCSI":
- buf += " case SCSI_PROTOCOL_ISCSI:\n"
- buf += " default:\n"
- buf += " tid = iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
- buf += " port_nexus_ptr);\n"
-
- buf += " }\n\n"
- buf += " return tid;\n"
- buf += "}\n\n"
- bufi += "char *" + fabric_mod_name + "_parse_pr_out_transport_id(struct se_portal_group *,\n"
- bufi += " const char *, u32 *, char **);\n"
-
- if re.search('alloc_fabric_acl\)\(', fo):
- buf += "struct se_node_acl *" + fabric_mod_name + "_alloc_fabric_acl(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_nacl *nacl;\n\n"
- buf += " nacl = kzalloc(sizeof(struct " + fabric_mod_name + "_nacl), GFP_KERNEL);\n"
- buf += " if (!(nacl)) {\n"
- buf += " printk(KERN_ERR \"Unable to alocate struct " + fabric_mod_name + "_nacl\\n\");\n"
- buf += " return NULL;\n"
- buf += " }\n\n"
- buf += " return &nacl->se_node_acl;\n"
- buf += "}\n\n"
- bufi += "struct se_node_acl *" + fabric_mod_name + "_alloc_fabric_acl(struct se_portal_group *);\n"
-
- if re.search('release_fabric_acl\)\(', fo):
- buf += "void " + fabric_mod_name + "_release_fabric_acl(\n"
- buf += " struct se_portal_group *se_tpg,\n"
- buf += " struct se_node_acl *se_nacl)\n"
- buf += "{\n"
- buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_nacl,\n"
- buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
- buf += " kfree(nacl);\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_release_fabric_acl(struct se_portal_group *,\n"
- bufi += " struct se_node_acl *);\n"
-
- if re.search('tpg_get_inst_index\)\(', fo):
- buf += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *se_tpg)\n"
- buf += "{\n"
- buf += " return 1;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *);\n"
-
- if re.search('release_cmd_to_pool', fo):
- buf += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_release_cmd(struct se_cmd *);\n"
-
- if re.search('shutdown_session\)\(', fo):
- buf += "int " + fabric_mod_name + "_shutdown_session(struct se_session *se_sess)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_shutdown_session(struct se_session *);\n"
-
- if re.search('close_session\)\(', fo):
- buf += "void " + fabric_mod_name + "_close_session(struct se_session *se_sess)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_close_session(struct se_session *);\n"
-
- if re.search('stop_session\)\(', fo):
- buf += "void " + fabric_mod_name + "_stop_session(struct se_session *se_sess, int sess_sleep , int conn_sleep)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_stop_session(struct se_session *, int, int);\n"
-
- if re.search('fall_back_to_erl0\)\(', fo):
- buf += "void " + fabric_mod_name + "_reset_nexus(struct se_session *se_sess)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_reset_nexus(struct se_session *);\n"
-
- if re.search('sess_logged_in\)\(', fo):
- buf += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *se_sess)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *);\n"
-
- if re.search('sess_get_index\)\(', fo):
- buf += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *se_sess)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *);\n"
-
- if re.search('write_pending\)\(', fo):
- buf += "int " + fabric_mod_name + "_write_pending(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_write_pending(struct se_cmd *);\n"
-
- if re.search('write_pending_status\)\(', fo):
- buf += "int " + fabric_mod_name + "_write_pending_status(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_write_pending_status(struct se_cmd *);\n"
-
- if re.search('set_default_node_attributes\)\(', fo):
- buf += "void " + fabric_mod_name + "_set_default_node_attrs(struct se_node_acl *nacl)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_set_default_node_attrs(struct se_node_acl *);\n"
-
- if re.search('get_task_tag\)\(', fo):
- buf += "u32 " + fabric_mod_name + "_get_task_tag(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "u32 " + fabric_mod_name + "_get_task_tag(struct se_cmd *);\n"
-
- if re.search('get_cmd_state\)\(', fo):
- buf += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *);\n"
-
- if re.search('new_cmd_failure\)\(', fo):
- buf += "void " + fabric_mod_name + "_new_cmd_failure(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return;\n"
- buf += "}\n\n"
- bufi += "void " + fabric_mod_name + "_new_cmd_failure(struct se_cmd *);\n"
-
- if re.search('queue_data_in\)\(', fo):
- buf += "int " + fabric_mod_name + "_queue_data_in(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_queue_data_in(struct se_cmd *);\n"
-
- if re.search('queue_status\)\(', fo):
- buf += "int " + fabric_mod_name + "_queue_status(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_queue_status(struct se_cmd *);\n"
-
- if re.search('queue_tm_rsp\)\(', fo):
- buf += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n"
-
- if re.search('get_fabric_sense_len\)\(', fo):
- buf += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void);\n"
-
- if re.search('set_fabric_sense_len\)\(', fo):
- buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *, u32);\n"
-
- if re.search('is_state_remove\)\(', fo):
- buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n"
- buf += "{\n"
- buf += " return 0;\n"
- buf += "}\n\n"
- bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n"
-
- if re.search('pack_lun\)\(', fo):
- buf += "u64 " + fabric_mod_name + "_pack_lun(unsigned int lun)\n"
- buf += "{\n"
- buf += " WARN_ON(lun >= 256);\n"
- buf += " /* Caller wants this byte-swapped */\n"
- buf += " return cpu_to_le64((lun & 0xff) << 8);\n"
- buf += "}\n\n"
- bufi += "u64 " + fabric_mod_name + "_pack_lun(unsigned int);\n"
-
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
-
- ret = pi.write(bufi)
- if ret:
- tcm_mod_err("Unable to write fi: " + fi)
-
- pi.close()
- return
-
-def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name):
-
- buf = ""
- f = fabric_mod_dir_var + "/Kbuild"
- print "Writing file: " + f
-
- p = open(f, 'w')
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n"
- buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n"
- buf += " " + fabric_mod_name + "_configfs.o\n"
- buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
- return
-
-def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name):
-
- buf = ""
- f = fabric_mod_dir_var + "/Kconfig"
- print "Writing file: " + f
-
- p = open(f, 'w')
- if not p:
- tcm_mod_err("Unable to open file: " + f)
-
- buf = "config " + fabric_mod_name.upper() + "\n"
- buf += " tristate \"" + fabric_mod_name.upper() + " fabric module\"\n"
- buf += " depends on TARGET_CORE && CONFIGFS_FS\n"
- buf += " default n\n"
- buf += " ---help---\n"
- buf += " Say Y here to enable the " + fabric_mod_name.upper() + " fabric module\n"
-
- ret = p.write(buf)
- if ret:
- tcm_mod_err("Unable to write f: " + f)
-
- p.close()
- return
-
-def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name):
- buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n"
- kbuild = tcm_dir + "/drivers/target/Kbuild"
-
- f = open(kbuild, 'a')
- f.write(buf)
- f.close()
- return
-
-def tcm_mod_add_kconfig(tcm_dir, fabric_mod_name):
- buf = "source \"drivers/target/" + fabric_mod_name.lower() + "/Kconfig\"\n"
- kconfig = tcm_dir + "/drivers/target/Kconfig"
-
- f = open(kconfig, 'a')
- f.write(buf)
- f.close()
- return
-
-def main(modname, proto_ident):
-# proto_ident = "FC"
-# proto_ident = "SAS"
-# proto_ident = "iSCSI"
-
- tcm_dir = os.getcwd();
- tcm_dir += "/../../"
- print "tcm_dir: " + tcm_dir
- fabric_mod_name = modname
- fabric_mod_dir = tcm_dir + "drivers/target/" + fabric_mod_name
- print "Set fabric_mod_name: " + fabric_mod_name
- print "Set fabric_mod_dir: " + fabric_mod_dir
- print "Using proto_ident: " + proto_ident
-
- if proto_ident != "FC" and proto_ident != "SAS" and proto_ident != "iSCSI":
- print "Unsupported proto_ident: " + proto_ident
- sys.exit(1)
-
- ret = tcm_mod_create_module_subdir(fabric_mod_dir)
- if ret:
- print "tcm_mod_create_module_subdir() failed because module already exists!"
- sys.exit(1)
-
- tcm_mod_build_base_includes(proto_ident, fabric_mod_dir, fabric_mod_name)
- tcm_mod_scan_fabric_ops(tcm_dir)
- tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir, fabric_mod_name)
- tcm_mod_build_configfs(proto_ident, fabric_mod_dir, fabric_mod_name)
- tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name)
- tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name)
-
- input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ")
- if input == "yes" or input == "y":
- tcm_mod_add_kbuild(tcm_dir, fabric_mod_name)
-
- input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kconfig..? [yes,no]: ")
- if input == "yes" or input == "y":
- tcm_mod_add_kconfig(tcm_dir, fabric_mod_name)
-
- return
-
-parser = optparse.OptionParser()
-parser.add_option('-m', '--modulename', help='Module name', dest='modname',
- action='store', nargs=1, type='string')
-parser.add_option('-p', '--protoident', help='Protocol Ident', dest='protoident',
- action='store', nargs=1, type='string')
-
-(opts, args) = parser.parse_args()
-
-mandatories = ['modname', 'protoident']
-for m in mandatories:
- if not opts.__dict__[m]:
- print "mandatory option is missing\n"
- parser.print_help()
- exit(-1)
-
-if __name__ == "__main__":
-
- main(str(opts.modname), opts.protoident)
diff --git a/trunk/Documentation/target/tcm_mod_builder.txt b/trunk/Documentation/target/tcm_mod_builder.txt
deleted file mode 100644
index 84533d8e747f..000000000000
--- a/trunk/Documentation/target/tcm_mod_builder.txt
+++ /dev/null
@@ -1,145 +0,0 @@
->>>>>>>>>> The TCM v4 fabric module script generator <<<<<<<<<<
-
-Greetings all,
-
-This document is intended to be a mini-HOWTO for using the tcm_mod_builder.py
-script to generate a brand new functional TCM v4 fabric .ko module of your very own,
-that once built can be immediately be loaded to start access the new TCM/ConfigFS
-fabric skeleton, by simply using:
-
- modprobe $TCM_NEW_MOD
- mkdir -p /sys/kernel/config/target/$TCM_NEW_MOD
-
-This script will create a new drivers/target/$TCM_NEW_MOD/, and will do the following
-
- *) Generate new API callers for drivers/target/target_core_fabric_configs.c logic
- ->make_nodeacl(), ->drop_nodeacl(), ->make_tpg(), ->drop_tpg()
- ->make_wwn(), ->drop_wwn(). These are created into $TCM_NEW_MOD/$TCM_NEW_MOD_configfs.c
- *) Generate basic infrastructure for loading/unloading LKMs and TCM/ConfigFS fabric module
- using a skeleton struct target_core_fabric_ops API template.
- *) Based on user defined T10 Proto_Ident for the new fabric module being built,
- the TransportID / Initiator and Target WWPN related handlers for
- SPC-3 persistent reservation are automatically generated in $TCM_NEW_MOD/$TCM_NEW_MOD_fabric.c
- using drivers/target/target_core_fabric_lib.c logic.
- *) NOP API calls for all other Data I/O path and fabric dependent attribute logic
- in $TCM_NEW_MOD/$TCM_NEW_MOD_fabric.c
-
-tcm_mod_builder.py depends upon the mandatory '-p $PROTO_IDENT' and '-m
-$FABRIC_MOD_name' parameters, and actually running the script looks like:
-
-target:/mnt/sdb/lio-core-2.6.git/Documentation/target# python tcm_mod_builder.py -p iSCSI -m tcm_nab5000
-tcm_dir: /mnt/sdb/lio-core-2.6.git/Documentation/target/../../
-Set fabric_mod_name: tcm_nab5000
-Set fabric_mod_dir:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000
-Using proto_ident: iSCSI
-Creating fabric_mod_dir:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_base.h
-Using tcm_mod_scan_fabric_ops:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../include/target/target_core_fabric_ops.h
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric.c
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_fabric.h
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/tcm_nab5000_configfs.c
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/Kbuild
-Writing file:
-/mnt/sdb/lio-core-2.6.git/Documentation/target/../../drivers/target/tcm_nab5000/Kconfig
-Would you like to add tcm_nab5000to drivers/target/Kbuild..? [yes,no]: yes
-Would you like to add tcm_nab5000to drivers/target/Kconfig..? [yes,no]: yes
-
-At the end of tcm_mod_builder.py. the script will ask to add the following
-line to drivers/target/Kbuild:
-
- obj-$(CONFIG_TCM_NAB5000) += tcm_nab5000/
-
-and the same for drivers/target/Kconfig:
-
- source "drivers/target/tcm_nab5000/Kconfig"
-
-*) Run 'make menuconfig' and select the new CONFIG_TCM_NAB5000 item:
-
- TCM_NAB5000 fabric module
-
-*) Build using 'make modules', once completed you will have:
-
-target:/mnt/sdb/lio-core-2.6.git# ls -la drivers/target/tcm_nab5000/
-total 1348
-drwxr-xr-x 2 root root 4096 2010-10-05 03:23 .
-drwxr-xr-x 9 root root 4096 2010-10-05 03:22 ..
--rw-r--r-- 1 root root 282 2010-10-05 03:22 Kbuild
--rw-r--r-- 1 root root 171 2010-10-05 03:22 Kconfig
--rw-r--r-- 1 root root 49 2010-10-05 03:23 modules.order
--rw-r--r-- 1 root root 738 2010-10-05 03:22 tcm_nab5000_base.h
--rw-r--r-- 1 root root 9096 2010-10-05 03:22 tcm_nab5000_configfs.c
--rw-r--r-- 1 root root 191200 2010-10-05 03:23 tcm_nab5000_configfs.o
--rw-r--r-- 1 root root 40504 2010-10-05 03:23 .tcm_nab5000_configfs.o.cmd
--rw-r--r-- 1 root root 5414 2010-10-05 03:22 tcm_nab5000_fabric.c
--rw-r--r-- 1 root root 2016 2010-10-05 03:22 tcm_nab5000_fabric.h
--rw-r--r-- 1 root root 190932 2010-10-05 03:23 tcm_nab5000_fabric.o
--rw-r--r-- 1 root root 40713 2010-10-05 03:23 .tcm_nab5000_fabric.o.cmd
--rw-r--r-- 1 root root 401861 2010-10-05 03:23 tcm_nab5000.ko
--rw-r--r-- 1 root root 265 2010-10-05 03:23 .tcm_nab5000.ko.cmd
--rw-r--r-- 1 root root 459 2010-10-05 03:23 tcm_nab5000.mod.c
--rw-r--r-- 1 root root 23896 2010-10-05 03:23 tcm_nab5000.mod.o
--rw-r--r-- 1 root root 22655 2010-10-05 03:23 .tcm_nab5000.mod.o.cmd
--rw-r--r-- 1 root root 379022 2010-10-05 03:23 tcm_nab5000.o
--rw-r--r-- 1 root root 211 2010-10-05 03:23 .tcm_nab5000.o.cmd
-
-*) Load the new module, create a lun_0 configfs group, and add new TCM Core
- IBLOCK backstore symlink to port:
-
-target:/mnt/sdb/lio-core-2.6.git# insmod drivers/target/tcm_nab5000.ko
-target:/mnt/sdb/lio-core-2.6.git# mkdir -p /sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0
-target:/mnt/sdb/lio-core-2.6.git# cd /sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0/
-target:/sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0# ln -s /sys/kernel/config/target/core/iblock_0/lvm_test0 nab5000_port
-
-target:/sys/kernel/config/target/nab5000/iqn.foo/tpgt_1/lun/lun_0# cd -
-target:/mnt/sdb/lio-core-2.6.git# tree /sys/kernel/config/target/nab5000/
-/sys/kernel/config/target/nab5000/
-|-- discovery_auth
-|-- iqn.foo
-| `-- tpgt_1
-| |-- acls
-| |-- attrib
-| |-- lun
-| | `-- lun_0
-| | |-- alua_tg_pt_gp
-| | |-- alua_tg_pt_offline
-| | |-- alua_tg_pt_status
-| | |-- alua_tg_pt_write_md
-| | `-- nab5000_port -> ../../../../../../target/core/iblock_0/lvm_test0
-| |-- np
-| `-- param
-`-- version
-
-target:/mnt/sdb/lio-core-2.6.git# lsmod
-Module Size Used by
-tcm_nab5000 3935 4
-iscsi_target_mod 193211 0
-target_core_stgt 8090 0
-target_core_pscsi 11122 1
-target_core_file 9172 2
-target_core_iblock 9280 1
-target_core_mod 228575 31
-tcm_nab5000,iscsi_target_mod,target_core_stgt,target_core_pscsi,target_core_file,target_core_iblock
-libfc 73681 0
-scsi_debug 56265 0
-scsi_tgt 8666 1 target_core_stgt
-configfs 20644 2 target_core_mod
-
-----------------------------------------------------------------------
-
-Future TODO items:
-
- *) Add more T10 proto_idents
- *) Make tcm_mod_dump_fabric_ops() smarter and generate function pointer
- defs directly from include/target/target_core_fabric_ops.h:struct target_core_fabric_ops
- structure members.
-
-October 5th, 2010
-Nicholas A. Bellinger
diff --git a/trunk/Documentation/thermal/sysfs-api.txt b/trunk/Documentation/thermal/sysfs-api.txt
index b61e46f449aa..cb3d15bc1aeb 100644
--- a/trunk/Documentation/thermal/sysfs-api.txt
+++ b/trunk/Documentation/thermal/sysfs-api.txt
@@ -278,15 +278,3 @@ method, the sys I/F structure will be built like this:
|---name: acpitz
|---temp1_input: 37000
|---temp1_crit: 100000
-
-4. Event Notification
-
-The framework includes a simple notification mechanism, in the form of a
-netlink event. Netlink socket initialization is done during the _init_
-of the framework. Drivers which intend to use the notification mechanism
-just need to call generate_netlink_event() with two arguments viz
-(originator, event). Typically the originator will be an integer assigned
-to a thermal_zone_device when it registers itself with the framework. The
-event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL,
-THERMAL_DEV_FAULT}. Notification can be sent when the current temperature
-crosses any of the configured thresholds.
diff --git a/trunk/Documentation/vm/transhuge.txt b/trunk/Documentation/vm/transhuge.txt
deleted file mode 100644
index 0924aaca3302..000000000000
--- a/trunk/Documentation/vm/transhuge.txt
+++ /dev/null
@@ -1,298 +0,0 @@
-= Transparent Hugepage Support =
-
-== Objective ==
-
-Performance critical computing applications dealing with large memory
-working sets are already running on top of libhugetlbfs and in turn
-hugetlbfs. Transparent Hugepage Support is an alternative means of
-using huge pages for the backing of virtual memory with huge pages
-that supports the automatic promotion and demotion of page sizes and
-without the shortcomings of hugetlbfs.
-
-Currently it only works for anonymous memory mappings but in the
-future it can expand over the pagecache layer starting with tmpfs.
-
-The reason applications are running faster is because of two
-factors. The first factor is almost completely irrelevant and it's not
-of significant interest because it'll also have the downside of
-requiring larger clear-page copy-page in page faults which is a
-potentially negative effect. The first factor consists in taking a
-single page fault for each 2M virtual region touched by userland (so
-reducing the enter/exit kernel frequency by a 512 times factor). This
-only matters the first time the memory is accessed for the lifetime of
-a memory mapping. The second long lasting and much more important
-factor will affect all subsequent accesses to the memory for the whole
-runtime of the application. The second factor consist of two
-components: 1) the TLB miss will run faster (especially with
-virtualization using nested pagetables but almost always also on bare
-metal without virtualization) and 2) a single TLB entry will be
-mapping a much larger amount of virtual memory in turn reducing the
-number of TLB misses. With virtualization and nested pagetables the
-TLB can be mapped of larger size only if both KVM and the Linux guest
-are using hugepages but a significant speedup already happens if only
-one of the two is using hugepages just because of the fact the TLB
-miss is going to run faster.
-
-== Design ==
-
-- "graceful fallback": mm components which don't have transparent
- hugepage knowledge fall back to breaking a transparent hugepage and
- working on the regular pages and their respective regular pmd/pte
- mappings
-
-- if a hugepage allocation fails because of memory fragmentation,
- regular pages should be gracefully allocated instead and mixed in
- the same vma without any failure or significant delay and without
- userland noticing
-
-- if some task quits and more hugepages become available (either
- immediately in the buddy or through the VM), guest physical memory
- backed by regular pages should be relocated on hugepages
- automatically (with khugepaged)
-
-- it doesn't require memory reservation and in turn it uses hugepages
- whenever possible (the only possible reservation here is kernelcore=
- to avoid unmovable pages to fragment all the memory but such a tweak
- is not specific to transparent hugepage support and it's a generic
- feature that applies to all dynamic high order allocations in the
- kernel)
-
-- this initial support only offers the feature in the anonymous memory
- regions but it'd be ideal to move it to tmpfs and the pagecache
- later
-
-Transparent Hugepage Support maximizes the usefulness of free memory
-if compared to the reservation approach of hugetlbfs by allowing all
-unused memory to be used as cache or other movable (or even unmovable
-entities). It doesn't require reservation to prevent hugepage
-allocation failures to be noticeable from userland. It allows paging
-and all other advanced VM features to be available on the
-hugepages. It requires no modifications for applications to take
-advantage of it.
-
-Applications however can be further optimized to take advantage of
-this feature, like for example they've been optimized before to avoid
-a flood of mmap system calls for every malloc(4k). Optimizing userland
-is by far not mandatory and khugepaged already can take care of long
-lived page allocations even for hugepage unaware applications that
-deals with large amounts of memory.
-
-In certain cases when hugepages are enabled system wide, application
-may end up allocating more memory resources. An application may mmap a
-large region but only touch 1 byte of it, in that case a 2M page might
-be allocated instead of a 4k page for no good. This is why it's
-possible to disable hugepages system-wide and to only have them inside
-MADV_HUGEPAGE madvise regions.
-
-Embedded systems should enable hugepages only inside madvise regions
-to eliminate any risk of wasting any precious byte of memory and to
-only run faster.
-
-Applications that gets a lot of benefit from hugepages and that don't
-risk to lose memory by using hugepages, should use
-madvise(MADV_HUGEPAGE) on their critical mmapped regions.
-
-== sysfs ==
-
-Transparent Hugepage Support can be entirely disabled (mostly for
-debugging purposes) or only enabled inside MADV_HUGEPAGE regions (to
-avoid the risk of consuming more memory resources) or enabled system
-wide. This can be achieved with one of:
-
-echo always >/sys/kernel/mm/transparent_hugepage/enabled
-echo madvise >/sys/kernel/mm/transparent_hugepage/enabled
-echo never >/sys/kernel/mm/transparent_hugepage/enabled
-
-It's also possible to limit defrag efforts in the VM to generate
-hugepages in case they're not immediately free to madvise regions or
-to never try to defrag memory and simply fallback to regular pages
-unless hugepages are immediately available. Clearly if we spend CPU
-time to defrag memory, we would expect to gain even more by the fact
-we use hugepages later instead of regular pages. This isn't always
-guaranteed, but it may be more likely in case the allocation is for a
-MADV_HUGEPAGE region.
-
-echo always >/sys/kernel/mm/transparent_hugepage/defrag
-echo madvise >/sys/kernel/mm/transparent_hugepage/defrag
-echo never >/sys/kernel/mm/transparent_hugepage/defrag
-
-khugepaged will be automatically started when
-transparent_hugepage/enabled is set to "always" or "madvise, and it'll
-be automatically shutdown if it's set to "never".
-
-khugepaged runs usually at low frequency so while one may not want to
-invoke defrag algorithms synchronously during the page faults, it
-should be worth invoking defrag at least in khugepaged. However it's
-also possible to disable defrag in khugepaged:
-
-echo yes >/sys/kernel/mm/transparent_hugepage/khugepaged/defrag
-echo no >/sys/kernel/mm/transparent_hugepage/khugepaged/defrag
-
-You can also control how many pages khugepaged should scan at each
-pass:
-
-/sys/kernel/mm/transparent_hugepage/khugepaged/pages_to_scan
-
-and how many milliseconds to wait in khugepaged between each pass (you
-can set this to 0 to run khugepaged at 100% utilization of one core):
-
-/sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs
-
-and how many milliseconds to wait in khugepaged if there's an hugepage
-allocation failure to throttle the next allocation attempt.
-
-/sys/kernel/mm/transparent_hugepage/khugepaged/alloc_sleep_millisecs
-
-The khugepaged progress can be seen in the number of pages collapsed:
-
-/sys/kernel/mm/transparent_hugepage/khugepaged/pages_collapsed
-
-for each pass:
-
-/sys/kernel/mm/transparent_hugepage/khugepaged/full_scans
-
-== Boot parameter ==
-
-You can change the sysfs boot time defaults of Transparent Hugepage
-Support by passing the parameter "transparent_hugepage=always" or
-"transparent_hugepage=madvise" or "transparent_hugepage=never"
-(without "") to the kernel command line.
-
-== Need of application restart ==
-
-The transparent_hugepage/enabled values only affect future
-behavior. So to make them effective you need to restart any
-application that could have been using hugepages. This also applies to
-the regions registered in khugepaged.
-
-== get_user_pages and follow_page ==
-
-get_user_pages and follow_page if run on a hugepage, will return the
-head or tail pages as usual (exactly as they would do on
-hugetlbfs). Most gup users will only care about the actual physical
-address of the page and its temporary pinning to release after the I/O
-is complete, so they won't ever notice the fact the page is huge. But
-if any driver is going to mangle over the page structure of the tail
-page (like for checking page->mapping or other bits that are relevant
-for the head page and not the tail page), it should be updated to jump
-to check head page instead (while serializing properly against
-split_huge_page() to avoid the head and tail pages to disappear from
-under it, see the futex code to see an example of that, hugetlbfs also
-needed special handling in futex code for similar reasons).
-
-NOTE: these aren't new constraints to the GUP API, and they match the
-same constrains that applies to hugetlbfs too, so any driver capable
-of handling GUP on hugetlbfs will also work fine on transparent
-hugepage backed mappings.
-
-In case you can't handle compound pages if they're returned by
-follow_page, the FOLL_SPLIT bit can be specified as parameter to
-follow_page, so that it will split the hugepages before returning
-them. Migration for example passes FOLL_SPLIT as parameter to
-follow_page because it's not hugepage aware and in fact it can't work
-at all on hugetlbfs (but it instead works fine on transparent
-hugepages thanks to FOLL_SPLIT). migration simply can't deal with
-hugepages being returned (as it's not only checking the pfn of the
-page and pinning it during the copy but it pretends to migrate the
-memory in regular page sizes and with regular pte/pmd mappings).
-
-== Optimizing the applications ==
-
-To be guaranteed that the kernel will map a 2M page immediately in any
-memory region, the mmap region has to be hugepage naturally
-aligned. posix_memalign() can provide that guarantee.
-
-== Hugetlbfs ==
-
-You can use hugetlbfs on a kernel that has transparent hugepage
-support enabled just fine as always. No difference can be noted in
-hugetlbfs other than there will be less overall fragmentation. All
-usual features belonging to hugetlbfs are preserved and
-unaffected. libhugetlbfs will also work fine as usual.
-
-== Graceful fallback ==
-
-Code walking pagetables but unware about huge pmds can simply call
-split_huge_page_pmd(mm, pmd) where the pmd is the one returned by
-pmd_offset. It's trivial to make the code transparent hugepage aware
-by just grepping for "pmd_offset" and adding split_huge_page_pmd where
-missing after pmd_offset returns the pmd. Thanks to the graceful
-fallback design, with a one liner change, you can avoid to write
-hundred if not thousand of lines of complex code to make your code
-hugepage aware.
-
-If you're not walking pagetables but you run into a physical hugepage
-but you can't handle it natively in your code, you can split it by
-calling split_huge_page(page). This is what the Linux VM does before
-it tries to swapout the hugepage for example.
-
-Example to make mremap.c transparent hugepage aware with a one liner
-change:
-
-diff --git a/mm/mremap.c b/mm/mremap.c
---- a/mm/mremap.c
-+++ b/mm/mremap.c
-@@ -41,6 +41,7 @@ static pmd_t *get_old_pmd(struct mm_stru
- return NULL;
-
- pmd = pmd_offset(pud, addr);
-+ split_huge_page_pmd(mm, pmd);
- if (pmd_none_or_clear_bad(pmd))
- return NULL;
-
-== Locking in hugepage aware code ==
-
-We want as much code as possible hugepage aware, as calling
-split_huge_page() or split_huge_page_pmd() has a cost.
-
-To make pagetable walks huge pmd aware, all you need to do is to call
-pmd_trans_huge() on the pmd returned by pmd_offset. You must hold the
-mmap_sem in read (or write) mode to be sure an huge pmd cannot be
-created from under you by khugepaged (khugepaged collapse_huge_page
-takes the mmap_sem in write mode in addition to the anon_vma lock). If
-pmd_trans_huge returns false, you just fallback in the old code
-paths. If instead pmd_trans_huge returns true, you have to take the
-mm->page_table_lock and re-run pmd_trans_huge. Taking the
-page_table_lock will prevent the huge pmd to be converted into a
-regular pmd from under you (split_huge_page can run in parallel to the
-pagetable walk). If the second pmd_trans_huge returns false, you
-should just drop the page_table_lock and fallback to the old code as
-before. Otherwise you should run pmd_trans_splitting on the pmd. In
-case pmd_trans_splitting returns true, it means split_huge_page is
-already in the middle of splitting the page. So if pmd_trans_splitting
-returns true it's enough to drop the page_table_lock and call
-wait_split_huge_page and then fallback the old code paths. You are
-guaranteed by the time wait_split_huge_page returns, the pmd isn't
-huge anymore. If pmd_trans_splitting returns false, you can proceed to
-process the huge pmd and the hugepage natively. Once finished you can
-drop the page_table_lock.
-
-== compound_lock, get_user_pages and put_page ==
-
-split_huge_page internally has to distribute the refcounts in the head
-page to the tail pages before clearing all PG_head/tail bits from the
-page structures. It can do that easily for refcounts taken by huge pmd
-mappings. But the GUI API as created by hugetlbfs (that returns head
-and tail pages if running get_user_pages on an address backed by any
-hugepage), requires the refcount to be accounted on the tail pages and
-not only in the head pages, if we want to be able to run
-split_huge_page while there are gup pins established on any tail
-page. Failure to be able to run split_huge_page if there's any gup pin
-on any tail page, would mean having to split all hugepages upfront in
-get_user_pages which is unacceptable as too many gup users are
-performance critical and they must work natively on hugepages like
-they work natively on hugetlbfs already (hugetlbfs is simpler because
-hugetlbfs pages cannot be splitted so there wouldn't be requirement of
-accounting the pins on the tail pages for hugetlbfs). If we wouldn't
-account the gup refcounts on the tail pages during gup, we won't know
-anymore which tail page is pinned by gup and which is not while we run
-split_huge_page. But we still have to add the gup pin to the head page
-too, to know when we can free the compound page in case it's never
-splitted during its lifetime. That requires changing not just
-get_page, but put_page as well so that when put_page runs on a tail
-page (and only on a tail page) it will find its respective head page,
-and then it will decrease the head page refcount in addition to the
-tail page refcount. To obtain a head page reliably and to decrease its
-refcount without race conditions, put_page has to serialize against
-__split_huge_page_refcount using a special per-page lock called
-compound_lock.
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 1af022e63668..78162c4f9544 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -1523,14 +1523,6 @@ S: Supported
F: block/bsg.c
F: include/linux/bsg.h
-BT87X AUDIO DRIVER
-M: Clemens Ladisch
-L: alsa-devel@alsa-project.org (moderated for non-subscribers)
-T: git git://git.alsa-project.org/alsa-kernel.git
-S: Maintained
-F: Documentation/sound/alsa/Bt87x.txt
-F: sound/pci/bt87x.c
-
BT8XXGPIO DRIVER
M: Michael Buesch
W: http://bu3sch.de/btgpio.php
@@ -1556,13 +1548,6 @@ S: Maintained
F: Documentation/video4linux/bttv/
F: drivers/media/video/bt8xx/bttv*
-C-MEDIA CMI8788 DRIVER
-M: Clemens Ladisch
-L: alsa-devel@alsa-project.org (moderated for non-subscribers)
-T: git git://git.alsa-project.org/alsa-kernel.git
-S: Maintained
-F: sound/pci/oxygen/
-
CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
M: David Howells
L: linux-cachefs@redhat.com
@@ -2354,13 +2339,6 @@ W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/r82600_edac.c
-EDIROL UA-101/UA-1000 DRIVER
-M: Clemens Ladisch
-L: alsa-devel@alsa-project.org (moderated for non-subscribers)
-T: git git://git.alsa-project.org/alsa-kernel.git
-S: Maintained
-F: sound/usb/misc/ua101.c
-
EEEPC LAPTOP EXTRAS DRIVER
M: Corentin Chary
L: acpi4asus-user@lists.sourceforge.net
@@ -3529,13 +3507,6 @@ L: linux-serial@vger.kernel.org
S: Maintained
F: drivers/serial/jsm/
-K10TEMP HARDWARE MONITORING DRIVER
-M: Clemens Ladisch
-L: lm-sensors@lm-sensors.org
-S: Maintained
-F: Documentation/hwmon/k10temp
-F: drivers/hwmon/k10temp.c
-
K8TEMP HARDWARE MONITORING DRIVER
M: Rudolf Marek
L: lm-sensors@lm-sensors.org
@@ -3684,7 +3655,7 @@ F: kernel/debug/
KMEMCHECK
M: Vegard Nossum
-M: Pekka Enberg
+M: Pekka Enberg
S: Maintained
F: Documentation/kmemcheck.txt
F: arch/x86/include/asm/kmemcheck.h
@@ -4566,13 +4537,6 @@ F: drivers/of
F: include/linux/of*.h
K: of_get_property
-OPL4 DRIVER
-M: Clemens Ladisch
-L: alsa-devel@alsa-project.org (moderated for non-subscribers)
-T: git git://git.alsa-project.org/alsa-kernel.git
-S: Maintained
-F: sound/drivers/opl4/
-
OPROFILE
M: Robert Richter
L: oprofile-list@lists.sf.net
@@ -5272,7 +5236,8 @@ S: Supported
F: drivers/s390/net/
S390 ZCRYPT DRIVER
-M: Holger Dengler
+M: Felix Beck
+M: Ralph Wuerthner
M: linux390@de.ibm.com
L: linux-s390@vger.kernel.org
W: http://www.ibm.com/developerworks/linux/linux390/
@@ -5318,7 +5283,7 @@ SAMSUNG AUDIO (ASoC) DRIVERS
M: Jassi Brar
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Supported
-F: sound/soc/samsung
+F: sound/soc/s3c24xx
TIMEKEEPING, NTP
M: John Stultz
@@ -5646,7 +5611,7 @@ F: drivers/net/sky2.*
SLAB ALLOCATOR
M: Christoph Lameter
-M: Pekka Enberg
+M: Pekka Enberg
M: Matt Mackall
L: linux-mm@kvack.org
S: Maintained
@@ -6326,13 +6291,6 @@ S: Maintained
W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
F: drivers/usb/storage/
-USB MIDI DRIVER
-M: Clemens Ladisch
-L: alsa-devel@alsa-project.org (moderated for non-subscribers)
-T: git git://git.alsa-project.org/alsa-kernel.git
-S: Maintained
-F: sound/usb/midi.*
-
USB OHCI DRIVER
M: David Brownell
L: linux-usb@vger.kernel.org
@@ -6591,12 +6549,13 @@ F: Documentation/i2c/busses/i2c-viapro
F: drivers/i2c/busses/i2c-viapro.c
VIA SD/MMC CARD CONTROLLER DRIVER
-M: Bruce Chang
+M: Joseph Chan
M: Harald Welte
S: Maintained
F: drivers/mmc/host/via-sdmmc.c
VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER
+M: Joseph Chan
M: Florian Tobias Schandinat
L: linux-fbdev@vger.kernel.org
S: Maintained
diff --git a/trunk/Makefile b/trunk/Makefile
index abb49bf8596e..6a457690d10b 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
-SUBLEVEL = 38
-EXTRAVERSION = -rc1
+SUBLEVEL = 37
+EXTRAVERSION =
NAME = Flesh-Eating Bats with Fangs
# *DOCUMENTATION*
diff --git a/trunk/arch/alpha/Kconfig b/trunk/arch/alpha/Kconfig
index fc95ee1bcf6f..943fe6930f77 100644
--- a/trunk/arch/alpha/Kconfig
+++ b/trunk/arch/alpha/Kconfig
@@ -68,9 +68,6 @@ config GENERIC_IOMAP
bool
default n
-config GENERIC_HARDIRQS_NO__DO_IRQ
- def_bool y
-
config GENERIC_HARDIRQS
bool
default y
diff --git a/trunk/arch/alpha/include/asm/io.h b/trunk/arch/alpha/include/asm/io.h
index 56ff96501350..eda9b909aa05 100644
--- a/trunk/arch/alpha/include/asm/io.h
+++ b/trunk/arch/alpha/include/asm/io.h
@@ -37,9 +37,8 @@
*/
extern inline void __set_hae(unsigned long new_hae)
{
- unsigned long flags = swpipl(IPL_MAX);
-
- barrier();
+ unsigned long flags;
+ local_irq_save(flags);
alpha_mv.hae_cache = new_hae;
*alpha_mv.hae_register = new_hae;
@@ -47,8 +46,7 @@ extern inline void __set_hae(unsigned long new_hae)
/* Re-read to make sure it was written. */
new_hae = *alpha_mv.hae_register;
- setipl(flags);
- barrier();
+ local_irq_restore(flags);
}
extern inline void set_hae(unsigned long new_hae)
diff --git a/trunk/arch/alpha/include/asm/mman.h b/trunk/arch/alpha/include/asm/mman.h
index 72db984f8781..99c56d47879d 100644
--- a/trunk/arch/alpha/include/asm/mman.h
+++ b/trunk/arch/alpha/include/asm/mman.h
@@ -53,9 +53,6 @@
#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
-#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
-#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
-
/* compatibility flags */
#define MAP_FILE 0
diff --git a/trunk/arch/alpha/kernel/Makefile b/trunk/arch/alpha/kernel/Makefile
index 9bb7b858ed23..1ee9b5b629b8 100644
--- a/trunk/arch/alpha/kernel/Makefile
+++ b/trunk/arch/alpha/kernel/Makefile
@@ -3,8 +3,8 @@
#
extra-y := head.o vmlinux.lds
-asflags-y := $(KBUILD_CFLAGS)
-ccflags-y := -Werror -Wno-sign-compare
+EXTRA_AFLAGS := $(KBUILD_CFLAGS)
+EXTRA_CFLAGS := -Werror -Wno-sign-compare
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o \
diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c
index 9ab234f48dd8..fe912984d9b1 100644
--- a/trunk/arch/alpha/kernel/irq.c
+++ b/trunk/arch/alpha/kernel/irq.c
@@ -44,11 +44,10 @@ static char irq_user_affinity[NR_IRQS];
int irq_select_affinity(unsigned int irq)
{
- struct irq_desc *desc = irq_to_desc[irq];
static int last_cpu;
int cpu = last_cpu + 1;
- if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
+ if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
return 1;
while (!cpu_possible(cpu) ||
@@ -56,8 +55,8 @@ int irq_select_affinity(unsigned int irq)
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu;
- cpumask_copy(desc->affinity, cpumask_of(cpu));
- get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
+ cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
+ irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
return 0;
}
#endif /* CONFIG_SMP */
@@ -68,7 +67,6 @@ show_interrupts(struct seq_file *p, void *v)
int j;
int irq = *(loff_t *) v;
struct irqaction * action;
- struct irq_desc *desc;
unsigned long flags;
#ifdef CONFIG_SMP
@@ -81,13 +79,8 @@ show_interrupts(struct seq_file *p, void *v)
#endif
if (irq < ACTUAL_NR_IRQS) {
- desc = irq_to_desc(irq);
-
- if (!desc)
- return 0;
-
- raw_spin_lock_irqsave(&desc->lock, flags);
- action = desc->action;
+ raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
+ action = irq_desc[irq].action;
if (!action)
goto unlock;
seq_printf(p, "%3d: ", irq);
@@ -97,7 +90,7 @@ show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
#endif
- seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
+ seq_printf(p, " %14s", irq_desc[irq].chip->name);
seq_printf(p, " %c%s",
(action->flags & IRQF_DISABLED)?'+':' ',
action->name);
@@ -110,7 +103,7 @@ show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n');
unlock:
- raw_spin_unlock_irqrestore(&desc->lock, flags);
+ raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
} else if (irq == ACTUAL_NR_IRQS) {
#ifdef CONFIG_SMP
seq_puts(p, "IPI: ");
@@ -149,10 +142,8 @@ handle_irq(int irq)
* handled by some other CPU. (or is disabled)
*/
static unsigned int illegal_count=0;
- struct irq_desc *desc = irq_to_desc(irq);
- if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
- illegal_count < MAX_ILLEGAL_IRQS)) {
+ if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) {
irq_err_count++;
illegal_count++;
printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
@@ -160,14 +151,14 @@ handle_irq(int irq)
return;
}
+ irq_enter();
/*
- * From here we must proceed with IPL_MAX. Note that we do not
+ * __do_IRQ() must be called with IPL_MAX. Note that we do not
* explicitly enable interrupts afterwards - some MILO PALcode
* (namely LX164 one) seems to have severe problems with RTI
* at IPL 0.
*/
local_irq_disable();
- irq_enter();
- generic_handle_irq_desc(irq, desc);
+ __do_IRQ(irq);
irq_exit();
}
diff --git a/trunk/arch/alpha/kernel/irq_alpha.c b/trunk/arch/alpha/kernel/irq_alpha.c
index 2d0679b60939..4c8bb374eb0a 100644
--- a/trunk/arch/alpha/kernel/irq_alpha.c
+++ b/trunk/arch/alpha/kernel/irq_alpha.c
@@ -219,23 +219,31 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
* processed by PALcode, and comes in via entInt vector 1.
*/
+static void rtc_enable_disable(unsigned int irq) { }
+static unsigned int rtc_startup(unsigned int irq) { return 0; }
+
struct irqaction timer_irqaction = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED,
.name = "timer",
};
+static struct irq_chip rtc_irq_type = {
+ .name = "RTC",
+ .startup = rtc_startup,
+ .shutdown = rtc_enable_disable,
+ .enable = rtc_enable_disable,
+ .disable = rtc_enable_disable,
+ .ack = rtc_enable_disable,
+ .end = rtc_enable_disable,
+};
+
void __init
init_rtc_irq(void)
{
- struct irq_desc *desc = irq_to_desc(RTC_IRQ);
-
- if (desc) {
- desc->status |= IRQ_DISABLED;
- set_irq_chip_and_handler_name(RTC_IRQ, &no_irq_chip,
- handle_simple_irq, "RTC");
- setup_irq(RTC_IRQ, &timer_irqaction);
- }
+ irq_desc[RTC_IRQ].status = IRQ_DISABLED;
+ irq_desc[RTC_IRQ].chip = &rtc_irq_type;
+ setup_irq(RTC_IRQ, &timer_irqaction);
}
/* Dummy irqactions. */
diff --git a/trunk/arch/alpha/kernel/irq_i8259.c b/trunk/arch/alpha/kernel/irq_i8259.c
index 956ea0ed1694..83a9ac280890 100644
--- a/trunk/arch/alpha/kernel/irq_i8259.c
+++ b/trunk/arch/alpha/kernel/irq_i8259.c
@@ -69,11 +69,28 @@ i8259a_mask_and_ack_irq(unsigned int irq)
spin_unlock(&i8259_irq_lock);
}
+unsigned int
+i8259a_startup_irq(unsigned int irq)
+{
+ i8259a_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+void
+i8259a_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ i8259a_enable_irq(irq);
+}
+
struct irq_chip i8259a_irq_type = {
.name = "XT-PIC",
- .unmask = i8259a_enable_irq,
- .mask = i8259a_disable_irq,
- .mask_ack = i8259a_mask_and_ack_irq,
+ .startup = i8259a_startup_irq,
+ .shutdown = i8259a_disable_irq,
+ .enable = i8259a_enable_irq,
+ .disable = i8259a_disable_irq,
+ .ack = i8259a_mask_and_ack_irq,
+ .end = i8259a_end_irq,
};
void __init
@@ -90,7 +107,8 @@ init_i8259a_irqs(void)
outb(0xff, 0xA1); /* mask all of 8259A-2 */
for (i = 0; i < 16; i++) {
- set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED;
+ irq_desc[i].chip = &i8259a_irq_type;
}
setup_irq(2, &cascade);
diff --git a/trunk/arch/alpha/kernel/irq_pyxis.c b/trunk/arch/alpha/kernel/irq_pyxis.c
index 2863458c853e..989ce46a0cf3 100644
--- a/trunk/arch/alpha/kernel/irq_pyxis.c
+++ b/trunk/arch/alpha/kernel/irq_pyxis.c
@@ -40,6 +40,20 @@ pyxis_disable_irq(unsigned int irq)
pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16)));
}
+static unsigned int
+pyxis_startup_irq(unsigned int irq)
+{
+ pyxis_enable_irq(irq);
+ return 0;
+}
+
+static void
+pyxis_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ pyxis_enable_irq(irq);
+}
+
static void
pyxis_mask_and_ack_irq(unsigned int irq)
{
@@ -58,9 +72,12 @@ pyxis_mask_and_ack_irq(unsigned int irq)
static struct irq_chip pyxis_irq_type = {
.name = "PYXIS",
- .mask_ack = pyxis_mask_and_ack_irq,
- .mask = pyxis_disable_irq,
- .unmask = pyxis_enable_irq,
+ .startup = pyxis_startup_irq,
+ .shutdown = pyxis_disable_irq,
+ .enable = pyxis_enable_irq,
+ .disable = pyxis_disable_irq,
+ .ack = pyxis_mask_and_ack_irq,
+ .end = pyxis_end_irq,
};
void
@@ -102,8 +119,8 @@ init_pyxis_irqs(unsigned long ignore_mask)
for (i = 16; i < 48; ++i) {
if ((ignore_mask >> i) & 1)
continue;
- set_irq_chip_and_handler(i, &pyxis_irq_type, handle_level_irq);
- irq_to_desc(i)->status |= IRQ_LEVEL;
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &pyxis_irq_type;
}
setup_irq(16+7, &isa_cascade_irqaction);
diff --git a/trunk/arch/alpha/kernel/irq_srm.c b/trunk/arch/alpha/kernel/irq_srm.c
index 0e57e828b413..d63e93e1e8bf 100644
--- a/trunk/arch/alpha/kernel/irq_srm.c
+++ b/trunk/arch/alpha/kernel/irq_srm.c
@@ -33,12 +33,29 @@ srm_disable_irq(unsigned int irq)
spin_unlock(&srm_irq_lock);
}
+static unsigned int
+srm_startup_irq(unsigned int irq)
+{
+ srm_enable_irq(irq);
+ return 0;
+}
+
+static void
+srm_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ srm_enable_irq(irq);
+}
+
/* Handle interrupts from the SRM, assuming no additional weirdness. */
static struct irq_chip srm_irq_type = {
.name = "SRM",
- .unmask = srm_enable_irq,
- .mask = srm_disable_irq,
- .mask_ack = srm_disable_irq,
+ .startup = srm_startup_irq,
+ .shutdown = srm_disable_irq,
+ .enable = srm_enable_irq,
+ .disable = srm_disable_irq,
+ .ack = srm_disable_irq,
+ .end = srm_end_irq,
};
void __init
@@ -51,8 +68,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
for (i = 16; i < max; ++i) {
if (i < 64 && ((ignore_mask >> i) & 1))
continue;
- set_irq_chip_and_handler(i, &srm_irq_type, handle_level_irq);
- irq_to_desc(i)->status |= IRQ_LEVEL;
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &srm_irq_type;
}
}
diff --git a/trunk/arch/alpha/kernel/osf_sys.c b/trunk/arch/alpha/kernel/osf_sys.c
index fe698b5045e9..547e8b84b2f7 100644
--- a/trunk/arch/alpha/kernel/osf_sys.c
+++ b/trunk/arch/alpha/kernel/osf_sys.c
@@ -951,6 +951,9 @@ SYSCALL_DEFINE2(osf_utimes, const char __user *, filename,
return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0);
}
+#define MAX_SELECT_SECONDS \
+ ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
+
SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp,
fd_set __user *, exp, struct timeval32 __user *, tvp)
{
diff --git a/trunk/arch/alpha/kernel/sys_alcor.c b/trunk/arch/alpha/kernel/sys_alcor.c
index 7bef61768236..20a30b8b9655 100644
--- a/trunk/arch/alpha/kernel/sys_alcor.c
+++ b/trunk/arch/alpha/kernel/sys_alcor.c
@@ -65,6 +65,13 @@ alcor_mask_and_ack_irq(unsigned int irq)
*(vuip)GRU_INT_CLEAR = 0; mb();
}
+static unsigned int
+alcor_startup_irq(unsigned int irq)
+{
+ alcor_enable_irq(irq);
+ return 0;
+}
+
static void
alcor_isa_mask_and_ack_irq(unsigned int irq)
{
@@ -75,11 +82,21 @@ alcor_isa_mask_and_ack_irq(unsigned int irq)
*(vuip)GRU_INT_CLEAR = 0; mb();
}
+static void
+alcor_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ alcor_enable_irq(irq);
+}
+
static struct irq_chip alcor_irq_type = {
.name = "ALCOR",
- .unmask = alcor_enable_irq,
- .mask = alcor_disable_irq,
- .mask_ack = alcor_mask_and_ack_irq,
+ .startup = alcor_startup_irq,
+ .shutdown = alcor_disable_irq,
+ .enable = alcor_enable_irq,
+ .disable = alcor_disable_irq,
+ .ack = alcor_mask_and_ack_irq,
+ .end = alcor_end_irq,
};
static void
@@ -125,8 +142,8 @@ alcor_init_irq(void)
on while IRQ probing. */
if (i >= 16+20 && i <= 16+30)
continue;
- set_irq_chip_and_handler(i, &alcor_irq_type, handle_level_irq);
- irq_to_desc(i)->status |= IRQ_LEVEL;
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &alcor_irq_type;
}
i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
diff --git a/trunk/arch/alpha/kernel/sys_cabriolet.c b/trunk/arch/alpha/kernel/sys_cabriolet.c
index b0c916493aea..14c8898d19ec 100644
--- a/trunk/arch/alpha/kernel/sys_cabriolet.c
+++ b/trunk/arch/alpha/kernel/sys_cabriolet.c
@@ -57,11 +57,28 @@ cabriolet_disable_irq(unsigned int irq)
cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq);
}
+static unsigned int
+cabriolet_startup_irq(unsigned int irq)
+{
+ cabriolet_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+cabriolet_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ cabriolet_enable_irq(irq);
+}
+
static struct irq_chip cabriolet_irq_type = {
.name = "CABRIOLET",
- .unmask = cabriolet_enable_irq,
- .mask = cabriolet_disable_irq,
- .mask_ack = cabriolet_disable_irq,
+ .startup = cabriolet_startup_irq,
+ .shutdown = cabriolet_disable_irq,
+ .enable = cabriolet_enable_irq,
+ .disable = cabriolet_disable_irq,
+ .ack = cabriolet_disable_irq,
+ .end = cabriolet_end_irq,
};
static void
@@ -105,9 +122,8 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
outb(0xff, 0x806);
for (i = 16; i < 35; ++i) {
- set_irq_chip_and_handler(i, &cabriolet_irq_type,
- handle_level_irq);
- irq_to_desc(i)->status |= IRQ_LEVEL;
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &cabriolet_irq_type;
}
}
diff --git a/trunk/arch/alpha/kernel/sys_dp264.c b/trunk/arch/alpha/kernel/sys_dp264.c
index edad5f759ccd..4026502ab707 100644
--- a/trunk/arch/alpha/kernel/sys_dp264.c
+++ b/trunk/arch/alpha/kernel/sys_dp264.c
@@ -115,6 +115,20 @@ dp264_disable_irq(unsigned int irq)
spin_unlock(&dp264_irq_lock);
}
+static unsigned int
+dp264_startup_irq(unsigned int irq)
+{
+ dp264_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+dp264_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ dp264_enable_irq(irq);
+}
+
static void
clipper_enable_irq(unsigned int irq)
{
@@ -133,6 +147,20 @@ clipper_disable_irq(unsigned int irq)
spin_unlock(&dp264_irq_lock);
}
+static unsigned int
+clipper_startup_irq(unsigned int irq)
+{
+ clipper_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+clipper_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ clipper_enable_irq(irq);
+}
+
static void
cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
{
@@ -172,17 +200,23 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
static struct irq_chip dp264_irq_type = {
.name = "DP264",
- .unmask = dp264_enable_irq,
- .mask = dp264_disable_irq,
- .mask_ack = dp264_disable_irq,
+ .startup = dp264_startup_irq,
+ .shutdown = dp264_disable_irq,
+ .enable = dp264_enable_irq,
+ .disable = dp264_disable_irq,
+ .ack = dp264_disable_irq,
+ .end = dp264_end_irq,
.set_affinity = dp264_set_affinity,
};
static struct irq_chip clipper_irq_type = {
.name = "CLIPPER",
- .unmask = clipper_enable_irq,
- .mask = clipper_disable_irq,
- .mask_ack = clipper_disable_irq,
+ .startup = clipper_startup_irq,
+ .shutdown = clipper_disable_irq,
+ .enable = clipper_enable_irq,
+ .disable = clipper_disable_irq,
+ .ack = clipper_disable_irq,
+ .end = clipper_end_irq,
.set_affinity = clipper_set_affinity,
};
@@ -268,8 +302,8 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
{
long i;
for (i = imin; i <= imax; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, ops, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = ops;
}
}
diff --git a/trunk/arch/alpha/kernel/sys_eb64p.c b/trunk/arch/alpha/kernel/sys_eb64p.c
index ae5f29d127b0..df2090ce5e7f 100644
--- a/trunk/arch/alpha/kernel/sys_eb64p.c
+++ b/trunk/arch/alpha/kernel/sys_eb64p.c
@@ -55,11 +55,28 @@ eb64p_disable_irq(unsigned int irq)
eb64p_update_irq_hw(irq, cached_irq_mask |= 1 << irq);
}
+static unsigned int
+eb64p_startup_irq(unsigned int irq)
+{
+ eb64p_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+eb64p_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ eb64p_enable_irq(irq);
+}
+
static struct irq_chip eb64p_irq_type = {
.name = "EB64P",
- .unmask = eb64p_enable_irq,
- .mask = eb64p_disable_irq,
- .mask_ack = eb64p_disable_irq,
+ .startup = eb64p_startup_irq,
+ .shutdown = eb64p_disable_irq,
+ .enable = eb64p_enable_irq,
+ .disable = eb64p_disable_irq,
+ .ack = eb64p_disable_irq,
+ .end = eb64p_end_irq,
};
static void
@@ -118,8 +135,8 @@ eb64p_init_irq(void)
init_i8259a_irqs();
for (i = 16; i < 32; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &eb64p_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &eb64p_irq_type;
}
common_init_isa_dma();
diff --git a/trunk/arch/alpha/kernel/sys_eiger.c b/trunk/arch/alpha/kernel/sys_eiger.c
index 1121bc5c6c6c..3ca1dbcf4044 100644
--- a/trunk/arch/alpha/kernel/sys_eiger.c
+++ b/trunk/arch/alpha/kernel/sys_eiger.c
@@ -66,11 +66,28 @@ eiger_disable_irq(unsigned int irq)
eiger_update_irq_hw(irq, mask);
}
+static unsigned int
+eiger_startup_irq(unsigned int irq)
+{
+ eiger_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+eiger_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ eiger_enable_irq(irq);
+}
+
static struct irq_chip eiger_irq_type = {
.name = "EIGER",
- .unmask = eiger_enable_irq,
- .mask = eiger_disable_irq,
- .mask_ack = eiger_disable_irq,
+ .startup = eiger_startup_irq,
+ .shutdown = eiger_disable_irq,
+ .enable = eiger_enable_irq,
+ .disable = eiger_disable_irq,
+ .ack = eiger_disable_irq,
+ .end = eiger_end_irq,
};
static void
@@ -136,8 +153,8 @@ eiger_init_irq(void)
init_i8259a_irqs();
for (i = 16; i < 128; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &eiger_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &eiger_irq_type;
}
}
diff --git a/trunk/arch/alpha/kernel/sys_jensen.c b/trunk/arch/alpha/kernel/sys_jensen.c
index 34f55e03d331..7a7ae36fff91 100644
--- a/trunk/arch/alpha/kernel/sys_jensen.c
+++ b/trunk/arch/alpha/kernel/sys_jensen.c
@@ -62,6 +62,30 @@
* world.
*/
+static unsigned int
+jensen_local_startup(unsigned int irq)
+{
+ /* the parport is really hw IRQ 1, silly Jensen. */
+ if (irq == 7)
+ i8259a_startup_irq(1);
+ else
+ /*
+ * For all true local interrupts, set the flag that prevents
+ * the IPL from being dropped during handler processing.
+ */
+ if (irq_desc[irq].action)
+ irq_desc[irq].action->flags |= IRQF_DISABLED;
+ return 0;
+}
+
+static void
+jensen_local_shutdown(unsigned int irq)
+{
+ /* the parport is really hw IRQ 1, silly Jensen. */
+ if (irq == 7)
+ i8259a_disable_irq(1);
+}
+
static void
jensen_local_enable(unsigned int irq)
{
@@ -79,18 +103,29 @@ jensen_local_disable(unsigned int irq)
}
static void
-jensen_local_mask_ack(unsigned int irq)
+jensen_local_ack(unsigned int irq)
{
/* the parport is really hw IRQ 1, silly Jensen. */
if (irq == 7)
i8259a_mask_and_ack_irq(1);
}
+static void
+jensen_local_end(unsigned int irq)
+{
+ /* the parport is really hw IRQ 1, silly Jensen. */
+ if (irq == 7)
+ i8259a_end_irq(1);
+}
+
static struct irq_chip jensen_local_irq_type = {
.name = "LOCAL",
- .unmask = jensen_local_enable,
- .mask = jensen_local_disable,
- .mask_ack = jensen_local_mask_ack,
+ .startup = jensen_local_startup,
+ .shutdown = jensen_local_shutdown,
+ .enable = jensen_local_enable,
+ .disable = jensen_local_disable,
+ .ack = jensen_local_ack,
+ .end = jensen_local_end,
};
static void
@@ -123,7 +158,7 @@ jensen_device_interrupt(unsigned long vector)
}
/* If there is no handler yet... */
- if (!irq_has_action(irq)) {
+ if (irq_desc[irq].action == NULL) {
/* If it is a local interrupt that cannot be masked... */
if (vector >= 0x900)
{
@@ -171,11 +206,11 @@ jensen_init_irq(void)
{
init_i8259a_irqs();
- set_irq_chip_and_handler(1, &jensen_local_irq_type, handle_level_irq);
- set_irq_chip_and_handler(4, &jensen_local_irq_type, handle_level_irq);
- set_irq_chip_and_handler(3, &jensen_local_irq_type, handle_level_irq);
- set_irq_chip_and_handler(7, &jensen_local_irq_type, handle_level_irq);
- set_irq_chip_and_handler(9, &jensen_local_irq_type, handle_level_irq);
+ irq_desc[1].chip = &jensen_local_irq_type;
+ irq_desc[4].chip = &jensen_local_irq_type;
+ irq_desc[3].chip = &jensen_local_irq_type;
+ irq_desc[7].chip = &jensen_local_irq_type;
+ irq_desc[9].chip = &jensen_local_irq_type;
common_init_isa_dma();
}
diff --git a/trunk/arch/alpha/kernel/sys_marvel.c b/trunk/arch/alpha/kernel/sys_marvel.c
index 2bfc9f1b1ddc..0bb3b5c4f693 100644
--- a/trunk/arch/alpha/kernel/sys_marvel.c
+++ b/trunk/arch/alpha/kernel/sys_marvel.c
@@ -143,6 +143,20 @@ io7_disable_irq(unsigned int irq)
spin_unlock(&io7->irq_lock);
}
+static unsigned int
+io7_startup_irq(unsigned int irq)
+{
+ io7_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+io7_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ io7_enable_irq(irq);
+}
+
static void
marvel_irq_noop(unsigned int irq)
{
@@ -157,22 +171,32 @@ marvel_irq_noop_return(unsigned int irq)
static struct irq_chip marvel_legacy_irq_type = {
.name = "LEGACY",
- .mask = marvel_irq_noop,
- .unmask = marvel_irq_noop,
+ .startup = marvel_irq_noop_return,
+ .shutdown = marvel_irq_noop,
+ .enable = marvel_irq_noop,
+ .disable = marvel_irq_noop,
+ .ack = marvel_irq_noop,
+ .end = marvel_irq_noop,
};
static struct irq_chip io7_lsi_irq_type = {
.name = "LSI",
- .unmask = io7_enable_irq,
- .mask = io7_disable_irq,
- .mask_ack = io7_disable_irq,
+ .startup = io7_startup_irq,
+ .shutdown = io7_disable_irq,
+ .enable = io7_enable_irq,
+ .disable = io7_disable_irq,
+ .ack = io7_disable_irq,
+ .end = io7_end_irq,
};
static struct irq_chip io7_msi_irq_type = {
.name = "MSI",
- .unmask = io7_enable_irq,
- .mask = io7_disable_irq,
+ .startup = io7_startup_irq,
+ .shutdown = io7_disable_irq,
+ .enable = io7_enable_irq,
+ .disable = io7_disable_irq,
.ack = marvel_irq_noop,
+ .end = io7_end_irq,
};
static void
@@ -280,8 +304,8 @@ init_io7_irqs(struct io7 *io7,
/* Set up the lsi irqs. */
for (i = 0; i < 128; ++i) {
- irq_to_desc(base + i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(base + i, lsi_ops, handle_level_irq);
+ irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[base + i].chip = lsi_ops;
}
/* Disable the implemented irqs in hardware. */
@@ -294,8 +318,8 @@ init_io7_irqs(struct io7 *io7,
/* Set up the msi irqs. */
for (i = 128; i < (128 + 512); ++i) {
- irq_to_desc(base + i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(base + i, msi_ops, handle_level_irq);
+ irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[base + i].chip = msi_ops;
}
for (i = 0; i < 16; ++i)
@@ -312,8 +336,8 @@ marvel_init_irq(void)
/* Reserve the legacy irqs. */
for (i = 0; i < 16; ++i) {
- set_irq_chip_and_handler(i, &marvel_legacy_irq_type,
- handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED;
+ irq_desc[i].chip = &marvel_legacy_irq_type;
}
/* Init the io7 irqs. */
diff --git a/trunk/arch/alpha/kernel/sys_mikasa.c b/trunk/arch/alpha/kernel/sys_mikasa.c
index bcc1639e8efb..ee8865169811 100644
--- a/trunk/arch/alpha/kernel/sys_mikasa.c
+++ b/trunk/arch/alpha/kernel/sys_mikasa.c
@@ -54,11 +54,28 @@ mikasa_disable_irq(unsigned int irq)
mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (irq - 16)));
}
+static unsigned int
+mikasa_startup_irq(unsigned int irq)
+{
+ mikasa_enable_irq(irq);
+ return 0;
+}
+
+static void
+mikasa_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ mikasa_enable_irq(irq);
+}
+
static struct irq_chip mikasa_irq_type = {
.name = "MIKASA",
- .unmask = mikasa_enable_irq,
- .mask = mikasa_disable_irq,
- .mask_ack = mikasa_disable_irq,
+ .startup = mikasa_startup_irq,
+ .shutdown = mikasa_disable_irq,
+ .enable = mikasa_enable_irq,
+ .disable = mikasa_disable_irq,
+ .ack = mikasa_disable_irq,
+ .end = mikasa_end_irq,
};
static void
@@ -98,8 +115,8 @@ mikasa_init_irq(void)
mikasa_update_irq_hw(0);
for (i = 16; i < 32; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &mikasa_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &mikasa_irq_type;
}
init_i8259a_irqs();
diff --git a/trunk/arch/alpha/kernel/sys_noritake.c b/trunk/arch/alpha/kernel/sys_noritake.c
index e88f4ae1260e..86503fe73a88 100644
--- a/trunk/arch/alpha/kernel/sys_noritake.c
+++ b/trunk/arch/alpha/kernel/sys_noritake.c
@@ -59,11 +59,28 @@ noritake_disable_irq(unsigned int irq)
noritake_update_irq_hw(irq, cached_irq_mask &= ~(1 << (irq - 16)));
}
+static unsigned int
+noritake_startup_irq(unsigned int irq)
+{
+ noritake_enable_irq(irq);
+ return 0;
+}
+
+static void
+noritake_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ noritake_enable_irq(irq);
+}
+
static struct irq_chip noritake_irq_type = {
.name = "NORITAKE",
- .unmask = noritake_enable_irq,
- .mask = noritake_disable_irq,
- .mask_ack = noritake_disable_irq,
+ .startup = noritake_startup_irq,
+ .shutdown = noritake_disable_irq,
+ .enable = noritake_enable_irq,
+ .disable = noritake_disable_irq,
+ .ack = noritake_disable_irq,
+ .end = noritake_end_irq,
};
static void
@@ -127,8 +144,8 @@ noritake_init_irq(void)
outw(0, 0x54c);
for (i = 16; i < 48; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &noritake_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &noritake_irq_type;
}
init_i8259a_irqs();
diff --git a/trunk/arch/alpha/kernel/sys_rawhide.c b/trunk/arch/alpha/kernel/sys_rawhide.c
index 6a51364dd1cc..26c322bf89ee 100644
--- a/trunk/arch/alpha/kernel/sys_rawhide.c
+++ b/trunk/arch/alpha/kernel/sys_rawhide.c
@@ -121,11 +121,28 @@ rawhide_mask_and_ack_irq(unsigned int irq)
spin_unlock(&rawhide_irq_lock);
}
+static unsigned int
+rawhide_startup_irq(unsigned int irq)
+{
+ rawhide_enable_irq(irq);
+ return 0;
+}
+
+static void
+rawhide_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ rawhide_enable_irq(irq);
+}
+
static struct irq_chip rawhide_irq_type = {
.name = "RAWHIDE",
- .unmask = rawhide_enable_irq,
- .mask = rawhide_disable_irq,
- .mask_ack = rawhide_mask_and_ack_irq,
+ .startup = rawhide_startup_irq,
+ .shutdown = rawhide_disable_irq,
+ .enable = rawhide_enable_irq,
+ .disable = rawhide_disable_irq,
+ .ack = rawhide_mask_and_ack_irq,
+ .end = rawhide_end_irq,
};
static void
@@ -177,8 +194,8 @@ rawhide_init_irq(void)
}
for (i = 16; i < 128; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &rawhide_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &rawhide_irq_type;
}
init_i8259a_irqs();
diff --git a/trunk/arch/alpha/kernel/sys_rx164.c b/trunk/arch/alpha/kernel/sys_rx164.c
index 89e7e37ec84c..be161129eab9 100644
--- a/trunk/arch/alpha/kernel/sys_rx164.c
+++ b/trunk/arch/alpha/kernel/sys_rx164.c
@@ -58,11 +58,28 @@ rx164_disable_irq(unsigned int irq)
rx164_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16)));
}
+static unsigned int
+rx164_startup_irq(unsigned int irq)
+{
+ rx164_enable_irq(irq);
+ return 0;
+}
+
+static void
+rx164_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ rx164_enable_irq(irq);
+}
+
static struct irq_chip rx164_irq_type = {
.name = "RX164",
- .unmask = rx164_enable_irq,
- .mask = rx164_disable_irq,
- .mask_ack = rx164_disable_irq,
+ .startup = rx164_startup_irq,
+ .shutdown = rx164_disable_irq,
+ .enable = rx164_enable_irq,
+ .disable = rx164_disable_irq,
+ .ack = rx164_disable_irq,
+ .end = rx164_end_irq,
};
static void
@@ -99,8 +116,8 @@ rx164_init_irq(void)
rx164_update_irq_hw(0);
for (i = 16; i < 40; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &rx164_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &rx164_irq_type;
}
init_i8259a_irqs();
diff --git a/trunk/arch/alpha/kernel/sys_sable.c b/trunk/arch/alpha/kernel/sys_sable.c
index 5c4423d1b06c..b2abe27a23cf 100644
--- a/trunk/arch/alpha/kernel/sys_sable.c
+++ b/trunk/arch/alpha/kernel/sys_sable.c
@@ -474,6 +474,20 @@ sable_lynx_disable_irq(unsigned int irq)
#endif
}
+static unsigned int
+sable_lynx_startup_irq(unsigned int irq)
+{
+ sable_lynx_enable_irq(irq);
+ return 0;
+}
+
+static void
+sable_lynx_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ sable_lynx_enable_irq(irq);
+}
+
static void
sable_lynx_mask_and_ack_irq(unsigned int irq)
{
@@ -489,9 +503,12 @@ sable_lynx_mask_and_ack_irq(unsigned int irq)
static struct irq_chip sable_lynx_irq_type = {
.name = "SABLE/LYNX",
- .unmask = sable_lynx_enable_irq,
- .mask = sable_lynx_disable_irq,
- .mask_ack = sable_lynx_mask_and_ack_irq,
+ .startup = sable_lynx_startup_irq,
+ .shutdown = sable_lynx_disable_irq,
+ .enable = sable_lynx_enable_irq,
+ .disable = sable_lynx_disable_irq,
+ .ack = sable_lynx_mask_and_ack_irq,
+ .end = sable_lynx_end_irq,
};
static void
@@ -518,9 +535,8 @@ sable_lynx_init_irq(int nr_of_irqs)
long i;
for (i = 0; i < nr_of_irqs; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &sable_lynx_irq_type,
- handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &sable_lynx_irq_type;
}
common_init_isa_dma();
diff --git a/trunk/arch/alpha/kernel/sys_takara.c b/trunk/arch/alpha/kernel/sys_takara.c
index f8a1e8a862fb..4da596b6adbb 100644
--- a/trunk/arch/alpha/kernel/sys_takara.c
+++ b/trunk/arch/alpha/kernel/sys_takara.c
@@ -60,11 +60,28 @@ takara_disable_irq(unsigned int irq)
takara_update_irq_hw(irq, mask);
}
+static unsigned int
+takara_startup_irq(unsigned int irq)
+{
+ takara_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+takara_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ takara_enable_irq(irq);
+}
+
static struct irq_chip takara_irq_type = {
.name = "TAKARA",
- .unmask = takara_enable_irq,
- .mask = takara_disable_irq,
- .mask_ack = takara_disable_irq,
+ .startup = takara_startup_irq,
+ .shutdown = takara_disable_irq,
+ .enable = takara_enable_irq,
+ .disable = takara_disable_irq,
+ .ack = takara_disable_irq,
+ .end = takara_end_irq,
};
static void
@@ -136,8 +153,8 @@ takara_init_irq(void)
takara_update_irq_hw(i, -1);
for (i = 16; i < 128; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, &takara_irq_type, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = &takara_irq_type;
}
common_init_isa_dma();
diff --git a/trunk/arch/alpha/kernel/sys_titan.c b/trunk/arch/alpha/kernel/sys_titan.c
index e02494bf5ef3..9008d0f20c53 100644
--- a/trunk/arch/alpha/kernel/sys_titan.c
+++ b/trunk/arch/alpha/kernel/sys_titan.c
@@ -129,6 +129,20 @@ titan_disable_irq(unsigned int irq)
spin_unlock(&titan_irq_lock);
}
+static unsigned int
+titan_startup_irq(unsigned int irq)
+{
+ titan_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+titan_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ titan_enable_irq(irq);
+}
+
static void
titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
{
@@ -175,17 +189,20 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
{
long i;
for (i = imin; i <= imax; ++i) {
- irq_to_desc(i)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i, ops, handle_level_irq);
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i].chip = ops;
}
}
static struct irq_chip titan_irq_type = {
- .name = "TITAN",
- .unmask = titan_enable_irq,
- .mask = titan_disable_irq,
- .mask_ack = titan_disable_irq,
- .set_affinity = titan_set_irq_affinity,
+ .name = "TITAN",
+ .startup = titan_startup_irq,
+ .shutdown = titan_disable_irq,
+ .enable = titan_enable_irq,
+ .disable = titan_disable_irq,
+ .ack = titan_disable_irq,
+ .end = titan_end_irq,
+ .set_affinity = titan_set_irq_affinity,
};
static irqreturn_t
diff --git a/trunk/arch/alpha/kernel/sys_wildfire.c b/trunk/arch/alpha/kernel/sys_wildfire.c
index eec52594d410..62fd972e18ef 100644
--- a/trunk/arch/alpha/kernel/sys_wildfire.c
+++ b/trunk/arch/alpha/kernel/sys_wildfire.c
@@ -139,11 +139,32 @@ wildfire_mask_and_ack_irq(unsigned int irq)
spin_unlock(&wildfire_irq_lock);
}
+static unsigned int
+wildfire_startup_irq(unsigned int irq)
+{
+ wildfire_enable_irq(irq);
+ return 0; /* never anything pending */
+}
+
+static void
+wildfire_end_irq(unsigned int irq)
+{
+#if 0
+ if (!irq_desc[irq].action)
+ printk("got irq %d\n", irq);
+#endif
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ wildfire_enable_irq(irq);
+}
+
static struct irq_chip wildfire_irq_type = {
.name = "WILDFIRE",
- .unmask = wildfire_enable_irq,
- .mask = wildfire_disable_irq,
- .mask_ack = wildfire_mask_and_ack_irq,
+ .startup = wildfire_startup_irq,
+ .shutdown = wildfire_disable_irq,
+ .enable = wildfire_enable_irq,
+ .disable = wildfire_disable_irq,
+ .ack = wildfire_mask_and_ack_irq,
+ .end = wildfire_end_irq,
};
static void __init
@@ -177,18 +198,15 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
for (i = 0; i < 16; ++i) {
if (i == 2)
continue;
- irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
- handle_level_irq);
+ irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i+irq_bias].chip = &wildfire_irq_type;
}
- irq_to_desc(36+irq_bias)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type,
- handle_level_irq);
+ irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[36+irq_bias].chip = &wildfire_irq_type;
for (i = 40; i < 64; ++i) {
- irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL;
- set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
- handle_level_irq);
+ irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
+ irq_desc[i+irq_bias].chip = &wildfire_irq_type;
}
setup_irq(32+irq_bias, &isa_enable);
diff --git a/trunk/arch/alpha/lib/Makefile b/trunk/arch/alpha/lib/Makefile
index c0a83ab62b78..9b72c59c95be 100644
--- a/trunk/arch/alpha/lib/Makefile
+++ b/trunk/arch/alpha/lib/Makefile
@@ -2,8 +2,8 @@
# Makefile for alpha-specific library files..
#
-asflags-y := $(KBUILD_CFLAGS)
-ccflags-y := -Werror
+EXTRA_AFLAGS := $(KBUILD_CFLAGS)
+EXTRA_CFLAGS := -Werror
# Many of these routines have implementations tuned for ev6.
# Choose them iff we're targeting ev6 specifically.
diff --git a/trunk/arch/alpha/math-emu/Makefile b/trunk/arch/alpha/math-emu/Makefile
index 7f4671995245..359ef087e69e 100644
--- a/trunk/arch/alpha/math-emu/Makefile
+++ b/trunk/arch/alpha/math-emu/Makefile
@@ -2,7 +2,7 @@
# Makefile for the FPU instruction emulation.
#
-ccflags-y := -w
+EXTRA_CFLAGS := -w
obj-$(CONFIG_MATHEMU) += math-emu.o
diff --git a/trunk/arch/alpha/mm/Makefile b/trunk/arch/alpha/mm/Makefile
index c993d3f93cf6..09399c5386cb 100644
--- a/trunk/arch/alpha/mm/Makefile
+++ b/trunk/arch/alpha/mm/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux alpha-specific parts of the memory manager.
#
-ccflags-y := -Werror
+EXTRA_CFLAGS := -Werror
obj-y := init.o fault.o extable.o
diff --git a/trunk/arch/alpha/oprofile/Makefile b/trunk/arch/alpha/oprofile/Makefile
index 3473de751b03..4aa56247bdc6 100644
--- a/trunk/arch/alpha/oprofile/Makefile
+++ b/trunk/arch/alpha/oprofile/Makefile
@@ -1,4 +1,4 @@
-ccflags-y := -Werror -Wno-sign-compare
+EXTRA_CFLAGS := -Werror -Wno-sign-compare
obj-$(CONFIG_OPROFILE) += oprofile.o
diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig
index 5cff165b7eb0..e2f801167593 100644
--- a/trunk/arch/arm/Kconfig
+++ b/trunk/arch/arm/Kconfig
@@ -26,8 +26,6 @@ config ARM
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
select HAVE_C_RECORDMCOUNT
- select HAVE_GENERIC_HARDIRQS
- select HAVE_SPARSE_IRQ
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
@@ -99,6 +97,10 @@ config MCA
(and especially the web page given
there) before attempting to build an MCA bus kernel.
+config GENERIC_HARDIRQS
+ bool
+ default y
+
config STACKTRACE_SUPPORT
bool
default y
@@ -178,6 +180,9 @@ config FIQ
config ARCH_MTD_XIP
bool
+config GENERIC_HARDIRQS_NO__DO_IRQ
+ def_bool y
+
config ARM_L1_CACHE_SHIFT_6
bool
help
@@ -363,7 +368,7 @@ config ARCH_MXS
bool "Freescale MXS-based"
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
- select CLKDEV_LOOKUP
+ select COMMON_CLKDEV
help
Support for Freescale MXS-based family of processors
@@ -766,7 +771,6 @@ config ARCH_S5PV310
select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO
select HAVE_CLK
- select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
select HAVE_S3C_RTC if RTC_CLASS
select HAVE_S3C2410_I2C if I2C
@@ -1277,7 +1281,7 @@ config SMP
config SMP_ON_UP
bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
depends on EXPERIMENTAL
- depends on SMP && !XIP_KERNEL
+ depends on SMP && !XIP
default y
help
SMP kernels contain instructions which fail on non-SMP processors.
@@ -1448,6 +1452,15 @@ config HW_PERF_EVENTS
Enable hardware performance counter support for perf events. If
disabled, perf events will use software events only.
+config SPARSE_IRQ
+ def_bool n
+ help
+ This enables support for sparse irqs. This is useful in general
+ as most CPUs have a fairly sparse array of IRQ vectors, which
+ the irq_desc then maps directly on to. Systems with a high
+ number of off-chip IRQs will want to treat this as
+ experimental until they have been independently verified.
+
source "mm/Kconfig"
config FORCE_MAX_ZONEORDER
diff --git a/trunk/arch/arm/common/gic.c b/trunk/arch/arm/common/gic.c
index 224377211151..0b89ef001330 100644
--- a/trunk/arch/arm/common/gic.c
+++ b/trunk/arch/arm/common/gic.c
@@ -50,56 +50,57 @@ struct gic_chip_data {
static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
-static inline void __iomem *gic_dist_base(struct irq_data *d)
+static inline void __iomem *gic_dist_base(unsigned int irq)
{
- struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
+ struct gic_chip_data *gic_data = get_irq_chip_data(irq);
return gic_data->dist_base;
}
-static inline void __iomem *gic_cpu_base(struct irq_data *d)
+static inline void __iomem *gic_cpu_base(unsigned int irq)
{
- struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
+ struct gic_chip_data *gic_data = get_irq_chip_data(irq);
return gic_data->cpu_base;
}
-static inline unsigned int gic_irq(struct irq_data *d)
+static inline unsigned int gic_irq(unsigned int irq)
{
- struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
- return d->irq - gic_data->irq_offset;
+ struct gic_chip_data *gic_data = get_irq_chip_data(irq);
+ return irq - gic_data->irq_offset;
}
/*
* Routines to acknowledge, disable and enable interrupts
*/
-static void gic_ack_irq(struct irq_data *d)
+static void gic_ack_irq(unsigned int irq)
{
+
spin_lock(&irq_controller_lock);
- writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
+ writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI);
spin_unlock(&irq_controller_lock);
}
-static void gic_mask_irq(struct irq_data *d)
+static void gic_mask_irq(unsigned int irq)
{
- u32 mask = 1 << (d->irq % 32);
+ u32 mask = 1 << (irq % 32);
spin_lock(&irq_controller_lock);
- writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
+ writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4);
spin_unlock(&irq_controller_lock);
}
-static void gic_unmask_irq(struct irq_data *d)
+static void gic_unmask_irq(unsigned int irq)
{
- u32 mask = 1 << (d->irq % 32);
+ u32 mask = 1 << (irq % 32);
spin_lock(&irq_controller_lock);
- writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
+ writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_SET + (gic_irq(irq) / 32) * 4);
spin_unlock(&irq_controller_lock);
}
-static int gic_set_type(struct irq_data *d, unsigned int type)
+static int gic_set_type(unsigned int irq, unsigned int type)
{
- void __iomem *base = gic_dist_base(d);
- unsigned int gicirq = gic_irq(d);
+ void __iomem *base = gic_dist_base(irq);
+ unsigned int gicirq = gic_irq(irq);
u32 enablemask = 1 << (gicirq % 32);
u32 enableoff = (gicirq / 32) * 4;
u32 confmask = 0x2 << ((gicirq % 16) * 2);
@@ -142,22 +143,21 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
}
#ifdef CONFIG_SMP
-static int
-gic_set_cpu(struct irq_data *d, const struct cpumask *mask_val, bool force)
+static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
{
- void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
- unsigned int shift = (d->irq % 4) * 8;
+ void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3);
+ unsigned int shift = (irq % 4) * 8;
unsigned int cpu = cpumask_first(mask_val);
u32 val;
struct irq_desc *desc;
spin_lock(&irq_controller_lock);
- desc = irq_to_desc(d->irq);
+ desc = irq_to_desc(irq);
if (desc == NULL) {
spin_unlock(&irq_controller_lock);
return -EINVAL;
}
- d->node = cpu;
+ desc->node = cpu;
val = readl(reg) & ~(0xff << shift);
val |= 1 << (cpu + shift);
writel(val, reg);
@@ -175,7 +175,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
unsigned long status;
/* primary controller ack'ing */
- chip->irq_ack(&desc->irq_data);
+ chip->ack(irq);
spin_lock(&irq_controller_lock);
status = readl(chip_data->cpu_base + GIC_CPU_INTACK);
@@ -193,17 +193,17 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
out:
/* primary controller unmasking */
- chip->irq_unmask(&desc->irq_data);
+ chip->unmask(irq);
}
static struct irq_chip gic_chip = {
- .name = "GIC",
- .irq_ack = gic_ack_irq,
- .irq_mask = gic_mask_irq,
- .irq_unmask = gic_unmask_irq,
- .irq_set_type = gic_set_type,
+ .name = "GIC",
+ .ack = gic_ack_irq,
+ .mask = gic_mask_irq,
+ .unmask = gic_unmask_irq,
+ .set_type = gic_set_type,
#ifdef CONFIG_SMP
- .irq_set_affinity = gic_set_cpu,
+ .set_affinity = gic_set_cpu,
#endif
};
@@ -337,7 +337,7 @@ void __cpuinit gic_enable_ppi(unsigned int irq)
local_irq_save(flags);
irq_to_desc(irq)->status |= IRQ_NOPROBE;
- gic_unmask_irq(irq_get_irq_data(irq));
+ gic_unmask_irq(irq);
local_irq_restore(flags);
}
diff --git a/trunk/arch/arm/common/it8152.c b/trunk/arch/arm/common/it8152.c
index fcddd48fe9da..665ebf7e62a6 100644
--- a/trunk/arch/arm/common/it8152.c
+++ b/trunk/arch/arm/common/it8152.c
@@ -31,10 +31,8 @@
#define MAX_SLOTS 21
-static void it8152_mask_irq(struct irq_data *d)
+static void it8152_mask_irq(unsigned int irq)
{
- unsigned int irq = d->irq;
-
if (irq >= IT8152_LD_IRQ(0)) {
__raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) |
(1 << (irq - IT8152_LD_IRQ(0)))),
@@ -50,10 +48,8 @@ static void it8152_mask_irq(struct irq_data *d)
}
}
-static void it8152_unmask_irq(struct irq_data *d)
+static void it8152_unmask_irq(unsigned int irq)
{
- unsigned int irq = d->irq;
-
if (irq >= IT8152_LD_IRQ(0)) {
__raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) &
~(1 << (irq - IT8152_LD_IRQ(0)))),
@@ -71,9 +67,9 @@ static void it8152_unmask_irq(struct irq_data *d)
static struct irq_chip it8152_irq_chip = {
.name = "it8152",
- .irq_ack = it8152_mask_irq,
- .irq_mask = it8152_mask_irq,
- .irq_unmask = it8152_unmask_irq,
+ .ack = it8152_mask_irq,
+ .mask = it8152_mask_irq,
+ .unmask = it8152_unmask_irq,
};
void it8152_init_irq(void)
diff --git a/trunk/arch/arm/common/locomo.c b/trunk/arch/arm/common/locomo.c
index a026a6bf4892..9dff07c80ddb 100644
--- a/trunk/arch/arm/common/locomo.c
+++ b/trunk/arch/arm/common/locomo.c
@@ -144,7 +144,7 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
int req, i;
/* Acknowledge the parent IRQ */
- desc->irq_data.chip->irq_ack(&desc->irq_data);
+ desc->chip->ack(irq);
/* check why this interrupt was generated */
req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00;
@@ -161,33 +161,33 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
}
}
-static void locomo_ack_irq(struct irq_data *d)
+static void locomo_ack_irq(unsigned int irq)
{
}
-static void locomo_mask_irq(struct irq_data *d)
+static void locomo_mask_irq(unsigned int irq)
{
- struct locomo *lchip = irq_data_get_irq_chip_data(d);
+ struct locomo *lchip = get_irq_chip_data(irq);
unsigned int r;
r = locomo_readl(lchip->base + LOCOMO_ICR);
- r &= ~(0x0010 << (d->irq - lchip->irq_base));
+ r &= ~(0x0010 << (irq - lchip->irq_base));
locomo_writel(r, lchip->base + LOCOMO_ICR);
}
-static void locomo_unmask_irq(struct irq_data *d)
+static void locomo_unmask_irq(unsigned int irq)
{
- struct locomo *lchip = irq_data_get_irq_chip_data(d);
+ struct locomo *lchip = get_irq_chip_data(irq);
unsigned int r;
r = locomo_readl(lchip->base + LOCOMO_ICR);
- r |= (0x0010 << (d->irq - lchip->irq_base));
+ r |= (0x0010 << (irq - lchip->irq_base));
locomo_writel(r, lchip->base + LOCOMO_ICR);
}
static struct irq_chip locomo_chip = {
- .name = "LOCOMO",
- .irq_ack = locomo_ack_irq,
- .irq_mask = locomo_mask_irq,
- .irq_unmask = locomo_unmask_irq,
+ .name = "LOCOMO",
+ .ack = locomo_ack_irq,
+ .mask = locomo_mask_irq,
+ .unmask = locomo_unmask_irq,
};
static void locomo_setup_irq(struct locomo *lchip)
diff --git a/trunk/arch/arm/common/sa1111.c b/trunk/arch/arm/common/sa1111.c
index eb9796b0dab2..c0258a8c103b 100644
--- a/trunk/arch/arm/common/sa1111.c
+++ b/trunk/arch/arm/common/sa1111.c
@@ -210,7 +210,7 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
sa1111_writel(stat0, mapbase + SA1111_INTSTATCLR0);
- desc->irq_data.chip->irq_ack(&desc->irq_data);
+ desc->chip->ack(irq);
sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1);
@@ -228,35 +228,35 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(i + sachip->irq_base);
/* For level-based interrupts */
- desc->irq_data.chip->irq_unmask(&desc->irq_data);
+ desc->chip->unmask(irq);
}
#define SA1111_IRQMASK_LO(x) (1 << (x - sachip->irq_base))
#define SA1111_IRQMASK_HI(x) (1 << (x - sachip->irq_base - 32))
-static void sa1111_ack_irq(struct irq_data *d)
+static void sa1111_ack_irq(unsigned int irq)
{
}
-static void sa1111_mask_lowirq(struct irq_data *d)
+static void sa1111_mask_lowirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
- ie0 &= ~SA1111_IRQMASK_LO(d->irq);
+ ie0 &= ~SA1111_IRQMASK_LO(irq);
writel(ie0, mapbase + SA1111_INTEN0);
}
-static void sa1111_unmask_lowirq(struct irq_data *d)
+static void sa1111_unmask_lowirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
unsigned long ie0;
ie0 = sa1111_readl(mapbase + SA1111_INTEN0);
- ie0 |= SA1111_IRQMASK_LO(d->irq);
+ ie0 |= SA1111_IRQMASK_LO(irq);
sa1111_writel(ie0, mapbase + SA1111_INTEN0);
}
@@ -267,11 +267,11 @@ static void sa1111_unmask_lowirq(struct irq_data *d)
* be triggered. In fact, its very difficult, if not impossible to get
* INTSET to re-trigger the interrupt.
*/
-static int sa1111_retrigger_lowirq(struct irq_data *d)
+static int sa1111_retrigger_lowirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_LO(d->irq);
+ unsigned int mask = SA1111_IRQMASK_LO(irq);
unsigned long ip0;
int i;
@@ -279,21 +279,21 @@ static int sa1111_retrigger_lowirq(struct irq_data *d)
for (i = 0; i < 8; i++) {
sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0);
sa1111_writel(ip0, mapbase + SA1111_INTPOL0);
- if (sa1111_readl(mapbase + SA1111_INTSTATCLR0) & mask)
+ if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask)
break;
}
if (i == 8)
printk(KERN_ERR "Danger Will Robinson: failed to "
- "re-trigger IRQ%d\n", d->irq);
+ "re-trigger IRQ%d\n", irq);
return i == 8 ? -1 : 0;
}
-static int sa1111_type_lowirq(struct irq_data *d, unsigned int flags)
+static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_LO(d->irq);
+ unsigned int mask = SA1111_IRQMASK_LO(irq);
unsigned long ip0;
if (flags == IRQ_TYPE_PROBE)
@@ -313,11 +313,11 @@ static int sa1111_type_lowirq(struct irq_data *d, unsigned int flags)
return 0;
}
-static int sa1111_wake_lowirq(struct irq_data *d, unsigned int on)
+static int sa1111_wake_lowirq(unsigned int irq, unsigned int on)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_LO(d->irq);
+ unsigned int mask = SA1111_IRQMASK_LO(irq);
unsigned long we0;
we0 = sa1111_readl(mapbase + SA1111_WAKEEN0);
@@ -332,33 +332,33 @@ static int sa1111_wake_lowirq(struct irq_data *d, unsigned int on)
static struct irq_chip sa1111_low_chip = {
.name = "SA1111-l",
- .irq_ack = sa1111_ack_irq,
- .irq_mask = sa1111_mask_lowirq,
- .irq_unmask = sa1111_unmask_lowirq,
- .irq_retrigger = sa1111_retrigger_lowirq,
- .irq_set_type = sa1111_type_lowirq,
- .irq_set_wake = sa1111_wake_lowirq,
+ .ack = sa1111_ack_irq,
+ .mask = sa1111_mask_lowirq,
+ .unmask = sa1111_unmask_lowirq,
+ .retrigger = sa1111_retrigger_lowirq,
+ .set_type = sa1111_type_lowirq,
+ .set_wake = sa1111_wake_lowirq,
};
-static void sa1111_mask_highirq(struct irq_data *d)
+static void sa1111_mask_highirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
- ie1 &= ~SA1111_IRQMASK_HI(d->irq);
+ ie1 &= ~SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
}
-static void sa1111_unmask_highirq(struct irq_data *d)
+static void sa1111_unmask_highirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
unsigned long ie1;
ie1 = sa1111_readl(mapbase + SA1111_INTEN1);
- ie1 |= SA1111_IRQMASK_HI(d->irq);
+ ie1 |= SA1111_IRQMASK_HI(irq);
sa1111_writel(ie1, mapbase + SA1111_INTEN1);
}
@@ -369,11 +369,11 @@ static void sa1111_unmask_highirq(struct irq_data *d)
* be triggered. In fact, its very difficult, if not impossible to get
* INTSET to re-trigger the interrupt.
*/
-static int sa1111_retrigger_highirq(struct irq_data *d)
+static int sa1111_retrigger_highirq(unsigned int irq)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_HI(d->irq);
+ unsigned int mask = SA1111_IRQMASK_HI(irq);
unsigned long ip1;
int i;
@@ -387,15 +387,15 @@ static int sa1111_retrigger_highirq(struct irq_data *d)
if (i == 8)
printk(KERN_ERR "Danger Will Robinson: failed to "
- "re-trigger IRQ%d\n", d->irq);
+ "re-trigger IRQ%d\n", irq);
return i == 8 ? -1 : 0;
}
-static int sa1111_type_highirq(struct irq_data *d, unsigned int flags)
+static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_HI(d->irq);
+ unsigned int mask = SA1111_IRQMASK_HI(irq);
unsigned long ip1;
if (flags == IRQ_TYPE_PROBE)
@@ -415,11 +415,11 @@ static int sa1111_type_highirq(struct irq_data *d, unsigned int flags)
return 0;
}
-static int sa1111_wake_highirq(struct irq_data *d, unsigned int on)
+static int sa1111_wake_highirq(unsigned int irq, unsigned int on)
{
- struct sa1111 *sachip = irq_data_get_irq_chip_data(d);
+ struct sa1111 *sachip = get_irq_chip_data(irq);
void __iomem *mapbase = sachip->base + SA1111_INTC;
- unsigned int mask = SA1111_IRQMASK_HI(d->irq);
+ unsigned int mask = SA1111_IRQMASK_HI(irq);
unsigned long we1;
we1 = sa1111_readl(mapbase + SA1111_WAKEEN1);
@@ -434,12 +434,12 @@ static int sa1111_wake_highirq(struct irq_data *d, unsigned int on)
static struct irq_chip sa1111_high_chip = {
.name = "SA1111-h",
- .irq_ack = sa1111_ack_irq,
- .irq_mask = sa1111_mask_highirq,
- .irq_unmask = sa1111_unmask_highirq,
- .irq_retrigger = sa1111_retrigger_highirq,
- .irq_set_type = sa1111_type_highirq,
- .irq_set_wake = sa1111_wake_highirq,
+ .ack = sa1111_ack_irq,
+ .mask = sa1111_mask_highirq,
+ .unmask = sa1111_unmask_highirq,
+ .retrigger = sa1111_retrigger_highirq,
+ .set_type = sa1111_type_highirq,
+ .set_wake = sa1111_wake_highirq,
};
static void sa1111_setup_irq(struct sa1111 *sachip)
diff --git a/trunk/arch/arm/common/vic.c b/trunk/arch/arm/common/vic.c
index ae5fe7292e0d..cb660bc54d7a 100644
--- a/trunk/arch/arm/common/vic.c
+++ b/trunk/arch/arm/common/vic.c
@@ -204,26 +204,26 @@ static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 res
static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { }
#endif /* CONFIG_PM */
-static void vic_ack_irq(struct irq_data *d)
+static void vic_ack_irq(unsigned int irq)
{
- void __iomem *base = irq_data_get_irq_chip_data(d);
- unsigned int irq = d->irq & 31;
+ void __iomem *base = get_irq_chip_data(irq);
+ irq &= 31;
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
/* moreover, clear the soft-triggered, in case it was the reason */
writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
}
-static void vic_mask_irq(struct irq_data *d)
+static void vic_mask_irq(unsigned int irq)
{
- void __iomem *base = irq_data_get_irq_chip_data(d);
- unsigned int irq = d->irq & 31;
+ void __iomem *base = get_irq_chip_data(irq);
+ irq &= 31;
writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
}
-static void vic_unmask_irq(struct irq_data *d)
+static void vic_unmask_irq(unsigned int irq)
{
- void __iomem *base = irq_data_get_irq_chip_data(d);
- unsigned int irq = d->irq & 31;
+ void __iomem *base = get_irq_chip_data(irq);
+ irq &= 31;
writel(1 << irq, base + VIC_INT_ENABLE);
}
@@ -242,10 +242,10 @@ static struct vic_device *vic_from_irq(unsigned int irq)
return NULL;
}
-static int vic_set_wake(struct irq_data *d, unsigned int on)
+static int vic_set_wake(unsigned int irq, unsigned int on)
{
- struct vic_device *v = vic_from_irq(d->irq);
- unsigned int off = d->irq & 31;
+ struct vic_device *v = vic_from_irq(irq);
+ unsigned int off = irq & 31;
u32 bit = 1 << off;
if (!v)
@@ -267,10 +267,10 @@ static int vic_set_wake(struct irq_data *d, unsigned int on)
static struct irq_chip vic_chip = {
.name = "VIC",
- .irq_ack = vic_ack_irq,
- .irq_mask = vic_mask_irq,
- .irq_unmask = vic_unmask_irq,
- .irq_set_wake = vic_set_wake,
+ .ack = vic_ack_irq,
+ .mask = vic_mask_irq,
+ .unmask = vic_unmask_irq,
+ .set_wake = vic_set_wake,
};
static void __init vic_disable(void __iomem *base)
diff --git a/trunk/arch/arm/include/asm/bitops.h b/trunk/arch/arm/include/asm/bitops.h
index 7b1bb2bbaf88..338ff19ae447 100644
--- a/trunk/arch/arm/include/asm/bitops.h
+++ b/trunk/arch/arm/include/asm/bitops.h
@@ -285,7 +285,7 @@ static inline int fls(int x)
if (__builtin_constant_p(x))
return constant_fls(x);
- asm("clz\t%0, %1" : "=r" (ret) : "r" (x));
+ asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
ret = 32 - ret;
return ret;
}
diff --git a/trunk/arch/arm/include/asm/sched_clock.h b/trunk/arch/arm/include/asm/sched_clock.h
index c8e6ddf3e860..a84628be1a7b 100644
--- a/trunk/arch/arm/include/asm/sched_clock.h
+++ b/trunk/arch/arm/include/asm/sched_clock.h
@@ -115,6 +115,4 @@ static inline void init_fixed_sched_clock(struct clock_data *cd,
}
}
-extern void sched_clock_postinit(void);
-
#endif
diff --git a/trunk/arch/arm/kernel/ecard.c b/trunk/arch/arm/kernel/ecard.c
index 2ad62df37730..eed2f795e1b3 100644
--- a/trunk/arch/arm/kernel/ecard.c
+++ b/trunk/arch/arm/kernel/ecard.c
@@ -443,40 +443,40 @@ static expansioncard_ops_t ecard_default_ops = {
*
* They are not meant to be called directly, but via enable/disable_irq.
*/
-static void ecard_irq_unmask(struct irq_data *d)
+static void ecard_irq_unmask(unsigned int irqnr)
{
- ecard_t *ec = slot_to_ecard(d->irq - 32);
+ ecard_t *ec = slot_to_ecard(irqnr - 32);
if (ec) {
if (!ec->ops)
ec->ops = &ecard_default_ops;
if (ec->claimed && ec->ops->irqenable)
- ec->ops->irqenable(ec, d->irq);
+ ec->ops->irqenable(ec, irqnr);
else
printk(KERN_ERR "ecard: rejecting request to "
- "enable IRQs for %d\n", d->irq);
+ "enable IRQs for %d\n", irqnr);
}
}
-static void ecard_irq_mask(struct irq_data *d)
+static void ecard_irq_mask(unsigned int irqnr)
{
- ecard_t *ec = slot_to_ecard(d->irq - 32);
+ ecard_t *ec = slot_to_ecard(irqnr - 32);
if (ec) {
if (!ec->ops)
ec->ops = &ecard_default_ops;
if (ec->ops && ec->ops->irqdisable)
- ec->ops->irqdisable(ec, d->irq);
+ ec->ops->irqdisable(ec, irqnr);
}
}
static struct irq_chip ecard_chip = {
- .name = "ECARD",
- .irq_ack = ecard_irq_mask,
- .irq_mask = ecard_irq_mask,
- .irq_unmask = ecard_irq_unmask,
+ .name = "ECARD",
+ .ack = ecard_irq_mask,
+ .mask = ecard_irq_mask,
+ .unmask = ecard_irq_unmask,
};
void ecard_enablefiq(unsigned int fiqnr)
@@ -551,7 +551,7 @@ static void ecard_check_lockup(struct irq_desc *desc)
printk(KERN_ERR "\nInterrupt lockup detected - "
"disabling all expansion card interrupts\n");
- desc->irq_data.chip->irq_mask(&desc->irq_data);
+ desc->chip->mask(IRQ_EXPANSIONCARD);
ecard_dump_irq_state();
}
} else
@@ -574,7 +574,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
ecard_t *ec;
int called = 0;
- desc->irq_data.chip->irq_mask(&desc->irq_data);
+ desc->chip->mask(irq);
for (ec = cards; ec; ec = ec->next) {
int pending;
@@ -591,7 +591,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
called ++;
}
}
- desc->irq_data.chip->irq_unmask(&desc->irq_data);
+ desc->chip->unmask(irq);
if (called == 0)
ecard_check_lockup(desc);
diff --git a/trunk/arch/arm/kernel/head-common.S b/trunk/arch/arm/kernel/head-common.S
index 8f57515bbdb0..bbecaac1e013 100644
--- a/trunk/arch/arm/kernel/head-common.S
+++ b/trunk/arch/arm/kernel/head-common.S
@@ -60,8 +60,6 @@ str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x"
str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
.align
-#else
- b __error
#endif
/*
diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c
index 28536e352deb..8135438b8818 100644
--- a/trunk/arch/arm/kernel/irq.c
+++ b/trunk/arch/arm/kernel/irq.c
@@ -88,7 +88,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "%*d: ", prec, i);
for_each_present_cpu(cpu)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
- seq_printf(p, " %10s", desc->irq_data.chip->name ? : "-");
+ seq_printf(p, " %10s", desc->chip->name ? : "-");
seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name);
@@ -181,11 +181,10 @@ int __init arch_probe_nr_irqs(void)
static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
{
- pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->irq_data.node, cpu);
+ pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu);
raw_spin_lock_irq(&desc->lock);
- desc->irq_data.chip->irq_set_affinity(&desc->irq_data,
- cpumask_of(cpu), false);
+ desc->chip->set_affinity(irq, cpumask_of(cpu));
raw_spin_unlock_irq(&desc->lock);
}
@@ -200,18 +199,16 @@ void migrate_irqs(void)
struct irq_desc *desc;
for_each_irq_desc(i, desc) {
- struct irq_data *d = &desc->irq_data;
-
- if (d->node == cpu) {
- unsigned int newcpu = cpumask_any_and(d->affinity,
+ if (desc->node == cpu) {
+ unsigned int newcpu = cpumask_any_and(desc->affinity,
cpu_online_mask);
if (newcpu >= nr_cpu_ids) {
if (printk_ratelimit())
printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
i, cpu);
- cpumask_setall(d->affinity);
- newcpu = cpumask_any_and(d->affinity,
+ cpumask_setall(desc->affinity);
+ newcpu = cpumask_any_and(desc->affinity,
cpu_online_mask);
}
diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c
index 2cfe8161b478..0c1bb68ff4a8 100644
--- a/trunk/arch/arm/kernel/module.c
+++ b/trunk/arch/arm/kernel/module.c
@@ -38,9 +38,17 @@
#ifdef CONFIG_MMU
void *module_alloc(unsigned long size)
{
- return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
- GFP_KERNEL, PAGE_KERNEL_EXEC, -1,
- __builtin_return_address(0));
+ struct vm_struct *area;
+
+ size = PAGE_ALIGN(size);
+ if (!size)
+ return NULL;
+
+ area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END);
+ if (!area)
+ return NULL;
+
+ return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
}
#else /* CONFIG_MMU */
void *module_alloc(unsigned long size)
diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c
index 94bbedbed639..e76fcaadce03 100644
--- a/trunk/arch/arm/kernel/process.c
+++ b/trunk/arch/arm/kernel/process.c
@@ -483,7 +483,6 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
}
-#ifdef CONFIG_MMU
/*
* The vectors page is always readable from user space for the
* atomic helpers and the signal restart code. Let's declare a mapping
@@ -504,4 +503,3 @@ const char *arch_vma_name(struct vm_area_struct *vma)
{
return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
}
-#endif
diff --git a/trunk/arch/arm/kernel/sched_clock.c b/trunk/arch/arm/kernel/sched_clock.c
index 9a46370fe9da..2cdcc9287c74 100644
--- a/trunk/arch/arm/kernel/sched_clock.c
+++ b/trunk/arch/arm/kernel/sched_clock.c
@@ -34,7 +34,7 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
sched_clock_update_fn = update;
/* calculate the mult/shift to convert counter ticks to ns. */
- clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 0);
+ clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 60);
r = rate;
if (r >= 4000000) {
@@ -60,15 +60,10 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
* sets the initial epoch.
*/
sched_clock_timer.data = msecs_to_jiffies(w - (w / 10));
- update();
+ sched_clock_poll(sched_clock_timer.data);
/*
* Ensure that sched_clock() starts off at 0ns
*/
cd->epoch_ns = 0;
}
-
-void __init sched_clock_postinit(void)
-{
- sched_clock_poll(sched_clock_timer.data);
-}
diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c
index 420b8d6485d6..3455ad33de4c 100644
--- a/trunk/arch/arm/kernel/setup.c
+++ b/trunk/arch/arm/kernel/setup.c
@@ -518,21 +518,25 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
#endif
}
-static void __init request_standard_resources(struct machine_desc *mdesc)
+static void __init
+request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
{
- struct memblock_region *region;
struct resource *res;
+ int i;
kernel_code.start = virt_to_phys(_text);
kernel_code.end = virt_to_phys(_etext - 1);
kernel_data.start = virt_to_phys(_sdata);
kernel_data.end = virt_to_phys(_end - 1);
- for_each_memblock(memory, region) {
+ for (i = 0; i < mi->nr_banks; i++) {
+ if (mi->bank[i].size == 0)
+ continue;
+
res = alloc_bootmem_low(sizeof(*res));
res->name = "System RAM";
- res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
- res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
+ res->start = mi->bank[i].start;
+ res->end = mi->bank[i].start + mi->bank[i].size - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
request_resource(&iomem_resource, res);
@@ -646,17 +650,15 @@ static int __init parse_tag_revision(const struct tag *tag)
__tagtable(ATAG_REVISION, parse_tag_revision);
+#ifndef CONFIG_CMDLINE_FORCE
static int __init parse_tag_cmdline(const struct tag *tag)
{
-#ifndef CONFIG_CMDLINE_FORCE
strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
-#else
- pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");
-#endif /* CONFIG_CMDLINE_FORCE */
return 0;
}
__tagtable(ATAG_CMDLINE, parse_tag_cmdline);
+#endif /* CONFIG_CMDLINE_FORCE */
/*
* Scan the tag table for this tag, and call its parse function.
@@ -855,7 +857,7 @@ void __init setup_arch(char **cmdline_p)
arm_memblock_init(&meminfo, mdesc);
paging_init(mdesc);
- request_standard_resources(mdesc);
+ request_standard_resources(&meminfo, mdesc);
#ifdef CONFIG_SMP
if (is_smp())
diff --git a/trunk/arch/arm/kernel/smp_twd.c b/trunk/arch/arm/kernel/smp_twd.c
index fd9156698ab9..dd790745b3ef 100644
--- a/trunk/arch/arm/kernel/smp_twd.c
+++ b/trunk/arch/arm/kernel/smp_twd.c
@@ -114,7 +114,7 @@ static void __cpuinit twd_calibrate_rate(void)
twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
- (twd_timer_rate / 1000000) % 100);
+ (twd_timer_rate / 100000) % 100);
}
load = twd_timer_rate / HZ;
diff --git a/trunk/arch/arm/kernel/stacktrace.c b/trunk/arch/arm/kernel/stacktrace.c
index 381d23a497c1..c2e112e1a05f 100644
--- a/trunk/arch/arm/kernel/stacktrace.c
+++ b/trunk/arch/arm/kernel/stacktrace.c
@@ -94,13 +94,10 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
if (tsk != current) {
#ifdef CONFIG_SMP
/*
- * What guarantees do we have here that 'tsk' is not
- * running on another CPU? For now, ignore it as we
- * can't guarantee we won't explode.
+ * What guarantees do we have here that 'tsk'
+ * is not running on another CPU?
*/
- if (trace->nr_entries < trace->max_entries)
- trace->entries[trace->nr_entries++] = ULONG_MAX;
- return;
+ BUG();
#else
data.no_sched_functions = 1;
frame.fp = thread_saved_fp(tsk);
diff --git a/trunk/arch/arm/kernel/time.c b/trunk/arch/arm/kernel/time.c
index 3d76bf233734..f1e2eb19a67d 100644
--- a/trunk/arch/arm/kernel/time.c
+++ b/trunk/arch/arm/kernel/time.c
@@ -29,7 +29,6 @@
#include
#include
-#include
#include
#include
#include
@@ -164,8 +163,5 @@ void __init time_init(void)
{
system_timer = machine_desc->timer;
system_timer->init();
-#ifdef CONFIG_HAVE_SCHED_CLOCK
- sched_clock_postinit();
-#endif
}
diff --git a/trunk/arch/arm/lib/delay.S b/trunk/arch/arm/lib/delay.S
index 3c9a05c8d20b..8d6a8762ab88 100644
--- a/trunk/arch/arm/lib/delay.S
+++ b/trunk/arch/arm/lib/delay.S
@@ -25,15 +25,11 @@ ENTRY(__udelay)
ldr r2, .LC1
mul r0, r2, r0
ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06
- mov r1, #-1
ldr r2, .LC0
ldr r2, [r2] @ max = 0x01ffffff
- add r0, r0, r1, lsr #32-14
mov r0, r0, lsr #14 @ max = 0x0001ffff
- add r2, r2, r1, lsr #32-10
mov r2, r2, lsr #10 @ max = 0x00007fff
mul r0, r2, r0 @ max = 2^32-1
- add r0, r0, r1, lsr #32-6
movs r0, r0, lsr #6
moveq pc, lr
diff --git a/trunk/arch/arm/mach-aaec2000/core.c b/trunk/arch/arm/mach-aaec2000/core.c
index f8465bd17e67..3ef68330452a 100644
--- a/trunk/arch/arm/mach-aaec2000/core.c
+++ b/trunk/arch/arm/mach-aaec2000/core.c
@@ -68,25 +68,25 @@ void __init aaec2000_map_io(void)
/*
* Interrupt handling routines
*/
-static void aaec2000_int_ack(struct irq_data *d)
+static void aaec2000_int_ack(unsigned int irq)
{
- IRQ_INTSR = 1 << d->irq;
+ IRQ_INTSR = 1 << irq;
}
-static void aaec2000_int_mask(struct irq_data *d)
+static void aaec2000_int_mask(unsigned int irq)
{
- IRQ_INTENC |= (1 << d->irq);
+ IRQ_INTENC |= (1 << irq);
}
-static void aaec2000_int_unmask(struct irq_data *d)
+static void aaec2000_int_unmask(unsigned int irq)
{
- IRQ_INTENS |= (1 << d->irq);
+ IRQ_INTENS |= (1 << irq);
}
static struct irq_chip aaec2000_irq_chip = {
- .irq_ack = aaec2000_int_ack,
- .irq_mask = aaec2000_int_mask,
- .irq_unmask = aaec2000_int_unmask,
+ .ack = aaec2000_int_ack,
+ .mask = aaec2000_int_mask,
+ .unmask = aaec2000_int_unmask,
};
void __init aaec2000_init_irq(void)
diff --git a/trunk/arch/arm/mach-at91/Kconfig b/trunk/arch/arm/mach-at91/Kconfig
index 19390231a0e9..c015b684b4fe 100644
--- a/trunk/arch/arm/mach-at91/Kconfig
+++ b/trunk/arch/arm/mach-at91/Kconfig
@@ -362,12 +362,6 @@ config MACH_CPU9G20
Select this if you are using a Eukrea Electromatique's
CPU9G20 Board
-config MACH_ACMENETUSFOXG20
- bool "Acme Systems srl FOX Board G20"
- help
- Select this if you are using Acme Systems
- FOX Board G20
-
config MACH_PORTUXG20
bool "taskit PortuxG20"
help
@@ -387,13 +381,6 @@ config MACH_PCONTROL_G20
Select this if you are using taskit's Stamp9G20 CPU module on this
carrier board, beeing the decentralized unit of a building automation
system; featuring nvram, eth-switch, iso-rs485, display, io
-
-config MACH_GSIA18S
- bool "GS_IA18_S board"
- help
- This enables support for the GS_IA18_S board
- produced by GeoSIG Ltd company. This is an internet accelerograph.
-
endif
if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20)
diff --git a/trunk/arch/arm/mach-at91/Makefile b/trunk/arch/arm/mach-at91/Makefile
index a83835e0c185..d13add71f72a 100644
--- a/trunk/arch/arm/mach-at91/Makefile
+++ b/trunk/arch/arm/mach-at91/Makefile
@@ -63,11 +63,9 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o
# AT91SAM9G20 board-specific support
obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o
-obj-$(CONFIG_MACH_ACMENETUSFOXG20) += board-foxg20.o
obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o
obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o
obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o
-obj-$(CONFIG_MACH_GSIA18S) += board-gsia18s.o board-stamp9g20.o
# AT91SAM9260/AT91SAM9G20 board-specific support
obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o
diff --git a/trunk/arch/arm/mach-at91/board-foxg20.c b/trunk/arch/arm/mach-at91/board-foxg20.c
deleted file mode 100644
index dfc7dfe738e4..000000000000
--- a/trunk/arch/arm/mach-at91/board-foxg20.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (C) 2005 SAN People
- * Copyright (C) 2008 Atmel
- * Copyright (C) 2010 Lee McLoughlin - lee@lmmrtech.com
- * Copyright (C) 2010 Sergio Tanzilli - tanzilli@acmesystems.it
- *
- * 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
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-#include
-#include
-
-#include "sam9_smc.h"
-#include "generic.h"
-
-/*
- * The FOX Board G20 hardware comes as the "Netus G20" board with
- * just the cpu, ram, dataflash and two header connectors.
- * This is plugged into the FOX Board which provides the ethernet,
- * usb, rtc, leds, switch, ...
- *
- * For more info visit: http://www.acmesystems.it/foxg20
- */
-
-
-static void __init foxg20_map_io(void)
-{
- /* Initialize processor: 18.432 MHz crystal */
- at91sam9260_initialize(18432000);
-
- /* DBGU on ttyS0. (Rx & Tx only) */
- at91_register_uart(0, 0, 0);
-
- /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
- at91_register_uart(AT91SAM9260_ID_US0, 1,
- ATMEL_UART_CTS
- | ATMEL_UART_RTS
- | ATMEL_UART_DTR
- | ATMEL_UART_DSR
- | ATMEL_UART_DCD
- | ATMEL_UART_RI);
-
- /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
- at91_register_uart(AT91SAM9260_ID_US1, 2,
- ATMEL_UART_CTS
- | ATMEL_UART_RTS);
-
- /* USART2 on ttyS3. (Rx & Tx only) */
- at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
-
- /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
- at91_register_uart(AT91SAM9260_ID_US3, 4,
- ATMEL_UART_CTS
- | ATMEL_UART_RTS);
-
- /* USART4 on ttyS5. (Rx & Tx only) */
- at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
-
- /* USART5 on ttyS6. (Rx & Tx only) */
- at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
-
- /* set serial console to ttyS0 (ie, DBGU) */
- at91_set_serial_console(0);
-
- /* Set the internal pull-up resistor on DRXD */
- at91_set_A_periph(AT91_PIN_PB14, 1);
-
-}
-
-static void __init foxg20_init_irq(void)
-{
- at91sam9260_init_interrupts(NULL);
-}
-
-
-/*
- * USB Host port
- */
-static struct at91_usbh_data __initdata foxg20_usbh_data = {
- .ports = 2,
-};
-
-/*
- * USB Device port
- */
-static struct at91_udc_data __initdata foxg20_udc_data = {
- .vbus_pin = AT91_PIN_PC6,
- .pullup_pin = 0, /* pull-up driven by UDC */
-};
-
-
-/*
- * SPI devices.
- */
-static struct spi_board_info foxg20_spi_devices[] = {
-#if !defined(CONFIG_MMC_AT91)
- {
- .modalias = "mtd_dataflash",
- .chip_select = 1,
- .max_speed_hz = 15 * 1000 * 1000,
- .bus_num = 0,
- },
-#endif
-};
-
-
-/*
- * MACB Ethernet device
- */
-static struct at91_eth_data __initdata foxg20_macb_data = {
- .phy_irq_pin = AT91_PIN_PA7,
- .is_rmii = 1,
-};
-
-/*
- * MCI (SD/MMC)
- * det_pin, wp_pin and vcc_pin are not connected
- */
-static struct at91_mmc_data __initdata foxg20_mmc_data = {
- .slot_b = 1,
- .wire4 = 1,
-};
-
-
-/*
- * LEDs
- */
-static struct gpio_led foxg20_leds[] = {
- { /* user led, red */
- .name = "user_led",
- .gpio = AT91_PIN_PC7,
- .active_low = 0,
- .default_trigger = "heartbeat",
- },
-};
-
-
-/*
- * GPIO Buttons
- */
-#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
-static struct gpio_keys_button foxg20_buttons[] = {
- {
- .gpio = AT91_PIN_PC4,
- .code = BTN_1,
- .desc = "Button 1",
- .active_low = 1,
- .wakeup = 1,
- },
-};
-
-static struct gpio_keys_platform_data foxg20_button_data = {
- .buttons = foxg20_buttons,
- .nbuttons = ARRAY_SIZE(foxg20_buttons),
-};
-
-static struct platform_device foxg20_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &foxg20_button_data,
- }
-};
-
-static void __init foxg20_add_device_buttons(void)
-{
- at91_set_gpio_input(AT91_PIN_PC4, 1); /* btn1 */
- at91_set_deglitch(AT91_PIN_PC4, 1);
-
- platform_device_register(&foxg20_button_device);
-}
-#else
-static void __init foxg20_add_device_buttons(void) {}
-#endif
-
-
-#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
-static struct w1_gpio_platform_data w1_gpio_pdata = {
- /* If you choose to use a pin other than PB16 it needs to be 3.3V */
- .pin = AT91_PIN_PB16,
- .is_open_drain = 1,
-};
-
-static struct platform_device w1_device = {
- .name = "w1-gpio",
- .id = -1,
- .dev.platform_data = &w1_gpio_pdata,
-};
-
-static void __init at91_add_device_w1(void)
-{
- at91_set_GPIO_periph(w1_gpio_pdata.pin, 1);
- at91_set_multi_drive(w1_gpio_pdata.pin, 1);
- platform_device_register(&w1_device);
-}
-
-#endif
-
-
-static struct i2c_board_info __initdata foxg20_i2c_devices[] = {
- {
- I2C_BOARD_INFO("24c512", 0x50),
- },
-};
-
-
-static void __init foxg20_board_init(void)
-{
- /* Serial */
- at91_add_device_serial();
- /* USB Host */
- at91_add_device_usbh(&foxg20_usbh_data);
- /* USB Device */
- at91_add_device_udc(&foxg20_udc_data);
- /* SPI */
- at91_add_device_spi(foxg20_spi_devices, ARRAY_SIZE(foxg20_spi_devices));
- /* Ethernet */
- at91_add_device_eth(&foxg20_macb_data);
- /* MMC */
- at91_add_device_mmc(0, &foxg20_mmc_data);
- /* I2C */
- at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
- /* LEDs */
- at91_gpio_leds(foxg20_leds, ARRAY_SIZE(foxg20_leds));
- /* Push Buttons */
- foxg20_add_device_buttons();
-#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
- at91_add_device_w1();
-#endif
-}
-
-MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
- /* Maintainer: Sergio Tanzilli */
- .boot_params = AT91_SDRAM_BASE + 0x100,
- .timer = &at91sam926x_timer,
- .map_io = foxg20_map_io,
- .init_irq = foxg20_init_irq,
- .init_machine = foxg20_board_init,
-MACHINE_END
diff --git a/trunk/arch/arm/mach-at91/board-gsia18s.c b/trunk/arch/arm/mach-at91/board-gsia18s.c
deleted file mode 100644
index bc28136ee249..000000000000
--- a/trunk/arch/arm/mach-at91/board-gsia18s.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * Copyright (C) 2010 Christian Glindkamp