[meta-freescale] [meta-fsl-ppc][PATCH] linux-qoriq: change defconfig for T1040 to match number of cpus

Bob Cochran yocto at mindchasers.com
Thu Nov 13 20:05:20 PST 2014


Having a number higher than necessary for NR_CPUS wastes memory by
instantiating unnecessary structures in RAM.  An example is in the DPAA
where DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create
dozens of extra qman_fq structures.  Using the prior value of 24, which
was left over from the T4240 created an additonal 60 frame queue
structures alone.

This has been tested on t1040rdb-64b.

Signed-off-by: Bob Cochran <yocto at mindchasers.com>
---
 .../files/modify-defconfig-t1040-nr-cpus.patch     |   47 ++++++++++++++++++++
 recipes-kernel/linux/linux-qoriq_3.12.bb           |    1 +
 2 files changed, 48 insertions(+)
 create mode 100644 recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch

diff --git a/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch b/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch
new file mode 100644
index 0000000..7b4b39c
--- /dev/null
+++ b/recipes-kernel/linux/files/modify-defconfig-t1040-nr-cpus.patch
@@ -0,0 +1,47 @@
+From 8545129540a5862b22aad03badb2a9f93bf29117 Mon Sep 17 00:00:00 2001
+From: Bob Cochran <yocto at mindchasers.com>
+Date: Mon, 3 Nov 2014 22:45:35 -0500
+Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Change defconfig for T1040 to
+ match number of CPUS
+
+Having a number higher than necessary for NR_CPUS wastes memory by
+instantiating unnecessary structures in RAM.  An example is in the DPAA where
+DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create
+dozens of extra qman_fq structures.  Using the prior value of 24, which was
+left over from the T4240 created an additonal 60 frame queue structures alone.
+
+This has been tested on t1040rdb-64b.  .
+
+Signed-off-by: Bob Cochran <yocto at mindchasers.com>
+---
+ arch/powerpc/configs/t1040_32bit_smp_defconfig |    2 +-
+ arch/powerpc/configs/t1040_64bit_smp_defconfig |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/configs/t1040_32bit_smp_defconfig b/arch/powerpc/configs/t1040_32bit_smp_defconfig
+index a401e7c..5542248 100644
+--- a/arch/powerpc/configs/t1040_32bit_smp_defconfig
++++ b/arch/powerpc/configs/t1040_32bit_smp_defconfig
+@@ -1,6 +1,6 @@
+ CONFIG_PPC_85xx=y
+ CONFIG_SMP=y
+-CONFIG_NR_CPUS=8
++CONFIG_NR_CPUS=4
+ CONFIG_EXPERIMENTAL=y
+ CONFIG_SYSVIPC=y
+ CONFIG_POSIX_MQUEUE=y
+diff --git a/arch/powerpc/configs/t1040_64bit_smp_defconfig b/arch/powerpc/configs/t1040_64bit_smp_defconfig
+index 1b987d9..bc0dacf 100644
+--- a/arch/powerpc/configs/t1040_64bit_smp_defconfig
++++ b/arch/powerpc/configs/t1040_64bit_smp_defconfig
+@@ -2,7 +2,7 @@ CONFIG_PPC64=y
+ CONFIG_PPC_BOOK3E_64=y
+ CONFIG_ALTIVEC=y
+ CONFIG_SMP=y
+-CONFIG_NR_CPUS=24
++CONFIG_NR_CPUS=4
+ CONFIG_SYSVIPC=y
+ CONFIG_POSIX_MQUEUE=y
+ CONFIG_IRQ_DOMAIN_DEBUG=y
+--
+1.7.9.5
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bb b/recipes-kernel/linux/linux-qoriq_3.12.bb
index 39c4a7b..5f9bc17 100644
--- a/recipes-kernel/linux/linux-qoriq_3.12.bb
+++ b/recipes-kernel/linux/linux-qoriq_3.12.bb
@@ -7,6 +7,7 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \
     file://Fix-CVE-2014-5471_CVE-2014-5472.patch \
     file://remove-Altivec-from-T1040-64-bit-defconfig.patch \
     file://configure-T1040-for-FMAN-V3L.patch \
+    file://modify-defconfig-t1040-nr-cpus.patch \
 "
 SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd"
 
-- 
1.7.9.5



More information about the meta-freescale mailing list