# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the linux arm-specific parts of the memory manager.
#
obj-y := extable.o fault.o init.o iomap.o
obj-y += dma-mapping$(MMUEXT).o
obj-$([31mCONFIG_MMU[0m) += fault-armv.o flush.o idmap.o ioremap.o \
mmap.o pgd.o mmu.o pageattr.o
ifneq ($([31mCONFIG_MMU[0m),y)
obj-y += nommu.o
obj-$([31mCONFIG_ARM_MPU[0m) += pmsa-v7.o pmsa-v8.o
endif
obj-$([31mCONFIG_ARM_PTDUMP_CORE[0m) += dump.o
obj-$([31mCONFIG_ARM_PTDUMP_DEBUGFS[0m) += ptdump_debugfs.o
obj-$([31mCONFIG_MODULES[0m) += proc-syms.o
obj-$([31mCONFIG_DEBUG_VIRTUAL[0m) += physaddr.o
obj-$([31mCONFIG_ALIGNMENT_TRAP[0m) += alignment.o
obj-$([31mCONFIG_HIGHMEM[0m) += highmem.o
obj-$([31mCONFIG_HUGETLB_PAGE[0m) += hugetlbpage.o
obj-$([31mCONFIG_ARM_PV_FIXUP[0m) += pv-fixup-asm.o
obj-$([31mCONFIG_CPU_ABRT_NOMMU[0m) += abort-nommu.o
obj-$([31mCONFIG_CPU_ABRT_EV4[0m) += abort-ev4.o
obj-$([31mCONFIG_CPU_ABRT_EV4T[0m) += abort-ev4t.o
obj-$([31mCONFIG_CPU_ABRT_LV4T[0m) += abort-lv4t.o
obj-$([31mCONFIG_CPU_ABRT_EV5T[0m) += abort-ev5t.o
obj-$([31mCONFIG_CPU_ABRT_EV5TJ[0m) += abort-ev5tj.o
obj-$([31mCONFIG_CPU_ABRT_EV6[0m) += abort-ev6.o
obj-$([31mCONFIG_CPU_ABRT_EV7[0m) += abort-ev7.o
AFLAGS_abort-ev6.o :=-Wa,-march=armv6k
AFLAGS_abort-ev7.o :=-Wa,-march=armv7-a
obj-$([31mCONFIG_CPU_PABRT_LEGACY[0m) += pabort-legacy.o
obj-$([31mCONFIG_CPU_PABRT_V6[0m) += pabort-v6.o
obj-$([31mCONFIG_CPU_PABRT_V7[0m) += pabort-v7.o
obj-$([31mCONFIG_CPU_CACHE_V4[0m) += cache-v4.o
obj-$([31mCONFIG_CPU_CACHE_V4WT[0m) += cache-v4wt.o
obj-$([31mCONFIG_CPU_CACHE_V4WB[0m) += cache-v4wb.o
obj-$([31mCONFIG_CPU_CACHE_V6[0m) += cache-v6.o
obj-$([31mCONFIG_CPU_CACHE_V7[0m) += cache-v7.o
obj-$([31mCONFIG_CPU_CACHE_FA[0m) += cache-fa.o
obj-$([31mCONFIG_CPU_CACHE_NOP[0m) += cache-nop.o
obj-$([31mCONFIG_CPU_CACHE_V7M[0m) += cache-v7m.o
AFLAGS_cache-v6.o :=-Wa,-march=armv6
AFLAGS_cache-v7.o :=-Wa,-march=armv7-a
AFLAGS_cache-v7m.o :=-Wa,-march=armv7-m
obj-$([31mCONFIG_CPU_COPY_V4WT[0m) += copypage-v4wt.o
obj-$([31mCONFIG_CPU_COPY_V4WB[0m) += copypage-v4wb.o
obj-$([31mCONFIG_CPU_COPY_FEROCEON[0m) += copypage-feroceon.o
obj-$([31mCONFIG_CPU_COPY_V6[0m) += copypage-v6.o context.o
obj-$([31mCONFIG_CPU_SA1100[0m) += copypage-v4mc.o
obj-$([31mCONFIG_CPU_XSCALE[0m) += copypage-xscale.o
obj-$([31mCONFIG_CPU_XSC3[0m) += copypage-xsc3.o
obj-$([31mCONFIG_CPU_COPY_FA[0m) += copypage-fa.o
CFLAGS_copypage-feroceon.o := -march=armv5te
obj-$([31mCONFIG_CPU_TLB_V4WT[0m) += tlb-v4.o
obj-$([31mCONFIG_CPU_TLB_V4WB[0m) += tlb-v4wb.o
obj-$([31mCONFIG_CPU_TLB_V4WBI[0m) += tlb-v4wbi.o
obj-$([31mCONFIG_CPU_TLB_FEROCEON[0m) += tlb-v4wbi.o # reuse v4wbi TLB functions
obj-$([31mCONFIG_CPU_TLB_V6[0m) += tlb-v6.o
obj-$([31mCONFIG_CPU_TLB_V7[0m) += tlb-v7.o
obj-$([31mCONFIG_CPU_TLB_FA[0m) += tlb-fa.o
AFLAGS_tlb-v6.o :=-Wa,-march=armv6
AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a
obj-$([31mCONFIG_CPU_ARM7TDMI[0m) += proc-arm7tdmi.o
obj-$([31mCONFIG_CPU_ARM720T[0m) += proc-arm720.o
obj-$([31mCONFIG_CPU_ARM740T[0m) += proc-arm740.o
obj-$([31mCONFIG_CPU_ARM9TDMI[0m) += proc-arm9tdmi.o
obj-$([31mCONFIG_CPU_ARM920T[0m) += proc-arm920.o
obj-$([31mCONFIG_CPU_ARM922T[0m) += proc-arm922.o
obj-$([31mCONFIG_CPU_ARM925T[0m) += proc-arm925.o
obj-$([31mCONFIG_CPU_ARM926T[0m) += proc-arm926.o
obj-$([31mCONFIG_CPU_ARM940T[0m) += proc-arm940.o
obj-$([31mCONFIG_CPU_ARM946E[0m) += proc-arm946.o
obj-$([31mCONFIG_CPU_FA526[0m) += proc-fa526.o
obj-$([31mCONFIG_CPU_ARM1020[0m) += proc-arm1020.o
obj-$([31mCONFIG_CPU_ARM1020E[0m) += proc-arm1020e.o
obj-$([31mCONFIG_CPU_ARM1022[0m) += proc-arm1022.o
obj-$([31mCONFIG_CPU_ARM1026[0m) += proc-arm1026.o
obj-$([31mCONFIG_CPU_SA110[0m) += proc-sa110.o
obj-$([31mCONFIG_CPU_SA1100[0m) += proc-sa1100.o
obj-$([31mCONFIG_CPU_XSCALE[0m) += proc-xscale.o
obj-$([31mCONFIG_CPU_XSC3[0m) += proc-xsc3.o
obj-$([31mCONFIG_CPU_MOHAWK[0m) += proc-mohawk.o
obj-$([31mCONFIG_CPU_FEROCEON[0m) += proc-feroceon.o
obj-$([31mCONFIG_CPU_V6[0m) += proc-v6.o
obj-$([31mCONFIG_CPU_V6K[0m) += proc-v6.o
obj-$([31mCONFIG_CPU_V7[0m) += proc-v7.o proc-v7-bugs.o
obj-$([31mCONFIG_CPU_V7M[0m) += proc-v7m.o
AFLAGS_proc-v6.o :=-Wa,-march=armv6
AFLAGS_proc-v7.o :=-Wa,-march=armv7-a
obj-$([31mCONFIG_OUTER_CACHE[0m) += l2c-common.o
obj-$([31mCONFIG_CACHE_B15_RAC[0m) += cache-b15-rac.o
obj-$([31mCONFIG_CACHE_FEROCEON_L2[0m) += cache-feroceon-l2.o
obj-$([31mCONFIG_CACHE_L2X0[0m) += cache-l2x0.o l2c-l2x0-resume.o
obj-$([31mCONFIG_CACHE_L2X0_PMU[0m) += cache-l2x0-pmu.o
obj-$([31mCONFIG_CACHE_XSC3L2[0m) += cache-xsc3l2.o
obj-$([31mCONFIG_CACHE_TAUROS2[0m) += cache-tauros2.o
obj-$([31mCONFIG_CACHE_UNIPHIER[0m) += cache-uniphier.o