From: Julien Grall <julien@xen.org>
To: Rahul Singh <Rahul.Singh@arm.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Bertrand Marquis <Bertrand.Marquis@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v2 7/8] xen/arm: Remove Linux specific code that is not usable in XEN
Date: Fri, 4 Dec 2020 09:05:38 +0000 [thread overview]
Message-ID: <b87e9293-77bb-2c43-63d0-8d54d5fc9a7e@xen.org> (raw)
In-Reply-To: <51C0C24A-3CE6-48A3-85F5-14F010409DC3@arm.com>
Hi Rahul,
On 03/12/2020 14:33, Rahul Singh wrote:
>> On 2 Dec 2020, at 2:45 pm, Julien Grall <julien@xen.org> wrote:
>>> -
>>> -static struct iommu_device *arm_smmu_probe_device(struct device *dev)
>>> -{
>>
>> Most of the code here looks useful to Xen. I think you want to keep the code and re-use it afterwards.
>
> Ok. I removed the code here and added the XEN compatible code to add devices in next patch.
> I will keep it in this patch and will modifying the code to make XEN compatible.
In general, it is prefer if the code the code rather than dropping in
patch A and then add it again differently patch B. This makes easier to
check that the code outcome of the function is mostly the same.
>>> -static struct iommu_ops arm_smmu_ops = {
>>> - .capable = arm_smmu_capable,
>>> - .domain_alloc = arm_smmu_domain_alloc,
>>> - .domain_free = arm_smmu_domain_free,
>>> - .attach_dev = arm_smmu_attach_dev,
>>> - .map = arm_smmu_map,
>>> - .unmap = arm_smmu_unmap,
>>> - .flush_iotlb_all = arm_smmu_flush_iotlb_all,
>>> - .iotlb_sync = arm_smmu_iotlb_sync,
>>> - .iova_to_phys = arm_smmu_iova_to_phys,
>>> - .probe_device = arm_smmu_probe_device,
>>> - .release_device = arm_smmu_release_device,
>>> - .device_group = arm_smmu_device_group,
>>> - .domain_get_attr = arm_smmu_domain_get_attr,
>>> - .domain_set_attr = arm_smmu_domain_set_attr,
>>> - .of_xlate = arm_smmu_of_xlate,
>>> - .get_resv_regions = arm_smmu_get_resv_regions,
>>> - .put_resv_regions = generic_iommu_put_resv_regions,
>>> - .pgsize_bitmap = -1UL, /* Restricted during device attach */
>>> -};
>>> -
>>> /* Probing and initialisation functions */
>>> static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
>>> struct arm_smmu_queue *q,
>>> @@ -2406,7 +2032,6 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
>>> switch (FIELD_GET(IDR0_STALL_MODEL, reg)) {
>>> case IDR0_STALL_MODEL_FORCE:
>>> smmu->features |= ARM_SMMU_FEAT_STALL_FORCE;
>>> - fallthrough;
>>
>> We should keep all the fallthrough documented. So I think we want to introduce the fallthrough in Xen as well.
>
> Ok I will keep fallthrough documented in this patch.
>
> fallthrough implementation in XEN should be another patch. I am not sure when we can implement but we will try to implement.
Yes, I didn't ask to implement "fallthrough" in this patch, but instead
as a pre-requirement patch.
I would implement it in include/xen/compiler.h.
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2020-12-04 9:06 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 17:01 [PATCH v2 0/8] xen/arm: Add support for SMMUv3 driver Rahul Singh
2020-11-26 17:02 ` [PATCH v2 1/8] xen/arm: Import the SMMUv3 driver from Linux Rahul Singh
2020-12-01 22:01 ` Stefano Stabellini
2020-11-26 17:02 ` [PATCH v2 2/8] xen/arm: revert atomic operation related command-queue insertion patch Rahul Singh
2020-12-01 22:23 ` Stefano Stabellini
2020-12-02 13:05 ` Rahul Singh
2020-12-02 13:44 ` Julien Grall
2020-12-03 11:49 ` Rahul Singh
2020-11-26 17:02 ` [PATCH v2 3/8] xen/arm: revert patch related to XArray Rahul Singh
2020-12-02 0:20 ` Stefano Stabellini
2020-12-02 13:46 ` Julien Grall
2020-12-03 12:57 ` Rahul Singh
2020-12-04 8:52 ` Julien Grall
2020-11-26 17:02 ` [PATCH v2 4/8] xen/arm: Remove support for MSI on SMMUv3 Rahul Singh
2020-12-02 0:33 ` Stefano Stabellini
2020-12-02 0:40 ` Stefano Stabellini
2020-12-02 13:12 ` Rahul Singh
2020-12-02 14:11 ` Julien Grall
2020-12-03 12:59 ` Rahul Singh
2020-11-26 17:02 ` [PATCH v2 5/8] xen/arm: Remove support for PCI ATS " Rahul Singh
2020-12-02 0:39 ` Stefano Stabellini
2020-12-02 13:07 ` Rahul Singh
2020-12-02 13:57 ` Julien Grall
2020-11-26 17:02 ` [PATCH v2 6/8] xen/arm: Remove support for Stage-1 translation " Rahul Singh
2020-12-02 0:53 ` Stefano Stabellini
2020-12-02 13:13 ` Rahul Singh
2020-11-26 17:02 ` [PATCH v2 7/8] xen/arm: Remove Linux specific code that is not usable in XEN Rahul Singh
2020-12-02 1:48 ` Stefano Stabellini
2020-12-02 14:34 ` Rahul Singh
2020-12-02 14:39 ` Julien Grall
2020-12-02 14:45 ` Julien Grall
2020-12-03 14:33 ` Rahul Singh
2020-12-04 9:05 ` Julien Grall [this message]
2020-12-07 10:36 ` Rahul Singh
2020-12-07 10:55 ` Julien Grall
2020-11-26 17:02 ` [PATCH v2 8/8] xen/arm: Add support for SMMUv3 driver Rahul Singh
2020-12-02 2:51 ` Stefano Stabellini
2020-12-02 16:27 ` Rahul Singh
2020-12-02 19:26 ` Rahul Singh
2020-12-02 16:47 ` Julien Grall
2020-12-03 4:13 ` Stefano Stabellini
2020-12-03 14:40 ` Rahul Singh
2020-12-03 18:47 ` Stefano Stabellini
2020-12-07 8:33 ` Rahul Singh
2020-12-02 16:22 ` Julien Grall
2020-12-07 12:12 ` Rahul Singh
2020-12-07 17:39 ` Julien Grall
2020-12-07 18:42 ` Rahul Singh
2020-12-08 19:05 ` Julien Grall
2020-12-09 1:19 ` Stefano Stabellini
2020-12-09 7:55 ` Bertrand Marquis
2020-12-09 9:18 ` Julien Grall
2020-12-09 18:37 ` Rahul Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b87e9293-77bb-2c43-63d0-8d54d5fc9a7e@xen.org \
--to=julien@xen.org \
--cc=Bertrand.Marquis@arm.com \
--cc=Rahul.Singh@arm.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).