mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
objtool found cases where ACPI methods called out into instrumentation code: vmlinux.o: warning: objtool: io_idle+0xc: call to __inb.isra.0() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter+0xfe: call to num_online_cpus() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter+0x115: call to acpi_idle_fallback_to_c1.isra.0() leaves .noinstr.text section Fix this by: marking the IO in/out, acpi_idle_fallback_to_c1() and num_online_cpus() methods as __always_inline. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20230112195541.294846301@infradead.org
34 lines
740 B
C
34 lines
740 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_SHARED_IO_H
|
|
#define _ASM_X86_SHARED_IO_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#define BUILDIO(bwl, bw, type) \
|
|
static __always_inline void __out##bwl(type value, u16 port) \
|
|
{ \
|
|
asm volatile("out" #bwl " %" #bw "0, %w1" \
|
|
: : "a"(value), "Nd"(port)); \
|
|
} \
|
|
\
|
|
static __always_inline type __in##bwl(u16 port) \
|
|
{ \
|
|
type value; \
|
|
asm volatile("in" #bwl " %w1, %" #bw "0" \
|
|
: "=a"(value) : "Nd"(port)); \
|
|
return value; \
|
|
}
|
|
|
|
BUILDIO(b, b, u8)
|
|
BUILDIO(w, w, u16)
|
|
BUILDIO(l, , u32)
|
|
#undef BUILDIO
|
|
|
|
#define inb __inb
|
|
#define inw __inw
|
|
#define inl __inl
|
|
#define outb __outb
|
|
#define outw __outw
|
|
#define outl __outl
|
|
|
|
#endif
|