Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2999115imm; Thu, 24 May 2018 20:51:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqseWjL8OaNbwt37Y+jIzldcO+TtVV1NLP73ZaDwiKUvvZar9UET1r4cHlGgYnNgVlx/TkR X-Received: by 2002:a63:a60a:: with SMTP id t10-v6mr602125pge.351.1527220297639; Thu, 24 May 2018 20:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220297; cv=none; d=google.com; s=arc-20160816; b=ncGMwjCpiIzHSIABzJ1wTWP6rBR69jDkaeBEydoCMDQxj3jOojW2kPs8WVljvrTEmI KXvYmKEkFWfBUgG0QL/pff5sYWhFhx+W0hsazW0dZzp/o39OsWCPCOTBEIsmoizCqFTf X+YrX7jnL2uxLT1SBxw0oRCXzwAZrrM3KhlgX+GIWHQkUU+jyiPhmyuaBiqc3FvXvUYf yP16VkAIugg/T92IJEKaHi0mfnR8Rk7lQ0gBQYWARUgEwVO4osVK4nDhc0Pu9sRZpYdY ctw+/6ZRG+ULAhlHtAUyM/5IcvA0qjkxeEpl5OFTR8LBf5VU3BHLeWrRm3U68MR/6xfq knmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NWtXLAu+5j8vZ+LSFmXLU42cBhA/qiyAB3Mi3kzuSTc=; b=whL/ZclefEykf5SzXpnw+puXEbPd3e2Ynz2wpawAzEJVoNHgTYnqTNUNuYs8j4DltR tNdcWUQErVBMhEj647nca2nDvKWpTpjILr5gJGstoaRYVLHma/sT/elbqr/9r26dpmeO oEBu7bpTVGrJTnEwnYn0Tba1mfpPPpJNPWjTlWl5TN2pAEQji3djajE7JH16WQRmJAKp e24IXrIj96MZz7a5Dic5rdMQK2sePcSjofFGpnxaXfQxATm+Tkv0zZlYSAMNx4NR7mN2 /hpST2fyWUAulhyZugbwNw1CUqJhQnrpX62g28B5Cw2f5FunGF72MP7COpr2Gh2v1Nf0 KImQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25-v6si21713065pfn.248.2018.05.24.20.51.23; Thu, 24 May 2018 20:51:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965056AbeEYDvL (ORCPT + 99 others); Thu, 24 May 2018 23:51:11 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39804 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934498AbeEYDvI (ORCPT ); Thu, 24 May 2018 23:51:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 112BD7C6B3; Fri, 25 May 2018 03:51:08 +0000 (UTC) Received: from treble.redhat.com (ovpn-120-163.rdu2.redhat.com [10.10.120.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69ABC2166BB2; Fri, 25 May 2018 03:51:07 +0000 (UTC) From: Josh Poimboeuf To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/modules: remove unused mod_arch_specific.toc field Date: Thu, 24 May 2018 22:48:34 -0500 Message-Id: <2892e4f57d03caf1b3d6c14bc456b2f9a116b32a.1527220066.git.jpoimboe@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 25 May 2018 03:51:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 25 May 2018 03:51:08 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The toc field in the mod_arch_specific struct isn't actually used anywhere, so remove it. Also the ftrace-specific fields are now common between 32-bit and 64-bit, so simplify the struct definition a bit by moving them out of the __powerpc64__ #ifdef. Signed-off-by: Josh Poimboeuf --- arch/powerpc/include/asm/module.h | 13 +++++-------- arch/powerpc/kernel/module_64.c | 1 - 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h index 18f7214d68b7..d8374f984f39 100644 --- a/arch/powerpc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h @@ -50,13 +50,6 @@ struct mod_arch_specific { unsigned int stubs_section; /* Index of stubs section in module */ unsigned int toc_section; /* What section is the TOC? */ bool toc_fixed; /* Have we fixed up .TOC.? */ -#ifdef CONFIG_DYNAMIC_FTRACE - unsigned long toc; - unsigned long tramp; -#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS - unsigned long tramp_regs; -#endif -#endif /* For module function descriptor dereference */ unsigned long start_opd; @@ -65,10 +58,14 @@ struct mod_arch_specific { /* Indices of PLT sections within module. */ unsigned int core_plt_section; unsigned int init_plt_section; +#endif /* powerpc64 */ + #ifdef CONFIG_DYNAMIC_FTRACE unsigned long tramp; +#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS + unsigned long tramp_regs; +#endif #endif -#endif /* powerpc64 */ /* List of BUG addresses, source line numbers and filenames */ struct list_head bug_list; diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index f7667e2ebfcb..1b7419579820 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c @@ -823,7 +823,6 @@ static unsigned long create_ftrace_stub(const Elf64_Shdr *sechdrs, int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) { - mod->arch.toc = my_r2(sechdrs, mod); mod->arch.tramp = create_ftrace_stub(sechdrs, mod, (unsigned long)ftrace_caller); #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS -- 2.17.0