Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Subject: Re: [PATCH v3 03/17] xen/arm: implement node distance helpers for
> Arm
> >>> Correct, I agree. I added a numa_init_distance() function (in patch #12) 
> >>> to
> >>> set all values to NUMA_NO_DISTANCE. The numa_init_distance() will be
> >>> called in the beginning of numa_init().
> >>
> >> Why do you need a function for this? As said, this array can be pre-set at
> >> compile time (unless I'm overlooking something).
> >
> > Sorry I overlooked this comment, correct me if I am wrong, but IIUC we
> > can only pre-set the 2D array to 0 at the compile time. Could you please
> > elaborate a bit more about the code in your mind? Thanks!
> 
> static unsigned char __ro_after_init
> node_distance_map[MAX_NUMNODES][MAX_NUMNODES] = {
>     [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] =
> NUMA_NO_DISTANCE }
> };
> 
> or even (limiting redundancy a little)
> 
> static unsigned char __ro_after_init
> node_distance_map[][MAX_NUMNODES] = {
>     [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] =
> NUMA_NO_DISTANCE }
> };

Yeah you are correct. I made a mistake that missing the
"[0 ... MAX_NUMNODES - 1]" in the left side of "=" hence my compiler
complained... Thanks for your patience.

Kind regards,
Henry

> 
> Jan

Reply via email to