diff options
-rw-r--r-- | arch/x86/include/asm/e820/api.h | 6 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 10 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/arch/x86/include/asm/e820/api.h b/arch/x86/include/asm/e820/api.h index fae7f3e11d9a..78a0feb84c9f 100644 --- a/arch/x86/include/asm/e820/api.h +++ b/arch/x86/include/asm/e820/api.h | |||
@@ -8,12 +8,12 @@ extern struct e820_table *e820_table_firmware; | |||
8 | 8 | ||
9 | extern unsigned long pci_mem_start; | 9 | extern unsigned long pci_mem_start; |
10 | 10 | ||
11 | extern int e820__mapped_any(u64 start, u64 end, enum e820_type type); | 11 | extern bool e820__mapped_any(u64 start, u64 end, enum e820_type type); |
12 | extern int e820__mapped_all(u64 start, u64 end, enum e820_type type); | 12 | extern bool e820__mapped_all(u64 start, u64 end, enum e820_type type); |
13 | 13 | ||
14 | extern void e820__range_add (u64 start, u64 size, enum e820_type type); | 14 | extern void e820__range_add (u64 start, u64 size, enum e820_type type); |
15 | extern u64 e820__range_update(u64 start, u64 size, enum e820_type old_type, enum e820_type new_type); | 15 | extern u64 e820__range_update(u64 start, u64 size, enum e820_type old_type, enum e820_type new_type); |
16 | extern u64 e820__range_remove(u64 start, u64 size, enum e820_type old_type, int checktype); | 16 | extern u64 e820__range_remove(u64 start, u64 size, enum e820_type old_type, bool check_type); |
17 | 17 | ||
18 | extern void e820__print_table(char *who); | 18 | extern void e820__print_table(char *who); |
19 | extern int e820__update_table(struct e820_table *table); | 19 | extern int e820__update_table(struct e820_table *table); |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 114625890337..aa80166a0ec6 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(pci_mem_start); | |||
68 | * This function checks if any part of the range <start,end> is mapped | 68 | * This function checks if any part of the range <start,end> is mapped |
69 | * with type. | 69 | * with type. |
70 | */ | 70 | */ |
71 | int e820__mapped_any(u64 start, u64 end, enum e820_type type) | 71 | bool e820__mapped_any(u64 start, u64 end, enum e820_type type) |
72 | { | 72 | { |
73 | int i; | 73 | int i; |
74 | 74 | ||
@@ -91,7 +91,7 @@ EXPORT_SYMBOL_GPL(e820__mapped_any); | |||
91 | * Note: this function only works correctly once the E820 table is sorted and | 91 | * Note: this function only works correctly once the E820 table is sorted and |
92 | * not-overlapping (at least for the range specified), which is the case normally. | 92 | * not-overlapping (at least for the range specified), which is the case normally. |
93 | */ | 93 | */ |
94 | int __init e820__mapped_all(u64 start, u64 end, enum e820_type type) | 94 | bool __init e820__mapped_all(u64 start, u64 end, enum e820_type type) |
95 | { | 95 | { |
96 | int i; | 96 | int i; |
97 | 97 | ||
@@ -492,7 +492,7 @@ static u64 __init e820__range_update_firmware(u64 start, u64 size, enum e820_typ | |||
492 | } | 492 | } |
493 | 493 | ||
494 | /* Remove a range of memory from the E820 table: */ | 494 | /* Remove a range of memory from the E820 table: */ |
495 | u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, int checktype) | 495 | u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, bool check_type) |
496 | { | 496 | { |
497 | int i; | 497 | int i; |
498 | u64 end; | 498 | u64 end; |
@@ -503,7 +503,7 @@ u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, int | |||
503 | 503 | ||
504 | end = start + size; | 504 | end = start + size; |
505 | pr_debug("e820: remove [mem %#010Lx-%#010Lx] ", start, end - 1); | 505 | pr_debug("e820: remove [mem %#010Lx-%#010Lx] ", start, end - 1); |
506 | if (checktype) | 506 | if (check_type) |
507 | e820_print_type(old_type); | 507 | e820_print_type(old_type); |
508 | pr_cont("\n"); | 508 | pr_cont("\n"); |
509 | 509 | ||
@@ -512,7 +512,7 @@ u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, int | |||
512 | u64 final_start, final_end; | 512 | u64 final_start, final_end; |
513 | u64 entry_end; | 513 | u64 entry_end; |
514 | 514 | ||
515 | if (checktype && entry->type != old_type) | 515 | if (check_type && entry->type != old_type) |
516 | continue; | 516 | continue; |
517 | 517 | ||
518 | entry_end = entry->addr + entry->size; | 518 | entry_end = entry->addr + entry->size; |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 96057e4b6121..d1b47d5bc9c3 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -423,7 +423,7 @@ static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl, | |||
423 | return AE_OK; | 423 | return AE_OK; |
424 | } | 424 | } |
425 | 425 | ||
426 | static int is_acpi_reserved(u64 start, u64 end, unsigned not_used) | 426 | static bool is_acpi_reserved(u64 start, u64 end, unsigned not_used) |
427 | { | 427 | { |
428 | struct resource mcfg_res; | 428 | struct resource mcfg_res; |
429 | 429 | ||
@@ -440,11 +440,11 @@ static int is_acpi_reserved(u64 start, u64 end, unsigned not_used) | |||
440 | return mcfg_res.flags; | 440 | return mcfg_res.flags; |
441 | } | 441 | } |
442 | 442 | ||
443 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); | 443 | typedef bool (*check_reserved_t)(u64 start, u64 end, unsigned type); |
444 | 444 | ||
445 | static int __ref is_mmconf_reserved(check_reserved_t is_reserved, | 445 | static bool __ref is_mmconf_reserved(check_reserved_t is_reserved, |
446 | struct pci_mmcfg_region *cfg, | 446 | struct pci_mmcfg_region *cfg, |
447 | struct device *dev, int with_e820) | 447 | struct device *dev, int with_e820) |
448 | { | 448 | { |
449 | u64 addr = cfg->res.start; | 449 | u64 addr = cfg->res.start; |
450 | u64 size = resource_size(&cfg->res); | 450 | u64 size = resource_size(&cfg->res); |
@@ -494,8 +494,8 @@ static int __ref is_mmconf_reserved(check_reserved_t is_reserved, | |||
494 | return 1; | 494 | return 1; |
495 | } | 495 | } |
496 | 496 | ||
497 | static int __ref pci_mmcfg_check_reserved(struct device *dev, | 497 | static bool __ref |
498 | struct pci_mmcfg_region *cfg, int early) | 498 | pci_mmcfg_check_reserved(struct device *dev, struct pci_mmcfg_region *cfg, int early) |
499 | { | 499 | { |
500 | if (!early && !acpi_disabled) { | 500 | if (!early && !acpi_disabled) { |
501 | if (is_mmconf_reserved(is_acpi_reserved, cfg, dev, 0)) | 501 | if (is_mmconf_reserved(is_acpi_reserved, cfg, dev, 0)) |