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

Re: [PATCH v10 09/13] xen/arm: smmu-v3: add suspend/resume handlers


  • To: Mykola Kvach <xakep.amatop@xxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 3 Jun 2026 09:43:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=gmail.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Ai0P5PdEcqBqJjj/3PtwqBLUx1AG9EAnhuUZPISh8K4=; b=CzZhDLjFBThZjeauN0AATFERoPVybPg7oizbn7tQYBsq1n1R6DwrTNRtCegcAkyK/WJ14TYK5nS0mj482DJ61UK67ZKfHORo+nhAf5mQsQwJhdCXMqX5o54LUeqVS4qqKJW5zAH7gFa9ujOOnYY1JnTFtS0C1laWUPcJzvXLPsz7w1a/36tksBjrlT+P1d194zlLCqCqO8XlB6OBCm9fX6x02fxa9qq6ZHgwLW8qe1288Rm0wAhj9inEGrX6MIOcjkaJSVW+kQKZ9HuUrGrsLVGEnY2qRJhRWt3rd5R1Onfppn1TQbIgmLCstWra+T4+1F1An5gz1O74h+X22BtRgw==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Ai0P5PdEcqBqJjj/3PtwqBLUx1AG9EAnhuUZPISh8K4=; b=kZII/d5HmV558JudPHTrFAKVDqg0XGuL7wxvTG2Wj+AY+rkoUihVfpyot2PQlz0IPIXv2Lw9elbK26+NL+VGiRD86T459frm4kB7hoaJgVByVHYJ8RAA4G60LFuEVYvCoMcis6P4BqzDaDie3wS+c1ksKGcpfX7eEyzz2ylwhOuICxptigQAHlxZdg/sMC7nr6ca2UeDO1DetWQ1PPwDP+OGok/37Z9oD1GWyRULJOpdQmUnCirosMzjsgJwRtn2b5sGnfk6BcAJMuyoqMx11Byn3CNdRulEim6ZAzGO6qdD1m1N+h/cm0dJKCqAZEvvsG7/Qx6bb8blfmPIp7ZXXA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=WWZfYxGfvWAUaTs8d8eJZvj0UdO2igpgd9PpKCPE5kq5SABu/6Zl82wgYhvBKQtcm9YaMkIPPddI4g+WINJF94c4FpDhszxtNsVTFBeKKmQwYzx41VqNatpOG6FVAXokVjUn3AuqAggY1d1mcR08CmbTRqa0lKEss5GxfBt+DDwpTpLjBNuBhlujwuQMAkquIBUrWpFcphGTBDDBG8T50aEnImS7fIPhWj2bls2QoaN9W2cQYKkL5PV7kDguKAOwircb1FoLBRF9KHPG4tUzouy+cYL2oglpjyfOpwdESI2UjKRsQZ/oRlj6WzBPo25aW08I+kB8Uv0A8vROLmCutg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DR+UwnnfQyflEtZJlqdwdMdbCJEh5TCxdSy22QHgSu/Ymd45ytFZ7UAYCv/OMkOMGjw/9FJcLRA28mpWaJ4+KtvHiY52EFOeqkK1n9Qo1K7S9bvl3B5nEhEpSYBj0eA2PcYhr7i0KadWD/n2/l7SR6dg0g+/OK35QCYqozW0uhIryVvGWMUMNJHTsr5cR8lV/rJa1Toull9XDnU8ldrNUdQNmu0TWmuLUqoDa4paU8/fPrNU4O0Ctbz4mWY3PhtcNXQAdGehjirNA4BQaJSHOjRdAK1PSs1ZqwMdO4ouKrB+nevDZWgKXzSn80z/LIYpGV+MoLCRHg/JaPX4UkP2Hg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Mykola Kvach <mykola_kvach@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Pranjal Shrivastava <praan@xxxxxxxxxx>
  • Delivery-date: Wed, 03 Jun 2026 09:44:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHc6UoJ2/A9TKf5Mki5mcNZE+ke7LYqAKSAgAJppgCAAD3PgA==
  • Thread-topic: [PATCH v10 09/13] xen/arm: smmu-v3: add suspend/resume handlers

Hi Mykola,

>>> 
>>> /* GBPA is "special" */
>>> -static int __init arm_smmu_update_gbpa(struct arm_smmu_device *smmu,
>>> -                                       u32 set, u32 clr)
>>> +static int arm_smmu_update_gbpa(struct arm_smmu_device *smmu, u32 set, u32 
>>> clr)
>> 
>> Now this one and arm_smmu_device_reset loose __init also for 
>> !CONFIG_SYSTEM_SUSPEND,
>> but I’m not sure if in the codebase we are dealing with these kind of cases 
>> already or if it’s still ok
>> to let it be without __init anyway.
> 
> Good point. I will avoid keeping these helpers in runtime text for
> !CONFIG_SYSTEM_SUSPEND.
> 
> I think a small local annotation in the SMMUv3 driver would work well here,
> something like:
> 
> #ifdef CONFIG_SYSTEM_SUSPEND
> #define __init_or_smmu_suspend
> #else
> #define __init_or_smmu_suspend __init
> #endif
> 
> and then use it for arm_smmu_update_gbpa() and arm_smmu_device_reset().
> 
> This keeps the suspend-enabled case unchanged while preserving the existing
> init-only placement otherwise.
> 
> What do you think?

Yes I think that would work, you can keep my R-by if you apply the new 
__init_or_smmu_suspend
to arm_smmu_update_gbpa and arm_smmu_device_reset.

Cheers,
Luca


 


Rackspace

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