From: John Levon <moz@compsoc.man.ac.uk>
To: linux-kernel@vger.kernel.org
Subject: EXPORT_SYMBOL(local_apic_enabled);
Date: Wed, 26 Sep 2001 15:01:50 +0100 [thread overview]
Message-ID: <20010926150150.B4276@compsoc.man.ac.uk> (raw)
My module needs use of the local APIC for performance counter setup.
Currently I am detecting the various ways it can be enabled/disabled as follows :
static int __init apic_needs_setup(void)
{
return
/* if enabled, the kernel has already set it up */
#ifdef CONFIG_X86_UP_APIC
0 &&
#else
/* 2.4.10 and above do the necessary setup */
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,9)
0 &&
#else
/* otherwise, we detect SMP hardware via the MP table */
!smp_hardware &&
#endif /* 2.4.10 */
#endif /* CONFIG_X86_UP_APIC */
smp_num_cpus == 1;
}
this is obviously ugly, and more importantly fails when passing noapic,nosmp etc.
as boot options.
How would people feel about exporting a flag for local APIC setup that modules can look at ?
If it's OK I'll send a patch.
My module is not the only one that needs this (e.g. the APIC timers module)
regards
john
--
"Khendon's Law: If the same point is made twice by the same person,
the thread is over."
reply other threads:[~2001-09-26 14:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010926150150.B4276@compsoc.man.ac.uk \
--to=moz@compsoc.man.ac.uk \
--cc=linux-kernel@vger.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