From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:49652 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23994818AbdIGX0IRLB1k (ORCPT ); Fri, 8 Sep 2017 01:26:08 +0200 From: Paul Burton Subject: [RFC PATCH v1 0/9] Support shared percpu interrupts; clean up MIPS hacks Date: Thu, 7 Sep 2017 16:25:33 -0700 Message-ID: <20170907232542.20589-1-paul.burton@imgtec.com> In-Reply-To: <1682867.tATABVWsV9@np-p-burton> References: <1682867.tATABVWsV9@np-p-burton> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Thomas Gleixner , Ralf Baechle Cc: dianders@chromium.org, James Hogan , Brian Norris , Jason Cooper , jeffy.chen@rock-chips.com, Marc Zyngier , linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, tfiga@chromium.org, Paul Burton Message-ID: <20170907232533.-JAhz_8hpBD0SIp2xVUWVgtaCaqeoKieTcxfP_GvJtM@z> This series introduces support for percpu shared interrupts and makes use of this support to clean up some hacks that have been used to support such interrupts on MIPS. - Patch 1 allows users of shared interrupts to opt into IRQ_NOAUTOEN behaviour & avoid warnings from doing so. - Patch 2 introduces support for shared percpu_devid interrupts. - Patch 3 introduces a helper allowing users to detect whether an interrupt is a percpu_devid interrupt or not, which is useful during the transition phase where interrupts may be either. - Patches 4 & 5 removes an ugly custom implementation of shared interrupts between the MIPS cevt-r4k timer driver & users of performance counters, in favor of using standard IRQF_SHARED & multiple handlers. - Patches 6 & 7 add percpu interrupt support to the MIPS perf & cevt-r4k timer drivers respectively. - Patch 8 configures the MIPS cop 0 count/compare, fast debug channel & performance counter overflow interrupts as percpu_devid when they are mapped by the irqchip-mips-cpu driver. - Patch 9 removes a hack from the irqchip-mips-gic driver that was used to enable & disable an interrupt across all CPUs, which is no longer necessary with users of those interrupts using the percpu interrupt APIs correctly. This mirrors patch 8 for systems where we map the CPU local interrupts via the GIC. There's a little more work necessary before this could go in - the MIPS oprofile code needs adjusting to use the percpu interrupt APIs, as does the fast debug channel driver. Applies atop next-20170905. Paul Burton (9): genirq: Allow shared interrupt users to opt into IRQ_NOAUTOEN genirq: Support shared per_cpu_devid interrupts genirq: Introduce irq_is_percpu_devid() MIPS: Remove perf_irq interrupt sharing fallback MIPS: Remove perf_irq MIPS: perf: percpu_devid interrupt support MIPS: cevt-r4k: percpu_devid interrupt support irqchip: mips-cpu: Set timer, FDC & perf interrupts percpu_devid irqchip: mips-gic: Remove gic_all_vpes_local_irq_controller arch/mips/include/asm/time.h | 1 - arch/mips/kernel/cevt-r4k.c | 77 ++++++++++++----------------- arch/mips/kernel/perf_event_mipsxx.c | 71 +++++++++++---------------- arch/mips/kernel/time.c | 9 ---- arch/mips/kernel/traps.c | 2 +- arch/mips/oprofile/op_impl.h | 2 - arch/mips/oprofile/op_model_loongson3.c | 39 +++++++-------- arch/mips/oprofile/op_model_mipsxx.c | 10 +--- drivers/irqchip/irq-mips-cpu.c | 9 +++- drivers/irqchip/irq-mips-gic.c | 69 +++----------------------- include/linux/interrupt.h | 2 + include/linux/irqdesc.h | 8 +++ kernel/irq/chip.c | 8 +-- kernel/irq/handle.c | 8 ++- kernel/irq/manage.c | 86 +++++++++++++++++++++++++-------- kernel/irq/settings.h | 5 ++ 16 files changed, 189 insertions(+), 217 deletions(-) -- 2.14.1