]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sun, 12 Jan 2025 18:24:46 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:51 +0000 (12:50 +0100)
commit71f427413d2d0a9a6fe57abedec732ac9f3339be
tree41a183425c60b728b302932342a3f8e980161b1b
parent61a45806db4632998c71ced7287e38541d56eb2c
powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline

[ Upstream commit 61bcc752d1b81fde3cae454ff20c1d3c359df500 ]

Rewrite __real_pte() and __rpte_to_hidx() as static inline in order to
avoid following warnings/errors 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 but not used [-Werror=unused-but-set-variable]
   49 |         int i, offset;
      |                ^~~~~~

  CC      arch/powerpc/mm/book3s64/hash_native.o
arch/powerpc/mm/book3s64/hash_native.c: In function 'native_flush_hash_range':
arch/powerpc/mm/book3s64/hash_native.c:782:29: error: variable 'index' set but not used [-Werror=unused-but-set-variable]
  782 |         unsigned long hash, index, hidx, shift, slot;
      |                             ^~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501081741.AYFwybsq-lkp@intel.com/
Fixes: ff31e105464d ("powerpc/mm/hash64: Store the slot information at the right offset for hugetlb")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/e0d340a5b7bd478ecbf245d826e6ab2778b74e06.1736706263.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/book3s/64/hash-4k.h