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

Re: [PATCH] xen/arm: smmuv3: remove unused function


  • To: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Mon, 12 Dec 2022 16:24:49 +0000
  • Accept-language: en-US
  • 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=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=53OAeRwYVC6vgyPiJHR5Y2eg9PWA4qO7/4xHUd4scMo=; b=TXOCGNl2BWWSBSd1WWVv2Nx+U4harA2VDbtF3nAm3aChI1IS8s4Cxgr7GwfRpf78aaGpDgQDPQrmzHy2GPFM150toWNyWBDJt/zkGpLNcTfnvi3hr+l6CqMLV5oaZNuInPCIZNE/6lX/QCHWfb7jsocnNWmYu6zLhBONEW0Z6x1p3pOJMuTFHjxPGhBPGRHZsw6AKuDrr7ZJzCGyHnLywaR6oh4AvVCwW8TU6iM/HCLpTi/MgvTyPjXexA8WneiVGA3RDBWMJl1Qa65lIyRJQ8q0KqqHmm9ZTGJ4wTfilVG+XAwY2ioiEx8UxgoZX1tFr6m62JKGmOx1NT8EmJlozg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OZA3Mz8Byfk/86uhR5aMuysrGGgMhGw/MfiptdxucRiknYPJ9vqxJSrThY4DoKXs1rP5WQKU8YW9++7knGhWBl1htlJ8lJ/B0OPM4iNYw/2omD7ErUiFXA1tcVTCBpHIuURhUGWKGu6EomzuzGq7zhuRToBq+9sgJiKSMRj14qduVgRHhSbUE8nEAL1jx7g9sQOPEURi8dmoSALfYTv+LRHbavew/MGXIjHb2SKvYDk+6JilT+wVnFULuoWjjsHEZY491+0MHqOlMaKNDhr8gacKxCthpbyqwQXrNhCONS7weapVfhj9+MSrCdmS3KfkSs+Eaogwp7GK3HuKhg54OQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 12 Dec 2022 16:25:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZDkLuKaGYVILFF0WaGMCTZHqskK5qazYAgAAExIA=
  • Thread-topic: [PATCH] xen/arm: smmuv3: remove unused function

Hi Julien,

> On 12 Dec 2022, at 4:07 pm, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Stewart,
> 
> On 12/12/2022 16:00, Stewart Hildebrand wrote:
>> When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the
>> following build error:
>> drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 
>> 'arm_smmu_disable_pasid' [-Werror,-Wunused-function]
>> static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }
>>                    ^
>> Remove the function.
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
>> ---
>> There is also a definition of arm_smmu_disable_pasid() just above,
>> guarded by #ifdef CONFIG_PCI_ATS. Should this one be removed too? It
>> might be nice to keep this definition for ease of backporting patches
>> from Linux, but if we ever plan on supporting PCI_ATS in Xen this may
>> need to be re-visited.
> 
> Given the function is not called at all, I think this is a bit odd to remove 
> the stub but leave the implementation when CONFIG_PCI_ATS is defined.
> 
> Rahul, do you plan to use it in the PCI passthrough code? If yes, then I 
> would consider to use __maybe_unused.

No, this function will not be used in PCI passthrough code, but when we merged 
the SMMUv3 code from Linux at that time we
decided to have this code and gate with CONFIG_PCI_ATS so that in the future if 
someone wants to implement the PASID feature
will use these functions.

I also agree with Julien we would consider using __maybe_unused.

Regards,
Rahul


 


Rackspace

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