[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] x86/APIC: modify error_interrupt() to output using single printk()


  • To: Elliott Mitchell <ehem+xen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 20 Mar 2023 17:59:54 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0sYTxr06Na9EFC+Yir9pzobnPKK96xE+BCTSE7UeaOc=; b=T0oRjGGUmhzrtL3RplxDAwyRwy96ecuJ8YQtwFUTEBjl1FofiE2zUVqggmTsJSepxomaga/adZgG0k5gldK4yCQg9ErYMOqTDKFUQ+EDYhd6mEDQjVFI+etIzvPWFNXLUIOvmdXdg9biX3z+606VsoCO4M1e+1U5KYrDqi54wI2BHTQlEWuUWGyFw8J/wRCDnEc5IWNXiZd3ZPKDk10WKHhWw/3YF6SUzr83cRuwmz+3fKxjeRHYencAq1zZalDqdR8h8kkaHT4mXwyzNTkH8W6x2Tu2KCdr815fhqaUqMkVfuS1u+UDNDLMXu0i98dXggwuFcZuuRk0COME1oUwJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yp4BjthC4XTzROGGliVfuCCAMQ2gV942d62Q4o5s99nZECZp4UtzvpBDwvmWbSBVxAjy8P/iPT81/6tQ/gPvvCjG5HR+57eS1q8+yYgIiciVYCTsG+tD0RFStOMlLrbESdgwdl8g88qgzUsj8XyQChLWqgxB5YtRvYx4OVX5jO7d/Hm3xna9ihytFCPxyI+xK6MnyiFn6SozZClTy6eA1UjpDe7e0xYPwQUjERzwwYKaZJeev2BWOb9EiEFXbpxloseVqrH9EpnK2uIpGH99ZW2qsdI++Qp0P+70Bihj9wU/uEPfmOsXBwBCIpY/fV/ZbcfEqs0QfcCxnN6eA2O8sA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 20 Mar 2023 17:00:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.03.2023 16:54, Elliott Mitchell wrote:
> On Mon, Mar 20, 2023 at 04:39:48PM +0100, Jan Beulich wrote:
>> On 20.03.2023 15:29, Elliott Mitchell wrote:
>>>
>>> There are several minor issues here which may be best handled during
>>> commit as they're very small items about how precisely you want this to
>>> look.
>>>
>>> First, I later realized I goofed the argument order.  In order to match
>>> the original implementation, it needs to be entries[7] ... entries[0]
>>> (could though be the low-order bits should be reported first).
>>
>> I'm not really concerned of the order. A change of order wants
>> mentioning in the description though.
> 
> Seemed simple enough to fix on commit (simply switch the order of
> numbers).
> 
>>> Second, the order of the for loop no longer matters.  Using
>>> ARRAY_SIZE(esr_fields) and increment should now be more maintainable
>>> (this would also allow i to be unsigned).
>>
>> Indeed. But that would better done in a separate patch then anyway.
> 
> Feel free to split.
> 
>>> Third, I'm simply unsure how you would prefer to format the printk().
>>
>> About any way matching style guidelines is okay. There are two more
>> things to mention though (sorry for not noticing earlier): We aim at
>> keeping the entire format string on one line, for grep-ability. And
>> there's no need (and in fact no reason) to split the sequence of %s
>> from the \n. To summarize:
>>
>>     printk(XENLOG_DEBUG
>>            "APIC error on CPU%u: %02x(%02x)%s%s%s%s%s%s%s%s\n",
>>
>> (unless of course it all fits on one line, which it looks like it
>> does).
> 
> I like keeping the "%s%s%s%s%s%s%s%s" section separated since it needs to
> match the number of arguments.  In the future where more bits of the
> register are defined, both sections will need to be modified together.
> 
> 
> This seems to be a spot where there are large numbers of similarly
> functional, but mildly different style variants.  As such I suspect this
> is best left in your hands as this is a bog of trivial style
> considerations which have no real functional effect.

Just to clarify: What is or is not adjusted on commit is a decision of
the committer. A no longer as active committer was actually of the
opinion that it is a mistake to ever make any changes while committing.
In the case here you're asking for far more changes (including either
one to the description of patch 1, or the folding of both patches) than
I personally would be willing to do. I'm sorry for that.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.