Thread (9 messages) 9 messages, 4 authors, 2016-11-16

[PATCH v3 2/2] arm64: Support systems without FP/ASIMD

From: suzuki.poulose@arm.com (Suzuki K Poulose)
Date: 2016-11-15 12:20:00
Also in: kvmarm, lkml

On 14/11/16 11:48, Catalin Marinas wrote:
Hi Suzuki,
quoted
+static inline bool system_supports_fpsimd(void)
+{
+	return !cpus_have_const_cap(ARM64_HAS_NO_FPSIMD);
+}
Any particular reason why using negation instead of a ARM64_HAS_FPSIMD?
A potential problem would be the default cpus_have_const_cap()
implementation and the default static key having a slight performance
impact.
The negation was chosen to avoid hotpatching in the most common case.
But as you said, it has an impact on the other side. I think doing
a one time hotpatching at boot time is more optimal than penalising
a bunch of other users throughout the execution. I will take a look
at changing it back to a ARM64_HAS_FPSIMD.
quoted
 	},
+	{
+		/* FP/SIMD is not implemented */
+		.capability = ARM64_HAS_NO_FPSIMD,
+		.def_scope = SCOPE_SYSTEM,
+		.min_field_value = 0,
+		.matches = has_no_fpsimd,
+	},
If we go for negation, I don't think we need a min_field_value at all,
the matching is done by the has_no_fpsimd() function.
You're right.

Suzuki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help