]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Thu, 20 Jan 2022 19:40:15 +0000 (11:40 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Thu, 20 Jan 2022 19:40:15 +0000 (11:40 -0800)
open-vm-tools/lib/include/vm_basic_defs.h

index 733aa9c46fce84306de2095512794e8062896f32..36764c6b6d3d486e7d342ea445cf3d2abde85ec3 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2003-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2003-2022 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -312,6 +312,10 @@ Max(int a, int b)
 #define BYTES_2_PAGES(_nbytes)  ((_nbytes) >> PAGE_SHIFT)
 #endif
 
+#ifndef BYTES_2_PAGES_4KB
+#define BYTES_2_PAGES_4KB(_nbytes)  ((_nbytes) >> PAGE_SHIFT_4KB)
+#endif
+
 #ifndef PAGES_2_BYTES
 #define PAGES_2_BYTES(_npages)  (((uint64)(_npages)) << PAGE_SHIFT)
 #endif
@@ -338,6 +342,11 @@ Max(int a, int b)
    ((uint64)(_nMbytes) << (MBYTES_SHIFT - PAGE_SHIFT))
 #endif
 
+#ifndef MBYTES_2_PAGES_4KB
+#define MBYTES_2_PAGES_4KB(_nMbytes) \
+   ((uint64)(_nMbytes) << (MBYTES_SHIFT - PAGE_SHIFT_4KB))
+#endif
+
 #ifndef PAGES_2_KBYTES
 #define PAGES_2_KBYTES(_npages) ((_npages) << (PAGE_SHIFT - KBYTES_SHIFT))
 #endif