Received: by 10.213.65.68 with SMTP id h4csp2776291imn; Mon, 9 Apr 2018 08:51:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9GueFi8qcZokfzAzo7LTFYZ6giP0EyQQYjPdfQeTHk41/rXcaF+BfcfrsRm3b/EZDuRlV X-Received: by 10.99.154.82 with SMTP id e18mr4574515pgo.365.1523289115188; Mon, 09 Apr 2018 08:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523289115; cv=none; d=google.com; s=arc-20160816; b=CoGDkfbFOFDCkE/OckbsXa5ahqG5f4Io9ykiBWbwvprHkxyJ4BP06sjIW7vLaxL6/D jwgQIBYf089EITphwTicfj+E2kNPzBPwHcoA9dDvoHLda7uEQ0TjDTKY8+6vZ8e+gPs+ vWU8a1d07IdP+0Eum13ES+ZyJs4qbiXVDV7OY8kVxSe4LZEqE+piL/MNGPEK6cwR/uPP +RHTRUSuhDL+d+rez+4fHdser5ljAIRCKVMttOJukWpIt8l6ln75DTPtsT5ZQQPtzlJa Yh0BOOhujPKJiQArL/O85OxKLRZT41XOYNa90pL/4SAt0k3sSWmxkecPq3eVDDZYB+Gd /ZYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=oEmcFHX+8+duV6K9idip8IhITzDYpZh5wFZsBkHYJmY=; b=vBskFeHVlWWHDeQlaLmzw/lBOOLBUvgIcM6ZiVxDw6txlbrdCznNk7hsjJY2eknqut tFth4KpUrxRfkga0BmxzS9PNqQ7PgfvyMpUC1myNppS4DW1NGvai04OJec4viaKNKoiH YzHCpnEjo4V/kj0urWYdA4X851KiIHsEORgHVChqxxDm6A/VTWw82hf/mz5p+ytgPhrY 8qi6pahjkyuDTlberAVEU8Fwh+5OoSZutT72Zc+AixstyYWoDg2+Um1yGw89sGjpFe0q ipUhT2lTWGIcW8FeuP7SMYQZq53L2mltIizvRiDKchNI8jr7HSGTy1gcQ0Y6HgB8OpMD txrA== ARC-Authentication-Results: i=1; mx.google.com; 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 p85si419899pfk.77.2018.04.09.08.51.17; Mon, 09 Apr 2018 08:51:55 -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; 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 S1753217AbeDIPrl (ORCPT + 99 others); Mon, 9 Apr 2018 11:47:41 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:43652 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbeDIPqm (ORCPT ); Mon, 9 Apr 2018 11:46:42 -0400 Received: by mail-wr0-f195.google.com with SMTP id p53so10069052wrc.10; Mon, 09 Apr 2018 08:46:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oEmcFHX+8+duV6K9idip8IhITzDYpZh5wFZsBkHYJmY=; b=RkqvYn72DG116HSC//dQ9wMDFSFeQgAUiVSI064mTmuNQWrH1bUODPmJufS4CZcpej OImbtUIlbPJATKGWm9tBP8TnABygSrBEsH+BlP9xfMU7F4VQ2sXO5WqhW201a3hwQK/3 JzJHZHOxrPTT9DtP601jCRLvmLZyZPpPUXiMTaEbSlZa43P9jYcPkqrmEaiVzHfuguXV cLMltfvB/YxZ2okJhY/98eTKf02b6+fS7zI+BApJQ1UWUwRsk7uQBAXYukZLEpDJvXQ0 Dr8ZHH5OWLLSYr2ntoiq2pCi/AoxVBp6lrJnph8XjQU0SYI3lIKM6Rzl+s5YG43JnjNN 8bzg== X-Gm-Message-State: AElRT7FXPLn3gFv9kWwCkDJAmv8XcnvUVwvPAkaXR54F5TBXRnYyNvmP 1QHIpeAOfjQuzoIMBaS/FEI= X-Received: by 10.223.200.145 with SMTP id k17mr25607913wrh.6.1523288800837; Mon, 09 Apr 2018 08:46:40 -0700 (PDT) Received: from wintermute.fritz.box (HSI-KBW-078-043-196-194.hsi4.kabel-badenwuerttemberg.de. [78.43.196.194]) by smtp.gmail.com with ESMTPSA id w40sm881163wrc.33.2018.04.09.08.46.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Apr 2018 08:46:40 -0700 (PDT) From: Jan Glauber To: Herbert Xu Cc: "David S . Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Mahipal Challa , Robert Richter , Jan Glauber Subject: [PATCH v2 5/5] crypto: thunderx_zip: Fix smp_processor_id() warnings Date: Mon, 9 Apr 2018 17:45:54 +0200 Message-Id: <20180409154554.7578-6-jglauber@cavium.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180409154554.7578-1-jglauber@cavium.com> References: <20180409154554.7578-1-jglauber@cavium.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to raw_smp_processor_id() to prevent a number of warnings from kernel debugging. We do not care about preemption here, as the CPU number is only used as a poor mans load balancing or device selection. If preemption happens during a compress/decompress operation a small performance hit will occur but everything will continue to work, so just ignore it. Signed-off-by: Jan Glauber Reviewed-by: Robert Richter --- drivers/crypto/cavium/zip/zip_device.c | 4 ++-- drivers/crypto/cavium/zip/zip_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_device.c b/drivers/crypto/cavium/zip/zip_device.c index ccf21fb91513..f174ec29ed69 100644 --- a/drivers/crypto/cavium/zip/zip_device.c +++ b/drivers/crypto/cavium/zip/zip_device.c @@ -87,12 +87,12 @@ u32 zip_load_instr(union zip_inst_s *instr, * Distribute the instructions between the enabled queues based on * the CPU id. */ - if (smp_processor_id() % 2 == 0) + if (raw_smp_processor_id() % 2 == 0) queue = 0; else queue = 1; - zip_dbg("CPU Core: %d Queue number:%d", smp_processor_id(), queue); + zip_dbg("CPU Core: %d Queue number:%d", raw_smp_processor_id(), queue); /* Take cmd buffer lock */ spin_lock(&zip_dev->iq[queue].lock); diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c index ae5b20c695ca..be055b9547f6 100644 --- a/drivers/crypto/cavium/zip/zip_main.c +++ b/drivers/crypto/cavium/zip/zip_main.c @@ -113,7 +113,7 @@ struct zip_device *zip_get_device(int node) */ int zip_get_node_id(void) { - return cpu_to_node(smp_processor_id()); + return cpu_to_node(raw_smp_processor_id()); } /* Initializes the ZIP h/w sub-system */ -- 2.16.2