01 Jul, 2014

1 commit

  • commit 1e77d0a1ed7417d2a5a52a7b8d32aea1833faa6c upstream.

    Till reported that the spurious interrupt detection of threaded
    interrupts is broken in two ways:

    - note_interrupt() is called for each action thread of a shared
    interrupt line. That's wrong as we are only interested whether none
    of the device drivers felt responsible for the interrupt, but by
    calling multiple times for a single interrupt line we account
    IRQ_NONE even if one of the drivers felt responsible.

    - note_interrupt() when called from the thread handler is not
    serialized. That leaves the members of irq_desc which are used for
    the spurious detection unprotected.

    To solve this we need to defer the spurious detection of a threaded
    interrupt to the next hardware interrupt context where we have
    implicit serialization.

    If note_interrupt is called with action_ret == IRQ_WAKE_THREAD, we
    check whether the previous interrupt requested a deferred check. If
    not, we request a deferred check for the next hardware interrupt and
    return.

    If set, we check whether one of the interrupt threads signaled
    success. Depending on this information we feed the result into the
    spurious detector.

    If one primary handler of a shared interrupt returns IRQ_HANDLED we
    disable the deferred check of irq threads on the same line, as we have
    found at least one device driver who cared.

    Reported-by: Till Straumann
    Signed-off-by: Thomas Gleixner
    Tested-by: Austin Schuh
    Cc: Oliver Hartkopp
    Cc: Wolfgang Grandegger
    Cc: Pavel Pisa
    Cc: Marc Kleine-Budde
    Cc: linux-can@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1303071450130.22263@ionos
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

08 Jun, 2014

1 commit

  • commit 01f8fa4f01d8362358eb90e412bd7ae18a3ec1ad upstream.

    The current implementation of irq_set_affinity() refuses rightfully to
    route an interrupt to an offline cpu.

    But there is a special case, where this is actually desired. Some of
    the ARM SoCs have per cpu timers which require setting the affinity
    during cpu startup where the cpu is not yet in the online mask.

    If we can't do that, then the local timer interrupt for the about to
    become online cpu is routed to some random online cpu.

    The developers of the affected machines tried to work around that
    issue, but that results in a massive mess in that timer code.

    We have a yet unused argument in the set_affinity callbacks of the irq
    chips, which I added back then for a similar reason. It was never
    required so it got not used. But I'm happy that I never removed it.

    That allows us to implement a sane handling of the above scenario. So
    the affected SoC drivers can add the required force handling to their
    interrupt chip, switch the timer code to irq_force_affinity() and
    things just work.

    This does not affect any existing user of irq_set_affinity().

    Tagged for stable to allow a simple fix of the affected SoC clock
    event drivers.

    Reported-and-tested-by: Krzysztof Kozlowski
    Signed-off-by: Thomas Gleixner
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Tomasz Figa ,
    Cc: Daniel Lezcano ,
    Cc: Kukjin Kim
    Cc: linux-arm-kernel@lists.infradead.org,
    Link: http://lkml.kernel.org/r/20140416143315.717251504@linutronix.de
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

27 Feb, 2014

2 commits

  • Include appropriate header file include/linux/of_irq.h in
    kernel/irq/irqdomain.c because it contains prototype definition of
    function define in kernel/irq/irqdomain.c.

    This eliminates the following warning in kernel/irq/irqdomain.c:
    kernel/irq/irqdomain.c:468:14: warning: no previous prototype for ‘irq_create_of_mapping’ [-Wmissing-prototypes]

    Signed-off-by: Rashika Kheria
    Reviewed-by: Josh Triplett
    Cc: Benjamin Herrenschmidt
    Link: http://lkml.kernel.org/r/eb89aebea7ff1a46122918ac389ebecf8248be9a.1393493276.git.rashika.kheria@gmail.com
    Signed-off-by: Thomas Gleixner

    Rashika Kheria
     
  • We hit one rare case below:

    T1 calling disable_irq(), but hanging at synchronize_irq()
    always;
    The corresponding irq thread is in sleeping state;
    And all CPUs are in idle state;

    After analysis, we found there is one possible scenerio which
    causes T1 is waiting there forever:
    CPU0 CPU1
    synchronize_irq()
    wait_event()
    spin_lock()
    atomic_dec_and_test(&threads_active)
    insert the __wait into queue
    spin_unlock()
    if(waitqueue_active)
    atomic_read(&threads_active)
    wake_up()

    Here after inserted the __wait into queue on CPU0, and before
    test if queue is empty on CPU1, there is no barrier, it maybe
    cause it is not visible for CPU1 immediately, although CPU0 has
    updated the queue list.
    It is similar for CPU0 atomic_read() threads_active also.

    So we'd need one smp_mb() before waitqueue_active.that, but removing
    the waitqueue_active() check solves it as wel l and it makes
    things simple and clear.

    Signed-off-by: Chuansheng Liu
    Cc: Xiaoming Wang
    Link: http://lkml.kernel.org/r/1393212590-32543-1-git-send-email-chuansheng.liu@intel.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Chuansheng Liu
     

