From patchwork Wed Apr 10 20:12:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162041 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp6619672jan; Wed, 10 Apr 2019 13:13:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBWTPaE05Tqa191XKsCXAFHuzp+eAuAJGC2d8+aDbYMgPiOYE2KTYwPT8oEhzGl2Js8pui X-Received: by 2002:a63:3dca:: with SMTP id k193mr41801100pga.146.1554927197062; Wed, 10 Apr 2019 13:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554927197; cv=none; d=google.com; s=arc-20160816; b=QMAraRVDXOHO+k3D/7ucchLXoOb7OfcUBOQMaZyh9o7wZOuh9UZsb1i1sps5vA3SxR E5L9ZyIUUf7TtxeODUI5VVp1vaXnaC5s3BcbtlkzDwwr2cyP5liYI/pHCf/hQDp/Osyn gt+NNyEiZrrHtj/oOFTYznZ8IWx0Qa++dZntJrJpr1eXjqkJjNmQiCsPpxwI9ZirI01d qfR4p1AE3XAhB8QE2aS2Dz2ihbR+hETpK7ZaeOUl5A1hITtGL7tTXP1nMZ5cpUkQDJ44 GLAH3UrC2Vd5+TwDsxe3zprz0xP2EeSMH7jnUh/Ku37B/Tsm7exHwKmP6qGoKbIxEMQA Kvxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kPt2XsEyCbPmbn9i6ATxC31Z5Dt7T6jbUbdP6EqoOpg=; b=MqBKhTafPdopPIOorMI8lSsXODzlh9NhwE8c39D1N9iZXTwa4VlndQVj8PUUbAVOkL IpJM0nRmvyayhb1dISdaKKkRvieR+sOx11T8ZvHQk2yasRm4OxcGhDdX7xv6Z31S6zI/ VwMh1sW3iQkwNKYgBPJ6CC4yxF7xxmTkwz3fgY5EA+/HaLP2Amt9GVcl1LmD0WAuCBEs Vhwb3OJFhQEJI41eDqwwQV+h7SDEcsn8pyPV3K6vVS6slE9J4BrRZ/VGldODuawY+E8L Mqyly20FbyjzXZUKMiWYan8SgoD+wZmx4JgVg7G8CeEbWJ8xmkZK366vmIjq9MGfZC8y l1mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si31822718pgp.391.2019.04.10.13.13.16; Wed, 10 Apr 2019 13:13:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbfDJUNP (ORCPT + 31 others); Wed, 10 Apr 2019 16:13:15 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:36257 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfDJUNO (ORCPT ); Wed, 10 Apr 2019 16:13:14 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MlNYj-1gTSBm1LDx-00lmDM; Wed, 10 Apr 2019 22:13:03 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Vasily Gorbik Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , Philipp Rudo , Tony Krowiak , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] s390: only build for new CPUs with clang Date: Wed, 10 Apr 2019 22:12:40 +0200 Message-Id: <20190410201300.3528984-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:YFRyT6qgQvR+qhv9mS8yRRrUceXDy65GVtgAlXxGmTGhW0mDZ+G sI/5jMlMr9MwxKef2jS8TKnJ35YjTPZiEl5+ul6LZtq5sYpgcpjtrdmOGN+kYg5Yf5+YfpG +w2AA30VLJNmhdTbBnuHrUJ4K5zwSGeU5ZShR3lWtHUZJuPOjblN5alLhDr6d0JDiD1uz6b GgBiBUG+OU4uh4bsgH7Bw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:jjrGWuM0PD8=:IlJsEhIuRgSxnbYHMlwwo0 nd30BGZEK74vNeQuI/ufq5rl1AIJohJA4P2XKvdQ3If1ZZRxy+o83hx+oe5yPPy4aO6I4HT5J TGjN/S6DQzQuoWZK9DdfL5p2+E8l/LloGpxH3pWhOLun0GQKmDswrA6fTPkatx7SIsDRC+sri /aUWngk3I9cxPYzZ7PAvhAZbYJf0zEIafKTbNGt9gZ1gYVjix660Q/9z6nzd01e3oP/mLnSEb FoApA+gTSBOjl//k6tyKnhb2JVzOVoNYZk+gkxqiKVxxdheSRvz2h55H4hzc5FZM8UwYqPCVK 330bxP+a9vKOTmY7+Df4z4v0zmczImwk2XZwFblLh4G9NGhPq+ryz6MTdUylJn+Nicy4h482c +T2ZX7WHUB2rZkU4sr7vn7EkMSEUdlcpiup3DT9U+JYoxCrJ4ntQC7nEYt36Krf3bXrbXy2T+ uGG8tCPkZ/GYb6W5hIQUl9KSl8turbEFevbh0G+F36XL9bD7ZYBBbQvyOooTHDPCpjcCMn6wG wxR0bd00C4O+jSm25UF5c2eu0joELQOK5wi1738vh2cjK9OZFvkYwDnL5tWPsFl4Ov3Ta33ow nUOkGf+CGuD/jRhS0EH8XyI1/MuAH+Ma4x/769f746b12wdDgdXkDEVBOi5PsJw4j/T/mQXiD jBRpEgRna3UtJwAcORKoCglo8oeBzTL5WUm3BA3dmdHhJgSpDijFbilRaVYj2TvTLEFStPWF4 O43oURSkRqt2BUOyJnElK/3e58ow1BEOZXPEwQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org llvm does does not understand -march=z9-109 and older target specifiers, so disable the respective Kconfig settings and the logic to make the boot code work on old systems when building with clang. Signed-off-by: Arnd Bergmann --- arch/s390/Kconfig | 6 ++++++ arch/s390/boot/Makefile | 2 ++ 2 files changed, 8 insertions(+) -- 2.20.0 diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8cd860cba4d1..1a2eec61196d 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -240,6 +240,7 @@ choice config MARCH_Z900 bool "IBM zSeries model z800 and z900" + depends on !CC_IS_CLANG select HAVE_MARCH_Z900_FEATURES help Select this to enable optimizations for model z800/z900 (2064 and @@ -248,6 +249,7 @@ config MARCH_Z900 config MARCH_Z990 bool "IBM zSeries model z890 and z990" + depends on !CC_IS_CLANG select HAVE_MARCH_Z990_FEATURES help Select this to enable optimizations for model z890/z990 (2084 and @@ -256,6 +258,7 @@ config MARCH_Z990 config MARCH_Z9_109 bool "IBM System z9" + depends on !CC_IS_CLANG select HAVE_MARCH_Z9_109_FEATURES help Select this to enable optimizations for IBM System z9 (2094 and @@ -347,12 +350,15 @@ config TUNE_DEFAULT config TUNE_Z900 bool "IBM zSeries model z800 and z900" + depends on !CC_IS_CLANG config TUNE_Z990 bool "IBM zSeries model z890 and z990" + depends on !CC_IS_CLANG config TUNE_Z9_109 bool "IBM System z9" + depends on !CC_IS_CLANG config TUNE_Z10 bool "IBM System z10" diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index c844eaf24ed7..953a74d04990 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -11,6 +11,7 @@ KASAN_SANITIZE := n KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR) KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR) +ifndef CONFIG_CC_IS_CLANG # # Use -march=z900 for als.c to be able to print an error # message if the kernel is started on a machine which is too old @@ -25,6 +26,7 @@ CFLAGS_als.o += -march=z900 CFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH) CFLAGS_sclp_early_core.o += -march=z900 endif +endif CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char