From nobody Fri Dec 19 19:18:04 2025 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26B791F8682 for ; Wed, 8 Jan 2025 10:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.17.235.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736331607; cv=none; b=Gm6nE52xYRI/iHxaJ8GV6QFc53YmrZF7GLLrRUURNBgc0Ql/6m9aLktQ6uVNI1e0yP7Uhb6TQ743jYXTBTSbUltJQ3Bv6CFCH+MydKIVL05WOCq0KhKafKNLIcsf1w8fPHeq9X6jMuY4XiioydknzoAMsqLEH87wa3aCxDRP4EE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736331607; c=relaxed/simple; bh=u99myE4//kaq9eHNSUvrma04lP4z4ee74yUnWsUBWcE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DpVllKRV94uBQebOFeNk6V+1W7+RRMBuXuZ53oKoklr1pOIIFFUUc9MjSG3FjMezGGSsuFWiCaulHm9+LJdp0oiK1MBQq/hgNvH2XZLJFKS9o5mmqmBLuoJTihaZYhe/bR+mi5KBZpEVpp0wkcpWeJhIG11LjpHeLvUh00Vzs9o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass smtp.mailfrom=csgroup.eu; arc=none smtp.client-ip=93.17.235.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4YSkLJ1pJWz9sSC; Wed, 8 Jan 2025 11:14:48 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4_mbmxUtfb9A; Wed, 8 Jan 2025 11:14:48 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4YSkLJ13Myz9sS7; Wed, 8 Jan 2025 11:14:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 11C018B768; Wed, 8 Jan 2025 11:14:48 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id qMcQUhxvLles; Wed, 8 Jan 2025 11:14:48 +0100 (CET) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.235.99]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A1C9A8B767; Wed, 8 Jan 2025 11:14:47 +0100 (CET) From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin , Naveen N Rao , Madhavan Srinivasan Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kernel test robot Subject: [PATCH] powerpc/64s: Rewrite __real_pte() as a static inline Date: Wed, 8 Jan 2025 11:14:46 +0100 Message-ID: <06750dbc7bf961e3ea7ef7a89d5c220972465ea5.1736331264.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1736331286; l=1520; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=u99myE4//kaq9eHNSUvrma04lP4z4ee74yUnWsUBWcE=; b=Hd8TuFHwGMV72yXy2VT+umdz5+rIYpwocLoHRHicQU5ojGTPHYXCaZLFApRgKySJLWEAZ5K33 oEdLPAXyWH1BLLAYpA9tB2IhmLIPjUogjrgeuR5JBNOLsOXpIqFPKJn X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rewrite __real_pte() as a static inline in order to avoid following warning/error when building with 4k page size: CC arch/powerpc/mm/book3s64/hash_tlb.o arch/powerpc/mm/book3s64/hash_tlb.c: In function 'hpte_need_flush': arch/powerpc/mm/book3s64/hash_tlb.c:49:16: error: variable 'offset' set bu= t not used [-Werror=3Dunused-but-set-variable] 49 | int i, offset; | ^~~~~~ cc1: all warnings being treated as errors Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501081741.AYFwybsq-lkp@int= el.com/ Fixes: ff31e105464d ("powerpc/mm/hash64: Store the slot information at the = right offset for hugetlb") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash-4k.h b/arch/powerpc/in= clude/asm/book3s/64/hash-4k.h index c3efacab4b94..a7a68ba9c71b 100644 --- a/arch/powerpc/include/asm/book3s/64/hash-4k.h +++ b/arch/powerpc/include/asm/book3s/64/hash-4k.h @@ -77,7 +77,10 @@ /* * With 4K page size the real_pte machinery is all nops. */ -#define __real_pte(e, p, o) ((real_pte_t){(e)}) +static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset) +{ + return (real_pte_t){pte}; +} #define __rpte_to_pte(r) ((r).pte) #define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> H_PAGE_F_GIX= _SHIFT) =20 --=20 2.47.0