16 Feb, 2014

1 commit

  • …el.org/pub/scm/linux/kernel/git/tip/tip

    Pull irq update from Thomas Gleixner:
    "Fix from the urgent branch: a trivial oneliner adding the missing
    Kconfig dependency curing build failures which have been discovered by
    several build robots.

    The update in the irq-core branch provides a new function in the
    irq/devres code, which is a prerequisite for driver developers to get
    rid of boilerplate code all over the place.

    Not a bugfix, but it has zero impact on the current kernel due to the
    lack of users. It's simpler to provide the infrastructure to
    interested parties via your tree than fulfilling the wishlist of
    driver maintainers on which particular commit or tag this should be
    based on"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Add devm_request_any_context_irq()

    Linus Torvalds
     

11 Feb, 2014

1 commit

  • In allmodconfig builds for sparc and any other arch which does
    not set CONFIG_SPARSE_IRQ, the following will be seen at modpost:

    CC [M] lib/cpu-notifier-error-inject.o
    CC [M] lib/pm-notifier-error-inject.o
    ERROR: "irq_to_desc" [drivers/gpio/gpio-mcp23s08.ko] undefined!
    make[2]: *** [__modpost] Error 1

    This happens because commit 3911ff30f5 ("genirq: export
    handle_edge_irq() and irq_to_desc()") added one export for it, but
    there were actually two instances of it, in an if/else clause for
    CONFIG_SPARSE_IRQ. Add the second one.

    Signed-off-by: Paul Gortmaker
    Cc: Jiri Kosina
    Cc: stable@vger.kernel.org # 3.4+
    Link: http://lkml.kernel.org/r/1392057610-11514-1-git-send-email-paul.gortmaker@windriver.com
    Signed-off-by: Thomas Gleixner

    Paul Gortmaker
     

09 Feb, 2014

1 commit

  • Some drivers use request_any_context_irq() but there isn't a
    devm_* function for it. Add one so that these drivers don't need
    to explicitly free the irq on driver detach.

    Signed-off-by: Stephen Boyd
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Dmitry Torokhov
    Link: http://lkml.kernel.org/r/1388709460-19222-3-git-send-email-sboyd@codeaurora.org
    Signed-off-by: Thomas Gleixner

    Stephen Boyd
     

05 Feb, 2014

1 commit

  • The generic_chip.c uses interfaces from irq_domain.c which is
    controlled by the IRQ_DOMAIN config option, but there is no Kconfig
    dependency so the build can fail:

    linux/kernel/irq/generic-chip.c:400:11: error:
    'irq_domain_xlate_onetwocell' undeclared here (not in a function)

    Select IRQ_DOMAIN when GENERIC_IRQ_CHIP is selected.

    Signed-off-by: Nitin A Kamble
    Link: http://lkml.kernel.org/r/1391129410-54548-2-git-send-email-nitin.a.kamble@intel.com
    Signed-off-by: Thomas Gleixner
    Cc: stable@vger.kernel.org # 3.11+

    Nitin A Kamble
     

03 Dec, 2013

1 commit


26 Nov, 2013

1 commit

  • When the system enters suspend, it disables all interrupts in
    suspend_device_irqs(), including the interrupts marked EARLY_RESUME.

    On the resume side things are different. The EARLY_RESUME interrupts
    are reenabled in sys_core_ops->resume and the non EARLY_RESUME
    interrupts are reenabled in the normal system resume path.

    When suspend_noirq() failed or suspend is aborted for any other
    reason, we might omit the resume side call to sys_core_ops->resume()
    and therefor the interrupts marked EARLY_RESUME are not reenabled and
    stay disabled forever.

    To solve this, enable all irqs unconditionally in irq_resume()
    regardless whether interrupts marked EARLY_RESUMEhave been already
    enabled or not.

    This might try to reenable already enabled interrupts in the non
    failure case, but the only affected platform is XEN and it has been
    confirmed that it does not cause any side effects.

    [ tglx: Massaged changelog. ]

    Signed-off-by: Laxman Dewangan
    Acked-by-and-tested-by: Konrad Rzeszutek Wilk
    Acked-by: Heiko Stuebner
    Reviewed-by: Pavel Machek
    Cc:
    Cc:
    Cc:
    Cc:
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1385388587-16442-1-git-send-email-ldewangan@nvidia.com
    Signed-off-by: Thomas Gleixner

    Laxman Dewangan
     

20 Nov, 2013

1 commit

  • Pull irq cleanups from Ingo Molnar:
    "This is a multi-arch cleanup series from Thomas Gleixner, which we
    kept to near the end of the merge window, to not interfere with
    architecture updates.

    This series (motivated by the -rt kernel) unifies more aspects of IRQ
    handling and generalizes PREEMPT_ACTIVE"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    preempt: Make PREEMPT_ACTIVE generic
    sparc: Use preempt_schedule_irq
    ia64: Use preempt_schedule_irq
    m32r: Use preempt_schedule_irq
    hardirq: Make hardirq bits generic
    m68k: Simplify low level interrupt handling code
    genirq: Prevent spurious detection for unconditionally polled interrupts

    Linus Torvalds
     

16 Nov, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual earth-shaking, news-breaking, rocket science pile from
    trivial.git"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
    doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
    doc: add missing files to timers/00-INDEX
    timekeeping: Fix some trivial typos in comments
    mm: Fix some trivial typos in comments
    irq: Fix some trivial typos in comments
    NUMA: fix typos in Kconfig help text
    mm: update 00-INDEX
    doc: Documentation/DMA-attributes.txt fix typo
    DRM: comment: `halve' -> `half'
    Docs: Kconfig: `devlopers' -> `developers'
    doc: typo on word accounting in kprobes.c in mutliple architectures
    treewide: fix "usefull" typo
    treewide: fix "distingush" typo
    mm/Kconfig: Grammar s/an/a/
    kexec: Typo s/the/then/
    Documentation/kvm: Update cpuid documentation for steal time and pv eoi
    treewide: Fix common typo in "identify"
    __page_to_pfn: Fix typo in comment
    Correct some typos for word frequency
    clk: fixed-factor: Fix a trivial typo
    ...

    Linus Torvalds
     

13 Nov, 2013

1 commit

  • On a 68k platform a couple of interrupts are demultiplexed and
    "polled" from a top level interrupt. Unfortunately there is no way to
    determine which of the sub interrupts raised the top level interrupt,
    so all of the demultiplexed interrupt handlers need to be
    invoked. Given a high enough frequency this can trigger the spurious
    interrupt detection mechanism, if one of the demultiplex interrupts
    returns IRQ_NONE continuously. But this is a false positive as the
    polling causes this behaviour and not buggy hardware/software.

    Introduce IRQ_POLLED which can be set at interrupt chip setup time via
    irq_set_status_flags(). The flag excludes the interrupt from the
    spurious detector and from all core polling activities.

    Reported-and-tested-by: Michael Schmitz
    Cc: Geert Uytterhoeven
    Cc: linux-m68k@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311061149250.23353@ionos.tec.linutronix.de

    Thomas Gleixner
     

12 Nov, 2013

1 commit

  • Pull devicetree updates from Rob Herring:
    "DeviceTree updates for 3.13. This is a bit larger pull request than
    usual for this cycle with lots of clean-up.

    - Cross arch clean-up and consolidation of early DT scanning code.
    - Clean-up and removal of arch prom.h headers. Makes arch specific
    prom.h optional on all but Sparc.
    - Addition of interrupts-extended property for devices connected to
    multiple interrupt controllers.
    - Refactoring of DT interrupt parsing code in preparation for
    deferred probe of interrupts.
    - ARM cpu and cpu topology bindings documentation.
    - Various DT vendor binding documentation updates"

    * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
    powerpc: add missing explicit OF includes for ppc
    dt/irq: add empty of_irq_count for !OF_IRQ
    dt: disable self-tests for !OF_IRQ
    of: irq: Fix interrupt-map entry matching
    MIPS: Netlogic: replace early_init_devtree() call
    of: Add Panasonic Corporation vendor prefix
    of: Add Chunghwa Picture Tubes Ltd. vendor prefix
    of: Add AU Optronics Corporation vendor prefix
    of/irq: Fix potential buffer overflow
    of/irq: Fix bug in interrupt parsing refactor.
    of: set dma_mask to point to coherent_dma_mask
    of: add vendor prefix for PHYTEC Messtechnik GmbH
    DT: sort vendor-prefixes.txt
    of: Add vendor prefix for Cadence
    of: Add empty for_each_available_child_of_node() macro definition
    arm/versatile: Fix versatile irq specifications.
    of/irq: create interrupts-extended property
    microblaze/pci: Drop PowerPC-ism from irq parsing
    of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
    of/irq: Use irq_of_parse_and_map()
    ...

    Linus Torvalds
     

28 Oct, 2013

1 commit

  • In commit ee23871389 ("genirq: Set irq thread to RT priority on
    creation") we moved the assigment of the thread's priority from the
    thread's function into __setup_irq(). That function may run in user
    context for instance if the user opens an UART node and then driver
    calls requests in the ->open() callback. That user may not have
    CAP_SYS_NICE and so the irq thread won't run with the SCHED_OTHER
    policy.

    This patch uses sched_setscheduler_nocheck() so we omit the CAP_SYS_NICE
    check which is otherwise required for the SCHED_OTHER policy.

    [bigeasy: Rewrite the changelog]

    Signed-off-by: Thomas Pfaff
    Cc: Ivo Sieben
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1381489240-29626-1-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Thomas Gleixner

    Thomas Pfaff
     

24 Oct, 2013

1 commit

  • All the callers of irq_create_of_mapping() pass the contents of a struct
    of_phandle_args structure to the function. Since all the callers already
    have an of_phandle_args pointer, why not pass it directly to
    irq_create_of_mapping()?

    Signed-off-by: Grant Likely
    Acked-by: Michal Simek
    Acked-by: Tony Lindgren
    Cc: Thomas Gleixner
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt

    Grant Likely
     

18 Oct, 2013

1 commit


13 Sep, 2013

1 commit


14 Jul, 2013

2 commits

  • Pull irq updates from Thomas Gleixner:
    - core fix for missing round up in the generic irq chip implementation
    - new irq chip for MOXA SoCs
    - a few fixes and cleanups in the irqchip drivers

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip: Add support for MOXA ART SoCs
    genirq: generic chip: Use DIV_ROUND_UP to calculate numchips
    irqchip: nvic: Fix wrong num_ct argument for irq_alloc_domain_generic_chips()
    irqchip: sun4i: Staticize sun4i_irq_ack()
    irqchip: vt8500: Staticize local symbols

    Linus Torvalds
     
  • Pull MIPS updates from Ralf Baechle:
    "MIPS updates:

    - All the things that didn't make 3.10.
    - Removes the Windriver PPMC platform. Nobody will miss it.
    - Remove a workaround from kernel/irq/irqdomain.c which was there
    exclusivly for MIPS. Patch by Grant Likely.
    - More small improvments for the SEAD 3 platform
    - Improvments on the BMIPS / SMP support for the BCM63xx series.
    - Various cleanups of dead leftovers.
    - Platform support for the Cavium Octeon-based EdgeRouter Lite.

    Two large KVM patchsets didn't make it for this pull request because
    their respective authors are vacationing"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits)
    MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER
    MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions
    MIPS: SEAD3: Disable L2 cache on SEAD-3.
    MIPS: BCM63xx: Enable second core SMP on BCM6328 if available
    MIPS: BCM63xx: Add SMP support to prom.c
    MIPS: define write{b,w,l,q}_relaxed
    MIPS: Expose missing pci_io{map,unmap} declarations
    MIPS: Malta: Update GCMP detection.
    Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
    MIPS: APSP: Remove
    SSB: Kconfig: Amend SSB_EMBEDDED dependencies
    MIPS: microMIPS: Fix improper definition of ISA exception bit.
    MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
    MIPS: Declare emulate_load_store_microMIPS as a static function.
    MIPS: Fix typos and cleanup comment
    MIPS: Cleanup indentation and whitespace
    MIPS: BMIPS: support booting from physical CPU other than 0
    MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
    MIPS: GIC: Fix gic_set_affinity infinite loop
    MIPS: Don't save/restore OCTEON wide multiplier state on syscalls.
    ...

    Linus Torvalds
     

07 Jul, 2013

1 commit

  • Pull irqdomain refactoring from Grant Likely:
    "This is the long awaited simplification of irqdomain. It gets rid of
    the different types of irq domains and instead both linear and tree
    mappings can be supported in a single domain. Doing this removes a
    lot of special case code and makes irq domains simpler to understand
    overall"

    * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux:
    irq: fix checkpatch error
    irqdomain: Include hwirq number in /proc/interrupts
    irqdomain: make irq_linear_revmap() a fast path again
    irqdomain: remove irq_domain_generate_simple()
    irqdomain: Refactor irq_domain_associate_many()
    irqdomain: Beef up debugfs output
    irqdomain: Clean up aftermath of irq_domain refactoring
    irqdomain: Eliminate revmap type
    irqdomain: merge linear and tree reverse mappings.
    irqdomain: Add a name field
    irqdomain: Replace LEGACY mapping with LINEAR
    irqdomain: Relax failure path on setting up mappings

    Linus Torvalds
     

05 Jul, 2013

2 commits

  • The number of interrupts in a domain may be not divisible by the
    number of interrupts each chip handles. Integer division may truncate
    the result, thus use DIV_ROUND_UP to count numchips.

    Seems all users of irq_alloc_domain_generic_chips() in current code do
    not have this issue. I just found the issue while reading the code.

    Signed-off-by: Axel Lin
    Cc: Grant Likely
    Cc: Tony Lindgren
    Cc: Arnd Bergmann
    Link: http://lkml.kernel.org/r/1373015592.18252.2.camel@phoenix
    Signed-off-by: Thomas Gleixner

    Axel Lin
     
  • Pull trivial tree updates from Jiri Kosina:
    "The usual stuff from trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    treewide: relase -> release
    Documentation/cgroups/memory.txt: fix stat file documentation
    sysctl/net.txt: delete reference to obsolete 2.4.x kernel
    spinlock_api_smp.h: fix preprocessor comments
    treewide: Fix typo in printk
    doc: device tree: clarify stuff in usage-model.txt.
    open firmware: "/aliasas" -> "/aliases"
    md: bcache: Fixed a typo with the word 'arithmetic'
    irq/generic-chip: fix a few kernel-doc entries
    frv: Convert use of typedef ctl_table to struct ctl_table
    sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
    doc: clk: Fix incorrect wording
    Documentation/arm/IXP4xx fix a typo
    Documentation/networking/ieee802154 fix a typo
    Documentation/DocBook/media/v4l fix a typo
    Documentation/video4linux/si476x.txt fix a typo
    Documentation/virtual/kvm/api.txt fix a typo
    Documentation/early-userspace/README fix a typo
    Documentation/video4linux/soc-camera.txt fix a typo
    lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
    ...

    Linus Torvalds
     

03 Jul, 2013

1 commit

  • Pull core irq changes from Ingo Molnar:
    "The main changes:

    - generic-irqchip driver additions, cleanups and fixes

    - 3 new irqchip drivers: ARMv7-M NVIC, TB10x and Marvell Orion SoCs

    - irq_get_trigger_type() simplification and cross-arch cleanup

    - various cleanups, simplifications

    - documentation updates"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    softirq: Use _RET_IP_
    genirq: Add the generic chip to the genirq docbook
    genirq: generic-chip: Export some irq_gc_ functions
    genirq: Fix can_request_irq() for IRQs without an action
    irqchip: exynos-combiner: Staticize combiner_init
    irqchip: Add support for ARMv7-M NVIC
    irqchip: Add TB10x interrupt controller driver
    irqdomain: Use irq_get_trigger_type() to get IRQ flags
    MIPS: octeon: Use irq_get_trigger_type() to get IRQ flags
    arm: orion: Use irq_get_trigger_type() to get IRQ flags
    mfd: stmpe: use irq_get_trigger_type() to get IRQ flags
    mfd: twl4030-irq: Use irq_get_trigger_type() to get IRQ flags
    gpio: mvebu: Use irq_get_trigger_type() to get IRQ flags
    genirq: Add irq_get_trigger_type() to get IRQ flags
    genirq: Irqchip: document gcflags arg of irq_alloc_domain_generic_chips
    genirq: Set irq thread to RT priority on creation
    irqchip: Add support for Marvell Orion SoCs
    genirq: Add kerneldoc for irq_disable.
    genirq: irqchip: Add mask to block out invalid irqs
    genirq: Generic chip: Add linear irq domain support
    ...

    Linus Torvalds
     

28 Jun, 2013

3 commits

  • Signed-off-by: Thomas Gleixner
    Cc: Randy Dunlap

    Thomas Gleixner
     
  • When building imx_v6_v7_defconfig with imx-drm drivers selected as
    modules, we get the following build errors:

    ERROR: "irq_gc_mask_clr_bit" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined!
    ERROR: "irq_gc_mask_set_bit" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined!
    ERROR: "irq_gc_ack_set_bit" [drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.ko] undefined!

    Export the required functions to avoid this problem.

    Signed-off-by: Fabio Estevam
    Cc: shawn.guo@linaro.org
    Cc: kernel@pengutronix.de
    Link: http://lkml.kernel.org/r/1372389789-7048-1-git-send-email-festevam@gmail.com
    Signed-off-by: Thomas Gleixner

    Fabio Estevam
     
  • Commit 02725e7471b8 ('genirq: Use irq_get/put functions'),
    inadvertently changed can_request_irq() to return 0 for IRQs that have
    no action. This causes pcibios_lookup_irq() to select only IRQs that
    already have an action with IRQF_SHARED set, or to fail if there are
    none. Change can_request_irq() to return 1 for IRQs that have no
    action (if the first two conditions are met).

    Reported-by: Bjarni Ingi Gislason
    Tested-by: Bjarni Ingi Gislason (against 3.2)
    Signed-off-by: Ben Hutchings
    Cc: 709647@bugs.debian.org
    Cc: stable@vger.kernel.org # 2.6.39+
    Link: http://bugs.debian.org/709647
    Link: http://lkml.kernel.org/r/1372383630.23847.40.camel@deadeye.wl.decadent.org.uk
    Signed-off-by: Thomas Gleixner

    Ben Hutchings
     

25 Jun, 2013

1 commit

  • Use irq_get_trigger_type() to get the IRQ trigger type flags
    instead calling irqd_get_trigger_type(irq_desc_get_irq_data(virq))

    Signed-off-by: Javier Martinez Canillas
    Acked-by: Grant Likely
    Cc: Linus Walleij
    Cc: Samuel Ortiz
    Cc: Jason Cooper
    Cc: Andrew Lunn
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Link: http://lkml.kernel.org/r/1371228049-27080-8-git-send-email-javier.martinez@collabora.co.uk
    Signed-off-by: Thomas Gleixner

    Javier Martinez Canillas
     

24 Jun, 2013

6 commits

  • Commit 088f40b7b027dad6519712ff224a5798dd62a204 ("genirq: Generic chip:
    Add linear irq domain support") missed kerneldoc for the gcflags
    argument of irq_alloc_domain_generic_chips(). Add it now.

    Signed-off-by: James Hogan
    Acked-by: Grant Likely
    Link: http://lkml.kernel.org/r/1371564513-4327-1-git-send-email-james.hogan@imgtec.com
    Signed-off-by: Thomas Gleixner

    James Hogan
     
  • ERROR: space required before the open parenthesis '('
    WARNING: Prefer pr_warn(... to pr_warning(...
    Just fix above 2 issue.

    Signed-off-by: Kefeng Wang
    Signed-off-by: Grant Likely

    Kefeng Wang
     
  • Add the hardware interrupt number to the output of /proc/interrupts.
    It is often important to have access to the hardware interrupt number because
    it identifies exactly how an interrupt signal is wired up to the interrupt
    controller. This is especially important when using irq_domains since irq
    numbers get dynamically allocated in that case, and have no relation to the
    actual hardware number.

    Note: This output is currently conditional on whether or not the irq_domain
    pointer is set; however hwirq could still be used without irq_domain. It
    may be worthwhile to always output the hwirq number regardless of the
    domain pointer.

    Signed-off-by: Grant Likely
    Tested-by: Olof Johansson
    Cc: Ben Herrenschmidt
    Cc: Thomas Gleixner

    Grant Likely
     
  • Over the years, irq_linear_revmap() gained tests and checks to make sure
    callers were using it safely, which while important, also make it less
    of a fast path. After the irqdomain refactoring done recently, it is now
    possible to make irq_linear_revmap() a fast path again. This patch moves
    irq_linear_revmap() to the header file and makes it a static inline so
    that interrupt controller drivers using a linear mapping can decode the
    virq from a hwirq in just a couple of instructions.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Nobody calls it; remove the function

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Originally, irq_domain_associate_many() was designed to unwind the
    mapped irqs on a failure of any individual association. However, that
    proved to be a problem with certain IRQ controllers. Some of them only
    support a subset of irqs, and will fail when attempting to map a
    reserved IRQ. In those cases we want to map as many IRQs as possible, so
    instead it is better for irq_domain_associate_many() to make a
    best-effort attempt to map irqs, but not fail if any or all of them
    don't succeed. If a caller really cares about how many irqs got
    associated, then it should instead go back and check that all of the
    irqs is cares about were mapped.

    The original design open-coded the individual association code into the
    body of irq_domain_associate_many(), but with no longer needing to
    unwind associations, the code becomes simpler to split out
    irq_domain_associate() to contain the bulk of the logic, and
    irq_domain_associate_many() to be a simple loop wrapper.

    This patch also adds a new error check to the associate path to make
    sure it isn't called for an irq larger than the controller can handle,
    and adds locking so that the irq_domain_mutex is held while setting up a
    new association.

    v3: Fixup missing change to irq_domain_add_tree()
    v2: Fixup x86 warning. irq_domain_associate_many() no longer returns an
    error code, but reports errors to the printk log directly. In the
    majority of cases we don't actually want to fail if there is a
    problem, but rather log it and still try to boot the system.

    Signed-off-by: Grant Likely

    irqdomain: Fix flubbed irq_domain_associate_many refactoring

    commit d39046ec72, "irqdomain: Refactor irq_domain_associate_many()" was
    missing the following hunk which causes a boot failure on anything using
    irq_domain_add_tree() to allocate an irq domain.

    Signed-off-by: Grant Likely
    Cc: Michael Neuling
    Cc: Benjamin Herrenschmidt ,
    Cc: Thomas Gleixner ,
    Cc: Stephen Rothwell

    Grant Likely
     

18 Jun, 2013

2 commits


11 Jun, 2013

1 commit

  • When a threaded irq handler is installed the irq thread is initially
    created on normal scheduling priority. Only after the irq thread is
    woken up it sets its priority to RT_FIFO MAX_USER_RT_PRIO/2 itself.

    This means that interrupts that occur directly after the irq handler
    is installed will be handled on a normal scheduling priority instead
    of the realtime priority that one would expect.

    Fix this by setting the RT priority on creation of the irq_thread.

    Signed-off-by: Ivo Sieben
    Cc: Sebastian Andrzej Siewior
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1370254322-17240-1-git-send-email-meltedpianoman@gmail.com
    Signed-off-by: Thomas Gleixner

    Ivo Sieben
     

10 Jun, 2013

3 commits

  • This patch increases the amount of output produced by the
    irq_domain_mapping debugfs file by first listing all of the registered
    irq domains at the beginning of the output, and then by including all
    mapped IRQs in the output, not just the active ones. It is very useful
    when debugging irqdomain issues to be able to see the entire list of
    mapped irqs, not just the ones that happen to be connected to devices.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • After refactoring the irqdomain code, there are a number of API
    functions that are merely empty wrappers around core code. Drop those
    wrappers out of the C file and replace them with static inlines in the
    header.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • The NOMAP irq_domain type is only used by a handful of interrupt
    controllers and it unnecessarily complicates the code by adding special
    cases on how to look up mappings and different revmap functions are used
    for each type which need to validate the correct type is passed to it
    before performing the reverse map. Eliminating the revmap_type and
    making a single reverse mapping function simplifies the code. It also
    shouldn't be any slower than having separate revmap functions because
    the type of the revmap needed to be checked anyway.

    The linear and tree revmap types were already merged in a previous
    patch. This patch rolls the NOMAP or direct mapping behaviour into the
    same domain code making is possible for an irq domain to do any mapping
    type; linear, tree or direct; and that the mapping will be transparent
    to the interrupt controller driver.

    With this change, direct mappings will get stored in the linear or tree
    mapping for consistency. Reverse mapping from the hwirq to virq will go
    through the normal lookup process. However, any controller using a
    direct mapping can take advantage of knowing that hwirq==virq for any
    mapped interrupts skip doing a revmap lookup when handling IRQs.

    Signed-off-by: Grant Likely

    Grant Likely