Message ID | 20231112061514.2306187-33-guoren@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp562719vqg; Sat, 11 Nov 2023 22:21:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6aB+qj75Bme2VFo3ko8iBWwHub7EpJ3FMpKfxUt1yBiAXfoooZwtX6I4Izl4wQcUQX2Vn X-Received: by 2002:a17:902:fb8c:b0:1cc:4596:841f with SMTP id lg12-20020a170902fb8c00b001cc4596841fmr7962059plb.31.1699770084344; Sat, 11 Nov 2023 22:21:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699770084; cv=none; d=google.com; s=arc-20160816; b=nSu3TNIU+vqUJr8uiJP8MbWgp+4iojoJ3kHwk3roKRoDZkaoDBmmVPCq0sy4LNVrVn hcQktR/JnxqK06Yk1mbL9y1U0gABlKY2d+TZeL5Aj7FDL5Aro0Hvd4dTUTqZG3+CYMim UGZnB5L9e84p8tsHnr6Q9R+C0J+8LesxVUAQ724Pr4kHHSbwDznMzSL6PGvBA+vSgrLj QjC2BYaE3cK9XBD4zYjWR149cGnNhxQjFKI4eYn7X5S7jBzUPfFPFYHwEd8erdNrPO5E CWRtz+OVZByXq/2WpbfN9MphpCDk9wPwGjtea5jHiVYiYHLAiXK921iULxFRhSYG7lbd cUlg== 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=Q8LTUtnhIWx8kJhql7h7PijHV0KDNEp1DSzxQfyrRIQ=; fh=ZE/z2dNArDjRCaYXLY1qiMuWjPgjymC0plQjRd9hozE=; b=tuVgQPerMK9+mMMazaCeNUFbJ1nDHe4SnLNOctNMkBsoYJC3BCIODGcfjchb1b7MqH uA414BTvS4ooicI8GbBAKzSwGSgf7BgSl2koElTO9EE8JXStq2bmwBxG5CINba3EzhJZ Qe6mRA/+1zv7EwbXfVQ7Vo7ewA2zY73oNQUYBCJqQSmeHy2CZDmth6/trQZSIhwQbEQy SPcRfEWQcjQFf0pRZiGfN0wUHI3uQSDIr5UjfweEwWeUeu29DyeTNAWK6tJcWCCv+cMS Qak4rGGxBKDVF85hXKbLcaLhRoqdxws7+tloCg/FMLmodzFK/be9Hi1vYcT10zNg8m8/ FIDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eds0Ikvb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g24-20020a1709029f9800b001ca01fd8942si3077564plq.120.2023.11.11.22.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 22:21:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eds0Ikvb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 99AB38067A7E; Sat, 11 Nov 2023 22:20:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbjKLGTw (ORCPT <rfc822;heyuhang3455@gmail.com> + 29 others); Sun, 12 Nov 2023 01:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231386AbjKLGTa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Nov 2023 01:19:30 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEFF155BF for <linux-kernel@vger.kernel.org>; Sat, 11 Nov 2023 22:18:42 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3362C433C7; Sun, 12 Nov 2023 06:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699769922; bh=bS9zYu4p2fDX0v+IO9ccI6gNcdJmQYX5Su7I11BAbz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eds0Ikvb4knSS+2emy3RCxl6MssNc5zSLI7TvAgF41P6aLGxzvhumme+tfoiJbZYR E64mIZD3foSewobLLFWM8uEAYS2F7Kh6RRauO69qm7oFrRLBiW5gcTGx7lQquDH1H4 pyGzBxPO8sU1e4R2qo6ecYZVx0NP7Pn6xurHDlH/Gr544GTZVrrt/ofParw6Qb0Tpm 9o78tX8Aa4k8+RKVvEClQE4oPy776KWO5tvkrU2H3+Gs4WcLuzV1r+qVRi/fQ/GK8P B5sTrI/oBj3IU/2VjqZLyF7Cy/1WyISInWnMyztHVxlQ5TsnAF6GPIStsmJkrSURHC 7/S9+w2Jg0xbg== From: guoren@kernel.org To: arnd@arndb.de, guoren@kernel.org, palmer@rivosinc.com, tglx@linutronix.de, conor.dooley@microchip.com, heiko@sntech.de, apatel@ventanamicro.com, atishp@atishpatra.org, bjorn@kernel.org, paul.walmsley@sifive.com, anup@brainfault.org, jiawei@iscas.ac.cn, liweiwei@iscas.ac.cn, wefu@redhat.com, U2FsdGVkX1@gmail.com, wangjunqiang@iscas.ac.cn, kito.cheng@sifive.com, andy.chiu@sifive.com, vincent.chen@sifive.com, greentime.hu@sifive.com, wuwei2016@iscas.ac.cn, jrtc27@jrtc27.com, luto@kernel.org, fweimer@redhat.com, catalin.marinas@arm.com, hjl.tools@gmail.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren <guoren@linux.alibaba.com> Subject: [RFC PATCH V2 32/38] riscv: s64ilp32: Validate harts by architecture name Date: Sun, 12 Nov 2023 01:15:08 -0500 Message-Id: <20231112061514.2306187-33-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20231112061514.2306187-1-guoren@kernel.org> References: <20231112061514.2306187-1-guoren@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 11 Nov 2023 22:20:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782338115435913010 X-GMAIL-MSGID: 1782338115435913010 |
Series |
rv64ilp32: Running ILP32 on RV64 ISA
|
|
Commit Message
Guo Ren
Nov. 12, 2023, 6:15 a.m. UTC
From: Guo Ren <guoren@linux.alibaba.com> When rv64ilp32 was introduced, the 32BIT would work with rv64,isa. So use the architecture name instead of the ABI width name. This is an addition to the commit: 069b0d517077 ("RISC-V: validate riscv,isa at boot, not during ISA string parsing"). Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> --- arch/riscv/kernel/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index bc39fd16ab64..3c06ffc00fe0 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -66,10 +66,11 @@ int riscv_early_of_processor_hartid(struct device_node *node, unsigned long *har return -ENODEV; } - if (IS_ENABLED(CONFIG_32BIT) && strncasecmp(isa, "rv32ima", 7)) + if (IS_ENABLED(CONFIG_RV32I) && strncasecmp(isa, "rv32ima", 7)) return -ENODEV; - if (IS_ENABLED(CONFIG_64BIT) && strncasecmp(isa, "rv64ima", 7)) + if ((IS_ENABLED(CONFIG_RV64I) || IS_ENABLED(CONFIG_RV64IILP32)) + && strncasecmp(isa, "rv64ima", 7)) return -ENODEV; return 0;