1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 214cf11afSPaul Mackerras# 314cf11afSPaul Mackerras# Makefile for ppc-specific library files.. 414cf11afSPaul Mackerras# 514cf11afSPaul Mackerras 61fbe9cf2SAnton Blanchardccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) 78555a002SAnton Blanchard 8f5668260SChristophe LeroyCFLAGS_code-patching.o += -fno-stack-protector 9f5668260SChristophe LeroyCFLAGS_feature-fixups.o += -fno-stack-protector 10f5668260SChristophe Leroy 119a7841aeSTorsten DuweCFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE) 129a7841aeSTorsten DuweCFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE) 13f1eecf0eSSteven Rostedt 14f072015cSChristophe LeroyKASAN_SANITIZE_code-patching.o := n 15f072015cSChristophe LeroyKASAN_SANITIZE_feature-fixups.o := n 165352090aSDaniel Axtens# restart_table.o contains functions called in the NMI interrupt path 175352090aSDaniel Axtens# which can be in real mode. Disable KASAN. 185352090aSDaniel AxtensKASAN_SANITIZE_restart_table.o := n 19f072015cSChristophe Leroy 20f072015cSChristophe Leroyifdef CONFIG_KASAN 21f072015cSChristophe LeroyCFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING 22f072015cSChristophe LeroyCFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING 23f072015cSChristophe Leroyendif 24f072015cSChristophe Leroy 25bba49665SChristophe LeroyCFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 26bba49665SChristophe LeroyCFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) 27bba49665SChristophe Leroy 28ff14a9c0SChristophe Leroyobj-y += alloc.o code-patching.o feature-fixups.o pmem.o 29baa25b57SNicholas Piggin 30f30a578dSChristophe Leroyobj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o 31f30a578dSChristophe Leroy 3226deb043SChristophe Leroyifndef CONFIG_KASAN 3326deb043SChristophe Leroyobj-y += string.o memcmp_$(BITS).o 3426deb043SChristophe Leroyobj-$(CONFIG_PPC32) += strlen_32.o 3526deb043SChristophe Leroyendif 3626deb043SChristophe Leroy 3726deb043SChristophe Leroyobj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o 38564ec2f2SMichael Ellerman 397cd01b08SNaveen N. Raoobj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o 407cd01b08SNaveen N. Rao 41efe0160cSNicholas Piggin# See corresponding test in arch/powerpc/Makefile 42efe0160cSNicholas Piggin# 64-bit linker creates .sfpr on demand for final link (vmlinux), 43efe0160cSNicholas Piggin# so it is only needed for modules, and only for older linkers which 44efe0160cSNicholas Piggin# do not support --save-restore-funcs 45052c805aSMasahiro Yamadaifeq ($(call ld-ifversion, -lt, 22500, y),y) 46efe0160cSNicholas Pigginextra-$(CONFIG_PPC64) += crtsavres.o 47efe0160cSNicholas Pigginendif 4840ef8cbcSPaul Mackerras 4915a3204dSNicholas Pigginobj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \ 504ebbbaa4SMichael Ellerman memcpy_power7.o restart_table.o 5115a3204dSNicholas Piggin 523448890cSAl Viroobj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \ 534ebbbaa4SMichael Ellerman memcpy_64.o copy_mc_64.o 541dcee55fSMichael Ellerman 55*9f61521cSNicholas Pigginifdef CONFIG_PPC_QUEUED_SPINLOCKS 56*9f61521cSNicholas Pigginobj-$(CONFIG_SMP) += qspinlock.o 57*9f61521cSNicholas Pigginelse 581dcee55fSMichael Ellermanobj64-$(CONFIG_SMP) += locks.o 59aa65ff6bSNicholas Pigginendif 60aa65ff6bSNicholas Piggin 611dcee55fSMichael Ellermanobj64-$(CONFIG_ALTIVEC) += vmx-helper.o 6284022ac1SSandipan Dasobj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o \ 6384022ac1SSandipan Das test_emulate_step_exec_instr.o 641dcee55fSMichael Ellerman 65f36bbf21SChristophe Leroyobj-y += checksum_$(BITS).o checksum_wrappers.o \ 6626deb043SChristophe Leroy string_$(BITS).o 677a332b0cSAnton Blanchard 683e3ebed3SChristophe Leroyobj-y += sstep.o 693e3ebed3SChristophe Leroyobj-$(CONFIG_PPC_FPU) += ldstfp.o 7031bfdb03SPaul Mackerrasobj64-y += quad.o 71f78541dcSPaul Mackerras 721088a209SSylvain Munautobj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o 73aaddd3eaSMichael Ellerman 74362e7701SMichael Ellermanobj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o 75ef1313deSAnton Blanchard 76f718d426SMatt Brownobj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o 771fb3f5a7SAnton BlanchardCFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec) 7804e85bbfSAlexey Dobriyan# Enable <altivec.h> 7904e85bbfSAlexey DobriyanCFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include) 801dcee55fSMichael Ellerman 811dcee55fSMichael Ellermanobj-$(CONFIG_PPC64) += $(obj64-y) 82