Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp37647imm; Wed, 30 May 2018 17:07:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLkNYiBVOfBHkCDZQvYWQCeK3XhIG+pHGwiZiZ2NZ2xgfmjCwYsg4j7mG4DkCstjiBzaH+P X-Received: by 2002:a65:5784:: with SMTP id b4-v6mr3754952pgr.317.1527725252861; Wed, 30 May 2018 17:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527725252; cv=none; d=google.com; s=arc-20160816; b=xU9wjKmM4ocMkK9wvlcnJaeXd1JzxD2qmfT0/ToYwX9R8nZsdTFN+i417vsT/Ug1cQ GxtY4o6how25FRQwRNbKSDlpQ3eC2mUT7WdtdROBvnGkK0LMZYkS1Rl2lug3Uoaa//0Q JMyX+LFJay60D+co8Z0CO8i2/5/o7FxJpJ+lvY4WQqKKgIAwydlVFsF/8pMNRGDMIgWO hNhaRNCABohI64e10akaeSV0fH2yWxRNsnRTCgdbHe91ozWB2kBpqcn0PasM2EHh5B40 X/d/1NNJjIlhH7EP4Y8WwCc5kuvtjUDudWhx4/PMc6ZyuCudGNiFtMzrXpw1g9cHIVQv Dv1A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=GoviHrwN7e8AO6TnnGMqUD9sqS+cFSGHgRNpjOVmB1U=; b=P/HLiv/0WaeEVsh13hwzoLHFxZawrL9291UXoJdTnomGDPe69NbUDHKnfgj9a5r+Q8 Y98hCg7OaW6oYMtpjRx7b+l06F94SjCoiDCSACQer88MkwKFG5DtBpqaEscwBiun7YdD XBy2/C9xMPvuJvxCDGOEu3ZuUhseqoXCCc0eiQvXqJM5RLJs1Cqt8uc06feSlkUZYmue nOAAGTvNF4EMQYCxekYQfGmEi2bVh5LtSNNEjmfbSDnCZwGVBbIvArny8RxYXJOq9AUW tndrl4AkwBi9WdYm644S60tLCO/hl0Nc6k38nt6mghMD3fFuFZbdPI2NXN0hiObIQCej LhDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=03fyUlrX; 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 127-v6si36013681pfe.49.2018.05.30.17.07.18; Wed, 30 May 2018 17:07:32 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=03fyUlrX; 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 S932548AbeEaAGt (ORCPT + 99 others); Wed, 30 May 2018 20:06:49 -0400 Received: from merlin.infradead.org ([205.233.59.134]:59790 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932091AbeEaAGq (ORCPT ); Wed, 30 May 2018 20:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GoviHrwN7e8AO6TnnGMqUD9sqS+cFSGHgRNpjOVmB1U=; b=03fyUlrXi5SiWampbA4moD8m7l kzpJQQKn6Z473c8s25c4qjN69njOvmxf+mR34BP3XYFOTQeZeguDdpMT21gj2m9RbdOhI8y2uPS6s bNIkRanip+34rDZ38xPJ6KR5IOVTF/yLCH/fLUArlP/d5Al8WPuk5N9e+jaubu4kgiP1xBiwvjErk X0nbuh24Q8gc0f2S/TZlunzzrdfFPiLIDf/Nob02Kyuekx/U3ljisSKtRB5DuCbhsRlPBL+yhrx5/ DBQgLJLjG6IPl7m9ZEaLt5GJygVtTMPIZQRakroYhNKcaWidj028soJX1C/ebTQBYa4g8AeDqfFP0 PoFVxZKw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOB6r-0000CW-Ib; Thu, 31 May 2018 00:06:29 +0000 Subject: Re: [PATCH] kbuild: add machine size to CHEKCFLAGS To: Luc Van Oostenryck , =?UTF-8?Q?Andreas_F=c3=a4rber?= Cc: Masahiro Yamada , Michal Marek , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , Ralf Baechle , James Hogan , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , Brendan Higgins , Martin Blumenstingl , Cao jin , Nicolas Pitre , Linux Kbuild mailing list , LKML , linux-alpha@vger.kernel.org, "moderated list:ARM/Allwinner sunXi SoC support" , linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, Christoph Hellwig , Rob Landley References: <20180530204838.22079-1-luc.vanoostenryck@gmail.com> From: Randy Dunlap Message-ID: <01db7e93-89f3-361a-29c6-5146cda1d745@infradead.org> Date: Wed, 30 May 2018 17:06:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/30/2018 04:06 PM, Luc Van Oostenryck wrote: > On Thu, May 31, 2018 at 12:00 AM, Andreas Färber wrote: >> Hi Luc, >> >> The typo in the subject made me curious... >> >> Am 30.05.2018 um 22:48 schrieb Luc Van Oostenryck: >>> By default, sparse assumes a 64bit machine when compiled on x86-64 >>> and 32bit when compiled on anything else. >>> >>> This can of course create all sort of problems for the other archs, like >>> issuing false warnings ('shift too big (32) for type unsigned long'), or >>> worse, failing to emit legitimate warnings. >>> >>> Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT, >>> to CHECKFLAGS in the main Makefile (and so for all archs). >>> Also, remove the now unneeded -m32/-m64 in arch specific Makefiles. >>> >>> Signed-off-by: Luc Van Oostenryck >>> --- >>> Makefile | 3 +++ >>> arch/alpha/Makefile | 2 +- >>> arch/arm/Makefile | 2 +- >>> arch/arm64/Makefile | 2 +- >>> arch/ia64/Makefile | 2 +- >>> arch/mips/Makefile | 3 --- >>> arch/parisc/Makefile | 2 +- >>> arch/sparc/Makefile | 2 +- >>> arch/x86/Makefile | 2 +- >>> 9 files changed, 10 insertions(+), 10 deletions(-) >> >> What about the architectures not touched by your patch that previously >> had no -m32/-m64? (arc, c6x, h8300, hexagon, m68k, microblaze, nds32, >> nios2, openrisc, powerpc, riscv, s390, sh, unicore32, xtensa) > > As explained in the patch, by default sparse uses -m64 if compiled on x86-64 > and 32bit on everything else (well, more recent versions use -m64 if > compiled on any 64 bit machine). I think that most ppc devs use a ppc > machine and so ppc was most probably fine (at least ppc64) but I suspect > that most of these others archs either had never sparse used on them > or had a lot of wrong warnings. IOW, it was maybe OK but most probably > incorrect for them and now it is OK. > >> You forgot to CC them on this patch. > > I didn't thought/knew it was needed and the CC list is already > quite long but, if needed, no problem for me. Ideally, adding linux-arch@vger.kernel.org would be sufficient, but sadly I have doubts about that. >> Have you really checked that all their toolchains support the -m32/-m64 >> flags you newly introduce for them? Apart from non-biarch architectures, >> I'm thinking of 31-bit s390 as a corner case where !64 != 32. > > Hmm, there is no change to anything I call 'toolchain related', like > compiler and linker. The only change is sparse (or any other checker) > receiving now a correct and explicit -m32 or -m64. > > For s390, as far as I know: > 1) it has CONFIG_64BIT unconditionally definee (because the old 31bit > is no more supported, now everything is s390x only). > 2) even if the *address space* was only 31 bit, I'm very sure > that sizeof(long) and sizeof(void*) was 4 on these machine > hence -m32 would have been correct. -- ~Randy