summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/mpc8536_ds.c
diff options
context:
space:
mode:
authorBharat Bhushan2012-06-05 05:55:04 +0200
committerBenjamin Herrenschmidt2012-07-03 06:14:49 +0200
commita5cb82da786f610f7e84a0a8bcf9e0218c363040 (patch)
tree3c5f1d32541fc6e438c9ee3932eaa1119f58fa9d /arch/powerpc/platforms/85xx/mpc8536_ds.c
parentpowerpc: Optimise the 64bit optimised __clear_user (diff)
downloadkernel-qcow2-linux-a5cb82da786f610f7e84a0a8bcf9e0218c363040.tar.gz
kernel-qcow2-linux-a5cb82da786f610f7e84a0a8bcf9e0218c363040.tar.xz
kernel-qcow2-linux-a5cb82da786f610f7e84a0a8bcf9e0218c363040.zip
powerpc: Fix assmption of end_of_DRAM() returns end address
memblock_end_of_DRAM() returns end_address + 1, not end address. While some code assumes that it returns end address. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc8536_ds.c')
-rw-r--r--arch/powerpc/platforms/85xx/mpc8536_ds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 585bd22b1406..767c7cf18a9c 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -75,7 +75,7 @@ static void __init mpc8536_ds_setup_arch(void)
#endif
#ifdef CONFIG_SWIOTLB
- if (memblock_end_of_DRAM() > max) {
+ if ((memblock_end_of_DRAM() - 1) > max) {
ppc_swiotlb_enable = 1;
set_pci_dma_ops(&swiotlb_dma_ops);
ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;