22 Jul, 2013

1 commit

  • commit 2779db8d37d4b542d9ca2575f5f178dbeaca6c86 upstream.

    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
    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
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

09 Jun, 2013

3 commits


06 May, 2013

1 commit

  • Some interrupt controllers refuse to map interrupts marked as
    "protected" by firwmare. Since we try to map everyting in the
    device-tree on some platforms, we end up with a lot of nasty
    WARN's in the boot log for what is a normal situation on those
    machines.

    This defines a specific return code (-EPERM) from the host map()
    callback which cause irqdomain to fail silently.

    MPIC is updated to return this when hitting a protected source
    printing only a single line message for diagnostic purposes.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

02 May, 2013

1 commit

  • Supply a function (proc_remove()) to remove a proc entry (and any subtree
    rooted there) by proc_dir_entry pointer rather than by name and (optionally)
    root dir entry pointer. This allows us to eliminate all remaining pde->name
    accesses outside of procfs.

    Signed-off-by: David Howells
    Acked-by: Grant Likely
    cc: linux-acpi@vger.kernel.org
    cc: openipmi-developer@lists.sourceforge.net
    cc: devicetree-discuss@lists.ozlabs.org
    cc: linux-pci@vger.kernel.org
    cc: netdev@vger.kernel.org
    cc: netfilter-devel@vger.kernel.org
    cc: alsa-devel@alsa-project.org
    Signed-off-by: Al Viro

    David Howells
     

10 Apr, 2013

1 commit

  • The only part of proc_dir_entry the code outside of fs/proc
    really cares about is PDE(inode)->data. Provide a helper
    for that; static inline for now, eventually will be moved
    to fs/proc, along with the knowledge of struct proc_dir_entry
    layout.

    Signed-off-by: Al Viro

    Al Viro
     

27 Feb, 2013

1 commit

  • Pull vfs pile (part one) from Al Viro:
    "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
    locking violations, etc.

    The most visible changes here are death of FS_REVAL_DOT (replaced with
    "has ->d_weak_revalidate()") and a new helper getting from struct file
    to inode. Some bits of preparation to xattr method interface changes.

    Misc patches by various people sent this cycle *and* ocfs2 fixes from
    several cycles ago that should've been upstream right then.

    PS: the next vfs pile will be xattr stuff."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
    saner proc_get_inode() calling conventions
    proc: avoid extra pde_put() in proc_fill_super()
    fs: change return values from -EACCES to -EPERM
    fs/exec.c: make bprm_mm_init() static
    ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
    ocfs2: fix possible use-after-free with AIO
    ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
    get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
    target: writev() on single-element vector is pointless
    export kernel_write(), convert open-coded instances
    fs: encode_fh: return FILEID_INVALID if invalid fid_type
    kill f_vfsmnt
    vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
    nfsd: handle vfs_getattr errors in acl protocol
    switch vfs_getattr() to struct path
    default SET_PERSONALITY() in linux/elf.h
    ceph: prepopulate inodes only when request is aborted
    d_hash_and_lookup(): export, switch open-coded instances
    9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
    9p: split dropping the acls from v9fs_set_create_acl()
    ...

    Linus Torvalds
     

23 Feb, 2013

1 commit


20 Feb, 2013

