Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2606846lqp; Mon, 25 Mar 2024 04:21:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuA2GwpW9vrSocAp+UH+4v6+oA7V5WVGlSADdPcCZk1bGakg+GdsUDc1mQCgoAgrkXk7e+Cfn4dC1M2Y+LyFcJYrk/q99Js80YhMobFQ== X-Google-Smtp-Source: AGHT+IFgxBEq3vmwEchqGdJEKkhbbLwsBXrMW7DqDmoSnvv2+yalpoukzdIBCIlee9zS4d5iuSu4 X-Received: by 2002:a19:e04b:0:b0:513:cf77:48c5 with SMTP id g11-20020a19e04b000000b00513cf7748c5mr5100332lfj.38.1711365683830; Mon, 25 Mar 2024 04:21:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711365683; cv=pass; d=google.com; s=arc-20160816; b=wr1m+IkfVthwKivC1wwnP0mqmUV8at0twn/ox/ArjYpEQOo1t5yW3vpFqQC0yQgxVA rBf75SvLRZ9SVMplLVb8wA5/jRIt/+2g2y3CCFEB1ZBmgtXCiVZxEfW/Ma3nlyUCk1bs aIk7eo6MhfV85MVlOd/bO5RyFM6iG9X13BxYHLYS/TDyRo1hyELjb7XwlO0iEuWQzXnC sOFnBn6228XPV+hpbhy7vCOMD7CwEDMoBkNIIaJBuGRT2EdVeP89MsShPVVKamCyp21k kiEiVn4WLLbd5H8Cd4ll/SYK9PoYmvuBA/F1+0hdpLzJ8AwjJ4KONL6hfm+zVk5oGPYu XXSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AW3GKt+KttZFSaGYNOskKK26kyY4zCx/e4657CNEZzM=; fh=lNNH3f9fSql+g6zzFQQUlkubpRuVuX21tgRtirrDJ4Q=; b=cA5kr5HSV4W729N/qIC+DYYPC3PSLhN9TychG2V3uNyPFJfXoFvchwqaSmPlrdVMiL aBfKaugY69KbjvLYx+DbNKjOX/qQrOoyPxFhZBR4naK7h372AEqhwVssbk0yU/4GQUP6 c55j8zzxPldf+XfdBIgIp6KD2+qIGDtMG3FJ+QF1sk0fuPgTN4gubSGSMdsBXennwlEr SqoOVMssp+3hlg7Td4AEacs/fBh6fMyr+dN7mDOHKMsPKGUa4nybze8UVuLF/KfVtK1Y 0NMK2zTLS8gKC0LFaA97Eu/uH/xGpKuaxL10aEoYi0xbMHT9KdOxcXkK3ckn2i5PUbxg re+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gGJ5NQE8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115567-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 u20-20020a170906781400b00a46df7f662fsi2372292ejm.661.2024.03.25.04.21.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115567-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=@kernel.org header.s=k20201202 header.b=gGJ5NQE8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115567-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 888EA1F35D2F for ; Mon, 25 Mar 2024 11:21:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CB152EEF98; Mon, 25 Mar 2024 02:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gGJ5NQE8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.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 049C91F23EE; Sun, 24 Mar 2024 22:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321106; cv=none; b=Kq1BT4CXa143PxVWnNpAx3qKVChigsKwDQ5DFdjL8Zxpy3GpToPFBxWhb0nIaVSxM6P/gEXFvt3CAjOzoLw0avTb1/RiaTRp/zYAnf3c6/CD+FF+rnKJtXWAaOBbmgx56RhfrTEyMvrEkMB2SI+wDxF5EfVSD1hptwHt8QbKJ1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321106; c=relaxed/simple; bh=csFAl3hiYJjI5V/7nVcf/rnqXuYN6B7JCluFywskOro=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UgfHQyjSVbQVrN9E3zcoSEow8jMp5uiohnD1fUSr+Bsoe//OczmW8s4vv4Yxz0lqBdvh4h2mpp/5Isi0D0tdBfkigBMq0ozsr+SCPK+bNnpdyTj8LYgGuhJ8SIcuMY1628RjjwPbgZioB5i9OA2ThtqPv7nOLSQlXmtte/jkbl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gGJ5NQE8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E4CEC433C7; Sun, 24 Mar 2024 22:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321105; bh=csFAl3hiYJjI5V/7nVcf/rnqXuYN6B7JCluFywskOro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gGJ5NQE8NccwOc4BIvovkVX7UgqCFPWvKAZevwIxPfmYjS/B0MiLXGiBke7/dScx1 vLYtx67sYy576j6LheZsY4jJFvhy6SO0e09PGrgDQtTMh77/y6iydDBsgUpFId3Mnn wQ9aBShRNuXIJTmVqNjEKwiiKUJOkSgP/CuAlSNdg2qkXrI4vk65K/6gjRomHcVLWv iD+R2DBWZe98rYjjWCT2FxvnqXf34mUeugGMzEKAfAeD/QPCSU8j1UDowJF3NytFzg OscKmvd1X815UcrTt1joQlcXBSkz/6siuDgRkK5YBaN9bRrHkaO654od4Go1XvKEhe Lsi/0Q3Gr6qFg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexandre Ghiti , Randy Dunlap , Palmer Dabbelt , Sasha Levin Subject: [PATCH 6.7 668/713] riscv: Fix compilation error with FAST_GUP and rv32 Date: Sun, 24 Mar 2024 18:46:34 -0400 Message-ID: <20240324224720.1345309-669-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Alexandre Ghiti [ Upstream commit 2bb7e0c49302feec1c2f777bbfe8726169986ed8 ] 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 Link: https://lore.kernel.org/r/20240304080247.387710-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- 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 76b131e7bbcad..a66845e31abad 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 /* -- 2.43.0