lkml.org 
[lkml]   [2001]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectEXPORT_SYMBOL(local_apic_enabled);

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."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.359 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site