Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1689894lqg; Mon, 4 Mar 2024 00:03:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXH1pTez7R4VnFDr52E1kREEZOgJyfn+yUHu3oVC7UAK0wqkC7zWDpsSb9e/86X11Phztive/AdrOBJvEhnOGXLnLJ60dUVBzwWnQtYug== X-Google-Smtp-Source: AGHT+IEPTkd73SVaOOy2/O+eXqr4d6tM5tz/dyOmVtTKzvBS+UkySXIP1H8Ey/DDlURce53o4ms4 X-Received: by 2002:a05:6a20:a78a:b0:1a1:4957:ec19 with SMTP id bx10-20020a056a20a78a00b001a14957ec19mr2161346pzb.62.1709539380307; Mon, 04 Mar 2024 00:03:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709539380; cv=pass; d=google.com; s=arc-20160816; b=IEUzZeFEcjNakWeMhRlSQO/vDw8TTa9u+bi5+z+gJSv4C/2rr+PcIGrd11E0FOhsVo DwIwc5xD2aFZx+1uL64IBa/+G8Kyp00TUoobQYclwS7unvHlMsobIbiCFYSImhj1nmLQ QsTdCPN/wsgIo3IPdP2vRWvhgIqmIf3nDM3yDEkmhzClhz9MYNpBcqBLKptD73heoHQ7 Weql3UDVFubIvkA4vDcwugTeSPLR5f6WMZzJmv1J6/HlYl0Q4t/+OUTWoQUG2pLSjORs v+oGNWFWcoNWPPFZxgBTaDHda+1mSmtT/XgI9HznRG0qWv+T7DuwOVGHW/nIvd8tPypV pf3A== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=gtlvrgqpZklQkEKYnLjgHRVt/fow+xyugZpWWHGtqds=; fh=o7dSQpe22o6NS78rIjgvx+B5GuqkurprcPR8fzXHJoY=; b=pxXXh+Q52eI/JSS8wUks2TaZ+ZcLtst5ogpIeechboQ/fFOIeeKyzyNah6T5lPCOwh GnmoN6kimvzPD5Zs13WFqZrOKR1O4hkvDv8FGbRZMrJWoChyWzGDJtvwylkyPR2KrTsV AW95z7zOZlLeTuDpUaAKig/Ewy0EKpqOK/6Qlt5uwa6rpvQvpiLvgaQHSnSshkG+wReU lbm0cCB6ZLiV24qT5DbZxhIQHG3YZ2lwENLNoN1kOtuzXVXxp/eegOroaYWMHqzTS1B/ ZVvSTTXHaMX3bx/1rtc/IK+iKI1BmOuH1r62upemB+CL3NI5MTMxfh7itvVpeT38E0b8 EYdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="a47X/CRM"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-90162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90162-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k3-20020aa788c3000000b006e5a081ba3csi7319041pff.366.2024.03.04.00.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 00:03:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="a47X/CRM"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-90162-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90162-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 01E3C2823C4 for ; Mon, 4 Mar 2024 08:03:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 148F9171A2; Mon, 4 Mar 2024 08:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="a47X/CRM" Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DF9B134AD for ; Mon, 4 Mar 2024 08:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709539374; cv=none; b=fhHlUdEvBHlZlhL23Iu1PqXAnQwfE6HjDQ6p7XOC72wAJM+Pw3thzC/GqOrkMcSBUjUmGQfVpCpf4JqmFGxz7v6hA1mFphJNlwHmrXjfWCd2ZI828EggvUKQkQbhw1zmQTGTHuT9+g7ASi/f4Gf4cM9zUJ1F86bCBvmdtyJxEuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709539374; c=relaxed/simple; bh=dKwN8A7GUBExPlqO9KJL6ingVu5qBoz2pvjqaMOQanc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DZmTxx69nYczrf/Xryy1tcLX+vqWxvCdXMzS0T6qtzGom1OYpfZX05XhXjR1CbGx+zJJJc2Jj+w0Ci1XtnktimIX9zy9xR91H5AFnN7ugURVph5yhpPWzEexO5fKsyq8xs/54kEE+jDuLbtJbg79rg+e2PoCr9e62xEIMsFiSTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=a47X/CRM; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d220e39907so62142111fa.1 for ; Mon, 04 Mar 2024 00:02:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1709539369; x=1710144169; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gtlvrgqpZklQkEKYnLjgHRVt/fow+xyugZpWWHGtqds=; b=a47X/CRMe1pwSH3l8D0X5us3ht9a0zWRkiQEQ2HaODeydmcTp7I4j4BTwFjMRYwWhp r2iurDox9mt+qv1v354sbpRjCZNMOJEF6uwPlx6grTouGduuCRwljFT5hUzQ/i2/5YiT QHNMkzkGKTG7ipn8zYcrQERiAzcapuFTqdHXXTVzcvfMin18CZLnyzmHvPDQ/d7ILDd/ 8fS6awIQDy/7cFbTS6UPA2xyeF0J2BR5viDoIbNB2JPvSJYEkr10G1rmqa0CxJDSe06W 1Vv5YQFtI4kBuHFFn4zbbGr5XGXEkoY3JxMHda5C1ubi1DYmCf6ttAmeqRS/pbgsyyXb phyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709539369; x=1710144169; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gtlvrgqpZklQkEKYnLjgHRVt/fow+xyugZpWWHGtqds=; b=iVpMKTh5AHCZFbGaV9ZFFESGeGJQkEOf8oqNOt43ABrOV5BweyLuZVIMnNcL1wMUjj 9ZBwBUKnJGqvRsCsS64ns7LEdShtS8FYt/oyKzOY7T5a7dxb7NiNY/avoF1sLAapBvdb DVKlhdHQ5wBZECr1I40hEmTTzwVnij7bAGyevFGJPHJoOmF97EKzgCpF7TZwEp45mSdP IVBcVHxfO+xTjOBcYyOdOOmOTsdEdiCqD2mvR0VSq8Danfx5efLEPEJFmYIVnXY8pDy5 oZk/x/dOnYrP3UzyGFYHpYH1cwVX5ozlBaL38IShwdK1gty4uVtYPTpULcaRiQiFuhnL LyXw== X-Forwarded-Encrypted: i=1; AJvYcCU5pKzGILnrrSjWKdFXoEDEtvySh7it+3cyNluDTRTlnViZvmXV4ceSLDv7YHmtap7ctznYvhSYaTnainO7oMzhnn6GKYEbf/rZtdRq X-Gm-Message-State: AOJu0YxKaX32mXQjpS32IUmJkROojsTpBs5GUxB48ynYNwOe1uQWhE/u JWNH6hHPEHMYROksY0w5ENZiJQh5C/2R0hFjyZ//b5OBC+M7hJY/44l5oGf/IW0= X-Received: by 2002:a2e:958b:0:b0:2d2:7e19:f6 with SMTP id w11-20020a2e958b000000b002d27e1900f6mr6052452ljh.23.1709539369591; Mon, 04 Mar 2024 00:02:49 -0800 (PST) Received: from alex-rivos.home (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id p3-20020a5d4583000000b0033b47ee01f1sm11442472wrq.49.2024.03.04.00.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 00:02:49 -0800 (PST) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Randy Dunlap , Stephen Rothwell , Linux Next Mailing List , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH] riscv: Fix compilation error with FAST_GUP and rv32 Date: Mon, 4 Mar 2024 09:02:47 +0100 Message-Id: <20240304080247.387710-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 /* -- 2.39.2