Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2397323ioo; Sat, 28 May 2022 12:20:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb7ZJw3glOzrlMM97v0LPmjJ1sCy65wz5J/UEHz7ZcdlfNT8AyUJmyd5XZyjjGwuaGee+b X-Received: by 2002:a17:903:185:b0:163:6f4a:a461 with SMTP id z5-20020a170903018500b001636f4aa461mr15676415plg.62.1653765618193; Sat, 28 May 2022 12:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653765618; cv=none; d=google.com; s=arc-20160816; b=DXBGSckrdESbdp01A4YKx8rAlV/Dzin1PFuNR8cla/L+scv+k+r9/EzrkQNsU8K1tU 5gOx0DervhMQ1bXHKdteB349yuIzAziTViTjwAb70k9Qak9and+N9ZPbJDuMPD1wS3ws b6ByWgqCP+zj7Ci8hJ1MfO6m5SrkVMad3RPKd822V3RMFU3epIkTzKhjQohqblqbqWTH Qx1M5b5qk5VNQ+Cha73Hw5Zv8pilT+8Kci7AR1BLw8/dtd97L3CfHcbidcAb3XsSD6qE 4l0y/nV/gpRDQ/2Xfl4IJOv6w/jpJSWmISJ3VKMuxpfnPdY1jfrcd+olgQJiEgByWbx1 w1Yw== 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=bL6Df2//IX4pFAb3Mx3gzCPAvEMkloxMnWPx42+jX1U=; b=RGCsAva2uZtz5J+qRtfXsvCaeuPg2Nq3fslLNBMXeayhYu1fK7xWrfdP/7lhLiwedA i88yTKptw5Ilekqbq6WuW256dvY/57vr74d49Zvqb2+PZVZMvKyGmwizFEt8R5beadmf fMkVv9zb5UHdgVQxdCDbU8I5V1HWNx/LFmflH1A0KyMFOFAhBncQC7xkYD8RzigBe8XA VmYdO68i39QWSMoUbnrxJ4Cxm0BOUoYCd9VPFgh2HIuRRCDlPPGS+uI60bizkZgDjv4f Farq2bbBJIikoKENqgC8R0uGNVaNaRrZMLph/BGY48ezHF/XLhDxgIhpTSz96NBC0573 lxjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=d7xy2wQw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x16-20020a631710000000b003db379692e2si9858463pgl.181.2022.05.28.12.20.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:20:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=d7xy2wQw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D524C49908; Sat, 28 May 2022 11:52:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243080AbiE0FSB (ORCPT + 99 others); Fri, 27 May 2022 01:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243040AbiE0FR4 (ORCPT ); Fri, 27 May 2022 01:17:56 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B503136F for ; Thu, 26 May 2022 22:17:55 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id c2so3237539plh.2 for ; Thu, 26 May 2022 22:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bL6Df2//IX4pFAb3Mx3gzCPAvEMkloxMnWPx42+jX1U=; b=d7xy2wQwMsehdJ8/csAbRhdFHRV18FJbDigzTsdFFlSSx18qbpjC0am5y6/QiAfpcj nmlTpbhkNfvsqn0wbUmI3ZITCQuL5/Jhr8HQX26cMTHpYFzMYmIZBaZARS6wYNjGB3vU OM3OxoDyqQREhDzMtEfgnp8bf9uA5r1Z1yvF1AaU9kC8grC/YiEGX9KxN1vSwu4JFUMA rmdwqsfr4uTr1haJds9+Khdj+hSRoPEHGohpTWp+q3IMM7bL7ZNnmkMq0I8ea2v61M7g CltUt6/M4IpCeVd43fOOoANadsC8yFQ8YCa6835W/ofGDyfCsSyDgY0UTwE2aBlEEdbF 5KWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bL6Df2//IX4pFAb3Mx3gzCPAvEMkloxMnWPx42+jX1U=; b=vo53qI8V/HShVYVowuA51SzX/xPLj1VkOhj5hS2I5X1ID3+WBp7ZNCtSX68EjJqog3 Vsl7bCt7ZqLl+KaSM7T5b01VRnKLIkR/xG34qy+U3yLiFqVqfThfcWfWF75sPRTQj2cF n1/VI0INXrRWNjOHoiPCYKOwRzOxxP4r7V5pU5L2ZtmZrAGv/QGW5p/3+XO37Tsjm1bi FHmVWrd5993ZQgb/l5qsU+yRzGrHzjMPeWubANboiiMkU47RBXqgqr+UgcTIZ1eMX8oe JTSekh36IJE3aVc/xEg1kVQm9FS/1I9tiSxjQsFExxosTi5deYti21KS5vS+fvab1eqt fqjg== X-Gm-Message-State: AOAM531ifyWWJLCHmP5sA3OwRxzC3KidA7dg8yMiwcFverO2MXUvvTXh 0+VnEKV0kuftdB23tG4I2kNKQA== X-Received: by 2002:a17:903:228d:b0:163:8b78:c3c8 with SMTP id b13-20020a170903228d00b001638b78c3c8mr3585464plh.27.1653628674882; Thu, 26 May 2022 22:17:54 -0700 (PDT) Received: from kerodipc.Dlink ([49.206.9.238]) by smtp.gmail.com with ESMTPSA id j34-20020a634a62000000b003c14af5063fsm2459003pgl.87.2022.05.26.22.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 22:17:54 -0700 (PDT) From: Sunil V L To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Ard Biesheuvel , Marc Zyngier , Atish Patra , Heinrich Schuchardt , Anup Patel Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Sunil V L , Sunil V L Subject: [PATCH V3 1/5] riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 Date: Fri, 27 May 2022 10:47:39 +0530 Message-Id: <20220527051743.2829940-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220527051743.2829940-1-sunilvl@ventanamicro.com> References: <20220527051743.2829940-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The hartid can be a 64bit value on RV64 platforms. Modify the hartid variable type to unsigned long so that it can hold 64bit value on RV64 platforms. Signed-off-by: Sunil V L Reviewed-by: Heinrich Schuchardt Reviewed-by: Atish Patra --- arch/riscv/kernel/cpu_ops_sbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/cpu_ops_sbi.c b/arch/riscv/kernel/cpu_ops_sbi.c index 4f5a6f84e2a4..efa0f0816634 100644 --- a/arch/riscv/kernel/cpu_ops_sbi.c +++ b/arch/riscv/kernel/cpu_ops_sbi.c @@ -65,7 +65,7 @@ static int sbi_hsm_hart_get_status(unsigned long hartid) static int sbi_cpu_start(unsigned int cpuid, struct task_struct *tidle) { unsigned long boot_addr = __pa_symbol(secondary_start_sbi); - int hartid = cpuid_to_hartid_map(cpuid); + unsigned long hartid = cpuid_to_hartid_map(cpuid); unsigned long hsm_data; struct sbi_hart_boot_data *bdata = &per_cpu(boot_data, cpuid); @@ -107,7 +107,7 @@ static void sbi_cpu_stop(void) static int sbi_cpu_is_stopped(unsigned int cpuid) { int rc; - int hartid = cpuid_to_hartid_map(cpuid); + unsigned long hartid = cpuid_to_hartid_map(cpuid); rc = sbi_hsm_hart_get_status(hartid); -- 2.25.1