10 years agox86: ioapic: Call free_irte only if interrupt remapping enabled
Yinghai Lu [Mon, 18 Oct 2010 20:47:48 +0000]
x86: ioapic: Call free_irte only if interrupt remapping enabled

On a system that support intr-rempping when booting with "intremap=off"

[  177.895501] BUG: unable to handle kernel NULL pointer dereference at 00000000000000f8
[  177.913316] IP: [<ffffffff8145fc18>] free_irte+0x47/0xc0
...
[  178.173326] Call Trace:
[  178.173574]  [<ffffffff810515b4>] destroy_irq+0x3a/0x75
[  178.192934]  [<ffffffff81051834>] arch_teardown_msi_irq+0xe/0x10
[  178.193418]  [<ffffffff81458dc3>] arch_teardown_msi_irqs+0x56/0x7f
[  178.213021]  [<ffffffff81458e79>] free_msi_irqs+0x8d/0xeb

Call free_irte only when interrupt remapping is enabled.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4CBCB274.7010108@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

10 years agoarm: Use ARCH_IRQ_INIT_FLAGS
Thomas Gleixner [Sat, 16 Oct 2010 19:17:08 +0000]
arm: Use ARCH_IRQ_INIT_FLAGS

The core code now initializes the requested number of interrupts and
sets the flags in irq_desc.status which are requested by the
architecture via ARCH_IRQ_INIT_FLAGS.

Add ARCH_IRQ_INIT_FLAGS and remove the loop which sets those flags
after the irq descriptors are allocated.

