Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp93133imm; Wed, 30 May 2018 18:33:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLRncnnOh3r6bL43zliqq/LjewgoMmux8hmiTsS5s6r9DhEmUiyJ4r1CUpfhhRfsiWlLcLe X-Received: by 2002:a62:8b0a:: with SMTP id j10-v6mr4916206pfe.28.1527730419992; Wed, 30 May 2018 18:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527730419; cv=none; d=google.com; s=arc-20160816; b=vyfO+1GiVy2uQ+jRPDV5+hdKN2KkY7JfYLUDLBet5ZEKpI+sCQDy3FABjy4lnOff6H HlUrt0cMy/YdvaUw28POKc/7PuazLZ39EeKuBg7JhvcflZ90Rj/MS/JFgiciL+4wMTpO MLLfn9ATBC14xDAGaY3EElFZi4pmnZax7yPfSxuF0MHKTcZMOkpSU+rDhzXt0rcipgNS 0kfwrEXHqlXjl8izeRtC2OVe8SLEiEbqr6WcJX2G3xZMsFJ0+Qg4R23uugIEK6KtLDNb EKkVe5UZX1xxOBh1rsuvnzZO65FDsWf/yhJXF19QoPi7ZQFgWzKKiHYepHCfP4+EGqr0 02IQ== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:dkim-filter:arc-authentication-results; bh=umFZwwKoVrClAkiEXAXVy8YYb3HJpBcwey/N9CUPxSs=; b=N05COStoME3HJz1mRzYG59vsjg4hxIuPo91BqRf2s87ScagwC5CDRRzVlHei1MR3/k WN59O5qjJsiBNST+BEBu5DRQ+JFIh+BB02Qy0jdLzPgcz5OgVFK7piu1rUtGW7Gl9dCg aw6nwUBQB/2fshgatyVvGTfc6h8QEetgGVvDMHrICMvJV4VJX5fQ67R8CifsK4IcKEp+ SCN9z0dM6ZDaNZOcaKg1rAQnwgXDTbjiIhgr918M8PTWpbJ9Ff2dw8f3scyEzXlEkKLs BD1koWdBNmtUkD3amPZ7MBNN2zDmqGpf9g+RtV7e92XIwmqz2KQCqVT17S7RwRylD9gV DiuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=UQchLP1a; 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 u16-v6si17276222pgv.600.2018.05.30.18.33.25; Wed, 30 May 2018 18:33:39 -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=pass header.i=@nifty.com header.s=dec2015msa header.b=UQchLP1a; 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 S932688AbeEaBcz (ORCPT + 99 others); Wed, 30 May 2018 21:32:55 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:38545 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932593AbeEaBcx (ORCPT ); Wed, 30 May 2018 21:32:53 -0400 X-Greylist: delayed 131041 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 May 2018 21:32:53 EDT Received: from mail-vk0-f53.google.com (mail-vk0-f53.google.com [209.85.213.53]) (authenticated) by conssluserg-05.nifty.com with ESMTP id w4V1WWXv017753; Thu, 31 May 2018 10:32:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com w4V1WWXv017753 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527730353; bh=umFZwwKoVrClAkiEXAXVy8YYb3HJpBcwey/N9CUPxSs=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=UQchLP1aLMJj4iVvbNPsJuVV+zTAKBxPYN+UBFl8F1kL3xI2jucDqijr/8VwuI55C z99Z8hUct99TWAa8IF8Zsg8GBcFxf7phySdKDWJxc2HsWyVnMr9tfujNNoGOOrGUIU shLpAwPMB3dDSi6KD79KKYFm4d4SIj0pMm5awFsXTXor2KSNIY8ijPqQAC6Dj2UQme 1cUI18/XF6u3cQYEtq9Rys+p6pebUVlCnDldOLkhkKsC3wHSU2LUWPyNO90LjfgVMJ 5AEgeHAhkW3iG/Om4eh41aXhuOSaQVBYatQnS4atLhRb3OGStvx71eOHRumzsU5ysk qkBPXcHn/F2OA== X-Nifty-SrcIP: [209.85.213.53] Received: by mail-vk0-f53.google.com with SMTP id s187-v6so534235vke.9; Wed, 30 May 2018 18:32:33 -0700 (PDT) X-Gm-Message-State: ALKqPwe6aVuPbLX9VMsFWZCdJUHDPpqB7saWSIuRQuv0AK0RFj3QATYO AX6NZTn9Q07RT/E5Unrkh8BIIRMT0ywwhvGqXK0= X-Received: by 2002:a1f:b143:: with SMTP id a64-v6mr2965349vkf.65.1527730350158; Wed, 30 May 2018 18:32:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:20ab:0:0:0:0:0 with HTTP; Wed, 30 May 2018 18:31:49 -0700 (PDT) In-Reply-To: References: <20180530204838.22079-1-luc.vanoostenryck@gmail.com> From: Masahiro Yamada Date: Thu, 31 May 2018 10:31:49 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: add machine size to CHEKCFLAGS To: Luc Van Oostenryck Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , 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-parisc@vger.kernel.org, sparclinux , Randy Dunlap , Christoph Hellwig , Rob Landley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-05-31 8:06 GMT+09:00 Luc Van Oostenryck : > On Thu, May 31, 2018 at 12:00 AM, Andreas F=C3=A4rber = 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, lik= e >>> issuing false warnings ('shift too big (32) for type unsigned long'), o= r >>> 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. > >> 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 !=3D 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. Right. We are talking about sparse. Nobody needs to test vmlinux or whatever objects. Except the typo in the subject (I can locally fix it up, though), this patch looks good to me. > 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. > > Best regards, > -- Luc > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" i= n > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --=20 Best Regards Masahiro Yamada