]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoquota: Coding style fixes
Jan Kara [Tue, 27 Jan 2009 14:47:22 +0000 (15:47 +0100)]
quota: Coding style fixes

Wrap long lines, remove assignments from conditions, rewrite two
overcomplicated for loops.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Remove superfluous inlines
Jan Kara [Tue, 27 Jan 2009 00:47:11 +0000 (01:47 +0100)]
quota: Remove superfluous inlines

Remove inlines of large functions to decrease code size (saved 1543
bytes).

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Remove uppercase aliases for quota functions.
Jan Kara [Mon, 26 Jan 2009 16:37:01 +0000 (17:37 +0100)]
quota: Remove uppercase aliases for quota functions.

Since all users have been converted, remove uppercase names of quota functions.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agonfsd: Use lowercase names of quota functions
Jan Kara [Mon, 9 Feb 2009 21:22:21 +0000 (22:22 +0100)]
nfsd: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

CC: bfields@fieldses.org
CC: neilb@suse.de
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agojfs: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 16:22:32 +0000 (17:22 +0100)]
jfs: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
16 years agoudf: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 16:20:46 +0000 (17:20 +0100)]
udf: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoufs: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 16:15:30 +0000 (17:15 +0100)]
ufs: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
CC: Evgeniy Dushistov <dushistov@mail.ru>
16 years agoreiserfs: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 16:14:18 +0000 (17:14 +0100)]
reiserfs: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
CC: reiserfs-devel@vger.kernel.org
16 years agoext4: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 16:04:39 +0000 (17:04 +0100)]
ext4: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mingming Cao <cmm@us.ibm.com>
CC: linux-ext4@vger.kernel.org
16 years agoext3: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 15:58:01 +0000 (16:58 +0100)]
ext3: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
CC: linux-ext4@vger.kernel.org
16 years agoext2: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 15:52:06 +0000 (16:52 +0100)]
ext2: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
CC: linux-ext4@vger.kernel.org
16 years agoramfs: Remove quota call
Jan Kara [Mon, 26 Jan 2009 15:46:21 +0000 (16:46 +0100)]
ramfs: Remove quota call

Ramfs has no bussiness in quotas.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agovfs: Use lowercase names of quota functions
Jan Kara [Mon, 26 Jan 2009 15:45:12 +0000 (16:45 +0100)]
vfs: Use lowercase names of quota functions

Use lowercase names of quota functions instead of old uppercase ones.

Signed-off-by: Jan Kara <jack@suse.cz>
CC: Alexander Viro <viro@zeniv.linux.org.uk>
16 years agoquota: Remove dqbuf_t and other cleanups
Jan Kara [Mon, 26 Jan 2009 15:17:50 +0000 (16:17 +0100)]
quota: Remove dqbuf_t and other cleanups

Remove bogus typedef which is just a definition of char *.
Remove unnecessary type casts.
Substitute freedqbuf() with kfree.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Remove NODQUOT macro
Jan Kara [Mon, 26 Jan 2009 15:01:43 +0000 (16:01 +0100)]
quota: Remove NODQUOT macro

Remove this macro which is just a definition of NULL. Fix a few coding style
issues along the way.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Make global quota locks cacheline aligned
Jan Kara [Mon, 26 Jan 2009 14:32:46 +0000 (15:32 +0100)]
quota: Make global quota locks cacheline aligned

Andrew Morton has suggested that three global quota locks can end up in the
same cacheline which can result in bad cacheline ping-pong on SMP machines.
Make locks cacheline aligned so that we avoid this problem (thanks goes to
Andrew for the idea).

Signed-off-by: Jan Kara <jack@suse.cz>
CC: Andrew Morton <akpm@linux-foundation.org>
16 years agoquota: Move quota files into separate directory
Jan Kara [Mon, 26 Jan 2009 14:28:09 +0000 (15:28 +0100)]
quota: Move quota files into separate directory

Quota subsystem has more and more files. It's time to create a dir for it.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoext4: quota reservation for delayed allocation
Mingming Cao [Thu, 22 Jan 2009 17:13:05 +0000 (18:13 +0100)]
ext4: quota reservation for delayed allocation

Uses quota reservation/claim/release to handle quota properly for delayed
allocation in the three steps: 1) quotas are reserved when data being copied
to cache when block allocation is defered 2) when new blocks are allocated.
reserved quotas are converted to the real allocated quota, 2) over-booked
quotas for metadata blocks are released back.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoreiserfs: Remove unnecessary quota functions
Jan Kara [Mon, 12 Jan 2009 18:07:14 +0000 (19:07 +0100)]
reiserfs: Remove unnecessary quota functions

reiserfs_dquot_initialize() and reiserfs_dquot_drop() is no longer
needed because of modified quota locking.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoext4: Remove unnecessary quota functions
Jan Kara [Mon, 12 Jan 2009 18:05:26 +0000 (19:05 +0100)]
ext4: Remove unnecessary quota functions

ext4_dquot_initialize() and ext4_dquot_drop() is no longer
needed because of modified quota locking.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoext3: Remove unnecessary quota functions
Jan Kara [Mon, 12 Jan 2009 18:03:19 +0000 (19:03 +0100)]
ext3: Remove unnecessary quota functions

ext3_dquot_initialize() and ext3_dquot_drop() is no longer
needed because of modified quota locking.

Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Move EXPORT_SYMBOL immediately next to the functions/varibles
Mingming Cao [Wed, 14 Jan 2009 15:19:32 +0000 (16:19 +0100)]
quota: Move EXPORT_SYMBOL immediately next to the functions/varibles

