Message ID | 20231112061514.2306187-11-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 t9csp562243vqg; Sat, 11 Nov 2023 22:19:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAtYZ3x7+DVIDHka5b2i4py9TVs/cjkw1G26S/RQvJ0RZVkCA7MY0VD/U4gvklT8atjCBh X-Received: by 2002:a05:6808:4096:b0:3b2:e74c:30a6 with SMTP id db22-20020a056808409600b003b2e74c30a6mr4153012oib.10.1699769974282; Sat, 11 Nov 2023 22:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699769974; cv=none; d=google.com; s=arc-20160816; b=Gy0ZPHZQxdR/u6FyvOhxv7Wh9ivRze6ac5jIJd2cWE5JbErGh8YQ40mzeipwhz4KGM 18Xl8+VfaspQKD6xcg07n2sCMbJKKCw7VRUp3hUQHrr8s2YqDho6QKzFH6JyXX8jG30D gU32JbAcEeIrF6E+debkZhkZ9QT04mWUhWOXZeOS8IHcaEvFWZi4xoo+PfqipyJyqS+o kVhRBhwK5hbPW45rwmBpWpaSSLOAVXJRFOrufWAtODIrSOQ1gRMmM0On/eyAyoE8d4Gi xo8pYihxJ4lQnAvtK/H9uFS2A7dM28M5HsVpYJKYk37KPNzB3xGT6zwT7tW0+1Sd+6/R PDqA== 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=AZNCl6FTG8VnR0HUZW8vMgUtvb9FKpPCbm49jzRdsFU=; fh=ZE/z2dNArDjRCaYXLY1qiMuWjPgjymC0plQjRd9hozE=; b=LI+JvItFkXkT3We+QFy5tfbJ+6pG9DOs+Hr+p93n3y1LPgnpJD6DzOYQwoNgwuTXKh EgXXK4z1Fry+B3AxgsVNlzuqPyYgR3dU4oH3gjUMzcO6oG6ferXsJ+hO8fliPz1T9yn6 4MpdoEi3/yDI+0vLPtvM5kxR90jU/Uz3pG54/CJ8nb3cYgP+y59inuLF44efa74FdgYf LflM7pqlkumnNVUQAimldUKs7XEJXQKts3fZKjJhhFm8GAV7PFB8/+VuRHE6qrZNlrSF KDT+jVruoju627krsKQxBW0fASjBq6z5UeXLbQRrvnbSY+QJgHTS6PvTA4ekAkvkJ5mv RJTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EB1Tkw1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id z128-20020a633386000000b005bdd8af5a15si3031420pgz.668.2023.11.11.22.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 22:19:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EB1Tkw1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 1B8758078616; Sat, 11 Nov 2023 22:19:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbjKLGQ6 (ORCPT <rfc822;heyuhang3455@gmail.com> + 29 others); Sun, 12 Nov 2023 01:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbjKLGQs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Nov 2023 01:16:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F2EA3840 for <linux-kernel@vger.kernel.org>; Sat, 11 Nov 2023 22:16:29 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0415FC433CC; Sun, 12 Nov 2023 06:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699769788; bh=x2yNl81rtMLNR83PEs3HCmEpsQ4/7rJymYTh7H6aEEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EB1Tkw1ZePpU08PhgrQFyDzSgHHkUjmbXxR/MUfG9bEVV+Iqk7O9UI0yiAixM8Jim ijdKADfSY75NGC29rcYC1mdguX3mcb7TwbXCv5XJbBQy0Szp1r0s50Ul50mA7JJS0O nLfC/bApQGYZcDd7S8pGBd2WNctZpvQ2G4sr3FE+v+cbbKJcQ154u+YzChQk2HyUZO QMl52JlYFGIXKd1n7CaPK5ahUUZ3kDSEhDiIoMq5PhRfUHho2veayBgIf8qrZBZYJS dEMpUJibV+TeKlPUnHb0iDewAmVuzxXifFf3b86rqSS9CRpgB19LbEZjFi810Jl04U Ds4QiYJ1/SScw== 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 10/38] riscv: u64ilp32: Remove the restriction of UXL=32 Date: Sun, 12 Nov 2023 01:14:46 -0500 Message-Id: <20231112061514.2306187-11-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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 11 Nov 2023 22:19:15 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782338000493115119 X-GMAIL-MSGID: 1782338000493115119 |
Series |
rv64ilp32: Running ILP32 on RV64 ISA
|
|
Commit Message
Guo Ren
Nov. 12, 2023, 6:14 a.m. UTC
From: Guo Ren <guoren@linux.alibaba.com> The u64ilp32 needn't hardware support UXL=32, so remove the restriction when EF_RISCV_64ILP32 is detected. Reported-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> --- arch/riscv/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c index e32d737e039f..93057ca2e2a7 100644 --- a/arch/riscv/kernel/process.c +++ b/arch/riscv/kernel/process.c @@ -88,7 +88,7 @@ static bool compat_mode_supported __read_mostly; bool compat_elf_check_arch(Elf32_Ehdr *hdr) { - return compat_mode_supported && + return (compat_mode_supported || (hdr->e_flags & EF_RISCV_64ILP32)) && hdr->e_machine == EM_RISCV && hdr->e_ident[EI_CLASS] == ELFCLASS32; }