[ This patch should have been in the original irq rework and got
  dropped accidentaly ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Anand Gadiyar <gadiyar@ti.com>

10 years agogenirq, ARM: Fix boot on ARM platforms
Anand Gadiyar [Thu, 14 Oct 2010 17:29:57 +0000]
genirq, ARM: Fix boot on ARM platforms

Commit b683de2b3 in linux-next as of 20101014 (genirq: Query
arch for number of early descriptors) seems to have broken
bootup on several ARM boards - my beagleboard gives the
following dump with earlyprintk:

 NR_IRQS:402
 Unable to handle kernel NULL pointer dereference at virtual
 address 00000028 pgd = c0004000
 [00000028] *pgd=00000000
 Internal error: Oops: 5 [#1]
 last sysfs file:
 Modules linked in:
 CPU: 0    Not tainted
 (2.6.36-rc7-next-20101014-linux-next-20101012+ #40) PC is at
 init_IRQ+0x14/0x48 LR is at start_kernel+0x150/0x2c0
 [...]

We seem to be using desc->status without assigning desc to
anything. Fix this by adding back the code that was originally
there.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Tested-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
LKML-Reference: <1287077397-21781-1-git-send-email-gadiyar@ti.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Fix CONFIG_GENIRQ_NO_DEPRECATED=y build
Thomas Gleixner [Tue, 12 Oct 2010 19:58:27 +0000]
genirq: Fix CONFIG_GENIRQ_NO_DEPRECATED=y build

This option can be set to verify the full conversion to the new chip
functions. Fix the fallout of the patch rework, so the core code
compiles and works with it.

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

10 years agox86: Switch sparse_irq allocations to GFP_KERNEL
Thomas Gleixner [Wed, 6 Oct 2010 14:28:51 +0000]
x86: Switch sparse_irq allocations to GFP_KERNEL

No callers from atomic context (except boot) anymore.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Switch sparse_irq allocator to GFP_KERNEL
Thomas Gleixner [Tue, 5 Oct 2010 13:14:35 +0000]
genirq: Switch sparse_irq allocator to GFP_KERNEL

The allocator functions are now called outside of preempt disabled
regions. Switch to GFP_KERNEL.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Make sparse_lock a mutex
Thomas Gleixner [Fri, 8 Oct 2010 10:47:53 +0000]
genirq: Make sparse_lock a mutex

No callers from atomic regions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: lguest: Use new irq allocator
Thomas Gleixner [Thu, 30 Sep 2010 10:19:03 +0000]
x86: lguest: Use new irq allocator

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>

10 years agogenirq: Remove the now unused sparse irq leftovers
Thomas Gleixner [Wed, 29 Sep 2010 15:18:47 +0000]
genirq: Remove the now unused sparse irq leftovers

The move_irq_desc() function was only used due to the problem that the
allocator did not free the old descriptors. So the descriptors had to
be moved in create_irq_nr(). That's history.

The code would have never been able to move active interrupt
descriptors on affinity settings. That can be done in a completely
different way w/o all this horror.

Remove all of it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Sanitize dynamic irq handling
Thomas Gleixner [Wed, 29 Sep 2010 16:46:55 +0000]
genirq: Sanitize dynamic irq handling

Use the cleanup functions of the dynamic allocator. No need to have
separate implementations.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Remove arch_init_chip_data()
Thomas Gleixner [Wed, 29 Sep 2010 16:44:23 +0000]
genirq: Remove arch_init_chip_data()

This function should have not been there in the first place.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: xen: Sanitise sparse_irq handling
Thomas Gleixner [Wed, 29 Sep 2010 15:37:10 +0000]
x86: xen: Sanitise sparse_irq handling

There seems to be more cleanups possible, but that's left to the xen
experts :)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>

10 years agox86: Use sane enumeration
Thomas Gleixner [Thu, 30 Sep 2010 09:26:43 +0000]
x86: Use sane enumeration

Instead of looping through all interrupts, use the bitmap lookup to
find the next.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: uv: Clean up the direct access to irq_desc
Thomas Gleixner [Thu, 30 Sep 2010 09:43:08 +0000]
x86: uv: Clean up the direct access to irq_desc

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Make io_apic.c local functions static
Thomas Gleixner [Mon, 4 Oct 2010 19:08:56 +0000]
x86: Make io_apic.c local functions static

No users outside of io_apic.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Remove irq_2_iommu
Thomas Gleixner [Mon, 11 Oct 2010 10:21:18 +0000]
genirq: Remove irq_2_iommu

irq_2_iommu is now in the x86 code where it belongs. Remove all
leftovers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: Speed up the irq_remapped check in hot pathes
Thomas Gleixner [Mon, 11 Oct 2010 09:55:37 +0000]
x86: Speed up the irq_remapped check in hot pathes

irq_2_iommu is in struct irq_cfg, so we can do the irq_remapped check
based on irq_cfg instead of going through a lookup function. That's
especially interesting in the eoi_ioapic_irq() hotpath.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agointr_remap: Simplify the code further
Thomas Gleixner [Sun, 10 Oct 2010 10:34:27 +0000]
intr_remap: Simplify the code further

Having irq_2_iommu in struct irq_cfg allows further simplifications.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agointr_remap: Use irq_2_iommu in struct irq_cfg
Thomas Gleixner [Sun, 10 Oct 2010 10:29:27 +0000]
intr_remap: Use irq_2_iommu in struct irq_cfg

Switch the intr_remapping code to use the irq_2_iommu struct in
irg_cfg.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: Embedd irq_2_iommu into irq_cfg
Thomas Gleixner [Sun, 10 Oct 2010 09:39:09 +0000]
x86: Embedd irq_2_iommu into irq_cfg

That interrupt remapping code is x86 specific and tied to the io_apic
code. No need for separate allocator functions in the interrupt
remapping code. This allows to simplify the code and irq_2_iommu is
small (13 bytes on 64bit) so it's not a real problem even if interrupt
remapping is runtime disabled. If it's compile time disabled the
impact is zero.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agopci: intr_remap: Remove unused functions
Thomas Gleixner [Mon, 4 Oct 2010 16:41:37 +0000]
pci: intr_remap: Remove unused functions

No users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agopci: intr_remap: Use irq_data
Thomas Gleixner [Mon, 4 Oct 2010 14:51:27 +0000]
pci: intr_remap: Use irq_data

No need to dereference irq_desc.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agopci: intr-remap: Free irte memory if SPARSE_IRQ=y
Thomas Gleixner [Mon, 4 Oct 2010 14:20:16 +0000]
pci: intr-remap: Free irte memory if SPARSE_IRQ=y

With SPARSE_IRQ=y the irte descriptors are dynamically allocated, but not
freed in free_irte().

That was ok as long as the sparse irq core was not freeing irq descriptors on
destroy_irq(). Now we leak the irte descriptor. Free it in free_irte().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: io_apic: Remove the now unused sparse_irq arch_* functions
Thomas Gleixner [Fri, 8 Oct 2010 08:40:53 +0000]
x86: io_apic: Remove the now unused sparse_irq arch_* functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: ioapic: Cleanup sparse irq code
Thomas Gleixner [Tue, 28 Sep 2010 18:34:53 +0000]
x86: ioapic: Cleanup sparse irq code

Switch over to the new allocator and remove all the magic which was
caused by the unability to destroy irq descriptors. Get rid of the
create_irq_nr() loop for sparse and non sparse irq.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Don't setup ioapic irq for sci twice
Yinghai Lu [Sat, 9 Oct 2010 05:44:02 +0000]
x86: Don't setup ioapic irq for sci twice

The sparseirq rework triggered a warning in the iommu code, which was
caused by setting up ioapic for ACPI irq 9 twice. This function is
solely to handle interrupts which are on a secondary ioapic and
outside the legacy irq range.

Replace the sparse irq_to_desc check with a non ifdeffed version.

[ tglx: Moved it before the ioapic sparse conversion and simplified
   the inverse logic ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4CB00122.3030301@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: io_apic: Prepare alloc/free_irq_cfg()
Thomas Gleixner [Fri, 8 Oct 2010 08:44:21 +0000]
x86: io_apic: Prepare alloc/free_irq_cfg()

Rename the grossly misnamed get_one_free_irq_cfg() to alloc_irq_cfg().
Add a (not yet used) irq number argument to free_irq_cfg()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Implement new allocator functions
Thomas Gleixner [Wed, 6 Oct 2010 20:14:21 +0000]
x86: Implement new allocator functions

Implement new allocator functions which make use of the core changes.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: ioapic: Cleanup get_one_free_irq_cfg()
Thomas Gleixner [Wed, 6 Oct 2010 20:07:03 +0000]
x86: ioapic: Cleanup get_one_free_irq_cfg()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: ioapic: Cleanup some more
Thomas Gleixner [Tue, 28 Sep 2010 21:31:50 +0000]
x86: ioapic: Cleanup some more

Cleanup after the irq_chip conversion a bit.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Convert ht set_affinity to new chip function
Thomas Gleixner [Fri, 8 Oct 2010 20:31:46 +0000]
x86: Convert ht set_affinity to new chip function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: Cleanup hpet affinity setting
Thomas Gleixner [Fri, 8 Oct 2010 20:21:26 +0000]
x86: Cleanup hpet affinity setting

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Convert dmar affinity setting to new chip function
Thomas Gleixner [Fri, 8 Oct 2010 20:19:29 +0000]
x86: Convert dmar affinity setting to new chip function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>

10 years agox86: Convert remapped msi to new chip.irq_set_affinity function
Thomas Gleixner [Fri, 8 Oct 2010 20:15:49 +0000]
x86: Convert remapped msi to new chip.irq_set_affinity function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: Convert remapped ioapic affinity setting to new irq chip function
Thomas Gleixner [Fri, 8 Oct 2010 19:50:22 +0000]
x86: Convert remapped ioapic affinity setting to new irq chip function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>

10 years agox86: Convert msi affinity setting to new chip functions
Thomas Gleixner [Fri, 8 Oct 2010 19:49:03 +0000]
x86: Convert msi affinity setting to new chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agox86: Prepare the affinity common functions for taking struct irq_data *
Thomas Gleixner [Fri, 8 Oct 2010 19:40:23 +0000]
x86: Prepare the affinity common functions for taking struct irq_data *

While at it rename it to sensible function names and fix the return
value from unsigned to int for __ioapic_set_affinity (set_desc_affinity).
Returning -1 in a function returning unsigned int is somewhat strange.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: ioapic: Clean up the direct access to irq_desc
Thomas Gleixner [Tue, 28 Sep 2010 15:28:38 +0000]
x86: ioapic: Clean up the direct access to irq_desc

Most of it is useless pseudo optimization.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agoht: Convert to new irq_chip functions
Thomas Gleixner [Tue, 28 Sep 2010 15:22:09 +0000]
ht: Convert to new irq_chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agodmar: Convert to new irq chip functions
Thomas Gleixner [Tue, 28 Sep 2010 15:15:11 +0000]
dmar: Convert to new irq chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: David Woodhouse <dwmw2@infradead.org>

10 years agox86: ioapic/hpet: Convert to new chip functions
Thomas Gleixner [Tue, 28 Sep 2010 14:18:39 +0000]
x86: ioapic/hpet: Convert to new chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: ioapic: Convert mask to new irq_chip function
Thomas Gleixner [Tue, 28 Sep 2010 14:03:54 +0000]
x86: ioapic: Convert mask to new irq_chip function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: io_apic: Convert startup to new irq_chip function
Thomas Gleixner [Tue, 28 Sep 2010 14:00:34 +0000]
x86: io_apic: Convert startup to new irq_chip function

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Cleanup io_apic
Thomas Gleixner [Tue, 28 Sep 2010 13:18:35 +0000]
x86: Cleanup io_apic

Sanitize functions. Remove irq_desc pointer magic.
Preparatory patch for further cleanups.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Cleanup access to irq_data
Thomas Gleixner [Fri, 24 Sep 2010 10:26:18 +0000]
x86: Cleanup access to irq_data

Fixup the open coded access to
      irq_desc->[handler_data|chip_data|msi-desc]

Use the macros and inline functions for it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: i8259: Convert to new irq_chip functions
Thomas Gleixner [Tue, 28 Sep 2010 13:01:33 +0000]
x86: i8259: Convert to new irq_chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Cleanup visws interrupt handling
Thomas Gleixner [Tue, 28 Sep 2010 12:59:58 +0000]
x86: Cleanup visws interrupt handling

Remove the open coded access to irq_desc and convert to the new irq
chip functions. Change the mask function of piix4_virtual_irq_type so
we can use the generic irq handling function for the virtual interrupt
instead of open coding it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: lguest: Convert to new irq chip functions
Thomas Gleixner [Tue, 28 Sep 2010 12:57:24 +0000]
x86: lguest: Convert to new irq chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>

10 years agox86: Sanitize apb timer interrupt handling
Thomas Gleixner [Tue, 28 Sep 2010 09:11:10 +0000]
x86: Sanitize apb timer interrupt handling

Disable the interrupt in CPU_DEAD where it belongs. Remove the
open coded irq_desc manipulation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>

10 years agox86: Convert irq_chip access to new functions
Thomas Gleixner [Fri, 8 Oct 2010 18:24:58 +0000]
x86: Convert irq_chip access to new functions

Before moving the irq chips to the new functions, fixup direct callers.

The cpu offline irq fixup code needs to become generic and archs need
to honour the "force" flag as an indicator, but that's for later.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Remove useless reinitialization of irq descriptors
Thomas Gleixner [Mon, 27 Sep 2010 22:15:31 +0000]
x86: Remove useless reinitialization of irq descriptors

The descriptors are already initialized in exactly this way.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agopci: Cleanup the irq_desc mess in msi
Thomas Gleixner [Tue, 28 Sep 2010 17:09:51 +0000]
pci: Cleanup the irq_desc mess in msi

Handing down irq_desc to msi just so that msi can access
irq_desc.irq_data.msi_desc is a pretty stupid idea. The calling code
can hand down a pointer to msi_desc so msi code does not need to know
about the irq descriptor at all.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>

10 years agopci: Convert msi to new irq_chip functions
Thomas Gleixner [Tue, 28 Sep 2010 14:46:51 +0000]
pci: Convert msi to new irq_chip functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Russell King <linux@arm.linux.org.uk>

10 years agoMerge branch 'x86/urgent' of into irq/sparseirq
Thomas Gleixner [Tue, 12 Oct 2010 14:41:22 +0000]
Merge branch 'x86/urgent' of into irq/sparseirq

Reason: Pull in the latest io_apic bugfixes

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

10 years agoMerge branch 'x86/cleanups' into irq/sparseirq
Thomas Gleixner [Tue, 12 Oct 2010 14:40:34 +0000]
Merge branch 'x86/cleanups' into irq/sparseirq

Reason: Avoid conflicts with removal of boot_cpu_id

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

10 years agoMerge branch 'x86/x2apic' into irq/sparseirq
Thomas Gleixner [Tue, 12 Oct 2010 14:39:44 +0000]
Merge branch 'x86/x2apic' into irq/sparseirq

Reason: Avoid conflicts with the x2apic modifications

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

10 years agogenirq: Query arch for number of early descriptors
Thomas Gleixner [Mon, 27 Sep 2010 18:55:03 +0000]
genirq: Query arch for number of early descriptors

sparse irq sets up NR_IRQS_LEGACY irq descriptors and archs then go
ahead and allocate more.

Use the unused return value of arch_probe_nr_irqs() to let the
architecture return the number of early allocations. Fix up all users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Use sane sparse allocator
Thomas Gleixner [Mon, 27 Sep 2010 18:02:56 +0000]
genirq: Use sane sparse allocator

Make irq_to_desc_alloc_node() a wrapper around the new allocator.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq-update-kerneldoc.patch
Thomas Gleixner [Thu, 30 Sep 2010 18:33:11 +0000]
genirq-update-kerneldoc.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Implement irq reservation
Thomas Gleixner [Tue, 12 Oct 2010 10:31:46 +0000]
genirq: Implement irq reservation

Mark a range of interrupts as allocated. In the SPARSE_IRQ=n case we
need this to update the bitmap for the legacy irqs so the enumerator
via irq_get_next_irq() works.

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

10 years agogenirq: Implement sane enumeration
Thomas Gleixner [Thu, 30 Sep 2010 08:45:07 +0000]
genirq: Implement sane enumeration

Use the allocator bitmap to lookup active interrupts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Prepare proc for real sparse irq support
Thomas Gleixner [Thu, 30 Sep 2010 00:46:07 +0000]
genirq: Prepare proc for real sparse irq support

/proc/irq never removes any entries, but when irq descriptors can be
freed for real this is necessary. Otherwise we'd reference a freed
descriptor in /proc/irq/N

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Implement a sane sparse_irq allocator
Thomas Gleixner [Mon, 27 Sep 2010 15:48:26 +0000]
genirq: Implement a sane sparse_irq allocator

The current sparse_irq allocator has several short comings due to
failures in the design or the lack of it:

 - Requires iteration over the number of active irqs to find a free slot
   (Some architectures have grown their own workarounds for this)
 - Removal of entries is not possible
 - Racy between create_irq_nr and destroy_irq (plugged by horrible
   callbacks)
 - Migration of active irq descriptors is not possible
 - No bulk allocation of irq ranges
 - Sprinkeled irq_desc references all over the place outside of kernel/irq/
   (The previous chip functions series is addressing this issue)

Implement a sane allocator which fixes the above short comings (though
migration of active descriptors needs a full tree wide cleanup of the
direct and mostly unlocked access to irq_desc).

The new allocator still uses a radix_tree, but uses a bitmap for
keeping track of allocated irq numbers. That allows:

 - Fast lookup of a free slot
 - Allows the removal of descriptors
 - Prevents the create/destroy race
 - Bulk allocation of consecutive irq ranges
 - Basic design is ready for migration of life descriptors after
   further cleanups

The bitmap is also used in the SPARSE_IRQ=n case for lookup and
raceless (de)allocation of irq numbers. So it removes the requirement
for looping through the descriptor array to find slots.

Right now it uses sparse_irq_lock to protect the bitmap and the radix
tree, but after cleaning up all users we should be able convert that
to a mutex and to switch the radix_tree and decriptor allocations to
GFP_KERNEL.

[ Folded in a bugfix from Yinghai Lu ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide default irq init flags
Thomas Gleixner [Mon, 27 Sep 2010 19:01:37 +0000]
genirq: Provide default irq init flags

Arch code sets it's own irq_desc.status flags right after boot and for
dynamically allocated interrupts. That might involve iterating over a
huge array.

Allow ARCH_IRQ_INIT_FLAGS to set separate flags aside of IRQ_DISABLED
which is the default.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Remove export of kstat_irqs_cpu
Thomas Gleixner [Mon, 27 Sep 2010 15:45:49 +0000]
genirq: Remove export of kstat_irqs_cpu

The statistics accessor is only used by proc/stats and
show_interrupts(). Both are compiled in.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agoisdn: hisax: Replace the bogus access to irq stats
Thomas Gleixner [Wed, 29 Sep 2010 20:16:36 +0000]
isdn: hisax: Replace the bogus access to irq stats

Abusing irq stats in a driver for counting interrupts is a horrible
idea and not safe with shared interrupts. Replace it by a local
interrupt counter.

Noticed by the attempt to remove the irq stats export.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Remove early_init_irq_lock_class()
Thomas Gleixner [Wed, 22 Sep 2010 13:58:45 +0000]
genirq: Remove early_init_irq_lock_class()

early_init_irq_lock_class() is called way before anything touches the
irq descriptors. In case of SPARSE_IRQ=y this is a NOP operation
because the radix tree is empty at this point. For the SPARSE_IRQ=n
case it's sufficient to set the lock class in early_init_irq().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Distangle kernel/irq/handle.c
Thomas Gleixner [Wed, 22 Sep 2010 15:09:43 +0000]
genirq: Distangle kernel/irq/handle.c

kernel/irq/handle.c has become a dumpground for random code in random
order. Split out the irq descriptor management and the dummy irq_chip
implementation into separate files. Cleanup the include maze while at
it.

No code change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Sanitize irq_data accessors
Thomas Gleixner [Tue, 28 Sep 2010 15:34:01 +0000]
genirq: Sanitize irq_data accessors

Get the data structure from the core and provide inline wrappers to
access the irq_data members.

Provide accessor inlines for irq_data as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide status modifier
Thomas Gleixner [Tue, 28 Sep 2010 08:40:18 +0000]
genirq: Provide status modifier

Provide a irq_desc.status modifier function to cleanup the direct
access to irq_desc in arch and driver code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Remove unsused inline
Thomas Gleixner [Mon, 4 Oct 2010 11:47:12 +0000]
genirq: Remove unsused inline

move_irq() has no users. Remove it and simplify the ifdef forrest while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Distangle irq.h
Thomas Gleixner [Fri, 1 Oct 2010 14:03:45 +0000]
genirq: Distangle irq.h

Move irq_desc and internal functions out of irq.h

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agomfd: twl4030: Fix dummy irq chip usage
Thomas Gleixner [Fri, 8 Oct 2010 13:33:01 +0000]
mfd: twl4030: Fix dummy irq chip usage

The twl irqchip uses the dummy irq chip ack functions, which is NULL
now. Switch it over to use irq_ack.

Reported-and-tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

10 years agogenirq: Provide config option to disable deprecated code
Thomas Gleixner [Fri, 1 Oct 2010 13:17:14 +0000]
genirq: Provide config option to disable deprecated code

This option covers now the old chip functions and the irq_desc data
fields which are moving to struct irq_data. More stuff will follow.

Pretty handy for testing a conversion, whether something broke or not.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->retrigger()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:53 +0000]
genirq: Provide compat handling for chip->retrigger()

Wrap the old chip function retrigger() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121843.025801092@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->set_wake()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:50 +0000]
genirq: Provide compat handling for chip->set_wake()

Wrap the old chip function set_wake() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.927527393@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->set_type()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:47 +0000]
genirq: Provide compat handling for chip->set_type()

Wrap the old chip function set_type() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.832261548@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->set_affinity()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:41 +0000]
genirq: Provide compat handling for chip->set_affinity()

