Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp45708ioo; Wed, 25 May 2022 20:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHdyaWd9RjlgIquDK+kX5wam+uBFQe+u+lTgFOIGL+mo2SHjoEL3kL6z2xi/5I2jfT7wjv X-Received: by 2002:a05:6402:34cb:b0:42b:2523:61ed with SMTP id w11-20020a05640234cb00b0042b252361edmr30739795edc.356.1653534558999; Wed, 25 May 2022 20:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653534558; cv=none; d=google.com; s=arc-20160816; b=07XTHcO8zvIXLNKfMqJgNUEgDM4XhxGaCctCpChPZLNIt0dur+oHcOiQ01vqax5Nik EqI87sl8/xiEPIs6zGqwjQ/cPczWSfcZmSmAXOkup60GO0YwSW7Q+HUa9PepRNSIrLK+ Y2W+bgXbFoW+jAb3doiuvVUUGUmRO0tkMWotnfvJ6Gy7WjILeno1em1DHvwhDFru4jOf xwcccJ8jSj+gd6Stq4hWERav67KwUjsbx7KezqysTKtiwWTVm6tZ1LUgO9xao49FBFjO Phm5G+pm+d1RBMkwszjBBF3+JcrojbbXQZ5ElWioWR2oOskVvYbIVdph7AYqhglI07DG K2bA== 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=oVcwfs7LaLIcj8lD0NxblPY5TrT7/xc4rcWLu0GbH70=; b=OwL5hH+LrreS7piqMZ4LOV2WylLSNkSqj79xYrwIBMSa/bz6gSOE72WLZ0RDJ4e9FS eh1dEUrVTc/9f/GPmIYf+k0EYHfaFrb7Lib0sif6TTyqqN9LYucJyClvjYUmNxyMCi7F t/rGJqZA76B36O0m1VWamfqo4xLrZzmL/yJkLU+zZX7vBe/6UjfSV8reddRPOWPMSFuw clKsuA9cR+r6ag/DSygpjSvABg5HucTsBlhGhiS8yK2B4SHuhME3UmbMW0HKr4sdhLJl GZv8ICvX0SxzIK1/rKP67ItZ2cv+HLsIuYxdxCSF0MEbnFeEorI532qGIz1LEP5jG08p uEcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=coceHEo+; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m19-20020a056402431300b0042b6db702a1si422949edc.545.2022.05.25.20.08.52; Wed, 25 May 2022 20:09:18 -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=coceHEo+; 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 S242439AbiEYPLm (ORCPT + 99 others); Wed, 25 May 2022 11:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243199AbiEYPLc (ORCPT ); Wed, 25 May 2022 11:11:32 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77A0AAFB09 for ; Wed, 25 May 2022 08:11:28 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id z11so10151913pjc.3 for ; Wed, 25 May 2022 08:11:28 -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=oVcwfs7LaLIcj8lD0NxblPY5TrT7/xc4rcWLu0GbH70=; b=coceHEo+uv0xofNyutF8KiY+u4PV6Q6q9xmbXvvXEGUoUIAew/qQzpeRkD/GbADPdv rMRlGpgN3VAC2YJjmyNiRZWOiFsXecrEerYxZmn+m/Y5NeGUWYcDxnh8umnlU/jvMjYd d8sc1IlKcPL6MFLm5Vv1tMCWqG+ZVsFgOFgt6bnci0h+K0TzBhy9UY8adMbssZYWIX/F ZSAMTANEQJtrQainm/5YfOp+Iq7f6c0ZsiCoAjkRJy+uDdeMt88mPVyUYJkDEf7OlZeD sgObM/VXLGHpbKfWbhP00sd+0gSX+i/RtUWiWU+Zfi7sBZMIOpI6/LCkdgF5Wh64Opvd qVsw== 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=oVcwfs7LaLIcj8lD0NxblPY5TrT7/xc4rcWLu0GbH70=; b=7Aw2HpwmA13+91hKOjP4XGvrrGFd7tfGScvVhPKfTkJENPxmL6YiY9TQEhARZYtvka Z7iCuShtp0+/vGvki90UmpTRrik2kMN3d/X8TbNHYzVUDAYIo1x09+H7FAX42ovqTZeA N7fBGJgPvYgY2FscnE2Q5Ltb3QAyZrAHQsbMQgjOFW19usG5LeS8vjQC6NEjoOvcuyuN HoRcoOX5AGRUHjEa8Bclrhaq3upIt95E0nMUHWduX9EERnwqwoDDxx0eMXnnbY85KIvz UCv/VxD+FUCwUp2ZFpvrH+BrIGOdw2DG80MFrVnhpydukv35z1o4+ekyB/+4ofEuBzJS Nacg== X-Gm-Message-State: AOAM531EVslb9CnacXZra+BMKINU0bhrHEWpvfJ/BDVvKH2Ov2ZqZhLc IB60Q9R5YLTPTi1+TVwNGJyUaw== X-Received: by 2002:a17:90b:4d12:b0:1e0:44a8:4a09 with SMTP id mw18-20020a17090b4d1200b001e044a84a09mr10865887pjb.189.1653491487665; Wed, 25 May 2022 08:11:27 -0700 (PDT) Received: from kerodipc.Dlink ([49.206.9.238]) by smtp.gmail.com with ESMTPSA id q16-20020a170902eb9000b00161b50c3db4sm9383129plg.94.2022.05.25.08.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 08:11:27 -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 2/5] riscv: cpu_ops_spinwait: Support for 64bit hartid Date: Wed, 25 May 2022 20:41:03 +0530 Message-Id: <20220525151106.2176147-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220525151106.2176147-1-sunilvl@ventanamicro.com> References: <20220525151106.2176147-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The hartid can be a 64bit value on RV64 platforms. This patch modifies the hartid variable type to unsigned long so that it can hold 64bit value on RV64 platforms. Signed-off-by: Sunil V L --- arch/riscv/kernel/cpu_ops_spinwait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpu_ops_spinwait.c b/arch/riscv/kernel/cpu_ops_spinwait.c index 346847f6c41c..51ac07514a62 100644 --- a/arch/riscv/kernel/cpu_ops_spinwait.c +++ b/arch/riscv/kernel/cpu_ops_spinwait.c @@ -18,7 +18,7 @@ void *__cpu_spinwait_task_pointer[NR_CPUS] __section(".data"); static void cpu_update_secondary_bootdata(unsigned int cpuid, struct task_struct *tidle) { - int hartid = cpuid_to_hartid_map(cpuid); + unsigned long hartid = cpuid_to_hartid_map(cpuid); /* * The hartid must be less than NR_CPUS to avoid out-of-bound access -- 2.25.1