From patchwork Thu Jan 7 23:34:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7980701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65D08BEEE5 for ; Thu, 7 Jan 2016 23:44:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93A6C20149 for ; Thu, 7 Jan 2016 23:44:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B45862010E for ; Thu, 7 Jan 2016 23:44:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHKCa-0006TE-40; Thu, 07 Jan 2016 23:42:44 +0000 Received: from mail-bl2on0093.outbound.protection.outlook.com ([65.55.169.93] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHKA0-00028L-6l for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2016 23:40:10 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) with Microsoft SMTP Server (TLS) id 15.1.361.13; Thu, 7 Jan 2016 23:39:33 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 12/21] arm64:ilp32: share HWCAP between LP64 and ILP32 Date: Fri, 8 Jan 2016 02:34:30 +0300 Message-ID: <1452209679-19445-13-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> References: <1452209679-19445-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR01CA031.eurprd01.prod.exchangelabs.com (10.141.191.21) To BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 2:N05EPM7UCrZaLOtwColAUCZC2GBH2Bt3MZwbHTMYs9lWwWtfvdTt0kveIz22fv0HXFXn64QOKUy+1ONUwEaWcrFmVbuTTdLJC0tn4QuRixkGod6JVKBEVuBRCNOPq2qDTQj1Rie84sB+SNKoEQ3PHg==; 3:VHySyCrtJ6fug+my4VjQxmKmC64pvO7inB9gfa0zMiiv5dvOmSIHan+VJm2NQAxp3K83LxLtYq73TARlypQk52+J2qD+VWuiTihQnm5Jk+9MJ3Y5tZldDtWBOpfef0yR; 25:t52sIkrmJBsXG69x0owIdBfyUm0dz1ijysYEsJ7Js8dCXr+JN2LrIDYUmi+LPh5ygFmCRcQk+aPtfA7QFwmFLobma3gXQhPedgiAq5KxCvpkIAb7zzOSXZiOgn9uxXqxHrjH/iww2FS17fZLlMaoD5+84VWN2flPRDIJM5DsKkXtEXyO47MiCIBiejY3XgTPn+KJ283ZBDeB0GPrmd2R8WqOXKnNHEqPlV3L4CeYpzngE5EQhj0UsOmTnTMqE8hX X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB613; X-MS-Office365-Filtering-Correlation-Id: 6973a1ff-b63c-498d-59a2-08d317bbcc1d X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 20:ogYxWieGeRAtwm6F8LfQ+CKnGS6LUn79jT/A+r/x3v22EZF7gMzxAeo21rDtrSChcpQ+YvkuBUnnW0rJuArsg3crDlsUipPsdaS5JFfHDCbQPxECBVnGOV6Xk/brlZ77Kc8DislwVfnN3+sCuKCDyoyqU9IAXUuaQl6jt/N5yWBPBgho+nYWEcIW7F83L+Z9BWk9oNnXJTKbgpcqndmPcSNGTJ/eo6MYix/z3wrfV6x8+SD++WYQTtpJIc3586XhBcd1bb7B/KFINfPXqMjgKFt7Ili/ODVLVbM8nhtpKzuwNiFqbijbyGtqrPOrKgnDcoGUlOXRz0LH6+ZcPcmDL1b018D72h2p7mUUh/PIIshzleqyd3GgqxqGMGj8iPBD+FvrafHJ1T5RjwEZ9noStbeh2uTp5BRLjUFuRgKzW7d3Zr8WggAXihwHK0S0Eyzsh/1Ur6gIMIW/RfHGqrV0U6Tf5v9ixkJjDjpXMsvYW9vXsYmp7X+pnA82AdD5GK1lLMUSnGvREZrjSIdjPx+ww1/E8tvHQW/bqdQR2ZrTWslyQcmFqoS1GT1bXsMYHJjOOUcgYOtGR2Qr3jWuScqOd13Q+zobxqxYahE25zG3w/Q= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:BY2PR07MB613; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB613; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 4:QuNqPlIvQS7YkaWqQFzFA7Qgjc8pcIFqoywKpxAoQX1JHl1qkDSJWGvvV1P0GANZo/NK7rWxs9YhuZTCON+O/IAISR3wf+EqfvhxcctT7K6TJbY92tuOrK3Iv5fWlefIgOJ9aEYyskEd5/15MoBAK4Lay6hx1JIFlyfK2d+SgBtgC49SKtit2I/0Lq8H0dySYvwovjbkdPxig0h2FCRX2k/ZPHH/nJxYzTABCigIXJv5Cem6JIpHGB7zWRrvpvVaUbh2mM+1UrwnV+k+/+Lw74kOK3rERVhyGkl2TRnUB9nKRHAwhyoe3ipjEg2yK47zfma6T1slfKiRFZJpKsUNqSs4S+pdymTgyxgV/ij/TWClzOzBaMVg21XOaMfGxqNvl8xlsMMzvEogWFw8avO7hxkxr6opciUi1cKjvxt/wKfU95IQBSDgv0zWfaojdWIn X-Forefront-PRVS: 0814A2C7A3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(586003)(40100003)(122386002)(5001770100001)(87976001)(5004730100002)(36756003)(4001430100002)(50986999)(81156007)(5003940100001)(42186005)(97736004)(48376002)(92566002)(1096002)(47776003)(66066001)(76176999)(3846002)(2201001)(5008740100001)(106356001)(101416001)(50226001)(6116002)(19580405001)(4326007)(2950100001)(77096005)(33646002)(107886002)(105586002)(76506005)(189998001)(50466002)(19580395003)(229853001)(5001960100002)(2906002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB613; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR07MB613; 23:lZapOf2mNgtn1ve3eMOWnjpQ+4vKTTUdLzSaW/L5/h?= =?us-ascii?Q?oomubTLbVlTGLAOgJzQ3aJ11JJkBsvVWC6Vd5T0o+EtuBIe2mzdrrqSdOV+T?= =?us-ascii?Q?tYoLCsjmqD2qy4gemldd2inbtJ8c2IQ6JEAZXsX2v1egZ8yvsxZcPH5FnjUl?= =?us-ascii?Q?wXWfSvD/GXJ+++rypiaXGDT0m7BELq/9IyIYdjoQMXquIyCMc63klu2T+iRm?= =?us-ascii?Q?Il53FVYB0C2PdcT041l7GUZJwbC/CAkpggQj6HWuSU8zSh3vqN5laKAS3DIu?= =?us-ascii?Q?5HcCRHTuD4TvEVYlrKHRGKwvDhFKO7f03iX4xJcH0NPaq5pUkjQvhTfnif98?= =?us-ascii?Q?oThppRibRoNaxZPsGh6u81idArp82gtoi11SMUh4po1h0h4edxpcvw07/+zm?= =?us-ascii?Q?ihraHZk4V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18A/OghYVL2RxZ4JBxFpXz93OcD//Bv6NeWsibZsRSNc/qwtICpBKzkH+tkgU42sblOiztWPfeA==; 24:mN/nh3kl+a9tAG90H7P7Oo1UZz0b2zD4ag2GjZHiJuoucku0vUxH+PBqIVlhNjJqyPauUa/egt9HJ2WF7XuQDbZkk1+xjcU3XGDFI1/B4Sw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2016 23:39:33.6108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB613 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160107_154005_149362_86CE6556 X-CRM114-Status: UNSURE ( 7.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, broonie@kernel.org, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, Andrew Pinski , ynorov@caviumnetworks.com, jan.dakinevich@gmail.com, Andrew Pinski , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrew Pinski 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/asm/hwcap.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 400b80b..bdb1ae6 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h @@ -47,9 +47,17 @@ #define ELF_HWCAP (elf_hwcap) #ifdef CONFIG_COMPAT -#define COMPAT_ELF_HWCAP (compat_elf_hwcap) -#define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2) extern unsigned int compat_elf_hwcap, compat_elf_hwcap2; +#define COMPAT_ELF_HWCAP \ + (is_a32_compat_task() \ + ? compat_elf_hwcap \ + : (u32) elf_hwcap) + +#define COMPAT_ELF_HWCAP2 \ + (is_a32_compat_task() \ + ? compat_elf_hwcap2 \ + : (u32) (elf_hwcap >> 32)) + #endif enum {