Wrap the old chip function set_affinity() until the migration is
complete and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.732894108@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->startup()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:38 +0000]
genirq: Provide compat handling for chip->startup()

Wrap the old chip function startup() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.635152961@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->disable()/shutdown()
Thomas Gleixner [Mon, 27 Sep 2010 12:45:02 +0000]
genirq: Provide compat handling for chip->disable()/shutdown()

Wrap the old chip functions disable() and shutdown() until the
migration is complete and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.532070631@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->enable()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:56 +0000]
genirq: Provide compat handling for chip->enable()

Wrap the old chip function enable() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.437159182@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->eoi()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:53 +0000]
genirq: Provide compat handling for chip->eoi()

Wrap the old chip function eoi() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.339657617@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->mask_ack()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:50 +0000]
genirq: Provide compat handling for chip->mask_ack()

Wrap the old chip function mask_ack() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.240806983@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->ack()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:47 +0000]
genirq: Provide compat handling for chip->ack()

Wrap the old chip function ack() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.142624725@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->unmask()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:44 +0000]
genirq: Provide compat handling for chip->unmask()

Wrap the old chip function unmask() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.043608928@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for chip->mask()
Thomas Gleixner [Mon, 27 Sep 2010 12:44:42 +0000]
genirq: Provide compat handling for chip->mask()

