From patchwork Fri Mar 9 08:41:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 10269885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7CE136016D for ; Fri, 9 Mar 2018 08:42:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 656E129C72 for ; Fri, 9 Mar 2018 08:42:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A09D29C75; Fri, 9 Mar 2018 08:42:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4A3129C72 for ; Fri, 9 Mar 2018 08:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LwL8+yAJRkgEIp18G3w4eBfD39WcgZ7JqlB+5tgeR3A=; b=GfqR6aYZBhfzF5 PI6r2WyOa+U3jf7wcA8eDUzU2GeVT+TbyrpIbOYyv8lU0q9M9YzEIK5+a9XlxZN88D5Tl7zZdbiXW lajr7FqBfwfqPSagdV4S0yBQ7zAF3ciPI75Dhlpd41RGSz1JTGK6sg1zxm6iSHljk5lIuSS8gkuSY NMrPNm9CfIDqs6FcPyZgNMs6m1VYL5BhwP5jWUv6tZn/VUzdQTzT28o9PaRGLXIz8Da/+W4Ca5DOs XWJK5wqSU+i+tDpgJ7CwdqZMkVsSCfiShE4BZkGvqqMw40zUgtWHBQkt6lBRjd4qrblo2f/wy2TEI hkYT+ze82k+myXTDjCow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1euDbj-0005jR-SN; Fri, 09 Mar 2018 08:42:31 +0000 Received: from mail-he1eur02on0705.outbound.protection.outlook.com ([2a01:111:f400:fe05::705] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1euDbf-0005h4-UV for linux-arm-kernel@lists.infradead.org; Fri, 09 Mar 2018 08:42:29 +0000 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=YWCRxXhgld5YL5ZDkenRINWS9Ir8Dq7Qx1JsT1sylAE=; b=JXTbcherWaKRZgK8Smm+dbC8fB3j01ghwwUSBpvqaxiyV5ZMHbyut0nRebwN9q873sntD4mfwTuVhwa3ZIOZN4Nocgvmjur2jAj4b2J6UQ3aCQwEVDt4VXpjlyM23RdMLXEJoPIH9eSIf9V9qvGjY8D7xwuNM0+EldOPNwi+Ytc= 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 VI1PR07MB1328.eurprd07.prod.outlook.com (2a01:111:e400:5a03::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.6; Fri, 9 Mar 2018 08:42:10 +0000 From: Alexander Sverdlin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/2] ARM: PLT: Move struct plt_entries definition to header Date: Fri, 9 Mar 2018 09:41:50 +0100 Message-Id: <20180309084151.2379-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180309084151.2379-1-alexander.sverdlin@nokia.com> References: <20180309084151.2379-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: HE1P192CA0018.EURP192.PROD.OUTLOOK.COM (2603:10a6:3:fe::28) To VI1PR07MB1328.eurprd07.prod.outlook.com (2a01:111:e400:5a03::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8949ed4c-ce24-40ae-0908-08d58599a631 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:VI1PR07MB1328; X-Microsoft-Exchange-Diagnostics: 1; VI1PR07MB1328; 3:TBUyWxZ34t65SZTN2ebiMismxN0TI8DfoE0Rlmmzr+2n5soYM4bW4Opm824AZDsPzGiuT0qiPjAhPNeSRkCA2qRIMrUe7vujtnpGJppNiY1rK7+pCMubpOB/ezsFuWHpi31whXdQ9fvEj0OP+epcm0Ft+Ng+pnAyUZExQuCXP0SMdWIJadPodV59s9xH6J9OF+A/W5QGmN5ZpmjRngmG/pkWF2tihHqEIhO0MYwoWD4W7vICCMUYexTpdg6PQI6J; 25:fB4KxbTxXnGAosNHHgs2eMYQuwBxHEsvESDr6HjeS+HreKcsmzA2samxM2J/dKuMDcJfG6z+0ztuz0B9V469uj4rMNqd6pjsNsJ9uxKPS0cIxXAxNjcjbjtknFt1Kb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ZnTZ07fhiB2MVpaa6AMPfrJn5d29DbmSwUgH7ggRPGgGWNvDbT+0f/5HmywJFB4LQ=; 4:VDhLt/8WxQuf5+ctXV9ve/LcVy4o0wnUvSyKMJyjj2YBAgg/Aqrnh1ryb333qWlKWSD0QTNlWNCrzlB0RFogaROr7brgGKtKs6GUYPooXkbbaQlxaeuhO9dwp1reh/Hb3WsqR75pz/SDmcr19uD7s2dmmsHfJTrbLrPlRlKpJle4BGUdOow/CNJzymT3lw9X1NJyKujDoIcGwbPby8B/ZTobEBDMOO0Q8kHtLITc7/xeq+808YKO1hNn+fZh/TFxkyfVKX1rxu1u/+5o3wknD7eqjpLtDKwimtnJizSJvlLOyX9oS5ZtSttaeD7uciaI 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)(3231220)(11241501184)(806099)(944501244)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR07MB1328; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB1328; X-Forefront-PRVS: 0606BBEB39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(396003)(376002)(346002)(39380400002)(199004)(189003)(48376002)(4326008)(575784001)(36756003)(86362001)(106356001)(6486002)(25786009)(97736004)(105586002)(51416003)(16526019)(50466002)(50226002)(52116002)(386003)(26005)(76176011)(7736002)(305945005)(186003)(6506007)(8936002)(54906003)(3846002)(6116002)(6666003)(8676002)(16586007)(68736007)(316002)(66066001)(1076002)(2361001)(5660300001)(81166006)(6512007)(2351001)(478600001)(47776003)(2950100002)(81156014)(6916009)(2906002)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB1328; H:ulegcpsvdell.emea.nsn-net.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR07MB1328; 23:WUW2pIJpEVreFf/RhVon3Xd3DQWfK2bAb1TCTHQ1P?= =?us-ascii?Q?g/Cucva29FjgQFMp9Mh8oF2xKSPrn/8tQXcjWAEcP/Sh6Ph/WGjyLQQlaP+h?= =?us-ascii?Q?UV54ip5+pRIF1Zf19N3JSF7a9X6B6meMTXMcNBkhWAEUnG2QPYTtLhK+/47q?= =?us-ascii?Q?uB4ysgjYfrpESOi4TO6cTM6oWgdxu6t0WkH9cCE2D+Lt/Fv7mdjeeS4kv3sS?= =?us-ascii?Q?XiLLQE32JI+2uqvzpM/8HcceQflRmlhLAOEWexX3/x2VVlJsqiVNdPqsAKnl?= =?us-ascii?Q?eKQujZ5nip9wKCRqqkGCWWWiAKwTecV5xCo91jpPb/8mdui7yqeiodixPk7N?= =?us-ascii?Q?33csNoHXF8CyIaSMQXcsYGC1293MoUMpmOgJsJ/NLBLHevPuUm7F09XoX3cW?= =?us-ascii?Q?a/KCOepZxUlknwaHpGKPXLSFWCXjJeYBltLpyaKyWjsUos+i1KOny99lRtpu?= =?us-ascii?Q?TO+qqm4ZeVzm+UERkwrMyMVJkA0a2GNJAO8XSXBJfc6OlAHhOONRGNDe3Ttd?= =?us-ascii?Q?VnzKoz2gmG3LjKA5cq5CRRlnKKD8MbL8GR8r8Ga0fTmTQ3SviD9Yn82wQUiv?= =?us-ascii?Q?Py3DHmbdkMceTyuuu4474uQhCogyiUDum6bgcQtM+4Z77VDbMYZZlnestMXA?= =?us-ascii?Q?nsHG24jHl6u0DHvZjLWW+poM617mL0rc+U49iZnVV1L93LdmOHlgsL6jebRZ?= =?us-ascii?Q?jfVaUjGKDvmKjhWoM1pE9bnHMY9be+gwhr5X2rfHvwcJ4ht3ZZAp/djb3fiO?= =?us-ascii?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r/r34M97jlc61F5EewRK1ZBg6pX9xRh8tblgFkbRubJrjXg21wOKFcQLBaruWbywZnyjNvCMLrR6lHRAw1Tla6U99JPvTnLeoD/qUH7p4zCNzBMB6GbyRd2K4rxm7rqevWWEythI5BVkJGiT/yPbsjRo=; 5:1acWoF8x3iVpxKLe4zv5oFTBSWa3fy3uxcK/nLqTKYPUCsPRNKjGDgSkNsuL1dJpUuG5xz26GBAfHEAzNQijjnsE/SA6e57/pxvTJ1Uc3vzHR0+XI3cXsAmOKyqPwk/tRWN8P8dzaZpmQhbgri22zE1CNB5KOMXfa690yuwEI3w=; 24:b4JVz63Ay09eGICQBl0hbOD0vFamTHUwxVbQmLdOpcLWgo48OenvwU0uD34IlyxhgnQ1wsqwUvzoXP8nF9eBmyIBUd0M9iJGb1au0zB9lSI=; 7:/M8miAuKqu6InC5xqA328bXwIUfzs1OlfxS9flukMG78GMXsghOOtP1gSkvKpPDAV5h067GhPcikeflsyaTBaVwPAm8FbbCQ0tZUgpash7ouMuUK1A5tneK6fWvs0ZNX7X1JxBg3uqRFONvG3jNsnWeGsGoFLs6taViRtceZ2BD0OTazsUP0mTLGxrrLb2Vd1wB4CcBhIffDASM6iGq9pQ3Ge9YTkdrZwtPNKHgwMn0qbVN+JuQhyeSYG0wi4MVR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2018 08:42:10.1640 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8949ed4c-ce24-40ae-0908-08d58599a631 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB1328 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180309_004228_171019_9201B9CF X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ingo Molnar , Alexander Sverdlin , linux-kernel@vger.kernel.org, Steven Rostedt , Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP No functional change, later it will be re-used in several files. Change-Id: Icfa32669b3582d713b3ad680c25620d3d4844bdd 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;