2 commits

  • Pull x86/apic changes from Ingo Molnar:
    "Main changes:

    - Multiple MSI support added to the APIC, PCI and AHCI code - acked
    by all relevant maintainers, by Alexander Gordeev.

    The advantage is that multiple AHCI ports can have multiple MSI
    irqs assigned, and can thus spread to multiple CPUs.

    [ Drivers can make use of this new facility via the
    pci_enable_msi_block_auto() method ]

    - x86 IOAPIC code from interrupt remapping cleanups from Joerg
    Roedel:

    These patches move all interrupt remapping specific checks out of
    the x86 core code and replaces the respective call-sites with
    function pointers. As a result the interrupt remapping code is
    better abstraced from x86 core interrupt handling code.

    - Various smaller improvements, fixes and cleanups."

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    x86/intel/irq_remapping: Clean up x2apic opt-out security warning mess
    x86, kvm: Fix intialization warnings in kvm.c
    x86, irq: Move irq_remapped out of x86 core code
    x86, io_apic: Introduce eoi_ioapic_pin call-back
    x86, msi: Introduce x86_msi.compose_msi_msg call-back
    x86, irq: Introduce setup_remapped_irq()
    x86, irq: Move irq_remapped() check into free_remapped_irq
    x86, io-apic: Remove !irq_remapped() check from __target_IO_APIC_irq()
    x86, io-apic: Move CONFIG_IRQ_REMAP code out of x86 core
    x86, irq: Add data structure to keep AMD specific irq remapping information
    x86, irq: Move irq_remapping_enabled declaration to iommu code
    x86, io_apic: Remove irq_remapping_enabled check in setup_timer_IRQ0_pin
    x86, io_apic: Move irq_remapping_enabled checks out of check_timer()
    x86, io_apic: Convert setup_ioapic_entry to function pointer
    x86, io_apic: Introduce set_affinity function pointer
    x86, msi: Use IRQ remapping specific setup_msi_irqs routine
    x86, hpet: Introduce x86_msi_ops.setup_hpet_msi
    x86, io_apic: Introduce x86_io_apic_ops.print_entries for debugging
    x86, io_apic: Introduce x86_io_apic_ops.disable()
    x86, apic: Mask IO-APIC and PIC unconditionally on LAPIC resume
    ...

    Linus Torvalds
     
  • Pull scheduler changes from Ingo Molnar:
    "Main changes:

    - scheduler side full-dynticks (user-space execution is undisturbed
    and receives no timer IRQs) preparation changes that convert the
    cputime accounting code to be full-dynticks ready, from Frederic
    Weisbecker.

    - Initial sched.h split-up changes, by Clark Williams

    - select_idle_sibling() performance improvement by Mike Galbraith:

    " 1 tbench pair (worst case) in a 10 core + SMT package:

    pre 15.22 MB/sec 1 procs
    post 252.01 MB/sec 1 procs "

    - sched_rr_get_interval() ABI fix/change. We think this detail is not
    used by apps (so it's not an ABI in practice), but lets keep it
    under observation.

    - misc RT scheduling cleanups, optimizations"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    sched/rt: Add header to
    cputime: Remove irqsave from seqlock readers
    sched, powerpc: Fix sched.h split-up build failure
    cputime: Restore CPU_ACCOUNTING config defaults for PPC64
    sched/rt: Move rt specific bits into new header file
    sched/rt: Add a tuning knob to allow changing SCHED_RR timeslice
    sched: Move sched.h sysctl bits into separate header
    sched: Fix signedness bug in yield_to()
    sched: Fix select_idle_sibling() bouncing cow syndrome
    sched/rt: Further simplify pick_rt_task()
    sched/rt: Do not account zero delta_exec in update_curr_rt()
    cputime: Safely read cputime of full dynticks CPUs
    kvm: Prepare to add generic guest entry/exit callbacks
    cputime: Use accessors to read task cputime stats
    cputime: Allow dynamic switch between tick/virtual based cputime accounting
    cputime: Generic on-demand virtual cputime accounting
    cputime: Move default nsecs_to_cputime() to jiffies based cputime file
    cputime: Librarize per nsecs resolution cputime definitions
    cputime: Avoid multiplication overflow on utime scaling
    context_tracking: Export context state for generic vtime
    ...

    Fix up conflict in kernel/context_tracking.c due to comment additions.

    Linus Torvalds
     

19 Feb, 2013

1 commit

  • These functions are used by the tilegx onchip network driver, and it's
    useful to be able to load that driver as a module.

    Signed-off-by: Chris Metcalf
    Link: http://lkml.kernel.org/r/201302012043.r11KhNZF024371@farm-0021.internal.tilera.com
    Signed-off-by: Thomas Gleixner

    Chris Metcalf
     

08 Feb, 2013

1 commit


25 Jan, 2013

1 commit

  • The MSI specification has several constraints in comparison with
    MSI-X, most notable of them is the inability to configure MSIs
    independently. As a result, it is impossible to dispatch
    interrupts from different queues to different CPUs. This is
    largely devalues the support of multiple MSIs in SMP systems.

    Also, a necessity to allocate a contiguous block of vector
    numbers for devices capable of multiple MSIs might cause a
    considerable pressure on x86 interrupt vector allocator and
    could lead to fragmentation of the interrupt vectors space.

    This patch overcomes both drawbacks in presense of IRQ remapping
    and lets devices take advantage of multiple queues and per-IRQ
    affinity assignments.

    Signed-off-by: Alexander Gordeev
    Cc: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Jeff Garzik
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/c8bd86ff56b5fc118257436768aaa04489ac0a4c.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     

24 Jan, 2013

1 commit


19 Dec, 2012

1 commit

  • The array check is useless so remove it.

    [akpm@linux-foundation.org: remove comment, per David]
    Signed-off-by: Alan Cox
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

12 Dec, 2012

1 commit


11 Dec, 2012

1 commit

  • commit 52553ddf(genirq: fix regression in irqfixup, irqpoll)
    introduced a potential deadlock by calling the action handler with the
    irq descriptor lock held.

    Remove the call and let the handling code run even for an interrupt
    where only a single action is registered. That matches the goal of
    the above commit and avoids the deadlock.

    Document the confusing action = desc->action reload in the handling
    loop while at it.

    Reported-and-tested-by: "Wang, Warner"
    Tested-by: Edward Donovan
    Cc: "Wang, Song-Bo (Stoney)"
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

30 Nov, 2012

1 commit


13 Nov, 2012

1 commit

  • Sankara reported that the genirq core code fails to adjust the
    affinity of an interrupt thread in several cases:

    1) On request/setup_irq() the call to setup_affinity() happens before
    the new action is registered, so the new thread is not notified.

    2) For secondary shared interrupts nothing notifies the new thread to
    change its affinity.

    3) Interrupts which have the IRQ_NO_BALANCE flag set are not moving
    the thread either.

    Fix this by setting the thread affinity flag right on thread creation
    time. This ensures that under all circumstances the thread moves to
    the right place. Requires a check in irq_thread_check_affinity for an
    existing affinity mask (CONFIG_CPU_MASK_OFFSTACK=y)

    Reported-and-tested-by: Sankara Muthukrishnan
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1209041738200.2754@ionos
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

