[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen: arm: ignore zero sized memory banks



commit 9559d3d04d6be3a298f763dd68bbe7452c1f317d
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Mon Jun 30 16:38:20 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Jul 9 13:34:56 2014 +0100

    xen: arm: ignore zero sized memory banks
    
    At least one platform (xgene) has a memory node which contains 4
    banks, 3 of which are all zeroes.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/common/device_tree.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 310635e..53f779a 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -322,6 +322,8 @@ static void __init process_memory_node(const void *fdt, int 
node,
     for ( i = 0; i < banks && early_info.mem.nr_banks < NR_MEM_BANKS; i++ )
     {
         device_tree_get_reg(&cell, address_cells, size_cells, &start, &size);
+        if ( !size )
+            continue;
         early_info.mem.bank[early_info.mem.nr_banks].start = start;
         early_info.mem.bank[early_info.mem.nr_banks].size = size;
         early_info.mem.nr_banks++;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.