mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 16:26:46 +07:00
7bf99fb673
Enable gcov profiling of the entire kernel on x86_64. Required changes include disabling profiling for: * arch/kernel/acpi/realmode and arch/kernel/boot/compressed: not linked to main kernel * arch/vdso, arch/kernel/vsyscall_64 and arch/kernel/hpet: profiling causes segfaults during boot (incompatible context) Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Huang Ying <ying.huang@intel.com> Cc: Li Wei <W.Li@Sun.COM> Cc: Michael Ellerman <michaele@au1.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com> Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: WANG Cong <xiyou.wangcong@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
60 lines
1.9 KiB
Makefile
60 lines
1.9 KiB
Makefile
#
|
|
# arch/x86/kernel/acpi/realmode/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
|
|
always := wakeup.bin
|
|
targets := wakeup.elf wakeup.lds
|
|
|
|
wakeup-y += wakeup.o wakemain.o video-mode.o copy.o bioscall.o regs.o
|
|
|
|
# The link order of the video-*.o modules can matter. In particular,
|
|
# video-vga.o *must* be listed first, followed by video-vesa.o.
|
|
# Hardware-specific drivers should follow in the order they should be
|
|
# probed, and video-bios.o should typically be last.
|
|
wakeup-y += video-vga.o
|
|
wakeup-y += video-vesa.o
|
|
wakeup-y += video-bios.o
|
|
|
|
targets += $(wakeup-y)
|
|
|
|
bootsrc := $(src)/../../../boot
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# How to compile the 16-bit code. Note we always compile for -march=i386,
|
|
# that way we can complain to the user if the CPU is insufficient.
|
|
# Compile with _SETUP since this is similar to the boot-time setup code.
|
|
KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
|
|
-I$(srctree)/$(bootsrc) \
|
|
$(cflags-y) \
|
|
-Wall -Wstrict-prototypes \
|
|
-march=i386 -mregparm=3 \
|
|
-include $(srctree)/$(bootsrc)/code16gcc.h \
|
|
-fno-strict-aliasing -fomit-frame-pointer \
|
|
$(call cc-option, -ffreestanding) \
|
|
$(call cc-option, -fno-toplevel-reorder,\
|
|
$(call cc-option, -fno-unit-at-a-time)) \
|
|
$(call cc-option, -fno-stack-protector) \
|
|
$(call cc-option, -mpreferred-stack-boundary=2)
|
|
KBUILD_CFLAGS += $(call cc-option, -m32)
|
|
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
|
GCOV_PROFILE := n
|
|
|
|
WAKEUP_OBJS = $(addprefix $(obj)/,$(wakeup-y))
|
|
|
|
LDFLAGS_wakeup.elf := -T
|
|
|
|
CPPFLAGS_wakeup.lds += -P -C
|
|
|
|
$(obj)/wakeup.elf: $(obj)/wakeup.lds $(WAKEUP_OBJS) FORCE
|
|
$(call if_changed,ld)
|
|
|
|
OBJCOPYFLAGS_wakeup.bin := -O binary
|
|
|
|
$(obj)/wakeup.bin: $(obj)/wakeup.elf FORCE
|
|
$(call if_changed,objcopy)
|