From patchwork Sun Sep 6 04:23:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 7130631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 32857BEEC1 for ; Sun, 6 Sep 2015 04:28:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DB5D20802 for ; Sun, 6 Sep 2015 04:28:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBED8207F1 for ; Sun, 6 Sep 2015 04:28:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZYRXb-00071J-Dc; Sun, 06 Sep 2015 04:26:55 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZYRXN-0006i9-UK for linux-arm-kernel@lists.infradead.org; Sun, 06 Sep 2015 04:26:43 +0000 Received: from 172.24.1.48 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.48]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BMJ78216; Sun, 06 Sep 2015 12:24:12 +0800 (CST) Received: from localhost (10.177.19.219) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Sun, 6 Sep 2015 12:24:01 +0800 From: Yang Yingliang To: , Subject: [RFC PATCH v1 3/4] genirq: rename config GENERIC_PENDING_IRQ to GENERIC_IRQ_MIGRATION Date: Sun, 6 Sep 2015 12:23:40 +0800 Message-ID: <1441513421-8092-4-git-send-email-yangyingliang@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1441513421-8092-1-git-send-email-yangyingliang@huawei.com> References: <1441513421-8092-1-git-send-email-yangyingliang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.19.219] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.55EBBFEC.002D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b349c28cb01736f11d2a3a7b69d366af X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150905_212642_546426_A1D65302 X-CRM114-Status: GOOD ( 13.92 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Russell King - ARM Linux , Marc Zyngier , Will Deacon , Hanjun Guo , Yang Yingliang , Thomas Gleixner , Jiang Liu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make the config name more general for moving other migration interrupts code into kernel/irq/migration.c Cc: Jiang Liu Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Mark Rutland Cc: Will Deacon Cc: Russell King - ARM Linux Cc: Hanjun Guo Signed-off-by: Yang Yingliang --- arch/arc/Kconfig | 2 +- arch/hexagon/Kconfig | 2 +- arch/ia64/Kconfig | 2 +- arch/tile/Kconfig | 2 +- arch/x86/Kconfig | 2 +- arch/x86/kernel/apic/io_apic.c | 2 +- include/linux/irq.h | 4 +++- include/linux/irqdesc.h | 2 +- kernel/irq/Kconfig | 4 ++-- kernel/irq/Makefile | 2 +- kernel/irq/irqdesc.c | 6 +++--- kernel/irq/manage.c | 2 +- kernel/irq/proc.c | 2 +- 13 files changed, 18 insertions(+), 16 deletions(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 78c0621..5d11976 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -19,7 +19,7 @@ config ARC select GENERIC_FIND_FIRST_BIT # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP select GENERIC_IRQ_SHOW - select GENERIC_PENDING_IRQ if SMP + select GENERIC_IRQ_MIGRATION if SMP select GENERIC_SMP_IDLE_THREAD select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 4dc89d1..ffee613 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -11,7 +11,7 @@ config HEXAGON # select ARCH_WANT_OPTIONAL_GPIOLIB # select ARCH_REQUIRE_GPIOLIB # select HAVE_CLK - # select GENERIC_PENDING_IRQ if SMP + # select GENERIC_IRQ_MIGRATION if SMP select GENERIC_ATOMIC64 select HAVE_PERF_EVENTS # GENERIC_ALLOCATOR is used by dma_alloc_coherent() diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 42a91a7..6e7fb9b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -36,7 +36,7 @@ config IA64 select VIRT_TO_BUS select ARCH_DISCARD_MEMBLOCK select GENERIC_IRQ_PROBE - select GENERIC_PENDING_IRQ if SMP + select GENERIC_IRQ_MIGRATION if SMP select GENERIC_IRQ_SHOW select GENERIC_IRQ_LEGACY select ARCH_WANT_OPTIONAL_GPIOLIB diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 9def1f5..cb47e6c 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -13,7 +13,7 @@ config TILE select CC_OPTIMIZE_FOR_SIZE select HAVE_DEBUG_KMEMLEAK select GENERIC_IRQ_PROBE - select GENERIC_PENDING_IRQ if SMP + select GENERIC_IRQ_MIGRATION if SMP select GENERIC_IRQ_SHOW select HAVE_DEBUG_BUGVERBOSE select VIRT_TO_BUS diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 48f7433..c869f75 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -65,7 +65,7 @@ config X86 select GENERIC_IOMAP select GENERIC_IRQ_PROBE select GENERIC_IRQ_SHOW - select GENERIC_PENDING_IRQ if SMP + select GENERIC_IRQ_MIGRATION if SMP select GENERIC_SMP_IDLE_THREAD select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 38a76f8..a1203d5 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1684,7 +1684,7 @@ static unsigned int startup_ioapic_irq(struct irq_data *data) atomic_t irq_mis_count; -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION static bool io_apic_level_ack_pending(struct mp_chip_data *data) { struct irq_pin_list *entry; diff --git a/include/linux/irq.h b/include/linux/irq.h index f4ecfb9..3461809 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -438,12 +438,14 @@ extern int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask, bool force); extern int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info); -#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) +#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_IRQ_MIGRATION) void irq_move_irq(struct irq_data *data); void irq_move_masked_irq(struct irq_data *data); +void migrate_irqs(void); #else static inline void irq_move_irq(struct irq_data *data) { } static inline void irq_move_masked_irq(struct irq_data *data) { } +static inline void migrate_irqs(void) { } #endif extern int no_irq_affinity; diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 5acfa26..1ec727d 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -66,7 +66,7 @@ struct irq_desc { #ifdef CONFIG_SMP const struct cpumask *affinity_hint; struct irq_affinity_notify *affinity_notify; -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION cpumask_var_t pending_mask; #endif #endif diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig index 9a76e3b..4350358 100644 --- a/kernel/irq/Kconfig +++ b/kernel/irq/Kconfig @@ -26,8 +26,8 @@ config GENERIC_IRQ_SHOW_LEVEL config GENERIC_IRQ_LEGACY_ALLOC_HWIRQ bool -# Support for delayed migration from interrupt context -config GENERIC_PENDING_IRQ +# Support for generic irq migration +config GENERIC_IRQ_MIGRATION bool # Alpha specific irq affinity mechanism diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile index d121235..bdd31b7 100644 --- a/kernel/irq/Makefile +++ b/kernel/irq/Makefile @@ -4,6 +4,6 @@ obj-$(CONFIG_GENERIC_IRQ_CHIP) += generic-chip.o obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o obj-$(CONFIG_IRQ_DOMAIN) += irqdomain.o obj-$(CONFIG_PROC_FS) += proc.o -obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o +obj-$(CONFIG_GENERIC_IRQ_MIGRATION) += migration.o obj-$(CONFIG_PM_SLEEP) += pm.o obj-$(CONFIG_GENERIC_MSI_IRQ) += msi.o diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index c036a1a..f5a8930 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -41,7 +41,7 @@ static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node) if (!zalloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node)) return -ENOMEM; -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION if (!zalloc_cpumask_var_node(&desc->pending_mask, gfp, node)) { free_cpumask_var(desc->irq_data.affinity); return -ENOMEM; @@ -54,7 +54,7 @@ static void desc_smp_init(struct irq_desc *desc, int node) { desc->irq_data.node = node; cpumask_copy(desc->irq_data.affinity, irq_default_affinity); -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION cpumask_clear(desc->pending_mask); #endif } @@ -118,7 +118,7 @@ static void delete_irq_desc(unsigned int irq) #ifdef CONFIG_SMP static void free_masks(struct irq_desc *desc) { -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION free_cpumask_var(desc->pending_mask); #endif free_cpumask_var(desc->irq_data.affinity); diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index ad1b064..6207deb 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -153,7 +153,7 @@ void irq_set_thread_affinity(struct irq_desc *desc) } } -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION static inline bool irq_can_move_pcntxt(struct irq_data *data) { return irqd_can_move_in_process_context(data); diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 0e97c14..c070fa6 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -41,7 +41,7 @@ static int show_irq_affinity(int type, struct seq_file *m, void *v) struct irq_desc *desc = irq_to_desc((long)m->private); const struct cpumask *mask = desc->irq_data.affinity; -#ifdef CONFIG_GENERIC_PENDING_IRQ +#ifdef CONFIG_GENERIC_IRQ_MIGRATION if (irqd_is_setaffinity_pending(&desc->irq_data)) mask = desc->pending_mask; #endif