iommu/vt-d: Populate debugfs if IOMMUs are detected
[linux/fpc-iii.git] / arch / powerpc / kernel / Makefile
blob157b0147921f14b4f337a1ade8f20f941173a88f
1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for the linux kernel.
6 CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
8 ifdef CONFIG_PPC64
9 CFLAGS_prom_init.o += $(NO_MINIMAL_TOC)
10 endif
11 ifdef CONFIG_PPC32
12 CFLAGS_prom_init.o += -fPIC
13 CFLAGS_btext.o += -fPIC
14 endif
16 CFLAGS_cputable.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
17 CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
18 CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
19 CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
21 CFLAGS_prom_init.o += $(call cc-option, -fno-stack-protector)
22 CFLAGS_prom_init.o += -DDISABLE_BRANCH_PROFILING
23 CFLAGS_prom_init.o += -ffreestanding
25 ifdef CONFIG_FUNCTION_TRACER
26 # Do not trace early boot code
27 CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE)
28 CFLAGS_REMOVE_prom_init.o = $(CC_FLAGS_FTRACE)
29 CFLAGS_REMOVE_btext.o = $(CC_FLAGS_FTRACE)
30 CFLAGS_REMOVE_prom.o = $(CC_FLAGS_FTRACE)
31 endif
33 KASAN_SANITIZE_early_32.o := n
34 KASAN_SANITIZE_cputable.o := n
35 KASAN_SANITIZE_prom_init.o := n
36 KASAN_SANITIZE_btext.o := n
38 ifdef CONFIG_KASAN
39 CFLAGS_early_32.o += -DDISABLE_BRANCH_PROFILING
40 CFLAGS_cputable.o += -DDISABLE_BRANCH_PROFILING
41 CFLAGS_btext.o += -DDISABLE_BRANCH_PROFILING
42 endif
44 obj-y := cputable.o ptrace.o syscalls.o \
45 irq.o align.o signal_32.o pmc.o vdso.o \
46 process.o systbl.o idle.o \
47 signal.o sysfs.o cacheinfo.o time.o \
48 prom.o traps.o setup-common.o \
49 udbg.o misc.o io.o misc_$(BITS).o \
50 of_platform.o prom_parse.o
51 obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \
52 signal_64.o ptrace32.o \
53 paca.o nvram_64.o firmware.o note.o
54 obj-$(CONFIG_VDSO32) += vdso32/
55 obj-$(CONFIG_PPC_WATCHDOG) += watchdog.o
56 obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
57 obj-$(CONFIG_PPC_DAWR) += dawr.o
58 obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o
59 obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_power.o
60 obj-$(CONFIG_PPC_BOOK3S_64) += mce.o mce_power.o
61 obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o
62 obj-$(CONFIG_PPC_BARRIER_NOSPEC) += security.o
63 obj-$(CONFIG_PPC64) += vdso64/
64 obj-$(CONFIG_ALTIVEC) += vecemu.o
65 obj-$(CONFIG_PPC_970_NAP) += idle_power4.o
66 obj-$(CONFIG_PPC_P7_NAP) += idle_book3s.o
67 procfs-y := proc_powerpc.o
68 obj-$(CONFIG_PROC_FS) += $(procfs-y)
69 rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o
70 obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y)
71 obj-$(CONFIG_PPC_RTAS_DAEMON) += rtasd.o
72 obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
73 obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
74 obj-$(CONFIG_PPC_DT_CPU_FTRS) += dt_cpu_ftrs.o
75 obj-$(CONFIG_EEH) += eeh.o eeh_pe.o eeh_dev.o eeh_cache.o \
76 eeh_driver.o eeh_event.o eeh_sysfs.o
77 obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
78 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
79 obj-$(CONFIG_FA_DUMP) += fadump.o
80 obj-$(CONFIG_PRESERVE_FA_DUMP) += fadump.o
81 ifdef CONFIG_PPC32
82 obj-$(CONFIG_E500) += idle_e500.o
83 endif
84 obj-$(CONFIG_PPC_BOOK3S_32) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
85 obj-$(CONFIG_TAU) += tau_6xx.o
86 obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
87 ifdef CONFIG_FSL_BOOKE
88 obj-$(CONFIG_HIBERNATION) += swsusp_booke.o
89 else
90 obj-$(CONFIG_HIBERNATION) += swsusp_$(BITS).o
91 endif
92 obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o
93 obj-$(CONFIG_MODULES) += module.o module_$(BITS).o
94 obj-$(CONFIG_44x) += cpu_setup_44x.o
95 obj-$(CONFIG_PPC_FSL_BOOK3E) += cpu_setup_fsl_booke.o
96 obj-$(CONFIG_PPC_DOORBELL) += dbell.o
97 obj-$(CONFIG_JUMP_LABEL) += jump_label.o
99 extra-y := head_$(BITS).o
100 extra-$(CONFIG_40x) := head_40x.o
101 extra-$(CONFIG_44x) := head_44x.o
102 extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o
103 extra-$(CONFIG_PPC_8xx) := head_8xx.o
104 extra-y += vmlinux.lds
106 obj-$(CONFIG_RELOCATABLE) += reloc_$(BITS).o
108 obj-$(CONFIG_PPC32) += entry_32.o setup_32.o early_32.o
109 obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o
110 obj-$(CONFIG_KGDB) += kgdb.o
111 obj-$(CONFIG_BOOTX_TEXT) += btext.o
112 obj-$(CONFIG_SMP) += smp.o
113 obj-$(CONFIG_KPROBES) += kprobes.o
114 obj-$(CONFIG_OPTPROBES) += optprobes.o optprobes_head.o
115 obj-$(CONFIG_KPROBES_ON_FTRACE) += kprobes-ftrace.o
116 obj-$(CONFIG_UPROBES) += uprobes.o
117 obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o
118 obj-$(CONFIG_STACKTRACE) += stacktrace.o
119 obj-$(CONFIG_SWIOTLB) += dma-swiotlb.o
120 obj-$(CONFIG_ARCH_HAS_DMA_SET_MASK) += dma-mask.o
122 pci64-$(CONFIG_PPC64) += pci_dn.o pci-hotplug.o isa-bridge.o
123 obj-$(CONFIG_PCI) += pci_$(BITS).o $(pci64-y) \
124 pci-common.o pci_of_scan.o
125 obj-$(CONFIG_PCI_MSI) += msi.o
127 obj-$(CONFIG_AUDIT) += audit.o
128 obj64-$(CONFIG_AUDIT) += compat_audit.o
130 obj-$(CONFIG_PPC_IO_WORKAROUNDS) += io-workarounds.o
132 obj-y += trace/
134 ifneq ($(CONFIG_PPC_INDIRECT_PIO),y)
135 obj-y += iomap.o
136 endif
138 obj64-$(CONFIG_PPC_TRANSACTIONAL_MEM) += tm.o
140 obj-$(CONFIG_PPC64) += $(obj64-y)
141 obj-$(CONFIG_PPC32) += $(obj32-y)
143 ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC_CORE)(CONFIG_PPC_BOOK3S),)
144 obj-y += ppc_save_regs.o
145 endif
147 obj-$(CONFIG_EPAPR_PARAVIRT) += epapr_paravirt.o epapr_hcalls.o
148 obj-$(CONFIG_KVM_GUEST) += kvm.o kvm_emul.o
149 ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM),)
150 obj-y += ucall.o
151 endif
153 obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot.o ima_arch.o secvar-ops.o
154 obj-$(CONFIG_PPC_SECVAR_SYSFS) += secvar-sysfs.o
156 # Disable GCOV, KCOV & sanitizers in odd or sensitive code
157 GCOV_PROFILE_prom_init.o := n
158 KCOV_INSTRUMENT_prom_init.o := n
159 UBSAN_SANITIZE_prom_init.o := n
160 GCOV_PROFILE_kprobes.o := n
161 KCOV_INSTRUMENT_kprobes.o := n
162 UBSAN_SANITIZE_kprobes.o := n
163 GCOV_PROFILE_kprobes-ftrace.o := n
164 KCOV_INSTRUMENT_kprobes-ftrace.o := n
165 UBSAN_SANITIZE_kprobes-ftrace.o := n
166 UBSAN_SANITIZE_vdso.o := n
168 # Necessary for booting with kcov enabled on book3e machines
169 KCOV_INSTRUMENT_cputable.o := n
170 KCOV_INSTRUMENT_setup_64.o := n
171 KCOV_INSTRUMENT_paca.o := n
173 extra-$(CONFIG_PPC_FPU) += fpu.o
174 extra-$(CONFIG_ALTIVEC) += vector.o
175 extra-$(CONFIG_PPC64) += entry_64.o
176 extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
178 extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
180 quiet_cmd_prom_init_check = PROMCHK $@
181 cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" $(obj)/prom_init.o; touch $@
183 $(obj)/prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o FORCE
184 $(call if_changed,prom_init_check)
185 targets += prom_init_check
187 clean-files := vmlinux.lds