From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 48BB13858CDA; Tue, 21 Feb 2023 07:41:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48BB13858CDA Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1676965284; bh=mPcBx9hyFp0EQZ8Eo5qe3Di78IEX5VZzUNc3lE1ONLM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bsqCMKJt8NjN0iMm2+WypGq18eJHcL7wH5B9I0Eje+TENLVLErS7hByumLU8PmCh+ wC0c4sUQXgEiwlHuRewbQoYMNCj8g+V3gALZP7svkCrVZ0o8TRwcINAKqXAIGW265g twMljDezI6rIggeIWep3MbE6Q2zAL+UBt1lKzfKc= Received: from [IPv6:240e:457:1010:6c8d:9501:85b0:822b:e7ed] (unknown [IPv6:240e:457:1010:6c8d:9501:85b0:822b:e7ed]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id BC58465DC8; Tue, 21 Feb 2023 02:41:20 -0500 (EST) Message-ID: Subject: Re: [PATCH] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000. From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org, pinskia@gcc.gnu.org, richard.sandiford@arm.com Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Tue, 21 Feb 2023 15:41:14 +0800 In-Reply-To: <20230221072001.480858-1-chenglulu@loongson.cn> References: <20230221072001.480858-1-chenglulu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-02-21 at 15:20 +0800, Lulu Cheng wrote: > Like la264 only has 40 effective bits of virtual address space. I'm OK with the change. But the VA length is configurable building the kernel. Is there any specific reason LA264 has to use the 40-bit configuration, or should we reword the commit message like "for supporting the configuration with less page table level or smaller page size"? > When TRY_EMPTY_VM_SPACE is set to 0x8000000000, it just exceeds > the range of 40-bit virtual address, causing the mmap mapping > to fail, thus causing the pch function to fail. To be compatible > with this situation set the macro to 0x1000000000. >=20 > gcc/ChangeLog: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* config/host-linux.cc (T= RY_EMPTY_VM_SPACE): Modify the value > of > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0the macro to 0x1000000000= . > --- > =C2=A0gcc/config/host-linux.cc | 2 +- > =C2=A01 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/gcc/config/host-linux.cc b/gcc/config/host-linux.cc > index a891651a7b6..d1aa7ab28ca 100644 > --- a/gcc/config/host-linux.cc > +++ b/gcc/config/host-linux.cc > @@ -99,7 +99,7 @@ > =C2=A0#elif defined(__riscv) && defined (__LP64__) > =C2=A0# define TRY_EMPTY_VM_SPACE=C2=A0=C2=A0=C2=A0=C2=A00x1000000000 > =C2=A0#elif defined(__loongarch__) && defined(__LP64__) > -# define TRY_EMPTY_VM_SPACE=C2=A0=C2=A0=C2=A0=C2=A00x8000000000 > +# define TRY_EMPTY_VM_SPACE=C2=A0=C2=A0=C2=A0=C2=A00x1000000000 > =C2=A0#else > =C2=A0# define TRY_EMPTY_VM_SPACE=C2=A0=C2=A0=C2=A0=C2=A00 > =C2=A0#endif --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University