linux/arch/powerpc/include/asm/book3s/64
Christophe Leroy 61bcc752d1 powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline
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: ff31e10546 ("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
2025-02-10 10:01:22 +05:30
..
hash-4k.h powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline 2025-02-10 10:01:22 +05:30
hash-64k.h powerpc/mm/book3s64/hash/4k: Add pmd_same callback for 4K page size 2023-07-10 09:47:47 +10:00
hash-pkey.h powerpc/kuap: MMU_FTR_BOOK3S_KUAP becomes MMU_FTR_KUAP 2023-08-02 22:22:18 +10:00
hash.h powerpc/64s: use contiguous PMD/PUD instead of HUGEPD 2024-07-12 15:52:19 -07:00
hugetlb.h powerpc/64s: use contiguous PMD/PUD instead of HUGEPD 2024-07-12 15:52:19 -07:00
kexec.h powerpc/dexcr: Add initial Dynamic Execution Control Register (DEXCR) support 2023-06-19 17:36:25 +10:00
kup.h powerpc/kuap: KUAP enabling/disabling functions must be __always_inline 2023-08-02 22:22:18 +10:00
mmu-hash.h
mmu.h powerpc/mm: Cleanup memory block size probing 2023-08-18 17:03:15 +10:00
pgalloc.h powerpc/64s: Enable KFENCE on book3s64 2022-09-28 19:22:10 +10:00
pgtable-64k.h powerpc/64s: use contiguous PMD/PUD instead of HUGEPD 2024-07-12 15:52:19 -07:00
pgtable.h ALong with the usual shower of singleton patches, notable patch series in 2024-09-21 07:29:05 -07:00
pkeys.h
radix-4k.h
radix-64k.h
radix.h powerpc: Refactor __kernel_map_pages() 2024-03-03 22:18:45 +11:00
slice.h
tlbflush-hash.h powerpc/mm: Remove flush_all_mm, local_flush_all_mm 2022-11-30 21:46:49 +11:00
tlbflush-radix.h powerpc/book3s64/mm: enable transparent pud hugepage 2023-08-18 10:12:55 -07:00
tlbflush.h powerpc/book3s64: Avoid __pte_protnone() check in __pte_flags_need_flush() 2023-12-07 23:34:11 +11:00