Re: [PATCH 6/7] dynamic debug v2 - convert cpufreq
From: Jason Baron
Date: Thu Jul 17 2008 - 17:47:46 EST
On Thu, Jul 17, 2008 at 02:15:31PM -0700, Greg KH wrote:
> On Thu, Jul 17, 2008 at 05:05:32PM -0400, Jason Baron wrote:
> > --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > @@ -25,6 +25,7 @@
> > * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > */
> > +#include <linux/dynamic_debug_cpufreq.h>
> > #include <linux/kernel.h>
> > #include <linux/module.h>
> > #include <linux/init.h>
> kernel.h includes dynamic_debug.h right?
Then why not just put the
> _cpufreq.h stuff in the current cpufreq.h file(s)?
1) cpufreq.h is included by other subsystems, and thus those other subsystems
potentially have the wrong debugging information.
2) For the case where CONFIG_CPU_FREQ_DEBUG is set and
CONFIG_DYNAMIC_PRINTK_DEBUG is not set i need to be able get the proper
definition of 'dynamic_dbg_enabled()' out of dynamic_print.h (included by
kernel.h). This proper definition is obtained by setting 'DEBUG', and
thus i need to define this before the kernel.h include.
We can solve #2 by defining an explicit definition for dynamic_dbg_enabled()
when only CONFIG_CPU_FREQ_DEBUG within cpufreq.h. roughly:
if (cpufreq_debug & flag)
However, the way i have it now I don't need two definitions for
If we could pull the subsystem specific header in dynamic_printk.h for each
subsytem that would do the trick and be really clean, but i'm not sure of an
easy way to do that...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/