Wrap the old chip function mask() until the migration is complete and
the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121841.940355859@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide compat handling for bus_lock/bus_sync_unlock
Thomas Gleixner [Mon, 27 Sep 2010 12:44:35 +0000]
genirq: Provide compat handling for bus_lock/bus_sync_unlock

Wrap the old chip functions for bus_lock/bus_sync_unlock until the
migration is complete and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121841.842536121@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Add new functions to dummy chips
Thomas Gleixner [Fri, 1 Oct 2010 12:44:58 +0000]
genirq: Add new functions to dummy chips

The compat functions go away when the core code is converted.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide advanced irq chip functions
Thomas Gleixner [Mon, 27 Sep 2010 12:44:32 +0000]
genirq: Provide advanced irq chip functions

The low level irq chip functions want access to irq_desc->irq_data.
Provide new functions which hand down irq_data instead of the irq
number so these functions avoid to call irq_to_desc() which is a radix
tree lookup in case of sparse irq.

This provides all the old functions except one: end(). end() is a
relict of __do_IRQ() and will just go away with the __do_IRQ() code.

The replacement for set_affinity() has an extra argument "bool
force". The reason for this is to notify the low level code, that the
move has to be done right away and cannot be delayed until the next
interrupt happens. That's necessary to handle the irq fixup on cpu
unplug in the generic code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121841.742126604@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Convert core code to irq_data
Thomas Gleixner [Fri, 1 Oct 2010 10:58:38 +0000]
genirq: Convert core code to irq_data

