From patchwork Wed Sep 2 15:49:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7112971 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 1F2A59F1CD for ; Wed, 2 Sep 2015 15:54:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EA9620651 for ; Wed, 2 Sep 2015 15:54:31 +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 57C57204EC for ; Wed, 2 Sep 2015 15:54:30 +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 1ZXAKL-0001y9-TH; Wed, 02 Sep 2015 15:51:57 +0000 Received: from mail-bl2on0063.outbound.protection.outlook.com ([65.55.169.63] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXAKJ-0001gx-1b for linux-arm-kernel@lists.infradead.org; Wed, 02 Sep 2015 15:51:55 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (91.77.150.194) by BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) with Microsoft SMTP Server (TLS) id 15.1.256.15; Wed, 2 Sep 2015 15:50:29 +0000 From: Yury Norov To: , , Subject: [PATCH v3 1/2] arm64: cpufeature.h: resolve hidden header dependencies Date: Wed, 2 Sep 2015 18:49:59 +0300 Message-ID: <1441209000-26746-2-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441209000-26746-1-git-send-email-ynorov@caviumnetworks.com> References: <1441209000-26746-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [91.77.150.194] X-ClientProxiedBy: HE1PR03CA0021.eurprd03.prod.outlook.com (25.163.170.159) To BY2PR07MB613.namprd07.prod.outlook.com (10.141.222.144) X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 2:VSvK8PY6ujDNLTUd42bhAW6PzxGvBm9EGhRc01puMeQAFON9UL62ZiABtUiYenKpV0kmvJbeI+YhEILAL2K0U4BYzRPq7QYlp50UXUaxrrU5IQKWE1HXulUK/ZwVffQ1zOHimKBkTB4ENibYUfASU6AJSmLwG4UZlvFNSwk6Rk8=; 3:148oHDteNM1GCitBpnX/K/oz/RfNAvKru1w4+JqzvnBjewu8QRnG2Mqgi66hN+xSfLPamCTvrqOQeWrjN4IBF6+gP5TJKQFh5DGbVGl9pqREt3nNN7edGqtypTQPq2uLVli1jandesrs0dWRtAjDrQ==; 25:/Xq7qud89KZkO2BbypsEaWk9nlcuptdvaV142Q2cPJbxyBA507hM5bjBZQDnjNAb1mhrIvUQFyT2mmxrLW6hy5NLHnL+ewwv+G7Bp6Rz2MXrDRCThSJjlXhpwSIR1UmhFIVK/96TZmrRav52sMOe+6NY2WHvoG+8003eD/VMM83U9znDTZ76+V2r/zyAVvzxMw0EvCIRTVZrAHaE3GSj+/Cm8FOO7LK/mW7R3JMmPzXNDUxchZ6UPyJy/YH/yYKbl4K51H53F+dvd3Tdxru3lw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB613; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB613; 20:lWAVR44tgQmQS14YF25Lo8vFdNAn3sZpT68hTjLLQvTOobjS6HqsG+cEw7U2tpAklrJYVBGeAhKq/qUpJJ2ONrLEIe6P+URruM8YaB7DUKnGz7hpuHZxIfLJzdiE7NcofDVUcHhs4BwnoXjCyY3czQkRRKuwGXaUpopFz73j2nXuy29HVetu4RhNNsRc26Yyv9/yDPKDbD8q0/vHi4OBLmRwTyEv4RAImbLJ60BSumIocgMnXu83S/yCjtI82hzooGrPnDfbEltsbqzO7LzfeJSUJwiIL/TAaBIWJ0Pb43ld/0oWBmQECD692toYqowFErgbVB1fhTK8pZLdMCTdL6YYIX071rzetlRQYtUfVAx7SD3RJux7aJDp0jQG5EsRML9uvI0+XLUNFdlAP1uNZlewS9nTYtR+oXeRLzx90lIPeJu24Yl9KaohcJOV6Cm45K8m5KmNEIECprwLyyNhH5tEJW+9SMWDzYt7ryHLywcOa5ctlrFf3noIxWAfHKZoV1BbxrOYop15yVeqedaNFZsM9pSp3dekuTiMfRRFM7woUDwyMfy5Ypzt8/jVTDMyQByzfr7XZ8O202bKmPJm3gX0FmGwqEyFnbon9Ep15oY=; 4:VzfEHS6031xyIcfrilAvUzHJqAEYRnUUQ5ZXlwJXzuB6qxzmmBcZOabenSuSwtFa4D0qFtlU2zZhur62ONDMajghKXqHrnr0LBvL3YIUB38tPUtKKeVo+ow3gy1pM1jbO9DNogN0PjGBBaXPlcU6qmXWFU231d3AKW8f/CRGBJVZ/TeFSAvaf2EkYY/3fFDLai+OnaJ8cVdLGxzf3B828hDuQhNgv/fe2udmHZ8lBHhFfVLXv2Rq0/wEAWL3MlDcYuZqnaXe3DKKPhAmq1qltcrgDuIvbgA/zCtnQkY75xPAnGVEwGnLKZ7KBsc2gyBS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(3002001); SRVR:BY2PR07MB613; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB613; X-Forefront-PRVS: 0687389FB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(199003)(189002)(5003940100001)(101416001)(76176999)(50986999)(50466002)(189998001)(77156002)(62966003)(77096005)(68736005)(5001960100002)(19580405001)(19580395003)(50226001)(105586002)(106356001)(36756003)(229853001)(46102003)(76506005)(42186005)(87976001)(64706001)(66066001)(47776003)(48376002)(2201001)(575784001)(33646002)(81156007)(4001540100001)(107886002)(5007970100001)(122386002)(5001920100001)(5001860100001)(5001830100001)(97736004)(5001770100001)(5004730100002)(2950100001)(92566002)(40100003)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB613; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR07MB613; 23:KgX+uL0XLzjz4jVBw4uWQNRrlJg4fhVqo99FDyGHVH?= =?us-ascii?Q?7R8dRghM66KUg8GpOt0bOWlkMam+ccXODkCa/F72nl6N1CxrvtPgpFvwUUwZ?= =?us-ascii?Q?TbzEJH//czdg8rM4yk1AQXaK6/3ZIKuzL+a1LnTGczTG901jD79Kc6O1qzoT?= =?us-ascii?Q?jEwOa1k60fS3eg6sxk1o8GrQwqtjsbheaPzMfn1GfPOd/R0Df/aJHm3rQ2j7?= =?us-ascii?Q?THHwz2wPmncjOf7f/ctDnxG1/bjZl+nJoMk7lfv/Swn1tyo0Ugc97lSrqe6Q?= =?us-ascii?Q?+pb8V6BySlrkFBFDzlTpHOjPJSM2z3rRDB6PpFsDoCDxZ3tfQ73tt7yYIVKk?= =?us-ascii?Q?qU1V2cEY+WLMTJIiHKxGT/4ceBPyJVdjvaqNyZOKlEs0ZuwEd1di3AJNhkp5?= =?us-ascii?Q?4e44vYd7dYILvDCpZGyAyAHDsxdT2dVlmopahOqZhvjEGn9ztStApVnYvQuA?= =?us-ascii?Q?frKE8xYt0azGEwP1uUi9ZdqyqLUMle6wy3ehxrX9O+q4oOFpr6/okJsAkZzg?= =?us-ascii?Q?djvf1supOsp0dvBm09W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rpwKmqlTTBt1N+a/n+pMC42Dw88aWspsJBnoJfs4RTwWzKeaORc2OquYZ2KEzYeHSD2B3dFrkg==; 24:FOGGcUo6GxaFqEHFNHTgFjZw8flsQinL2ow2iq3qV/KMitGcTCfilUmrXOAsmkyTYIqp3N1RUZIKiORNnPgYCgBw9oK1vubcDvRtwU/hsA4=; 20:5M6FoVU8gL27idmkxKBjXCycf6+oBiBW4vhR/hE6Q3/8Az0OcNorAOtWtUmy4lGGsSRnZmm6A2M5uaxu2Eybfg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2015 15:50:29.5682 (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-20150902_085155_298549_46D36F18 X-CRM114-Status: UNSURE ( 9.19 ) 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: yury.norov@gmail.com, ard.biesheuvel@linaro.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, klimov.linux@gmail.com, Yury Norov , ddaney.cavm@gmail.com, linux-arm-kernel@lists.infradead.org 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 Functions implemented in cpufeature.h depend on some headers, but cpufeature.h does not include them. This may cause build failure if cpufeature.h user does not include that headers by itself. (Like it happens in next patch of this series.) cpu_feature macro is moved under "#ifndef __ASSEMBLY__" guard as it depends on , and can be used in C files only. Signed-off-by: Yury Norov Reviewed-by: Mark Rutland --- arch/arm64/include/asm/cpufeature.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index c104421..f0e4017 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -19,7 +19,6 @@ */ #define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap)) -#define cpu_feature(x) ilog2(HWCAP_ ## x) #define ARM64_WORKAROUND_CLEAN_CACHE 0 #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE 1 @@ -30,6 +29,14 @@ #ifndef __ASSEMBLY__ +#include +#include +#include +#include +#include + +#define cpu_feature(x) ilog2(HWCAP_ ## x) + struct arm64_cpu_capabilities { const char *desc; u16 capability;