summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Mahaveer <vishalm@ti.com>2016-04-26 02:13:27 -0400
committerVishal Mahaveer <vishalm@ti.com>2016-04-27 04:44:09 -0400
commitde5b94338581fd62b66cc48171d0c6cf993cb263 (patch)
tree0c0df4ad93deac1e8a795f0ea8ce5ca4c460fa8c
parent6780ba912b0d64592da34a54da21398f3817d200 (diff)
downloadjacinto6evm-de5b94338581fd62b66cc48171d0c6cf993cb263.tar.gz
jacinto6evm: configure cpusets for J6 and J6 Eco
By deault only one core (0) is assigned for all categories of cpuset. But we want both cores (0-1) to be assigned in case of J6. Since we use same set of binaries for J6 and J6 Eco, configure the cpusets dynamically using a script. For J6 - the entries for foreground should be 0-1 For J6 Eco - the entries for foreground should be 0 Change-Id: I1bf8aa5ca4e5b7d73f6fcfdf841f09fa1b4c62df Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--BoardConfig.mk2
-rw-r--r--device.mk4
-rwxr-xr-xinit.jacinto6evmboard.cpuset.sh5
-rw-r--r--init.jacinto6evmboard.rc3
4 files changed, 14 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 0bd06fe..976f653 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -31,6 +31,8 @@ TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a15
+ENABLE_CPUSETS := true
+
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_TI := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/ti/jacinto6evm/bluetooth
diff --git a/device.mk b/device.mk
index e0b1264..a93f0c4 100644
--- a/device.mk
+++ b/device.mk
@@ -51,6 +51,10 @@ PRODUCT_COPY_FILES += \
device/ti/jacinto6evm/audio/jamr3/jamr3_mixer_paths.xml:system/etc/jamr3_mixer_paths.xml \
device/ti/jacinto6evm/audio/audio_policy.conf:system/etc/audio_policy.conf
+# cpuset configuration
+PRODUCT_COPY_FILES += \
+ device/ti/jacinto6evm/init.jacinto6evmboard.cpuset.sh:system/bin/init.jacinto6evmboard.cpuset.sh
+
PRODUCT_PROPERTY_OVERRIDES := \
hwui.render_dirty_regions=false
diff --git a/init.jacinto6evmboard.cpuset.sh b/init.jacinto6evmboard.cpuset.sh
new file mode 100755
index 0000000..06f4177
--- /dev/null
+++ b/init.jacinto6evmboard.cpuset.sh
@@ -0,0 +1,5 @@
+#!/system/bin/sh
+
+# Assign all CPUs for foreground (J6 and J6 Eco have different number of cores)
+cat /sys/devices/system/cpu/present > /dev/cpuset/foreground/cpus
+cat /sys/devices/system/cpu/present > /dev/cpuset/foreground/boost/cpus
diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc
index 67619b5..add1bf2 100644
--- a/init.jacinto6evmboard.rc
+++ b/init.jacinto6evmboard.rc
@@ -34,6 +34,9 @@ on post-fs-data
on boot
+ # execute script to set cpuset configuration
+ exec - root root system -- /system/bin/init.jacinto6evmboard.cpuset.sh
+
# wi-fi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp