Subject: Re: linux-next: percpu tree build warning

From: Ingo Molnar <[email-masked]>
Date: Wed, 25 Nov 2009 11:50:04 +0100

* Stephen Rothwell <[email-masked]> wrote:

> Hi all,
> 
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
> 
> arch/x86/kernel/hw_breakpoint.c: In function 'arch_install_hw_breakpoint':
> arch/x86/kernel/hw_breakpoint.c:121: warning: assignment from incompatible pointer type
> arch/x86/kernel/hw_breakpoint.c: In function 'arch_uninstall_hw_breakpoint':
> arch/x86/kernel/hw_breakpoint.c:156: warning: assignment from incompatible pointer type
> 
> I am not sure where this one came from ...

the code does:

DEFINE_PER_CPU(unsigned long, dr7);

int arch_install_hw_breakpoint(struct perf_event *bp)
{
...
        unsigned long *dr7;
...
        dr7 = &__get_cpu_var(dr7);
...
}

Tejun, is it perhaps a problem of the percpu code getting confused 
between the local and file scope 'dr7' variable shadowing each other?

If yes then that needs to be fixed in the percpu tree. per-cpu variables 
used to have a __per_cpu prefix and that should be maintained - the two 
namespaces are obviously separate on the logical space, so they should 
never overlap in the implementational space either.

	Ingo