]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
13 years agogenirq: Use handle_irq_event() in the spurious poll code
Thomas Gleixner [Mon, 7 Feb 2011 00:29:15 +0000 (01:29 +0100)]
genirq: Use handle_irq_event() in the spurious poll code

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use handle_perpcu_event() in handle_percpu_irq()
Thomas Gleixner [Mon, 7 Feb 2011 00:25:41 +0000 (01:25 +0100)]
genirq: Use handle_perpcu_event() in handle_percpu_irq()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use handle_irq_event() in handle_edge_irq()
Thomas Gleixner [Mon, 7 Feb 2011 00:24:07 +0000 (01:24 +0100)]
genirq: Use handle_irq_event() in handle_edge_irq()

It's safe to drop the IRQ_INPROGRESS flag between action chain walks
as we are protected by desc->lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use handle_irq_event() in handle_fasteoi_irq()
Thomas Gleixner [Mon, 7 Feb 2011 00:23:07 +0000 (01:23 +0100)]
genirq: Use handle_irq_event() in handle_fasteoi_irq()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use handle_irq_event() in handle_level_irq()
Thomas Gleixner [Mon, 7 Feb 2011 00:22:17 +0000 (01:22 +0100)]
genirq: Use handle_irq_event() in handle_level_irq()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use handle_irq_event() in handle_simple_irq()
Thomas Gleixner [Mon, 7 Feb 2011 00:21:02 +0000 (01:21 +0100)]
genirq: Use handle_irq_event() in handle_simple_irq()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Implement handle_irq_event()
Thomas Gleixner [Mon, 7 Feb 2011 00:08:49 +0000 (01:08 +0100)]
genirq: Implement handle_irq_event()

Core code replacement for the ugly camel case. It contains all the
code which is shared in all handlers.

     clear status flags
     set INPROGRESS flag
     unlock
     call action chain
     note_interrupt
     lock
     clr INPROGRESS flag

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Do not fiddle with IRQ_MASKED in handle_edge_irq()
Thomas Gleixner [Wed, 2 Feb 2011 21:41:17 +0000 (21:41 +0000)]
genirq: Do not fiddle with IRQ_MASKED in handle_edge_irq()

IRQ_MASKED is set in mask_ack_irq() anyway. Remove it from
handle_edge_irq() to allow simpler ab^HHreuse of that function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110202212551.918484270@linutronix.de>

13 years agogenirq: Consolidate IRQ_DISABLED
Thomas Gleixner [Fri, 4 Feb 2011 09:17:52 +0000 (10:17 +0100)]
genirq: Consolidate IRQ_DISABLED

Handle IRQ_DISABLED consistent.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Remove default magic
Thomas Gleixner [Thu, 3 Feb 2011 12:23:54 +0000 (13:23 +0100)]
genirq: Remove default magic

Now that everything uses the wrappers, we can remove the default
functions. None of those functions is performance critical.

That makes the IRQ_MASKED flag tracking fully consistent.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Consolidate disable/enable
Thomas Gleixner [Thu, 3 Feb 2011 11:27:44 +0000 (12:27 +0100)]
genirq: Consolidate disable/enable

Create irq_disable/enable and use them to keep the flags consistent.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Consolidate startup/shutdown of interrupts
Thomas Gleixner [Wed, 2 Feb 2011 21:41:14 +0000 (21:41 +0000)]
genirq: Consolidate startup/shutdown of interrupts

Aside of duplicated code some of the startup/shutdown sites do not
handle the MASKED/DISABLED flags and the depth field at all. Move that
to a helper function and take care of it there.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110202212551.787481468@linutronix.de>

13 years agogenirq: Remove bogus conditional
Thomas Gleixner [Wed, 2 Feb 2011 21:41:12 +0000 (21:41 +0000)]
genirq: Remove bogus conditional

The if (chip->irq_shutdown) check will always evaluate to true, as we
fill in chip->irq_shutdown with default_shutdown in
irq_chip_set_defaults() if the chip does not provide its own function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110202212551.667607458@linutronix.de>

13 years agogenirq: Move irq thread flags to core
Thomas Gleixner [Mon, 7 Feb 2011 00:55:43 +0000 (01:55 +0100)]
genirq: Move irq thread flags to core

Soleley used in core code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Mark polled irqs and defer the real handler
Thomas Gleixner [Mon, 7 Feb 2011 09:34:30 +0000 (10:34 +0100)]
genirq: Mark polled irqs and defer the real handler

With the chip.end() function gone we might run into a situation where
a poll call runs and the real interrupt comes in, sees IRQ_INPROGRESS
and disables the line. That might be a perfect working one, which will
then be masked forever.

So mark them polled while the poll runs. When the real handler sees
IRQ_INPROGRESS it checks the poll flag and waits for the polling to
complete. Add the necessary amount of sanity checks to it to avoid
deadlocks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: spurious: Run only one poller at a time
Thomas Gleixner [Mon, 7 Feb 2011 13:31:37 +0000 (14:31 +0100)]
genirq: spurious: Run only one poller at a time

No point in running concurrent pollers which confuse each other by
setting PENDING.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Do not poll disabled, percpu and timer interrupts
Thomas Gleixner [Mon, 7 Feb 2011 08:52:27 +0000 (09:52 +0100)]
genirq: Do not poll disabled, percpu and timer interrupts

There is no point in polling disabled lines.

percpu does not make sense at all because we only poll on the cpu
we're currently running on. Also polling per_cpu interrupts is racy as
hell. The handler runs without locking so we might get a huge
surprise.

If the timer interrupt needs polling, then we wont get there anyway.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Fixup poll handling
Thomas Gleixner [Mon, 7 Feb 2011 08:10:39 +0000 (09:10 +0100)]
genirq: Fixup poll handling

try_one_irq() contains redundant code and lots of useless checks for
shared interrupts. Check for shared before setting IRQ_INPROGRESS and
then call handle_IRQ_event() while pending. Shorter version with the
same functionality.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Warn when handler enables interrupts
Thomas Gleixner [Wed, 2 Feb 2011 22:58:19 +0000 (23:58 +0100)]
genirq: Warn when handler enables interrupts

