]> git.baikalelectronics.ru Git - kernel.git/commit
xen: introduce helper functions to do safe read and write accesses
authorJuergen Gross <jgross@suse.com>
Fri, 5 Dec 2014 12:28:04 +0000 (13:28 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 8 Dec 2014 10:53:59 +0000 (10:53 +0000)
commit4e8759d69eca6b409a0f9a54c41fb86987d22220
tree4626f1216f41e6074e2970aeb97086258f162981
parente2f54ae90bf48a4f5c10ac6c03cf0d2aaec4d102
xen: introduce helper functions to do safe read and write accesses

Introduce two helper functions to safely read and write unsigned long
values from or to memory when the access may fault because the mapping
is non-present or read-only.

These helpers can be used instead of open coded uses of __get_user()
and __put_user() avoiding the need to do casts to fix sparse warnings.

Use the helpers in page.h and p2m.c. This will fix the sparse
warnings when doing "make C=1".

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/include/asm/xen/page.h
arch/x86/xen/p2m.c