[PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled

David Laight David.Laight at ACULAB.COM
Tue Jun 25 02:27:13 EST 2013


> failure:
> __________
> static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) int
> __hash_page_thp(unsigned long ea, unsigned long access,
>       unsigned long vsid, pmd_t *pmdp,
>       unsigned long trap, int local,
>       int ssize, unsigned int psize)
> {
>  do { __asm__ __volatile__( "1: twi 31,0,0\n" ".section __bug_table,\"a\"\n" "2:\t" ".llong" " " "1b,
> %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" : : "i"
> ("/home/nfont/src/powerpc/arch/powerpc/include/asm/mmu-hash64.h"), "i" (353), "i" (0), "i"
> (sizeof(struct bug_entry))); do { } while (1); } while (0);
> }

Why isn't the "do { } while (1);" enough to stop the compiler
expecting the above to return?
I know I've added "for (;;);" in some code before now.
Disabling optimisations would be enough - but unlikely to be true.

	David



More information about the Linuxppc-dev mailing list