From patchwork Mon Apr 15 08:35:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162176 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2648784jan; Mon, 15 Apr 2019 01:36:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyvYxT4NMVdXJ9PGu7kssgCtRPPxjXxIsRMq8AFDrQ4I38ALxW9Wr0Ifyr5V/iR53AE8EE X-Received: by 2002:a17:902:e508:: with SMTP id ck8mr72412139plb.96.1555317382430; Mon, 15 Apr 2019 01:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555317382; cv=none; d=google.com; s=arc-20160816; b=fxzAbbeI0DYWgDohGOrypTUyLg69jYR6S1ryNegscGLVFxO+91cAYUYu3uaqIEvSm3 MmSaz6fPFciWbG3MNVAFPPU6QpR0SoaBxMEWza0kv/0UkP2yCwEe7n0EdZ73lgh7j8NL QVyfWMDGAX9PZttMJHlrfaHFBfLkZdke8BFgfTF9nHYTllrqhwF1ROBtBNyGeVHuVxG9 na/l27951O8o+7Z8N9Sbo9GChRtgnxQtfhaTqMXneJk/QUf27zYhWv1kKr+ArOX7G8uC OjRqIqc4J3Zqk+TqLyR1iEe1U52v6q78KWczGaovjA2iWJHyx8qpUr2ce2U29sPPwr32 p1gA== 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=LaJkUDearL/CepWeON7GBjRB2irgt1N5k85nufJgtLw=; b=evVnsJXal90QGbIO5s3nlHlP436w2lBPN3SNWkCK+gpC2nyMWyhC513WvT7Bor7Phi XkALPB7u/tREZvLj/nKmm1qu8STKWlIXgrhdJtzaKmQNvtqKoENSLA9A/q9xL6PwiLC+ jjbK4PWOImfYMNEaTzHyI754CNnnyz6FeLGIpl2VxiI/JSn1tAkafXswWVVMeAmaGIc/ Bj/DBZptUAZSlMpJSTy9ZsC4TdKmyp/0hkHKcb89kgzG03oxzi2FBYSyD04yX0akPkUY w8UNgAfGYqS4PhPFdtKtvg7msML9Ts3Hp8GJwlSIO12Lmqkx4gzAHlVHGLVgy9by3ltm 4F7Q== 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 f66si43580190pgc.400.2019.04.15.01.36.22; Mon, 15 Apr 2019 01:36:22 -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 S1726531AbfDOIgU (ORCPT + 30 others); Mon, 15 Apr 2019 04:36:20 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:34167 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfDOIgT (ORCPT ); Mon, 15 Apr 2019 04:36:19 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1McGtA-1gi0OB1pBU-00cfR1; Mon, 15 Apr 2019 10:36:07 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , Vasily Gorbik , Philipp Rudo , Tony Krowiak , Ursula Braun , Rob Herring , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] s390: only build for new CPUs with clang Date: Mon, 15 Apr 2019 10:35:51 +0200 Message-Id: <20190415083605.2560074-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:ANLYJGcdNV8vevCapllzHEWWD+paDLqJkYiMmjf5j9ByOZklrGP wiKwVmW7/lWl1DnuEsUCQX/Zk+RHyHM7SsPJ+yTZR/rmLqrh2bGrxMQVc5r4HrIunUGP+48 D59woTWiupkMjsa7nlfhrliyFgwYDHjjIogCGi7Sr5GjbdFWwsOiggx3twzd0riR+27cPb7 1iCPyVkQpsKYMi7bp8bsg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:rJf33xNb6Y0=:IwVQhop63ZKnlSl1ajajbH inOFm87UF/ymvnVrN1VHVZtqmzTDdM4X7NtiKxufyMCU6KB6BGfBI+5qGlnPV+t8t2qbK87DE EgdRe0a1J8QpVFlFDkLCOT5YIJ7e8CWXHsekWPTLC5dYoOinYGjZzYWdM3JrslT2+UjB3M2Yp zF9nK17QOtsruvCMG7z/f8jsBBkmlocWd6x/EfwpwNzcMlHkKmOh6mbc7a5NoZYEmgEu3caGj mIMpYhUq4OuVFqQzQjuMIJhTz78QRlgAouppNp5iHKd1VIVl8p9Nks2QytWBVKk6P/3trpwaE 7Rfh4KNi7uSxi6q3iGgK3LBLL6sVgHtyX2soRNQhHsbBXVM5cncDbEi5G51ogq3EFtwuE38KU cxmp4vjButXPVf3nQ1DKDN3LdTc67inH1iTByb53vduVCOcIvb9Z+FQ74FW4eP5nzNjw8aUOu Szg4NnBgRV5RmMnmPsts0oeDeHs3ZqS/tD95F0l8C+VzaQXnv7ayCD96Dh42nkAX/MeMd8Mea pk8GXGpw0L4IDTpVf5jM+jzZulLyZq4rBei9Vv3qUkUITJu7mvuoqJV6wkYZJA9oMMrD7mM2Q sO/QApPEo+hUnNegy0VkVv/I5s+gqjsh/j3SG731TxT75kEzmeNOTDFUGrU+32LOaTffE2CbN PddJJSs1aCdgwOanseM3twYJkDakMLzgV1MjXXSUOIyEXIkJ1xRjtu1DS5ZFOVO+cnaVEXCKo PINTE1so3coHFuHu42SDO4zBotHHxjg3VTSqAw== 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. Part of the early boot code is normally compiled with -march=z900 for maximum compatibility. This also has to get changed with clang to the oldest supported ISA, which is -march=z10 here. Signed-off-by: Arnd Bergmann --- arch/s390/Kconfig | 6 ++++++ arch/s390/boot/Makefile | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) -- 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..c6a6b6dd3d52 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -12,18 +12,24 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR) KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR) # -# Use -march=z900 for als.c to be able to print an error +# Use minimum architecture for als.c to be able to print an error # message if the kernel is started on a machine which is too old # -ifneq ($(CC_FLAGS_MARCH),-march=z900) +ifndef CONFIG_CC_IS_CLANG +CC_FLAGS_MARCH_MINIMUM := -march=z900 +else +CC_FLAGS_MARCH_MINIMUM := -march=z10 +endif + +ifneq ($(CC_FLAGS_MARCH),$(CC_FLAGS_MARCH_MINIMUM)) AFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) -AFLAGS_head.o += -march=z900 +AFLAGS_head.o += $(CC_FLAGS_MARCH_MINIMUM) AFLAGS_REMOVE_mem.o += $(CC_FLAGS_MARCH) -AFLAGS_mem.o += -march=z900 +AFLAGS_mem.o += $(CC_FLAGS_MARCH_MINIMUM) CFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH) -CFLAGS_als.o += -march=z900 +CFLAGS_als.o += $(CC_FLAGS_MARCH_MINIMUM) CFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH) -CFLAGS_sclp_early_core.o += -march=z900 +CFLAGS_sclp_early_core.o += $(CC_FLAGS_MARCH_MINIMUM) endif CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char From patchwork Mon Apr 15 08:35:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162177 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2648984jan; Mon, 15 Apr 2019 01:36:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQxoy2WjijIqT/8JwJw5dWAqvttckOYNd/t5x0D3z6QIAnueCXLlWDJx81FwGaYyfMdOPo X-Received: by 2002:a63:330e:: with SMTP id z14mr67206773pgz.4.1555317397240; Mon, 15 Apr 2019 01:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555317397; cv=none; d=google.com; s=arc-20160816; b=rU8x1NbXqTzeJIAof5H84hE3oU7OgfN4Pp1eP8OBv/1K+vqbSzQA/9KIo7e3ABR+qi Ae+pIP7i+jdS+cXEmNb1R+MZpEtQx5jsLJ8XdMYQasiaDq6s5QOS5ESNh/Du8gcK6r7V izOPXgOKZs0SBfZ4sliU1p8bPMcrLTFDIIEDU8fAyTsrTrpsQcNeYjT4Msp23aWN72vv RcdgQv15eARbzNYVOlem7BdZRx6wngI3H8MZpIWCIumP5RUb8qc7A0dzFRB5i/Rp2mSP ICNykPwi6NqM69cvpu97x/LM0Nq8xSm9uaKSNVtoNMnCS0wIbZikv3rqAJJ+MA54bXCD jbzQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FpCYWXlhiw+cuLHQkKmdmJPP28LeoNurbq/wXpatOlE=; b=cOlcVhZSDeojKINde8X69wEEEr/6equOqrShr+sIoLYfNIEaXdi93FtNydpDsaIt3c 88zSiRwAe+djKGx/iK+JX6EUfXYhE23ftx1eVvSvqosEMEyDHt6njyuTbwgafZnDCUC6 7qdIlc4eiVPFmp3VVxxXho1xzLnSruH/kJn0nHZdQOnI33Pu0MQOu+S67ez91uBPqc9e vlwuqvedn/hjDmLwdS7q5uxVULem4F2Zw7DwfYfIa2jT1ZZqlcmVBAbJ1QPB/xfu0IKA k+gqkC6QOUTyJM/F7JgwWXfmrCVKqAeZEA41yr3zRqHxW+2UzIZIpvRREsmbPcmiros3 q3ig== 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 f66si43580190pgc.400.2019.04.15.01.36.36; Mon, 15 Apr 2019 01:36:37 -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 S1726884AbfDOIgg (ORCPT + 30 others); Mon, 15 Apr 2019 04:36:36 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43489 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfDOIgf (ORCPT ); Mon, 15 Apr 2019 04:36:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N3KkM-1gqCkt3REg-010P4b; Mon, 15 Apr 2019 10:36:25 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Vasily Gorbik , Masahiro Yamada , Luc Van Oostenryck , Philipp Rudo , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed Date: Mon, 15 Apr 2019 10:35:52 +0200 Message-Id: <20190415083605.2560074-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415083605.2560074-1-arnd@arndb.de> References: <20190415083605.2560074-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:DUi2IPPFGOns/G1VORQzsxkHqRzczPaTbKYAoZ7o/OXakm44zXP eaKkpkShSuEc7LVI69cqoE14avZgLTxGjwNUdvWZL0aK0BAJ/qv2kJosD3AVSO70/ESBwRB k8o+f3shUA/4DzJBj1gWTQgYO80Cfb6H5eOxdE2k1zEv7/WrPGJJJxgTVHMZrPn6EBu99PF ohQvRstqXApuk3gQc8DwQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:kAK0dNPU2So=:nuqkLmpBl3l/g/k3g7SmAx Pn9BWauQrxYbqCgfdqKjV8Wpaydz35/4Bm1qRyczvwDYQO7YnwmtLQgicp2oY9dWOFecrI3Ie BmexKQPttU3pE5R9HRglG12IdaOjB5HjY2yZFFc0f+7tjUbMiObayc8EOtdtI8OZKTXqYx3gd YDR43qwQ1Xoio0oEzJ+A47qaGxOxL+rJ5TLrW3JFRlDb4tqgumQ8ZtNUyhdGhq7g6Dzj9KSAg YdwtBuOCPXe4mtP2ew/e/gBUf856BaAJrwLKdY2degBLzsSnajKZK5o6VT1k/eQgXyrz41Z6+ Puqn0+q372nB/9hhvwzDYfo+PjMg7Al+WZzXmXWuC+gZzesrss1eDla3OwFCy/yjOb6WFUHys UrhhWDmtYRqKAg0GDMCWuFXLWQDlfXIpbJIhgzy6FdE1ySGGVq+rfJegxY19D3qGq7QPlVWpC SUC0zthRjzU01EOaFBVaAjYcVdcrpO+oMk1sG8rq04h6Xy2421uFonPj4z30j0yB36nXJF+6f nVecKDmiueLWOhozaVP1/47Io50EX7EcbzqqId03ectcY5yn3cgzpJw+ap0mvkIx9icGpbW2R ofXnjct91o9Lgc1Nnga6hKymIaGg6wqA0p3CO+6wfDTJEFH37pzpcf/8JQKbjAFdJCFR8TbKn 9Tz4Nh0e61kduoAmTbnpR3kVIaH0ZIQp4CXF8WdY23avUSCrxQQQB++vZe+8MDUAeOfqGANV5 yH/NKK4113sI+MteHmNc2C73HHd6AW61QquKsA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purgatory and boot Makefiles do not inherit the original cflags, so clang falls back to the default target architecture when building it, typically this would be x86 when cross-compiling. Add $(CLANG_FLAGS) everywhere so we pass the correct --target=s390x-linux option when cross-compiling. Signed-off-by: Arnd Bergmann --- arch/s390/Makefile | 4 ++-- arch/s390/purgatory/Makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 9c079a506325..9a228786e34f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -17,9 +17,9 @@ KBUILD_CFLAGS_MODULE += -fPIC KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 aflags_dwarf := -Wa,-gdwarf-2 -KBUILD_AFLAGS_DECOMPRESSOR := -m64 -D__ASSEMBLY__ +KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR := -m64 -O2 +KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index ce6a3f75065b..ecd0b3847fef 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -22,6 +22,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common +KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) From patchwork Mon Apr 15 08:35:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162178 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2649114jan; Mon, 15 Apr 2019 01:36:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqz980A+aa4PUBIFnIVszd/WAL3FbH0feUq7UQRJF3L1KNae7b7Pa551JQ9t3xkLzOYr/s4h X-Received: by 2002:a63:c61:: with SMTP id 33mr63448265pgm.293.1555317407037; Mon, 15 Apr 2019 01:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555317407; cv=none; d=google.com; s=arc-20160816; b=vgJoeOB9hWGclvJ3CE9SnViKlRKfmiJLykOzD9O6Dk3idc3ZY/oE6ybnvhum8CWtSh YWZug6We841yRVIN8H5DhvdbI6FMfrZRD9CqdZ1CI63dZ/xZ+gUIkNvQXSoEnZslbvHk zYQAke7BK/0Xpj7/8MUSxb+OJtSK6UkoijQnJAaGey7AjU7p4kzv1dykpYrwyJPqhkHQ hUQCEHgsojN3e61mt7Yis3FP/1u5KcRZRwBPF0rM7y+kCEXIULxDvvUWcI7RE5YLtItc RM/gHgp/rpft50hgjbqvBC747mmQqMETjGWlk344fdule3ZqWGK/6WiRjfhg8knHIt2v q4Kg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZblHBAI9qE0ro6Echw5Eq+dV81G2YxzCFsYAuMDW/io=; b=nW8wH+NXpCfbb6Kr1zMHH3fXnkdyUZw4pVrNfExZH4J+F69G6jNpbJLRW/xq8jCAtf FpZrj2GTaYcN3SCXo3ET6h/4uDsfnYptmNj4+N70i7J6eA2Ng9/Ynd7150lh18/a4FM9 4cnsZcnYn9CRLkKuurrtHOx/FKH0Gi2gkNQEW3iVv9fU8CQAg28YQlATLwKoIW2myaTv wk+FR9iXsL8BjGkerg9o5B/VWiDJJJ+YSATVjnDW7Nos73HRcLi2Nr880ikDGMOmL1Gp blmnT/r8hX7amtKN1EUYGQT2IxStKMN/OEDBZ04s4ZMfxLjU79WCH7JbZFPSyTVhEliG pI0A== 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 o90si47100523pfi.161.2019.04.15.01.36.46; Mon, 15 Apr 2019 01:36:47 -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 S1726971AbfDOIgp (ORCPT + 30 others); Mon, 15 Apr 2019 04:36:45 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:41191 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfDOIgp (ORCPT ); Mon, 15 Apr 2019 04:36:45 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MFKX3-1h5Hzu1RFp-00Fifa; Mon, 15 Apr 2019 10:36:35 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , Vasily Gorbik , Philipp Rudo , Tony Krowiak , Ursula Braun , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] s390: drop CONFIG_VIRT_TO_BUS Date: Mon, 15 Apr 2019 10:35:53 +0200 Message-Id: <20190415083605.2560074-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415083605.2560074-1-arnd@arndb.de> References: <20190415083605.2560074-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:RpXOI9r4llgr/CwD9D8tACloN8YtHezuuKyt2D/etozZiiNP4Hz JtiNMMEJA+N+rGv1SFVaYJzX3+ecJBY6sPib8s5hF7p0UcOJuD7+SvEWQMPiYWeq/NCK00y HFCR9ohWaQzUgBTF9BQwTpUuOQjSZKHmmywk0gfN088aoJYderI9Cv33hd2g/FqPaAnm/5N E1TsYcBLEYVwZuaTGzi1Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:jGQh2FY4J0k=:gNuT3QiEPnZXHglvsHk17d 4RwdbUienEQUj9+e7JI+QL16eWsF830eAUb1zun6snzijN8pY9RoutgUxGJU/4MYQNM9K2MJT y3h+Qanu8hnq5PMgeLfmaxnVvT6Chp/UZMt+Zasl5VDeYFXeWf7IweUa7aiqzOS9b4tZMPHDr VfvXsgjtCdEk+EDp8BHYgaU9Oi3ixLaB/oEsc/2vTjADLtlDj3qjLWlJ9ik0hh7+FDqFTvcJF aDhSJvyxkOMjQW7oUTH5SWxXlEpaquAtUVrIeOAZo2POY3qEiyePC+2o/UEMLHM3cvIGZ/RIO n5J499S26a1KOOwzRIDageVhhjKnUiBTkOstWSg+4r7fO3K62gacwJUjOkEDUpysBOOi6DKFT AkdZH+BQY0DDYGc4iwc/xG+oImHhXyA3Nn8dbpFjhKxrcJE6bezbQJDJD27+OA7iXUpJEX39r U5Bn9g3uJ3fYM1xo69DjXfPJkiCkm2RUUDzBTdQNd/FFCWV80ly7/15tPXEaYNR1nxz0nMQ0J 9E0ke4lexNyspzrmwGeiRIh7OoJdWO4+dBRNKze7HKyylYWtNz/kXwOWoSnPrg1OyTSu40crS z9Y9i+wfcb+BUwN4C4FDEmvmvVarxXWudcDOuhjP9ml/YQUxVfpQONq/FKdUDQ8Q65VZpUcX3 3PzRpF8KKJZCMWP2HzBQ3V4SwGA11shKJ+ZbBDsdtN2xzpTRR0lke8a0yreZXYvENVTL8PVCD rd21kpuTUc8Gh62WQxoXw6FCtSg1TQaZmV4J2A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VIRT_TO_BUS is only used for legacy device PCI and ISA drivers using virt_to_bus() instead of the streaming DMA mapping API, and the remaining drivers generally don't work on 64-bit architectures. Two of these drivers also cause a build warning on s390, so instead of trying to fix that, let's just disable the option as we do on most architectures now. Signed-off-by: Arnd Bergmann --- arch/s390/Kconfig | 1 - 1 file changed, 1 deletion(-) -- 2.20.0 diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 1a2eec61196d..25e0e7375166 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -188,7 +188,6 @@ config S390 select TTY select VIRT_CPU_ACCOUNTING select ARCH_HAS_SCALED_CPUTIME - select VIRT_TO_BUS select HAVE_NMI From patchwork Mon Apr 15 08:35:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162179 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2649735jan; Mon, 15 Apr 2019 01:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDHqQR8XYGphBU+O+ASuukwRxzoLTTEnfL1HsHudjIiICEaUEDEkdacPgMWffdLq3YqWHo X-Received: by 2002:a65:500d:: with SMTP id f13mr69537574pgo.250.1555317457426; Mon, 15 Apr 2019 01:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555317457; cv=none; d=google.com; s=arc-20160816; b=AEHWu4gf0OKUGBT5Hzwbyy6drXje2sZGURODMlFZJMzXJc9MhqgnO2j75Qfw2bT7uD oUAh082/lyt20lOk3+2sz89fgu3rZFvi0RbFS0CyVg0lDzOL8fFkhlq5ST/p+TxuWLbt uXCwGLOON0lWVxh+mt0hxnWHDaal5q/Tv/77MJR/A+wqI2p2dj7rLXvvvVQ7ziZHMA9X fgiOYoFmCga+ZG4se8EywRDBnXZnySl6INO1dI+oKaPu6LqRv7suQQl0xe74x/K6Qo5e NnVhCKmJSbZ3Y+YPS1AtWFT4KQUB8f2mPQQvVwrhWsPMqudt+Qqewpl5yQAtKlMj29nw b71Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=24px38wSOaBqVy0XwDRmIUfdySW+Ro3JVLPnOG1XXgo=; b=tDfvtw74e0o4E6fv4jVW1EvQhwMnpgwrRl6+4phsM9Q0NR5tUJ+obxAQyw5R0iDIX0 ezxiRBf3C6Wlo3+ux1RBDsk2rwFKqqPsNlQuLE6VnvCbr3k06GNUtJuBOFPBnskKhja3 y/qrMKY/uXYdHNJIfs+rEc8mL1JbIhHoAq2QVc3ZCSIRTPH5o+VPuSwBuxKK1wUT3DuS Uiqy7zCOQ5E4UJh+Gc7JXgN9UZgssy0udyMmynrAsEehsp3l3Ej5bXqncsKUUuj3ZFOY DUNGc4CB6RvDdtN4HN9uy0TWF6OQq9ak3Awco1k5NE9htmSG11aMA4GxSFjNJtwUfCLE kWVw== 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 62si43235190pge.445.2019.04.15.01.37.36; Mon, 15 Apr 2019 01:37:37 -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 S1727041AbfDOIhf (ORCPT + 30 others); Mon, 15 Apr 2019 04:37:35 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:57409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfDOIhf (ORCPT ); Mon, 15 Apr 2019 04:37:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N5VXu-1go1wo0ujq-016ziD; Mon, 15 Apr 2019 10:37:28 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Vasily Gorbik , Christian Borntraeger , Janosch Frank , Collin Walling , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] s390: fix clang -Wpointer-sign warnigns in boot code Date: Mon, 15 Apr 2019 10:35:54 +0200 Message-Id: <20190415083605.2560074-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190415083605.2560074-1-arnd@arndb.de> References: <20190415083605.2560074-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:+JLbIUuIMXUUPdWleBO4UIdDpQXAcS7S8uDzo+R8B83y56R+Hvu XGoRP9oLGyU14AEItutj+PkwLAyqnfeCqtQsbETN3cNZ1j28tGrAyN3oebAdKLQI92crUc8 y0XpSFbMkkszbb1VMi5K1m/he65dwHdy7u2PL+lBD1Y7QEV027R9Zax9nGmKVbXwBK0uYeo iXx8SWGR3Ztv1P4J0D2fA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:w1XYhVbg3xY=:gFk97015++gDbZ6IlRyeOl nV+w001qkxAdzXfIW+eBNi3ZgwfAKYjgs1sSwgyPh/Cz3226Ga8E9z8i/e1PdG2WpEyYD+LMY FRJK0tOhXWvgW0l4YQaROAX6TvWuxvzIVxri6b869enQsdejL+KGs3iimEm/fLJitDKbYFpxX hs3Mh/XoEJrhjpz12nLZJuJcKdTF3inUqU5rIsvJX4gshrh+mLP/bhnhTNNQTnSzX4iwBtd7R VGlFqu3aJFL55aJA0bHlFSLRJ5hhI/Y6AQIT1zMfuEhFfgk/4yEfM/wjnp8WalQNJW/3gRufD bXFYAdJRZKykVP/hlA0El6reruVzptW3b6Wr6bqEqnR/SBIrzuOEvT6a3v2m+tMWn9rmR4UJf Zszjb53VKks5UviKj4gkOE2qf9XW1Q+6sDNZ9M7SVxzt8HCnnZlRWKM76CdnA/v+ozQEU5msU CeQPwGA6PtTNRRPe9svb9SyUCy7CJy6Yz42eaY/WE7UgGK8LmBovxpjL5gWrJv8uT+YU9ahuR nbRXp363x7/7nnT60/m0sZP3nbXv8+ldT+I6J5+Ks3hArETmQPeLK3VqGCKcC0W5KmcW1ZAW/ +hfaz+iA/1KbBPsopc9NBNMkbvKwOz2nxY1/kUWW45VMgc4FYcwTidOqFOd/XCCm6H6puaFeO NhryD8lVB32nM8wU5KDB90XejG5iD/3J17IbMzXyImhFCMFEoSQTLQsO+z8w8ZnDphS6O9JcM mCcYpdxALx7FuKP0Cm/98bW/PDvu1Cjvj/ykyA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The arch/s390/boot directory is built with its own set of compiler options that does not include -Wno-pointer-sign like the rest of the kernel does, this causes a lot of harmess but correct warnings when building with clang. For the atomics, we can add type casts to avoid the warnings, for everything else the easiest way is to slightly adapt the types to be more consistent. Signed-off-by: Arnd Bergmann --- arch/s390/boot/ipl_parm.c | 2 +- arch/s390/include/asm/bitops.h | 12 ++++++------ arch/s390/include/asm/ebcdic.h | 2 +- arch/s390/include/asm/lowcore.h | 2 +- drivers/s390/char/sclp.h | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) -- 2.20.0 Reviewed-by: Nick Desaulniers diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c index 36beb56de021..3f2f0a9f1dad 100644 --- a/arch/s390/boot/ipl_parm.c +++ b/arch/s390/boot/ipl_parm.c @@ -51,7 +51,7 @@ void store_ipl_parmblock(void) early_ipl_block_valid = 1; } -static size_t scpdata_length(const char *buf, size_t count) +static size_t scpdata_length(const u8 *buf, size_t count) { while (count) { if (buf[count - 1] != '\0' && buf[count - 1] != ' ') diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index d1f8a4d94cca..9900d655014c 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -73,7 +73,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *ptr) } #endif mask = 1UL << (nr & (BITS_PER_LONG - 1)); - __atomic64_or(mask, addr); + __atomic64_or(mask, (long *)addr); } static inline void clear_bit(unsigned long nr, volatile unsigned long *ptr) @@ -94,7 +94,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *ptr) } #endif mask = ~(1UL << (nr & (BITS_PER_LONG - 1))); - __atomic64_and(mask, addr); + __atomic64_and(mask, (long *)addr); } static inline void change_bit(unsigned long nr, volatile unsigned long *ptr) @@ -115,7 +115,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *ptr) } #endif mask = 1UL << (nr & (BITS_PER_LONG - 1)); - __atomic64_xor(mask, addr); + __atomic64_xor(mask, (long *)addr); } static inline int @@ -125,7 +125,7 @@ test_and_set_bit(unsigned long nr, volatile unsigned long *ptr) unsigned long old, mask; mask = 1UL << (nr & (BITS_PER_LONG - 1)); - old = __atomic64_or_barrier(mask, addr); + old = __atomic64_or_barrier(mask, (long *)addr); return (old & mask) != 0; } @@ -136,7 +136,7 @@ test_and_clear_bit(unsigned long nr, volatile unsigned long *ptr) unsigned long old, mask; mask = ~(1UL << (nr & (BITS_PER_LONG - 1))); - old = __atomic64_and_barrier(mask, addr); + old = __atomic64_and_barrier(mask, (long *)addr); return (old & ~mask) != 0; } @@ -147,7 +147,7 @@ test_and_change_bit(unsigned long nr, volatile unsigned long *ptr) unsigned long old, mask; mask = 1UL << (nr & (BITS_PER_LONG - 1)); - old = __atomic64_xor_barrier(mask, addr); + old = __atomic64_xor_barrier(mask, (long *)addr); return (old & mask) != 0; } diff --git a/arch/s390/include/asm/ebcdic.h b/arch/s390/include/asm/ebcdic.h index 29441beb92e6..d3ce6adacb10 100644 --- a/arch/s390/include/asm/ebcdic.h +++ b/arch/s390/include/asm/ebcdic.h @@ -20,7 +20,7 @@ extern __u8 _ebc_tolower[256]; /* EBCDIC -> lowercase */ extern __u8 _ebc_toupper[256]; /* EBCDIC -> uppercase */ static inline void -codepage_convert(const __u8 *codepage, volatile __u8 * addr, unsigned long nr) +codepage_convert(const __u8 *codepage, volatile char* addr, unsigned long nr) { if (nr-- <= 0) return; diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index cc0947e08b6f..f3a637afd485 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h @@ -128,7 +128,7 @@ struct lowcore { /* SMP info area */ __u32 cpu_nr; /* 0x0398 */ __u32 softirq_pending; /* 0x039c */ - __u32 preempt_count; /* 0x03a0 */ + __s32 preempt_count; /* 0x03a0 */ __u32 spinlock_lockval; /* 0x03a4 */ __u32 spinlock_index; /* 0x03a8 */ __u32 fpu_flags; /* 0x03ac */ diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index 367e9d384d85..5918479ffa0e 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -365,14 +365,14 @@ sclp_ascebc(unsigned char ch) /* translate string from EBCDIC to ASCII */ static inline void -sclp_ebcasc_str(unsigned char *str, int nr) +sclp_ebcasc_str(char *str, int nr) { (MACHINE_IS_VM) ? EBCASC(str, nr) : EBCASC_500(str, nr); } /* translate string from ASCII to EBCDIC */ static inline void -sclp_ascebc_str(unsigned char *str, int nr) +sclp_ascebc_str(char *str, int nr) { (MACHINE_IS_VM) ? ASCEBC(str, nr) : ASCEBC_500(str, nr); }