platform/adaptation/renesas_rcar/renesas_kernel.git
13 years agox86: Use generic show_interrupts
Thomas Gleixner [Thu, 16 Dec 2010 16:59:57 +0000 (17:59 +0100)]
x86: Use generic show_interrupts

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Avoid redundant lookup of irq_cfg
Thomas Gleixner [Sat, 12 Mar 2011 12:47:18 +0000 (13:47 +0100)]
x86: ioapic: Avoid redundant lookup of irq_cfg

The caller of ioapic_register_intr() has a pointer to the irq_cfg for
the irq already. Hand it in to avoid a full lookup.

In msi_compose_msg() the pointer to irq_cfg is already available. No
need to look it up again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use new move_irq functions
Thomas Gleixner [Fri, 4 Feb 2011 17:56:11 +0000 (18:56 +0100)]
x86: ioapic: Use new move_irq functions

Use the functions which take irq_data. We already have a pointer to
irq_data. That avoids a sparse irq lookup in move_*_irq.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: Use the proper accessors in fixup_irqs()
Thomas Gleixner [Thu, 10 Feb 2011 20:40:36 +0000 (21:40 +0100)]
x86: Use the proper accessors in fixup_irqs()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use irq_data->state
Thomas Gleixner [Sat, 5 Feb 2011 14:35:51 +0000 (15:35 +0100)]
x86: ioapic: Use irq_data->state

Use the state information in irq_data. That avoids a radix-tree lookup
from apic_ack_level() and simplifies setup_ioapic_dest().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Simplify irq chip and handler setup
Thomas Gleixner [Fri, 11 Mar 2011 12:17:16 +0000 (13:17 +0100)]
x86: ioapic: Simplify irq chip and handler setup

Use pointers instead of ugly multiline if/else constructs.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: Cleanup the genirq name space
Thomas Gleixner [Sat, 12 Mar 2011 11:20:43 +0000 (12:20 +0100)]
x86: Cleanup the genirq name space

genirq is switching to a consistent name space for the irq related
functions. Convert x86. Conversion was done with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoMerge branch 'irq/core' into x86/irq
Thomas Gleixner [Sat, 12 Mar 2011 12:23:37 +0000 (13:23 +0100)]
Merge branch 'irq/core' into x86/irq

Reason: Enabling irq threads and update to latest genirq functionality
requires the core code

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoMerge branch 'x86/apic' into x86/irq
Thomas Gleixner [Sat, 12 Mar 2011 12:22:22 +0000 (13:22 +0100)]
Merge branch 'x86/apic' into x86/irq

Reason: Update to latest genirq code conflicts with pending apic
changes

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Add chip flag to force mask on suspend
Thomas Gleixner [Fri, 11 Mar 2011 20:22:14 +0000 (21:22 +0100)]
genirq: Add chip flag to force mask on suspend

On suspend we disable all interrupts in the core code, but this does
not mask the interrupt line in the default implementation as we use a
lazy disable approach. That means we mark the interrupt disabled, but
leave the hardware unmasked. That's an optimization because we avoid
the hardware access for the common case where no interrupt happens
after we marked it disabled. If an interrupt happens, then the
interrupt flow handler masks the line at the hardware level and marks
it pending.

Suspend makes use of this delayed disable as it "disables" all
interrupts when preparing the suspend transition. Right before the
system goes into hardware suspend state it checks whether one of the
interrupts which is marked as a wakeup interrupt came in after
disabling it.

Most interrupt chips have a separate register which selects the
interrupts which can wake up the system from suspend, so we don't have
to mask any on the non wakeup interrupts.

But now we have to deal with brilliant designed hardware which lacks
such a wakeup configuration facility. For such hardware it's necessary
to mask all non wakeup interrupts before going into suspend in order
to avoid the wakeup from random interrupts.

Rather than working around this in the affected interrupt chip
implementations we can solve this elegant in the core code itself.

Add a flag IRQCHIP_MASK_ON_SUSPEND which can be set by the irq chip
implementation to indicate, that the interrupts which are not selected
as wakeup sources must be masked in the suspend path. Mask them in the
loop which checks the wakeup interrupts pending flag.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
LKML-Reference: <alpine.LFD.2.00.1103112112310.2787@localhost6.localdomain6>

13 years agogenirq: Add desc->irq_data accessor
Thomas Gleixner [Fri, 11 Mar 2011 13:15:35 +0000 (14:15 +0100)]
genirq: Add desc->irq_data accessor

We have accessors for all fields in irq_data based on irq_desc, but
not for irq_data itself.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Add comments to Kconfig switches
Thomas Gleixner [Tue, 8 Mar 2011 18:52:55 +0000 (19:52 +0100)]
genirq: Add comments to Kconfig switches

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
13 years agogenirq: Fixup fasteoi handler for oneshot mode
Thomas Gleixner [Wed, 2 Mar 2011 10:49:21 +0000 (11:49 +0100)]
genirq: Fixup fasteoi handler for oneshot mode

The fasteoi handler must mask the interrupt line in oneshot mode
otherwise we end up with an irq storm.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Provide forced interrupt threading
Thomas Gleixner [Wed, 23 Feb 2011 23:52:23 +0000 (23:52 +0000)]
genirq: Provide forced interrupt threading

Add a commandline parameter "threadirqs" which forces all interrupts except
those marked IRQF_NO_THREAD to run threaded. That's mostly a debug option to
allow retrieving better debug data from crashing interrupt handlers. If
"threadirqs" is not enabled on the kernel command line, then there is no
impact in the interrupt hotpath.

Architecture code needs to select CONFIG_IRQ_FORCED_THREADING after
marking the interrupts which cant be threaded IRQF_NO_THREAD. All
interrupts which have IRQF_TIMER set are implict marked
IRQF_NO_THREAD. Also all PER_CPU interrupts are excluded.