According to checkpatch: EXPORT_SYMBOL(foo); should immediately follow its
 function/variable

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Use inode->i_blkbits to get block bits
Mingming Cao [Wed, 14 Jan 2009 15:18:57 +0000 (16:18 +0100)]
quota: Use inode->i_blkbits to get block bits

Andrew has suggested to use inode->i_blkbits to get the block bits info,
rather than use super block's blockbits. That should be faster and emit
less code.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Add quota reservation claim and released operations
Mingming Cao [Tue, 13 Jan 2009 15:43:14 +0000 (16:43 +0100)]
quota: Add quota reservation claim and released operations

Reserved quota will be claimed at the block allocation time. Over-booked
quota could be returned back with the release callback function.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agoquota: Add quota reservation support
Mingming Cao [Tue, 13 Jan 2009 15:43:09 +0000 (16:43 +0100)]
quota: Add quota reservation support

Delayed allocation defers the block allocation at the dirty pages
flush-out time, doing quota charge/check at that time is too late.
But we can't charge the quota blocks until blocks are really allocated,
otherwise users could get overcharged after reboot from system crash.

This patch adds quota reservation for delayed allocation. Quota blocks
are reserved in memory, inode and quota won't gets dirtied until later
block allocation time.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
16 years agobonding: select current active slave when enslaving device for mode tlb and alb
Jiri Pirko [Thu, 26 Mar 2009 00:23:38 +0000 (17:23 -0700)]
bonding: select current active slave when enslaving device for mode tlb and alb

I've hit an issue on my system when I've been using RealTek RTL8139D cards in
bonding interface in mode balancing-alb. When I enslave a card, the current
active slave (bond->curr_active_slave) is not set and the link is therefore
not functional.

----
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: None
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1f:1f:01:2f:22
----

The thing that gets it right is when I unplug the cable and then I put it back
into the NIC. Then the current active slave is set to eth1 and link is working
just fine. Here is dmesg log with bonding DEBUG messages turned on:
----
ADDRCONF(NETDEV_UP): bond0: link is not ready
event_dev: bond0, event: 1
IFF_MASTER
event_dev: bond0, event: 8
IFF_MASTER
bond_ioctl: master=bond0, cmd=35216
slave_dev=cac5d800:
slave_dev->name=eth1:
eth1: ! NETIF_F_VLAN_CHALLENGED
event_dev: eth1, event: 8
eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 1
event_dev: eth1, event: 8
IFF_SLAVE
Initial state of slave_dev is BOND_LINK_UP
bonding: bond0: enslaving eth1 as an active interface with an up link.
ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
event_dev: bond0, event: 4
IFF_MASTER
bond0: no IPv6 routers present

<<<<cable unplug>>>>

eth1: link down
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely down for interface eth1, disabling it
event_dev: bond0, event: 4
IFF_MASTER

<<<<cable plug>>>>

eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
event_dev: eth1, event: 4
IFF_SLAVE
bonding: bond0: link status definitely up for interface eth1.
bonding: bond0: making interface eth1 the new active one.
event_dev: eth1, event: 8
IFF_SLAVE
event_dev: eth1, event: 8
IFF_SLAVE
bonding: bond0: first active interface up!
event_dev: bond0, event: 4
IFF_MASTER
----

The current active slave is set by calling bond_select_active_slave() function
from bond_miimon_commit() function when the slave (eth1) link goes to state up.

I also tested this on other machine with Broadcom NetXtreme II BCM5708
1000Base-T NIC and there all works fine. The thing is that this adapter is down
and goes up after few seconds after it is enslaved.

This patch calls bond_select_active_slave() in bond_enslave() function for modes
alb and tlb and makes sure that the current active slave is set up properly even
when the slave state is already up. Tested on both systems, works fine.

Notice: The same problem can maybe also occrur in mode 8023AD but I'm unable to
test that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agogianfar: reallocate skb when headroom is not enough for fcb
Li Yang [Tue, 24 Mar 2009 23:15:33 +0000 (23:15 +0000)]
gianfar: reallocate skb when headroom is not enough for fcb

Gianfar uses a hardware header FCB for offloading.  However when used
with bridging or IP forwarding, TX skb might not have enough headroom
for the FCB.  Reallocate skb for such cases.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoBump release date to 25Mar2009 and version to 0.22
Florian Fainelli [Tue, 24 Mar 2009 23:34:38 +0000 (23:34 +0000)]
Bump release date to 25Mar2009 and version to 0.22

This patch bumps the driver release date to March 25th 2009
and release version to 0.22.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agor6040: Fix second PHY address
Florian Fainelli [Tue, 24 Mar 2009 23:34:35 +0000 (23:34 +0000)]
r6040: Fix second PHY address

This patch fixes the second PHY address which is strapped
to be at PHY address 3 instead of 2.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoARM: OMAP: N8x0: Remove board-n800-audio.c
Jarkko Nikula [Wed, 25 Mar 2009 10:26:21 +0000 (10:26 +0000)]
ARM: OMAP: N8x0: Remove board-n800-audio.c

This file is needless since there is no anymore omap specific sound drivers.
Drivers got removed by the commit 9fa298dc5f0b3e343337848b63c850e1a89d2d59.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: N8x0: Add retu-headset platform data
Jarkko Nikula [Wed, 25 Mar 2009 10:26:20 +0000 (10:26 +0000)]
ARM: OMAP: N8x0: Add retu-headset platform data

