13 Jan, 2012

1 commit


09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • devicetree/next changes queued for v3.3 merge window

    * tag 'devicetree-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6:
    ARM: prom.h: Fix build error by removing unneeded header file
    irq: check domain hwirq range for DT translate
    dt: add empty of_get_node/of_put_node functions
    of/pdt: fix section mismatch warning
    i2c-designware: add OF binding support
    dt/i2c: Enumerate some of the known trivial i2c devices
    dt: reform for_each_property to for_each_property_of_node
    ARM/of: allow *machine_desc.dt_compat to be const
    of/base: Take NULL string into account for property with multiple strings
    OF/device-tree: Add some entries to vendor-prefixes.txt

    Fix up trivial add-add conflicts in include/linux/of.h

    Linus Torvalds
     

05 Jan, 2012

1 commit


28 Dec, 2011

1 commit


24 Dec, 2011

1 commit

  • irqdomain support is used in interrupt controller drivers that may not
    have device tree support but only need the basic HW->Linux irq
    translation. Rather than having each of these implement their own IRQ
    domain, allow them to use the simple ops.

    Acked-by: Thomas Gleixner
    Acked-by: Rob Herring
    Cc: Grant Likely
    Signed-off-by: Jamie Iles
    Signed-off-by: Russell King

    Jamie Iles
     

02 Dec, 2011

1 commit

  • In irq_wait_for_interrupt(), the should_stop member is verified before
    setting the task's state to TASK_INTERRUPTIBLE and calling schedule().
    In case kthread_stop sets should_stop and wakes up the process after
    should_stop is checked by the irq thread but before the task's state
    is changed, the irq thread might never exit:

    kthread_stop irq_wait_for_interrupt
    ------------ ----------------------

    ...
    ... while (!kthread_should_stop()) {
    kthread->should_stop = 1;
    wake_up_process(k);
    wait_for_completion(&kthread->exited);
    ...
    set_current_state(TASK_INTERRUPTIBLE);

    ...

    schedule();
    }

    Fix this by checking if the thread should stop after modifying the
    task's state.

    [ tglx: Simplified it a bit ]

    Signed-off-by: Ido Yariv
    Link: http://lkml.kernel.org/r/1322740508-22640-1-git-send-email-ido@wizery.com
    Signed-off-by: Thomas Gleixner
    Cc: stable@kernel.org

    Ido Yariv
     

29 Nov, 2011

2 commits

  • * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Don't allow per cpu interrupts to be suspended

    Linus Torvalds
     
  • Commit fa27271bc8d2("genirq: Fixup poll handling") introduced a
    regression that broke irqfixup/irqpoll for some hardware configurations.

    Amidst reorganizing 'try_one_irq', that patch removed a test that
    checked for 'action->handler' returning IRQ_HANDLED, before acting on
    the interrupt. Restoring this test back returns the functionality lost
    since 2.6.39. In the current set of tests, after 'action' is set, it
    must precede '!action->next' to take effect.

    With this and my previous patch to irq/spurious.c, c75d720fca8a, all
    IRQ regressions that I have encountered are fixed.

    Signed-off-by: Edward Donovan
    Reported-and-tested-by: Rogério Brito
    Cc: Thomas Gleixner
    Cc: stable@kernel.org (2.6.39+)
    Signed-off-by: Linus Torvalds

    Edward Donovan
     

18 Nov, 2011

1 commit

  • The power management functions related to interrupts do not know
    (yet) about per-cpu interrupts and end up calling the wrong
    low-level methods to enable/disable interrupts.

    This leads to all kind of interesting issues (action taken on one
    CPU only, updating a refcount which is not used otherwise...).

    The workaround for the time being is simply to flag these interrupts
    with IRQF_NO_SUSPEND. At least on ARM, these interrupts are actually
    dealt with at the architecture level.

    Reported-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Signed-off-by: Marc Zyngier
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1321446459-31409-1-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

17 Nov, 2011

