Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1620999ybg; Wed, 29 Jul 2020 20:38:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVllR8jWIAqBzOug+g6rhIGklhx89kfz/xKlYc1MPfHBct+MuEyspfwB9H4AsKFK3wa116 X-Received: by 2002:a17:906:5612:: with SMTP id f18mr697482ejq.225.1596080314304; Wed, 29 Jul 2020 20:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596080314; cv=none; d=google.com; s=arc-20160816; b=IApl3DinvLg7UU1dQPL/uyCM7UHAFogc0IXX256iDsFT3TptVLnWVNoonLXU84Zuc+ EQKcK+IVyVrYLoVg/7LJK5xI3JmEN/u4YReG+aGUlzQ101Nqg5PX4TSOp16cx8OCDp98 G4mO9aP7R3FoJSO1ruXky0UmPx58I+lZDvaH/h4d1V8otfocqFCDUUJYv96T7oRMp+hf wK4z3fL0gc9FdIfaWXycMwbYDd0OS0mdhyBD5HqujoX9kidDPpGJCiKZUWETRmqa5kEv 43W059ukLTEIVfEXPyP33sgv9Zu8FzPF3NSxRADBKP9DS5O1jbiG+ZVp7eM3wJE2XWNz 2QbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rFG+x9+HZow4TfntuPbVyKu06FhRpSlKls/VE8rrwy4=; b=vwKAF/xNd26wGP3wzB+oN1QVjc5wIq8JQeBIAPuXOCv/6HVognXwDdW+s6XbOeQIfe i3gOyU9Lo2se16lnkaOeP8BGmbDPlvfAleBAubem/nUAcinZPB/uMO8JuyABlGVwSQ10 ltbWJsddGEbF8zlf3iMAcYqQdx/c73JG669/hoWy5XLBNOi0XjMYWlqC/9FJo5MISZxm xmG7gKToDNu7FwaG5fTfvDk5EgkgsN9L31CeriCGMZWtbNO/3cPv5ELF9CSQaJOipMrJ hL6CjHk+dxf2NZ6iRhC6MGFb3ZD0pW3pAmDl3dzJQDFI6V5Ln94lKMO5maORw5KhnDEG RnrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=NxsGlQYx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si1155061edy.168.2020.07.29.20.38.11; Wed, 29 Jul 2020 20:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=NxsGlQYx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728453AbgG3DiE (ORCPT + 99 others); Wed, 29 Jul 2020 23:38:04 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:55663 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbgG3DiD (ORCPT ); Wed, 29 Jul 2020 23:38:03 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 6E3C58066C; Thu, 30 Jul 2020 15:38:00 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1596080280; bh=rFG+x9+HZow4TfntuPbVyKu06FhRpSlKls/VE8rrwy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NxsGlQYxKUvwG4/yFORQSC1CkP7rmui3UCdjn/IKcuC8MacOpU20yqC998oGNuGxX gZg67tr4OdejJopPRUKGdN0d1LXDls6OC6Tak9/B3fCJ5GdKwRwwF46g+Jzlls9Bit Im0ALqoAcnli1W3to1odZ1maSOINii0iFsifHInsT7sl3n1M6q1qQ2qR3xksztPwKI MRYa3AJzzViqsJEFDt/8QzjJLUhmMHlm+5KWevVL2n/dk0vZOlnTDSqIACAA2+gMsU 3tZfj2JDhsNbhXvoT+J7KWj3A4uVkFMrSW7Jtqtf+AXQl74iGbsktUNFQzMUQyVGAj kuUfQlFNGhqdQ== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Thu, 30 Jul 2020 15:38:01 +1200 Received: from markto-dl.ws.atlnz.lc (markto-dl.ws.atlnz.lc [10.33.23.25]) by smtp (Postfix) with ESMTP id 047A813EF9B; Thu, 30 Jul 2020 15:38:00 +1200 (NZST) Received: by markto-dl.ws.atlnz.lc (Postfix, from userid 1155) id 407DF3410D3; Thu, 30 Jul 2020 15:38:00 +1200 (NZST) From: Mark Tomlinson To: bhelgaas@google.com, rjui@broadcom.com, sbranden@broadcom.com, f.fainelli@gmail.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Tomlinson Subject: [PATCH 3/3] PCI: iproc: Set affinity mask on MSI interrupts Date: Thu, 30 Jul 2020 15:37:47 +1200 Message-Id: <20200730033747.18931-3-mark.tomlinson@alliedtelesis.co.nz> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200730033747.18931-1-mark.tomlinson@alliedtelesis.co.nz> References: <20200730033747.18931-1-mark.tomlinson@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The core interrupt code expects the irq_set_affinity call to update the effective affinity for the interrupt. This was not being done, so update iproc_msi_irq_set_affinity() to do so. Signed-off-by: Mark Tomlinson --- drivers/pci/controller/pcie-iproc-msi.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/contro= ller/pcie-iproc-msi.c index 3176ad3ab0e5..908475d27e0e 100644 --- a/drivers/pci/controller/pcie-iproc-msi.c +++ b/drivers/pci/controller/pcie-iproc-msi.c @@ -209,15 +209,20 @@ static int iproc_msi_irq_set_affinity(struct irq_da= ta *data, struct iproc_msi *msi =3D irq_data_get_irq_chip_data(data); int target_cpu =3D cpumask_first(mask); int curr_cpu; + int ret; =20 curr_cpu =3D hwirq_to_cpu(msi, data->hwirq); if (curr_cpu =3D=3D target_cpu) - return IRQ_SET_MASK_OK_DONE; + ret =3D IRQ_SET_MASK_OK_DONE; + else { + /* steer MSI to the target CPU */ + data->hwirq =3D hwirq_to_canonical_hwirq(msi, data->hwirq) + target_cp= u; + ret =3D IRQ_SET_MASK_OK; + } =20 - /* steer MSI to the target CPU */ - data->hwirq =3D hwirq_to_canonical_hwirq(msi, data->hwirq) + target_cpu= ; + irq_data_update_effective_affinity(data, cpumask_of(target_cpu)); =20 - return IRQ_SET_MASK_OK; + return ret; } =20 static void iproc_msi_irq_compose_msi_msg(struct irq_data *data, --=20 2.28.0