1*1b3edd97SPaul Mundt# 2*1b3edd97SPaul Mundt# Makefile for the Linux SuperH-specific parts of the memory manager. 3*1b3edd97SPaul Mundt# 4*1b3edd97SPaul Mundt 5*1b3edd97SPaul Mundtobj-y := cache.o init.o consistent.o mmap.o 6*1b3edd97SPaul Mundt 7*1b3edd97SPaul Mundtifndef CONFIG_CACHE_OFF 8*1b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH2) := cache-sh2.o 9*1b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH2A) := cache-sh2a.o 10*1b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH3) := cache-sh3.o 11*1b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH4) := cache-sh4.o flush-sh4.o 12*1b3edd97SPaul Mundtcacheops-$(CONFIG_CPU_SH5) := cache-sh5.o flush-sh4.o 13*1b3edd97SPaul Mundtcacheops-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o 14ac38e4d3SPaul Mundtendif 15*1b3edd97SPaul Mundt 16*1b3edd97SPaul Mundtobj-y += $(cacheops-y) 17*1b3edd97SPaul Mundt 18*1b3edd97SPaul Mundtmmu-y := nommu.o extable_32.o 19*1b3edd97SPaul Mundtmmu-$(CONFIG_MMU) := extable_$(BITS).o fault_$(BITS).o \ 20*1b3edd97SPaul Mundt ioremap_$(BITS).o kmap.o tlbflush_$(BITS).o 21*1b3edd97SPaul Mundt 22*1b3edd97SPaul Mundtobj-y += $(mmu-y) 23*1b3edd97SPaul Mundtobj-$(CONFIG_DEBUG_FS) += asids-debugfs.o 24*1b3edd97SPaul Mundt 25*1b3edd97SPaul Mundtifdef CONFIG_DEBUG_FS 26*1b3edd97SPaul Mundtobj-$(CONFIG_CPU_SH4) += cache-debugfs.o 27*1b3edd97SPaul Mundtendif 28*1b3edd97SPaul Mundt 29*1b3edd97SPaul Mundtifdef CONFIG_MMU 30*1b3edd97SPaul Mundttlb-$(CONFIG_CPU_SH3) := tlb-sh3.o 31*1b3edd97SPaul Mundttlb-$(CONFIG_CPU_SH4) := tlb-sh4.o 32*1b3edd97SPaul Mundttlb-$(CONFIG_CPU_SH5) := tlb-sh5.o 33*1b3edd97SPaul Mundttlb-$(CONFIG_CPU_HAS_PTEAEX) := tlb-pteaex.o 34*1b3edd97SPaul Mundtobj-y += $(tlb-y) 35*1b3edd97SPaul Mundtendif 36*1b3edd97SPaul Mundt 37*1b3edd97SPaul Mundtobj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 38*1b3edd97SPaul Mundtobj-$(CONFIG_PMB) += pmb.o 39*1b3edd97SPaul Mundtobj-$(CONFIG_PMB_FIXED) += pmb-fixed.o 40*1b3edd97SPaul Mundtobj-$(CONFIG_NUMA) += numa.o 41*1b3edd97SPaul Mundt 42*1b3edd97SPaul Mundt# Special flags for fault_64.o. This puts restrictions on the number of 43*1b3edd97SPaul Mundt# caller-save registers that the compiler can target when building this file. 44*1b3edd97SPaul Mundt# This is required because the code is called from a context in entry.S where 45*1b3edd97SPaul Mundt# very few registers have been saved in the exception handler (for speed 46*1b3edd97SPaul Mundt# reasons). 47*1b3edd97SPaul Mundt# The caller save registers that have been saved and which can be used are 48*1b3edd97SPaul Mundt# r2,r3,r4,r5 : argument passing 49*1b3edd97SPaul Mundt# r15, r18 : SP and LINK 50*1b3edd97SPaul Mundt# tr0-4 : allow all caller-save TR's. The compiler seems to be able to make 51*1b3edd97SPaul Mundt# use of them, so it's probably beneficial to performance to save them 52*1b3edd97SPaul Mundt# and have them available for it. 53*1b3edd97SPaul Mundt# 54*1b3edd97SPaul Mundt# The resources not listed below are callee save, i.e. the compiler is free to 55*1b3edd97SPaul Mundt# use any of them and will spill them to the stack itself. 56*1b3edd97SPaul Mundt 57*1b3edd97SPaul MundtCFLAGS_fault_64.o += -ffixed-r7 \ 58*1b3edd97SPaul Mundt -ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 \ 59*1b3edd97SPaul Mundt -ffixed-r13 -ffixed-r14 -ffixed-r16 -ffixed-r17 -ffixed-r19 \ 60*1b3edd97SPaul Mundt -ffixed-r20 -ffixed-r21 -ffixed-r22 -ffixed-r23 \ 61*1b3edd97SPaul Mundt -ffixed-r24 -ffixed-r25 -ffixed-r26 -ffixed-r27 \ 62*1b3edd97SPaul Mundt -ffixed-r36 -ffixed-r37 -ffixed-r38 -ffixed-r39 -ffixed-r40 \ 63*1b3edd97SPaul Mundt -ffixed-r41 -ffixed-r42 -ffixed-r43 \ 64*1b3edd97SPaul Mundt -ffixed-r60 -ffixed-r61 -ffixed-r62 \ 65*1b3edd97SPaul Mundt -fomit-frame-pointer 66*1b3edd97SPaul Mundt 67*1b3edd97SPaul MundtEXTRA_CFLAGS += -Werror 68