Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1753191rwd; Thu, 18 May 2023 17:18:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vEB7//UXfX8CCFuwGHBhwvC28/Eczx2yWFS22QM0hE2OqUlf3FNlEWp9nlzKRQ2Cz6wx5 X-Received: by 2002:a17:902:7d8d:b0:1ab:19db:f2b with SMTP id a13-20020a1709027d8d00b001ab19db0f2bmr928493plm.36.1684455524201; Thu, 18 May 2023 17:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684455524; cv=none; d=google.com; s=arc-20160816; b=eTrypNKTcJ0kR+OLlBlJIfm16iPcnS53HcJUBALaT0cWsAO+YHwh1BK39Nvb0z2qZy pp8MeCyRGS2p8FhjFV9Mf0PBTO2AIGtYrs+IgmIPER7NzGjw/zNvBHMZ5vgOMoF3kG8q PZRv8yg+jnjfnaWS+MSRzftgPDBf8ldlnCTpU8iy6blf0LjnT5g26y/gNthM3vauw7jQ eWIvw4D8EfjU16DP2FreMg5OGv3BnW6H2dY6wVxmdLO+B6SXn9j6v80uR+LsJGlREUlm j51sHpIbnHEIEO9bQd/ykxZgMOa+ag6qeolsqjs1Dt0m4rdJGVl/kS2qWykcr9YiUadR /u6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=oPErhkDQ1KrXKdVSH67+TyFJqg0zBYRQSIsMhyp6Xp8=; b=OzLY5+lvSaMzWVb3+rixfD8qkgtxN1LU6Dh5+yFoh56AjSnkkDXlLKE+85OkKXuhLo 0wrq/uSDL+87yJDX0UXTwqyEhC0GlimHcyEA0CEaCLRT3yaBIe9xvGbpAHTaLavMAqpy Q57hsh68qOhDSefS5g3tnrBhR1J/25jbZXMq6icO8J2OW5R0KgH34L7tFKzjQssn3NeS 4Ne/IZkO+HdHo1Di5XL2YxbfDIt0p9FWVTRx3BZsnvCLqmHqcNo/gYJzdLbcAaQr3Uog 7lkXGfkJYoVYDHEiPbfBnMsxEx1wDjbjI6+N+yTKbp6Kn/baMMzbxp3ysK4Nh1CVOwuA Xgcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=GyNWfCWn; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz20-20020a170902ef9400b001ab2337ecf5si2317710plb.467.2023.05.18.17.18.29; Thu, 18 May 2023 17:18:44 -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=@sifive.com header.s=google header.b=GyNWfCWn; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjESAOl (ORCPT + 99 others); Thu, 18 May 2023 20:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjESAOj (ORCPT ); Thu, 18 May 2023 20:14:39 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEAED10C3 for ; Thu, 18 May 2023 17:14:38 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-76e5fbb1c89so203685139f.0 for ; Thu, 18 May 2023 17:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1684455278; x=1687047278; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=oPErhkDQ1KrXKdVSH67+TyFJqg0zBYRQSIsMhyp6Xp8=; b=GyNWfCWn4Qnut/p6Uxof5m2Hm68molu1vAPWfUBZGoTmgiVHQEQATRVY5iku1wK0// IUEl4JQhJ8A4NAVQR4/kYgj3dVdvD+vboyN/fvP67sTlnf4WEgz9Usg96l4bmOWtt1BD jIN7dgs6+AKA9m09k5UUHgvZKhKr+EXUc4wIiHiEmzDlgpn/mPtDPBTiVA7bau4p1U6q C7jtns0MiIGiInh1U6RbBnUCNtWtkHVQuGEl5DHall6JTIF0tTgoVH7CHDiP/DAUWfmm RekhD2B93xCznSkU320tmvwltZDoa3k/CR/uL43GMFSyumUWlD1WnoLtnVbSQwTuG3kF HQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684455278; x=1687047278; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oPErhkDQ1KrXKdVSH67+TyFJqg0zBYRQSIsMhyp6Xp8=; b=kKOVo9HRVQMgqY/0nf+DlSdQjSu6JKQHSJsGJIdmOdWM+ju9EqQeQZ5Lerzdv3NcOp P7J+j86FUddmTDXcwgNvKcbrtpnDlUSeTEujsKNMyDkSRtQyPNMVY+euBvicZMHBVEX+ yuv7/QXzLBw3+SdU0pBIej8liGZ9bB6NG7llIMwJR7SplMkcwksFqi4capQd+mvL9yR8 k2fjPZC3ZFx2I7jLqO0twqx0jKzu4qsLnBFTHWsEwsZQ1fQDvGFKP2kY8ZV0Xoh2aRaO D4vZAboI045UHspmTJfGku1Vx54N75v9CH/kI40naBhqrTMo3YxhBL+ksKZdqpFVC9Bn F+tQ== X-Gm-Message-State: AC+VfDwmnAq1M4jyLUPpQkx6sutRKtFZZdiZ2WusdwuHa9JvNC9TnypZ MDrAVYsxEsSvJ+u1hIj/F6turg== X-Received: by 2002:a05:6602:3311:b0:76c:779c:7ebe with SMTP id b17-20020a056602331100b0076c779c7ebemr75255ioz.14.1684455278089; Thu, 18 May 2023 17:14:38 -0700 (PDT) Received: from localhost (c-98-32-39-159.hsd1.nm.comcast.net. [98.32.39.159]) by smtp.gmail.com with ESMTPSA id r22-20020a5e9516000000b0076c872823b7sm710613ioj.22.2023.05.18.17.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 17:14:37 -0700 (PDT) Date: Thu, 18 May 2023 17:14:36 -0700 (PDT) From: Paul Walmsley To: Palmer Dabbelt cc: guoren@kernel.org, Arnd Bergmann , tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, Conor Dooley , heiko@sntech.de, jszhang@kernel.org, chenhuacai@kernel.org, apatel@ventanamicro.com, atishp@atishpatra.org, Mark Rutland , bjorn@kernel.org, Catalin Marinas , Will Deacon , rppt@kernel.org, anup@brainfault.org, shihua@iscas.ac.cn, jiawei@iscas.ac.cn, liweiwei@iscas.ac.cn, luxufan@iscas.ac.cn, chunyu@iscas.ac.cn, tsu.yubo@gmail.com, wefu@redhat.com, wangjunqiang@iscas.ac.cn, kito.cheng@sifive.com, andy.chiu@sifive.com, vincent.chen@sifive.com, greentime.hu@sifive.com, corbet@lwn.net, wuwei2016@iscas.ac.cn, jrtc27@jrtc27.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, guoren@linux.alibaba.com Subject: Re: [RFC PATCH 00/22] riscv: s64ilp32: Running 32-bit Linux kernel on 64-bit supervisor mode In-Reply-To: Message-ID: <668be661-728d-b87f-b827-4345ad07cc61@sifive.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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,URIBL_BLOCKED autolearn=ham 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 On Thu, 18 May 2023, Palmer Dabbelt wrote: > On Thu, 18 May 2023 06:09:51 PDT (-0700), guoren@kernel.org wrote: > > > This patch series adds s64ilp32 support to riscv. The term s64ilp32 > > means smode-xlen=64 and -mabi=ilp32 (ints, longs, and pointers are all > > 32-bit), i.e., running 32-bit Linux kernel on pure 64-bit supervisor > > mode. There have been many 64ilp32 abis existing, such as mips-n32 [1], > > arm-aarch64ilp32 [2], and x86-x32 [3], but they are all about userspace. > > Thus, this should be the first time running a 32-bit Linux kernel with > > the 64ilp32 ABI at supervisor mode (If not, correct me). > > Does anyone actually want this? At a bare minimum we'd need to add it to the > psABI, which would presumably also be required on the compiler side of things. > > It's not even clear anyone wants rv64/ilp32 in userspace, the kernel seems > like it'd be even less widely used. We've certainly talked to folks who are interested in RV64 ILP32 userspace with an LP64 kernel. The motivation is the usual one: to reduce data size and therefore (ideally) BOM cost. I think this work, if it goes forward, would need to go hand in hand with the RVIA psABI group. The RV64 ILP32 kernel and ILP32 userspace approach implemented by this patch is intriguing, but I guess for me, the question is whether it's worth the extra hassle vs. a pure RV32 kernel & userspace. - Paul