linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring
@ 2019-03-13  8:36 Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 1/5] drivers: firmware: psci: Move psci to separate directory Ulf Hansson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

Changes in v2:
	- Drop two patches from the series.
	- Added acks and other tags, no other changes.

All of these patches have been sent earlier, but part of a bigger series [1].
Instead of waiting for that series to get reviewed and accepted, I have split
it up, such that these trivial independent cleanups can go in as a first step.

The only intentional function change, should be the last patch, where we start
checking if PSCI OSI mode is supported in the PSCI FW and print a message about
it, as that is quite useful information for the user/developer.

Rafael, discussions between me and Lorenzo for v1 concluded that these are ready
to be queued for v5.2 - and if possible, we would like this to go via your
linux-pm tree. Can you please pick it up?

Kind regards
Ulf Hansson

[1]
https://lkml.org/lkml/2018/11/29/1801

Ulf Hansson (5):
  drivers: firmware: psci: Move psci to separate directory
  MAINTAINERS: Update files for PSCI
  drivers: firmware: psci: Split psci_dt_cpu_init_idle()
  drivers: firmware: psci: Simplify error path of psci_dt_init()
  drivers: firmware: psci: Announce support for OS initiated suspend
    mode

 MAINTAINERS                                |  2 +-
 drivers/firmware/Kconfig                   | 15 +---
 drivers/firmware/Makefile                  |  3 +-
 drivers/firmware/psci/Kconfig              | 13 ++++
 drivers/firmware/psci/Makefile             |  4 +
 drivers/firmware/{ => psci}/psci.c         | 86 +++++++++++++---------
 drivers/firmware/{ => psci}/psci_checker.c |  0
 include/uapi/linux/psci.h                  |  5 ++
 8 files changed, 78 insertions(+), 50 deletions(-)
 create mode 100644 drivers/firmware/psci/Kconfig
 create mode 100644 drivers/firmware/psci/Makefile
 rename drivers/firmware/{ => psci}/psci.c (93%)
 rename drivers/firmware/{ => psci}/psci_checker.c (100%)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/5] drivers: firmware: psci: Move psci to separate directory
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
@ 2019-03-13  8:36 ` Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 2/5] MAINTAINERS: Update files for PSCI Ulf Hansson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

Some following changes extends the PSCI driver with some additional new
files.  Let's avoid to continue cluttering the toplevel firmware directory
and first move the PSCI files into a PSCI sub-directory.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/firmware/Kconfig                   | 15 +--------------
 drivers/firmware/Makefile                  |  3 +--
 drivers/firmware/psci/Kconfig              | 13 +++++++++++++
 drivers/firmware/psci/Makefile             |  4 ++++
 drivers/firmware/{ => psci}/psci.c         |  0
 drivers/firmware/{ => psci}/psci_checker.c |  0
 6 files changed, 19 insertions(+), 16 deletions(-)
 create mode 100644 drivers/firmware/psci/Kconfig
 create mode 100644 drivers/firmware/psci/Makefile
 rename drivers/firmware/{ => psci}/psci.c (100%)
 rename drivers/firmware/{ => psci}/psci_checker.c (100%)

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index f754578414f0..e1385f47d4ac 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -5,20 +5,6 @@
 
 menu "Firmware Drivers"
 
-config ARM_PSCI_FW
-	bool
-
-config ARM_PSCI_CHECKER
-	bool "ARM PSCI checker"
-	depends on ARM_PSCI_FW && HOTPLUG_CPU && CPU_IDLE && !TORTURE_TEST
-	help
-	  Run the PSCI checker during startup. This checks that hotplug and
-	  suspend operations work correctly when using PSCI.
-
-	  The torture tests may interfere with the PSCI checker by turning CPUs
-	  on and off through hotplug, so for now torture tests and PSCI checker
-	  are mutually exclusive.
-
 config ARM_SCMI_PROTOCOL
 	bool "ARM System Control and Management Interface (SCMI) Message Protocol"
 	depends on ARM || ARM64 || COMPILE_TEST
@@ -270,6 +256,7 @@ config TI_SCI_PROTOCOL
 config HAVE_ARM_SMCCC
 	bool
 
+source "drivers/firmware/psci/Kconfig"
 source "drivers/firmware/broadcom/Kconfig"
 source "drivers/firmware/google/Kconfig"
 source "drivers/firmware/efi/Kconfig"
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
index 80feb635120f..9a3909a22682 100644
--- a/drivers/firmware/Makefile
+++ b/drivers/firmware/Makefile
@@ -2,8 +2,6 @@
 #
 # Makefile for the linux kernel.
 #
-obj-$(CONFIG_ARM_PSCI_FW)	+= psci.o
-obj-$(CONFIG_ARM_PSCI_CHECKER)	+= psci_checker.o
 obj-$(CONFIG_ARM_SCPI_PROTOCOL)	+= arm_scpi.o
 obj-$(CONFIG_ARM_SCPI_POWER_DOMAIN) += scpi_pm_domain.o
 obj-$(CONFIG_ARM_SDE_INTERFACE)	+= arm_sdei.o
@@ -25,6 +23,7 @@ CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch armv7-a\n.arch_extension sec,-DREQU
 obj-$(CONFIG_TI_SCI_PROTOCOL)	+= ti_sci.o
 
 obj-$(CONFIG_ARM_SCMI_PROTOCOL)	+= arm_scmi/
+obj-y				+= psci/
 obj-y				+= broadcom/
 obj-y				+= meson/
 obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
diff --git a/drivers/firmware/psci/Kconfig b/drivers/firmware/psci/Kconfig
new file mode 100644
index 000000000000..26a3b32bf7ab
--- /dev/null
+++ b/drivers/firmware/psci/Kconfig
@@ -0,0 +1,13 @@
+config ARM_PSCI_FW
+	bool
+
+config ARM_PSCI_CHECKER
+	bool "ARM PSCI checker"
+	depends on ARM_PSCI_FW && HOTPLUG_CPU && CPU_IDLE && !TORTURE_TEST
+	help
+	  Run the PSCI checker during startup. This checks that hotplug and
+	  suspend operations work correctly when using PSCI.
+
+	  The torture tests may interfere with the PSCI checker by turning CPUs
+	  on and off through hotplug, so for now torture tests and PSCI checker
+	  are mutually exclusive.
diff --git a/drivers/firmware/psci/Makefile b/drivers/firmware/psci/Makefile
new file mode 100644
index 000000000000..1956b882470f
--- /dev/null
+++ b/drivers/firmware/psci/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+obj-$(CONFIG_ARM_PSCI_FW)	+= psci.o
+obj-$(CONFIG_ARM_PSCI_CHECKER)	+= psci_checker.o
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci/psci.c
similarity index 100%
rename from drivers/firmware/psci.c
rename to drivers/firmware/psci/psci.c
diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci/psci_checker.c
similarity index 100%
rename from drivers/firmware/psci_checker.c
rename to drivers/firmware/psci/psci_checker.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/5] MAINTAINERS: Update files for PSCI
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 1/5] drivers: firmware: psci: Move psci to separate directory Ulf Hansson
@ 2019-03-13  8:36 ` Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 3/5] drivers: firmware: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

