Hi "Aneesh,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.13 next-20210628]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/Add-support-for-FORM2-associativity/20210628-231546
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r024-20210628 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://github.com/0day-ci/linux/commit/fcbc8b19e99b1cf44fde904817f19616c6baecdb
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Aneesh-Kumar-K-V/Add-support-for-FORM2-associativity/20210628-231546
        git checkout fcbc8b19e99b1cf44fde904817f19616c6baecdb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All errors (new ones prefixed by >>):

   arch/powerpc/mm/numa.c:298:6: warning: no previous prototype for 
'update_numa_distance' [-Wmissing-prototypes]
     298 | void update_numa_distance(struct device_node *node)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/powerpc/mm/numa.c: In function 'parse_numa_properties':
>> arch/powerpc/mm/numa.c:809:7: error: implicit declaration of function 
>> '__vphn_get_associativity'; did you mean 'of_get_associativity'? 
>> [-Werror=implicit-function-declaration]
     809 |   if (__vphn_get_associativity(i, vphn_assoc) == 0) {
         |       ^~~~~~~~~~~~~~~~~~~~~~~~
         |       of_get_associativity
   cc1: some warnings being treated as errors


vim +809 arch/powerpc/mm/numa.c

   771  
   772  static int __init parse_numa_properties(void)
   773  {
   774          struct device_node *memory;
   775          int default_nid = 0;
   776          unsigned long i;
   777          const __be32 *associativity;
   778  
   779          if (numa_enabled == 0) {
   780                  printk(KERN_WARNING "NUMA disabled by user\n");
   781                  return -1;
   782          }
   783  
   784          primary_domain_index = find_primary_domain_index();
   785  
   786          if (primary_domain_index < 0) {
   787                  /*
   788                   * if we fail to parse primary_domain_index from device 
tree
   789                   * mark the numa disabled, boot with numa disabled.
   790                   */
   791                  numa_enabled = false;
   792                  return primary_domain_index;
   793          }
   794  
   795          dbg("NUMA associativity depth for CPU/Memory: %d\n", 
primary_domain_index);
   796  
   797          /*
   798           * Even though we connect cpus to numa domains later in SMP
   799           * init, we need to know the node ids now. This is because
   800           * each node to be onlined must have NODE_DATA etc backing it.
   801           */
   802          for_each_present_cpu(i) {
   803                  __be32 vphn_assoc[VPHN_ASSOC_BUFSIZE];
   804                  struct device_node *cpu;
   805                  int nid = NUMA_NO_NODE;
   806  
   807                  memset(vphn_assoc, 0, VPHN_ASSOC_BUFSIZE * 
sizeof(__be32));
   808  
 > 809                  if (__vphn_get_associativity(i, vphn_assoc) == 0) {
   810                          nid = associativity_to_nid(vphn_assoc);
   811                          __initialize_form1_numa_distance(vphn_assoc);
   812                  } else {
   813  
   814                          /*
   815                           * Don't fall back to default_nid yet -- we 
will plug
   816                           * cpus into nodes once the memory scan has 
discovered
   817                           * the topology.
   818                           */
   819                          cpu = of_get_cpu_node(i, NULL);
   820                          BUG_ON(!cpu);
   821  
   822                          associativity = of_get_associativity(cpu);
   823                          if (associativity) {
   824                                  nid = 
associativity_to_nid(associativity);
   825                                  
__initialize_form1_numa_distance(associativity);
   826                          }
   827                          of_node_put(cpu);
   828                  }
   829  
   830                  node_set_online(nid);
   831          }
   832  
   833          get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
   834  
   835          for_each_node_by_type(memory, "memory") {
   836                  unsigned long start;
   837                  unsigned long size;
   838                  int nid;
   839                  int ranges;
   840                  const __be32 *memcell_buf;
   841                  unsigned int len;
   842  
   843                  memcell_buf = of_get_property(memory,
   844                          "linux,usable-memory", &len);
   845                  if (!memcell_buf || len <= 0)
   846                          memcell_buf = of_get_property(memory, "reg", 
&len);
   847                  if (!memcell_buf || len <= 0)
   848                          continue;
   849  
   850                  /* ranges in cell */
   851                  ranges = (len >> 2) / (n_mem_addr_cells + 
n_mem_size_cells);
   852  new_range:
   853                  /* these are order-sensitive, and modify the buffer 
pointer */
   854                  start = read_n_cells(n_mem_addr_cells, &memcell_buf);
   855                  size = read_n_cells(n_mem_size_cells, &memcell_buf);
   856  
   857                  /*
   858                   * Assumption: either all memory nodes or none will
   859                   * have associativity properties.  If none, then
   860                   * everything goes to default_nid.
   861                   */
   862                  associativity = of_get_associativity(memory);
   863                  if (associativity) {
   864                          nid = associativity_to_nid(associativity);
   865                          __initialize_form1_numa_distance(associativity);
   866                  } else
   867                          nid = default_nid;
   868  
   869                  fake_numa_create_new_node(((start + size) >> 
PAGE_SHIFT), &nid);
   870                  node_set_online(nid);
   871  
   872                  size = numa_enforce_memory_limit(start, size);
   873                  if (size)
   874                          memblock_set_node(start, size, 
&memblock.memory, nid);
   875  
   876                  if (--ranges)
   877                          goto new_range;
   878          }
   879  
   880          /*
   881           * Now do the same thing for each MEMBLOCK listed in the
   882           * ibm,dynamic-memory property in the
   883           * ibm,dynamic-reconfiguration-memory node.
   884           */
   885          memory = 
of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
   886          if (memory) {
   887                  walk_drmem_lmbs(memory, NULL, numa_setup_drmem_lmb);
   888                  of_node_put(memory);
   889          }
   890  
   891          return 0;
   892  }
   893  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to