Received: by 10.213.65.68 with SMTP id h4csp365409imn; Tue, 13 Mar 2018 06:55:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELs4OIsFDnSpDPbCqntmBYNouQYPBsyCPrFdCBboygVABfG5pyZXsInE8RpFZ9rHuRoZnpFV X-Received: by 10.101.90.75 with SMTP id z11mr560825pgs.29.1520949324888; Tue, 13 Mar 2018 06:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520949324; cv=none; d=google.com; s=arc-20160816; b=VramLjtQhpNF3Eym/wZvKKqNPMf2uJ+wGiXzL0rZzWZXGT5ULi8euZjloYklXM9gva B8FWCGYXhnAQem/GjnwIGIEjUXRVbf1Ja0NmM3REfo7L73s33YwTeYsPnA8gLQcaeymF 5gz0bZeyj9If0vpndnSEWs1rCtGmqe3s6Dl5OrTeWX6fdvw1ub02BJzxvA1of/C+gDdz 9RC5u9lsG15hkcsBET6WWMyHL6jjas9iuP+Zv0HOUCDITFnYc8EfS16Xy8j/rYnqtWqj YLENfrk94FB/X9WH55DTCIOszryP+xw43EgGZO53JV4oQc613VYwPDr5kOnB4jgYCXxJ IXgA== 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=hxZIgFGHXuitgyWFf/cZcBaXL3mRFQ5HF9GMqIgJamvo4bhr28kjO0Qhm7vIi377vB MtUGEbV4zvDkUO8Zvq2QkD8dMEq6J9EQ2NH1MF2SBm2FJXkpcGjvMAuZmbxbOMswl56B lCAugpjhUM0Xc0ECTYFdFJFhFKmxyhpX0O5sb3Hfoz5kA/BrVTcubVRu9vED/LG/Ht1b +2Ip26bLQjySVR4cBOqKbGW8sUa4Kp6BkSIaPDlk3tJ6ppR1HKoPdcbLV8CKhpoCBLEE exDSm4YGANvjVb/Y8F5ztckdb3scxu4N7oVT22gIL1pEZ5vlS/izHFMZMQ4Z1bPrZ75M 9sAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=A48L1wX0; 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 z31-v6si159661plb.613.2018.03.13.06.55.10; Tue, 13 Mar 2018 06:55:24 -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=A48L1wX0; 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 S1752665AbeCMNyJ (ORCPT + 99 others); Tue, 13 Mar 2018 09:54:09 -0400 Received: from mail-eopbgr20095.outbound.protection.outlook.com ([40.107.2.95]:3417 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932748AbeCMNxj (ORCPT ); Tue, 13 Mar 2018 09:53:39 -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=A48L1wX0ZopiK5RRMEq26/9/Vt3rI4s3Ylf3Ix8LzxVD0wDbjhGgv188CPQKQJDgVMnD9bV+hEFgetbtFcTgjnzokUbpqTb6cRvLN9TOSCQynRwiXNKbuyBBfB0rJ9vAYgnoD4CNo7NoP0KWR/2YsmcHOiClzudixc85x49xqhs= 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 DB5PR07MB1319.eurprd07.prod.outlook.com (2a01:111:e400:599b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.7; Tue, 13 Mar 2018 13:53:33 +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 v4 1/2] ARM: PLT: Move struct plt_entries definition to header Date: Tue, 13 Mar 2018 14:53:13 +0100 Message-Id: <20180313135314.18780-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180313135314.18780-1-alexander.sverdlin@nokia.com> References: <20180313135314.18780-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: HE1PR0202CA0002.eurprd02.prod.outlook.com (2603:10a6:3:8c::12) To DB5PR07MB1319.eurprd07.prod.outlook.com (2a01:111:e400:599b::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 82b6519b-7450-4df7-8ffa-08d588e9d045 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DB5PR07MB1319; X-Microsoft-Exchange-Diagnostics: 1;DB5PR07MB1319;3:v76sdmtc5EytL1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l1WUKfN8GqNHIntMRk3+Xz1xWrASrqimQLl4nBP4COsO2PYeuMK44+RZnLi5s3xncowFjBnySU8FYZODw0P/zF7F1s49XTVolBPALUO/Jowls/KbgRIneS9BYhNFPID72ChzKd007zndWPc+ZcUmKiMUf+H/XGLpo+ptZYbVZCP07C5NlejsrMMdeH8URwjflPxku0Jn/oFgPT0Pvdss6kqQRIcbKPRy0SN7vT3uyxdicR8bPooKgcgcDf3gVD/05hxNEvwpOZ0xBPdSr1lxNjqu8KM1sqUUuoM/ZdzEwZqmIlKgb8n0OVY0u2iOqu+JGQsoNSbdl8dKHauVHab5peIScqVr09HOZuvSLd3gIJaA6R80sJtl6blk9azmV52qSutWo86ZTrnLSScjDI8rX0NnTrzWcqCEd3qYPGgX37c2QfC1A=;4:Ptt6XmNIR7snyR/yanZzCe36cltfRkcRCZ4dwJiiQwhq+lujU04nzPULBtUTEClcgu44sZLlJnR2EjAlIfHiKWxmO8ClTEch6yG22ipebVmqesL9osDijDLUcdFRYI3gL9YwK9YTOQ1S44ljxeeE3gG0gGfEX2jH3p6Secwy4uHVOAp3x6R0OT5sTRYyo9t5uuY31DquTbvWgLVIgMyqR+msjrLd9J2xKJVkYy/UtySXxwdYXxAPLdaW/qY/rhkEDHe/AIwvYzTfDeDR06MqiJO6GIDwVFzl3LSJrtyW3tPEHlb8OdNO3yskJxNsFEqN 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)(10201501046)(3002001)(3231221)(11241501184)(806099)(944501244)(52105095)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DB5PR07MB1319;BCL:0;PCL:0;RULEID:;SRVR:DB5PR07MB1319; X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39380400002)(366004)(39860400002)(396003)(346002)(376002)(189003)(199004)(16526019)(53936002)(2950100002)(52116002)(186003)(76176011)(2361001)(2351001)(47776003)(36756003)(86362001)(575784001)(54906003)(81156014)(81166006)(8676002)(6916009)(7736002)(6666003)(6486002)(6512007)(97736004)(50226002)(2906002)(105586002)(16586007)(305945005)(48376002)(8936002)(4326008)(5660300001)(25786009)(26005)(106356001)(51416003)(386003)(6506007)(50466002)(478600001)(316002)(1076002)(66066001)(3846002)(68736007)(6116002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR07MB1319;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;DB5PR07MB1319;23:rYbBEitra/q6YDLtnLvwp/1shI82XGiU27xGGNf6U?= =?us-ascii?Q?ywVGVFIAxDmtOShYVtubXm8ZpZkJ3DduydDCKfIFvV/EPbQm65MSkWU2pJBQ?= =?us-ascii?Q?iPTA4c6WQJg4ZMpxbDQBbPBIpug/ujIKV4p+JcsCU8a0d/cDYIZwqAlR+fVU?= =?us-ascii?Q?/P65PkoHzFOevTp+gV3L71qwHMngjDoUX/t6Ix4bAgvR0XxDcHuZIJusTWVo?= =?us-ascii?Q?wQkgiFiAWvDcu+lFOnaMiTjV7Iifny1aoZkGbNGtfcccbSAlQAUOVDffVsAb?= =?us-ascii?Q?pZjFHy2dP9yZhxIBFQD5qeXl58wugkEbdYtjTzTBRZiEc112ZCiJDflCKLjE?= =?us-ascii?Q?g2REIxWxw8oCBv6dWj/JOSAWqolednteQUsqkZruwSM2kNDN+YWcvMw8H5py?= =?us-ascii?Q?FlMynBvQ0kkrnEw6cII9eLmnHk7J/cO6DBiGsbpcIfTXm+Di9BqTlZbZvk3y?= =?us-ascii?Q?cABnT7755T3HNVPsR+Tj+0LlV24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: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 13:53:33.8163 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82b6519b-7450-4df7-8ffa-08d588e9d045 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1319 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