public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Paul Jackson <pj@sgi.com>,
	hpa@zytor.com, yhlu.kernel@gmail.com, akpm@linux-foundation.org,
	tglx@linutronix.de, steiner@sgi.com, travis@sgi.com,
	linux-kernel@vger.kernel.org, ying.huang@intel.com,
	andi@firstfloor.org, Vegard Nossum <vegard.nossum@gmail.com>
Subject: Re: [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks
Date: Fri, 27 Jun 2008 14:00:40 +0200	[thread overview]
Message-ID: <20080627120040.GA30872@elte.hu> (raw)
In-Reply-To: <20080626191406.GC13699@uranus.ravnborg.org>


* Sam Ravnborg <sam@ravnborg.org> wrote:

> Hi Ingo
> 
> > Sparse is a cool tool that extends upon C types (and more), but it's 
> > been made too hard to use widely:
> > 
> >  - right now it's opt-in with no ability for testers to use it
> >    transparently while also building the kernel. Forcing a second
> >    kernel build just for 'debugging' reduces the userbase.
> 
> This is waht make C=1 is for. If this is broken then we should
> fix it.
> Just trying it out:
> $ make C=1 kernel/sched.o
>   CHECK   kernel/sched.c
> kernel/sched_fair.c:37:14: warning: symbol 'sysctl_sched_latency' was not declar                                                                   ed. Should it be static?
> kernel/sched_fair.c:43:14: warning: symbol 'sysctl_sched_min_granularity' was no                                                                   t declared. Should it be static?
> kernel/sched_fair.c:72:14: warning: symbol 'sysctl_sched_wakeup_granularity' was                                                                    not declared. Should it be static?
> ...
>   CC      kernel/sched.o
> 
> 
> So make C=1 works as intended and let you run sparse on the files that 
> are built - and only those.

ah, ok - i was confused about that.

> > Fortunately these problems are all solvable gradually:
> > 
> >  - a kbuild mechanism to get _parallel_ Sparse checks. I.e. both the 
> >    real .o gets produced but also the "make C=1" output is produced. 
> >    Testers would be enabled to do Sparse checks "alongside" of a normal 
> >    kernel build. (Sparse is plenty fast for this to be practical)
> Already present.
> 
> > 
> >  - kbuild mechanism with which subsystem maintainers could mark specific 
> >    files (or all of their subdirectories) of their subsystem as to be 
> >    Sparse-checked by default. [if a .config debug option is enabled]
> >    For example we'd mark all of arch/x86/*.o and kernel/sched*.o in such 
> >    a way for example.
> That would then be on a directory basis.
> You can do:
> diff --git a/kernel/Makefile b/kernel/Makefile
> index 1c9938a..1ba00aa 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -2,6 +2,7 @@
>  # Makefile for the linux kernel.
>  #
> 
> +KBUILD_CHECKSRC=1
>  obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
>             exit.o itimer.o time.o softirq.o resource.o \
>             sysctl.o capability.o ptrace.o timer.o user.o \
> 
> already today.
> It applies recursively so we will then run sparse on kernel/time/*.o too.
> 
> There is no easy way to cover all of arch/x86/*.o as the files are distributed
> in several Makefiles and there is no common one.
> 
> > 
> >  - a second layer would be very useful as well: failures would turn into 
> >    build failures if a debug .config switch is enabled.
> This could be a simple:
> ifdef CONFIG_CHECK_IS_ERROR
> CHECKFLAGS += -Werror
> endif
> 
> And teach sparse about -Werror
> 
> > On a similar note, it would be nice if subsystem maintainers had a 
> > kbuild mechanism to have the fails they maintain to be built via -Werr 
> > (if an opt-in .config option is enabled).
> 
> For each Makefile (does not apply recursively):
> ccflags-$(CONFIG_PROMOTE_WARNINGS_TO_ERROR) += -Werror
> 
> When I get around to it:
> ccflags-sched.o-$(CONFIG_PROMOTE_WARNINGS_TO_ERROR) += -Werror

if there's a generic kbuild facility for it i'd love to try something 
like that out, on files that i maintain. There should perhaps be a 
shortcut for it? Something like:

  ccflags-sched.o += -Werror

and kbuild would decide whether CONFIG_PROMOTE_WARNINGS_TO_ERROR is set 
and whether to filter out -Werror or not?

	Ingo

  reply	other threads:[~2008-06-27 12:09 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22 14:21 [PATCH 0/5 v2] x86 boot: various E820 & EFI related fixes - what changed in v2 Paul Jackson
2008-06-22 14:21 ` [PATCH 1/5 v2] x86 boot: e820 code indentation fix Paul Jackson
2008-06-22 14:22 ` [PATCH 2/5 v2] x86 boot: x86_64 efi compiler warning fix Paul Jackson
2008-06-22 14:22 ` [PATCH 3/5 v2] x86 boot: allow overlapping early reserve memory ranges Paul Jackson
2008-06-22 14:22 ` [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks Paul Jackson
2008-06-22 19:38   ` Yinghai Lu
2008-06-23 11:09     ` Paul Jackson
2008-06-24 21:29       ` Yinghai Lu
2008-06-25  1:32         ` Paul Jackson
2008-06-25  1:56           ` H. Peter Anvin
2008-06-25  2:17             ` Paul Jackson
2008-06-25  2:18               ` H. Peter Anvin
2008-06-25  2:58                 ` Linus Torvalds
2008-06-25  3:00                   ` Linus Torvalds
2008-06-25  3:08                   ` Paul Jackson
2008-06-25  4:04                     ` Linus Torvalds
2008-06-25  5:01                       ` H. Peter Anvin
2008-06-25 14:42                         ` Linus Torvalds
2008-06-25 15:29                           ` H. Peter Anvin
2008-06-25  8:04                       ` Paul Jackson
2008-06-25 14:53                       ` Ingo Molnar
2008-06-26 19:14                         ` Sam Ravnborg
2008-06-27 12:00                           ` Ingo Molnar [this message]
2008-06-27 21:25                             ` Sam Ravnborg
2008-06-25 15:00                       ` Johannes Berg
2008-06-25 15:19                         ` Linus Torvalds
2008-06-25 15:34                           ` Johannes Berg
2008-06-27 20:43                           ` Denys Vlasenko
2008-06-30  7:58                           ` Alexander van Heukelum
2008-06-25  5:05                   ` H. Peter Anvin
2008-06-22 14:22 ` [PATCH 5/5 v2] x86 boot: more consistently use type int for node ids Paul Jackson
2008-06-24 11:19 ` [PATCH 0/5 v2] x86 boot: various E820 & EFI related fixes - what changed in v2 Ingo Molnar
2008-06-24 11:30   ` Paul Jackson
2008-06-24 15:45     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2008-06-25  8:56 [PATCH 4/5 v2] x86 boot: show pfn addresses in hex not decimal in some kernel info printks Marco Cesati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080627120040.GA30872@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=sam@ravnborg.org \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=travis@sgi.com \
    --cc=vegard.nossum@gmail.com \
    --cc=yhlu.kernel@gmail.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox