* linux-next: tip tree build warnings
@ 2009-09-03 8:25 Stephen Rothwell
2009-09-03 8:38 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2009-09-03 8:25 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Xiao Guangrong
[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]
Hi all,
Today's linux-next build (powerpc ppc64_defconfig) produced these warning:
In file included from include/trace/ftrace.h:285,
from include/trace/define_trace.h:61,
from include/trace/events/timer.h:342,
from kernel/timer.c:50:
include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_state':
include/trace/events/timer.h:280: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_expire':
include/trace/events/timer.h:317: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'cputime_t'
Introduced by commit 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b ("timers: Add tracepoints for itimer") from the tip tree.
cputime_t is variously "u64", "unsigned long long" and "unsigned long" on
different architectures.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: tip tree build warnings
2009-09-03 8:25 linux-next: tip tree build warnings Stephen Rothwell
@ 2009-09-03 8:38 ` Ingo Molnar
2009-09-03 12:13 ` Heiko Carstens
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2009-09-03 8:38 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, linux-next,
linux-kernel, Xiao Guangrong
* Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> Today's linux-next build (powerpc ppc64_defconfig) produced these warning:
>
> In file included from include/trace/ftrace.h:285,
> from include/trace/define_trace.h:61,
> from include/trace/events/timer.h:342,
> from kernel/timer.c:50:
> include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_state':
> include/trace/events/timer.h:280: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
> include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_expire':
> include/trace/events/timer.h:317: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'cputime_t'
Should be harmless with no runtime effects - the fix would be to
harmonize the cputime_t types across architectures.
> Introduced by commit 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b ("timers: Add tracepoints for itimer") from the tip tree.
>
> cputime_t is variously "u64", "unsigned long long" and "unsigned
> long" on different architectures.
Should be unsigned long i think. Most architectures use it as
unsigned long via include/asm-generic/cputime.h, except these three:
arch/ia64/include/asm/cputime.h:typedef u64 cputime_t;
arch/powerpc/include/asm/cputime.h:typedef u64 cputime_t;
arch/s390/include/asm/cputime.h:typedef unsigned long long cputime_t;
Or we could eliminate the type altogether as well and standardize on
u64. Thomas?
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: tip tree build warnings
2009-09-03 8:38 ` Ingo Molnar
@ 2009-09-03 12:13 ` Heiko Carstens
2009-09-03 12:24 ` Heiko Carstens
2009-09-07 8:59 ` Martin Schwidefsky
0 siblings, 2 replies; 5+ messages in thread
From: Heiko Carstens @ 2009-09-03 12:13 UTC (permalink / raw)
To: Ingo Molnar
Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Xiao Guangrong, Martin Schwidefsky
On Thu, Sep 03, 2009 at 10:38:44AM +0200, Ingo Molnar wrote:
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Today's linux-next build (powerpc ppc64_defconfig) produced these warning:
> >
> > In file included from include/trace/ftrace.h:285,
> > from include/trace/define_trace.h:61,
> > from include/trace/events/timer.h:342,
> > from kernel/timer.c:50:
> > include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_state':
> > include/trace/events/timer.h:280: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
> > include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_expire':
> > include/trace/events/timer.h:317: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'cputime_t'
>
> Should be harmless with no runtime effects - the fix would be to
> harmonize the cputime_t types across architectures.
>
> > Introduced by commit 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b ("timers: Add tracepoints for itimer") from the tip tree.
> >
> > cputime_t is variously "u64", "unsigned long long" and "unsigned
> > long" on different architectures.
>
> Should be unsigned long i think. Most architectures use it as
> unsigned long via include/asm-generic/cputime.h, except these three:
>
> arch/ia64/include/asm/cputime.h:typedef u64 cputime_t;
> arch/powerpc/include/asm/cputime.h:typedef u64 cputime_t;
> arch/s390/include/asm/cputime.h:typedef unsigned long long cputime_t;
>
> Or we could eliminate the type altogether as well and standardize on
> u64. Thomas?
s390 uses 64 bit cputime_t because we want the high resolution also in
32 bit kernels. So standardizing on u64 would be the preferred solution
for us.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: tip tree build warnings
2009-09-03 12:13 ` Heiko Carstens
@ 2009-09-03 12:24 ` Heiko Carstens
2009-09-07 8:59 ` Martin Schwidefsky
1 sibling, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2009-09-03 12:24 UTC (permalink / raw)
To: Ingo Molnar
Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, Xiao Guangrong, Martin Schwidefsky
On Thu, Sep 03, 2009 at 02:13:26PM +0200, Heiko Carstens wrote:
> On Thu, Sep 03, 2009 at 10:38:44AM +0200, Ingo Molnar wrote:
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > Today's linux-next build (powerpc ppc64_defconfig) produced these warning:
> > >
> > > In file included from include/trace/ftrace.h:285,
> > > from include/trace/define_trace.h:61,
> > > from include/trace/events/timer.h:342,
> > > from kernel/timer.c:50:
> > > include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_state':
> > > include/trace/events/timer.h:280: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'cputime_t'
> > > include/trace/events/timer.h: In function 'ftrace_raw_output_itimer_expire':
> > > include/trace/events/timer.h:317: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'cputime_t'
> >
> > Should be harmless with no runtime effects - the fix would be to
> > harmonize the cputime_t types across architectures.
> >
> > > Introduced by commit 3f0a525ebf4b8ef041a332bbe4a73aee94bb064b ("timers: Add tracepoints for itimer") from the tip tree.
> > >
> > > cputime_t is variously "u64", "unsigned long long" and "unsigned
> > > long" on different architectures.
> >
> > Should be unsigned long i think. Most architectures use it as
> > unsigned long via include/asm-generic/cputime.h, except these three:
> >
> > arch/ia64/include/asm/cputime.h:typedef u64 cputime_t;
> > arch/powerpc/include/asm/cputime.h:typedef u64 cputime_t;
> > arch/s390/include/asm/cputime.h:typedef unsigned long long cputime_t;
> >
> > Or we could eliminate the type altogether as well and standardize on
> > u64. Thomas?
>
> s390 uses 64 bit cputime_t because we want the high resolution also in
> 32 bit kernels. So standardizing on u64 would be the preferred solution
> for us.
Alternatively the tracepoints could simply use cputime_to_cputime64.
But that would be too easy I guess? ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: tip tree build warnings
2009-09-03 12:13 ` Heiko Carstens
2009-09-03 12:24 ` Heiko Carstens
@ 2009-09-07 8:59 ` Martin Schwidefsky
1 sibling, 0 replies; 5+ messages in thread
From: Martin Schwidefsky @ 2009-09-07 8:59 UTC (permalink / raw)
To: Heiko Carstens
Cc: Ingo Molnar, Stephen Rothwell, Thomas Gleixner, H. Peter Anvin,
Peter Zijlstra, linux-next, linux-kernel, Xiao Guangrong
On Thu, 3 Sep 2009 14:13:26 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> On Thu, Sep 03, 2009 at 10:38:44AM +0200, Ingo Molnar wrote:
> > * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > cputime_t is variously "u64", "unsigned long long" and "unsigned
> > > long" on different architectures.
> >
> > Should be unsigned long i think. Most architectures use it as
> > unsigned long via include/asm-generic/cputime.h, except these three:
> >
> > arch/ia64/include/asm/cputime.h:typedef u64 cputime_t;
> > arch/powerpc/include/asm/cputime.h:typedef u64 cputime_t;
> > arch/s390/include/asm/cputime.h:typedef unsigned long long cputime_t;
> >
> > Or we could eliminate the type altogether as well and standardize on
> > u64. Thomas?
>
> s390 uses 64 bit cputime_t because we want the high resolution also in
> 32 bit kernels. So standardizing on u64 would be the preferred solution
> for us.
The cputime_t type serves/served two purposes: 1) make it clear that
this is NOT a jiffie value, it is an architecture defined type with
architecture dependent semantic, 2) by redefining cputime_t to a
structure with a single embedded unsigned long I have been able to
identify all places in the kernel that do not use the proper cputime
functions. I'm not sure if we need 2) anymore.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-07 8:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 8:25 linux-next: tip tree build warnings Stephen Rothwell
2009-09-03 8:38 ` Ingo Molnar
2009-09-03 12:13 ` Heiko Carstens
2009-09-03 12:24 ` Heiko Carstens
2009-09-07 8:59 ` Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).