1 commit


14 Nov, 2011

1 commit


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

03 Nov, 2011

1 commit

  • commit d05c65fff0 ("genirq: spurious: Run only one poller at a time")
    introduced a regression, leaving the boot options 'irqfixup' and
    'irqpoll' non-functional. The patch placed tests in each function, to
    exit if the function is already running. The test in 'misrouted_irq'
    exited when it should have proceeded, effectively disabling
    'misrouted_irq' and 'poll_spurious_irqs'.

    The check for an already running poller needs to be "!= 1" not "== 1"
    as "1" is the value when the first poller starts running.

    Signed-off-by: Edward Donovan
    Cc: maciej.rutecki@gmail.com
    Link: http://lkml.kernel.org/r/1320175784-6745-1-git-send-email-edward.donovan@numble.net
    Cc: stable@vger.kernel.org # >= 2.6.39
    Signed-off-by: Thomas Gleixner

    Edward Donovan
     

02 Nov, 2011

1 commit

  • * 'next/dt' of git://git.linaro.org/people/arnd/arm-soc:
    ARM: gic: use module.h instead of export.h
    ARM: gic: fix irq_alloc_descs handling for sparse irq
    ARM: gic: add OF based initialization
    ARM: gic: add irq_domain support
    irq: support domains with non-zero hwirq base
    of/irq: introduce of_irq_init
    ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
    ARM: at91: dt: at91sam9g45 family and board device tree files
    arm/mx5: add device tree support for imx51 babbage
    arm/mx5: add device tree support for imx53 boards
    ARM: msm: Add devicetree support for msm8660-surf
    msm_serial: Add devicetree support
    msm_serial: Use relative resources for iomem

    Fix up conflicts in arch/arm/mach-at91/{at91sam9260.c,at91sam9g45.c}

    Linus Torvalds
     

01 Nov, 2011

2 commits

  • Recent commit "irq: Track the owner of irq descriptor" in
    commit ID b6873807a7143b7 placed module.h into linux/irq.h
    but we are trying to limit module.h inclusion to just C files
    that really need it, due to its size and number of children
    includes. This targets just reversing that include.

    Add in the basic "struct module" since that is all we really need
    to ensure things compile. In theory, b687380 should have added the
    module.h include to the irqdesc.h header as well, but the implicit
    module.h everywhere presence masked this from showing up. So give
    it the "struct module" as well.

    As for the C files, irqdesc.c is only using THIS_MODULE, so it
    does not need module.h - give it export.h instead. The C file
    irq/manage.c is now (as of b687380) using try_module_get and
    module_put and so it needs module.h (which it already has).

    Also convert the irq_alloc_descs variants to macros, since all
    they really do is is call the __irq_alloc_descs primitive.
    This avoids including export.h and no debug info is lost.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • These files were getting via an implicit non-obvious
    path, but we want to crush those out of existence since they cost
    time during compiles of processing thousands of lines of headers
    for no reason. Give them the lightweight header that just contains
    the EXPORT_SYMBOL infrastructure.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

31 Oct, 2011

1 commit

  • Interrupt controllers can have non-zero starting value for h/w irq numbers.
    Adding support in irq_domain allows the domain hwirq numbering to match
    the interrupt controllers' numbering.

    As this makes looping over irqs for a domain more complicated, add loop
    iterators to iterate over all hwirqs and irqs for a domain.

    Signed-off-by: Rob Herring
    Reviewed-by: Jamie Iles
    Tested-by: Thomas Abraham
    Acked-by: Grant Likely
    Acked-by: Thomas Gleixner

    Rob Herring
     

30 Oct, 2011

1 commit


29 Oct, 2011

