KVM: Fix order passed to iommu_unmap
[safe/jmp/linux-2.6] / arch / s390 / Makefile
index 189c8f3..30c5f01 100644 (file)
 # Copyright (C) 1994 by Linus Torvalds
 #
 
-ifdef CONFIG_ARCH_S390_31
+ifndef CONFIG_64BIT
+LD_BFD         := elf32-s390
 LDFLAGS                := -m elf_s390
-CFLAGS         += -m31
-AFLAGS         += -m31
+KBUILD_CFLAGS  += -m31
+KBUILD_AFLAGS  += -m31
 UTS_MACHINE    := s390
 STACK_SIZE     := 8192
-endif
-
-ifdef CONFIG_ARCH_S390X
+CHECKFLAGS     += -D__s390__ -msize-long
+else
+LD_BFD         := elf64-s390
 LDFLAGS                := -m elf64_s390
 MODFLAGS       += -fpic -D__PIC__
-CFLAGS         += -m64
-AFLAGS         += -m64
+KBUILD_CFLAGS  += -m64
+KBUILD_AFLAGS  += -m64
 UTS_MACHINE    := s390x
 STACK_SIZE     := 16384
+CHECKFLAGS     += -D__s390__ -D__s390x__
 endif
 
+export LD_BFD
+
 cflags-$(CONFIG_MARCH_G5)   += $(call cc-option,-march=g5)
 cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900)
 cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
+cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
+cflags-$(CONFIG_MARCH_Z10) += $(call cc-option,-march=z10)
+
+#KBUILD_IMAGE is necessary for make rpm
+KBUILD_IMAGE   :=arch/s390/boot/image
+
+#
+# Prevent tail-call optimizations, to get clearer backtraces:
+#
+cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls
 
 # old style option for packed stacks
 ifeq ($(call cc-option-yn,-mkernel-backchain),y)
@@ -58,49 +72,61 @@ endif
 
 ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y)
 cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
+ifneq ($(call cc-option-yn,-mstack-size=8192),y)
 cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
 endif
+endif
 
 ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
 cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack
 cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
 endif
 
-CFLAGS         += -mbackchain -msoft-float $(cflags-y)
-CFLAGS         += $(call cc-option,-finline-limit=10000)
-CFLAGS                 += -pipe -fno-strength-reduce -Wno-sign-compare 
-AFLAGS         += $(aflags-y)
+KBUILD_CFLAGS  += -mbackchain -msoft-float $(cflags-y)
+KBUILD_CFLAGS  += -pipe -fno-strength-reduce -Wno-sign-compare
+KBUILD_AFLAGS  += $(aflags-y)
 
 OBJCOPYFLAGS   := -O binary
 LDFLAGS_vmlinux := -e start
 
-head-$(CONFIG_ARCH_S390_31)    += arch/$(ARCH)/kernel/head.o
-head-$(CONFIG_ARCH_S390X)      += arch/$(ARCH)/kernel/head64.o
-head-y                         += arch/$(ARCH)/kernel/init_task.o
+head-y         := arch/s390/kernel/head.o
+head-y         += arch/s390/kernel/$(if $(CONFIG_64BIT),head64.o,head31.o)
+head-y         += arch/s390/kernel/init_task.o
+
+core-y         += arch/s390/mm/ arch/s390/kernel/ arch/s390/crypto/ \
+                  arch/s390/appldata/ arch/s390/hypfs/ arch/s390/kvm/
 
-core-y         += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ arch/$(ARCH)/crypto/ \
-                  arch/$(ARCH)/appldata/
-libs-y         += arch/$(ARCH)/lib/
+libs-y         += arch/s390/lib/
 drivers-y      += drivers/s390/
-drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
+drivers-$(CONFIG_MATHEMU) += arch/s390/math-emu/
 
 # must be linked after kernel
 drivers-$(CONFIG_OPROFILE)     += arch/s390/oprofile/
 
-boot           := arch/$(ARCH)/boot
+boot           := arch/s390/boot
 
-all: image
+all: image bzImage
 
 install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-image: vmlinux
+image bzImage: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+zfcpdump:
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
+vdso_install:
+ifeq ($(CONFIG_64BIT),y)
+       $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
+endif
+       $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@
+
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
 # Don't use tabs in echo arguments
 define archhelp
   echo  '* image           - Kernel image for IPL ($(boot)/image)'
+  echo '* bzImage         - Compressed kernel image for IPL ($(boot)/bzImage)'
 endef