1. 14 3月, 2018 3 次提交
  2. 16 2月, 2018 6 次提交
    • J
      irqchip/bcm: Remove hashed address printing · 2d02424e
      Jaedon Shin 提交于
      Since commit ad67b74d ("printk: hash addresses printed with %p")
      pointers are being hashed when printed. Displaying the virtual memory at
      bootup time is not helpful. so delete the prints.
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJaedon Shin <jaedon.shin@gmail.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      2d02424e
    • M
      irqchip/gic-v2m: Add PCI Multi-MSI support · de337ee3
      Marc Zyngier 提交于
      We'd never implemented Multi-MSI support with GICv2m, because
      it is weird and clunky, and you'd think people would rather use
      MSI-X.
      
      Turns out there is still plenty of devices out there that rely
      on Multi-MSI. Oh well, let's teach that trick to the v2m widget,
      it is not a big deal anyway.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      de337ee3
    • S
      irqchip/gic-v3: Ignore disabled ITS nodes · 95a25625
      Stephen Boyd 提交于
      On some platforms there's an ITS available but it's not enabled
      because reading or writing the registers is denied by the
      firmware. In fact, reading or writing them will cause the system
      to reset. We could remove the node from DT in such a case, but
      it's better to skip nodes that are marked as "disabled" in DT so
      that we can describe the hardware that exists and use the status
      property to indicate how the firmware has configured things.
      
      Cc: Stuart Yoder <stuyoder@gmail.com>
      Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rajendra Nayak <rnayak@codeaurora.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      95a25625
    • S
      irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq() · 21ec30c0
      Shanker Donthineni 提交于
      A DMB instruction can be used to ensure the relative order of only
      memory accesses before and after the barrier. Since writes to system
      registers are not memory operations, barrier DMB is not sufficient
      for observability of memory accesses that occur before ICC_SGI1R_EL1
      writes.
      
      A DSB instruction ensures that no instructions that appear in program
      order after the DSB instruction, can execute until the DSB instruction
      has completed.
      
      Cc: stable@vger.kernel.org
      Acked-by: Will Deacon <will.deacon@arm.com>,
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      21ec30c0
    • M
      irqchip/gic-v3: Change pr_debug message to pr_devel · b6dd4d83
      Mark Salter 提交于
      The pr_debug() in gic-v3 gic_send_sgi() can trigger a circular locking
      warning:
      
       GICv3: CPU10: ICC_SGI1R_EL1 5000400
       ======================================================
       WARNING: possible circular locking dependency detected
       4.15.0+ #1 Tainted: G        W
       ------------------------------------------------------
       dynamic_debug01/1873 is trying to acquire lock:
        ((console_sem).lock){-...}, at: [<0000000099c891ec>] down_trylock+0x20/0x4c
      
       but task is already holding lock:
        (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #2 (&rq->lock){-.-.}:
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock+0x4c/0x60
              task_fork_fair+0x3c/0x148
              sched_fork+0x10c/0x214
              copy_process.isra.32.part.33+0x4e8/0x14f0
              _do_fork+0xe8/0x78c
              kernel_thread+0x48/0x54
              rest_init+0x34/0x2a4
              start_kernel+0x45c/0x488
      
       -> #1 (&p->pi_lock){-.-.}:
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock_irqsave+0x58/0x70
              try_to_wake_up+0x48/0x600
              wake_up_process+0x28/0x34
              __up.isra.0+0x60/0x6c
              up+0x60/0x68
              __up_console_sem+0x4c/0x7c
              console_unlock+0x328/0x634
              vprintk_emit+0x25c/0x390
              dev_vprintk_emit+0xc4/0x1fc
              dev_printk_emit+0x88/0xa8
              __dev_printk+0x58/0x9c
              _dev_info+0x84/0xa8
              usb_new_device+0x100/0x474
              hub_port_connect+0x280/0x92c
              hub_event+0x740/0xa84
              process_one_work+0x240/0x70c
              worker_thread+0x60/0x400
              kthread+0x110/0x13c
              ret_from_fork+0x10/0x18
      
       -> #0 ((console_sem).lock){-...}:
              validate_chain.isra.34+0x6e4/0xa20
              __lock_acquire+0x3b4/0x6e0
              lock_acquire+0xf4/0x2a8
              _raw_spin_lock_irqsave+0x58/0x70
              down_trylock+0x20/0x4c
              __down_trylock_console_sem+0x3c/0x9c
              console_trylock+0x20/0xb0
              vprintk_emit+0x254/0x390
              vprintk_default+0x58/0x90
              vprintk_func+0xbc/0x164
              printk+0x80/0xa0
              __dynamic_pr_debug+0x84/0xac
              gic_raise_softirq+0x184/0x18c
              smp_cross_call+0xac/0x218
              smp_send_reschedule+0x3c/0x48
              resched_curr+0x60/0x9c
              check_preempt_curr+0x70/0xdc
              wake_up_new_task+0x310/0x470
              _do_fork+0x188/0x78c
              SyS_clone+0x44/0x50
              __sys_trace_return+0x0/0x4
      
       other info that might help us debug this:
      
       Chain exists of:
         (console_sem).lock --> &p->pi_lock --> &rq->lock
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&rq->lock);
                                      lock(&p->pi_lock);
                                      lock(&rq->lock);
         lock((console_sem).lock);
      
        *** DEADLOCK ***
      
       2 locks held by dynamic_debug01/1873:
        #0:  (&p->pi_lock){-.-.}, at: [<000000001366df53>] wake_up_new_task+0x40/0x470
        #1:  (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc
      
       stack backtrace:
       CPU: 10 PID: 1873 Comm: dynamic_debug01 Tainted: G        W        4.15.0+ #1
       Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS T48 10/02/2017
       Call trace:
        dump_backtrace+0x0/0x188
        show_stack+0x24/0x2c
        dump_stack+0xa4/0xe0
        print_circular_bug.isra.31+0x29c/0x2b8
        check_prev_add.constprop.39+0x6c8/0x6dc
        validate_chain.isra.34+0x6e4/0xa20
        __lock_acquire+0x3b4/0x6e0
        lock_acquire+0xf4/0x2a8
        _raw_spin_lock_irqsave+0x58/0x70
        down_trylock+0x20/0x4c
        __down_trylock_console_sem+0x3c/0x9c
        console_trylock+0x20/0xb0
        vprintk_emit+0x254/0x390
        vprintk_default+0x58/0x90
        vprintk_func+0xbc/0x164
        printk+0x80/0xa0
        __dynamic_pr_debug+0x84/0xac
        gic_raise_softirq+0x184/0x18c
        smp_cross_call+0xac/0x218
        smp_send_reschedule+0x3c/0x48
        resched_curr+0x60/0x9c
        check_preempt_curr+0x70/0xdc
        wake_up_new_task+0x310/0x470
        _do_fork+0x188/0x78c
        SyS_clone+0x44/0x50
        __sys_trace_return+0x0/0x4
       GICv3: CPU0: ICC_SGI1R_EL1 12000
      
      This could be fixed with printk_deferred() but that might lessen its
      usefulness for debugging. So change it to pr_devel to keep it out of
      production kernels. Developers working on gic-v3 can enable it as
      needed in their kernels.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      b6dd4d83
    • M
      irqchip/mips-gic: Avoid spuriously handling masked interrupts · 285cb4f6
      Matt Redfearn 提交于
      Commit 7778c4b2 ("irqchip: mips-gic: Use pcpu_masks to avoid reading
      GIC_SH_MASK*") removed the read of the hardware mask register when
      handling shared interrupts, instead using the driver's shadow pcpu_masks
      entry as the effective mask. Unfortunately this did not take account of
      the write to pcpu_masks during gic_shared_irq_domain_map, which
      effectively unmasks the interrupt early. If an interrupt is asserted,
      gic_handle_shared_int decodes and processes the interrupt even though it
      has not yet been unmasked via gic_unmask_irq, which also sets the
      appropriate bit in pcpu_masks.
      
      On the MIPS Boston board, when a console command line of
      "console=ttyS0,115200n8r" is passed, the modem status IRQ is enabled in
      the UART, which is immediately raised to the GIC. The interrupt has been
      mapped, but no handler has yet been registered, nor is it expected to be
      unmasked. However, the write to pcpu_masks in gic_shared_irq_domain_map
      has effectively unmasked it, resulting in endless reports of:
      
      [    5.058454] irq 13, desc: ffffffff80a7ad80, depth: 1, count: 0, unhandled: 0
      [    5.062057] ->handle_irq():  ffffffff801b1838,
      [    5.062175] handle_bad_irq+0x0/0x2c0
      
      Where IRQ 13 is the UART interrupt.
      
      To fix this, just remove the write to pcpu_masks in
      gic_shared_irq_domain_map. The existing write in gic_unmask_irq is the
      correct place for what is now the effective unmasking.
      
      Cc: stable@vger.kernel.org
      Fixes: 7778c4b2 ("irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK*")
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Reviewed-by: NPaul Burton <paul.burton@mips.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      285cb4f6
  3. 29 1月, 2018 1 次提交
  4. 04 1月, 2018 4 次提交
    • S
      irqchip/gic-v3: Fix the driver probe() fail due to disabled GICC entry · ebe2f871
      Shanker Donthineni 提交于
      The ACPI specification says OS shouldn't attempt to use GICC configuration
      parameters if the flag ACPI_MADT_ENABLED is cleared. The ARM64-SMP code
      skips the disabled GICC entries but not causing any issue. However the
      current GICv3 driver probe bails out causing kernel panic() instead of
      skipping the disabled GICC interfaces. This issue happens on systems
      where redistributor regions are not in the always-on power domain and
      one of GICC interface marked with ACPI_MADT_ENABLED=0.
      
      This patch does the two things to fix the panic.
        - Don't return an error in gic_acpi_match_gicc() for disabled GICC entry.
        - No need to keep GICR region information for disabled GICC entry.
      
      Observed kernel crash on QDF2400 platform GICC entry is disabled.
      Kernel crash traces:
        Kernel panic - not syncing: No interrupt controller found.
        CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.13.5 #26
        [<ffff000008087770>] dump_backtrace+0x0/0x218
        [<ffff0000080879dc>] show_stack+0x14/0x20
        [<ffff00000883b078>] dump_stack+0x98/0xb8
        [<ffff0000080c5c14>] panic+0x118/0x26c
        [<ffff000008b62348>] init_IRQ+0x24/0x2c
        [<ffff000008b609fc>] start_kernel+0x230/0x394
        [<ffff000008b601e4>] __primary_switched+0x64/0x6c
        ---[ end Kernel panic - not syncing: No interrupt controller found.
      
      Disabled GICC subtable example:
                         Subtable Type : 0B [Generic Interrupt Controller]
                                Length : 50
                              Reserved : 0000
                  CPU Interface Number : 0000003D
                         Processor UID : 0000003D
                 Flags (decoded below) : 00000000
                     Processor Enabled : 0
       Performance Interrupt Trig Mode : 0
       Virtual GIC Interrupt Trig Mode : 0
              Parking Protocol Version : 00000000
                 Performance Interrupt : 00000017
                        Parked Address : 0000000000000000
                          Base Address : 0000000000000000
              Virtual GIC Base Address : 0000000000000000
           Hypervisor GIC Base Address : 0000000000000000
                 Virtual GIC Interrupt : 00000019
            Redistributor Base Address : 0000FFFF88F40000
                             ARM MPIDR : 000000000000000D
                      Efficiency Class : 00
                              Reserved : 000000
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      ebe2f871
    • M
      irqchip/irq-goldfish-pic: Add Goldfish PIC driver · 4235ff50
      Miodrag Dinic 提交于
      Add device driver for a virtual programmable interrupt controller
      
      The virtual PIC is designed as a device tree-based interrupt controller.
      
      The compatible string used by OS for binding the driver is
      "google,goldfish-pic".
      Signed-off-by: NMiodrag Dinic <miodrag.dinic@mips.com>
      Signed-off-by: NGoran Ferenc <goran.ferenc@mips.com>
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@mips.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      4235ff50
    • W
      irqchip/ompic: fix return value check in ompic_of_init() · 404e6bea
      Wei Yongjun 提交于
      In case of error, the function ioremap() returns NULL pointer not
      ERR_PTR(). The IS_ERR() test in the return value check should be
      replaced with NULL test.
      
      Fixes: 9b54470a ("irqchip: add initial support for ompic")
      Acked-by: NStafford Horne <shorne@gmail.com>
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      404e6bea
    • S
      irqchip/irq-bcm2836: Add support for DT interrupt polarity · ad83c7cb
      Stefan Wahren 提交于
      In order to properly define the polarity of the per-cpu interrupts,
      we need to support for a second property cell. But this must be
      optional to keep backward compatibility with old DT blobs.
      Suggested-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      ad83c7cb
  5. 03 1月, 2018 1 次提交
  6. 30 12月, 2017 1 次提交
    • T
      genirq/irqdomain: Rename early argument of irq_domain_activate_irq() · 702cb0a0
      Thomas Gleixner 提交于
      The 'early' argument of irq_domain_activate_irq() is actually used to
      denote reservation mode. To avoid confusion, rename it before abuse
      happens.
      
      No functional change.
      
      Fixes: 72491643 ("genirq/irqdomain: Update irq_domain_ops.activate() signature")
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Alexandru Chirvasitu <achirvasub@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Mikael Pettersson <mikpelinux@gmail.com>
      Cc: Josh Poulson <jopoulso@microsoft.com>
      Cc: Mihai Costache <v-micos@microsoft.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-pci@vger.kernel.org
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Dexuan Cui <decui@microsoft.com>
      Cc: Simon Xiao <sixiao@microsoft.com>
      Cc: Saeed Mahameed <saeedm@mellanox.com>
      Cc: Jork Loeser <Jork.Loeser@microsoft.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: devel@linuxdriverproject.org
      Cc: KY Srinivasan <kys@microsoft.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Sakari Ailus <sakari.ailus@intel.com>,
      Cc: linux-media@vger.kernel.org
      702cb0a0
  7. 28 12月, 2017 1 次提交
  8. 19 12月, 2017 1 次提交
  9. 24 11月, 2017 2 次提交
  10. 14 11月, 2017 2 次提交
  11. 13 11月, 2017 2 次提交
  12. 12 11月, 2017 1 次提交
  13. 10 11月, 2017 1 次提交
  14. 09 11月, 2017 2 次提交
  15. 07 11月, 2017 7 次提交
  16. 06 11月, 2017 1 次提交
  17. 03 11月, 2017 1 次提交
  18. 02 11月, 2017 3 次提交
    • P
      irqchip: mips-gic: Make IPI bitmaps static · 61dc367e
      Paul Burton 提交于
      We have 2 bitmaps used to keep track of interrupts dedicated to IPIs in
      the MIPS GIC irqchip driver. These bitmaps are only used from the one
      compilation unit of that driver, and so can be made static. Do so in
      order to avoid polluting the symbol table & global namespace.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      61dc367e
    • P
      irqchip: mips-gic: Share register writes in gic_set_type() · 5af3e93e
      Paul Burton 提交于
      The gic_set_type() function included writes to the MIPS GIC polarity,
      trigger & dual-trigger registers in each case of a switch statement
      determining the IRQs type. This is all well & good when we only have a
      single cluster & thus a single GIC whose register we want to update. It
      will lead to significant duplication once we have multi-cluster support
      & multiple GICs to update.
      
      Refactor this such that we determine values for the polarity, trigger &
      dual-trigger registers and then have a single set of register writes
      following the switch statement. This will allow us to write the same
      values to each GIC in a multi-cluster system in a later patch, rather
      than needing to duplicate more register writes in each case.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      5af3e93e
    • P
      irqchip: mips-gic: Remove gic_vpes variable · 82857688
      Paul Burton 提交于
      Following the past few patches nothing uses the gic_vpes variable any
      longer. Remove the dead code.
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      82857688