Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1232784

[RFC 1/7] arm64: pm/domains: try mutualize CPU domains init between arm/arm64

From Marc Titinger <mtitinger@baylibre.com>
Newsgroups linux.kernel
Subject [RFC 1/7] arm64: pm/domains: try mutualize CPU domains init between arm/arm64
Date 2015-09-25 15:10 +0200
Message-ID <qcAVc-2gw-17@gated-at.bofh.it> (permalink)
References <qcAVb-2gw-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Marc Titinger <mtitinger@baylibre.com>

fake path to start testing, eventually move this out of /arch/.
incidently enable PM_GENERIC_DOMAINS for VExpress.

Signed-off-by: Marc Titinger <mtitinger@baylibre.com>
---
 arch/arm/common/domains.c       | 4 ++--
 arch/arm64/Kconfig              | 1 +
 arch/arm64/include/asm/arm-pd.h | 1 +
 arch/arm64/kernel/Makefile      | 6 ++++++
 arch/arm64/kernel/domains.c     | 1 +
 5 files changed, 11 insertions(+), 2 deletions(-)
 create mode 120000 arch/arm64/include/asm/arm-pd.h
 create mode 120000 arch/arm64/kernel/domains.c

diff --git a/arch/arm/common/domains.c b/arch/arm/common/domains.c
index d3207da..68908d4 100644
--- a/arch/arm/common/domains.c
+++ b/arch/arm/common/domains.c
@@ -20,7 +20,7 @@
 
 #include <asm/arm-pd.h>
 
-#define NAME_MAX 36
+#define GENPD_NAME_MAX 36
 
 struct arm_pm_domain {
 	struct generic_pm_domain genpd;
@@ -182,7 +182,7 @@ static int __init arm_domain_init(void)
 		}
 
 		/* Initialize rest of CPU PM domain specifics */
-		pd->genpd.name = kstrndup(np->name, NAME_MAX, GFP_KERNEL);
+		pd->genpd.name = kstrndup(np->name, GENPD_NAME_MAX, GFP_KERNEL);
 		pd->genpd.power_off = arm_pd_power_down;
 		pd->genpd.power_on = arm_pd_power_up;
 		pd->genpd.flags |= GENPD_FLAG_IRQ_SAFE;
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7c55a63..d35f213 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -250,6 +250,7 @@ config ARCH_VEXPRESS
 	select COMMON_CLK_VERSATILE
 	select POWER_RESET_VEXPRESS
 	select VEXPRESS_CONFIG
+	select PM_GENERIC_DOMAINS if PM
 	help
 	  This enables support for the ARMv8 software model (Versatile
 	  Express).
diff --git a/arch/arm64/include/asm/arm-pd.h b/arch/arm64/include/asm/arm-pd.h
new file mode 120000
index 0000000..ecc5437
--- /dev/null
+++ b/arch/arm64/include/asm/arm-pd.h
@@ -0,0 +1 @@
+../../../arm/include/asm/arm-pd.h
\ No newline at end of file
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 426d076..4689565 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -30,6 +30,12 @@ arm64-obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event.o
 arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
 arm64-obj-$(CONFIG_CPU_PM)		+= sleep.o suspend.o
 arm64-obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
+
+# CPU domains: try mutualize for arm/arm64 in a first step.
+# Eventually make this more generic.
+#
+arm64-obj-$(CONFIG_PM_GENERIC_DOMAINS)	+= domains.o
+
 arm64-obj-$(CONFIG_JUMP_LABEL)		+= jump_label.o
 arm64-obj-$(CONFIG_KGDB)		+= kgdb.o
 arm64-obj-$(CONFIG_EFI)			+= efi.o efi-stub.o efi-entry.o
diff --git a/arch/arm64/kernel/domains.c b/arch/arm64/kernel/domains.c
new file mode 120000
index 0000000..bf17c69
--- /dev/null
+++ b/arch/arm64/kernel/domains.c
@@ -0,0 +1 @@
+../../arm/common/domains.c
\ No newline at end of file
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 0/7] Managing cluser-level c-states with generic power domains Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 4/7] PM / Domains: introduce power-states consistent with c-states. Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 3/7] PM / Domains: prepare for devices that might register a power state Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 7/7] PM / Domains: add debugfs 'states' and 'timings' seq files Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 1/7] arm64: pm/domains: try mutualize CPU domains init between arm/arm64 Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 6/7] arm: cpuidle: let genpd handle the cluster power transition with 'power-states' Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 2/7] arm64: Juno: declare generic power domains for both clusters. Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200
  [RFC 5/7] PM / Domains: succeed & warn when attaching non-irqsafe devices to an irq-safe domain. Marc Titinger <mtitinger@baylibre.com> - 2015-09-25 15:10 +0200

csiph-web