Received: by 10.223.185.111 with SMTP id b44csp54723wrg; Fri, 9 Mar 2018 00:44:45 -0800 (PST) X-Google-Smtp-Source: AG47ELsuvrdudgsSy7AQWyd2EN/Vh+f4qyr8flR/bmParlcTf5VGYLxiq1TRDnBgHcYqrNpeVZPY X-Received: by 10.98.66.89 with SMTP id p86mr29071654pfa.228.1520585085715; Fri, 09 Mar 2018 00:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520585085; cv=none; d=google.com; s=arc-20160816; b=vkhL41ulZnx1da9euo19dL+9YGTtbOLoXz03pp9vQ10X/DX/cNIRgCNC98sC4j/3vj 0ZD3FMoem53dszHgkZOyaUi+T2Ah4uiL7nuKrW8zWWrxuWTBOiYUBBPfD9gckb/O45jU EXN5A6LgR54H3/58q7aXfaS4u/EYXnUhFl7efc7Af0fbSG1Mjuy/o6NjU1yheU7Iy2W9 nh5iMbh4jx1u7/d6K50Jscs6+7Eths+PjNyiNXUvipDqYr3t5wk0Oz/73OvwOtTzng5I /WeP/kf9Wu2vAFaWvmC7g7O9qnruNuFawhEFYOyH8xyX3Ov3uIFFGiAek305D54uciV3 0RKw== 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=YWCRxXhgld5YL5ZDkenRINWS9Ir8Dq7Qx1JsT1sylAE=; b=w45o9OuYbZ+XShxfc8l4+bChFKWCJ/TgiEKHg/hUMJPalRPDvvgH3iMubclpZrHJOC PqU1yi+J1KMPBMQfo0e2zKTYtY/xRMPzRVCkX1T3EWap81RV+uef60Ixtoe+dv5BVQA7 TjqV8hwqEXc+vEUvpa2l4vGiqUflnrlsHGjNPRz/EHUYjvcTpP8ZkyMKbSBUTpMRS/sC ab4PvztEqchbkqzbOuUidgzoYCPCEVnpvigO/Vvx9dxAu0Dut9zr1zHKcavkl7bIRChP fc/Jk8HiKQL+7sidQRmEvdOSV1QNgefjz1yDlHYeu2zPXols5L00RKASud/HmyIz5Ljr ENHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=JXTbcher; 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 y22si424879pgc.386.2018.03.09.00.44.30; Fri, 09 Mar 2018 00:44:45 -0800 (PST) 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=JXTbcher; 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 S1751791AbeCIImQ (ORCPT + 99 others); Fri, 9 Mar 2018 03:42:16 -0500 Received: from mail-eopbgr10123.outbound.protection.outlook.com ([40.107.1.123]:19872 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750926AbeCIImO (ORCPT ); Fri, 9 Mar 2018 03:42:14 -0500 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 Cc: Alexander Sverdlin , linux-kernel@vger.kernel.org, Russell King , Steven Rostedt , Ingo Molnar 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 Content-Type: text/plain 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:TBUyWxZ34t65SZTN2ebiMismxN0TI8DfoE0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ykKpHdrdljkXcALpZ/0PjECSUXvYTi5NTT7wCDhG2SCxiX6u5buqJXbnQvNA6+3Iknry7KEDiM0PpQhekmq/JgReS/FbvJcHq8w3tjzaanLYJc+GHS7TO4CzaVjqOMTOARGYGooJRt8pgNvhNNdrQ2UQWKfAg3w/JwOkm0nWqbLHDE63vXbMo3GMAGw7QX/lF7e1t+qjo1E96oJhECJrP3svtbTNt6SjW/KhM8efGBOrRbkTaB/vjWzxWW4saP8ZKScrr7w5NQLTKZJIquUbz7QAg2GePT/FENy1dQ5HcahckhomG6Jl13p9x1YNTWGawlKtQYV0JhMK1tsNrv4JzuDNqnLQWZnTZ07fhiB2MVpaa6AMPfrJn5d29DbmSwUgH7ggRPGgGWNvDbT+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+UERkwrMyMVJ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atorOrg: 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 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. 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; -- 2.4.6