Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Import iomem_ex locally.
details: https://anonhg.NetBSD.org/src/rev/cb3b943107b8
branches: trunk
changeset: 351342:cb3b943107b8
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Feb 10 09:57:04 2017 +0000
description:
Import iomem_ex locally.
diffstat:
sys/arch/x86/x86/x86_machdep.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diffs (103 lines):
diff -r f3e9321c9540 -r cb3b943107b8 sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Fri Feb 10 08:52:04 2017 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Fri Feb 10 09:57:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.84 2017/02/09 11:56:41 nonaka Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.85 2017/02/10 09:57:04 maxv Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.84 2017/02/09 11:56:41 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.85 2017/02/10 09:57:04 maxv Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -510,9 +510,9 @@
}
static int
-x86_add_cluster(struct extent *iomem_ex, uint64_t seg_start, uint64_t seg_end,
- uint32_t type)
+x86_add_cluster(uint64_t seg_start, uint64_t seg_end, uint32_t type)
{
+ extern struct extent *iomem_ex;
uint64_t new_physmem = 0;
phys_ram_seg_t *cluster;
int i;
@@ -629,7 +629,7 @@
}
static int
-x86_parse_clusters(struct btinfo_common *bi, struct extent *iomem_ex)
+x86_parse_clusters(struct btinfo_common *bi)
{
union {
struct btinfo_common *common;
@@ -720,10 +720,10 @@
"0x%"PRIx64"/0x%"PRIx64"/0x%x\n", seg_start,
seg_end - seg_start, type);
- x86_add_cluster(iomem_ex, seg_start, 0xa0000, type);
- x86_add_cluster(iomem_ex, 0x100000, seg_end, type);
+ x86_add_cluster(seg_start, 0xa0000, type);
+ x86_add_cluster(0x100000, seg_end, type);
} else {
- x86_add_cluster(iomem_ex, seg_start, seg_end, type);
+ x86_add_cluster(seg_start, seg_end, type);
}
}
@@ -731,8 +731,9 @@
}
static int
-x86_fake_clusters(struct extent *iomem_ex)
+x86_fake_clusters(void)
{
+ extern struct extent *iomem_ex;
phys_ram_seg_t *cluster;
KASSERT(mem_cluster_cnt == 0);
@@ -842,7 +843,6 @@
void
init_x86_clusters(void)
{
- extern struct extent *iomem_ex;
struct btinfo_memmap *bim = NULL;
struct btinfo_efimemmap *biem;
@@ -857,18 +857,16 @@
bim = lookup_bootinfo(BTINFO_MEMMAP);
if ((biosmem_implicit || (biosbasemem == 0 && biosextmem == 0)) &&
((bim != NULL && bim->num > 0) || (biem != NULL && biem->num > 0)))
- x86_parse_clusters(biem != NULL ? &biem->common : &bim->common,
- iomem_ex);
+ x86_parse_clusters(biem != NULL ? &biem->common : &bim->common);
#else
#if !defined(REALBASEMEM) && !defined(REALEXTMEM)
biem = lookup_bootinfo(BTINFO_EFIMEMMAP);
if (biem == NULL)
bim = lookup_bootinfo(BTINFO_MEMMAP);
if ((bim != NULL && bim->num > 0) || (biem != NULL && biem->num > 0))
- x86_parse_clusters(biem != NULL ? &biem->common : &bim->common,
- iomem_ex);
+ x86_parse_clusters(biem != NULL ? &biem->common : &bim->common);
#else
- (void)bim, (void)biem, (void)iomem_ex;
+ (void)bim, (void)biem;
#endif
#endif
@@ -877,7 +875,7 @@
* If x86_parse_clusters didn't find any valid segment, create
* fake clusters.
*/
- x86_fake_clusters(iomem_ex);
+ x86_fake_clusters();
}
}
Home |
Main Index |
Thread Index |
Old Index