Received: by 10.223.185.116 with SMTP id b49csp932953wrg; Fri, 23 Feb 2018 09:02:29 -0800 (PST) X-Google-Smtp-Source: AH8x227aCpf2chDnC1BdjlEMGoFdH00OU6Z2YpUj5EIhiFEDOg2kczAJSQv63JvJC3E2q+fhngN2 X-Received: by 10.99.38.67 with SMTP id m64mr1953252pgm.2.1519405349692; Fri, 23 Feb 2018 09:02:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519405349; cv=none; d=google.com; s=arc-20160816; b=RBU3X5wPmOhFppe14vKoOTzoSsf5sHsRHiH+FrpR9Ztbv5ObqN2wqeFGbWwu3R+Ss+ vcLAnxw1cTmbuhKpDbgOywLF/ek8t6xyGD2pg9u1GoKxbr47MbjjLUmg9C4u8y/aNDVp Mb9l9PcRsAX1CUpta+3Uw28pHgLn6XsbzOkE9JKRM2ktfhQISqh+wN2dgXfRWTuDH0is eG28DeanV32796Xico8vBZYIayJGpycEdXUbJSO8LSBE4+1WS/hbSNIfImvh0KM4MPFt 60g23RsM7x7ER7OBY/2SoM0WgZaCZpDisPDF2Q+p8T1DXhkKq4x3zYjek6Mre7yKO8xS 5c0g== 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=fjDqw68e0NGHwPhfcJkFwnAWX9lflvA6WB9yfSSU5T8dROQcjWjv6aygzzF1OzitdS CnCSuZbfg32DFOwImkxLlgZagpvQYxFRC78vEIeQHSnf2g/zwDGDf5X5bSefd7i+sq6d BGgDIwM55uLjZUdZwbdDwHN4TAMRi/9t+LXHSJmR0+KEER3QSY4QSHDY/VEvu+0k69NA XhiUGCdVIfZhw0TWhghBmVg78Ag9IgQYdULWxIFgp7GgBjgTTUak1zn29NU4VHM0GFCY h7MNXXWKZpr3kHWkrwA2OnuG/ytVoVc2NPuoYAYqACb89JSnmFGeAAmHCKPu5/HTzOh7 12rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=jeG/4IGF; 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 l6si1731332pgp.5.2018.02.23.09.01.56; Fri, 23 Feb 2018 09:02:29 -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=jeG/4IGF; 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 S1751873AbeBWRAT (ORCPT + 99 others); Fri, 23 Feb 2018 12:00:19 -0500 Received: from mail-eopbgr30108.outbound.protection.outlook.com ([40.107.3.108]:25861 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751702AbeBWRAL (ORCPT ); Fri, 23 Feb 2018 12:00:11 -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=sKOJKG/Q/zf2ycKrpGT2EIhM3a1c5rpmTKZdlOq6yzA=; b=jeG/4IGFx4zGaztt4/X8ObR+BWz/irdpQ5RxRwdoRKvYlH/pnEmwqiTdF7ZQ+BaLullGUFnsXts7AWKVDF4cOqgLaplJ5Pm9rbG0YYSKQB1ypIOuLsFykZGmN3qZ8nzCdbRitdSkyJDm+RbJIO42k6r60RlNKkTCsfhg6kn5Wfw= Received: from ulegcpsvdell.emea.nsn-net.net (131.228.2.20) by AM4PR07MB1316.eurprd07.prod.outlook.com (2a01:111:e400:59ec::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.548.6; Fri, 23 Feb 2018 17:00:04 +0000 From: Alexander Sverdlin To: Steven Rostedt , Ingo Molnar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexander Sverdlin , Russell King , Catalin Marinas , Will Deacon , Steven Miao , Tony Luck , Fenghua Yu , James Hogan , Michal Simek , Ralf Baechle , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , "David S. Miller" , Chris Metcalf , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, adi-buildroot-devel@lists.sourceforge.net, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 2/3] ARM: PLT: Move struct plt_entries definition to header Date: Fri, 23 Feb 2018 17:58:48 +0100 Message-Id: <20180223165849.16388-3-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180223165849.16388-1-alexander.sverdlin@nokia.com> References: <20180223165849.16388-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: VI1PR0202CA0036.eurprd02.prod.outlook.com (2603:10a6:803:14::49) To AM4PR07MB1316.eurprd07.prod.outlook.com (2a01:111:e400:59ec::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 79bc3cf2-13c1-4635-6e8d-08d57adee484 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7193020);SRVR:AM4PR07MB1316; X-Microsoft-Exchange-Diagnostics: 1;AM4PR07MB1316;3:7Q8Jh8QPnLmRs29Ipk1+WyeIYskGVh1MOLr/d51RyVl+Hli4zYTAXKnZnJCbQnQsIWctwE9x6C8+LfHeANpA0l4mvCAprY+kgdmBCzGSxBCNTosvPfxh9EGBkONGPF+BmviofEAk06moNFNDd98j1ple77PkXFmDhLYXnTC2lg04hOzQpuEy3s6kGBWarWzbpMCTHLABqiY4PFBj3GMt/OPCZl4QigxarfB9rqavxwjlXdZRQrT1/g6wejGWnxXz;25:rfJk7hwNw5R+Z2BYJcwezb5Tg49LS0v16gdpVDuxx7zAh2Iw7TWAH9jQIC4nWIzj0yzZrGId0aV966gnoone1mNljVGnhqo5qSG4btIlXwjzUyX5iEOboP6a+ems2KiyfystOwCwyHHekN+Ho2DGt+VRdJHC6sipZ8rqQISKTSDn2ZPG1vwtMYb0tPsoqRt6fA2jf4iSBCyOffXF/QHuuYJTgnXjM3Axt9S36SHDH81Au9U1ntU1U01EO6g/ueOm+UkwlMBeS7dK80xNxHCtilMR7rTe/B6OxNf0tRitw8ZZqZ4Qhih9YIiIx+paegisrVeXYo/sP9ZY6Q59QTyzQg==;31:BK0K15Rie0YWI/V7bZZ/A7fe7Jk8pdoyjDrzRiMtC6jJtJPyNwSJpOi1vuBV98ts4mN5r7U4A9Y5gRlBOJZiUhlB2leutpBRGuaNhkurK2KwA8ii7SZeYzTTqLGJcnxhXsLLm1xHEgzg81tjThW05dNiIVreRMGMjd5W6acSE1Nsu3exDpLwESqdIeRygv+p+DSkPPUvkl3V+i/+pBn2TdjrTL1cUxsAR9Si7O/V53E= X-MS-TrafficTypeDiagnostic: AM4PR07MB1316: X-Microsoft-Exchange-Diagnostics: 1;AM4PR07MB1316;20:ergzrdy9bFJTepNR3AVFpMgUbzzrfJXxK0Ys1YXMx3QXU8k4u61dkYI91mIRXpbcPtW7CV/o6HShh9D3K/ADtDkx5nQyT/7tVW7VF4AEQ2DETb8p8tTbbWOI9jL/lWnsBJ5CQFrcehbmxcNcCiL9GbBS/B8rTaNgK5qSamR0RR4RbN3jticmxkkMr7sFFDo+fYR1AQ/nfIWBGislBle0VI+js7vaVL8LrTAbol5V8s3TJ9SwFej5NGIfDRZgED9L7V7GqPc96d9KW/mHQUy27WxxuTIpJEAg7Twwmui2u+ba11BfsMQMsknLAAVOFspdcTOvqhvBdUoM0S0RK6Vdf8XyWtfUGOcKIawKpy1ZvIbUBP2XcPOId1+R1JkH7QU8sUnP2nBIlx8W6I8BSArVUailhNEBtvam/RNd1dgRhqnyGTvxGL9mzIWx5n4/K5iYJ2PW6yXD43f9EmhGjuEppXQojK3N9SD4U7NMe4Ai+OclZ4/Dzi71XUWrAgTqmOudFX54714NKmxKujBVe1o90Fnpul01+6wUQmEZ/KXITp9qvDqOZIhN10qULC+EI8FMuxdoBYYCZ1gdW/mFuoiKzELJFnylkw8n0jugfISc6IE=;4:PEcAxu+kFLBwQBVx1hs8vusmCPnbIwhb/RqQUNVfFLVje2yjsFpD+ZxUdqX9EUn/h+XkZZKWU5CDRgLMiX4bHWdCnn9xEQHxB60LcEVQ5i94hvKD8aWOgv0phcnt8U4QYNrvJVFZqRJAaK5eN7uHH6+BbFU2O0ES7KPWY59tX4d1/+PqBTYi9ME0EbnPTJGVJbVBRtJCErXdiXhf5FkaV/6qi60/FhjwEIrPzmk/fmo6Sv/Qzan8qBEs1bXchRFJV/PIIfRX3U281hqSYJVRtJ8/2wMORpP76uamq5qoDmx9kgwl1n3vQ7ccKldndkJq 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)(10201501046)(93006095)(93001095)(3002001)(3231192)(11241501184)(806099)(944501161)(52105095)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:AM4PR07MB1316;BCL:0;PCL:0;RULEID:;SRVR:AM4PR07MB1316; X-Forefront-PRVS: 0592A9FDE6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(376002)(39860400002)(39380400002)(366004)(346002)(199004)(189003)(52116002)(6506007)(386003)(7736002)(305945005)(2950100002)(76176011)(1076002)(7406005)(7416002)(97736004)(5660300001)(6666003)(6116002)(39060400002)(3846002)(16526019)(186003)(50226002)(105586002)(478600001)(106356001)(81166006)(81156014)(66066001)(6346003)(8936002)(47776003)(68736007)(26005)(8676002)(86362001)(575784001)(50466002)(4326008)(53936002)(51416003)(25786009)(6486002)(48376002)(54906003)(110136005)(16586007)(6512007)(316002)(2906002)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM4PR07MB1316;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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=alexander.sverdlin@nokia.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM4PR07MB1316;23:2dQ9vo/Yb3QFqmThYwu36D/IP78Y83yUppaRD+74q?= =?us-ascii?Q?XIlkSJZsOnGeS1tn2JH3xuNk/vezro85EigYRNiZDM8YkWDoDetiATohQebj?= =?us-ascii?Q?9BjCgzppI1A3Y84cIOUxPv/VJa8ltZnlJML3oZmQG2vAivyCJ1mo6tpuorbM?= =?us-ascii?Q?dvR3NNHCe1ErETiwhZBYqvNpzzKbjUINBpqHABkpldzAkjLW7JSe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NaZfhxSwdznxA0VfyGhM1BnQoSmgvuR/McB25O5b1PKHtqz8MbBo9qTSlGZ1Debmsp4X++RWVONODh6qgBXa1qZwQmeq/VoPKR/tS1OCGl0wxyAiufECzjKkRhQgB9CochzD5IK+88mS1Gn7Hj63kMxTO0XlNB2N3ByFLMyidTgrNmlzq4RJhRmpB0gImXA55xW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2018 17:00:04.3036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 79bc3cf2-13c1-4635-6e8d-08d57adee484 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB1316 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