[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120221010537.GA15898@dhcp-172-17-108-109.mtv.corp.google.com>
Date: Mon, 20 Feb 2012 17:05:37 -0800
From: Tejun Heo <tj@...nel.org>
To: Meelis Roos <mroos@...ux.ee>
Cc: Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
sparclinux@...r.kernel.org,
Linux Kernel list <linux-kernel@...r.kernel.org>,
sam@...nborg.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: OF-related boot crash in 3.3.0-rc3-00188-g3ec1e88
Hello,
Meelis, can you please apply the following patch before & after the
offending commit, boot with "memblock=debug" added as kernel param and
post the boot log? The patch will generate some offset warnings after
the commit but should work fine.
Sam, David, as I'm not familiar with the code base, is it possible to
tell which address is corrupted (zeroed, it seems)? ie. can we add
"if (XXX == NULL) printk("%p is corrputed\n"...);" somewhere?
Thanks.
diff --git a/mm/memblock.c b/mm/memblock.c
index 1adbef0..dccfced 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -179,9 +179,15 @@ int __init_memblock memblock_reserve_reserved_regions(void)
static void __init_memblock memblock_remove_region(struct memblock_type *type, unsigned long r)
{
- type->total_size -= type->regions[r].size;
- memmove(&type->regions[r], &type->regions[r + 1],
- (type->cnt - (r + 1)) * sizeof(type->regions[r]));
+ struct memblock_region *rgn = &type->regions[r];
+
+ memblock_dbg(" memblock %s: rm [%#016llx-%#016llx] node %d\n",
+ memblock_type_name(type),
+ (unsigned long long)rgn->base,
+ (unsigned long long)rgn->base + rgn->size, rgn->nid);
+
+ type->total_size -= rgn->size;
+ memmove(rgn, rgn + 1, (type->cnt - (r + 1)) * sizeof(*rgn));
type->cnt--;
/* Special case for empty arrays */
@@ -317,6 +323,9 @@ static void __init_memblock memblock_insert_region(struct memblock_type *type,
memblock_set_region_node(rgn, nid);
type->cnt++;
type->total_size += size;
+ memblock_dbg(" memblock %s: add [%#016llx-%016llx] node %d @%d\n",
+ memblock_type_name(type), (unsigned long long)base,
+ (unsigned long long)base + size, nid, idx);
}
/**
@@ -342,6 +351,10 @@ static int __init_memblock memblock_add_region(struct memblock_type *type,
phys_addr_t end = base + memblock_cap_size(base, &size);
int i, nr_new;
+ memblock_dbg(" memblock %s: ADD [%#016llx-%#016llx] node %d\n",
+ memblock_type_name(type), (unsigned long long)base,
+ (unsigned long long)base + size, nid);
+
/* special case for empty array */
if (type->regions[0].size == 0) {
WARN_ON(type->cnt != 1 || type->total_size);
@@ -349,6 +362,8 @@ static int __init_memblock memblock_add_region(struct memblock_type *type,
type->regions[0].size = size;
memblock_set_region_node(&type->regions[0], nid);
type->total_size = size;
+ memblock_dbg(" memblock %s: add first entry\n",
+ memblock_type_name(type));
return 0;
}
repeat:
@@ -494,6 +509,10 @@ static int __init_memblock __memblock_remove(struct memblock_type *type,
int start_rgn, end_rgn;
int i, ret;
+ memblock_dbg(" memblock %s: RM [%#016llx-%016llx]\n",
+ memblock_type_name(type), (unsigned long long)base,
+ (unsigned long long)base + size);
+
ret = memblock_isolate_range(type, base, size, &start_rgn, &end_rgn);
if (ret)
return ret;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists