Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2092815ybp; Thu, 10 Oct 2019 02:03:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwroI9g2wPYhA3cGZcIOaT/DLHUhv0ZiFtICtFxwL6liG+1X/4mk0/30EWRdXQRGyTNPGY7 X-Received: by 2002:a17:906:4d85:: with SMTP id s5mr7210613eju.192.1570698238829; Thu, 10 Oct 2019 02:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570698238; cv=none; d=google.com; s=arc-20160816; b=jWCPjckGEyE5hVBU51ABKGjwppJ0Mb9fEmXLl3iag9oVU18yAwMlcfXFpnijRwVLVh ICpg0TegBAtBIiT/rO6PIBRORMi4oOeDA96yo8Dl+CSioPhgob1zaNs9O5XsR0kD+G6v +1gPQLGAhKeO1sT2WKGhAamUCxDmE38HY03j424iEBaGhMmLBcMoOuaEe9kh+j1ylxVg v2KpAFcUJ9zC9a0U8aYK5o1DZt53A557PO+HzvyCOpkOHPwXUOyoDkLKnR68YOvTvzXM CRu61b+KOYLXSQ6VnyBa9orEvEjNEqgI2D90kUcJJNqq1PPgGxzcN/Fm5KsBm5H0Dulz qmXw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PET+szX/l1miPM0ZKXbW4uOmFcm6QF3AnL9P1Im2eJ0=; b=zBl9AbZJYyQHN36AsaCOwVWWyHLuAHiVa13urQeqia/LTnDPuPs0GN+ZF+EUsrNGrE m+f/kRgVPfo/DNHtAEP+8kQqvsyimFYaLFzhZX2eOwyhAu4GkNuirSSJBl2n857wMYx5 9ksWo3GNOh8raPBjKT/ueIs+pejwxK+yv9ldSrzjyyr5Hs5fWF1ygC6XoOvaF1ZCokv3 +lVHsD2OkUdUTFWzUEaOc+p8Si0HrcVm1k4I5TsauXLNuXjZggRde3BOCT6tF4bEo7Ny LYA4l/SEi3xA0Wh6uNIKAw7jMnrnhXPnCTe6IgCKYcHQvNWneVUCetVxH2hPm5pyocVD 5p/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tZLBhkN0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dv24si2718745ejb.60.2019.10.10.02.03.35; Thu, 10 Oct 2019 02:03:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tZLBhkN0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388313AbfJJIlX (ORCPT + 99 others); Thu, 10 Oct 2019 04:41:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:45630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388291AbfJJIlR (ORCPT ); Thu, 10 Oct 2019 04:41:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02B9621BE5; Thu, 10 Oct 2019 08:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696876; bh=ym8G2ZdQbDsO+1BvbPg5YIeTwSU9bt9Wg46NbwfNwBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tZLBhkN0mMhcgcn2CnbcGm3aLnJWm9fM3pJr1/yhtPGvKhYHm8tTagGIgnN3yML7J RLHbCaDBlOSvoAEEHksp3ht5ugXQFCuctILeUgEOxlCWp0ek8LpORqj50VRiWvW5WQ gs5c93NXpwRqBpue5C2drxf4j7KV83ZbnhinArKo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Sverdlin , Herbert Xu Subject: [PATCH 5.3 040/148] crypto: qat - Silence smp_processor_id() warning Date: Thu, 10 Oct 2019 10:35:01 +0200 Message-Id: <20191010083613.576179416@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Sverdlin commit 1b82feb6c5e1996513d0fb0bbb475417088b4954 upstream. It seems that smp_processor_id() is only used for a best-effort load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible to disable preemption for the duration of the crypto requests. Therefore, just silence the warning. This commit is similar to e7a9b05ca4 ("crypto: cavium - Fix smp_processor_id() warnings"). Silences the following splat: BUG: using smp_processor_id() in preemptible [00000000] code: cryptomgr_test/2904 caller is qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat] CPU: 1 PID: 2904 Comm: cryptomgr_test Tainted: P O 4.14.69 #1 ... Call Trace: dump_stack+0x5f/0x86 check_preemption_disabled+0xd3/0xe0 qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat] skcipher_setkey_ablkcipher+0x2b/0x40 __test_skcipher+0x1f3/0xb20 ? cpumask_next_and+0x26/0x40 ? find_busiest_group+0x10e/0x9d0 ? preempt_count_add+0x49/0xa0 ? try_module_get+0x61/0xf0 ? crypto_mod_get+0x15/0x30 ? __kmalloc+0x1df/0x1f0 ? __crypto_alloc_tfm+0x116/0x180 ? crypto_skcipher_init_tfm+0xa6/0x180 ? crypto_create_tfm+0x4b/0xf0 test_skcipher+0x21/0xa0 alg_test_skcipher+0x3f/0xa0 alg_test.part.6+0x126/0x2a0 ? finish_task_switch+0x21b/0x260 ? __schedule+0x1e9/0x800 ? __wake_up_common+0x8d/0x140 cryptomgr_test+0x40/0x50 kthread+0xff/0x130 ? cryptomgr_notify+0x540/0x540 ? kthread_create_on_node+0x70/0x70 ret_from_fork+0x24/0x50 Fixes: ed8ccaef52 ("crypto: qat - Add support for SRIOV") Cc: stable@vger.kernel.org Signed-off-by: Alexander Sverdlin Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/qat/qat_common/adf_common_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/qat/qat_common/adf_common_drv.h +++ b/drivers/crypto/qat/qat_common/adf_common_drv.h @@ -95,7 +95,7 @@ struct service_hndl { static inline int get_current_node(void) { - return topology_physical_package_id(smp_processor_id()); + return topology_physical_package_id(raw_smp_processor_id()); } int adf_service_register(struct service_hndl *service);