1 commit

  • * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
    h8300: Move gpio.h to gpio-internal.h
    gpio: pl061: add DT binding support
    gpio: fix build error in include/asm-generic/gpio.h
    gpiolib: Ensure struct gpio is always defined
    irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip
    gpio-ml-ioh: Use NUMA_NO_NODE not GFP_KERNEL
    gpio-pch: Use NUMA_NO_NODE not GFP_KERNEL
    gpio: langwell: ensure alternate function is cleared
    gpio-pch: Support interrupt function
    gpio-pch: Save register value in suspend()
    gpio-pch: modify gpio_nums and mask
    gpio-pch: support ML7223 IOH n-Bus
    gpio-pch: add spinlock in suspend/resume processing
    gpio-pch: Delete invalid "restore" code in suspend()
    gpio-ml-ioh: Fix suspend/resume issue
    gpio-ml-ioh: Support interrupt function
    gpio-ml-ioh: Delete unnecessary code
    gpio/mxc: add chained_irq_enter/exit() to mx3_gpio_irq_handler()
    gpio/nomadik: use genirq core to track enablement
    gpio/nomadik: disable clocks when unused

    Linus Torvalds
     

26 Oct, 2011

1 commit


25 Oct, 2011

1 commit


24 Oct, 2011

1 commit

  • Some functions of irq generic-chip is undefined, because
    EXPORT_SYMBOL_GPL is not set to these.

    ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
    ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-pch.ko] undefined!
    ERROR: "irq_setup_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!
    ERROR: "irq_alloc_generic_chip" [drivers/gpio/gpio-ml-ioh.ko] undefined!

    This is revised that EXPORT_SYMBOL_GPL can be added and referred
    to in functions.

    Signed-off-by: Nobuhiro Iwamatsu
    Acked-by: Thomas Gleixner
    Signed-off-by: Grant Likely

    Nobuhiro Iwamatsu
     

17 Oct, 2011

1 commit

  • This adds a mechanism to resume selected IRQs during syscore_resume
    instead of dpm_resume_noirq.

    Under Xen we need to resume IRQs associated with IPIs early enough
    that the resched IPI is unmasked and we can therefore schedule
    ourselves out of the stop_machine where the suspend/resume takes
    place.

    This issue was introduced by 676dc3cf5bc3 "xen: Use IRQF_FORCE_RESUME".

    Signed-off-by: Ian Campbell
    Cc: Rafael J. Wysocki
    Cc: Jeremy Fitzhardinge
    Cc: xen-devel
    Cc: Konrad Rzeszutek Wilk
    Link: http://lkml.kernel.org/r/1318713254.11016.52.camel@dagon.hellion.org.uk
    Cc: stable@kernel.org (at least to 2.6.32.y)
    Signed-off-by: Thomas Gleixner

    Ian Campbell
     

05 Oct, 2011

1 commit


03 Oct, 2011

2 commits

  • As request_percpu_irq() doesn't allow for a percpu interrupt to have
    its type configured (it is generally impossible to configure it on all
    CPUs at once), add a 'type' argument to enable_percpu_irq().

    This allows some low-level, board specific init code to be switched to
    a generic API.

    [ tglx: Added WARN_ON argument ]

    Signed-off-by: Marc Zyngier
    Cc: Abhijeet Dharmapurikar
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     
  • The ARM GIC interrupt controller offers per CPU interrupts (PPIs),
    which are usually used to connect local timers to each core. Each CPU
    has its own private interface to the GIC, and only sees the PPIs that
    are directly connect to it.

    While these timers are separate devices and have a separate interrupt
    line to a core, they all use the same IRQ number.

    For these devices, request_irq() is not the right API as it assumes
    that an IRQ number is visible by a number of CPUs (through the
    affinity setting), but makes it very awkward to express that an IRQ
    number can be handled by all CPUs, and yet be a different interrupt
    line on each CPU, requiring a different dev_id cookie to be passed
    back to the handler.

    The *_percpu_irq() functions is designed to overcome these
    limitations, by providing a per-cpu dev_id vector:

    int request_percpu_irq(unsigned int irq, irq_handler_t handler,
    const char *devname, void __percpu *percpu_dev_id);
    void free_percpu_irq(unsigned int, void __percpu *);
    int setup_percpu_irq(unsigned int irq, struct irqaction *new);
    void remove_percpu_irq(unsigned int irq, struct irqaction *act);
    void enable_percpu_irq(unsigned int irq);
    void disable_percpu_irq(unsigned int irq);

    The API has a number of limitations:
    - no interrupt sharing
    - no threading
    - common handler across all the CPUs

    Once the interrupt is requested using setup_percpu_irq() or
    request_percpu_irq(), it must be enabled by each core that wishes its
    local interrupt to be delivered.

    Based on an initial patch by Thomas Gleixner.

    Signed-off-by: Marc Zyngier
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1316793788-14500-2-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

