On 30/10/2018 00:28, Stefano Stabellini wrote:
> On Fri, 26 Oct 2018, Julien Grall wrote:
>> Hi Stefano,
>>
>> On 10/26/18 7:04 PM, Stefano Stabellini wrote:
>>> From: Stefano Stabellini <stefa...@xilinx.com>
>>>
>>> xen_create_contiguous_region has now only an implementation if
>>> CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but
>>> we do have an implementation of xen_create_contiguous_region which is
>>> required for swiotlb-xen to work correctly (although it just sets
>>> *dma_handle).
>>>
>>> Add a stub implementation of xen_remap_pfn: it should never be called on
>>> ARM but it is necessary for linking.
>>>
>>> This fixes a bug introduced by 16624390816c4c40df3d777b34665d3fd01e693d.
>>
>> Again, this should contain a tag "Fixes: sha1 ("commit title")" so it can be
>> picked for backporting automatically.
> 
> Yeah, I forgot about it, it should be definitely added.
> 
> 
>>> Signed-off-by: Stefano Stabellini <stefa...@xilinx.com>
>>> CC: jeff.kubas...@dornerworks.com
>>> CC: jarvis.ro...@dornerworks.com
>>> CC: nathan.stu...@dornerworks.com
>>> CC: vkuzn...@redhat.com
>>> CC: boris.ostrov...@oracle.com
>>> CC: jgr...@suse.com
>>> ---
>>>   arch/arm/xen/mm.c     | 8 ++++++++
>>>   include/xen/xen-ops.h | 2 +-
>>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>> ---
>>> Changes in v2:
>>> - improve commit message
>>> - add xen_remap_pfn stub implementation
>>> - use if defined()
>>> diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c
>>> index 785d2a5..7230e22 100644
>>> --- a/arch/arm/xen/mm.c
>>> +++ b/arch/arm/xen/mm.c
>>> @@ -182,6 +182,14 @@ void xen_destroy_contiguous_region(phys_addr_t pstart,
>>> unsigned int order)
>>>   }
>>>   EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
>>>   +int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
>>> +             xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
>>> +             unsigned int domid, bool no_translate, struct page **pages)
>>> +{
>>> +   return -EOPNOTSUPP;
>>> +}
>>> +EXPORT_SYMBOL_GPL(xen_remap_pfn);
>>
>> This does not match the "unimplemented" version in xen-ops.h.
>>
>> But I find this solution quite ugly. Why don't you split the #ifdef in two
>> below?
> 
> I am happy to follow the maintainers' opinion on this. I would keep
> those those definition together but I don't mind either way.
> 
> 
> Juergen, Boris,
> 
> What do you prefer?

I'd follow Julien's suggestion.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to