From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <linux-kernel@vger.kernel.org>, 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: Re: [PATCH 10/11] x86: perf_event_intel_bts.c: use arch_initcall to hook in enabling
Date: Mon, 1 Jun 2015 11:35:18 -0400 [thread overview]
Message-ID: <556C7BB6.1020708@windriver.com> (raw)
In-Reply-To: <1433168096.11346.19.camel@twins>
On 15-06-01 10:14 AM, Peter Zijlstra wrote:
> On Mon, 2015-06-01 at 10:11 -0400, Paul Gortmaker wrote:
>> On 15-06-01 03:04 AM, Peter Zijlstra wrote:
>>> On Sun, May 31, 2015 at 08:54:11PM -0400, Paul Gortmaker wrote:
>>>> This was using module_init, but there is no way this code can
>>>> be modular.
>>>
>>> No, I think you could actually make it modular if you really wanted to.
>>
>> By "really wanted to" -- do you mean future changes that someone might do?
>
> Yeah, I think we read "no way this code can be modular" differently.
>
> I'm reading it like; it can easily be, all it requires is this little
> patch, where you're reading it like Kconfig changes.
OK, so how about I update both logs with something like this, to
clarify I meant "no way this code can be modular currently, given
the existing Kconfig situation":
----------------------8<---------------------------
This was using module_init, but the current Kconfig situation is
as follows:
In arch/x86/kernel/cpu/Makefile:
obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_pt.o perf_event_intel_bts.o
and in arch/x86/Kconfig.cpu:
config CPU_SUP_INTEL
default y
bool "Support Intel processors" if PROCESSOR_SELECT
So currently, the end user can not build this code into a module.
If in the future, there is desire for this to be modular, then
it can be changed to include <linux/module.h> and use module_init.
But currently, 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.
----------------------8<----------------------------------
Paul.
>
>
next prev parent reply other threads:[~2015-06-01 15:36 UTC|newest]
Thread overview: 21+ 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 ` [PATCH 01/11] mm: replace module_init usages with subsys_initcall in nommu.c 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 ` [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 ` [PATCH 10/11] x86: perf_event_intel_bts.c: use arch_initcall " Paul Gortmaker
2015-06-01 7:04 ` Peter Zijlstra
2015-06-01 14:11 ` Paul Gortmaker
2015-06-01 14:14 ` Peter Zijlstra
2015-06-01 15:35 ` Paul Gortmaker [this message]
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=556C7BB6.1020708@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=acme@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox