mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
8f9e0a5281
The ACPICA code has been built with '-Os' since the beginning of git history, though there's no explanatory comment as to why. This is unfortunate as GCC drops the alignment specificed by '-falign-functions=N' when '-Os' is used, as reported in GCC bug 88345: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345 This prevents CONFIG_FUNCTION_ALIGNMENT and CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B from having their expected effect on the ACPICA code. This is doubly unfortunate as in subsequent patches arm64 will depend upon CONFIG_FUNCTION_ALIGNMENT for its ftrace implementation. Drop the '-Os' flag when building the ACPICA code. With this removed, the code builds cleanly and works correctly in testing so far. I've tested this by selecting CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y, building and booting a kernel using ACPI, and looking for misaligned text symbols: * arm64: Before, v6.2-rc3: # uname -rm 6.2.0-rc3 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 5009 Before, v6.2-rc3 + fixed __cold: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 919 After: # uname -rm 6.2.0-rc3-00002-g267bddc38572 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 323 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep acpi | wc -l 0 * x86_64: Before, v6.2-rc3: # uname -rm 6.2.0-rc3 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 11537 Before, v6.2-rc3 + fixed __cold: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 2805 After: # uname -rm 6.2.0-rc3-00002-g267bddc38572 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 1357 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep acpi | wc -l 0 With the patch applied, the remaining unaligned text labels are a combination of static call trampolines and labels in assembly, which can be dealt with in subsequent patches. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Florent Revest <revest@chromium.org> Cc: Len Brown <lenb@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Moore <robert.moore@intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Will Deacon <will@kernel.org> Cc: linux-acpi@vger.kernel.org Link: https://lore.kernel.org/r/20230123134603.1064407-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
213 lines
2.8 KiB
Makefile
213 lines
2.8 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for ACPICA Core interpreter
|
|
#
|
|
|
|
ccflags-y := -D_LINUX -DBUILDING_ACPICA
|
|
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
|
|
|
|
# use acpi.o to put all files here into acpi.o modparam namespace
|
|
obj-y += acpi.o
|
|
|
|
acpi-y := \
|
|
dsargs.o \
|
|
dscontrol.o \
|
|
dsdebug.o \
|
|
dsfield.o \
|
|
dsinit.o \
|
|
dsmethod.o \
|
|
dsmthdat.o \
|
|
dsobject.o \
|
|
dsopcode.o \
|
|
dspkginit.o \
|
|
dsutils.o \
|
|
dswexec.o \
|
|
dswload.o \
|
|
dswload2.o \
|
|
dswscope.o \
|
|
dswstate.o
|
|
|
|
acpi-y += \
|
|
evevent.o \
|
|
evgpe.o \
|
|
evgpeblk.o \
|
|
evgpeinit.o \
|
|
evgpeutil.o \
|
|
evglock.o \
|
|
evhandler.o \
|
|
evmisc.o \
|
|
evregion.o \
|
|
evrgnini.o \
|
|
evsci.o \
|
|
evxface.o \
|
|
evxfevnt.o \
|
|
evxfgpe.o \
|
|
evxfregn.o
|
|
|
|
acpi-y += \
|
|
exconcat.o \
|
|
exconfig.o \
|
|
exconvrt.o \
|
|
excreate.o \
|
|
exdebug.o \
|
|
exdump.o \
|
|
exfield.o \
|
|
exfldio.o \
|
|
exmisc.o \
|
|
exmutex.o \
|
|
exnames.o \
|
|
exoparg1.o \
|
|
exoparg2.o \
|
|
exoparg3.o \
|
|
exoparg6.o \
|
|
exprep.o \
|
|
exregion.o \
|
|
exresnte.o \
|
|
exresolv.o \
|
|
exresop.o \
|
|
exserial.o \
|
|
exstore.o \
|
|
exstoren.o \
|
|
exstorob.o \
|
|
exsystem.o \
|
|
extrace.o \
|
|
exutils.o
|
|
|
|
acpi-y += \
|
|
hwacpi.o \
|
|
hwesleep.o \
|
|
hwgpe.o \
|
|
hwregs.o \
|
|
hwsleep.o \
|
|
hwvalid.o \
|
|
hwxface.o \
|
|
hwxfsleep.o
|
|
|
|
acpi-$(CONFIG_PCI) += hwpci.o
|
|
acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
|
|
|
|
acpi-y += \
|
|
nsaccess.o \
|
|
nsalloc.o \
|
|
nsarguments.o \
|
|
nsconvert.o \
|
|
nsdump.o \
|
|
nseval.o \
|
|
nsinit.o \
|
|
nsload.o \
|
|
nsnames.o \
|
|
nsobject.o \
|
|
nsparse.o \
|
|
nspredef.o \
|
|
nsprepkg.o \
|
|
nsrepair.o \
|
|
nsrepair2.o \
|
|
nssearch.o \
|
|
nsutils.o \
|
|
nswalk.o \
|
|
nsxfeval.o \
|
|
nsxfname.o \
|
|
nsxfobj.o
|
|
|
|
acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
|
|
|
|
acpi-y += \
|
|
psargs.o \
|
|
psloop.o \
|
|
psobject.o \
|
|
psopcode.o \
|
|
psopinfo.o \
|
|
psparse.o \
|
|
psscope.o \
|
|
pstree.o \
|
|
psutils.o \
|
|
pswalk.o \
|
|
psxface.o
|
|
|
|
acpi-y += \
|
|
rsaddr.o \
|
|
rscalc.o \
|
|
rscreate.o \
|
|
rsdumpinfo.o \
|
|
rsinfo.o \
|
|
rsio.o \
|
|
rsirq.o \
|
|
rslist.o \
|
|
rsmemory.o \
|
|
rsmisc.o \
|
|
rsserial.o \
|
|
rsutils.o \
|
|
rsxface.o
|
|
|
|
acpi-y += \
|
|
tbdata.o \
|
|
tbfadt.o \
|
|
tbfind.o \
|
|
tbinstal.o \
|
|
tbprint.o \
|
|
tbutils.o \
|
|
tbxface.o \
|
|
tbxfload.o \
|
|
tbxfroot.o
|
|
|
|
acpi-y += \
|
|
utaddress.o \
|
|
utalloc.o \
|
|
utascii.o \
|
|
utbuffer.o \
|
|
utcksum.o \
|
|
utcopy.o \
|
|
utexcep.o \
|
|
utdebug.o \
|
|
utdecode.o \
|
|
utdelete.o \
|
|
uterror.o \
|
|
uteval.o \
|
|
utglobal.o \
|
|
uthex.o \
|
|
utids.o \
|
|
utinit.o \
|
|
utlock.o \
|
|
utmath.o \
|
|
utmisc.o \
|
|
utmutex.o \
|
|
utnonansi.o \
|
|
utobject.o \
|
|
utosi.o \
|
|
utownerid.o \
|
|
utpredef.o \
|
|
utresdecode.o \
|
|
utresrc.o \
|
|
utstate.o \
|
|
utstring.o \
|
|
utstrsuppt.o \
|
|
utstrtoul64.o \
|
|
utxface.o \
|
|
utxfinit.o \
|
|
utxferror.o \
|
|
utxfmutex.o
|
|
|
|
acpi-$(CONFIG_ACPI_DEBUGGER) += \
|
|
dbcmds.o \
|
|
dbconvert.o \
|
|
dbdisply.o \
|
|
dbexec.o \
|
|
dbhistry.o \
|
|
dbinput.o \
|
|
dbmethod.o \
|
|
dbnames.o \
|
|
dbobject.o \
|
|
dbstats.o \
|
|
dbutils.o \
|
|
dbxface.o \
|
|
rsdump.o \
|
|
|
|
acpi-$(ACPI_FUTURE_USAGE) += \
|
|
dbfileio.o \
|
|
dbtest.o \
|
|
utcache.o \
|
|
utprint.o \
|
|
uttrack.o \
|
|
utuuid.o
|
|
|