LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
@ 2021-07-26 11:46 Jan Kiszka
2021-07-26 12:01 ` Andy Shevchenko
` (4 more replies)
0 siblings, 5 replies; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 11:46 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
Christian Storm, Andy Shevchenko, Mantas Mikulėnas
From: Jan Kiszka <jan.kiszka@siemens.com>
Obviously, the test needs to run against the register content, not its
address.
Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
drivers/watchdog/iTCO_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index b3f604669e2c..643c6c2d0b72 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
* Otherwise, the BIOS generally reboots when the SMI triggers.
*/
if (p->smi_res &&
- (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
+ (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
tmrval /= 2;
/* from the specs: */
--
2.26.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
@ 2021-07-26 12:01 ` Andy Shevchenko
2021-07-26 12:04 ` Jan Kiszka
2021-07-26 12:03 ` Paolo Bonzini
` (3 subsequent siblings)
4 siblings, 1 reply; 18+ messages in thread
From: Andy Shevchenko @ 2021-07-26 12:01 UTC (permalink / raw)
To: Jan Kiszka
Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Obviously, the test needs to run against the register content, not its
> address.
>
> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Missed SoB of the submitter (hint: configure your Git to make sure
that submitter and author are the same in terms of name-email).
...
> if (p->smi_res &&
> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> tmrval /= 2;
There are so many parentheses, perhaps
#define TCO_GBL_SMI_EN (TCO_EN | GBL_SMI_EN)
...
if (p->smi_res &&
(inl(SMI_EN(p)) & TCO_GBL_SMI_EN) != TCO_GBL_SMI_EN)
tmrval /= 2;
?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
2021-07-26 12:01 ` Andy Shevchenko
@ 2021-07-26 12:03 ` Paolo Bonzini
2021-07-26 12:05 ` Jan Kiszka
2021-07-26 13:44 ` Guenter Roeck
` (2 subsequent siblings)
4 siblings, 1 reply; 18+ messages in thread
From: Paolo Bonzini @ 2021-07-26 12:03 UTC (permalink / raw)
To: Jan Kiszka, Wim Van Sebroeck, Guenter Roeck
Cc: linux-watchdog, Linux Kernel Mailing List, Christian Storm,
Andy Shevchenko, Mantas Mikulėnas, stable
On 26/07/21 13:46, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Obviously, the test needs to run against the register content, not its
> address.
>
> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index b3f604669e2c..643c6c2d0b72 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
> * Otherwise, the BIOS generally reboots when the SMI triggers.
> */
> if (p->smi_res &&
> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> tmrval /= 2;
>
> /* from the specs: */
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: stable@vger.kernel.org
(the latter because cb011044e34c has been picked up by stable kernels
already).
Paolo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 12:01 ` Andy Shevchenko
@ 2021-07-26 12:04 ` Jan Kiszka
2021-07-26 13:40 ` Andy Shevchenko
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 12:04 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On 26.07.21 14:01, Andy Shevchenko wrote:
> On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Obviously, the test needs to run against the register content, not its
>> address.
>>
>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Missed SoB of the submitter (hint: configure your Git to make sure
> that submitter and author are the same in terms of name-email).
The signed off is there. Not sure what you are referring to.
>
> ...
>
>> if (p->smi_res &&
>> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>> tmrval /= 2;
>
> There are so many parentheses, perhaps
>
> #define TCO_GBL_SMI_EN (TCO_EN | GBL_SMI_EN)
> ...
> if (p->smi_res &&
> (inl(SMI_EN(p)) & TCO_GBL_SMI_EN) != TCO_GBL_SMI_EN)
> tmrval /= 2;
>
> ?
>
Let's focus on the regression fix (and you could have mentioned that on
the original patch already).
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 12:03 ` Paolo Bonzini
@ 2021-07-26 12:05 ` Jan Kiszka
2021-07-26 13:51 ` Guenter Roeck
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 12:05 UTC (permalink / raw)
To: Paolo Bonzini, Wim Van Sebroeck, Guenter Roeck
Cc: linux-watchdog, Linux Kernel Mailing List, Christian Storm,
Andy Shevchenko, Mantas Mikulėnas, stable
On 26.07.21 14:03, Paolo Bonzini wrote:
> On 26/07/21 13:46, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Obviously, the test needs to run against the register content, not its
>> address.
>>
>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on
>> second timeout")
>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> drivers/watchdog/iTCO_wdt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
>> index b3f604669e2c..643c6c2d0b72 100644
>> --- a/drivers/watchdog/iTCO_wdt.c
>> +++ b/drivers/watchdog/iTCO_wdt.c
>> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct
>> watchdog_device *wd_dev, unsigned int t)
>> * Otherwise, the BIOS generally reboots when the SMI triggers.
>> */
>> if (p->smi_res &&
>> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN |
>> GBL_SMI_EN))
>> tmrval /= 2;
>> /* from the specs: */
>>
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Cc: stable@vger.kernel.org
>
> (the latter because cb011044e34c has been picked up by stable kernels
> already).
>
Thanks. Originally wanted to add stable myself, but I'm still unsure
whether this is the privilege of the subsystem maintainer or should also
be done by contributors.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 12:04 ` Jan Kiszka
@ 2021-07-26 13:40 ` Andy Shevchenko
2021-07-26 13:59 ` Guenter Roeck
0 siblings, 1 reply; 18+ messages in thread
From: Andy Shevchenko @ 2021-07-26 13:40 UTC (permalink / raw)
To: Jan Kiszka
Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On Mon, Jul 26, 2021 at 3:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 26.07.21 14:01, Andy Shevchenko wrote:
> > On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> Obviously, the test needs to run against the register content, not its
> >> address.
> >>
> >> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> >> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> >
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >
> > Missed SoB of the submitter (hint: configure your Git to make sure
> > that submitter and author are the same in terms of name-email).
>
> The signed off is there. Not sure what you are referring to.
Nope. It's not. The sign of that is the From: line in the body of the
email. It happens when the submitter != author. And SoB of the former
one is absent. But what is strange is that reading them here I haven't
found the difference. Maybe one is in UTF-8 while the other is not and
a unicode character degraded to Latin-1 or so?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
2021-07-26 12:01 ` Andy Shevchenko
2021-07-26 12:03 ` Paolo Bonzini
@ 2021-07-26 13:44 ` Guenter Roeck
2021-07-26 16:59 ` Mantas Mikulėnas
2021-08-20 13:45 ` Jan Kiszka
4 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2021-07-26 13:44 UTC (permalink / raw)
To: Jan Kiszka, Wim Van Sebroeck
Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
Christian Storm, Andy Shevchenko, Mantas Mikulėnas
On 7/26/21 4:46 AM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Obviously, the test needs to run against the register content, not its
> address.
>
> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index b3f604669e2c..643c6c2d0b72 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
> * Otherwise, the BIOS generally reboots when the SMI triggers.
> */
> if (p->smi_res &&
> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> tmrval /= 2;
>
> /* from the specs: */
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 12:05 ` Jan Kiszka
@ 2021-07-26 13:51 ` Guenter Roeck
0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2021-07-26 13:51 UTC (permalink / raw)
To: Jan Kiszka, Paolo Bonzini, Wim Van Sebroeck
Cc: linux-watchdog, Linux Kernel Mailing List, Christian Storm,
Andy Shevchenko, Mantas Mikulėnas, stable
On 7/26/21 5:05 AM, Jan Kiszka wrote:
> On 26.07.21 14:03, Paolo Bonzini wrote:
>> On 26/07/21 13:46, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Obviously, the test needs to run against the register content, not its
>>> address.
>>>
>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on
>>> second timeout")
>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>> drivers/watchdog/iTCO_wdt.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
>>> index b3f604669e2c..643c6c2d0b72 100644
>>> --- a/drivers/watchdog/iTCO_wdt.c
>>> +++ b/drivers/watchdog/iTCO_wdt.c
>>> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct
>>> watchdog_device *wd_dev, unsigned int t)
>>> * Otherwise, the BIOS generally reboots when the SMI triggers.
>>> */
>>> if (p->smi_res &&
>>> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>>> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN |
>>> GBL_SMI_EN))
>>> tmrval /= 2;
>>> /* from the specs: */
>>>
>>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: stable@vger.kernel.org
>>
>> (the latter because cb011044e34c has been picked up by stable kernels
>> already).
>>
>
> Thanks. Originally wanted to add stable myself, but I'm still unsure
> whether this is the privilege of the subsystem maintainer or should also
> be done by contributors.
>
Normally it is done by maintainers.
Guenter
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 13:40 ` Andy Shevchenko
@ 2021-07-26 13:59 ` Guenter Roeck
2021-07-26 14:05 ` Jan Kiszka
0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2021-07-26 13:59 UTC (permalink / raw)
To: Andy Shevchenko, Jan Kiszka
Cc: Wim Van Sebroeck, linux-watchdog, Linux Kernel Mailing List,
Paolo Bonzini, Christian Storm, Mantas Mikulėnas
On 7/26/21 6:40 AM, Andy Shevchenko wrote:
> On Mon, Jul 26, 2021 at 3:04 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 26.07.21 14:01, Andy Shevchenko wrote:
>>> On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>>
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> Obviously, the test needs to run against the register content, not its
>>>> address.
>>>>
>>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
>>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Missed SoB of the submitter (hint: configure your Git to make sure
>>> that submitter and author are the same in terms of name-email).
>>
>> The signed off is there. Not sure what you are referring to.
>
> Nope. It's not. The sign of that is the From: line in the body of the
> email. It happens when the submitter != author. And SoB of the former
> one is absent. But what is strange is that reading them here I haven't
> found the difference. Maybe one is in UTF-8 while the other is not and
> a unicode character degraded to Latin-1 or so?
>
I have no idea why there is an additional From:, but both From:
tags in the e-mail source are exact matches, and both match the
name and e-mail address in Signed-off-by:. I agree with Jan,
the SoB is there.
Guenter
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 13:59 ` Guenter Roeck
@ 2021-07-26 14:05 ` Jan Kiszka
2021-07-26 14:51 ` Andy Shevchenko
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 14:05 UTC (permalink / raw)
To: Guenter Roeck, Andy Shevchenko
Cc: Wim Van Sebroeck, linux-watchdog, Linux Kernel Mailing List,
Paolo Bonzini, Christian Storm, Mantas Mikulėnas
On 26.07.21 15:59, Guenter Roeck wrote:
> On 7/26/21 6:40 AM, Andy Shevchenko wrote:
>> On Mon, Jul 26, 2021 at 3:04 PM Jan Kiszka <jan.kiszka@siemens.com>
>> wrote:
>>>
>>> On 26.07.21 14:01, Andy Shevchenko wrote:
>>>> On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com>
>>>> wrote:
>>>>>
>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>
>>>>> Obviously, the test needs to run against the register content, not its
>>>>> address.
>>>>>
>>>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on
>>>>> second timeout")
>>>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>>>>
>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> Missed SoB of the submitter (hint: configure your Git to make sure
>>>> that submitter and author are the same in terms of name-email).
>>>
>>> The signed off is there. Not sure what you are referring to.
>>
>> Nope. It's not. The sign of that is the From: line in the body of the
>> email. It happens when the submitter != author. And SoB of the former
>> one is absent. But what is strange is that reading them here I haven't
>> found the difference. Maybe one is in UTF-8 while the other is not and
>> a unicode character degraded to Latin-1 or so?
>>
>
> I have no idea why there is an additional From:, but both From:
> tags in the e-mail source are exact matches, and both match the
> name and e-mail address in Signed-off-by:. I agree with Jan,
> the SoB is there.
There is one unknown in this equation, and that is the anti-email system
operated by a our IT and some company in Redmond. But I haven't received
any complaints that my outgoing emails are negatively affected by it
(incoming are, but that's a different story...). If you received
something mangled, Andy, please share the source of that email. I'm
happy to escalate internally - and externally.
For the potential case they were mangled or in case I'm submitting via a
real email provider, my scripts always add a "From:" to the body of my
patches. Outgoing, that From matched my Signed-off.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 14:05 ` Jan Kiszka
@ 2021-07-26 14:51 ` Andy Shevchenko
2021-07-26 17:10 ` Jan Kiszka
0 siblings, 1 reply; 18+ messages in thread
From: Andy Shevchenko @ 2021-07-26 14:51 UTC (permalink / raw)
To: Jan Kiszka
Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On Mon, Jul 26, 2021 at 5:05 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 26.07.21 15:59, Guenter Roeck wrote:
> > On 7/26/21 6:40 AM, Andy Shevchenko wrote:
> >> On Mon, Jul 26, 2021 at 3:04 PM Jan Kiszka <jan.kiszka@siemens.com>
> >> wrote:
> >>>
> >>> On 26.07.21 14:01, Andy Shevchenko wrote:
> >>>> On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com>
> >>>> wrote:
> >>>>>
> >>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>>
> >>>>> Obviously, the test needs to run against the register content, not its
> >>>>> address.
> >>>>>
> >>>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on
> >>>>> second timeout")
> >>>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> >>>>
> >>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>
> >>>> Missed SoB of the submitter (hint: configure your Git to make sure
> >>>> that submitter and author are the same in terms of name-email).
> >>>
> >>> The signed off is there. Not sure what you are referring to.
> >>
> >> Nope. It's not. The sign of that is the From: line in the body of the
> >> email. It happens when the submitter != author. And SoB of the former
> >> one is absent. But what is strange is that reading them here I haven't
> >> found the difference. Maybe one is in UTF-8 while the other is not and
> >> a unicode character degraded to Latin-1 or so?
> >>
> >
> > I have no idea why there is an additional From:, but both From:
> > tags in the e-mail source are exact matches, and both match the
> > name and e-mail address in Signed-off-by:. I agree with Jan,
> > the SoB is there.
>
> There is one unknown in this equation, and that is the anti-email system
> operated by a our IT and some company in Redmond.
Hmm... The From: in the body is the result of the `git format-patch` I believe.
So, two (or more?) possibilities here:
1) your configuration enforces it to always put From: (something new to me);
2) the submitter and author are not the same (see also:
https://github.com/git/git/commit/a90804752f6ab2b911882d47fafb6c2b78f447c3);
3) ...anything else...?
> But I haven't received
> any complaints that my outgoing emails are negatively affected by it
> (incoming are, but that's a different story...). If you received
> something mangled, Andy, please share the source of that email. I'm
> happy to escalate internally - and externally.
I believe I see it in the same way as lore, i.e.
https://lore.kernel.org/linux-watchdog/d84f8e06-f646-8b43-d063-fb11f4827044@siemens.com/raw
> For the potential case they were mangled or in case I'm submitting via a
> real email provider, my scripts always add a "From:" to the body of my
> patches. Outgoing, that From matched my Signed-off.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
` (2 preceding siblings ...)
2021-07-26 13:44 ` Guenter Roeck
@ 2021-07-26 16:59 ` Mantas Mikulėnas
2021-08-20 13:45 ` Jan Kiszka
4 siblings, 0 replies; 18+ messages in thread
From: Mantas Mikulėnas @ 2021-07-26 16:59 UTC (permalink / raw)
To: Jan Kiszka
Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Andy Shevchenko
On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Obviously, the test needs to run against the register content, not its
> address.
>
> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index b3f604669e2c..643c6c2d0b72 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
> * Otherwise, the BIOS generally reboots when the SMI triggers.
> */
> if (p->smi_res &&
> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> tmrval /= 2;
>
> /* from the specs: */
> --
> 2.26.2
Tested-by: Mantas Mikulėnas <grawity@gmail.com>
--
Mantas Mikulėnas
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 14:51 ` Andy Shevchenko
@ 2021-07-26 17:10 ` Jan Kiszka
2021-07-26 21:45 ` Andy Shevchenko
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 17:10 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On 26.07.21 16:51, Andy Shevchenko wrote:
> On Mon, Jul 26, 2021 at 5:05 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 26.07.21 15:59, Guenter Roeck wrote:
>>> On 7/26/21 6:40 AM, Andy Shevchenko wrote:
>>>> On Mon, Jul 26, 2021 at 3:04 PM Jan Kiszka <jan.kiszka@siemens.com>
>>>> wrote:
>>>>>
>>>>> On 26.07.21 14:01, Andy Shevchenko wrote:
>>>>>> On Mon, Jul 26, 2021 at 2:46 PM Jan Kiszka <jan.kiszka@siemens.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>
>>>>>>> Obviously, the test needs to run against the register content, not its
>>>>>>> address.
>>>>>>>
>>>>>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on
>>>>>>> second timeout")
>>>>>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>>>>>>
>>>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>
>>>>>> Missed SoB of the submitter (hint: configure your Git to make sure
>>>>>> that submitter and author are the same in terms of name-email).
>>>>>
>>>>> The signed off is there. Not sure what you are referring to.
>>>>
>>>> Nope. It's not. The sign of that is the From: line in the body of the
>>>> email. It happens when the submitter != author. And SoB of the former
>>>> one is absent. But what is strange is that reading them here I haven't
>>>> found the difference. Maybe one is in UTF-8 while the other is not and
>>>> a unicode character degraded to Latin-1 or so?
>>>>
>>>
>>> I have no idea why there is an additional From:, but both From:
>>> tags in the e-mail source are exact matches, and both match the
>>> name and e-mail address in Signed-off-by:. I agree with Jan,
>>> the SoB is there.
>>
>> There is one unknown in this equation, and that is the anti-email system
>> operated by a our IT and some company in Redmond.
>
> Hmm... The From: in the body is the result of the `git format-patch` I believe.
> So, two (or more?) possibilities here:
> 1) your configuration enforces it to always put From: (something new to me);
Yes, it does, as I explained in my other reply. That's a safety net
because you never have full control over what some mail servers do to
the first From.
> 2) the submitter and author are not the same (see also:
> https://github.com/git/git/commit/a90804752f6ab2b911882d47fafb6c2b78f447c3);
> 3) ...anything else...?
>
>> But I haven't received
>> any complaints that my outgoing emails are negatively affected by it
>> (incoming are, but that's a different story...). If you received
>> something mangled, Andy, please share the source of that email. I'm
>> happy to escalate internally - and externally.
>
> I believe I see it in the same way as lore, i.e.
> https://lore.kernel.org/linux-watchdog/d84f8e06-f646-8b43-d063-fb11f4827044@siemens.com/raw
Perfect, then all is fine as it should be (and no time for O365 bashing,
today).
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 17:10 ` Jan Kiszka
@ 2021-07-26 21:45 ` Andy Shevchenko
0 siblings, 0 replies; 18+ messages in thread
From: Andy Shevchenko @ 2021-07-26 21:45 UTC (permalink / raw)
To: Jan Kiszka
Cc: Guenter Roeck, Wim Van Sebroeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Mantas Mikulėnas
On Mon, Jul 26, 2021 at 8:10 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 26.07.21 16:51, Andy Shevchenko wrote:
> > On Mon, Jul 26, 2021 at 5:05 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >> On 26.07.21 15:59, Guenter Roeck wrote:
> >>> On 7/26/21 6:40 AM, Andy Shevchenko wrote:
...
> >>> I have no idea why there is an additional From:, but both From:
> >>> tags in the e-mail source are exact matches, and both match the
> >>> name and e-mail address in Signed-off-by:. I agree with Jan,
> >>> the SoB is there.
> >>
> >> There is one unknown in this equation, and that is the anti-email system
> >> operated by a our IT and some company in Redmond.
> >
> > Hmm... The From: in the body is the result of the `git format-patch` I believe.
> > So, two (or more?) possibilities here:
> > 1) your configuration enforces it to always put From: (something new to me);
>
> Yes, it does, as I explained in my other reply. That's a safety net
> because you never have full control over what some mail servers do to
> the first From.
I see now. Thanks for your patience and elaboration, it's all good then!
> > 2) the submitter and author are not the same (see also:
> > https://github.com/git/git/commit/a90804752f6ab2b911882d47fafb6c2b78f447c3);
> > 3) ...anything else...?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
` (3 preceding siblings ...)
2021-07-26 16:59 ` Mantas Mikulėnas
@ 2021-08-20 13:45 ` Jan Kiszka
2021-08-30 19:47 ` Jan Kiszka
4 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-08-20 13:45 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
Christian Storm, Andy Shevchenko, Mantas Mikulėnas
On 26.07.21 13:46, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Obviously, the test needs to run against the register content, not its
> address.
>
> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index b3f604669e2c..643c6c2d0b72 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
> * Otherwise, the BIOS generally reboots when the SMI triggers.
> */
> if (p->smi_res &&
> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> tmrval /= 2;
>
> /* from the specs: */
>
Ping, this is still missing in master. Stable kernels had the revert,
but 5.14 will need this.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-08-20 13:45 ` Jan Kiszka
@ 2021-08-30 19:47 ` Jan Kiszka
2021-08-30 20:00 ` Guenter Roeck
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2021-08-30 19:47 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
Christian Storm, Andy Shevchenko, Mantas Mikulėnas
On 20.08.21 15:45, Jan Kiszka wrote:
> On 26.07.21 13:46, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Obviously, the test needs to run against the register content, not its
>> address.
>>
>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> drivers/watchdog/iTCO_wdt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
>> index b3f604669e2c..643c6c2d0b72 100644
>> --- a/drivers/watchdog/iTCO_wdt.c
>> +++ b/drivers/watchdog/iTCO_wdt.c
>> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
>> * Otherwise, the BIOS generally reboots when the SMI triggers.
>> */
>> if (p->smi_res &&
>> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>> tmrval /= 2;
>>
>> /* from the specs: */
>>
>
> Ping, this is still missing in master. Stable kernels had the revert,
> but 5.14 will need this.
>
Second reminder: 5.14 is out and now broken. Is the patch queued
somewhere? I do not see it in the watchdog staging branch.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-08-30 19:47 ` Jan Kiszka
@ 2021-08-30 20:00 ` Guenter Roeck
2021-09-07 20:14 ` Wim Van Sebroeck
0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2021-08-30 20:00 UTC (permalink / raw)
To: Jan Kiszka, Wim Van Sebroeck
Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
Christian Storm, Andy Shevchenko, Mantas Mikulėnas
On 8/30/21 12:47 PM, Jan Kiszka wrote:
> On 20.08.21 15:45, Jan Kiszka wrote:
>> On 26.07.21 13:46, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Obviously, the test needs to run against the register content, not its
>>> address.
>>>
>>> Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
>>> Reported-by: Mantas Mikulėnas <grawity@gmail.com>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>> drivers/watchdog/iTCO_wdt.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
>>> index b3f604669e2c..643c6c2d0b72 100644
>>> --- a/drivers/watchdog/iTCO_wdt.c
>>> +++ b/drivers/watchdog/iTCO_wdt.c
>>> @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
>>> * Otherwise, the BIOS generally reboots when the SMI triggers.
>>> */
>>> if (p->smi_res &&
>>> - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>>> + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
>>> tmrval /= 2;
>>>
>>> /* from the specs: */
>>>
>>
>> Ping, this is still missing in master. Stable kernels had the revert,
>> but 5.14 will need this.
>>
>
> Second reminder: 5.14 is out and now broken. Is the patch queued
> somewhere? I do not see it in the watchdog staging branch.
>
I had it in my own watchdog-next branch for about a month.
Usually Wim picks it up from there or from the mainling list;
he handles all upstreaming. Wim ?
Guenter
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
2021-08-30 20:00 ` Guenter Roeck
@ 2021-09-07 20:14 ` Wim Van Sebroeck
0 siblings, 0 replies; 18+ messages in thread
From: Wim Van Sebroeck @ 2021-09-07 20:14 UTC (permalink / raw)
To: Guenter Roeck
Cc: Jan Kiszka, Wim Van Sebroeck, linux-watchdog,
Linux Kernel Mailing List, Paolo Bonzini, Christian Storm,
Andy Shevchenko, Mantas Mikulėnas
Hi All,
> On 8/30/21 12:47 PM, Jan Kiszka wrote:
> >On 20.08.21 15:45, Jan Kiszka wrote:
> >>On 26.07.21 13:46, Jan Kiszka wrote:
> >>>From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>
> >>>Obviously, the test needs to run against the register content, not its
> >>>address.
> >>>
> >>>Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
> >>>Reported-by: Mantas Mikulėnas <grawity@gmail.com>
> >>>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>---
> >>> drivers/watchdog/iTCO_wdt.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>>diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> >>>index b3f604669e2c..643c6c2d0b72 100644
> >>>--- a/drivers/watchdog/iTCO_wdt.c
> >>>+++ b/drivers/watchdog/iTCO_wdt.c
> >>>@@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
> >>> * Otherwise, the BIOS generally reboots when the SMI triggers.
> >>> */
> >>> if (p->smi_res &&
> >>>- (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> >>>+ (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
> >>> tmrval /= 2;
> >>> /* from the specs: */
> >>>
> >>
> >>Ping, this is still missing in master. Stable kernels had the revert,
> >>but 5.14 will need this.
> >>
> >
> >Second reminder: 5.14 is out and now broken. Is the patch queued
> >somewhere? I do not see it in the watchdog staging branch.
> >
>
> I had it in my own watchdog-next branch for about a month.
> Usually Wim picks it up from there or from the mainling list;
> he handles all upstreaming. Wim ?
This one is in linux-watchdog-next since 22 Aug.
Working on getting it upstream now.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-09-07 20:24 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
2021-07-26 12:01 ` Andy Shevchenko
2021-07-26 12:04 ` Jan Kiszka
2021-07-26 13:40 ` Andy Shevchenko
2021-07-26 13:59 ` Guenter Roeck
2021-07-26 14:05 ` Jan Kiszka
2021-07-26 14:51 ` Andy Shevchenko
2021-07-26 17:10 ` Jan Kiszka
2021-07-26 21:45 ` Andy Shevchenko
2021-07-26 12:03 ` Paolo Bonzini
2021-07-26 12:05 ` Jan Kiszka
2021-07-26 13:51 ` Guenter Roeck
2021-07-26 13:44 ` Guenter Roeck
2021-07-26 16:59 ` Mantas Mikulėnas
2021-08-20 13:45 ` Jan Kiszka
2021-08-30 19:47 ` Jan Kiszka
2021-08-30 20:00 ` Guenter Roeck
2021-09-07 20:14 ` Wim Van Sebroeck
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).