From patchwork Fri Dec 7 22:29:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 10718981 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 7D8C9109C for ; Fri, 7 Dec 2018 22:30:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CA652ABF4 for ; Fri, 7 Dec 2018 22:30:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604CB2F2E1; Fri, 7 Dec 2018 22:30:06 +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 E46802ABF4 for ; Fri, 7 Dec 2018 22:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726078AbeLGWaF (ORCPT ); Fri, 7 Dec 2018 17:30:05 -0500 Received: from mail-eopbgr750074.outbound.protection.outlook.com ([40.107.75.74]:10392 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726070AbeLGWaF (ORCPT ); Fri, 7 Dec 2018 17:30:05 -0500 Received: from MWHPR19CA0065.namprd19.prod.outlook.com (2603:10b6:300:94::27) by CY1PR19MB0410.namprd19.prod.outlook.com (2a01:111:e400:c448::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.18; Fri, 7 Dec 2018 22:30:01 +0000 Received: from BN1BFFO11FD010.protection.gbl (2a01:111:f400:7c10::1:195) by MWHPR19CA0065.outlook.office365.com (2603:10b6:300:94::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19 via Frontend Transport; Fri, 7 Dec 2018 22:30:01 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.23) 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.100.23 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.23; helo=AVMBX3.microsemi.net; Received: from AVMBX3.microsemi.net (208.19.100.23) by BN1BFFO11FD010.mail.protection.outlook.com (10.58.144.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.1404.13 via Frontend Transport; Fri, 7 Dec 2018 22:30:00 +0000 Received: from AVMBX2.microsemi.net (10.100.34.32) by AVMBX3.microsemi.net (10.100.34.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Fri, 7 Dec 2018 14:29:59 -0800 Received: from [127.0.1.1] (10.238.32.34) by avmbx2.microsemi.net (10.100.34.32) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Fri, 7 Dec 2018 14:29:58 -0800 Subject: [PATCH 18/20] smartpqi: add module param to disable irq affinity From: Don Brace To: , , , , , , , , , , , CC: Date: Fri, 7 Dec 2018 16:29:58 -0600 Message-ID: <154422179851.1218.10349207247849277036.stgit@brunhilda> In-Reply-To: <154422079293.1218.12539829857034151457.stgit@brunhilda> References: <154422079293.1218.12539829857034151457.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.100.23;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(7916004)(136003)(39860400002)(376002)(346002)(396003)(2980300002)(189003)(199004)(53936002)(69596002)(81166006)(8676002)(9686003)(33716001)(11346002)(446003)(8936002)(476003)(86362001)(336012)(478600001)(2201001)(126002)(97736004)(68736007)(76176011)(2906002)(81156014)(47776003)(14444005)(50466002)(106466001)(33896004)(103116003)(44832011)(110136005)(23676004)(2486003)(5660300001)(230700001)(305945005)(26005)(356004)(106002)(186003)(316002)(16576012)(58126008)(4326008)(486006)(77096007)(921003)(1121003)(2101003)(83996005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR19MB0410;H:AVMBX3.microsemi.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD010;1:O3ajkXB5022CW5cT9+N6A7Hbi0UryuEdO68BPU4VJQPIzC2kVld+eCfI+73ok/UkI3NwUZ5giHSucyZPI+J/k5obn3PoIReeK9W7UpmZp7/oM0h3TVjsiIGjMJ66tZ5I X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ecce72b-822e-417e-2a43-08d65c9386a3 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060);SRVR:CY1PR19MB0410; X-Microsoft-Exchange-Diagnostics: 1;CY1PR19MB0410;3:6GLFmxcQzi5EhDqqFtgoye5vNyRqMk7PTFd5aKMltodtAb/AhbtGQqQRX31CW6R76OaXguKWmcO3KxyV0kMSpb1FrjlEJHZQZAA/RvRpAT9QjyHZbct2rqtIRv6NQpBEF8RTWWYCbJQoPPgkElVwJ4SLfAP3fcHuX06PxOJ0PdvL6lVJv1ks5nza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WIClpbtOCjUPEdkt5BhfJ9d7EfS7EKRkV7BalYTTIFd1cmfBgTFcWbqg1nhLsAeakDHeakpme4/HjD9Xv4/iOE3UZvig4zK4ijL7lF71dGH1dh5GI0sSYycni1NLwl3PXrMVRNK0dJVxdBcGGbqlSEXpIJwdsV/rFGAuAknU2PTmP/dqBeR3kzwywrnD2+0xdMbudR+op32jWopF/KvZKL+fDvgvKjU3boIfMxuOx7XHvRE6Rggpq6RJ38xPd3kKd5/DlVzhnO7MnGk64dUM9Qa/EMlNBJRVtajMMB0qUKA95kpE/a0vJsP5ejnANaCehomsjGmPRmLTTRP1WTtogQsvcj9yqj4yCVGI+VBNq2SlSdm0FcQHy8OhFrZ3tczsLifQ= 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)(3231455)(999002)(944501520)(52105112)(93006095)(93004095)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:CY1PR19MB0410;BCL:0;PCL:0;RULEID:;SRVR:CY1PR19MB0410; X-Microsoft-Exchange-Diagnostics: 1;CY1PR19MB0410;4:JxfK/5jlX+jMLEJYvA0Qq2oO1BjT1si/5oOX42ZfHkOp5t5nsPtDx87jPbPy2I1mpnrwhxOY1YE0OYH1+BmOPI9ObE7X483j7p5NxWqMWngkh6zNybkw2wfTuSH0Utc0O1ItGrjAuQ3/V5Ym5P8HLDbq/pA0oTlAH1J761Pt/BTpjOqmojcC9MbQFUXhcnoLw6XnLFFFTnq92iyfIzThAnvew9j/syJ86ogEmWsrhkVhRZU+TaRDzSkTIAsvmm8ycdnvo35XBJWCkVfMczlvHg== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BCY1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08fLBMEaVw9KvUq0inim8w6NEn8oZKLonVCUjvk6m2AK3x8H6cRMl/bm1E2SWsSlkZu5fe+sQ6ruwP45n8flKMfDeI+zHw4gyOZyJc2syFTc1quU+h8+gcTmaCrjl5neiJZ8/dNqVcY7AjNGapNrMmQbbIfFSgsSiiVaRlZpoHzalB0Gqa0mJ8Dv2ajp5P+BH77heuq++yOURhtvjmLOKUMdQ==;5:gYbf1nlMnFWvhhwJWtAX0jyblbDqiM7UMjKpouzaeLxDUxrC9FL2fPEPGnlVNVKKogIJ17pJDT1AUnIgfaFja3aSu3XCox97BfJtCV0sVTwL+CgJWbI9g/sn7x9gXmOreqZVAe56BshZoVHDyCJskea5HEyjST2OyC1oAQXvv9w=;7:q3dWsJ2j0POFgDtDAX8A4x9taaRDG0n26E+g86YwqryQSFAHGtmlZCYDRSdJaNd2mx9EP6Wh6eJjwXlngMFm6XynOm9esaM8WZgW+c2BlyvOdGatP/kO8xQAMQUc1YhV3Kr2csQ+TvoaYf6OLXnrtA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 22:30:00.6885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ecce72b-822e-417e-2a43-08d65c9386a3 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad;Ip=[208.19.100.23];Helo=[AVMBX3.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR19MB0410 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. Reviewed-by: Scott Teel Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Dave Carroll Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 2f2a07a38dad..f9812281988c 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -144,6 +144,11 @@ MODULE_PARM_DESC(lockup_action, "Action to take when controller locked up.\n" "\t\tSupported: none, reboot, panic\n" "\t\tDefault: none"); +static bool pqi_disable_irq_affinity; +module_param(pqi_disable_irq_affinity, bool, 0644); +MODULE_PARM_DESC(pqi_disable_irq_affinity, + "\t\tTurn off managed irq affinity. Allows smp_affinity to be changed."); + static char *raid_levels[] = { "RAID-0", "RAID-4", @@ -3276,10 +3281,14 @@ static void pqi_free_irqs(struct pqi_ctrl_info *ctrl_info) static int pqi_enable_msix_interrupts(struct pqi_ctrl_info *ctrl_info) { int num_vectors_enabled; + unsigned int flags = PCI_IRQ_MSIX; + + if (!pqi_disable_irq_affinity) + flags |= PCI_IRQ_AFFINITY; num_vectors_enabled = pci_alloc_irq_vectors(ctrl_info->pci_dev, PQI_MIN_MSIX_VECTORS, ctrl_info->num_queue_groups, - PCI_IRQ_MSIX | PCI_IRQ_AFFINITY); + flags); if (num_vectors_enabled < 0) { dev_err(&ctrl_info->pci_dev->dev, "MSI-X init failed with error %d\n", @@ -5507,7 +5516,11 @@ static int pqi_map_queues(struct Scsi_Host *shost) { struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost); - return blk_mq_pci_map_queues(&shost->tag_set, ctrl_info->pci_dev, 0); + if (!pqi_disable_irq_affinity) + return blk_mq_pci_map_queues(&shost->tag_set, + ctrl_info->pci_dev, 0); + else + return 0; } static int pqi_getpciinfo_ioctl(struct pqi_ctrl_info *ctrl_info,