We run all handlers with interrupts disabled and expect them not to
enable them. Warn when we catch one who does.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Plug race in report_bad_irq()
Thomas Gleixner [Mon, 7 Feb 2011 08:05:05 +0000 (09:05 +0100)]
genirq: Plug race in report_bad_irq()

We cannot walk the action chain unlocked. Even if IRQ_INPROGRESS is
set an action can be removed and we follow a null pointer. It's safe
to take the lock there, because the code which removes the action will
call synchronize_irq() which waits unlocked for IRQ_INPROGRESS going
away.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Remove redundant thread affinity setting
Thomas Gleixner [Mon, 14 Feb 2011 10:25:02 +0000 (11:25 +0100)]
genirq: Remove redundant thread affinity setting

Thread affinity is already set by setup_affinity().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Do not copy affinity before set
Thomas Gleixner [Mon, 7 Feb 2011 15:02:20 +0000 (16:02 +0100)]
genirq: Do not copy affinity before set

While rumaging through arch code I found that there are a few
workarounds which deal with the fact that the initial affinity setting
from request_irq() copies the mask into irq_data->affinity before the
chip code is called. In the normal path we unconditionally copy the
mask when the chip code returns 0.

Copy after the code is called and add a return code
IRQ_SET_MASK_OK_NOCOPY for the chip functions, which prevents the
copy. That way we see the real mask when the chip function decided to
truncate it further as some arches do. IRQ_SET_MASK_OK is 0, which is
the current behaviour.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Always apply cpu online mask
Thomas Gleixner [Mon, 7 Feb 2011 16:05:08 +0000 (17:05 +0100)]
genirq: Always apply cpu online mask

If the affinity had been set by the user, then a later request_irq()
will honour that setting. But online cpus can have changed. So apply
the online mask and for this case as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Rremove redundant check
Thomas Gleixner [Mon, 7 Feb 2011 16:30:50 +0000 (17:30 +0100)]
genirq: Rremove redundant check

IRQ_NO_BALANCING is already checked in irq_can_set_affinity() above,
no need to check it again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Simplify affinity related code
Thomas Gleixner [Mon, 7 Feb 2011 15:46:58 +0000 (16:46 +0100)]
genirq: Simplify affinity related code

There is lot of #ifdef CONFIG_GENERIC_PENDING_IRQ along with
duplicated code in the irq core. Move the #ifdeffery into one place
and cleanup the code so it's readable. No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Namespace cleanup
Thomas Gleixner [Thu, 10 Feb 2011 10:36:33 +0000 (11:36 +0100)]
genirq: Namespace cleanup

The irq namespace has become quite convoluted. My bad.  Clean it up
and deprecate the old functions. All new functions follow the scheme:

irq number based:
    irq_set/get/xxx/_xxx(unsigned int irq, ...)

irq_data based:
 irq_data_set/get/xxx/_xxx(struct irq_data *d, ....)

irq_desc based:
 irq_desc_get_xxx(struct irq_desc *desc)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Add missing buslock to set_irq_type(), set_irq_wake()
Thomas Gleixner [Sat, 12 Feb 2011 11:10:49 +0000 (12:10 +0100)]
genirq: Add missing buslock to set_irq_type(), set_irq_wake()

chips behind a slow bus cannot update the chip under desc->lock, but
we miss the chip_buslock/chip_bus_sync_unlock() calls around the set
type and set wake functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Make nr_irqs runtime expandable
Thomas Gleixner [Wed, 16 Feb 2011 16:12:57 +0000 (17:12 +0100)]
genirq: Make nr_irqs runtime expandable

We face more and more the requirement to expand nr_irqs at
runtime. The reason are irq expanders which can not be detected in the
early boot stage. So we speculate nr_irqs to have enough room. Further
Xen needs extra irq numbers and we really want to avoid adding more
"detection" code into the early boot. There is no real good reason why
we need to limit nr_irqs at early boot.

Allow the allocation code to expand nr_irqs. We have already 8k extra
number space in the allocation bitmap, so lets use it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoMerge branch 'irq/urgent' into irq/core
Thomas Gleixner [Sat, 19 Feb 2011 11:56:36 +0000 (12:56 +0100)]
Merge branch 'irq/urgent' into irq/core

Reason: Further patches are conflicting with mainline fixes

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now
Thomas Gleixner [Fri, 18 Feb 2011 22:27:23 +0000 (23:27 +0100)]
genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now

With CONFIG_SHIRQ_DEBUG=y we call a newly installed interrupt handler
in request_threaded_irq().

The original implementation (commit a304e1b8) called the handler
_BEFORE_ it was installed, but that caused problems with handlers
calling disable_irq_nosync(). See commit 377bf1e4.

It's braindead in the first place to call disable_irq_nosync in shared
handlers, but ....

Moving this call after we installed the handler looks innocent, but it
is very subtle broken on SMP.

Interrupt handlers rely on the fact, that the irq core prevents
reentrancy.

Now this debug call violates that promise because we run the handler
w/o the IRQ_INPROGRESS protection - which we cannot apply here because
that would result in a possibly forever masked interrupt line.

A concurrent real hardware interrupt on a different CPU results in
handler reentrancy and can lead to complete wreckage, which was
unfortunately observed in reality and took a fricking long time to
debug.

Leave the code here for now. We want this debug feature, but that's
not easy to fix. We really should get rid of those
disable_irq_nosync() abusers and remove that function completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: stable@kernel.org # .28 -> .37
13 years agogenirq: Prevent access beyond allocated_irqs bitmap
Thomas Gleixner [Thu, 17 Feb 2011 16:45:15 +0000 (17:45 +0100)]
genirq: Prevent access beyond allocated_irqs bitmap

