Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1696508imm; Wed, 16 May 2018 01:30:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr2NOaUM6YTi9OH45zBWvzfZTaQwItPgeRUssL/m0ffmf6VO8H5QuDg5CWfcydgmJPRJERR X-Received: by 2002:a62:ea1a:: with SMTP id t26-v6mr19033721pfh.117.1526459410355; Wed, 16 May 2018 01:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526459410; cv=none; d=google.com; s=arc-20160816; b=Qo8EDLtFq/EcHP8S47sdHAHPwH9d3yyurCnkUSwdETxLcieimQi9WuxKrY3AgrlIxj FLGWPgOVQ7qLpyi75VES/Sk1Uk03vFNg5a9WmZHc+GLdMOacjR4ooIriLUyOBcwR6XQf ZLGlUDxf8O17K5UHtIsw+OOCxSBcowygH3fcdgOs7i9UHCKSL13X+6k9ZYAPx4UVVJt/ tbrZAzfRXmPm8Ge9hm5v48YJbOs7S0INpik5t1ciEorF9r7sjRVMDH6K0kPjPHvTbGN1 QPLZO72jrgsXrt4kHSytPgimm2wcqLgpQUHfwktmdlnHuCEsdGKO6VrIl3rCNXo2LWes S9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=k06L/NUKPVaWva0xbBZ9F3w6m89eju95+MZ5+9AdzXI=; b=xPVHxaRycYOMNnc5vcvN+bNDy2GPsAVewpDPxDZCmCV5X4+viqu+R+r2WnZcykyD5H opdSQgYotfm4Sv20ziKdlOUV2ht83pkta6gIYhXMXpzmIK7rokJFvVGKYEwMStJyyWeW 2lV88hxBaELQ+JtqSZ7I2I4My4Mg+zqVbvf4yy92R4XDyNseWEjmD1W7U5kvob3+G1iO nqju1TG9RCmvxNVP0aZx5GfSeF5gl+wqhArY4FnndXwPdWxKLHA5vOJ5ZKjuuXUfrCPw 0tybVHuPE9syrANQaNi0/tIbMzqTcHW8t0njiRAFQgRjIQVXT6X0NeB2nKyTkz5eOvGz 94jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=lpAuZkZf; 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 z14-v6si1662317pgc.617.2018.05.16.01.29.55; Wed, 16 May 2018 01:30:10 -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=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=lpAuZkZf; 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 S1753008AbeEPI27 (ORCPT + 99 others); Wed, 16 May 2018 04:28:59 -0400 Received: from mail-cys01nam02on0068.outbound.protection.outlook.com ([104.47.37.68]:43392 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751664AbeEPIVa (ORCPT ); Wed, 16 May 2018 04:21:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k06L/NUKPVaWva0xbBZ9F3w6m89eju95+MZ5+9AdzXI=; b=lpAuZkZfFtegj2cElvPwnIt4gqtDWOQSJIQsxaLHvrZjedE6mbrZH+lsLftAh9cEgYVOOTw7Ufe8YKspY1/uxq51opwB8q8jq6MVBw6ihu+7/rMt/I5uP0EmmcHej9rK/BfZWTLy7qCYX8yQZXHeQyvQkNOxpiab0bt+xz2Lcjg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (176.59.36.13) by BN7PR07MB4371.namprd07.prod.outlook.com (2603:10b6:406:b5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Wed, 16 May 2018 08:21:27 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org Cc: Yury Norov , Adam Borowski , Alexander Graf , Alexey Klimov , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Christoph Muellner , Dave Martin , "David S . Miller" , Florian Weimer , Geert Uytterhoeven , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Lin Yongting , Manuel Montezelo , Mark Brown , Martin Schwidefsky , Maxim Kuvyrkov , Nathan_Lynch , Philipp Tomsich , Prasun Kapoor , Ramana Radhakrishnan , Steve Ellcey , Szabolcs Nagy , Andrew Pinski Subject: [PATCH 10/24] arm64: uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Date: Wed, 16 May 2018 11:18:55 +0300 Message-Id: <20180516081910.10067-11-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516081910.10067-1-ynorov@caviumnetworks.com> References: <20180516081910.10067-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [176.59.36.13] X-ClientProxiedBy: VI1PR08CA0119.eurprd08.prod.outlook.com (2603:10a6:800:d4::21) To BN7PR07MB4371.namprd07.prod.outlook.com (2603:10b6:406:b5::11) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020);SRVR:BN7PR07MB4371; X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4371;3:oOWHiUfNonkPGQczf/XxQpmYIDyaQJutXmRHeHnO3rCJfkYBZvKDNQT7tuEF9skWAUGQGGkMJFqFVV+dRpoZ0N0T33dOMBLTcpbjnj1O9xkzVxQe/EuLRaFZFyNie2MgpltdXiHFCyGTefoxW329Ev403FihLuzGP1v6JGAxJ15ruhsZul+uQZiSCSBMtdM/9gJcRtVdTrr/8yXbHx/OxWi8QxM4/ZqIsSPDAd4brinjZLUAYIIEyXTG0TriE99t;25:gFIQvwwYuiu06sp6/tufMoapCyKSb4Qakq7WOlmRBa3LixmfA8vVQmKJGu2rs/Pgl43bzrtNQgYJHJMUT0epVxlD863vBc+4vDi8M55yIDUgjGoYI0x5K6Z1N3fHgXaBr5vimUW89EirTRTcMH8LFU5Xift1AUb2583LQKMpKAumdJppgTFaZBYaVvzEvz99nlTbX+4ciuKJqOS3WIminmzAqmOL8jj2rHj8KFeHLekUEU2XYG+wki2eRL+Bx2bsqSgu/cKGi9GoioBrbOACFHvPxQNW7+OSf2ehHsItM9hId5EDWAvJP8yDJ7nKwuWF9jit6uX0QxnevLhpga6LrA==;31:3lSZisl/n/00WhhEfDtEfaD/WH7ugeG8ll04UmbhWFqiHIdI68pTOHZuaGpIRcKDXhHgUYGnzKRf18mUzBWXlKryQOFqjgJr8XSjQRQgvGnF3NW8mzaZJdwyWFDi965s+fBX1ehunQm2ZpsX2/Q1KZcm8x9mrRjn0Ol88mAaOtZrihuQewB27wSFEJHJ+PzbwOdllKVRG6wqevS8W6FpnjBncGVFPeO9wbh5w7hjAFc= X-MS-TrafficTypeDiagnostic: BN7PR07MB4371: X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4371;20:BqeCH444BL/w2hWVlDZzx+ZxjgiyFTps/eKnLgAt7fs+d1NCfXmxkDh90Wx3GcswFxBOY5Mz2InmtsOGoJEiyod/Yk/H6Ve/o5IOYyS2KHYIca9eAMOzVkYK63fK0B7n62s6mWkUY4ruUQcweLj26Hkev5ztxkmry2dLtVObWOGIlMYplNofMioPsObGb/v66G655mUkVw8cAEklG08jpgbGn3Ru2UeutgdaiN+RMjAML5r2AGiA1xF++X6Tuak/GI8AKpODQHCJ4sesL++zAnx+ZgIA+GLo9Sr5BuuurGtAmRmicHojZgQ26P7xa9QGSG0gyUyBhqaDM12yubZdEv5nfYpvSauQM/msdMQNwwdGcINAinSUUh+uhV2wmjsq6LFQzSUExVFhJzy4PvyDWyyzQjjdEk1gmy9GGwWw+q14VGBIZqIpnsrLEzmpfvi3cDtmkj/H5aa9A/PpBUugdHcBRX5kZslmCKQc7apSyicJQzTOguT/LiCX82qAEilZfdEwkI1taRAZaWRyir83QBFuYxzM+wRkrjaHBx3ZOH6Mr9GkMRKjig2KWneSDRhuXGpdCRBugF8l7UuvMykaIVTALcUv5H2chfSK2yMk9fw=;4:DWO9MTE5dWOYUNjz9dzdmitJ0AlKanV+sI14W1NfeaVZ3wYKj1Z1KjbWV7iZOmKqfR1Z+3ZWNsLf0SDcOM0Zlhy04BFqmugeAn1p0fdBD1Kkhx6pbyUepetENwM3khnROMOOyVQephU32q8i5H9zPqD/3MF6MI9VB2mGj/xtFSTPcbGQw0dokgOYiy15u/RWhQ5mJoSsdspJmdWia3UBzzF4NbTmQMWWT8s//8AK+YWrrIsGA6A3T9MlY8eHxJQMs77DJE3Z9e51YSDI63w8rQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:BN7PR07MB4371;BCL:0;PCL:0;RULEID:;SRVR:BN7PR07MB4371; X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(376002)(346002)(39850400004)(366004)(396003)(39380400002)(199004)(189003)(956004)(2906002)(3846002)(2616005)(7406005)(42882007)(486006)(76176011)(446003)(6116002)(16586007)(16526019)(76506005)(386003)(50226002)(51416003)(476003)(305945005)(11346002)(59450400001)(7736002)(25786009)(7416002)(53936002)(4326008)(72206003)(6486002)(5660300001)(107886003)(316002)(6666003)(66066001)(39060400002)(52116002)(47776003)(48376002)(97736004)(81166006)(50466002)(81156014)(36756003)(54906003)(478600001)(106356001)(6496006)(186003)(68736007)(8676002)(8936002)(1076002)(105586002)(110136005)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4371;H:localhost;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN7PR07MB4371;23:g7PLFBkr1mo2/RJQ2f28ewzW41rdGiznkdO/RZkRe?= =?us-ascii?Q?BNNGbujWGolQkgS+iE1L/goo4ZqguyV8qlv2EOayAT1k062qnoZw6S9UJPrc?= =?us-ascii?Q?fMJAO5EDgfathD39dYZeS1Ph31lJXobbKAvrNHh3qLtYig+UzPYqYF0OJiJd?= =?us-ascii?Q?z+Au1nwsrVFxEXRcUfPe120AJ4wjcTFQYWggzXTycJUEGSZncTve7nouTswk?= =?us-ascii?Q?c16zew0MZqyQ+zKj260s1Bg7T88b6W6Lge3F80Llo+9xUySMJxHaPvjBwJbn?= =?us-ascii?Q?E8OWzA0rLev8mOLeIUBBaYkd+Ap69uEbt5X9HhoIkksKLaSx/LyRNqBKiPI0?= =?us-ascii?Q?29O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mfmJgG4vX7yj32mOR/lncYZSY8DFqy4F5PUql+Fwg=;24:0fTeOfe7ICL/eY97cr9e/b3zYUKUg+ZsBw+wxNeSD11JtLWxsKXdyqs3jwPQq1eAYe1gMz+ey27fH1N4rVm9ZgkS35gsp2zibAcFHdCQ+bY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4371;7:jsFyDXsL4citg7onCW7EE87BzIEoQW4ynndobHNoabYK0Ahk8A1rHe06uosAGqepJb7gxdP91hQZF30eGvGWI58RqS7jEWy9K5KcwytCvgrH1h414bXo8xSoq7RxhfvMMdaQZSgeONjMLXoMmqnlgFdSTUcCkJ3t7c1UpA6h0hkljUtusMRqsOCF07BbERrWJb6gAJ/tV4v0lztSLL1JClPhrCqQYpEy7lW4Yu9z6mefheJY6T1Hm9EBZzR7qspp X-MS-Office365-Filtering-Correlation-Id: 1f057e86-6c69-421f-1290-08d5bb06056f X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 08:21:27.3312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f057e86-6c69-421f-1290-08d5bb06056f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4371 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Pinski Define __BITS_PER_LONG depending on the ABI used (i.e. check whether __ILP32__ or __LP64__ is defined). This is necessary for glibc to determine the appropriate type definitions for the system call interface. Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/include/uapi/asm/bitsperlong.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index 485d60bee26c..9a05a9659e76 100644 --- a/arch/arm64/include/uapi/asm/bitsperlong.h +++ b/arch/arm64/include/uapi/asm/bitsperlong.h @@ -17,7 +17,14 @@ #ifndef __ASM_BITSPERLONG_H #define __ASM_BITSPERLONG_H -#define __BITS_PER_LONG 64 +#if defined(__LP64__) +/* Assuming __LP64__ will be defined for native ELF64's and not for ILP32. */ +# define __BITS_PER_LONG 64 +#elif defined(__ILP32__) +# define __BITS_PER_LONG 32 +#else +# error "Neither LP64 nor ILP32: unsupported ABI in asm/bitsperlong.h" +#endif #include -- 2.17.0