Convert all references in the core code to orq, chip, handler_data,
chip_data, msi_desc, affinity to irq_data.*

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Create irq_data
Thomas Gleixner [Mon, 27 Sep 2010 12:44:25 +0000]
genirq: Create irq_data

Low level chip functions need access to irq_desc->handler_data,
irq_desc->chip_data and irq_desc->msi_desc. We hand down the irq
number to the low level functions, so they need to lookup irq_desc.
With sparse irq this means a radix tree lookup.

We could hand down irq_desc itself, but low level chip functions have
no need to fiddle with it directly and we want to restrict access to
irq_desc further.

Preparatory patch for new chip functions.

Note, that the ugly anon union/struct is there to avoid a full tree
wide clean up for now. This is not going to last 3 years like __do_IRQ()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121841.645542300@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86: Use genirq Kconfig
Thomas Gleixner [Mon, 27 Sep 2010 12:46:02 +0000]
x86: Use genirq Kconfig

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121843.314600915@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agogenirq: Provide Kconfig
Thomas Gleixner [Mon, 27 Sep 2010 12:45:59 +0000]
genirq: Provide Kconfig

The generic irq Kconfig options are copied around all archs. Provide a
generic Kconfig file which can be included.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121843.217333624@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agoisdn: Free irq_data namespace
Thomas Gleixner [Sun, 3 Oct 2010 18:08:13 +0000]
isdn: Free irq_data namespace

