Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp784768lqb; Fri, 24 May 2024 13:08:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9CHdFgCDFegfUQ0csifyFEeY1ir2/S9TZhhCsjhiAd91bstwI1aIst/JGOKMixoXlAuDy3AURtJe2+3cNSBVpYqk45h33vc0TrPQOTQ== X-Google-Smtp-Source: AGHT+IFLAl9LiLW55rCrDCYFYRJy8ppj+3+CpkY99iPv0xqU5jcxeKTpHx0FR6jUBnkgxSzrCnfJ X-Received: by 2002:a17:906:19cc:b0:a62:615d:47b3 with SMTP id a640c23a62f3a-a62643e9c10mr216419666b.34.1716581285176; Fri, 24 May 2024 13:08:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716581285; cv=pass; d=google.com; s=arc-20160816; b=Z1QIE3/BjyKU2jRQypwGTypEOJMVCqTv2iZY1T3Ww4r2Dn2f8zCflnYrvx6U2CT9lJ 9PnNrr6lcWAXpllM5R8drCEJP0LH32AESg3tVTmMAnIt4Q/lQsyrexnXoDBzNuMcRXNR 0+pVYKluIXvpAFusnt+G740Len2KxuPAZ1AvvjYsJ4374PbYDFNBrisMlgmUZS6OVRxA gsDdysSWmYSNRSVNDtI3GQPLhkh4gk0xN4QxrwUJhOfNOhrj1IPUWZGqrNgs5GA53jDL Ekvxk3vd0x9KuTaVdDvjHURKw0y8glTryuvoLIcax6YR5+YtGin5nwNabuPdtHEsLuvP Qq6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LX4YZLk9vL6TpJ4cCGvzE5Gpl2QxJwCuIm81NaHBkeo=; fh=X9VM5UteCQkSgXVgZRXDenHKS5xKl4H6r+p+3qTsHrM=; b=Rnt7AzSGVv2Ee2LexzDBU20CAv0arQovfxSjVcHzeHfpeCwpslebRANc9SN/LMYKp2 bNm7tP/KyL9qFg+lJesaj9vgFzy32TAGH97J2XA7ojRieJRopnFfSaDT3UwvW0/S9uN6 1qVf0/hJkhYhCb4Xtq9gwNaNqoZAdGXjxJZNpjdcNOMjEzHxdvO+akRgh2DUNagTtqjL JPkD/yt5q1T/UP5cM3zDf3vHVC4wYwXxtsaJJECcJXAVeR7NVWHQ5+6cZmWORo3/uqxV Y71xV/rRmACxW/V+XWqkvUmD6mS21HevfVrGILPvwFArZ/ezhqrKxpNArYS255pFblen SsfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-189074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189074-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc37958si110798366b.387.2024.05.24.13.08.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 13:08:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-189074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189074-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DEEC31F2188E for ; Fri, 24 May 2024 20:08:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9850C7350E; Fri, 24 May 2024 20:07:52 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 114443D0C5 for ; Fri, 24 May 2024 20:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716581272; cv=none; b=lKVWqjVT/g4+r1ClxEFC9oE8rtpf+T7kEm2EO1fN0EozSzKaetGuHCDIx5TICsse8zY1rBMEZPgzNi/AtJCBAuiv3KRRIQF53jh09B5JFp7BJzvXqoDc/dr058X6gw3rOzxPLa3RLexOrDDb0Osj237doCTO+uTrvmrJjOJhEzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716581272; c=relaxed/simple; bh=Zp3FRRxd0wt0czjSGF99QfwIwMQpolF1rDHfd4FWYeQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oBfVZZnlYMMA9ZZSw36A5QSeUfS2tl7a3Nox4vYbiALBt2HDn5L/8F8PnF899SceYy1seYvBJ2cr9XZIv/8orBHNbFNnK3LFIN6HOuLOfSXtk/twWWLWYGuJ0cYJFLiVJEF15priKoN1MCJVcqq14jl0It7/OI0g5SuYwL4aE48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id C78AA1BF203; Fri, 24 May 2024 20:07:40 +0000 (UTC) Message-ID: <8b741144-8a3c-4a4c-bb3f-dfab4aa8e576@ghiti.fr> Date: Fri, 24 May 2024 22:07:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] riscv: Don't use hugepage mappings for vmemmap if it's not supported Content-Language: en-US To: Nam Cao Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240508173116.2866192-1-namcao@linutronix.de> <43829e94-98ae-46a4-a3e6-dbabbe94d7c1@ghiti.fr> <20240508184641.WP8ok_Hg@linutronix.de> From: Alexandre Ghiti In-Reply-To: <20240508184641.WP8ok_Hg@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Nam, On 08/05/2024 20:46, Nam Cao wrote: > On Wed, May 08, 2024 at 08:22:43PM +0200, Alexandre Ghiti wrote: >> Hi Nam, > Hi Alex, > >>> Commit ff172d4818ad ("riscv: Use hugepage mappings for vmemmap") broke XIP >>> kernel, because huge pages are not supported on XIP kernel. >> I don't understand why XIP kernels can't support huge vmalloc mappings, > Me neither. > >> so I >> think the right fix would be to enable such mappings on XIP. WDYT? > I agree that is the ideal solution. But I don't want to send any new > feature to the stable trees (stable folks may even reject such patch). > So I intend that to be in another patch. I have been thinking about that, and I actually think that the real fix is enabling huge vmalloc mappings for XIP as it was an oversight/mistake in the first place. On 64-bit kernels, there are no reasons we can't use PMD mappings for vmalloc. So I'd rather not go with this fix. Thanks, Alex > > Best regards, > Nam