From patchwork Mon Apr 8 21:26:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161946 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4171398jan; Mon, 8 Apr 2019 14:27:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqcTnMANFr6J/XoPCCzPbn14V/Gr7lGK3d4r4ZWirEyjv176zUaP+JvYblhs77AbdNYHWP X-Received: by 2002:a65:448b:: with SMTP id l11mr30583570pgq.185.1554758824302; Mon, 08 Apr 2019 14:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758824; cv=none; d=google.com; s=arc-20160816; b=LRcaUWBqij8VMAYCa3V5NKlLo2h7wBGCUSFB3S2m9FEBC/fppjcZz5MtQ2FjYaOYbQ bdqC8o2yfe/Dzmgm7/7ZrH3GIkJkWG5z7SVqhK3rNlhVCtLyZSZXfAt+abBmEw/K/XB8 DZDPrwUXKPLxr1Zg7gTvd1WgCIfb6jf18fKtINYmJDucmu1D3mpv/7hzdqtijDyoItz9 WEVbdaKA5qUQkkprAPzo+j1/K59pIdPVuBE4666H1ckc2cK7Uhr5IBpO9z+z5jt8pTFk W6MrDNKiovM16qMPCR4W26aLjYhJwe5ECn60Nd8oJkonufiFYWSHMikpla/Tp4MGz91X r2OA== 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=JggvH1BGc1t+oHzgxQs8zudinE90rI83G1+2OgS166g=; b=QOC8ruL5GzbXGoCv6V2pTg1sBZjnmRGliM6vdTAHbHYhj0WOT8in0NcXjELAgcOiL4 c0i894bfjYuXVPuJ+F7+cvzvn8yFcT9xKlTeoBmgobSAIwMxMJcqVYY+orjH1V0mFrzl 3/gBej0Fr2L8c9USLWZFJWOUXB1EYgvlCOAnbmcmDMhLWKNqH/TDse5CDx3QndjiFv9r fdFfnIXtkGqD4zAcbNDB7ALHIpgA7A5hFCPgW90vqfSTHmzQSpFHHIip0bvbsLg5vPik b24hpoTAMSC1/q2Ok9nobpu64M4YKqj8wi6QTxalwP4MCl3Pv0G/6n2SmtNhKvOOGhFQ czyw== 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 w4si26950336pgr.253.2019.04.08.14.27.03; Mon, 08 Apr 2019 14:27:04 -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 S1729107AbfDHV1C (ORCPT + 31 others); Mon, 8 Apr 2019 17:27:02 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:59003 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726630AbfDHV1C (ORCPT ); Mon, 8 Apr 2019 17:27:02 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MS3zP-1hJPdY1wV9-00TWvn; Mon, 08 Apr 2019 23:26:51 +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 , linux-kernel@vger.kernel.org Subject: [PATCH 01/12] s390: remove -fno-strength-reduce flag Date: Mon, 8 Apr 2019 23:26:14 +0200 Message-Id: <20190408212648.2407234-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:LqHHgpaYv00C4GNBFy+ulbCuWrypd5VbvhNBVd9z69CI+OkMOsg RwG7b0Zahao0Gqw/bG87G9VjwdXfjNGuEEsLSY5DbMxoItd57xr8HN0lLpSZgQiRLZt0Au1 8q/kqSiwHROLdYeWkvSOn6VKFen52IgyQZ1nhOFjvw9rUp7xZ9bV1pl4v3HD1IM9ljZoyQ4 JAkOAZhTqjiSd5D6acnnw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:0H06SCbXAyM=:qvY6HriRt+kLxdCEgblnmp QMbPBW9p3VipyP7Pn6lJou1GNZBLKQ3FboMmLK7QXb2bH9q7V17eJmyTIfphspc7s74wQfTnB tFufQqPrPi3eHC7EE7OdvqW+yv0NyVQQl7AyX4ExV4hQQarVtDFOUZB9ThOKJHMXeJKLbuNak twyICw49eNT2QhnNWEvGBWzPtA8CxRAIYhEklcybUFcjc+lpEtJZQCZud2Gt5tImkZfJwSoFw JJA4UBl3J4nigKNUh7OYtfAcmbPFY6veWeneGieDvDYde4Zkt9H6XpJ2GLXP8HYsiNLzctOlc FfR/mYIINnDQxjbhtRw4cD1BDCg2mPj1hhnoPIrBlE1hm2oWLbiSzdMMp1Nzdd1iIVfCbF23b jUU+9aeSpnPQ8wIDibB8ONs/SFA6hlmuk+4Zm+kWKSpE2fVSgxe/7yEUZC4JGV9vAeElgr0pi WpmnKdqiTIp9rcCXCcWyQ2jzUHyQy3XiVCe8ZqQloaOq5evh5T35SXVi+Q/8eP58Qo+RBTW+S cwq+IJLcu4RiPl4GRMILQPbkWvZwC45xDJBqHqgXtuLHjtlh41me69sFObuvAKZP/pgkJcZ9a J2cRNUF/uBZRupf7K0sETL1YJm7lsyCyeWemtohmEJTFmephVsetjkbuGYFf7WfPW3h6NMUmX 69gEaBPitD0n11oTvdMXxRoB9+/jOa0pkx3BcG/aRKa1xRJsWclzUxMcRcpA7UT+X1N0TBvAf qSiQcfcVDwlFHtSKYAHAWl86rMSewsiby/5MSA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was added as a workaround for really old compilers, and it prevents building with clang now. I can see no reason for keeping it, as it has already been removed for most architectures in the pre-git era, so let's remove it everywhere, rather than only for clang. Signed-off-by: Arnd Bergmann --- arch/s390/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 86c76b149cc2..0087d11e3eaf 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -114,7 +114,7 @@ endif cfi := $(call as-instr,.cfi_startproc\n.cfi_val_offset 15$(comma)-160\n.cfi_endproc,-DCONFIG_AS_CFI_VAL_OFFSET=1) KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) -KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare +KBUILD_CFLAGS += -pipe -Wno-sign-compare KBUILD_CFLAGS += -fno-asynchronous-unwind-tables $(cfi) KBUILD_AFLAGS += $(aflags-y) $(cfi) export KBUILD_AFLAGS_DECOMPRESSOR From patchwork Mon Apr 8 21:26:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161947 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4171905jan; Mon, 8 Apr 2019 14:27:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEHK2isvy196CAS4f+kqOygjIB77upajL1GCV5xSBKspFpJCaGdc+5nAhVc2S09hcg8Mx0 X-Received: by 2002:a62:6fc6:: with SMTP id k189mr14569518pfc.154.1554758866429; Mon, 08 Apr 2019 14:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758866; cv=none; d=google.com; s=arc-20160816; b=qXTV2cpH0o+c+IJumY+GfqYGT66EyhoH1OG62JTPkpNyAkDjKUwz8mKF80F+nbXhU0 +svm4aRaG1Y/H0SuDuAtEcL5xTxQg4bkZjY3lhGM4yX0rhV2JKpMaxljzVdWvXVi+pcC KnKE6ynuwKVapjum07ZstFyiOwSA/m/subzcZ5fgPrSQgXK6AWDTiD8nMbqEBQWoty8o xRbP/m1hyYct1QTsnRs4NRe5nNEFJb1z5ME1kNMlFH7WBPlqtrdntXOivQtWn9phVv4+ nkwss4pyrLINIF2O44mt5eKt7FGwk9Ms4sR2eicXAqOzUDxYUbh2Bb9osYCCwipwoUBD 3IMA== 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=Q1536LH1baYP8oF1CZOn+7hFPBiJTRVzkj/89xgqR8U=; b=V9JDrtUp/VlhL/Sr9YkdblJam8ea3rRA3G/sDdq9X7d6e3wVvl5AJL+K/oVS8iiPJM 533IpfD7GyHDSKOdg/9JULWTjEvAXbtqIqtdMjFxeTWuejn7jSqp6DvidB3ik3HvhZJe rPUdCawML2GpmCP794PDa7eFvpxANVooZ2CoH9R1ErNZKCSnzQ2sq/TltCdQBfnRczpd rVEPDOaC6Tq/juvIDLLKvN1RupqqvzdXsvgJRW7GzJ4h+COIpu/FmXBacoaKi7IF+JUg +PtCSiLcdj973Jy8HmSWDr3Hxdsb0AzpB++QCIO7aqwNM3QbOp0v5hndeLIGhObHvw/m XL4g== 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 i1si26321886pgq.528.2019.04.08.14.27.46; Mon, 08 Apr 2019 14:27:46 -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 S1729245AbfDHV1o (ORCPT + 31 others); Mon, 8 Apr 2019 17:27:44 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:50309 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfDHV1o (ORCPT ); Mon, 8 Apr 2019 17:27:44 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mzhzd-1h03663F6v-00vi17; Mon, 08 Apr 2019 23:27: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 , Ursula Braun , Mike Rapoport , linux-kernel@vger.kernel.org Subject: [PATCH 02/12] s390: don't build vdso32 with clang Date: Mon, 8 Apr 2019 23:26:15 +0200 Message-Id: <20190408212648.2407234-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:x9YtJQSMNGl1cwp2C5TgeVDUYh7lr2dxuVL43QOSlFPx8jXUT5U zwopPNuIYebMlwf6c1CHitGGPVw5a3AXZnmNLnm63E+km4l6qvK3DmKpdEk/G6t9WJMbkGt pHzVfd9zGtiauvElZFv2t87HHZ1Q9V5euNhZ661WjGO3Q13hPu3p2nPAqXIyRyhvP6SkWCd TQX7PZakifOfekRrQhp4A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:rK8by7wZztg=:99Hqe2p/VYskq8fBPOptJw aKg/ki2/qE2m6JkIhJEhzLgetcbo0UwAzF4mSDHIeNQ6ZI/xPa0gTbPFsdlh6bBjhwGnOkE18 pIhC+UWCemGuIGs26xvY4LBkreAWQxYYX9w0F5HA0qT/KKgWk3+GapGIqLUv7RPXI3s2fnX7X iqkZX1JzVTR4upvOExjD0htWVoRKJkVB00+o+FoDYCZ9/itbg6XbjWpyAjBoqoM1f/+A7/D7A wi1ZbaLyJnw5v3KANUuwYHiu+4SP+5QuOaJC2kAp7qjZ4Z72bucnVnrhD+1TbIKvC9cqTNmQd JUJZ9QqIiBMTfQPMPqOzlFEOuGxmq/rkc6ul+ooUp0w/uZgo8Zl1h+4X3u/zL52HEeByz97Bi iFM6wTK1Qp8hTumuIyXvmwMEVKGi5iO2ZSfrHKssVMgWrwoJtUpwZ/KOBbazdqtcHj3Uy5PZB wPeM3TqTAgHpKWyL4bMWAtQMGOubGCKjxUHEPjsMpx8UZ53cS946lQS6O5QuCyfvxpYVXjgOc IjZrWdfCB8F48bh1dcwPLAu4yiJ4lNU82dmx/Jec8arAiW90pmXv3a12tKZVNoku9xKTuHoSw /SUJbkTKQqpXLU5fOASJtplVY8PNVFJiCy0NwNely/VoT3U7N82ONTx/i9A9ET18/YUFzy0hI /Iv/kTYBYR8n80jSXpkYIIyIyfpuou1HjL8kYzjlEV0Rb4lBT63tb3X/r0neErVdTkMwtcEPM CK7gTRW+JXwkyjZzKyHDhnQTv40oDUkD7DXxKg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang does not support 31 bit object files on s390, so skip the 32-bit vdso here, and only build it when using gcc to compile the kernel. Signed-off-by: Arnd Bergmann --- arch/s390/Kconfig | 3 +++ arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/vdso.c | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) -- 2.20.0 diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index b6e3d0653002..8cd860cba4d1 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -388,6 +388,9 @@ config COMPAT (and some other stuff like libraries and such) is needed for executing 31 bit applications. It is safe to say "Y". +config COMPAT_VDSO + def_bool COMPAT && !CC_IS_CLANG + config SYSVIPC_COMPAT def_bool y if COMPAT && SYSVIPC diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 8a62c7f72e1b..1222db6d4ee9 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile @@ -86,7 +86,7 @@ obj-$(CONFIG_TRACEPOINTS) += trace.o # vdso obj-y += vdso64/ -obj-$(CONFIG_COMPAT) += vdso32/ +obj-$(CONFIG_COMPAT_VDSO) += vdso32/ chkbss := head64.o early_nobss.o include $(srctree)/arch/s390/scripts/Makefile.chkbss diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index e7920a68a12e..243d8b1185bf 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -29,7 +29,7 @@ #include #include -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_VDSO extern char vdso32_start, vdso32_end; static void *vdso32_kbase = &vdso32_start; static unsigned int vdso32_pages; @@ -55,7 +55,7 @@ static vm_fault_t vdso_fault(const struct vm_special_mapping *sm, vdso_pagelist = vdso64_pagelist; vdso_pages = vdso64_pages; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_VDSO if (vma->vm_mm->context.compat_mm) { vdso_pagelist = vdso32_pagelist; vdso_pages = vdso32_pages; @@ -76,7 +76,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm, unsigned long vdso_pages; vdso_pages = vdso64_pages; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_VDSO if (vma->vm_mm->context.compat_mm) vdso_pages = vdso32_pages; #endif @@ -223,7 +223,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) return 0; vdso_pages = vdso64_pages; -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_VDSO mm->context.compat_mm = is_compat_task(); if (mm->context.compat_mm) vdso_pages = vdso32_pages; @@ -280,7 +280,7 @@ static int __init vdso_init(void) int i; vdso_init_data(vdso_data); -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_VDSO /* Calculate the size of the 32 bit vDSO */ vdso32_pages = ((&vdso32_end - &vdso32_start + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; From patchwork Mon Apr 8 21:26:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161948 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172053jan; Mon, 8 Apr 2019 14:27:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxut9e44DOdCgOQxoRzIjO7ZsFE0IHu/BiDdkp9iEab3rORMFFqxUHUeGKHS2Rep4mqS5vD X-Received: by 2002:aa7:8384:: with SMTP id u4mr32127865pfm.214.1554758878879; Mon, 08 Apr 2019 14:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758878; cv=none; d=google.com; s=arc-20160816; b=ncIf7Ei5AzT4mSryF+HtGVDEmhJWnheeaFxsi9QJDEx43Gb6SDy2/X7A2b0ZxfWugF em/CRKmpBr3U3Jpvan/dEAgGnIKBCGqLl5yLeneGqkJfkTT4HRmE80Gryh5VH7bibhQN cBHPUicgXM7kYbiiBSxwu/xdwIHyo+lyDaHVaamxta/gY/S21mi1cjMX6vXhAd35H6w7 Wm5rCCfBl0GJYOu07cfy4eYddCRN64kZXg2XGo9Rc8D4wa/r1Tv6HM3LLednVbgHzDRg QbabkOkRCsA309tBKD+hMBRXSSE7e2bRCNTeDfbPMdF5XBqJCDnBucGxgdd8UGTfrPim 483A== 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=cTUR9G+B+YhFmPLyFQYbAK14OWDfjMCDtl3JsHbxpLE=; b=cF/xMoAa9ih9E3/aMETjyck2VAqsuzdEfm5UbjkbAlyrt6QrhLH44jEBUywaTrPnas +xoV4VRjLvLx0RVOSksddtKIE5Gv0zrojGVhneX14FrTB+nsHO3IBo08rfC3+f7C6pqe jGURhI2B/m31tiUjhhgO15Lv7RueNtQyiKW6amAywjgwTIEMvE30UQkB2reJ9eWHWMiw a5RnatcU4MzAFhOV738vKGbGjrQpsQG1GXpmpl36F3TXN4QlJUUFPIh/N06ap3cQTP9O aALGWuctNXELpmsP+ZIykqg+0STi8jnzyBx8YYQD7IqMMlvR4oJXl3bJpQ2ZzqrQLkRm mzNA== 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 5si28168536pfv.74.2019.04.08.14.27.58; Mon, 08 Apr 2019 14:27:58 -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 S1729268AbfDHV14 (ORCPT + 31 others); Mon, 8 Apr 2019 17:27:56 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:58077 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfDHV14 (ORCPT ); Mon, 8 Apr 2019 17:27:56 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1M9nhF-1hIoSp21wL-005non; Mon, 08 Apr 2019 23:27:50 +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 , Philipp Rudo , Hendrik Brueckner , linux-kernel@vger.kernel.org Subject: [PATCH 03/12] s390: purgatory: pass --target option to clang Date: Mon, 8 Apr 2019 23:26:16 +0200 Message-Id: <20190408212648.2407234-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:0tSFcfZEGhmi3LO0T7RG67wRm2IyqlmzXadJlocqt9B7sFY/+lt BWUl4xnwjasv1KClaYG7Kn5Q29ZfdAaeJfZW8NmnH0SKXn24hxqgxGmNL05YVrj8/jo+tGW 0BiBBil8giHVcEoLEjBtaFPJU80sMQNK+F14LqY/3QzHfZS/LtIWZRtRLKGnm1scc+fiXVw 1m4y1TPm6KQF2CH+AduSA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ozYeKzMil0o=:UBmHGABlIwB+YQP1sDCHFM walQWJF2sawPSRMvC1sBwMtvQGQicSpyKGpdaZniEUAIt78/cEz93DJaoownsAolDojocCJ8p N3EbWxqyQMPK+F+4M4JATHXaSypkFJYZd6bK8iGBElWHlJWANTJA4oVDWnHkqwYld9DWSmw5G Te88C4VqjuH+mRD87FQ7D3fwJ6Y+WR/F2QjWd9F0KG493eHZJI+cBb4lkoAn8+2PZbwzzQyg+ 1F8/8xCwzZvcntngC8ef6wJdPQn1BBkqJOMKOb8IVsWdu62TB9qMwKb9yXsFiV3RlItsosvbC sYZ7fE3QCwq+CZU+mEu/Hm07eh3p7D7vTvOw7wtdAUJNrxZIRgJOfkc10yfNkuW6ZUqH5An4y 5pJaVltEiYv5ZYMgQxrtg+ECgsPjt6k7ZTecjSsl8vDFg3i8XFq84K1zkqdfQiPz7eVYrwjMF BVByHw+ALQA2mxM7PRiNIYoASLPtS93MUacfXgpzGLLIi7ZbYKhOWCSy7JpbWsZwdkwPEu3o1 91ZfinCStiZx+BoHvdybAY3Mv0hpUL/3pE/8MAxj9nKdzRg0jCv2KGOPbGENzzfdqfaFsy3Bx 3femAuUhVScnVoHejDHQGUCcTcgxyKHCU0DeocSqvjNBzqDhk76gAOEJd9aQ2SPZ3nHsI4bmK /FUOnjRKAUAMz3FCybiHSqm4QdZlCuXl9InMi/b2Q2aYwDQkhAblm04zfxiRJ9ovrGr1jmjQU 34nec+8F3QR0zgu+PlTc6X+fzJTN2ll39e5RZA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purgatory Makefile does 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. Pass --target=s390x-linux to all compilers that understand this option. Signed-off-by: Arnd Bergmann --- arch/s390/purgatory/Makefile | 1 + 1 file changed, 1 insertion(+) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index ce6a3f75065b..3a14b968cec3 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 += $(call cc-option,--target=s390x-linux) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) From patchwork Mon Apr 8 21:26:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161949 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172244jan; Mon, 8 Apr 2019 14:28:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo/GXWECCyuab9ajphCbThHKO8LBPQoId148DB/S6rSHfxDpF1m4vtqVnEta6TzUttTcnY X-Received: by 2002:a62:6490:: with SMTP id y138mr32297682pfb.230.1554758895635; Mon, 08 Apr 2019 14:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758895; cv=none; d=google.com; s=arc-20160816; b=h9M1gkjU/A3RJr7fxseKXSRdky7KVjkQtTxc5hM4Yxxot1fe9SwsD8BaQV67irIQx2 3NHpwzgb4T7HVS3GrZZ0JurrcK8d/eQPMK67oo+U2GNVdhfXnXZQvIZarwQH7m/Ydud3 W3LJ4UfyZFxZHY51Fsf464HhGUzORI9INyJn1ywv8crtA3qojU0lkj34WkN/7j7+Il4c aEWGcfkurl5XFf12gZ2FiY8igxBZCLbwi2NKb/KnuY7vfN0l+wzctAL5xrFOhBgWmlsr m9O8SDxCGEcwHz4cpRjA1g11oe77anXc5XQnt1zRT3MlpuA/jNgO13daKFGyaVizYYGE hxNw== 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=XiabR71IOQTGYg0SyygtIZeSwowqtViGDbaEKgA/Gd8=; b=OMpBNDqajJFeUSEkp6FI4CyvdhWbfLHPsPP8B2gk08dMb8U6MdnnKS2F00w6p87s3X Z1X69XKT9bB3yyfH7sTOG0oq0PFrzv1se2Heb4Yfq7ecoE6w5ewJ3mlvTGGVyIXPSCPv +yW7Iudb65/kh56sdnfUagFOyFZ4IX2JI5ErtybQQywArrotksqw/i1N8Y0cbHS4sFWA AsCIWHvy2YsVpgtQUU+pLKGaokM4SYwxCdx8U2IcZu4mFhLCOTTJEmW9boLra7wY/2jU YdoTGUu+Qm3Z/ibNclq9cmAXO2HBbXotffBy9AAMghtbH55ilqthzPBpV6tWHp3MGgXn IXKA== 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 d37si3909051pla.97.2019.04.08.14.28.15; Mon, 08 Apr 2019 14:28:15 -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 S1729325AbfDHV2O (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:14 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:34741 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfDHV2N (ORCPT ); Mon, 8 Apr 2019 17:28:13 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mow4E-1gYA3B1D6U-00qR62; Mon, 08 Apr 2019 23:28:03 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Julian Wiedmann , Ursula Braun Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Kittipon Meesompop , linux-kernel@vger.kernel.org Subject: [PATCH 04/12] s390: qeth: address type mismatch warning Date: Mon, 8 Apr 2019 23:26:17 +0200 Message-Id: <20190408212648.2407234-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:+QJU0uJxcc6xEbQFznVyL0iC3/HwW742Nz5nMKVxDCcza0Vsbs3 CeF6aQuoUkeYzjFzTXZ0dsCKyGtaQm0aCegCCk+8QgfIXmA2JcWO8VbtWsxSEcgvgEsKaq7 fRMdc2Nz2wdHcHRrRWFIRCOGsC6W/JXeKKGChmNmjpt2OZkOdSAJGTqdh4ZTse8SJgjBct5 Ukc/DZR9TWhDihkEz6a6Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Js6QLh8dEi4=:2WKLJ1YqPSrMciIZ6UXtdB hbjJhkTr+iACVzmmWtwrh54IOiRI0FRTl3akDmdkjhSZHglcSMTykMeEi7MJ3jsI7oYI3Fx2v CLgmIu+Tw5Luy71NZbO7M7a6S7n5xEXxVpVPPHwRzj49fAupP9RQg0UyI+F13Dd82aKACJmhN zoXeqtYjs9AMezdTo3SlZN9e2vvZ1lhB+C3pT5mbEh0tSyVFoY5TY3hGaBOmXB07Im6Lg8yGL 8hTrH2fF5RICvwVsyWIzXqmEUoMoRHz01dP1kaCksGzM8/WHLaUGE9xBY4tYEyqOnu9mUU+Y2 en+adaLqpX2rzJVmmP/G424Yx6rUBST4WZp0DPktnXzq+e+2bq/biyVHHBKff/2CW8RmLjJvs KQ+edLxIqi1MYBPgpXxKLjABKkqqlSscxX4Q5D4w0MNErfMeD4w0W9A9ZESarHL2W1oaeyTVQ YZwWcGoLCn0vgIBv7rD/XYgQawnrzaS3hwtq5936ROcYd0Ql4ZQtF6+7QTPScLQoow0OhHjQ3 9fCd0ZtfQqV5lKk5InRR3GlJNrL8duIpuMM+XEq/uufWaGmSiVkTxWx2+YuaeSk/ny8kAI816 74f5SbPwzyI9IVfYekabs8XV5C5Zz7IQcxPL1HiSjRmxpm3TRf4JqIctLpx5LPc8Y0Xk4XK2w 05pT+gWWtQZaz2z2WLFcKtBXmlOg5AoFVvdUYD9NNIK5OxEk24WNGv8Xo+jHrcEgAEY6otdAT 11QtMd0Qbx7OQukYEXmFF+xQ8gBegdR6STllSw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang produces a harmless warning for each use for the qeth_adp_supported macro: drivers/s390/net/qeth_l2_main.c:559:31: warning: implicit conversion from enumeration type 'enum qeth_ipa_setadp_cmd' to different enumeration type 'enum qeth_ipa_funcs' [-Wenum-conversion] if (qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE)) ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/s390/net/qeth_core.h:179:41: note: expanded from macro 'qeth_adp_supported' qeth_is_ipa_supported(&c->options.adp, f) ~~~~~~~~~~~~~~~~~~~~~ ^ Add a version of this macro that uses the correct types, and remove the unused qeth_adp_enabled() macro that has the same problem. Signed-off-by: Arnd Bergmann --- drivers/s390/net/qeth_core.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index c851cf6e01c4..d603dfea97ab 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -163,6 +163,12 @@ struct qeth_vnicc_info { bool rx_bcast_enabled; }; +static inline int qeth_is_adp_supported(struct qeth_ipa_info *ipa, + enum qeth_ipa_setadp_cmd func) +{ + return (ipa->supported_funcs & func); +} + static inline int qeth_is_ipa_supported(struct qeth_ipa_info *ipa, enum qeth_ipa_funcs func) { @@ -176,9 +182,7 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, } #define qeth_adp_supported(c, f) \ - qeth_is_ipa_supported(&c->options.adp, f) -#define qeth_adp_enabled(c, f) \ - qeth_is_ipa_enabled(&c->options.adp, f) + qeth_is_adp_supported(&c->options.adp, f) #define qeth_is_supported(c, f) \ qeth_is_ipa_supported(&c->options.ipa4, f) #define qeth_is_enabled(c, f) \ From patchwork Mon Apr 8 21:26:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161950 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172306jan; Mon, 8 Apr 2019 14:28:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo2T5OXG4cSJ/ci/6l7pWNlBItKIPHip5lUBDrzXgiiH9aO37fdDZ4dWJ5+REIxE3COWuC X-Received: by 2002:a17:902:7841:: with SMTP id e1mr32326368pln.303.1554758899909; Mon, 08 Apr 2019 14:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758899; cv=none; d=google.com; s=arc-20160816; b=J29AFMNJwA+l5y/h34oXQkYnYwRtXZxvxc5IZNPWx7xyESz5kUylu4AbCo2Y7FNPeS Seg702dm7qusDIZp1eM7kPhSf9Ci5j5Z4L4YnZAT0El64y8/0xJLqlqC/yOnhAdIjyKc 2cQq3aVlzMDMxeJBNwxNHo6PMOrBq9FMdfLmYycJl5vm5JtZylw5HMtb8ixvf6b4Id8z a2RJKhN/zUd5DTUjenQOiOHY+QTBZ/Yp/NBX11Pv8w1ll0qjx801fTusmOFznq+gF9eW 5EnuaGNEAisVVqcsJMZla8l6zUmuC2dxIAqj69y9IEmJcWeik3k26BWlH3m+p7LGFjmP zrjQ== 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=WmjCH+hAkeeNgvUwfQYZhdoUQgTt+hoqMLJEY27+OjQ=; b=UGWhF2CZmFP1uPpoyKVi6+fqF+wd7sNNw9mSDMoUp+Jp35fJK8gfaUe2S/XIbhHd87 6OfKIdOknVMMz+S9YMvwGMvYVsDXogz1CfmuSet+K0xUTvMsen0kP+yUTUUz2uRN1nZT i7EhYfv8WTRPJcRNjXxO0cr4CSqP6w3GaXyntlx4SG1n3G/5ofxkTtrxH3Isppo3Q+rX Xh0L8mpHyd2G5R6kIUYjj9W1wlVHpr52z6WKX3DsMu5xafMD87yncQspJXbzFCYBNN4v Tl7QpojldfTi+GCwt1kytLRGwGhDP/sqhzbfKc0ScPPELVccRB3PVHNn73ZwxnbJJQpx iA9w== 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 c3si28030870pld.11.2019.04.08.14.28.19; Mon, 08 Apr 2019 14:28:19 -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 S1729366AbfDHV2S (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:18 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:48295 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729331AbfDHV2R (ORCPT ); Mon, 8 Apr 2019 17:28:17 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MxV4T-1gxqBH3pft-00xtsD; Mon, 08 Apr 2019 23:28:11 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Harald Freudenberger Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Ingo Franzki , linux-kernel@vger.kernel.org Subject: [PATCH 05/12] s390: zcrypt: initialize variables before_use Date: Mon, 8 Apr 2019 23:26:18 +0200 Message-Id: <20190408212648.2407234-5-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:f7LYLS+shNTGQVOERcPHnDGdSyHXSpqaZPjOyXA7Bymy6uFk7aK OfEMbohlPk5WJKMM/7rr/lnt6Go6uMTSPTZCyjmQK2Bq+5Xlxii9i9IvWKtXKZnA3KkEpxj XB0/O0gL+9+iJHwKIfutZmt6gpQO4eGg1gB64BrlSSQtRlmY/ENad/BLupkSCP2g9IhC+bd UjEjs2Lm7XJp7RFcufpKw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:hjuBKaVOxqE=:x7bWz60bcMTXae27O36o06 trXP0naJKX1dcVR4d8qwgf1OEtZ3k3Ltk0acPLc+nnq0sKpTNbX3/k2rOkU2Xzndh3hcGUqFC tD9pVIg3leSqcCADBhnk5QW0hdeHPb1RIrIzODsKmi59OTD4MpfWumzJuDYgiCKWobVE5H7zd eHdizh17HYrsRjW8bA0BB7US1KJzBYImTqLs1lQbz3J3vxvdnrvddpM0GG4q39/nFDOLVqSvv 8iOqggPCGrdcBRaYfSevvrOt2BE6lHo12ivDRjn16MXI4kHJ+X26SYmFdZcV/hZhPJtKmFsec VaAe0ySv5jZFcoyUWcz5Z87zQm1Q6WhkS3hq5uH7/9UUZayTNeoFtN+90CcaiLR9jRXOFF7Gc 3Nzku9B85LVccwrj/4NklgMEUa/+qGLee8gGgf/wh6WaTlMZzdYCLDCvvJSmcfmo6XPydop7L VxFdVsDCmBOlidoU/VulYzHM3kWWdWUOU2ll4PV5atFhYWEL6RwP4N+eFHuk1ZDCupwl81MP1 g0Ge8NtC50LiCuZOX5Aem22TMQdzmyjKiqowM0aX4R4k/dESVWdjTvUSBGPOHzlk/iqEHc3qm fHVkDddUKIY4HSKI7fmzhU6URA3N0QjgJdT2JWpk1AgToj48lsmO/BCFEF2yFKotsZ7CpYA+h TKThu3mZ/+xi3qGWJ+pRcDjlZeUqQ0ea2Y1//RwSmKzfmpJogYHGmsGvNL1Aj07QoouJ5yti0 FGNaSjBhhpx6I9IlsQEd5GlU/xrG9205lyEUKw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'func_code' variable gets printed in debug statements without a prior initialization in multiple functions, as reported when building with clang: drivers/s390/crypto/zcrypt_api.c:659:6: warning: variable 'func_code' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (mex->outputdatalength < mex->inputdatalength) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/s390/crypto/zcrypt_api.c:725:29: note: uninitialized use occurs here trace_s390_zcrypt_rep(mex, func_code, rc, ^~~~~~~~~ drivers/s390/crypto/zcrypt_api.c:659:2: note: remove the 'if' if its condition is always false if (mex->outputdatalength < mex->inputdatalength) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/s390/crypto/zcrypt_api.c:654:24: note: initialize the variable 'func_code' to silence this warning unsigned int func_code; ^ Add initializations to all affected code paths to shut up the warning and make the warning output consistent. Signed-off-by: Arnd Bergmann --- drivers/s390/crypto/zcrypt_api.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index eb93c2d27d0a..23472063d9a8 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -657,6 +657,7 @@ static long zcrypt_rsa_modexpo(struct ap_perms *perms, trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); if (mex->outputdatalength < mex->inputdatalength) { + func_code = -1; rc = -EINVAL; goto out; } @@ -739,6 +740,7 @@ static long zcrypt_rsa_crt(struct ap_perms *perms, trace_s390_zcrypt_req(crt, TP_ICARSACRT); if (crt->outputdatalength < crt->inputdatalength) { + func_code = -1; rc = -EINVAL; goto out; } @@ -946,6 +948,7 @@ static long zcrypt_send_ep11_cprb(struct ap_perms *perms, targets = kcalloc(target_num, sizeof(*targets), GFP_KERNEL); if (!targets) { + func_code = -1; rc = -ENOMEM; goto out; } @@ -953,6 +956,7 @@ static long zcrypt_send_ep11_cprb(struct ap_perms *perms, uptr = (struct ep11_target_dev __force __user *) xcrb->targets; if (copy_from_user(targets, uptr, target_num * sizeof(*targets))) { + func_code = -1; rc = -EFAULT; goto out_free; } From patchwork Mon Apr 8 21:26:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161951 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172420jan; Mon, 8 Apr 2019 14:28:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqz652EDxteraz4+oibZ5hzQ7s/spBst9dP/kOdunop7UYIes7Xl+TQYCdFKruqoYlUGH7BZ X-Received: by 2002:a62:121c:: with SMTP id a28mr32116002pfj.58.1554758911137; Mon, 08 Apr 2019 14:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758911; cv=none; d=google.com; s=arc-20160816; b=eEHpYqnKcoTLy8LUHeBz/N0LgpgVtMc05r/4E5ijqjvbcmGDphIC8H/x7TZmr6TwZI MvmAiGify9XeaqOXzOl0HQZyDggg73zoKPPmMFuqtJhzf9UzxtYeZQJGHTmIwCsLvL15 /e/hoQFwT+efMNWlmlVKAuNcL5t+DE7z20OLmVQyFD747RnqkK4Tz64wjht0Yzlh55jx QH4lq97lfjhQafdDGQhvf2ovy8oDovAf6z9ZOo8gLmfF9Xf3XfGD28dm4juqYJ9Z/k3L t6n5dTZx801EhYGxiZ6crH346wwlM1YXodkW2we9AWFOX6FENJbQJEPqBOY+g3g9QEcb xVbA== 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=iPjKeLjclfv/IworI/Ua17O1ZKQ/vu95GVemnxZryns=; b=1KkKAF04afyHwSd71epdux0YMj2pTM5OAvco/6b0aiXj9NP2tuSX/Ogf34x+JjMgEj q/0nuBxlt/dxXVzbNsGTNaIgZF6fN5lMncFyR5glIB5ha8Z0Tf8gnXmiyfKaSeadUPhJ c3W1fOv1Tj33kC/XFPblhtDe2/3mwpjRmToEM4LDQXnOyz2wtoUQ+9iRxEpX6IERublu EbSGJozywhwXbtbVqFAmmNiT2Zd1eDUN9FvLlBoRk3jBbr9HhNfxaR7yBoSsyom95VpP kbgu28FPr0nnrO+XrUDqpAC5utbtzUQdrJDUm0eljtXrhd87JwPyXA6K5SRFfL3A1RZx hNqA== 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 k3si17045048pgh.113.2019.04.08.14.28.30; Mon, 08 Apr 2019 14:28:31 -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 S1729382AbfDHV23 (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:29 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:58909 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbfDHV22 (ORCPT ); Mon, 8 Apr 2019 17:28:28 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N79hs-1gqNNw0cE0-017YVU; Mon, 08 Apr 2019 23:28:20 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Julian Wiedmann , Ursula Braun Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 06/12] s390: ctcm: fix ctcm_new_device error return code Date: Mon, 8 Apr 2019 23:26:19 +0200 Message-Id: <20190408212648.2407234-6-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:o4R0ZM0QUffv2XWKmjETaIeLqeahjXhDfv7LnT6n8YxTPA6S0NM x7CLrqCeb4qpGvtBxSnGTMcLPtSuDa+P2z2FL836RfO4MafPSwAHpbZZjjI1x51B9ZlYZJQ RdDHPJYS6m/aa/D8Mz/PmOCbCDmQXxaR+rK46VHS3juby+nsLVwskD927zSappRIJz8lO3J SjC2UXvYJ0dFoEQH9FOUw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:okQOMoYWVSc=:E34AXOjUs0wa8pGzQKmvBs 9dtOmo/DWp1yFX1osWQSMjnJ4HeW7wUnkzHPo5imd7E9wn1efEIZqihcbOc9+WJ38NC0rzBBR Cy0S/w1syvbZxu+0QzyTcR8Ed+Q2jnpQtje6YeSqLEU5nNGj4/BrLgs7o8t4ssNiLWdpE+GSu 9CVw/jO8mBYzb7RnDJLgM5I/IVaghN88J+/x7VGJq2psD/0HceZnKN0k0fUGBw3ZbSaS2zumS sCAKHvET91+k28LkEFP26ve5o7jsnmYzByIu3mt+nLfjfwDIgx5K/rxntKaGAXYnvkt1g3ts4 0NmazKY+WWpRMzmFOAAJ6pjkCP0vNXe6Kll4dBzDhoxUFD8oIP+dwk6C22pR/AQN3RUgWABss rW3ua+0i+Jada21l1mvg9MicG0E0/ZTBQ4/eN3Cp6HQ/a8jHym6xUJRlk743H1HNilsEOCgnm c6UilGcO5QwgoBJlTIs0CHfwBQpaFJlL6KWxvNXgET1F7x7T36nSJZMBXBRdixfnsIrJBmtVw qs61b0dj49tVa1jMegFFSx/yxTeQG8mZRtfk80XkWIp1W9mGEhsWVrXAsHQXJ0qaTYRimDjtn FSTPEJgxvTqPQtjXpFTOl3EUtZ2MHv4U1M8B07O6QGPt1icGcCjporwPEjmp8TNDW6RLJiPTh 4JcHuz27tKUg20D3kEEUhfY4Q4ryouabhPSgqriZWc96Zj3H6JnC7awh3+W2/tAaD6OyMk+YY 9LXpNiDqzzwOEt6jmWnRcYTgedN1XfumL7Fs9A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang points out that the return code from this function is undefined for one of the error paths: ../drivers/s390/net/ctcm_main.c:1595:7: warning: variable 'result' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (priv->channel[direction] == NULL) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/s390/net/ctcm_main.c:1638:9: note: uninitialized use occurs here return result; ^~~~~~ ../drivers/s390/net/ctcm_main.c:1595:3: note: remove the 'if' if its condition is always false if (priv->channel[direction] == NULL) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/s390/net/ctcm_main.c:1539:12: note: initialize the variable 'result' to silence this warning int result; ^ Make it return -ENODEV here, as in the related failure cases. gcc has a known bug in underreporting some of these warnings when it has already eliminated the assignment of the return code based on some earlier optimization step. Signed-off-by: Arnd Bergmann --- drivers/s390/net/ctcm_main.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index 7617d21cb296..f63c5c871d3d 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -1595,6 +1595,7 @@ static int ctcm_new_device(struct ccwgroup_device *cgdev) if (priv->channel[direction] == NULL) { if (direction == CTCM_WRITE) channel_free(priv->channel[CTCM_READ]); + result = -ENODEV; goto out_dev; } priv->channel[direction]->netdev = dev; From patchwork Mon Apr 8 21:26:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161952 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172463jan; Mon, 8 Apr 2019 14:28:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG8tEGQrpWQLOedKm4FqzUePn5U5TBVcH0X4nY8QNfUpS+KXldbgL/SWnxIhmJVwQwnt3n X-Received: by 2002:a65:6105:: with SMTP id z5mr31220599pgu.378.1554758914997; Mon, 08 Apr 2019 14:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758914; cv=none; d=google.com; s=arc-20160816; b=NSydrMEh6EFLG/1yCVr+2Q0CnPjMKPEjpxLxfpJiUOz5ET8htpcUA17D16NxXnHYZ5 eTMrVIOMwqc5ITa8yRjfnej7k+wmBFvHGKOJdFArwte8IhVITSwwDXtV1YBn4FnXL+44 6ThdNc0RUqLILxC+Ti4vNVds/qKA8c9VDeAYxnKI/kiBNpJtsFwlPI2BXxshm5Mjh/D7 TGeZ9vdg0/EbJHMDgrdg4J/wc2ZA5Hh4Tn8fjs32cCiUxaZxY8pNpIQK+9yImrheHWxl ELj8AalCDesG1fsg7YVJl6fmQz8j2G9+8nMSnRAbQPoMQ3G9W0BPCHrxAEviLK9stUox Wi5g== 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=tDqdk0TrBxuf0p6OMAEBEUgTLxVqvoNIK0FscxU+59A=; b=rQEh4tq2a26lhMHI2vxOwIx+cFVAkNLbNGLllC3JbZEJWT3Tvvjn3W1jDZa+ILZgek bhjuJsgC+CSlzghZfV4N3i6I3gxd81BgxjZ5oMTCpkuSo+RsRqpeTRDsD6ZQKvuh/A63 hLzBgkYmuMRNlX3HWBeOD1gA80v9BktHo/J1M5sAb1nN9gxyezaT6GvXjQAj/mmQHpBi y0W8KpU5dkrRi6/YurO2aSuBmcpfzzzu71qJkG3zPA3ck/jCI/YtdNvolGeK8OBhQaTh rmlbAfJ0kEWI4CpBxxPcTf8kIlb5+oXFi5ZfqStQAOsCEKMIMxcjXQ/n7adDGyvwurw+ IakQ== 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 k3si17045048pgh.113.2019.04.08.14.28.34; Mon, 08 Apr 2019 14:28:34 -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 S1729404AbfDHV2e (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:34 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:33649 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbfDHV2d (ORCPT ); Mon, 8 Apr 2019 17:28:33 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N6Kl7-1gp0TL0O2T-016jYr; Mon, 08 Apr 2019 23:28:26 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Sebastian Ott , Peter Oberparleiter Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 07/12] s390: cio: fix cio_irb declaration Date: Mon, 8 Apr 2019 23:26:20 +0200 Message-Id: <20190408212648.2407234-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ha6PNgK0PYpqwPhlNU5XWyfhsmbCXU4naSHTKfBYwheY6UWeYAT r+vInJvVpAWCMC4Tp4cuBYykXoLxXiWEgJ8tTEOUTfbCxA2PbaRJxriXiZSirRyZHzXZDOl WUTkzwc/NdsdtVOV0ALHzQqV42zFSNjNJL8sEGzz6HfMy1Wqpbrc013M+rL8aCAMdro4nuE 3w3wjFfHMYViSa9JpLVIA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ggJ9BSGwLmo=:aEmq0SVEfr/yQYnHXxiXHi DWaBMfkP0YN8Y/XH3dqZMG0wG/ZLxgDICXH81SkxxRvxUSsyyAdc2WUH1QuyGDlvpU8wg2MVq D6/SpnuWOqjHKbNBM0rPe2gSx3n8m3Hcc9R5E1zb/ZDEjkZxDtvfqEtfQJV/54zf1cKX3yK4J dNnp759ZBKcsFoEXheOnT960pUQJcRvmM4Kk19xSQ9Va0HEsJf82pCgpKhS+xlFwQwBk/ksY1 Ehs/JsQbbOVdGJiPKrm3jZ+gu/6ff015MD2fDF4NUAH+IHkVE6DIojwoJkI5YfV4/01OMvpM5 OLum7Lz1j3xkEywUJI31jo9/iVAoGEOeV4iPmhbhLAMHK70Fc3oVSE1mRsdM03l1i+6VWXlt3 m2g8aO5/RiCz8ScQnNUJE3sjBEEv+elj2lK2q0JP+79DbbnJE7NG5efOY1ygzzViEsPGnc9TM Yc4V5LcxGYEK00R3XLYwoYd1Di9/GuEdbbp2r5nlYVHCunnQ6PhEX+pmpve8DL6lrwZPlzPgB 3Q+cU5k0Io4pjFZZ96npDafp08hGaKbBcmc0LJTK87jBqBWl4SAPiu+2d4MRqcoFeDDpGOdf0 BhIMDm79LwEgbfgFrFX6keHgNf7cmYmATMTMFKerC7zRvA3mV38/ZRb+RLWtx8zmn1B/tV23W /20EeBSzIgxwoWsr4TOUqxTesn8Nw6zDPoVtT+g6a6Zq278r2dqQYjRiozxz1COvPLpbJvA0m 1c7saP9TW+2sFH3QlE4ADPeSn4APUMUWFbHz3g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang points out that the declaration of cio_irb does not match the definition exactly, it is missing the alignment attribute: ../drivers/s390/cio/cio.c:50:1: warning: section does not match previous declaration [-Wsection] DEFINE_PER_CPU_ALIGNED(struct irb, cio_irb); ^ ../include/linux/percpu-defs.h:150:2: note: expanded from macro 'DEFINE_PER_CPU_ALIGNED' DEFINE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION) \ ^ ../include/linux/percpu-defs.h:93:9: note: expanded from macro 'DEFINE_PER_CPU_SECTION' extern __PCPU_ATTRS(sec) __typeof__(type) name; \ ^ ../include/linux/percpu-defs.h:49:26: note: expanded from macro '__PCPU_ATTRS' __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \ ^ ../drivers/s390/cio/cio.h:118:1: note: previous attribute is here DECLARE_PER_CPU(struct irb, cio_irb); ^ ../include/linux/percpu-defs.h:111:2: note: expanded from macro 'DECLARE_PER_CPU' DECLARE_PER_CPU_SECTION(type, name, "") ^ ../include/linux/percpu-defs.h:87:9: note: expanded from macro 'DECLARE_PER_CPU_SECTION' extern __PCPU_ATTRS(sec) __typeof__(type) name ^ ../include/linux/percpu-defs.h:49:26: note: expanded from macro '__PCPU_ATTRS' __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \ ^ Use DECLARE_PER_CPU_ALIGNED() here, to make the two match. Signed-off-by: Arnd Bergmann --- drivers/s390/cio/cio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 Reviewed-by: Nathan Chancellor diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 9811fd8a0c73..92eabbb5f18d 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h @@ -115,7 +115,7 @@ struct subchannel { struct schib_config config; } __attribute__ ((aligned(8))); -DECLARE_PER_CPU(struct irb, cio_irb); +DECLARE_PER_CPU_ALIGNED(struct irb, cio_irb); #define to_subchannel(n) container_of(n, struct subchannel, dev) From patchwork Mon Apr 8 21:26:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161953 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172599jan; Mon, 8 Apr 2019 14:28:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuHu9g7xrkAbQ6ZZ4dAQQcQBhipdi+fidLZ94PTNusQyq0IDCGu29scNvIz+gE8131A7TQ X-Received: by 2002:a63:e653:: with SMTP id p19mr30244807pgj.284.1554758925206; Mon, 08 Apr 2019 14:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758925; cv=none; d=google.com; s=arc-20160816; b=bWRW5ppESZ/vE7kox9W5vv+Ld2b8oMySi8EwISzAa4ACWRU/SiQI+WFDs1aX2BH2ZK KnIkv7yxg8q4e1s4MA3SgaIena9Vcf5vDidxI1E3mWdc+6L9C1BnXr9U7/JNHLsqjSWl pAUTE49FKMp/0HYvUIMFN/7BSwLGY+9BfNn0pxYxyIaWtE5n0UexL0ls5Br7yFpg6h9k Ifk4gZ7YhwUQPK5vCzYj/sjnOdGMF5NXeoMkKeiYy1/ABQ6+EZgJoApN5JN/89A+8Dbx jMtyFLWvITU658DofFW4tQBM1gT1ODnKh+tmJKe++d5AF8mFC7El/iIDu/L0TPAhvnfI bPNQ== 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=ZTmMfOJitLMm/Dh3Kf5njoE1i8EeS/kkpQlcMLmxpUc=; b=WQ+IKGTEOTnr3JvtS9MjoLSs4j6rpmF7rq20xA0jY7fuGftaCIXKF0plri3k9nPyy1 wMDv+WWDDP8MdoUgxmZ44p65iO93jfe5kHyvnlOzngX+F5lSfd+GCd4xCOyZ2quoJEwH ZETX17c+6f3pG7S5mOxVjUS3y/jF13JjFsfP9MpZz1nAf68zHrBSCw1vEKENe0xZTALk 9LedP/U42qTMw0xL9IcOq/4Y6WfqIbLzrU8rTjPoUHfSknBfgACOzCxcuJH/qYQ6uMNn n0wQVDGZxmCcro+KGmFptjvf4C9YIuGn5oPA/FNak/mhuqqMJNk1A9xo/xHRUlIXG13a mauQ== 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 r5si26431883pgp.29.2019.04.08.14.28.44; Mon, 08 Apr 2019 14:28:45 -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 S1729424AbfDHV2n (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:43 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:54375 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbfDHV2n (ORCPT ); Mon, 8 Apr 2019 17:28:43 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mn2Fb-1gViE70viR-00k6NX; Mon, 08 Apr 2019 23:28:36 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Arnd Bergmann Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/12] s390: syscall_wrapper: avoid clang warning Date: Mon, 8 Apr 2019 23:26:21 +0200 Message-Id: <20190408212648.2407234-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:a7z6K92Aqxd+6jYl8kxTzV0/4l7UDWHqxrRdCWm4WIz1hRaB51E JCrx4Cn3T9QAALoQ1tdC5DCiQvUN4GM4cwmos2Nsk5Ji3yi4TknMztqTJFJimP0/pWcv7Nd l0OwAiPftnJ7oNUu2azun8bJ+WRIFer3ER/Pwdv6ycmqP0dI6AXp9TU6msH8KOoI0c85bcZ wI8q/jtMMSfpDWJsDVE1g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:xiKi11OGdTE=:XRlwXMab1lwX6qPWoGlUS4 8PUxGXiRdSCedrtjZ0Fo33+KPKB9jshAx1gI2WuBFwdysBHulFDP14eOie3uM2n8HcRQrM+SE g5OyKVWNAETGbMk4EZBtm7n+LodH5/1ErIo2/s/pP+oOCZE6A+bDFE09utB0JK4mJa8khpfap jw9H2b36eEjYLTbAFcXRLmbnu35hdxq4t4Iex7ckBDPz7K4XJxXzNMEVae3LXtF6vY2f4/Z9K +E0cb9iMNlPNxJk+g+BGS8AS6YiVjhWHpB9VZKlhj0gZXmcOg1TNKT9k1z2NRBy6s2fYa5Q7q CZoiRZahqliFFfhWkOH/LK9+VhkFE0w5GVlzT2i07LERaHyTV1j2GfGLE/o4qa31HuEqb/Be1 7veeHn6Tz/B3MaOnfVZ68H9/WYTw0eVkwF+anp+qM8w2u/JPbM58bjnKoICyx95MZEnq3ggU4 LiEuPjtxPEZE4Fd0xx604XyPVKimGdIdgHT96ZhIH0kAscz7ZzYi8EYg9e70eTFMIw/0zr6qz 6uG57r98TDP0G4hTmf7s7OKEgLYzKsx+UEkQ+v0nHh7PWtuT+7cY3qpZYKK/TUY8whFanCbk0 J3/D3h2k5Uc4HkZ7eUjhSmjfSFJQQsdGRuY/qtGSdA2/D/XVxxvVJt17gB3SUbPmd+fhvJrSj QL1bFrktKha6I+I7hp4qNYxLoi5AAOR5czIfLLw3jZ073qpstw8pqpKH8BSgar4dU1Tp+LVqv 9XDxyKakz51C/FAzyZ0/xAvisAghsY7ZNvfEoQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building system calls with clang results in a warning about an alias from a global function to a static one: ../fs/namei.c:3847:1: warning: unused function '__se_sys_mkdirat' [-Wunused-function] SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode) ^ ../include/linux/syscalls.h:219:36: note: expanded from macro 'SYSCALL_DEFINE3' #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) ^ ../include/linux/syscalls.h:228:2: note: expanded from macro 'SYSCALL_DEFINEx' __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^ ../arch/s390/include/asm/syscall_wrapper.h:126:18: note: expanded from macro '__SYSCALL_DEFINEx' asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ ^ :31:1: note: expanded from here __se_sys_mkdirat ^ The only reference to the static __se_sys_mkdirat() here is the alias, but this only gets evaluated later. Making this function global as well avoids the warning. Signed-off-by: Arnd Bergmann --- I considered opening a bug report for llvm here, but I suspect the behavior is intentional, so I'm just fixing it here. Let me know if you disagree. --- arch/s390/include/asm/syscall_wrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/arch/s390/include/asm/syscall_wrapper.h b/arch/s390/include/asm/syscall_wrapper.h index 5596c5c625d2..3c3d6fe8e2f0 100644 --- a/arch/s390/include/asm/syscall_wrapper.h +++ b/arch/s390/include/asm/syscall_wrapper.h @@ -119,8 +119,8 @@ "Type aliasing is used to sanitize syscall arguments");\ asmlinkage long __s390x_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ __attribute__((alias(__stringify(__se_sys##name)))); \ - ALLOW_ERROR_INJECTION(__s390x_sys##name, ERRNO); \ - static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ + ALLOW_ERROR_INJECTION(__s390x_sys##name, ERRNO); \ + long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ __S390_SYS_STUBx(x, name, __VA_ARGS__) \ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ From patchwork Mon Apr 8 21:26:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161956 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4174720jan; Mon, 8 Apr 2019 14:31:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuhxi/HxK+j0BZ8WfcsRqoMFtN71XGrHh+fdw5Jx8A6eulu59NK6DjaSYk0dlwIP3wYLco X-Received: by 2002:a17:902:6b8b:: with SMTP id p11mr9006228plk.225.1554759078001; Mon, 08 Apr 2019 14:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759077; cv=none; d=google.com; s=arc-20160816; b=H3lzDHFD5vXLQi9xBYOf4EG+U05HJ5qr3FE/gEptbg/aZLHKMz0rb2F4JaHPmtkoZj 0EESNB0HA91B9lgPQIHf/gpRePyq0bBOUzJt7Ofoi+FA3i3FbMbFTnyt/kTI55YrMprE 28o+RJuIr9srfQGdglbzCzsNHEeTvQwIiUXgR3i02qYSpMCUfcfyJurHu5e8hXbAMVR3 CL00PcIMQbOTn2AN9apwGB5c6SQGrhyB+Rdt3HAlyjZpRjr7Tp60uLXOH87j7iM+6T2y 8yCqI/wVjjXJe4JYjBPFeKEwGD2TaNYKAhzsf3/qwhTEd2wrvnutkV/1sMCQXt7Z0smP awBw== 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=fYi0YVBfAltBhOTsByW2QLnjaExAJZXGuGKJMG1A0NI=; b=w7P32F3b2ztqI5RMaC4DClKhe/R1Ei2kdUfoxlKp9Mu3TbKcZC5h9e7byCbQOpfXrG FbLknhh2U1DzbG8rDi6PZk6DifkXzZuFiiV0NWy8h5JIMUFEF3M2iABr7U+oq12qnYk3 9TkutX0Jz6TRxF5MUp4TrkU56p/pH7dvqAGH+YwsBPldFRH9no+/fH7pbU2gHwfsxDRu nmUQeUOwskZVpu0wFnryc+FHiO9EWh544Ta0bfP/hw90bPhSPajzyNAqpecNzLkGOO5P BUu724gHBXVgUycTKmgzLU7baJL/AQ2G3yNNwnE2RGfmQNsngtUAT6Zg6gLwnctAMEOg MkSw== 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 a18si26986340pgk.464.2019.04.08.14.31.17; Mon, 08 Apr 2019 14:31: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 S1727297AbfDHVbR (ORCPT + 31 others); Mon, 8 Apr 2019 17:31:17 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59935 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbfDHVbO (ORCPT ); Mon, 8 Apr 2019 17:31:14 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mv3I0-1gvwTg0DAW-00r1Bs; Mon, 08 Apr 2019 23:28:48 +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 , "Steven Rostedt (VMware)" , linux-kernel@vger.kernel.org Subject: [PATCH 09/12] s390: make __load_psw_mask work with clang Date: Mon, 8 Apr 2019 23:26:22 +0200 Message-Id: <20190408212648.2407234-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ueHq0cRCIAo1fFwSIyE2OQG9Knnqslc/mc2Pd6mGkzSBwQeAWSh qJ9D6svp43z9Gx3F/xTbVSWAy+dqDLwAZO8BpGXmwqVAgU1yMAC36mhFYN0jldSiugWrJte 31rw6BcRyxpqpsKIe0KqWOX0mSAD+SmeM0yl1R/K8FLitvF0JtWylz69g4qFhBl1kfR3GX9 owWxvZYRQ0hAo5FKI1aOQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:04y7NOSLvhs=:ayvR2CDPLuO9o1tDpp1gEE Iqz9oxoXaMM+DNHFnraJChoHvR9UHM11BWPXNEqts/GtpAspB9xW0O8d1SZOjlHPyfIMIfoY3 ay9gsNUVttNVJCTSrxFzwaGpZU2MZ24SI0cKxJi5pPGzAGMIz+zZ/xpEZTKiOe3P+p6g4xz5Y fLgYl66IEKsasdIcCVpAc/zVrvDCi+aEjD2K817h3VQcx0ERN4lwp31m5fX+QiLO3xE1xWyca eSUmtzXw1Fld2I1Iqa9BoSeHZJCCKlUY7bLzCMApBQsT06EIxv4EhLT2ZMMu+24mnCXxz3gUA c9AelG5DWQPRbkND4xuoekINPqAdC/l1IXeCRIIWJ/UdU6cJtw3W+ScHZ1jve3h7FeO6VKn79 J8uthO48Wy04Wvq2njXVJy5WyAAXlPQjF4fn+eF4DbqtFJ0J4qe66r4iFCw8v6oUBlvzhOeeE JTKYJW4qVtmWeZS0xBBy5s2pUCbVTS11f58QT2GlgIKlAxX3eP8m/ls39YiY+AWJwLK/jdsJl McHs3OKBHI9dBsQPZ2CHRzma9iQIIpZla03mT4O6FUqZc6xL8HB1o50m6pSlUILa+uCnP2KlM kkH3k3mefLZ89UK+fLVop7HpBX++vgrSXTU6TPDo0mdeEUQ41V1wdRMKllJQ1Waa9RntAKqJ7 n7Oqdt59wshwFBwunH1pFeVxnVNXisxA9EgIYXXjHSQF54e1S3NtoE8gseaRqGDFi8awrk9M7 07pQHguhgJJ+0oeCjJ1i1ry1FicniKIldVWoWQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang fails to use the %O and %R inline assembly modifiers the same way as gcc, leading to build failures with every use of __load_psw_mask(): /tmp/nmi-4a9f80.s: Assembler messages: /tmp/nmi-4a9f80.s:571: Error: junk at end of line: `+8(160(%r11))' /tmp/nmi-4a9f80.s:626: Error: junk at end of line: `+8(160(%r11))' Replace these with a more conventional way of passing the addresses that should work with both clang and gcc. Signed-off-by: Arnd Bergmann --- arch/s390/include/asm/processor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.0 diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 81038ab357ce..700c650ffd4f 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -339,10 +339,10 @@ static __no_kasan_or_inline void __load_psw_mask(unsigned long mask) asm volatile( " larl %0,1f\n" - " stg %0,%O1+8(%R1)\n" - " lpswe %1\n" + " stg %0,%1\n" + " lpswe %2\n" "1:" - : "=&d" (addr), "=Q" (psw) : "Q" (psw) : "memory", "cc"); + : "=&d" (addr), "=Q" (psw.addr) : "Q" (psw) : "memory", "cc"); } /* From patchwork Mon Apr 8 21:26:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161955 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4174667jan; Mon, 8 Apr 2019 14:31:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzBdOZz3/Ujam44qC2Am1ZFhG0ZswrtGSFkBLluwbGjUNhaLRgIB1/nWz7NvrMZN7YTz/9 X-Received: by 2002:a63:1c6:: with SMTP id 189mr31247427pgb.22.1554759074749; Mon, 08 Apr 2019 14:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759074; cv=none; d=google.com; s=arc-20160816; b=0hB6JBeFDGebAAMUDvGi/feN6sm9wdUmL/EUfwWdxDxLLRgur8fmi3s4jZPjWMIodH xCSYJvJqt8FVcbir0ipXsM0VimY8Np18vblWOI2IWKRivUOfezCFAzbY5qKFUeN9bkKY gEoyDUpPySqL1E9KE8uJeWMtOm/So8wnaUruJvnDQAhkFXBNFQZsJZlp3wuaoo1oaPGq WzBqv+Ocs92uj3Ng/oFMd+U8GVb/ngC5NcqzLrOjoc3+hVcmmbH8mGSSXpeLY3XYkKzE qb2h40gaWegXoZGLqaL7bupdr5vjtXidmODB2O3uu2OMsePjZ/MmvyGaFWRGp1/WZcwO 6toA== 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=2y9oOkRFPPm5hHJ2eowaxKGlGZaA3Q4OFphrZ5ya2Wg=; b=mQTZ8NEBIlcrvsbiaysSWOdrYoneoyK1m9oKp+5w28J8zg0LMf2aedRgmuxK0IAb5h X8HqVHLWRVyDQ+1T65DtaernlcdZVMJ7x5Sbi+Yk/QGY+t2wzgvaagQtGMCC25bh2cbn ZARud30P3y6Xp/RZKPYiC9KFET7NgJvzrwUMISvA9syFq0+Qn2rxYP7vQB6pwi1ICkKZ 4gKimpskv1gTCXYhR7YnjIwAdMJ58Uidjp3ut9t+GJgTBJonvJeF3dHtw02A2vk3KkFr bj4mAE7n5lom0TrjteuxXzoTR2cKMjItukbJwKEe47pt362ri/QMvdShNhdmb6QC2p3v 4Z6g== 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 a18si26986340pgk.464.2019.04.08.14.31.14; Mon, 08 Apr 2019 14:31:14 -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 S1726738AbfDHVbM (ORCPT + 31 others); Mon, 8 Apr 2019 17:31:12 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37753 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfDHVbL (ORCPT ); Mon, 8 Apr 2019 17:31:11 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MYedH-1hQ0Az0Akd-00Vkv1; Mon, 08 Apr 2019 23:28:58 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Steven Rostedt , Ingo Molnar Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Vasily Gorbik , linux-kernel@vger.kernel.org Subject: [PATCH 10/12] s390: avoid __builtin_return_address(n) on clang Date: Mon, 8 Apr 2019 23:26:23 +0200 Message-Id: <20190408212648.2407234-10-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ZmbNTcWWXcZFOu9pYUwZHanm3aNR7zdy1Jq0xKUgcSGMxA6iUIX 1/vrvowcwhMsTyRXO7j2R0HqNlxsmoIxRA+FAZUo6QTUjBssk1B6rEfW+vHO6v7o8Jjv92L QqN4uN6itj0eTzPCYXYHSLO1obgdKAP3UDr5gdFf5cB2PttphKSu37C0S1GSzpBSltpft+P utRZj3Rh3rjWFryYPy1yQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:v7Q/Qbjvw/4=:WfsFPCgAfcRRRvrnNcKaVa SUjtnyoMRr7ZToW07cc8wIV1zciKiTjsIDUxXJivxdwvdMBULUjlM2MyxF9Sb3BEKZBD1RIVU d9F4o+C9671lbPTYHPDlZci5cMA8S/uoY5UaLgVLH1NSjUo8KGBNqxwkJH1RoN9ybG/5ByDGj z+3MgcBsOIorRL1988x7xt41pgCUZ+vhRR3tdQYeA0PKpfAvhuWmrPYzUVf8eKQC4hJ8pXRWk 3HfVs/vzuRQZJwus3PXDbmchKOTs1KlFNMIbU5Vq01Ae2K7MNHuYE0lnn2hTItAeMOwUIMFmu qF11mRdXuNbuhRMmAGiG/5eioNd2xozeg9twpPQAGNXCxP/8i0cxEZcwMVldqeufvLgBdWfIt GHTH7nvGC/ngBJQhCue+WxpEGUcswtq0FVfWfuYfxqpeI6XD+aqkYeZyUUvV9Tlw7QxTLqtEE 2ZAzcwWSgOifBJYyfu2gPIBeLybzAOW/MednihhhhmW4kmheyAKZdTzZ5ipJ1eTv4JeCS311B 7gYcS66NWcMpH9imybbGUyeFHBCTphBn7BFJSld6VkSZKNNWRoxGJ9wifxZV+xyuC+0FVclpX p42bMYsY2OqgYBHkDrLLOjhyg/njjTMlRS421AAEJn1rEL5wt7hv4MPN2/HSmDZzfTXU/0k69 ymNc9uYeqLMqFD2lqliRYeYSab7/3eMr2aLxMXSFu9yjAeZFUMOQSQWzCZZJvpiqWG7XwSEgi so01zVQbQFCtrvG5dZwMrHzgEECBLZePwqEMvw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org llvm on s390 has problems with __builtin_return_address(n), with n>0, this results in a somewhat cryptic error message: fatal error: error in backend: Unsupported stack frame traversal count To work around it, use the direct return address directly. This is probably not ideal here, but gets things to compile and should only lead to inferior reporting, not to misbehavior of the generated code. Link: https://bugs.llvm.org/show_bug.cgi?id=41424 Signed-off-by: Arnd Bergmann --- arch/s390/include/asm/ftrace.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.0 diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index 5a3c95b11952..7923c63946fb 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h @@ -13,7 +13,12 @@ #ifndef __ASSEMBLY__ +#ifdef CONFIG_CC_IS_CLANG +/* https://bugs.llvm.org/show_bug.cgi?id=41424 */ +#define ftrace_return_address(n) __builtin_return_address(0) +#else #define ftrace_return_address(n) __builtin_return_address(n) +#endif void _mcount(void); void ftrace_caller(void); From patchwork Mon Apr 8 21:26:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161954 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4173017jan; Mon, 8 Apr 2019 14:29:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7wpev5Z7D7/0d6YZ40WXKtje19vfHA7L5z2w0XYm5IUgw14hQE9x53z0BT5lSEvOFzchU X-Received: by 2002:a65:4108:: with SMTP id w8mr30499762pgp.236.1554758961116; Mon, 08 Apr 2019 14:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758961; cv=none; d=google.com; s=arc-20160816; b=WDDW2ixEjicbb90Qrex28E8FD+koeVkCYFEBv4fwjQ5v3XUb+DUBqDHXNqO/f2Prrw 2tkyw6wOxYXj8csMS0OK83l0oCm3v8Af74hCPVUwQyyP+qVwejh0ZWFrPhPhW7O6TMwa EgQQP2shT2Xoh+Cphzly191FrNBm+VIFszoE36kH/DCmqdksjnzXCedPRyymO/a5f3Vi o/JhGCNAmhMGbgCBg9ZNQz2zh4QEQqV8sFicvh6jfzaGu07IjLd9ok1TDjTv0qbyksl/ uphx4qvjQW3J9S8y5bKx0Zjwt1mvMzID9aJcAT9jlPH17z7CfIsjylfxNc496eliRXbM 90kw== 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=TJ6VMpWFz5Xq4QRM772ului09G3kfIlozSjX3AUzv8c=; b=KWkkgUvEPjlLFHeqhiAaTiKt6W1Agu8D8noz/5KqzTsDTtXjK0eb8vrfIXCMZNlcC4 8G8XNszcDoxbrxAyOGik/KXHYWe1Ij6uYa6Qj8hbEZM0BWcZWnBUWXW7FgyNscSBW/+I ixm2NQ3x7CiQSO3Xf+iXIDjZMXFhHPoA5kvzc74ftcWT2gA/HnLP7ejeywFWnOeseQae DZAbtmNOS3CW6N/mtu4PqH6lz3JCHc6QEa5VVZZlc2r44RNTLPzcmk/+RHwxZ0C88HCH UY03XyqLZXhE60QHwkSiqEZuxkWMNS8AmBcexwrVicXXBYU4G5mrLOwDXBdfkTNysGi7 THFw== 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 g2si23524971pgi.19.2019.04.08.14.29.20; Mon, 08 Apr 2019 14:29:21 -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 S1728867AbfDHV3T (ORCPT + 31 others); Mon, 8 Apr 2019 17:29:19 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:44705 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbfDHV3S (ORCPT ); Mon, 8 Apr 2019 17:29:18 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MhlbM-1gienQ0MDI-00dleu; Mon, 08 Apr 2019 23:29:12 +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 , linux-kernel@vger.kernel.org Subject: [PATCH 11/12] s390: make chkbss work with clang Date: Mon, 8 Apr 2019 23:26:24 +0200 Message-Id: <20190408212648.2407234-11-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:JevfzJx4fIfYNJndOqX74ucOpNeZfT8bjeYo5HS8OguBpS5HM4Q lyBN26av2aV+Y032TVD73BQWRbk9hnvQwMa4Jf2ZpVPNupY/TXvU6rI1v2dRr0sYkGGZCru 3es5GqfvB7EHqLkummqS/jeGE56n3erGUb8uixlCZtZpZ9o+l9HB1GvnjJVAI2DYgiD1e8u ii45TNq1A0gnoXuZV6ODw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:NHnlcFH3UL0=:jq37TD68eL5xTfi7Mz4t5m 4deZJoNaTPB49+2OT7RV0L9dldCu7loL0KZG9WCOfyMbSflQMbzV85tgozSbLa9GMQgHC7wB0 GUq/429HeqT5fuudkGhccso7HNLWoU5wgIjU4GuHdpS4ktcVmw0hCxNo1IxKVG8mTm/vKwYVj XfzqaUEYY69ESM9QopLdi9ylljX+lqzFainXrsoG29gft6jL5EEBxugr5t40kdf2tCzD9RXI5 YHbqr/VhZbgQIC1zn8bjt8TGm0RaS3kHhcGi9k3sfsFJxxaSWWcFat9RJM7AovQILSjG0E8pC n65s9WSZifQKdwhedcq8k5yHDyj79l5YYsGMSKgVjpzUutOhhQArc8SEgU/D+HyRjgyxJcGzK Uaqp8lOHotvZjFtdyxOAMbqdfXURuhqLSZNpwb6/vV7E+itIE3+FOC6I5QEXMI+ue9RU3JLNi xx4oFCF3+60ZvR0tG8c3Kyre5+8D3TbI2RQnQ1nb9Oa0aj8VvbiqlvaXvN+5FiB6w7lZ5RPMY 9QG2ajlz3iht5CJDhdF/4oVSmYVaA6kFiMkyW9eMbpbVoZDsBvj1XlgrYvwv2wFiWxYvXecZ5 V/I7NOY2bYqazhMGstyXhrDbXMbTTDqHtYQ1MK3SJ+DuO4l/3VGtn75+qrVhRWEdwkGcgMRI6 0RQw2hU8Qc0rjk/7Y3rtR0eZV3noFBfPLzlNa+qqlz1IOvKSbdKoR3fkMEKWSE/vujgNzK3ui lc+zJr4AWX7m7pmLwaQi+ZKSGG6boo/mHmBvHA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org llvm skips an empty .bss section entirely, which makes the check fail with an unexpected error: /tmp/binutils-multi-test/bin/s390x-linux-gnu-objdump: section '.bss' mentioned in a -j option, but not found in any input file error: arch/s390/boot/compressed/decompressor.o .bss section is not empty ../arch/s390/scripts/Makefile.chkbss:20: recipe for target 'arch/s390/boot/compressed/decompressor.o.chkbss' failed Change the check so we first see if a .bss section exists before trying to read its size. Signed-off-by: Arnd Bergmann --- arch/s390/scripts/Makefile.chkbss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/arch/s390/scripts/Makefile.chkbss b/arch/s390/scripts/Makefile.chkbss index cd7e8f4419f5..884a9caff5fb 100644 --- a/arch/s390/scripts/Makefile.chkbss +++ b/arch/s390/scripts/Makefile.chkbss @@ -11,7 +11,8 @@ chkbss: $(addprefix $(obj)/, $(chkbss-files)) quiet_cmd_chkbss = CHKBSS $< cmd_chkbss = \ - if ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \ + if $(OBJDUMP) -h $< | grep -q "\.bss" && \ + ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \ echo "error: $< .bss section is not empty" >&2; exit 1; \ fi; \ touch $@; From patchwork Mon Apr 8 21:26:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161957 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4174798jan; Mon, 8 Apr 2019 14:31:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCkOn3bRyanJAdiQtYkFGzYNLIY0xhRkKC/g25WtANFeqKAPKzcu9k3RYoEqJSGs/dv5TV X-Received: by 2002:a62:1d90:: with SMTP id d138mr31553569pfd.232.1554759083263; Mon, 08 Apr 2019 14:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759083; cv=none; d=google.com; s=arc-20160816; b=DyeNjM0Ggyb7+mt/tc9DmLyz4AHpvH6rDd5/DUwr2spEdFj9YNFu72xyG+uISd3wwI NAWP3Q/6IvP0FrKRHWPPhSYUQQznMKRE7JhXGgDPMwFwWfsOvmX53J7rHo2J8phpd1/V 1M96sXp/ULZRW6F7aTwNGxpxFFquLbrAL5TsKl7UIqGVd1kiXBxb2/zWG3HXpJghN856 kegKVU9lJruPQYW3NWFltNkJImgJ3//xoNLtRIok3TcxphVHLoNy7kXvnnYhlXCfpsH5 U/P0pcKjTrLXMWAO7PrHEeC+/VGv+J3GyXyt9HyT7RQxDenNBrwmW2jw6OIJ4PQbm4Ri +CHw== 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=Ndl02SH47q2QyGJKe/h2DIaKUV6SDRS7kKns2Q/5FLM=; b=RTZGVaeS01svAHRetg+ixSAvMMgv8BaGWdiX0iLKbGZuk0WfvgKNA1gcIUTTZKJWdk ON7ss6mAxN31G6sqmsALx2FGnDsdQ+pNH+sYwPR2FND6LluD421uztfjy4aVYd/+qhNV BDgObvMH0J1cLC8W6s8CXjIhZ5opuG5YTlYlt3qjdttfM42iiebhwq+tiMWKl7mHgJqB ZCZs4cy6O1OXG0yx33mQzoyFQdit3iYGH7r5VfwQH0Yrav5uDLn6RoxiBlOC/nicp31Y yHVh9zuJl2weRpYsXmuiy2YjEF7oF70NmrKLykLZDpzEFID2hZau4hzyQabyF1y1PsXf BcSA== 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 a18si26986340pgk.464.2019.04.08.14.31.22; Mon, 08 Apr 2019 14:31:23 -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 S1728078AbfDHVbW (ORCPT + 31 others); Mon, 8 Apr 2019 17:31:22 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:34471 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfDHVbP (ORCPT ); Mon, 8 Apr 2019 17:31:15 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N9dbx-1gsJJO1ZYr-015ddJ; Mon, 08 Apr 2019 23:29:31 +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 , linux-kernel@vger.kernel.org Subject: [PATCH 12/12] [PROBABLY WRONG] s390: void '0' constraint in inline assembly Date: Mon, 8 Apr 2019 23:26:25 +0200 Message-Id: <20190408212648.2407234-12-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:/523MLjqVgMjdMMdQozji7Pa+uMzu03WWSDDICQXvB4QKMS7Oow 9r92BFyrTb5IKqo1HqDs52BLOY0TZ34uTbd8FSYI5IhCSrurBij39jiW27O7q2vFzUWCJ23 elyG7wQt33TnJbV51kEZPkWhZIIO6JuCn1H+FlnbnWoAktIs8mz1tmSX6s160zvESOXMw0V 1KIRwvFEYpMyU78lDufcg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ZMEZuQtfJXc=:napCevtCoaEVls+FA1p7Nd oPgvXre3cFbpqmvHA+X9zsd1K6q9Ee2tX83v0ihEpDjRrJScc5RWLO8LFfDJ0nTTt2E3qB3HZ 7GkU5qokZFJCJ4UrqV3Q1xN8AOVlr4/bhWp5/XEmCySQKid/nXLMkKGXFVGNd29C9d3Jo3wyo 63h4qAfdeI+pUkvaQLdAZQLLfoZ333gJu/cz9tVYzspOzYWnX1D4iFfTIVIyioqspcTsqJ50G gQR3JXOhj1bs7xsRkcxWQMtzcCFaNnGc/XnIAbLuHlGGdEE77eyq3+6JPLHnqYV3tDEyRUguI m4DZFIV4Q7Gbtik9Q4qgotfKeaASZ9n59QH39gZkbZcgNR45JVV2WVtEGiX8YQPzVTGo0mVB1 1crcMlDZDFQD5hpogwjeVTKnhN/nhK3bfF9uZgR01dYbW/RAhQbt9+miA0icdwtGNLEU+nxGE r9Vz+FbMvburIaZhlkLPZiQsyPhlJ5/oh3lzOQJA3H+Mwzsq1o7PKnFPqZy8qIiKwWExrOvoT wDl4hOOmHwS89E1ZiMN0u1+lr9TMC86mx6HSbXknCjnd1MB+Y7YPcTVkVgj/g1GN1lDgI3731 7RcVcIVwDneHToETNWj3oCsSwYrAAfF6cmpl9MdAEeGE2/3zqMrhjveB5pnDht/edORPLkUYj GHtyzg3mbMuHhA2ME6d/j7krG9YYNJqB+1ZYDev47QNp9ZX+TEwVo3TQRt0LEOzjBZj4nPsVx /3zSAih3T9KK3ziT/lWLO8ECzndgjZn+QrMPrQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang does not understand the contraint "0" in the CALL_ON_STACK() macro: ../arch/s390/mm/maccess.c:117:10: error: invalid input constraint '0' in asm return CALL_ON_STACK(_memcpy_real, S390_lowcore.nodat_stack, ^ ../arch/s390/include/asm/processor.h:292:20: note: expanded from macro 'CALL_ON_STACK' [_fn] "X" (fn) CALL_FMT_##nr : CALL_CLOBBER_##nr); \ ^ :207:1: note: expanded from here CALL_FMT_3 ^ ../arch/s390/include/asm/processor.h:267:20: note: expanded from macro 'CALL_FMT_3' #define CALL_FMT_3 CALL_FMT_2, "d" (r4) ^ ../arch/s390/include/asm/processor.h:266:20: note: expanded from macro 'CALL_FMT_2' #define CALL_FMT_2 CALL_FMT_1, "d" (r3) ^ ../arch/s390/include/asm/processor.h:265:32: note: expanded from macro 'CALL_FMT_1' #define CALL_FMT_1 CALL_FMT_0, "0" (r2) ^ I don't know what the correct fix here would be, changing it to "d" made it build, since clang does understand this one. Signed-off-by: Arnd Bergmann --- arch/s390/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 Reported-by: Arnd Bergmann Signed-off-by: Martin Schwidefsky diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 700c650ffd4f..84c59c99668a 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -262,7 +262,7 @@ static __no_kasan_or_inline unsigned short stap(void) register unsigned long r4 asm("6") = (unsigned long)(arg5) #define CALL_FMT_0 -#define CALL_FMT_1 CALL_FMT_0, "0" (r2) +#define CALL_FMT_1 CALL_FMT_0, "d" (r2) #define CALL_FMT_2 CALL_FMT_1, "d" (r3) #define CALL_FMT_3 CALL_FMT_2, "d" (r4) #define CALL_FMT_4 CALL_FMT_3, "d" (r5)