This was earlier in board-n800-audio.c but got removed by the commit
c65c733e1af5eac5681233309fed38538c9e06d2.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agosmack: convert smack to standard linux lists
Etienne Basset [Tue, 24 Mar 2009 19:53:24 +0000 (20:53 +0100)]
smack: convert smack to standard linux lists

the following patch (on top of 2.6.29) converts Smack lists to standard linux lists
Please review and consider for inclusion in 2.6.30-rc

regards,
Etienne

Signed-off-by: Etienne Basset <etienne.basset@numericable.fr>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
16 years agoftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
Zhaolei [Wed, 25 Mar 2009 04:06:05 +0000 (12:06 +0800)]
ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()

 "Because when we call ftrace_free_rec we change the rec->ip to point to the
  next record in the chain. Something is very wrong if rec->ip >= s &&
  rec->ip < e and the record is already free."

 "Note, use FTRACE_WARN_ON() macro. This way it shuts down ftrace if it is
  hit and helps to avoid further damage later."
                   -- Steven Rostedt <rostedt@goodmis.org>

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
16 years agonetfilter: nf_conntrack: calculate per-protocol nlattr size
Holger Eitzenberger [Wed, 25 Mar 2009 20:53:39 +0000 (21:53 +0100)]
netfilter: nf_conntrack: calculate per-protocol nlattr size

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_conntrack: add generic function to get len of generic policy
Holger Eitzenberger [Wed, 25 Mar 2009 20:52:17 +0000 (21:52 +0100)]
netfilter: nf_conntrack: add generic function to get len of generic policy

Usefull for all protocols which do not add additional data, such
as GRE or UDPlite.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: allocate right-sized ctnetlink skb
Holger Eitzenberger [Wed, 25 Mar 2009 20:50:59 +0000 (21:50 +0100)]
netfilter: ctnetlink: allocate right-sized ctnetlink skb

Try to allocate a Netlink skb roughly the size of the actual
message, with the help from the l3 and l4 protocol helpers.
This is all to prevent a reallocation in netlink_trim() later.

The overhead of allocating the right-sized skb is rather small, with
ctnetlink_alloc_skb() actually being inlined away on my x86_64 box.
The size of the per-proto space is determined at registration time of
the protocol helper.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoRevert "x86: don't compile vsmp_64 for 32bit"
Ravikiran G Thirumalai [Tue, 24 Mar 2009 06:14:29 +0000 (23:14 -0700)]
Revert "x86: don't compile vsmp_64 for 32bit"

Partial revert of commit 129d8bc828e011bda0b7110a097bf3a0167f966e
titled 'x86: don't compile vsmp_64 for 32bit'

Commit reverted to compile vsmp_64.c if CONFIG_X86_64 is defined,
since is_vsmp_box() needs to indicate that TSCs are not synchronized, and
hence, not a valid time source, even when CONFIG_X86_VSMP is not defined.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: shai@scalex86.org
LKML-Reference: <20090324061429.GH7278@localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agonetfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()
Eric Dumazet [Wed, 25 Mar 2009 20:05:46 +0000 (21:05 +0100)]
netfilter: nf_conntrack: use SLAB_DESTROY_BY_RCU and get rid of call_rcu()

Use "hlist_nulls" infrastructure we added in 2.6.29 for RCUification of UDP & TCP.

This permits an easy conversion from call_rcu() based hash lists to a
SLAB_DESTROY_BY_RCU one.

Avoiding call_rcu() delay at nf_conn freeing time has numerous gains.

First, it doesnt fill RCU queues (up to 10000 elements per cpu).
This reduces OOM possibility, if queued elements are not taken into account
This reduces latency problems when RCU queue size hits hilimit and triggers
emergency mode.

- It allows fast reuse of just freed elements, permitting better use of
CPU cache.

- We delete rcu_head from "struct nf_conn", shrinking size of this structure
by 8 or 16 bytes.

