From patchwork Mon Dec 3 22:35:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 10710817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BBD513BF for ; Mon, 3 Dec 2018 22:35:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A9F62AD37 for ; Mon, 3 Dec 2018 22:35:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E5842B2E7; Mon, 3 Dec 2018 22:35:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 817C92B2DA for ; Mon, 3 Dec 2018 22:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725931AbeLCWfS (ORCPT ); Mon, 3 Dec 2018 17:35:18 -0500 Received: from mail-eopbgr700045.outbound.protection.outlook.com ([40.107.70.45]:52160 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725893AbeLCWfR (ORCPT ); Mon, 3 Dec 2018 17:35:17 -0500 Received: from MWHPR19CA0051.namprd19.prod.outlook.com (2603:10b6:300:94::13) by CY4PR19MB1414.namprd19.prod.outlook.com (2603:10b6:903:143::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.22; Mon, 3 Dec 2018 22:35:14 +0000 Received: from BY2FFO11FD013.protection.gbl (2a01:111:f400:7c0c::169) by MWHPR19CA0051.outlook.office365.com (2603:10b6:300:94::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.22 via Frontend Transport; Mon, 3 Dec 2018 22:35:14 +0000 Authentication-Results: spf=pass (sender IP is 208.19.99.221) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.99.221 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.99.221; helo=AUSMBX1.microsemi.net; Received: from AUSMBX1.microsemi.net (208.19.99.221) by BY2FFO11FD013.mail.protection.outlook.com (10.1.14.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.1382.18 via Frontend Transport; Mon, 3 Dec 2018 22:35:14 +0000 Received: from AUSMBX1.microsemi.net (10.201.34.31) by AUSMBX1.microsemi.net (10.201.34.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Mon, 3 Dec 2018 16:35:12 -0600 Received: from [127.0.1.1] (10.238.32.34) by ausmbx1.microsemi.net (10.201.34.31) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Mon, 3 Dec 2018 16:35:12 -0600 Subject: [PATCH] hpsa: add module parameter to disable irq affinity From: Don Brace To: , , , , , , , , , , , CC: Date: Mon, 3 Dec 2018 16:35:12 -0600 Message-ID: <154387651237.29316.15085846349138308725.stgit@brunhilda> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.99.221;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(7916004)(39860400002)(376002)(136003)(396003)(346002)(2980300002)(189003)(199004)(316002)(336012)(356004)(69596002)(97736004)(110136005)(4326008)(16576012)(58126008)(50466002)(106466001)(478600001)(8936002)(23676004)(2486003)(81156014)(103116003)(8676002)(33896004)(81166006)(9686003)(68736007)(106002)(305945005)(77096007)(53936002)(2906002)(2201001)(44832011)(47776003)(26005)(5660300001)(126002)(476003)(486006)(186003)(33716001)(86362001)(230700001)(921003)(2101003)(1121003)(83996005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR19MB1414;H:AUSMBX1.microsemi.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD013;1:mWdDUZ4SCw4/2PJJt9iUVD6BT0M1k760Vrq7CgfW9FgBS0RL4vP1DF1B7mxI79R8w34xXx9AYDb1vQ/As9j9A23eH1bqGSP9VmI7pTYPyym2bnNGEKt7oZWu6R7j3aUL X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c0f38e09-7755-4964-aeb0-08d6596f97c7 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:CY4PR19MB1414; X-Microsoft-Exchange-Diagnostics: 1;CY4PR19MB1414;3:42kbiltfL7vq+AamEtQVSYZDEo8FP3PvSW0TuVIhqwT5iwDDPKr+bXtf3nCD89PdR1aRTgyz0B9RmCS8tbl8BdVB2lFu22MQe1R8h+fyniVZFHi3l9eJvt+B3/Y8Yv7NupeTXH6xutFChS9es9qb/swsArbGQ6Ua6tVYHIzvDCiR/7WTN0pQ1/GvVLYt4BWaiUCaAUrTXsRrfjjEfvyGkfak4z4N4r/jmEi59rh4iRvicTAulLf9iY/SuSVDbCVhy2TbNb+aI9voDh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AAVARvUdohdeljGzVV7vzv4tJqfsNbhops3HNR/tQEVn2wtdvn2T5URlE7TZ6LPVgl1unTAQVpNho0zjtJ50c1ROGgvK5mUW0K3uwDhuvIe5gWU/LaOhhSUQEaqoLbYceAY8lKDimv33Cor3otSgWGy4UdsarOxdjADQxqGaxDYnkcPVispmcBlq X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231455)(999002)(944501493)(52105112)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:CY4PR19MB1414;BCL:0;PCL:0;RULEID:;SRVR:CY4PR19MB1414; X-Microsoft-Exchange-Diagnostics: 1;CY4PR19MB1414;4:PR8bgfpOxZR4JW0e7Vvj78C+kEFCxmfcD3Z+H8Z3UIGAGZDH+sUW57JQIohYo/x3HRBubp/jFE6W0uP2JcJ5FVttuFjKOMdQpf1XBXHQCmb5uPY92nug15JAqC4DIAvxpnaTQSDUFvd/aUvTj6ypHpF8/lL1WTx8KYJKFagaTCDZ+q5qxSsrK636rc4ei1LwPznz5I+hii6zDE0k1ek7jBuvKKcETYWbaazACD0fY0EZrASwLRSCj1zZUDOZenF+jycFyRJ6xbFlfMr6aWB0jw== X-Forefront-PRVS: 08756AC3C8 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BCY4PR19MB1414=3B23=3A1BeRi9S?= =?utf-8?q?kj1WGo5c05FJVrHtf6bzrbquF7ecQmEj343TlThoD3nqt6mW2nymjxQAP/BoMra2E?= =?utf-8?q?leKKSKz1NdvPxbWL3B/xX+MVOujxvtuXgu/rbqKZYD9qqSrAwVUi/Q/l+rr+edcZE?= =?utf-8?q?wikbMQLVOF/w5ioIkRUWpgDFF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CvAJf/Kb+lmt+9WFtvUcBSDvrHJJ5y+xl37FIh4vit/d1zzR1M4ZGA5yT6pMYIu4JnS5IRsPFx6n1nIBHYdri4Otfe2J5OIpAMNcplSU/Zc/o4LmP9J/IT1DVQ=;7:kzRErD4mTtozQiilBlU3MiFUIsmJEV4fxKxN830S0nN2Fej1hnM0N5mHiR4CfhuJRkeQGnHIcjyFflSF7BhahkQbRzxlYwjxHb0bEkCZrLrWt/TZjUGScKHwL0aBJ9Y38itJh6mx1yrr7cbx1wFMbA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2018 22:35:14.0785 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0f38e09-7755-4964-aeb0-08d6596f97c7 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad;Ip=[208.19.99.221];Helo=[AUSMBX1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR19MB1414 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PCI_IRQ_AFFINITY flag prevents customers from changing the smp_affinity and smp_affinity_list entries. - add a module parameter to allow this flag to be turned off. - to turn off PCI_IRQ_AFFINITY: flag hpsa_disable_irq_affinity=1 Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c9cccf35e9d7..0aa5aa66151f 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -87,6 +87,10 @@ static int hpsa_simple_mode; module_param(hpsa_simple_mode, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(hpsa_simple_mode, "Use 'simple mode' rather than 'performant mode'"); +static bool hpsa_disable_irq_affinity; +module_param(hpsa_disable_irq_affinity, bool, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(hpsa_disable_irq_affinity, + "Turn off managed irq affinity. Allows smp_affinity to be changed."); /* define the PCI info for the cards we can control */ static const struct pci_device_id hpsa_pci_device_id[] = { @@ -7389,7 +7393,7 @@ static void hpsa_setup_reply_map(struct ctlr_info *h) */ static int hpsa_interrupt_mode(struct ctlr_info *h) { - unsigned int flags = PCI_IRQ_LEGACY; + unsigned int flags; int ret; /* Some boards advertise MSI but don't really support it */ @@ -7400,17 +7404,20 @@ static int hpsa_interrupt_mode(struct ctlr_info *h) case 0x40830E11: break; default: + flags = PCI_IRQ_MSIX; + if (!hpsa_disable_irq_affinity) + flags |= PCI_IRQ_AFFINITY; ret = pci_alloc_irq_vectors(h->pdev, 1, MAX_REPLY_QUEUES, - PCI_IRQ_MSIX | PCI_IRQ_AFFINITY); + flags); if (ret > 0) { h->msix_vectors = ret; return 0; } - flags |= PCI_IRQ_MSI; break; } + flags = PCI_IRQ_LEGACY | PCI_IRQ_MSI; ret = pci_alloc_irq_vectors(h->pdev, 1, 1, flags); if (ret < 0) return ret;