Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411AbbFAIGK (ORCPT ); Mon, 1 Jun 2015 04:06:10 -0400 Received: from mga02.intel.com ([134.134.136.20]:56115 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752317AbbFAIFz (ORCPT ); Mon, 1 Jun 2015 04:05:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,531,1427785200"; d="scan'208";a="734799834" From: Jiang Liu To: Thomas Gleixner , Bjorn Helgaas , Benjamin Herrenschmidt , Ingo Molnar , "H. Peter Anvin" , Randy Dunlap , Yinghai Lu , Borislav Petkov , Jiang Liu , Jason Cooper , Kevin Cernekee , Arnd Bergmann 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: [Patch v3 14/36] genirq: Introduce helper function irq_data_get_affinity_mask() Date: Mon, 1 Jun 2015 16:05:23 +0800 Message-Id: <1433145945-789-15-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com> References: <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 42 Introduce helper function irq_data_get_affinity_mask() and irq_get_affinity_mask() to hide implementation details, so we could move field 'affinity' from struct irq_data into struct irq_common_data later. Signed-off-by: Jiang Liu Acked-by: Russell King --- include/linux/irq.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/irq.h b/include/linux/irq.h index 68874efe19d3..91fbf10bdae0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -656,6 +656,18 @@ static inline int irq_data_get_node(struct irq_data *d) return irq_common_data_get_node(d->common); } +static inline struct cpumask *irq_get_affinity_mask(int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + + return d ? d->affinity : NULL; +} + +static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) +{ + return d->affinity; +} + unsigned int arch_dynirq_lower_bound(unsigned int from); int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/