From patchwork Tue Dec 15 21:42:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7857661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 412A39F1C2 for ; Tue, 15 Dec 2015 21:53:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65C02203C0 for ; Tue, 15 Dec 2015 21:53:18 +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 8981A2037F for ; Tue, 15 Dec 2015 21:53:17 +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 1a8xVL-0001OF-6H; Tue, 15 Dec 2015 21:51:31 +0000 Received: from mail-bn1on0080.outbound.protection.outlook.com ([157.56.110.80] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8xSZ-0006NC-Fc for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2015 21:48:44 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM2PR07MB622.namprd07.prod.outlook.com (10.141.177.146) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 15 Dec 2015 21:48:16 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 09/20] arm64:ilp32: share HWCAP between LP64 and ILP32 Date: Wed, 16 Dec 2015 00:42:35 +0300 Message-ID: <1450215766-14765-10-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM3PR01CA050.eurprd01.prod.exchangelabs.com (10.141.191.40) To DM2PR07MB622.namprd07.prod.outlook.com (10.141.177.146) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 2:aTNOM/K3Ef1bCxuR17lJWI6/eNonJl7FqgwLKYWepy8rxYAXfxPAxadx5McUSF42o6bWA/yd9uduxs1AeurD29dVQJZ5ExnUOoVeQl7lkSwN99JpL/zLT0YpI64SSqAz9gakn9xEIidWEO3wX5yAxQ==; 3:RG0fBaUoZUrt2H120hfmiG+hYhTBs4IYTZ/WJH/MwL9QmogXQ9zjS4HGBPwYdX4BN2imIZR1AnheDDi0hB7cyntiie9s0oEk5ZsNgGVzOJ5v2Mi59i+zFgjdvYIi7NhS; 25:XaDm4aXoRZFKYnmi2318Dgrio2FyMPvnpBKHcoiB1cgvgvTfLSmE5mWRqouv8Bo9WhAyeSNcCzIU9mO9i+6Fcahy5oan3r3V2vyQoaAgrv48NHpkp2j0qVjAWl9yiVbRW68iEUJ7ui+ZLWctb9xyVXRm2KkaxgRyKpZjDIIq3wF/076XzIVfNVJAj53UtqvOOCbpWZTeinTfBUfbDcXQKIvdvMzvOdHJzu89BFfveHQ1jG4Bbf2iTWSbH78RJj6SE9g9Y4W4UKzxj2qWR8m+bg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB622; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 20:PzKBM0j5mRqchZn89fnELhIC6WOf7y4dGUE0IbVB67lUqn10oOQn2tZI+sy1nRbwAFo82cu0OQGDx+Maqays+vRAf6pq5guzmt8NJ8hcep9h8hEVEAYZgW56KmwuKQ+8lfQePxeXFZf/rRj1k6wn3PMy+y0amE5oPsjiIby9T5v6WyLyjcbQ/Lj5IA2RhreKRxaN2GY4zF97CeCSDQwtUztGlm5HWzFLcWi4fdnUpVgOURMtEaCQwtbsnvoXEBQeJ8d4q49Byia4wjaHfoFM4rySWgnZ6xCVa87rauWJyqV1swBkiOL5zTmYeH8lsFki+svcJtpHYl3GlBYnn0hVZuXdVdmRD3iFfCJ6q7PMHIWIdrDHaI4QTzhpbm4boEjmvtsoGh95XmM1gtf2iunVJQN7NiZrnQOWROnP4S6eOZrPkIdx5bHlq3m8xDZ9CiGkccf69gp6dTeyIINC9Kv7ItADPPpJhagmXs0tf3Rg4KjrxgZ+yS+alCxpLRllp4lhtDUj5cbLyu+lzLkzgefLNuC/5NfRwR6vNx2ceHLw9uoe58N6XiTRvyhaUBDqhJak5rgEfr0RQaRntn4GmZXcrTCuaDA9wHrCgnO3OFWVcEg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046); SRVR:DM2PR07MB622; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB622; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 4:3HXEhFmYTpmgexvddO7XLlGqTdMygqEv44wFCiceGZ8QlMxIL7M4XicuSyYWHFhTLtqsSr2IY+fKN8Bb75je2UoNsfymdSpT3xFfY/BX4uSkiQM2QXxTvyD7smWlSq2JPMplByXqjn127gANoOlaoBoZI97jZaV0ZJd/g6pszVLNmOLghzwnY437tXcAVPvR1W8YZ1BCuTvnH1pY3mJKgNJG6iCYsYupmFloirMmm8nC6HOcNwaisOL8bkpqhvDAe41kCLpW/eeVH1wDDs+7the/UJXwhYMdXcpXGfYEEo4bvzjc6JNjYWeSXF/leCMLHOnuCbdrqm2y6uCkhVCpHGsTSl3Sg28fpkMsnQeaQ3NAHa0UAtuwchUyFRe0LYxf7P/jIwh0BzGAeKb3ye92P/yDhNcZmPUE4EYSFZp4SvlCjrxJkBdfkTR/nEqQheqt X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(77096005)(66066001)(92566002)(40100003)(33646002)(47776003)(122386002)(87976001)(2201001)(48376002)(81156007)(19580405001)(101416001)(5001770100001)(97736004)(5001960100002)(107886002)(106356001)(50986999)(76176999)(76506005)(50466002)(50226001)(105586002)(42186005)(229853001)(189998001)(36756003)(586003)(5008740100001)(5003940100001)(1096002)(5004730100002)(4001430100002)(2950100001)(3846002)(6116002)(19580395003)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB622; 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; DM2PR07MB622; 23:qVMgsS+Gk9XGKrLWIE/vuL4/XLVaBzxy0DARIhWFJ9?= =?us-ascii?Q?9X/W5K3N7IlXxsZTKPCtsccq/GXhttcOmWQn8hNxR3TjTY1CepWSTaEA1mGx?= =?us-ascii?Q?wqskpeLvXwh1Npnpu6il2MKmkC7NhlokE8jZwmM87sS3mwm0yabXdq1CwAKg?= =?us-ascii?Q?xiZvGFrrQ0hbRvXAhKij6UtqynugHqqp6xM2407zW2gmtRrf2lkS+ICsQKh6?= =?us-ascii?Q?nwjNUwYO2hBQkPR6POss5zekWQAxvQB1wMbd2fW+tH6u3xtt/jpYKrLhfP+X?= =?us-ascii?Q?w1RGVa0YaxLQAFL2VLQkc6uaI2RejXc6mGb9K6t5Ahw56aYKw4xWH7n8KvEI?= =?us-ascii?Q?F7tXOENGq138SUorYTA854bwTE3CgD0mAJ5a46+7LYjiww4chGk1+NRExGi2?= =?us-ascii?Q?X6i68YUHSHkGFaM+vvJ5fOxVcU4y81qsJ/GwzBflOvytZBH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H+nzOskAbmS4ZW3DFuC0sbDrbeH8RVk/M9NhUycXXxSMlRPlQafxtraf8NYuj5JvND0jrzdLlvC6EAgC/VzZ6/K4W+cPYR6SnKqMY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 21:48:16.3584 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB622 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151215_134840_203934_C7372BF7 X-CRM114-Status: UNSURE ( 6.34 ) 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, T_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 Reviewed-by: David Daney Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski --- 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 0ad7351..1e5361e 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 \ + : elf_hwcap) + +#define COMPAT_ELF_HWCAP2 \ + (is_a32_compat_task() \ + ? compat_elf_hwcap2 \ + : 0) + #endif extern unsigned long elf_hwcap;