From patchwork Mon Sep 27 21:02:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12520791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 883B0C433EF for ; Mon, 27 Sep 2021 21:07:10 +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 5017A60EE7 for ; Mon, 27 Sep 2021 21:07:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5017A60EE7 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=orQOZWk4GsI2WK 80lI1f4qvXnEwcGZ+mYizVbi5osSDB+sdGA+BOX0Cij862B9RFzXR+eFhW50Mp/N/5TW9pIjfwvoR V+t30Cc4x8pphgYkg0dV4ULB/de4lY4kRRToZp03jEEdOYZkh0UKhYDdm8kBUOdyBV0Pcmny3tbAh +FZ3TNvC/QIL576fR5uKS4JAQtHPv3gBIArgRA/NCdv+irJmE9uIZHeR5Y/O++4ijv+epBAGsVgdi DeFu99GLHRrS/BfbIMgTor9/lKEx6jIBjVdkrqvT7GCB+aojA/TsptHO+xTIv69eDfaDVnU/nh0zE mD/UArX+s7eNiq0WK0mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUxoQ-004J8u-Qf; Mon, 27 Sep 2021 21:05:23 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUxmK-004IHc-BH for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 21:03:13 +0000 Received: by mail-pg1-x532.google.com with SMTP id x191so12024675pgd.9 for ; Mon, 27 Sep 2021 14:03:11 -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=nrztCDDL4ORIaQ1rqekpF4Kd+WvOFqxaF+fe7fmfRF4mLxN3pESgGRsiARd8f0SBwN uV3Pu0yVIeJNrucCdi99jdBxv3tVuQuM/PhLL2Hrlz+lXapl5h1q6xKGjWktmKS5/qXw cMD4idUJVEWVUaz0P8uPWB1msoH35iWO4W+HlgTc0ulKzDQGDhoa6edhEOnv2rEyd7d0 KlkNyqDDIX3vdSA0mUajdu9ebrGKvs/vor9MIQsqh1KSB74xDBRBELLehgYrLmCcEbiD 2rKfVTzuoH7OvRDA3IE10ztDD5EDo49qdhr7gHpzO1xs9ZcumcQnf5+E/592lOVgkYIw sqqQ== 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=aoALpNHn33bIGjKXqW8BJb1WaanBihuUHK9DPWix35NXdWD5AX2p94y6Kgt641wBH1 JlU7E44CgNKAdVgkygZjDmE8CKOPmoPyfM5jRjuhyG+6zwo98aCHRCq2fkrwsb62FD2O XYmaGjveurcYHE+T83zdX6A58T2x8eHUepgqB7/N3Y11qcylhvIioko8ouLQGrbxCO5z yaTv72uMc4a23HHbstgXk9o/GuyIbdssWrR9qKVBxd0S1u1gGWmeFN3vxRBpT+wZ2dcT yORjgOIVfbYmKF3GlT4++V7DeWRL3D5o2zVAqJQzz78i5izyAIFYA+1bZ0YdgVsXXCLA OS8g== X-Gm-Message-State: AOAM531g5w+8txrgb862QjMVmHMYtKanM5EXS5RRv+8N1CSiKnlfPynF zYMBzg2xl2WLuL07FtfkJBg4g+iqMtk= X-Google-Smtp-Source: ABdhPJz7d+rXV3J7u777+KSHt/E8YYZFLjLmqTv9LhalvRcR3JbchEsiUZJoMcAJOP2t6sy/Zn2JSg== X-Received: by 2002:a63:a70e:: with SMTP id d14mr1377004pgf.431.1632776591220; Mon, 27 Sep 2021 14:03:11 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o16sm19227652pgv.29.2021.09.27.14.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 14:03:10 -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 v3 1/4] ARM: 9077/1: PLT: Move struct plt_entries definition to header Date: Mon, 27 Sep 2021 14:02:56 -0700 Message-Id: <20210927210259.3216965-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210927210259.3216965-1-f.fainelli@gmail.com> References: <20210927210259.3216965-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-20210927_140312_417015_8AA20C6F X-CRM114-Status: GOOD ( 13.00 ) 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;