xref: /linux/arch/sh/mm/Makefile (revision d4f7e513234019a005c4d33477189f2a4e53bb9c)
11b3edd97SPaul Mundt#
21b3edd97SPaul Mundt# Makefile for the Linux SuperH-specific parts of the memory manager.
31b3edd97SPaul Mundt#
41b3edd97SPaul Mundt
5a99eae54SPaul Mundtobj-y			:= alignment.o cache.o init.o consistent.o mmap.o
61b3edd97SPaul Mundt
71b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH2)		:= cache-sh2.o
81b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH2A)		:= cache-sh2a.o
91b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH3)		:= cache-sh3.o
101b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH4)		:= cache-sh4.o flush-sh4.o
111b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH5)		:= cache-sh5.o flush-sh4.o
121b3edd97SPaul Mundtcacheops-$(CONFIG_SH7705_CACHE_32KB)	+= cache-sh7705.o
133cf6fa1eSPaul Mundtcacheops-$(CONFIG_CPU_SHX3)		+= cache-shx3.o
141b3edd97SPaul Mundt
151b3edd97SPaul Mundtobj-y			+= $(cacheops-y)
161b3edd97SPaul Mundt
171b3edd97SPaul Mundtmmu-y			:= nommu.o extable_32.o
18667b279bSPaul Mundtmmu-$(CONFIG_MMU)	:= extable_$(BITS).o fault_$(BITS).o gup.o \
190b59e38fSPaul Mundt			   ioremap.o kmap.o pgtable.o tlbflush_$(BITS).o
201b3edd97SPaul Mundt
211b3edd97SPaul Mundtobj-y			+= $(mmu-y)
221b3edd97SPaul Mundt
236ae66502SMatt Flemingdebugfs-y			:= asids-debugfs.o
246ae66502SMatt Flemingifndef CONFIG_CACHE_OFF
256ae66502SMatt Flemingdebugfs-$(CONFIG_CPU_SH4)	+= cache-debugfs.o
261b3edd97SPaul Mundtendif
271b3edd97SPaul Mundt
281b3edd97SPaul Mundtifdef CONFIG_MMU
296ae66502SMatt Flemingdebugfs-$(CONFIG_CPU_SH4)	+= tlb-debugfs.o
301b3edd97SPaul Mundttlb-$(CONFIG_CPU_SH3)		:= tlb-sh3.o
31bb29c677SPaul Mundttlb-$(CONFIG_CPU_SH4)		:= tlb-sh4.o tlb-urb.o
321b3edd97SPaul Mundttlb-$(CONFIG_CPU_SH5)		:= tlb-sh5.o
33bb29c677SPaul Mundttlb-$(CONFIG_CPU_HAS_PTEAEX)	:= tlb-pteaex.o tlb-urb.o
341b3edd97SPaul Mundtobj-y				+= $(tlb-y)
351b3edd97SPaul Mundtendif
361b3edd97SPaul Mundt
376ae66502SMatt Flemingobj-$(CONFIG_DEBUG_FS)		+= $(debugfs-y)
381b3edd97SPaul Mundtobj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
39a0ab3668SPaul Mundtobj-$(CONFIG_PMB)		+= pmb.o
401b3edd97SPaul Mundtobj-$(CONFIG_NUMA)		+= numa.o
414d35b93aSMatt Flemingobj-$(CONFIG_IOREMAP_FIXED)	+= ioremap_fixed.o
429edef286SPaul Mundtobj-$(CONFIG_UNCACHED_MAPPING)	+= uncached.o
43c993487eSPaul Mundtobj-$(CONFIG_HAVE_SRAM_POOL)	+= sram.o
441b3edd97SPaul Mundt
45*d4f7e513SChris SmithGCOV_PROFILE_pmb.o := n
46*d4f7e513SChris Smith
471b3edd97SPaul Mundt# Special flags for fault_64.o.  This puts restrictions on the number of
481b3edd97SPaul Mundt# caller-save registers that the compiler can target when building this file.
491b3edd97SPaul Mundt# This is required because the code is called from a context in entry.S where
501b3edd97SPaul Mundt# very few registers have been saved in the exception handler (for speed
511b3edd97SPaul Mundt# reasons).
521b3edd97SPaul Mundt# The caller save registers that have been saved and which can be used are
531b3edd97SPaul Mundt# r2,r3,r4,r5 : argument passing
541b3edd97SPaul Mundt# r15, r18 : SP and LINK
551b3edd97SPaul Mundt# tr0-4 : allow all caller-save TR's.  The compiler seems to be able to make
561b3edd97SPaul Mundt#         use of them, so it's probably beneficial to performance to save them
571b3edd97SPaul Mundt#         and have them available for it.
581b3edd97SPaul Mundt#
591b3edd97SPaul Mundt# The resources not listed below are callee save, i.e. the compiler is free to
601b3edd97SPaul Mundt# use any of them and will spill them to the stack itself.
611b3edd97SPaul Mundt
621b3edd97SPaul MundtCFLAGS_fault_64.o += -ffixed-r7 \
631b3edd97SPaul Mundt	-ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 \
641b3edd97SPaul Mundt	-ffixed-r13 -ffixed-r14 -ffixed-r16 -ffixed-r17 -ffixed-r19 \
651b3edd97SPaul Mundt	-ffixed-r20 -ffixed-r21 -ffixed-r22 -ffixed-r23 \
661b3edd97SPaul Mundt	-ffixed-r24 -ffixed-r25 -ffixed-r26 -ffixed-r27 \
671b3edd97SPaul Mundt	-ffixed-r36 -ffixed-r37 -ffixed-r38 -ffixed-r39 -ffixed-r40 \
681b3edd97SPaul Mundt	-ffixed-r41 -ffixed-r42 -ffixed-r43  \
691b3edd97SPaul Mundt	-ffixed-r60 -ffixed-r61 -ffixed-r62 \
701b3edd97SPaul Mundt	-fomit-frame-pointer
711b3edd97SPaul Mundt
72a234ca0fSmatt mooneyccflags-y := -Werror
73