From patchwork Wed Sep 22 17:01:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12511055 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 5E55CC433EF for ; Wed, 22 Sep 2021 17:09: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 2D2A2611C9 for ; Wed, 22 Sep 2021 17:09:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2D2A2611C9 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=IR9Qdq4dwgGcEKI/uUsTm1kqTjqYDA0cTy3+LsVo2cc=; b=Yzn9eTeWnr0gTc Atv1gGGkgBKQc7OoY4PYbjLsormknw4WR4WH1f2Ba+i2xyvTD5O0TAM2CFBipjYTTCZyccQB7Xo7S WoHaMsGZQqB5N6u947gWU2qDFaMNEbOZwyb98Ao1xmWrgV9Y4HwlxEwgbAbvyAbmPHKPmbk5nLBlw SC8LT9j58f5SwKrIAMlm6iy0Dn/pisJQoxvhFTO7rLJePPOPYPTjrmLbSDU9kZMbRTBMoEYYCGTgA sKqMrANveMKIcfpB9Nc/RdcDINkxyO/6E3ppTm5SwFIGCpWvUp2Zb8Q1Iwn7StroojRJhn4P/q8AT rfj/8fWbvTA6/DcvKu1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5hA-009EJh-Id; Wed, 22 Sep 2021 17:06:09 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT5d3-009CKZ-Ns for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 17:01:57 +0000 Received: by mail-pf1-x430.google.com with SMTP id e16so3264723pfc.6 for ; Wed, 22 Sep 2021 10:01:52 -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=RE9qlrpj4A/Ec+OQwHI70Yn7GuZgbAKhGWX1AXM0xpo=; b=NcoCwUx1Vysb5fmvfESOEvUJ4lGbJFrhbHeO5GgrhqCDDeow5AQdpe98mTj/wEzxfM 25ps7EymFUZN209QD8Gutk4NT328sEaFF8a/06Cx9ZwWrZhbAAK45pYGy0T7/kQKsGN6 C+YoUCC/CFDV50Bu2fcOPhlAl9JeW2YgkRP5nrWVMUSviSusf+UPpQ1jE+mleSzoQABk gmzanpHv9dpuCzaXZLRoydQ6zSvg04xi/ZKTtZfzjOXxCWJy3xoRnirCmt4/NewzMnUn TBPEsNEjndTum5nB3FyLappH3m/vEIf7vLaL8rvtOSHj0hLpgRsSjzscFFz4EqNtWpRl mYhA== 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=RE9qlrpj4A/Ec+OQwHI70Yn7GuZgbAKhGWX1AXM0xpo=; b=RHxVjuagCXqwn119pvVcH07AiXj5Yoy3vSlqigDlqeu6fUUyGNpTPP0vlSNRryVkSk g6hJUwt3J2OZXi2vrobtvt+DadKL8VudbBfZ4JzZen5OTYyq8B5Be9k33ojhwZbvUkZM PzsHskoi6tea6OiZUQjIcRx3K+pZ3/Agp248eO5MCyTgfwfUI38kUW0n25xSQfKBaci8 brK9+pCn6CNv61vZY4amxez/WpYOGVrS2JkMk5QvnqrlNLB1di9Tw/iUB9i4U9kuW2/6 xKaorWRYC4M6+8Mm2Tb9AjoDQbOybejgCGbqN831L+570EgTp6Wq9xnRjDO+sCLLXqAI Ojrw== X-Gm-Message-State: AOAM531ldK5uXqYLAxxqTr3P242NmwA4I/+rqzRtK1SgUO5PcM1gWxGT BfvpfcxRgffH+i6pkYoIWHs= X-Google-Smtp-Source: ABdhPJwx/1HPx00NTjTAXQh2HacGrpLfSM+X0rlcbfDvDbY0C5D1ORscK26/URfhsK8teJ7f0Y9UNA== X-Received: by 2002:a63:3d4c:: with SMTP id k73mr674652pga.44.1632330112224; Wed, 22 Sep 2021 10:01:52 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j7sm3101087pfh.168.2021.09.22.10.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 10:01:51 -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.19 v2 1/4] ARM: 9077/1: PLT: Move struct plt_entries definition to header Date: Wed, 22 Sep 2021 10:01:25 -0700 Message-Id: <20210922170128.190321-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210922170128.190321-1-f.fainelli@gmail.com> References: <20210922170128.190321-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_100153_901352_7F566889 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 9e81b7c498d8..56d4c97e578a 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;