Corey,

Sorry for late reply.

The reason you're getting the warning is because perfmon_init.c is
missing #include <linux/modules.h>, thus the macro EXPORT_PER_CPU_SYMBOL()
is unknown.

On Sat, Jan 17, 2009 at 12:41 AM, Corey J Ashford <cjash...@us.ibm.com> wrote:
> Hi Stephane,
>
> I tried the simplification you suggested below, but there is a problem.
> The pmu_ctx variable is not exported from the kernel, so the
> perfmon_power6.c module does not have visibility to it.  As an experiment,
> I tried adding
>
> EXPORT_PER_CPU_SYMBOL(pmu_ctx);
>
> in perfmon_init.c, but I get these warning messages during compile, which
> I don't understand:
>
> make -j8 vmlinux modules
>  CHK     include/linux/version.h
>  CHK     include/linux/utsrelease.h
>  SYMLINK include/asm -> include/asm-powerpc
>  CALL    scripts/checksyscalls.sh
>  CHK     include/linux/compile.h
>  CALL    arch/powerpc/kernel/systbl_chk.sh
>  CALL    arch/powerpc/kernel/prom_init_check.sh
>  CC      perfmon/perfmon_init.o
> perfmon/perfmon_init.c:52: warning: data definition has no type or storage
> class
> perfmon/perfmon_init.c:52: warning: type defaults to 'int' in declaration
> of 'EXPORT_SYMBOL'
> perfmon/perfmon_init.c:52: warning: parameter names (without types) in
> function declaration
>  LD      perfmon/built-in.o
>  LD      vmlinux.o
>  MODPOST vmlinux.o
>
> Line 52 is the "EXPORT_PER_CPU_SYMBOL(pmu_ctx);" line.
>
> and when it goes to build the modules, I still get this error message:
>
> ERROR: "per_cpu__pmu_ctx" [arch/powerpc/perfmon/perfmon_power6.ko]
> undefined!
>
> Any ideas?
>
> - Corey
>
> stephane eranian <eran...@googlemail.com> wrote on 01/15/2009 02:43:01 PM:
>
>> Corey,
>>
>> I looked at the patch. It is better than the first version with the
>> per-cpu info.
>>
>> I think it could be simplified a bit more by dropping:
>>         struct pfm_arch_context *ctx_arch;
>>
>> >From the struct pmc5_6_per_cpu. You can get to the context,
>> even in the hrtimer handler, via
>>
>>        ctx = __get_cpu_var(pmu_ctx);
>>        ctx_arch = pfm_ctx_arch(ctx);
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to