All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [XEN PATCH 6/8] xen: Move CONFIG_INDIRECT_THUNK to Kconfig
Date: Wed, 19 Feb 2020 08:55:26 +0100	[thread overview]
Message-ID: <75cb93ea-defd-ef2d-3412-7e74a7240e45@suse.com> (raw)
In-Reply-To: <20200218171330.GA2193@perard.uk.xensource.com>

On 18.02.2020 18:13, Anthony PERARD wrote:
> On Tue, Feb 18, 2020 at 05:43:30PM +0100, Jan Beulich wrote:
>> On 13.12.2019 13:18, Anthony PERARD wrote:
>>> On Fri, Dec 13, 2019 at 12:13:53PM +0100, Jan Beulich wrote:
>>>> On 12.12.2019 19:27, Anthony PERARD wrote:
>>>>> --- a/xen/arch/x86/Kconfig
>>>>> +++ b/xen/arch/x86/Kconfig
>>>>> @@ -32,6 +32,9 @@ config ARCH_DEFCONFIG
>>>>>  	string
>>>>>  	default "arch/x86/configs/x86_64_defconfig"
>>>>>  
>>>>> +config INDIRECT_THUNK
>>>>> +	def_bool $(cc-option,-mindirect-branch-register)
>>>>
>>>> I'm not happy to see constructs like this appear. They leave a
>>>> "# CONFIG_... is not defined" in .config for no reason when
>>>> the expression evaluates to n.
>>>
>>> For some reason, this doesn't happen. If $(CC) doesn't understand the
>>> option, the CONFIG_ doesn't appear at all in .config.
>>>
>>> I guess "# CONFIG_... is not defined" comments are only useful for
>>> options that can be selected by users, so Kconfig would know not to ask
>>> the users again. So, for "options" that aren't for users, the comment
>>> doesn't need to exist.
>>>
>>>> This may not matter much when
>>>> considering just one such line, but it will when we gain
>>>> dozens or hundreds. For options without prompts I think the
>>>> default should only ever be set to y (or m, which we don't
>>>> use). The above would then be written as
>>>
>>> I think Kconfig developers have already done the work for that :-). So
>>> the construct def_bool y if $X isn't needed.
>>
>> So I've checked - in Linux the longer construct is needed, while in
>> Xen it isn't. I can't currently explain why this is, but I take it
>> to mean that we're at risk of getting the stray extra lines emitted
>> whenever something in our Kconfig files changes in a way triggering
>> the same behavior as observed in Linux.
> 
> Which version of Linux?

5.5

> Did you test with "def_bool" as the sole item in the config entry?

This

config CC_IS_CLANG
	def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)

produces

# CONFIG_CC_IS_CLANG is not set

in all configs I'm building. (And it's by far not the only one. In
fact I've been carrying a patch which changes various such lines,
and as a result of your earlier reply I was intending to drop it.
Just that it didn't work as expected.)

> And isn't a dependency of another config?

This isn't supposed to matter for the presence/absence of said line
in the resulting .config. I'm not going to exclude though that the
current lack of any dependency in Xen is the reason for the
difference in behavior.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-02-19  7:55 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 18:27 [Xen-devel] [XEN PATCH 0/8] xen: Kconfig update with few extra Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 1/8] Config.mk: Remove unused setvar_dir macro Anthony PERARD
2019-12-12 18:30   ` Andrew Cooper
2019-12-13 14:51     ` Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 2/8] Config.mk: Remove stray comment Anthony PERARD
2019-12-12 18:32   ` Andrew Cooper
2019-12-13 15:16     ` Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 3/8] xen: Update Kconfig to Linux v5.4 Anthony PERARD
2019-12-12 18:45   ` Andrew Cooper
2019-12-13 15:31     ` Anthony PERARD
2019-12-13 11:05   ` Jan Beulich
2019-12-13 15:49     ` Anthony PERARD
2019-12-13 16:59       ` Jan Beulich
2019-12-13 19:17         ` Andrew Cooper
2019-12-16 10:16           ` Jan Beulich
2019-12-16 14:01             ` Anthony PERARD
2019-12-16 15:55               ` Jan Beulich
2019-12-16 16:34                 ` Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 4/8] xen: Have Kconfig check $(CC)'s version Anthony PERARD
2019-12-12 18:56   ` Andrew Cooper
2019-12-13 16:08     ` Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 5/8] xen: Import cc-ifversion from Kbuild Anthony PERARD
2019-12-12 18:56   ` Andrew Cooper
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 6/8] xen: Move CONFIG_INDIRECT_THUNK to Kconfig Anthony PERARD
2019-12-12 18:58   ` Andrew Cooper
2019-12-13 11:13   ` Jan Beulich
2019-12-13 12:18     ` Anthony PERARD
2019-12-13 12:27       ` Jan Beulich
2020-02-18 16:43       ` Jan Beulich
2020-02-18 17:13         ` Anthony PERARD
2020-02-19  7:55           ` Jan Beulich [this message]
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 7/8] xen: Use $(CONFIG_CC_IS_CLANG) instead of $(clang) in Makefile Anthony PERARD
2019-12-12 19:00   ` Andrew Cooper
2019-12-13 14:37     ` Anthony PERARD
2019-12-12 18:27 ` [Xen-devel] [XEN PATCH 8/8] xen: Move GCC_HAS_VISIBILITY_ATTRIBUTE to Kconfig and common Anthony PERARD
2019-12-12 19:04   ` Andrew Cooper
2019-12-13 11:27     ` Jan Beulich

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=75cb93ea-defd-ef2d-3412-7e74a7240e45@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.