From patchwork Wed Sep 22 17:00:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12511041 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 E403AC433EF for ; Wed, 22 Sep 2021 17:04:36 +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 A9B956120F for ; Wed, 22 Sep 2021 17:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9B956120F 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=wMdQL/I73t4BuygMrWj8TKtr6KFdS7xEcVzgnOpL+vE=; b=HbxYFw9/MUkrwr JlOseK9eT9YCfzcrwGwaejXL27p7TRo9YD6sjUOiJ8/gUti/A3dmMPbMybjtS94w6Q4HiVvbDVhEL yVOITg+PftGI7vly7TDS4B3d53Ltj0bwCJakwA0cxDwMWj+wQDn/oAY2Bt5pgFr0S3R1aqKQPMI7p YvhWMBIUZj5Bhv65swvUGGwsjHEnlYCTeCJbW7lCmre5+agZaXhV2IjnlXaTw7j5M9iiyvHCc1KUi PQrvq3tIna5XYUBAB2cdCiSGCkYrcXwK6kth8xn0gQfJSiIe1G6QvWaWywdIAGwTesgjot5jvaqsU 9NPqXtEqAJjAJjG8HnKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5dg-009Cb1-TU; Wed, 22 Sep 2021 17:02:33 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5cN-009C2p-5a for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 17:01:13 +0000 Received: by mail-pg1-x52e.google.com with SMTP id u18so3426621pgf.0 for ; Wed, 22 Sep 2021 10:01: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=vWRcCpDBCE+vzsQtuqngj9goI5v+Yy84JYj8ZdWoLcc=; b=qhAhQXsWxKoZI6SsJA792fI7EuNZxblUI4fBuB0ALX2oNGGUOcv9yX26JTDamU+tgs 2jmQ4Kl96+PQ6Qam2u6HUrZVPJZYTfnuhE9XfSQhRIYS49g1PKrUv/kQu+zCXPv8lzhs MfS0L7hFJvfdnp2talH/oeXgo34dq6iwReZfQqTliGB+ZvmTAqdBWr/scoGtFygScDtv 1UTsA/Qhj8g6s3dyYufnoszHAgDIgAg7wMM++UH6VGLBG4U5LpWvBbnhF/ShHQi8UbZ8 7WmPeqOBpMQ+onmVyTNxKjwzeJdOEirT58ZBHkv0/MoEFOFRV0PWMQqIe2L6DUTLTELA tyMQ== 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=vWRcCpDBCE+vzsQtuqngj9goI5v+Yy84JYj8ZdWoLcc=; b=6CVzciogdpcFiC5XViSIcnH9dDD7IE28VxAmA3RfnBEwgKu5dhLu5qlyJzuxkKFw5G Xw7hx3Dz/wm7xxy2ucRDZd6/wMUts5gyu7V514BsSwOtj4KQfl35n8waW6VY8FNrY9Gc Quqv5oSgPdg/fFF299sWWYEjorowZvJO1VV6YA61XvzPOSp96sYLZNfGaCtpM8K5W4LT o4JqUjXr1jgI0T4wq7rJRM/H66xy51LWM4SBrCPDPQFit1sjgRPPhrm3aek6x2BYYu0S a1losYws5uZPOlmnfeBbutbHXrDOBYn5513w/RzJOidRL5kUYQqqahcRUjO24QtM1tkX VcQQ== X-Gm-Message-State: AOAM532McSau4R0U0RAxxyzDuc90x9E288ObPlgWmQPvFPZ0fEyR70oO jsWAS72KQ9qMnvb7yEczeUc= X-Google-Smtp-Source: ABdhPJzXto/l2ks4tTQkP196214igtnpqDMIWeS2ZEKZOKBbTzPVmoNAajwkaJn7hp99pHegKQuZeA== X-Received: by 2002:a63:1656:: with SMTP id 22mr667810pgw.20.1632330070640; Wed, 22 Sep 2021 10:01:10 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id i27sm3041404pfq.184.2021.09.22.10.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 10:01: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 5.4 v2 1/4] ARM: 9077/1: PLT: Move struct plt_entries definition to header Date: Wed, 22 Sep 2021 10:00:31 -0700 Message-Id: <20210922170034.190023-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210922170034.190023-1-f.fainelli@gmail.com> References: <20210922170034.190023-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_100111_272413_D0EE26A9 X-CRM114-Status: GOOD ( 13.41 ) 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 182163b55546..78e4c1644628 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 b647741c0ab0..d1b76f3f3df9 100644 --- a/arch/arm/kernel/module-plts.c +++ b/arch/arm/kernel/module-plts.c @@ -11,10 +11,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)) @@ -23,11 +19,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;