From 52292c9b8c16aa9024a65aaeeca434bb8fec7d24 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 3 May 2005 15:34:58 +1000 Subject: [PATCH] ppc64: fix gcc 4.0 vs CONFIG_ALTIVEC gcc-4.0 generates altivec code implicitly when -mcpu indicates an altivec capable CPU which is not suitable for the kernel. However, we used to set -mcpu=970 when CONFIG_ALTIVEC was set because a gcc-3.x bug prevented from using -maltivec along with -mcpu=power4, thus prevented building the RAID6 altivec code. This patch fixes all of this by testing for the gcc version. If 4.0 or later, just normally use -mcpu=power4 and let the RAID6 code add -maltivec to the few files it needs to be compiled with altivec support. For 3.x, we still use -mcpu=970 to work around the above problem, which is fine as 3.x will never implicitly generate altivec code. The Makefile hackery may not be the most lovely, I welcome anybody more skilled than me to improve it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- arch/ppc64/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/ppc64') diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index d33e20b..691f300 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile @@ -56,13 +56,20 @@ LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ -mcall-aixdesc +GCC_VERSION := $(call cc-version) +GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) + ifeq ($(CONFIG_POWER4_ONLY),y) ifeq ($(CONFIG_ALTIVEC),y) +ifeq ($(GCC_BROKEN_VEC),y) CFLAGS += $(call cc-option,-mcpu=970) else CFLAGS += $(call cc-option,-mcpu=power4) endif else + CFLAGS += $(call cc-option,-mcpu=power4) +endif +else CFLAGS += $(call cc-option,-mtune=power4) endif -- cgit v1.1 From 5cae841b13f23ccdf7e38b2400b5cf57deb57ccf Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 4 May 2005 05:39:22 +0100 Subject: [PATCH] ISA DMA Kconfig fixes - part 1 A bunch of drivers use ISA DMA helpers or their equivalents for platforms that have ISA with different DMA controller (a lot of ARM boxen). Currently there is no way to put such dependency in Kconfig - CONFIG_ISA is not it (e.g. it is not set on platforms that have no ISA slots, but have on-board devices that pretend to be ISA ones). New symbol added - ISA_DMA_API. Set when we have functional enable_dma()/set_dma_mode()/etc. set of helpers. Next patches in the series will add missing dependencies for drivers that need them. I'm very carefully staying the hell out of the recurring flamefest on what exactly CONFIG_ISA would mean in ideal world - added symbol has a well-defined meaning and for now I really want to treat it as completely independent from the mess around CONFIG_ISA. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/ppc64/Kconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/ppc64') diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index ef1f05e..f5508ab 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig @@ -293,6 +293,9 @@ config SECCOMP endmenu +config ISA_DMA_API + bool + default y menu "General setup" -- cgit v1.1