diff options
author | xypron.glpk@gmx.de <xypron.glpk@gmx.de> | 2017-08-11 21:19:37 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-08-12 14:05:45 +0200 |
commit | aee4f06dff36261433d90c94a5def2c90be8407c (patch) | |
tree | 934bcb7fd71cf9cf30a5d6195be4c1bc6d9e7c3f /lib | |
parent | 3d9880784ed5cd503b0d69128ea1841102ff522e (diff) |
efi_loader: use EFI_PAGE_MASK instead of EFI_PAGE_SIZE - 1
We should be consistent in the way we calculate page sizes.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_runtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index dd52755d1d7..ad7f3754bd0 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -325,7 +325,7 @@ void efi_add_runtime_mmio(void *mmio_ptr, u64 len) { struct efi_runtime_mmio_list *newmmio; - u64 pages = (len + EFI_PAGE_SIZE - 1) >> EFI_PAGE_SHIFT; + u64 pages = (len + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT; efi_add_memory_map(*(uintptr_t *)mmio_ptr, pages, EFI_MMAP_IO, false); newmmio = calloc(1, sizeof(*newmmio)); |