[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v3 7/8] genirq: Return a const cpumask from irq_data_get_affinity_mask
- To: Samuel Holland <samuel@xxxxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- From: "Michael Kelley (LINUX)" <mikelley@xxxxxxxxxxxxx>
- Date: Sun, 3 Jul 2022 14:57:03 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4AlJlw0qEEXG80oeq+rYci/Isl6qoUqErSccHnJ4QUQ=; b=OWm/kLho0KuM8GLyImqeyurBxPc3Ej/qyq8CShJdTts5Z5F9bpJuCZ+Vi0W7K+M9eBywxDsaZ3DcPXZqMw4d6eh6uIJFqS5l9AEWqk8wp8JonqoWHZ6hWK50K5oX20/x+lwWLTs9VpgMqDCL8nYjQ0CV3D5Ixe1ElFMlkZQWHe2DiNY8PXBuOy4RYh9OE8w53PcHEhC4WmuRwBG5k7qDPyujI/V1afHAW54lNeKDKGsGoOaraKN46CRsCG/REZLGGV8nU12cmmVr/lteeg0OQ2FL8yorZ1Hcg7Er51MsHftGCuWAxrQrLjjnR2HynjZl+bvhm7xUmB6sU5rJstq+qw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ILu4N21AWyMjR7PUTuKb/69Zhi7Nrobc9g5Z5lXttRMIKBEaI5mw2aeGimUcI3e9DrtOmK8u/3K4tlRWsY1FftaElL2bTqWlUlyxPhe13Ht8zkSKRd/2LQSDl9tWXbw2ss2cl1mXdS8hvztOM78n+4+xEhHpgeg4dqd94FC99zOXuxEi8fxfKEfNnFc2e5StUpWgGKh8CotncAXujdSMU9aO2FyDQ71sGGDPqKysGZc2UhppPhNy4pnkBbRJGj3p7fF9ifRKVxoclj4QD+5HaqTbJTQXTLYUbPjGZ//V4lWI4EbzdbRVsa9Ym4dWw2i398CyKvarfkuUJ0Xhf/KFgA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
- Cc: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Colin Ian King <colin.king@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julia Lawall <Julia.Lawall@xxxxxxxx>, KY Srinivasan <kys@xxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Krzysztof Wilczyński <kw@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>, Mark Rutland <Mark.Rutland@xxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Maximilian Heyne <mheyne@xxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>, Rikard Falkeborn <rikard.falkeborn@xxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Serge Semin <fancer.lancer@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Wei Xu <xuwei5@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "linux-xtensa@xxxxxxxxxxxxxxxx" <linux-xtensa@xxxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Sun, 03 Jul 2022 14:58:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=22e47685-adf1-4a03-af55-361981d831ee;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-07-03T14:52:51Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
- Thread-index: AQHYjYbXczmReTSuP0mFTu45zRpEE61svhUw
- Thread-topic: [PATCH v3 7/8] genirq: Return a const cpumask from irq_data_get_affinity_mask
From: Samuel Holland <samuel@xxxxxxxxxxxx> Sent: Friday, July 1, 2022 1:01 PM
>
> Now that the irq_data_update_affinity helper exists, enforce its use
> by returning a a const cpumask from irq_data_get_affinity_mask.
Nit: duplicate word "a"
>
> Since the previous commit already updated places that needed to call
> irq_data_update_affinity, this commit updates the remaining code that
> either did not modify the cpumask or immediately passed the modified
> mask to irq_set_affinity.
>
> Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
> ---
>
> Changes in v3:
> - New patch to make the returned cpumasks const
>
> arch/mips/cavium-octeon/octeon-irq.c | 4 ++--
> arch/sh/kernel/irq.c | 7 ++++---
> arch/x86/hyperv/irqdomain.c | 2 +-
> arch/xtensa/kernel/irq.c | 7 ++++---
> drivers/iommu/hyperv-iommu.c | 2 +-
> drivers/pci/controller/pci-hyperv.c | 10 +++++-----
> include/linux/irq.h | 12 +++++++-----
> kernel/irq/chip.c | 8 +++++---
> kernel/irq/debugfs.c | 2 +-
> kernel/irq/ipi.c | 16 +++++++++-------
> 10 files changed, 39 insertions(+), 31 deletions(-)
>
[snip]
> diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c
> index 7e0f6bedc248..42c70d28ef27 100644
> --- a/arch/x86/hyperv/irqdomain.c
> +++ b/arch/x86/hyperv/irqdomain.c
> @@ -192,7 +192,7 @@ static void hv_irq_compose_msi_msg(struct irq_data *data,
> struct msi_msg *msg)
> struct pci_dev *dev;
> struct hv_interrupt_entry out_entry, *stored_entry;
> struct irq_cfg *cfg = irqd_cfg(data);
> - cpumask_t *affinity;
> + const cpumask_t *affinity;
> int cpu;
> u64 status;
>
[snip]
> diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c
> index e285a220c913..51bd66a45a11 100644
> --- a/drivers/iommu/hyperv-iommu.c
> +++ b/drivers/iommu/hyperv-iommu.c
> @@ -194,7 +194,7 @@ hyperv_root_ir_compose_msi_msg(struct irq_data *irq_data,
> struct msi_msg *msg)
> u32 vector;
> struct irq_cfg *cfg;
> int ioapic_id;
> - struct cpumask *affinity;
> + const struct cpumask *affinity;
> int cpu;
> struct hv_interrupt_entry entry;
> struct hyperv_root_ir_data *data = irq_data->chip_data;
> diff --git a/drivers/pci/controller/pci-hyperv.c
> b/drivers/pci/controller/pci-hyperv.c
> index db814f7b93ba..aebada45569b 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -642,7 +642,7 @@ static void hv_arch_irq_unmask(struct irq_data *data)
> struct hv_retarget_device_interrupt *params;
> struct tran_int_desc *int_desc;
> struct hv_pcibus_device *hbus;
> - struct cpumask *dest;
> + const struct cpumask *dest;
> cpumask_var_t tmp;
> struct pci_bus *pbus;
> struct pci_dev *pdev;
> @@ -1613,7 +1613,7 @@ static void hv_pci_compose_compl(void *context, struct
> pci_response *resp,
> }
>
> static u32 hv_compose_msi_req_v1(
> - struct pci_create_interrupt *int_pkt, struct cpumask *affinity,
> + struct pci_create_interrupt *int_pkt, const struct cpumask *affinity,
> u32 slot, u8 vector, u8 vector_count)
> {
> int_pkt->message_type.type = PCI_CREATE_INTERRUPT_MESSAGE;
> @@ -1641,7 +1641,7 @@ static int hv_compose_msi_req_get_cpu(struct cpumask
> *affinity)
> }
>
> static u32 hv_compose_msi_req_v2(
> - struct pci_create_interrupt2 *int_pkt, struct cpumask *affinity,
> + struct pci_create_interrupt2 *int_pkt, const struct cpumask *affinity,
> u32 slot, u8 vector, u8 vector_count)
> {
> int cpu;
> @@ -1660,7 +1660,7 @@ static u32 hv_compose_msi_req_v2(
> }
>
> static u32 hv_compose_msi_req_v3(
> - struct pci_create_interrupt3 *int_pkt, struct cpumask *affinity,
> + struct pci_create_interrupt3 *int_pkt, const struct cpumask *affinity,
> u32 slot, u32 vector, u8 vector_count)
> {
> int cpu;
> @@ -1697,7 +1697,7 @@ static void hv_compose_msi_msg(struct irq_data *data,
> struct msi_msg *msg)
> struct hv_pci_dev *hpdev;
> struct pci_bus *pbus;
> struct pci_dev *pdev;
> - struct cpumask *dest;
> + const struct cpumask *dest;
> struct compose_comp_ctxt comp;
> struct tran_int_desc *int_desc;
> struct msi_desc *msi_desc;
For these files with Hyper-V related changes:
arch/x86/hyperv/irqdomain.c
drivers/iommu/hyperv-iommu.c
drivers/pci/controller/pci-hyperv.c
Reviewed-by: Michael Kelley <mikelley@xxxxxxxxxxxxx>
|