Commit 3a066990 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ingo Molnar

x86/kaslr: Replace 'unsigned long long' with 'u64'

No functional change.
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-20-nivedita@alum.mit.edu
parent e4cb955b
...@@ -98,7 +98,7 @@ static bool memmap_too_large; ...@@ -98,7 +98,7 @@ static bool memmap_too_large;
* Store memory limit: MAXMEM on 64-bit and KERNEL_IMAGE_SIZE on 32-bit. * Store memory limit: MAXMEM on 64-bit and KERNEL_IMAGE_SIZE on 32-bit.
* It may be reduced by "mem=nn[KMG]" or "memmap=nn[KMG]" command line options. * It may be reduced by "mem=nn[KMG]" or "memmap=nn[KMG]" command line options.
*/ */
static unsigned long long mem_limit; static u64 mem_limit;
/* Number of immovable memory regions */ /* Number of immovable memory regions */
static int num_immovable_mem; static int num_immovable_mem;
...@@ -141,8 +141,7 @@ enum parse_mode { ...@@ -141,8 +141,7 @@ enum parse_mode {
}; };
static int static int
parse_memmap(char *p, unsigned long long *start, unsigned long long *size, parse_memmap(char *p, u64 *start, u64 *size, enum parse_mode mode)
enum parse_mode mode)
{ {
char *oldp; char *oldp;
...@@ -172,7 +171,7 @@ parse_memmap(char *p, unsigned long long *start, unsigned long long *size, ...@@ -172,7 +171,7 @@ parse_memmap(char *p, unsigned long long *start, unsigned long long *size,
*/ */
*size = 0; *size = 0;
} else { } else {
unsigned long long flags; u64 flags;
/* /*
* efi_fake_mem=nn@ss:attr the attr specifies * efi_fake_mem=nn@ss:attr the attr specifies
...@@ -211,7 +210,7 @@ static void mem_avoid_memmap(enum parse_mode mode, char *str) ...@@ -211,7 +210,7 @@ static void mem_avoid_memmap(enum parse_mode mode, char *str)
while (str && (i < MAX_MEMMAP_REGIONS)) { while (str && (i < MAX_MEMMAP_REGIONS)) {
int rc; int rc;
unsigned long long start, size; u64 start, size;
char *k = strchr(str, ','); char *k = strchr(str, ',');
if (k) if (k)
...@@ -612,7 +611,7 @@ static void __process_mem_region(struct mem_vector *entry, ...@@ -612,7 +611,7 @@ static void __process_mem_region(struct mem_vector *entry,
unsigned long region_end; unsigned long region_end;
/* Enforce minimum and memory limit. */ /* Enforce minimum and memory limit. */
region.start = max_t(unsigned long long, entry->start, minimum); region.start = max_t(u64, entry->start, minimum);
region_end = min(entry->start + entry->size, mem_limit); region_end = min(entry->start + entry->size, mem_limit);
/* Give up if slot area array is full. */ /* Give up if slot area array is full. */
...@@ -673,7 +672,7 @@ static bool process_mem_region(struct mem_vector *region, ...@@ -673,7 +672,7 @@ static bool process_mem_region(struct mem_vector *region,
* immovable memory and @region. * immovable memory and @region.
*/ */
for (i = 0; i < num_immovable_mem; i++) { for (i = 0; i < num_immovable_mem; i++) {
unsigned long long start, end, entry_end, region_end; u64 start, end, entry_end, region_end;
struct mem_vector entry; struct mem_vector entry;
if (!mem_overlaps(region, &immovable_mem[i])) if (!mem_overlaps(region, &immovable_mem[i]))
......
...@@ -70,8 +70,8 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize); ...@@ -70,8 +70,8 @@ int cmdline_find_option(const char *option, char *buffer, int bufsize);
int cmdline_find_option_bool(const char *option); int cmdline_find_option_bool(const char *option);
struct mem_vector { struct mem_vector {
unsigned long long start; u64 start;
unsigned long long size; u64 size;
}; };
#if CONFIG_RANDOMIZE_BASE #if CONFIG_RANDOMIZE_BASE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment