1 # SPDX-License-Identifier: GPL-2.0 << 2 # 1 # 3 # Makefile for the linux kernel. !! 2 # Makefile for the Linux/MIPS kernel. 4 # 3 # 5 4 6 ifdef CONFIG_PPC32 !! 5 extra-y := head.o vmlinux.lds 7 CFLAGS_prom_init.o += -fPIC << 8 CFLAGS_btext.o += -fPIC << 9 endif << 10 6 11 CFLAGS_early_32.o += $(DISABLE_LATENT_ENTROPY_ !! 7 obj-y += cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \ 12 CFLAGS_cputable.o += $(DISABLE_LATENT_ENTROPY_ !! 8 process.o prom.o ptrace.o reset.o setup.o signal.o \ 13 CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY !! 9 syscall.o time.o topology.o traps.o unaligned.o watch.o \ 14 CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLU !! 10 vdso.o cacheinfo.o 15 CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUG << 16 << 17 CFLAGS_prom_init.o += -fno-stack-protector << 18 CFLAGS_prom_init.o += -DDISABLE_BRANCH_PROFILI << 19 CFLAGS_prom_init.o += -ffreestanding << 20 CFLAGS_prom_init.o += $(call cc-option, -ftriv << 21 11 22 ifdef CONFIG_FUNCTION_TRACER 12 ifdef CONFIG_FUNCTION_TRACER 23 # Do not trace early boot code !! 13 CFLAGS_REMOVE_ftrace.o = -pg 24 CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE) !! 14 CFLAGS_REMOVE_early_printk.o = -pg 25 CFLAGS_REMOVE_prom_init.o = $(CC_FLAGS_FTRACE) !! 15 CFLAGS_REMOVE_perf_event.o = -pg 26 CFLAGS_REMOVE_btext.o = $(CC_FLAGS_FTRACE) !! 16 CFLAGS_REMOVE_perf_event_mipsxx.o = -pg 27 CFLAGS_REMOVE_prom.o = $(CC_FLAGS_FTRACE) !! 17 endif 28 endif !! 18 >> 19 obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o >> 20 obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o >> 21 obj-$(CONFIG_CEVT_DS1287) += cevt-ds1287.o >> 22 obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o >> 23 obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o >> 24 obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o >> 25 obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o >> 26 obj-$(CONFIG_CSRC_IOASIC) += csrc-ioasic.o >> 27 obj-$(CONFIG_CSRC_R4K) += csrc-r4k.o >> 28 obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o >> 29 obj-$(CONFIG_SYNC_R4K) += sync-r4k.o >> 30 >> 31 obj-$(CONFIG_DEBUG_FS) += segment.o >> 32 obj-$(CONFIG_STACKTRACE) += stacktrace.o >> 33 obj-$(CONFIG_MODULES) += module.o >> 34 obj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o >> 35 >> 36 obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o >> 37 obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o >> 38 >> 39 obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o >> 40 obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o >> 41 obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o >> 42 obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o >> 43 obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o 29 44 30 KASAN_SANITIZE_early_32.o := n !! 45 obj-$(CONFIG_SMP) += smp.o 31 KASAN_SANITIZE_cputable.o := n !! 46 obj-$(CONFIG_SMP_UP) += smp-up.o 32 KASAN_SANITIZE_prom_init.o := n !! 47 obj-$(CONFIG_CPU_BMIPS) += smp-bmips.o bmips_vec.o bmips_5xxx_init.o 33 KASAN_SANITIZE_btext.o := n << 34 KASAN_SANITIZE_paca.o := n << 35 KASAN_SANITIZE_setup_64.o := n << 36 KASAN_SANITIZE_mce.o := n << 37 KASAN_SANITIZE_mce_power.o := n << 38 KASAN_SANITIZE_udbg.o := n << 39 KASAN_SANITIZE_udbg_16550.o := n << 40 << 41 # we have to be particularly careful in ppc64 << 42 # runs with translations off, as we cannot acc << 43 # translations off. However, ppc32 can sanitiz << 44 ifdef CONFIG_PPC64 << 45 KASAN_SANITIZE_traps.o := n << 46 endif << 47 48 48 ifdef CONFIG_KASAN !! 49 obj-$(CONFIG_MIPS_MT) += mips-mt.o 49 CFLAGS_early_32.o += -DDISABLE_BRANCH_PROFILIN !! 50 obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o 50 CFLAGS_cputable.o += -DDISABLE_BRANCH_PROFILIN !! 51 obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o 51 CFLAGS_btext.o += -DDISABLE_BRANCH_PROFILING !! 52 obj-$(CONFIG_MIPS_CMP) += smp-cmp.o 52 endif !! 53 obj-$(CONFIG_MIPS_CPS) += smp-cps.o cps-vec.o >> 54 obj-$(CONFIG_MIPS_CPS_NS16550) += cps-vec-ns16550.o >> 55 obj-$(CONFIG_MIPS_SPRAM) += spram.o >> 56 >> 57 obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o >> 58 obj-$(CONFIG_MIPS_VPE_LOADER_CMP) += vpe-cmp.o >> 59 obj-$(CONFIG_MIPS_VPE_LOADER_MT) += vpe-mt.o >> 60 obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o >> 61 obj-$(CONFIG_MIPS_VPE_APSP_API_CMP) += rtlx-cmp.o >> 62 obj-$(CONFIG_MIPS_VPE_APSP_API_MT) += rtlx-mt.o >> 63 >> 64 obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o >> 65 obj-$(CONFIG_MIPS_MSC) += irq-msc01.o >> 66 obj-$(CONFIG_IRQ_TXX9) += irq_txx9.o >> 67 obj-$(CONFIG_IRQ_GT641XX) += irq-gt641xx.o 53 68 54 KCSAN_SANITIZE_early_32.o := n !! 69 obj-$(CONFIG_KPROBES) += kprobes.o 55 KCSAN_SANITIZE_cputable.o := n !! 70 obj-$(CONFIG_32BIT) += scall32-o32.o 56 KCSAN_SANITIZE_btext.o := n !! 71 obj-$(CONFIG_64BIT) += scall64-64.o 57 KCSAN_SANITIZE_paca.o := n !! 72 obj-$(CONFIG_MIPS32_COMPAT) += linux32.o ptrace32.o signal32.o 58 KCSAN_SANITIZE_setup_64.o := n !! 73 obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o 59 !! 74 obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o signal_o32.o 60 #ifdef CONFIG_RANDOMIZE_KSTACK_OFFSET << 61 # Remove stack protector to avoid triggering u << 62 # checks due to randomize_kstack_offset. << 63 CFLAGS_REMOVE_syscall.o = -fstack-protector -f << 64 CFLAGS_syscall.o += -fno-stack-protector << 65 #endif << 66 << 67 obj-y := cputable.o << 68 irq.o align << 69 process.o s << 70 signal.o sy << 71 prom.o trap << 72 udbg.o misc << 73 of_platform << 74 hw_breakpoi << 75 kdebugfs.o << 76 obj-y += ptrace/ << 77 obj-$(CONFIG_PPC64) += setup_64.o << 78 paca.o nvra << 79 obj-$(CONFIG_PPC32) += sys_ppc32.o << 80 obj-$(CONFIG_COMPAT) += sys_ppc32.o << 81 obj-$(CONFIG_VDSO32) += vdso32_wrap << 82 obj-$(CONFIG_PPC_WATCHDOG) += watchdog.o << 83 obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_ << 84 obj-$(CONFIG_PPC_DAWR) += dawr.o << 85 obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_p << 86 obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_p << 87 obj-$(CONFIG_PPC_BOOK3S_64) += dexcr.o << 88 obj-$(CONFIG_PPC_BOOK3S_64) += mce.o mce_p << 89 obj-$(CONFIG_PPC_BOOK3E_64) += exceptions- << 90 obj-$(CONFIG_PPC_BARRIER_NOSPEC) += security.o << 91 obj-$(CONFIG_PPC64) += vdso64_wrap << 92 obj-$(CONFIG_ALTIVEC) += vecemu.o << 93 obj-$(CONFIG_PPC_BOOK3S_IDLE) += idle_book3s << 94 procfs-y := proc_powerp << 95 obj-$(CONFIG_PROC_FS) += $(procfs-y) << 96 rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rta << 97 obj-$(CONFIG_PPC_RTAS) += rtas_entry. << 98 obj-$(CONFIG_PPC_RTAS_DAEMON) += rtasd.o << 99 obj-$(CONFIG_RTAS_FLASH) += rtas_flash. << 100 obj-$(CONFIG_RTAS_PROC) += rtas-proc.o << 101 obj-$(CONFIG_PPC_DT_CPU_FTRS) += dt_cpu_ftrs << 102 obj-$(CONFIG_EEH) += eeh.o eeh_pe << 103 eeh_driver.o << 104 obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync. << 105 obj-$(CONFIG_CRASH_DUMP) += crash_dump. << 106 obj-$(CONFIG_FA_DUMP) += fadump.o << 107 obj-$(CONFIG_PRESERVE_FA_DUMP) += fadump.o << 108 obj-$(CONFIG_PPC_85xx) += idle_85xx.o << 109 obj-$(CONFIG_PPC_BOOK3S_32) += idle_6xx.o << 110 obj-$(CONFIG_TAU) += tau_6xx.o << 111 obj-$(CONFIG_HIBERNATION) += swsusp.o su << 112 ifdef CONFIG_PPC_85xx << 113 obj-$(CONFIG_HIBERNATION) += swsusp_85xx << 114 else << 115 obj-$(CONFIG_HIBERNATION) += swsusp_$(BI << 116 endif << 117 obj64-$(CONFIG_HIBERNATION) += swsusp_asm6 << 118 obj-$(CONFIG_MODULES) += module.o mo << 119 obj-$(CONFIG_44x) += cpu_setup_4 << 120 obj-$(CONFIG_PPC_E500) += cpu_setup_e << 121 obj-$(CONFIG_PPC_DOORBELL) += dbell.o << 122 obj-$(CONFIG_JUMP_LABEL) += jump_label. << 123 75 124 obj-$(CONFIG_PPC64) += head_64.o !! 76 obj-$(CONFIG_KGDB) += kgdb.o 125 obj-$(CONFIG_PPC_BOOK3S_32) += head_book3s !! 77 obj-$(CONFIG_PROC_FS) += proc.o 126 obj-$(CONFIG_44x) += head_44x.o !! 78 obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o 127 obj-$(CONFIG_PPC_8xx) += head_8xx.o << 128 obj-$(CONFIG_PPC_85xx) += head_85xx.o << 129 extra-y += vmlinux.lds << 130 79 131 obj-$(CONFIG_RELOCATABLE) += reloc_$(BIT !! 80 obj-$(CONFIG_64BIT) += cpu-bugs64.o 132 81 133 obj-$(CONFIG_PPC32) += entry_32.o !! 82 obj-$(CONFIG_I8253) += i8253.o 134 obj-$(CONFIG_PPC64) += dma-iommu.o << 135 obj-$(CONFIG_KGDB) += kgdb.o << 136 obj-$(CONFIG_BOOTX_TEXT) += btext.o << 137 obj-$(CONFIG_SMP) += smp.o << 138 obj-$(CONFIG_KPROBES) += kprobes.o << 139 obj-$(CONFIG_OPTPROBES) += optprobes.o << 140 obj-$(CONFIG_KPROBES_ON_FTRACE) += kprobes-ftr << 141 obj-$(CONFIG_UPROBES) += uprobes.o << 142 obj-$(CONFIG_RETHOOK) += rethook.o << 143 obj-$(CONFIG_PPC_UDBG_16550) += legacy_seri << 144 obj-$(CONFIG_SWIOTLB) += dma-swiotlb << 145 obj-$(CONFIG_ARCH_HAS_DMA_SET_MASK) += dma-mas << 146 83 147 pci64-$(CONFIG_PPC64) += pci_dn.o pc !! 84 obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o 148 obj-$(CONFIG_PCI) += pci_$(BITS) << 149 pci-common. << 150 obj-$(CONFIG_PCI_MSI) += msi.o << 151 85 152 obj-$(CONFIG_AUDIT) += audit.o !! 86 obj-$(CONFIG_RELOCATABLE) += relocate.o 153 obj64-$(CONFIG_AUDIT) += compat_audi << 154 87 155 obj-$(CONFIG_PPC_IO_WORKAROUNDS) += io- !! 88 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o >> 89 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o >> 90 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o >> 91 obj-$(CONFIG_EARLY_PRINTK_8250) += early_printk_8250.o >> 92 obj-$(CONFIG_SPINLOCK_TEST) += spinlock_test.o >> 93 obj-$(CONFIG_MIPS_MACHINE) += mips_machine.o >> 94 obj-$(CONFIG_MIPSR2_TO_R6_EMULATOR) += mips-r2-to-r6-emul.o 156 95 157 obj-y += trace/ !! 96 CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -x c /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi) 158 97 159 ifneq ($(CONFIG_PPC_INDIRECT_PIO),y) !! 98 obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o 160 obj-y += iomap.o << 161 endif << 162 99 163 obj64-$(CONFIG_PPC_TRANSACTIONAL_MEM) += tm. !! 100 obj-$(CONFIG_PERF_EVENTS) += perf_event.o >> 101 obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_mipsxx.o 164 102 165 ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC_CORE)(CONF !! 103 obj-$(CONFIG_JUMP_LABEL) += jump_label.o 166 obj-y += ppc_save_re !! 104 obj-$(CONFIG_UPROBES) += uprobes.o 167 endif << 168 105 169 obj-$(CONFIG_EPAPR_PARAVIRT) += epapr_parav !! 106 obj-$(CONFIG_MIPS_CM) += mips-cm.o 170 obj-$(CONFIG_KVM_GUEST) += kvm.o kvm_e !! 107 obj-$(CONFIG_MIPS_CPC) += mips-cpc.o 171 ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM), !! 108 172 obj-y += ucall.o !! 109 obj-$(CONFIG_CPU_PM) += pm.o 173 endif !! 110 obj-$(CONFIG_MIPS_CPS_PM) += pm-cps.o 174 111 175 obj-$(CONFIG_PPC_SECURE_BOOT) += secure_boot !! 112 # 176 obj-$(CONFIG_PPC_SECVAR_SYSFS) += secvar-sysf !! 113 # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is not >> 114 # safe to unconditionnaly use the assembler -mdsp / -mdspr2 switches >> 115 # here because the compiler may use DSP ASE instructions (such as lwx) in >> 116 # code paths where we cannot check that the CPU we are running on supports it. >> 117 # Proper abstraction using HAVE_AS_DSP and macros is done in >> 118 # arch/mips/include/asm/mipsregs.h. >> 119 # >> 120 ifeq ($(CONFIG_CPU_MIPSR2), y) >> 121 CFLAGS_DSP = -DHAVE_AS_DSP 177 122 178 # Disable GCOV, KCOV & sanitizers in odd or se !! 123 CFLAGS_signal.o = $(CFLAGS_DSP) 179 GCOV_PROFILE_prom_init.o := n !! 124 CFLAGS_signal32.o = $(CFLAGS_DSP) 180 KCOV_INSTRUMENT_prom_init.o := n !! 125 CFLAGS_process.o = $(CFLAGS_DSP) 181 KCSAN_SANITIZE_prom_init.o := n !! 126 CFLAGS_branch.o = $(CFLAGS_DSP) 182 UBSAN_SANITIZE_prom_init.o := n !! 127 CFLAGS_ptrace.o = $(CFLAGS_DSP) 183 GCOV_PROFILE_kprobes.o := n !! 128 endif 184 KCOV_INSTRUMENT_kprobes.o := n << 185 KCSAN_SANITIZE_kprobes.o := n << 186 UBSAN_SANITIZE_kprobes.o := n << 187 GCOV_PROFILE_kprobes-ftrace.o := n << 188 KCOV_INSTRUMENT_kprobes-ftrace.o := n << 189 KCSAN_SANITIZE_kprobes-ftrace.o := n << 190 UBSAN_SANITIZE_kprobes-ftrace.o := n << 191 UBSAN_SANITIZE_vdso.o := n << 192 << 193 # Necessary for booting with kcov enabled on b << 194 KCOV_INSTRUMENT_cputable.o := n << 195 KCOV_INSTRUMENT_setup_64.o := n << 196 KCOV_INSTRUMENT_paca.o := n << 197 << 198 CFLAGS_setup_64.o += -fno-stack- << 199 CFLAGS_paca.o += -fno-stack- << 200 << 201 obj-$(CONFIG_PPC_FPU) += fpu.o << 202 obj-$(CONFIG_ALTIVEC) += vector.o << 203 << 204 obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_i << 205 obj64-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom << 206 extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom << 207 << 208 obj-$(CONFIG_PPC64) += $(obj64-y) << 209 obj-$(CONFIG_PPC32) += $(obj32-y) << 210 << 211 quiet_cmd_prom_init_check = PROMCHK $@ << 212 cmd_prom_init_check = $(CONFIG_SHELL) $< << 213 << 214 $(obj)/prom_init_check: $(src)/prom_init_check << 215 $(call if_changed,prom_init_check) << 216 targets += prom_init_check << 217 << 218 clean-files := vmlinux.lds << 219 << 220 # Force dependency (incbin is bad) << 221 $(obj)/vdso32_wrapper.o : $(obj)/vdso/vdso32.s << 222 $(obj)/vdso64_wrapper.o : $(obj)/vdso/vdso64.s << 223 129 224 # for cleaning !! 130 CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) 225 subdir- += vdso <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.