From patchwork Tue Nov 17 21:16:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7642351 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 E52AC9F2EC for ; Tue, 17 Nov 2015 21:24:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1764120513 for ; Tue, 17 Nov 2015 21:24:49 +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 229662051C for ; Tue, 17 Nov 2015 21:24:48 +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 1Zyni0-0002T3-Mh; Tue, 17 Nov 2015 21:22:36 +0000 Received: from mail-bn1on0094.outbound.protection.outlook.com ([157.56.110.94] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zynfm-0007Ji-4T for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 21:20:21 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by CO2PR07MB617.namprd07.prod.outlook.com (10.141.228.143) with Microsoft SMTP Server (TLS) id 15.1.318.15; Tue, 17 Nov 2015 21:19:55 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 09/19] arm64:ilp32: share HWCAP between LP64 and ILP32 Date: Wed, 18 Nov 2015 00:16:49 +0300 Message-ID: <1447795019-30176-10-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: AM3PR01CA036.eurprd01.prod.exchangelabs.com (10.141.191.26) To CO2PR07MB617.namprd07.prod.outlook.com (10.141.228.143) X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 2:rXjbM/kFHep4U16S0uuKdsXMJkKAMFeW2VyyqsBDAMIbbFQDDyx8lQ4oanMMUcyT8X7xKgpVjHOZRBa7FsmdXLEtBMTx14FUnL9A69aZLgNItpUcyddN7seBbv36gN24Y+XWFyjYKQ1YpV5/lJNVNQzxyF7T8Vxijyoj6yVaDzo=; 3:KmAty0WVUp8hSp9ykdcLgGRva5c5A5gI3qv7uw+C9vG7iu1O1+FmiI6a80hCILEaXXALe6iSVlIori8jRthHwDHxs5SYndPiicuQomOLD4cpeS3lH0uVyhzG/FGZ6xF83AF+hHMYF+oBD4Z53t7wow==; 25:UvDe3uEElmm96X7fcRCa5rEdsnozzwQ5AGgJu4qvwOpYjlggxZTuKVk9pF/JoEdWZanVrWIiYSRldPjsB9kAY0b5lcTgZM1XK5Qq3/GVid4Pt6/Y47FGY0qgGSGtrCcZ6cggkaw5jvJMnFTpZmIYCeA8S6k10BYd17G1CX10ytC5ELH30orXiEE//2z9LkKObVZXasemm+i9klbrI8iVh/b1bUrocQcRhB7mHcPEjOmsf7QdEgSNPdw6RxkZVpeuc28GSq8sJafLKhUxeLT5eQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB617; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 20:XgPtxrMZuSp9o22HEEJS7BXEt1k0P1/IB2rRhTApe6eAwQOYAGYw01DpKOkiJQNXqA4+BGZ9R1US9imugxeZiLph9IZbCV4m+dA/25aJHQ1j3dvJBDs7Y6NFwNfdquJBaBJ0+V7OI7qL/nkM/urF5ymD2a7nHknDYIU+RzKTgSkwyFt+MAhQZJweeHKDMVRZD2ewcHXnOicZOXhG7G1aP7LRqOwSelnfLT5THaKGVlgGtGhCD1mAYCvlfKpHo+OBsW0F1mkxhkX83pTMo7MRLSJBbo2xAHEVC/Na6S0MiTzmZzLCEBZ/nZ7NB/dEZ2QJcTn58xRrueQEB3tgtbeZHjQzX7fcFHunGsucq7ZP3GQC83MzYv/TqlwNnvpr6ZQA0eAFG7NLBZk3NcFjIDDGdWnFCg81B9yiGUiNP6TJYmmA6x+VHTjsrkBg102si3u0+gey+mTvlgZDOfkTm9il98D95AG7cg1vSIuY6u2NDXydnnKdvzu4IK+/SfjatgdNw8o0+/Ji0GBOxgLIJJP0S2uuXUhvDbqi4LKi1ft0kW37vH42+zMryjjeyeLNl6ebQC7t+xH5Z0tSRvoAOjnGAn+pvJBiif9lJERRGKmKcKc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:CO2PR07MB617; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB617; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB617; 4:Plh9bRgwxifhVtwEZRJsr31Q7u1pts5OFOEKX4Ii5NLf3yHdvGzQcl2jpeqTEiM3VXP4FMqCVHku9s2J6IvW0rta08vyASmOIKKfj4PhT7nZ3yB8+R+oUhQrGVokhVVM3bF+O9POd+wwzpeD/AbMSowruH0OcfRdypd9FQ6sWgS8+1dMv3iWS5sK4nTupQbp94q1NR4CR1VXnvmZ56WMFpFuPy0pFpNNSKDwnpyH+DBngfA17UFciZC6DOdoQtBOEkVF4IUYd2N2r1BxPRbIuOf8WQ3MKT3nF61uZIvvXQO9KsNgspMtVYI5JNOGFHZOvD+AxCXxlaqdg1pUSDjTUMFKfRjVgsG1OEVGRSakHLimqFp/wKEcXMwrjA/uc4UD X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(77096005)(4001430100002)(5001770100001)(36756003)(97736004)(2201001)(189998001)(76176999)(101416001)(92566002)(47776003)(5004730100002)(5007970100001)(5001960100002)(107886002)(81156007)(33646002)(5003940100001)(50466002)(5008740100001)(87976001)(50226001)(48376002)(229853001)(42186005)(106356001)(40100003)(66066001)(105586002)(19580405001)(2950100001)(122386002)(19580395003)(586003)(50986999)(76506005)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB617; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB617; 23:8+Mog0VkxTifOidvtrxKyAilNNBRhVG3H0qL4tVgZ9?= =?us-ascii?Q?ESz91ttczet8fWmOIGut70nQzbQ7iWg7zkhz+Wne/E8Ky1cYE6c597ek5r65?= =?us-ascii?Q?3r9WAhj/g56gj4QGL8bGhWU87vCYiPNrjmd3mbCZZBobnvbofNvX7Hg+LlVP?= =?us-ascii?Q?ccssqhylCE355e2MrUHb0sGqjKKvR0EEV/wap4aa1LYXtmDcXzVDuLNyNLnJ?= =?us-ascii?Q?RBluHh/j0Bb0tSzqZFK7wn5GKKwiJsq37R/lS85tDGPC5XtfWiBCnRyuZ9mD?= =?us-ascii?Q?tZJzYD/Dv/zUFq9kTGw+90zHtJilZV97OyivoUnqL8mP3tP6ZHgxBzgDZyVU?= =?us-ascii?Q?mWMDZS2N6iBn3oMBgaNJD8t34+5hB6e9Fy1Wz1kjto3A829nQgXqcaEZtv5E?= =?us-ascii?Q?kGSNQp7Nly+M2r20rGuFkuGqTsHfETXBIFvEoNI/gQFYY5UH8i1CEwZ0MMOZ?= =?us-ascii?Q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SYEmxvWmJIoeB0/Ggik8Udnj1VrzZ1GiM6pngfOmn/xGzJ8JUd3pPP6Xk=; 20:vuJWOc+3ldMLyuV/WUu9AsnyzGFuehiILbikAHBDuYjzr24rtGF2nw9hwejfnmubaI35yLMssuLdy3ViiGGNKw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2015 21:19:55.2793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB617 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_132018_578386_6AF75BCC X-CRM114-Status: UNSURE ( 7.25 ) 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, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, Yury Norov , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, 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.8 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 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;