From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751615AbdJ2PYV (ORCPT ); Sun, 29 Oct 2017 11:24:21 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50127 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbdJ2PYT (ORCPT ); Sun, 29 Oct 2017 11:24:19 -0400 Date: Sun, 29 Oct 2017 08:22:04 -0700 From: tip-bot for Christoffer Dall Message-ID: Cc: tglx@linutronix.de, eric.auger@redhat.com, catalin.marinas@arm.com, hpa@zytor.com, cdall@linaro.org, marc.zyngier@arm.com, mingo@kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org Reply-To: tglx@linutronix.de, cdall@linaro.org, hpa@zytor.com, catalin.marinas@arm.com, eric.auger@redhat.com, will.deacon@arm.com, mingo@kernel.org, marc.zyngier@arm.com, linux-kernel@vger.kernel.org In-Reply-To: <1509093281-15225-13-git-send-email-cdall@linaro.org> References: <1509093281-15225-13-git-send-email-cdall@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq: Document vcpu_info usage for percpu_devid interrupts Git-Commit-ID: 250a53d6fcd86012935d1cf71eb2e3d6e88c412c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 250a53d6fcd86012935d1cf71eb2e3d6e88c412c Gitweb: https://git.kernel.org/tip/250a53d6fcd86012935d1cf71eb2e3d6e88c412c Author: Christoffer Dall AuthorDate: Fri, 27 Oct 2017 10:34:33 +0200 Committer: Thomas Gleixner CommitDate: Sun, 29 Oct 2017 16:18:37 +0100 genirq: Document vcpu_info usage for percpu_devid interrupts It is currently unclear how to set the VCPU affinity for a percpu_devid interrupt , since the Linux irq_data structure describes the state for multiple interrupts, one for each physical CPU on the system. Since each such interrupt can be associated with different VCPUs or none at all, associating a single VCPU state with such an interrupt does not capture the necessary semantics. The implementers of irq_set_affinity are the Intel and AMD IOMMUs, and the ARM GIC irqchip. The Intel and AMD callers do not appear to use percpu_devid interrupts, and the ARM GIC implementation only checks the pointer against NULL vs. non-NULL. Therefore, simply update the function documentation to explain the expected use in the context of percpu_devid interrupts, allowing future changes or additions to irqchip implementers to do the right thing. Signed-off-by: Christoffer Dall Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: kvm@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Eric Auger Cc: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/1509093281-15225-13-git-send-email-cdall@linaro.org --- kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index e667912..c65f282 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -381,7 +381,8 @@ int irq_select_affinity_usr(unsigned int irq) /** * irq_set_vcpu_affinity - Set vcpu affinity for the interrupt * @irq: interrupt number to set affinity - * @vcpu_info: vCPU specific data + * @vcpu_info: vCPU specific data or pointer to a percpu array of vCPU + * specific data for percpu_devid interrupts * * This function uses the vCPU specific data to set the vCPU * affinity for an irq. The vCPU specific data is passed from