20 Sep, 2011

1 commit

  • The sanity check in irq_domain_add() tests desc->irq_data != NULL or
    irq_data->domain != NULL. This prevents adding an irq_domain to a irq
    descriptor when irq_data exists, which true when the irq descriptor
    exists.

    This went unnoticed so far as the simple domain code did not enter
    this code path because domain->nr_irqs is always 0 for the simple domains.

    Split the check for irq_data == NULL out and have a separate warning
    for it.

    [ tglx: Made the check for irq_data == NULL separate ]

    Signed-off-by: Rob Herring
    Cc: Grant Likely
    Cc: marc.zyngier@arm.com
    Cc: thomas.abraham@linaro.org
    Cc: jamie@jamieiles.com
    Cc: b-cousson@ti.com
    Cc: shawn.guo@linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: devicetree-discuss@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/1316017900-19918-3-git-send-email-robherring2@gmail.com
    Signed-off-by: Thomas Gleixner

    Rob Herring
     

12 Sep, 2011

2 commits

  • Some irq chips need the irq_set_wake() functionality, but do not
    require a irq_set_wake() callback. Instead of forcing an empty
    callback to be implemented add a flag which notes this fact. Check for
    the flag in set_irq_wake_real() and return success when set.

    Signed-off-by: Santosh Shilimkar
    Cc: Thomas Gleixner

    Santosh Shilimkar
     
  • If an irq_chip provides .irq_shutdown(), but neither of .irq_disable() or
    .irq_mask(), free_irq() crashes when jumping to NULL.
    Fix this by only trying .irq_disable() and .irq_mask() if there's no
    .irq_shutdown() provided.

    This revives the symmetry with irq_startup(), which tries .irq_startup(),
    .irq_enable(), and irq_unmask(), and makes it consistent with the comment for
    irq_chip.irq_shutdown() in , which says:

    * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL)

    This is also how __free_irq() behaved before the big overhaul, cfr. e.g.
    3b56f0585fd4c02d047dc406668cb40159b2d340 ("genirq: Remove bogus conditional"),
    where the core interrupt code always overrode .irq_shutdown() to
    .irq_disable() if .irq_shutdown() was NULL.

    Signed-off-by: Geert Uytterhoeven
    Cc: linux-m68k@lists.linux-m68k.org
    Link: http://lkml.kernel.org/r/1315742394-16036-2-git-send-email-geert@linux-m68k.org
    Cc: stable@kernel.org
    Signed-off-by: Thomas Gleixner

    Geert Uytterhoeven
     

24 Aug, 2011

1 commit

  • This reverts commit f3637a5f2e2eb391ff5757bc83fb5de8f9726464.

    It turns out that this breaks several drivers, one example being OMAP
    boards which use the on-board OMAP UARTs and the omap-serial driver that
    will not boot to userspace after the commit.

    Paul Walmsley reports that enabling CONFIG_DEBUG_SHIRQ reveals 'IRQ
    handler type mismatch' errors:

    IRQ handler type mismatch for IRQ 74
    current handler: serial idle
    ...

    and the reason is that setting IRQF_ONESHOT will now result in those
    interrupt handlers having different IRQF flags, and thus being
    unsharable. So the commit log in the reverted commit:

    "Since it is required for those users and
    there is no difference for others it makes sense to add this flag
    unconditionally."

    is simply not true: there may not be any difference from a "actions at
    irq time", but there is a *big* difference wrt this flag testing irq
    management (see __setup_irq() in kernel/irq/manage.c).

    One solution may be to stop verifying IRQF_ONESHOT in __setup_irq(), but
    right now the safe course of action is to revert the change. Let's
    revisit this in a later merge window.

    Reported-by: Paul Walmsley
    Cc: Sebastian Andrzej Siewior
    Requested-by: Alan Cox
    Acked-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 Aug, 2011

