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

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


  • To: Rahul Singh <Rahul.Singh@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Tue, 13 Dec 2022 10:21:20 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=3//X6CAvaR9OwunMNpIuRV2EDPy+55g+1ib5pvktsew=; b=Cn7Q5EBVL6Vlwq/Ql8fS9lWLx9c6kDdzL2yCIc4qp00XJhWDnSJQn6Mfr8ThmPOyaHI5R7ynZpuVWjB3VXr5+gYFNWlfCSJTKJ9ahIfgzvNM6CjHs6S8DcVUsvG+eDTQlraKLjNNvnDr8v+Bf50aHuO2UNK4Woew0Ja+dqKqymqnsBkV2sQ5hKQO+JdUIJTM1y3drfwR86qrhk1NIlLpklUWZ7B3hQCRfcZpVYoAWZ9f5THkPAfzArlYUGon+0vrvGuVxxjdzDI8RUZM0iqSH63gc1y5BuN6w+i4PDwHqOOOeVwsAaM3JOdPjMJUjvfRVj1rKrEZ+ifuiDwCNuutXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O2QfCnCsQ8g/KxvRy7Qnjjiyy/2gjkaqLhSGvPgIeMyVH6hnpbGqWKP+2b5O7KI2OKObUxGPXa3wfV7SosUIKJFOHQo8amJB7W/Jgzd4sy/N3gyt75PZZ8hJY1OLP5CqXtGPFjj6Daq1p4FMRZmeVvvucfyjd/FaKDsvg5aluk81qh2UAPiEGsOqNH+s/Prx9jUOSASkt/SiycQ4viKXmBCykgc077RipJIwiBOdBx+Sv01g5TZgw90j7CHNEg0CU+AhoFqsGtJ8jrlwDXYbABEgBioQ+CNfp7GzJg8Y7crkeoU9MBUmU27xv3IIC4E8Y6eXyoKhaJNTiYSmxNgxLQ==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 13 Dec 2022 15:21:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/12/22 11:24, Rahul Singh wrote:
> 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.

OK, I will send a v2 with the __maybe_unused attribute (in both locations), in 
case PASID is to be implemented in the future.



 


Rackspace

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