01 Nov, 2012

2 commits

  • As irq_thread_check_affinity is called ONLY inside the while loop in
    the irq thread, the core affinity is set only when an interrupt
    occurs. This patch sets the core affinity right after the irq thread
    is created and before it waits for interrupts. In real-tiime targets
    that do not typically change the core affinity of irqs during
    run-time, this patch will save additional latency of an irq thread in
    setting the core affinity during the first interrupt occurrence for
    that irq.

    Signed-off-by: Sankara S Muthukrishnan
    Acked-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com
    Signed-off-by: Thomas Gleixner

    Sankara Muthukrishnan
     
  • Attempts to retrigger nested threaded IRQs currently fail because they
    have no primary handler. In order to support retrigger of nested
    IRQs, the parent IRQ needs to be retriggered.

    To fix, when an IRQ needs to be resent, if the interrupt has a parent
    IRQ and runs in the context of the parent IRQ, then resend the parent.

    Also, handle_nested_irq() needs to clear the replay flag like the
    other handlers, otherwise check_irq_resend() will set it and it will
    never be cleared. Without clearing, it results in the first resend
    working fine, but check_irq_resend() returning early on subsequent
    resends because the replay flag is still set.

    Problem discovered on ARM/OMAP platforms where a nested IRQ that's
    also a wakeup IRQ happens late in suspend and needed to be retriggered
    during the resume process.

    [khilman@ti.com: changelog edits, clear IRQS_REPLAY in handle_nested_irq()]

    Reported-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1350425269-11489-1-git-send-email-khilman@deeprootsystems.com
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

10 Oct, 2012

1 commit

  • Currently we rely on all IRQ chip instances to dynamically
    allocate their IRQ descriptors unless they use the linear
    IRQ domain. So for irqdomain_add_legacy() and
    irqdomain_add_simple() the caller need to make sure that
    descriptors are allocated.

    Let's slightly augment the yet unused irqdomain_add_simple()
    to also allocate descriptors as a means to simplify usage
    and avoid code duplication throughout the kernel.

    We warn if descriptors cannot be allocated, e.g. if a
    platform has the bad habit of hogging descriptors at boot
    time.

    Cc: Thomas Gleixner
    Cc: Grant Likely
    Cc: Paul Mundt
    Cc: Russell King
    Cc: Lee Jones
    Reviewed-by: Rob Herring
    Signed-off-by: Linus Walleij

    Linus Walleij
     

21 Aug, 2012

2 commits

  • Export dummy_irq_chip to modules to allow them to do things such as

    irq_set_chip_and_handler(virq,
    &dummy_irq_chip,
    handle_level_irq);
    This fixes

    ERROR: "dummy_irq_chip" [drivers/gpio/gpio-pcf857x.ko] undefined!

    when gpio-pcf857x.c is being built as a module.

    Signed-off-by: Kuninori Morimoto
    Cc: Linus Walleij
    Cc: Stephen Rothwell
    Cc: Greg KH
    Link: http://lkml.kernel.org/r/871ujstrp6.wl%25kuninori.morimoto.gx@renesas.com
    Signed-off-by: Thomas Gleixner

    Kuninori Morimoto
     
  • Export irq_set_chip_and_handler_name() to modules to allow them to
    do things such as

    irq_set_chip_and_handler(....);

    This fixes

    ERROR: "irq_set_chip_and_handler_name" \
    [drivers/gpio/gpio-pcf857x.ko] undefined!

    when gpio-pcf857x.c is being built as a module.

    Signed-off-by: Kuninori Morimoto
    Cc: Linus Walleij
    Cc: Stephen Rothwell
    Cc: Greg KH
    Link: http://lkml.kernel.org/r/873948trpk.wl%25kuninori.morimoto.gx@renesas.com
    Signed-off-by: Thomas Gleixner

    Kuninori Morimoto
     

