Received: by 10.213.65.68 with SMTP id h4csp713558imn; Fri, 6 Apr 2018 07:42:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ex/KkFPosfYA3VKAnM9p5pl29s4IaXhHwBkSY2hwclLX4fvyeS3e6ZEBu+cdfe+LeZOvh X-Received: by 10.101.101.66 with SMTP id a2mr18288497pgw.223.1523025768448; Fri, 06 Apr 2018 07:42:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523025768; cv=none; d=google.com; s=arc-20160816; b=K2ou3M5xzAGVUM6hlbc9drV6SSkpn9HtptEciRFuv/d5F/3tBfVRlKDH6xk2PzNJQP O70vlJnpGT3J9GUkDDifs9nHvs0a69W047oFAM86M+eMG9JzjRmbpvsgAgkCS3IQqX+w 54NVEQVKcHOKOY67doKe1vhLWV75wGz5Hk6H5hsXJPfiK1MiuUV225qGO31VmdIhnR/v 4aET/AI2K140H4sMV0ZcVXJxyjX9xavab45iabUeCNG7ZZlaIyq4yWA7TK/rI9WgPldx NRb/1ZMq8EJ3xOpF0Gg6ICk+B+fcXsaYhBFSMZRKPDb8THx6oxkgS9FO4upms9vzojSw DPIw== 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=sKOJKG/Q/zf2ycKrpGT2EIhM3a1c5rpmTKZdlOq6yzA=; b=lTimItxYK+hWFDuR69ts9IMyX1tSNpwpOEqzaUnevVQ3DYUhHpwGcXcaTI4ZJ9k3gS SqjiShotG3Ads76yUsGB8TxSR5RgZ0qhEGmj2NCAl7hxVrekAJDeFUeV6CEps/K/b1hM 9BgGMQ91HJ6fKcHL8WrG7pMYrGeBNtJv0ih9mO4M5zqB2bgPrlbZ2umOn0Wn1cKIZwui 2OdPwJsMln34seABcIY3mfQ7xiZEMKm/ls5lMpRz12kSZDagaW1ou37V5LZVFkB1wA9g dECHB1AuKO69vX3X0cZueuSlZnngfpnhDTAMCENS7ofKn1Os7JtuPlxQySlMs4QeIQZv EPfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=cELyAYGT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15-v6si11189076plj.458.2018.04.06.07.42.34; Fri, 06 Apr 2018 07:42:48 -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=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=cELyAYGT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756035AbeDFOkY (ORCPT + 99 others); Fri, 6 Apr 2018 10:40:24 -0400 Received: from mail-he1eur01on0125.outbound.protection.outlook.com ([104.47.0.125]:45074 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755271AbeDFOkU (ORCPT ); Fri, 6 Apr 2018 10:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sKOJKG/Q/zf2ycKrpGT2EIhM3a1c5rpmTKZdlOq6yzA=; b=cELyAYGTs53ECcNqtZHhRocoHfhYae2eJvfjeKwqY7f53c7+x71SpMwa+BT1BEBlmv8kLVa5tmePTJmzwz9xxLYsDnBh+cJiWbvnV9+gZpzT/crYMTYrj+3+7kbZz5Gu7cvFTQdoZyr0RMo+wQfGGoKCyYRhaluKG7/pf9yKm/Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=alexander.sverdlin@nokia.com; Received: from ulegcpsvdell.emea.nsn-net.net (131.228.2.20) by HE1PR0701MB2473.eurprd07.prod.outlook.com (2603:10a6:3:71::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.675.4; Fri, 6 Apr 2018 14:40:14 +0000 From: Alexander Sverdlin To: linux-arm-kernel@lists.infradead.org Cc: Alexander Sverdlin , linux-kernel@vger.kernel.org, Russell King , Steven Rostedt , Ingo Molnar , Ard Biesheuvel Subject: [PATCH v5 1/3] ARM: PLT: Move struct plt_entries definition to header Date: Fri, 6 Apr 2018 16:39:37 +0200 Message-Id: <20180406143939.14642-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180406143939.14642-1-alexander.sverdlin@nokia.com> References: <20180406143939.14642-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: MAXPR0101CA0018.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:c::28) To HE1PR0701MB2473.eurprd07.prod.outlook.com (2603:10a6:3:71::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d77253fb-6b4c-4bf1-ff43-08d59bcc50f9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:HE1PR0701MB2473; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0701MB2473;3:Ld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KXe0ST5s44isMyZQMWVtbk0dVEY5U60nJdENpbxY1wuLJfkGyQtrS6ifdjR48JGszpkYMZ/NRyH6/scvdBgBWNy4pxdTc3/87MfH+x1CQAOFhxTlrlD9cQNy5J+OdMnkh8ZILkXEegpIuu1k7f8FOHyBgzudbQF06AwqziDrvIWT6LSUOZ7URg1U7O1XhDudQFh4xiQhKbDkU1OQfYdgcU4Jrbq3V0n0aprD2QmMwEU1lrxHacW2LN/2Fi6f/Pt1wFGZ4ZqSxl4Vl0KnbcFlOK2ACR52LzoT3eL03iLerf3mB9q4rftCiMfo7SqMs6A3TQkf2fRpq7xa/ODW+jQbu4F5guACsyEon7VNUVAjX+z82jZF0RQykqdT3XjHhSRTH1EaAESTvwdTRgUFzjwTgfebLZeNIDdj+ynixNV7tT2f/qsNvY/O9Koo=;4:rNLGH9sz31DfOrRJ/kb/qDammbUk6NeWGYU/65hw8n8RfrqBLq1Y8uf3MTAWhohxEZYBWKtRBMZ8W3BrDteDFlR/9EPZx2oTHvluXbUg9PR43JuHWcZ0+eCekGzBZKqdq/UriXH/L52gKotyjllbeeCHwDCPMJIFBZZj49Qjoy/TKSE+/UQMbKS87Fw09f3+EZIgOJQbwHci8jtAACFDXJZxjeeoBoYOnBd5zXEw/f+GVNsMb5y/yfRC3odcpIzYmJTQXu49MyUaldHGuKYDXmF73xTWkQRQGv/tkiNKVYujALEfOu01Q7XTCPg9SjcF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231221)(11241501184)(806099)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011);SRVR:HE1PR0701MB2473;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0701MB2473; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(346002)(376002)(39380400002)(189003)(199004)(25786009)(446003)(4326008)(11346002)(956004)(97736004)(2616005)(476003)(26005)(186003)(16526019)(6666003)(47776003)(6916009)(2361001)(66066001)(7736002)(305945005)(5660300001)(486006)(8936002)(50226002)(81166006)(53936002)(3846002)(6116002)(8676002)(81156014)(106356001)(6512007)(105586002)(16586007)(316002)(6486002)(52116002)(51416003)(76176011)(2906002)(36756003)(68736007)(1076002)(575784001)(86362001)(54906003)(2351001)(48376002)(6506007)(50466002)(386003)(478600001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0701MB2473;H:ulegcpsvdell.emea.nsn-net.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR0701MB2473;23:LN5e2H8RxE9cpppFL9b13eDdCv+IlJux2z9b8kW?= =?us-ascii?Q?2eQIgDffo2jJs7G5WXKqUhqyfAqjdlsleE6aWCkxyuLzS2CWJ9f5wUsx0Hmj?= =?us-ascii?Q?3TYVatRILJ+sMF1tDKqShP17Wu0k/U0S6WBX0KDfSUKMAzBv6mOvB9sVJx3m?= =?us-ascii?Q?9cGus3WMMQn0IsSEDL6kVQd7Je5tecojmbglOMEf2pn26/aPfLVSbQRuUNcz?= =?us-ascii?Q?24DBghpV5v2skZQXnLMuyf4VrW9Zt+ylsTZ05G+QmpFDu3ORQfn5EOsHhDBT?= =?us-ascii?Q?lVeAuv8/LSyafuZJhqpqJJ0y4PInZ59OX32ygRgCZaYc0mpNTfcp6WLxuntP?= =?us-ascii?Q?zDJdB3ABSxWpF5pFl7zdikLqep5g4oWPwQ/exHfc2SSaPFALV16JT4x0xxzF?= =?us-ascii?Q?ePMMl9ZUY+3wkP6e379st5Sv1EmCoR7wah2QuHH3EO8U5Z86oYJP24vKstVN?= =?us-ascii?Q?z6BqKHcamY1acNHZmlOjRv/NqbuNJHW53VIenyf+HU3+wB2SB1PyVBxBGjRv?= =?us-ascii?Q?HUJvn8PIoPDOH2ojxjhKkKN/67PKPxeocHtWhV0nEgHPIyj6M52npQP/dE8C?= =?us-ascii?Q?FRhvt5zKPgTIjYsWdotrH8BGq9qW2B71Pe3JnNRu5kYHaTQjTZzuKC40EaXI?= =?us-ascii?Q?Je6imA+qPKA+Lz8ZBHbMCF6NjuRw50EQtcZK7tcxzFHchO/HkUXNF2S/46Wv?= =?us-ascii?Q?f2beJZdWVps/KUpdkzmo591kkaIODOex7FZk+fXwzoIKB0bvqkdD/jbKRXkb?= =?us-ascii?Q?ZQv2OgwFNxQApTNfmmmKkWd5/CV/Un+p6SV9Py0SCzCS8FlxalAOd7eblrQ3?= =?us-ascii?Q?DgGWzXm5N+gkcshi74t1BW+OnbzUt7+VUPI1vbi/PVXPUP/cTK3LVh9Yzwi6?= =?us-ascii?Q?iul5gmTf4PXlvLjbigUlowtNQEicOQ3iJSdLgAAhFChevJUUuPorROm/fT/5?= =?us-ascii?Q?gfTyddHsKVS9WoPxC0/35R+9ne7EVv4PA51Z/UwvrfLkB2A6FWpiYzLdwYWs?= =?us-ascii?Q?DoUKg1+HidaO57zEo17m/FzvdST+uwSWT8uJKwNUG5DZI6xOaAheWY/D8bDX?= =?us-ascii?Q?hfgRaDWMEtBIQwtat3rVUvUgiSRQ0Wwy/LprisKGRkRHk8nEqwdCD0f+dqWd?= =?us-ascii?Q?xrUlAqD0M11Er1pkazDTjYcf2339Q/Xh5G5qiFeyx4f+cpLD6BKek54BYP80?= =?us-ascii?Q?CCoOTliKwFbKX76NroDw28ATJIRxjRoPmyPPo9XFP77lvEXXYoSLeWMF3YPs?= =?us-ascii?Q?h2o/rn5Anh/saZ77KX5sIKM7BFmXdZxePbuGBH/NB?= X-Microsoft-Antispam-Message-Info: A6Zk1TiWvykxJkZPXv7UwdIsJr5SZiR/DhW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473;7:rv+eyC4Q5l+f803bTzhTXlkWDO7rnDH8Q/jr61QeyMVyT4xfHM1ti+Mbt9z/omTvLKVLI6NeKVQV6dwb91qS2wMHT/ZdQST5HbOKEcVBxKFurIwlnz4BtwsOm/frTxtUrJcRww7kpBo/MpFEzbIPpcrcBAnbINNZDvX6hgC9URbfvpM+r25BofEmsoWMUU7OFbs77WNdx1HIChMiICQDY6jASxjgz0jbz+EWuFOYtFzwvY3PlfOZ+k+TWN17CLjk X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 14:40:14.4741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d77253fb-6b4c-4bf1-ff43-08d59bcc50f9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2473 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin --- arch/arm/include/asm/module.h | 9 +++++++++ arch/arm/kernel/module-plts.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 89ad059..6996405 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h @@ -19,6 +19,15 @@ enum { }; #endif +#define PLT_ENT_STRIDE L1_CACHE_BYTES +#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32)) +#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT) + +struct plt_entries { + u32 ldr[PLT_ENT_COUNT]; + u32 lit[PLT_ENT_COUNT]; +}; + struct mod_plt_sec { struct elf32_shdr *plt; int plt_count; diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c index 3d0c2e4..f272711 100644 --- a/arch/arm/kernel/module-plts.c +++ b/arch/arm/kernel/module-plts.c @@ -14,10 +14,6 @@ #include #include -#define PLT_ENT_STRIDE L1_CACHE_BYTES -#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32)) -#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT) - #ifdef CONFIG_THUMB2_KERNEL #define PLT_ENT_LDR __opcode_to_mem_thumb32(0xf8dff000 | \ (PLT_ENT_STRIDE - 4)) @@ -26,11 +22,6 @@ (PLT_ENT_STRIDE - 8)) #endif -struct plt_entries { - u32 ldr[PLT_ENT_COUNT]; - u32 lit[PLT_ENT_COUNT]; -}; - static bool in_init(const struct module *mod, unsigned long loc) { return loc - (u32)mod->init_layout.base < mod->init_layout.size; -- 2.4.6