All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, <x86@kernel.org>
Subject: [PATCH 10/11] x86: perf_event_intel_bts.c: use arch_initcall to hook in enabling
Date: Sun, 31 May 2015 20:54:11 -0400	[thread overview]
Message-ID: <1433120052-18281-11-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1433120052-18281-1-git-send-email-paul.gortmaker@windriver.com>

This was using module_init, but there is no way this code can
be modular.  In the non-modular case, a module_init becomes a
device_initcall, but this really isn't a device.   So we should
choose a more appropriate initcall bucket to put it in.

The obvious choice here seems to be arch_initcall, but that does
make it earlier than it was currently through device_initcall.
As long as perf_pmu_register() is functional, we should be OK.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/x86/kernel/cpu/perf_event_intel_bts.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_bts.c b/arch/x86/kernel/cpu/perf_event_intel_bts.c
index ac1f0c55f379..7b2fec86dead 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_bts.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_bts.c
@@ -521,5 +521,4 @@ static __init int bts_init(void)
 
 	return perf_pmu_register(&bts_pmu, "intel_bts", -1);
 }
-
-module_init(bts_init);
+arch_initcall(bts_init);
-- 
2.2.1


  parent reply	other threads:[~2015-06-01  0:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01  0:54 [PATCH 00/11] Replace module_init with an alternate initcall in non modules Paul Gortmaker
2015-06-01  0:54 ` Paul Gortmaker
2015-06-01  0:54 ` Paul Gortmaker
2015-06-01  0:54 ` Paul Gortmaker
2015-06-01  0:54 ` [PATCH 01/11] mm: replace module_init usages with subsys_initcall in nommu.c Paul Gortmaker
2015-06-01  0:54   ` Paul Gortmaker
2015-06-01  0:54 ` [PATCH 02/11] fs/notify: don't use module_init for non-modular inotify_user code Paul Gortmaker
2015-06-01  0:54 ` [PATCH 03/11] netfilter: don't use module_init/exit in core IPV4 code Paul Gortmaker
2015-06-03 16:04   ` Pablo Neira Ayuso
2015-06-03 16:18     ` Paul Gortmaker
2015-06-01  0:54 ` [PATCH 04/11] x86: don't use module_init for non-modular core bootflag code Paul Gortmaker
2015-06-01  0:54 ` [PATCH 05/11] powerpc: use subsys_initcall for Freescale Local Bus Paul Gortmaker
2015-06-01  0:54 ` [PATCH 06/11] powerpc: don't use module_init for non-modular core hugetlb code Paul Gortmaker
2015-06-01  0:54 ` [PATCH 07/11] arm: use subsys_initcall in non-modular pl320 IPC code Paul Gortmaker
2015-06-01  0:54   ` Paul Gortmaker
2015-06-01  0:54 ` [PATCH 08/11] lib/list_sort: use late_initcall to hook in self tests Paul Gortmaker
2015-06-01  0:54 ` [PATCH 09/11] mm/page_owner.c: use late_initcall to hook in enabling Paul Gortmaker
2015-06-01  0:54   ` Paul Gortmaker
2015-06-01  0:54 ` Paul Gortmaker [this message]
2015-06-01  7:04   ` [PATCH 10/11] x86: perf_event_intel_bts.c: use arch_initcall " Peter Zijlstra
2015-06-01 14:11     ` Paul Gortmaker
2015-06-01 14:14       ` Peter Zijlstra
2015-06-01 15:35         ` Paul Gortmaker
2015-06-01 16:26           ` Peter Zijlstra
2015-06-01  0:54 ` [PATCH 11/11] x86: perf_event_intel_pt.c: " Paul Gortmaker
2015-06-01  7:05   ` Peter Zijlstra
2015-06-01 14:13     ` Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433120052-18281-11-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.