]> git.karo-electronics.de Git - karo-tx-linux.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>
Fri, 3 Jan 2014 19:57:33 +0000 (14:57 -0500)
commit2cefc4fe7c359b9e363d65575227d96a59f8b386
tree7234e6e7d04c0738d74b4e80745394b1a933ba05
parent20037b60e9f1a40b24c608fcedcb7b29e575bd92
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>
drivers/xen/grant-table.c