04 Aug, 2012

1 commit


01 Aug, 2012

2 commits

  • Pull irqdomain changes from Grant Likely:
    "Round of refactoring and enhancements to irq_domain infrastructure.
    This series starts the process of simplifying irqdomain. The ultimate
    goal is to merge LEGACY, LINEAR and TREE mappings into a single
    system, but had to back off from that after some last minute bugs.
    Instead it mainly reorganizes the code and ensures that the reverse
    map gets populated when the irq is mapped instead of the first time it
    is looked up.

    Merging of the irq_domain types is deferred to v3.7

    In other news, this series adds helpers for creating static mappings
    on a linear or tree mapping."

    * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    irqdomain: Improve diagnostics when a domain mapping fails
    irqdomain: eliminate slow-path revmap lookups
    irqdomain: Fix irq_create_direct_mapping() to test irq_domain type.
    irqdomain: Eliminate dedicated radix lookup functions
    irqdomain: Support for static IRQ mapping and association.
    irqdomain: Always update revmap when setting up a virq
    irqdomain: Split disassociating code into separate function
    irq_domain: correct a minor wrong comment for linear revmap
    irq_domain: Standardise legacy/linear domain selection
    irqdomain: Make ops->map hook optional
    irqdomain: Remove unnecessary test for IRQ_DOMAIN_MAP_LEGACY
    irqdomain: Simple NUMA awareness.
    devicetree: add helper inline for retrieving a node's full name

    Linus Torvalds
     
  • Pull random subsystem patches from Ted Ts'o:
    "This patch series contains a major revamp of how we collect entropy
    from interrupts for /dev/random and /dev/urandom.

    The goal is to addresses weaknesses discussed in the paper "Mining
    your Ps and Qs: Detection of Widespread Weak Keys in Network Devices",
    by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman,
    which will be published in the Proceedings of the 21st Usenix Security
    Symposium, August 2012. (See https://factorable.net for more
    information and an extended version of the paper.)"

    Fix up trivial conflicts due to nearby changes in
    drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c}

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits)
    random: mix in architectural randomness in extract_buf()
    dmi: Feed DMI table to /dev/random driver
    random: Add comment to random_initialize()
    random: final removal of IRQF_SAMPLE_RANDOM
    um: remove IRQF_SAMPLE_RANDOM which is now a no-op
    sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op
    board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op
    isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out
    uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op
    drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op
    xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op
    n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op
    i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op
    input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op
    mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op
    ...

    Linus Torvalds
     

25 Jul, 2012

5 commits

  • Some interrupt chips like MSI are oneshot safe by implementation. For
    those interrupts we can avoid the mask/unmask sequence for threaded
    interrupt handlers.

    Signed-off-by: Thomas Gleixner
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1207132056540.32033@ionos
    Cc: Linus Torvalds
    Cc: Avi Kivity
    Cc: Marcelo Tosatti
    Cc: Jan Kiszka

    Thomas Gleixner
     
  • When the map operation fails log the error code we get and add a WARN_ON()
    so we get a backtrace (which should help work out which interrupt is the
    source of the issue).

    Signed-off-by: Mark Brown
    Signed-off-by: Grant Likely

    Mark Brown
     
  • With the current state of irq_domain, the reverse map is always updated
    when new IRQs get mapped. This means that the irq_find_mapping() function
    can be simplified to execute the revmap lookup functions unconditionally

    This patch adds lookup functions for the revmaps that don't yet have one
    and removes the slow path lookup code path.

    v8: Broke out unrelated changes into separate patches. Rebased on Paul's irq
    association patches.
    v7: Rebased to irqdomain/next for v3.4 and applied before the removal of 'hint'
    v6: Remove the slow path entirely. The only place where the slow path
    could get called is for a linear mapping if the hwirq number is larger
    than the linear revmap size. There shouldn't be any interrupt
    controllers that do that.
    v5: rewrite to not use a ->revmap() callback. It is simpler, smaller,
    safer and faster to open code each of the revmap lookups directly into
    irq_find_mapping() via a switch statement.
    v4: Fix build failure on incorrect variable reference.

    Signed-off-by: Grant Likely
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Milton Miller
    Cc: Paul Mundt
    Cc: Rob Herring

    Grant Likely
     
  • Grant Likely
     
  • Pull devicetree updates from Rob Herring:
    "A small set of changes for devicetree:
    - Couple of Documentation fixes
    - Addition of new helper function of_node_full_name
    - Improve of_parse_phandle_with_args return values
    - Some NULL related sparse fixes"

    Grant's busy packing.

    * tag 'dt-for-3.6' of git://sources.calxeda.com/kernel/linux:
    of: mtd: nuke useless const qualifier
    devicetree: add helper inline for retrieving a node's full name
    of: return -ENOENT when no property
    usage-model.txt: fix typo machine_init->init_machine
    of: Fix null pointer related warnings in base.c file
    LED: Fix missing semicolon in OF documentation
    of: fix a few typos in the binding documentation

    Linus Torvalds
     

