forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/misc/vmw_vmci/vmci_doorbell.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * VMware VMCI Driver
34 *
45 * Copyright (C) 2012 VMware, Inc. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the
8
- * Free Software Foundation version 2 and no later version.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
- * for more details.
146 */
157
168 #include <linux/vmw_vmci_defs.h>
....@@ -331,7 +323,7 @@
331323 /*
332324 * Register the notification bitmap with the host.
333325 */
334
-bool vmci_dbell_register_notification_bitmap(u32 bitmap_ppn)
326
+bool vmci_dbell_register_notification_bitmap(u64 bitmap_ppn)
335327 {
336328 int result;
337329 struct vmci_notify_bm_set_msg bitmap_set_msg = { };
....@@ -341,11 +333,14 @@
341333 bitmap_set_msg.hdr.src = VMCI_ANON_SRC_HANDLE;
342334 bitmap_set_msg.hdr.payload_size = sizeof(bitmap_set_msg) -
343335 VMCI_DG_HEADERSIZE;
344
- bitmap_set_msg.bitmap_ppn = bitmap_ppn;
336
+ if (vmci_use_ppn64())
337
+ bitmap_set_msg.bitmap_ppn64 = bitmap_ppn;
338
+ else
339
+ bitmap_set_msg.bitmap_ppn32 = (u32) bitmap_ppn;
345340
346341 result = vmci_send_datagram(&bitmap_set_msg.hdr);
347342 if (result != VMCI_SUCCESS) {
348
- pr_devel("Failed to register (PPN=%u) as notification bitmap (error=%d)\n",
343
+ pr_devel("Failed to register (PPN=%llu) as notification bitmap (error=%d)\n",
349344 bitmap_ppn, result);
350345 return false;
351346 }