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

Re: [PATCH v1 0/2] Fix ARM Generic Timer interrupt parsing


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrei Cherechesu <andrei.cherechesu@xxxxxxxxxxx>
  • Date: Tue, 7 Mar 2023 19:46:13 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.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=+tJXt4RG4WKx1/yFmJmwlyt7r4nomhj+7N9nOuH7bQE=; b=OtLjBewsMtrTBdS6OkhnguOrDf2AruniZ2jI2W1RV1k1CCF+ZYHbW0vT9tCqlPZzc8J7GP5U6Y8jmd490LAGMN1VcRtBgJP3LyiNof5BXDNhM5uHvYMYQnsQadjVXck9vxHVkqABMoktuE5FTaxSEDbinEc1CqZXpG3VOjyq6+Xt/Ehs3cQLzq7tNWqyJ4rt7sKxm4js8N4c3qclNpDwpyGRTZjPs5S5eOhx+QdtmPr2B0OQEfsi5Vy0Tzlj8hT36zFldAs9nkw0Tre0174pBu42VSesci3v8yvmMgkeut2Qd+Daao3FbO9eqa+irz9JJXkuWwhTYPI6mYwGIjtjjA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZRtGRzphnlN5pP88mEYP3YQ3RSBp9dM6Md06REjFuykMnUZ0oEUL7v+OutsIN8KHnjmy2ZNeRBuz4MB3zQyf+rIzm/begKDwP0+MpiUFuQw+0QI0Z/ixiBReJ0DGkgZw95Ckc8T7tVVBenbr9/ghdF4kT0gyr7fB1uh/vbkk7VUiQBdszxtRj8aZjYAG7yR2GfhO9ZPW+4/kLVtm+yTag/+9GWlEGSd+b9ivvipWGIc6Gd60acyYfHJspBuMHgUpFoL2Cx9a7dPuwNJW+jqk7Fdnqu+orEH2aEgTRwJomcWVHUVTXdFiDgNZL4bUA5wqWpF421IUI5NUTKACyeAiww==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>, sstabellini@xxxxxxxxxx, julien@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, rahul.singh@xxxxxxx
  • Delivery-date: Tue, 07 Mar 2023 17:46:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 07/03/2023 17:27, Bertrand Marquis wrote:
> Hi Andrei,
> 
> When submitting patches, please use the add_maintainer.pl script so that 
> maintainers of the code
> modified are added in CC.

Hi Bertrand,

Thank you for reviewing the patches. I apologize for not adding the
maintainers in CC. I added them now.

> 
>> On 7 Mar 2023, at 11:09, Andrei Cherechesu (OSS) 
>> <andrei.cherechesu@xxxxxxxxxxx> wrote:
>>
>> From: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
>>
>> This 2-patch series fixes the parsing of the ARM Generic Timer
>> interrupts from the device tree.
>>
>> If the generic timer interrupts order in the DT was different than
>> the expected order in Xen code, these interrupts would no longer be
>> correctly parsed and registered by Xen, and would result in boot failure.
>>
>> This method with using "interrupt-names" for the generic timer interrupts
>> instead of having them hardcoded in the DTB in a specific order is the newer
>> approach already implemented in Linux. Xen did not have the necessary code 
>> for
>> this approach, and it has been implemented by the means of this patch series.
> 
> Would mind giving a link to an example or the Linux documentation if there is 
> one ?
> 

The bindings [0] for the ARM Generic Timer DT node were changed around
Linux 5.13, when the interrupt-names property was added, along with the
implementation for handling it [1].


[0]
https://elixir.bootlin.com/linux/v6.3-rc1/source/Documentation/devicetree/bindings/timer/arm,arch_timer.yaml#L44
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/clocksource/arm_arch_timer.c?id=86332e9e3477af8f31c9d5f3e81e57e0fd2118e7


Regards,
Andrei


> Cheers
> Bertrand
> 
>>
>> Functionality should remain the same if "interrupt-names" is not present in 
>> the
>> Generic Timer DTB node of the platform, but the interrupts should then still 
>> be
>> present in the expected "sec-phys", "phys", "virt", "hyp-phys", "hyp-virt" 
>> order.
>> If "interrupt-names" is present, now it is also correctly handled.
>>
>> Andrei Cherechesu (2):
>>  arch/arm: irq: Add platform_get_irq_byname() implementation
>>  arch/arm: time: Add support for parsing interrupts by names
>>
>> xen/arch/arm/include/asm/irq.h        |  2 ++
>> xen/arch/arm/include/asm/time.h       |  3 ++-
>> xen/arch/arm/irq.c                    | 14 +++++++++++
>> xen/arch/arm/time.c                   | 26 +++++++++++++++++---
>> xen/drivers/passthrough/arm/smmu-v3.c | 35 +++++----------------------
>> 5 files changed, 46 insertions(+), 34 deletions(-)
>>
>> -- 
>> 2.35.1
>>
>>
> 



 


Rackspace

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