Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1667613

Re: [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids

From Magnus Damm <magnus.damm@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids
Date 2017-06-16 12:20 +0200
Message-ID <tSWw9-78O-7@gated-at.bofh.it> (permalink)
References <tSAlY-1jO-5@gated-at.bofh.it> <tSAlY-1jO-17@gated-at.bofh.it> <tSTHY-5l6-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Geert,

On Fri, Jun 16, 2017 at 4:18 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Hi Magnus,
>
> On Thu, Jun 15, 2017 at 12:29 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> Now when both 32-bit and 64-bit code inside the driver is using
>> fwspec it is possible to replace the utlb handling with fwspec ids
>> that get populated from ->of_xlate().
>
> Thanks for your patch!

Thanks for the feedback!

>> --- 0013/drivers/iommu/ipmmu-vmsa.c
>> +++ work/drivers/iommu/ipmmu-vmsa.c     2017-06-15 18:32:27.580607110 +0900
>
>>  static int ipmmu_of_xlate(struct device *dev,
>>                           struct of_phandle_args *spec)
>>  {
>> -       return ipmmu_init_platform_device(dev);
>> +       iommu_fwspec_add_ids(dev, spec->args, 1);
>
> Does it hurt if iommu_fwspec_add_ids() is called multiple times, as this is
> done before the "Initialize once - xlate() will call multiple times" check?

The function needs to be called several times to populate the ids, so
that the "initialize once" check happens later is intentional and
correct. Perhaps a bit unclear though...

>> +
>> +       return ipmmu_init_platform_device(dev, spec);
>>  }

Cheers,

/ magnus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/04] iommu/ipmmu-vmsa: 32-bit ARM update Magnus Damm <magnus.damm@gmail.com> - 2017-06-15 12:40 +0200
  [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids Magnus Damm <magnus.damm@gmail.com> - 2017-06-15 12:40 +0200
    Re: [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with  fwspec ids Geert Uytterhoeven <geert@linux-m68k.org> - 2017-06-16 09:20 +0200
      Re: [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with  fwspec ids Magnus Damm <magnus.damm@gmail.com> - 2017-06-16 12:20 +0200
  Re: [PATCH 00/04] iommu/ipmmu-vmsa: 32-bit ARM update Robin Murphy <robin.murphy@arm.com> - 2017-06-19 18:30 +0200

csiph-web