From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Linus Walleij <linus.walleij@linaro.org>,
Marc Lehmann <schmorp@schmorp.de>,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH resend 2/3] gpiolib: acpi: Rename honor_wakeup option to ignore_wake, add extra quirk
Date: Mon, 2 Mar 2020 10:46:57 +0100 [thread overview]
Message-ID: <c187c90b-fe02-8dee-c37c-80d06feba566@redhat.com> (raw)
In-Reply-To: <20200302093038.GN1224808@smile.fi.intel.com>
Hi,
On 3/2/20 10:30 AM, Andy Shevchenko wrote:
> On Sat, Feb 29, 2020 at 09:57:52PM +0100, Hans de Goede wrote:
>> On 2/28/20 12:22 PM, Hans de Goede wrote:
>>> On 2/25/20 1:57 PM, Andy Shevchenko wrote:
>>>> On Tue, Feb 25, 2020 at 02:34:25PM +0200, Andy Shevchenko wrote:
>>>>> On Tue, Feb 25, 2020 at 12:26:04PM +0100, Hans de Goede wrote:
>>>>
>>>>> Let's do it as a list of pairs, but in slightly different format (I see some
>>>>> potential to derive a generic parser, based on users described in
>>>>> Documentation/admin-guide/kernel-parameters.txt), i.e.
>>>>>
>>>>> ignore_wake=pin:controller[,pin:controller[,...]]
>>>>
>>>> Another possible format
>>>>
>>>> ignore_wake=controller@pin[;controller@pin[;...]]
>>>
>>> I like this one, the other one with the pin first feels wrong, the pin is
>>> part of the controller, not the other way around.
>>>
>>> I will rework the patch series to use the ignore_wake=controller@pin format.
>>
>> Just a quick note. I've changed the separator from ; to , for some reason
>> grub, at least as used in Fedora with Fedora's grub2 BLS (boot loader spec)
>> implementation does not like it when there is a ; in the kernel commandline.
>
> Hmm... I think it would be harder then to have less possible formats in the
> command line. Do you really need right now several pins to be listed?
Yes, the existing quirk for the HP X2 10 with Cherry Trail SoC + TI PMIC,
which currently ignores wakeups on all pins needs to ignore wakeup on 2 pins.
> If it's about testing, perhaps we may do it with other means.
Well it is possible to pass the ; by putting quotes around it, so we could
go with the ; if you insist, but it really makes life harder for
>> I will also send an email about this to Fedora grub maintainer, but for
>> now it is easiest to just avoid the problem.
>
> It's definitely bug in Grub due to existing kernel users with such format.
> It means Grub is unable to support kernel command line in full.
So I discussed this with the Fedora Grub maintainer, he says the problem
exists in upstream grub2 too, grub2 uses a shell like command syntax
both in its config file and in interactive mode, so if you do e.g.:
linux /boot/vmlinuz root=/dev/sda1 gpiolib_acpi.ignore_wake=INT33FF:01@0;INT0002:00@2
Then grub will see the INT0002:00@2 as a new separate commaond, this should
work:
linux /boot/vmlinuz root=/dev/sda1 gpiolib_acpi.ignore_wake="INT33FF:01@0;INT0002:00@2"
But the recommended way to edit the cmdline is by editing /etc/default/grub and
then re-running grub2-mkconfig, which clears the quotes unless we escape them
and since grub2-mkconfig is shell script inside shell script inside shell script
I don't even want to think about how many times I need to escape the quotes.
TL;DR: Using ; in kernel commandline options makes life much harder for users
and as such is something which we should try to avoid.
I appreciate that you are trying to come up with a format for the option which
looks like existing options and I like the @ use, but using ; really is not a
good example to follow and IMHO that (not a good example / idea) trumps keeping
the syntax identical to an existing option.
Regards,
Hans
next prev parent reply other threads:[~2020-03-02 9:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 10:27 [PATCH resend 1/3] gpiolib: acpi: ignore-wakeup handling rework Hans de Goede
2020-02-25 10:27 ` [PATCH resend 1/3] gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk Hans de Goede
2020-02-25 10:27 ` [PATCH resend 2/3] gpiolib: acpi: Rename honor_wakeup option to ignore_wake, add extra quirk Hans de Goede
2020-02-25 10:54 ` Andy Shevchenko
2020-02-25 11:26 ` Hans de Goede
2020-02-25 12:34 ` Andy Shevchenko
2020-02-25 12:57 ` Andy Shevchenko
2020-02-28 11:22 ` Hans de Goede
2020-02-28 13:16 ` Andy Shevchenko
2020-02-29 20:57 ` Hans de Goede
2020-03-02 9:30 ` Andy Shevchenko
2020-03-02 9:46 ` Hans de Goede [this message]
2020-03-02 10:57 ` Andy Shevchenko
2020-02-25 10:27 ` [PATCH resend 3/3] gpiolib: acpi: Add quirk to ignore EC gpio wakeups for 1 more HP x2 10 model Hans de Goede
2020-02-25 10:28 ` [PATCH resend 1/3] gpiolib: acpi: ignore-wakeup handling rework Hans de Goede
2020-02-28 22:54 ` Linus Walleij
2020-02-29 18:14 ` Hans de Goede
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=c187c90b-fe02-8dee-c37c-80d06feba566@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=schmorp@schmorp.de \
/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).