This patch only takes care of "struct nf_conn".
call_rcu() is still used for less critical conntrack parts, that may
be converted later if necessary.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years ago[ARM] OMAP: Fix compile for omap2_init_common_hw()
Tony Lindgren [Mon, 16 Mar 2009 22:28:42 +0000 (15:28 -0700)]
[ARM] OMAP: Fix compile for omap2_init_common_hw()

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Russell King [Wed, 25 Mar 2009 18:31:35 +0000 (18:31 +0000)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel

16 years agonetfilter: {ip,ip6,arp}_tables: fix incorrect loop detection
Patrick McHardy [Wed, 25 Mar 2009 18:26:35 +0000 (19:26 +0100)]
netfilter: {ip,ip6,arp}_tables: fix incorrect loop detection

Commit e1b4b9f ([NETFILTER]: {ip,ip6,arp}_tables: fix exponential worst-case
search for loops) introduced a regression in the loop detection algorithm,
causing sporadic incorrectly detected loops.

When a chain has already been visited during the check, it is treated as
having a standard target containing a RETURN verdict directly at the
beginning in order to not check it again. The real target of the first
rule is then incorrectly treated as STANDARD target and checked not to
contain invalid verdicts.

Fix by making sure the rule does actually contain a standard target.

Based on patch by Francis Dupont <Francis_Dupont@isc.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agox86: kretprobe-booster interrupt emulation code fix
Masami Hiramatsu [Mon, 23 Mar 2009 14:14:52 +0000 (10:14 -0400)]
x86: kretprobe-booster interrupt emulation code fix

Fix interrupt emulation code in kretprobe-booster according to
pt_regs update (es/ds change and gs adding).

This issue has been reported on systemtap-bugzilla:

  http://sources.redhat.com/bugzilla/show_bug.cgi?id=9965

  | On a -tip kernel on x86_32, kretprobe_example (from samples) triggers the
  | following backtrace when its retprobing a class of functions that cause a
  | copy_from/to_user().
  |
  | BUG: sleeping function called from invalid context at mm/memory.c:3196
  | in_atomic(): 0, irqs_disabled(): 1, pid: 2286, name: cat

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: systemtap-ml <systemtap@sources.redhat.com>
LKML-Reference: <49C7995C.2010601@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: Correct behaviour of irq affinity
Rusty Russell [Tue, 24 Mar 2009 21:17:19 +0000 (14:17 -0700)]
x86: Correct behaviour of irq affinity

Impact: get correct smp_affinity as user requested

The effect of setting desc->affinity (ie. from userspace via sysfs) has
varied over time.  In 2.6.27, the 32-bit code anded the value with
cpu_online_map, and both 32 and 64-bit did that anding whenever a cpu
was unplugged.

2.6.29 consolidated this into one routine (and fixed hotplug) but
introduced another variation: anding the affinity with cfg->domain.

We should just set it to what the user said - if possible.

(cpu_mask_to_apicid_and already takes cpu_online_mask into account)

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49C94DDF.2010703@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agonetfilter: limit the length of the helper name
Holger Eitzenberger [Wed, 25 Mar 2009 17:44:01 +0000 (18:44 +0100)]
netfilter: limit the length of the helper name

This is necessary in order to have an upper bound for Netlink
message calculation, which is not a problem at all, as there
are no helpers with a longer name.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoinit,cpuset: fix initialize order
Lai Jiangshan [Wed, 25 Mar 2009 09:06:30 +0000 (17:06 +0800)]
init,cpuset: fix initialize order

Impact: cpuset_wq should be initialized after init_workqueues()

When I read /debugfs/tracing/trace_stat/workqueues,
I got this:

 # CPU  INSERTED  EXECUTED   NAME
 # |      |         |          |

   0      0          0       cpuset
   0    285        285       events/0
   0      2          2       work_on_cpu/0
   0   1115       1115       khelper
   0    325        325       kblockd/0
   0      0          0       kacpid
   0      0          0       kacpi_notify
   0      0          0       ata/0
   0      0          0       ata_aux
   0      0          0       ksuspend_usbd
   0      0          0       aio/0
   0      0          0       nfsiod
   0      0          0       kpsmoused
   0      0          0       kstriped
   0      0          0       kondemand/0
   0      1          1       hid_compat
   0      0          0       rpciod/0

   1     64         64       events/1
   1      2          2       work_on_cpu/1
   1      5          5       kblockd/1
   1      0          0       ata/1
   1      0          0       aio/1
   1      0          0       kondemand/1
   1      0          0       rpciod/1

I found "cpuset" is at the earliest.

I found a create_singlethread_workqueue() is earlier than
init_workqueues():

kernel_init()
->cpuset_init_smp()
  ->create_singlethread_workqueue()
->do_basic_setup()
  ->init_workqueues()

I think it's better that create_singlethread_workqueue() is called
after workqueue subsystem has been initialized.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Menage <menage@google.com>
Cc: miaoxie <miaox@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49C9F416.1050707@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace_workqueues: fix empty line's output
Lai Jiangshan [Wed, 25 Mar 2009 08:59:18 +0000 (16:59 +0800)]
trace_workqueues: fix empty line's output

Empty lines separate cpus stat. After previous
fix(trace_stat: keep original order) applied, the empty lines
are displayed at incorrect position.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <49C9F266.2060706@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace_stat: keep original order
Lai Jiangshan [Wed, 25 Mar 2009 08:58:39 +0000 (16:58 +0800)]
trace_stat: keep original order

Impact: make trace_stat files show items with the original order

trace_stat tracer reverse the items, it makes the output
looks a little ugly.

Example, when we read trace_stat/workqueues, we get cpu#7's stat.
at first, and then cpu#6... cpu#0.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <49C9F23F.5040307@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace_stat: don't call seq_printf() in seq_operation->start()
Lai Jiangshan [Wed, 25 Mar 2009 08:27:17 +0000 (16:27 +0800)]
trace_stat: don't call seq_printf() in seq_operation->start()

Impact: Fix incorrect way using seq_file's API

Use SEQ_START_TOKEN instead of calling ->stat_headers()
int seq_operation->start().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
LKML-Reference: <49C9EAE5.5070202@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agonetlink: add nla_policy_len()
Holger Eitzenberger [Wed, 25 Mar 2009 17:26:30 +0000 (18:26 +0100)]
netlink: add nla_policy_len()

It calculates the max. length of a Netlink policy, which is usefull
for allocating Netlink buffers roughly the size of the actual
message.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: ctnetlink: add callbacks to the per-proto nlattrs
Holger Eitzenberger [Wed, 25 Mar 2009 17:24:48 +0000 (18:24 +0100)]
netfilter: ctnetlink: add callbacks to the per-proto nlattrs

There is added a single callback for the l3 proto helper.  The two
callbacks for the l4 protos are necessary because of the general
structure of a ctnetlink event, which is in short:

 CTA_TUPLE_ORIG
   <l3/l4-proto-attributes>
 CTA_TUPLE_REPLY
   <l3/l4-proto-attributes>
 CTA_ID
 ...
 CTA_PROTOINFO
   <l4-proto-attributes>
 CTA_TUPLE_MASTER
   <l3/l4-proto-attributes>

Therefore the formular is

 size := sizeof(generic-nlas) + 3 * sizeof(tuple_nlas) + sizeof(protoinfo_nlas)

Some of the NLAs are optional, e. g. CTA_TUPLE_MASTER, which is only
set if it's an expected connection.  But the number of optional NLAs is
small enough to prevent netlink_trim() from reallocating if calculated
properly.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agoboard H2: simplify MMC setup
Ladislav Michl [Wed, 25 Mar 2009 18:05:47 +0000 (19:05 +0100)]
board H2: simplify MMC setup

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoHID: autosuspend -- fix lockup of hid on reset
Oliver Neukum [Sun, 22 Mar 2009 17:01:49 +0000 (18:01 +0100)]
HID: autosuspend -- fix lockup of hid on reset

This fixes a use of flush_scheduled_work() in USB HID's reset logic that can
deadlock.

Tested-by: Valdis Kletniks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: hid_reset_resume() needs to be defined only when CONFIG_PM is set
Jiri Kosina [Fri, 20 Feb 2009 11:47:08 +0000 (12:47 +0100)]
HID: hid_reset_resume() needs to be defined only when CONFIG_PM is set

There is no point of having hid_reset_resume() when CONFIG_PM is
not set, and even the corresponding .reset_resume pointer in hid_driver
struct is properly ifdefed.

Move the definition into the ifdef CONFIG_PM part of the source to avoid

drivers/hid/usbhid/hid-core.c:1337: warning: 'hid_reset_resume' defined but not used

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: fix USB HID devices after STD with autosuspend
Oliver Neukum [Wed, 18 Feb 2009 10:46:45 +0000 (11:46 +0100)]
HID: fix USB HID devices after STD with autosuspend

This patch fixes a bug caused by reset_resume not changing the internal
status flags for a device that is resumed via reset_resume. To do so the
reset handlers, which correctly assume that a device is awake, can no longer
do all the work of reset_resume handling.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: do not try to compile PM code with CONFIG_PM unset
Jiri Kosina [Mon, 19 Jan 2009 08:17:18 +0000 (09:17 +0100)]
HID: do not try to compile PM code with CONFIG_PM unset

Fixes this build breakage in case when CONFIG_PM is not set

drivers/hid/usbhid/hid-core.c: In function 'hid_suspend':
drivers/hid/usbhid/hid-core.c:1220: error: 'struct usb_device' has no member named 'auto_pm'
drivers/hid/usbhid/hid-core.c:1245: error: 'struct usb_device' has no member named 'auto_pm'
drivers/hid/usbhid/hid-core.c:1258: error: 'struct usb_device' has no member named 'auto_pm'

by throwing both the hid_suspend() and hid_resume() away completely
in such case, as they won't be used anyway.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoHID: autosuspend support for USB HID
Oliver Neukum [Wed, 17 Dec 2008 14:38:03 +0000 (15:38 +0100)]
HID: autosuspend support for USB HID

This uses the USB busy mechanism for aggessive autosuspend of USB
HID devices. It autosuspends all opened devices supporting remote wakeup
after a timeout unless

- output is being done to the device
- a key is being held down (remote wakeup isn't triggered upon key release)
- LED(s) are lit
- hiddev is opened

As in the current driver closed devices will be autosuspended even if they
don't support remote wakeup.

The patch is quite large because output to devices is done in hard interrupt
context meaning a lot a queuing and locking had to be touched. The LED stuff
has been solved by means of a simple counter. Additions to the generic HID code
could be avoided. In addition it now covers hidraw. It contains an embryonic
version of an API to let the generic HID code tell the lower levels which
capabilities with respect to power management are needed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agogenirq: fix devres.o build for GENERIC_HARDIRQS=n
Thomas Gleixner [Wed, 25 Mar 2009 16:33:38 +0000 (17:33 +0100)]
genirq: fix devres.o build for GENERIC_HARDIRQS=n

kernel/irq/devres.c is built by sparc (32bit) and m68k via the obscure
../../../kernel/irq/devres.o reference in arch/[sparc/m68k]/kernel/Makefile

To avoid ifdeffery in devres.c provide request_threaded_irq as an
inline for these users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agonetfilter: factorize ifname_compare()
Eric Dumazet [Wed, 25 Mar 2009 16:31:52 +0000 (17:31 +0100)]
netfilter: factorize ifname_compare()

We use same not trivial helper function in four places. We can factorize it.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: nf_conntrack: use hlist_add_head_rcu() in nf_conntrack_set_hashsize()
Eric Dumazet [Wed, 25 Mar 2009 16:24:34 +0000 (17:24 +0100)]
netfilter: nf_conntrack: use hlist_add_head_rcu() in nf_conntrack_set_hashsize()

Using hlist_add_head() in nf_conntrack_set_hashsize() is quite dangerous.
Without any barrier, one CPU could see a loop while doing its lookup.
Its true new table cannot be seen by another cpu, but previous table is still
readable.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agonetfilter: fix xt_LED build failure
Patrick McHardy [Wed, 25 Mar 2009 16:21:34 +0000 (17:21 +0100)]
netfilter: fix xt_LED build failure

net/netfilter/xt_LED.c:40: error: field netfilter_led_trigger has incomplete type
net/netfilter/xt_LED.c: In function led_timeout_callback:
net/netfilter/xt_LED.c:78: warning: unused variable ledinternal
net/netfilter/xt_LED.c: In function led_tg_check:
net/netfilter/xt_LED.c:102: error: implicit declaration of function led_trigger_register
net/netfilter/xt_LED.c: In function led_tg_destroy:
net/netfilter/xt_LED.c:135: error: implicit declaration of function led_trigger_unregister

Fix by adding a dependency on LED_TRIGGERS.

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Tested-by: Subrata Modak <tosubrata@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
16 years agodmatest: add dma interrupts and callbacks
Dan Williams [Wed, 25 Mar 2009 16:13:25 +0000 (09:13 -0700)]
dmatest: add dma interrupts and callbacks

Use the callback infrastructure to report driver/hardware hangs or
missed interrupts.  Since this makes the test threads much more
aggressive (from: explicit 1ms sleep to: wait_for_completion) we set the
nice value to 10 so as to not swamp legitimate tasks.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodmatest: add xor test
Dan Williams [Wed, 25 Mar 2009 16:13:25 +0000 (09:13 -0700)]
dmatest: add xor test

Extend dmatest to launch a thread per supported operation type and add
an xor test.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodmaengine: allow dma support for async_tx to be toggled
Dan Williams [Wed, 25 Mar 2009 16:13:25 +0000 (09:13 -0700)]
dmaengine: allow dma support for async_tx to be toggled

Provide a config option for blocking the allocation of dma channels to
the async_tx api.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agoasync_tx: provide __async_inline for HAS_DMA=n archs
Dan Williams [Wed, 25 Mar 2009 16:13:25 +0000 (09:13 -0700)]
async_tx: provide __async_inline for HAS_DMA=n archs

To allow an async_tx routine to be compiled away on HAS_DMA=n arch it
needs to be declared __always_inline otherwise the compiler may emit
code and cause a link error.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodmaengine: kill some unused headers
Dan Williams [Wed, 25 Mar 2009 16:13:24 +0000 (09:13 -0700)]
dmaengine: kill some unused headers

The dmaengine redux left some unneeded headers in
include/linux/dmaengine.h, clean them up.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodmaengine: initialize tx_list in dma_async_tx_descriptor_init
Dan Williams [Wed, 25 Mar 2009 16:13:24 +0000 (09:13 -0700)]
dmaengine: initialize tx_list in dma_async_tx_descriptor_init

Centralize this common initialization (and one case where ipu_idmac is
duplicating ->chan initialization).

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodma: i.MX31 IPU DMA robustness improvements
Guennadi Liakhovetski [Wed, 25 Mar 2009 16:13:24 +0000 (09:13 -0700)]
dma: i.MX31 IPU DMA robustness improvements

Add DMA error handling to the ISR, move common code fragments to functions, fix
scatter-gather element queuing in the ISR, survive channel freeing and
re-allocation in a quick succession.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodma: improve section assignment in i.MX31 IPU DMA driver
Guennadi Liakhovetski [Wed, 25 Mar 2009 16:13:24 +0000 (09:13 -0700)]
dma: improve section assignment in i.MX31 IPU DMA driver

The i.MX31 IPU DMA driver is a platform driver, but doesn't need hotplug, so we
can use __init and __exit function attributes.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodma: ipu_idmac driver cosmetic clean-up
Guennadi Liakhovetski [Wed, 25 Mar 2009 16:13:23 +0000 (09:13 -0700)]
dma: ipu_idmac driver cosmetic clean-up

Remove superfluous semicolons, update comments.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agodmaengine: fail device registration if channel registration fails
Dan Williams [Wed, 25 Mar 2009 16:13:23 +0000 (09:13 -0700)]
dmaengine: fail device registration if channel registration fails

Atsushi points out:
"If alloc_percpu or kzalloc failed, chan_id does not match with its
position in device->channels list.

And above "continue" looks buggy anyway.  Keeping incomplete channels
in device->channels list looks very dangerous..."

Also, fix up leakage of idr_ref in the idr_pre_get() and channel init
fail cases.

Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agointel-iommu: Fix address wrap on 32-bit kernel.
Zhao, Yu [Fri, 13 Feb 2009 09:55:49 +0000 (17:55 +0800)]
intel-iommu: Fix address wrap on 32-bit kernel.

The problem is in dma_pte_clear_range and dma_pte_free_pagetable. When
intel_unmap_single and intel_unmap_sg call them, the end address may be
zero if the 'start_addr + size' rounds up. So no PTE gets cleared. The
uncleared PTE fires the BUG_ON when it's used again to create new mappings.

After I modified dma_pte_clear_range a bit, the BUG_ON is gone.

Tested both 32 and 32 PAE modes on Intel X58 and Q35 platforms.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agointel-iommu: Enable DMAR on 32-bit kernel.
David Woodhouse [Wed, 11 Feb 2009 17:23:43 +0000 (17:23 +0000)]
intel-iommu: Enable DMAR on 32-bit kernel.

If we fix a few highmem-related thinkos and a couple of printk format
warnings, the Intel IOMMU driver works fine in a 32-bit kernel.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agopowerpc/PCI: include pci.h in powerpc MSI implementation
Jesse Barnes [Wed, 25 Mar 2009 15:54:29 +0000 (08:54 -0700)]
powerpc/PCI: include pci.h in powerpc MSI implementation

This file uses PCI MSI defines and so needs pci.h.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agointel-iommu: fix PCI device detach from virtual machine
Han, Weidong [Thu, 26 Feb 2009 09:31:12 +0000 (17:31 +0800)]
intel-iommu: fix PCI device detach from virtual machine

When assign a device behind conventional PCI bridge or PCIe to
PCI/PCI-x bridge to a domain, it must assign its bridge and may
also need to assign secondary interface to the same domain.

Dependent assignment is already there, but dependent
deassignment is missed when detach device from virtual machine.
This results in conventional PCI device assignment failure after
it has been assigned once. This patch addes dependent
deassignment, and fixes the issue.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoBtrfs: make sure btrfs_update_delayed_ref doesn't increase ref_mod
Chris Mason [Wed, 25 Mar 2009 13:55:11 +0000 (09:55 -0400)]
Btrfs: make sure btrfs_update_delayed_ref doesn't increase ref_mod

btrfs_update_delayed_ref is optimized to add and remove different
references in one pass through the delayed ref tree.  It is a zero
sum on the total number of refs on a given extent.

But, the code was recording an extra ref in the head node.  This
never made it down to the disk but was used when deciding if it was
safe to free the extent while dropping snapshots.

The fix used here is to make sure the ref_mod count is unchanged
on the head ref when btrfs_update_delayed_ref is called.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
16 years agox86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
Wang Chen [Wed, 25 Mar 2009 13:07:11 +0000 (14:07 +0100)]
x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe

Tetsuo Handa reported this link bug:

 |  arch/x86/mm/built-in.o(.init.text+0x1831): In function `early_ioremap_init':
 |  : undefined reference to `__this_fixmap_does_not_exist'
 |  make: *** [.tmp_vmlinux1] Error 1

Commit:8827247ffcc9e880cbe4705655065cf011265157 used a variable (which
would be optimized to constant) as fix_to_virt()'s parameter.
It's depended on gcc's optimization and fails on old gcc. (Tetsuo used gcc 3.3)

We can use __fix_to_vir() instead, because we know it's safe and
don't need link time error reporting.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: sfr@canb.auug.org.au
LKML-Reference: <49C9FFEA.7060908@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Add comments to find_busiest_group() function
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:27 +0000 (14:44 +0530)]
sched: Add comments to find_busiest_group() function

Impact: cleanup

Add /** style comments around find_busiest_group(). Also add a few
explanatory comments.

This concludes the find_busiest_group() cleanup. The function is
now down to 72 lines from the original 313 lines.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091427.13992.18933.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMAINTAINERS: Add myself as Faraday ARM core variant maintainer
Paulius Zaleckas [Wed, 25 Mar 2009 11:10:20 +0000 (13:10 +0200)]
MAINTAINERS: Add myself as Faraday ARM core variant maintainer

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
16 years agoARM: Add support for FA526 v2
Paulius Zaleckas [Wed, 25 Mar 2009 11:10:01 +0000 (13:10 +0200)]
ARM: Add support for FA526 v2

Adds support for Faraday FA526 core. This core is used at least by:
Cortina Systems Gemini and Centroid family
Cavium Networks ECONA family
Grain Media GM8120
Pixelplus ImageARM
Prolific PL-1029
Faraday IP evaluation boards

v2:
- move TLB_BTB to separate patch
- update copyrights

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
16 years ago[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
Russell King [Wed, 25 Mar 2009 10:21:35 +0000 (10:21 +0000)]
[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] collie: fix two minor formatting nits
Russell King [Wed, 25 Mar 2009 10:15:00 +0000 (10:15 +0000)]
[ARM] collie: fix two minor formatting nits

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5431/1: scoop: completely drop old-style SCOOP GPIO accessors
Dmitry Baryshkov [Wed, 25 Mar 2009 09:16:37 +0000 (10:16 +0100)]
[ARM] 5431/1: scoop: completely drop old-style SCOOP GPIO accessors

Now, as all places that use Scoop GPIO have been converted to use
GPIO API, drop old-style accessors completely.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5430/1: collie_pm: use new GPIO API to control charger
Dmitry Baryshkov [Wed, 25 Mar 2009 09:15:28 +0000 (10:15 +0100)]
[ARM] 5430/1: collie_pm: use new GPIO API to control charger

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5429/1: collie: start scoop converton to new api
Dmitry Baryshkov [Wed, 25 Mar 2009 09:14:25 +0000 (10:14 +0100)]
[ARM] 5429/1: collie: start scoop converton to new api

Start converting scoop gpio access to new API instead of old
deprecated one.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoMerge git://git.marvell.com/orion into devel
Russell King [Wed, 25 Mar 2009 10:00:08 +0000 (10:00 +0000)]
Merge git://git.marvell.com/orion into devel

16 years agosched: Refactor the power savings balance code
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:22 +0000 (14:44 +0530)]
sched: Refactor the power savings balance code

Impact: cleanup

Create seperate helper functions to initialize the
power-savings-balance related variables, to update them and
to check if we have a scope for performing power-savings balance.

Add no-op inline functions for the !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT)
case.

This will eliminate all the #ifdef jungle in find_busiest_group() and the
other helper functions.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091422.13992.73616.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Optimize the !power_savings_balance during fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:17 +0000 (14:44 +0530)]
sched: Optimize the !power_savings_balance during fbg()

Impact: cleanup, micro-optimization

We don't need to perform power_savings balance if either the
cpu is NOT_IDLE or if the sched_domain doesn't contain the
SD_POWERSAVINGS_BALANCE flag set.

Currently, we check for these conditions multiple number of
times, even though these variables don't change over the scope
of find_busiest_group().

Check once, and store the value in the already exiting
"power_savings_balance" variable.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091417.13992.2657.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Create a helper function to calculate imbalance
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:12 +0000 (14:44 +0530)]
sched: Create a helper function to calculate imbalance

Move all the imbalance calculation out of find_busiest_group()
through this helper function.

With this change, the structure of find_busiest_group() will be
as follows:

- update_sched_domain_statistics.

- check if imbalance exits.

- update imbalance and return busiest.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091411.13992.43293.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Create helper to calculate small_imbalance in fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:06 +0000 (14:44 +0530)]
sched: Create helper to calculate small_imbalance in fbg()

Impact: cleanup

We have two places in find_busiest_group() where we need to calculate
the minor imbalance before returning the busiest group. Encapsulate
this functionality into a seperate helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091406.13992.54316.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Create a helper function to calculate sched_domain stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:14:01 +0000 (14:44 +0530)]
sched: Create a helper function to calculate sched_domain stats for fbg()

Impact: cleanup

Create a helper function named update_sd_lb_stats() to update the
various sched_domain related statistics in find_busiest_group().

With this we would have moved all the statistics computation out of
find_busiest_group().

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091401.13992.88737.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Define structure to store the sched_domain statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:56 +0000 (14:43 +0530)]
sched: Define structure to store the sched_domain statistics for fbg()

Impact: cleanup

Currently we use a lot of local variables in find_busiest_group()
to capture the various statistics related to the sched_domain.
Group them together into a single data structure.

This will help us to offload the job of updating the sched_domain
statistics to a helper function.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091356.13992.25970.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Create a helper function to calculate sched_group stats for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:51 +0000 (14:43 +0530)]
sched: Create a helper function to calculate sched_group stats for fbg()

Impact: cleanup

Create a helper function named update_sg_lb_stats() which
can be invoked to calculate the individual group's statistics
in find_busiest_group().

This reduces the lenght of find_busiest_group() considerably.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Aked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091351.13992.43461.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Define structure to store the sched_group statistics for fbg()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:46 +0000 (14:43 +0530)]
sched: Define structure to store the sched_group statistics for fbg()

Impact: cleanup

Currently a whole bunch of variables are used to store the
various statistics pertaining to the groups we iterate over
in find_busiest_group().

Group them together in a single data structure and add
appropriate comments.

This will be useful later on when we create helper functions
to calculate the sched_group statistics.

Credit: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
LKML-Reference: <20090325091345.13992.20099.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Fix indentations in find_busiest_group() using gotos
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:40 +0000 (14:43 +0530)]
sched: Fix indentations in find_busiest_group() using gotos

Impact: cleanup

Some indentations in find_busiest_group() can minimized by using
early exits with the help of gotos. This improves readability in
a couple of cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091340.13992.45062.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: Simple helper functions for find_busiest_group()
Gautham R Shenoy [Wed, 25 Mar 2009 09:13:35 +0000 (14:43 +0530)]
sched: Simple helper functions for find_busiest_group()

Impact: cleanup

Currently the load idx calculation code is in find_busiest_group().
Move that to a static inline helper function.

Similary, to find the first cpu of a sched_group we use
cpumask_first(sched_group_cpus(group))

Use a helper to that. It improves readability in some cases.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Balbir Singh" <balbir@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
LKML-Reference: <20090325091335.13992.55424.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core
Ingo Molnar [Wed, 25 Mar 2009 09:26:51 +0000 (10:26 +0100)]
Merge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core

16 years ago[WATCHDOG] i6300esb.c: start locking
Wim Van Sebroeck [Mon, 23 Mar 2009 13:50:38 +0000 (13:50 +0000)]
[WATCHDOG] i6300esb.c: start locking

Change the start function in preparation of the generic watchdog code.
Also make sure that locking of the start function is OK.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] i6300esb.c: convert to platform device driver
Wim Van Sebroeck [Thu, 19 Mar 2009 19:02:44 +0000 (19:02 +0000)]
[WATCHDOG] i6300esb.c: convert to platform device driver

Convert the Intel 6300ESB watchdog timer to a platform device driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501
Alan Cox [Sun, 22 Mar 2009 10:46:42 +0000 (10:46 +0000)]
[WATCHDOG] wdt.c: remove #ifdef CONFIG_WDT_501

Change the wdt.c watchdog driver so that the code is the same for
both the WDT500 as the WDT501-P card. The selection of the card
is now being done via the module parameter: 'type' instead of the
config option CONFIG_WDT_501.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] Fix io.h & uaccess.h includes.
Wim Van Sebroeck [Wed, 18 Mar 2009 09:09:26 +0000 (09:09 +0000)]
[WATCHDOG] Fix io.h & uaccess.h includes.

Fix following includes:
* #include <asm/io.h> should be #include <linux/io.h>
* #include <asm/uaccess.h> should be #include <linux/uaccess.h>

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>