]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/swiotlb: remember having called xen_create_contiguous_region()
authorJuergen Gross <jgross@suse.com>
Mon, 2 Sep 2019 00:05:23 +0000 (08:05 +0800)
committerBrian Maly <brian.maly@oracle.com>
Thu, 19 Sep 2019 18:40:05 +0000 (14:40 -0400)
commit6d5e19a6188b49f98a1fdc1b151ea0868db2fc74
tree61c6a1fa2aa4837269d04c510010920ff055d1e4
parentdcceeaa6723795fcc44329cb8e4ad3d522b7182a
xen/swiotlb: remember having called xen_create_contiguous_region()

Instead of always calling xen_destroy_contiguous_region() in case the
memory is DMA-able for the used device, do so only in case it has been
made DMA-able via xen_create_contiguous_region() before.

This will avoid a lot of xen_destroy_contiguous_region() calls for
64-bit capable devices.

As the memory in question is owned by swiotlb-xen the PG_owner_priv_1
flag of the first allocated page can be used for remembering.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
(cherry picked from commit b877ac9815a8fe7e5f6d7fdde3dc34652408840a)
Orabug: 30141778
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
  PF_NO_COMPOUND is not used for PAGEFLAG() in uek4

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/xen/swiotlb-xen.c
include/linux/page-flags.h