Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1963031lqg; Mon, 4 Mar 2024 08:48:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVJ7hPVNJWVpPROKV09gsQDSf0uaJVZgvERSoKyBYJYlkrFfyXsQzry/FiKbubeHQ9TTP6TEUnq43dhv5/7yDZTnC04isY5O5ETaf8/qQ== X-Google-Smtp-Source: AGHT+IH8IQlalfklZOvin3dK6H7rCZUDVKtBF5QZY3TcClYH9c/IpgePxtCmFH8ZCSXVATqayGcB X-Received: by 2002:a05:6214:162b:b0:690:6761:cc3c with SMTP id e11-20020a056214162b00b006906761cc3cmr8342788qvw.11.1709570885141; Mon, 04 Mar 2024 08:48:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709570885; cv=pass; d=google.com; s=arc-20160816; b=aJzBEs0ZCfD8BF4AzjKD48WYRk5AAHioMqTbFpjcsKS3/Yn+ELScMUabVJMD8xFtP+ DIag1x24QbwG4VESDQjGGm5oD3eyFZQJ/2ZgHt22/mRjfzftJ37vVVcu/QAqZv5cV7eq mllvPcEa6OddC6FRsxP+QNZaDUeltidUKHjZ6laECzfN0TLNfS4vorTx0Gv0RiN97j/k hNZXMWPd/hPGP5nvRQgWAa4WLyxTtjNEcnpCr9/uu83CUF3Z3NIOpEatq1dXC+1O/RTe gks8dpaqsoY0VlHngygElHvzcoZQNZESWmYmQNVXSdroSPtR0k/N4sdnmboRxnMkzX3U BgGg== 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:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7bG+hQSw2tqOeEGkJrcSkS7HC1Vmfa8Jpar1AvYkw14=; fh=8cBANYPScHx6iiOoBqMLGf4YnjBZNB1u+T8ZtGHGtRI=; b=mNQ+y659OVHji0505dZuNbf88tJ1lwpNt9KxcM/dz9sgvWfRkm9oXXXuJZ1pGXi/Fd yrOgnugtvP42k+8MLhb9iswXFoyc0MGniWWmxq9+1MERQ8Glh6UD2RlHoIXlkDBaVL4n dhof2+CZwcoZaYIqmN43beOjRXj5FjKZaE6PdZxA9K7pVS/2iUOh+eqWcnU+kBRDgLoX yNhPVCNeHHIXGoAhvxXpryQOP2DAgGZKe9hpNFwfxnryJZB8zrgDmr+XAKIcr8KdS5VD 22XDlTT+0inX9IQOFFtHtwTmimGq/NZ7pbvzmj/ebohl6aaMlEtR6GtV4FROjptCA7uB XPDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xRN9fOS6; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-90953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90953-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r5-20020a056214212500b0068fe4a3fe5csi10277925qvc.420.2024.03.04.08.48.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 08:48:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xRN9fOS6; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-90953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90953-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB76F1C2155E for ; Mon, 4 Mar 2024 16:48:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 421DF4E1BF; Mon, 4 Mar 2024 16:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="xRN9fOS6" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DD799495F0; Mon, 4 Mar 2024 16:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709570869; cv=none; b=nY+fo8O2uVsfO9EtUvSTnDtIJ8HQXAbE/5ET3vpjnc2DRAyTamylPYM3j0G60hYkUyENmjnWIJ+XVARBC+u67ijYd/pjQUiNWHbaOcG8Ye4Yf1CHjIFSReEhilM8m42qadUJEXuIZWb3onlvLTe9fviLREJCpc8ieB4K9B9dy6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709570869; c=relaxed/simple; bh=vqaCs6mYffPI4elLE9hYWmT1AKYqmXutoymuIOPZcqs=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=g18I7JNW/BSQ+Nr4iRLDdJ5SBcbwouVEYoVjoQKQYVD7CFls9nKOj6ZlOvRcWt7Z4y/q1bsJ2TZd4h0JQ2GMarDMe6bEC5D1qDSgtwXdtv6bDdANNuCG5PrMLdHC8VcNxrQLTIUITkDQydMiMCbY34AwrhNFi/uGDSnw0IRSs74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=xRN9fOS6; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=7bG+hQSw2tqOeEGkJrcSkS7HC1Vmfa8Jpar1AvYkw14=; b=xRN9fOS6DqHoknrHLLGcINz4Zr npNQ1RWxwvOowQwre5eHRLhnChgbIX5YQYmi6IoEClvlPyfZyqNlvi2ioUuvVp6cB/Bu25sIKMen6 VcLPtxaf1g60wsrHqxh9XebsN+77vhbsEJP4Yxl6uFVOYPSed3PeqMBFFXCMvwU4jBT4NA4tmDvsu 5xZ6+NtwxkpL36iuWruYYApoUG5ElF3wautokUDz+Zuo3TpK/bdc9+6zpAMKlc27T0IiHCNPkEH70 2ZsBdXcloKdswWgqDdhq5NiPtUw34Pv004yIMLuZP1JVRxUGujPCnpAzIWxoeS+4VpHjyHfdQ+uu7 ocVXxKzA==; Received: from [50.53.50.0] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhBTe-00000009sto-12Ks; Mon, 04 Mar 2024 16:47:46 +0000 Message-ID: Date: Mon, 4 Mar 2024 08:47:43 -0800 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: Fix compilation error with FAST_GUP and rv32 Content-Language: en-US To: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Stephen Rothwell , Linux Next Mailing List , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240304080247.387710-1-alexghiti@rivosinc.com> From: Randy Dunlap In-Reply-To: <20240304080247.387710-1-alexghiti@rivosinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/4/24 00:02, Alexandre Ghiti wrote: > By surrounding the definition of pte_leaf_size() with a ifdef napot as > it should have been. > > Fixes: e0fe5ab4192c ("riscv: Fix pte_leaf_size() for NAPOT") > Signed-off-by: Alexandre Ghiti Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Thanks. > --- > arch/riscv/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > index 25ca14f6942c..54d26a07fa63 100644 > --- a/arch/riscv/include/asm/pgtable.h > +++ b/arch/riscv/include/asm/pgtable.h > @@ -439,9 +439,11 @@ static inline pte_t pte_mkhuge(pte_t pte) > return pte; > } > > +#ifdef CONFIG_RISCV_ISA_SVNAPOT > #define pte_leaf_size(pte) (pte_napot(pte) ? \ > napot_cont_size(napot_cont_order(pte)) :\ > PAGE_SIZE) > +#endif > > #ifdef CONFIG_NUMA_BALANCING > /* -- #Randy