lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 23:56:28 +0000
From:   Will McVicker <willmcvicker@...gle.com>
To:     Russell King <linux@...linux.org.uk>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Tomasz Figa <tomasz.figa@...il.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     Lee Jones <lee.jones@...aro.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Saravana Kannan <saravanak@...gle.com>,
        Will McVicker <willmcvicker@...gle.com>,
        kernel-team@...roid.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-rtc@...r.kernel.org
Subject: [PATCH v2 11/12] soc: samsung: pm_domains: modularize EXYNOS_PM_DOMAINS

Convert the Exynos PM Domains driver into a module. This includes
setting EXYNOS_PM_DOMAINS as tristate and removing it from being
auto-selected by ARCH_EXYNOS. Instead, the config will use
"default y if ARCH_EXYNOS" which allows us to set it to a module via the
defconfig now.

Signed-off-by: Will McVicker <willmcvicker@...gle.com>
---
 arch/arm/mach-exynos/Kconfig     |  1 -
 arch/arm64/Kconfig.platforms     |  1 -
 drivers/soc/samsung/Kconfig      |  3 ++-
 drivers/soc/samsung/pm_domains.c | 12 +++++++-----
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index e97e1d8f7b00..2ad19a08bf06 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -15,7 +15,6 @@ menuconfig ARCH_EXYNOS
 	select EXYNOS_THERMAL
 	select EXYNOS_PMU_ARM
 	select EXYNOS_SROM
-	select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
 	select GPIOLIB
 	select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
 	select HAVE_ARM_SCU if SMP
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index e5e4b9b2fb97..e44d5e9f5058 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -91,7 +91,6 @@ config ARCH_BRCMSTB
 
 config ARCH_EXYNOS
 	bool "ARMv8 based Samsung Exynos SoC family"
-	select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
 	select HAVE_S3C_RTC if RTC_CLASS
 	select PINCTRL
 	select PM_GENERIC_DOMAINS if PM
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
index fdf1162ec98b..e4743c29f73c 100644
--- a/drivers/soc/samsung/Kconfig
+++ b/drivers/soc/samsung/Kconfig
@@ -37,8 +37,9 @@ config EXYNOS_PMU_ARM
 	depends on ARCH_EXYNOS || (ARM && COMPILE_TEST)
 
 config EXYNOS_PM_DOMAINS
-	bool "Exynos PM domains" if COMPILE_TEST
+	tristate "Exynos PM domains"
 	depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
+	default y if ARCH_EXYNOS
 
 config SAMSUNG_PM_DEBUG
 	bool "Samsung PM Suspend debug"
diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
index 5ec0c13f0aaf..6144733fa3c2 100644
--- a/drivers/soc/samsung/pm_domains.c
+++ b/drivers/soc/samsung/pm_domains.c
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/pm_domain.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
@@ -160,8 +161,9 @@ static struct platform_driver exynos_pd_driver = {
 	}
 };
 
-static __init int exynos4_pm_init_power_domain(void)
-{
-	return platform_driver_register(&exynos_pd_driver);
-}
-core_initcall(exynos4_pm_init_power_domain);
+module_platform_driver(exynos_pd_driver);
+
+MODULE_DESCRIPTION("Exynos PM domains driver");
+MODULE_AUTHOR("Marek Szyprowski <m.szyprowski@...sung.com>");
+MODULE_AUTHOR("Krzysztof Kozlowski <krzk@...nel.org>");
+MODULE_LICENSE("GPL v2");
-- 
2.33.0.685.g46640cef36-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