Message ID | 20180406143939.14642-2-alexander.sverdlin@nokia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 9769660208 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Apr 2018 14:41:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 866F02955C for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Apr 2018 14:41:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AFB429561; Fri, 6 Apr 2018 14:41:18 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI 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 C0EF92955C for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Apr 2018 14:41:17 +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=DEVdq9eRxLBoJX VrPTmT4hw87eD7XiwbKIiHenRcXtTav0zu0x2Kj4D/MNIq0mV1dwb221ZokLkvakgpRWoCWn11HPH WN2Ow1DeLGNombAZ6tQTGXonc5vkpHYnkSr6J+6uVyWhEHHUViXur1OPBvnkVQkJ4Toxue10C+puP ogMnbrYdAJXmhZcVUGdrNe0OglM6s9ZhvOcQFbuGrvvuqUeRKXJvdrUEmPIvO0LQjGwSlyoMoysrk 9KTlMjRWiutMMWqo+n3VaKuA9wbhZb09mTyZrYeOMxr85wdacsmOAxbMmLoLyLmILMx3zFLf2zjps XdHaIaQL75/MNY29EXZg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4SY7-0003Bh-UI; Fri, 06 Apr 2018 14:41:07 +0000 Received: from mail-he1eur01on0093.outbound.protection.outlook.com ([104.47.0.93] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4SXZ-0002IG-8X for linux-arm-kernel@lists.infradead.org; Fri, 06 Apr 2018 14:40:35 +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=cELyAYGTs53ECcNqtZHhRocoHfhYae2eJvfjeKwqY7f53c7+x71SpMwa+BT1BEBlmv8kLVa5tmePTJmzwz9xxLYsDnBh+cJiWbvnV9+gZpzT/crYMTYrj+3+7kbZz5Gu7cvFTQdoZyr0RMo+wQfGGoKCyYRhaluKG7/pf9yKm/Q= 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 HE1PR0701MB2473.eurprd07.prod.outlook.com (2603:10a6:3:71::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.675.4; Fri, 6 Apr 2018 14:40:14 +0000 From: Alexander Sverdlin <alexander.sverdlin@nokia.com> To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/3] ARM: PLT: Move struct plt_entries definition to header Date: Fri, 6 Apr 2018 16:39:37 +0200 Message-Id: <20180406143939.14642-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180406143939.14642-1-alexander.sverdlin@nokia.com> References: <20180406143939.14642-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 X-Originating-IP: [131.228.2.20] X-ClientProxiedBy: MAXPR0101CA0018.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:c::28) To HE1PR0701MB2473.eurprd07.prod.outlook.com (2603:10a6:3:71::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d77253fb-6b4c-4bf1-ff43-08d59bcc50f9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:HE1PR0701MB2473; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2473; 3:Ld2X5PK4o1lPGL4WW3qc3WstONpmWDig0YItL//iiCZMtvh4PAPTp9KTspDFUIzQFOTu8w2cJWGWf3RPgdZkQtgPzkh805bg35h3sPcAekByO+ezU48bslhAVGaa9k7f3CLxatEl8oECjWOfpQn5jENU6VBST3YlE4QaGsvbK+ac31DkxkZ7yZKVyIJswLZF0jXnvRApreRxOfx2CPWVKb+iWxCTLp43e2eehEeDHD3Q5ks4S/hSkFmk/1rtGnjN; 25:E3b8yrF+phZnlc5wJ5noSR8EYdoGIb4N3o/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OK2ACR52LzoT3eL03iLerf3mB9q4rftCiMfo7SqMs6A3TQkf2fRpq7xa/ODW+jQbu4F5guACsyEon7VNUVAjX+z82jZF0RQykqdT3XjHhSRTH1EaAESTvwdTRgUFzjwTgfebLZeNIDdj+ynixNV7tT2f/qsNvY/O9Koo=; 4:rNLGH9sz31DfOrRJ/kb/qDammbUk6NeWGYU/65hw8n8RfrqBLq1Y8uf3MTAWhohxEZYBWKtRBMZ8W3BrDteDFlR/9EPZx2oTHvluXbUg9PR43JuHWcZ0+eCekGzBZKqdq/UriXH/L52gKotyjllbeeCHwDCPMJIFBZZj49Qjoy/TKSE+/UQMbKS87Fw09f3+EZIgOJQbwHci8jtAACFDXJZxjeeoBoYOnBd5zXEw/f+GVNsMb5y/yfRC3odcpIzYmJTQXu49MyUaldHGuKYDXmF73xTWkQRQGv/tkiNKVYujALEfOu01Q7XTCPg9SjcF X-Microsoft-Antispam-PRVS: <HE1PR0701MB2473A0F5A0EA9A791257604088BA0@HE1PR0701MB2473.eurprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231221)(11241501184)(806099)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:HE1PR0701MB2473; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB2473; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(39860400002)(366004)(346002)(376002)(39380400002)(189003)(199004)(25786009)(446003)(4326008)(11346002)(956004)(97736004)(2616005)(476003)(26005)(186003)(16526019)(6666003)(47776003)(6916009)(2361001)(66066001)(7736002)(305945005)(5660300001)(486006)(8936002)(50226002)(81166006)(53936002)(3846002)(6116002)(8676002)(81156014)(106356001)(6512007)(105586002)(16586007)(316002)(6486002)(52116002)(51416003)(76176011)(2906002)(36756003)(68736007)(1076002)(575784001)(86362001)(54906003)(2351001)(48376002)(6506007)(50466002)(386003)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB2473; H:ulegcpsvdell.emea.nsn-net.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0701MB2473; 23:LN5e2H8RxE9cpppFL9b13eDdCv+IlJux2z9b8kW?= =?us-ascii?Q?2eQIgDffo2jJs7G5WXKqUhqyfAqjdlsleE6aWCkxyuLzS2CWJ9f5wUsx0Hmj?= =?us-ascii?Q?3TYVatRILJ+sMF1tDKqShP17Wu0k/U0S6WBX0KDfSUKMAzBv6mOvB9sVJx3m?= =?us-ascii?Q?9cGus3WMMQn0IsSEDL6kVQd7Je5tecojmbglOMEf2pn26/aPfLVSbQRuUNcz?= =?us-ascii?Q?24DBghpV5v2skZQXnLMuyf4VrW9Zt+ylsTZ05G+QmpFDu3ORQfn5EOsHhDBT?= =?us-ascii?Q?lVeAuv8/LSyafuZJhqpqJJ0y4PInZ59OX32ygRgCZaYc0mpNTfcp6WLxuntP?= =?us-ascii?Q?zDJdB3ABSxWpF5pFl7zdikLqep5g4oWPwQ/exHfc2SSaPFALV16JT4x0xxzF?= =?us-ascii?Q?ePMMl9ZUY+3wkP6e379st5Sv1EmCoR7wah2QuHH3EO8U5Z86oYJP24vKstVN?= =?us-ascii?Q?z6BqKHcamY1acNHZmlOjRv/NqbuNJHW53VIenyf+HU3+wB2SB1PyVBxBGjRv?= =?us-ascii?Q?HUJvn8PIoPDOH2ojxjhKkKN/67PKPxeocHtWhV0nEgHPIyj6M52npQP/dE8C?= =?us-ascii?Q?FRhvt5zKPgTIjYsWdotrH8BGq9qW2B71Pe3JnNRu5kYHaTQj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6jASxjgz0jbz+EWuFOYtFzwvY3PlfOZ+k+TWN17CLjk X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 14:40:14.4741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d77253fb-6b4c-4bf1-ff43-08d59bcc50f9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2473 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180406_074033_340504_6AF02A9B X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, Russell King <linux@armlinux.org.uk>, Ingo Molnar <mingo@redhat.com>, Alexander Sverdlin <alexander.sverdlin@nokia.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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 <asm/cache.h> #include <asm/opcodes.h> -#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;
No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> --- arch/arm/include/asm/module.h | 9 +++++++++ arch/arm/kernel/module-plts.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)