From patchwork Mon Nov 6 19:59:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10044377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7FCDF60247 for ; Mon, 6 Nov 2017 19:59:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7219729E3B for ; Mon, 6 Nov 2017 19:59:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66D4E29F28; Mon, 6 Nov 2017 19:59:11 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 C4BFD29E3B for ; Mon, 6 Nov 2017 19:59:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754129AbdKFT7K (ORCPT ); Mon, 6 Nov 2017 14:59:10 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:46394 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbdKFT7J (ORCPT ); Mon, 6 Nov 2017 14:59:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1509998350; x=1541534350; h=from:to:cc:subject:date:message-id:mime-version; bh=QuoS4UjFz7ZNdW2Rr5qhIE48Y++vC1AAuUszo4Z/p9M=; b=mDX6HuVqpmV7HQgWOcyA6fNUzp6K52x1oSOBHHvGbGcndgp92/rhlDhl hNq/5GOH2pBDECibp4DwiN4iZ54M6AvdCX5A4JT1fTSp8KKJ/eA7D6UjU Eh3EX7sQA5l4pLXdxcLbRzU4FPNrLHSmt/LChMIM7Y9OFv6Guu/o0cRBF /8CvYbHohKsmeKskbnZrdu48CEneRw35OFUwk3KYyyA6Z5wU8bPokRLZA KwG1VBe7wLMCnjmQlnidRffwYJ53uU+8SHwFQ0WaynGQKtzpoE9yaeL75 cs77LAmrXnqP5JcuAmO5w2gDN48JUdU23lh2GaTsCOkUH7XUL2Znd1stv w==; X-IronPort-AV: E=Sophos;i="5.44,354,1505750400"; d="scan'208";a="61300751" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 07 Nov 2017 03:59:10 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 06 Nov 2017 11:56:40 -0800 Received: from unknown (HELO MILHUBIP04.sdcorp.global.sandisk.com) ([10.177.9.97]) by uls-op-cesaip02.wdc.com with ESMTP; 06 Nov 2017 11:59:09 -0800 Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Mon, 6 Nov 2017 11:59:07 -0800 X-AuditID: 0ab10959-0abff70000002c97-c8-5a00bf09f603 Received: from thinkpad-bart.int.fusionio.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 43.0D.11415.90FB00A5; Mon, 6 Nov 2017 11:59:08 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" CC: , Bart Van Assche , Quinn Tran , Himanshu Madhani , Subject: [PATCH] qla2xxx: Suppress a kernel complaint in qla_init_base_qpair() Date: Mon, 6 Nov 2017 11:59:05 -0800 Message-ID: <20171106195905.5139-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBJMWRmVeSWpSXmKPExsXCtZEjRZdnP0OUwZ9WbotLf74wWlzY081o sWpinkX39R1sFsuP/2Oy+Nn+mtFiwcZHjA7sHjN+L2LxeHBoM4vHx6e3WDw+b5LzaD/QzRTA GsVlk5Kak1mWWqRvl8CVsXj1X8aC+fwVXx6sYmlgXM7bxcjJISFgItH0uZeli5GLQ0hgNaPE zjnLmEASbAJ6Eqfm7QOzRQRyJU49vMEEUsQssIdR4saK+ewgCWEBP4nte46AFbEIqEpcmfOX BcTmFbCS2LLhADPEBnmJtW/vMU5g5FzAyLCKUSw3M6c4Nz2zwNBQrzgxLyWzOFsvOT93EyPY 75yROxifTjQ/xMjEwSnVwHgwk+FuSbgMr5/Or5mWXLet+LMruIrLz5TmWYT0Rt4v+72sd9sG qWUeO59vufmUP2TT+7f/dAV9WCrNHLY57Kw+ktNysiP9tVfUflbb7frhoj7LM51Dw4IXzXtv 9mHJroZ5Udc7ONnefjy1u8ri063YlKjZgeEGMoxrJbYeMTt304FFcq75SiWW4oxEQy3mouJE AA5CznOrAQAA MIME-Version: 1.0 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 Avoid that the following is reported while loading the qla2xxx kernel module: BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/783 caller is debug_smp_processor_id+0x17/0x20 CPU: 7 PID: 783 Comm: modprobe Not tainted 4.14.0-rc8-dbg+ #2 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x8e/0xce check_preemption_disabled+0xe3/0xf0 debug_smp_processor_id+0x17/0x20 qla2x00_probe_one+0xf43/0x26c0 [qla2xxx] pci_device_probe+0xca/0x140 driver_probe_device+0x2e2/0x440 __driver_attach+0xa3/0xe0 bus_for_each_dev+0x5f/0x90 driver_attach+0x19/0x20 bus_add_driver+0x1c0/0x260 driver_register+0x5b/0xd0 __pci_register_driver+0x63/0x70 qla2x00_module_init+0x1d6/0x222 [qla2xxx] do_one_initcall+0x3c/0x163 do_init_module+0x55/0x1eb load_module+0x20a2/0x2890 SYSC_finit_module+0xd7/0xf0 SyS_finit_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x23/0xc2 Fixes: commit 8abfa9e22683 ("scsi: qla2xxx: Add function call to qpair for door bell") Signed-off-by: Bart Van Assche Cc: Quinn Tran Cc: Himanshu Madhani Cc: Acked-By: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3bd956d3bc5d..b514bd5d2ac5 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -388,7 +388,7 @@ static void qla_init_base_qpair(struct scsi_qla_host *vha, struct req_que *req, INIT_LIST_HEAD(&ha->base_qpair->nvme_done_list); ha->base_qpair->enable_class_2 = ql2xenableclass2; /* init qpair to this cpu. Will adjust at run time. */ - qla_cpu_update(rsp->qpair, smp_processor_id()); + qla_cpu_update(rsp->qpair, raw_smp_processor_id()); ha->base_qpair->pdev = ha->pdev; if (IS_QLA27XX(ha) || IS_QLA83XX(ha))