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

[PATCH v2 0/2] Fix ARM Generic Timer interrupt parsing


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Andrei Cherechesu (OSS)" <andrei.cherechesu@xxxxxxxxxxx>
  • Date: Thu, 9 Mar 2023 18:19:31 +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=4bTt5zhJULGm/vo8RbHug4DIETlhKUeesiyygA6gBJ0=; b=OPU2gNu+OhyB8qfgHGC6UWJvEagiYd8fRIImCKQF2jsE6hGKnu1cfrdrlo+QdteOVh3geXwHxzJAwLjZfOV7RTsertKNMX/PeYitwZ8YTz0KwMDrGe9veejMcX1OMPFpAm3uvVajIy6MV4bCElajz1wxeYpr5dcPSIkFxmyqL+rJekragO9KfPuswZUSvF+UDUc690o2GVL1LlMiDCNHCudEtMx+X8zx9qiZFvCniuVutHPTEoMwO1X+9vb61uyMtce//MKmB0BOiegs+dNywgvp8BAR8Wcxg/jAiAS3W/ARE1gbxVXImQxTnNi7P1P/wU75+qFgvGTAalJdtWvgOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O5DuWm+rI847UkkMaoPZGlho+qQrjI7n5ckR7B+CKYNqIHVQJct9mgwH+bH/y8b37T5MdhuUUK7DZ4Qa4I24PQebc9cdK+Eh0GsHgQt+wJjcSlN0OXt/l8XKds10/8mWjOQW0H+dtpaGdW+7Q/LLwmVDfhL887U2dubcCUUqO1uDGeEiN5/HdOQPlY2ECU3ZFkt6IlRkwMw6zKRe2vW0MGbKqhIqmOjmTnd7xChAsR/yv4R1qBqLHi5zC79snx+V7h93ybHDdstLzikpiYd0dEDjyPgb4gFW55/CFKu7ESoWYma0ZdqK2kZcfbWYkEavDJC0O8rRAXedz9yXXjqb+g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: Bertrand.Marquis@xxxxxxx, sstabellini@xxxxxxxxxx, julien@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, rahul.singh@xxxxxxx, Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
  • Delivery-date: Thu, 09 Mar 2023 16:20:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

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.

Changes v1->v2:
 - Rebased on latest staging as of 2023-03-09
 - Fixed coding style of comment added in 2nd commit
 - Added to 2nd commit message explanation as to why 0 should
be treated as an error case for platform_get_irq

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                   | 27 ++++++++++++++++++---
 xen/drivers/passthrough/arm/smmu-v3.c | 35 +++++----------------------
 5 files changed, 47 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®.