From patchwork Mon Sep 27 21:03:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12520811 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 A8C14C433F5 for ; Mon, 27 Sep 2021 21:11:03 +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 687F560EE7 for ; Mon, 27 Sep 2021 21:11:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 687F560EE7 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=ktR4E0NPfNULgp/Ke7Bq6U0kqyIhDWjhLZqHf/mUsAw=; b=JqYnDJim2ee5Lo AfsywQKGk7FDLoS3EHCp+BJK2YeRqesxEmK9QM2/pM7lcJoG9UI2PogFjiMAW6lnHGDvHzbzoovKw u1a6uvvd2w/ew3I5xeZGAP29yR/bX9pQvsBrZhuZyCAj+3gnyOjjw/ThXquiCFU8mKdeakLb8v2r4 g8/9v2BUS1mUzmkk9dQPJNJktm04bbu4ABDvPFBnWSa495TwtC3W0KbE17BCU75z/mID22renMmdH KiVBb1S3y7q/WkU4uH1l0qs4ZjCvH8BmHOMRZ2KW5TgCwcwjWspkFyxpTGdo+y4VD1zNYkxK5d+J+ rD+YICaxqOxLbPlAO6+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUxrq-004Kr8-5d; Mon, 27 Sep 2021 21:08:55 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUxmV-004IL7-5z for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 21:03:24 +0000 Received: by mail-pf1-x42f.google.com with SMTP id k26so12444513pfi.5 for ; Mon, 27 Sep 2021 14:03:21 -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=fkhLdmrHmkgMMt1LbOtoU8XmiMwNfTKIfISAPG6mWV4=; b=oMtgY/sCIaVV/K8un4kN0zGD6prfOG9zRFq4Y7jeSwmBW/oATV0VENAnfrZHsz5h23 Nnp/9Wxa2x8R5oGH8CNExc9kuU5yloG2wpcqU+7zVJidRB4nUnEAiYk+Q96Ur1ZD5a/x 66LVsagcePI96nLQ0Z1E55mRmpSk9PtwmTeDAAYYbpWp81u/8G1T76+wx5mfj2boYRiu +2fqTeCsndtliw7wiQNVeU1rN9P5M7fn+qYXZ0LJ/FWBWU0vUQ1bIB4UeYkmJcP2WV4B FUTLh4plf1LDI+/zNXVb9sAMx1kEpmKwZLhpbruIMvVdVQpjYnc/lJxTzobtAGNGy2e4 7GpA== 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=fkhLdmrHmkgMMt1LbOtoU8XmiMwNfTKIfISAPG6mWV4=; b=ITYCRxf8K61UYcLzLNXoPTc3GKxMi656yCClWq2dE47D3OJ6MhWeXeNp+bDSVGqVNW MspVmfFe7NjEPEmF9kFfU80KkWwcgU6ZQsc697dSpIsk4oJ1woPyJDwCyrYVBB0rJAFL J559WgWwsGhbF1SFrIWRaa/T2HG/0dMTHE95Sl0tHBtKQRGVaKA4PFO8OTcyDB2YEhp8 8vmnhKmkKHJCWs+NKScExxyZsmRpEcxuYA+6fmnlgqOTTTK+uX9tRm51rrrRjInerPmQ oADJXpL9UwGHp0KdjqNoKFc+UvVtFDboNUEaS+egHrOTI4PNMu2DcflXOrAlL4BevNOM OQZA== X-Gm-Message-State: AOAM531uPK/91L2yvueZAywetYrtVwKCenAawwJwftAafi6/N5YTeWFf ymVDwFuaQg3SotrPSK0n66c= X-Google-Smtp-Source: ABdhPJwk0jRk/eVVhjdLpd4ZLLNPaRgFiyukcQrtmci8jBvDv7dXbegbnfyeMFbEwD/oetbgX6AXTA== X-Received: by 2002:a05:6a00:190b:b0:447:b298:423f with SMTP id y11-20020a056a00190b00b00447b298423fmr1985703pfi.10.1632776601219; Mon, 27 Sep 2021 14:03:21 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id e12sm16444086pgv.82.2021.09.27.14.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 14:03:20 -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.9 v3 1/4] ARM: 9077/1: PLT: Move struct plt_entries definition to header Date: Mon, 27 Sep 2021 14:03:13 -0700 Message-Id: <20210927210316.3217044-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210927210316.3217044-1-f.fainelli@gmail.com> References: <20210927210316.3217044-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_140323_255072_8308E03A 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 ed2319663a1e..2e9872a22359 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h @@ -18,6 +18,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;