Re: [PATCH 5/9] x86/nmi: Fix comment in unknown NMI handling

From: Sohil Mehta
Date: Tue Apr 01 2025 - 01:28:35 EST


On 3/31/2025 5:17 PM, Huang, Kai wrote:
> On Thu, 2025-03-27 at 23:46 +0000, Mehta, Sohil wrote:
>> The comment in unknown NMI handling is incorrect and misleading. There
>> is no longer a restriction on having a single Unknown NMI handler. Also,
>> nmi_handle() does not use the 'b2b' parameter anymore.
>>
>> The changes that made the comment outdated are:
>>
>> commit 0d443b70cc92 ("x86/platform: Remove warning message for duplicate
>> NMI handlers")
>>
>> commit bf9f2ee28d47 ("x86/nmi: Remove the 'b2b' parameter from
>> nmi_handle()")
>
> After some digging, IIUC, the 'b2b' parameter of the nmi_handle() was actually
> never used when it was originally added in the
>

You are right. The b2b parameter was never really used. The fixup patch
says the same thing as well.

"x86/nmi: Remove the 'b2b' parameter from nmi_handle()

It has never had any effect. Remove it for comprehensibility."



> commit b227e23399dc ("x86, nmi: Add in logic to handle multiple events and
> unknown NMIs")
>

It's probably okay even if we don't mention this directly in the
changelog. It is indirectly implied through the above fixup patch.

> .., so IIUC the comment was wrong when it was firstly added.  
> > The above commit to remove the 'b2b' seems just a fixup patch but it
didn't fix
> the comment.
>

Yup, that's what I meant. The fixup patch should have fixed the comment
as well.

> Not sure whether it is worth to mention in the changelog.
>

>
> Anyway:
>
> Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>

Thanks!