diff options
author | Jayachandran C <jchandra@broadcom.com> | 2015-01-07 16:58:33 +0530 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 17:21:52 +0200 |
commit | b3b73ae62ca82744c92c1c2d49381add26d0a8bd (patch) | |
tree | d0549c052e82468cce62a13899fc69011cebb12e /arch/mips/netlogic/xlp/setup.c | |
parent | ddba6833bbc5d0e1ed264ada2c00927c9f7cc11f (diff) | |
download | blackbird-obmc-linux-b3b73ae62ca82744c92c1c2d49381add26d0a8bd.tar.gz blackbird-obmc-linux-b3b73ae62ca82744c92c1c2d49381add26d0a8bd.zip |
MIPS: Netlogic: Update function to read DRAM BARs
Change name of xlp_get_dram_map to nlm_get_dram_map to be consistent
with the rest of the functions in the file. Pass the the size of the
array 'dram_map' to the function, and ensure that it does not write
past the end of the array.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8892/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/xlp/setup.c')
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 27113a17f18d..f743fd9da323 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c @@ -81,7 +81,7 @@ static void __init xlp_init_mem_from_bars(void) uint64_t map[16]; int i, n; - n = xlp_get_dram_map(-1, map); /* -1: info for all nodes */ + n = nlm_get_dram_map(-1, map, ARRAY_SIZE(map)); /* -1 : all nodes */ for (i = 0; i < n; i += 2) { /* exclude 0x1000_0000-0x2000_0000, u-boot device */ if (map[i] <= 0x10000000 && map[i+1] > 0x10000000) |