diff options
| -rw-r--r-- | arch/x86/include/asm/hyperv-tlfs.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/uaccess.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index 705dafc2d11a..2bdbbbcfa393 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h | |||
| @@ -841,7 +841,7 @@ union hv_gpa_page_range { | |||
| 841 | * count is equal with how many entries of union hv_gpa_page_range can | 841 | * count is equal with how many entries of union hv_gpa_page_range can |
| 842 | * be populated into the input parameter page. | 842 | * be populated into the input parameter page. |
| 843 | */ | 843 | */ |
| 844 | #define HV_MAX_FLUSH_REP_COUNT (PAGE_SIZE - 2 * sizeof(u64) / \ | 844 | #define HV_MAX_FLUSH_REP_COUNT ((PAGE_SIZE - 2 * sizeof(u64)) / \ |
| 845 | sizeof(union hv_gpa_page_range)) | 845 | sizeof(union hv_gpa_page_range)) |
| 846 | 846 | ||
| 847 | struct hv_guest_mapping_flush_list { | 847 | struct hv_guest_mapping_flush_list { |
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index 780f2b42c8ef..c1334aaaa78d 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h | |||
| @@ -284,7 +284,7 @@ do { \ | |||
| 284 | __put_user_goto(x, ptr, "l", "k", "ir", label); \ | 284 | __put_user_goto(x, ptr, "l", "k", "ir", label); \ |
| 285 | break; \ | 285 | break; \ |
| 286 | case 8: \ | 286 | case 8: \ |
| 287 | __put_user_goto_u64((__typeof__(*ptr))(x), ptr, label); \ | 287 | __put_user_goto_u64(x, ptr, label); \ |
| 288 | break; \ | 288 | break; \ |
| 289 | default: \ | 289 | default: \ |
| 290 | __put_user_bad(); \ | 290 | __put_user_bad(); \ |
| @@ -431,8 +431,10 @@ do { \ | |||
| 431 | ({ \ | 431 | ({ \ |
| 432 | __label__ __pu_label; \ | 432 | __label__ __pu_label; \ |
| 433 | int __pu_err = -EFAULT; \ | 433 | int __pu_err = -EFAULT; \ |
| 434 | __typeof__(*(ptr)) __pu_val; \ | ||
| 435 | __pu_val = x; \ | ||
| 434 | __uaccess_begin(); \ | 436 | __uaccess_begin(); \ |
| 435 | __put_user_size((x), (ptr), (size), __pu_label); \ | 437 | __put_user_size(__pu_val, (ptr), (size), __pu_label); \ |
| 436 | __pu_err = 0; \ | 438 | __pu_err = 0; \ |
| 437 | __pu_label: \ | 439 | __pu_label: \ |
| 438 | __uaccess_end(); \ | 440 | __uaccess_end(); \ |
