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

Re: [Xen-devel] [PATCH V2 8/8] xen/arm: Set logical CPUID in DT node for dom0 the same as MPIDR



Hi Chen,

On 23/05/2015 15:52, Chen Baozi wrote:
From: Chen Baozi <baozich@xxxxxxxxx>

This patch does the same thing as the previous one but for dom0 kernel.

Please be explicit, the 2 patches may not be contiguous in Xen upstream.


Signed-off-by: Chen Baozi <baozich@xxxxxxxxx>
---
  xen/arch/arm/domain_build.c | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index a156de9..28b4f75 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -712,6 +712,7 @@ static int make_cpus_node(const struct domain *d, void *fdt,
      char buf[15];
      u32 clock_frequency;
      bool_t clock_valid;
+    uint32_t cpu_id;

      DPRINT("Create cpus node\n");

@@ -761,9 +762,13 @@ static int make_cpus_node(const struct domain *d, void 
*fdt,

      for ( cpu = 0; cpu < d->max_vcpus; cpu++ )
      {
-        DPRINT("Create cpu@%u node\n", cpu);
+        /*
+         * Linux kernel assumes that MPIDR is equal to logical CPUID
+         */

Same remark as patch #7.

+        cpu_id = vcpuid_to_vaffinity(cpu);
+        DPRINT("Create cpu@%x node\n", cpu_id);

-        snprintf(buf, sizeof(buf), "cpu@%u", cpu);
+        snprintf(buf, sizeof(buf), "cpu@%x", cpu_id);
          res = fdt_begin_node(fdt, buf);
          if ( res )
              return res;
@@ -776,7 +781,7 @@ static int make_cpus_node(const struct domain *d, void *fdt,
          if ( res )
              return res;

-        res = fdt_property_cell(fdt, "reg", cpu);
+        res = fdt_property_cell(fdt, "reg", cpu_id);
          if ( res )
              return res;



Regards,

--
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®.