The irq_data namespace is the preference for the generic irq
layer. Rename the union typedef in drivers/isdn/act2000/act2000.h

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agomfd: Rename struct irq_data to struct sih_irq_data
Thomas Gleixner [Fri, 1 Oct 2010 14:35:59 +0000]
mfd: Rename struct irq_data to struct sih_irq_data

struct irq_data is the preferred name for the data associated to an
interrupt in the core code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

10 years agox86, hpet: Fix bogus error check in hpet_assign_irq()
Thomas Gleixner [Tue, 28 Sep 2010 21:20:23 +0000]
x86, hpet: Fix bogus error check in hpet_assign_irq()

create_irq() returns -1 if the interrupt allocation failed, but the
code checks for irq == 0.

Use create_irq_nr() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Venkatesh Pallipadi <venki@google.com>
LKML-Reference: <alpine.LFD.2.00.1009282310360.2416@localhost6.localdomain6>
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

10 years agox86, irq: Plug memory leak in sparse irq
Thomas Gleixner [Tue, 28 Sep 2010 18:57:19 +0000]
x86, irq: Plug memory leak in sparse irq

free_irq_cfg() is not freeing the cpumask_vars in irq_cfg. Fixing this
triggers a use after free caused by the fact that copying struct
irq_cfg is done with memcpy, which copies the pointer not the cpumask.

