[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 10/15] xen/arm: Detect silicon revision and set cap bits accordingly





On 01/06/16 13:47, Julien Grall wrote:
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 7a1b56b..088625b 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -24,6 +24,22 @@

   DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS);

+void update_cpu_capabilities(const struct arm_cpu_capabilities
*caps,
+                             const char *info)

The info parameter is unnecessary.

It is used in the printk below:

printk(XENLOG_INFO "%s: %s\n", info, caps[i].desc);

I know. Couldn't you just write the message directly below? It doesn't
look like that passing around that string is adding much value to the
code.

Because we will gain soon support of ARMv8.1 features which will use
the same
function to update the capabilities.

In that case I'd say make this patch sane, then add a paramter when
ARMv8.1 features are introduced.

I am not in favor of that. cpufeature.c is supposed to be an abstraction
to be used by both the features framework and the errata framework.

It sounds weird to have a message "errata:" in a file cpufeature.c.

I thought a bit more, I will move the function to cpuerrata.c for the time being.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.