This allows for the 32bit ifdefary of ex_pf_user to be dropped without
suffering a warning in the 64bit build, while still allowing LTO to drop the
function.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
__page_aligned_bss \
__page_aligned_data \
__printf(x,y)= \
+ __maybe_unused \
__noinline \
__noreturn \
__used \
return hypercall_set_trap_table(ti);
}
-#ifdef __i386__
-static bool ex_pf_user(struct cpu_regs *regs, const struct extable_entry *ex)
+static bool __maybe_unused ex_pf_user(struct cpu_regs *regs,
+ const struct extable_entry *ex)
{
if ( regs->entry_vector == X86_EXC_PF && read_cr2() == 0xfff )
{
return false;
}
-#endif
void arch_init_traps(void)
{
#define __noreturn __attribute__((__noreturn__))
#define __packed __attribute__((__packed__))
#define __printf(f, v) __attribute__((__format__(__printf__, f, v)))
+#define __maybe_unused __attribute__((__unused__))
#define __used __attribute__((__used__))
#define __weak __attribute__((__weak__))