The files for the PSCI firmware driver were moved to a sub-directory, let's
update MAINTAINERS to reflect that.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index a419acaa01c5..97dcec6fc877 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12257,7 +12257,7 @@ M:	Mark Rutland <mark.rutland@arm.com>
 M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 L:	linux-arm-kernel@lists.infradead.org
 S:	Maintained
-F:	drivers/firmware/psci*.c
+F:	drivers/firmware/psci/
 F:	include/linux/psci.h
 F:	include/uapi/linux/psci.h
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/5] drivers: firmware: psci: Split psci_dt_cpu_init_idle()
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 1/5] drivers: firmware: psci: Move psci to separate directory Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 2/5] MAINTAINERS: Update files for PSCI Ulf Hansson
@ 2019-03-13  8:36 ` Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 4/5] drivers: firmware: psci: Simplify error path of psci_dt_init() Ulf Hansson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

Let's split the psci_dt_cpu_init_idle() function into two functions. This
makes the code clearer and provides better re-usability.

Cc: Lina Iyer <ilina@codeaurora.org>
Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/firmware/psci/psci.c | 42 ++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index c80ec1d03274..9788bfc1cf8b 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -270,9 +270,26 @@ static int __init psci_features(u32 psci_func_id)
 #ifdef CONFIG_CPU_IDLE
 static DEFINE_PER_CPU_READ_MOSTLY(u32 *, psci_power_state);
 
+static int psci_dt_parse_state_node(struct device_node *np, u32 *state)
+{
+	int err = of_property_read_u32(np, "arm,psci-suspend-param", state);
+
+	if (err) {
+		pr_warn("%pOF missing arm,psci-suspend-param property\n", np);
+		return err;
+	}
+
+	if (!psci_power_state_is_valid(*state)) {
+		pr_warn("Invalid PSCI power state %#x\n", *state);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
 {
-	int i, ret, count = 0;
+	int i, ret = 0, count = 0;
 	u32 *psci_states;
 	struct device_node *state_node;
 
@@ -291,29 +308,16 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
 		return -ENOMEM;
 
 	for (i = 0; i < count; i++) {
-		u32 state;
-
 		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
+		ret = psci_dt_parse_state_node(state_node, &psci_states[i]);
+		of_node_put(state_node);
 
-		ret = of_property_read_u32(state_node,
-					   "arm,psci-suspend-param",
-					   &state);
-		if (ret) {
-			pr_warn(" * %pOF missing arm,psci-suspend-param property\n",
-				state_node);
-			of_node_put(state_node);
+		if (ret)
 			goto free_mem;
-		}
 
-		of_node_put(state_node);
-		pr_debug("psci-power-state %#x index %d\n", state, i);
-		if (!psci_power_state_is_valid(state)) {
-			pr_warn("Invalid PSCI power state %#x\n", state);
-			ret = -EINVAL;
-			goto free_mem;
-		}
-		psci_states[i] = state;
+		pr_debug("psci-power-state %#x index %d\n", psci_states[i], i);
 	}
+
 	/* Idle states parsed correctly, initialize per-cpu pointer */
 	per_cpu(psci_power_state, cpu) = psci_states;
 	return 0;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 4/5] drivers: firmware: psci: Simplify error path of psci_dt_init()
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
                   ` (2 preceding siblings ...)
  2019-03-13  8:36 ` [PATCH v2 3/5] drivers: firmware: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
@ 2019-03-13  8:36 ` Ulf Hansson
  2019-03-13  8:36 ` [PATCH v2 5/5] drivers: firmware: psci: Announce support for OS initiated suspend mode Ulf Hansson
  2019-03-22  9:58 ` [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

Instead of having each psci init function taking care of the of_node_put(),
let's deal with that from psci_dt_init(), as this enables a bit simpler
error path for each psci init function.

Cc: Lina Iyer <ilina@codeaurora.org>
Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/firmware/psci/psci.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index 9788bfc1cf8b..e480e0af632c 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -609,9 +609,9 @@ static int __init psci_0_2_init(struct device_node *np)
 	int err;
 
 	err = get_set_conduit_method(np);
-
 	if (err)
-		goto out_put_node;
+		return err;
+
 	/*
 	 * Starting with v0.2, the PSCI specification introduced a call
 	 * (PSCI_VERSION) that allows probing the firmware version, so
@@ -619,11 +619,7 @@ static int __init psci_0_2_init(struct device_node *np)
 	 * can be carried out according to the specific version reported
 	 * by firmware
 	 */
-	err = psci_probe();
-
-out_put_node:
-	of_node_put(np);
-	return err;
+	return psci_probe();
 }
 
 /*
@@ -635,9 +631,8 @@ static int __init psci_0_1_init(struct device_node *np)
 	int err;
 
 	err = get_set_conduit_method(np);
-
 	if (err)
-		goto out_put_node;
+		return err;
 
 	pr_info("Using PSCI v0.1 Function IDs from DT\n");
 
@@ -661,9 +656,7 @@ static int __init psci_0_1_init(struct device_node *np)
 		psci_ops.migrate = psci_migrate;
 	}
 
-out_put_node:
-	of_node_put(np);
-	return err;
+	return 0;
 }
 
 static const struct of_device_id psci_of_match[] __initconst = {
@@ -678,6 +671,7 @@ int __init psci_dt_init(void)
 	struct device_node *np;
 	const struct of_device_id *matched_np;
 	psci_initcall_t init_fn;
+	int ret;
 
 	np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
 
@@ -685,7 +679,10 @@ int __init psci_dt_init(void)
 		return -ENODEV;
 
 	init_fn = (psci_initcall_t)matched_np->data;
-	return init_fn(np);
+	ret = init_fn(np);
+
+	of_node_put(np);
+	return ret;
 }
 
 #ifdef CONFIG_ACPI
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 5/5] drivers: firmware: psci: Announce support for OS initiated suspend mode
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
                   ` (3 preceding siblings ...)
  2019-03-13  8:36 ` [PATCH v2 4/5] drivers: firmware: psci: Simplify error path of psci_dt_init() Ulf Hansson
@ 2019-03-13  8:36 ` Ulf Hansson
  2019-03-22  9:58 ` [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-13  8:36 UTC (permalink / raw)
  To: Rafael J . Wysocki, Lorenzo Pieralisi
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer,
	Ulf Hansson, linux-pm, linux-arm-kernel, linux-arm-msm,
	linux-kernel

PSCI firmware v1.0+, supports two different modes for CPU_SUSPEND. The
Platform Coordinated mode, which is the default and mandatory mode, while
support for the OS initiated (OSI) mode is optional.

In some cases it's interesting for the user/developer to know if the OSI
mode is supported by the PSCI FW. Therefore, let's print a message to the
log, if that is the case.

Cc: Lina Iyer <ilina@codeaurora.org>
Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/firmware/psci/psci.c | 21 ++++++++++++++++++++-
 include/uapi/linux/psci.h    |  5 +++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index e480e0af632c..eabd01383cd6 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -95,6 +95,11 @@ static inline bool psci_has_ext_power_state(void)
 				PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK;
 }
 
+static inline bool psci_has_osi_support(void)
+{
+	return psci_cpu_suspend_feature & PSCI_1_0_OS_INITIATED;
+}
+
 static inline bool psci_power_state_loses_context(u32 state)
 {
 	const u32 mask = psci_has_ext_power_state() ?
@@ -659,10 +664,24 @@ static int __init psci_0_1_init(struct device_node *np)
 	return 0;
 }
 
+static int __init psci_1_0_init(struct device_node *np)
+{
+	int err;
+
+	err = psci_0_2_init(np);
+	if (err)
+		return err;
+
+	if (psci_has_osi_support())
+		pr_info("OSI mode supported.\n");
+
+	return 0;
+}
+
 static const struct of_device_id psci_of_match[] __initconst = {
 	{ .compatible = "arm,psci",	.data = psci_0_1_init},
 	{ .compatible = "arm,psci-0.2",	.data = psci_0_2_init},
-	{ .compatible = "arm,psci-1.0",	.data = psci_0_2_init},
+	{ .compatible = "arm,psci-1.0",	.data = psci_1_0_init},
 	{},
 };
 
diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h
index b3bcabe380da..581f72085c33 100644
--- a/include/uapi/linux/psci.h
+++ b/include/uapi/linux/psci.h
@@ -49,6 +49,7 @@
 
 #define PSCI_1_0_FN_PSCI_FEATURES		PSCI_0_2_FN(10)
 #define PSCI_1_0_FN_SYSTEM_SUSPEND		PSCI_0_2_FN(14)
+#define PSCI_1_0_FN_SET_SUSPEND_MODE		PSCI_0_2_FN(15)
 
 #define PSCI_1_0_FN64_SYSTEM_SUSPEND		PSCI_0_2_FN64(14)
 
@@ -97,6 +98,10 @@
 #define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK	\
 			(0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
 
+#define PSCI_1_0_OS_INITIATED			BIT(0)
+#define PSCI_1_0_SUSPEND_MODE_PC		0
+#define PSCI_1_0_SUSPEND_MODE_OSI		1
+
 /* PSCI return values (inclusive of all PSCI versions) */
 #define PSCI_RET_SUCCESS			0
 #define PSCI_RET_NOT_SUPPORTED			-1
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring
  2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
                   ` (4 preceding siblings ...)
  2019-03-13  8:36 ` [PATCH v2 5/5] drivers: firmware: psci: Announce support for OS initiated suspend mode Ulf Hansson
