]> git.baikalelectronics.ru Git - kernel.git/commit
xen/grant-table: Refactor gnttab_init
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 31 Dec 2013 21:33:31 +0000 (16:33 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 6 Jan 2014 15:44:18 +0000 (10:44 -0500)
commita36e3c987d03ce16fbd6832cf22d2b6a6af92348
tree54801698862fcee9fa4706dad5e93c8db1a6c414
parent44ab83fca0011033dee537a0f29ed74bfee5a12f
xen/grant-table: Refactor gnttab_init

We have this odd scenario of where for PV paths we take a shortcut
but for the HVM paths we first ioremap xen_hvm_resume_frames, then
assign it to gnttab_shared.addr. This is needed because gnttab_map
uses gnttab_shared.addr.

Instead of having:
if (pv)
return gnttab_map
if (hvm)
...

gnttab_map

Lets move the HVM part before the gnttab_map and remove the
first call to gnttab_map.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
drivers/xen/grant-table.c