* sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu)
@ 2007-07-22 16:08 Alexey Dobriyan
2007-07-22 17:06 ` Al Viro
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2007-07-22 16:08 UTC (permalink / raw)
To: ak; +Cc: linux-kernel
Andi, with new vDSO code sparse fails to check with usual invocation here:
$ make C=2 CF="-Wno-decl -Wno-shadow -Wno-context -D__CHECK_ENDIAN__"
...
CHECK arch/x86_64/vdso/vclock_gettime.c
arch/x86_64/vdso/vclock_gettime.c:51:11: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:47:28: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:48:20: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:49:21: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:38:14: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:39:25: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:80:11: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:75:28: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:76:14: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:77:12: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:78:15: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:79:13: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:87:6: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:102:6: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:111:4: error: expected structure or union
arch/x86_64/vdso/vclock_gettime.c:111:4: error: expected structure or union
CC arch/x86_64/vdso/vclock_gettime.o
cc1: error: unrecognized command line option "-Wno-decl"
cc1: error: unrecognized command line option "-Wno-context"
make[2]: *** [arch/x86_64/vdso/vclock_gettime.o] Error 1
make[1]: *** [arch/x86_64/vdso] Error 2
make: *** [_all] Error 2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu)
2007-07-22 16:08 sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu) Alexey Dobriyan
@ 2007-07-22 17:06 ` Al Viro
2007-07-22 17:28 ` Al Viro
0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2007-07-22 17:06 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: ak, linux-kernel
On Sun, Jul 22, 2007 at 08:08:09PM +0400, Alexey Dobriyan wrote:
> Andi, with new vDSO code sparse fails to check with usual invocation here:
Fucks with CF and not in a good way...
CF := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
$(obj)/vclock_gettime.o: CFLAGS = $(CF)
$(obj)/vgetcpu.o: CFLAGS = $(CF)
s/CF/CCF/ in there (arch/x86_64/vdso/Makefile) fixes gcc problems; sparse
ones remain and I'll look into that when I get some sleep (26 hours uptime
right now). I think I have a good idea of what's going on there, but
I'd rather not touch that code until tonight.
For now just rename the variable in makefile (obviously the right thing
to do) and that will give you sparse runs not aborted at that point.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu)
2007-07-22 17:06 ` Al Viro
@ 2007-07-22 17:28 ` Al Viro
0 siblings, 0 replies; 3+ messages in thread
From: Al Viro @ 2007-07-22 17:28 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: ak, linux-kernel, linux-sparse
On Sun, Jul 22, 2007 at 06:06:57PM +0100, Al Viro wrote:
> On Sun, Jul 22, 2007 at 08:08:09PM +0400, Alexey Dobriyan wrote:
> > Andi, with new vDSO code sparse fails to check with usual invocation here:
>
> Fucks with CF and not in a good way...
>
> CF := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables -m64
>
> $(obj)/vclock_gettime.o: CFLAGS = $(CF)
> $(obj)/vgetcpu.o: CFLAGS = $(CF)
>
> s/CF/CCF/ in there (arch/x86_64/vdso/Makefile) fixes gcc problems; sparse
> ones remain and I'll look into that when I get some sleep (26 hours uptime
> right now). I think I have a good idea of what's going on there, but
> I'd rather not touch that code until tonight.
>
> For now just rename the variable in makefile (obviously the right thing
> to do) and that will give you sparse runs not aborted at that point.
Actually,
ed evaluate.c <<EOF
/evaluate_member_dereference
/examine_symbol_type/m/ctype =
w
q
EOF
ought to take care of sparse, AFAICS. IOW, in evaluate_member_dereference()
we need to do examine_symbol_type(ctype) before checking ctype->type, etc.
As it is, we end up with SYM_TYPEOF node there and it's not expanded until
we'd checked if we have SYM_STRUCT. We would, after expansion, but we don't
do it until too late.
I haven't checked if that's causes any regressions, but it looks
straightforward enough to be a plausible fix. I won't test it until
tonight, though (see above). Minimal testcase is
struct foo {int x;} v;
typeof(v) *p;
void bar(void)
{
p->x = 0;
}
and any serious regression testing should get both the sparse tests and
comparing kernel builds with and without that fix...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-22 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 16:08 sparse breakage (x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu) Alexey Dobriyan
2007-07-22 17:06 ` Al Viro
2007-07-22 17:28 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox