linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yinghai@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11)
Date: Tue, 06 Aug 2013 10:20:15 +0200	[thread overview]
Message-ID: <5200B1BF.2060009@suse.cz> (raw)
In-Reply-To: <20130805225830.GA29411@free.fr>

On 6.8.2013 00:58, Yann E. MORIN wrote:
> On 2013-08-05 10:39 +0200, Michal Marek spake thusly:
>> Added Yann and the linux-kbuild list to CC. Reproducer:
>>
>>   git checkout 1fe0135
>>   make mrproper
>>   make allmodconfig
>>   make silentoldconfig
>>   git checkout aa8032b
>>   make allmodconfig
>>   make silentoldconfig
>>
>> conf_write_autoconf() first calls conf_split_config() to generate the
>> include/config/**.h hierarchy, then generates include/config/auto.conf.
>> For some reason, conf_split_config() reads include/config/auto.conf,
>> which may not exist yet or may be out of date. Yann, can anything break
>> if we simply do not read that file from conf_split_config(), like this?
>>
>> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
>> index c55c227..8c90835 100644
>> --- a/scripts/kconfig/confdata.c
>> +++ b/scripts/kconfig/confdata.c
>> @@ -829,16 +829,12 @@ next:
>>  
>>  static int conf_split_config(void)
>>  {
>> -	const char *name;
>>  	char path[PATH_MAX+1];
>>  	char *s, *d, c;
>>  	struct symbol *sym;
>>  	struct stat sb;
>>  	int res, i, fd;
>>  
>> -	name = conf_get_autoconfig_name();
>> -	conf_read_simple(name, S_DEF_AUTO);
>> -
>>  	if (chdir("include/config"))
>>  		return 1;
[...]
> 
> What I understand of the code is that, we're reading auto.conf with
> the S_DEF_AUTO flag, which is expected to set the SYMBOL_DEF_AUTO flags
> to symbols read from auto.conf.
> 
> This is then used by conf_split_config to detect symbols that have
> changed.

Ah, _that_ is why it's there.

[...]
> The two following tests do not invlolve the HOTPLUG_PCI_.* symbols
> on purpose, and involve a pristine master c095ba7:
> 
>     $ make allmodconfig
>     $ make silentoldconfig
>     $ make silentoldconfig
>     $ make silentoldconfig
> 
>   - Without Michal's proposed change, unaffected symbols are not
>     touched. For example, mtime and ctime for zswap.h are not changed
>     after the second and third silentoldconfig.
> 
>   - With Michal's proposed change, then mtime and ctime for zswap.h are
>     changed after each silentoldconfig, even though CONFIG_ZSWAP was not
>     changed.

Yes, I only did a simple diff -rq between two generated include/config
directories and did not think about mtimes.


> One solution would be to read auto.conf *before* we fuzz around symbols,
> not after. We should probably read auto.conf just after we read .config.

Maybe the safest solution would be to silence the warning if def ==
S_DEF_AUTO. Because auto.conf is only read by kconfig in
conf_split_config(), when it is expected to be out of date.

Michal

      reply	other threads:[~2013-08-06  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 18:17 [GIT PULL] PCI updates for v3.11 Bjorn Helgaas
2013-08-02 20:28 ` Linus Torvalds
2013-08-02 21:24   ` Linus Torvalds
2013-08-05  8:39   ` Warnings from silentoldconfig (Re: [GIT PULL] PCI updates for v3.11) Michal Marek
2013-08-05  9:26     ` Yann E. MORIN
2013-08-05 22:58     ` Yann E. MORIN
2013-08-06  8:20       ` Michal Marek [this message]

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=5200B1BF.2060009@suse.cz \
    --to=mmarek@suse.cz \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yann.morin.1998@free.fr \
    --cc=yinghai@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).