| To: | ralf@linux-mips.org, john@phrozen.org |
|---|---|
| Subject: | [PATCH 1/5] MIPS: BCM47XX: ignore last memory page |
| From: | Hauke Mehrtens <hauke@hauke-m.de> |
| Date: | Sat, 29 Sep 2012 20:12:02 +0200 |
| Cc: | linux-mips@linux-mips.org, Hauke Mehrtens <hauke@hauke-m.de> |
| In-reply-to: | <1348942326-27195-1-git-send-email-hauke@hauke-m.de> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| References: | <1348942326-27195-1-git-send-email-hauke@hauke-m.de> |
| Sender: | linux-mips-bounce@linux-mips.org |
Ignoring the last page when ddr size is 128M. Cached accesses to last
page is causing the processor to prefetch using address above 128M
stepping out of the ddr address space.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/prom.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index f6e9063..22258a4 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -27,6 +27,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
+#include <linux/smp.h>
#include <asm/bootinfo.h>
#include <asm/fw/cfe/cfe_api.h>
#include <asm/fw/cfe/cfe_error.h>
@@ -127,6 +128,7 @@ static __init void prom_init_mem(void)
{
unsigned long mem;
unsigned long max;
+ struct cpuinfo_mips *c = ¤t_cpu_data;
/* Figure out memory size by finding aliases.
*
@@ -155,6 +157,14 @@ static __init void prom_init_mem(void)
break;
}
+ /* Ignoring the last page when ddr size is 128M. Cached
+ * accesses to last page is causing the processor to prefetch
+ * using address above 128M stepping out of the ddr address
+ * space.
+ */
+ if (c->cputype == CPU_74K && (mem == (128 << 20)))
+ mem -= 0x1000;
+
add_memory_region(0, mem, BOOT_MEM_RAM);
}
--
1.7.9.5
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/5] MIPS: BCM47XX: improve memory size detection, Hauke Mehrtens |
|---|---|
| Next by Date: | [PATCH 3/5] MIPS: BCM47xx: read out full board data, Hauke Mehrtens |
| Previous by Thread: | [PATCH 2/5] MIPS: BCM47XX: improve memory size detection, Hauke Mehrtens |
| Next by Thread: | [PATCH 3/5] MIPS: BCM47xx: read out full board data, Hauke Mehrtens |
| Indexes: | [Date] [Thread] [Top] [All Lists] |