aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShow Liu <show.liu@linaro.org>2014-05-20 15:54:37 +0800
committerShow Liu <show.liu@linaro.org>2014-05-20 15:54:37 +0800
commit23a0ab2467a1b0698fa7048e50c1bcf0cf9ffc61 (patch)
tree3944c64f8f3097fe8aa97e39f10810c9324fa02d
parentd6ff5c03dd412b87f7728ea66556eb4b99253c01 (diff)
upgrade ump driver
-rwxr-xr-xdrivers/base/ump/Kbuild1
-rwxr-xr-xdrivers/base/ump/Kconfig1
-rwxr-xr-xdrivers/base/ump/docs/Doxyfile3
-rwxr-xr-xdrivers/base/ump/docs/sconscript3
-rwxr-xr-xdrivers/base/ump/example_kernel_api.c4
-rwxr-xr-xdrivers/base/ump/example_user_api.c4
-rwxr-xr-xdrivers/base/ump/sconscript3
-rwxr-xr-xdrivers/base/ump/src/Kbuild1
-rwxr-xr-xdrivers/base/ump/src/Makefile13
-rwxr-xr-xdrivers/base/ump/src/Makefile.common3
-rwxr-xr-xdrivers/base/ump/src/arch-arm/config.h4
-rwxr-xr-xdrivers/base/ump/src/arch-arm64/config.h27
-rwxr-xr-xdrivers/base/ump/src/common/ump_kernel_core.c4
-rwxr-xr-xdrivers/base/ump/src/common/ump_kernel_core.h4
-rwxr-xr-xdrivers/base/ump/src/common/ump_kernel_descriptor_mapping.c4
-rwxr-xr-xdrivers/base/ump/src/common/ump_kernel_descriptor_mapping.h4
-rwxr-xr-xdrivers/base/ump/src/common/ump_kernel_priv.h11
-rwxr-xr-xdrivers/base/ump/src/imports/ion/Makefile3
-rwxr-xr-xdrivers/base/ump/src/imports/ion/sconscript11
-rwxr-xr-xdrivers/base/ump/src/imports/ion/ump_kernel_import_ion.c4
-rwxr-xr-xdrivers/base/ump/src/imports/sconscript3
-rwxr-xr-xdrivers/base/ump/src/linux/ump_kernel_linux.c13
-rwxr-xr-xdrivers/base/ump/src/linux/ump_kernel_linux_mem.c4
-rwxr-xr-xdrivers/base/ump/src/linux/ump_kernel_linux_mem.h4
-rwxr-xr-xdrivers/base/ump/src/sconscript35
-rwxr-xr-xdrivers/base/ump/src/ump_arch.h4
-rwxr-xr-xdrivers/base/ump/ump_ref_drv.h4
-rwxr-xr-xinclude/linux/ump-common.h4
-rwxr-xr-xinclude/linux/ump-import.h4
-rwxr-xr-xinclude/linux/ump-ioctl.h4
-rwxr-xr-xinclude/linux/ump.h4
31 files changed, 131 insertions, 64 deletions
diff --git a/drivers/base/ump/Kbuild b/drivers/base/ump/Kbuild
index 738aed36ed4..2bbdba27d76 100755
--- a/drivers/base/ump/Kbuild
+++ b/drivers/base/ump/Kbuild
@@ -13,5 +13,6 @@
#
+
obj-y += src/
diff --git a/drivers/base/ump/Kconfig b/drivers/base/ump/Kconfig
index 2e49a38a616..f7451e67a5e 100755
--- a/drivers/base/ump/Kconfig
+++ b/drivers/base/ump/Kconfig
@@ -13,6 +13,7 @@
#
+
config UMP
tristate "Enable Unified Memory Provider (UMP) support"
default n
diff --git a/drivers/base/ump/docs/Doxyfile b/drivers/base/ump/docs/Doxyfile
index c4a6d1d6a5d..fbec8eb40a0 100755
--- a/drivers/base/ump/docs/Doxyfile
+++ b/drivers/base/ump/docs/Doxyfile
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2011-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2011-2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
##############################################################################
# This file contains per-module Doxygen configuration. Please do not add
diff --git a/drivers/base/ump/docs/sconscript b/drivers/base/ump/docs/sconscript
index 73a25a1964d..521278d138b 100755
--- a/drivers/base/ump/docs/sconscript
+++ b/drivers/base/ump/docs/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2010-2011 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2010-2011, 2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
Import('env')
doxygen_sources = [
diff --git a/drivers/base/ump/example_kernel_api.c b/drivers/base/ump/example_kernel_api.c
index 41f5214e210..eb9b12930f8 100755
--- a/drivers/base/ump/example_kernel_api.c
+++ b/drivers/base/ump/example_kernel_api.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2010-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#include <linux/ump.h>
#include <stdio.h>
diff --git a/drivers/base/ump/example_user_api.c b/drivers/base/ump/example_user_api.c
index e3d55f65294..5ae4650fc4e 100755
--- a/drivers/base/ump/example_user_api.c
+++ b/drivers/base/ump/example_user_api.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2010-2011 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#include <ump/ump.h>
#include <memory.h>
#include <stdio.h>
diff --git a/drivers/base/ump/sconscript b/drivers/base/ump/sconscript
index c27950f9d86..b4aa8b6853a 100755
--- a/drivers/base/ump/sconscript
+++ b/drivers/base/ump/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2010-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2010-2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -12,6 +12,7 @@
#
#
+
Import('env')
if Glob('src/sconscript') and int(env['ump']) == 1:
diff --git a/drivers/base/ump/src/Kbuild b/drivers/base/ump/src/Kbuild
index 6184be86df6..26f08d39b0e 100755
--- a/drivers/base/ump/src/Kbuild
+++ b/drivers/base/ump/src/Kbuild
@@ -13,6 +13,7 @@
#
+
# Paths required for build
UMP_PATH = $(src)/../..
UMP_DEVICEDRV_PATH = $(src)/.
diff --git a/drivers/base/ump/src/Makefile b/drivers/base/ump/src/Makefile
index 3bc0db926bc..45428adbdf7 100755
--- a/drivers/base/ump/src/Makefile
+++ b/drivers/base/ump/src/Makefile
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2008-2014 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
ifneq ($(KBUILD_EXTMOD),)
include $(KBUILD_EXTMOD)/Makefile.common
else
@@ -38,13 +39,7 @@ endif
# Define host system directory
KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build
-ifeq ($(ARCH), arm)
- # Compiling for ARM
- CONFIG ?= arm
-else
- # Compiling for the host
- CONFIG ?= $(shell uname -m)
-endif
+CONFIG ?= $(ARCH)
# default cpu to select
CPU ?= $(shell uname -m)
@@ -70,7 +65,7 @@ endif
EXTRA_SYMBOLS=
ifeq ($(MALI_UNIT_TEST),1)
- KBASE_PATH=$(ROOT)/kernel/drivers/gpu/arm/t6xx/kbase
+ KBASE_PATH=$(ROOT)/kernel/drivers/gpu/arm/midgard
EXTRA_SYMBOLS+=$(KBASE_PATH)/tests/internal/src/kernel_assert_module/linux/Module.symvers
endif
KDS_PATH=$(ROOT)/kernel/drivers/base/kds
diff --git a/drivers/base/ump/src/Makefile.common b/drivers/base/ump/src/Makefile.common
index 8240a0f36aa..f29a4c1cffa 100755
--- a/drivers/base/ump/src/Makefile.common
+++ b/drivers/base/ump/src/Makefile.common
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2008-2010 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2008-2010, 2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
SRC = $(UMP_FILE_PREFIX)/common/ump_kernel_core.c \
$(UMP_FILE_PREFIX)/common/ump_kernel_descriptor_mapping.c
diff --git a/drivers/base/ump/src/arch-arm/config.h b/drivers/base/ump/src/arch-arm/config.h
index 13cf5738084..afb44d6cb74 100755
--- a/drivers/base/ump/src/arch-arm/config.h
+++ b/drivers/base/ump/src/arch-arm/config.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2009 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef __ARCH_CONFIG_H__
#define __ARCH_CONFIG_H__
diff --git a/drivers/base/ump/src/arch-arm64/config.h b/drivers/base/ump/src/arch-arm64/config.h
new file mode 100755
index 00000000000..afb44d6cb74
--- /dev/null
+++ b/drivers/base/ump/src/arch-arm64/config.h
@@ -0,0 +1,27 @@
+/*
+ *
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation, and any use by you of this program is subject to the terms
+ * of such GNU licence.
+ *
+ * A copy of the licence is included with the program, and can also be obtained
+ * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+
+
+
+#ifndef __ARCH_CONFIG_H__
+#define __ARCH_CONFIG_H__
+
+#define ARCH_UMP_BACKEND_DEFAULT 1
+#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0x00000000
+#define ARCH_UMP_MEMORY_SIZE_DEFAULT 32UL * 1024UL * 1024UL
+
+#endif /* __ARCH_CONFIG_H__ */
diff --git a/drivers/base/ump/src/common/ump_kernel_core.c b/drivers/base/ump/src/common/ump_kernel_core.c
index 9d65a1989b4..95bb2ddb0bd 100755
--- a/drivers/base/ump/src/common/ump_kernel_core.c
+++ b/drivers/base/ump/src/common/ump_kernel_core.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2013 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
/* module headers */
#include <linux/ump.h>
#include <linux/ump-ioctl.h>
diff --git a/drivers/base/ump/src/common/ump_kernel_core.h b/drivers/base/ump/src/common/ump_kernel_core.h
index ea41d5ba7d8..2329c45f0eb 100755
--- a/drivers/base/ump/src/common/ump_kernel_core.h
+++ b/drivers/base/ump/src/common/ump_kernel_core.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef _UMP_KERNEL_CORE_H_
#define _UMP_KERNEL_CORE_H_
diff --git a/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.c b/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.c
index 148ef1246c5..c25f21af790 100755
--- a/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.c
+++ b/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -16,6 +16,8 @@
+
+
#include <common/ump_kernel_descriptor_mapping.h>
#include <common/ump_kernel_priv.h>
diff --git a/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.h b/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.h
index 49a7b91f08f..3260d52c594 100755
--- a/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.h
+++ b/drivers/base/ump/src/common/ump_kernel_descriptor_mapping.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
/**
* @file ump_kernel_descriptor_mapping.h
*/
diff --git a/drivers/base/ump/src/common/ump_kernel_priv.h b/drivers/base/ump/src/common/ump_kernel_priv.h
index d44d029fd41..bb9d8f125fe 100755
--- a/drivers/base/ump/src/common/ump_kernel_priv.h
+++ b/drivers/base/ump/src/common/ump_kernel_priv.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2013 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,10 +15,13 @@
+
+
#ifndef _UMP_KERNEL_PRIV_H_
#define _UMP_KERNEL_PRIV_H_
#ifdef __KERNEL__
+#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <asm/cacheflush.h>
@@ -41,6 +44,9 @@ static inline void ump_sync_to_memory(uint64_t paddr, void* vaddr, size_t sz)
#ifdef CONFIG_ARM
__cpuc_flush_dcache_area(vaddr, sz);
outer_flush_range(paddr, paddr+sz);
+#elif defined(CONFIG_ARM64)
+ /*TODO (MID64-46): There's no other suitable cache flush function for ARM64 */
+ flush_cache_all();
#elif defined(CONFIG_X86)
struct scatterlist scl = {0, };
sg_set_page(&scl, pfn_to_page(PFN_DOWN(paddr)), sz,
@@ -57,6 +63,9 @@ static inline void ump_sync_to_cpu(uint64_t paddr, void* vaddr, size_t sz)
#ifdef CONFIG_ARM
__cpuc_flush_dcache_area(vaddr, sz);
outer_flush_range(paddr, paddr+sz);
+#elif defined(CONFIG_ARM64)
+ /* TODO (MID64-46): There's no other suitable cache flush function for ARM64 */
+ flush_cache_all();
#elif defined(CONFIG_X86)
struct scatterlist scl = {0, };
sg_set_page(&scl, pfn_to_page(PFN_DOWN(paddr)), sz,
diff --git a/drivers/base/ump/src/imports/ion/Makefile b/drivers/base/ump/src/imports/ion/Makefile
index 2095fcca117..ef74b273f7a 100755
--- a/drivers/base/ump/src/imports/ion/Makefile
+++ b/drivers/base/ump/src/imports/ion/Makefile
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2011 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2011, 2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -14,6 +14,7 @@
+
# default to building for the host
ARCH ?= $(shell uname -m)
diff --git a/drivers/base/ump/src/imports/ion/sconscript b/drivers/base/ump/src/imports/ion/sconscript
index dde149076a2..749bb1f541f 100755
--- a/drivers/base/ump/src/imports/ion/sconscript
+++ b/drivers/base/ump/src/imports/ion/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2010-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2010-2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
import os
Import('env')
@@ -32,13 +33,7 @@ ion_src = [Glob('#kernel/drivers/base/ump/src/imports/ion/*.c')]
if env_ion.GetOption('clean') :
makeAction=Action("cd ${SOURCE.dir} && make clean", '$MAKECOMSTR')
else:
- if env['arch'] == 'x86_32' :
- env_ion['arch_linux'] = 'x86'
- elif 'arm' in env['arch']:
- env_ion['arch_linux'] = 'arm'
- else:
- env_ion['arch_linux'] = env['arch']
- makeAction=Action("cd ${SOURCE.dir} && make ARCH=$arch_linux PLATFORM=${platform} && cp ump_ion_import.ko $STATIC_LIB_PATH/ump_ion_import.ko", '$MAKECOMSTR')
+ makeAction=Action("cd ${SOURCE.dir} && make PLATFORM=${platform} && cp ump_ion_import.ko $STATIC_LIB_PATH/ump_ion_import.ko", '$MAKECOMSTR')
# The target is ump_import_ion.ko, built from the source in ion_src, via the action makeAction
# ump_import_ion.ko will be copied to $STATIC_LIB_PATH after being built by the standard Linux
# kernel build system, after which it can be installed to the directory specified if
diff --git a/drivers/base/ump/src/imports/ion/ump_kernel_import_ion.c b/drivers/base/ump/src/imports/ion/ump_kernel_import_ion.c
index 9353e6aa987..a3986797d98 100755
--- a/drivers/base/ump/src/imports/ion/ump_kernel_import_ion.c
+++ b/drivers/base/ump/src/imports/ion/ump_kernel_import_ion.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2011-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#include <linux/ump.h>
#include <linux/dma-mapping.h>
#include <linux/ion.h>
diff --git a/drivers/base/ump/src/imports/sconscript b/drivers/base/ump/src/imports/sconscript
index a42c2f36e3a..8f506839d1d 100755
--- a/drivers/base/ump/src/imports/sconscript
+++ b/drivers/base/ump/src/imports/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2011-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2011-2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
import os, sys
Import('env')
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux.c b/drivers/base/ump/src/linux/ump_kernel_linux.c
index 29e7812a7ac..ed8ff31d504 100755
--- a/drivers/base/ump/src/linux/ump_kernel_linux.c
+++ b/drivers/base/ump/src/linux/ump_kernel_linux.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2013 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,10 +15,13 @@
+
+
#include <linux/ump-ioctl.h>
#include <linux/ump.h>
#include <asm/uaccess.h> /* copy_*_user */
+#include <linux/compat.h>
#include <linux/module.h> /* kernel module definitions */
#include <linux/fs.h> /* file system operations */
#include <linux/cdev.h> /* character device definitions */
@@ -438,10 +441,10 @@ static int do_ump_dd_msync_now(umpp_session * session, ump_k_msync * params)
if (it->id == params->secure_id)
{
/* found, do the cache op */
-#if defined CONFIG_64BIT && CONFIG_64BIT
+#ifdef CONFIG_64BIT
if (is_compat_task())
{
- umpp_dd_cpu_msync_now(it->mem, params->cache_operation, params->mapped_ptr.compat_value, params->size);
+ umpp_dd_cpu_msync_now(it->mem, params->cache_operation, compat_ptr(params->mapped_ptr.compat_value), params->size);
result = 0;
}
else
@@ -449,7 +452,7 @@ static int do_ump_dd_msync_now(umpp_session * session, ump_k_msync * params)
#endif
umpp_dd_cpu_msync_now(it->mem, params->cache_operation, params->mapped_ptr.value, params->size);
result = 0;
-#if defined CONFIG_64BIT && CONFIG_64BIT
+#ifdef CONFIG_64BIT
}
#endif
break;
@@ -532,7 +535,7 @@ void ump_import_module_unregister(enum ump_external_memory_type type)
mutex_unlock(&import_list_lock);
}
-static struct ump_import_handler * import_handler_get(int type_id)
+static struct ump_import_handler * import_handler_get(unsigned int type_id)
{
enum ump_external_memory_type type;
struct ump_import_handler * handler;
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
index e3de61f3d45..e575c9573c9 100755
--- a/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
+++ b/drivers/base/ump/src/linux/ump_kernel_linux_mem.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2013 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#include <linux/ump.h>
#include <linux/ump-ioctl.h>
diff --git a/drivers/base/ump/src/linux/ump_kernel_linux_mem.h b/drivers/base/ump/src/linux/ump_kernel_linux_mem.h
index 9b28cffff1d..40dcd30bd3b 100755
--- a/drivers/base/ump/src/linux/ump_kernel_linux_mem.h
+++ b/drivers/base/ump/src/linux/ump_kernel_linux_mem.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2011 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef _UMP_KERNEL_LINUX_MEM_H_
#define _UMP_KERNEL_LINUX_MEM_H_
diff --git a/drivers/base/ump/src/sconscript b/drivers/base/ump/src/sconscript
index b493738ce63..edc88be370c 100755
--- a/drivers/base/ump/src/sconscript
+++ b/drivers/base/ump/src/sconscript
@@ -1,5 +1,5 @@
#
-# (C) COPYRIGHT 2010-2012 ARM Limited. All rights reserved.
+# (C) COPYRIGHT 2010-2013 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
@@ -13,6 +13,7 @@
#
+
import os
import re
Import('env')
@@ -32,16 +33,10 @@ env_ump.Append( CPPPATH='#kernel/drivers/base/ump/src/' )
if env_ump.GetOption('clean') :
makeAction=Action("cd ${SOURCE.dir}/.. && make clean", '$MAKECOMSTR')
else:
- if env['arch'] == 'x86_32' :
- env_ump['arch_linux'] = 'x86'
- elif 'arm' in env['arch']:
- env_ump['arch_linux'] = 'arm'
- else:
- env_ump['arch_linux'] = env['arch']
if env['unit'] == '1':
- makeAction=Action("cd ${SOURCE.dir}/.. && make ARCH=$arch_linux MALI_UNIT_TEST=${unit} PLATFORM=${platform} %s && cp ump.ko $STATIC_LIB_PATH/ump.ko" % env.kernel_get_config_defines(), '$MAKECOMSTR')
+ makeAction=Action("cd ${SOURCE.dir}/.. && make MALI_UNIT_TEST=${unit} PLATFORM=${platform} %s && cp ump.ko $STATIC_LIB_PATH/ump.ko" % env.kernel_get_config_defines(), '$MAKECOMSTR')
else:
- makeAction=Action("cd ${SOURCE.dir}/.. && make ARCH=$arch_linux PLATFORM=${platform} %s && cp ump.ko $STATIC_LIB_PATH/ump.ko" % env.kernel_get_config_defines(), '$MAKECOMSTR')
+ makeAction=Action("cd ${SOURCE.dir}/.. && make PLATFORM=${platform} %s && cp ump.ko $STATIC_LIB_PATH/ump.ko" % env.kernel_get_config_defines(), '$MAKECOMSTR')
# The target is ump.ko, built from the source in ump_src, via the action makeAction
# ump.ko will be copied to $STATIC_LIB_PATH after being built by the standard Linux
# kernel build system, after which it can be installed to the directory specified if
@@ -51,18 +46,20 @@ cmd = env_ump.Command('$STATIC_LIB_PATH/ump.ko', ump_src, [makeAction])
if env['unit'] == '1':
env.Depends('$STATIC_LIB_PATH/ump.ko', '$STATIC_LIB_PATH/libosk.a')
-# Add a dependency on kds.ko.
+# Add a dependency on kds.ko only when the build is not Android
+# Android uses sync_pt instead of Midgard KDS to achieve KDS functionality
# Only necessary when KDS is not built into the kernel.
#
-linux_config_file = os.path.normpath(os.environ['KDIR']) + '/.config'
-search_term = '^[\ ]*CONFIG_KDS[\ ]*=[\ ]*y'
-kds_in_kernel = 0
-for line in open(linux_config_file, 'r'):
- if re.search(search_term, line):
- # KDS in kernel.
- kds_in_kernel = 1
-if not kds_in_kernel:
- env.Depends('$STATIC_LIB_PATH/ump.ko', '$STATIC_LIB_PATH/kds.ko')
+if env['os'] != 'android':
+ linux_config_file = os.path.normpath(os.environ['KDIR']) + '/.config'
+ search_term = '^[\ ]*CONFIG_KDS[\ ]*=[\ ]*y'
+ kds_in_kernel = 0
+ for line in open(linux_config_file, 'r'):
+ if re.search(search_term, line):
+ # KDS in kernel.
+ kds_in_kernel = 1
+ if not kds_in_kernel:
+ env.Depends('$STATIC_LIB_PATH/ump.ko', '$STATIC_LIB_PATH/kds.ko')
# Until we fathom out how the invoke the Linux build system to clean, we can use Clean
# to remove generated files.
diff --git a/drivers/base/ump/src/ump_arch.h b/drivers/base/ump/src/ump_arch.h
index 5c1160b1fc3..bbbadabef11 100755
--- a/drivers/base/ump/src/ump_arch.h
+++ b/drivers/base/ump/src/ump_arch.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2010-2011 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef _UMP_ARCH_H_
#define _UMP_ARCH_H_
diff --git a/drivers/base/ump/ump_ref_drv.h b/drivers/base/ump/ump_ref_drv.h
index 2ec85d9afee..60018326597 100755
--- a/drivers/base/ump/ump_ref_drv.h
+++ b/drivers/base/ump/ump_ref_drv.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
/**
* @file ump_ref_drv.h
*
diff --git a/include/linux/ump-common.h b/include/linux/ump-common.h
index 85264c09a49..1deefd84381 100755
--- a/include/linux/ump-common.h
+++ b/include/linux/ump-common.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2010-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
/**
* @file ump-common.h
*
diff --git a/include/linux/ump-import.h b/include/linux/ump-import.h
index af162ddc7b9..0641111afb6 100755
--- a/include/linux/ump-import.h
+++ b/include/linux/ump-import.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2011-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef _UMP_IMPORT_H_
#define _UMP_IMPORT_H_
diff --git a/include/linux/ump-ioctl.h b/include/linux/ump-ioctl.h
index 8a13896dc4b..a6219566ebb 100755
--- a/include/linux/ump-ioctl.h
+++ b/include/linux/ump-ioctl.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
#ifndef _UMP_IOCTL_H_
#define _UMP_IOCTL_H
diff --git a/include/linux/ump.h b/include/linux/ump.h
index 8758de986d1..423ba852a84 100755
--- a/include/linux/ump.h
+++ b/include/linux/ump.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2008-2012 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -15,6 +15,8 @@
+
+
/**
* @file
*