From patchwork Tue Apr 4 18:20:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 79339 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp79056vqo; Tue, 4 Apr 2023 11:26:32 -0700 (PDT) X-Google-Smtp-Source: AKy350YvKVEhjIk+v7mZ0fylFBZbbSuRjZXHRDFJmdhFx++Dced4TVR35psCf6gPGa1xLXYm8TEe X-Received: by 2002:a17:902:cec5:b0:1a1:e364:3452 with SMTP id d5-20020a170902cec500b001a1e3643452mr4582191plg.29.1680632791957; Tue, 04 Apr 2023 11:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680632791; cv=none; d=google.com; s=arc-20160816; b=iVMONKG/zOTjs1ypzSs/AwbPUOqyZNflbUsMgP2VsF9YD+nw+ksANEnduCaJPayB7T 7//+2fLc6bRNxHAnJPjHjrSMNtWKKO0StK+PGNN2I4SQU/TlzEvy6HVT8Ke3ZZnt/DV2 IJDVoAFBAer3kuUu1zAJfgZscQXNT4XsRaAmXNKP094Gsn7VIFme8rROF44rrdYL4G/i z/TIjudlJmH49lfF29LHmmB5oP6d4UINltSWbs6/9QOjD/JsWbTequMmHOrmN2MM/MkX bEe31Pw6aQboJiK4WXQ52uo9rEwt8Og3vJHPAyYMvS7co8/1MaJNDqS+Z5ZYTmk9uXyQ 2ybg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vOfAYG3XRnm+elp9Rz4INSxNTdbKknHW/6eObzO7hi8=; b=LPgW8NLXVW0S5Z4Fz6coOpStl3jNXmWyZhlgSYpp+pcDKgDAJVcdQDSf85q97VbQld sOur9QODiuBgTaTcKHzCiuJwj/I2UcfJ95ipyFueeVDytvAI2KJ/Wnv7OoAxgvISQiID REEJ7MtVRSOEZToTvZixw5XlcwOqX/Yi6zOSY4rdVBoV74oA50HYQaU8vQj7VFOIMQYI 6hpEVHJhg7PXfT1UBBkOVh6yeHrA13yaCCXSVN6snCdNTGJBkdMuPdqjQQIZ0BlLSt6r SF5fZCA5cvEZQExiqp0TX8zOtWD7v/ySqyPbLuF4YZyrWrZ7leGCwDrkFreTSMsh8b5r 1EhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=L8YECRNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a170903301100b001a1c690e190si10206203pla.44.2023.04.04.11.26.19; Tue, 04 Apr 2023 11:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=L8YECRNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236266AbjDDSXU (ORCPT + 99 others); Tue, 4 Apr 2023 14:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236501AbjDDSWw (ORCPT ); Tue, 4 Apr 2023 14:22:52 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89F6C6592 for ; Tue, 4 Apr 2023 11:22:11 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id u38so22038718pfg.10 for ; Tue, 04 Apr 2023 11:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1680632531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vOfAYG3XRnm+elp9Rz4INSxNTdbKknHW/6eObzO7hi8=; b=L8YECRNq9zHfdajtfyIxGzHpmgAu+8AIVFW1slPJBQJ6rehzKPbVARoQnJZcn0eLo4 MZJwlkBXNWwUdUTfaNSKkrkxTTu4KyG2qGOMUv/QmEqqV/DRdXVfjGa7HoDimM+6d0Kg y44bdJ5lRuCVCZ3T+qr98D9JJokhrxPqVeAEAv1arA8yLOHyPwK8xWkKJ3OcxXDmqC5V H7brCz+RrTXiJPi9Lxx2SXxvCy/V3plJ/cxF8IDBy4naSeNVcIgT7e3QC0gr8GOJkO6s ryRvuYpFL1C2f4FEG39wrbBR1+mNGg+skArfvu24iysSkTM4p9nW7XTd1b93qfcYm83d 3Nuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680632531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vOfAYG3XRnm+elp9Rz4INSxNTdbKknHW/6eObzO7hi8=; b=z0d7uJZgy4bnCh98etaOIr3akyYIq1BIhmicK9WXB2osEQBjUZiPS67RKLl2HLefdt SxrQiP1wMhDsDfhKiidYRAEke58vLlArY5k5PrgxfNnLMQnt/jwRGVlGYEXEO7fdY/uN Gak/0BVFTniYkvMn2cR00ENl8KoAv4NNLgIZ5TIVTIUJVdhgGEMEutcPPEINGQib6rHq IWcmIiTBCBl7FkLRaWgHG7uG27zqyLQjv81+PbsDOu5qcW8GQaEe/zAlHf3HcTSPpV7A vWzu0jnYfjB8GWImay395yLiogFNjQLyndLLymvPj/3cNTMHc1GOA+iK4FpQxzaHUfrI mFoA== X-Gm-Message-State: AAQBX9cvWOz1KbhE1ofpoTg+dIgJG6P9uEF6MbvVOrXYbpnGNUf42NhQ U3o6AOL1AVLfsW7ZlQl99pbVAA== X-Received: by 2002:a62:7b8a:0:b0:625:1487:f06c with SMTP id w132-20020a627b8a000000b006251487f06cmr2926744pfc.29.1680632531143; Tue, 04 Apr 2023 11:22:11 -0700 (PDT) Received: from localhost.localdomain ([106.51.184.50]) by smtp.gmail.com with ESMTPSA id o12-20020a056a001bcc00b0062dcf5c01f9sm9018524pfw.36.2023.04.04.11.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 11:22:10 -0700 (PDT) From: Sunil V L To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Len Brown , Daniel Lezcano , Thomas Gleixner , Weili Qian , Zhou Wang , Herbert Xu , Marc Zyngier , Maximilian Luz , Hans de Goede , Mark Gross , Nathan Chancellor , Nick Desaulniers , Tom Rix , "Rafael J . Wysocki" , "David S . Miller" , Sunil V L Subject: [PATCH V4 12/23] RISC-V: cpufeature: Avoid calling riscv_of_processor_hartid() Date: Tue, 4 Apr 2023 23:50:26 +0530 Message-Id: <20230404182037.863533-13-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404182037.863533-1-sunilvl@ventanamicro.com> References: <20230404182037.863533-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762271210077939539?= X-GMAIL-MSGID: =?utf-8?q?1762271210077939539?= riscv_fill_hwcap() finds hartid of each cpu but never really uses it. So, remove this unnecessary call. Signed-off-by: Sunil V L --- arch/riscv/kernel/cpufeature.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 59d58ee0f68d..63e56ce04162 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -91,7 +91,6 @@ void __init riscv_fill_hwcap(void) char print_str[NUM_ALPHA_EXTS + 1]; int i, j, rc; unsigned long isa2hwcap[26] = {0}; - unsigned long hartid; isa2hwcap['i' - 'a'] = COMPAT_HWCAP_ISA_I; isa2hwcap['m' - 'a'] = COMPAT_HWCAP_ISA_M; @@ -109,10 +108,6 @@ void __init riscv_fill_hwcap(void) DECLARE_BITMAP(this_isa, RISCV_ISA_EXT_MAX); const char *temp; - rc = riscv_of_processor_hartid(node, &hartid); - if (rc < 0) - continue; - if (of_property_read_string(node, "riscv,isa", &isa)) { pr_warn("Unable to find \"riscv,isa\" devicetree entry\n"); continue;