From patchwork Mon Apr 9 00:28:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 10328955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B49A16020F for ; Mon, 9 Apr 2018 00:37:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E2B927BA5 for ; Mon, 9 Apr 2018 00:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51BF127D16; Mon, 9 Apr 2018 00:37:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D083D28920 for ; Mon, 9 Apr 2018 00:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NNqqsqeiKFRxDxLROD9yvjVhiPaGU0lxj/emhpPoZy0=; b=BgKSW7PNPU0HJc Vx7nCjfwRI/5l5egyJqFf5M0y/BhzHX6wkCWWWsixQ/lXiYX73C8tpGdtqt1Mhr9YlpEIwB83hZPo sYzk9ArcZHDPpmJi+PJEXKbyAthRMhNKfHRtG/fkwxwe3Nyv11TIqxh+2cUh79+cENinyw+kZEpQ2 myylTJpGT5al/uUAwRe2jf5nD3iDE/uniDEetIoC1yGuGZ+LzVkrudLfAax06FvyceS1ovTIGybcH 0Es30tOWbOPjwzpxZZLIVGr2uckuD2bNweexoMKrx5OK2iUvYoaKEdb+mJz4gNLlLhbiCO5lsCCj/ 9PuWN9sdVASC0/sIZvSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5KoI-00015F-Bf; Mon, 09 Apr 2018 00:37:26 +0000 Received: from mail-sn1nam02on0124.outbound.protection.outlook.com ([104.47.36.124] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5Ko2-0000rt-Lc for linux-arm-kernel@lists.infradead.org; Mon, 09 Apr 2018 00:37:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fh1nGx7r4wKHQJciGz9ZmgwRGgrq+L2or2lars2iZTc=; b=PSeF/wlA1mVpakGPzeLxksJo+m2n3ZQGCCv3AmlLztXXZPI+jx8/8gs7teLf3su5qvjGn7ERxrdSTi1+T5YvOk+Nsr44HQ4rz13/k9PkXNLDAkqAqsXBT/xHlxypqqsw91aGqrU9fJaZeVUuaC4IcvWEMnouxWaxTIXirOzLftI= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:36:56 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:36:56 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 072/162] arm64: pass endianness info to sparse Thread-Topic: [PATCH AUTOSEL for 4.4 072/162] arm64: pass endianness info to sparse Thread-Index: AQHTz5myOU6SHEILQk+uRKLvjTYTsQ== Date: Mon, 9 Apr 2018 00:28:35 +0000 Message-ID: <20180409002738.163941-72-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0885; 7:F36gQKHhbSG+31V8wFsmDwD52GxdLloKPWffApEVdURLyyJguc6t7ZeRYZ73dXnmVdRl4oZ908r+MxLMn+51j3e3tHwgK5C6ZkD8aunb52aL8QdYCsL6CUssEbtCl1FICydTSJ3bFH9IWa29fwMCZTSyJjMrK2u0frxFqUzRqndg/v924cztgC71+k3nNRd1nEDNYDD7pyRJLI83PVXpOKj0jsnoR6CxSkelBQwowDLNajhSCt0agLDEppqYT3BS; 20:AJrfOeXDal87s9znLyFl1BXrBzb18O8z0Gss8gEc5Y0CJK6lnIR/EYGxoJ3BIaz4iTAiVejlf63ykbii2IDT1084xBOeT+Ue6qBgawbxFVHuWDLRvhM3S30ctCQ0h5eVgtlYiVPpwT9ruW2byCi979Po1zV/0ZcGflq7naPKqwc= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 347467ca-da5e-4000-23c6-08d59db1ff48 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(85827821059158)(258649278758335); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0885; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0885; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(376002)(39860400002)(366004)(346002)(199004)(189003)(66066001)(39060400002)(3846002)(6116002)(86362001)(305945005)(10290500003)(6436002)(5250100002)(3280700002)(10090500001)(3660700001)(6506007)(2501003)(107886003)(446003)(53936002)(11346002)(2616005)(26005)(76176011)(7736002)(478600001)(476003)(81156014)(25786009)(8676002)(81166006)(186003)(8936002)(4326008)(97736004)(102836004)(99286004)(14454004)(36756003)(6512007)(316002)(2906002)(22452003)(68736007)(54906003)(110136005)(486006)(6486002)(6666003)(5660300001)(2900100001)(1076002)(72206003)(86612001)(105586002)(106356001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0885; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: W4CRGzR7DiMwU0Pr20FIFAuxikP6hUa8xg/tPnm1CQluf3wMOTQcXJKMD9ES4FUr/qxcYojW5N5QL5Uu+7mLnltnFY4AFjcWXfssLIiahQ/7L6aytV35BH7ZY7qO8/tgWwnNZCNZK4jwfTZPRkYPCNqFOGTEqMt8Xr70bis6WoBku21tQ/s+T9HXFefTiR51Tk8uvQXrCA6Uzw8bRRAU9LaQkm6/GT/Hps9gg3CNVokjksOugeGTOKTuhRy6swdu9wCwNAk8Gxi3vSsWu2txBEb4L4ieZ6u62KYINPrWmTlop43HATcDL/6i+tdqyNdotUkuNQ1V+rEwMPmgJ3bQ/SG1iovpuLL+3+AI72ZXnT7oOPI0EjdvCe/ktm8toW7QWqz8gcfxJCGQHnO2sgEbTMt6cLS/eRoWdCbASYMstEg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 347467ca-da5e-4000-23c6-08d59db1ff48 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:35.9270 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180408_173710_819067_5CF1E180 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Catalin Marinas , Will Deacon , "linux-arm-kernel@lists.infradead.org" , Luc Van Oostenryck Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luc Van Oostenryck [ Upstream commit bcde519e8c325f3cc1fcf443eb6466e6bb3a3aca ] ARM64 depends on the macro __AARCH64EB__ being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothing about it and thus may pre-process files differently from what gcc would. Fix this by passing '-D__AARCH64EL__' or '-D__AARCH64EB__' to sparse depending of the endianness of the kernel, like defined by GCC. Note: In most case it won't change anything since most arm64 use little-endian (but an allyesconfig would use big-endian!). CC: Catalin Marinas CC: Will Deacon CC: linux-arm-kernel@lists.infradead.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 119d1885a3c0..95c667328b5d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -32,10 +32,12 @@ KBUILD_AFLAGS += $(lseinstr) ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian +CHECKFLAGS += -D__AARCH64EB__ AS += -EB LD += -EB else KBUILD_CPPFLAGS += -mlittle-endian +CHECKFLAGS += -D__AARCH64EL__ AS += -EL LD += -EL endif