Forced threading hard interrupts also forces all soft interrupt
handling into thread context.

When enabled it might slow down things a bit, but for debugging problems in
interrupt code it's a reasonable penalty as it does not immediately
crash and burn the machine when an interrupt handler is buggy.

Some test results on a Core2Duo machine:

Cache cold run of:
 # time git grep irq_desc

      non-threaded       threaded
 real 1m18.741s          1m19.061s
 user 0m1.874s           0m1.757s
 sys  0m5.843s           0m5.427s

 # iperf -c server
non-threaded
[  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
[  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
[  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
threaded
[  3]  0.0-10.0 sec  1.09 GBytes   939 Mbits/sec
[  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
[  3]  0.0-10.0 sec  1.09 GBytes   937 Mbits/sec

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

13 years agosched: Switch wait_task_inactive to schedule_hrtimeout()
Thomas Gleixner [Wed, 23 Feb 2011 23:52:21 +0000 (23:52 +0000)]
sched: Switch wait_task_inactive to schedule_hrtimeout()

When we force thread hard and soft interrupts the startup of ksoftirqd
would hang in kthread_bind() when wait_task_inactive() calls
schedule_timeout_uninterruptible() because there is no softirq yet
which will wake us up.

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

13 years agogenirq: Add IRQF_NO_THREAD
Thomas Gleixner [Wed, 23 Feb 2011 23:52:18 +0000 (23:52 +0000)]
genirq: Add IRQF_NO_THREAD

Some low level interrupts cannot be threaded even when we force thread
all interrupt handlers. Add a flag to annotate such interrupts. Add
all timer interrupts to this category by default.

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

13 years agogenirq: Allow shared oneshot interrupts
Thomas Gleixner [Wed, 23 Feb 2011 23:52:16 +0000 (23:52 +0000)]
genirq: Allow shared oneshot interrupts

Support ONESHOT on shared interrupts, if all drivers agree on it.

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

13 years agogenirq: Prepare the handling of shared oneshot interrupts
Thomas Gleixner [Wed, 23 Feb 2011 23:52:13 +0000 (23:52 +0000)]
genirq: Prepare the handling of shared oneshot interrupts

For level type interrupts we need to track how many threads are on
flight to avoid useless interrupt storms when not all thread handlers
have finished yet. Keep track of the woken threads and only unmask
when there are no more threads in flight.

Yes, I'm lazy and using a bitfield. But not only because I'm lazy, the
main reason is that it's way simpler than using a refcount. A refcount
based solution would need to keep track of various things like
crashing the irq thread, spurious interrupts coming in,
disables/enables, free_irq() and some more. The bitfield keeps the
tracking simple and makes things just work. It's also nicely confined
to the thread code pathes and does not require additional checks all
over the place.

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

13 years agogenirq: Make warning in handle_percpu_event useful
Thomas Gleixner [Fri, 25 Feb 2011 16:17:18 +0000 (17:17 +0100)]
genirq: Make warning in handle_percpu_event useful

The WARN_ON_ONCE in handle_percpu_event() which emits a warning when
an action handler returns with interrupts enabled is not really
useful. It does not reveal the interrupt number and handler function
which caused it. Make it WARN_ONCE() and add the information.

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Move trigger defines to io_apic.h
Thomas Gleixner [Wed, 23 Feb 2011 18:54:53 +0000 (19:54 +0100)]
x86: ioapic: Move trigger defines to io_apic.h

Required for devicetree based io_apic configuration.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Implement and use io_apic_setup_irq_pin_once()
Thomas Gleixner [Wed, 23 Feb 2011 16:47:41 +0000 (17:47 +0100)]
x86: ioapic: Implement and use io_apic_setup_irq_pin_once()

io_apic_set_pci_routing() and mp_save_irq() check the pin_programmed
bit before calling io_apic_setup_irq_pin() and set the bit when the
pin was setup.

Move that duplicated code into a separate function and use it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Remove useless inlines
Thomas Gleixner [Wed, 23 Feb 2011 16:33:53 +0000 (17:33 +0100)]
x86: ioapic: Remove useless inlines

There is no point to have irq_trigger() and irq_polarity() as wrappers
around the MPBIOS_* camel case functions. Get rid of both the inlines
and the ugly camel case.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Make a few functions static
Thomas Gleixner [Wed, 23 Feb 2011 15:08:03 +0000 (16:08 +0100)]
x86: ioapic: Make a few functions static

No users outside of io_apic.c. Mark bad_ioapic() __init while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use setup function in setup_IO_APIC_irq_extra()
Thomas Gleixner [Wed, 23 Feb 2011 13:52:16 +0000 (14:52 +0100)]
x86: ioapic: Use setup function in setup_IO_APIC_irq_extra()

Another version of the same thing. Only set the pin programmed, when
the setup function succeeds.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use setup function in __io_apic_setup_irqs()
Thomas Gleixner [Wed, 23 Feb 2011 13:40:35 +0000 (14:40 +0100)]
x86: ioapic: Use setup function in __io_apic_setup_irqs()

Replace the duplicated code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use setup function in __io_apic_set_pci_routing()
Thomas Gleixner [Wed, 23 Feb 2011 13:10:54 +0000 (14:10 +0100)]
x86: ioapic: Use setup function in __io_apic_set_pci_routing()

The only difference here is that we did not call
__add_pin_to_irq_node() for the legacy irqs, but that's not worth 30
lines of extra code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Use new setup function in pre_init_apic_IRQ0()
Thomas Gleixner [Wed, 23 Feb 2011 12:07:54 +0000 (13:07 +0100)]
x86: ioapic: Use new setup function in pre_init_apic_IRQ0()

Remove the duplicated code and call the function. It does not matter
whether we allocated the cfg before calling setup_local_APIC() and we
can set the irq chip and handler after that as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Add io_apic_setup_irq_pin()
Thomas Gleixner [Wed, 23 Feb 2011 12:00:56 +0000 (13:00 +0100)]
x86: ioapic: Add io_apic_setup_irq_pin()

There are about four places in the ioapic code which do exactly the
same setup sequence. Also the OF based ioapic setup needs that
function to avoid putting the OF specific code into ioapic.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Split out the nested loop in setup_IO_APIC_irqs()
Thomas Gleixner [Wed, 23 Feb 2011 13:31:36 +0000 (14:31 +0100)]
x86: ioapic: Split out the nested loop in setup_IO_APIC_irqs()

Two consecutive

    for(...)
    for(...)

lines to avoid an extra indentation are just horrible to read. I had
to look more than once to figure out what the code is doing.

Split out the inner loop into a separate function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: ioapic: Remove silly debug bloat in setup_IOAPIC_irqs()
Thomas Gleixner [Wed, 23 Feb 2011 13:29:34 +0000 (14:29 +0100)]
x86: ioapic: Remove silly debug bloat in setup_IOAPIC_irqs()

This is debug code and it does not matter at all whether we print each
not connected pin in an extra line or try to be extra clever.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agox86: Fix deps of X86_UP_IOAPIC
Henrik Kretzschmar [Tue, 22 Feb 2011 14:38:07 +0000 (15:38 +0100)]
x86: Fix deps of X86_UP_IOAPIC

Since commit 7cd92366a593246650cc7d6198e2c7d3af8c1d8a
lAPIC enabled accidently the IOAPIC, which now gets fixed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-5-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Add dummy functions for compiling without IOAPIC
Henrik Kretzschmar [Tue, 22 Feb 2011 14:38:06 +0000 (15:38 +0100)]
x86: Add dummy functions for compiling without IOAPIC

This patch adds IOAPIC dummy functions for compilation
with local APIC, but without IOAPIC.

The local variable ioapic_entries in enable_IR_x2apic()
does not need initialization anymore, since the dummy
returns NULL.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-4-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Rework arch_disable_smp_support() for x86
Henrik Kretzschmar [Tue, 22 Feb 2011 14:38:05 +0000 (15:38 +0100)]
x86: Rework arch_disable_smp_support() for x86

Currently arch_disable_smp_support() on x86 disables only the
support for the IOAPIC and is also compiled in if SMP-support is
not.

Therefore this function is renamed to disable_ioapic_support(),
which meets its purpose and is only compiled in the kernel
when IOAPIC support is also.

A new arch_disable_smp_support() is created in smpboot.c,
which calls disable_ioapic_support() and gets only compiled
in the kernel when SMP support is also.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-3-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Add dummy mp_save_irq()
Henrik Kretzschmar [Tue, 22 Feb 2011 14:38:04 +0000 (15:38 +0100)]
x86: Add dummy mp_save_irq()

This is a dummy function, used when no IOAPIC is compiled in.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-2-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Move ioapic_irq_destination_types to apicdef.h
Henrik Kretzschmar [Tue, 22 Feb 2011 14:38:03 +0000 (15:38 +0100)]
x86: Move ioapic_irq_destination_types to apicdef.h

This enum is used by non IOAPIC code, so apicdef.h is
the best place for it.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
LKML-Reference: <1298385487-4708-1-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agogenirq: Streamline kernel/irq/Kconfig
Jan Beulich [Thu, 17 Feb 2011 13:39:05 +0000 (13:39 +0000)]
genirq: Streamline kernel/irq/Kconfig

"def_bool n" without prompt is pointless, these should be just "bool".

[ tglx: Adapted to latest changes ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <4D5D3309020000780003264A@vpn.id2.novell.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use the correct variable for note_interrupt
Thomas Gleixner [Tue, 22 Feb 2011 11:50:12 +0000 (12:50 +0100)]
genirq: Use the correct variable for note_interrupt

note_interrupt wants to be called with the combined result of all
handlers called, not with the last one. If it's a shared interrupt
then the last handler might return IRQ_NONE often enough to trigger
the spurious dectector which turns off a perfectly fine working
interrupt line. Bug was introduced in commit 1277a532(genirq: Simplify
handle_irq_event()).

Yes, I really messed up there. First the variable ret should not have
been named differently to avoid similarity with retval. Second it
should have been declared in the do {} loop.

Rename it to res and move it into the do {} loop and vanish under a
huge brown paperbag.

Reported-bisected-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoLinux 2.6.38-rc6
Linus Torvalds [Tue, 22 Feb 2011 01:25:52 +0000 (17:25 -0800)]
Linux 2.6.38-rc6

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs...
Linus Torvalds [Tue, 22 Feb 2011 01:25:00 +0000 (17:25 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  eCryptfs: Copy up lower inode attrs in getattr
  ecryptfs: read on a directory should return EISDIR if not supported
  eCryptfs: Handle NULL nameidata pointers
  eCryptfs: Revert "dont call lookup_one_len to avoid NULL nameidata"

13 years agodrm/i915: Do not handle backlight combination mode specially
Indan Zupancic [Thu, 17 Feb 2011 01:41:49 +0000 (02:41 +0100)]
drm/i915: Do not handle backlight combination mode specially

The current code does not follow Intel documentation: It misses some things
and does other, undocumented things. This causes wrong backlight values in
certain conditions. Instead of adding tricky code handling badly documented
and rare corner cases, don't handle combination mode specially at all. This
way PCI_LBPC is never touched and weird things shouldn't happen.

If combination mode is enabled, then the only downside is that changing the
brightness has a greater granularity (the LBPC value), but LBPC is at most
254 and the maximum is in the thousands, so this is no real functional loss.

A potential problem with not handling combined mode is that a brightness of
max * PCI_LBPC is not bright enough. However, this is very unlikely because
from the documentation LBPC seems to act as a scaling factor and doesn't look
like it's supposed to be changed after boot. The value at boot should always
result in a bright enough screen.

IMPORTANT: However, although usually the above is true, it may not be when
people ran an older (2.6.37) kernel which messed up the LBPC register, and
they are unlucky enough to have a BIOS that saves and restores the LBPC value.
Then a good kernel may seem to not work: Max brightness isn't bright enough.
If this happens people should boot back into the old kernel, set brightness
to the maximum, and then reboot. After that everything should be fine.

For more information see the below links. This fixes bugs:

  http://bugzilla.kernel.org/show_bug.cgi?id=23472
  http://bugzilla.kernel.org/show_bug.cgi?id=25072

Signed-off-by: Indan Zupancic <indan@nul.nu>
Tested-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomodule: explicitly align module_version_attribute structure
Dmitry Torokhov [Fri, 4 Feb 2011 21:30:10 +0000 (13:30 -0800)]
module: explicitly align module_version_attribute structure

We force particular alignment when we generate attribute structures
when generation MODULE_VERSION() data and we need to make sure that
this alignment is followed when we iterate over these structures,
otherwise we may crash on platforms whose natural alignment is not
sizeof(void *), such as m68k.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
[ There are more issues here, but the fixes are incredibly ugly - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Mon, 21 Feb 2011 23:08:33 +0000 (15:08 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  dell-laptop: Toggle the unsupported hardware killswitch
  thinkpad_acpi: Always report scancodes for hotkeys
  acer-wmi: Fix capitalisation of GUID
  platform/x86: ideapad-laptop depends on INPUT
  platform: x86: acer-wmi: world-writable sysfs threeg file
  platform: x86: asus_acpi: world-writable procfs files
  platform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files
  platform-drivers: x86: pmic: Use request_irq instead of chained handler
  platform-drivers: x86: pmic: Use irq_chip buslock mechanism
  platform-drivers: x86: Convert pmic to new irq_chip functions
  platform-drivers: x86: pmic: Fix up bogus irq hackery

13 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
Linus Torvalds [Mon, 21 Feb 2011 23:08:09 +0000 (15:08 -0800)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  fixdep: Do not record dependency on the source file itself

13 years agoDocbook: add fs/eventfd.c and fix typos in it
Randy Dunlap [Mon, 21 Feb 2011 04:08:35 +0000 (20:08 -0800)]
Docbook: add fs/eventfd.c and fix typos in it

Add fs/eventfd.c to filesystems docbook.
Make typo corrections in fs/eventfd.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: log_buf_len uses [KMG] suffix
Randy Dunlap [Mon, 21 Feb 2011 04:08:35 +0000 (20:08 -0800)]
Documentation: log_buf_len uses [KMG] suffix

Update the "log_buf_len" description to use [KMG] syntax for the
buffer size.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: explain [KMG] parameter suffix
Ahmed S. Darwish [Mon, 21 Feb 2011 04:08:35 +0000 (20:08 -0800)]
Documentation: explain [KMG] parameter suffix

The '[KMG]' suffix is commonly described after a number of kernel
parameter values documentation.  Explicitly state its semantics.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: complete crashkernel= parameter documentation
Ahmed S. Darwish [Mon, 21 Feb 2011 04:08:35 +0000 (20:08 -0800)]
Documentation: complete crashkernel= parameter documentation

Complete the crashkernel= kernel parameter documentation.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Mon, 21 Feb 2011 23:01:38 +0000 (15:01 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: keep reference to parent inode on ceph_dentry
  ceph: queue cap_snaps once per realm
  libceph: fix socket write error handling
  libceph: fix socket read error handling

13 years agoMerge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 21 Feb 2011 23:00:47 +0000 (15:00 -0800)]
Merge branch 's5p-fixes-for-linus' of git://git./linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: S5PV210: Fix regulator names
  ARM: S5PV210: Update max8998_platform_data
  ARM: SAMSUNG: Drop exporting s3c24xx_ts_set_platdata
  ARM: S5P: Fix end address in memory resource information for UART devices
  ARM: S5P64X0: Cleanup map.h file
  ARM: S5P6442: Cleanup map.h file
  ARM: S5PC100: Clenaup map.h file
  ARM: S5PV210: Cleanup map.h file
  ARM: S5PV310: Cleanup map.h file

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 21 Feb 2011 22:57:39 +0000 (14:57 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] update cifs version
  cifs: Fix regression in LANMAN (LM) auth code
  cifs: fix handling of scopeid in cifs_convert_address

13 years agoMerge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 21 Feb 2011 22:57:04 +0000 (14:57 -0800)]
Merge branch 'fixes' of /home/rmk/linux-2.6-arm

* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6745/1: kprobes insn decoding fix
  ARM: tlb: move noMMU tlb_flush() to asm/tlb.h
  ARM: tlb: delay page freeing for SMP and ARMv7 CPUs
  ARM: Keep exit text/data around for SMP_ON_UP
  ARM: Ensure predictable endian state on signal handler entry
  ARM: 6740/1: Place correctly notes section in the linker script
  ARM: 6700/1: SPEAr: Correct SOC config base address for spear320
  ARM: 6722/1: SPEAr: sp810: switch to slow mode before reset
  ARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h
  ARM: 6720/1: SPEAr: Append UL to VMALLOC_END
  ARM: 6676/1: Correct the cpu_architecture() function for ARMv7
  ARM: 6739/1: update .gitignore for boot/compressed
  ARM: 6743/1: errata: interrupted ICALLUIS may prevent completion of broadcasted operation
  ARM: 6742/1: pmu: avoid setting IRQ affinity on UP systems
  ARM: 6741/1: errata: pl310 cache sync operation may be faulty

13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Mon, 21 Feb 2011 22:55:49 +0000 (14:55 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] net: provide architecture specific NET_SKB_PAD
  [S390] atomic: use inline asm
  [S390] correct ipl parameter block safe guard
  [S390] atomic: use ACCESS_ONCE() for atomic_read()
  [S390] dasd: correct device table

13 years ago[CIFS] update cifs version
Steve French [Mon, 21 Feb 2011 22:31:47 +0000 (22:31 +0000)]
[CIFS] update cifs version

Update version to 1.71 so we can more easily spot modules with the last two fixes

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agodell-laptop: Toggle the unsupported hardware killswitch
Keng-Yu Lin [Tue, 15 Feb 2011 09:36:07 +0000 (17:36 +0800)]
dell-laptop: Toggle the unsupported hardware killswitch

It is found on Dell Inspiron 1018 that the firmware reports that the hardware
killswitch is not supported. This makes the rfkill key not functional.

This patch forces the driver to toggle the firmware rfkill status in the case
that the hardware killswitch is indicated as unsupported by the firmware.

Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
Tested-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad_acpi: Always report scancodes for hotkeys
Seth Forshee [Fri, 14 Jan 2011 21:54:39 +0000 (15:54 -0600)]
thinkpad_acpi: Always report scancodes for hotkeys

Some thinkpad hotkeys report key codes like KEY_FN_F8 when something
like KEY_VOLUMEDOWN is desired. Always provide the scan codes in
addition to the key codes to assist with debugging these issues. Also
send the scan code before the key code to match what other drivers do,
as some userspace utilities expect this ordering.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Fix capitalisation of GUID
Matthew Garrett [Wed, 9 Feb 2011 21:39:40 +0000 (16:39 -0500)]
acer-wmi: Fix capitalisation of GUID

6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3 needs to be
6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3 to match the hardware alias.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: stable@kernel.org
13 years agoplatform/x86: ideapad-laptop depends on INPUT
Randy Dunlap [Thu, 20 Jan 2011 20:48:36 +0000 (12:48 -0800)]
platform/x86: ideapad-laptop depends on INPUT

Most platform/x86 drivers that use INPUT_SPARSEKMAP also depend on INPUT,
so do the same for ideapad-laptop.  This fixes a kconfig warning and
subsequent build errors when CONFIG_INPUT is disabled.

warning: (ACER_WMI && ASUS_LAPTOP && DELL_WMI && HP_WMI && PANASONIC_LAPTOP && IDEAPAD_LAPTOP && EEEPC_LAPTOP && EEEPC_WMI && MSI_WMI && TOPSTAR_LAPTOP && ACPI_TOSHIBA) selects INPUT_SPARSEKMAP which has unmet direct dependencies (!S390 && INPUT)

ERROR: "input_free_device" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "input_register_device" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "sparse_keymap_setup" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "input_allocate_device" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "input_unregister_device" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "sparse_keymap_free" [drivers/platform/x86/ideapad-laptop.ko] undefined!
ERROR: "sparse_keymap_report_event" [drivers/platform/x86/ideapad-laptop.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform: x86: acer-wmi: world-writable sysfs threeg file
Vasiliy Kulikov [Fri, 4 Feb 2011 12:23:56 +0000 (15:23 +0300)]
platform: x86: acer-wmi: world-writable sysfs threeg file

Don't allow everybody to write to hardware registers.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform: x86: asus_acpi: world-writable procfs files
Vasiliy Kulikov [Fri, 4 Feb 2011 12:23:59 +0000 (15:23 +0300)]
platform: x86: asus_acpi: world-writable procfs files

Don't allow everybody to change ACPI settings.  The comment says that it
is done deliberatelly, however, the comment before disp_proc_write()
says that at least one of these setting is experimental.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files
Vasiliy Kulikov [Fri, 4 Feb 2011 12:24:03 +0000 (15:24 +0300)]
platform: x86: tc1100-wmi: world-writable sysfs wireless and jogdial files

Don't allow everybody to change WMI settings.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers: x86: pmic: Use request_irq instead of chained handler
Thomas Gleixner [Mon, 7 Feb 2011 20:41:30 +0000 (21:41 +0100)]
platform-drivers: x86: pmic: Use request_irq instead of chained handler

There is no need to install a chained handler for this hardware. This
is a plain x86 IOAPIC interrupt which is handled by the core code
perfectly fine. There is nothing special about demultiplexing these
gpio interrupts which justifies a custom hack. Replace it by a plain
old interrupt handler installed with request_irq. That makes the code
agnostic about the underlying primary interrupt hardware. The overhead
for this is minimal, but it gives us the advantage of accounting,
balancing and to detect interrupt storms. gpio interrupts are not
really that performance critical.

Patch fixups from akpm

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agocifs: Fix regression in LANMAN (LM) auth code
Shirish Pargaonkar [Thu, 17 Feb 2011 20:38:31 +0000 (14:38 -0600)]
cifs: Fix regression in LANMAN (LM) auth code

LANMAN response length was changed to 16 bytes instead of 24 bytes.
Revert it back to 24 bytes.

Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
CC: stable@kernel.org
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoeCryptfs: Copy up lower inode attrs in getattr
Tyler Hicks [Tue, 11 Jan 2011 18:43:42 +0000 (12:43 -0600)]
eCryptfs: Copy up lower inode attrs in getattr

The lower filesystem may do some type of inode revalidation during a
getattr call. eCryptfs should take advantage of that by copying the
lower inode attributes to the eCryptfs inode after a call to
vfs_getattr() on the lower inode.

I originally wrote this fix while working on eCryptfs on nfsv3 support,
but discovered it also fixed an eCryptfs on ext4 nanosecond timestamp
bug that was reported.

https://bugs.launchpad.net/bugs/613873

Cc: <stable@kernel.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoecryptfs: read on a directory should return EISDIR if not supported
Andy Whitcroft [Wed, 16 Feb 2011 04:49:59 +0000 (04:49 +0000)]
ecryptfs: read on a directory should return EISDIR if not supported

read() calls against a file descriptor connected to a directory are
incorrectly returning EINVAL rather than EISDIR:

  [EISDIR]
    [XSI] [Option Start] The fildes argument refers to a directory and the
    implementation does not allow the directory to be read using read()
    or pread(). The readdir() function should be used instead. [Option End]

This occurs because we do not have a .read operation defined for
ecryptfs directories.  Connect this up to generic_read_dir().

BugLink: http://bugs.launchpad.net/bugs/719691
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoeCryptfs: Handle NULL nameidata pointers
Tyler Hicks [Thu, 17 Feb 2011 23:35:20 +0000 (17:35 -0600)]
eCryptfs: Handle NULL nameidata pointers

Allow for NULL nameidata pointers in eCryptfs create, lookup, and
d_revalidate functions.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agogenirq: Add missing break in __irq_set_trigger()
Thomas Gleixner [Mon, 21 Feb 2011 13:19:42 +0000 (14:19 +0100)]
genirq: Add missing break in __irq_set_trigger()

The switch case in __irq_set_trigger() lacks a break, which emits a
pr_err unconditionally on success.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use IRQ_BITMAP_BITS as search size in irq_alloc_descs()
Yinghai Lu [Sat, 19 Feb 2011 19:07:37 +0000 (11:07 -0800)]
genirq: Use IRQ_BITMAP_BITS as search size in irq_alloc_descs()

The runtime expansion of nr_irqs does not take into account that
bitmap_find_next_zero_area() returns "start" + size in case the search
for an matching zero area fails. That results in a start value which
can be completely off and is not covered by the following
expand_nr_irqs() and possibly outside of the absolute limit. But we
use it without further checking.

Use IRQ_BITMAP_BITS as the limit for the bitmap search and expand
nr_irqs when the start bit is beyond nr_irqs. So start is always
pointing to the correct area in the bitmap. nr_irqs is just the limit
for irq enumerations, not the real limit for the irq space.

[ tglx: Let irq_expand_nr_irqs() take the new upper end so we do not
   expand nr_irqs more than necessary. Made changelog readable ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4D6014F9.8040605@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Fix misplaced status update in irq_disable()
Thomas Gleixner [Mon, 21 Feb 2011 11:54:34 +0000 (12:54 +0100)]
genirq: Fix misplaced status update in irq_disable()

We lazy disable interrupt lines, so only mark the line masked, when
the chip provides an irq_disable callback.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoARM: 6745/1: kprobes insn decoding fix
Nicolas Pitre [Mon, 21 Feb 2011 03:37:20 +0000 (04:37 +0100)]
ARM: 6745/1: kprobes insn decoding fix

Marcin Slusarz says:

> In arch/arm/kernel/kprobes-decode.c there's a function
> arm_kprobe_decode_insn which does:
>
> } else if ((insn & 0x0e000000) == 0x0c400000) {
> ...
>
> This is always false, so code below is dead.
> I found this bug by coccinelle (http://coccinelle.lip6.fr/).

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: tlb: move noMMU tlb_flush() to asm/tlb.h
Russell King [Sun, 20 Feb 2011 12:27:49 +0000 (12:27 +0000)]
ARM: tlb: move noMMU tlb_flush() to asm/tlb.h

There's no need to noMMU to put tlb_flush() in asm/tlbflush.h - it's
part of the tlb shootdown interface.  Move it to asm/tlb.h instead, as
per x86.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: tlb: delay page freeing for SMP and ARMv7 CPUs
Russell King [Sun, 20 Feb 2011 12:16:45 +0000 (12:16 +0000)]
ARM: tlb: delay page freeing for SMP and ARMv7 CPUs

We need to delay freeing any mapped page on SMP and ARMv7 systems to
ensure that the data is not accessed by other CPUs, or is used for
speculative prefetch with ARMv7.  This includes not only mapped pages
but also pages used for the page tables themselves.

This avoids races with the MMU/other CPUs accessing pages after they've
been freed but before we've invalidated the TLB.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: Keep exit text/data around for SMP_ON_UP
Russell King [Mon, 21 Feb 2011 10:13:36 +0000 (10:13 +0000)]
ARM: Keep exit text/data around for SMP_ON_UP

When SMP_ON_UP is used and the spinlocks are inlined, we end up with
inline spinlocks in the exit code, with references from the SMP
alternatives section to the exit sections.  This causes link time
errors.  Avoid this by placing the exit sections in the init-discarded
region.

Cc: <stable@kernel.org>
Tested-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: Ensure predictable endian state on signal handler entry
Russell King [Sun, 20 Feb 2011 12:22:52 +0000 (12:22 +0000)]
ARM: Ensure predictable endian state on signal handler entry

Ensure a predictable endian state when entering signal handlers.  This
avoids programs which use SETEND to momentarily switch their endian
state from having their signal handlers entered with an unpredictable
endian state.

Cc: <stable@kernel.org>
Acked-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6740/1: Place correctly notes section in the linker script
Pawel Moll [Wed, 16 Feb 2011 17:54:01 +0000 (18:54 +0100)]
ARM: 6740/1: Place correctly notes section in the linker script

Commit 18991197b4b588255ccabf472ebc84db7b66a19c added --build-id
linker option when toolchain supports it. ARM one does, but for some
reason places the section at 0 when linker script doesn't mention it
explicitly.

The 1e621a8e3752367d4aae78a8ab00a18fb2793f34 worked around the problem
removing this section from binary image with explicit objcopy options,
but it still exists in vmlinux, confusing tools like debuggers and perf.

This problem was discussed here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-May/015994.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-May/015994.html
but the proposed changes to the linker script were substantial.

This patch simply places NOTES (36 bytes long, at least when compiled
with CodeSourcery toolchain) between data and bss, which seem to be
the right place (and suggested by the sample linker script in
include/asm-generic/vmlinux.lds.h).

It is enough to place it correctly in vmlinux (so debuggers are happy):

Section Headers:
  [11] .data             PROGBITS        c07ce000 7ce000 020fc0 00  WA  0   0 32
  [12] .notes            NOTE            c07eefc0 7eefc0 000024 00  AX  0   0  4
  [13] .bss              NOBITS          c07ef000 7eefe4 01e628 00  WA  0   0 32
Program Headers:
  LOAD           0x008000 0xc0008000 0xc0008000 0x7e6fe4 0x805628 RWE 0x8000
  NOTE           0x7eefc0 0xc07eefc0 0xc07eefc0 0x00024 0x00024 R E 0x4
Section to Segment mapping:
  Segment Sections...
   00     <...> .data .notes .bss
   01     .notes

and to get it exposed as /sys/kernel/notes used by perf tools.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6700/1: SPEAr: Correct SOC config base address for spear320
viresh kumar [Wed, 16 Feb 2011 06:40:41 +0000 (07:40 +0100)]
ARM: 6700/1: SPEAr: Correct SOC config base address for spear320

SPEAR320_SOC_CONFIG_BASE was wrong, causing the wrong registers to be
accessed.

Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6722/1: SPEAr: sp810: switch to slow mode before reset
Shiraz Hashim [Wed, 16 Feb 2011 06:40:29 +0000 (07:40 +0100)]
ARM: 6722/1: SPEAr: sp810: switch to slow mode before reset

In sysctl_soft_reset(), switch to slow mode before resetting the system
via the system controller.  This is required.

Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h
viresh kumar [Wed, 16 Feb 2011 06:41:06 +0000 (07:41 +0100)]
ARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h

readl() and writel() calls the outer cache maintainance operations
which are not available during Linux uncompression. This patch replaces
readl() and writel() with readl_relaxed() and writel_relaxed() to avoid
the link time errors.

Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6720/1: SPEAr: Append UL to VMALLOC_END
viresh kumar [Wed, 16 Feb 2011 06:40:27 +0000 (07:40 +0100)]
ARM: 6720/1: SPEAr: Append UL to VMALLOC_END

This patch fixes following warning:
arch/arm/mm/init.c:606: warning: format '%08lx' expects type 'long unsigned int', but argument 12 has type 'unsigned int'

by appending UL to VMALLOC_END's Number.

Reviewed-by: Stanley Miao <stanley.miao@windriver.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agofixdep: Do not record dependency on the source file itself
Michal Marek [Thu, 17 Feb 2011 14:13:54 +0000 (15:13 +0100)]
fixdep: Do not record dependency on the source file itself

The dependency is already expressed by the Makefiles, storing it in the
.cmd file breaks build if a .c file is replaced by .S or vice versa,
because the .cmd file contains

foo/bar.o: foo/bar.c ...

foo/bar.c ... :

so the foo/bar.c -> foo/bar.o rule triggers even if there is no
foo/bar.c anymore.

Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 20 Feb 2011 18:15:57 +0000 (10:15 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: HDA: Do not announce false surround in Conexant auto
  ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
  ALSA: HDA: Add position_fix quirk for an Asus device
  ALSA: caiaq - Fix possible string-buffer overflow
  ALSA: au88x0 - Modify pointer callback to give accurate playback position

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sun, 20 Feb 2011 18:15:22 +0000 (10:15 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (lm85) extend to support EMC6D103 chips
  MAINTAINERS: Remove stale hwmon quilt tree
  hwmon: (k10temp) add support for AMD Family 12h/14h CPUs
  hwmon: (jc42) do not allow writing to locked registers
  hwmon: (jc42) more helpful documentation
  hwmon: (jc42) fix type mismatch

13 years agoRevert "tpm_tis: Use timeouts returned from TPM"
Linus Torvalds [Sun, 20 Feb 2011 18:03:12 +0000 (10:03 -0800)]
Revert "tpm_tis: Use timeouts returned from TPM"

This reverts commit 9b29050f8f75916f974a2d231ae5d3cd59792296.

It has caused hibernate regressions, for example Juri Sladby's report:

  "I'm unable to hibernate 2.6.37.1 unless I rmmod tpm_tis:
   [10974.074587] Suspending console(s) (use no_console_suspend to debug)
   [10974.103073] tpm_tis 00:0c: Operation Timed out
   [10974.103089] legacy_suspend(): pnp_bus_suspend+0x0/0xa0 returns -62
   [10974.103095] PM: Device 00:0c failed to freeze: error -62"

and Rafael points out that some of the new conditionals in that commit
seem to make no sense.  This commit needs more work and testing, let's
revert it for now.

Reported-by: Norbert Preining <preining@logic.at>
Reported-and-requested-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Guillaume Chazarain <guichaz@gmail.com>
Cc: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoceph: keep reference to parent inode on ceph_dentry
Yehuda Sadeh [Tue, 18 Jan 2011 21:37:28 +0000 (13:37 -0800)]
ceph: keep reference to parent inode on ceph_dentry

When creating a new dentry we now hold a reference to the parent
inode in the ceph_dentry.  This is required due to the new RCU
changes from 949854d0, which set dentry->d_parent to NULL in d_kill before
calling the ->release() callback.  If/when that behavior is changed, we can
revert this hack.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoALSA: HDA: Do not announce false surround in Conexant auto
David Henningsson [Wed, 16 Feb 2011 20:34:04 +0000 (21:34 +0100)]
ALSA: HDA: Do not announce false surround in Conexant auto

Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.

BugLink: http://bugs.launchpad.net/bugs/721126
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: HDA: Conexant auto: Handle multiple connections to ADC node
David Henningsson [Tue, 15 Feb 2011 18:57:09 +0000 (19:57 +0100)]
ALSA: HDA: Conexant auto: Handle multiple connections to ADC node

Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.

It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.

BugLink: http://bugs.launchpad.net/bugs/719524
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agogenirq: Implement irq_data based move_*_irq() versions
Thomas Gleixner [Fri, 4 Feb 2011 17:46:16 +0000 (18:46 +0100)]
genirq: Implement irq_data based move_*_irq() versions

No need to lookup the irq descriptor when calling from a chip callback
function which has irq_data already handy.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq; Add fasteoi irq_chip quirk
Thomas Gleixner [Tue, 15 Feb 2011 09:33:57 +0000 (10:33 +0100)]
genirq; Add fasteoi irq_chip quirk

Some chips want irq_eoi() only called when an interrupt is actually
handled. So they have checks for INPROGRESS and DISABLED in their
irq_eoi callbacks. Add a chip flag, which allows to handle that in the
generic code. No impact on the fastpath.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Add preflow handler support
Thomas Gleixner [Thu, 10 Feb 2011 14:14:20 +0000 (15:14 +0100)]
genirq: Add preflow handler support

sparc64 needs to call a preflow handler on certain interrupts befor
calling the action chain. Integrate it into handle_fasteoi_irq. Must
be enabled via CONFIG_IRQ_FASTEOI_PREFLOW. No impact when disabled.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
13 years agogenirq: Consolidate set_chip_handler functions
Thomas Gleixner [Mon, 14 Feb 2011 19:09:19 +0000 (20:09 +0100)]
genirq: Consolidate set_chip_handler functions

No need to have separate functions if we have one plus inline wrappers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Use irq_get/put functions
Thomas Gleixner [Sat, 12 Feb 2011 09:37:36 +0000 (10:37 +0100)]
genirq: Use irq_get/put functions

Convert the management functions to use the common irq_get/put
function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Implement irq_get/put_desc_[bus]locked/unlock()
Thomas Gleixner [Sat, 12 Feb 2011 11:16:16 +0000 (12:16 +0100)]
genirq: Implement irq_get/put_desc_[bus]locked/unlock()

Most of the managing functions get the irq descriptor and lock it -
either with or without buslock. Instead of open coding this over and
over provide a common function to do that.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Remove real old transition functions
Thomas Gleixner [Mon, 14 Feb 2011 19:16:43 +0000 (20:16 +0100)]
genirq: Remove real old transition functions

These transition helpers are stale for years now. Remove them.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y
Thomas Gleixner [Thu, 10 Feb 2011 21:01:25 +0000 (22:01 +0100)]
genirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y

If everything uses the right accessors, then enabling
GENERIC_HARDIRQS_NO_COMPAT should just work. If not it will tell you.

Don't be lazy and use the trick which I use in the core code!

git grep status_use_accessors

will unearth it in a split second. Offenders are tracked down and not
slapped with stinking trouts. This time we use frozen shark for a
better educational value.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Reflect IRQ_MOVE_PCNTXT in irq_data state
Thomas Gleixner [Thu, 10 Feb 2011 21:25:31 +0000 (22:25 +0100)]
genirq: Reflect IRQ_MOVE_PCNTXT in irq_data state

Required by x86.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Move wakeup state to irq_data
Thomas Gleixner [Thu, 10 Feb 2011 18:46:26 +0000 (19:46 +0100)]
genirq: Move wakeup state to irq_data

Some irq_chips need to know the state of wakeup mode for
setting the trigger type etc. Reflect it in irq_data state.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Add IRQCHIP_SET_TYPE_MASKED flag
Thomas Gleixner [Thu, 10 Feb 2011 12:16:14 +0000 (13:16 +0100)]
genirq: Add IRQCHIP_SET_TYPE_MASKED flag

irq_chips, which require to mask the chip before changing the trigger
type should set this flag. So the core takes care of it and the
requirement for looking into desc->status in the chip goes away.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
13 years agogenirq: Add flags to irq_chip
Thomas Gleixner [Thu, 10 Feb 2011 12:08:38 +0000 (13:08 +0100)]
genirq: Add flags to irq_chip

Looking through irq_chip implementations I noticed that some of them
have special requirements, like setting the type masked and therefor
fiddle in irq_desc->status. Add a flag field, so the core code can
handle it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Cleanup irq.h
Thomas Gleixner [Tue, 8 Feb 2011 16:27:18 +0000 (17:27 +0100)]
genirq: Cleanup irq.h

Put the constants into an enum and document them.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Force wrapped access to desc->status in core code
Thomas Gleixner [Wed, 9 Feb 2011 13:54:49 +0000 (14:54 +0100)]
genirq: Force wrapped access to desc->status in core code

Force the usage of wrappers by another nasty CPP substitution.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Wrap the remaning IRQ_* flags
Thomas Gleixner [Wed, 9 Feb 2011 13:44:17 +0000 (14:44 +0100)]
genirq: Wrap the remaning IRQ_* flags

Use wrappers to keep them away from the core code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>