Lars-Peter Clausen pointed out:

   I stumbled upon this while looking through the existing archs using
   SPARSE_IRQ.  Even with SPARSE_IRQ the NR_IRQS is still the upper
   limit for the number of IRQs.

   Both PXA and MMP set NR_IRQS to IRQ_BOARD_START, with
   IRQ_BOARD_START being the number of IRQs used by the core.

   In various machine files the nr_irqs field of the ARM machine
   defintion struct is then set to "IRQ_BOARD_START + NR_BOARD_IRQS".

   As a result "nr_irqs" will greater then NR_IRQS which then again
   causes the "allocated_irqs" bitmap in the core irq code to be
   accessed beyond its size overwriting unrelated data.

The core code really misses a sanity check there.

This went unnoticed so far as by chance the compiler/linker places
data behind that bitmap which gets initialized later on those affected
platforms.

So the obvious fix would be to add a sanity check in early_irq_init()
and break all affected platforms. Though that check wants to be
backported to stable as well, which will require to fix all known
problematic platforms and probably some more yet not known ones as
well. Lots of churn.

A way simpler solution is to allocate a slightly larger bitmap and
avoid the whole churn w/o breaking anything. Add a few warnings when
an arch returns utter crap.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org # .37
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
13 years agoMerge branch 'rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
Linus Torvalds [Fri, 18 Feb 2011 22:20:46 +0000 (14:20 -0800)]
Merge branch 'rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  RTC: Re-enable UIE timer/polling emulation
  RTC: Revert UIE emulation removal
  RTC: Release mutex in error path of rtc_alarm_irq_enable

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 18 Feb 2011 22:15:05 +0000 (14:15 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
  net: deinit automatic LIST_HEAD
  net: dont leave active on stack LIST_HEAD
  net: provide default_advmss() methods to blackhole dst_ops
  tg3: Restrict phy ioctl access
  drivers/net: Call netif_carrier_off at the end of the probe
  ixgbe: work around for DDP last buffer size
  ixgbe: fix panic due to uninitialised pointer
  e1000e: flush all writebacks before unload
  e1000e: check down flag in tasks
  isdn: hisax: Use l2headersize() instead of dup (and buggy) func.
  arp_notify: unconditionally send gratuitous ARP for NETDEV_NOTIFY_PEERS.
  cxgb4vf: Use defined Mailbox Timeout
  cxgb4vf: Quiesce Virtual Interfaces on shutdown ...
  cxgb4vf: Behave properly when CONFIG_DEBUG_FS isn't defined ...
  cxgb4vf: Check driver parameters in the right place ...
  pch_gbe: Fix the MAC Address load issue.
  iwlwifi: Delete iwl3945_good_plcp_health.
  net/can/softing: make CAN_SOFTING_CS depend on CAN_SOFTING
  netfilter: nf_iterate: fix incorrect RCU usage
  pch_gbe: Fix the issue that the receiving data is not normal.
  ...

13 years agoMerge branch 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6
Linus Torvalds [Fri, 18 Feb 2011 20:44:41 +0000 (12:44 -0800)]
Merge branch 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6

* 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6:
  xen: suspend and resume system devices when running PVHVM

13 years agoMerge branch 'fixes-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Fri, 18 Feb 2011 20:36:06 +0000 (12:36 -0800)]
Merge branch 'fixes-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

* 'fixes-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long
  workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'
  workqueue: wake up a worker when a rescuer is leaving a gcwq

13 years agonet: deinit automatic LIST_HEAD
Eric Dumazet [Thu, 17 Feb 2011 22:59:19 +0000 (22:59 +0000)]
net: deinit automatic LIST_HEAD

commit 9b5e383c11b08784 (net: Introduce
unregister_netdevice_many()) left an active LIST_HEAD() in
rollback_registered(), with possible memory corruption.

Even if device is freed without touching its unreg_list (and therefore
touching the previous memory location holding LISTE_HEAD(single), better
close the bug for good, since its really subtle.

(Same fix for default_device_exit_batch() for completeness)

Reported-by: Michal Hocko <mhocko@suse.cz>
Tested-by: Michal Hocko <mhocko@suse.cz>
Reported-by: Eric W. Biderman <ebiderman@xmission.com>
Tested-by: Eric W. Biderman <ebiderman@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Octavian Purdila <opurdila@ixiacom.com>
CC: stable <stable@kernel.org> [.33+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dont leave active on stack LIST_HEAD
Linus Torvalds [Thu, 17 Feb 2011 22:54:38 +0000 (22:54 +0000)]
net: dont leave active on stack LIST_HEAD

Eric W. Biderman and Michal Hocko reported various memory corruptions
that we suspected to be related to a LIST head located on stack, that
was manipulated after thread left function frame (and eventually exited,
so its stack was freed and reused).

Eric Dumazet suggested the problem was probably coming from commit
443457242beb (net: factorize
sync-rcu call in unregister_netdevice_many)

This patch fixes __dev_close() and dev_close() to properly deinit their
respective LIST_HEAD(single) before exiting.

References: https://lkml.org/lkml/2011/2/16/304
References: https://lkml.org/lkml/2011/2/14/223

Reported-by: Michal Hocko <mhocko@suse.cz>
Tested-by: Michal Hocko <mhocko@suse.cz>
Reported-by: Eric W. Biderman <ebiderman@xmission.com>
Tested-by: Eric W. Biderman <ebiderman@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: provide default_advmss() methods to blackhole dst_ops
Eric Dumazet [Fri, 18 Feb 2011 19:39:01 +0000 (11:39 -0800)]
net: provide default_advmss() methods to blackhole dst_ops

Commit 0dbaee3b37e118a (net: Abstract default ADVMSS behind an
accessor.) introduced a possible crash in tcp_connect_init(), when
dst->default_advmss() is called from dst_metric_advmss()

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoExpand CONFIG_DEBUG_LIST to several other list operations
Linus Torvalds [Fri, 18 Feb 2011 19:32:28 +0000 (11:32 -0800)]
Expand CONFIG_DEBUG_LIST to several other list operations

When list debugging is enabled, we aim to readably show list corruption
errors, and the basic list_add/list_del operations end up having extra
debugging code in them to do some basic validation of the list entries.

However, "list_del_init()" and "list_move[_tail]()" ended up avoiding
the debug code due to how they were written. This fixes that.

So the _next_ time we have list_move() problems with stale list entries,
we'll hopefully have an easier time finding them..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Fri, 18 Feb 2011 01:52:36 +0000 (17:52 -0800)]
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Return error code when alloc_image_page() fails

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 18 Feb 2011 01:52:17 +0000 (17:52 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: add missing frac fb div flag for dce4+
  drm/radeon/kms: do not reject X16 and Y16X16 floating-point formats on r300
  drm/nouveau: fix suspend/resume on GPUs that don't have PM support
  drm/nouveau: flips/flipd need to always set 'evict' for move_accel_cleanup()
  drm/nv40: fix tiling-related setup for a number of chipsets
  drm/nouveau: fix non-EDIDful native mode selection
  drm/nouveau: Fix detection of DDC-based LVDS on DCB15 boards.
  drm/nv04-nv40: Fix NULL dereference when we fail to find an LVDS native mode.
  drm/nv10: Fix crash when allocating a BO larger than half the available VRAM.

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 18 Feb 2011 01:51:52 +0000 (17:51 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/qib: Prevent double completions after a timeout or RNR error
  IB/qib: Fix double add_timer()
  RDMA/nes: Don't generate async events for unregistered devices

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 18 Feb 2011 01:51:27 +0000 (17:51 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix NMI startup bug which also breaks perf.
  sparc: fix size argument to find_next_zero_bit()
  sparc: use bitmap_set()
  sparc32: unaligned memory access (MNA) trap handler bug

13 years agofs/partitions: Validate map_count in Mac partition tables
Timo Warns [Thu, 17 Feb 2011 21:27:40 +0000 (22:27 +0100)]
fs/partitions: Validate map_count in Mac partition tables

Validate number of blocks in map and remove redundant variable.

Signed-off-by: Timo Warns <warns@pre-sense.de>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoRTC: Re-enable UIE timer/polling emulation
John Stultz [Sat, 12 Feb 2011 02:15:23 +0000 (18:15 -0800)]
RTC: Re-enable UIE timer/polling emulation

This patch re-enables UIE timer/polling emulation for rtc devices
that do not support alarm irqs.

CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoRTC: Revert UIE emulation removal
John Stultz [Sat, 12 Feb 2011 01:45:40 +0000 (17:45 -0800)]
RTC: Revert UIE emulation removal

Uwe pointed out that my alarm based UIE emulation is not sufficient
to replace the older timer/polling based UIE emulation on devices
where there is no alarm irq. This causes rtc devices without alarms
to return -EINVAL to UIE ioctls. The fix is to re-instate the old
timer/polling method for devices without alarm irqs.

This patch reverts the following commits:
042620a018afcfba1d678062b62e46 - Remove UIE emulation
1daeddd5962acad1bea55e524fc0fa - Cleanup removed UIE emulation declaration
b5cc8ca1c9c3a37eaddf709b2fd3e1 - Remove Kconfig symbol for UIE emulation

The emulation mode will still need to be wired-in with a following
patch before it will work.

CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoRTC: Release mutex in error path of rtc_alarm_irq_enable
Uwe Kleine-König [Mon, 14 Feb 2011 10:33:17 +0000 (11:33 +0100)]
RTC: Release mutex in error path of rtc_alarm_irq_enable

On hardware that doesn't support alarm interrupts, rtc_alarm_irq_enable
could return without releasing the ops_lock mutex.

This was introduced in
aa0be0f (RTC: Propagate error handling via rtc_timer_enqueue properly)

This patch corrects the issue by only returning once the mutex is
released.

[john.stultz: Reworded the commit log]

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agotg3: Restrict phy ioctl access
Matt Carlson [Tue, 15 Feb 2011 12:51:10 +0000 (12:51 +0000)]
tg3: Restrict phy ioctl access

If management firmware is present and the device is down, the firmware
will assume control of the phy.  If a phy access were allowed from the
host, it will collide with firmware phy accesses, resulting in
unpredictable behavior.  This patch fixes the problem by disallowing phy
accesses during the problematic condition.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: Call netif_carrier_off at the end of the probe
Ivan Vecera [Tue, 15 Feb 2011 02:08:39 +0000 (02:08 +0000)]
drivers/net: Call netif_carrier_off at the end of the probe

Without calling of netif_carrier_off at the end of the probe the operstate
is unknown when the device is initially opened. By default the carrier is
on so when the device is opened and netif_carrier_on is called the link
watch event is not fired and operstate remains zero (unknown).

This patch fixes this behavior in forcedeth and r8169.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branches 'nes' and 'qib' into for-next
Roland Dreier [Thu, 17 Feb 2011 22:04:59 +0000 (14:04 -0800)]
Merge branches 'nes' and 'qib' into for-next

13 years agoIB/qib: Prevent double completions after a timeout or RNR error
Mike Marciniszyn [Wed, 16 Feb 2011 15:48:25 +0000 (15:48 +0000)]
IB/qib: Prevent double completions after a timeout or RNR error

There is a double completion associated with error handling for RC QPs.

The sequence is:

 - The do_rc_ack() routine fields an RNR nack and there are 0
   rnr_retries configured on the QP.
 - qib_error_qp() stops the pending timer
 - qib_rc_send_complete() is called from sdma_complete()
 - qib_rc_send_complete() starts the timer because the msb of the psn
   just completed says an ack is needed.
 - a bunch of flushes occur as ipoib posts WQEs to an error'ed QP
 - rc_timeout() calls qib_restart_rc()
 - qib_restart_rc() calls qib_send_complete() with a
   IB_WC_RETRY_EXC_ERR on a wqe that has already been completed in the
   past

The fix avoids starting the timer since another packet will never
arrive.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
13 years agoxen: suspend and resume system devices when running PVHVM
Ian Campbell [Thu, 17 Feb 2011 10:31:20 +0000 (10:31 +0000)]
xen: suspend and resume system devices when running PVHVM

Otherwise we fail to properly suspend/resume all of the emulated devices.

Something between 2.6.38-rc2 and rc3 appears to have exposed this
issue, but it's always been wrong not to do this.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
13 years agoixgbe: work around for DDP last buffer size
Amir Hanania [Tue, 15 Feb 2011 09:11:31 +0000 (09:11 +0000)]
ixgbe: work around for DDP last buffer size

A HW limitation was recently discovered where the last buffer in a DDP offload
cannot be a full buffer size in length. Fix the issue with a work around by
adding another buffer with size = 1.

Signed-off-by: Amir Hanania <amir.hanania@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix panic due to uninitialised pointer
Andy Gospodarek [Thu, 17 Feb 2011 09:13:13 +0000 (01:13 -0800)]
ixgbe: fix panic due to uninitialised pointer

Systems containing an 82599EB and running a backported driver from
upstream were panicing on boot.  It turns out hw->mac.ops.setup_sfp is
only set for 82599, so one should check to be sure that pointer is set
before continuing in ixgbe_sfp_config_module_task.  I verified by
inspection that the upstream driver has the same issue and also added a
check before the call in ixgbe_sfp_link_config.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: flush all writebacks before unload
Jesse Brandeburg [Wed, 2 Feb 2011 10:19:50 +0000 (10:19 +0000)]
e1000e: flush all writebacks before unload

The driver was not flushing all writebacks before unloading, possibly
causing memory to be written by the hardware after the driver had
reinitialized the rings.

This adds missing functionality to flush any pending writebacks and is
called in all spots where descriptors should be completed before the driver
begins processing.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: check down flag in tasks
Jesse Brandeburg [Wed, 2 Feb 2011 10:19:45 +0000 (10:19 +0000)]
e1000e: check down flag in tasks

This change is part of a fix to avoid any tasks running while the driver is
exiting and deinitializing resources.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMerge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Thu, 17 Feb 2011 05:53:41 +0000 (21:53 -0800)]
Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux:
  nfsd: correctly handle return value from nfsd_map_name_to_*

13 years agoMerge remote branch 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next into...
Dave Airlie [Thu, 17 Feb 2011 03:56:35 +0000 (13:56 +1000)]
Merge remote branch 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next into drm-fixes

* 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next:
  drm/nouveau: fix suspend/resume on GPUs that don't have PM support
  drm/nouveau: flips/flipd need to always set 'evict' for move_accel_cleanup()
  drm/nv40: fix tiling-related setup for a number of chipsets
  drm/nouveau: fix non-EDIDful native mode selection
  drm/nouveau: Fix detection of DDC-based LVDS on DCB15 boards.
  drm/nv04-nv40: Fix NULL dereference when we fail to find an LVDS native mode.
  drm/nv10: Fix crash when allocating a BO larger than half the available VRAM.

13 years agodrm/radeon/kms: add missing frac fb div flag for dce4+
Alex Deucher [Thu, 17 Feb 2011 02:17:04 +0000 (21:17 -0500)]
drm/radeon/kms: add missing frac fb div flag for dce4+

The fixed ref/post dividers are set by the AdjustPll table
rather than the ss info table on dce4+.  Make sure we enable
the fractional feedback dividers when using a fixed post
or ref divider on them as well.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=29272

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: do not reject X16 and Y16X16 floating-point formats on r300
Marek Olšák [Wed, 16 Feb 2011 01:26:08 +0000 (02:26 +0100)]
drm/radeon/kms: do not reject X16 and Y16X16 floating-point formats on r300

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/nouveau: fix suspend/resume on GPUs that don't have PM support
Ben Skeggs [Thu, 17 Feb 2011 01:11:28 +0000 (11:11 +1000)]
drm/nouveau: fix suspend/resume on GPUs that don't have PM support

This has been broken since 2.6.37, and fixes resume on a couple of fermi
boards I have access to.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoMerge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Thu, 17 Feb 2011 00:48:36 +0000 (16:48 -0800)]
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6

* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
  spi/pxa2xx pci: fix the release - remove race

13 years agoblock: revert block_dev read-only check
Chuck Ebbert [Wed, 16 Feb 2011 23:11:53 +0000 (18:11 -0500)]
block: revert block_dev read-only check

This reverts commit 75f1dc0d076d ("block: check bdev_read_only() from
blkdev_get()").  That commit added stricter checking to make sure
devices that were being used read-only were actually opened in that
mode.

It turns out that the change breaks a bunch of kernel code that opens
block devices.  Affected systems include dm, md, and the loop device.
Because strict checking for read-only opens of block devices was not
done before this, the code that opens the devices was opening them
read-write even if they were being used read-only.  Auditing all that
code will take time, and new userspace packages for dm, mdadm, etc.
will also be required.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm/nouveau: flips/flipd need to always set 'evict' for move_accel_cleanup()
Ben Skeggs [Mon, 14 Feb 2011 03:51:28 +0000 (13:51 +1000)]
drm/nouveau: flips/flipd need to always set 'evict' for move_accel_cleanup()

We free the temporary binding before leaving this function, so we also have
to wait for the move to actually complete.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv40: fix tiling-related setup for a number of chipsets
Ben Skeggs [Mon, 7 Feb 2011 00:49:39 +0000 (10:49 +1000)]
drm/nv40: fix tiling-related setup for a number of chipsets

Due to the default case handling the older chipsets, a bunch of the newer
ones ended up having the wrong tiling regs used.  This commit switches the
default case to handle the newest chipsets.

This also makes nv4e touch the "extra" tiling regs.  "nv" doesn't touch
them for C51 but traces of the NVIDIA binary driver show it being done
there.

I couldn't find NV41/NV45 traces to confirm the behaviour there, but an
educated guess was taken at each of them.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix non-EDIDful native mode selection
Ben Skeggs [Sun, 6 Feb 2011 22:41:18 +0000 (08:41 +1000)]
drm/nouveau: fix non-EDIDful native mode selection

The DRM core fills this value, but at too late a stage for this to work,
possibly resulting in an undesirable mode being selected.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Fix detection of DDC-based LVDS on DCB15 boards.
Francisco Jerez [Thu, 3 Feb 2011 00:56:32 +0000 (01:56 +0100)]
drm/nouveau: Fix detection of DDC-based LVDS on DCB15 boards.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv04-nv40: Fix NULL dereference when we fail to find an LVDS native mode.
Francisco Jerez [Thu, 3 Feb 2011 00:53:18 +0000 (01:53 +0100)]
drm/nv04-nv40: Fix NULL dereference when we fail to find an LVDS native mode.

Reported-by: Alex Buell <alex.buell@munted.org.uk>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv10: Fix crash when allocating a BO larger than half the available VRAM.
Francisco Jerez [Thu, 3 Feb 2011 00:49:33 +0000 (01:49 +0100)]
drm/nv10: Fix crash when allocating a BO larger than half the available VRAM.

Reported-by: Alex Buell <alex.buell@munted.org.uk>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agonfsd: correctly handle return value from nfsd_map_name_to_*
NeilBrown [Wed, 16 Feb 2011 02:08:35 +0000 (13:08 +1100)]
nfsd: correctly handle return value from nfsd_map_name_to_*

These functions return an nfs status, not a host_err.  So don't
try to convert  before returning.

This is a regression introduced by
3c726023402a2f3b28f49b9d90ebf9e71151157d; I fixed up two of the callers,
but missed these two.

Cc: stable@kernel.org
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
13 years agoPM / Hibernate: Return error code when alloc_image_page() fails
Stanislaw Gruszka [Sat, 12 Feb 2011 20:06:51 +0000 (21:06 +0100)]
PM / Hibernate: Return error code when alloc_image_page() fails

Currently we return 0 in swsusp_alloc() when alloc_image_page() fails.
Fix that.  Also remove unneeded "error" variable since the only
useful value of error is -ENOMEM.

[rjw: Fixed up the changelog and changed subject.]

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: stable@kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoworkqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long
Tejun Heo [Wed, 16 Feb 2011 17:10:19 +0000 (18:10 +0100)]
workqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long

MAYDAY_INITIAL_TIMEOUT is defined as HZ / 100 and depending on
configuration may end up 0 or 1.  Even when it's 1, depending on when
the mayday timer is added in the current jiffy interval, it may expire
way before a jiffy has passed.

Make sure MAYDAY_INITIAL_TIMEOUT is at least two to guarantee that at
least a full jiffy has passed before calling rescuers.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Ray Jui <rjui@broadcom.com>
Cc: stable@kernel.org
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Wed, 16 Feb 2011 17:07:00 +0000 (09:07 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] qla2xxx: Return DID_NO_CONNECT when FC device is lost.
  [SCSI] mptfusion: Bump version 03.04.18
  [SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset
  [SCSI] mptfusion: mptctl_release is required in mptctl.c
  [SCSI] target: fix use after free detected by SLUB poison
  [SCSI] target: Remove procfs based target_core_mib.c code
  [SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage
  [SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage
  [SCSI] target: fixed missing lock drop in error path
  [SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage
  [SCSI] target/iblock: Fix failed bd claim NULL pointer dereference
  [SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR
  [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption
  [SCSI] qla2xxx: Change from irq to irqsave with host_lock
  [SCSI] qla2xxx: Fix race that could hang kthread_stop()

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Wed, 16 Feb 2011 17:04:41 +0000 (09:04 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: sha-s390 - Reset index after processing partial block

13 years agovfs: fix BUG_ON() in fs/namei.c:1461
Linus Torvalds [Wed, 16 Feb 2011 16:56:55 +0000 (08:56 -0800)]
vfs: fix BUG_ON() in fs/namei.c:1461

When Al moved the nameidata_dentry_drop_rcu_maybe() call into the
do_follow_link function in commit 844a391799c2 ("nothing in
do_follow_link() is going to see RCU"), he mistakenly left the

BUG_ON(inode != path->dentry->d_inode);

behind.  Which would otherwise be ok, but that BUG_ON() really needs to
be _after_ dropping RCU, since the dentry isn't necessarily stable
otherwise.

So complete the code movement in that commit, and move the BUG_ON() into
do_follow_link() too.  This means that we need to pass in 'inode' as an
argument (just for this one use), but that's a small thing.  And
eventually we may be confident enough in our path lookup that we can
just remove the BUG_ON() and the unnecessary inode argument.

Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoworkqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'
Tejun Heo [Wed, 16 Feb 2011 08:25:31 +0000 (09:25 +0100)]
workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'

There are two spellings in use for 'freeze' + 'able' - 'freezable' and
'freezeable'.  The former is the more prominent one.  The latter is
mostly used by workqueue and in a few other odd places.  Unify the
spelling to 'freezable'.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Steven Whitehouse <swhiteho@redhat.com>
13 years agoLinux 2.6.38-rc5
Linus Torvalds [Wed, 16 Feb 2011 03:23:45 +0000 (19:23 -0800)]
Linux 2.6.38-rc5

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Wed, 16 Feb 2011 01:51:18 +0000 (17:51 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: set flow handler for secondary interrupt controller of 5249
  m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
  m68knommu: fix dereference of port.tty
  m68knommu: add missing linker __modver section
  m68knommu: fix mis-named variable int set_irq_chip loop
  m68knommu: add optimize memmove() function
  m68k: remove arch specific non-optimized memcmp()
  m68knommu: fix use of un-defined _TIF_WORK_MASK
  m68knommu: Rename m548x_wdt.c to m54xx_wdt.c
  m68knommu: fix m548x_wdt.c compilation after headers renaming
  m68knommu: Remove dependencies on nonexistent M68KNOMMU

13 years agom68knommu: set flow handler for secondary interrupt controller of 5249
Greg Ungerer [Wed, 9 Feb 2011 03:43:58 +0000 (13:43 +1000)]
m68knommu: set flow handler for secondary interrupt controller of 5249

The secondary interrupt controller of the ColdFire 5249 code is not
setting the edge triggered flow handler. Set it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
Greg Ungerer [Tue, 8 Feb 2011 11:40:11 +0000 (21:40 +1000)]
m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support

The m68knommu arch does not define or use IRQ_FLG_LOCK in its irq
subsystem. Remove obsolete use of it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68knommu: fix dereference of port.tty
Greg Ungerer [Tue, 8 Feb 2011 11:32:36 +0000 (21:32 +1000)]
m68knommu: fix dereference of port.tty

The struct_tty associated with a port is now a direct pointer
from within the local private driver info struct. So fix all uses
of it.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68knommu: add missing linker __modver section
Greg Ungerer [Tue, 8 Feb 2011 04:45:59 +0000 (14:45 +1000)]
m68knommu: add missing linker __modver section

Add missing linker section __modver to fix:

  LD      vmlinux
/usr/local/bin/../m68k-uclinux/bin/ld.real: error: no memory region specified for loadable section `__modver'

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68knommu: fix mis-named variable int set_irq_chip loop
Greg Ungerer [Tue, 8 Feb 2011 04:40:44 +0000 (14:40 +1000)]
m68knommu: fix mis-named variable int set_irq_chip loop

Compiling for 68360 targets gives:

  CC      arch/m68knommu/platform/68360/ints.o
arch/m68knommu/platform/68360/ints.c: In function ‘init_IRQ’:
arch/m68knommu/platform/68360/ints.c:135:16: error: ‘irq’ undeclared (first use in this function)
arch/m68knommu/platform/68360/ints.c:135:16: note: each undeclared identifier is reported only once for each function it appears in

Fix variable name used.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68knommu: add optimize memmove() function
Greg Ungerer [Thu, 3 Feb 2011 11:58:39 +0000 (21:58 +1000)]
m68knommu: add optimize memmove() function

Add an m68k/coldfire optimized memmove() function for the m68knommu arch.
This is the same function as used by m68k. Simple speed tests show this
is faster once buffers are larger than 4 bytes, and significantly faster
on much larger buffers (4 times faster above about 100 bytes).

This also goes part of the way to fixing a regression caused by commit
ea61bc461d09e8d331a307916530aaae808c72a2 ("m68k/m68knommu: merge MMU and
non-MMU string.h"), which breaks non-coldfire non-mmu builds (which is
the 68x328 and 68360 families). They currently have no memmove() fucntion
defined, since there was none in the m68knommu/lib functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
13 years agom68k: remove arch specific non-optimized memcmp()
Greg Ungerer [Thu, 3 Feb 2011 11:31:20 +0000 (21:31 +1000)]
m68k: remove arch specific non-optimized memcmp()

The m68k arch implements its own memcmp() function. It is not optimized
in any way (it is the most strait forward coding of memcmp you can get).
Remove it and use the kernels standard memcmp() implementation.

This also goes part of the way to fixing a regression caused by commit
ea61bc461d09e8d331a307916530aaae808c72a2 ("m68k/m68knommu: merge MMU and
non-MMU string.h"), which breaks non-coldfire non-mmu builds (which is
the 68x328 and 68360 families). They currently have no memcmp() function
defined, since there is none in the m68knommu/lib functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 15 Feb 2011 23:25:33 +0000 (15:25 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (27 commits)
  drm/radeon/kms: hopefully fix pll issues for real (v3)
  drm/radeon/kms: add bounds checking to avivo pll algo
  drm: fix wrong usages of drm_device in DRM Developer's Guide
  drm/radeon/kms: fix a few more atombios endian issues
  drm/radeon/kms: improve 6xx/7xx CS error output
  drm/radeon/kms: check AA resolve registers on r300
  drm/radeon/kms: fix tracking of BLENDCNTL, COLOR_CHANNEL_MASK, and GB_Z on r300
  drm/radeon/kms: use linear aligned for evergreen/ni bo blits
  drm/radeon/kms: use linear aligned for 6xx/7xx bo blits
  drm/radeon: fix race between GPU reset and TTM delayed delete thread.
  drm/radeon/kms: evergreen/ni big endian fixes (v2)
  drm/radeon/kms: 6xx/7xx big endian fixes
  drm/radeon/kms: atombios big endian fixes
  drm/radeon: 6xx/7xx non-kms endian fixes
  drm/radeon/kms: optimize CS state checking for r100->r500
  drm: do not leak kernel addresses via /proc/dri/*/vma
  drm/radeon/kms: add connector table for mac g5 9600
  radeon mkregtable: Add missing fclose() calls
  drm/radeon/kms: fix interlaced modes on dce4+
  drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 15 Feb 2011 23:25:11 +0000 (15:25 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  pci: use security_capable() when checking capablities during config space read

13 years agothp: prevent hugepages during args/env copying into the user stack
Andrea Arcangeli [Tue, 15 Feb 2011 18:02:45 +0000 (19:02 +0100)]
thp: prevent hugepages during args/env copying into the user stack

Transparent hugepages can only be created if rmap is fully
functional. So we must prevent hugepages to be created while
is_vma_temporary_stack() is true.

This also optmizes away some harmless but unnecessary setting of
khugepaged_scan.address and it switches some BUG_ON to VM_BUG_ON.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Tue, 15 Feb 2011 23:19:45 +0000 (15:19 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI / Video: Probe for output switch method when searching video devices.
  ACPI / Wakeup: Enable button GPEs unconditionally during initialization
  ACPI / ACPICA: Avoid crashing if _PRW is defined for the root object
  ACPI: Fix acpi_os_read_memory() and acpi_os_write_memory() (v2)

13 years agoMerge branch 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Tue, 15 Feb 2011 23:19:22 +0000 (15:19 -0800)]
Merge branch 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6

* 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
  tools: turbostat: style updates
  tools: turbostat: fix bitwise and operand

13 years agosparc64: Fix NMI startup bug which also breaks perf.
David S. Miller [Tue, 15 Feb 2011 23:04:07 +0000 (15:04 -0800)]
sparc64: Fix NMI startup bug which also breaks perf.

Doing NMI startup as an early initcall doesn't work because we need
to have SMP started up by then.

So we'd only NMI startup one cpu, which causes perf PMU grab to
BUG because the nmi_active count isn't what it's supposed to be.

This also points out that we don't have proper CPU up/down notifiers
for the NMI code which will need to be fixed at some point.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'iomem' into release
Len Brown [Tue, 15 Feb 2011 20:25:48 +0000 (15:25 -0500)]
Merge branch 'iomem' into release

13 years agospi/pxa2xx pci: fix the release - remove race
Sebastian Andrzej Siewior [Wed, 2 Feb 2011 19:01:21 +0000 (00:31 +0530)]
spi/pxa2xx pci: fix the release - remove race

Right now the platform device and its platform data is included in one big
struct which requires its custom ->release function. The problem with the
release function within the driver is that it might be called after the
driver was removed because someone was holding a reference to it and it
was not called right after platform_device_unregister(). So we also free
the platform device memory to which one might hold a reference.

This patch uses the normal pdev functions so this kind of race does not
occur.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoisdn: hisax: Use l2headersize() instead of dup (and buggy) func.
David S. Miller [Tue, 15 Feb 2011 20:18:09 +0000 (12:18 -0800)]
isdn: hisax: Use l2headersize() instead of dup (and buggy) func.

There was a bug in my commit c978e7bb77dfd2cd3d1f547fa4e395cfe47f02b2
("hisax: Fix unchecked alloc_skb() return.")

One of the l2->flag checks is wrong.

Even worse it turns out I'm duplicating an existing function,
so use that instead.

Reported-by: Milton Miller <miltonm@bga.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Tue, 15 Feb 2011 20:07:35 +0000 (12:07 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (21 commits)
  dmaengine: add slave-dma maintainer
  dma: ipu_idmac: do not lose valid received data in the irq handler
  dmaengine: imx-sdma: fix up param for the last BD in sdma_prep_slave_sg()
  dmaengine: imx-sdma: correct sdmac->status in sdma_handle_channel_loop()
  dmaengine: imx-sdma: return sdmac->status in sdma_tx_status()
  dmaengine: imx-sdma: set sdmac->status to DMA_ERROR in err_out of sdma_prep_slave_sg()
  dmaengine: imx-sdma: remove IMX_DMA_SG_LOOP handling in sdma_prep_slave_sg()
  dmaengine i.MX dma: initialize dma capabilities outside channel loop
  dmaengine i.MX DMA: do not initialize chan_id field
  dmaengine i.MX dma: check sg entries for valid addresses and lengths
  dmaengine i.MX dma: set maximum segment size for our device
  dmaengine i.MX SDMA: reserve channel 0 by not registering it
  dmaengine i.MX SDMA: initialize dma capabilities outside channel loop
  dmaengine i.MX SDMA: do not initialize chan_id field
  dmaengine i.MX sdma: check sg entries for valid addresses and lengths
  dmaengine i.MX sdma: set maximum segment size for our device
  DMA: PL08x: fix channel pausing to timeout rather than lockup
  DMA: PL08x: fix infinite wait when terminating transfers
  dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()
  dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0
  ...

13 years agoMerge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 15 Feb 2011 20:06:38 +0000 (12:06 -0800)]
Merge branch 'for-2.6.38' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.38' of git://linux-nfs.org/~bfields/linux:
  nfsd: break lease on unlink due to rename
  nfsd4: acquire only one lease per file
  nfsd4: modify fi_delegations under recall_lock
  nfsd4: remove unused deleg dprintk's.
  nfsd4: split lease setting into separate function
  nfsd4: fix leak on allocation error
  nfsd4: add helper function for lease setup
  nfsd4: split up nfsd_break_deleg_cb
  NFSD: memory corruption due to writing beyond the stat array
  NFSD: use nfserr for status after decode_cb_op_status
  nfsd: don't leak dentry count on mnt_want_write failure

13 years agoMerge branches 'core-fixes-for-linus' and 'timers-fixes-for-linus' of git://git.kerne...
Linus Torvalds [Tue, 15 Feb 2011 18:19:18 +0000 (10:19 -0800)]
Merge branches 'core-fixes-for-linus' and 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  Revert "lockdep, timer: Fix del_timer_sync() annotation"

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timer debug: Hide kernel addresses via %pK in /proc/timer_list

13 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 15 Feb 2011 18:18:48 +0000 (10:18 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Fix text_poke_smp_batch() deadlock
  perf tools: Fix thread_map event synthesizing in top and record
  watchdog, nmi: Lower the severity of error messages
  ARM: oprofile: Fix backtraces in timer mode
  oprofile: Fix usage of CONFIG_HW_PERF_EVENTS for oprofile_perf_init and friends

13 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 15 Feb 2011 18:18:29 +0000 (10:18 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, dmi, debug: Log board name (when present) in dmesg/oops output
  x86, ioapic: Don't warn about non-existing IOAPICs if we have none
  x86: Fix mwait_usable section mismatch
  x86: Readd missing irq_to_desc() in fixup_irq()
  x86: Fix section mismatch in LAPIC initialization

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Tue, 15 Feb 2011 17:40:27 +0000 (09:40 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: matrix_keypad - increase the limit of rows and columns
  Input: wacom - fix error path in wacom_probe()
  Input: ads7846 - check proper condition when freeing gpio
  Revert "Input: do not pass injected events back to the originating handler"
  Input: sysrq - rework re-inject logic
  Input: serio - clear pending rescans after sysfs driver rebind
  Input: rotary_encoder - use proper irqflags
  Input: wacom_w8001 - report resolution to userland