From: John Wolfe Date: Thu, 20 Jan 2022 19:40:15 +0000 (-0800) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-12.1.0~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=750eed3fc4dc6d0265bc3e28b845e76ca3acf944;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index 733aa9c46..36764c6b6 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -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