23 Jul, 2012

2 commits


19 Jul, 2012

1 commit

  • With the new interrupt sampling system, we are no longer using the
    timer_rand_state structure in the irq descriptor, so we can stop
    initializing it now.

    [ Merged in fixes from Sedat to find some last missing references to
    rand_initialize_irq() ]

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Sedat Dilek

    Theodore Ts'o
     

15 Jul, 2012

1 commit

  • We've been moving away from add_interrupt_randomness() for various
    reasons: it's too expensive to do on every interrupt, and flooding the
    CPU with interrupts could theoretically cause bogus floods of entropy
    from a somewhat externally controllable source.

    This solves both problems by limiting the actual randomness addition
    to just once a second or after 64 interrupts, whicever comes first.
    During that time, the interrupt cycle data is buffered up in a per-cpu
    pool. Also, we make sure the the nonblocking pool used by urandom is
    initialized before we start feeding the normal input pool. This
    assures that /dev/urandom is returning unpredictable data as soon as
    possible.

    (Based on an original patch by Linus, but significantly modified by
    tytso.)

    Tested-by: Eric Wustrow
    Reported-by: Eric Wustrow
    Reported-by: Nadia Heninger
    Reported-by: Zakir Durumeric
    Reported-by: J. Alex Halderman .
    Signed-off-by: Linus Torvalds
    Signed-off-by: "Theodore Ts'o"
    Cc: stable@vger.kernel.org

    Theodore Ts'o
     

11 Jul, 2012

3 commits

  • irq_create_direct_mapping can only be used with the NOMAP type. Make
    the function test to ensure it is passed the correct type of
    irq_domain.

    Signed-off-by: Grant Likely
    Cc: Paul Mundt
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Rob Herring

    Grant Likely
     
  • In preparation to remove the slow revmap path, eliminate the public
    radix revmap lookup functions. This simplifies the code and makes the
    slowpath removal patch a lot simpler.

    Signed-off-by: Grant Likely
    Cc: Paul Mundt
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Rob Herring

    Grant Likely
     
  • This adds a new strict mapping API for supporting creation of linux IRQs
    at existing positions within the domain. The new routines are as follows:

    For dynamic allocation and insertion to specified ranges:

    - irq_create_identity_mapping()
    - irq_create_strict_mappings()

    These will allocate and associate a range of linux IRQs at the specified
    location. This can be used by controllers that have their own static linux IRQ
    definitions to map a hwirq range to, as well as for platforms that wish to
    establish 1:1 identity mapping between linux and hwirq space.

    For insertion to specified ranges by platforms that do their own irq_desc
    management:

    - irq_domain_associate()
    - irq_domain_associate_many()

    These in turn call back in to the domain's ->map() routine, for further
    processing by the platform. Disassociation of IRQs get handled through
    irq_dispose_mapping() as normal.

    With these in place it should be possible to begin migration of legacy IRQ
    domains to linear ones, without requiring special handling for static vs
    dynamic IRQ definitions in DT vs non-DT paths. This also makes it possible
    for domains with static mappings to adopt whichever tree model best fits
    their needs, rather than simply restricting them to linear revmaps.

    Signed-off-by: Paul Mundt
    [grant.likely: Reorganized irq_domain_associate{,_many} to have all logic in one place]
    [grant.likely: Add error checking for unallocated irq_descs at associate time]
    Signed-off-by: Grant Likely
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Rob Herring

    Grant Likely