From patchwork Thu Mar 1 16:43:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 10251979 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 D87F960365 for ; Thu, 1 Mar 2018 16:44:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7BAF285E2 for ; Thu, 1 Mar 2018 16:44:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB2B928618; Thu, 1 Mar 2018 16:44:58 +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 AAD68285E2 for ; Thu, 1 Mar 2018 16:44:57 +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=qAQyBFn5IrvIkUDZNV2c+Dx+KV/vMLvS2SNA0xhVCJQ=; b=lCAXDox/BzticT 8wusDuC7p3c56HJIOjHgUyr8xcKt421NZeaxJIBr3GRRhOwwDcR6YyxFaIjZDo+gEBxOjBPmo6jvC AulkfOnIkJF9mauBpb81zKax5wPwflZPsFFMdIDxj4sFmf08per/q0HUAOgKznzycQRPUKi+lHr81 vmSVZx6sRryJiJBQ73LjT/s/Jah9sqinovuQntQiCAA6h2oXREknh+mNov5/sxWEO9ZxXi5ABsHGR pRXC8WXYx5oMkksRLISPjbMtJgkgAnwuWFB8vu5JoiPc2tMHhjke32LwPJh+3lk7Fl3dTg8bcfiqz MRUm5wrpI14LL0MrR0Vw==; 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 1erRK1-0004RM-BO; Thu, 01 Mar 2018 16:44:45 +0000 Received: from mail-he1eur01on0116.outbound.protection.outlook.com ([104.47.0.116] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erRJc-00048w-C3 for linux-arm-kernel@lists.infradead.org; Thu, 01 Mar 2018 16:44:21 +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=sKOJKG/Q/zf2ycKrpGT2EIhM3a1c5rpmTKZdlOq6yzA=; b=LIfKpIJgJQNnWwnq6nA7EWUTgsJ3vWXSqhuXhM/RgNvGMMfxV5RQelChiYMFXPxQuRDsaIA1yY9PK0rngscPCDHXMUvCiB6Vx4NBWRM+xL/zoojup5ne4Gjssh4ZUYmzrZwyPzD6cyLE7P5RXY89U32/FUnAMKuyUtHFAw/kEFE= 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 DB5PR07MB1320.eurprd07.prod.outlook.com (2a01:111:e400:599b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.5; Thu, 1 Mar 2018 16:44:02 +0000 From: Alexander Sverdlin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] ARM: PLT: Move struct plt_entries definition to header Date: Thu, 1 Mar 2018 17:43:42 +0100 Message-Id: <20180301164343.5794-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180301164343.5794-1-alexander.sverdlin@nokia.com> References: <20180301164343.5794-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: VI1PR08CA0129.eurprd08.prod.outlook.com (2603:10a6:800:d4::31) To DB5PR07MB1320.eurprd07.prod.outlook.com (2a01:111:e400:599b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65d898f1-7316-46ac-8981-08d57f93a436 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7193020); SRVR:DB5PR07MB1320; X-Microsoft-Exchange-Diagnostics: 1; DB5PR07MB1320; 3:wrCneWc0ZH0uRN2zZj43wVqQclH9ePZMHMZBM+faX1KWHUwOS8H1NjMHOOu+em9No/JAu1w7rrg9ygnceoLQCWkiOus34ZC1axm0kgWUlQUIeaqw90ShfeBETVzmx/HAC79K/GZ1yIToclX8P0+9kq4lpkK53ZEn2SqblZyn1YNZjHcmj9nLee8olXiqL3hCZKGqm8z9B4nM798LUFe+Cww7Wkl1FEuba+x6p+3AwZjVAf+HSVqym6o/g1RUp3uf; 25:lUiwoBqSmUc/AfToT1LPzABxfposp+HYWHWm7QZMo1iHdW8iAmk+O4Wjfxq9sBktFttuz6OyonfooNIBdPd7oYDkQuV2wo4c3aoMcKaLNA41ktRB/Z7UpBp5q0FYu4uGBZXSJUxR/+4WGgO8qtvPZfzsaFvF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zPgZMiay5Gwu7FpTgKZW3P/IkohjpSG+L6QjAl/ICH9gLnKrd19a0=; 4:/XcHC0sPe+/K/PTWc9a82n+NqEd1cxOXrmapKUEtYs8V8bjpbg/N3hE7AKMQ1sUmM/YmBuIH6gsL+epwz2tHZyaUlMvquGD5sPLBNROq1YFB1B+N9rpmYaHkLRgo4uQT6MNDXBqoGG/cTmZqiMnnG0l2VNDvJNsMY4QwbrCUvD6I5iDHpbiBKb+iivZpC6SeJGxPq2KCBjukpVuo/FsKujOvgUbpr33kWQh7OCaUohykUs+iuLEDLnjZoOGEvO5pjFNvAIQ1YI4NxZ/CtRvqNLcYBSNqxgPmPdM3eC42GUTk1QHk5hDF6C1s8CrxkfKE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231220)(11241501184)(806099)(944501229)(52105095)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:DB5PR07MB1320; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1320; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(346002)(396003)(366004)(39860400002)(376002)(189003)(199004)(50466002)(68736007)(25786009)(105586002)(6486002)(305945005)(575784001)(2950100002)(7736002)(6916009)(6666003)(53936002)(16526019)(478600001)(54906003)(52116002)(76176011)(26005)(16586007)(51416003)(6506007)(36756003)(386003)(5660300001)(47776003)(66066001)(106356001)(186003)(86362001)(316002)(6116002)(1076002)(81156014)(6512007)(8676002)(48376002)(97736004)(8936002)(50226002)(2351001)(2361001)(4326008)(81166006)(3846002)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB5PR07MB1320; H:ulegcpsvdell.emea.nsn-net.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DB5PR07MB1320; 23:cGW2CYKjw16BGxuepUI/c3CFgkRToQf/DyyR6DOd9?= =?us-ascii?Q?KnlriN+l15lHTw35AzehC9E3+ELoG4PSRZQ7sfGkdUNNeUiO59B/WGH7/U4n?= =?us-ascii?Q?mjv2UnvF6+Xbds2+fh9lhZM73B26tENekreUXR9AKpptX2WJ6MOYvpskyIQQ?= =?us-ascii?Q?5C7fbq2H9iKNEqs4JbcJJWAdXDT8uq1hO4YmSIEKf6pK0cdno0QxS5Ei7Mv3?= =?us-ascii?Q?ENTXkTghK/pJ+cclsqvi9/VwD1iYxA/Kw9KSk0oGJJ9XPb+4pONTf4PYx1t0?= =?us-ascii?Q?HGnlKc8DEAhBHvyZmXY+np8wCPKsn51EielTvo9DMs/Cu5XyegdxXfkENUS2?= =?us-ascii?Q?uR8javZD5idUWEjEEYH2IadM7XLMnqEq8MwrvKz+yHz6VgIA1hin8ICvVfkX?= =?us-ascii?Q?5fevIr50U40CMpV+dIwpAEUiohcsuRHKemshHM15L1tw/g5Bqp0dSkHi0wbG?= =?us-ascii?Q?15TH37/m8tbCc+LtHF5mygvpgtV4K5omm3Ny24+3dS+5qj+p6xMHPWULdv4Q?= =?us-ascii?Q?K/63hIPGpfwZeP4CcKPfsG10OlAg1bFpi91ZHGjI/AOdI/h+Xx56MPvx3MB4?= =?us-ascii?Q?E5X9448ZbmhMB3hXg9T4Oj+jSW3kGIamvl6fIlw6kf0ePkCepq00IqmPW7rL?= =?us-ascii?Q?njsZamw3EN9ce5Raf/SZ1V/PSc3/8uhWY0enxZuoIv3jGtbshpY7U5FWaaii?= =?us-ascii?Q?Otz9vOC+O3VR2l8T1JtJCBkstPrTMuP0FSWg/cEaOTNTG8PrF/FcW4D+TObB?= =?us-ascii?Q?I51kfrstxlFp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PmjMhcr8GylCvCx+ezAdmxQGcc1TPUq5KrZO08e8+1DnIeGo/XGdWEzGVngmS907i3DxcZw2K5i1RVyjAWwzWRg7O45pDM8K8xsvg6s85FPQt3DTvNUBNA2D9+OnXNxsbCAd05oF0su1yuL5qsLAOLUM7Lr5x8=; 24:PtBsyWH6+DfJERpp559ekJxNgyEEHyGuUfpThUrcLspti+aq39RfsVEYAyRelP1Fl9YV1hlyGdh5Ii8OUkrIZcpUTX9JDxNdm7luf5vDi+E=; 7:f5mp4o3o3YGST/tala+0s4UHW6NTrT03QZ/oEcJZgbc4J22yR/Ft4TUu+AdjqjUQJ6/QDMLoYl+2lyH+SZDEzWxLf2RYMBLWJHgS21lD/SRkVI42F6ypxqz4tXw+JMtoyoe/7Ut2OU/IHBdBPEhOoFzsgJ+r+sEJKYLd+EOUjoLk2PhmKepD/+eUBAod5qbklJaZllvEkCEcfUXNbgA3lmL+mhlVJIuW9Kyi8b4CUiduh4+f1hF5Mfd6LbJj5je2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 16:44:02.5782 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65d898f1-7316-46ac-8981-08d57f93a436 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1320 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180301_084420_420431_A7C6F943 X-CRM114-Status: GOOD ( 11.07 ) 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. 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;