From patchwork Fri Jul 12 09:04:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168914 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp595274ilk; Fri, 12 Jul 2019 02:05:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwa8xXvqYJfcnSYtcYYPurbnP6fut2mD2AQvCKtYwkTX1UuRHz5OjRY50ok0fu+TWxVV1ik X-Received: by 2002:a63:5903:: with SMTP id n3mr9414598pgb.369.1562922320097; Fri, 12 Jul 2019 02:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562922320; cv=none; d=google.com; s=arc-20160816; b=pKYgqf0h6g6V7p0JyuWwuUQuzNA2Ngoo320fOoSH6/EMXxAmFL9GCNgDPweNo5luML pbmK8f/9YuktkrFpc7krWkXr6aYcGgu0AXmgrV1Zg3SYe8HqBJ98lPSJlQHHQd6jwqir GRfkfNXWqsOEnnLxkAD3tJevjsLXV15m2IH01boBQJ6zeJwiofhKRsxOKTgB3qSFVXJB 2YbJZDjWLd9EWbjybmNjCa8BMoZjBpgswYzzyGf191IPbraIA6Gnm2lAHU00jSl4IRtm jxZoLWECk4lLHqYaPkcnAZA+6b01b3aI/c8cMo6ldrvc1ZbF4ZtVeIDKqnmrJzjzTubH qbpA== 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=+HBe9Alwaw2a4PnmAusbor0qMLzxOZ6v3mYmR08nWEc=; b=lSpBTXkXM6h04Q3G33YmQYHh5TQuWzV05EJfZXPi3L1pAzd2GBxmuoBkc831+RYNnP KD+oTers8GOyAN/d3OTiqzxtkfT/XUAv5//Oo3PAo5HTo2MPl6WoSP0mCwTiEwpujEHD kOg8Idkg4hpHzMmCPol8SyvT89ej/OMzbj6T7v03ZuKvg4xAwXHjbdvElIsD5ABOCfP2 4GL1zgAgToWYyaZ2WrOas2hG5Bo7Vv14KWFEi2Cwx2/rLTArrh5SY9ZeWCiPtfN4TTvs BkIurABKkZQsxiQf2h0hmsYkHHdrdfGy4KPRnqB17jWJRfvi6qaPWsrEfkRfPEwELF/F IH+A== 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 a63si7232843pla.348.2019.07.12.02.05.19; Fri, 12 Jul 2019 02:05:20 -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 S1726130AbfGLJFS (ORCPT + 29 others); Fri, 12 Jul 2019 05:05:18 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:45061 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbfGLJFR (ORCPT ); Fri, 12 Jul 2019 05:05:17 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MV6G6-1hwH5Z2EoY-00SB3h; Fri, 12 Jul 2019 11:04:59 +0200 From: Arnd Bergmann To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton Cc: Arnd Bergmann , Stephen Rothwell , Roman Gushchin , Shakeel Butt , Vladimir Davydov , Andrey Konovalov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] slab: work around clang bug #42570 Date: Fri, 12 Jul 2019 11:04:39 +0200 Message-Id: <20190712090455.266021-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:Ny01W1sDzoQkytMwytJIIrYFKJMAp43dk5NNDspRvnOllp9EkZr VuzyTUNjSse8EsEyCqr7kc40Ba4ziU5ZJeO+1M9SBaOgjKuIZikTFUdKqTjhsp1dC0hMyAb pzT0cscZoUzBS9aQuvnFE7VnM1CNm1uE1TfgnnqFyCIqm3ZduBeyRgSaa+3GiB+97zyK7Fg Vq+dXYbjGqocQuWH5gCnQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:FRhumaWfoBg=:uF2ZId5iyFd22A6N4mOrDZ DtmIL69RcbPhxVSvodv4SUhsYV3+yTK/vCQrNs/qghahhIl06Oaaj1oGMBTiXb1ZEJ0kvWka/ sKHJbkSki3UoNonkKIXFm6kJbKDjygapYoW0EpCAJQ7ysWmxe2LOwY5SeEOr18TmoogwlUW7w RWOiJpzdMDSPkR9+1kD5+ouGToWbg07Sh+iVwcqcvBLDRIFuY0Lr6K3WfrDh9+igLUXmNr9Dq +uoq6gYSfqg6ZQr1Ta+90TtUt9blY4SiRiiHiBz4uU6cw4VFzSa35XjGdq6LdAHaoA6zNigPQ ehN3T8Bwk+7/ZwQFIx8X6EJXFRMVpz36YVZwn208Q+krl8PTa17VZDTpRmxz4I6XyaHEcd7tw XNjGA21LQmrxeNMfuOTYT59cD6THL8xnGL4zEuVG5mn0+zotPWlKWihBZWGGp/zCQQDeMuqmg mH6GfOwLdOsSOQHM/7q1NYMkDcCLJvbKCqICmPvX12LY5VeJXgbjSbUlkr4D+aCIARFWGN4bu 2/uYYtvJ8MkKxNyV0wjTIg0X5VtdPvj34xCu404qgrfovh86PGxQeY5y6lSi3G4kic5Rgz3tv 4OlnfYOM+WO34ViWN+LZnpgELAknvuzOgatnlXyoQaf1ho4dY8cyqujhqcHuJeoiio9WKRjEU ZsSHw0gqQmRAi5jhR7aDBJr2ye0/ArzAZ+LEuIW1OOWycpVPns/zzcQh5FBLSnsM9+WagkJsQ RO479U51Z4FBGauyIZAB2MKq45G9BqYlZQN9eQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang gets rather confused about two variables in the same special section when one of them is not initialized, leading to an assembler warning later: /tmp/slab_common-18f869.s: Assembler messages: /tmp/slab_common-18f869.s:7526: Warning: ignoring changed section attributes for .data..ro_after_init Adding an initialization to kmalloc_caches is rather silly here but does avoid the issue. Link: https://bugs.llvm.org/show_bug.cgi?id=42570 Signed-off-by: Arnd Bergmann --- We might decide to wait until this is fixed in clang, but so far all versions targetting x86 seem to be affected. --- mm/slab_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 Acked-by: David Rientjes diff --git a/mm/slab_common.c b/mm/slab_common.c index 6c49dbb3769e..807490fe217a 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1028,7 +1028,8 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, } struct kmem_cache * -kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init; +kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init = +{ /* initialization for https://bugs.llvm.org/show_bug.cgi?id=42570 */ }; EXPORT_SYMBOL(kmalloc_caches); /*