Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp803689lqb; Fri, 24 May 2024 13:55:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1GwkjNJJK5AvwUlpdS3ePjs9oFGpc9amF3nJtJ93lXgz1eWEKlK80L43tEfqhAmqhv7VMMUP5AoavPnj4AjxnuFaPDV1xia2SmHJ58Q== X-Google-Smtp-Source: AGHT+IGOeMrelmCoQVTngTDWfUx0oBImOsc70rGy8vve0j8paCqRp94t0y/IN1JwTEuXXuAOQS35 X-Received: by 2002:a50:d655:0:b0:578:6410:1d50 with SMTP id 4fb4d7f45d1cf-57864101db2mr874735a12.34.1716584142015; Fri, 24 May 2024 13:55:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716584142; cv=pass; d=google.com; s=arc-20160816; b=Fc26Wdywrjtz5t8btAeRXN7ggH9i8LiAN+36XXq3r665sNzwOedyNjxOu/2QgId1VV xH6fjQ1xyR2S+SyPSbnYQ03fs6fgBCtkBm847xiFPQ7HHGdM2l3LQQK3lExFiAJgVbIB RCUmyb11oFtJoZTIuWb5A+ZsX1poY25rC3VXKxB7kqHh1A3KbOBfIdgLRP8wq9G/0DC7 kENU13vRpxb401cjGJ19hjzTBd1DHq5mZlwAAXGqpo4d7oO+771Rv2XAvGOvdR75Okh7 LtJG74/JSFI6vBXj1YLBu7fpHNYs69aSaCjV24r3gwLLiQ/hyQB5AVmuSiGSt/JUSCv/ Lg3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=LnGzUsjzG0HmIIecrpeyhdj8xRmmJcYzbtjAguZpAMc=; fh=RAJ0zn9sAWY2aZNnuhZDtPfL8RIDIkR1cO9oNt2Un84=; b=c5Qwm1CtTdiJwZJed1nDbdh2FFPHpLNZJXkG1LpD5LppQ8L6/1J6IX5NGvjhKr6+3d SVOkgwLK2Q5aOhCZWwh1FRcH7+zVFFpy+0SaxPUuq+kMEPqLTolJl9BIBhEgwZ2CTVug DjLQA/5rlNunx6xpEF6sUsYJ4skZQVDIOdmVdKeOIdFZA5HRg6vA/r/K2kxxnmz1vSXp r1Gk2sai4TfH8EEUi9+jDUHLbKjLYnxcpEmQt5boWVJVCjgRAnOPESs04onQcuRsLcXS 5O3aoXdqOA4lD2bh0QMRtkYT5jbbQTGPA0S4auLXm8rxj+2v4USKQIiZrTDZtcoXuWHy w7cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KlKSYU71; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785f6e8b31si773051a12.61.2024.05.24.13.55.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 13:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189122-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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KlKSYU71; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189122-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189122-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 B8C101F2243C for ; Fri, 24 May 2024 20:55:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6947D86272; Fri, 24 May 2024 20:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KlKSYU71"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dRK92Xlq" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 30AE284D03 for ; Fri, 24 May 2024 20:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716583914; cv=none; b=AjwPnhus1wq4hVR1eTn9ccA0Fcs5jndSTbbyJ6VPz5O+REjh6G27icFQZsKTyJ7rLPDU+DWJNg5NDvk6eU5giSByOmcOr1u6+Dk3W2S8zaiWdg0LozJ+QwxBzK2bZxJ+BhmH32eypo4GYybaMl+dO1SZTqRdKlrKQXwkaaub53o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716583914; c=relaxed/simple; bh=i3deDqDeO7A/a/n2crxYTP1YsSLmSlhLrhiMYiiSeX4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oEC5K+i90P8oOMy4TGo3fuFDXpOXOA11kopkzJHTWaFgHONuuIGI4o86xQfMjs+Amue/IJqdRXMA4Jct5xVvVyOUaCyilEOG/Rgx7uq6HRM6ofSAbEjVCxweGX69HhC4WvxVPy5GtnS2Z0k5BJD3eg3JG6TTuVn02SBp3jVf3MA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KlKSYU71; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dRK92Xlq; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 24 May 2024 22:51:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716583911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LnGzUsjzG0HmIIecrpeyhdj8xRmmJcYzbtjAguZpAMc=; b=KlKSYU71/teOqH2WxiRGXp7U+lVSfUBTL+htQXBPEgsDsZ+FIPaf8ehRnLE7VJdAt3/5B0 lecEB6p39aOURjQ/ZPh8ZGAiI212GHRHx/jEM2FJkcnK9AZIf0IYOx1fYq7cvi70jWlW9o JKtVIf54tHlL5KCoYyHW90+KRFlfyfdGpzgJuzvX+rSvEVu7pVOE0Jq3bA6f7ych9axMfX b5wNrYkNVjt1cWOeMJn8nyv6QV1IxgblSZm7VArYgZWpK3F5uYgwz7u3DNpsaMF9sdME/B fUfBjE68dt3EZnoNwD/327H52oQER1PHoCHRjrdjDD283Pg+7gwxS/vIToyvoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716583911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LnGzUsjzG0HmIIecrpeyhdj8xRmmJcYzbtjAguZpAMc=; b=dRK92Xlqdes65yghENzMvVaVr2hLmOXfLT7gE558r2LJBjTbK1XjdKD4okqnrOJH3G4oBJ 60PoI4dUQ6JRj7BQ== From: Nam Cao To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: Don't use hugepage mappings for vmemmap if it's not supported Message-ID: <20240524205146.ZaCva-qC@linutronix.de> References: <20240508173116.2866192-1-namcao@linutronix.de> <43829e94-98ae-46a4-a3e6-dbabbe94d7c1@ghiti.fr> <20240508184641.WP8ok_Hg@linutronix.de> <8b741144-8a3c-4a4c-bb3f-dfab4aa8e576@ghiti.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b741144-8a3c-4a4c-bb3f-dfab4aa8e576@ghiti.fr> On Fri, May 24, 2024 at 10:07:40PM +0200, Alexandre Ghiti wrote: > Hi Nam, Hi Alex, > On 08/05/2024 20:46, Nam Cao wrote: > > On Wed, May 08, 2024 at 08:22:43PM +0200, Alexandre Ghiti wrote: > > > > 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. If you have strong preference for that approach, then we can go that way. I don't like this patch that much anyway. The only upside is that it is safer to backport, because it is obvious that it won't break anything else. I will do some testing with PMD mapping on XIP, and come back later. Best regards, Nam