Re: [PATCHv3 1/6] arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit()
From: Mark Rutland <mark.rutland@arm.com>
Date: 2019-08-12 15:26:58
On Mon, Aug 12, 2019 at 04:10:43PM +0100, Dave Martin wrote:
On Mon, Aug 12, 2019 at 04:06:35PM +0100, Mark Rutland wrote:quoted
On Mon, Aug 12, 2019 at 04:03:29PM +0100, Dave Martin wrote:quoted
On Fri, Aug 09, 2019 at 02:22:40PM +0100, Mark Rutland wrote:quoted
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 080012a6f025..df01a8579034 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h@@ -80,6 +80,22 @@ #include <linux/linkage.h> #include <linux/types.h> + +enum arm_smccc_conduit { + SMCCC_CONDUIT_NONE,If this is intended to have the value 0, is it worth making that explicit? I can never remember whether enums start at 1 or 0 by default...They start at 0. I intend that checks are done explicitly against an enum value, so I'm not sure that matters.Not really. It depends whether code like if (!arm_smccc_1_1_get_conduit()) { ... } is considered sane or not. If we don't think people should be doing this, omitting the explicit value specifier seems fine.
My expectation was that they'd check explicitly against SMCCC_CONDUIT_NONE, since all of the existing callers care about the specific conduit for other reasons (e.g. patching). I also expect to wrap this in a sbusequent patch that provides helpers: * arm_smccc_1_1_available() * arm_smccc_1_1_call(...) ... for the cases where we just want to make a call and don't care about the specific conduit. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel