diff --git a/[refs] b/[refs]
index 1ee3e5fd7e65..f7386cea2bdd 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: f68e556e23d1a4176b563bcb25d8baf2c5313f91
+refs/heads/master: 3119936a289db88cf749143fa5ef6b4a4712e3c0
diff --git a/trunk/Documentation/DMA-attributes.txt b/trunk/Documentation/DMA-attributes.txt
index 5c72eed89563..b768cc0e402b 100644
--- a/trunk/Documentation/DMA-attributes.txt
+++ b/trunk/Documentation/DMA-attributes.txt
@@ -31,21 +31,3 @@ may be weakly ordered, that is that reads and writes may pass each other.
Since it is optional for platforms to implement DMA_ATTR_WEAK_ORDERING,
those that do not will simply ignore the attribute and exhibit default
behavior.
-
-DMA_ATTR_WRITE_COMBINE
-----------------------
-
-DMA_ATTR_WRITE_COMBINE specifies that writes to the mapping may be
-buffered to improve performance.
-
-Since it is optional for platforms to implement DMA_ATTR_WRITE_COMBINE,
-those that do not will simply ignore the attribute and exhibit default
-behavior.
-
-DMA_ATTR_NON_CONSISTENT
------------------------
-
-DMA_ATTR_NON_CONSISTENT lets the platform to choose to return either
-consistent or non-consistent memory as it sees fit. By using this API,
-you are guaranteeing to the platform that you have all the correct and
-necessary sync points for this memory in the driver.
diff --git a/trunk/Documentation/DocBook/device-drivers.tmpl b/trunk/Documentation/DocBook/device-drivers.tmpl
index 7514dbf0a679..9c27e5125dd2 100644
--- a/trunk/Documentation/DocBook/device-drivers.tmpl
+++ b/trunk/Documentation/DocBook/device-drivers.tmpl
@@ -446,21 +446,4 @@ X!Idrivers/video/console/fonts.c
!Edrivers/i2c/i2c-core.c
-
- High Speed Synchronous Serial Interface (HSI)
-
-
- High Speed Synchronous Serial Interface (HSI) is a
- serial interface mainly used for connecting application
- engines (APE) with cellular modem engines (CMT) in cellular
- handsets.
-
- HSI provides multiplexing for up to 16 logical channels,
- low-latency and full duplex communication.
-
-
-!Iinclude/linux/hsi/hsi.h
-!Edrivers/hsi/hsi.c
-
-
diff --git a/trunk/Documentation/cgroups/cpusets.txt b/trunk/Documentation/cgroups/cpusets.txt
index cefd3d8bbd11..5c51ed406d1d 100644
--- a/trunk/Documentation/cgroups/cpusets.txt
+++ b/trunk/Documentation/cgroups/cpusets.txt
@@ -217,7 +217,7 @@ and name space for cpusets, with a minimum of additional kernel code.
The cpus and mems files in the root (top_cpuset) cpuset are
read-only. The cpus file automatically tracks the value of
-cpu_online_mask using a CPU hotplug notifier, and the mems file
+cpu_online_map using a CPU hotplug notifier, and the mems file
automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e.,
nodes with memory--using the cpuset_track_online_nodes() hook.
diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt
index 66ef8f35613d..a20bfd415e41 100644
--- a/trunk/Documentation/cpu-hotplug.txt
+++ b/trunk/Documentation/cpu-hotplug.txt
@@ -47,7 +47,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
other cpus later online, read FAQ's for more info.
additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
- cpu_possible_mask = cpu_present_mask + additional_cpus
+ cpu_possible_map = cpu_present_map + additional_cpus
cede_offline={"off","on"} Use this option to disable/enable putting offlined
processors to an extended H_CEDE state on
@@ -64,11 +64,11 @@ should only rely on this to count the # of cpus, but *MUST* not rely
on the apicid values in those tables for disabled apics. In the event
BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could
use this parameter "additional_cpus=x" to represent those cpus in the
-cpu_possible_mask.
+cpu_possible_map.
possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus.
This option sets possible_cpus bits in
- cpu_possible_mask. Thus keeping the numbers of bits set
+ cpu_possible_map. Thus keeping the numbers of bits set
constant even if the machine gets rebooted.
CPU maps and such
@@ -76,7 +76,7 @@ CPU maps and such
[More on cpumaps and primitive to manipulate, please check
include/linux/cpumask.h that has more descriptive text.]
-cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the
+cpu_possible_map: Bitmap of possible CPUs that can ever be available in the
system. This is used to allocate some boot time memory for per_cpu variables
that aren't designed to grow/shrink as CPUs are made available or removed.
Once set during boot time discovery phase, the map is static, i.e no bits
@@ -84,13 +84,13 @@ are added or removed anytime. Trimming it accurately for your system needs
upfront can save some boot time memory. See below for how we use heuristics
in x86_64 case to keep this under check.
-cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up()
+cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up()
after a cpu is available for kernel scheduling and ready to receive
interrupts from devices. Its cleared when a cpu is brought down using
__cpu_disable(), before which all OS services including interrupts are
migrated to another target CPU.
-cpu_present_mask: Bitmap of CPUs currently present in the system. Not all
+cpu_present_map: Bitmap of CPUs currently present in the system. Not all
of them may be online. When physical hotplug is processed by the relevant
subsystem (e.g ACPI) can change and new bit either be added or removed
from the map depending on the event is hot-add/hot-remove. There are currently
@@ -99,22 +99,22 @@ at which time hotplug is disabled.
You really dont need to manipulate any of the system cpu maps. They should
be read-only for most use. When setting up per-cpu resources almost always use
-cpu_possible_mask/for_each_possible_cpu() to iterate.
+cpu_possible_map/for_each_possible_cpu() to iterate.
Never use anything other than cpumask_t to represent bitmap of CPUs.
#include
- for_each_possible_cpu - Iterate over cpu_possible_mask
- for_each_online_cpu - Iterate over cpu_online_mask
- for_each_present_cpu - Iterate over cpu_present_mask
+ for_each_possible_cpu - Iterate over cpu_possible_map
+ for_each_online_cpu - Iterate over cpu_online_map
+ for_each_present_cpu - Iterate over cpu_present_map
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
#include
get_online_cpus() and put_online_cpus():
The above calls are used to inhibit cpu hotplug operations. While the
-cpu_hotplug.refcount is non zero, the cpu_online_mask will not change.
+cpu_hotplug.refcount is non zero, the cpu_online_map will not change.
If you merely need to avoid cpus going away, you could also use
preempt_disable() and preempt_enable() for those sections.
Just remember the critical section cannot call any
diff --git a/trunk/Documentation/devicetree/bindings/mtd/atmel-nand.txt b/trunk/Documentation/devicetree/bindings/mtd/atmel-nand.txt
index a20069502f5a..5903ecf6e895 100644
--- a/trunk/Documentation/devicetree/bindings/mtd/atmel-nand.txt
+++ b/trunk/Documentation/devicetree/bindings/mtd/atmel-nand.txt
@@ -27,13 +27,13 @@ nand0: nand@40000000,0 {
reg = <0x40000000 0x10000000
0xffffe800 0x200
>;
- atmel,nand-addr-offset = <21>; /* ale */
- atmel,nand-cmd-offset = <22>; /* cle */
+ atmel,nand-addr-offset = <21>;
+ atmel,nand-cmd-offset = <22>;
nand-on-flash-bbt;
nand-ecc-mode = "soft";
- gpios = <&pioC 13 0 /* rdy */
- &pioC 14 0 /* nce */
- 0 /* cd */
+ gpios = <&pioC 13 0
+ &pioC 14 0
+ 0
>;
partition@0 {
...
diff --git a/trunk/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/trunk/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
deleted file mode 100644
index 357758cb6e92..000000000000
--- a/trunk/Documentation/devicetree/bindings/regulator/anatop-regulator.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Anatop Voltage regulators
-
-Required properties:
-- compatible: Must be "fsl,anatop-regulator"
-- anatop-reg-offset: Anatop MFD register offset
-- anatop-vol-bit-shift: Bit shift for the register
-- anatop-vol-bit-width: Number of bits used in the register
-- anatop-min-bit-val: Minimum value of this register
-- anatop-min-voltage: Minimum voltage of this regulator
-- anatop-max-voltage: Maximum voltage of this regulator
-
-Any property defined as part of the core regulator
-binding, defined in regulator.txt, can also be used.
-
-Example:
-
- regulator-vddpu {
- compatible = "fsl,anatop-regulator";
- regulator-name = "vddpu";
- regulator-min-microvolt = <725000>;
- regulator-max-microvolt = <1300000>;
- regulator-always-on;
- anatop-reg-offset = <0x140>;
- anatop-vol-bit-shift = <9>;
- anatop-vol-bit-width = <5>;
- anatop-min-bit-val = <1>;
- anatop-min-voltage = <725000>;
- anatop-max-voltage = <1300000>;
- };
diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt
index 709e08e9a222..c1be8066ea59 100644
--- a/trunk/Documentation/feature-removal-schedule.txt
+++ b/trunk/Documentation/feature-removal-schedule.txt
@@ -6,6 +6,14 @@ be removed from this file.
---------------------------
+What: x86 floppy disable_hlt
+When: 2012
+Why: ancient workaround of dubious utility clutters the
+ code used by everybody else.
+Who: Len Brown
+
+---------------------------
+
What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
When: 2012
Why: This optional sub-feature of APM is of dubious reliability,
diff --git a/trunk/Documentation/hwmon/k10temp b/trunk/Documentation/hwmon/k10temp
index 90956b618025..a10f73624ad3 100644
--- a/trunk/Documentation/hwmon/k10temp
+++ b/trunk/Documentation/hwmon/k10temp
@@ -11,7 +11,7 @@ Supported chips:
Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)
* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)
-* AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity"
+* AMD Family 15h processors: "Bulldozer"
Prefix: 'k10temp'
Addresses scanned: PCI space
diff --git a/trunk/Documentation/ioctl/ioctl-number.txt b/trunk/Documentation/ioctl/ioctl-number.txt
index e34b531dc316..3b7488fc3373 100644
--- a/trunk/Documentation/ioctl/ioctl-number.txt
+++ b/trunk/Documentation/ioctl/ioctl-number.txt
@@ -225,7 +225,6 @@ Code Seq#(hex) Include File Comments
'j' 00-3F linux/joystick.h
'k' 00-0F linux/spi/spidev.h conflict!
'k' 00-05 video/kyro.h conflict!
-'k' 10-17 linux/hsi/hsi_char.h HSI character device
'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
'l' 40-7F linux/udf_fs_i.h in development:
diff --git a/trunk/Documentation/networking/driver.txt b/trunk/Documentation/networking/driver.txt
index da59e2884130..03283daa64fe 100644
--- a/trunk/Documentation/networking/driver.txt
+++ b/trunk/Documentation/networking/driver.txt
@@ -2,16 +2,16 @@ Document about softnet driver issues
Transmit path guidelines:
-1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under
- any normal circumstances. It is considered a hard error unless
+1) The hard_start_xmit method must never return '1' under any
+ normal circumstances. It is considered a hard error unless
there is no way your device can tell ahead of time when it's
transmit function will become busy.
Instead it must maintain the queue properly. For example,
for a driver implementing scatter-gather this means:
- static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
- struct net_device *dev)
+ static int drv_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct drv *dp = netdev_priv(dev);
@@ -23,7 +23,7 @@ Transmit path guidelines:
unlock_tx(dp);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
- return NETDEV_TX_BUSY;
+ return 1;
}
... queue packet to card ...
@@ -35,7 +35,6 @@ Transmit path guidelines:
...
unlock_tx(dp);
...
- return NETDEV_TX_OK;
}
And then at the end of your TX reclamation event handling:
@@ -59,12 +58,15 @@ Transmit path guidelines:
TX_BUFFS_AVAIL(dp) > 0)
netif_wake_queue(dp->dev);
-2) An ndo_start_xmit method must not modify the shared parts of a
+2) Do not forget to update netdev->trans_start to jiffies after
+ each new tx packet is given to the hardware.
+
+3) A hard_start_xmit method must not modify the shared parts of a
cloned SKB.
-3) Do not forget that once you return NETDEV_TX_OK from your
- ndo_start_xmit method, it is your driver's responsibility to free
- up the SKB and in some finite amount of time.
+4) Do not forget that once you return 0 from your hard_start_xmit
+ method, it is your driver's responsibility to free up the SKB
+ and in some finite amount of time.
For example, this means that it is not allowed for your TX
mitigation scheme to let TX packets "hang out" in the TX
@@ -72,9 +74,8 @@ Transmit path guidelines:
This error can deadlock sockets waiting for send buffer room
to be freed up.
- If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you
- must not keep any reference to that SKB and you must not attempt
- to free it up.
+ If you return 1 from the hard_start_xmit method, you must not keep
+ any reference to that SKB and you must not attempt to free it up.
Probing guidelines:
@@ -84,10 +85,10 @@ Probing guidelines:
Close/stop guidelines:
-1) After the ndo_stop routine has been called, the hardware must
+1) After the dev->stop routine has been called, the hardware must
not receive or transmit any data. All in flight packets must
be aborted. If necessary, poll or wait for completion of
any reset commands.
-2) The ndo_stop routine will be called by unregister_netdevice
+2) The dev->stop routine will be called by unregister_netdevice
if device is still UP.
diff --git a/trunk/Documentation/networking/ip-sysctl.txt b/trunk/Documentation/networking/ip-sysctl.txt
index bd80ba5847d2..ad3e80e17b4f 100644
--- a/trunk/Documentation/networking/ip-sysctl.txt
+++ b/trunk/Documentation/networking/ip-sysctl.txt
@@ -604,8 +604,15 @@ IP Variables:
ip_local_port_range - 2 INTEGERS
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
- second the last local port number. The default values are
- 32768 and 61000 respectively.
+ second the last local port number. Default value depends on
+ amount of memory available on the system:
+ > 128Mb 32768-61000
+ < 128Mb 1024-4999 or even less.
+ This number defines number of active connections, which this
+ system can issue simultaneously to systems not supporting
+ TCP extensions (timestamps). With tcp_tw_recycle enabled
+ (i.e. by default) range 1024-4999 is enough to issue up to
+ 2000 connections per second to systems supporting timestamps.
ip_local_reserved_ports - list of comma separated ranges
Specify the ports which are reserved for known third-party
diff --git a/trunk/Documentation/networking/netdevices.txt b/trunk/Documentation/networking/netdevices.txt
index c7ecc7080494..89358341682a 100644
--- a/trunk/Documentation/networking/netdevices.txt
+++ b/trunk/Documentation/networking/netdevices.txt
@@ -47,25 +47,26 @@ packets is preferred.
struct net_device synchronization rules
=======================================
-ndo_open:
+dev->open:
Synchronization: rtnl_lock() semaphore.
Context: process
-ndo_stop:
+dev->stop:
Synchronization: rtnl_lock() semaphore.
Context: process
- Note: netif_running() is guaranteed false
+ Note1: netif_running() is guaranteed false
+ Note2: dev->poll() is guaranteed to be stopped
-ndo_do_ioctl:
+dev->do_ioctl:
Synchronization: rtnl_lock() semaphore.
Context: process
-ndo_get_stats:
+dev->get_stats:
Synchronization: dev_base_lock rwlock.
Context: nominally process, but don't sleep inside an rwlock
-ndo_start_xmit:
- Synchronization: __netif_tx_lock spinlock.
+dev->hard_start_xmit:
+ Synchronization: netif_tx_lock spinlock.
When the driver sets NETIF_F_LLTX in dev->features this will be
called without holding netif_tx_lock. In this case the driver
@@ -86,20 +87,20 @@ ndo_start_xmit:
o NETDEV_TX_LOCKED Locking failed, please retry quickly.
Only valid when NETIF_F_LLTX is set.
-ndo_tx_timeout:
- Synchronization: netif_tx_lock spinlock; all TX queues frozen.
+dev->tx_timeout:
+ Synchronization: netif_tx_lock spinlock.
Context: BHs disabled
Notes: netif_queue_stopped() is guaranteed true
-ndo_set_rx_mode:
- Synchronization: netif_addr_lock spinlock.
+dev->set_rx_mode:
+ Synchronization: netif_tx_lock spinlock.
Context: BHs disabled
struct napi_struct synchronization rules
========================================
napi->poll:
Synchronization: NAPI_STATE_SCHED bit in napi->state. Device
- driver's ndo_stop method will invoke napi_disable() on
+ driver's dev->close method will invoke napi_disable() on
all NAPI instances which will do a sleeping poll on the
NAPI_STATE_SCHED napi->state bit, waiting for all pending
NAPI activity to cease.
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 6d05ae236036..eecf3441ac21 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -1251,6 +1251,7 @@ ATHEROS ATH5K WIRELESS DRIVER
M: Jiri Slaby
M: Nick Kossifidis
M: "Luis R. Rodriguez"
+M: Bob Copeland
L: linux-wireless@vger.kernel.org
L: ath5k-devel@lists.ath5k.org
W: http://wireless.kernel.org/en/users/Drivers/ath5k
@@ -3556,13 +3557,17 @@ L: linux-pm@vger.kernel.org
S: Supported
F: arch/x86/platform/mrst/pmu.*
-INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
-M: Stanislav Yakovlev
+INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
L: linux-wireless@vger.kernel.org
-S: Maintained
+S: Orphan
F: Documentation/networking/README.ipw2100
+F: drivers/net/wireless/ipw2x00/ipw2100.*
+
+INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
+L: linux-wireless@vger.kernel.org
+S: Orphan
F: Documentation/networking/README.ipw2200
-F: drivers/net/wireless/ipw2x00/
+F: drivers/net/wireless/ipw2x00/ipw2200.*
INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
M: Joseph Cihula
@@ -4309,13 +4314,6 @@ W: http://www.kernel.org/doc/man-pages
L: linux-man@vger.kernel.org
S: Maintained
-MARVELL GIGABIT ETHERNET DRIVERS (skge/sky2)
-M: Mirko Lindner
-M: Stephen Hemminger
-L: netdev@vger.kernel.org
-S: Maintained
-F: drivers/net/ethernet/marvell/sk*
-
MARVELL LIBERTAS WIRELESS DRIVER
M: Dan Williams
L: libertas-dev@lists.infradead.org
@@ -4346,6 +4344,12 @@ M: Nicolas Pitre
S: Odd Fixes
F: drivers/mmc/host/mvsdio.*
+MARVELL YUKON / SYSKONNECT DRIVER
+M: Mirko Lindner
+M: Ralph Roesler
+W: http://www.syskonnect.com
+S: Supported
+
MATROX FRAMEBUFFER DRIVER
L: linux-fbdev@vger.kernel.org
S: Orphan
@@ -5638,7 +5642,7 @@ M: Ohad Ben-Cohen
S: Maintained
F: drivers/remoteproc/
F: Documentation/remoteproc.txt
-F: include/linux/remoteproc.h
+F: include/linux/remoteproc.txt
RFKILL
M: Johannes Berg
@@ -6117,6 +6121,12 @@ W: http://www.winischhofer.at/linuxsisusbvga.shtml
S: Maintained
F: drivers/usb/misc/sisusbvga/
+SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
+M: Stephen Hemminger
+L: netdev@vger.kernel.org
+S: Maintained
+F: drivers/net/ethernet/marvell/sk*
+
SLAB ALLOCATOR
M: Christoph Lameter
M: Pekka Enberg
@@ -6282,15 +6292,6 @@ F: drivers/tty/serial/sunsu.c
F: drivers/tty/serial/sunzilog.c
F: drivers/tty/serial/sunzilog.h
-SPARSE CHECKER
-M: "Christopher Li"
-L: linux-sparse@vger.kernel.org
-W: https://sparse.wiki.kernel.org/
-T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git
-T: git git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
-S: Maintained
-F: include/linux/compiler.h
-
SPEAR PLATFORM SUPPORT
M: Viresh Kumar
L: spear-devel@list.st.com
diff --git a/trunk/arch/alpha/include/asm/dma-mapping.h b/trunk/arch/alpha/include/asm/dma-mapping.h
index dfa32f061320..4567aca6fdd6 100644
--- a/trunk/arch/alpha/include/asm/dma-mapping.h
+++ b/trunk/arch/alpha/include/asm/dma-mapping.h
@@ -12,22 +12,16 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
#include
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t gfp)
{
- return get_dma_ops(dev)->alloc(dev, size, dma_handle, gfp, attrs);
+ return get_dma_ops(dev)->alloc_coherent(dev, size, dma_handle, gfp);
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma_handle)
{
- get_dma_ops(dev)->free(dev, size, vaddr, dma_handle, attrs);
+ get_dma_ops(dev)->free_coherent(dev, size, vaddr, dma_handle);
}
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
diff --git a/trunk/arch/alpha/kernel/pci-noop.c b/trunk/arch/alpha/kernel/pci-noop.c
index df24b76f9246..04eea4894ef3 100644
--- a/trunk/arch/alpha/kernel/pci-noop.c
+++ b/trunk/arch/alpha/kernel/pci-noop.c
@@ -108,8 +108,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
}
static void *alpha_noop_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret;
@@ -124,8 +123,7 @@ static void *alpha_noop_alloc_coherent(struct device *dev, size_t size,
}
static void alpha_noop_free_coherent(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_addr,
- struct dma_attrs *attrs)
+ void *cpu_addr, dma_addr_t dma_addr)
{
free_pages((unsigned long)cpu_addr, get_order(size));
}
@@ -176,8 +174,8 @@ static int alpha_noop_set_mask(struct device *dev, u64 mask)
}
struct dma_map_ops alpha_noop_ops = {
- .alloc = alpha_noop_alloc_coherent,
- .free = alpha_noop_free_coherent,
+ .alloc_coherent = alpha_noop_alloc_coherent,
+ .free_coherent = alpha_noop_free_coherent,
.map_page = alpha_noop_map_page,
.map_sg = alpha_noop_map_sg,
.mapping_error = alpha_noop_mapping_error,
diff --git a/trunk/arch/alpha/kernel/pci_iommu.c b/trunk/arch/alpha/kernel/pci_iommu.c
index cd634795aa9c..43610804987d 100644
--- a/trunk/arch/alpha/kernel/pci_iommu.c
+++ b/trunk/arch/alpha/kernel/pci_iommu.c
@@ -434,8 +434,7 @@ static void alpha_pci_unmap_page(struct device *dev, dma_addr_t dma_addr,
else DMA_ADDRP is undefined. */
static void *alpha_pci_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addrp, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addrp, gfp_t gfp)
{
struct pci_dev *pdev = alpha_gendev_to_pci(dev);
void *cpu_addr;
@@ -479,8 +478,7 @@ static void *alpha_pci_alloc_coherent(struct device *dev, size_t size,
DMA_ADDR past this call are illegal. */
static void alpha_pci_free_coherent(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_addr,
- struct dma_attrs *attrs)
+ void *cpu_addr, dma_addr_t dma_addr)
{
struct pci_dev *pdev = alpha_gendev_to_pci(dev);
pci_unmap_single(pdev, dma_addr, size, PCI_DMA_BIDIRECTIONAL);
@@ -954,8 +952,8 @@ static int alpha_pci_set_mask(struct device *dev, u64 mask)
}
struct dma_map_ops alpha_pci_ops = {
- .alloc = alpha_pci_alloc_coherent,
- .free = alpha_pci_free_coherent,
+ .alloc_coherent = alpha_pci_alloc_coherent,
+ .free_coherent = alpha_pci_free_coherent,
.map_page = alpha_pci_map_page,
.unmap_page = alpha_pci_unmap_page,
.map_sg = alpha_pci_map_sg,
diff --git a/trunk/arch/alpha/kernel/signal.c b/trunk/arch/alpha/kernel/signal.c
index 35f2ef44de12..6f7feb5db271 100644
--- a/trunk/arch/alpha/kernel/signal.c
+++ b/trunk/arch/alpha/kernel/signal.c
@@ -120,13 +120,12 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
*/
SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
{
- sigset_t blocked;
-
- current->saved_sigmask = current->blocked;
-
mask &= _BLOCKABLE;
- siginitset(&blocked, mask);
- set_current_blocked(&blocked);
+ spin_lock_irq(¤t->sighand->siglock);
+ current->saved_sigmask = current->blocked;
+ siginitset(¤t->blocked, mask);
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
current->state = TASK_INTERRUPTIBLE;
schedule();
@@ -239,7 +238,10 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
goto give_sigsegv;
sigdelsetmask(&set, ~_BLOCKABLE);
- set_current_blocked(&set);
+ spin_lock_irq(¤t->sighand->siglock);
+ current->blocked = set;
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
if (restore_sigcontext(sc, regs, sw))
goto give_sigsegv;
@@ -274,7 +276,10 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
goto give_sigsegv;
sigdelsetmask(&set, ~_BLOCKABLE);
- set_current_blocked(&set);
+ spin_lock_irq(¤t->sighand->siglock);
+ current->blocked = set;
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
goto give_sigsegv;
@@ -496,8 +501,14 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
else
ret = setup_frame(sig, ka, oldset, regs, sw);
- if (ret == 0)
- block_sigmask(ka, sig);
+ if (ret == 0) {
+ spin_lock_irq(¤t->sighand->siglock);
+ sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
+ if (!(ka->sa.sa_flags & SA_NODEFER))
+ sigaddset(¤t->blocked,sig);
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
+ }
return ret;
}
diff --git a/trunk/arch/alpha/kernel/smp.c b/trunk/arch/alpha/kernel/smp.c
index 50d438db1f6b..4087a569b43b 100644
--- a/trunk/arch/alpha/kernel/smp.c
+++ b/trunk/arch/alpha/kernel/smp.c
@@ -450,7 +450,7 @@ setup_smp(void)
smp_num_probed = 1;
}
- printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",
+ printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n",
smp_num_probed, cpumask_bits(cpu_present_mask)[0]);
}
diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig
index cf006d40342c..93180845ae16 100644
--- a/trunk/arch/arm/Kconfig
+++ b/trunk/arch/arm/Kconfig
@@ -338,7 +338,6 @@ config ARCH_AT91
select HAVE_CLK
select CLKDEV_LOOKUP
select IRQ_DOMAIN
- select NEED_MACH_IO_H if PCCARD
help
This enables support for systems based on the Atmel AT91RM9200,
AT91SAM9 processors.
diff --git a/trunk/arch/arm/boot/dts/at91sam9g20.dtsi b/trunk/arch/arm/boot/dts/at91sam9g20.dtsi
index 799ad1889b51..92f36627e7f8 100644
--- a/trunk/arch/arm/boot/dts/at91sam9g20.dtsi
+++ b/trunk/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -35,7 +35,7 @@
};
};
- memory {
+ memory@20000000 {
reg = <0x20000000 0x08000000>;
};
diff --git a/trunk/arch/arm/boot/dts/at91sam9g25ek.dts b/trunk/arch/arm/boot/dts/at91sam9g25ek.dts
index 7829a4d0cb22..ac0dc0031dda 100644
--- a/trunk/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/trunk/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -37,8 +37,8 @@
usb0: ohci@00600000 {
status = "okay";
num-ports = <2>;
- atmel,vbus-gpio = <&pioD 19 1
- &pioD 20 1
+ atmel,vbus-gpio = <&pioD 19 0
+ &pioD 20 0
>;
};
diff --git a/trunk/arch/arm/boot/dts/at91sam9g45.dtsi b/trunk/arch/arm/boot/dts/at91sam9g45.dtsi
index 9e6eb6ecea0e..3d0c32fb218f 100644
--- a/trunk/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/trunk/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -36,7 +36,7 @@
};
};
- memory {
+ memory@70000000 {
reg = <0x70000000 0x10000000>;
};
diff --git a/trunk/arch/arm/boot/dts/at91sam9m10g45ek.dts b/trunk/arch/arm/boot/dts/at91sam9m10g45ek.dts
index a3633bd13111..c4c8ae4123d5 100644
--- a/trunk/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/trunk/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -17,7 +17,7 @@
bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2";
};
- memory {
+ memory@70000000 {
reg = <0x70000000 0x4000000>;
};
@@ -73,8 +73,8 @@
usb0: ohci@00700000 {
status = "okay";
num-ports = <2>;
- atmel,vbus-gpio = <&pioD 1 1
- &pioD 3 1>;
+ atmel,vbus-gpio = <&pioD 1 0
+ &pioD 3 0>;
};
usb1: ehci@00800000 {
diff --git a/trunk/arch/arm/boot/dts/at91sam9x5.dtsi b/trunk/arch/arm/boot/dts/at91sam9x5.dtsi
index 70ab3a4e026f..c111001f254e 100644
--- a/trunk/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/trunk/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -34,7 +34,7 @@
};
};
- memory {
+ memory@20000000 {
reg = <0x20000000 0x10000000>;
};
@@ -201,8 +201,8 @@
>;
atmel,nand-addr-offset = <21>;
atmel,nand-cmd-offset = <22>;
- gpios = <&pioD 5 0
- &pioD 4 0
+ gpios = <&pioC 8 0
+ &pioC 14 0
0
>;
status = "disabled";
diff --git a/trunk/arch/arm/boot/dts/at91sam9x5cm.dtsi b/trunk/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 31e7be23703d..67936f83c694 100644
--- a/trunk/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/trunk/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -8,7 +8,7 @@
*/
/ {
- memory {
+ memory@20000000 {
reg = <0x20000000 0x8000000>;
};
diff --git a/trunk/arch/arm/boot/dts/usb_a9g20.dts b/trunk/arch/arm/boot/dts/usb_a9g20.dts
index 7c2399c532e5..3b3c4e0fa79f 100644
--- a/trunk/arch/arm/boot/dts/usb_a9g20.dts
+++ b/trunk/arch/arm/boot/dts/usb_a9g20.dts
@@ -16,7 +16,7 @@
bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
};
- memory {
+ memory@20000000 {
reg = <0x20000000 0x4000000>;
};
diff --git a/trunk/arch/arm/include/asm/barrier.h b/trunk/arch/arm/include/asm/barrier.h
index 05112380dc53..44f4a09ff37b 100644
--- a/trunk/arch/arm/include/asm/barrier.h
+++ b/trunk/arch/arm/include/asm/barrier.h
@@ -2,7 +2,6 @@
#define __ASM_BARRIER_H
#ifndef __ASSEMBLY__
-#include
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
@@ -40,6 +39,7 @@
#ifdef CONFIG_ARCH_HAS_BARRIERS
#include
#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
+#include
#define mb() do { dsb(); outer_sync(); } while (0)
#define rmb() dsb()
#define wmb() mb()
diff --git a/trunk/arch/arm/include/asm/io.h b/trunk/arch/arm/include/asm/io.h
index 9af5563dd3eb..df0ac0bb39aa 100644
--- a/trunk/arch/arm/include/asm/io.h
+++ b/trunk/arch/arm/include/asm/io.h
@@ -119,7 +119,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#ifdef CONFIG_NEED_MACH_IO_H
#include
#else
-#define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT)
+#define __io(a) ({ (void)(a); __typesafe_io(0); })
#endif
/*
diff --git a/trunk/arch/arm/kernel/bios32.c b/trunk/arch/arm/kernel/bios32.c
index ede5f7741c42..632df9a66f8c 100644
--- a/trunk/arch/arm/kernel/bios32.c
+++ b/trunk/arch/arm/kernel/bios32.c
@@ -299,6 +299,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
*/
void pcibios_fixup_bus(struct pci_bus *bus)
{
+ struct pci_sys_data *root = bus->sysdata;
struct pci_dev *dev;
u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK;
diff --git a/trunk/arch/arm/kernel/insn.c b/trunk/arch/arm/kernel/insn.c
index b760340b7014..ab312e516546 100644
--- a/trunk/arch/arm/kernel/insn.c
+++ b/trunk/arch/arm/kernel/insn.c
@@ -1,4 +1,3 @@
-#include
#include
#include
diff --git a/trunk/arch/arm/kernel/kprobes.c b/trunk/arch/arm/kernel/kprobes.c
index 4dd41fc9e235..ab1869dac97a 100644
--- a/trunk/arch/arm/kernel/kprobes.c
+++ b/trunk/arch/arm/kernel/kprobes.c
@@ -152,7 +152,7 @@ int __kprobes __arch_disarm_kprobe(void *p)
void __kprobes arch_disarm_kprobe(struct kprobe *p)
{
- stop_machine(__arch_disarm_kprobe, p, cpu_online_mask);
+ stop_machine(__arch_disarm_kprobe, p, &cpu_online_map);
}
void __kprobes arch_remove_kprobe(struct kprobe *p)
diff --git a/trunk/arch/arm/kernel/ptrace.c b/trunk/arch/arm/kernel/ptrace.c
index 80abafb9bf33..45956c9d0ef0 100644
--- a/trunk/arch/arm/kernel/ptrace.c
+++ b/trunk/arch/arm/kernel/ptrace.c
@@ -256,7 +256,7 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
{
unsigned long tmp;
- if (off & 3)
+ if (off & 3 || off >= sizeof(struct user))
return -EIO;
tmp = 0;
@@ -268,8 +268,6 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
tmp = tsk->mm->end_code;
else if (off < sizeof(struct pt_regs))
tmp = get_user_reg(tsk, off >> 2);
- else if (off >= sizeof(struct user))
- return -EIO;
return put_user(tmp, ret);
}
diff --git a/trunk/arch/arm/kernel/smp.c b/trunk/arch/arm/kernel/smp.c
index addbbe8028c2..2cee7d1eb958 100644
--- a/trunk/arch/arm/kernel/smp.c
+++ b/trunk/arch/arm/kernel/smp.c
@@ -349,7 +349,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
* re-initialize the map in platform_smp_prepare_cpus() if
* present != possible (e.g. physical hotplug).
*/
- init_cpu_present(cpu_possible_mask);
+ init_cpu_present(&cpu_possible_map);
/*
* Initialise the SCU if there are more than one CPU
@@ -581,9 +581,8 @@ void smp_send_stop(void)
unsigned long timeout;
if (num_online_cpus() > 1) {
- struct cpumask mask;
- cpumask_copy(&mask, cpu_online_mask);
- cpumask_clear_cpu(smp_processor_id(), &mask);
+ cpumask_t mask = cpu_online_map;
+ cpu_clear(smp_processor_id(), mask);
smp_cross_call(&mask, IPI_CPU_STOP);
}
diff --git a/trunk/arch/arm/mach-at91/at91sam9260_devices.c b/trunk/arch/arm/mach-at91/at91sam9260_devices.c
index 5652dde4bbe2..7e5651ee9f85 100644
--- a/trunk/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/trunk/arch/arm/mach-at91/at91sam9260_devices.c
@@ -598,9 +598,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi1_standard_cs[devices[i].chip_select];
- if (!gpio_is_valid(cs_pin))
- continue;
-
if (devices[i].bus_num == 0)
enable_spi0 = 1;
else
diff --git a/trunk/arch/arm/mach-at91/at91sam9261_devices.c b/trunk/arch/arm/mach-at91/at91sam9261_devices.c
index 4db961a93085..096da87dc00d 100644
--- a/trunk/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/trunk/arch/arm/mach-at91/at91sam9261_devices.c
@@ -415,9 +415,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi1_standard_cs[devices[i].chip_select];
- if (!gpio_is_valid(cs_pin))
- continue;
-
if (devices[i].bus_num == 0)
enable_spi0 = 1;
else
diff --git a/trunk/arch/arm/mach-at91/at91sam9263_devices.c b/trunk/arch/arm/mach-at91/at91sam9263_devices.c
index fe99206de880..53688c46f956 100644
--- a/trunk/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/trunk/arch/arm/mach-at91/at91sam9263_devices.c
@@ -72,8 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i],
- data->vbus_pin_active_low[i]);
+ at91_set_gpio_output(data->vbus_pin[i], 0);
}
/* Enable overcurrent notification */
@@ -672,9 +671,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi1_standard_cs[devices[i].chip_select];
- if (!gpio_is_valid(cs_pin))
- continue;
-
if (devices[i].bus_num == 0)
enable_spi0 = 1;
else
diff --git a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c
index 6b008aee1dff..698479f1e197 100644
--- a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -127,13 +127,12 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i],
- data->vbus_pin_active_low[i]);
+ at91_set_gpio_output(data->vbus_pin[i], 0);
}
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
- if (gpio_is_valid(data->overcurrent_pin[i]))
+ if (data->overcurrent_pin[i])
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}
@@ -189,8 +188,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for (i = 0; i < data->ports; i++) {
if (gpio_is_valid(data->vbus_pin[i]))
- at91_set_gpio_output(data->vbus_pin[i],
- data->vbus_pin_active_low[i]);
+ at91_set_gpio_output(data->vbus_pin[i], 0);
}
usbh_ehci_data = *data;
@@ -787,9 +785,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi1_standard_cs[devices[i].chip_select];
- if (!gpio_is_valid(cs_pin))
- continue;
-
if (devices[i].bus_num == 0)
enable_spi0 = 1;
else
diff --git a/trunk/arch/arm/mach-at91/at91sam9rl_devices.c b/trunk/arch/arm/mach-at91/at91sam9rl_devices.c
index fe4ae22e8561..eda72e83037d 100644
--- a/trunk/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/trunk/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -419,9 +419,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
else
cs_pin = spi_standard_cs[devices[i].chip_select];
- if (!gpio_is_valid(cs_pin))
- continue;
-
/* enable chip-select pin */
at91_set_gpio_output(cs_pin, 1);
diff --git a/trunk/arch/arm/mach-at91/at91sam9x5.c b/trunk/arch/arm/mach-at91/at91sam9x5.c
index 13c8cae60462..b6831eeb7b76 100644
--- a/trunk/arch/arm/mach-at91/at91sam9x5.c
+++ b/trunk/arch/arm/mach-at91/at91sam9x5.c
@@ -223,8 +223,6 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk),
CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
- CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
- CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
CLKDEV_CON_ID("pioA", &pioAB_clk),
CLKDEV_CON_ID("pioB", &pioAB_clk),
CLKDEV_CON_ID("pioC", &pioCD_clk),
diff --git a/trunk/arch/arm/mach-at91/board-sam9263ek.c b/trunk/arch/arm/mach-at91/board-sam9263ek.c
index 2ffe50f3a9e9..66f0ddf4b2ae 100644
--- a/trunk/arch/arm/mach-at91/board-sam9263ek.c
+++ b/trunk/arch/arm/mach-at91/board-sam9263ek.c
@@ -74,7 +74,6 @@ static void __init ek_init_early(void)
static struct at91_usbh_data __initdata ek_usbh_data = {
.ports = 2,
.vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 },
- .vbus_pin_active_low = {1, 1},
.overcurrent_pin= {-EINVAL, -EINVAL},
};
diff --git a/trunk/arch/arm/mach-at91/board-sam9m10g45ek.c b/trunk/arch/arm/mach-at91/board-sam9m10g45ek.c
index c88e908ddd82..e1bea73e6b30 100644
--- a/trunk/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/trunk/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -71,7 +71,6 @@ static void __init ek_init_early(void)
static struct at91_usbh_data __initdata ek_usbh_hs_data = {
.ports = 2,
.vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3},
- .vbus_pin_active_low = {1, 1},
.overcurrent_pin= {-EINVAL, -EINVAL},
};
diff --git a/trunk/arch/arm/mach-at91/include/mach/board.h b/trunk/arch/arm/mach-at91/include/mach/board.h
index 49a821192c65..544a5d5ce416 100644
--- a/trunk/arch/arm/mach-at91/include/mach/board.h
+++ b/trunk/arch/arm/mach-at91/include/mach/board.h
@@ -86,15 +86,14 @@ extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *d
extern void __init at91_add_device_eth(struct macb_platform_data *data);
/* USB Host */
-#define AT91_MAX_USBH_PORTS 3
struct at91_usbh_data {
- int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
- int overcurrent_pin[AT91_MAX_USBH_PORTS];
- u8 ports; /* number of ports on root hub */
+ u8 ports; /* number of ports on root hub */
+ int vbus_pin[2]; /* port power-control pin */
+ u8 vbus_pin_active_low[2];
u8 overcurrent_supported;
- u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
- u8 overcurrent_status[AT91_MAX_USBH_PORTS];
- u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
+ int overcurrent_pin[2];
+ u8 overcurrent_status[2];
+ u8 overcurrent_changed[2];
};
extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
diff --git a/trunk/arch/arm/mach-at91/include/mach/io.h b/trunk/arch/arm/mach-at91/include/mach/io.h
deleted file mode 100644
index 2d9ca0455745..000000000000
--- a/trunk/arch/arm/mach-at91/include/mach/io.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/io.h
- *
- * Copyright (C) 2003 SAN People
- *
- * 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
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xFFFFFFFF
-#define __io(a) __typesafe_io(a)
-
-#endif
diff --git a/trunk/arch/arm/mach-exynos/common.c b/trunk/arch/arm/mach-exynos/common.c
index 8614aab47cc0..e6cc50e94a58 100644
--- a/trunk/arch/arm/mach-exynos/common.c
+++ b/trunk/arch/arm/mach-exynos/common.c
@@ -583,11 +583,10 @@ core_initcall(exynos_core_init);
#ifdef CONFIG_CACHE_L2X0
static int __init exynos4_l2x0_cache_init(void)
{
- int ret;
-
if (soc_is_exynos5250())
return 0;
+ int ret;
ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
if (!ret) {
l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
diff --git a/trunk/arch/arm/mach-exynos/dma.c b/trunk/arch/arm/mach-exynos/dma.c
index 69aaa4503205..3983abee4264 100644
--- a/trunk/arch/arm/mach-exynos/dma.c
+++ b/trunk/arch/arm/mach-exynos/dma.c
@@ -35,6 +35,8 @@
#include
#include
+static u64 dma_dmamask = DMA_BIT_MASK(32);
+
static u8 exynos4210_pdma0_peri[] = {
DMACH_PCM0_RX,
DMACH_PCM0_TX,
diff --git a/trunk/arch/arm/mach-exynos/include/mach/debug-macro.S b/trunk/arch/arm/mach-exynos/include/mach/debug-macro.S
index e0c86ea475e7..6c857ff0b5d8 100644
--- a/trunk/arch/arm/mach-exynos/include/mach/debug-macro.S
+++ b/trunk/arch/arm/mach-exynos/include/mach/debug-macro.S
@@ -21,9 +21,10 @@
*/
.macro addruart, rp, rv, tmp
- mrc p15, 0, \tmp, c0, c0, 0
- and \tmp, \tmp, #0xf0
- teq \tmp, #0xf0 @@ A15
+ mov \rp, #0x10000000
+ ldr \rp, [\rp, #0x0]
+ and \rp, \rp, #0xf00000
+ teq \rp, #0x500000 @@ EXYNOS5
ldreq \rp, =EXYNOS5_PA_UART
movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4
ldr \rv, =S3C_VA_UART
diff --git a/trunk/arch/arm/mach-exynos/include/mach/uncompress.h b/trunk/arch/arm/mach-exynos/include/mach/uncompress.h
index 2979995d5a6a..493f4f365ddf 100644
--- a/trunk/arch/arm/mach-exynos/include/mach/uncompress.h
+++ b/trunk/arch/arm/mach-exynos/include/mach/uncompress.h
@@ -20,24 +20,9 @@ volatile u8 *uart_base;
#include
-static unsigned int __raw_readl(unsigned int ptr)
-{
- return *((volatile unsigned int *)ptr);
-}
-
static void arch_detect_cpu(void)
{
- u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID);
-
- /*
- * product_id is bits 31:12
- * bits 23:20 describe the exynosX family
- *
- */
- chip_id >>= 20;
- chip_id &= 0xf;
-
- if (chip_id == 0x5)
+ if (machine_is_smdk5250())
uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
else
uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
diff --git a/trunk/arch/arm/mach-imx/clock-imx27.c b/trunk/arch/arm/mach-imx/clock-imx27.c
index 98e04f5a87dd..b9a95ed75553 100644
--- a/trunk/arch/arm/mach-imx/clock-imx27.c
+++ b/trunk/arch/arm/mach-imx/clock-imx27.c
@@ -662,7 +662,6 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "dma", dma_clk)
_REGISTER_CLOCK(NULL, "rtic", rtic_clk)
_REGISTER_CLOCK(NULL, "brom", brom_clk)
- _REGISTER_CLOCK(NULL, "emma", emma_clk)
_REGISTER_CLOCK("m2m-emmaprp.0", NULL, emma_clk)
_REGISTER_CLOCK(NULL, "slcdc", slcdc_clk)
_REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
diff --git a/trunk/arch/arm/mach-imx/clock-imx35.c b/trunk/arch/arm/mach-imx/clock-imx35.c
index e56c1a83eee3..1e279af656ad 100644
--- a/trunk/arch/arm/mach-imx/clock-imx35.c
+++ b/trunk/arch/arm/mach-imx/clock-imx35.c
@@ -483,7 +483,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "max", max_clk)
_REGISTER_CLOCK(NULL, "audmux", audmux_clk)
- _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
+ _REGISTER_CLOCK(NULL, "csi", csi_clk)
_REGISTER_CLOCK(NULL, "iim", iim_clk)
_REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk)
_REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
diff --git a/trunk/arch/arm/mach-imx/mach-armadillo5x0.c b/trunk/arch/arm/mach-imx/mach-armadillo5x0.c
index c650145d1646..27bc27e6ea41 100644
--- a/trunk/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/trunk/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -38,8 +38,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -481,11 +479,6 @@ static struct platform_device *devices[] __initdata = {
&armadillo5x0_smc911x_device,
};
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vdd33a", "smsc911x"),
- REGULATOR_SUPPLY("vddvario", "smsc911x"),
-};
-
/*
* Perform board specific initializations
*/
@@ -496,8 +489,6 @@ static void __init armadillo5x0_init(void)
mxc_iomux_setup_multiple_pins(armadillo5x0_pins,
ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-
platform_add_devices(devices, ARRAY_SIZE(devices));
imx_add_gpio_keys(&armadillo5x0_button_data);
imx31_add_imx_i2c1(NULL);
diff --git a/trunk/arch/arm/mach-imx/mach-kzm_arm11_01.c b/trunk/arch/arm/mach-imx/mach-kzm_arm11_01.c
index 15a26e908260..fc78e8071cd1 100644
--- a/trunk/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/trunk/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -24,8 +24,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -168,11 +166,6 @@ static struct platform_device kzm_smsc9118_device = {
},
};
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vdd33a", "smsc911x"),
- REGULATOR_SUPPLY("vddvario", "smsc911x"),
-};
-
static int __init kzm_init_smsc9118(void)
{
/*
@@ -182,8 +175,6 @@ static int __init kzm_init_smsc9118(void)
gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int");
gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2));
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-
return platform_device_register(&kzm_smsc9118_device);
}
#else
diff --git a/trunk/arch/arm/mach-imx/mach-mx31lilly.c b/trunk/arch/arm/mach-imx/mach-mx31lilly.c
index 83714b0cc290..02401bbd6d53 100644
--- a/trunk/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/trunk/arch/arm/mach-imx/mach-mx31lilly.c
@@ -34,8 +34,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -244,11 +242,6 @@ static struct platform_device *devices[] __initdata = {
static int mx31lilly_baseboard;
core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vdd33a", "smsc911x"),
- REGULATOR_SUPPLY("vddvario", "smsc911x"),
-};
-
static void __init mx31lilly_board_init(void)
{
imx31_soc_init();
@@ -287,8 +280,6 @@ static void __init mx31lilly_board_init(void)
imx31_add_spi_imx1(&spi1_pdata);
spi_register_board_info(&mc13783_dev, 1);
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-
platform_add_devices(devices, ARRAY_SIZE(devices));
/* USB */
diff --git a/trunk/arch/arm/mach-imx/mach-mx31lite.c b/trunk/arch/arm/mach-imx/mach-mx31lite.c
index 0abef5f13df5..ef80751712e7 100644
--- a/trunk/arch/arm/mach-imx/mach-mx31lite.c
+++ b/trunk/arch/arm/mach-imx/mach-mx31lite.c
@@ -29,8 +29,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -228,11 +226,6 @@ void __init mx31lite_map_io(void)
static int mx31lite_baseboard;
core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vdd33a", "smsc911x"),
- REGULATOR_SUPPLY("vddvario", "smsc911x"),
-};
-
static void __init mx31lite_init(void)
{
int ret;
@@ -266,8 +259,6 @@ static void __init mx31lite_init(void)
if (usbh2_pdata.otg)
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
-
/* SMSC9117 IRQ pin */
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
if (ret)
diff --git a/trunk/arch/arm/mach-imx/mach-mx35_3ds.c b/trunk/arch/arm/mach-imx/mach-mx35_3ds.c
index 6ae51c6b95b7..e14291d89e4f 100644
--- a/trunk/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/trunk/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -97,7 +97,7 @@ static struct i2c_board_info __initdata i2c_devices_3ds[] = {
static int lcd_power_gpio = -ENXIO;
static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip,
- const void *data)
+ void *data)
{
return !strcmp(chip->label, data);
}
diff --git a/trunk/arch/arm/mach-imx/mach-mx53_ard.c b/trunk/arch/arm/mach-imx/mach-mx53_ard.c
index 05641980dc5e..753f4fc9ec04 100644
--- a/trunk/arch/arm/mach-imx/mach-mx53_ard.c
+++ b/trunk/arch/arm/mach-imx/mach-mx53_ard.c
@@ -23,8 +23,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -216,11 +214,6 @@ static int weim_cs_config(void)
return 0;
}
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vdd33a", "smsc911x"),
- REGULATOR_SUPPLY("vddvario", "smsc911x"),
-};
-
void __init imx53_ard_common_init(void)
{
mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
@@ -239,7 +232,6 @@ static void __init mx53_ard_board_init(void)
imx53_ard_common_init();
mx53_ard_io_init();
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
platform_add_devices(devices, ARRAY_SIZE(devices));
imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
diff --git a/trunk/arch/arm/mach-msm/include/mach/uncompress.h b/trunk/arch/arm/mach-msm/include/mach/uncompress.h
index c14011fe832d..169a84007456 100644
--- a/trunk/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/trunk/arch/arm/mach-msm/include/mach/uncompress.h
@@ -16,7 +16,6 @@
#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
#define __ASM_ARCH_MSM_UNCOMPRESS_H
-#include
#include
#include
diff --git a/trunk/arch/arm/mach-msm/smd_debug.c b/trunk/arch/arm/mach-msm/smd_debug.c
index c56df9e932ae..0c56a5aaf588 100644
--- a/trunk/arch/arm/mach-msm/smd_debug.c
+++ b/trunk/arch/arm/mach-msm/smd_debug.c
@@ -203,9 +203,15 @@ static ssize_t debug_read(struct file *file, char __user *buf,
return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize);
}
+static int debug_open(struct inode *inode, struct file *file)
+{
+ file->private_data = inode->i_private;
+ return 0;
+}
+
static const struct file_operations debug_ops = {
.read = debug_read,
- .open = simple_open,
+ .open = debug_open,
.llseek = default_llseek,
};
diff --git a/trunk/arch/arm/mach-omap1/include/mach/io.h b/trunk/arch/arm/mach-omap1/include/mach/io.h
deleted file mode 100644
index ce4f8005b26f..000000000000
--- a/trunk/arch/arm/mach-omap1/include/mach/io.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/mach/io.h
- *
- * IO definitions for TI OMAP processors and boards
- *
- * Copied from arch/arm/mach-sa1100/include/mach/io.h
- * Copyright (C) 1997-1999 Russell King
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-
-#endif
diff --git a/trunk/arch/arm/mach-omap2/board-cm-t35.c b/trunk/arch/arm/mach-omap2/board-cm-t35.c
index 909a8b91b564..41b0a2fe0b04 100644
--- a/trunk/arch/arm/mach-omap2/board-cm-t35.c
+++ b/trunk/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,7 +26,6 @@
#include
#include
-#include
#include
#include
@@ -82,23 +81,8 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
.flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
};
-static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
-static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
-};
-
static void __init cm_t35_init_ethernet(void)
{
- regulator_register_fixed(0, cm_t35_smsc911x_supplies,
- ARRAY_SIZE(cm_t35_smsc911x_supplies));
- regulator_register_fixed(1, sb_t35_smsc911x_supplies,
- ARRAY_SIZE(sb_t35_smsc911x_supplies));
-
gpmc_smsc911x_init(&cm_t35_smsc911x_cfg);
gpmc_smsc911x_init(&sb_t35_smsc911x_cfg);
}
diff --git a/trunk/arch/arm/mach-omap2/board-igep0020.c b/trunk/arch/arm/mach-omap2/board-igep0020.c
index 930c0d380435..e558800adfdf 100644
--- a/trunk/arch/arm/mach-omap2/board-igep0020.c
+++ b/trunk/arch/arm/mach-omap2/board-igep0020.c
@@ -634,14 +634,8 @@ static void __init igep_wlan_bt_init(void)
static inline void __init igep_wlan_bt_init(void) { }
#endif
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
static void __init igep_init(void)
{
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
/* Get IGEP2 hardware revision */
diff --git a/trunk/arch/arm/mach-omap2/board-ldp.c b/trunk/arch/arm/mach-omap2/board-ldp.c
index 1b6049567ab4..d50a562adfa0 100644
--- a/trunk/arch/arm/mach-omap2/board-ldp.c
+++ b/trunk/arch/arm/mach-omap2/board-ldp.c
@@ -22,7 +22,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -411,14 +410,8 @@ static struct mtd_partition ldp_nand_partitions[] = {
};
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
static void __init omap_ldp_init(void)
{
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
ldp_init_smsc911x();
omap_i2c_init();
diff --git a/trunk/arch/arm/mach-omap2/board-omap3evm.c b/trunk/arch/arm/mach-omap2/board-omap3evm.c
index 49df12735b41..4c90f078abe1 100644
--- a/trunk/arch/arm/mach-omap2/board-omap3evm.c
+++ b/trunk/arch/arm/mach-omap2/board-omap3evm.c
@@ -114,6 +114,15 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
static inline void __init omap3evm_init_smsc911x(void)
{
+ struct clk *l3ck;
+ unsigned int rate;
+
+ l3ck = clk_get(NULL, "l3_ck");
+ if (IS_ERR(l3ck))
+ rate = 100000000;
+ else
+ rate = clk_get_rate(l3ck);
+
/* Configure ethernet controller reset gpio */
if (cpu_is_omap3430()) {
if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
@@ -623,15 +632,9 @@ static void __init omap3_evm_wl12xx_init(void)
#endif
}
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
static void __init omap3_evm_init(void)
{
omap3_evm_get_revision();
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
if (cpu_is_omap3630())
omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
diff --git a/trunk/arch/arm/mach-omap2/board-omap3logic.c b/trunk/arch/arm/mach-omap2/board-omap3logic.c
index 9b3c141ff51b..4a7d8c8a75da 100644
--- a/trunk/arch/arm/mach-omap2/board-omap3logic.c
+++ b/trunk/arch/arm/mach-omap2/board-omap3logic.c
@@ -23,7 +23,6 @@
#include
#include
-#include
#include
#include
@@ -189,14 +188,8 @@ static struct omap_board_mux board_mux[] __initdata = {
};
#endif
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
static void __init omap3logic_init(void)
{
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3torpedo_fix_pbias_voltage();
omap3logic_i2c_init();
diff --git a/trunk/arch/arm/mach-omap2/board-omap3stalker.c b/trunk/arch/arm/mach-omap2/board-omap3stalker.c
index 4dffc95bddd2..641004380795 100644
--- a/trunk/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/trunk/arch/arm/mach-omap2/board-omap3stalker.c
@@ -24,7 +24,6 @@
#include
#include
-#include
#include
#include
#include
@@ -73,6 +72,15 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
static inline void __init omap3stalker_init_eth(void)
{
+ struct clk *l3ck;
+ unsigned int rate;
+
+ l3ck = clk_get(NULL, "l3_ck");
+ if (IS_ERR(l3ck))
+ rate = 100000000;
+ else
+ rate = clk_get_rate(l3ck);
+
omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
gpmc_smsc911x_init(&smsc911x_cfg);
}
@@ -411,14 +419,8 @@ static struct omap_board_mux board_mux[] __initdata = {
};
#endif
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
static void __init omap3_stalker_init(void)
{
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
omap_board_config = omap3_stalker_config;
omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
diff --git a/trunk/arch/arm/mach-omap2/board-overo.c b/trunk/arch/arm/mach-omap2/board-overo.c
index 33aa3910b09e..668533e2a379 100644
--- a/trunk/arch/arm/mach-omap2/board-overo.c
+++ b/trunk/arch/arm/mach-omap2/board-overo.c
@@ -498,18 +498,10 @@ static struct gpio overo_bt_gpios[] __initdata = {
{ OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" },
};
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
- REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
-};
-
static void __init overo_init(void)
{
int ret;
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_hsmmc_init(mmc);
overo_i2c_init();
diff --git a/trunk/arch/arm/mach-omap2/board-zoom-debugboard.c b/trunk/arch/arm/mach-omap2/board-zoom-debugboard.c
index f64f44173061..1e8540eabde9 100644
--- a/trunk/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/trunk/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -14,9 +14,6 @@
#include
#include
-#include
-#include
-
#include
#include
@@ -120,17 +117,11 @@ static struct platform_device *zoom_devices[] __initdata = {
&zoom_debugboard_serial_device,
};
-static struct regulator_consumer_supply dummy_supplies[] = {
- REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
- REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
-};
-
int __init zoom_debugboard_init(void)
{
if (!omap_zoom_debugboard_detect())
return 0;
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
zoom_init_smsc911x();
zoom_init_quaduart();
return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
diff --git a/trunk/arch/arm/mach-omap2/clock3xxx_data.c b/trunk/arch/arm/mach-omap2/clock3xxx_data.c
index f4a626f7c79e..480fb8f09aed 100644
--- a/trunk/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/trunk/arch/arm/mach-omap2/clock3xxx_data.c
@@ -747,7 +747,7 @@ static struct clk dpll4_m3_ck = {
.parent = &dpll4_ck,
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
- .clksel_mask = OMAP3630_CLKSEL_TV_MASK,
+ .clksel_mask = OMAP3430_CLKSEL_TV_MASK,
.clksel = dpll4_clksel,
.clkdm_name = "dpll4_clkdm",
.recalc = &omap2_clksel_recalc,
@@ -832,7 +832,7 @@ static struct clk dpll4_m4_ck = {
.parent = &dpll4_ck,
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
- .clksel_mask = OMAP3630_CLKSEL_DSS1_MASK,
+ .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK,
.clksel = dpll4_clksel,
.clkdm_name = "dpll4_clkdm",
.recalc = &omap2_clksel_recalc,
@@ -859,7 +859,7 @@ static struct clk dpll4_m5_ck = {
.parent = &dpll4_ck,
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
- .clksel_mask = OMAP3630_CLKSEL_CAM_MASK,
+ .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
.clksel = dpll4_clksel,
.clkdm_name = "dpll4_clkdm",
.set_rate = &omap2_clksel_set_rate,
@@ -886,7 +886,7 @@ static struct clk dpll4_m6_ck = {
.parent = &dpll4_ck,
.init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
- .clksel_mask = OMAP3630_DIV_DPLL4_MASK,
+ .clksel_mask = OMAP3430_DIV_DPLL4_MASK,
.clksel = dpll4_clksel,
.clkdm_name = "dpll4_clkdm",
.recalc = &omap2_clksel_recalc,
@@ -1394,7 +1394,6 @@ static struct clk cpefuse_fck = {
.name = "cpefuse_fck",
.ops = &clkops_omap2_dflt,
.parent = &sys_ck,
- .clkdm_name = "core_l4_clkdm",
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
.enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
.recalc = &followparent_recalc,
@@ -1404,7 +1403,6 @@ static struct clk ts_fck = {
.name = "ts_fck",
.ops = &clkops_omap2_dflt,
.parent = &omap_32k_fck,
- .clkdm_name = "core_l4_clkdm",
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
.enable_bit = OMAP3430ES2_EN_TS_SHIFT,
.recalc = &followparent_recalc,
@@ -1414,7 +1412,6 @@ static struct clk usbtll_fck = {
.name = "usbtll_fck",
.ops = &clkops_omap2_dflt_wait,
.parent = &dpll5_m2_ck,
- .clkdm_name = "core_l4_clkdm",
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
.enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
.recalc = &followparent_recalc,
@@ -1620,7 +1617,6 @@ static struct clk fshostusb_fck = {
.name = "fshostusb_fck",
.ops = &clkops_omap2_dflt_wait,
.parent = &core_48m_fck,
- .clkdm_name = "core_l4_clkdm",
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
.recalc = &followparent_recalc,
@@ -2047,7 +2043,6 @@ static struct clk omapctrl_ick = {
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
.flags = ENABLE_ON_INIT,
- .clkdm_name = "core_l4_clkdm",
.recalc = &followparent_recalc,
};
@@ -2099,7 +2094,6 @@ static struct clk usb_l4_ick = {
.clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
.clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
.clksel = usb_l4_clksel,
- .clkdm_name = "core_l4_clkdm",
.recalc = &omap2_clksel_recalc,
};
@@ -3473,8 +3467,8 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX),
CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX),
CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX),
- CLK("davinci_emac", NULL, &emac_ick, CK_AM35XX),
- CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX),
+ CLK("davinci_emac", "emac_clk", &emac_ick, CK_AM35XX),
+ CLK("davinci_emac", "phy_clk", &emac_fck, CK_AM35XX),
CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX),
CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX),
CLK("musb-am35x", "ick", &hsotgusb_ick_am35xx, CK_AM35XX),
diff --git a/trunk/arch/arm/mach-omap2/clock44xx_data.c b/trunk/arch/arm/mach-omap2/clock44xx_data.c
index fa6ea65ad44b..c03c1108468e 100644
--- a/trunk/arch/arm/mach-omap2/clock44xx_data.c
+++ b/trunk/arch/arm/mach-omap2/clock44xx_data.c
@@ -957,8 +957,8 @@ static struct dpll_data dpll_usb_dd = {
.modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
.autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
.idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
- .mult_mask = OMAP4430_DPLL_MULT_USB_MASK,
- .div1_mask = OMAP4430_DPLL_DIV_0_7_MASK,
+ .mult_mask = OMAP4430_DPLL_MULT_MASK,
+ .div1_mask = OMAP4430_DPLL_DIV_MASK,
.enable_mask = OMAP4430_DPLL_EN_MASK,
.autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
.idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
@@ -978,7 +978,6 @@ static struct clk dpll_usb_ck = {
.recalc = &omap3_dpll_recalc,
.round_rate = &omap2_dpll_round_rate,
.set_rate = &omap3_noncore_dpll_set_rate,
- .clkdm_name = "l3_init_clkdm",
};
static struct clk dpll_usb_clkdcoldo_ck = {
diff --git a/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c b/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c
index bd7ed13515cc..9299ac291d28 100644
--- a/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/trunk/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -390,7 +390,7 @@ static struct clockdomain emu_sys_44xx_clkdm = {
.prcm_partition = OMAP4430_PRM_PARTITION,
.cm_inst = OMAP4430_PRM_EMU_CM_INST,
.clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS,
- .flags = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP,
+ .flags = CLKDM_CAN_HWSUP,
};
static struct clockdomain l3_dma_44xx_clkdm = {
diff --git a/trunk/arch/arm/mach-omap2/gpmc-smsc911x.c b/trunk/arch/arm/mach-omap2/gpmc-smsc911x.c
index b6c77be3e8f7..5e5880d6d099 100644
--- a/trunk/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/trunk/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -19,11 +19,15 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
+static struct omap_smsc911x_platform_data *gpmc_cfg;
+
static struct resource gpmc_smsc911x_resources[] = {
[0] = {
.flags = IORESOURCE_MEM,
@@ -37,6 +41,51 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
.phy_interface = PHY_INTERFACE_MODE_MII,
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+ .flags = SMSC911X_USE_16BIT,
+};
+
+static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
+ REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
+ REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
+/* Generic regulator definition to satisfy smsc911x */
+static struct regulator_init_data gpmc_smsc911x_reg_init_data = {
+ .constraints = {
+ .min_uV = 3300000,
+ .max_uV = 3300000,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply),
+ .consumer_supplies = gpmc_smsc911x_supply,
+};
+
+static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {
+ .supply_name = "gpmc_smsc911x",
+ .microvolts = 3300000,
+ .gpio = -EINVAL,
+ .startup_delay = 0,
+ .enable_high = 0,
+ .enabled_at_boot = 1,
+ .init_data = &gpmc_smsc911x_reg_init_data,
+};
+
+/*
+ * Platform device id of 42 is a temporary fix to avoid conflicts
+ * with other reg-fixed-voltage devices. The real fix should
+ * involve the driver core providing a way of dynamically
+ * assigning a unique id on registration for platform devices
+ * in the same name space.
+ */
+static struct platform_device gpmc_smsc911x_regulator = {
+ .name = "reg-fixed-voltage",
+ .id = 42,
+ .dev = {
+ .platform_data = &gpmc_smsc911x_fixed_reg_data,
+ },
};
/*
@@ -44,12 +93,23 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
* assume that pin multiplexing is done in the board-*.c file,
* or in the bootloader.
*/
-void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
+void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
{
struct platform_device *pdev;
unsigned long cs_mem_base;
int ret;
+ gpmc_cfg = board_data;
+
+ if (!gpmc_cfg->id) {
+ ret = platform_device_register(&gpmc_smsc911x_regulator);
+ if (ret < 0) {
+ pr_err("Unable to register smsc911x regulators: %d\n",
+ ret);
+ return;
+ }
+ }
+
if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
pr_err("Failed to request GPMC mem region\n");
return;
@@ -79,7 +139,8 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
gpio_set_value(gpmc_cfg->gpio_reset, 1);
}
- gpmc_smsc911x_config.flags = gpmc_cfg->flags ? : SMSC911X_USE_16BIT;
+ if (gpmc_cfg->flags)
+ gpmc_smsc911x_config.flags = gpmc_cfg->flags;
pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
diff --git a/trunk/arch/arm/mach-omap2/hsmmc.c b/trunk/arch/arm/mach-omap2/hsmmc.c
index b0268eaffe13..100db6217f39 100644
--- a/trunk/arch/arm/mach-omap2/hsmmc.c
+++ b/trunk/arch/arm/mach-omap2/hsmmc.c
@@ -506,13 +506,6 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
if (oh->dev_attr != NULL) {
mmc_dev_attr = oh->dev_attr;
mmc_data->controller_flags = mmc_dev_attr->flags;
- /*
- * erratum 2.1.1.128 doesn't apply if board has
- * a transceiver is attached
- */
- if (hsmmcinfo->transceiver)
- mmc_data->controller_flags &=
- ~OMAP_HSMMC_BROKEN_MULTIBLOCK_READ;
}
pdev = platform_device_alloc(name, ctrl_nr - 1);
diff --git a/trunk/arch/arm/mach-omap2/include/mach/barriers.h b/trunk/arch/arm/mach-omap2/include/mach/barriers.h
index 1c582a8592b9..4fa72c7cc7cd 100644
--- a/trunk/arch/arm/mach-omap2/include/mach/barriers.h
+++ b/trunk/arch/arm/mach-omap2/include/mach/barriers.h
@@ -22,8 +22,6 @@
#ifndef __MACH_BARRIERS_H
#define __MACH_BARRIERS_H
-#include
-
extern void omap_bus_sync(void);
#define rmb() dsb()
diff --git a/trunk/arch/arm/mach-omap2/omap_hwmod.c b/trunk/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb61e66..eba6cd3816f5 100644
--- a/trunk/arch/arm/mach-omap2/omap_hwmod.c
+++ b/trunk/arch/arm/mach-omap2/omap_hwmod.c
@@ -1395,7 +1395,7 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
*/
static int _ocp_softreset(struct omap_hwmod *oh)
{
- u32 v, softrst_mask;
+ u32 v;
int c = 0;
int ret = 0;
@@ -1427,13 +1427,11 @@ static int _ocp_softreset(struct omap_hwmod *oh)
oh->class->sysc->syss_offs)
& SYSS_RESETDONE_MASK),
MAX_MODULE_SOFTRESET_WAIT, c);
- else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) {
- softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift);
+ else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS)
omap_test_timeout(!(omap_hwmod_read(oh,
oh->class->sysc->sysc_offs)
- & softrst_mask),
+ & SYSC_TYPE2_SOFTRESET_MASK),
MAX_MODULE_SOFTRESET_WAIT, c);
- }
if (c == MAX_MODULE_SOFTRESET_WAIT)
pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
@@ -1479,11 +1477,6 @@ static int _reset(struct omap_hwmod *oh)
ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh);
- if (oh->class->sysc) {
- _update_sysc_cache(oh);
- _enable_sysc(oh);
- }
-
return ret;
}
@@ -1793,9 +1786,20 @@ static int _setup(struct omap_hwmod *oh, void *data)
return 0;
}
- if (!(oh->flags & HWMOD_INIT_NO_RESET))
+ if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
_reset(oh);
+ /*
+ * OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
+ * The _enable() function should be split to
+ * avoid the rewrite of the OCP_SYSCONFIG register.
+ */
+ if (oh->class->sysc) {
+ _update_sysc_cache(oh);
+ _enable_sysc(oh);
+ }
+ }
+
postsetup_state = oh->_postsetup_state;
if (postsetup_state == _HWMOD_STATE_UNKNOWN)
postsetup_state = _HWMOD_STATE_ENABLED;
@@ -1903,10 +1907,20 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
*/
int omap_hwmod_softreset(struct omap_hwmod *oh)
{
- if (!oh)
+ u32 v;
+ int ret;
+
+ if (!oh || !(oh->_sysc_cache))
return -EINVAL;
- return _ocp_softreset(oh);
+ v = oh->_sysc_cache;
+ ret = _set_softreset(oh, &v);
+ if (ret)
+ goto error;
+ _write_sysconfig(v, oh);
+
+error:
+ return ret;
}
/**
@@ -2449,28 +2463,26 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
* @oh: struct omap_hwmod *
*
* Sets the module OCP socket ENAWAKEUP bit to allow the module to
- * send wakeups to the PRCM, and enable I/O ring wakeup events for
- * this IP block if it has dynamic mux entries. Eventually this
- * should set PRCM wakeup registers to cause the PRCM to receive
- * wakeup events from the module. Does not set any wakeup routing
- * registers beyond this point - if the module is to wake up any other
- * module or subsystem, that must be set separately. Called by
- * omap_device code. Returns -EINVAL on error or 0 upon success.
+ * send wakeups to the PRCM. Eventually this should sets PRCM wakeup
+ * registers to cause the PRCM to receive wakeup events from the
+ * module. Does not set any wakeup routing registers beyond this
+ * point - if the module is to wake up any other module or subsystem,
+ * that must be set separately. Called by omap_device code. Returns
+ * -EINVAL on error or 0 upon success.
*/
int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
{
unsigned long flags;
u32 v;
- spin_lock_irqsave(&oh->_lock, flags);
-
- if (oh->class->sysc &&
- (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
- v = oh->_sysc_cache;
- _enable_wakeup(oh, &v);
- _write_sysconfig(v, oh);
- }
+ if (!oh->class->sysc ||
+ !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
+ return -EINVAL;
+ spin_lock_irqsave(&oh->_lock, flags);
+ v = oh->_sysc_cache;
+ _enable_wakeup(oh, &v);
+ _write_sysconfig(v, oh);
_set_idle_ioring_wakeup(oh, true);
spin_unlock_irqrestore(&oh->_lock, flags);
@@ -2482,28 +2494,26 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
* @oh: struct omap_hwmod *
*
* Clears the module OCP socket ENAWAKEUP bit to prevent the module
- * from sending wakeups to the PRCM, and disable I/O ring wakeup
- * events for this IP block if it has dynamic mux entries. Eventually
- * this should clear PRCM wakeup registers to cause the PRCM to ignore
- * wakeup events from the module. Does not set any wakeup routing
- * registers beyond this point - if the module is to wake up any other
- * module or subsystem, that must be set separately. Called by
- * omap_device code. Returns -EINVAL on error or 0 upon success.
+ * from sending wakeups to the PRCM. Eventually this should clear
+ * PRCM wakeup registers to cause the PRCM to ignore wakeup events
+ * from the module. Does not set any wakeup routing registers beyond
+ * this point - if the module is to wake up any other module or
+ * subsystem, that must be set separately. Called by omap_device
+ * code. Returns -EINVAL on error or 0 upon success.
*/
int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
{
unsigned long flags;
u32 v;
- spin_lock_irqsave(&oh->_lock, flags);
-
- if (oh->class->sysc &&
- (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
- v = oh->_sysc_cache;
- _disable_wakeup(oh, &v);
- _write_sysconfig(v, oh);
- }
+ if (!oh->class->sysc ||
+ !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
+ return -EINVAL;
+ spin_lock_irqsave(&oh->_lock, flags);
+ v = oh->_sysc_cache;
+ _disable_wakeup(oh, &v);
+ _write_sysconfig(v, oh);
_set_idle_ioring_wakeup(oh, false);
spin_unlock_irqrestore(&oh->_lock, flags);
diff --git a/trunk/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/trunk/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index cc9bd106a854..08daa5e0eb5f 100644
--- a/trunk/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/trunk/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2996,11 +2996,6 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
&omap44xx_l4_abe__mcbsp1_dma,
};
-static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
- { .role = "pad_fck", .clk = "pad_clks_ck" },
- { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
-};
-
static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
.name = "mcbsp1",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3017,8 +3012,6 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
},
.slaves = omap44xx_mcbsp1_slaves,
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
- .opt_clks = mcbsp1_opt_clks,
- .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
};
/* mcbsp2 */
@@ -3078,11 +3071,6 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
&omap44xx_l4_abe__mcbsp2_dma,
};
-static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
- { .role = "pad_fck", .clk = "pad_clks_ck" },
- { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
-};
-
static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
.name = "mcbsp2",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3099,8 +3087,6 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
},
.slaves = omap44xx_mcbsp2_slaves,
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
- .opt_clks = mcbsp2_opt_clks,
- .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
};
/* mcbsp3 */
@@ -3160,11 +3146,6 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
&omap44xx_l4_abe__mcbsp3_dma,
};
-static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
- { .role = "pad_fck", .clk = "pad_clks_ck" },
- { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
-};
-
static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
.name = "mcbsp3",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3181,8 +3162,6 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
},
.slaves = omap44xx_mcbsp3_slaves,
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
- .opt_clks = mcbsp3_opt_clks,
- .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
};
/* mcbsp4 */
@@ -3221,11 +3200,6 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
&omap44xx_l4_per__mcbsp4,
};
-static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
- { .role = "pad_fck", .clk = "pad_clks_ck" },
- { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
-};
-
static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
.name = "mcbsp4",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -3242,8 +3216,6 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
},
.slaves = omap44xx_mcbsp4_slaves,
.slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
- .opt_clks = mcbsp4_opt_clks,
- .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
};
/*
diff --git a/trunk/arch/arm/mach-omap2/opp.c b/trunk/arch/arm/mach-omap2/opp.c
index de6d46451746..9262a6b47702 100644
--- a/trunk/arch/arm/mach-omap2/opp.c
+++ b/trunk/arch/arm/mach-omap2/opp.c
@@ -64,10 +64,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
}
oh = omap_hwmod_lookup(opp_def->hwmod_name);
if (!oh || !oh->od) {
- pr_debug("%s: no hwmod or odev for %s, [%d] "
+ pr_warn("%s: no hwmod or odev for %s, [%d] "
"cannot add OPPs.\n", __func__,
opp_def->hwmod_name, i);
- continue;
+ return -EINVAL;
}
dev = &oh->od->pdev->dev;
diff --git a/trunk/arch/arm/mach-omap2/pm34xx.c b/trunk/arch/arm/mach-omap2/pm34xx.c
index 703bd1099259..238defc6f6df 100644
--- a/trunk/arch/arm/mach-omap2/pm34xx.c
+++ b/trunk/arch/arm/mach-omap2/pm34xx.c
@@ -153,7 +153,8 @@ static void omap3_save_secure_ram_context(void)
pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
/* Following is for error tracking, it should not happen */
if (ret) {
- pr_err("save_secure_sram() returns %08x\n", ret);
+ printk(KERN_ERR "save_secure_sram() returns %08x\n",
+ ret);
while (1)
;
}
@@ -288,7 +289,7 @@ void omap_sram_idle(void)
break;
default:
/* Invalid state */
- pr_err("Invalid mpu state in sram_idle\n");
+ printk(KERN_ERR "Invalid mpu state in sram_idle\n");
return;
}
@@ -438,17 +439,18 @@ static int omap3_pm_suspend(void)
list_for_each_entry(pwrst, &pwrst_list, node) {
state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
if (state > pwrst->next_state) {
- pr_info("Powerdomain (%s) didn't enter "
- "target state %d\n",
+ printk(KERN_INFO "Powerdomain (%s) didn't enter "
+ "target state %d\n",
pwrst->pwrdm->name, pwrst->next_state);
ret = -1;
}
omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
}
if (ret)
- pr_err("Could not enter target state in pm_suspend\n");
+ printk(KERN_ERR "Could not enter target state in pm_suspend\n");
else
- pr_info("Successfully put all powerdomains to target state\n");
+ printk(KERN_INFO "Successfully put all powerdomains "
+ "to target state\n");
return ret;
}
@@ -732,22 +734,21 @@ static int __init omap3_pm_init(void)
if (ret) {
pr_err("pm: Failed to request pm_io irq\n");
- goto err2;
+ goto err1;
}
ret = pwrdm_for_each(pwrdms_setup, NULL);
if (ret) {
- pr_err("Failed to setup powerdomains\n");
- goto err3;
+ printk(KERN_ERR "Failed to setup powerdomains\n");
+ goto err2;
}
(void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
if (mpu_pwrdm == NULL) {
- pr_err("Failed to get mpu_pwrdm\n");
- ret = -EINVAL;
- goto err3;
+ printk(KERN_ERR "Failed to get mpu_pwrdm\n");
+ goto err2;
}
neon_pwrdm = pwrdm_lookup("neon_pwrdm");
@@ -780,8 +781,8 @@ static int __init omap3_pm_init(void)
omap3_secure_ram_storage =
kmalloc(0x803F, GFP_KERNEL);
if (!omap3_secure_ram_storage)
- pr_err("Memory allocation failed when "
- "allocating for secure sram context\n");
+ printk(KERN_ERR "Memory allocation failed when"
+ "allocating for secure sram context\n");
local_irq_disable();
local_fiq_disable();
@@ -795,17 +796,14 @@ static int __init omap3_pm_init(void)
}
omap3_save_scratchpad_contents();
+err1:
return ret;
-
-err3:
+err2:
+ free_irq(INT_34XX_PRCM_MPU_IRQ, NULL);
list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) {
list_del(&pwrst->node);
kfree(pwrst);
}
- free_irq(omap_prcm_event_to_irq("io"), omap3_pm_init);
-err2:
- free_irq(omap_prcm_event_to_irq("wkup"), NULL);
-err1:
return ret;
}
diff --git a/trunk/arch/arm/mach-omap2/pm44xx.c b/trunk/arch/arm/mach-omap2/pm44xx.c
index 885625352429..9ccaadc2cf07 100644
--- a/trunk/arch/arm/mach-omap2/pm44xx.c
+++ b/trunk/arch/arm/mach-omap2/pm44xx.c
@@ -144,7 +144,7 @@ static void omap_default_idle(void)
static int __init omap4_pm_init(void)
{
int ret;
- struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup;
+ struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
if (!cpu_is_omap44xx())
@@ -168,19 +168,14 @@ static int __init omap4_pm_init(void)
* MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
* expected. The hardware recommendation is to enable static
* dependencies for these to avoid system lock ups or random crashes.
- * The L4 wakeup depedency is added to workaround the OCP sync hardware
- * BUG with 32K synctimer which lead to incorrect timer value read
- * from the 32K counter. The BUG applies for GPTIMER1 and WDT2 which
- * are part of L4 wakeup clockdomain.
*/
mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
emif_clkdm = clkdm_lookup("l3_emif_clkdm");
l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
- l4wkup = clkdm_lookup("l4_wkup_clkdm");
ducati_clkdm = clkdm_lookup("ducati_clkdm");
- if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || (!l4wkup) ||
+ if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
goto err2;
@@ -188,7 +183,6 @@ static int __init omap4_pm_init(void)
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
- ret |= clkdm_add_wkdep(mpuss_clkdm, l4wkup);
ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
if (ret) {
diff --git a/trunk/arch/arm/mach-omap2/powerdomain.c b/trunk/arch/arm/mach-omap2/powerdomain.c
index 96ad3dbeac34..8a18d1bd61c8 100644
--- a/trunk/arch/arm/mach-omap2/powerdomain.c
+++ b/trunk/arch/arm/mach-omap2/powerdomain.c
@@ -972,13 +972,7 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
int pwrdm_state_switch(struct powerdomain *pwrdm)
{
- int ret;
-
- ret = pwrdm_wait_transition(pwrdm);
- if (!ret)
- ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
-
- return ret;
+ return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
}
int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)
diff --git a/trunk/arch/arm/mach-omap2/prm44xx.c b/trunk/arch/arm/mach-omap2/prm44xx.c
index f106d21ff581..eac623c7c3d8 100644
--- a/trunk/arch/arm/mach-omap2/prm44xx.c
+++ b/trunk/arch/arm/mach-omap2/prm44xx.c
@@ -147,9 +147,8 @@ static inline u32 _read_pending_irq_reg(u16 irqen_offs, u16 irqst_offs)
u32 mask, st;
/* XXX read mask from RAM? */
- mask = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
- irqen_offs);
- st = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, irqst_offs);
+ mask = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, irqen_offs);
+ st = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, irqst_offs);
return mask & st;
}
@@ -181,7 +180,7 @@ void omap44xx_prm_read_pending_irqs(unsigned long *events)
*/
void omap44xx_prm_ocp_barrier(void)
{
- omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
OMAP4_REVISION_PRM_OFFSET);
}
@@ -199,19 +198,19 @@ void omap44xx_prm_ocp_barrier(void)
void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
{
saved_mask[0] =
- omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQSTATUS_MPU_OFFSET);
saved_mask[1] =
- omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET);
- omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_write_inst_reg(0, OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQENABLE_MPU_OFFSET);
- omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_write_inst_reg(0, OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
/* OCP barrier */
- omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
OMAP4_REVISION_PRM_OFFSET);
}
@@ -227,9 +226,9 @@ void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
*/
void omap44xx_prm_restore_irqen(u32 *saved_mask)
{
- omap4_prm_write_inst_reg(saved_mask[0], OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_write_inst_reg(saved_mask[0], OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQENABLE_MPU_OFFSET);
- omap4_prm_write_inst_reg(saved_mask[1], OMAP4430_PRM_OCP_SOCKET_INST,
+ omap4_prm_write_inst_reg(saved_mask[1], OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
}
diff --git a/trunk/arch/arm/mach-omap2/prm_common.c b/trunk/arch/arm/mach-omap2/prm_common.c
index d28f848897d6..873b51d494ea 100644
--- a/trunk/arch/arm/mach-omap2/prm_common.c
+++ b/trunk/arch/arm/mach-omap2/prm_common.c
@@ -290,7 +290,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
goto err;
}
- for (i = 0; i < irq_setup->nr_regs; i++) {
+ for (i = 0; i <= irq_setup->nr_regs; i++) {
gc = irq_alloc_generic_chip("PRCM", 1,
irq_setup->base_irq + i * 32, prm_base,
handle_level_irq);
diff --git a/trunk/arch/arm/mach-omap2/usb-host.c b/trunk/arch/arm/mach-omap2/usb-host.c
index dde8a11f47d5..f51348dafafd 100644
--- a/trunk/arch/arm/mach-omap2/usb-host.c
+++ b/trunk/arch/arm/mach-omap2/usb-host.c
@@ -54,7 +54,7 @@ static struct omap_device_pm_latency omap_uhhtll_latency[] = {
/*
* setup_ehci_io_mux - initialize IO pad mux for USBHOST
*/
-static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
+static void setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_EHCI_PORT_MODE_PHY:
@@ -197,8 +197,7 @@ static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
return;
}
-static
-void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
+static void setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_EHCI_PORT_MODE_PHY:
@@ -316,7 +315,7 @@ void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
}
}
-static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
+static void setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
@@ -413,8 +412,7 @@ static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
}
}
-static
-void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
+static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
diff --git a/trunk/arch/arm/mach-pxa/Kconfig b/trunk/arch/arm/mach-pxa/Kconfig
index fe2d1f80ef50..109ccd2a8885 100644
--- a/trunk/arch/arm/mach-pxa/Kconfig
+++ b/trunk/arch/arm/mach-pxa/Kconfig
@@ -113,7 +113,6 @@ config MACH_ARMCORE
select IWMMXT
select PXA25x
select MIGHT_HAVE_PCI
- select NEED_MACH_IO_H if PCI
config MACH_EM_X270
bool "CompuLab EM-x270 platform"
diff --git a/trunk/arch/arm/mach-pxa/include/mach/io.h b/trunk/arch/arm/mach-pxa/include/mach/io.h
deleted file mode 100644
index cd78b7fe3567..000000000000
--- a/trunk/arch/arm/mach-pxa/include/mach/io.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/io.h
- *
- * Copied from asm/arch/sa1100/io.h
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-
-#endif
diff --git a/trunk/arch/arm/mach-s3c24xx/common.h b/trunk/arch/arm/mach-s3c24xx/common.h
deleted file mode 100644
index c2f596e7bc2d..000000000000
--- a/trunk/arch/arm/mach-s3c24xx/common.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * Common Header for S3C24XX SoCs
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
-#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
-
-void s3c2410_restart(char mode, const char *cmd);
-void s3c244x_restart(char mode, const char *cmd);
-
-#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
diff --git a/trunk/arch/arm/mach-sa1100/collie.c b/trunk/arch/arm/mach-sa1100/collie.c
index c7f418b0cde9..48885b7efd6b 100644
--- a/trunk/arch/arm/mach-sa1100/collie.c
+++ b/trunk/arch/arm/mach-sa1100/collie.c
@@ -313,10 +313,6 @@ static struct sa1100fb_mach_info collie_lcd_info = {
.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
.lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
-
-#ifdef CONFIG_BACKLIGHT_LOCOMO
- .lcd_power = locomolcd_power
-#endif
};
static void __init collie_init(void)
diff --git a/trunk/arch/arm/mach-sa1100/include/mach/collie.h b/trunk/arch/arm/mach-sa1100/include/mach/collie.h
index f33679d2d3ee..52acda7061b7 100644
--- a/trunk/arch/arm/mach-sa1100/include/mach/collie.h
+++ b/trunk/arch/arm/mach-sa1100/include/mach/collie.h
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-sa1100/include/mach/collie.h
*
- * This file contains the hardware specific definitions for Collie
+ * This file contains the hardware specific definitions for Assabet
* Only include this file from SA1100-specific files.
*
* ChangeLog:
@@ -13,7 +13,6 @@
#ifndef __ASM_ARCH_COLLIE_H
#define __ASM_ARCH_COLLIE_H
-extern void locomolcd_power(int on);
#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0)
diff --git a/trunk/arch/arm/mach-versatile/pci.c b/trunk/arch/arm/mach-versatile/pci.c
index d2268be8c34c..a6e23f464528 100644
--- a/trunk/arch/arm/mach-versatile/pci.c
+++ b/trunk/arch/arm/mach-versatile/pci.c
@@ -190,7 +190,7 @@ static struct resource pre_mem = {
.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH,
};
-static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
+static int __init pci_versatile_setup_resources(struct list_head *resources)
{
int ret = 0;
@@ -218,9 +218,9 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
* the mem resource for this bus
* the prefetch mem resource for this bus
*/
- pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset);
- pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
- pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);
+ pci_add_resource_offset(resources, &io_mem, sys->io_offset);
+ pci_add_resource_offset(resources, &non_mem, sys->mem_offset);
+ pci_add_resource_offset(resources, &pre_mem, sys->mem_offset);
goto out;
@@ -249,7 +249,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)
if (nr == 0) {
sys->mem_offset = 0;
- ret = pci_versatile_setup_resources(sys);
+ ret = pci_versatile_setup_resources(&sys->resources);
if (ret < 0) {
printk("pci_versatile_setup: resources... oops?\n");
goto out;
diff --git a/trunk/arch/arm/plat-mxc/3ds_debugboard.c b/trunk/arch/arm/plat-mxc/3ds_debugboard.c
index 5cac2c540f4f..d1e31fa1b0c3 100644
--- a/trunk/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/trunk/arch/arm/plat-mxc/3ds_debugboard.c
@@ -80,7 +80,7 @@ static struct smsc911x_platform_config smsc911x_config = {
static struct platform_device smsc_lan9217_device = {
.name = "smsc911x",
- .id = -1,
+ .id = 0,
.dev = {
.platform_data = &smsc911x_config,
},
diff --git a/trunk/arch/arm/plat-omap/Kconfig b/trunk/arch/arm/plat-omap/Kconfig
index ad95c7a5d009..ce1e9b96ba1a 100644
--- a/trunk/arch/arm/plat-omap/Kconfig
+++ b/trunk/arch/arm/plat-omap/Kconfig
@@ -17,7 +17,6 @@ config ARCH_OMAP1
select IRQ_DOMAIN
select HAVE_IDE
select NEED_MACH_MEMORY_H
- select NEED_MACH_IO_H if PCCARD
help
"Systems based on omap7xx, omap15xx or omap16xx"
diff --git a/trunk/arch/arm/plat-omap/clock.c b/trunk/arch/arm/plat-omap/clock.c
index 8506cbb7fea4..56b6f8b7053e 100644
--- a/trunk/arch/arm/plat-omap/clock.c
+++ b/trunk/arch/arm/plat-omap/clock.c
@@ -441,8 +441,6 @@ static int __init clk_disable_unused(void)
return 0;
pr_info("clock: disabling unused clocks to save power\n");
-
- spin_lock_irqsave(&clockfw_lock, flags);
list_for_each_entry(ck, &clocks, node) {
if (ck->ops == &clkops_null)
continue;
@@ -450,9 +448,10 @@ static int __init clk_disable_unused(void)
if (ck->usecount > 0 || !ck->enable_reg)
continue;
+ spin_lock_irqsave(&clockfw_lock, flags);
arch_clock->clk_disable_unused(ck);
+ spin_unlock_irqrestore(&clockfw_lock, flags);
}
- spin_unlock_irqrestore(&clockfw_lock, flags);
return 0;
}
diff --git a/trunk/arch/arm/plat-omap/include/plat/omap_hwmod.h b/trunk/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145ccb98..9e8e63d52aab 100644
--- a/trunk/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/trunk/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -47,17 +47,17 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
* with the original PRCM protocol defined for OMAP2420
*/
#define SYSC_TYPE1_MIDLEMODE_SHIFT 12
-#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_TYPE1_MIDLEMODE_SHIFT)
+#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_MIDLEMODE_SHIFT)
#define SYSC_TYPE1_CLOCKACTIVITY_SHIFT 8
-#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_TYPE1_CLOCKACTIVITY_SHIFT)
+#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_CLOCKACTIVITY_SHIFT)
#define SYSC_TYPE1_SIDLEMODE_SHIFT 3
-#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_TYPE1_SIDLEMODE_SHIFT)
+#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_SIDLEMODE_SHIFT)
#define SYSC_TYPE1_ENAWAKEUP_SHIFT 2
-#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_TYPE1_ENAWAKEUP_SHIFT)
+#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT)
#define SYSC_TYPE1_SOFTRESET_SHIFT 1
-#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_TYPE1_SOFTRESET_SHIFT)
+#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT)
#define SYSC_TYPE1_AUTOIDLE_SHIFT 0
-#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_TYPE1_AUTOIDLE_SHIFT)
+#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT)
/*
* OCP SYSCONFIG bit shifts/masks TYPE2. These are for IPs compliant
diff --git a/trunk/arch/avr32/include/asm/barrier.h b/trunk/arch/avr32/include/asm/barrier.h
index 0961275373db..808001c9cf8c 100644
--- a/trunk/arch/avr32/include/asm/barrier.h
+++ b/trunk/arch/avr32/include/asm/barrier.h
@@ -8,8 +8,6 @@
#ifndef __ASM_AVR32_BARRIER_H
#define __ASM_AVR32_BARRIER_H
-#define nop() asm volatile("nop")
-
#define mb() asm volatile("" : : : "memory")
#define rmb() mb()
#define wmb() asm volatile("sync 0" : : : "memory")
diff --git a/trunk/arch/avr32/include/asm/special_insns.h b/trunk/arch/avr32/include/asm/special_insns.h
new file mode 100644
index 000000000000..f922218dfaa5
--- /dev/null
+++ b/trunk/arch/avr32/include/asm/special_insns.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright (C) 2004-2006 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_AVR32_SPECIAL_INSNS_H
+#define __ASM_AVR32_SPECIAL_INSNS_H
+
+#define nop() asm volatile("nop")
+
+#endif /* __ASM_AVR32_SPECIAL_INSNS_H */
diff --git a/trunk/arch/avr32/mach-at32ap/include/mach/board.h b/trunk/arch/avr32/mach-at32ap/include/mach/board.h
index 70742ec997f8..71733866cb4f 100644
--- a/trunk/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/trunk/arch/avr32/mach-at32ap/include/mach/board.h
@@ -7,7 +7,7 @@
#include
#include
#include
-#include
+#include
#define GPIO_PIN_NONE (-1)
diff --git a/trunk/arch/blackfin/Kconfig b/trunk/arch/blackfin/Kconfig
index 373a6902d8fa..c1269a1085e1 100644
--- a/trunk/arch/blackfin/Kconfig
+++ b/trunk/arch/blackfin/Kconfig
@@ -823,7 +823,7 @@ config CACHELINE_ALIGNED_L1
bool "Locate cacheline_aligned data to L1 Data Memory"
default y if !BF54x
default n if BF54x
- depends on !SMP && !BF531 && !CRC32
+ depends on !SMP && !BF531
help
If enabled, cacheline_aligned data is linked
into L1 data memory. (less latency)
diff --git a/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig b/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig
index 90b175323644..9ccc18a6b4df 100644
--- a/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig
+++ b/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig
@@ -147,7 +147,6 @@ CONFIG_USB_OTG_BLACKLIST_HUB=y
CONFIG_USB_MON=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_BLACKFIN=y
-CONFIG_MUSB_PIO_ONLY=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_RTC_CLASS=y
diff --git a/trunk/arch/blackfin/include/asm/cmpxchg.h b/trunk/arch/blackfin/include/asm/cmpxchg.h
index c05868cc61c1..ba2484f4cb2a 100644
--- a/trunk/arch/blackfin/include/asm/cmpxchg.h
+++ b/trunk/arch/blackfin/include/asm/cmpxchg.h
@@ -122,8 +122,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
(unsigned long)(n), sizeof(*(ptr))))
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
-#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
-#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
+#include
#endif /* !CONFIG_SMP */
diff --git a/trunk/arch/blackfin/include/asm/gpio.h b/trunk/arch/blackfin/include/asm/gpio.h
index 12d3571b5232..5a25856381ff 100644
--- a/trunk/arch/blackfin/include/asm/gpio.h
+++ b/trunk/arch/blackfin/include/asm/gpio.h
@@ -244,24 +244,14 @@ static inline int gpio_set_debounce(unsigned gpio, unsigned debounce)
return -EINVAL;
}
-static inline int __gpio_get_value(unsigned gpio)
-{
- return bfin_gpio_get_value(gpio);
-}
-
-static inline void __gpio_set_value(unsigned gpio, int value)
-{
- return bfin_gpio_set_value(gpio, value);
-}
-
static inline int gpio_get_value(unsigned gpio)
{
- return __gpio_get_value(gpio);
+ return bfin_gpio_get_value(gpio);
}
static inline void gpio_set_value(unsigned gpio, int value)
{
- return __gpio_set_value(gpio, value);
+ return bfin_gpio_set_value(gpio, value);
}
static inline int gpio_to_irq(unsigned gpio)
diff --git a/trunk/arch/c6x/kernel/signal.c b/trunk/arch/c6x/kernel/signal.c
index 3b5a05099989..304f675826e9 100644
--- a/trunk/arch/c6x/kernel/signal.c
+++ b/trunk/arch/c6x/kernel/signal.c
@@ -85,7 +85,10 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs)
goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE);
- set_current_blocked(&set);
+ spin_lock_irq(¤t->sighand->siglock);
+ current->blocked = set;
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
goto badframe;
@@ -276,8 +279,15 @@ static int handle_signal(int sig,
/* Set up the stack frame */
ret = setup_rt_frame(sig, ka, info, oldset, regs);
- if (ret == 0)
- block_sigmask(ka, sig);
+ if (ret == 0) {
+ spin_lock_irq(¤t->sighand->siglock);
+ sigorsets(¤t->blocked, ¤t->blocked,
+ &ka->sa.sa_mask);
+ if (!(ka->sa.sa_flags & SA_NODEFER))
+ sigaddset(¤t->blocked, sig);
+ recalc_sigpending();
+ spin_unlock_irq(¤t->sighand->siglock);
+ }
return ret;
}
diff --git a/trunk/arch/frv/mb93090-mb00/pci-dma.c b/trunk/arch/frv/mb93090-mb00/pci-dma.c
index 4f8d8bcdc7de..41098a3803a2 100644
--- a/trunk/arch/frv/mb93090-mb00/pci-dma.c
+++ b/trunk/arch/frv/mb93090-mb00/pci-dma.c
@@ -13,7 +13,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/hexagon/include/asm/dma-mapping.h b/trunk/arch/hexagon/include/asm/dma-mapping.h
index 233ed3d2d25e..448b224ba4ef 100644
--- a/trunk/arch/hexagon/include/asm/dma-mapping.h
+++ b/trunk/arch/hexagon/include/asm/dma-mapping.h
@@ -71,35 +71,29 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
return (dma_addr == bad_dma_address);
}
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret;
struct dma_map_ops *ops = get_dma_ops(dev);
BUG_ON(!dma_ops);
- ret = ops->alloc(dev, size, dma_handle, flag, attrs);
+ ret = ops->alloc_coherent(dev, size, dma_handle, flag);
debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
return ret;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
BUG_ON(!dma_ops);
- dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
+ dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
}
diff --git a/trunk/arch/hexagon/kernel/dma.c b/trunk/arch/hexagon/kernel/dma.c
index 37302218ca4a..e711ace62fdf 100644
--- a/trunk/arch/hexagon/kernel/dma.c
+++ b/trunk/arch/hexagon/kernel/dma.c
@@ -54,8 +54,7 @@ static struct gen_pool *coherent_pool;
/* Allocates from a pool of uncached memory that was reserved at boot time */
void *hexagon_dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addr, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addr, gfp_t flag)
{
void *ret;
@@ -82,7 +81,7 @@ void *hexagon_dma_alloc_coherent(struct device *dev, size_t size,
}
static void hexagon_free_coherent(struct device *dev, size_t size, void *vaddr,
- dma_addr_t dma_addr, struct dma_attrs *attrs)
+ dma_addr_t dma_addr)
{
gen_pool_free(coherent_pool, (unsigned long) vaddr, size);
}
@@ -203,8 +202,8 @@ static void hexagon_sync_single_for_device(struct device *dev,
}
struct dma_map_ops hexagon_dma_ops = {
- .alloc = hexagon_dma_alloc_coherent,
- .free = hexagon_free_coherent,
+ .alloc_coherent = hexagon_dma_alloc_coherent,
+ .free_coherent = hexagon_free_coherent,
.map_sg = hexagon_map_sg,
.map_page = hexagon_map_page,
.sync_single_for_cpu = hexagon_sync_single_for_cpu,
diff --git a/trunk/arch/hexagon/kernel/smp.c b/trunk/arch/hexagon/kernel/smp.c
index 9b44a9e2d05a..15d1fd22bbc5 100644
--- a/trunk/arch/hexagon/kernel/smp.c
+++ b/trunk/arch/hexagon/kernel/smp.c
@@ -35,7 +35,7 @@
#define BASE_IPI_IRQ 26
/*
- * cpu_possible_mask needs to be filled out prior to setup_per_cpu_areas
+ * cpu_possible_map needs to be filled out prior to setup_per_cpu_areas
* (which is prior to any of our smp_prepare_cpu crap), in order to set
* up the... per_cpu areas.
*/
@@ -208,7 +208,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
stack_start = ((void *) thread) + THREAD_SIZE;
__vmstart(start_secondary, stack_start);
- while (!cpu_online(cpu))
+ while (!cpu_isset(cpu, cpu_online_map))
barrier();
return 0;
@@ -229,7 +229,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/* Right now, let's just fake it. */
for (i = 0; i < max_cpus; i++)
- set_cpu_present(i, true);
+ cpu_set(i, cpu_present_map);
/* Also need to register the interrupts for IPI */
if (max_cpus > 1)
@@ -269,5 +269,5 @@ void smp_start_cpus(void)
int i;
for (i = 0; i < NR_CPUS; i++)
- set_cpu_possible(i, true);
+ cpu_set(i, cpu_possible_map);
}
diff --git a/trunk/arch/ia64/hp/common/sba_iommu.c b/trunk/arch/ia64/hp/common/sba_iommu.c
index bcda5b2d121a..f6ea3a3b4a84 100644
--- a/trunk/arch/ia64/hp/common/sba_iommu.c
+++ b/trunk/arch/ia64/hp/common/sba_iommu.c
@@ -1129,8 +1129,7 @@ void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
* See Documentation/DMA-API-HOWTO.txt
*/
static void *
-sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
- gfp_t flags, struct dma_attrs *attrs)
+sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
{
struct ioc *ioc;
void *addr;
@@ -1192,8 +1191,8 @@ sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
*
* See Documentation/DMA-API-HOWTO.txt
*/
-static void sba_free_coherent(struct device *dev, size_t size, void *vaddr,
- dma_addr_t dma_handle, struct dma_attrs *attrs)
+static void sba_free_coherent (struct device *dev, size_t size, void *vaddr,
+ dma_addr_t dma_handle)
{
sba_unmap_single_attrs(dev, dma_handle, size, 0, NULL);
free_pages((unsigned long) vaddr, get_order(size));
@@ -2213,8 +2212,8 @@ sba_page_override(char *str)
__setup("sbapagesize=",sba_page_override);
struct dma_map_ops sba_dma_ops = {
- .alloc = sba_alloc_coherent,
- .free = sba_free_coherent,
+ .alloc_coherent = sba_alloc_coherent,
+ .free_coherent = sba_free_coherent,
.map_page = sba_map_page,
.unmap_page = sba_unmap_page,
.map_sg = sba_map_sg_attrs,
diff --git a/trunk/arch/ia64/include/asm/dma-mapping.h b/trunk/arch/ia64/include/asm/dma-mapping.h
index 4f5e8148440d..4336d080b241 100644
--- a/trunk/arch/ia64/include/asm/dma-mapping.h
+++ b/trunk/arch/ia64/include/asm/dma-mapping.h
@@ -23,29 +23,23 @@ extern void machvec_dma_sync_single(struct device *, dma_addr_t, size_t,
extern void machvec_dma_sync_sg(struct device *, struct scatterlist *, int,
enum dma_data_direction);
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *daddr, gfp_t gfp,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *daddr, gfp_t gfp)
{
struct dma_map_ops *ops = platform_dma_get_ops(dev);
void *caddr;
- caddr = ops->alloc(dev, size, daddr, gfp, attrs);
+ caddr = ops->alloc_coherent(dev, size, daddr, gfp);
debug_dma_alloc_coherent(dev, size, *daddr, caddr);
return caddr;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *caddr, dma_addr_t daddr,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *caddr, dma_addr_t daddr)
{
struct dma_map_ops *ops = platform_dma_get_ops(dev);
debug_dma_free_coherent(dev, size, caddr, daddr);
- ops->free(dev, size, caddr, daddr, attrs);
+ ops->free_coherent(dev, size, caddr, daddr);
}
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
diff --git a/trunk/arch/ia64/kernel/acpi.c b/trunk/arch/ia64/kernel/acpi.c
index 6f38b6120d96..ac795d311f44 100644
--- a/trunk/arch/ia64/kernel/acpi.c
+++ b/trunk/arch/ia64/kernel/acpi.c
@@ -839,7 +839,7 @@ static __init int setup_additional_cpus(char *s)
early_param("additional_cpus", setup_additional_cpus);
/*
- * cpu_possible_mask should be static, it cannot change as CPUs
+ * cpu_possible_map should be static, it cannot change as CPUs
* are onlined, or offlined. The reason is per-cpu data-structures
* are allocated by some modules at init time, and dont expect to
* do this dynamically on cpu arrival/departure.
diff --git a/trunk/arch/ia64/kernel/pci-swiotlb.c b/trunk/arch/ia64/kernel/pci-swiotlb.c
index 939260aeac98..d9485d952ed0 100644
--- a/trunk/arch/ia64/kernel/pci-swiotlb.c
+++ b/trunk/arch/ia64/kernel/pci-swiotlb.c
@@ -15,24 +15,16 @@ int swiotlb __read_mostly;
EXPORT_SYMBOL(swiotlb);
static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
if (dev->coherent_dma_mask != DMA_BIT_MASK(64))
gfp |= GFP_DMA;
return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
}
-static void ia64_swiotlb_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_addr,
- struct dma_attrs *attrs)
-{
- swiotlb_free_coherent(dev, size, vaddr, dma_addr);
-}
-
struct dma_map_ops swiotlb_dma_ops = {
- .alloc = ia64_swiotlb_alloc_coherent,
- .free = ia64_swiotlb_free_coherent,
+ .alloc_coherent = ia64_swiotlb_alloc_coherent,
+ .free_coherent = swiotlb_free_coherent,
.map_page = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
.map_sg = swiotlb_map_sg_attrs,
diff --git a/trunk/arch/ia64/sn/pci/pci_dma.c b/trunk/arch/ia64/sn/pci/pci_dma.c
index 3290d6e00c31..a9d310de57da 100644
--- a/trunk/arch/ia64/sn/pci/pci_dma.c
+++ b/trunk/arch/ia64/sn/pci/pci_dma.c
@@ -76,8 +76,7 @@ EXPORT_SYMBOL(sn_dma_set_mask);
* more information.
*/
static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t * dma_handle, gfp_t flags,
- struct dma_attrs *attrs)
+ dma_addr_t * dma_handle, gfp_t flags)
{
void *cpuaddr;
unsigned long phys_addr;
@@ -138,7 +137,7 @@ static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
* any associated IOMMU mappings.
*/
static void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle, struct dma_attrs *attrs)
+ dma_addr_t dma_handle)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
@@ -467,8 +466,8 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
}
static struct dma_map_ops sn_dma_ops = {
- .alloc = sn_dma_alloc_coherent,
- .free = sn_dma_free_coherent,
+ .alloc_coherent = sn_dma_alloc_coherent,
+ .free_coherent = sn_dma_free_coherent,
.map_page = sn_dma_map_page,
.unmap_page = sn_dma_unmap_page,
.map_sg = sn_dma_map_sg,
diff --git a/trunk/arch/m68k/include/asm/atomic.h b/trunk/arch/m68k/include/asm/atomic.h
index f4e32de263a7..336e6173794f 100644
--- a/trunk/arch/m68k/include/asm/atomic.h
+++ b/trunk/arch/m68k/include/asm/atomic.h
@@ -3,7 +3,6 @@
#include
#include
-#include
/*
* Atomic operations that C can't guarantee us. Useful for
diff --git a/trunk/arch/m68k/mac/config.c b/trunk/arch/m68k/mac/config.c
index d9f62e0f46c0..96fa6ed7e799 100644
--- a/trunk/arch/m68k/mac/config.c
+++ b/trunk/arch/m68k/mac/config.c
@@ -980,9 +980,6 @@ int __init mac_platform_init(void)
{
u8 *swim_base;
- if (!MACH_IS_MAC)
- return -ENODEV;
-
/*
* Serial devices
*/
diff --git a/trunk/arch/m68k/q40/config.c b/trunk/arch/m68k/q40/config.c
index 8a1ce327c963..512adb64f7dd 100644
--- a/trunk/arch/m68k/q40/config.c
+++ b/trunk/arch/m68k/q40/config.c
@@ -334,9 +334,6 @@ static __init int q40_add_kbd_device(void)
{
struct platform_device *pdev;
- if (!MACH_IS_Q40)
- return -ENODEV;
-
pdev = platform_device_register_simple("q40kbd", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
diff --git a/trunk/arch/microblaze/include/asm/cmpxchg.h b/trunk/arch/microblaze/include/asm/cmpxchg.h
index 538afc0ab9f3..0094859abd9b 100644
--- a/trunk/arch/microblaze/include/asm/cmpxchg.h
+++ b/trunk/arch/microblaze/include/asm/cmpxchg.h
@@ -1,8 +1,6 @@
#ifndef _ASM_MICROBLAZE_CMPXCHG_H
#define _ASM_MICROBLAZE_CMPXCHG_H
-#include
-
void __bad_xchg(volatile void *ptr, int size);
static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
diff --git a/trunk/arch/microblaze/include/asm/dma-mapping.h b/trunk/arch/microblaze/include/asm/dma-mapping.h
index 01d228286cb0..3a3e5b886854 100644
--- a/trunk/arch/microblaze/include/asm/dma-mapping.h
+++ b/trunk/arch/microblaze/include/asm/dma-mapping.h
@@ -123,34 +123,28 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
-#define dma_alloc_coherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct dma_map_ops *ops = get_dma_ops(dev);
void *memory;
BUG_ON(!ops);
- memory = ops->alloc(dev, size, dma_handle, flag, attrs);
+ memory = ops->alloc_coherent(dev, size, dma_handle, flag);
debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
return memory;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d, s, c, h, NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
struct dma_map_ops *ops = get_dma_ops(dev);
BUG_ON(!ops);
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
- ops->free(dev, size, cpu_addr, dma_handle, attrs);
+ ops->free_coherent(dev, size, cpu_addr, dma_handle);
}
static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
diff --git a/trunk/arch/microblaze/include/asm/futex.h b/trunk/arch/microblaze/include/asm/futex.h
index ff8cde159d9a..b0526d2716fa 100644
--- a/trunk/arch/microblaze/include/asm/futex.h
+++ b/trunk/arch/microblaze/include/asm/futex.h
@@ -24,7 +24,7 @@
.word 1b,4b,2b,4b; \
.previous;" \
: "=&r" (oldval), "=&r" (ret) \
- : "r" (uaddr), "i" (-EFAULT), "r" (oparg) \
+ : "b" (uaddr), "i" (-EFAULT), "r" (oparg) \
); \
})
diff --git a/trunk/arch/microblaze/include/asm/processor.h b/trunk/arch/microblaze/include/asm/processor.h
index bffb54527299..510a8e1c16ba 100644
--- a/trunk/arch/microblaze/include/asm/processor.h
+++ b/trunk/arch/microblaze/include/asm/processor.h
@@ -31,8 +31,6 @@ extern const struct seq_operations cpuinfo_op;
/* Do necessary setup to start up a newly executed thread. */
void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
-extern void ret_from_fork(void);
-
# endif /* __ASSEMBLY__ */
# ifndef CONFIG_MMU
@@ -145,6 +143,8 @@ static inline void exit_thread(void)
unsigned long get_wchan(struct task_struct *p);
+extern void ret_from_fork(void);
+
/* The size allocated for kernel stacks. This _must_ be a power of two! */
# define KERNEL_STACK_SIZE 0x2000
diff --git a/trunk/arch/microblaze/kernel/dma.c b/trunk/arch/microblaze/kernel/dma.c
index a2bfa2ca5730..65a4af4cbbbe 100644
--- a/trunk/arch/microblaze/kernel/dma.c
+++ b/trunk/arch/microblaze/kernel/dma.c
@@ -33,8 +33,7 @@ static unsigned long get_dma_direct_offset(struct device *dev)
#define NOT_COHERENT_CACHE
static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
#ifdef NOT_COHERENT_CACHE
return consistent_alloc(flag, size, dma_handle);
@@ -58,8 +57,7 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
}
static void dma_direct_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
#ifdef NOT_COHERENT_CACHE
consistent_free(size, vaddr);
@@ -178,8 +176,8 @@ dma_direct_sync_sg_for_device(struct device *dev,
}
struct dma_map_ops dma_direct_ops = {
- .alloc = dma_direct_alloc_coherent,
- .free = dma_direct_free_coherent,
+ .alloc_coherent = dma_direct_alloc_coherent,
+ .free_coherent = dma_direct_free_coherent,
.map_sg = dma_direct_map_sg,
.unmap_sg = dma_direct_unmap_sg,
.dma_supported = dma_direct_dma_supported,
diff --git a/trunk/arch/microblaze/kernel/early_printk.c b/trunk/arch/microblaze/kernel/early_printk.c
index aba1f9a97d5d..ec485876d0d0 100644
--- a/trunk/arch/microblaze/kernel/early_printk.c
+++ b/trunk/arch/microblaze/kernel/early_printk.c
@@ -176,7 +176,6 @@ void __init remap_early_printk(void)
base_addr = (u32) ioremap(base_addr, PAGE_SIZE);
printk(KERN_CONT "0x%x\n", base_addr);
-#ifdef CONFIG_MMU
/*
* Early console is on the top of skipped TLB entries
* decrease tlb_skip size ensure that hardcoded TLB entry will be
@@ -190,7 +189,6 @@ void __init remap_early_printk(void)
* cmp rX, orig_base_addr
*/
tlb_skip -= 1;
-#endif
}
void __init disable_early_printk(void)
diff --git a/trunk/arch/microblaze/kernel/setup.c b/trunk/arch/microblaze/kernel/setup.c
index 16d8dfd9094b..71af974aa24a 100644
--- a/trunk/arch/microblaze/kernel/setup.c
+++ b/trunk/arch/microblaze/kernel/setup.c
@@ -206,7 +206,6 @@ static int microblaze_debugfs_init(void)
}
arch_initcall(microblaze_debugfs_init);
-# ifdef CONFIG_MMU
static int __init debugfs_tlb(void)
{
struct dentry *d;
@@ -219,7 +218,6 @@ static int __init debugfs_tlb(void)
return -ENOMEM;
}
device_initcall(debugfs_tlb);
-# endif
#endif
static int dflt_bus_notify(struct notifier_block *nb,
diff --git a/trunk/arch/microblaze/kernel/unwind.c b/trunk/arch/microblaze/kernel/unwind.c
index 6be4ae3c3351..9781a528cfc9 100644
--- a/trunk/arch/microblaze/kernel/unwind.c
+++ b/trunk/arch/microblaze/kernel/unwind.c
@@ -24,7 +24,6 @@
#include
#include
#include
-#include
struct stack_trace;
diff --git a/trunk/arch/microblaze/lib/uaccess_old.S b/trunk/arch/microblaze/lib/uaccess_old.S
index f085995ee848..f037266cdaf3 100644
--- a/trunk/arch/microblaze/lib/uaccess_old.S
+++ b/trunk/arch/microblaze/lib/uaccess_old.S
@@ -122,22 +122,22 @@ __strnlen_user:
15: swi r24, r5, 0x0018 + offset; \
16: swi r25, r5, 0x001C + offset; \
.section __ex_table,"a"; \
- .word 1b, 33f; \
- .word 2b, 33f; \
- .word 3b, 33f; \
- .word 4b, 33f; \
- .word 5b, 33f; \
- .word 6b, 33f; \
- .word 7b, 33f; \
- .word 8b, 33f; \
- .word 9b, 33f; \
- .word 10b, 33f; \
- .word 11b, 33f; \
- .word 12b, 33f; \
- .word 13b, 33f; \
- .word 14b, 33f; \
- .word 15b, 33f; \
- .word 16b, 33f; \
+ .word 1b, 0f; \
+ .word 2b, 0f; \
+ .word 3b, 0f; \
+ .word 4b, 0f; \
+ .word 5b, 0f; \
+ .word 6b, 0f; \
+ .word 7b, 0f; \
+ .word 8b, 0f; \
+ .word 9b, 0f; \
+ .word 10b, 0f; \
+ .word 11b, 0f; \
+ .word 12b, 0f; \
+ .word 13b, 0f; \
+ .word 14b, 0f; \
+ .word 15b, 0f; \
+ .word 16b, 0f; \
.text
#define COPY_80(offset) \
@@ -190,17 +190,14 @@ w2: sw r4, r5, r3
.align 4 /* Alignment is important to keep icache happy */
page: /* Create room on stack and save registers for storign values */
- addik r1, r1, -40
- swi r5, r1, 0
- swi r6, r1, 4
- swi r7, r1, 8
- swi r19, r1, 12
- swi r20, r1, 16
- swi r21, r1, 20
- swi r22, r1, 24
- swi r23, r1, 28
- swi r24, r1, 32
- swi r25, r1, 36
+ addik r1, r1, -32
+ swi r19, r1, 4
+ swi r20, r1, 8
+ swi r21, r1, 12
+ swi r22, r1, 16
+ swi r23, r1, 20
+ swi r24, r1, 24
+ swi r25, r1, 28
loop: /* r4, r19, r20, r21, r22, r23, r24, r25 are used for storing values */
/* Loop unrolling to get performance boost */
COPY_80(0x000);
@@ -208,44 +205,21 @@ loop: /* r4, r19, r20, r21, r22, r23, r24, r25 are used for storing values */
COPY_80(0x100);
COPY_80(0x180);
/* copy loop */
- addik r6, r6, 0x200
- addik r7, r7, -0x200
- bneid r7, loop
- addik r5, r5, 0x200
-
+ addik r6, r6, 0x200
+ addik r7, r7, -0x200
+ bneid r7, loop
+ addik r5, r5, 0x200
/* Restore register content */
- lwi r5, r1, 0
- lwi r6, r1, 4
- lwi r7, r1, 8
- lwi r19, r1, 12
- lwi r20, r1, 16
- lwi r21, r1, 20
- lwi r22, r1, 24
- lwi r23, r1, 28
- lwi r24, r1, 32
- lwi r25, r1, 36
- addik r1, r1, 40
+ lwi r19, r1, 4
+ lwi r20, r1, 8
+ lwi r21, r1, 12
+ lwi r22, r1, 16
+ lwi r23, r1, 20
+ lwi r24, r1, 24
+ lwi r25, r1, 28
+ addik r1, r1, 32
/* return back */
- addik r3, r0, 0
- rtsd r15, 8
- nop
-
-/* Fault case - return temp count */
-33:
addik r3, r7, 0
- /* Restore register content */
- lwi r5, r1, 0
- lwi r6, r1, 4
- lwi r7, r1, 8
- lwi r19, r1, 12
- lwi r20, r1, 16
- lwi r21, r1, 20
- lwi r22, r1, 24
- lwi r23, r1, 28
- lwi r24, r1, 32
- lwi r25, r1, 36
- addik r1, r1, 40
- /* return back */
rtsd r15, 8
nop
diff --git a/trunk/arch/mips/cavium-octeon/dma-octeon.c b/trunk/arch/mips/cavium-octeon/dma-octeon.c
index 41dd00884975..b6bb92c16a47 100644
--- a/trunk/arch/mips/cavium-octeon/dma-octeon.c
+++ b/trunk/arch/mips/cavium-octeon/dma-octeon.c
@@ -157,7 +157,7 @@ static void octeon_dma_sync_sg_for_device(struct device *dev,
}
static void *octeon_dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret;
@@ -192,7 +192,7 @@ static void *octeon_dma_alloc_coherent(struct device *dev, size_t size,
}
static void octeon_dma_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle, struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
int order = get_order(size);
@@ -240,8 +240,8 @@ EXPORT_SYMBOL(dma_to_phys);
static struct octeon_dma_map_ops octeon_linear_dma_map_ops = {
.dma_map_ops = {
- .alloc = octeon_dma_alloc_coherent,
- .free = octeon_dma_free_coherent,
+ .alloc_coherent = octeon_dma_alloc_coherent,
+ .free_coherent = octeon_dma_free_coherent,
.map_page = octeon_dma_map_page,
.unmap_page = swiotlb_unmap_page,
.map_sg = octeon_dma_map_sg,
@@ -325,8 +325,8 @@ void __init plat_swiotlb_setup(void)
#ifdef CONFIG_PCI
static struct octeon_dma_map_ops _octeon_pci_dma_map_ops = {
.dma_map_ops = {
- .alloc = octeon_dma_alloc_coherent,
- .free = octeon_dma_free_coherent,
+ .alloc_coherent = octeon_dma_alloc_coherent,
+ .free_coherent = octeon_dma_free_coherent,
.map_page = octeon_dma_map_page,
.unmap_page = swiotlb_unmap_page,
.map_sg = octeon_dma_map_sg,
diff --git a/trunk/arch/mips/cavium-octeon/smp.c b/trunk/arch/mips/cavium-octeon/smp.c
index 97e7ce9b50ed..c3e2b85c3b02 100644
--- a/trunk/arch/mips/cavium-octeon/smp.c
+++ b/trunk/arch/mips/cavium-octeon/smp.c
@@ -78,7 +78,7 @@ static inline void octeon_send_ipi_mask(const struct cpumask *mask,
}
/**
- * Detect available CPUs, populate cpu_possible_mask
+ * Detect available CPUs, populate cpu_possible_map
*/
static void octeon_smp_hotplug_setup(void)
{
@@ -268,7 +268,7 @@ static int octeon_cpu_disable(void)
spin_lock(&smp_reserve_lock);
- set_cpu_online(cpu, false);
+ cpu_clear(cpu, cpu_online_map);
cpu_clear(cpu, cpu_callin_map);
local_irq_disable();
fixup_irqs();
diff --git a/trunk/arch/mips/include/asm/dma-mapping.h b/trunk/arch/mips/include/asm/dma-mapping.h
index be39a12901c6..7aa37ddfca4b 100644
--- a/trunk/arch/mips/include/asm/dma-mapping.h
+++ b/trunk/arch/mips/include/asm/dma-mapping.h
@@ -57,31 +57,25 @@ dma_set_mask(struct device *dev, u64 mask)
extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction direction);
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret;
struct dma_map_ops *ops = get_dma_ops(dev);
- ret = ops->alloc(dev, size, dma_handle, gfp, attrs);
+ ret = ops->alloc_coherent(dev, size, dma_handle, gfp);
debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
return ret;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma_handle)
{
struct dma_map_ops *ops = get_dma_ops(dev);
- ops->free(dev, size, vaddr, dma_handle, attrs);
+ ops->free_coherent(dev, size, vaddr, dma_handle);
debug_dma_free_coherent(dev, size, vaddr, dma_handle);
}
diff --git a/trunk/arch/mips/kernel/mips-mt-fpaff.c b/trunk/arch/mips/kernel/mips-mt-fpaff.c
index 33f63bab478a..802e6160f37e 100644
--- a/trunk/arch/mips/kernel/mips-mt-fpaff.c
+++ b/trunk/arch/mips/kernel/mips-mt-fpaff.c
@@ -173,7 +173,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
if (retval)
goto out_unlock;
- cpumask_and(&mask, &p->thread.user_cpus_allowed, cpu_possible_mask);
+ cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
out_unlock:
read_unlock(&tasklist_lock);
diff --git a/trunk/arch/mips/kernel/proc.c b/trunk/arch/mips/kernel/proc.c
index f8b2c592514d..e309665b6c81 100644
--- a/trunk/arch/mips/kernel/proc.c
+++ b/trunk/arch/mips/kernel/proc.c
@@ -25,7 +25,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
int i;
#ifdef CONFIG_SMP
- if (!cpu_online(n))
+ if (!cpu_isset(n, cpu_online_map))
return 0;
#endif
diff --git a/trunk/arch/mips/kernel/smp-bmips.c b/trunk/arch/mips/kernel/smp-bmips.c
index 3046e2986006..ca673569fd24 100644
--- a/trunk/arch/mips/kernel/smp-bmips.c
+++ b/trunk/arch/mips/kernel/smp-bmips.c
@@ -317,7 +317,7 @@ static int bmips_cpu_disable(void)
pr_info("SMP: CPU%d is offline\n", cpu);
- set_cpu_online(cpu, false);
+ cpu_clear(cpu, cpu_online_map);
cpu_clear(cpu, cpu_callin_map);
local_flush_tlb_all();
diff --git a/trunk/arch/mips/kernel/smp.c b/trunk/arch/mips/kernel/smp.c
index ba9376bf52a1..9c1cce9de35f 100644
--- a/trunk/arch/mips/kernel/smp.c
+++ b/trunk/arch/mips/kernel/smp.c
@@ -148,7 +148,7 @@ static void stop_this_cpu(void *dummy)
/*
* Remove this CPU:
*/
- set_cpu_online(smp_processor_id(), false);
+ cpu_clear(smp_processor_id(), cpu_online_map);
for (;;) {
if (cpu_wait)
(*cpu_wait)(); /* Wait if available. */
@@ -174,7 +174,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
mp_ops->prepare_cpus(max_cpus);
set_cpu_sibling_map(0);
#ifndef CONFIG_HOTPLUG_CPU
- init_cpu_present(cpu_possible_mask);
+ init_cpu_present(&cpu_possible_map);
#endif
}
@@ -248,7 +248,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
while (!cpu_isset(cpu, cpu_callin_map))
udelay(100);
- set_cpu_online(cpu, true);
+ cpu_set(cpu, cpu_online_map);
return 0;
}
@@ -320,12 +320,13 @@ void flush_tlb_mm(struct mm_struct *mm)
if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
} else {
+ cpumask_t mask = cpu_online_map;
unsigned int cpu;
- for_each_online_cpu(cpu) {
- if (cpu != smp_processor_id() && cpu_context(cpu, mm))
+ cpu_clear(smp_processor_id(), mask);
+ for_each_cpu_mask(cpu, mask)
+ if (cpu_context(cpu, mm))
cpu_context(cpu, mm) = 0;
- }
}
local_flush_tlb_mm(mm);
@@ -359,12 +360,13 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l
smp_on_other_tlbs(flush_tlb_range_ipi, &fd);
} else {
+ cpumask_t mask = cpu_online_map;
unsigned int cpu;
- for_each_online_cpu(cpu) {
- if (cpu != smp_processor_id() && cpu_context(cpu, mm))
+ cpu_clear(smp_processor_id(), mask);
+ for_each_cpu_mask(cpu, mask)
+ if (cpu_context(cpu, mm))
cpu_context(cpu, mm) = 0;
- }
}
local_flush_tlb_range(vma, start, end);
preempt_enable();
@@ -405,12 +407,13 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
smp_on_other_tlbs(flush_tlb_page_ipi, &fd);
} else {
+ cpumask_t mask = cpu_online_map;
unsigned int cpu;
- for_each_online_cpu(cpu) {
- if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm))
+ cpu_clear(smp_processor_id(), mask);
+ for_each_cpu_mask(cpu, mask)
+ if (cpu_context(cpu, vma->vm_mm))
cpu_context(cpu, vma->vm_mm) = 0;
- }
}
local_flush_tlb_page(vma, page);
preempt_enable();
diff --git a/trunk/arch/mips/kernel/smtc.c b/trunk/arch/mips/kernel/smtc.c
index f5dd38f1d015..c4f75bbc0bd6 100644
--- a/trunk/arch/mips/kernel/smtc.c
+++ b/trunk/arch/mips/kernel/smtc.c
@@ -291,7 +291,7 @@ static void smtc_configure_tlb(void)
* possibly leave some TCs/VPEs as "slave" processors.
*
* Use c0_MVPConf0 to find out how many TCs are available, setting up
- * cpu_possible_mask and the logical/physical mappings.
+ * cpu_possible_map and the logical/physical mappings.
*/
int __init smtc_build_cpu_map(int start_cpu_slot)
diff --git a/trunk/arch/mips/mm/c-octeon.c b/trunk/arch/mips/mm/c-octeon.c
index 47037ec5589b..1f9ca07f53c8 100644
--- a/trunk/arch/mips/mm/c-octeon.c
+++ b/trunk/arch/mips/mm/c-octeon.c
@@ -80,9 +80,9 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma)
if (vma)
mask = *mm_cpumask(vma->vm_mm);
else
- mask = *cpu_online_mask;
- cpumask_clear_cpu(cpu, &mask);
- for_each_cpu(cpu, &mask)
+ mask = cpu_online_map;
+ cpu_clear(cpu, mask);
+ for_each_cpu_mask(cpu, mask)
octeon_send_ipi_single(cpu, SMP_ICACHE_FLUSH);
preempt_enable();
diff --git a/trunk/arch/mips/mm/dma-default.c b/trunk/arch/mips/mm/dma-default.c
index 3fab2046c8a4..46084912e588 100644
--- a/trunk/arch/mips/mm/dma-default.c
+++ b/trunk/arch/mips/mm/dma-default.c
@@ -98,7 +98,7 @@ void *dma_alloc_noncoherent(struct device *dev, size_t size,
EXPORT_SYMBOL(dma_alloc_noncoherent);
static void *mips_dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t * dma_handle, gfp_t gfp, struct dma_attrs *attrs)
+ dma_addr_t * dma_handle, gfp_t gfp)
{
void *ret;
@@ -132,7 +132,7 @@ void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
EXPORT_SYMBOL(dma_free_noncoherent);
static void mips_dma_free_coherent(struct device *dev, size_t size, void *vaddr,
- dma_addr_t dma_handle, struct dma_attrs *attrs)
+ dma_addr_t dma_handle)
{
unsigned long addr = (unsigned long) vaddr;
int order = get_order(size);
@@ -323,8 +323,8 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
EXPORT_SYMBOL(dma_cache_sync);
static struct dma_map_ops mips_default_dma_map_ops = {
- .alloc = mips_dma_alloc_coherent,
- .free = mips_dma_free_coherent,
+ .alloc_coherent = mips_dma_alloc_coherent,
+ .free_coherent = mips_dma_free_coherent,
.map_page = mips_dma_map_page,
.unmap_page = mips_dma_unmap_page,
.map_sg = mips_dma_map_sg,
diff --git a/trunk/arch/mips/netlogic/common/smp.c b/trunk/arch/mips/netlogic/common/smp.c
index fab316de57e9..db17f49886c2 100644
--- a/trunk/arch/mips/netlogic/common/smp.c
+++ b/trunk/arch/mips/netlogic/common/smp.c
@@ -165,7 +165,7 @@ void __init nlm_smp_setup(void)
cpu_set(boot_cpu, phys_cpu_present_map);
__cpu_number_map[boot_cpu] = 0;
__cpu_logical_map[0] = boot_cpu;
- set_cpu_possible(0, true);
+ cpu_set(0, cpu_possible_map);
num_cpus = 1;
for (i = 0; i < NR_CPUS; i++) {
@@ -177,14 +177,14 @@ void __init nlm_smp_setup(void)
cpu_set(i, phys_cpu_present_map);
__cpu_number_map[i] = num_cpus;
__cpu_logical_map[num_cpus] = i;
- set_cpu_possible(num_cpus, true);
+ cpu_set(num_cpus, cpu_possible_map);
++num_cpus;
}
}
pr_info("Phys CPU present map: %lx, possible map %lx\n",
(unsigned long)phys_cpu_present_map.bits[0],
- (unsigned long)cpumask_bits(cpu_possible_mask)[0]);
+ (unsigned long)cpu_possible_map.bits[0]);
pr_info("Detected %i Slave CPU(s)\n", num_cpus);
nlm_set_nmi_handler(nlm_boot_secondary_cpus);
diff --git a/trunk/arch/mips/pmc-sierra/yosemite/smp.c b/trunk/arch/mips/pmc-sierra/yosemite/smp.c
index b71fae231049..2608752898c0 100644
--- a/trunk/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/trunk/arch/mips/pmc-sierra/yosemite/smp.c
@@ -146,7 +146,7 @@ static void __cpuinit yos_boot_secondary(int cpu, struct task_struct *idle)
}
/*
- * Detect available CPUs, populate cpu_possible_mask before smp_init
+ * Detect available CPUs, populate cpu_possible_map before smp_init
*
* We don't want to start the secondary CPU yet nor do we have a nice probing
* feature in PMON so we just assume presence of the secondary core.
@@ -155,10 +155,10 @@ static void __init yos_smp_setup(void)
{
int i;
- init_cpu_possible(cpu_none_mask);
+ cpus_clear(cpu_possible_map);
for (i = 0; i < 2; i++) {
- set_cpu_possible(i, true);
+ cpu_set(i, cpu_possible_map);
__cpu_number_map[i] = i;
__cpu_logical_map[i] = i;
}
@@ -169,7 +169,7 @@ static void __init yos_prepare_cpus(unsigned int max_cpus)
/*
* Be paranoid. Enable the IPI only if we're really about to go SMP.
*/
- if (num_possible_cpus())
+ if (cpus_weight(cpu_possible_map))
set_c0_status(STATUSF_IP5);
}
diff --git a/trunk/arch/mips/sgi-ip27/ip27-smp.c b/trunk/arch/mips/sgi-ip27/ip27-smp.c
index 735b43bf8f82..c6851df9ab74 100644
--- a/trunk/arch/mips/sgi-ip27/ip27-smp.c
+++ b/trunk/arch/mips/sgi-ip27/ip27-smp.c
@@ -76,7 +76,7 @@ static int do_cpumask(cnodeid_t cnode, nasid_t nasid, int highest)
/* Only let it join in if it's marked enabled */
if ((acpu->cpu_info.flags & KLINFO_ENABLE) &&
(tot_cpus_found != NR_CPUS)) {
- set_cpu_possible(cpuid, true);
+ cpu_set(cpuid, cpu_possible_map);
alloc_cpupda(cpuid, tot_cpus_found);
cpus_found++;
tot_cpus_found++;
diff --git a/trunk/arch/mips/sibyte/bcm1480/smp.c b/trunk/arch/mips/sibyte/bcm1480/smp.c
index de88e22694a0..d667875be564 100644
--- a/trunk/arch/mips/sibyte/bcm1480/smp.c
+++ b/trunk/arch/mips/sibyte/bcm1480/smp.c
@@ -138,7 +138,7 @@ static void __cpuinit bcm1480_boot_secondary(int cpu, struct task_struct *idle)
/*
* Use CFE to find out how many CPUs are available, setting up
- * cpu_possible_mask and the logical/physical mappings.
+ * cpu_possible_map and the logical/physical mappings.
* XXXKW will the boot CPU ever not be physical 0?
*
* Common setup before any secondaries are started
@@ -147,13 +147,14 @@ static void __init bcm1480_smp_setup(void)
{
int i, num;
- init_cpu_possible(cpumask_of(0));
+ cpus_clear(cpu_possible_map);
+ cpu_set(0, cpu_possible_map);
__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;
for (i = 1, num = 0; i < NR_CPUS; i++) {
if (cfe_cpu_stop(i) == 0) {
- set_cpu_possible(i, true);
+ cpu_set(i, cpu_possible_map);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
diff --git a/trunk/arch/mips/sibyte/sb1250/smp.c b/trunk/arch/mips/sibyte/sb1250/smp.c
index 285cfef4ebc0..38e7f6bd7922 100644
--- a/trunk/arch/mips/sibyte/sb1250/smp.c
+++ b/trunk/arch/mips/sibyte/sb1250/smp.c
@@ -126,7 +126,7 @@ static void __cpuinit sb1250_boot_secondary(int cpu, struct task_struct *idle)
/*
* Use CFE to find out how many CPUs are available, setting up
- * cpu_possible_mask and the logical/physical mappings.
+ * cpu_possible_map and the logical/physical mappings.
* XXXKW will the boot CPU ever not be physical 0?
*
* Common setup before any secondaries are started
@@ -135,13 +135,14 @@ static void __init sb1250_smp_setup(void)
{
int i, num;
- init_cpu_possible(cpumask_of(0));
+ cpus_clear(cpu_possible_map);
+ cpu_set(0, cpu_possible_map);
__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;
for (i = 1, num = 0; i < NR_CPUS; i++) {
if (cfe_cpu_stop(i) == 0) {
- set_cpu_possible(i, true);
+ cpu_set(i, cpu_possible_map);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
diff --git a/trunk/arch/parisc/include/asm/atomic.h b/trunk/arch/parisc/include/asm/atomic.h
index 6c6defc24619..3ae56073cc3d 100644
--- a/trunk/arch/parisc/include/asm/atomic.h
+++ b/trunk/arch/parisc/include/asm/atomic.h
@@ -6,7 +6,6 @@
#define _ASM_PARISC_ATOMIC_H_
#include
-#include
/*
* Atomic operations that C can't guarantee us. Useful for
@@ -49,6 +48,112 @@ extern arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
# define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
#endif
+/* This should get optimized out since it's never called.
+** Or get a link error if xchg is used "wrong".
+*/
+extern void __xchg_called_with_bad_pointer(void);
+
+
+/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
+extern unsigned long __xchg8(char, char *);
+extern unsigned long __xchg32(int, int *);
+#ifdef CONFIG_64BIT
+extern unsigned long __xchg64(unsigned long, unsigned long *);
+#endif
+
+/* optimizer better get rid of switch since size is a constant */
+static __inline__ unsigned long
+__xchg(unsigned long x, __volatile__ void * ptr, int size)
+{
+ switch(size) {
+#ifdef CONFIG_64BIT
+ case 8: return __xchg64(x,(unsigned long *) ptr);
+#endif
+ case 4: return __xchg32((int) x, (int *) ptr);
+ case 1: return __xchg8((char) x, (char *) ptr);
+ }
+ __xchg_called_with_bad_pointer();
+ return x;
+}
+
+
+/*
+** REVISIT - Abandoned use of LDCW in xchg() for now:
+** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
+** o and while we are at it, could CONFIG_64BIT code use LDCD too?
+**
+** if (__builtin_constant_p(x) && (x == NULL))
+** if (((unsigned long)p & 0xf) == 0)
+** return __ldcw(p);
+*/
+#define xchg(ptr,x) \
+ ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+
+#define __HAVE_ARCH_CMPXCHG 1
+
+/* bug catcher for when unsupported size is used - won't link */
+extern void __cmpxchg_called_with_bad_pointer(void);
+
+/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
+extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, unsigned int new_);
+extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new_);
+
+/* don't worry...optimizer will get rid of most of this */
+static __inline__ unsigned long
+__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
+{
+ switch(size) {
+#ifdef CONFIG_64BIT
+ case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
+#endif
+ case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_);
+ }
+ __cmpxchg_called_with_bad_pointer();
+ return old;
+}
+
+#define cmpxchg(ptr,o,n) \
+ ({ \
+ __typeof__(*(ptr)) _o_ = (o); \
+ __typeof__(*(ptr)) _n_ = (n); \
+ (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
+ (unsigned long)_n_, sizeof(*(ptr))); \
+ })
+
+#include
+
+static inline unsigned long __cmpxchg_local(volatile void *ptr,
+ unsigned long old,
+ unsigned long new_, int size)
+{
+ switch (size) {
+#ifdef CONFIG_64BIT
+ case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
+#endif
+ case 4: return __cmpxchg_u32(ptr, old, new_);
+ default:
+ return __cmpxchg_local_generic(ptr, old, new_, size);
+ }
+}
+
+/*
+ * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
+ * them available.
+ */
+#define cmpxchg_local(ptr, o, n) \
+ ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
+ (unsigned long)(n), sizeof(*(ptr))))
+#ifdef CONFIG_64BIT
+#define cmpxchg64_local(ptr, o, n) \
+ ({ \
+ BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
+ cmpxchg_local((ptr), (o), (n)); \
+ })
+#else
+#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
+#endif
+
/*
* Note that we need not lock read accesses - aligned word writes/reads
* are atomic, so a reader never sees inconsistent values.
diff --git a/trunk/arch/parisc/include/asm/cmpxchg.h b/trunk/arch/parisc/include/asm/cmpxchg.h
deleted file mode 100644
index dbd13354ec41..000000000000
--- a/trunk/arch/parisc/include/asm/cmpxchg.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * forked from parisc asm/atomic.h which was:
- * Copyright (C) 2000 Philipp Rumpf
- * Copyright (C) 2006 Kyle McMartin
- */
-
-#ifndef _ASM_PARISC_CMPXCHG_H_
-#define _ASM_PARISC_CMPXCHG_H_
-
-/* This should get optimized out since it's never called.
-** Or get a link error if xchg is used "wrong".
-*/
-extern void __xchg_called_with_bad_pointer(void);
-
-/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
-extern unsigned long __xchg8(char, char *);
-extern unsigned long __xchg32(int, int *);
-#ifdef CONFIG_64BIT
-extern unsigned long __xchg64(unsigned long, unsigned long *);
-#endif
-
-/* optimizer better get rid of switch since size is a constant */
-static inline unsigned long
-__xchg(unsigned long x, __volatile__ void *ptr, int size)
-{
- switch (size) {
-#ifdef CONFIG_64BIT
- case 8: return __xchg64(x, (unsigned long *) ptr);
-#endif
- case 4: return __xchg32((int) x, (int *) ptr);
- case 1: return __xchg8((char) x, (char *) ptr);
- }
- __xchg_called_with_bad_pointer();
- return x;
-}
-
-/*
-** REVISIT - Abandoned use of LDCW in xchg() for now:
-** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
-** o and while we are at it, could CONFIG_64BIT code use LDCD too?
-**
-** if (__builtin_constant_p(x) && (x == NULL))
-** if (((unsigned long)p & 0xf) == 0)
-** return __ldcw(p);
-*/
-#define xchg(ptr, x) \
- ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
-
-#define __HAVE_ARCH_CMPXCHG 1
-
-/* bug catcher for when unsupported size is used - won't link */
-extern void __cmpxchg_called_with_bad_pointer(void);
-
-/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
-extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old,
- unsigned int new_);
-extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr,
- unsigned long old, unsigned long new_);
-
-/* don't worry...optimizer will get rid of most of this */
-static inline unsigned long
-__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
-{
- switch (size) {
-#ifdef CONFIG_64BIT
- case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
-#endif
- case 4: return __cmpxchg_u32((unsigned int *)ptr,
- (unsigned int)old, (unsigned int)new_);
- }
- __cmpxchg_called_with_bad_pointer();
- return old;
-}
-
-#define cmpxchg(ptr, o, n) \
-({ \
- __typeof__(*(ptr)) _o_ = (o); \
- __typeof__(*(ptr)) _n_ = (n); \
- (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
- (unsigned long)_n_, sizeof(*(ptr))); \
-})
-
-#include
-
-static inline unsigned long __cmpxchg_local(volatile void *ptr,
- unsigned long old,
- unsigned long new_, int size)
-{
- switch (size) {
-#ifdef CONFIG_64BIT
- case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
-#endif
- case 4: return __cmpxchg_u32(ptr, old, new_);
- default:
- return __cmpxchg_local_generic(ptr, old, new_, size);
- }
-}
-
-/*
- * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
- * them available.
- */
-#define cmpxchg_local(ptr, o, n) \
- ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
- (unsigned long)(n), sizeof(*(ptr))))
-#ifdef CONFIG_64BIT
-#define cmpxchg64_local(ptr, o, n) \
-({ \
- BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
- cmpxchg_local((ptr), (o), (n)); \
-})
-#else
-#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
-#endif
-
-#endif /* _ASM_PARISC_CMPXCHG_H_ */
diff --git a/trunk/arch/powerpc/boot/dts/p1020mbg-pc.dtsi b/trunk/arch/powerpc/boot/dts/p1020mbg-pc.dtsi
deleted file mode 100644
index a24699cfea9c..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020mbg-pc.dtsi
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * P1020 MBG-PC Device Tree Source stub (no addresses or top-level ranges)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-&lbc {
- nor@0,0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "cfi-flash";
- reg = <0x0 0x0 0x4000000>;
- bank-width = <2>;
- device-width = <1>;
-
- partition@0 {
- /* 128KB for DTB Image */
- reg = <0x0 0x00020000>;
- label = "NOR DTB Image";
- };
-
- partition@20000 {
- /* 3.875 MB for Linux Kernel Image */
- reg = <0x00020000 0x003e0000>;
- label = "NOR Linux Kernel Image";
- };
-
- partition@400000 {
- /* 58MB for Root file System */
- reg = <0x00400000 0x03a00000>;
- label = "NOR Root File System";
- };
-
- partition@3e00000 {
- /* This location must not be altered */
- /* 1M for Vitesse 7385 Switch firmware */
- reg = <0x3e00000 0x00100000>;
- label = "NOR Vitesse-7385 Firmware";
- read-only;
- };
-
- partition@3f00000 {
- /* This location must not be altered */
- /* 512KB for u-boot Bootloader Image */
- /* 512KB for u-boot Environment Variables */
- reg = <0x03f00000 0x00100000>;
- label = "NOR U-Boot Image";
- read-only;
- };
- };
-
- L2switch@2,0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "vitesse-7385";
- reg = <0x2 0x0 0x20000>;
- };
-};
-
-&soc {
- i2c@3000 {
- rtc@68 {
- compatible = "dallas,ds1339";
- reg = <0x68>;
- };
- };
-
- mdio@24000 {
- phy0: ethernet-phy@0 {
- interrupts = <3 1 0 0>;
- reg = <0x0>;
- };
- phy1: ethernet-phy@1 {
- interrupts = <2 1 0 0>;
- reg = <0x1>;
- };
- };
-
- mdio@25000 {
- tbi1: tbi-phy@11 {
- reg = <0x11>;
- device_type = "tbi-phy";
- };
- };
-
- mdio@26000 {
- tbi2: tbi-phy@11 {
- reg = <0x11>;
- device_type = "tbi-phy";
- };
- };
-
- enet0: ethernet@b0000 {
- fixed-link = <1 1 1000 0 0>;
- phy-connection-type = "rgmii-id";
- };
-
- enet1: ethernet@b1000 {
- phy-handle = <&phy0>;
- tbi-handle = <&tbi1>;
- phy-connection-type = "sgmii";
- };
-
- enet2: ethernet@b2000 {
- phy-handle = <&phy1>;
- phy-connection-type = "rgmii-id";
- };
-
- usb@22000 {
- phy_type = "ulpi";
- };
-
- /* USB2 is shared with localbus, so it must be disabled
- by default. We can't put 'status = "disabled";' here
- since U-Boot doesn't clear the status property when
- it enables USB2. OTOH, U-Boot does create a new node
- when there isn't any. So, just comment it out.
- */
- usb@23000 {
- status = "disabled";
- phy_type = "ulpi";
- };
-};
diff --git a/trunk/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts b/trunk/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts
deleted file mode 100644
index ab8f076eae90..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * P1020 MBG-PC Device Tree Source (32-bit address map)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/include/ "fsl/p1020si-pre.dtsi"
-/ {
- model = "fsl,P1020MBG-PC";
- compatible = "fsl,P1020MBG-PC";
-
- memory {
- device_type = "memory";
- };
-
- lbc: localbus@ffe05000 {
- reg = <0x0 0xffe05000 0x0 0x1000>;
-
- /* NOR and L2 switch */
- ranges = <0x0 0x0 0x0 0xec000000 0x04000000
- 0x1 0x0 0x0 0xffa00000 0x00040000
- 0x2 0x0 0x0 0xffb00000 0x00020000>;
- };
-
- soc: soc@ffe00000 {
- ranges = <0x0 0x0 0xffe00000 0x100000>;
- };
-
- pci0: pcie@ffe09000 {
- reg = <0x0 0xffe09000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0x0 0xa0000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0x0 0xffc10000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-
- pci1: pcie@ffe0a000 {
- reg = <0x0 0xffe0a000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0x0 0x80000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0x0 0xffc00000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-};
-
-/include/ "p1020mbg-pc.dtsi"
-/include/ "fsl/p1020si-post.dtsi"
diff --git a/trunk/arch/powerpc/boot/dts/p1020mbg-pc_36b.dts b/trunk/arch/powerpc/boot/dts/p1020mbg-pc_36b.dts
deleted file mode 100644
index 9e9f401419b1..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020mbg-pc_36b.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * P1020 MBG-PC Device Tree Source (36-bit address map)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/include/ "fsl/p1020si-pre.dtsi"
-/ {
- model = "fsl,P1020MBG-PC";
- compatible = "fsl,P1020MBG-PC";
-
- memory {
- device_type = "memory";
- };
-
- lbc: localbus@fffe05000 {
- reg = <0xf 0xffe05000 0x0 0x1000>;
-
- /* NOR and L2 switch */
- ranges = <0x0 0x0 0xf 0xec000000 0x04000000
- 0x1 0x0 0xf 0xffa00000 0x00040000
- 0x2 0x0 0xf 0xffb00000 0x00020000>;
- };
-
- soc: soc@fffe00000 {
- ranges = <0x0 0xf 0xffe00000 0x100000>;
- };
-
- pci0: pcie@fffe09000 {
- reg = <0xf 0xffe09000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-
- pci1: pcie@fffe0a000 {
- reg = <0xf 0xffe0a000 0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0xc 0x00000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0xf 0xffc00000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-};
-
-/include/ "p1020mbg-pc.dtsi"
-/include/ "fsl/p1020si-post.dtsi"
diff --git a/trunk/arch/powerpc/boot/dts/p1020utm-pc.dtsi b/trunk/arch/powerpc/boot/dts/p1020utm-pc.dtsi
deleted file mode 100644
index 7ea85eabcc5c..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020utm-pc.dtsi
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * P1020 UTM-PC Device Tree Source stub (no addresses or top-level ranges)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-&lbc {
- nor@0,0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "cfi-flash";
- reg = <0x0 0x0 0x2000000>;
- bank-width = <2>;
- device-width = <1>;
-
- partition@0 {
- /* 256KB for DTB Image */
- reg = <0x0 0x00040000>;
- label = "NOR DTB Image";
- };
-
- partition@40000 {
- /* 3.75 MB for Linux Kernel Image */
- reg = <0x00040000 0x003c0000>;
- label = "NOR Linux Kernel Image";
- };
-
- partition@400000 {
- /* 27MB for Root file System */
- reg = <0x00400000 0x01b00000>;
- label = "NOR Root File System";
- };
-
- partition@1f00000 {
- /* This location must not be altered */
- /* 512KB for u-boot Bootloader Image */
- /* 512KB for u-boot Environment Variables */
- reg = <0x01f00000 0x00100000>;
- label = "NOR U-Boot Image";
- read-only;
- };
- };
-};
-
-&soc {
- i2c@3000 {
- rtc@68 {
- compatible = "dallas,ds1339";
- reg = <0x68>;
- };
- };
-
- mdio@24000 {
- phy0: ethernet-phy@0 {
- interrupts = <3 1 0 0>;
- reg = <0x0>;
- };
- phy1: ethernet-phy@1 {
- interrupts = <2 1 0 0>;
- reg = <0x1>;
- };
- phy2: ethernet-phy@2 {
- interrupts = <1 1 0 0>;
- reg = <0x2>;
- };
- };
-
- mdio@25000 {
- tbi1: tbi-phy@11 {
- reg = <0x11>;
- device_type = "tbi-phy";
- };
- };
-
- mdio@26000 {
- tbi2: tbi-phy@11 {
- reg = <0x11>;
- device_type = "tbi-phy";
- };
- };
-
- enet0: ethernet@b0000 {
- phy-handle = <&phy2>;
- phy-connection-type = "rgmii-id";
- };
-
- enet1: ethernet@b1000 {
- phy-handle = <&phy0>;
- tbi-handle = <&tbi1>;
- phy-connection-type = "sgmii";
- };
-
- enet2: ethernet@b2000 {
- phy-handle = <&phy1>;
- phy-connection-type = "rgmii-id";
- };
-
- usb@22000 {
- phy_type = "ulpi";
- };
-
- /* USB2 is shared with localbus, so it must be disabled
- by default. We can't put 'status = "disabled";' here
- since U-Boot doesn't clear the status property when
- it enables USB2. OTOH, U-Boot does create a new node
- when there isn't any. So, just comment it out.
- */
- usb@23000 {
- status = "disabled";
- phy_type = "ulpi";
- };
-};
diff --git a/trunk/arch/powerpc/boot/dts/p1020utm-pc_32b.dts b/trunk/arch/powerpc/boot/dts/p1020utm-pc_32b.dts
deleted file mode 100644
index 4bfdd8971cdb..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020utm-pc_32b.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * P1020 UTM-PC Device Tree Source (32-bit address map)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/include/ "fsl/p1020si-pre.dtsi"
-/ {
- model = "fsl,P1020UTM-PC";
- compatible = "fsl,P1020UTM-PC";
-
- memory {
- device_type = "memory";
- };
-
- lbc: localbus@ffe05000 {
- reg = <0x0 0xffe05000 0x0 0x1000>;
-
- /* NOR */
- ranges = <0x0 0x0 0x0 0xec000000 0x02000000
- 0x1 0x0 0x0 0xffa00000 0x00040000
- 0x2 0x0 0x0 0xffb00000 0x00020000>;
- };
-
- soc: soc@ffe00000 {
- ranges = <0x0 0x0 0xffe00000 0x100000>;
- };
-
- pci0: pcie@ffe09000 {
- reg = <0x0 0xffe09000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0x0 0xa0000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0x0 0xffc10000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-
- pci1: pcie@ffe0a000 {
- reg = <0x0 0xffe0a000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0x0 0x80000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0x0 0xffc00000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-};
-
-/include/ "p1020utm-pc.dtsi"
-/include/ "fsl/p1020si-post.dtsi"
diff --git a/trunk/arch/powerpc/boot/dts/p1020utm-pc_36b.dts b/trunk/arch/powerpc/boot/dts/p1020utm-pc_36b.dts
deleted file mode 100644
index abec53557501..000000000000
--- a/trunk/arch/powerpc/boot/dts/p1020utm-pc_36b.dts
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * P1020 UTM-PC Device Tree Source (36-bit address map)
- *
- * Copyright 2012 Freescale Semiconductor Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Freescale Semiconductor nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- *
- * ALTERNATIVELY, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") as published by the Free Software
- * Foundation, either version 2 of that License or (at your option) any
- * later version.
- *
- * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/include/ "fsl/p1020si-pre.dtsi"
-/ {
- model = "fsl,P1020UTM-PC";
- compatible = "fsl,P1020UTM-PC";
-
- memory {
- device_type = "memory";
- };
-
- lbc: localbus@fffe05000 {
- reg = <0xf 0xffe05000 0x0 0x1000>;
-
- /* NOR */
- ranges = <0x0 0x0 0xf 0xec000000 0x02000000
- 0x1 0x0 0xf 0xffa00000 0x00040000
- 0x2 0x0 0xf 0xffb00000 0x00020000>;
- };
-
- soc: soc@fffe00000 {
- ranges = <0x0 0xf 0xffe00000 0x100000>;
- };
-
- pci0: pcie@fffe09000 {
- reg = <0xf 0xffe09000 0x0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0xf 0xffc10000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-
- pci1: pcie@fffe0a000 {
- reg = <0xf 0xffe0a000 0 0x1000>;
- ranges = <0x2000000 0x0 0xe0000000 0xc 0x00000000 0x0 0x20000000
- 0x1000000 0x0 0x00000000 0xf 0xffc00000 0x0 0x10000>;
- pcie@0 {
- ranges = <0x2000000 0x0 0xe0000000
- 0x2000000 0x0 0xe0000000
- 0x0 0x20000000
-
- 0x1000000 0x0 0x0
- 0x1000000 0x0 0x0
- 0x0 0x100000>;
- };
- };
-};
-
-/include/ "p1020utm-pc.dtsi"
-/include/ "fsl/p1020si-post.dtsi"
diff --git a/trunk/arch/powerpc/boot/dts/p2041rdb.dts b/trunk/arch/powerpc/boot/dts/p2041rdb.dts
index 285213976a7f..4f957db01230 100644
--- a/trunk/arch/powerpc/boot/dts/p2041rdb.dts
+++ b/trunk/arch/powerpc/boot/dts/p2041rdb.dts
@@ -135,6 +135,7 @@
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
+ fsl,msi = <&msi0>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -150,6 +151,7 @@
reg = <0xf 0xfe201000 0 0x1000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
+ fsl,msi = <&msi1>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -165,6 +167,7 @@
reg = <0xf 0xfe202000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
diff --git a/trunk/arch/powerpc/boot/dts/p3041ds.dts b/trunk/arch/powerpc/boot/dts/p3041ds.dts
index 22a215e94162..f469145abaeb 100644
--- a/trunk/arch/powerpc/boot/dts/p3041ds.dts
+++ b/trunk/arch/powerpc/boot/dts/p3041ds.dts
@@ -173,6 +173,7 @@
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
+ fsl,msi = <&msi0>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -188,6 +189,7 @@
reg = <0xf 0xfe201000 0 0x1000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
+ fsl,msi = <&msi1>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -203,6 +205,7 @@
reg = <0xf 0xfe202000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -218,6 +221,7 @@
reg = <0xf 0xfe203000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x60000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
diff --git a/trunk/arch/powerpc/boot/dts/p3060qds.dts b/trunk/arch/powerpc/boot/dts/p3060qds.dts
index 9ae875c8a211..529042e4b9a2 100644
--- a/trunk/arch/powerpc/boot/dts/p3060qds.dts
+++ b/trunk/arch/powerpc/boot/dts/p3060qds.dts
@@ -212,6 +212,7 @@
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
+ fsl,msi = <&msi0>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -227,6 +228,7 @@
reg = <0xf 0xfe201000 0 0x1000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
+ fsl,msi = <&msi1>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
diff --git a/trunk/arch/powerpc/boot/dts/p4080ds.dts b/trunk/arch/powerpc/boot/dts/p4080ds.dts
index 3e204609d02e..6d60e54e50a0 100644
--- a/trunk/arch/powerpc/boot/dts/p4080ds.dts
+++ b/trunk/arch/powerpc/boot/dts/p4080ds.dts
@@ -141,6 +141,7 @@
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
+ fsl,msi = <&msi0>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -156,6 +157,7 @@
reg = <0xf 0xfe201000 0 0x1000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
+ fsl,msi = <&msi1>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -171,6 +173,7 @@
reg = <0xf 0xfe202000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
diff --git a/trunk/arch/powerpc/boot/dts/p5020ds.dts b/trunk/arch/powerpc/boot/dts/p5020ds.dts
index 27c07ed6adc1..1c250684c902 100644
--- a/trunk/arch/powerpc/boot/dts/p5020ds.dts
+++ b/trunk/arch/powerpc/boot/dts/p5020ds.dts
@@ -173,6 +173,7 @@
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
+ fsl,msi = <&msi0>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -188,6 +189,7 @@
reg = <0xf 0xfe201000 0 0x1000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
+ fsl,msi = <&msi1>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -203,6 +205,7 @@
reg = <0xf 0xfe202000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
@@ -218,6 +221,7 @@
reg = <0xf 0xfe203000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x60000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
+ fsl,msi = <&msi2>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
diff --git a/trunk/arch/powerpc/configs/corenet32_smp_defconfig b/trunk/arch/powerpc/configs/corenet32_smp_defconfig
index 91db656294e8..f8aef205d222 100644
--- a/trunk/arch/powerpc/configs/corenet32_smp_defconfig
+++ b/trunk/arch/powerpc/configs/corenet32_smp_defconfig
@@ -116,7 +116,6 @@ CONFIG_SERIAL_8250_RSA=y
CONFIG_HW_RANDOM=y
CONFIG_NVRAM=y
CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MPC=y
CONFIG_SPI=y
CONFIG_SPI_GPIO=y
diff --git a/trunk/arch/powerpc/configs/corenet64_smp_defconfig b/trunk/arch/powerpc/configs/corenet64_smp_defconfig
index 6798343580f0..82b13bfcf3c0 100644
--- a/trunk/arch/powerpc/configs/corenet64_smp_defconfig
+++ b/trunk/arch/powerpc/configs/corenet64_smp_defconfig
@@ -71,8 +71,6 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_MPC=y
# CONFIG_HWMON is not set
CONFIG_VIDEO_OUTPUT_CONTROL=y
# CONFIG_HID_SUPPORT is not set
diff --git a/trunk/arch/powerpc/configs/mpc85xx_defconfig b/trunk/arch/powerpc/configs/mpc85xx_defconfig
index d6b6df5e8743..cc87a8441566 100644
--- a/trunk/arch/powerpc/configs/mpc85xx_defconfig
+++ b/trunk/arch/powerpc/configs/mpc85xx_defconfig
@@ -117,7 +117,6 @@ CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_QE=m
CONFIG_NVRAM=y
CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
CONFIG_I2C_CPM=m
CONFIG_I2C_MPC=y
CONFIG_SPI=y
diff --git a/trunk/arch/powerpc/configs/mpc85xx_smp_defconfig b/trunk/arch/powerpc/configs/mpc85xx_smp_defconfig
index 5b0e2926becd..48d6682f2434 100644
--- a/trunk/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/trunk/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -119,7 +119,6 @@ CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_QE=m
CONFIG_NVRAM=y
CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
CONFIG_I2C_CPM=m
CONFIG_I2C_MPC=y
CONFIG_SPI=y
diff --git a/trunk/arch/powerpc/include/asm/dma-mapping.h b/trunk/arch/powerpc/include/asm/dma-mapping.h
index 62678e365ca0..dd70fac57ec8 100644
--- a/trunk/arch/powerpc/include/asm/dma-mapping.h
+++ b/trunk/arch/powerpc/include/asm/dma-mapping.h
@@ -22,11 +22,9 @@
/* Some dma direct funcs must be visible for use in other dma_ops */
extern void *dma_direct_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs);
+ dma_addr_t *dma_handle, gfp_t flag);
extern void dma_direct_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs);
+ void *vaddr, dma_addr_t dma_handle);
#ifdef CONFIG_NOT_COHERENT_CACHE
@@ -132,29 +130,23 @@ static inline int dma_supported(struct device *dev, u64 mask)
extern int dma_set_mask(struct device *dev, u64 dma_mask);
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
void *cpu_addr;
BUG_ON(!dma_ops);
- cpu_addr = dma_ops->alloc(dev, size, dma_handle, flag, attrs);
+ cpu_addr = dma_ops->alloc_coherent(dev, size, dma_handle, flag);
debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr);
return cpu_addr;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
@@ -162,7 +154,7 @@ static inline void dma_free_attrs(struct device *dev, size_t size,
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
- dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
+ dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
}
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
diff --git a/trunk/arch/powerpc/include/asm/epapr_hcalls.h b/trunk/arch/powerpc/include/asm/epapr_hcalls.h
index 976835d8f22e..f3b0c2cc9fea 100644
--- a/trunk/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/trunk/arch/powerpc/include/asm/epapr_hcalls.h
@@ -134,15 +134,10 @@
* whether they will be clobbered.
*
* Note that r11 can be used as an output parameter.
- *
- * The "memory" clobber is only necessary for hcalls where the Hypervisor
- * will read or write guest memory. However, we add it to all hcalls because
- * the impact is minimal, and we want to ensure that it's present for the
- * hcalls that need it.
*/
/* List of common clobbered registers. Do not use this macro. */
-#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc", "memory"
+#define EV_HCALL_CLOBBERS "r0", "r12", "xer", "ctr", "lr", "cc"
#define EV_HCALL_CLOBBERS8 EV_HCALL_CLOBBERS
#define EV_HCALL_CLOBBERS7 EV_HCALL_CLOBBERS8, "r10"
diff --git a/trunk/arch/powerpc/include/asm/fsl_guts.h b/trunk/arch/powerpc/include/asm/fsl_guts.h
index aa4c488589ce..ce04530d2000 100644
--- a/trunk/arch/powerpc/include/asm/fsl_guts.h
+++ b/trunk/arch/powerpc/include/asm/fsl_guts.h
@@ -16,6 +16,15 @@
#define __ASM_POWERPC_FSL_GUTS_H__
#ifdef __KERNEL__
+/*
+ * These #ifdefs are safe because it's not possible to build a kernel that
+ * runs on e500 and e600 cores.
+ */
+
+#if !defined(CONFIG_PPC_85xx) && !defined(CONFIG_PPC_86xx)
+#error Only 85xx and 86xx SOCs are supported
+#endif
+
/**
* Global Utility Registers.
*
@@ -27,7 +36,11 @@
* different names. In these cases, one name is chosen to avoid extraneous
* #ifdefs.
*/
-struct ccsr_guts {
+#ifdef CONFIG_PPC_85xx
+struct ccsr_guts_85xx {
+#else
+struct ccsr_guts_86xx {
+#endif
__be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
__be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
__be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */
@@ -64,8 +77,11 @@ struct ccsr_guts {
u8 res0a8[0xb0 - 0xa8];
__be32 rstcr; /* 0x.00b0 - Reset Control Register */
u8 res0b4[0xc0 - 0xb4];
- __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register
- Called 'elbcvselcr' on 86xx SOCs */
+#ifdef CONFIG_PPC_85xx
+ __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register */
+#else
+ __be32 elbcvselcr; /* 0x.00c0 - eLBC Voltage Select Ctrl Reg */
+#endif
u8 res0c4[0x224 - 0xc4];
__be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
__be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
@@ -120,7 +136,7 @@ struct ccsr_guts {
* ch: The channel on the DMA controller (0, 1, 2, or 3)
* device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx)
*/
-static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
+static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
unsigned int co, unsigned int ch, unsigned int device)
{
unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
@@ -156,7 +172,7 @@ static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
* ch: The channel on the DMA controller (0, 1, 2, or 3)
* value: the new value for the bit (0 or 1)
*/
-static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
+static inline void guts_set_pmuxcr_dma(struct ccsr_guts_86xx __iomem *guts,
unsigned int co, unsigned int ch, unsigned int value)
{
if ((ch == 0) || (ch == 3)) {
diff --git a/trunk/arch/powerpc/kernel/dma-iommu.c b/trunk/arch/powerpc/kernel/dma-iommu.c
index bcfdcd22c766..3f6464b4d970 100644
--- a/trunk/arch/powerpc/kernel/dma-iommu.c
+++ b/trunk/arch/powerpc/kernel/dma-iommu.c
@@ -17,8 +17,7 @@
* to the dma address (mapping) of the first page.
*/
static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size,
dma_handle, dev->coherent_dma_mask, flag,
@@ -26,8 +25,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
}
static void dma_iommu_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle);
}
@@ -107,8 +105,8 @@ static u64 dma_iommu_get_required_mask(struct device *dev)
}
struct dma_map_ops dma_iommu_ops = {
- .alloc = dma_iommu_alloc_coherent,
- .free = dma_iommu_free_coherent,
+ .alloc_coherent = dma_iommu_alloc_coherent,
+ .free_coherent = dma_iommu_free_coherent,
.map_sg = dma_iommu_map_sg,
.unmap_sg = dma_iommu_unmap_sg,
.dma_supported = dma_iommu_dma_supported,
diff --git a/trunk/arch/powerpc/kernel/dma-swiotlb.c b/trunk/arch/powerpc/kernel/dma-swiotlb.c
index 4ab88dafb235..1ebc9189aada 100644
--- a/trunk/arch/powerpc/kernel/dma-swiotlb.c
+++ b/trunk/arch/powerpc/kernel/dma-swiotlb.c
@@ -47,8 +47,8 @@ static u64 swiotlb_powerpc_get_required(struct device *dev)
* for everything else.
*/
struct dma_map_ops swiotlb_dma_ops = {
- .alloc = dma_direct_alloc_coherent,
- .free = dma_direct_free_coherent,
+ .alloc_coherent = dma_direct_alloc_coherent,
+ .free_coherent = dma_direct_free_coherent,
.map_sg = swiotlb_map_sg_attrs,
.unmap_sg = swiotlb_unmap_sg_attrs,
.dma_supported = swiotlb_dma_supported,
diff --git a/trunk/arch/powerpc/kernel/dma.c b/trunk/arch/powerpc/kernel/dma.c
index b1ec983dcec8..7d0233c12ee3 100644
--- a/trunk/arch/powerpc/kernel/dma.c
+++ b/trunk/arch/powerpc/kernel/dma.c
@@ -26,8 +26,7 @@
void *dma_direct_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret;
#ifdef CONFIG_NOT_COHERENT_CACHE
@@ -55,8 +54,7 @@ void *dma_direct_alloc_coherent(struct device *dev, size_t size,
}
void dma_direct_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
#ifdef CONFIG_NOT_COHERENT_CACHE
__dma_free_coherent(size, vaddr);
@@ -152,8 +150,8 @@ static inline void dma_direct_sync_single(struct device *dev,
#endif
struct dma_map_ops dma_direct_ops = {
- .alloc = dma_direct_alloc_coherent,
- .free = dma_direct_free_coherent,
+ .alloc_coherent = dma_direct_alloc_coherent,
+ .free_coherent = dma_direct_free_coherent,
.map_sg = dma_direct_map_sg,
.unmap_sg = dma_direct_unmap_sg,
.dma_supported = dma_direct_dma_supported,
diff --git a/trunk/arch/powerpc/kernel/fadump.c b/trunk/arch/powerpc/kernel/fadump.c
index 18bdf74fa164..cfe7a38708c3 100644
--- a/trunk/arch/powerpc/kernel/fadump.c
+++ b/trunk/arch/powerpc/kernel/fadump.c
@@ -40,8 +40,6 @@
#include
#include
#include
-#include
-#include
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/trunk/arch/powerpc/kernel/ibmebus.c b/trunk/arch/powerpc/kernel/ibmebus.c
index b01d14eeca8d..79bb282e6501 100644
--- a/trunk/arch/powerpc/kernel/ibmebus.c
+++ b/trunk/arch/powerpc/kernel/ibmebus.c
@@ -65,8 +65,7 @@ static struct of_device_id __initdata ibmebus_matches[] = {
static void *ibmebus_alloc_coherent(struct device *dev,
size_t size,
dma_addr_t *dma_handle,
- gfp_t flag,
- struct dma_attrs *attrs)
+ gfp_t flag)
{
void *mem;
@@ -78,8 +77,7 @@ static void *ibmebus_alloc_coherent(struct device *dev,
static void ibmebus_free_coherent(struct device *dev,
size_t size, void *vaddr,
- dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ dma_addr_t dma_handle)
{
kfree(vaddr);
}
@@ -138,8 +136,8 @@ static u64 ibmebus_dma_get_required_mask(struct device *dev)
}
static struct dma_map_ops ibmebus_dma_ops = {
- .alloc = ibmebus_alloc_coherent,
- .free = ibmebus_free_coherent,
+ .alloc_coherent = ibmebus_alloc_coherent,
+ .free_coherent = ibmebus_free_coherent,
.map_sg = ibmebus_map_sg,
.unmap_sg = ibmebus_unmap_sg,
.dma_supported = ibmebus_dma_supported,
diff --git a/trunk/arch/powerpc/kernel/kgdb.c b/trunk/arch/powerpc/kernel/kgdb.c
index 782bd0a3c2f0..76a6e40a6f7c 100644
--- a/trunk/arch/powerpc/kernel/kgdb.c
+++ b/trunk/arch/powerpc/kernel/kgdb.c
@@ -24,7 +24,6 @@
#include
#include
#include
-#include
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/trunk/arch/powerpc/kernel/vio.c b/trunk/arch/powerpc/kernel/vio.c
index a3a99901c8ec..b2f7c8480bf6 100644
--- a/trunk/arch/powerpc/kernel/vio.c
+++ b/trunk/arch/powerpc/kernel/vio.c
@@ -482,8 +482,7 @@ static void vio_cmo_balance(struct work_struct *work)
}
static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct vio_dev *viodev = to_vio_dev(dev);
void *ret;
@@ -493,7 +492,7 @@ static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size,
return NULL;
}
- ret = dma_iommu_ops.alloc(dev, size, dma_handle, flag, attrs);
+ ret = dma_iommu_ops.alloc_coherent(dev, size, dma_handle, flag);
if (unlikely(ret == NULL)) {
vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE));
atomic_inc(&viodev->cmo.allocs_failed);
@@ -503,12 +502,11 @@ static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size,
}
static void vio_dma_iommu_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
struct vio_dev *viodev = to_vio_dev(dev);
- dma_iommu_ops.free(dev, size, vaddr, dma_handle, attrs);
+ dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle);
vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE));
}
@@ -609,8 +607,8 @@ static u64 vio_dma_get_required_mask(struct device *dev)
}
struct dma_map_ops vio_dma_mapping_ops = {
- .alloc = vio_dma_iommu_alloc_coherent,
- .free = vio_dma_iommu_free_coherent,
+ .alloc_coherent = vio_dma_iommu_alloc_coherent,
+ .free_coherent = vio_dma_iommu_free_coherent,
.map_sg = vio_dma_iommu_map_sg,
.unmap_sg = vio_dma_iommu_unmap_sg,
.map_page = vio_dma_iommu_map_page,
diff --git a/trunk/arch/powerpc/kvm/book3s_emulate.c b/trunk/arch/powerpc/kvm/book3s_emulate.c
index 135663a3e4fc..f1950d131827 100644
--- a/trunk/arch/powerpc/kvm/book3s_emulate.c
+++ b/trunk/arch/powerpc/kvm/book3s_emulate.c
@@ -21,7 +21,6 @@
#include
#include
#include
-#include
#define OP_19_XOP_RFID 18
#define OP_19_XOP_RFI 50
diff --git a/trunk/arch/powerpc/kvm/book3s_paired_singles.c b/trunk/arch/powerpc/kvm/book3s_paired_singles.c
index a59a25a13218..e70ef2d86431 100644
--- a/trunk/arch/powerpc/kvm/book3s_paired_singles.c
+++ b/trunk/arch/powerpc/kvm/book3s_paired_singles.c
@@ -24,7 +24,6 @@
#include
#include
#include
-#include
#include
/* #define DEBUG */
diff --git a/trunk/arch/powerpc/kvm/book3s_pr.c b/trunk/arch/powerpc/kvm/book3s_pr.c
index 642d88574b07..7340e1090b77 100644
--- a/trunk/arch/powerpc/kvm/book3s_pr.c
+++ b/trunk/arch/powerpc/kvm/book3s_pr.c
@@ -33,7 +33,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index e2d401ad8fbb..bfb11e01133e 100644
--- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -93,7 +93,7 @@ struct mpc52xx_pci {
};
/* MPC5200 device tree match tables */
-const struct of_device_id mpc52xx_pci_ids[] __initconst = {
+const struct of_device_id mpc52xx_pci_ids[] __initdata = {
{ .type = "pci", .compatible = "fsl,mpc5200-pci", },
{ .type = "pci", .compatible = "mpc5200-pci", },
{}
diff --git a/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 9a6f04406e0d..3754ddc00af7 100644
--- a/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -270,7 +270,7 @@ static void __init mpc85xx_mds_qe_init(void)
if (machine_is(p1021_mds)) {
- struct ccsr_guts __iomem *guts;
+ struct ccsr_guts_85xx __iomem *guts;
np = of_find_node_by_name(NULL, "global-utilities");
if (np) {
diff --git a/trunk/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/trunk/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 313fce4f5574..9848f9e39853 100644
--- a/trunk/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/trunk/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -127,7 +127,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
if (machine_is(p1025_rdb)) {
- struct ccsr_guts __iomem *guts;
+ struct ccsr_guts_85xx __iomem *guts;
np = of_find_node_by_name(NULL, "global-utilities");
if (np) {
diff --git a/trunk/arch/powerpc/platforms/85xx/p1022_ds.c b/trunk/arch/powerpc/platforms/85xx/p1022_ds.c
index e74b7cde9aee..0fe88e39945e 100644
--- a/trunk/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/trunk/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -150,7 +150,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
{
struct device_node *guts_node;
struct device_node *indirect_node = NULL;
- struct ccsr_guts __iomem *guts;
+ struct ccsr_guts_85xx __iomem *guts;
u8 __iomem *lbc_lcs0_ba = NULL;
u8 __iomem *lbc_lcs1_ba = NULL;
u8 b;
@@ -269,7 +269,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
void p1022ds_set_pixel_clock(unsigned int pixclock)
{
struct device_node *guts_np = NULL;
- struct ccsr_guts __iomem *guts;
+ struct ccsr_guts_85xx __iomem *guts;
unsigned long freq;
u64 temp;
u32 pxclk;
diff --git a/trunk/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/trunk/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 62cd3c555bfb..bbc615206c67 100644
--- a/trunk/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/trunk/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -225,7 +225,7 @@ void mpc8610hpcd_set_monitor_port(enum fsl_diu_monitor_port port)
void mpc8610hpcd_set_pixel_clock(unsigned int pixclock)
{
struct device_node *guts_np = NULL;
- struct ccsr_guts __iomem *guts;
+ struct ccsr_guts_86xx __iomem *guts;
unsigned long freq;
u64 temp;
u32 pxclk;
diff --git a/trunk/arch/powerpc/platforms/cell/iommu.c b/trunk/arch/powerpc/platforms/cell/iommu.c
index b9f509a34c01..ae9fc7bc17d6 100644
--- a/trunk/arch/powerpc/platforms/cell/iommu.c
+++ b/trunk/arch/powerpc/platforms/cell/iommu.c
@@ -564,8 +564,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
/* A coherent allocation implies strong ordering */
static void *dma_fixed_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
if (iommu_fixed_is_weak)
return iommu_alloc_coherent(dev, cell_get_iommu_table(dev),
@@ -573,19 +572,18 @@ static void *dma_fixed_alloc_coherent(struct device *dev, size_t size,
device_to_mask(dev), flag,
dev_to_node(dev));
else
- return dma_direct_ops.alloc(dev, size, dma_handle, flag,
- attrs);
+ return dma_direct_ops.alloc_coherent(dev, size, dma_handle,
+ flag);
}
static void dma_fixed_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
if (iommu_fixed_is_weak)
iommu_free_coherent(cell_get_iommu_table(dev), size, vaddr,
dma_handle);
else
- dma_direct_ops.free(dev, size, vaddr, dma_handle, attrs);
+ dma_direct_ops.free_coherent(dev, size, vaddr, dma_handle);
}
static dma_addr_t dma_fixed_map_page(struct device *dev, struct page *page,
@@ -644,8 +642,8 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask)
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
struct dma_map_ops dma_iommu_fixed_ops = {
- .alloc = dma_fixed_alloc_coherent,
- .free = dma_fixed_free_coherent,
+ .alloc_coherent = dma_fixed_alloc_coherent,
+ .free_coherent = dma_fixed_free_coherent,
.map_sg = dma_fixed_map_sg,
.unmap_sg = dma_fixed_unmap_sg,
.dma_supported = dma_fixed_dma_supported,
diff --git a/trunk/arch/powerpc/platforms/cell/qpace_setup.c b/trunk/arch/powerpc/platforms/cell/qpace_setup.c
index 6e3409d590ac..7f9b6742f8b6 100644
--- a/trunk/arch/powerpc/platforms/cell/qpace_setup.c
+++ b/trunk/arch/powerpc/platforms/cell/qpace_setup.c
@@ -61,7 +61,7 @@ static void qpace_progress(char *s, unsigned short hex)
printk("*** %04x : %s\n", hex, s ? s : "");
}
-static const struct of_device_id qpace_bus_ids[] __initconst = {
+static const struct of_device_id qpace_bus_ids[] __initdata = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
diff --git a/trunk/arch/powerpc/platforms/cell/setup.c b/trunk/arch/powerpc/platforms/cell/setup.c
index 4ab087671185..fa3e294fd343 100644
--- a/trunk/arch/powerpc/platforms/cell/setup.c
+++ b/trunk/arch/powerpc/platforms/cell/setup.c
@@ -140,7 +140,7 @@ static int __devinit cell_setup_phb(struct pci_controller *phb)
return 0;
}
-static const struct of_device_id cell_bus_ids[] __initconst = {
+static const struct of_device_id cell_bus_ids[] __initdata = {
{ .type = "soc", },
{ .compatible = "soc", },
{ .type = "spider", },
diff --git a/trunk/arch/powerpc/platforms/ps3/system-bus.c b/trunk/arch/powerpc/platforms/ps3/system-bus.c
index 5606fe36faf2..880eb9ce22c5 100644
--- a/trunk/arch/powerpc/platforms/ps3/system-bus.c
+++ b/trunk/arch/powerpc/platforms/ps3/system-bus.c
@@ -515,8 +515,7 @@ core_initcall(ps3_system_bus_init);
* to the dma address (mapping) of the first page.
*/
static void * ps3_alloc_coherent(struct device *_dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
int result;
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
@@ -553,7 +552,7 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
}
static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
- dma_addr_t dma_handle, struct dma_attrs *attrs)
+ dma_addr_t dma_handle)
{
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
@@ -702,8 +701,8 @@ static u64 ps3_dma_get_required_mask(struct device *_dev)
}
static struct dma_map_ops ps3_sb_dma_ops = {
- .alloc = ps3_alloc_coherent,
- .free = ps3_free_coherent,
+ .alloc_coherent = ps3_alloc_coherent,
+ .free_coherent = ps3_free_coherent,
.map_sg = ps3_sb_map_sg,
.unmap_sg = ps3_sb_unmap_sg,
.dma_supported = ps3_dma_supported,
@@ -713,8 +712,8 @@ static struct dma_map_ops ps3_sb_dma_ops = {
};
static struct dma_map_ops ps3_ioc0_dma_ops = {
- .alloc = ps3_alloc_coherent,
- .free = ps3_free_coherent,
+ .alloc_coherent = ps3_alloc_coherent,
+ .free_coherent = ps3_free_coherent,
.map_sg = ps3_ioc0_map_sg,
.unmap_sg = ps3_ioc0_unmap_sg,
.dma_supported = ps3_dma_supported,
diff --git a/trunk/arch/powerpc/platforms/pseries/eeh_event.c b/trunk/arch/powerpc/platforms/pseries/eeh_event.c
index 4cb375c0f8d1..4a4752565856 100644
--- a/trunk/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/trunk/arch/powerpc/platforms/pseries/eeh_event.c
@@ -59,7 +59,8 @@ static int eeh_event_handler(void * dummy)
struct eeh_event *event;
struct eeh_dev *edev;
- set_task_comm(current, "eehd");
+ daemonize("eehd");
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
event = NULL;
@@ -82,7 +83,6 @@ static int eeh_event_handler(void * dummy)
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
eeh_pci_name(edev->pdev));
- set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
edev = handle_eeh_events(event);
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
diff --git a/trunk/arch/powerpc/sysdev/qe_lib/qe.c b/trunk/arch/powerpc/sysdev/qe_lib/qe.c
index 818e763f8265..ceb09cbd2329 100644
--- a/trunk/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/trunk/arch/powerpc/sysdev/qe_lib/qe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2010 Freescale Semicondutor, Inc. All rights reserved.
+ * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved.
*
* Authors: Shlomi Gridish
* Li Yang
@@ -266,19 +266,7 @@ EXPORT_SYMBOL(qe_clock_source);
static void qe_snums_init(void)
{
int i;
- static const u8 snum_init_76[] = {
- 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D,
- 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x88, 0x89,
- 0x98, 0x99, 0xA8, 0xA9, 0xB8, 0xB9, 0xC8, 0xC9,
- 0xD8, 0xD9, 0xE8, 0xE9, 0x44, 0x45, 0x4C, 0x4D,
- 0x54, 0x55, 0x5C, 0x5D, 0x64, 0x65, 0x6C, 0x6D,
- 0x74, 0x75, 0x7C, 0x7D, 0x84, 0x85, 0x8C, 0x8D,
- 0x94, 0x95, 0x9C, 0x9D, 0xA4, 0xA5, 0xAC, 0xAD,
- 0xB4, 0xB5, 0xBC, 0xBD, 0xC4, 0xC5, 0xCC, 0xCD,
- 0xD4, 0xD5, 0xDC, 0xDD, 0xE4, 0xE5, 0xEC, 0xED,
- 0xF4, 0xF5, 0xFC, 0xFD,
- };
- static const u8 snum_init_46[] = {
+ static const u8 snum_init[] = {
0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D,
0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x88, 0x89,
0x98, 0x99, 0xA8, 0xA9, 0xB8, 0xB9, 0xC8, 0xC9,
@@ -286,15 +274,9 @@ static void qe_snums_init(void)
0x28, 0x29, 0x38, 0x39, 0x48, 0x49, 0x58, 0x59,
0x68, 0x69, 0x78, 0x79, 0x80, 0x81,
};
- static const u8 *snum_init;
qe_num_of_snum = qe_get_num_of_snums();
- if (qe_num_of_snum == 76)
- snum_init = snum_init_76;
- else
- snum_init = snum_init_46;
-
for (i = 0; i < qe_num_of_snum; i++) {
snums[i].num = snum_init[i];
snums[i].state = QE_SNUM_STATE_FREE;
diff --git a/trunk/arch/sh/include/asm/dma-mapping.h b/trunk/arch/sh/include/asm/dma-mapping.h
index 8bd965e00a15..1a73c3e759a7 100644
--- a/trunk/arch/sh/include/asm/dma-mapping.h
+++ b/trunk/arch/sh/include/asm/dma-mapping.h
@@ -52,31 +52,25 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
return dma_addr == 0;
}
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t gfp)
{
struct dma_map_ops *ops = get_dma_ops(dev);
void *memory;
if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
return memory;
- if (!ops->alloc)
+ if (!ops->alloc_coherent)
return NULL;
- memory = ops->alloc(dev, size, dma_handle, gfp, attrs);
+ memory = ops->alloc_coherent(dev, size, dma_handle, gfp);
debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
return memory;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma_handle)
{
struct dma_map_ops *ops = get_dma_ops(dev);
@@ -84,16 +78,14 @@ static inline void dma_free_attrs(struct device *dev, size_t size,
return;
debug_dma_free_coherent(dev, size, vaddr, dma_handle);
- if (ops->free)
- ops->free(dev, size, vaddr, dma_handle, attrs);
+ if (ops->free_coherent)
+ ops->free_coherent(dev, size, vaddr, dma_handle);
}
/* arch/sh/mm/consistent.c */
extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addr, gfp_t flag,
- struct dma_attrs *attrs);
+ dma_addr_t *dma_addr, gfp_t flag);
extern void dma_generic_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs);
+ void *vaddr, dma_addr_t dma_handle);
#endif /* __ASM_SH_DMA_MAPPING_H */
diff --git a/trunk/arch/sh/kernel/dma-nommu.c b/trunk/arch/sh/kernel/dma-nommu.c
index 5b0bfcda6d0b..3c55b87f8b63 100644
--- a/trunk/arch/sh/kernel/dma-nommu.c
+++ b/trunk/arch/sh/kernel/dma-nommu.c
@@ -63,8 +63,8 @@ static void nommu_sync_sg(struct device *dev, struct scatterlist *sg,
#endif
struct dma_map_ops nommu_dma_ops = {
- .alloc = dma_generic_alloc_coherent,
- .free = dma_generic_free_coherent,
+ .alloc_coherent = dma_generic_alloc_coherent,
+ .free_coherent = dma_generic_free_coherent,
.map_page = nommu_map_page,
.map_sg = nommu_map_sg,
#ifdef CONFIG_DMA_NONCOHERENT
diff --git a/trunk/arch/sh/mm/consistent.c b/trunk/arch/sh/mm/consistent.c
index b81d9dbf9fef..f251b5f27652 100644
--- a/trunk/arch/sh/mm/consistent.c
+++ b/trunk/arch/sh/mm/consistent.c
@@ -33,8 +33,7 @@ static int __init dma_init(void)
fs_initcall(dma_init);
void *dma_generic_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret, *ret_nocache;
int order = get_order(size);
@@ -65,8 +64,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
}
void dma_generic_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
int order = get_order(size);
unsigned long pfn = dma_handle >> PAGE_SHIFT;
diff --git a/trunk/arch/sparc/include/asm/dma-mapping.h b/trunk/arch/sparc/include/asm/dma-mapping.h
index 48a7c65731d2..8c0e4f7bb204 100644
--- a/trunk/arch/sparc/include/asm/dma-mapping.h
+++ b/trunk/arch/sparc/include/asm/dma-mapping.h
@@ -26,30 +26,24 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
#include
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct dma_map_ops *ops = get_dma_ops(dev);
void *cpu_addr;
- cpu_addr = ops->alloc(dev, size, dma_handle, flag, attrs);
+ cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag);
debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr);
return cpu_addr;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
struct dma_map_ops *ops = get_dma_ops(dev);
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
- ops->free(dev, size, cpu_addr, dma_handle, attrs);
+ ops->free_coherent(dev, size, cpu_addr, dma_handle);
}
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
diff --git a/trunk/arch/sparc/include/asm/pgtable_64.h b/trunk/arch/sparc/include/asm/pgtable_64.h
index 76e4a52aa85e..6fa2f7980e6b 100644
--- a/trunk/arch/sparc/include/asm/pgtable_64.h
+++ b/trunk/arch/sparc/include/asm/pgtable_64.h
@@ -12,6 +12,8 @@
* the SpitFire page tables.
*/
+#include
+
#include
#include
#include
@@ -20,8 +22,6 @@
#include
#include
-#include
-
/* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB).
* The page copy blockops can use 0x6000000 to 0x8000000.
* The TSB is mapped in the 0x8000000 to 0xa000000 range.
diff --git a/trunk/arch/sparc/kernel/iommu.c b/trunk/arch/sparc/kernel/iommu.c
index 070ed141aac7..4643d68713fa 100644
--- a/trunk/arch/sparc/kernel/iommu.c
+++ b/trunk/arch/sparc/kernel/iommu.c
@@ -280,8 +280,7 @@ static inline void iommu_free_ctx(struct iommu *iommu, int ctx)
}
static void *dma_4u_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addrp, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addrp, gfp_t gfp)
{
unsigned long flags, order, first_page;
struct iommu *iommu;
@@ -331,8 +330,7 @@ static void *dma_4u_alloc_coherent(struct device *dev, size_t size,
}
static void dma_4u_free_coherent(struct device *dev, size_t size,
- void *cpu, dma_addr_t dvma,
- struct dma_attrs *attrs)
+ void *cpu, dma_addr_t dvma)
{
struct iommu *iommu;
unsigned long flags, order, npages;
@@ -827,8 +825,8 @@ static void dma_4u_sync_sg_for_cpu(struct device *dev,
}
static struct dma_map_ops sun4u_dma_ops = {
- .alloc = dma_4u_alloc_coherent,
- .free = dma_4u_free_coherent,
+ .alloc_coherent = dma_4u_alloc_coherent,
+ .free_coherent = dma_4u_free_coherent,
.map_page = dma_4u_map_page,
.unmap_page = dma_4u_unmap_page,
.map_sg = dma_4u_map_sg,
diff --git a/trunk/arch/sparc/kernel/ioport.c b/trunk/arch/sparc/kernel/ioport.c
index 21bd73943f7f..d0479e2163fa 100644
--- a/trunk/arch/sparc/kernel/ioport.c
+++ b/trunk/arch/sparc/kernel/ioport.c
@@ -261,8 +261,7 @@ EXPORT_SYMBOL(sbus_set_sbus64);
* CPU may access them without any explicit flushing.
*/
static void *sbus_alloc_coherent(struct device *dev, size_t len,
- dma_addr_t *dma_addrp, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addrp, gfp_t gfp)
{
struct platform_device *op = to_platform_device(dev);
unsigned long len_total = PAGE_ALIGN(len);
@@ -316,7 +315,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
}
static void sbus_free_coherent(struct device *dev, size_t n, void *p,
- dma_addr_t ba, struct dma_attrs *attrs)
+ dma_addr_t ba)
{
struct resource *res;
struct page *pgv;
@@ -408,8 +407,8 @@ static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
}
struct dma_map_ops sbus_dma_ops = {
- .alloc = sbus_alloc_coherent,
- .free = sbus_free_coherent,
+ .alloc_coherent = sbus_alloc_coherent,
+ .free_coherent = sbus_free_coherent,
.map_page = sbus_map_page,
.unmap_page = sbus_unmap_page,
.map_sg = sbus_map_sg,
@@ -437,8 +436,7 @@ arch_initcall(sparc_register_ioport);
* hwdev should be valid struct pci_dev pointer for PCI devices.
*/
static void *pci32_alloc_coherent(struct device *dev, size_t len,
- dma_addr_t *pba, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *pba, gfp_t gfp)
{
unsigned long len_total = PAGE_ALIGN(len);
void *va;
@@ -491,7 +489,7 @@ static void *pci32_alloc_coherent(struct device *dev, size_t len,
* past this call are illegal.
*/
static void pci32_free_coherent(struct device *dev, size_t n, void *p,
- dma_addr_t ba, struct dma_attrs *attrs)
+ dma_addr_t ba)
{
struct resource *res;
@@ -647,8 +645,8 @@ static void pci32_sync_sg_for_device(struct device *device, struct scatterlist *
}
struct dma_map_ops pci32_dma_ops = {
- .alloc = pci32_alloc_coherent,
- .free = pci32_free_coherent,
+ .alloc_coherent = pci32_alloc_coherent,
+ .free_coherent = pci32_free_coherent,
.map_page = pci32_map_page,
.unmap_page = pci32_unmap_page,
.map_sg = pci32_map_sg,
diff --git a/trunk/arch/sparc/kernel/leon_kernel.c b/trunk/arch/sparc/kernel/leon_kernel.c
index 35e43673c453..a19c8a063683 100644
--- a/trunk/arch/sparc/kernel/leon_kernel.c
+++ b/trunk/arch/sparc/kernel/leon_kernel.c
@@ -104,11 +104,11 @@ static int irq_choose_cpu(const struct cpumask *affinity)
{
cpumask_t mask;
- cpumask_and(&mask, cpu_online_mask, affinity);
- if (cpumask_equal(&mask, cpu_online_mask) || cpumask_empty(&mask))
+ cpus_and(mask, cpu_online_map, *affinity);
+ if (cpus_equal(mask, cpu_online_map) || cpus_empty(mask))
return boot_cpu_id;
else
- return cpumask_first(&mask);
+ return first_cpu(mask);
}
#else
#define irq_choose_cpu(affinity) boot_cpu_id
diff --git a/trunk/arch/sparc/kernel/pci_sun4v.c b/trunk/arch/sparc/kernel/pci_sun4v.c
index 7661e84a05a0..af5755d20fbe 100644
--- a/trunk/arch/sparc/kernel/pci_sun4v.c
+++ b/trunk/arch/sparc/kernel/pci_sun4v.c
@@ -128,8 +128,7 @@ static inline long iommu_batch_end(void)
}
static void *dma_4v_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addrp, gfp_t gfp,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addrp, gfp_t gfp)
{
unsigned long flags, order, first_page, npages, n;
struct iommu *iommu;
@@ -199,7 +198,7 @@ static void *dma_4v_alloc_coherent(struct device *dev, size_t size,
}
static void dma_4v_free_coherent(struct device *dev, size_t size, void *cpu,
- dma_addr_t dvma, struct dma_attrs *attrs)
+ dma_addr_t dvma)
{
struct pci_pbm_info *pbm;
struct iommu *iommu;
@@ -528,8 +527,8 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist,
}
static struct dma_map_ops sun4v_dma_ops = {
- .alloc = dma_4v_alloc_coherent,
- .free = dma_4v_free_coherent,
+ .alloc_coherent = dma_4v_alloc_coherent,
+ .free_coherent = dma_4v_free_coherent,
.map_page = dma_4v_map_page,
.unmap_page = dma_4v_unmap_page,
.map_sg = dma_4v_map_sg,
diff --git a/trunk/arch/tile/kernel/setup.c b/trunk/arch/tile/kernel/setup.c
index 92a94f4920ad..5f85d8b34dbb 100644
--- a/trunk/arch/tile/kernel/setup.c
+++ b/trunk/arch/tile/kernel/setup.c
@@ -1100,7 +1100,7 @@ EXPORT_SYMBOL(hash_for_home_map);
/*
* cpu_cacheable_map lists all the cpus whose caches the hypervisor can
- * flush on our behalf. It is set to cpu_possible_mask OR'ed with
+ * flush on our behalf. It is set to cpu_possible_map OR'ed with
* hash_for_home_map, and it is what should be passed to
* hv_flush_remote() to flush all caches. Note that if there are
* dedicated hypervisor driver tiles that have authorized use of their
@@ -1186,7 +1186,7 @@ static void __init setup_cpu_maps(void)
sizeof(cpu_lotar_map));
if (rc < 0) {
pr_err("warning: no HV_INQ_TILES_LOTAR; using AVAIL\n");
- cpu_lotar_map = *cpu_possible_mask;
+ cpu_lotar_map = cpu_possible_map;
}
#if CHIP_HAS_CBOX_HOME_MAP()
@@ -1196,9 +1196,9 @@ static void __init setup_cpu_maps(void)
sizeof(hash_for_home_map));
if (rc < 0)
early_panic("hv_inquire_tiles(HFH_CACHE) failed: rc %d\n", rc);
- cpumask_or(&cpu_cacheable_map, cpu_possible_mask, &hash_for_home_map);
+ cpumask_or(&cpu_cacheable_map, &cpu_possible_map, &hash_for_home_map);
#else
- cpu_cacheable_map = *cpu_possible_mask;
+ cpu_cacheable_map = cpu_possible_map;
#endif
}
diff --git a/trunk/arch/um/kernel/skas/process.c b/trunk/arch/um/kernel/skas/process.c
index 0a9e57e7446b..2e9852c0d487 100644
--- a/trunk/arch/um/kernel/skas/process.c
+++ b/trunk/arch/um/kernel/skas/process.c
@@ -41,7 +41,7 @@ static int __init start_kernel_proc(void *unused)
cpu_tasks[0].pid = pid;
cpu_tasks[0].task = current;
#ifdef CONFIG_SMP
- init_cpu_online(get_cpu_mask(0));
+ cpu_online_map = cpumask_of_cpu(0);
#endif
start_kernel();
return 0;
diff --git a/trunk/arch/um/kernel/smp.c b/trunk/arch/um/kernel/smp.c
index 6f588e160fb0..155206a66908 100644
--- a/trunk/arch/um/kernel/smp.c
+++ b/trunk/arch/um/kernel/smp.c
@@ -76,7 +76,7 @@ static int idle_proc(void *cpup)
cpu_relax();
notify_cpu_starting(cpu);
- set_cpu_online(cpu, true);
+ cpu_set(cpu, cpu_online_map);
default_idle();
return 0;
}
@@ -110,7 +110,8 @@ void smp_prepare_cpus(unsigned int maxcpus)
for (i = 0; i < ncpus; ++i)
set_cpu_possible(i, true);
- set_cpu_online(me, true);
+ cpu_clear(me, cpu_online_map);
+ cpu_set(me, cpu_online_map);
cpu_set(me, cpu_callin_map);
err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
@@ -137,13 +138,13 @@ void smp_prepare_cpus(unsigned int maxcpus)
void smp_prepare_boot_cpu(void)
{
- set_cpu_online(smp_processor_id(), true);
+ cpu_set(smp_processor_id(), cpu_online_map);
}
int __cpu_up(unsigned int cpu)
{
cpu_set(cpu, smp_commenced_mask);
- while (!cpu_online(cpu))
+ while (!cpu_isset(cpu, cpu_online_map))
mb();
return 0;
}
diff --git a/trunk/arch/unicore32/include/asm/dma-mapping.h b/trunk/arch/unicore32/include/asm/dma-mapping.h
index 366460a81796..9258e592f414 100644
--- a/trunk/arch/unicore32/include/asm/dma-mapping.h
+++ b/trunk/arch/unicore32/include/asm/dma-mapping.h
@@ -82,26 +82,20 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
return 0;
}
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag,
- struct dma_attrs *attrs)
+static inline void *dma_alloc_coherent(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
- return dma_ops->alloc(dev, size, dma_handle, flag, attrs);
+ return dma_ops->alloc_coherent(dev, size, dma_handle, flag);
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *cpu_addr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);
- dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
+ dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
}
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
diff --git a/trunk/arch/unicore32/mm/dma-swiotlb.c b/trunk/arch/unicore32/mm/dma-swiotlb.c
index 16c08b2143a7..bfa9fbb2bbb1 100644
--- a/trunk/arch/unicore32/mm/dma-swiotlb.c
+++ b/trunk/arch/unicore32/mm/dma-swiotlb.c
@@ -17,23 +17,9 @@
#include
-static void *unicore_swiotlb_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flags,
- struct dma_attrs *attrs)
-{
- return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
-}
-
-static void unicore_swiotlb_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_addr,
- struct dma_attrs *attrs)
-{
- swiotlb_free_coherent(dev, size, vaddr, dma_addr);
-}
-
struct dma_map_ops swiotlb_dma_map_ops = {
- .alloc = unicore_swiotlb_alloc_coherent,
- .free = unicore_swiotlb_free_coherent,
+ .alloc_coherent = swiotlb_alloc_coherent,
+ .free_coherent = swiotlb_free_coherent,
.map_sg = swiotlb_map_sg_attrs,
.unmap_sg = swiotlb_unmap_sg_attrs,
.dma_supported = swiotlb_dma_supported,
diff --git a/trunk/arch/x86/Makefile b/trunk/arch/x86/Makefile
index 41a7237606a3..968dbe24a255 100644
--- a/trunk/arch/x86/Makefile
+++ b/trunk/arch/x86/Makefile
@@ -129,7 +129,6 @@ KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# prevent gcc from generating any FP code by mistake
KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
-KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
KBUILD_CFLAGS += $(mflags-y)
KBUILD_AFLAGS += $(mflags-y)
diff --git a/trunk/arch/x86/include/asm/dma-mapping.h b/trunk/arch/x86/include/asm/dma-mapping.h
index 4b4331d71935..ed3065fd6314 100644
--- a/trunk/arch/x86/include/asm/dma-mapping.h
+++ b/trunk/arch/x86/include/asm/dma-mapping.h
@@ -59,8 +59,7 @@ extern int dma_supported(struct device *hwdev, u64 mask);
extern int dma_set_mask(struct device *dev, u64 mask);
extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addr, gfp_t flag,
- struct dma_attrs *attrs);
+ dma_addr_t *dma_addr, gfp_t flag);
static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
{
@@ -112,11 +111,9 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
return gfp;
}
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
-
static inline void *
-dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,
- gfp_t gfp, struct dma_attrs *attrs)
+dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
+ gfp_t gfp)
{
struct dma_map_ops *ops = get_dma_ops(dev);
void *memory;
@@ -132,21 +129,18 @@ dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,
if (!is_device_dma_capable(dev))
return NULL;
- if (!ops->alloc)
+ if (!ops->alloc_coherent)
return NULL;
- memory = ops->alloc(dev, size, dma_handle,
- dma_alloc_coherent_gfp_flags(dev, gfp), attrs);
+ memory = ops->alloc_coherent(dev, size, dma_handle,
+ dma_alloc_coherent_gfp_flags(dev, gfp));
debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
return memory;
}
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
- void *vaddr, dma_addr_t bus,
- struct dma_attrs *attrs)
+static inline void dma_free_coherent(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t bus)
{
struct dma_map_ops *ops = get_dma_ops(dev);
@@ -156,8 +150,8 @@ static inline void dma_free_attrs(struct device *dev, size_t size,
return;
debug_dma_free_coherent(dev, size, vaddr, bus);
- if (ops->free)
- ops->free(dev, size, vaddr, bus, attrs);
+ if (ops->free_coherent)
+ ops->free_coherent(dev, size, vaddr, bus);
}
#endif
diff --git a/trunk/arch/x86/include/asm/processor.h b/trunk/arch/x86/include/asm/processor.h
index 4fa7dcceb6c0..7284c9a6a0b5 100644
--- a/trunk/arch/x86/include/asm/processor.h
+++ b/trunk/arch/x86/include/asm/processor.h
@@ -974,6 +974,16 @@ extern bool cpu_has_amd_erratum(const int *);
#define cpu_has_amd_erratum(x) (false)
#endif /* CONFIG_CPU_SUP_AMD */
+#ifdef CONFIG_X86_32
+/*
+ * disable hlt during certain critical i/o operations
+ */
+#define HAVE_DISABLE_HLT
+#endif
+
+void disable_hlt(void);
+void enable_hlt(void);
+
void cpu_idle_wait(void);
extern unsigned long arch_align_stack(unsigned long sp);
diff --git a/trunk/arch/x86/include/asm/word-at-a-time.h b/trunk/arch/x86/include/asm/word-at-a-time.h
deleted file mode 100644
index 6fe6767b7124..000000000000
--- a/trunk/arch/x86/include/asm/word-at-a-time.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef _ASM_WORD_AT_A_TIME_H
-#define _ASM_WORD_AT_A_TIME_H
-
-/*
- * This is largely generic for little-endian machines, but the
- * optimal byte mask counting is probably going to be something
- * that is architecture-specific. If you have a reliably fast
- * bit count instruction, that might be better than the multiply
- * and shift, for example.
- */
-
-#ifdef CONFIG_64BIT
-
-/*
- * Jan Achrenius on G+: microoptimized version of
- * the simpler "(mask & ONEBYTES) * ONEBYTES >> 56"
- * that works for the bytemasks without having to
- * mask them first.
- */
-static inline long count_masked_bytes(unsigned long mask)
-{
- return mask*0x0001020304050608ul >> 56;
-}
-
-#else /* 32-bit case */
-
-/* Carl Chatfield / Jan Achrenius G+ version for 32-bit */
-static inline long count_masked_bytes(long mask)
-{
- /* (000000 0000ff 00ffff ffffff) -> ( 1 1 2 3 ) */
- long a = (0x0ff0001+mask) >> 23;
- /* Fix the 1 for 00 case */
- return a & mask;
-}
-
-#endif
-
-#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
-
-/* Return the high bit set in the first byte that is a zero */
-static inline unsigned long has_zero(unsigned long a)
-{
- return ((a - REPEAT_BYTE(0x01)) & ~a) & REPEAT_BYTE(0x80);
-}
-
-#endif /* _ASM_WORD_AT_A_TIME_H */
diff --git a/trunk/arch/x86/kernel/amd_gart_64.c b/trunk/arch/x86/kernel/amd_gart_64.c
index e66311200cbd..b1e7c7f7a0af 100644
--- a/trunk/arch/x86/kernel/amd_gart_64.c
+++ b/trunk/arch/x86/kernel/amd_gart_64.c
@@ -477,7 +477,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,
/* allocate and map a coherent mapping */
static void *
gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
- gfp_t flag, struct dma_attrs *attrs)
+ gfp_t flag)
{
dma_addr_t paddr;
unsigned long align_mask;
@@ -500,8 +500,7 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
}
__free_pages(page, get_order(size));
} else
- return dma_generic_alloc_coherent(dev, size, dma_addr, flag,
- attrs);
+ return dma_generic_alloc_coherent(dev, size, dma_addr, flag);
return NULL;
}
@@ -509,7 +508,7 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
/* free a coherent mapping */
static void
gart_free_coherent(struct device *dev, size_t size, void *vaddr,
- dma_addr_t dma_addr, struct dma_attrs *attrs)
+ dma_addr_t dma_addr)
{
gart_unmap_page(dev, dma_addr, size, DMA_BIDIRECTIONAL, NULL);
free_pages((unsigned long)vaddr, get_order(size));
@@ -701,8 +700,8 @@ static struct dma_map_ops gart_dma_ops = {
.unmap_sg = gart_unmap_sg,
.map_page = gart_map_page,
.unmap_page = gart_unmap_page,
- .alloc = gart_alloc_coherent,
- .free = gart_free_coherent,
+ .alloc_coherent = gart_alloc_coherent,
+ .free_coherent = gart_free_coherent,
.mapping_error = gart_mapping_error,
};
diff --git a/trunk/arch/x86/kernel/cpu/perf_event_p4.c b/trunk/arch/x86/kernel/cpu/perf_event_p4.c
index a2dfacfd7103..ef484d9d0a25 100644
--- a/trunk/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/trunk/arch/x86/kernel/cpu/perf_event_p4.c
@@ -1271,17 +1271,6 @@ static int p4_pmu_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign
return num ? -EINVAL : 0;
}
-PMU_FORMAT_ATTR(cccr, "config:0-31" );
-PMU_FORMAT_ATTR(escr, "config:32-62");
-PMU_FORMAT_ATTR(ht, "config:63" );
-
-static struct attribute *intel_p4_formats_attr[] = {
- &format_attr_cccr.attr,
- &format_attr_escr.attr,
- &format_attr_ht.attr,
- NULL,
-};
-
static __initconst const struct x86_pmu p4_pmu = {
.name = "Netburst P4/Xeon",
.handle_irq = p4_pmu_handle_irq,
@@ -1316,8 +1305,6 @@ static __initconst const struct x86_pmu p4_pmu = {
* the former idea is taken from OProfile code
*/
.perfctr_second_write = 1,
-
- .format_attrs = intel_p4_formats_attr,
};
__init int p4_pmu_init(void)
diff --git a/trunk/arch/x86/kernel/irq.c b/trunk/arch/x86/kernel/irq.c
index 3dafc6003b7c..7943e0c21bde 100644
--- a/trunk/arch/x86/kernel/irq.c
+++ b/trunk/arch/x86/kernel/irq.c
@@ -282,13 +282,8 @@ void fixup_irqs(void)
else if (!(warned++))
set_affinity = 0;
- /*
- * We unmask if the irq was not marked masked by the
- * core code. That respects the lazy irq disable
- * behaviour.
- */
if (!irqd_can_move_in_process_context(data) &&
- !irqd_irq_masked(data) && chip->irq_unmask)
+ !irqd_irq_disabled(data) && chip->irq_unmask)
chip->irq_unmask(data);
raw_spin_unlock(&desc->lock);
diff --git a/trunk/arch/x86/kernel/kdebugfs.c b/trunk/arch/x86/kernel/kdebugfs.c
index 1d5d31ea686b..90fcf62854bb 100644
--- a/trunk/arch/x86/kernel/kdebugfs.c
+++ b/trunk/arch/x86/kernel/kdebugfs.c
@@ -68,9 +68,16 @@ static ssize_t setup_data_read(struct file *file, char __user *user_buf,
return count;
}
+static int setup_data_open(struct inode *inode, struct file *file)
+{
+ file->private_data = inode->i_private;
+
+ return 0;
+}
+
static const struct file_operations fops_setup_data = {
.read = setup_data_read,
- .open = simple_open,
+ .open = setup_data_open,
.llseek = default_llseek,
};
diff --git a/trunk/arch/x86/kernel/kgdb.c b/trunk/arch/x86/kernel/kgdb.c
index 8bfb6146f753..db6720edfdd0 100644
--- a/trunk/arch/x86/kernel/kgdb.c
+++ b/trunk/arch/x86/kernel/kgdb.c
@@ -43,8 +43,6 @@
#include
#include
#include
-#include
-#include
#include
#include
@@ -743,64 +741,6 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
regs->ip = ip;
}
-int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
-{
- int err;
- char opc[BREAK_INSTR_SIZE];
-
- bpt->type = BP_BREAKPOINT;
- err = probe_kernel_read(bpt->saved_instr, (char *)bpt->bpt_addr,
- BREAK_INSTR_SIZE);
- if (err)
- return err;
- err = probe_kernel_write((char *)bpt->bpt_addr,
- arch_kgdb_ops.gdb_bpt_instr, BREAK_INSTR_SIZE);
-#ifdef CONFIG_DEBUG_RODATA
- if (!err)
- return err;
- /*
- * It is safe to call text_poke() because normal kernel execution
- * is stopped on all cores, so long as the text_mutex is not locked.
- */
- if (mutex_is_locked(&text_mutex))
- return -EBUSY;
- text_poke((void *)bpt->bpt_addr, arch_kgdb_ops.gdb_bpt_instr,
- BREAK_INSTR_SIZE);
- err = probe_kernel_read(opc, (char *)bpt->bpt_addr, BREAK_INSTR_SIZE);
- if (err)
- return err;
- if (memcmp(opc, arch_kgdb_ops.gdb_bpt_instr, BREAK_INSTR_SIZE))
- return -EINVAL;
- bpt->type = BP_POKE_BREAKPOINT;
-#endif /* CONFIG_DEBUG_RODATA */
- return err;
-}
-
-int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
-{
-#ifdef CONFIG_DEBUG_RODATA
- int err;
- char opc[BREAK_INSTR_SIZE];
-
- if (bpt->type != BP_POKE_BREAKPOINT)
- goto knl_write;
- /*
- * It is safe to call text_poke() because normal kernel execution
- * is stopped on all cores, so long as the text_mutex is not locked.
- */
- if (mutex_is_locked(&text_mutex))
- goto knl_write;
- text_poke((void *)bpt->bpt_addr, bpt->saved_instr, BREAK_INSTR_SIZE);
- err = probe_kernel_read(opc, (char *)bpt->bpt_addr, BREAK_INSTR_SIZE);
- if (err || memcmp(opc, bpt->saved_instr, BREAK_INSTR_SIZE))
- goto knl_write;
- return err;
-knl_write:
-#endif /* CONFIG_DEBUG_RODATA */
- return probe_kernel_write((char *)bpt->bpt_addr,
- (char *)bpt->saved_instr, BREAK_INSTR_SIZE);
-}
-
struct kgdb_arch arch_kgdb_ops = {
/* Breakpoint instruction: */
.gdb_bpt_instr = { 0xcc },
diff --git a/trunk/arch/x86/kernel/pci-calgary_64.c b/trunk/arch/x86/kernel/pci-calgary_64.c
index d0b2fb9ccbb1..6ac5782f4d6b 100644
--- a/trunk/arch/x86/kernel/pci-calgary_64.c
+++ b/trunk/arch/x86/kernel/pci-calgary_64.c
@@ -430,7 +430,7 @@ static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr,
}
static void* calgary_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, gfp_t flag, struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret = NULL;
dma_addr_t mapping;
@@ -463,8 +463,7 @@ static void* calgary_alloc_coherent(struct device *dev, size_t size,
}
static void calgary_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_handle,
- struct dma_attrs *attrs)
+ void *vaddr, dma_addr_t dma_handle)
{
unsigned int npages;
struct iommu_table *tbl = find_iommu_table(dev);
@@ -477,8 +476,8 @@ static void calgary_free_coherent(struct device *dev, size_t size,
}
static struct dma_map_ops calgary_dma_ops = {
- .alloc = calgary_alloc_coherent,
- .free = calgary_free_coherent,
+ .alloc_coherent = calgary_alloc_coherent,
+ .free_coherent = calgary_free_coherent,
.map_sg = calgary_map_sg,
.unmap_sg = calgary_unmap_sg,
.map_page = calgary_map_page,
diff --git a/trunk/arch/x86/kernel/pci-dma.c b/trunk/arch/x86/kernel/pci-dma.c
index 3003250ac51d..28e5e06fcba4 100644
--- a/trunk/arch/x86/kernel/pci-dma.c
+++ b/trunk/arch/x86/kernel/pci-dma.c
@@ -96,8 +96,7 @@ void __init pci_iommu_alloc(void)
}
}
void *dma_generic_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_addr, gfp_t flag,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_addr, gfp_t flag)
{
unsigned long dma_mask;
struct page *page;
diff --git a/trunk/arch/x86/kernel/pci-nommu.c b/trunk/arch/x86/kernel/pci-nommu.c
index f96050685b46..3af4af810c07 100644
--- a/trunk/arch/x86/kernel/pci-nommu.c
+++ b/trunk/arch/x86/kernel/pci-nommu.c
@@ -75,7 +75,7 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
}
static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr,
- dma_addr_t dma_addr, struct dma_attrs *attrs)
+ dma_addr_t dma_addr)
{
free_pages((unsigned long)vaddr, get_order(size));
}
@@ -96,8 +96,8 @@ static void nommu_sync_sg_for_device(struct device *dev,
}
struct dma_map_ops nommu_dma_ops = {
- .alloc = dma_generic_alloc_coherent,
- .free = nommu_free_coherent,
+ .alloc_coherent = dma_generic_alloc_coherent,
+ .free_coherent = nommu_free_coherent,
.map_sg = nommu_map_sg,
.map_page = nommu_map_page,
.sync_single_for_device = nommu_sync_single_for_device,
diff --git a/trunk/arch/x86/kernel/pci-swiotlb.c b/trunk/arch/x86/kernel/pci-swiotlb.c
index 6c483ba98b9c..8f972cbddef0 100644
--- a/trunk/arch/x86/kernel/pci-swiotlb.c
+++ b/trunk/arch/x86/kernel/pci-swiotlb.c
@@ -15,30 +15,21 @@
int swiotlb __read_mostly;
static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
- dma_addr_t *dma_handle, gfp_t flags,
- struct dma_attrs *attrs)
+ dma_addr_t *dma_handle, gfp_t flags)
{
void *vaddr;
- vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags,
- attrs);
+ vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags);
if (vaddr)
return vaddr;
return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags);
}
-static void x86_swiotlb_free_coherent(struct device *dev, size_t size,
- void *vaddr, dma_addr_t dma_addr,
- struct dma_attrs *attrs)
-{
- swiotlb_free_coherent(dev, size, vaddr, dma_addr);
-}
-
static struct dma_map_ops swiotlb_dma_ops = {
.mapping_error = swiotlb_dma_mapping_error,
- .alloc = x86_swiotlb_alloc_coherent,
- .free = x86_swiotlb_free_coherent,
+ .alloc_coherent = x86_swiotlb_alloc_coherent,
+ .free_coherent = swiotlb_free_coherent,
.sync_single_for_cpu = swiotlb_sync_single_for_cpu,
.sync_single_for_device = swiotlb_sync_single_for_device,
.sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
diff --git a/trunk/arch/x86/kernel/process.c b/trunk/arch/x86/kernel/process.c
index 1d92a5ab6e8b..a33afaa5ddb7 100644
--- a/trunk/arch/x86/kernel/process.c
+++ b/trunk/arch/x86/kernel/process.c
@@ -362,10 +362,34 @@ void (*pm_idle)(void);
EXPORT_SYMBOL(pm_idle);
#endif
+#ifdef CONFIG_X86_32
+/*
+ * This halt magic was a workaround for ancient floppy DMA
+ * wreckage. It should be safe to remove.
+ */
+static int hlt_counter;
+void disable_hlt(void)
+{
+ hlt_counter++;
+}
+EXPORT_SYMBOL(disable_hlt);
+
+void enable_hlt(void)
+{
+ hlt_counter--;
+}
+EXPORT_SYMBOL(enable_hlt);
+
+static inline int hlt_use_halt(void)
+{
+ return (!hlt_counter && boot_cpu_data.hlt_works_ok);
+}
+#else
static inline int hlt_use_halt(void)
{
return 1;
}
+#endif
#ifndef CONFIG_SMP
static inline void play_dead(void)
diff --git a/trunk/arch/x86/net/bpf_jit.S b/trunk/arch/x86/net/bpf_jit.S
index 877b9a1b2152..66870223f8c5 100644
--- a/trunk/arch/x86/net/bpf_jit.S
+++ b/trunk/arch/x86/net/bpf_jit.S
@@ -18,16 +18,16 @@
* r9d : hlen = skb->len - skb->data_len
*/
#define SKBDATA %r8
-#define SKF_MAX_NEG_OFF $(-0x200000) /* SKF_LL_OFF from filter.h */
-sk_load_word:
- .globl sk_load_word
+sk_load_word_ind:
+ .globl sk_load_word_ind
- test %esi,%esi
- js bpf_slow_path_word_neg
+ add %ebx,%esi /* offset += X */
+# test %esi,%esi /* if (offset < 0) goto bpf_error; */
+ js bpf_error
-sk_load_word_positive_offset:
- .globl sk_load_word_positive_offset
+sk_load_word:
+ .globl sk_load_word
mov %r9d,%eax # hlen
sub %esi,%eax # hlen - offset
@@ -37,14 +37,15 @@ sk_load_word_positive_offset:
bswap %eax /* ntohl() */
ret
-sk_load_half:
- .globl sk_load_half
- test %esi,%esi
- js bpf_slow_path_half_neg
+sk_load_half_ind:
+ .globl sk_load_half_ind
+
+ add %ebx,%esi /* offset += X */
+ js bpf_error
-sk_load_half_positive_offset:
- .globl sk_load_half_positive_offset
+sk_load_half:
+ .globl sk_load_half
mov %r9d,%eax
sub %esi,%eax # hlen - offset
@@ -54,15 +55,14 @@ sk_load_half_positive_offset:
rol $8,%ax # ntohs()
ret
+sk_load_byte_ind:
+ .globl sk_load_byte_ind
+ add %ebx,%esi /* offset += X */
+ js bpf_error
+
sk_load_byte:
.globl sk_load_byte
- test %esi,%esi
- js bpf_slow_path_byte_neg
-
-sk_load_byte_positive_offset:
- .globl sk_load_byte_positive_offset
-
cmp %esi,%r9d /* if (offset >= hlen) goto bpf_slow_path_byte */
jle bpf_slow_path_byte
movzbl (SKBDATA,%rsi),%eax
@@ -73,21 +73,25 @@ sk_load_byte_positive_offset:
*
* Implements BPF_S_LDX_B_MSH : ldxb 4*([offset]&0xf)
* Must preserve A accumulator (%eax)
- * Inputs : %esi is the offset value
+ * Inputs : %esi is the offset value, already known positive
*/
-sk_load_byte_msh:
- .globl sk_load_byte_msh
- test %esi,%esi
- js bpf_slow_path_byte_msh_neg
-
-sk_load_byte_msh_positive_offset:
- .globl sk_load_byte_msh_positive_offset
+ENTRY(sk_load_byte_msh)
+ CFI_STARTPROC
cmp %esi,%r9d /* if (offset >= hlen) goto bpf_slow_path_byte_msh */
jle bpf_slow_path_byte_msh
movzbl (SKBDATA,%rsi),%ebx
and $15,%bl
shl $2,%bl
ret
+ CFI_ENDPROC
+ENDPROC(sk_load_byte_msh)
+
+bpf_error:
+# force a return 0 from jit handler
+ xor %eax,%eax
+ mov -8(%rbp),%rbx
+ leaveq
+ ret
/* rsi contains offset and can be scratched */
#define bpf_slow_path_common(LEN) \
@@ -134,67 +138,3 @@ bpf_slow_path_byte_msh:
shl $2,%al
xchg %eax,%ebx
ret
-
-#define sk_negative_common(SIZE) \
- push %rdi; /* save skb */ \
- push %r9; \
- push SKBDATA; \
-/* rsi already has offset */ \
- mov $SIZE,%ecx; /* size */ \
- call bpf_internal_load_pointer_neg_helper; \
- test %rax,%rax; \
- pop SKBDATA; \
- pop %r9; \
- pop %rdi; \
- jz bpf_error
-
-
-bpf_slow_path_word_neg:
- cmp SKF_MAX_NEG_OFF, %esi /* test range */
- jl bpf_error /* offset lower -> error */
-sk_load_word_negative_offset:
- .globl sk_load_word_negative_offset
- sk_negative_common(4)
- mov (%rax), %eax
- bswap %eax
- ret
-
-bpf_slow_path_half_neg:
- cmp SKF_MAX_NEG_OFF, %esi
- jl bpf_error
-sk_load_half_negative_offset:
- .globl sk_load_half_negative_offset
- sk_negative_common(2)
- mov (%rax),%ax
- rol $8,%ax
- movzwl %ax,%eax
- ret
-
-bpf_slow_path_byte_neg:
- cmp SKF_MAX_NEG_OFF, %esi
- jl bpf_error
-sk_load_byte_negative_offset:
- .globl sk_load_byte_negative_offset
- sk_negative_common(1)
- movzbl (%rax), %eax
- ret
-
-bpf_slow_path_byte_msh_neg:
- cmp SKF_MAX_NEG_OFF, %esi
- jl bpf_error
-sk_load_byte_msh_negative_offset:
- .globl sk_load_byte_msh_negative_offset
- xchg %eax,%ebx /* dont lose A , X is about to be scratched */
- sk_negative_common(1)
- movzbl (%rax),%eax
- and $15,%al
- shl $2,%al
- xchg %eax,%ebx
- ret
-
-bpf_error:
-# force a return 0 from jit handler
- xor %eax,%eax
- mov -8(%rbp),%rbx
- leaveq
- ret
diff --git a/trunk/arch/x86/net/bpf_jit_comp.c b/trunk/arch/x86/net/bpf_jit_comp.c
index 0597f95b6da6..5671752f8d9c 100644
--- a/trunk/arch/x86/net/bpf_jit_comp.c
+++ b/trunk/arch/x86/net/bpf_jit_comp.c
@@ -30,10 +30,7 @@ int bpf_jit_enable __read_mostly;
* assembly code in arch/x86/net/bpf_jit.S
*/
extern u8 sk_load_word[], sk_load_half[], sk_load_byte[], sk_load_byte_msh[];
-extern u8 sk_load_word_positive_offset[], sk_load_half_positive_offset[];
-extern u8 sk_load_byte_positive_offset[], sk_load_byte_msh_positive_offset[];
-extern u8 sk_load_word_negative_offset[], sk_load_half_negative_offset[];
-extern u8 sk_load_byte_negative_offset[], sk_load_byte_msh_negative_offset[];
+extern u8 sk_load_word_ind[], sk_load_half_ind[], sk_load_byte_ind[];
static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
{
@@ -120,8 +117,6 @@ static inline void bpf_flush_icache(void *start, void *end)
set_fs(old_fs);
}
-#define CHOOSE_LOAD_FUNC(K, func) \
- ((int)K < 0 ? ((int)K >= SKF_LL_OFF ? func##_negative_offset : func) : func##_positive_offset)
void bpf_jit_compile(struct sk_filter *fp)
{
@@ -294,7 +289,7 @@ void bpf_jit_compile(struct sk_filter *fp)
EMIT2(0x24, K & 0xFF); /* and imm8,%al */
} else if (K >= 0xFFFF0000) {
EMIT2(0x66, 0x25); /* and imm16,%ax */
- EMIT(K, 2);
+ EMIT2(K, 2);
} else {
EMIT1_off32(0x25, K); /* and imm32,%eax */
}
@@ -478,46 +473,44 @@ void bpf_jit_compile(struct sk_filter *fp)
#endif
break;
case BPF_S_LD_W_ABS:
- func = CHOOSE_LOAD_FUNC(K, sk_load_word);
+ func = sk_load_word;
common_load: seen |= SEEN_DATAREF;
+ if ((int)K < 0) {
+ /* Abort the JIT because __load_pointer() is needed. */
+ goto out;
+ }
t_offset = func - (image + addrs[i]);
EMIT1_off32(0xbe, K); /* mov imm32,%esi */
EMIT1_off32(0xe8, t_offset); /* call */
break;
case BPF_S_LD_H_ABS:
- func = CHOOSE_LOAD_FUNC(K, sk_load_half);
+ func = sk_load_half;
goto common_load;
case BPF_S_LD_B_ABS:
- func = CHOOSE_LOAD_FUNC(K, sk_load_byte);
+ func = sk_load_byte;
goto common_load;
case BPF_S_LDX_B_MSH:
- func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh);
+ if ((int)K < 0) {
+ /* Abort the JIT because __load_pointer() is needed. */
+ goto out;
+ }
seen |= SEEN_DATAREF | SEEN_XREG;
- t_offset = func - (image + addrs[i]);
+ t_offset = sk_load_byte_msh - (image + addrs[i]);
EMIT1_off32(0xbe, K); /* mov imm32,%esi */
EMIT1_off32(0xe8, t_offset); /* call sk_load_byte_msh */
break;
case BPF_S_LD_W_IND:
- func = sk_load_word;
+ func = sk_load_word_ind;
common_load_ind: seen |= SEEN_DATAREF | SEEN_XREG;
t_offset = func - (image + addrs[i]);
- if (K) {
- if (is_imm8(K)) {
- EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx), %esi */
- } else {
- EMIT2(0x8d, 0xb3); /* lea imm32(%rbx),%esi */
- EMIT(K, 4);
- }
- } else {
- EMIT2(0x89,0xde); /* mov %ebx,%esi */
- }
+ EMIT1_off32(0xbe, K); /* mov imm32,%esi */
EMIT1_off32(0xe8, t_offset); /* call sk_load_xxx_ind */
break;
case BPF_S_LD_H_IND:
- func = sk_load_half;
+ func = sk_load_half_ind;
goto common_load_ind;
case BPF_S_LD_B_IND:
- func = sk_load_byte;
+ func = sk_load_byte_ind;
goto common_load_ind;
case BPF_S_JMP_JA:
t_offset = addrs[i + K] - addrs[i];
diff --git a/trunk/arch/x86/power/cpu.c b/trunk/arch/x86/power/cpu.c
index 218cdb16163c..47936830968c 100644
--- a/trunk/arch/x86/power/cpu.c
+++ b/trunk/arch/x86/power/cpu.c
@@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt)
fix_processor_context();
do_fpu_end();
- x86_platform.restore_sched_clock_state();
mtrr_bp_restore();
}
/* Needed by apm.c */
void restore_processor_state(void)
{
+ x86_platform.restore_sched_clock_state();
__restore_processor_state(&saved_context);
}
#ifdef CONFIG_X86_32
diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c
index 4f51bebac02c..b132ade26f77 100644
--- a/trunk/arch/x86/xen/enlighten.c
+++ b/trunk/arch/x86/xen/enlighten.c
@@ -967,7 +967,7 @@ void xen_setup_shared_info(void)
xen_setup_mfn_list_list();
}
-/* This is called once we have the cpu_possible_mask */
+/* This is called once we have the cpu_possible_map */
void xen_setup_vcpu_info_placement(void)
{
int cpu;
diff --git a/trunk/arch/x86/xen/pci-swiotlb-xen.c b/trunk/arch/x86/xen/pci-swiotlb-xen.c
index 967633ad98c4..b480d4207a4c 100644
--- a/trunk/arch/x86/xen/pci-swiotlb-xen.c
+++ b/trunk/arch/x86/xen/pci-swiotlb-xen.c
@@ -12,8 +12,8 @@ int xen_swiotlb __read_mostly;
static struct dma_map_ops xen_swiotlb_dma_ops = {
.mapping_error = xen_swiotlb_dma_mapping_error,
- .alloc = xen_swiotlb_alloc_coherent,
- .free = xen_swiotlb_free_coherent,
+ .alloc_coherent = xen_swiotlb_alloc_coherent,
+ .free_coherent = xen_swiotlb_free_coherent,
.sync_single_for_cpu = xen_swiotlb_sync_single_for_cpu,
.sync_single_for_device = xen_swiotlb_sync_single_for_device,
.sync_sg_for_cpu = xen_swiotlb_sync_sg_for_cpu,
diff --git a/trunk/crypto/ablkcipher.c b/trunk/crypto/ablkcipher.c
index 8d3a056ebeea..a0f768c1d9aa 100644
--- a/trunk/crypto/ablkcipher.c
+++ b/trunk/crypto/ablkcipher.c
@@ -613,7 +613,8 @@ static int crypto_givcipher_default(struct crypto_alg *alg, u32 type, u32 mask)
return err;
}
-struct crypto_alg *crypto_lookup_skcipher(const char *name, u32 type, u32 mask)
+static struct crypto_alg *crypto_lookup_skcipher(const char *name, u32 type,
+ u32 mask)
{
struct crypto_alg *alg;
@@ -651,7 +652,6 @@ struct crypto_alg *crypto_lookup_skcipher(const char *name, u32 type, u32 mask)
return ERR_PTR(crypto_givcipher_default(alg, type, mask));
}
-EXPORT_SYMBOL_GPL(crypto_lookup_skcipher);
int crypto_grab_skcipher(struct crypto_skcipher_spawn *spawn, const char *name,
u32 type, u32 mask)
diff --git a/trunk/crypto/aead.c b/trunk/crypto/aead.c
index e4cb35159be4..04add3dca6fe 100644
--- a/trunk/crypto/aead.c
+++ b/trunk/crypto/aead.c
@@ -470,7 +470,8 @@ static int crypto_nivaead_default(struct crypto_alg *alg, u32 type, u32 mask)
return err;
}
-struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, u32 mask)
+static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
+ u32 mask)
{
struct crypto_alg *alg;
@@ -502,7 +503,6 @@ struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, u32 mask)
return ERR_PTR(crypto_nivaead_default(alg, type, mask));
}
-EXPORT_SYMBOL_GPL(crypto_lookup_aead);
int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name,
u32 type, u32 mask)
diff --git a/trunk/crypto/crypto_user.c b/trunk/crypto/crypto_user.c
index f1ea0a064135..f76e42bcc6e7 100644
--- a/trunk/crypto/crypto_user.c
+++ b/trunk/crypto/crypto_user.c
@@ -21,13 +21,9 @@
#include
#include
#include
-#include
#include
#include
#include
-#include
-#include
-
#include "internal.h"
DEFINE_MUTEX(crypto_cfg_mutex);
@@ -305,60 +301,6 @@ static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
return crypto_unregister_instance(alg);
}
-static struct crypto_alg *crypto_user_skcipher_alg(const char *name, u32 type,
- u32 mask)
-{
- int err;
- struct crypto_alg *alg;
-
- type = crypto_skcipher_type(type);
- mask = crypto_skcipher_mask(mask);
-
- for (;;) {
- alg = crypto_lookup_skcipher(name, type, mask);
- if (!IS_ERR(alg))
- return alg;
-
- err = PTR_ERR(alg);
- if (err != -EAGAIN)
- break;
- if (signal_pending(current)) {
- err = -EINTR;
- break;
- }
- }
-
- return ERR_PTR(err);
-}
-
-static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type,
- u32 mask)
-{
- int err;
- struct crypto_alg *alg;
-
- type &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV);
- type |= CRYPTO_ALG_TYPE_AEAD;
- mask &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV);
- mask |= CRYPTO_ALG_TYPE_MASK;
-
- for (;;) {
- alg = crypto_lookup_aead(name, type, mask);
- if (!IS_ERR(alg))
- return alg;
-
- err = PTR_ERR(alg);
- if (err != -EAGAIN)
- break;
- if (signal_pending(current)) {
- err = -EINTR;
- break;
- }
- }
-
- return ERR_PTR(err);
-}
-
static int crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
@@ -383,19 +325,7 @@ static int crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh,
else
name = p->cru_name;
- switch (p->cru_type & p->cru_mask & CRYPTO_ALG_TYPE_MASK) {
- case CRYPTO_ALG_TYPE_AEAD:
- alg = crypto_user_aead_alg(name, p->cru_type, p->cru_mask);
- break;
- case CRYPTO_ALG_TYPE_GIVCIPHER:
- case CRYPTO_ALG_TYPE_BLKCIPHER:
- case CRYPTO_ALG_TYPE_ABLKCIPHER:
- alg = crypto_user_skcipher_alg(name, p->cru_type, p->cru_mask);
- break;
- default:
- alg = crypto_alg_mod_lookup(name, p->cru_type, p->cru_mask);
- }
-
+ alg = crypto_alg_mod_lookup(name, p->cru_type, p->cru_mask);
if (IS_ERR(alg))
return PTR_ERR(alg);
@@ -457,20 +387,12 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
if ((type == (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE) &&
(nlh->nlmsg_flags & NLM_F_DUMP))) {
- struct crypto_alg *alg;
- u16 dump_alloc = 0;
-
if (link->dump == NULL)
return -EINVAL;
-
- list_for_each_entry(alg, &crypto_alg_list, cra_list)
- dump_alloc += CRYPTO_REPORT_MAXSIZE;
-
{
struct netlink_dump_control c = {
.dump = link->dump,
.done = link->done,
- .min_dump_alloc = dump_alloc,
};
return netlink_dump_start(crypto_nlsk, skb, nlh, &c);
}
diff --git a/trunk/crypto/pcrypt.c b/trunk/crypto/pcrypt.c
index b2c99dc1c5e2..29a89dad68b6 100644
--- a/trunk/crypto/pcrypt.c
+++ b/trunk/crypto/pcrypt.c
@@ -280,11 +280,11 @@ static int pcrypt_aead_init_tfm(struct crypto_tfm *tfm)
ictx->tfm_count++;
- cpu_index = ictx->tfm_count % cpumask_weight(cpu_online_mask);
+ cpu_index = ictx->tfm_count % cpumask_weight(cpu_active_mask);
- ctx->cb_cpu = cpumask_first(cpu_online_mask);
+ ctx->cb_cpu = cpumask_first(cpu_active_mask);
for (cpu = 0; cpu < cpu_index; cpu++)
- ctx->cb_cpu = cpumask_next(ctx->cb_cpu, cpu_online_mask);
+ ctx->cb_cpu = cpumask_next(ctx->cb_cpu, cpu_active_mask);
cipher = crypto_spawn_aead(crypto_instance_ctx(inst));
@@ -472,7 +472,7 @@ static int pcrypt_init_padata(struct padata_pcrypt *pcrypt,
goto err_free_padata;
}
- cpumask_and(mask->mask, cpu_possible_mask, cpu_online_mask);
+ cpumask_and(mask->mask, cpu_possible_mask, cpu_active_mask);
rcu_assign_pointer(pcrypt->cb_cpumask, mask);
pcrypt->nblock.notifier_call = pcrypt_cpumask_change_notify;
diff --git a/trunk/drivers/Kconfig b/trunk/drivers/Kconfig
index d236aef7e59f..6f0459cb745b 100644
--- a/trunk/drivers/Kconfig
+++ b/trunk/drivers/Kconfig
@@ -50,8 +50,6 @@ source "drivers/i2c/Kconfig"
source "drivers/spi/Kconfig"
-source "drivers/hsi/Kconfig"
-
source "drivers/pps/Kconfig"
source "drivers/ptp/Kconfig"
diff --git a/trunk/drivers/Makefile b/trunk/drivers/Makefile
index 95952c82bf16..262b19d6b627 100644
--- a/trunk/drivers/Makefile
+++ b/trunk/drivers/Makefile
@@ -53,7 +53,6 @@ obj-$(CONFIG_ATA) += ata/
obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/
-obj-y += hsi/
obj-y += net/
obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_FUSION) += message/
diff --git a/trunk/drivers/acpi/ec_sys.c b/trunk/drivers/acpi/ec_sys.c
index 7586544fddb4..b258cab9061c 100644
--- a/trunk/drivers/acpi/ec_sys.c
+++ b/trunk/drivers/acpi/ec_sys.c
@@ -27,6 +27,12 @@ MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "
static struct dentry *acpi_ec_debugfs_dir;
+static int acpi_ec_open_io(struct inode *i, struct file *f)
+{
+ f->private_data = i->i_private;
+ return 0;
+}
+
static ssize_t acpi_ec_read_io(struct file *f, char __user *buf,
size_t count, loff_t *off)
{
@@ -89,7 +95,7 @@ static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf,
static const struct file_operations acpi_ec_io_ops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = acpi_ec_open_io,
.read = acpi_ec_read_io,
.write = acpi_ec_write_io,
.llseek = default_llseek,
diff --git a/trunk/drivers/base/firmware_class.c b/trunk/drivers/base/firmware_class.c
index 5401814c874d..6c9387d646ec 100644
--- a/trunk/drivers/base/firmware_class.c
+++ b/trunk/drivers/base/firmware_class.c
@@ -16,11 +16,10 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
-#include
#define to_dev(obj) container_of(obj, struct device, kobj)
@@ -82,11 +81,6 @@ enum {
static int loading_timeout = 60; /* In seconds */
-static inline long firmware_loading_timeout(void)
-{
- return loading_timeout > 0 ? loading_timeout * HZ : MAX_SCHEDULE_TIMEOUT;
-}
-
/* fw_lock could be moved to 'struct firmware_priv' but since it is just
* guarding for corner cases a global lock should be OK */
static DEFINE_MUTEX(fw_lock);
@@ -446,11 +440,13 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
{
struct firmware_priv *fw_priv;
struct device *f_dev;
+ int error;
fw_priv = kzalloc(sizeof(*fw_priv) + strlen(fw_name) + 1 , GFP_KERNEL);
if (!fw_priv) {
dev_err(device, "%s: kmalloc failed\n", __func__);
- return ERR_PTR(-ENOMEM);
+ error = -ENOMEM;
+ goto err_out;
}
fw_priv->fw = firmware;
@@ -467,80 +463,98 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
f_dev->parent = device;
f_dev->class = &firmware_class;
- return fw_priv;
-}
-
-static struct firmware_priv *
-_request_firmware_prepare(const struct firmware **firmware_p, const char *name,
- struct device *device, bool uevent, bool nowait)
-{
- struct firmware *firmware;
- struct firmware_priv *fw_priv;
+ dev_set_uevent_suppress(f_dev, true);
- if (!firmware_p)
- return ERR_PTR(-EINVAL);
+ /* Need to pin this module until class device is destroyed */
+ __module_get(THIS_MODULE);
- *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
- if (!firmware) {
- dev_err(device, "%s: kmalloc(struct firmware) failed\n",
- __func__);
- return ERR_PTR(-ENOMEM);
+ error = device_add(f_dev);
+ if (error) {
+ dev_err(device, "%s: device_register failed\n", __func__);
+ goto err_put_dev;
}
- if (fw_get_builtin_firmware(firmware, name)) {
- dev_dbg(device, "firmware: using built-in firmware %s\n", name);
- return NULL;
+ error = device_create_bin_file(f_dev, &firmware_attr_data);
+ if (error) {
+ dev_err(device, "%s: sysfs_create_bin_file failed\n", __func__);
+ goto err_del_dev;
}
- fw_priv = fw_create_instance(firmware, name, device, uevent, nowait);
- if (IS_ERR(fw_priv)) {
- release_firmware(firmware);
- *firmware_p = NULL;
+ error = device_create_file(f_dev, &dev_attr_loading);
+ if (error) {
+ dev_err(device, "%s: device_create_file failed\n", __func__);
+ goto err_del_bin_attr;
}
+
+ if (uevent)
+ dev_set_uevent_suppress(f_dev, false);
+
return fw_priv;
+
+err_del_bin_attr:
+ device_remove_bin_file(f_dev, &firmware_attr_data);
+err_del_dev:
+ device_del(f_dev);
+err_put_dev:
+ put_device(f_dev);
+err_out:
+ return ERR_PTR(error);
}
-static void _request_firmware_cleanup(const struct firmware **firmware_p)
+static void fw_destroy_instance(struct firmware_priv *fw_priv)
{
- release_firmware(*firmware_p);
- *firmware_p = NULL;
+ struct device *f_dev = &fw_priv->dev;
+
+ device_remove_file(f_dev, &dev_attr_loading);
+ device_remove_bin_file(f_dev, &firmware_attr_data);
+ device_unregister(f_dev);
}
-static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,
- long timeout)
+static int _request_firmware(const struct firmware **firmware_p,
+ const char *name, struct device *device,
+ bool uevent, bool nowait)
{
+ struct firmware_priv *fw_priv;
+ struct firmware *firmware;
int retval = 0;
- struct device *f_dev = &fw_priv->dev;
- dev_set_uevent_suppress(f_dev, true);
+ if (!firmware_p)
+ return -EINVAL;
- /* Need to pin this module until class device is destroyed */
- __module_get(THIS_MODULE);
+ *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
+ if (!firmware) {
+ dev_err(device, "%s: kmalloc(struct firmware) failed\n",
+ __func__);
+ return -ENOMEM;
+ }
- retval = device_add(f_dev);
- if (retval) {
- dev_err(f_dev, "%s: device_register failed\n", __func__);
- goto err_put_dev;
+ if (fw_get_builtin_firmware(firmware, name)) {
+ dev_dbg(device, "firmware: using built-in firmware %s\n", name);
+ return 0;
}
- retval = device_create_bin_file(f_dev, &firmware_attr_data);
- if (retval) {
- dev_err(f_dev, "%s: sysfs_create_bin_file failed\n", __func__);
- goto err_del_dev;
+ read_lock_usermodehelper();
+
+ if (WARN_ON(usermodehelper_is_disabled())) {
+ dev_err(device, "firmware: %s will not be loaded\n", name);
+ retval = -EBUSY;
+ goto out;
}
- retval = device_create_file(f_dev, &dev_attr_loading);
- if (retval) {
- dev_err(f_dev, "%s: device_create_file failed\n", __func__);
- goto err_del_bin_attr;
+ if (uevent)
+ dev_dbg(device, "firmware: requesting %s\n", name);
+
+ fw_priv = fw_create_instance(firmware, name, device, uevent, nowait);
+ if (IS_ERR(fw_priv)) {
+ retval = PTR_ERR(fw_priv);
+ goto out;
}
if (uevent) {
- dev_set_uevent_suppress(f_dev, false);
- dev_dbg(f_dev, "firmware: requesting %s\n", fw_priv->fw_id);
- if (timeout != MAX_SCHEDULE_TIMEOUT)
+ if (loading_timeout > 0)
mod_timer(&fw_priv->timeout,
- round_jiffies_up(jiffies + timeout));
+ round_jiffies_up(jiffies +
+ loading_timeout * HZ));
kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
}
@@ -556,13 +570,16 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,
fw_priv->fw = NULL;
mutex_unlock(&fw_lock);
- device_remove_file(f_dev, &dev_attr_loading);
-err_del_bin_attr:
- device_remove_bin_file(f_dev, &firmware_attr_data);
-err_del_dev:
- device_del(f_dev);
-err_put_dev:
- put_device(f_dev);
+ fw_destroy_instance(fw_priv);
+
+out:
+ read_unlock_usermodehelper();
+
+ if (retval) {
+ release_firmware(firmware);
+ *firmware_p = NULL;
+ }
+
return retval;
}
@@ -585,26 +602,7 @@ int
request_firmware(const struct firmware **firmware_p, const char *name,
struct device *device)
{
- struct firmware_priv *fw_priv;
- int ret;
-
- fw_priv = _request_firmware_prepare(firmware_p, name, device, true,
- false);
- if (IS_ERR_OR_NULL(fw_priv))
- return PTR_RET(fw_priv);
-
- ret = usermodehelper_read_trylock();
- if (WARN_ON(ret)) {
- dev_err(device, "firmware: %s will not be loaded\n", name);
- } else {
- ret = _request_firmware_load(fw_priv, true,
- firmware_loading_timeout());
- usermodehelper_read_unlock();
- }
- if (ret)
- _request_firmware_cleanup(firmware_p);
-
- return ret;
+ return _request_firmware(firmware_p, name, device, true, false);
}
/**
@@ -631,39 +629,25 @@ struct firmware_work {
bool uevent;
};
-static void request_firmware_work_func(struct work_struct *work)
+static int request_firmware_work_func(void *arg)
{
- struct firmware_work *fw_work;
+ struct firmware_work *fw_work = arg;
const struct firmware *fw;
- struct firmware_priv *fw_priv;
- long timeout;
int ret;
- fw_work = container_of(work, struct firmware_work, work);
- fw_priv = _request_firmware_prepare(&fw, fw_work->name, fw_work->device,
- fw_work->uevent, true);
- if (IS_ERR_OR_NULL(fw_priv)) {
- ret = PTR_RET(fw_priv);
- goto out;
- }
-
- timeout = usermodehelper_read_lock_wait(firmware_loading_timeout());
- if (timeout) {
- ret = _request_firmware_load(fw_priv, fw_work->uevent, timeout);
- usermodehelper_read_unlock();
- } else {
- dev_dbg(fw_work->device, "firmware: %s loading timed out\n",
- fw_work->name);
- ret = -EAGAIN;
+ if (!arg) {
+ WARN_ON(1);
+ return 0;
}
- if (ret)
- _request_firmware_cleanup(&fw);
- out:
+ ret = _request_firmware(&fw, fw_work->name, fw_work->device,
+ fw_work->uevent, true);
fw_work->cont(fw, fw_work->context);
module_put(fw_work->module);
kfree(fw_work);
+
+ return ret;
}
/**
@@ -689,6 +673,7 @@ request_firmware_nowait(
const char *name, struct device *device, gfp_t gfp, void *context,
void (*cont)(const struct firmware *fw, void *context))
{
+ struct task_struct *task;
struct firmware_work *fw_work;
fw_work = kzalloc(sizeof (struct firmware_work), gfp);
@@ -707,8 +692,15 @@ request_firmware_nowait(
return -EFAULT;
}
- INIT_WORK(&fw_work->work, request_firmware_work_func);
- schedule_work(&fw_work->work);
+ task = kthread_run(request_firmware_work_func, fw_work,
+ "firmware/%s", name);
+ if (IS_ERR(task)) {
+ fw_work->cont(NULL, fw_work->context);
+ module_put(fw_work->module);
+ kfree(fw_work);
+ return PTR_ERR(task);
+ }
+
return 0;
}
diff --git a/trunk/drivers/base/power/runtime.c b/trunk/drivers/base/power/runtime.c
index bd0f3949bcf9..541f821d4ea6 100644
--- a/trunk/drivers/base/power/runtime.c
+++ b/trunk/drivers/base/power/runtime.c
@@ -532,8 +532,6 @@ static int rpm_suspend(struct device *dev, int rpmflags)
dev->power.suspend_time = ktime_set(0, 0);
dev->power.max_time_suspended_ns = -1;
dev->power.deferred_resume = false;
- wake_up_all(&dev->power.wait_queue);
-
if (retval == -EAGAIN || retval == -EBUSY) {
dev->power.runtime_error = 0;
@@ -549,6 +547,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
} else {
pm_runtime_cancel_pending(dev);
}
+ wake_up_all(&dev->power.wait_queue);
goto out;
}
diff --git a/trunk/drivers/base/regmap/regcache-rbtree.c b/trunk/drivers/base/regmap/regcache-rbtree.c
index fb14a6343d4f..5157fa04c2f0 100644
--- a/trunk/drivers/base/regmap/regcache-rbtree.c
+++ b/trunk/drivers/base/regmap/regcache-rbtree.c
@@ -396,7 +396,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
map->cache_word_size);
/* Is this the hardware default? If so skip. */
- ret = regcache_lookup_reg(map, regtmp);
+ ret = regcache_lookup_reg(map, i);
if (ret >= 0 && val == map->reg_defaults[ret].def)
continue;
diff --git a/trunk/drivers/base/regmap/regmap-debugfs.c b/trunk/drivers/base/regmap/regmap-debugfs.c
index 251eb70f83e7..58517a5dac13 100644
--- a/trunk/drivers/base/regmap/regmap-debugfs.c
+++ b/trunk/drivers/base/regmap/regmap-debugfs.c
@@ -27,6 +27,12 @@ static size_t regmap_calc_reg_len(int max_val, char *buf, size_t buf_size)
return strlen(buf);
}
+static int regmap_open_file(struct inode *inode, struct file *file)
+{
+ file->private_data = inode->i_private;
+ return 0;
+}
+
static ssize_t regmap_name_read_file(struct file *file,
char __user *user_buf, size_t count,
loff_t *ppos)
@@ -51,7 +57,7 @@ static ssize_t regmap_name_read_file(struct file *file,
}
static const struct file_operations regmap_name_fops = {
- .open = simple_open,
+ .open = regmap_open_file,
.read = regmap_name_read_file,
.llseek = default_llseek,
};
@@ -168,7 +174,7 @@ static ssize_t regmap_map_write_file(struct file *file,
#endif
static const struct file_operations regmap_map_fops = {
- .open = simple_open,
+ .open = regmap_open_file,
.read = regmap_map_read_file,
.write = regmap_map_write_file,
.llseek = default_llseek,
@@ -237,7 +243,7 @@ static ssize_t regmap_access_read_file(struct file *file,
}
static const struct file_operations regmap_access_fops = {
- .open = simple_open,
+ .open = regmap_open_file,
.read = regmap_access_read_file,
.llseek = default_llseek,
};
diff --git a/trunk/drivers/block/floppy.c b/trunk/drivers/block/floppy.c
index b0b00d70c166..76a08236430a 100644
--- a/trunk/drivers/block/floppy.c
+++ b/trunk/drivers/block/floppy.c
@@ -1030,6 +1030,37 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
return 0;
}
+static DEFINE_SPINLOCK(floppy_hlt_lock);
+static int hlt_disabled;
+static void floppy_disable_hlt(void)
+{
+ unsigned long flags;
+
+ WARN_ONCE(1, "floppy_disable_hlt() scheduled for removal in 2012");
+ spin_lock_irqsave(&floppy_hlt_lock, flags);
+ if (!hlt_disabled) {
+ hlt_disabled = 1;
+#ifdef HAVE_DISABLE_HLT
+ disable_hlt();
+#endif
+ }
+ spin_unlock_irqrestore(&floppy_hlt_lock, flags);
+}
+
+static void floppy_enable_hlt(void)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&floppy_hlt_lock, flags);
+ if (hlt_disabled) {
+ hlt_disabled = 0;
+#ifdef HAVE_DISABLE_HLT
+ enable_hlt();
+#endif
+ }
+ spin_unlock_irqrestore(&floppy_hlt_lock, flags);
+}
+
static void setup_DMA(void)
{
unsigned long f;
@@ -1074,6 +1105,7 @@ static void setup_DMA(void)
fd_enable_dma();
release_dma_lock(f);
#endif
+ floppy_disable_hlt();
}
static void show_floppy(void);
@@ -1675,6 +1707,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
fd_disable_dma();
release_dma_lock(f);
+ floppy_enable_hlt();
do_floppy = NULL;
if (fdc >= N_FDC || FDCS->address == -1) {
/* we don't even know which FDC is the culprit */
@@ -1823,6 +1856,8 @@ static void floppy_shutdown(unsigned long data)
show_floppy();
cancel_activity();
+ floppy_enable_hlt();
+
flags = claim_dma_lock();
fd_disable_dma();
release_dma_lock(flags);
@@ -4473,6 +4508,7 @@ static void floppy_release_irq_and_dma(void)
#if N_FDC > 1
set_dor(1, ~8, 0);
#endif
+ floppy_enable_hlt();
if (floppy_track_buffer && max_buffer_sectors) {
tmpsize = max_buffer_sectors * 1024;
diff --git a/trunk/drivers/bluetooth/btmrvl_debugfs.c b/trunk/drivers/bluetooth/btmrvl_debugfs.c
index 428dbb7574bd..6c20bbb54b71 100644
--- a/trunk/drivers/bluetooth/btmrvl_debugfs.c
+++ b/trunk/drivers/bluetooth/btmrvl_debugfs.c
@@ -45,6 +45,12 @@ struct btmrvl_debugfs_data {
struct dentry *txdnldready;
};
+static int btmrvl_open_generic(struct inode *inode, struct file *file)
+{
+ file->private_data = inode->i_private;
+ return 0;
+}
+
static ssize_t btmrvl_hscfgcmd_write(struct file *file,
const char __user *ubuf, size_t count, loff_t *ppos)
{
@@ -87,7 +93,7 @@ static ssize_t btmrvl_hscfgcmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_hscfgcmd_fops = {
.read = btmrvl_hscfgcmd_read,
.write = btmrvl_hscfgcmd_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -128,7 +134,7 @@ static ssize_t btmrvl_psmode_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_psmode_fops = {
.read = btmrvl_psmode_read,
.write = btmrvl_psmode_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -174,7 +180,7 @@ static ssize_t btmrvl_pscmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_pscmd_fops = {
.read = btmrvl_pscmd_read,
.write = btmrvl_pscmd_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -215,7 +221,7 @@ static ssize_t btmrvl_gpiogap_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_gpiogap_fops = {
.read = btmrvl_gpiogap_read,
.write = btmrvl_gpiogap_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -259,7 +265,7 @@ static ssize_t btmrvl_hscmd_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_hscmd_fops = {
.read = btmrvl_hscmd_read,
.write = btmrvl_hscmd_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -299,7 +305,7 @@ static ssize_t btmrvl_hsmode_read(struct file *file, char __user * userbuf,
static const struct file_operations btmrvl_hsmode_fops = {
.read = btmrvl_hsmode_read,
.write = btmrvl_hsmode_write,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -317,7 +323,7 @@ static ssize_t btmrvl_curpsmode_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_curpsmode_fops = {
.read = btmrvl_curpsmode_read,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -335,7 +341,7 @@ static ssize_t btmrvl_psstate_read(struct file *file, char __user * userbuf,
static const struct file_operations btmrvl_psstate_fops = {
.read = btmrvl_psstate_read,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -353,7 +359,7 @@ static ssize_t btmrvl_hsstate_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_hsstate_fops = {
.read = btmrvl_hsstate_read,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
@@ -372,7 +378,7 @@ static ssize_t btmrvl_txdnldready_read(struct file *file, char __user *userbuf,
static const struct file_operations btmrvl_txdnldready_fops = {
.read = btmrvl_txdnldready_read,
- .open = simple_open,
+ .open = btmrvl_open_generic,
.llseek = default_llseek,
};
diff --git a/trunk/drivers/char/agp/intel-agp.h b/trunk/drivers/char/agp/intel-agp.h
index 7ea18a5fe71c..5da67f165afa 100644
--- a/trunk/drivers/char/agp/intel-agp.h
+++ b/trunk/drivers/char/agp/intel-agp.h
@@ -234,7 +234,6 @@
#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG 0x0166
#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB 0x0158 /* Server */
#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG 0x015A
-#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG 0x016A
int intel_gmch_probe(struct pci_dev *pdev,
struct agp_bridge_data *bridge);
diff --git a/trunk/drivers/char/agp/intel-gtt.c b/trunk/drivers/char/agp/intel-gtt.c
index 7f025fb620de..5cf47ac2d401 100644
--- a/trunk/drivers/char/agp/intel-gtt.c
+++ b/trunk/drivers/char/agp/intel-gtt.c
@@ -1190,6 +1190,7 @@ static inline int needs_idle_maps(void)
{
#ifdef CONFIG_INTEL_IOMMU
const unsigned short gpu_devid = intel_private.pcidev->device;
+ extern int intel_iommu_gfx_mapped;
/* Query intel_iommu to see if we need the workaround. Presumably that
* was loaded first.
@@ -1458,8 +1459,6 @@ static const struct intel_gtt_driver_description {
"Ivybridge", &sandybridge_gtt_driver },
{ PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG,
"Ivybridge", &sandybridge_gtt_driver },
- { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG,
- "Ivybridge", &sandybridge_gtt_driver },
{ 0, NULL, NULL }
};
diff --git a/trunk/drivers/char/apm-emulation.c b/trunk/drivers/char/apm-emulation.c
index 46118f845948..57501ca9204b 100644
--- a/trunk/drivers/char/apm-emulation.c
+++ b/trunk/drivers/char/apm-emulation.c
@@ -301,7 +301,7 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg)
* anything critical, chill a bit on each iteration.
*/
while (wait_event_freezable(apm_suspend_waitqueue,
- as->suspend_state != SUSPEND_ACKED))
+ as->suspend_state == SUSPEND_DONE))
msleep(10);
break;
case SUSPEND_ACKTO:
diff --git a/trunk/drivers/char/virtio_console.c b/trunk/drivers/char/virtio_console.c
index ddf86b6500b7..b58b56187065 100644
--- a/trunk/drivers/char/virtio_console.c
+++ b/trunk/drivers/char/virtio_console.c
@@ -1038,6 +1038,12 @@ static struct attribute_group port_attribute_group = {
.attrs = port_sysfs_entries,
};
+static int debugfs_open(struct inode *inode, struct file *filp)
+{
+ filp->private_data = inode->i_private;
+ return 0;
+}
+
static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *offp)
{
@@ -1081,7 +1087,7 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
static const struct file_operations port_debugfs_ops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = debugfs_open,
.read = debugfs_read,
};
diff --git a/trunk/drivers/cpufreq/Kconfig.arm b/trunk/drivers/cpufreq/Kconfig.arm
index ffbb44685915..32d790dd8180 100644
--- a/trunk/drivers/cpufreq/Kconfig.arm
+++ b/trunk/drivers/cpufreq/Kconfig.arm
@@ -51,6 +51,9 @@ config ARM_S5PV210_CPUFREQ
config ARM_EXYNOS_CPUFREQ
bool "SAMSUNG EXYNOS SoCs"
depends on ARCH_EXYNOS
+ select ARM_EXYNOS4210_CPUFREQ if CPU_EXYNOS4210
+ select ARM_EXYNOS4X12_CPUFREQ if (SOC_EXYNOS4212 || SOC_EXYNOS4412)
+ select ARM_EXYNOS5250_CPUFREQ if SOC_EXYNOS5250
default y
help
This adds the CPUFreq driver common part for Samsung
@@ -59,19 +62,20 @@ config ARM_EXYNOS_CPUFREQ
If in doubt, say N.
config ARM_EXYNOS4210_CPUFREQ
- def_bool CPU_EXYNOS4210
+ bool "Samsung EXYNOS4210"
+ depends on ARCH_EXYNOS
help
This adds the CPUFreq driver for Samsung EXYNOS4210
SoC (S5PV310 or S5PC210).
config ARM_EXYNOS4X12_CPUFREQ
- def_bool (SOC_EXYNOS4212 || SOC_EXYNOS4412)
+ bool "Samsung EXYNOS4X12"
help
This adds the CPUFreq driver for Samsung EXYNOS4X12
SoC (EXYNOS4212 or EXYNOS4412).
config ARM_EXYNOS5250_CPUFREQ
- def_bool SOC_EXYNOS5250
+ bool "Samsung EXYNOS5250"
help
This adds the CPUFreq driver for Samsung EXYNOS5250
SoC.
diff --git a/trunk/drivers/cpufreq/db8500-cpufreq.c b/trunk/drivers/cpufreq/db8500-cpufreq.c
index 0bf1b8910eeb..a22ffa5bff9f 100644
--- a/trunk/drivers/cpufreq/db8500-cpufreq.c
+++ b/trunk/drivers/cpufreq/db8500-cpufreq.c
@@ -142,7 +142,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */
/* policy sharing between dual CPUs */
- cpumask_copy(policy->cpus, cpu_present_mask);
+ cpumask_copy(policy->cpus, &cpu_present_map);
policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
diff --git a/trunk/drivers/dma/coh901318.c b/trunk/drivers/dma/coh901318.c
index 750925f9638b..dc89455f5550 100644
--- a/trunk/drivers/dma/coh901318.c
+++ b/trunk/drivers/dma/coh901318.c
@@ -104,6 +104,13 @@ static void coh901318_list_print(struct coh901318_chan *cohc,
static struct coh901318_base *debugfs_dma_base;
static struct dentry *dma_dentry;
+static int coh901318_debugfs_open(struct inode *inode, struct file *file)
+{
+
+ file->private_data = inode->i_private;
+ return 0;
+}
+
static int coh901318_debugfs_read(struct file *file, char __user *buf,
size_t count, loff_t *f_pos)
{
@@ -151,7 +158,7 @@ static int coh901318_debugfs_read(struct file *file, char __user *buf,
static const struct file_operations coh901318_debugfs_status_operations = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = coh901318_debugfs_open,
.read = coh901318_debugfs_read,
.llseek = default_llseek,
};
diff --git a/trunk/drivers/dma/sa11x0-dma.c b/trunk/drivers/dma/sa11x0-dma.c
index ec78ccef9132..16a6b48883cf 100644
--- a/trunk/drivers/dma/sa11x0-dma.c
+++ b/trunk/drivers/dma/sa11x0-dma.c
@@ -585,7 +585,7 @@ static dma_cookie_t sa11x0_dma_tx_submit(struct dma_async_tx_descriptor *tx)
static struct dma_async_tx_descriptor *sa11x0_dma_prep_slave_sg(
struct dma_chan *chan, struct scatterlist *sg, unsigned int sglen,
- enum dma_transfer_direction dir, unsigned long flags, void *context)
+ enum dma_transfer_direction dir, unsigned long flags)
{
struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
struct sa11x0_dma_desc *txd;
diff --git a/trunk/drivers/edac/mce_amd.c b/trunk/drivers/edac/mce_amd.c
index d0c372e30de4..36e1486eb9aa 100644
--- a/trunk/drivers/edac/mce_amd.c
+++ b/trunk/drivers/edac/mce_amd.c
@@ -754,7 +754,9 @@ static int __init mce_amd_init(void)
if (c->x86_vendor != X86_VENDOR_AMD)
return 0;
- if (c->x86 < 0xf || c->x86 > 0x15)
+ if ((c->x86 < 0xf || c->x86 > 0x12) &&
+ (c->x86 != 0x14 || c->x86_model > 0xf) &&
+ (c->x86 != 0x15 || c->x86_model > 0xf))
return 0;
fam_ops = kzalloc(sizeof(struct amd_decoder_ops), GFP_KERNEL);
@@ -795,7 +797,7 @@ static int __init mce_amd_init(void)
break;
default:
- printk(KERN_WARNING "Huh? What family is it: 0x%x?!\n", c->x86);
+ printk(KERN_WARNING "Huh? What family is that: %d?!\n", c->x86);
kfree(fam_ops);
return -EINVAL;
}
diff --git a/trunk/drivers/gpio/gpio-tegra.c b/trunk/drivers/gpio/gpio-tegra.c
index 12f349b3830d..32de6707e3c4 100644
--- a/trunk/drivers/gpio/gpio-tegra.c
+++ b/trunk/drivers/gpio/gpio-tegra.c
@@ -22,7 +22,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -37,8 +37,7 @@
#define GPIO_PORT(x) (((x) >> 3) & 0x3)
#define GPIO_BIT(x) ((x) & 0x7)
-#define GPIO_REG(x) (GPIO_BANK(x) * tegra_gpio_bank_stride + \
- GPIO_PORT(x) * 4)
+#define GPIO_REG(x) (GPIO_BANK(x) * 0x80 + GPIO_PORT(x) * 4)
#define GPIO_CNF(x) (GPIO_REG(x) + 0x00)
#define GPIO_OE(x) (GPIO_REG(x) + 0x10)
@@ -49,12 +48,12 @@
#define GPIO_INT_LVL(x) (GPIO_REG(x) + 0x60)
#define GPIO_INT_CLR(x) (GPIO_REG(x) + 0x70)
-#define GPIO_MSK_CNF(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x00)
-#define GPIO_MSK_OE(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x10)
-#define GPIO_MSK_OUT(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0X20)
-#define GPIO_MSK_INT_STA(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x40)
-#define GPIO_MSK_INT_ENB(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x50)
-#define GPIO_MSK_INT_LVL(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x60)
+#define GPIO_MSK_CNF(x) (GPIO_REG(x) + 0x800)
+#define GPIO_MSK_OE(x) (GPIO_REG(x) + 0x810)
+#define GPIO_MSK_OUT(x) (GPIO_REG(x) + 0X820)
+#define GPIO_MSK_INT_STA(x) (GPIO_REG(x) + 0x840)
+#define GPIO_MSK_INT_ENB(x) (GPIO_REG(x) + 0x850)
+#define GPIO_MSK_INT_LVL(x) (GPIO_REG(x) + 0x860)
#define GPIO_INT_LVL_MASK 0x010101
#define GPIO_INT_LVL_EDGE_RISING 0x000101
@@ -79,8 +78,6 @@ struct tegra_gpio_bank {
static struct irq_domain *irq_domain;
static void __iomem *regs;
static u32 tegra_gpio_bank_count;
-static u32 tegra_gpio_bank_stride;
-static u32 tegra_gpio_upper_offset;
static struct tegra_gpio_bank *tegra_gpio_banks;
static inline void tegra_gpio_writel(u32 val, u32 reg)
@@ -336,26 +333,6 @@ static struct irq_chip tegra_gpio_irq_chip = {
#endif
};
-struct tegra_gpio_soc_config {
- u32 bank_stride;
- u32 upper_offset;
-};
-
-static struct tegra_gpio_soc_config tegra20_gpio_config = {
- .bank_stride = 0x80,
- .upper_offset = 0x800,
-};
-
-static struct tegra_gpio_soc_config tegra30_gpio_config = {
- .bank_stride = 0x100,
- .upper_offset = 0x80,
-};
-
-static struct of_device_id tegra_gpio_of_match[] __devinitdata = {
- { .compatible = "nvidia,tegra30-gpio", .data = &tegra30_gpio_config },
- { .compatible = "nvidia,tegra20-gpio", .data = &tegra20_gpio_config },
- { },
-};
/* This lock class tells lockdep that GPIO irqs are in a different
* category than their parents, so it won't report false recursion.
@@ -364,8 +341,6 @@ static struct lock_class_key gpio_lock_class;
static int __devinit tegra_gpio_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
- struct tegra_gpio_soc_config *config;
int irq_base;
struct resource *res;
struct tegra_gpio_bank *bank;
@@ -373,15 +348,6 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
int i;
int j;
- match = of_match_device(tegra_gpio_of_match, &pdev->dev);
- if (match)
- config = (struct tegra_gpio_soc_config *)match->data;
- else
- config = &tegra20_gpio_config;
-
- tegra_gpio_bank_stride = config->bank_stride;
- tegra_gpio_upper_offset = config->upper_offset;
-
for (;;) {
res = platform_get_resource(pdev, IORESOURCE_IRQ, tegra_gpio_bank_count);
if (!res)
@@ -436,7 +402,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
return -ENODEV;
}
- for (i = 0; i < tegra_gpio_bank_count; i++) {
+ for (i = 0; i < 7; i++) {
for (j = 0; j < 4; j++) {
int gpio = tegra_gpio_compose(i, j, 0);
tegra_gpio_writel(0x00, GPIO_INT_ENB(gpio));
@@ -475,6 +441,11 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
return 0;
}
+static struct of_device_id tegra_gpio_of_match[] __devinitdata = {
+ { .compatible = "nvidia,tegra20-gpio", },
+ { },
+};
+
static struct platform_driver tegra_gpio_driver = {
.driver = {
.name = "tegra-gpio",
@@ -514,7 +485,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
int i;
int j;
- for (i = 0; i < tegra_gpio_bank_count; i++) {
+ for (i = 0; i < 7; i++) {
for (j = 0; j < 4; j++) {
int gpio = tegra_gpio_compose(i, j, 0);
seq_printf(s,
diff --git a/trunk/drivers/gpu/drm/Kconfig b/trunk/drivers/gpu/drm/Kconfig
index e354bc0b052a..cc1148837e24 100644
--- a/trunk/drivers/gpu/drm/Kconfig
+++ b/trunk/drivers/gpu/drm/Kconfig
@@ -9,7 +9,6 @@ menuconfig DRM
depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && MMU
select I2C
select I2C_ALGOBIT
- select DMA_SHARED_BUFFER
help
Kernel-level support for the Direct Rendering Infrastructure (DRI)
introduced in XFree86 4.0. If you say Y here, you need to select
diff --git a/trunk/drivers/gpu/drm/Makefile b/trunk/drivers/gpu/drm/Makefile
index c20da5bda355..a858532806ae 100644
--- a/trunk/drivers/gpu/drm/Makefile
+++ b/trunk/drivers/gpu/drm/Makefile
@@ -12,7 +12,7 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \
drm_platform.o drm_sysfs.o drm_hashtab.o drm_mm.o \
drm_crtc.o drm_modes.o drm_edid.o \
drm_info.o drm_debugfs.o drm_encoder_slave.o \
- drm_trace_points.o drm_global.o drm_prime.o
+ drm_trace_points.o drm_global.o
drm-$(CONFIG_COMPAT) += drm_ioc32.o
diff --git a/trunk/drivers/gpu/drm/drm_drv.c b/trunk/drivers/gpu/drm/drm_drv.c
index 6116e3b75393..0b65fbc8a630 100644
--- a/trunk/drivers/gpu/drm/drm_drv.c
+++ b/trunk/drivers/gpu/drm/drm_drv.c
@@ -136,10 +136,6 @@ static struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_GEM_OPEN, drm_gem_open_ioctl, DRM_AUTH|DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_CONTROL_ALLOW|DRM_UNLOCKED),
-
- DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED),
- DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED),
-
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_CONTROL_ALLOW|DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_SETCRTC, drm_mode_setcrtc, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED),
diff --git a/trunk/drivers/gpu/drm/drm_fb_helper.c b/trunk/drivers/gpu/drm/drm_fb_helper.c
index a0d6e894d97c..7740dd26f007 100644
--- a/trunk/drivers/gpu/drm/drm_fb_helper.c
+++ b/trunk/drivers/gpu/drm/drm_fb_helper.c
@@ -559,13 +559,9 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
return -EINVAL;
/* Need to resize the fb object !!! */
- if (var->bits_per_pixel > fb->bits_per_pixel ||
- var->xres > fb->width || var->yres > fb->height ||
- var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
+ if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width || var->yres > fb->height) {
DRM_DEBUG("fb userspace requested width/height/bpp is greater than current fb "
- "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n",
- var->xres, var->yres, var->bits_per_pixel,
- var->xres_virtual, var->yres_virtual,
+ "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, var->bits_per_pixel,
fb->width, fb->height, fb->bits_per_pixel);
return -EINVAL;
}
diff --git a/trunk/drivers/gpu/drm/drm_fops.c b/trunk/drivers/gpu/drm/drm_fops.c
index cdfbf27b2b3c..7348a3dab250 100644
--- a/trunk/drivers/gpu/drm/drm_fops.c
+++ b/trunk/drivers/gpu/drm/drm_fops.c
@@ -271,9 +271,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_open(dev, priv);
- if (drm_core_check_feature(dev, DRIVER_PRIME))
- drm_prime_init_file_private(&priv->prime);
-
if (dev->driver->open) {
ret = dev->driver->open(dev, priv);
if (ret < 0)
@@ -574,10 +571,6 @@ int drm_release(struct inode *inode, struct file *filp)
if (dev->driver->postclose)
dev->driver->postclose(dev, file_priv);
-
- if (drm_core_check_feature(dev, DRIVER_PRIME))
- drm_prime_destroy_file_private(&file_priv->prime);
-
kfree(file_priv);
/* ========================================================
diff --git a/trunk/drivers/gpu/drm/drm_gem.c b/trunk/drivers/gpu/drm/drm_gem.c
index 83114b5e3cee..0ef358e53245 100644
--- a/trunk/drivers/gpu/drm/drm_gem.c
+++ b/trunk/drivers/gpu/drm/drm_gem.c
@@ -35,7 +35,6 @@
#include
#include
#include
-#include
#include "drmP.h"
/** @file drm_gem.c
@@ -233,10 +232,6 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle)
idr_remove(&filp->object_idr, handle);
spin_unlock(&filp->table_lock);
- if (obj->import_attach)
- drm_prime_remove_imported_buf_handle(&filp->prime,
- obj->import_attach->dmabuf);
-
if (dev->driver->gem_close_object)
dev->driver->gem_close_object(obj, filp);
drm_gem_object_handle_unreference_unlocked(obj);
@@ -532,10 +527,6 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)
struct drm_gem_object *obj = ptr;
struct drm_device *dev = obj->dev;
- if (obj->import_attach)
- drm_prime_remove_imported_buf_handle(&file_priv->prime,
- obj->import_attach->dmabuf);
-
if (dev->driver->gem_close_object)
dev->driver->gem_close_object(obj, file_priv);
diff --git a/trunk/drivers/gpu/drm/drm_prime.c b/trunk/drivers/gpu/drm/drm_prime.c
deleted file mode 100644
index 1bdf2b54eaf6..000000000000
--- a/trunk/drivers/gpu/drm/drm_prime.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright © 2012 Red Hat
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- * Dave Airlie
- * Rob Clark
- *
- */
-
-#include
-#include
-#include "drmP.h"
-
-/*
- * DMA-BUF/GEM Object references and lifetime overview:
- *
- * On the export the dma_buf holds a reference to the exporting GEM
- * object. It takes this reference in handle_to_fd_ioctl, when it
- * first calls .prime_export and stores the exporting GEM object in
- * the dma_buf priv. This reference is released when the dma_buf
- * object goes away in the driver .release function.
- *
- * On the import the importing GEM object holds a reference to the
- * dma_buf (which in turn holds a ref to the exporting GEM object).
- * It takes that reference in the fd_to_handle ioctl.
- * It calls dma_buf_get, creates an attachment to it and stores the
- * attachment in the GEM object. When this attachment is destroyed
- * when the imported object is destroyed, we remove the attachment
- * and drop the reference to the dma_buf.
- *
- * Thus the chain of references always flows in one direction
- * (avoiding loops): importing_gem -> dmabuf -> exporting_gem
- *
- * Self-importing: if userspace is using PRIME as a replacement for flink
- * then it will get a fd->handle request for a GEM object that it created.
- * Drivers should detect this situation and return back the gem object
- * from the dma-buf private.
- */
-
-struct drm_prime_member {
- struct list_head entry;
- struct dma_buf *dma_buf;
- uint32_t handle;
-};
-
-int drm_gem_prime_handle_to_fd(struct drm_device *dev,
- struct drm_file *file_priv, uint32_t handle, uint32_t flags,
- int *prime_fd)
-{
- struct drm_gem_object *obj;
- void *buf;
-
- obj = drm_gem_object_lookup(dev, file_priv, handle);
- if (!obj)
- return -ENOENT;
-
- mutex_lock(&file_priv->prime.lock);
- /* re-export the original imported object */
- if (obj->import_attach) {
- get_dma_buf(obj->import_attach->dmabuf);
- *prime_fd = dma_buf_fd(obj->import_attach->dmabuf, flags);
- drm_gem_object_unreference_unlocked(obj);
- mutex_unlock(&file_priv->prime.lock);
- return 0;
- }
-
- if (obj->export_dma_buf) {
- get_dma_buf(obj->export_dma_buf);
- *prime_fd = dma_buf_fd(obj->export_dma_buf, flags);
- drm_gem_object_unreference_unlocked(obj);
- } else {
- buf = dev->driver->gem_prime_export(dev, obj, flags);
- if (IS_ERR(buf)) {
- /* normally the created dma-buf takes ownership of the ref,
- * but if that fails then drop the ref
- */
- drm_gem_object_unreference_unlocked(obj);
- mutex_unlock(&file_priv->prime.lock);
- return PTR_ERR(buf);
- }
- obj->export_dma_buf = buf;
- *prime_fd = dma_buf_fd(buf, flags);
- }
- mutex_unlock(&file_priv->prime.lock);
- return 0;
-}
-EXPORT_SYMBOL(drm_gem_prime_handle_to_fd);
-
-int drm_gem_prime_fd_to_handle(struct drm_device *dev,
- struct drm_file *file_priv, int prime_fd, uint32_t *handle)
-{
- struct dma_buf *dma_buf;
- struct drm_gem_object *obj;
- int ret;
-
- dma_buf = dma_buf_get(prime_fd);
- if (IS_ERR(dma_buf))
- return PTR_ERR(dma_buf);
-
- mutex_lock(&file_priv->prime.lock);
-
- ret = drm_prime_lookup_imported_buf_handle(&file_priv->prime,
- dma_buf, handle);
- if (!ret) {
- ret = 0;
- goto out_put;
- }
-
- /* never seen this one, need to import */
- obj = dev->driver->gem_prime_import(dev, dma_buf);
- if (IS_ERR(obj)) {
- ret = PTR_ERR(obj);
- goto out_put;
- }
-
- ret = drm_gem_handle_create(file_priv, obj, handle);
- drm_gem_object_unreference_unlocked(obj);
- if (ret)
- goto out_put;
-
- ret = drm_prime_add_imported_buf_handle(&file_priv->prime,
- dma_buf, *handle);
- if (ret)
- goto fail;
-
- mutex_unlock(&file_priv->prime.lock);
- return 0;
-
-fail:
- /* hmm, if driver attached, we are relying on the free-object path
- * to detach.. which seems ok..
- */
- drm_gem_object_handle_unreference_unlocked(obj);
-out_put:
- dma_buf_put(dma_buf);
- mutex_unlock(&file_priv->prime.lock);
- return ret;
-}
-EXPORT_SYMBOL(drm_gem_prime_fd_to_handle);
-
-int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
-{
- struct drm_prime_handle *args = data;
- uint32_t flags;
-
- if (!drm_core_check_feature(dev, DRIVER_PRIME))
- return -EINVAL;
-
- if (!dev->driver->prime_handle_to_fd)
- return -ENOSYS;
-
- /* check flags are valid */
- if (args->flags & ~DRM_CLOEXEC)
- return -EINVAL;
-
- /* we only want to pass DRM_CLOEXEC which is == O_CLOEXEC */
- flags = args->flags & DRM_CLOEXEC;
-
- return dev->driver->prime_handle_to_fd(dev, file_priv,
- args->handle, flags, &args->fd);
-}
-
-int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
-{
- struct drm_prime_handle *args = data;
-
- if (!drm_core_check_feature(dev, DRIVER_PRIME))
- return -EINVAL;
-
- if (!dev->driver->prime_fd_to_handle)
- return -ENOSYS;
-
- return dev->driver->prime_fd_to_handle(dev, file_priv,
- args->fd, &args->handle);
-}
-
-/*
- * drm_prime_pages_to_sg
- *
- * this helper creates an sg table object from a set of pages
- * the driver is responsible for mapping the pages into the
- * importers address space
- */
-struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages)
-{
- struct sg_table *sg = NULL;
- struct scatterlist *iter;
- int i;
- int ret;
-
- sg = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
- if (!sg)
- goto out;
-
- ret = sg_alloc_table(sg, nr_pages, GFP_KERNEL);
- if (ret)
- goto out;
-
- for_each_sg(sg->sgl, iter, nr_pages, i)
- sg_set_page(iter, pages[i], PAGE_SIZE, 0);
-
- return sg;
-out:
- kfree(sg);
- return NULL;
-}
-EXPORT_SYMBOL(drm_prime_pages_to_sg);
-
-/* helper function to cleanup a GEM/prime object */
-void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg)
-{
- struct dma_buf_attachment *attach;
- struct dma_buf *dma_buf;
- attach = obj->import_attach;
- if (sg)
- dma_buf_unmap_attachment(attach, sg, DMA_BIDIRECTIONAL);
- dma_buf = attach->dmabuf;
- dma_buf_detach(attach->dmabuf, attach);
- /* remove the reference */
- dma_buf_put(dma_buf);
-}
-EXPORT_SYMBOL(drm_prime_gem_destroy);
-
-void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv)
-{
- INIT_LIST_HEAD(&prime_fpriv->head);
- mutex_init(&prime_fpriv->lock);
-}
-EXPORT_SYMBOL(drm_prime_init_file_private);
-
-void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv)
-{
- struct drm_prime_member *member, *safe;
- list_for_each_entry_safe(member, safe, &prime_fpriv->head, entry) {
- list_del(&member->entry);
- kfree(member);
- }
-}
-EXPORT_SYMBOL(drm_prime_destroy_file_private);
-
-int drm_prime_add_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle)
-{
- struct drm_prime_member *member;
-
- member = kmalloc(sizeof(*member), GFP_KERNEL);
- if (!member)
- return -ENOMEM;
-
- member->dma_buf = dma_buf;
- member->handle = handle;
- list_add(&member->entry, &prime_fpriv->head);
- return 0;
-}
-EXPORT_SYMBOL(drm_prime_add_imported_buf_handle);
-
-int drm_prime_lookup_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle)
-{
- struct drm_prime_member *member;
-
- list_for_each_entry(member, &prime_fpriv->head, entry) {
- if (member->dma_buf == dma_buf) {
- *handle = member->handle;
- return 0;
- }
- }
- return -ENOENT;
-}
-EXPORT_SYMBOL(drm_prime_lookup_imported_buf_handle);
-
-void drm_prime_remove_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf)
-{
- struct drm_prime_member *member, *safe;
-
- mutex_lock(&prime_fpriv->lock);
- list_for_each_entry_safe(member, safe, &prime_fpriv->head, entry) {
- if (member->dma_buf == dma_buf) {
- list_del(&member->entry);
- kfree(member);
- }
- }
- mutex_unlock(&prime_fpriv->lock);
-}
-EXPORT_SYMBOL(drm_prime_remove_imported_buf_handle);
diff --git a/trunk/drivers/gpu/drm/i915/i915_debugfs.c b/trunk/drivers/gpu/drm/i915/i915_debugfs.c
index b505b70dba05..fdb7ccefffbd 100644
--- a/trunk/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/trunk/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1502,6 +1502,14 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
return 0;
}
+static int
+i915_debugfs_common_open(struct inode *inode,
+ struct file *filp)
+{
+ filp->private_data = inode->i_private;
+ return 0;
+}
+
static ssize_t
i915_wedged_read(struct file *filp,
char __user *ubuf,
@@ -1552,7 +1560,7 @@ i915_wedged_write(struct file *filp,
static const struct file_operations i915_wedged_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = i915_debugfs_common_open,
.read = i915_wedged_read,
.write = i915_wedged_write,
.llseek = default_llseek,
@@ -1614,7 +1622,7 @@ i915_max_freq_write(struct file *filp,
static const struct file_operations i915_max_freq_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = i915_debugfs_common_open,
.read = i915_max_freq_read,
.write = i915_max_freq_write,
.llseek = default_llseek,
@@ -1685,7 +1693,7 @@ i915_cache_sharing_write(struct file *filp,
static const struct file_operations i915_cache_sharing_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = i915_debugfs_common_open,
.read = i915_cache_sharing_read,
.write = i915_cache_sharing_write,
.llseek = default_llseek,
diff --git a/trunk/drivers/gpu/drm/i915/i915_dma.c b/trunk/drivers/gpu/drm/i915/i915_dma.c
index 785f67f963ef..9341eb8ce93b 100644
--- a/trunk/drivers/gpu/drm/i915/i915_dma.c
+++ b/trunk/drivers/gpu/drm/i915/i915_dma.c
@@ -1183,21 +1183,6 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
return can_switch;
}
-static bool
-intel_enable_ppgtt(struct drm_device *dev)
-{
- if (i915_enable_ppgtt >= 0)
- return i915_enable_ppgtt;
-
-#ifdef CONFIG_INTEL_IOMMU
- /* Disable ppgtt on SNB if VT-d is on. */
- if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped)
- return false;
-#endif
-
- return true;
-}
-
static int i915_load_gem_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
@@ -1212,7 +1197,7 @@ static int i915_load_gem_init(struct drm_device *dev)
drm_mm_init(&dev_priv->mm.stolen, 0, prealloc_size);
mutex_lock(&dev->struct_mutex);
- if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) {
+ if (i915_enable_ppgtt && HAS_ALIASING_PPGTT(dev)) {
/* PPGTT pdes are stolen from global gtt ptes, so shrink the
* aperture accordingly when using aliasing ppgtt. */
gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE;
@@ -1222,10 +1207,8 @@ static int i915_load_gem_init(struct drm_device *dev)
i915_gem_do_init(dev, 0, mappable_size, gtt_size);
ret = i915_gem_init_aliasing_ppgtt(dev);
- if (ret) {
- mutex_unlock(&dev->struct_mutex);
+ if (ret)
return ret;
- }
} else {
/* Let GEM Manage all of the aperture.
*
diff --git a/trunk/drivers/gpu/drm/i915/i915_drv.c b/trunk/drivers/gpu/drm/i915/i915_drv.c
index dfa55e7478fb..1a7559b59997 100644
--- a/trunk/drivers/gpu/drm/i915/i915_drv.c
+++ b/trunk/drivers/gpu/drm/i915/i915_drv.c
@@ -66,11 +66,7 @@ MODULE_PARM_DESC(semaphores,
int i915_enable_rc6 __read_mostly = -1;
module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
MODULE_PARM_DESC(i915_enable_rc6,
- "Enable power-saving render C-state 6. "
- "Different stages can be selected via bitmask values "
- "(0 = disable; 1 = enable rc6; 2 = enable deep rc6; 4 = enable deepest rc6). "
- "For example, 3 would enable rc6 and deep rc6, and 7 would enable everything. "
- "default: -1 (use per-chip default)");
+ "Enable power-saving render C-state 6 (default: -1 (use per-chip default)");
int i915_enable_fbc __read_mostly = -1;
module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
@@ -107,8 +103,8 @@ MODULE_PARM_DESC(enable_hangcheck,
"WARNING: Disabling this can cause system wide hangs. "
"(default: true)");
-int i915_enable_ppgtt __read_mostly = -1;
-module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600);
+bool i915_enable_ppgtt __read_mostly = 1;
+module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, bool, 0600);
MODULE_PARM_DESC(i915_enable_ppgtt,
"Enable PPGTT (default: true)");
@@ -296,7 +292,6 @@ static const struct pci_device_id pciidlist[] = { /* aka */
INTEL_VGA_DEVICE(0x0152, &intel_ivybridge_d_info), /* GT1 desktop */
INTEL_VGA_DEVICE(0x0162, &intel_ivybridge_d_info), /* GT2 desktop */
INTEL_VGA_DEVICE(0x015a, &intel_ivybridge_d_info), /* GT1 server */
- INTEL_VGA_DEVICE(0x016a, &intel_ivybridge_d_info), /* GT2 server */
{0, 0, 0}
};
@@ -538,9 +533,7 @@ static int i915_drm_thaw(struct drm_device *dev)
drm_irq_install(dev);
/* Resume the modeset for every activated CRTC */
- mutex_lock(&dev->mode_config.mutex);
drm_helper_resume_force_mode(dev);
- mutex_unlock(&dev->mode_config.mutex);
if (IS_IRONLAKE_M(dev))
ironlake_enable_rc6(dev);
diff --git a/trunk/drivers/gpu/drm/i915/i915_drv.h b/trunk/drivers/gpu/drm/i915/i915_drv.h
index 5fabc6c31fec..c0f19f572004 100644
--- a/trunk/drivers/gpu/drm/i915/i915_drv.h
+++ b/trunk/drivers/gpu/drm/i915/i915_drv.h
@@ -1053,27 +1053,6 @@ struct drm_i915_file_private {
#include "i915_trace.h"
-/**
- * RC6 is a special power stage which allows the GPU to enter an very
- * low-voltage mode when idle, using down to 0V while at this stage. This
- * stage is entered automatically when the GPU is idle when RC6 support is
- * enabled, and as soon as new workload arises GPU wakes up automatically as well.
- *
- * There are different RC6 modes available in Intel GPU, which differentiate
- * among each other with the latency required to enter and leave RC6 and
- * voltage consumed by the GPU in different states.
- *
- * The combination of the following flags define which states GPU is allowed
- * to enter, while RC6 is the normal RC6 state, RC6p is the deep RC6, and
- * RC6pp is deepest RC6. Their support by hardware varies according to the
- * GPU, BIOS, chipset and platform. RC6 is usually the safest one and the one
- * which brings the most power savings; deeper states save more power, but
- * require higher latency to switch to and wake up.
- */
-#define INTEL_RC6_ENABLE (1<<0)
-#define INTEL_RC6p_ENABLE (1<<1)
-#define INTEL_RC6pp_ENABLE (1<<2)
-
extern struct drm_ioctl_desc i915_ioctls[];
extern int i915_max_ioctl;
extern unsigned int i915_fbpercrtc __always_unused;
@@ -1086,7 +1065,7 @@ extern int i915_vbt_sdvo_panel_type __read_mostly;
extern int i915_enable_rc6 __read_mostly;
extern int i915_enable_fbc __read_mostly;
extern bool i915_enable_hangcheck __read_mostly;
-extern int i915_enable_ppgtt __read_mostly;
+extern bool i915_enable_ppgtt __read_mostly;
extern int i915_suspend(struct drm_device *dev, pm_message_t state);
extern int i915_resume(struct drm_device *dev);
diff --git a/trunk/drivers/gpu/drm/i915/i915_gem.c b/trunk/drivers/gpu/drm/i915/i915_gem.c
index 4c65c639f772..1f441f5c2405 100644
--- a/trunk/drivers/gpu/drm/i915/i915_gem.c
+++ b/trunk/drivers/gpu/drm/i915/i915_gem.c
@@ -1472,19 +1472,16 @@ i915_gem_object_move_to_active(struct drm_i915_gem_object *obj,
list_move_tail(&obj->ring_list, &ring->active_list);
obj->last_rendering_seqno = seqno;
-
if (obj->fenced_gpu_access) {
+ struct drm_i915_fence_reg *reg;
+
+ BUG_ON(obj->fence_reg == I915_FENCE_REG_NONE);
+
obj->last_fenced_seqno = seqno;
obj->last_fenced_ring = ring;
- /* Bump MRU to take account of the delayed flush */
- if (obj->fence_reg != I915_FENCE_REG_NONE) {
- struct drm_i915_fence_reg *reg;
-
- reg = &dev_priv->fence_regs[obj->fence_reg];
- list_move_tail(®->lru_list,
- &dev_priv->mm.fence_list);
- }
+ reg = &dev_priv->fence_regs[obj->fence_reg];
+ list_move_tail(®->lru_list, &dev_priv->mm.fence_list);
}
}
@@ -3757,32 +3754,12 @@ void i915_gem_init_ppgtt(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private;
uint32_t pd_offset;
struct intel_ring_buffer *ring;
- struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
- uint32_t __iomem *pd_addr;
- uint32_t pd_entry;
int i;
if (!dev_priv->mm.aliasing_ppgtt)
return;
-
- pd_addr = dev_priv->mm.gtt->gtt + ppgtt->pd_offset/sizeof(uint32_t);
- for (i = 0; i < ppgtt->num_pd_entries; i++) {
- dma_addr_t pt_addr;
-
- if (dev_priv->mm.gtt->needs_dmar)
- pt_addr = ppgtt->pt_dma_addr[i];
- else
- pt_addr = page_to_phys(ppgtt->pt_pages[i]);
-
- pd_entry = GEN6_PDE_ADDR_ENCODE(pt_addr);
- pd_entry |= GEN6_PDE_VALID;
-
- writel(pd_entry, pd_addr + i);
- }
- readl(pd_addr);
-
- pd_offset = ppgtt->pd_offset;
+ pd_offset = dev_priv->mm.aliasing_ppgtt->pd_offset;
pd_offset /= 64; /* in cachelines, */
pd_offset <<= 16;
diff --git a/trunk/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/trunk/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index f51a696486cb..81687af00893 100644
--- a/trunk/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/trunk/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -498,8 +498,8 @@ pin_and_fence_object(struct drm_i915_gem_object *obj,
if (ret)
goto err_unpin;
}
- obj->pending_fenced_gpu_access = true;
}
+ obj->pending_fenced_gpu_access = need_fence;
}
entry->offset = obj->gtt_offset;
diff --git a/trunk/drivers/gpu/drm/i915/i915_gem_gtt.c b/trunk/drivers/gpu/drm/i915/i915_gem_gtt.c
index a135c61f4119..2eacd78bb93b 100644
--- a/trunk/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/trunk/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -65,7 +65,9 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_hw_ppgtt *ppgtt;
+ uint32_t pd_entry;
unsigned first_pd_entry_in_global_pt;
+ uint32_t __iomem *pd_addr;
int i;
int ret = -ENOMEM;
@@ -98,6 +100,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
goto err_pt_alloc;
}
+ pd_addr = dev_priv->mm.gtt->gtt + first_pd_entry_in_global_pt;
for (i = 0; i < ppgtt->num_pd_entries; i++) {
dma_addr_t pt_addr;
if (dev_priv->mm.gtt->needs_dmar) {
@@ -114,7 +117,13 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
ppgtt->pt_dma_addr[i] = pt_addr;
} else
pt_addr = page_to_phys(ppgtt->pt_pages[i]);
+
+ pd_entry = GEN6_PDE_ADDR_ENCODE(pt_addr);
+ pd_entry |= GEN6_PDE_VALID;
+
+ writel(pd_entry, pd_addr + i);
}
+ readl(pd_addr);
ppgtt->scratch_page_dma_addr = dev_priv->mm.gtt->scratch_page_dma;
diff --git a/trunk/drivers/gpu/drm/i915/i915_reg.h b/trunk/drivers/gpu/drm/i915/i915_reg.h
index 2abf4eb94039..3886cf051bac 100644
--- a/trunk/drivers/gpu/drm/i915/i915_reg.h
+++ b/trunk/drivers/gpu/drm/i915/i915_reg.h
@@ -2385,7 +2385,6 @@
#define PIPECONF_DISABLE 0
#define PIPECONF_DOUBLE_WIDE (1<<30)
#define I965_PIPECONF_ACTIVE (1<<30)
-#define PIPECONF_FRAME_START_DELAY_MASK (3<<27)
#define PIPECONF_SINGLE_WIDE 0
#define PIPECONF_PIPE_UNLOCKED 0
#define PIPECONF_PIPE_LOCKED (1<<25)
diff --git a/trunk/drivers/gpu/drm/i915/intel_bios.c b/trunk/drivers/gpu/drm/i915/intel_bios.c
index b48fc2a8410c..8168d8f8a634 100644
--- a/trunk/drivers/gpu/drm/i915/intel_bios.c
+++ b/trunk/drivers/gpu/drm/i915/intel_bios.c
@@ -24,7 +24,6 @@
* Eric Anholt
*
*/
-#include
#include
#include "drmP.h"
#include "drm.h"
@@ -622,26 +621,6 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
dev_priv->edp.bpp = 18;
}
-static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
-{
- DRM_DEBUG_KMS("Falling back to manually reading VBT from "
- "VBIOS ROM for %s\n",
- id->ident);
- return 1;
-}
-
-static const struct dmi_system_id intel_no_opregion_vbt[] = {
- {
- .callback = intel_no_opregion_vbt_callback,
- .ident = "ThinkCentre A57",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "97027RG"),
- },
- },
- { }
-};
-
/**
* intel_parse_bios - find VBT and initialize settings from the BIOS
* @dev: DRM device
@@ -662,7 +641,7 @@ intel_parse_bios(struct drm_device *dev)
init_vbt_defaults(dev_priv);
/* XXX Should this validation be moved to intel_opregion.c? */
- if (!dmi_check_system(intel_no_opregion_vbt) && dev_priv->opregion.vbt) {
+ if (dev_priv->opregion.vbt) {
struct vbt_header *vbt = dev_priv->opregion.vbt;
if (memcmp(vbt->signature, "$VBT", 4) == 0) {
DRM_DEBUG_KMS("Using VBT from OpRegion: %20s\n",
diff --git a/trunk/drivers/gpu/drm/i915/intel_display.c b/trunk/drivers/gpu/drm/i915/intel_display.c
index 91b35fd1db8c..d514719f65e2 100644
--- a/trunk/drivers/gpu/drm/i915/intel_display.c
+++ b/trunk/drivers/gpu/drm/i915/intel_display.c
@@ -5539,8 +5539,7 @@ void ironlake_init_pch_refclk(struct drm_device *dev)
if (intel_panel_use_ssc(dev_priv) && can_ssc) {
DRM_DEBUG_KMS("Using SSC on panel\n");
temp |= DREF_SSC1_ENABLE;
- } else
- temp &= ~DREF_SSC1_ENABLE;
+ }
/* Get SSC going before enabling the outputs */
I915_WRITE(PCH_DREF_CONTROL, temp);
@@ -7581,12 +7580,6 @@ static void intel_sanitize_modesetting(struct drm_device *dev,
struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg, val;
- /* Clear any frame start delays used for debugging left by the BIOS */
- for_each_pipe(pipe) {
- reg = PIPECONF(pipe);
- I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
- }
-
if (HAS_PCH_SPLIT(dev))
return;
@@ -8222,7 +8215,7 @@ void intel_init_emon(struct drm_device *dev)
dev_priv->corr = (lcfuse & LCFUSE_HIV_MASK);
}
-static int intel_enable_rc6(struct drm_device *dev)
+static bool intel_enable_rc6(struct drm_device *dev)
{
/*
* Respect the kernel parameter if it is set
@@ -8240,11 +8233,11 @@ static int intel_enable_rc6(struct drm_device *dev)
* Disable rc6 on Sandybridge
*/
if (INTEL_INFO(dev)->gen == 6) {
- DRM_DEBUG_DRIVER("Sandybridge: deep RC6 disabled\n");
- return INTEL_RC6_ENABLE;
+ DRM_DEBUG_DRIVER("Sandybridge: RC6 disabled\n");
+ return 0;
}
- DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
- return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
+ DRM_DEBUG_DRIVER("RC6 enabled\n");
+ return 1;
}
void gen6_enable_rps(struct drm_i915_private *dev_priv)
@@ -8254,7 +8247,6 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)
u32 pcu_mbox, rc6_mask = 0;
u32 gtfifodbg;
int cur_freq, min_freq, max_freq;
- int rc6_mode;
int i;
/* Here begins a magic sequence of register writes to enable
@@ -8292,20 +8284,9 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)
I915_WRITE(GEN6_RC6p_THRESHOLD, 100000);
I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */
- rc6_mode = intel_enable_rc6(dev_priv->dev);
- if (rc6_mode & INTEL_RC6_ENABLE)
- rc6_mask |= GEN6_RC_CTL_RC6_ENABLE;
-
- if (rc6_mode & INTEL_RC6p_ENABLE)
- rc6_mask |= GEN6_RC_CTL_RC6p_ENABLE;
-
- if (rc6_mode & INTEL_RC6pp_ENABLE)
- rc6_mask |= GEN6_RC_CTL_RC6pp_ENABLE;
-
- DRM_INFO("Enabling RC6 states: RC6 %s, RC6p %s, RC6pp %s\n",
- (rc6_mode & INTEL_RC6_ENABLE) ? "on" : "off",
- (rc6_mode & INTEL_RC6p_ENABLE) ? "on" : "off",
- (rc6_mode & INTEL_RC6pp_ENABLE) ? "on" : "off");
+ if (intel_enable_rc6(dev_priv->dev))
+ rc6_mask = GEN6_RC_CTL_RC6_ENABLE |
+ ((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0);
I915_WRITE(GEN6_RC_CONTROL,
rc6_mask |
diff --git a/trunk/drivers/gpu/drm/i915/intel_lvds.c b/trunk/drivers/gpu/drm/i915/intel_lvds.c
index 95db2e988227..c5c0973af8a1 100644
--- a/trunk/drivers/gpu/drm/i915/intel_lvds.c
+++ b/trunk/drivers/gpu/drm/i915/intel_lvds.c
@@ -755,14 +755,6 @@ static const struct dmi_system_id intel_no_lvds[] = {
DMI_MATCH(DMI_BOARD_NAME, "hp st5747"),
},
},
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "MSI Wind Box DC500",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
- DMI_MATCH(DMI_BOARD_NAME, "MS-7469"),
- },
- },
{ } /* terminating entry */
};
diff --git a/trunk/drivers/gpu/drm/i915/intel_ringbuffer.c b/trunk/drivers/gpu/drm/i915/intel_ringbuffer.c
index e25581a9f60f..fc66af6a9448 100644
--- a/trunk/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/trunk/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -626,7 +626,7 @@ gen6_ring_get_seqno(struct intel_ring_buffer *ring)
/* Workaround to force correct ordering between irq and seqno writes on
* ivb (and maybe also on snb) by reading from a CS register (like
* ACTHD) before reading the status page. */
- if (IS_GEN6(dev) || IS_GEN7(dev))
+ if (IS_GEN7(dev))
intel_ring_get_active_head(ring);
return intel_read_status_page(ring, I915_GEM_HWS_INDEX);
}
diff --git a/trunk/drivers/gpu/drm/i915/intel_sprite.c b/trunk/drivers/gpu/drm/i915/intel_sprite.c
index a464771a7240..7aa0450399a1 100644
--- a/trunk/drivers/gpu/drm/i915/intel_sprite.c
+++ b/trunk/drivers/gpu/drm/i915/intel_sprite.c
@@ -411,9 +411,6 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
old_obj = intel_plane->obj;
- src_w = src_w >> 16;
- src_h = src_h >> 16;
-
/* Pipe must be running... */
if (!(I915_READ(PIPECONF(pipe)) & PIPECONF_ENABLE))
return -EINVAL;
diff --git a/trunk/drivers/gpu/drm/nouveau/Kconfig b/trunk/drivers/gpu/drm/nouveau/Kconfig
index 97a81260485a..ca1639918f57 100644
--- a/trunk/drivers/gpu/drm/nouveau/Kconfig
+++ b/trunk/drivers/gpu/drm/nouveau/Kconfig
@@ -13,7 +13,6 @@ config DRM_NOUVEAU
select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT
select ACPI_WMI if ACPI
select MXM_WMI if ACPI
- select POWER_SUPPLY
help
Choose this option for open-source nVidia support.
diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
index 80963d05b54a..637afe71de56 100644
--- a/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -177,15 +177,14 @@ bios_shadow_pci(struct nvbios *bios)
if (!pci_enable_rom(pdev)) {
void __iomem *rom = pci_map_rom(pdev, &length);
- if (rom && length) {
+ if (rom) {
bios->data = kmalloc(length, GFP_KERNEL);
if (bios->data) {
memcpy_fromio(bios->data, rom, length);
bios->length = length;
}
- }
- if (rom)
pci_unmap_rom(pdev, rom);
+ }
pci_disable_rom(pdev);
}
diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_channel.c b/trunk/drivers/gpu/drm/nouveau/nouveau_channel.c
index 846afb0bfef4..44e6416d4a33 100644
--- a/trunk/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/trunk/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -436,11 +436,11 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
}
if (dev_priv->card_type < NV_C0) {
- init->subchan[0].handle = 0x00000000;
- init->subchan[0].grclass = 0x0000;
- init->subchan[1].handle = NvSw;
- init->subchan[1].grclass = NV_SW;
- init->nr_subchan = 2;
+ init->subchan[0].handle = NvSw;
+ init->subchan[0].grclass = NV_SW;
+ init->nr_subchan = 1;
+ } else {
+ init->nr_subchan = 0;
}
/* Named memory object area */
diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_dma.h b/trunk/drivers/gpu/drm/nouveau/nouveau_dma.h
index 23d4edf992b7..bcf0fd9e313e 100644
--- a/trunk/drivers/gpu/drm/nouveau/nouveau_dma.h
+++ b/trunk/drivers/gpu/drm/nouveau/nouveau_dma.h
@@ -48,8 +48,8 @@ void nv50_dma_push(struct nouveau_channel *, struct nouveau_bo *,
/* Hardcoded object assignments to subchannels (subchannel id). */
enum {
- NvSubM2MF = 0,
- NvSubSw = 1,
+ NvSubSw = 0,
+ NvSubM2MF = 1,
NvSub2D = 2,
NvSubCtxSurf2D = 2,
NvSubGdiRect = 3,
diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_state.c b/trunk/drivers/gpu/drm/nouveau/nouveau_state.c
index c2a8511e855a..a4886b36d0fa 100644
--- a/trunk/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/trunk/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -642,7 +642,7 @@ nouveau_card_channel_init(struct drm_device *dev)
OUT_RING (chan, chan->vram_handle);
OUT_RING (chan, chan->gart_handle);
} else
- if (dev_priv->card_type <= NV_D0) {
+ if (dev_priv->card_type <= NV_C0) {
ret = nouveau_gpuobj_gr_new(chan, 0x9039, 0x9039);
if (ret)
goto error;
diff --git a/trunk/drivers/gpu/drm/radeon/atom.c b/trunk/drivers/gpu/drm/radeon/atom.c
index 5ce9bf51a8de..d1bd239cd9e9 100644
--- a/trunk/drivers/gpu/drm/radeon/atom.c
+++ b/trunk/drivers/gpu/drm/radeon/atom.c
@@ -1306,11 +1306,8 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
int atom_asic_init(struct atom_context *ctx)
{
- struct radeon_device *rdev = ctx->card->dev->dev_private;
int hwi = CU16(ctx->data_table + ATOM_DATA_FWI_PTR);
uint32_t ps[16];
- int ret;
-
memset(ps, 0, 64);
ps[0] = cpu_to_le32(CU32(hwi + ATOM_FWI_DEFSCLK_PTR));
@@ -1320,17 +1317,7 @@ int atom_asic_init(struct atom_context *ctx)
if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT))
return 1;
- ret = atom_execute_table(ctx, ATOM_CMD_INIT, ps);
- if (ret)
- return ret;
-
- memset(ps, 0, 64);
-
- if (rdev->family < CHIP_R600) {
- if (CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_SPDFANCNTL))
- atom_execute_table(ctx, ATOM_CMD_SPDFANCNTL, ps);
- }
- return ret;
+ return atom_execute_table(ctx, ATOM_CMD_INIT, ps);
}
void atom_destroy(struct atom_context *ctx)
diff --git a/trunk/drivers/gpu/drm/radeon/atom.h b/trunk/drivers/gpu/drm/radeon/atom.h
index 25fea631dad2..93cfe2086ba0 100644
--- a/trunk/drivers/gpu/drm/radeon/atom.h
+++ b/trunk/drivers/gpu/drm/radeon/atom.h
@@ -44,7 +44,6 @@
#define ATOM_CMD_SETSCLK 0x0A
#define ATOM_CMD_SETMCLK 0x0B
#define ATOM_CMD_SETPCLK 0x0C
-#define ATOM_CMD_SPDFANCNTL 0x39
#define ATOM_DATA_FWI_PTR 0xC
#define ATOM_DATA_IIO_PTR 0x32
diff --git a/trunk/drivers/gpu/drm/radeon/radeon_object.c b/trunk/drivers/gpu/drm/radeon/radeon_object.c
index df6a4dbd93f8..6f70158d34e4 100644
--- a/trunk/drivers/gpu/drm/radeon/radeon_object.c
+++ b/trunk/drivers/gpu/drm/radeon/radeon_object.c
@@ -241,8 +241,7 @@ int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain, u64 max_offset,
domain_start = bo->rdev->mc.vram_start;
else
domain_start = bo->rdev->mc.gtt_start;
- WARN_ON_ONCE(max_offset <
- (radeon_bo_gpu_offset(bo) - domain_start));
+ WARN_ON_ONCE((*gpu_addr - domain_start) > max_offset);
}
return 0;
diff --git a/trunk/drivers/gpu/drm/udl/udl_drv.c b/trunk/drivers/gpu/drm/udl/udl_drv.c
index 53673907a6a0..5340c5f3987b 100644
--- a/trunk/drivers/gpu/drm/udl/udl_drv.c
+++ b/trunk/drivers/gpu/drm/udl/udl_drv.c
@@ -47,7 +47,7 @@ static struct vm_operations_struct udl_gem_vm_ops = {
static const struct file_operations udl_driver_fops = {
.owner = THIS_MODULE,
.open = drm_open,
- .mmap = udl_drm_gem_mmap,
+ .mmap = drm_gem_mmap,
.poll = drm_poll,
.read = drm_read,
.unlocked_ioctl = drm_ioctl,
diff --git a/trunk/drivers/gpu/drm/udl/udl_drv.h b/trunk/drivers/gpu/drm/udl/udl_drv.h
index 96820d03a303..1612954a5bc4 100644
--- a/trunk/drivers/gpu/drm/udl/udl_drv.h
+++ b/trunk/drivers/gpu/drm/udl/udl_drv.h
@@ -121,7 +121,6 @@ struct udl_gem_object *udl_gem_alloc_object(struct drm_device *dev,
int udl_gem_vmap(struct udl_gem_object *obj);
void udl_gem_vunmap(struct udl_gem_object *obj);
-int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
diff --git a/trunk/drivers/gpu/drm/udl/udl_gem.c b/trunk/drivers/gpu/drm/udl/udl_gem.c
index 92f19ef329b0..852642dc1187 100644
--- a/trunk/drivers/gpu/drm/udl/udl_gem.c
+++ b/trunk/drivers/gpu/drm/udl/udl_gem.c
@@ -71,20 +71,6 @@ int udl_dumb_destroy(struct drm_file *file, struct drm_device *dev,
return drm_gem_handle_delete(file, handle);
}
-int udl_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
-{
- int ret;
-
- ret = drm_gem_mmap(filp, vma);
- if (ret)
- return ret;
-
- vma->vm_flags &= ~VM_PFNMAP;
- vma->vm_flags |= VM_MIXEDMAP;
-
- return ret;
-}
-
int udl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct udl_gem_object *obj = to_udl_bo(vma->vm_private_data);
diff --git a/trunk/drivers/hid/hid-picolcd.c b/trunk/drivers/hid/hid-picolcd.c
index 45c3433f7986..12f9777c385d 100644
--- a/trunk/drivers/hid/hid-picolcd.c
+++ b/trunk/drivers/hid/hid-picolcd.c
@@ -1525,6 +1525,12 @@ static const struct file_operations picolcd_debug_reset_fops = {
/*
* The "eeprom" file
*/
+static int picolcd_debug_eeprom_open(struct inode *i, struct file *f)
+{
+ f->private_data = i->i_private;
+ return 0;
+}
+
static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u,
size_t s, loff_t *off)
{
@@ -1612,7 +1618,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u,
*/
static const struct file_operations picolcd_debug_eeprom_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = picolcd_debug_eeprom_open,
.read = picolcd_debug_eeprom_read,
.write = picolcd_debug_eeprom_write,
.llseek = generic_file_llseek,
@@ -1621,6 +1627,12 @@ static const struct file_operations picolcd_debug_eeprom_fops = {
/*
* The "flash" file
*/
+static int picolcd_debug_flash_open(struct inode *i, struct file *f)
+{
+ f->private_data = i->i_private;
+ return 0;
+}
+
/* record a flash address to buf (bounds check to be done by caller) */
static int _picolcd_flash_setaddr(struct picolcd_data *data, u8 *buf, long off)
{
@@ -1805,7 +1817,7 @@ static ssize_t picolcd_debug_flash_write(struct file *f, const char __user *u,
*/
static const struct file_operations picolcd_debug_flash_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = picolcd_debug_flash_open,
.read = picolcd_debug_flash_read,
.write = picolcd_debug_flash_write,
.llseek = generic_file_llseek,
diff --git a/trunk/drivers/hid/hid-wiimote-debug.c b/trunk/drivers/hid/hid-wiimote-debug.c
index eec329197c16..17dabc1f339e 100644
--- a/trunk/drivers/hid/hid-wiimote-debug.c
+++ b/trunk/drivers/hid/hid-wiimote-debug.c
@@ -23,6 +23,12 @@ struct wiimote_debug {
struct dentry *drm;
};
+static int wiidebug_eeprom_open(struct inode *i, struct file *f)
+{
+ f->private_data = i->i_private;
+ return 0;
+}
+
static ssize_t wiidebug_eeprom_read(struct file *f, char __user *u, size_t s,
loff_t *off)
{
@@ -77,7 +83,7 @@ static ssize_t wiidebug_eeprom_read(struct file *f, char __user *u, size_t s,
static const struct file_operations wiidebug_eeprom_fops = {
.owner = THIS_MODULE,
- .open = simple_open,
+ .open = wiidebug_eeprom_open,
.read = wiidebug_eeprom_read,
.llseek = generic_file_llseek,
};
diff --git a/trunk/drivers/hsi/Kconfig b/trunk/drivers/hsi/Kconfig
deleted file mode 100644
index d94e38dd80c7..000000000000
--- a/trunk/drivers/hsi/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# HSI driver configuration
-#
-menuconfig HSI
- tristate "HSI support"
- ---help---
- The "High speed synchronous Serial Interface" is
- synchronous serial interface used mainly to connect
- application engines and cellular modems.
-
-if HSI
-
-config HSI_BOARDINFO
- bool
- default y
-
-source "drivers/hsi/clients/Kconfig"
-
-endif # HSI
diff --git a/trunk/drivers/hsi/Makefile b/trunk/drivers/hsi/Makefile
deleted file mode 100644
index 9d5d33f90de2..000000000000
--- a/trunk/drivers/hsi/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile for HSI
-#
-obj-$(CONFIG_HSI_BOARDINFO) += hsi_boardinfo.o
-obj-$(CONFIG_HSI) += hsi.o
-obj-y += clients/
diff --git a/trunk/drivers/hsi/clients/Kconfig b/trunk/drivers/hsi/clients/Kconfig
deleted file mode 100644
index 3bacd275f479..000000000000
--- a/trunk/drivers/hsi/clients/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# HSI clients configuration
-#
-
-comment "HSI clients"
-
-config HSI_CHAR
- tristate "HSI/SSI character driver"
- depends on HSI
- ---help---
- If you say Y here, you will enable the HSI/SSI character driver.
- This driver provides a simple character device interface for
- serial communication with the cellular modem over HSI/SSI bus.
diff --git a/trunk/drivers/hsi/clients/Makefile b/trunk/drivers/hsi/clients/Makefile
deleted file mode 100644
index 327c0e27c8b0..000000000000
--- a/trunk/drivers/hsi/clients/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Makefile for HSI clients
-#
-
-obj-$(CONFIG_HSI_CHAR) += hsi_char.o
diff --git a/trunk/drivers/hsi/clients/hsi_char.c b/trunk/drivers/hsi/clients/hsi_char.c
deleted file mode 100644
index 88a050df2389..000000000000
--- a/trunk/drivers/hsi/clients/hsi_char.c
+++ /dev/null
@@ -1,802 +0,0 @@
-/*
- * HSI character device driver, implements the character device
- * interface.
- *
- * Copyright (C) 2010 Nokia Corporation. All rights reserved.
- *
- * Contact: Andras Domokos
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define HSC_DEVS 16 /* Num of channels */
-#define HSC_MSGS 4
-
-#define HSC_RXBREAK 0
-
-#define HSC_ID_BITS 6
-#define HSC_PORT_ID_BITS 4
-#define HSC_ID_MASK 3
-#define HSC_PORT_ID_MASK 3
-#define HSC_CH_MASK 0xf
-
-/*
- * We support up to 4 controllers that can have up to 4
- * ports, which should currently be more than enough.
- */
-#define HSC_BASEMINOR(id, port_id) \
- ((((id) & HSC_ID_MASK) << HSC_ID_BITS) | \
- (((port_id) & HSC_PORT_ID_MASK) << HSC_PORT_ID_BITS))
-
-enum {
- HSC_CH_OPEN,
- HSC_CH_READ,
- HSC_CH_WRITE,
- HSC_CH_WLINE,
-};
-
-enum {
- HSC_RX,
- HSC_TX,
-};
-
-struct hsc_client_data;
-/**
- * struct hsc_channel - hsi_char internal channel data
- * @ch: channel number
- * @flags: Keeps state of the channel (open/close, reading, writing)
- * @free_msgs_list: List of free HSI messages/requests
- * @rx_msgs_queue: List of pending RX requests
- * @tx_msgs_queue: List of pending TX requests
- * @lock: Serialize access to the lists
- * @cl: reference to the associated hsi_client
- * @cl_data: reference to the client data that this channels belongs to
- * @rx_wait: RX requests wait queue
- * @tx_wait: TX requests wait queue
- */
-struct hsc_channel {
- unsigned int ch;
- unsigned long flags;
- struct list_head free_msgs_list;
- struct list_head rx_msgs_queue;
- struct list_head tx_msgs_queue;
- spinlock_t lock;
- struct hsi_client *cl;
- struct hsc_client_data *cl_data;
- wait_queue_head_t rx_wait;
- wait_queue_head_t tx_wait;
-};
-
-/**
- * struct hsc_client_data - hsi_char internal client data
- * @cdev: Characther device associated to the hsi_client
- * @lock: Lock to serialize open/close access
- * @flags: Keeps track of port state (rx hwbreak armed)
- * @usecnt: Use count for claiming the HSI port (mutex protected)
- * @cl: Referece to the HSI client
- * @channels: Array of channels accessible by the client
- */
-struct hsc_client_data {
- struct cdev cdev;
- struct mutex lock;
- unsigned long flags;
- unsigned int usecnt;
- struct hsi_client *cl;
- struct hsc_channel channels[HSC_DEVS];
-};
-
-/* Stores the major number dynamically allocated for hsi_char */
-static unsigned int hsc_major;
-/* Maximum buffer size that hsi_char will accept from userspace */
-static unsigned int max_data_size = 0x1000;
-module_param(max_data_size, uint, S_IRUSR | S_IWUSR);
-MODULE_PARM_DESC(max_data_size, "max read/write data size [4,8..65536] (^2)");
-
-static void hsc_add_tail(struct hsc_channel *channel, struct hsi_msg *msg,
- struct list_head *queue)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&channel->lock, flags);
- list_add_tail(&msg->link, queue);
- spin_unlock_irqrestore(&channel->lock, flags);
-}
-
-static struct hsi_msg *hsc_get_first_msg(struct hsc_channel *channel,
- struct list_head *queue)
-{
- struct hsi_msg *msg = NULL;
- unsigned long flags;
-
- spin_lock_irqsave(&channel->lock, flags);
-
- if (list_empty(queue))
- goto out;
-
- msg = list_first_entry(queue, struct hsi_msg, link);
- list_del(&msg->link);
-out:
- spin_unlock_irqrestore(&channel->lock, flags);
-
- return msg;
-}
-
-static inline void hsc_msg_free(struct hsi_msg *msg)
-{
- kfree(sg_virt(msg->sgt.sgl));
- hsi_free_msg(msg);
-}
-
-static void hsc_free_list(struct list_head *list)
-{
- struct hsi_msg *msg, *tmp;
-
- list_for_each_entry_safe(msg, tmp, list, link) {
- list_del(&msg->link);
- hsc_msg_free(msg);
- }
-}
-
-static void hsc_reset_list(struct hsc_channel *channel, struct list_head *l)
-{
- unsigned long flags;
- LIST_HEAD(list);
-
- spin_lock_irqsave(&channel->lock, flags);
- list_splice_init(l, &list);
- spin_unlock_irqrestore(&channel->lock, flags);
-
- hsc_free_list(&list);
-}
-
-static inline struct hsi_msg *hsc_msg_alloc(unsigned int alloc_size)
-{
- struct hsi_msg *msg;
- void *buf;
-
- msg = hsi_alloc_msg(1, GFP_KERNEL);
- if (!msg)
- goto out;
- buf = kmalloc(alloc_size, GFP_KERNEL);
- if (!buf) {
- hsi_free_msg(msg);
- goto out;
- }
- sg_init_one(msg->sgt.sgl, buf, alloc_size);
- /* Ignore false positive, due to sg pointer handling */
- kmemleak_ignore(buf);
-
- return msg;
-out:
- return NULL;
-}
-
-static inline int hsc_msgs_alloc(struct hsc_channel *channel)
-{
- struct hsi_msg *msg;
- int i;
-
- for (i = 0; i < HSC_MSGS; i++) {
- msg = hsc_msg_alloc(max_data_size);
- if (!msg)
- goto out;
- msg->channel = channel->ch;
- list_add_tail(&msg->link, &channel->free_msgs_list);
- }
-
- return 0;
-out:
- hsc_free_list(&channel->free_msgs_list);
-
- return -ENOMEM;
-}
-
-static inline unsigned int hsc_msg_len_get(struct hsi_msg *msg)
-{
- return msg->sgt.sgl->length;
-}
-
-static inline void hsc_msg_len_set(struct hsi_msg *msg, unsigned int len)
-{
- msg->sgt.sgl->length = len;
-}
-
-static void hsc_rx_completed(struct hsi_msg *msg)
-{
- struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl);
- struct hsc_channel *channel = cl_data->channels + msg->channel;
-
- if (test_bit(HSC_CH_READ, &channel->flags)) {
- hsc_add_tail(channel, msg, &channel->rx_msgs_queue);
- wake_up(&channel->rx_wait);
- } else {
- hsc_add_tail(channel, msg, &channel->free_msgs_list);
- }
-}
-
-static void hsc_rx_msg_destructor(struct hsi_msg *msg)
-{
- msg->status = HSI_STATUS_ERROR;
- hsc_msg_len_set(msg, 0);
- hsc_rx_completed(msg);
-}
-
-static void hsc_tx_completed(struct hsi_msg *msg)
-{
- struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl);
- struct hsc_channel *channel = cl_data->channels + msg->channel;
-
- if (test_bit(HSC_CH_WRITE, &channel->flags)) {
- hsc_add_tail(channel, msg, &channel->tx_msgs_queue);
- wake_up(&channel->tx_wait);
- } else {
- hsc_add_tail(channel, msg, &channel->free_msgs_list);
- }
-}
-
-static void hsc_tx_msg_destructor(struct hsi_msg *msg)
-{
- msg->status = HSI_STATUS_ERROR;
- hsc_msg_len_set(msg, 0);
- hsc_tx_completed(msg);
-}
-
-static void hsc_break_req_destructor(struct hsi_msg *msg)
-{
- struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl);
-
- hsi_free_msg(msg);
- clear_bit(HSC_RXBREAK, &cl_data->flags);
-}
-
-static void hsc_break_received(struct hsi_msg *msg)
-{
- struct hsc_client_data *cl_data = hsi_client_drvdata(msg->cl);
- struct hsc_channel *channel = cl_data->channels;
- int i, ret;
-
- /* Broadcast HWBREAK on all channels */
- for (i = 0; i < HSC_DEVS; i++, channel++) {
- struct hsi_msg *msg2;
-
- if (!test_bit(HSC_CH_READ, &channel->flags))
- continue;
- msg2 = hsc_get_first_msg(channel, &channel->free_msgs_list);
- if (!msg2)
- continue;
- clear_bit(HSC_CH_READ, &channel->flags);
- hsc_msg_len_set(msg2, 0);
- msg2->status = HSI_STATUS_COMPLETED;
- hsc_add_tail(channel, msg2, &channel->rx_msgs_queue);
- wake_up(&channel->rx_wait);
- }
- hsi_flush(msg->cl);
- ret = hsi_async_read(msg->cl, msg);
- if (ret < 0)
- hsc_break_req_destructor(msg);
-}
-
-static int hsc_break_request(struct hsi_client *cl)
-{
- struct hsc_client_data *cl_data = hsi_client_drvdata(cl);
- struct hsi_msg *msg;
- int ret;
-
- if (test_and_set_bit(HSC_RXBREAK, &cl_data->flags))
- return -EBUSY;
-
- msg = hsi_alloc_msg(0, GFP_KERNEL);
- if (!msg) {
- clear_bit(HSC_RXBREAK, &cl_data->flags);
- return -ENOMEM;
- }
- msg->break_frame = 1;
- msg->complete = hsc_break_received;
- msg->destructor = hsc_break_req_destructor;
- ret = hsi_async_read(cl, msg);
- if (ret < 0)
- hsc_break_req_destructor(msg);
-
- return ret;
-}
-
-static int hsc_break_send(struct hsi_client *cl)
-{
- struct hsi_msg *msg;
- int ret;
-
- msg = hsi_alloc_msg(0, GFP_ATOMIC);
- if (!msg)
- return -ENOMEM;
- msg->break_frame = 1;
- msg->complete = hsi_free_msg;
- msg->destructor = hsi_free_msg;
- ret = hsi_async_write(cl, msg);
- if (ret < 0)
- hsi_free_msg(msg);
-
- return ret;
-}
-
-static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc)
-{
- struct hsi_config tmp;
- int ret;
-
- if ((rxc->mode != HSI_MODE_STREAM) && (rxc->mode != HSI_MODE_FRAME))
- return -EINVAL;
- if ((rxc->channels == 0) || (rxc->channels > HSC_DEVS))
- return -EINVAL;
- if (rxc->channels & (rxc->channels - 1))
- return -EINVAL;
- if ((rxc->flow != HSI_FLOW_SYNC) && (rxc->flow != HSI_FLOW_PIPE))
- return -EINVAL;
- tmp = cl->rx_cfg;
- cl->rx_cfg.mode = rxc->mode;
- cl->rx_cfg.channels = rxc->channels;
- cl->rx_cfg.flow = rxc->flow;
- ret = hsi_setup(cl);
- if (ret < 0) {
- cl->rx_cfg = tmp;
- return ret;
- }
- if (rxc->mode == HSI_MODE_FRAME)
- hsc_break_request(cl);
-
- return ret;
-}
-
-static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc)
-{
- rxc->mode = cl->rx_cfg.mode;
- rxc->channels = cl->rx_cfg.channels;
- rxc->flow = cl->rx_cfg.flow;
-}
-
-static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc)
-{
- struct hsi_config tmp;
- int ret;
-
- if ((txc->mode != HSI_MODE_STREAM) && (txc->mode != HSI_MODE_FRAME))
- return -EINVAL;
- if ((txc->channels == 0) || (txc->channels > HSC_DEVS))
- return -EINVAL;
- if (txc->channels & (txc->channels - 1))
- return -EINVAL;
- if ((txc->arb_mode != HSI_ARB_RR) && (txc->arb_mode != HSI_ARB_PRIO))
- return -EINVAL;
- tmp = cl->tx_cfg;
- cl->tx_cfg.mode = txc->mode;
- cl->tx_cfg.channels = txc->channels;
- cl->tx_cfg.speed = txc->speed;
- cl->tx_cfg.arb_mode = txc->arb_mode;
- ret = hsi_setup(cl);
- if (ret < 0) {
- cl->tx_cfg = tmp;
- return ret;
- }
-
- return ret;
-}
-
-static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc)
-{
- txc->mode = cl->tx_cfg.mode;
- txc->channels = cl->tx_cfg.channels;
- txc->speed = cl->tx_cfg.speed;
- txc->arb_mode = cl->tx_cfg.arb_mode;
-}
-
-static ssize_t hsc_read(struct file *file, char __user *buf, size_t len,
- loff_t *ppos __maybe_unused)
-{
- struct hsc_channel *channel = file->private_data;
- struct hsi_msg *msg;
- ssize_t ret;
-
- if (len == 0)
- return 0;
- if (!IS_ALIGNED(len, sizeof(u32)))
- return -EINVAL;
- if (len > max_data_size)
- len = max_data_size;
- if (channel->ch >= channel->cl->rx_cfg.channels)
- return -ECHRNG;
- if (test_and_set_bit(HSC_CH_READ, &channel->flags))
- return -EBUSY;
- msg = hsc_get_first_msg(channel, &channel->free_msgs_list);
- if (!msg) {
- ret = -ENOSPC;
- goto out;
- }
- hsc_msg_len_set(msg, len);
- msg->complete = hsc_rx_completed;
- msg->destructor = hsc_rx_msg_destructor;
- ret = hsi_async_read(channel->cl, msg);
- if (ret < 0) {
- hsc_add_tail(channel, msg, &channel->free_msgs_list);
- goto out;
- }
-
- ret = wait_event_interruptible(channel->rx_wait,
- !list_empty(&channel->rx_msgs_queue));
- if (ret < 0) {
- clear_bit(HSC_CH_READ, &channel->flags);
- hsi_flush(channel->cl);
- return -EINTR;
- }
-
- msg = hsc_get_first_msg(channel, &channel->rx_msgs_queue);
- if (msg) {
- if (msg->status != HSI_STATUS_ERROR) {
- ret = copy_to_user((void __user *)buf,
- sg_virt(msg->sgt.sgl), hsc_msg_len_get(msg));
- if (ret)
- ret = -EFAULT;
- else
- ret = hsc_msg_len_get(msg);
- } else {
- ret = -EIO;
- }
- hsc_add_tail(channel, msg, &channel->free_msgs_list);
- }
-out:
- clear_bit(HSC_CH_READ, &channel->flags);
-
- return ret;
-}
-
-static ssize_t hsc_write(struct file *file, const char __user *buf, size_t len,
- loff_t *ppos __maybe_unused)
-{
- struct hsc_channel *channel = file->private_data;
- struct hsi_msg *msg;
- ssize_t ret;
-
- if ((len == 0) || !IS_ALIGNED(len, sizeof(u32)))
- return -EINVAL;
- if (len > max_data_size)
- len = max_data_size;
- if (channel->ch >= channel->cl->tx_cfg.channels)
- return -ECHRNG;
- if (test_and_set_bit(HSC_CH_WRITE, &channel->flags))
- return -EBUSY;
- msg = hsc_get_first_msg(channel, &channel->free_msgs_list);
- if (!msg) {
- clear_bit(HSC_CH_WRITE, &channel->flags);
- return -ENOSPC;
- }
- if (copy_from_user(sg_virt(msg->sgt.sgl), (void __user *)buf, len)) {
- ret = -EFAULT;
- goto out;
- }
- hsc_msg_len_set(msg, len);
- msg->complete = hsc_tx_completed;
- msg->destructor = hsc_tx_msg_destructor;
- ret = hsi_async_write(channel->cl, msg);
- if (ret < 0)
- goto out;
-
- ret = wait_event_interruptible(channel->tx_wait,
- !list_empty(&channel->tx_msgs_queue));
- if (ret < 0) {
- clear_bit(HSC_CH_WRITE, &channel->flags);
- hsi_flush(channel->cl);
- return -EINTR;
- }
-
- msg = hsc_get_first_msg(channel, &channel->tx_msgs_queue);
- if (msg) {
- if (msg->status == HSI_STATUS_ERROR)
- ret = -EIO;
- else
- ret = hsc_msg_len_get(msg);
-
- hsc_add_tail(channel, msg, &channel->free_msgs_list);
- }
-out:
- clear_bit(HSC_CH_WRITE, &channel->flags);
-
- return ret;
-}
-
-static long hsc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
-{
- struct hsc_channel *channel = file->private_data;
- unsigned int state;
- struct hsc_rx_config rxc;
- struct hsc_tx_config txc;
- long ret = 0;
-
- switch (cmd) {
- case HSC_RESET:
- hsi_flush(channel->cl);
- break;
- case HSC_SET_PM:
- if (copy_from_user(&state, (void __user *)arg, sizeof(state)))
- return -EFAULT;
- if (state == HSC_PM_DISABLE) {
- if (test_and_set_bit(HSC_CH_WLINE, &channel->flags))
- return -EINVAL;
- ret = hsi_start_tx(channel->cl);
- } else if (state == HSC_PM_ENABLE) {
- if (!test_and_clear_bit(HSC_CH_WLINE, &channel->flags))
- return -EINVAL;
- ret = hsi_stop_tx(channel->cl);
- } else {
- ret = -EINVAL;
- }
- break;
- case HSC_SEND_BREAK:
- return hsc_break_send(channel->cl);
- case HSC_SET_RX:
- if (copy_from_user(&rxc, (void __user *)arg, sizeof(rxc)))
- return -EFAULT;
- return hsc_rx_set(channel->cl, &rxc);
- case HSC_GET_RX:
- hsc_rx_get(channel->cl, &rxc);
- if (copy_to_user((void __user *)arg, &rxc, sizeof(rxc)))
- return -EFAULT;
- break;
- case HSC_SET_TX:
- if (copy_from_user(&txc, (void __user *)arg, sizeof(txc)))
- return -EFAULT;
- return hsc_tx_set(channel->cl, &txc);
- case HSC_GET_TX:
- hsc_tx_get(channel->cl, &txc);
- if (copy_to_user((void __user *)arg, &txc, sizeof(txc)))
- return -EFAULT;
- break;
- default:
- return -ENOIOCTLCMD;
- }
-
- return ret;
-}
-
-static inline void __hsc_port_release(struct hsc_client_data *cl_data)
-{
- BUG_ON(cl_data->usecnt == 0);
-
- if (--cl_data->usecnt == 0) {
- hsi_flush(cl_data->cl);
- hsi_release_port(cl_data->cl);
- }
-}
-
-static int hsc_open(struct inode *inode, struct file *file)
-{
- struct hsc_client_data *cl_data;
- struct hsc_channel *channel;
- int ret = 0;
-
- pr_debug("open, minor = %d\n", iminor(inode));
-
- cl_data = container_of(inode->i_cdev, struct hsc_client_data, cdev);
- mutex_lock(&cl_data->lock);
- channel = cl_data->channels + (iminor(inode) & HSC_CH_MASK);
-
- if (test_and_set_bit(HSC_CH_OPEN, &channel->flags)) {
- ret = -EBUSY;
- goto out;
- }
- /*
- * Check if we have already claimed the port associated to the HSI
- * client. If not then try to claim it, else increase its refcount
- */
- if (cl_data->usecnt == 0) {
- ret = hsi_claim_port(cl_data->cl, 0);
- if (ret < 0)
- goto out;
- hsi_setup(cl_data->cl);
- }
- cl_data->usecnt++;
-
- ret = hsc_msgs_alloc(channel);
- if (ret < 0) {
- __hsc_port_release(cl_data);
- goto out;
- }
-
- file->private_data = channel;
- mutex_unlock(&cl_data->lock);
-
- return ret;
-out:
- mutex_unlock(&cl_data->lock);
-
- return ret;
-}
-
-static int hsc_release(struct inode *inode __maybe_unused, struct file *file)
-{
- struct hsc_channel *channel = file->private_data;
- struct hsc_client_data *cl_data = channel->cl_data;
-
- mutex_lock(&cl_data->lock);
- file->private_data = NULL;
- if (test_and_clear_bit(HSC_CH_WLINE, &channel->flags))
- hsi_stop_tx(channel->cl);
- __hsc_port_release(cl_data);
- hsc_reset_list(channel, &channel->rx_msgs_queue);
- hsc_reset_list(channel, &channel->tx_msgs_queue);
- hsc_reset_list(channel, &channel->free_msgs_list);
- clear_bit(HSC_CH_READ, &channel->flags);
- clear_bit(HSC_CH_WRITE, &channel->flags);
- clear_bit(HSC_CH_OPEN, &channel->flags);
- wake_up(&channel->rx_wait);
- wake_up(&channel->tx_wait);
- mutex_unlock(&cl_data->lock);
-
- return 0;
-}
-
-static const struct file_operations hsc_fops = {
- .owner = THIS_MODULE,
- .read = hsc_read,
- .write = hsc_write,
- .unlocked_ioctl = hsc_ioctl,
- .open = hsc_open,
- .release = hsc_release,
-};
-
-static void __devinit hsc_channel_init(struct hsc_channel *channel)
-{
- init_waitqueue_head(&channel->rx_wait);
- init_waitqueue_head(&channel->tx_wait);
- spin_lock_init(&channel->lock);
- INIT_LIST_HEAD(&channel->free_msgs_list);
- INIT_LIST_HEAD(&channel->rx_msgs_queue);
- INIT_LIST_HEAD(&channel->tx_msgs_queue);
-}
-
-static int __devinit hsc_probe(struct device *dev)
-{
- const char devname[] = "hsi_char";
- struct hsc_client_data *cl_data;
- struct hsc_channel *channel;
- struct hsi_client *cl = to_hsi_client(dev);
- unsigned int hsc_baseminor;
- dev_t hsc_dev;
- int ret;
- int i;
-
- cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
- if (!cl_data) {
- dev_err(dev, "Could not allocate hsc_client_data\n");
- return -ENOMEM;
- }
- hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl));
- if (!hsc_major) {
- ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,
- HSC_DEVS, devname);
- if (ret > 0)
- hsc_major = MAJOR(hsc_dev);
- } else {
- hsc_dev = MKDEV(hsc_major, hsc_baseminor);
- ret = register_chrdev_region(hsc_dev, HSC_DEVS, devname);
- }
- if (ret < 0) {
- dev_err(dev, "Device %s allocation failed %d\n",
- hsc_major ? "minor" : "major", ret);
- goto out1;
- }
- mutex_init(&cl_data->lock);
- hsi_client_set_drvdata(cl, cl_data);
- cdev_init(&cl_data->cdev, &hsc_fops);
- cl_data->cdev.owner = THIS_MODULE;
- cl_data->cl = cl;
- for (i = 0, channel = cl_data->channels; i < HSC_DEVS; i++, channel++) {
- hsc_channel_init(channel);
- channel->ch = i;
- channel->cl = cl;
- channel->cl_data = cl_data;
- }
-
- /* 1 hsi client -> N char devices (one for each channel) */
- ret = cdev_add(&cl_data->cdev, hsc_dev, HSC_DEVS);
- if (ret) {
- dev_err(dev, "Could not add char device %d\n", ret);
- goto out2;
- }
-
- return 0;
-out2:
- unregister_chrdev_region(hsc_dev, HSC_DEVS);
-out1:
- kfree(cl_data);
-
- return ret;
-}
-
-static int __devexit hsc_remove(struct device *dev)
-{
- struct hsi_client *cl = to_hsi_client(dev);
- struct hsc_client_data *cl_data = hsi_client_drvdata(cl);
- dev_t hsc_dev = cl_data->cdev.dev;
-
- cdev_del(&cl_data->cdev);
- unregister_chrdev_region(hsc_dev, HSC_DEVS);
- hsi_client_set_drvdata(cl, NULL);
- kfree(cl_data);
-
- return 0;
-}
-
-static struct hsi_client_driver hsc_driver = {
- .driver = {
- .name = "hsi_char",
- .owner = THIS_MODULE,
- .probe = hsc_probe,
- .remove = __devexit_p(hsc_remove),
- },
-};
-
-static int __init hsc_init(void)
-{
- int ret;
-
- if ((max_data_size < 4) || (max_data_size > 0x10000) ||
- (max_data_size & (max_data_size - 1))) {
- pr_err("Invalid max read/write data size");
- return -EINVAL;
- }
-
- ret = hsi_register_client_driver(&hsc_driver);
- if (ret) {
- pr_err("Error while registering HSI/SSI driver %d", ret);
- return ret;
- }
-
- pr_info("HSI/SSI char device loaded\n");
-
- return 0;
-}
-module_init(hsc_init);
-
-static void __exit hsc_exit(void)
-{
- hsi_unregister_client_driver(&hsc_driver);
- pr_info("HSI char device removed\n");
-}
-module_exit(hsc_exit);
-
-MODULE_AUTHOR("Andras Domokos ");
-MODULE_ALIAS("hsi:hsi_char");
-MODULE_DESCRIPTION("HSI character device");
-MODULE_LICENSE("GPL v2");
diff --git a/trunk/drivers/hsi/hsi.c b/trunk/drivers/hsi/hsi.c
deleted file mode 100644
index 4e2d79b79334..000000000000
--- a/trunk/drivers/hsi/hsi.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * HSI core.
- *
- * Copyright (C) 2010 Nokia Corporation. All rights reserved.
- *
- * Contact: Carlos Chinea
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "hsi_core.h"
-
-static struct device_type hsi_ctrl = {
- .name = "hsi_controller",
-};
-
-static struct device_type hsi_cl = {
- .name = "hsi_client",
-};
-
-static struct device_type hsi_port = {
- .name = "hsi_port",
-};
-
-static ssize_t modalias_show(struct device *dev,
- struct device_attribute *a __maybe_unused, char *buf)
-{
- return sprintf(buf, "hsi:%s\n", dev_name(dev));
-}
-
-static struct device_attribute hsi_bus_dev_attrs[] = {
- __ATTR_RO(modalias),
- __ATTR_NULL,
-};
-
-static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
-{
- if (dev->type == &hsi_cl)
- add_uevent_var(env, "MODALIAS=hsi:%s", dev_name(dev));
-
- return 0;
-}
-
-static int hsi_bus_match(struct device *dev, struct device_driver *driver)
-{
- return strcmp(dev_name(dev), driver->name) == 0;
-}
-
-static struct bus_type hsi_bus_type = {
- .name = "hsi",
- .dev_attrs = hsi_bus_dev_attrs,
- .match = hsi_bus_match,
- .uevent = hsi_bus_uevent,
-};
-
-static void hsi_client_release(struct device *dev)
-{
- kfree(to_hsi_client(dev));
-}
-
-static void hsi_new_client(struct hsi_port *port, struct hsi_board_info *info)
-{
- struct hsi_client *cl;
- unsigned long flags;
-
- cl = kzalloc(sizeof(*cl), GFP_KERNEL);
- if (!cl)
- return;
- cl->device.type = &hsi_cl;
- cl->tx_cfg = info->tx_cfg;
- cl->rx_cfg = info->rx_cfg;
- cl->device.bus = &hsi_bus_type;
- cl->device.parent = &port->device;
- cl->device.release = hsi_client_release;
- dev_set_name(&cl->device, info->name);
- cl->device.platform_data = info->platform_data;
- spin_lock_irqsave(&port->clock, flags);
- list_add_tail(&cl->link, &port->clients);
- spin_unlock_irqrestore(&port->clock, flags);
- if (info->archdata)
- cl->device.archdata = *info->archdata;
- if (device_register(&cl->device) < 0) {
- pr_err("hsi: failed to register client: %s\n", info->name);
- kfree(cl);
- }
-}
-
-static void hsi_scan_board_info(struct hsi_controller *hsi)
-{
- struct hsi_cl_info *cl_info;
- struct hsi_port *p;
-
- list_for_each_entry(cl_info, &hsi_board_list, list)
- if (cl_info->info.hsi_id == hsi->id) {
- p = hsi_find_port_num(hsi, cl_info->info.port);
- if (!p)
- continue;
- hsi_new_client(p, &cl_info->info);
- }
-}
-
-static int hsi_remove_client(struct device *dev, void *data __maybe_unused)
-{
- struct hsi_client *cl = to_hsi_client(dev);
- struct hsi_port *port = to_hsi_port(dev->parent);
- unsigned long flags;
-
- spin_lock_irqsave(&port->clock, flags);
- list_del(&cl->link);
- spin_unlock_irqrestore(&port->clock, flags);
- device_unregister(dev);
-
- return 0;
-}
-
-static int hsi_remove_port(struct device *dev, void *data __maybe_unused)
-{
- device_for_each_child(dev, NULL, hsi_remove_client);
- device_unregister(dev);
-
- return 0;
-}
-
-static void hsi_controller_release(struct device *dev __maybe_unused)
-{
-}
-
-static void hsi_port_release(struct device *dev __maybe_unused)
-{
-}
-
-/**
- * hsi_unregister_controller - Unregister an HSI controller
- * @hsi: The HSI controller to register
- */
-void hsi_unregister_controller(struct hsi_controller *hsi)
-{
- device_for_each_child(&hsi->device, NULL, hsi_remove_port);
- device_unregister(&hsi->device);
-}
-EXPORT_SYMBOL_GPL(hsi_unregister_controller);
-
-/**
- * hsi_register_controller - Register an HSI controller and its ports
- * @hsi: The HSI controller to register
- *
- * Returns -errno on failure, 0 on success.
- */
-int hsi_register_controller(struct hsi_controller *hsi)
-{
- unsigned int i;
- int err;
-
- hsi->device.type = &hsi_ctrl;
- hsi->device.bus = &hsi_bus_type;
- hsi->device.release = hsi_controller_release;
- err = device_register(&hsi->device);
- if (err < 0)
- return err;
- for (i = 0; i < hsi->num_ports; i++) {
- hsi->port[i].device.parent = &hsi->device;
- hsi->port[i].device.bus = &hsi_bus_type;
- hsi->port[i].device.release = hsi_port_release;
- hsi->port[i].device.type = &hsi_port;
- INIT_LIST_HEAD(&hsi->port[i].clients);
- spin_lock_init(&hsi->port[i].clock);
- err = device_register(&hsi->port[i].device);
- if (err < 0)
- goto out;
- }
- /* Populate HSI bus with HSI clients */
- hsi_scan_board_info(hsi);
-
- return 0;
-out:
- hsi_unregister_controller(hsi);
-
- return err;
-}
-EXPORT_SYMBOL_GPL(hsi_register_controller);
-
-/**
- * hsi_register_client_driver - Register an HSI client to the HSI bus
- * @drv: HSI client driver to register
- *
- * Returns -errno on failure, 0 on success.
- */
-int hsi_register_client_driver(struct hsi_client_driver *drv)
-{
- drv->driver.bus = &hsi_bus_type;
-
- return driver_register(&drv->driver);
-}
-EXPORT_SYMBOL_GPL(hsi_register_client_driver);
-
-static inline int hsi_dummy_msg(struct hsi_msg *msg __maybe_unused)
-{
- return 0;
-}
-
-static inline int hsi_dummy_cl(struct hsi_client *cl __maybe_unused)
-{
- return 0;
-}
-
-/**
- * hsi_alloc_controller - Allocate an HSI controller and its ports
- * @n_ports: Number of ports on the HSI controller
- * @flags: Kernel allocation flags
- *
- * Return NULL on failure or a pointer to an hsi_controller on success.
- */
-struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags)
-{
- struct hsi_controller *hsi;
- struct hsi_port *port;
- unsigned int i;
-
- if (!n_ports)
- return NULL;
-
- port = kzalloc(sizeof(*port)*n_ports, flags);
- if (!port)
- return NULL;
- hsi = kzalloc(sizeof(*hsi), flags);
- if (!hsi)
- goto out;
- for (i = 0; i < n_ports; i++) {
- dev_set_name(&port[i].device, "port%d", i);
- port[i].num = i;
- port[i].async = hsi_dummy_msg;
- port[i].setup = hsi_dummy_cl;
- port[i].flush = hsi_dummy_cl;
- port[i].start_tx = hsi_dummy_cl;
- port[i].stop_tx = hsi_dummy_cl;
- port[i].release = hsi_dummy_cl;
- mutex_init(&port[i].lock);
- }
- hsi->num_ports = n_ports;
- hsi->port = port;
-
- return hsi;
-out:
- kfree(port);
-
- return NULL;
-}
-EXPORT_SYMBOL_GPL(hsi_alloc_controller);
-
-/**
- * hsi_free_controller - Free an HSI controller
- * @hsi: Pointer to HSI controller
- */
-void hsi_free_controller(struct hsi_controller *hsi)
-{
- if (!hsi)
- return;
-
- kfree(hsi->port);
- kfree(hsi);
-}
-EXPORT_SYMBOL_GPL(hsi_free_controller);
-
-/**
- * hsi_free_msg - Free an HSI message
- * @msg: Pointer to the HSI message
- *
- * Client is responsible to free the buffers pointed by the scatterlists.
- */
-void hsi_free_msg(struct hsi_msg *msg)
-{
- if (!msg)
- return;
- sg_free_table(&msg->sgt);
- kfree(msg);
-}
-EXPORT_SYMBOL_GPL(hsi_free_msg);
-
-/**
- * hsi_alloc_msg - Allocate an HSI message
- * @nents: Number of memory entries
- * @flags: Kernel allocation flags
- *
- * nents can be 0. This mainly makes sense for read transfer.
- * In that case, HSI drivers will call the complete callback when
- * there is data to be read without consuming it.
- *
- * Return NULL on failure or a pointer to an hsi_msg on success.
- */
-struct hsi_msg *hsi_alloc_msg(unsigned int nents, gfp_t flags)
-{
- struct hsi_msg *msg;
- int err;
-
- msg = kzalloc(sizeof(*msg), flags);
- if (!msg)
- return NULL;
-
- if (!nents)
- return msg;
-
- err = sg_alloc_table(&msg->sgt, nents, flags);
- if (unlikely(err)) {
- kfree(msg);
- msg = NULL;
- }
-
- return msg;
-}
-EXPORT_SYMBOL_GPL(hsi_alloc_msg);
-
-/**
- * hsi_async - Submit an HSI transfer to the controller
- * @cl: HSI client sending the transfer
- * @msg: The HSI transfer passed to controller
- *
- * The HSI message must have the channel, ttype, complete and destructor
- * fields set beforehand. If nents > 0 then the client has to initialize
- * also the scatterlists to point to the buffers to write to or read from.
- *
- * HSI controllers relay on pre-allocated buffers from their clients and they
- * do not allocate buffers on their own.
- *
- * Once the HSI message transfer finishes, the HSI controller calls the
- * complete callback with the status and actual_len fields of the HSI message
- * updated. The complete callback can be called before returning from
- * hsi_async.
- *
- * Returns -errno on failure or 0 on success
- */
-int hsi_async(struct hsi_client *cl, struct hsi_msg *msg)
-{
- struct hsi_port *port = hsi_get_port(cl);
-
- if (!hsi_port_claimed(cl))
- return -EACCES;
-
- WARN_ON_ONCE(!msg->destructor || !msg->complete);
- msg->cl = cl;
-
- return port->async(msg);
-}
-EXPORT_SYMBOL_GPL(hsi_async);
-
-/**
- * hsi_claim_port - Claim the HSI client's port
- * @cl: HSI client that wants to claim its port
- * @share: Flag to indicate if the client wants to share the port or not.
- *
- * Returns -errno on failure, 0 on success.
- */
-int hsi_claim_port(struct hsi_client *cl, unsigned int share)
-{
- struct hsi_port *port = hsi_get_port(cl);
- int err = 0;
-
- mutex_lock(&port->lock);
- if ((port->claimed) && (!port->shared || !share)) {
- err = -EBUSY;
- goto out;
- }
- if (!try_module_get(to_hsi_controller(port->device.parent)->owner)) {
- err = -ENODEV;
- goto out;
- }
- port->claimed++;
- port->shared = !!share;
- cl->pclaimed = 1;
-out:
- mutex_unlock(&port->lock);
-
- return err;
-}
-EXPORT_SYMBOL_GPL(hsi_claim_port);
-
-/**
- * hsi_release_port - Release the HSI client's port
- * @cl: HSI client which previously claimed its port
- */
-void hsi_release_port(struct hsi_client *cl)
-{
- struct hsi_port *port = hsi_get_port(cl);
-
- mutex_lock(&port->lock);
- /* Allow HW driver to do some cleanup */
- port->release(cl);
- if (cl->pclaimed)
- port->claimed--;
- BUG_ON(port->claimed < 0);
- cl->pclaimed = 0;
- if (!port->claimed)
- port->shared = 0;
- module_put(to_hsi_controller(port->device.parent)->owner);
- mutex_unlock(&port->lock);
-}
-EXPORT_SYMBOL_GPL(hsi_release_port);
-
-static int hsi_start_rx(struct hsi_client *cl, void *data __maybe_unused)
-{
- if (cl->hsi_start_rx)
- (*cl->hsi_start_rx)(cl);
-
- return 0;
-}
-
-static int hsi_stop_rx(struct hsi_client *cl, void *data __maybe_unused)
-{
- if (cl->hsi_stop_rx)
- (*cl->hsi_stop_rx)(cl);
-
- return 0;
-}
-
-static int hsi_port_for_each_client(struct hsi_port *port, void *data,
- int (*fn)(struct hsi_client *cl, void *data))
-{
- struct hsi_client *cl;
-
- spin_lock(&port->clock);
- list_for_each_entry(cl, &port->clients, link) {
- spin_unlock(&port->clock);
- (*fn)(cl, data);
- spin_lock(&port->clock);
- }
- spin_unlock(&port->clock);
-
- return 0;
-}
-
-/**
- * hsi_event -Notifies clients about port events
- * @port: Port where the event occurred
- * @event: The event type
- *
- * Clients should not be concerned about wake line behavior. However, due
- * to a race condition in HSI HW protocol, clients need to be notified
- * about wake line changes, so they can implement a workaround for it.
- *
- * Events:
- * HSI_EVENT_START_RX - Incoming wake line high
- * HSI_EVENT_STOP_RX - Incoming wake line down
- */
-void hsi_event(struct hsi_port *port, unsigned int event)
-{
- int (*fn)(struct hsi_client *cl, void *data);
-
- switch (event) {
- case HSI_EVENT_START_RX:
- fn = hsi_start_rx;
- break;
- case HSI_EVENT_STOP_RX:
- fn = hsi_stop_rx;
- break;
- default:
- return;
- }
- hsi_port_for_each_client(port, NULL, fn);
-}
-EXPORT_SYMBOL_GPL(hsi_event);
-
-static int __init hsi_init(void)
-{
- return bus_register(&hsi_bus_type);
-}
-postcore_initcall(hsi_init);
-
-static void __exit hsi_exit(void)
-{
- bus_unregister(&hsi_bus_type);
-}
-module_exit(hsi_exit);
-
-MODULE_AUTHOR("Carlos Chinea ");
-MODULE_DESCRIPTION("High-speed Synchronous Serial Interface (HSI) framework");
-MODULE_LICENSE("GPL v2");
diff --git a/trunk/drivers/hsi/hsi_boardinfo.c b/trunk/drivers/hsi/hsi_boardinfo.c
deleted file mode 100644
index e56bc6da5f98..000000000000
--- a/trunk/drivers/hsi/hsi_boardinfo.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * HSI clients registration interface
- *
- * Copyright (C) 2010 Nokia Corporation. All rights reserved.
- *
- * Contact: Carlos Chinea
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#include
-#include
-#include
-#include "hsi_core.h"
-
-/*
- * hsi_board_list is only used internally by the HSI framework.
- * No one else is allowed to make use of it.
- */
-LIST_HEAD(hsi_board_list);
-EXPORT_SYMBOL_GPL(hsi_board_list);
-
-/**
- * hsi_register_board_info - Register HSI clients information
- * @info: Array of HSI clients on the board
- * @len: Length of the array
- *
- * HSI clients are statically declared and registered on board files.
- *
- * HSI clients will be automatically registered to the HSI bus once the
- * controller and the port where the clients wishes to attach are registered
- * to it.
- *
- * Return -errno on failure, 0 on success.
- */
-int __init hsi_register_board_info(struct hsi_board_info const *info,
- unsigned int len)
-{
- struct hsi_cl_info *cl_info;
-
- cl_info = kzalloc(sizeof(*cl_info) * len, GFP_KERNEL);
- if (!cl_info)
- return -ENOMEM;
-
- for (; len; len--, info++, cl_info++) {
- cl_info->info = *info;
- list_add_tail(&cl_info->list, &hsi_board_list);
- }
-
- return 0;
-}
diff --git a/trunk/drivers/hsi/hsi_core.h b/trunk/drivers/hsi/hsi_core.h
deleted file mode 100644
index ab5c2fb175fd..000000000000
--- a/trunk/drivers/hsi/hsi_core.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * HSI framework internal interfaces,
- *
- * Copyright (C) 2010 Nokia Corporation. All rights reserved.
- *
- * Contact: Carlos Chinea