Fix both places.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
LKML-Reference: <alpine.LFD.2.00.1009282052570.2416@localhost6.localdomain6>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

10 years agox86, cpu: After uncapping CPUID, re-run CPU feature detection
H. Peter Anvin [Tue, 28 Sep 2010 22:35:01 +0000]
x86, cpu: After uncapping CPUID, re-run CPU feature detection

After uncapping the CPUID level, we need to also re-run the CPU
feature detection code.

This resolves kernel bugzilla 16322.

Reported-by: boris64 <bugzilla.kernel.org@boris64.net>
Cc: <stable@kernel.org> v2.6.29..2.6.35
LKML-Reference: <tip-@git.kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

10 years agoalpha: fix compile problem in arch/alpha/kernel/signal.c
Linus Torvalds [Tue, 28 Sep 2010 20:26:57 +0000]
alpha: fix compile problem in arch/alpha/kernel/signal.c

Tssk.  Apparently Al hadn't checked commit c52c2ddc1dfa ("alpha: switch
osf_sigprocmask() to use of sigprocmask()") at all. It doesn't compile.

Fixed as per suggestions from Michael Cree.

Reported-by: Michael Cree <mcree@orcon.net.nz>
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

10 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 28 Sep 2010 19:38:52 +0000]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: fix module refcount breakage introduced by libahci split