From patchwork Wed Sep 22 17:02:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12511063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 121D3C433F5 for ; Wed, 22 Sep 2021 17:13:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF30A60F6E for ; Wed, 22 Sep 2021 17:13:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CF30A60F6E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6eT6HMbTWtbegVeMvnMREg2MEd1xrCTffdzLjGFpYU8=; b=S8PratgJPrb73Q 1ak80qzlFtiTs3SacjslRUob7O1XaeUcFnCLUI5u9Te1DQ60QeT+ggCAvtYusr3EO/j2GmNrkDBfh LdX1bCVdfCAOPMU4Oy2z+kmIENIE1V7q3gKwvw7RpYNLDO5zNxFR8kREH3xaLorVeUxFFSvEO7ZVo QKhVCEFwdPf/Ap6Oup4PEN5s++T8xsijWpNmA9XNQcnF6PXlxSBF9q6txNJbOJchu2n9qkEoYrVJ5 JBHZxnvGHB5HFM6tBW5TADw7BSewYyF29srpcjFKRLk4RdR8nrcU3NSPAAM+uvxYZcP0MlJBC+H6q HXa1dOlmy+3U1ej/hhAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5m4-009GFW-SU; Wed, 22 Sep 2021 17:11:13 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5dc-009CbM-Qk for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 17:02:30 +0000 Received: by mail-pg1-x530.google.com with SMTP id m21so3315128pgu.13 for ; Wed, 22 Sep 2021 10:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I3c7+1FjEQVvXK/8I+aPaOJMr2BWsGKNeLa7wMBIJNU=; b=OeXTE0J8t3tMOJYFZTC2oSzoXqJRXhT75qkT8Pi/2Cp7fE1DvXK2IgCqImYYXBYrZ4 1CO3WimDugs6/qYaqHrTsxnTKBXV0GDc2GYrfWCysCSBLXcCJU5rpaAXSfxNzZ9XAc+s rO92WcDL4QpaGVRbJzIV4pQeAhpk1sfLF7U68V6GFCKfWOe0dAEyetkWNkDbjHEoPEvs dst3U3moOIz57z3JmuPzYMw6beWqfEx74Rt9osgYYkkaFzAh3gSW+azV+eSMpNLoEK8H O5ksB4HUC2RFnJ4jL30kok3DGFzj4EWydTmYk9HwfEvChmduL8A2dy3lPr5CXY6r96gb jT5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I3c7+1FjEQVvXK/8I+aPaOJMr2BWsGKNeLa7wMBIJNU=; b=Lqhv9XVRbXhX09YCgwhlIfHJAGDZUE1Vcm9FReWeO7aWwOJLW0yByTs5Jpyh1vB9qx 6Q7Wnlrchexn0Ykhi/nIGns0tMeK3c7mlrcKwQr7z8Ds7paUcYECAjAeryr7NDqZEF9P YYGITU2x2gAKhUgbrncEn0BLBtbC3iflq7yqrRMOWJHyZ8xsYD9P7aOmlkAQRm7kSJlP tlNYt3JcwDck/5XlItuOT57q3IvI+teIgNAonA9mdixcvoKVL5qHXZmTzMDK7nGaZmtP 0x1DdLs7/BqKWPdRw9UmDMzRteeY9lrD7g8LgNepoX/MEgXJBmqg0fpiLfZbeoITOU2V GhNA== X-Gm-Message-State: AOAM5329PrXuraRMNVyyJ11Ai2rFIMZU5Ha9chjPOIAOIq5FMVvEpRZq OtuAmPpLs+Cf9rp/VNrTNUg= X-Google-Smtp-Source: ABdhPJzDEnGBhNxEj4sL452h5H+7FtzmiANEXAluhYCY1W7UgYvG3m3F8EbICkBZQ1eEzVae4LcmDQ== X-Received: by 2002:a65:62d1:: with SMTP id m17mr652556pgv.370.1632330148306; Wed, 22 Sep 2021 10:02:28 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id r76sm2796579pfc.2.2021.09.22.10.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 10:02:27 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin , Alex Sverdlin , Russell King , Florian Fainelli , Steven Rostedt , Ingo Molnar , Russell King , linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT) Subject: [PATCH stable 4.14 v2 1/4] ARM: 9077/1: PLT: Move struct plt_entries definition to header Date: Wed, 22 Sep 2021 10:02:07 -0700 Message-Id: <20210922170210.190410-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210922170210.190410-1-f.fainelli@gmail.com> References: <20210922170210.190410-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_100228_937108_8D1C633A X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alex Sverdlin commit 4e271701c17dee70c6e1351c4d7d42e70405c6a9 upstream No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King Signed-off-by: Florian Fainelli --- 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 89ad0596033a..6996405770f9 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 3d0c2e4dda1d..f272711c411f 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;