@ 2019-03-22  9:58 ` Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2019-03-22  9:58 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Sudeep Holla, Mark Rutland, Daniel Lezcano, Lina Iyer, Linux PM,
	Linux ARM, linux-arm-msm, Linux Kernel Mailing List,
	Lorenzo Pieralisi

On Wed, 13 Mar 2019 at 09:37, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> Changes in v2:
>         - Drop two patches from the series.
>         - Added acks and other tags, no other changes.
>
> All of these patches have been sent earlier, but part of a bigger series [1].
> Instead of waiting for that series to get reviewed and accepted, I have split
> it up, such that these trivial independent cleanups can go in as a first step.
>
> The only intentional function change, should be the last patch, where we start
> checking if PSCI OSI mode is supported in the PSCI FW and print a message about
> it, as that is quite useful information for the user/developer.
>
> Rafael, discussions between me and Lorenzo for v1 concluded that these are ready
> to be queued for v5.2 - and if possible, we would like this to go via your
> linux-pm tree. Can you please pick it up?

Rafael, would you mind picking this up?

Kind regards
Uffe

>
> Kind regards
> Ulf Hansson
>
> [1]
> https://lkml.org/lkml/2018/11/29/1801
>
> Ulf Hansson (5):
>   drivers: firmware: psci: Move psci to separate directory
>   MAINTAINERS: Update files for PSCI
>   drivers: firmware: psci: Split psci_dt_cpu_init_idle()
>   drivers: firmware: psci: Simplify error path of psci_dt_init()
>   drivers: firmware: psci: Announce support for OS initiated suspend
>     mode
>
>  MAINTAINERS                                |  2 +-
>  drivers/firmware/Kconfig                   | 15 +---
>  drivers/firmware/Makefile                  |  3 +-
>  drivers/firmware/psci/Kconfig              | 13 ++++
>  drivers/firmware/psci/Makefile             |  4 +
>  drivers/firmware/{ => psci}/psci.c         | 86 +++++++++++++---------
>  drivers/firmware/{ => psci}/psci_checker.c |  0
>  include/uapi/linux/psci.h                  |  5 ++
>  8 files changed, 78 insertions(+), 50 deletions(-)
>  create mode 100644 drivers/firmware/psci/Kconfig
>  create mode 100644 drivers/firmware/psci/Makefile
>  rename drivers/firmware/{ => psci}/psci.c (93%)
>  rename drivers/firmware/{ => psci}/psci_checker.c (100%)
>
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-03-22  9:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13  8:36 [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson
2019-03-13  8:36 ` [PATCH v2 1/5] drivers: firmware: psci: Move psci to separate directory Ulf Hansson
2019-03-13  8:36 ` [PATCH v2 2/5] MAINTAINERS: Update files for PSCI Ulf Hansson
2019-03-13  8:36 ` [PATCH v2 3/5] drivers: firmware: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
2019-03-13  8:36 ` [PATCH v2 4/5] drivers: firmware: psci: Simplify error path of psci_dt_init() Ulf Hansson
2019-03-13  8:36 ` [PATCH v2 5/5] drivers: firmware: psci: Announce support for OS initiated suspend mode Ulf Hansson
2019-03-22  9:58 ` [PATCH v2 0/5] drivers: firmware: psci: Some cleanup and refactoring Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).