summaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson/Kconfig
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2014-11-04 07:13:24 +0100
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 07:45:01 +0100
commitf490682a6b21ffed5acd7a0d49d8371e5e625d7a (patch)
tree23fec41907ba1f5fb8cac1a5d2e0f18af6ee8fa7 /arch/mips/loongson/Kconfig
parentMIPS: R3000: Remove redundant parentheses (diff)
downloadlinux-f490682a6b21ffed5acd7a0d49d8371e5e625d7a.tar.xz
linux-f490682a6b21ffed5acd7a0d49d8371e5e625d7a.zip
MIPS: Loongson-3: Add PHYS48_TO_HT40 support
The width of HT-bus is only 40-bit, but Loongson-3 has 48-bit physical address. This implies only node-0's memory is DMAable because high bits (Node ID) will lost. Fortunately, by configuring address windows in firmware, we can extract 2bit Node ID (bit 44~47, only bit 44~45 used now) from Loongson-3's 48-bit address space and embed it into 40-bit (bit 37~38). Every NUMA node can do DMA now (however, maximum memory of each node is reduced to 2^37 = 128GB). Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/8321/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/loongson/Kconfig')
-rw-r--r--arch/mips/loongson/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index 1b91fc6a921b..72f830ac0782 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -86,6 +86,7 @@ config LOONGSON_MACH3X
select LOONGSON_MC146818
select ZONE_DMA32
select LEFI_FIRMWARE_INTERFACE
+ select PHYS48_TO_HT40
help
Generic Loongson 3 family machines utilize the 3A/3B revision
of Loongson processor and RS780/SBX00 chipset.
@@ -131,6 +132,10 @@ config SWIOTLB
select NEED_SG_DMA_LENGTH
select NEED_DMA_MAP_STATE
+config PHYS48_TO_HT40
+ bool
+ default y if CPU_LOONGSON3
+
config LOONGSON_MC146818
bool
default n