Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2403203lqp; Sun, 24 Mar 2024 18:03:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5VGmiAbNY0nDQxT6yaPst2/DFoHM/ioqCNMSC2MxHWdaUhFTTe+GUPJVS+kTwfcdHe0b73oklU9lX1rglIoUsgKAAfDpNmYR7WyTdiw== X-Google-Smtp-Source: AGHT+IGRXvPhMhI2n0N+L/Xxj5Uies+1xztjPPviE1+tK6cG90bFdTu0EOSeuLgobhi4Ug/roO4T X-Received: by 2002:a05:6808:191b:b0:3c3:bf18:6eaf with SMTP id bf27-20020a056808191b00b003c3bf186eafmr7912347oib.6.1711328622815; Sun, 24 Mar 2024 18:03:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328622; cv=pass; d=google.com; s=arc-20160816; b=xYG7wNVhLpGU3t69KbBrn/icu8FAYubFmogTV509TVRPUWmYiFvtpvffo2zFOrZEf6 dnKgEb0939bM6VSx5jR/Xd61pq2pvbx4VIB8IAMrbnFaLc75mwnfLDVg/qtecBdjoYnl RmtOdgeIYrlQPX/38Tutb4pPnBHJjaz62fnhC/GkTVZPDaCV1r+0AG/Gi8wwC0qXg/+N eCAvwjL22dokYwJrlSeXSl9n8+eKMICoy2WXwLYW//SHORcnh6ed9m3NHLAmwaW8OwNV w7SyAQRnh2j3tOF0Ni2dMK6/gNTL25KJuxNlXz5NWNuWc5RZLj2DOveXXI3vXfaiWcRZ VzaQ== 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=TEK+WkdduFWOPu4zx879gMOYoozIuAwU7rAHQT+v4YI=; fh=lNNH3f9fSql+g6zzFQQUlkubpRuVuX21tgRtirrDJ4Q=; b=K9WVIhfdu8I50WxTJ8aeX7lMSjn94Olf55rRSJfAquXXoENdHJouW61SkumpwAlm/I XctyqfFQ+uvxCAldbil7PJ4uHAtnxKUD1nzTBEBJrFeX0MzsIaWpl+xhKr9cbTsogx5L Rvlt+QlJ530e7klPoYMN6h9M4KtxbjUsyzTM4bIOXohYEv2810TMvEUkj5dRlNyoqH+h vkLbr3/7uSxHiCj472DFMATss1N5uDnupxMtVbKEc/uo1nOM5fJ2Pvn+xImiEz4i1mYB 7pqzcwF8j2Ntv0XQ9+sFpiHRbfzg4A6ftWPgpcIecAXwlypp07RZ+PDe17U2P1f0nLbo +uNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hl0oYw0y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113559-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113559-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 bv7-20020a05622a0a0700b00430b9d31340si4766388qtb.626.2024.03.24.18.03.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:03:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113559-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=@kernel.org header.s=k20201202 header.b=hl0oYw0y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113559-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113559-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 88E401C24A15 for ; Mon, 25 Mar 2024 01:03:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DCFA1C5ABB; Sun, 24 Mar 2024 22:46:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hl0oYw0y" 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 7DF921C4B04; Sun, 24 Mar 2024 22:46:01 +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=1711320361; cv=none; b=qETOlOtPc7qtNMNfIvvL7FbrL/jnLeCPt9EAS2UkNKSHezp886FD9nJZ6Nf4YWTCNUUSfbnKI7WwFFcBopn8xZO3VVDWYRInWPK/+DkCw1eWRdXm9kEfBhQIjiyPhpCp/IsBpFUdvHKtpwOYIj4TFRxbntHKOLueU/oV4Vee2Bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320361; c=relaxed/simple; bh=QSd/rPvy0AGEzL/3UhUypo+X8oPGOL0/YBA1xIlL6MU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=slb45JASWoX6jI5U24I86Ifu3+cERKEJW+Tu8ZKxvFxOc6MpQHZlD+DlKVXNu9GWIrOA13tY2w+vfp0DykWMm7WiACVugIhTokFrOEqHSUVVxYsyC2bzfFTf2AX0R54xZa/S2DKY5j/a4tdFvN/sGqOh8rVyWnIjY+JrMlbSDbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hl0oYw0y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A97A7C43399; Sun, 24 Mar 2024 22:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320361; bh=QSd/rPvy0AGEzL/3UhUypo+X8oPGOL0/YBA1xIlL6MU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hl0oYw0yci4LODvOZjXXvGiRY9sxToGfxKiq5yeBHPbkqmpR11rgRMyNccap0djpV TdB5HnK/hDmyh8QRNtLnYv4O+hY86f+Yfgk4lkrhKrTRDJ5fBat6TuySQynNljVle8 EQoVIcq9lmxb/gvjlHWEwH2Cac2Rw1fCo5FbbNaS48nrGNPiLnbEPT8DR26XnwErxO 5p9rsdkvyU17L2ynayZTDFRbp7omS+wp7gDdrxbkcRoHZYCgvNdU9nof8F/8wXP3Sj hb1qN0T+0sKrPTUGNLl+K9wxLs64EpXpFniq+hqWajmXQnnCvzGMAH7S9zMhNYzLgM 4jwT64EXFr6Lg== 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.8 668/715] riscv: Fix compilation error with FAST_GUP and rv32 Date: Sun, 24 Mar 2024 18:34:07 -0400 Message-ID: <20240324223455.1342824-669-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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 6066822e7396f..3422ced8a07fd 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