1 commit


18 Aug, 2011

1 commit


28 Jul, 2011

5 commits

  • Arnd Bergmann
     
  • Interrupt descriptors can be allocated from modules. The interrupts
    are used by other modules, but we have no refcount on the module which
    provides the interrupts and there is no way to establish one on the
    device level as the interrupt using module is agnostic to the fact
    that the interrupt is provided by a module rather than by some builtin
    interrupt controller.

    To prevent removal of the interrupt providing module, we can track the
    owner of the interrupt descriptor, which also provides the relevant
    irq chip functions in the irq descriptor.

    request/setup_irq() can now acquire a refcount on the owner module to
    prevent unloading. free_irq() drops the refcount.

    Signed-off-by: Sebastian Andrzej Siewior
    Link: http://lkml.kernel.org/r/20110711101731.GA13804@Chamillionaire.breakpoint.cc
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • If no primary handler is specified then a default one is assigned
    which always returns IRQ_WAKE_THREAD. This handler requires the
    IRQF_ONESHOT flag on LEVEL / EIO typed irqs because the source of
    interrupt is not disabled. Since it is required for those users and
    there is no difference for others it makes sense to add this flag
    unconditionally.

    Signed-off-by: Sebastian Andrzej Siewior
    Link: http://lkml.kernel.org/r/1310070737-18514-1-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • irq_domain_generate_simple() is an easy way to generate an irq translation
    domain for simple irq controllers. It assumes a flat 1:1 mapping from
    hardware irq number to an offset of the first linux irq number assigned
    to the controller

    Signed-off-by: Grant Likely

    Grant Likely
     
  • This patch adds irq_domain infrastructure for translating from
    hardware irq numbers to linux irqs. This is particularly important
    for architectures adding device tree support because the current
    implementation (excluding PowerPC and SPARC) cannot handle
    translation for more than a single interrupt controller. irq_domain
    supports device tree translation for any number of interrupt
    controllers.

    This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
    for device tree irq translation. x86 is untested beyond compiling it,
    irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
    preserved until the core code is modified to actually register an
    irq_domain yet. On ARM it works and is required for much of the new
    ARM device tree board support.

    PowerPC has /not/ been converted to use this new infrastructure. It
    is still missing some features before it can replace the virq
    infrastructure already in powerpc (see documentation on
    irq_domain_map/unmap for details). Followup patches will add the
    missing pieces and migrate PowerPC to use irq_domain.

    SPARC has its own method of managing interrupts from the device tree
    and is unaffected by this change.

    Acked-by: Ralf Baechle
    Signed-off-by: Grant Likely

    Grant Likely
     

26 Jul, 2011

2 commits

  • (!msk & 0x01) should be !(msk & 0x01)

    Signed-off-by: Jonghwan Choi
    Link: http://lkml.kernel.org/r/1311229754-6003-1-git-send-email-jhbird.choi@samsung.com
    Signed-off-by: Thomas Gleixner
    Cc: stable@kernel.org

    jhbird.choi@samsung.com
     
  • devres uses the pointer value as key after it's freed, which is safe but
    triggers spurious use-after-free warnings on some static analysis tools.
    Rearrange code to avoid such warnings.

    Signed-off-by: Maxin B. John
    Reviewed-by: Rolf Eike Beer
    Acked-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maxin B John