aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/e820/api.h6
-rw-r--r--arch/x86/kernel/e820.c10
-rw-r--r--arch/x86/pci/mmconfig-shared.c14
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
9extern unsigned long pci_mem_start; 9extern unsigned long pci_mem_start;
10 10
11extern int e820__mapped_any(u64 start, u64 end, enum e820_type type); 11extern bool e820__mapped_any(u64 start, u64 end, enum e820_type type);
12extern int e820__mapped_all(u64 start, u64 end, enum e820_type type); 12extern bool e820__mapped_all(u64 start, u64 end, enum e820_type type);
13 13
14extern void e820__range_add (u64 start, u64 size, enum e820_type type); 14extern void e820__range_add (u64 start, u64 size, enum e820_type type);
15extern u64 e820__range_update(u64 start, u64 size, enum e820_type old_type, enum e820_type new_type); 15extern u64 e820__range_update(u64 start, u64 size, enum e820_type old_type, enum e820_type new_type);
16extern u64 e820__range_remove(u64 start, u64 size, enum e820_type old_type, int checktype); 16extern u64 e820__range_remove(u64 start, u64 size, enum e820_type old_type, bool check_type);
17 17
18extern void e820__print_table(char *who); 18extern void e820__print_table(char *who);
19extern int e820__update_table(struct e820_table *table); 19extern 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 */
71int e820__mapped_any(u64 start, u64 end, enum e820_type type) 71bool 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 */
94int __init e820__mapped_all(u64 start, u64 end, enum e820_type type) 94bool __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: */
495u64 __init e820__range_remove(u64 start, u64 size, enum e820_type old_type, int checktype) 495u64 __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
426static int is_acpi_reserved(u64 start, u64 end, unsigned not_used) 426static 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
443typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); 443typedef bool (*check_reserved_t)(u64 start, u64 end, unsigned type);
444 444
445static int __ref is_mmconf_reserved(check_reserved_t is_reserved, 445static 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
497static int __ref pci_mmcfg_check_reserved(struct device *dev, 497static bool __ref
498 struct pci_mmcfg_region *cfg, int early) 498pci_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))