From patchwork Mon May 4 03:15:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 6322781 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 656FB9F1C2 for ; Mon, 4 May 2015 03:14:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 801BD203A1 for ; Mon, 4 May 2015 03:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8BECA20392 for ; Mon, 4 May 2015 03:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492AbbEDDO2 (ORCPT ); Sun, 3 May 2015 23:14:28 -0400 Received: from mga01.intel.com ([192.55.52.88]:49604 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbbEDDOT (ORCPT ); Sun, 3 May 2015 23:14:19 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 03 May 2015 20:14:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,363,1427785200"; d="scan'208";a="720096798" Received: from gerry-dev.bj.intel.com ([10.238.158.61]) by fmsmga002.fm.intel.com with ESMTP; 03 May 2015 20:14:03 -0700 From: Jiang Liu To: Thomas Gleixner , Bjorn Helgaas , Benjamin Herrenschmidt , Ingo Molnar , "H. Peter Anvin" , "Rafael J. Wysocki" , Randy Dunlap , Yinghai Lu , Borislav Petkov , Jiang Liu , Jason Cooper , Grant Likely , Kevin Cernekee Cc: Konrad Rzeszutek Wilk , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [RFC v1 03/11] genirq: Use CONFIG_NUMA instead of CONFIG_SMP to guard irq_common_data.node Date: Mon, 4 May 2015 11:15:31 +0800 Message-Id: <1430709339-29083-4-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1430709339-29083-1-git-send-email-jiang.liu@linux.intel.com> References: <1430709339-29083-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 NUMA is enabled by CONFIG_NUMA instead of CONFIG_SMP, so use CONFIG_NUMA to guard irq_common_data.node. Signed-off-by: Jiang Liu --- include/linux/irq.h | 4 ++-- kernel/irq/irqdesc.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index 3f999a0af713..0138f046642c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -133,7 +133,7 @@ struct irq_domain; */ struct irq_common_data { unsigned int state_use_accessors; -#ifdef CONFIG_SMP +#ifdef CONFIG_NUMA unsigned int node; #endif }; @@ -638,7 +638,7 @@ static inline u32 irq_get_trigger_type(unsigned int irq) static inline int irq_common_data_get_node(struct irq_common_data *d) { -#ifdef CONFIG_SMP +#ifdef CONFIG_NUMA return d->node; #else return 0; diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 20773f073e24..0c3057e42906 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -52,11 +52,13 @@ static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node) static void desc_smp_init(struct irq_desc *desc, int node) { - desc->irq_common_data.node = node; cpumask_copy(desc->irq_data.affinity, irq_default_affinity); #ifdef CONFIG_GENERIC_PENDING_IRQ cpumask_clear(desc->pending_mask); #endif +#ifdef CONFIG_NUMA + desc->irq_common_data.node = node; +#endif } #else