Commit c8d280c2 authored by Subhajit Paul's avatar Subhajit Paul Committed by Anand Balagopalakrishnan

km : use CONFIG_ZONE_DMA for LPAE

CONFIG_ZONE_DMA32 is used for 64-bit CPUs. For 40-bit LPAE
linux configuration should have CONFIG_ZONE_DMA

Change-Id: I6ce3beb25ecf03afec037666faf0552b98e39e26
Signed-off-by: default avatarSubhajit Paul <a0132170@ti.com>
Reviewed-on: https://gerrit.ext.ti.com/gerrit/omap/14237Tested-by: default avatarsubhajit paul <subhajit_paul@ti.com>
Reviewed-by: default avatarAnand Balagopalakrishnan <anandb@ti.com>
Tested-by: default avatarAnand Balagopalakrishnan <anandb@ti.com>
parent 106ddd54
......@@ -437,8 +437,10 @@ VMLINUX_IS_64BIT := $(shell file $(VMLINUX) | grep 64-bit >/dev/null || echo fal
VMLINUX_HAS_PAE36 := $(shell cat $(LINUXCFG) | grep CONFIG_X86_PAE=y >/dev/null || echo false)
VMLINUX_HAS_PAE40 := $(shell cat $(LINUXCFG) | grep CONFIG_ARM_LPAE=y >/dev/null || echo false)
VMLINUX_HAS_DMA32 := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA32=y >/dev/null || echo false)
VMLINUX_HAS_DMA := $(shell cat $(LINUXCFG) | grep CONFIG_ZONE_DMA=y >/dev/null || echo false)
# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU))
# $(error 64BIT=$(VMLINUX_IS_64BIT) PAE36=$(VMLINUX_HAS_PAE36) PAE40=$(VMLINUX_HAS_PAE40) DMA=$(VMLINUX_HAS_DMA) DMA32=$(VMLINUX_HAS_DMA32) MMU36=$(SGX_FEATURE_36BIT_MMU))
ifneq ($(VMLINUX_IS_64BIT),false)
$(warning $$(KERNELDIR)/vmlinux: Note: vmlinux is 64-bit, which is supported but currently experimental.)
......@@ -449,8 +451,8 @@ endif
endif
ifneq ($(VMLINUX_HAS_PAE40),false)
ifeq ($(VMLINUX_HAS_DMA32),false)
$(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA32.)
ifeq ($(VMLINUX_HAS_DMA),false)
$(warning SGX MMUs are currently supported up to only 36 bits max. Your Kernel is built with 40-bit PAE but does not have CONFIG_ZONE_DMA.)
$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
endif
endif
......@@ -465,8 +467,8 @@ endif
else
# Kernel is 32-bit
ifneq ($(VMLINUX_HAS_PAE36),false)
ifeq ($(VMLINUX_HAS_DMA32),false)
$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA32. )
ifeq ($(VMLINUX_HAS_DMA),false)
$(warning SGX is configured with 32-bit MMU. Your Kernel is 32-bit PAE, but does not have CONFIG_ZONE_DMA. )
$(warning This means you must ensure the runtime system has <= 4GB of RAM, or there will be BIG problems...)
endif
endif
......
......@@ -91,7 +91,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Decide whether or not DevMem allocs need __GFP_DMA32 */
#ifndef SGX_FEATURE_36BIT_MMU
# ifdef CONFIG_ZONE_DMA32
# ifdef CONFIG_ZONE_DMA
# if defined CONFIG_X86_PAE || defined CONFIG_ARM_LPAE || defined CONFIG_64BIT
# define PVR_USE_DMA32_FOR_DEVMEM_ALLOCS
# endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment