All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pingfan Liu <kernelfans@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: oe-kbuild-all@lists.linux.dev, Baoquan He <bhe@redhat.com>,
	Pingfan Liu <piliu@redhat.com>,
	kexec@lists.infradead.org,
	Mahesh Salgaonkar <mahesh@linux.ibm.com>,
	Ming Lei <ming.lei@redhat.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	Hari Bathini <hbathini@linux.ibm.com>,
	Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
Date: Thu, 28 Dec 2023 03:52:53 +0800	[thread overview]
Message-ID: <202312280350.GpyKSrB6-lkp@intel.com> (raw)
In-Reply-To: <20231227024126.12424-1-kernelfans@gmail.com>

Hi Pingfan,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.7-rc7 next-20231222]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pingfan-Liu/powerpc-kernel-Remove-check-on-paca_ptrs_size/20231227-104412
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20231227024126.12424-1-kernelfans%40gmail.com
patch subject: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
config: powerpc-iss476-smp_defconfig (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312280350.GpyKSrB6-lkp@intel.com/

All errors (new ones prefixed by >>):

   powerpc-linux-ld: arch/powerpc/kernel/setup-common.o: in function `smp_setup_cpu_maps':
>> arch/powerpc/kernel/setup-common.c:440:(.init.text+0x6a): undefined reference to `paca_last_cpu_num'
>> powerpc-linux-ld: arch/powerpc/kernel/setup-common.c:440:(.init.text+0x72): undefined reference to `paca_last_cpu_num'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HOTPLUG_CPU
   Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
   Selected by [y]:
   - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]


vim +440 arch/powerpc/kernel/setup-common.c

   413	
   414	/**
   415	 * setup_cpu_maps - initialize the following cpu maps:
   416	 *                  cpu_possible_mask
   417	 *                  cpu_present_mask
   418	 *
   419	 * Having the possible map set up early allows us to restrict allocations
   420	 * of things like irqstacks to nr_cpu_ids rather than NR_CPUS.
   421	 *
   422	 * We do not initialize the online map here; cpus set their own bits in
   423	 * cpu_online_mask as they come up.
   424	 *
   425	 * This function is valid only for Open Firmware systems.  finish_device_tree
   426	 * must be called before using this.
   427	 *
   428	 * While we're here, we may as well set the "physical" cpu ids in the paca.
   429	 *
   430	 * NOTE: This must match the parsing done in early_init_dt_scan_cpus.
   431	 */
   432	void __init smp_setup_cpu_maps(void)
   433	{
   434		struct device_node *dn;
   435		int cpu = 0;
   436		int nthreads = 1;
   437	
   438		DBG("smp_setup_cpu_maps()\n");
   439	
 > 440		cpu_to_phys_id = memblock_alloc(paca_last_cpu_num * sizeof(u32),
   441						__alignof__(u32));
   442		if (!cpu_to_phys_id)
   443			panic("%s: Failed to allocate %zu bytes align=0x%zx\n",
   444			      __func__, nr_cpu_ids * sizeof(u32), __alignof__(u32));
   445	
   446		for_each_node_by_type(dn, "cpu") {
   447			const __be32 *intserv;
   448			__be32 cpu_be;
   449			int j, len;
   450	
   451			DBG("  * %pOF...\n", dn);
   452	
   453			intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
   454					&len);
   455			if (intserv) {
   456				DBG("    ibm,ppc-interrupt-server#s -> %lu threads\n",
   457				    (len / sizeof(int)));
   458			} else {
   459				DBG("    no ibm,ppc-interrupt-server#s -> 1 thread\n");
   460				intserv = of_get_property(dn, "reg", &len);
   461				if (!intserv) {
   462					cpu_be = cpu_to_be32(cpu);
   463					/* XXX: what is this? uninitialized?? */
   464					intserv = &cpu_be;	/* assume logical == phys */
   465					len = 4;
   466				}
   467			}
   468	
   469			nthreads = len / sizeof(int);
   470	
   471			for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) {
   472				bool avail;
   473	
   474				DBG("    thread %d -> cpu %d (hard id %d)\n",
   475				    j, cpu, be32_to_cpu(intserv[j]));
   476	
   477				avail = of_device_is_available(dn);
   478				if (!avail)
   479					avail = !of_property_match_string(dn,
   480							"enable-method", "spin-table");
   481	
   482				set_cpu_present(cpu, avail);
   483				set_cpu_possible(cpu, true);
   484				cpu_to_phys_id[cpu] = be32_to_cpu(intserv[j]);
   485				cpu++;
   486			}
   487	
   488			if (cpu >= nr_cpu_ids) {
   489				of_node_put(dn);
   490				break;
   491			}
   492		}
   493	
   494		/* If no SMT supported, nthreads is forced to 1 */
   495		if (!cpu_has_feature(CPU_FTR_SMT)) {
   496			DBG("  SMT disabled ! nthreads forced to 1\n");
   497			nthreads = 1;
   498		}
   499	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Pingfan Liu <kernelfans@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: oe-kbuild-all@lists.linux.dev, Baoquan He <bhe@redhat.com>,
	Pingfan Liu <piliu@redhat.com>,
	kexec@lists.infradead.org,
	Mahesh Salgaonkar <mahesh@linux.ibm.com>,
	Ming Lei <ming.lei@redhat.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	Hari Bathini <hbathini@linux.ibm.com>,
	Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
Date: Thu, 28 Dec 2023 03:52:53 +0800	[thread overview]
Message-ID: <202312280350.GpyKSrB6-lkp@intel.com> (raw)
In-Reply-To: <20231227024126.12424-1-kernelfans@gmail.com>

Hi Pingfan,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.7-rc7 next-20231222]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pingfan-Liu/powerpc-kernel-Remove-check-on-paca_ptrs_size/20231227-104412
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20231227024126.12424-1-kernelfans%40gmail.com
patch subject: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
config: powerpc-iss476-smp_defconfig (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312280350.GpyKSrB6-lkp@intel.com/

All errors (new ones prefixed by >>):

   powerpc-linux-ld: arch/powerpc/kernel/setup-common.o: in function `smp_setup_cpu_maps':
>> arch/powerpc/kernel/setup-common.c:440:(.init.text+0x6a): undefined reference to `paca_last_cpu_num'
>> powerpc-linux-ld: arch/powerpc/kernel/setup-common.c:440:(.init.text+0x72): undefined reference to `paca_last_cpu_num'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HOTPLUG_CPU
   Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
   Selected by [y]:
   - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]


vim +440 arch/powerpc/kernel/setup-common.c

   413	
   414	/**
   415	 * setup_cpu_maps - initialize the following cpu maps:
   416	 *                  cpu_possible_mask
   417	 *                  cpu_present_mask
   418	 *
   419	 * Having the possible map set up early allows us to restrict allocations
   420	 * of things like irqstacks to nr_cpu_ids rather than NR_CPUS.
   421	 *
   422	 * We do not initialize the online map here; cpus set their own bits in
   423	 * cpu_online_mask as they come up.
   424	 *
   425	 * This function is valid only for Open Firmware systems.  finish_device_tree
   426	 * must be called before using this.
   427	 *
   428	 * While we're here, we may as well set the "physical" cpu ids in the paca.
   429	 *
   430	 * NOTE: This must match the parsing done in early_init_dt_scan_cpus.
   431	 */
   432	void __init smp_setup_cpu_maps(void)
   433	{
   434		struct device_node *dn;
   435		int cpu = 0;
   436		int nthreads = 1;
   437	
   438		DBG("smp_setup_cpu_maps()\n");
   439	
 > 440		cpu_to_phys_id = memblock_alloc(paca_last_cpu_num * sizeof(u32),
   441						__alignof__(u32));
   442		if (!cpu_to_phys_id)
   443			panic("%s: Failed to allocate %zu bytes align=0x%zx\n",
   444			      __func__, nr_cpu_ids * sizeof(u32), __alignof__(u32));
   445	
   446		for_each_node_by_type(dn, "cpu") {
   447			const __be32 *intserv;
   448			__be32 cpu_be;
   449			int j, len;
   450	
   451			DBG("  * %pOF...\n", dn);
   452	
   453			intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
   454					&len);
   455			if (intserv) {
   456				DBG("    ibm,ppc-interrupt-server#s -> %lu threads\n",
   457				    (len / sizeof(int)));
   458			} else {
   459				DBG("    no ibm,ppc-interrupt-server#s -> 1 thread\n");
   460				intserv = of_get_property(dn, "reg", &len);
   461				if (!intserv) {
   462					cpu_be = cpu_to_be32(cpu);
   463					/* XXX: what is this? uninitialized?? */
   464					intserv = &cpu_be;	/* assume logical == phys */
   465					len = 4;
   466				}
   467			}
   468	
   469			nthreads = len / sizeof(int);
   470	
   471			for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) {
   472				bool avail;
   473	
   474				DBG("    thread %d -> cpu %d (hard id %d)\n",
   475				    j, cpu, be32_to_cpu(intserv[j]));
   476	
   477				avail = of_device_is_available(dn);
   478				if (!avail)
   479					avail = !of_property_match_string(dn,
   480							"enable-method", "spin-table");
   481	
   482				set_cpu_present(cpu, avail);
   483				set_cpu_possible(cpu, true);
   484				cpu_to_phys_id[cpu] = be32_to_cpu(intserv[j]);
   485				cpu++;
   486			}
   487	
   488			if (cpu >= nr_cpu_ids) {
   489				of_node_put(dn);
   490				break;
   491			}
   492		}
   493	
   494		/* If no SMT supported, nthreads is forced to 1 */
   495		if (!cpu_has_feature(CPU_FTR_SMT)) {
   496			DBG("  SMT disabled ! nthreads forced to 1\n");
   497			nthreads = 1;
   498		}
   499	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Pingfan Liu <kernelfans@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Baoquan He <bhe@redhat.com>, Pingfan Liu <piliu@redhat.com>,
	kexec@lists.infradead.org,
	Mahesh Salgaonkar <mahesh@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Ming Lei <ming.lei@redhat.com>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	oe-kbuild-all@lists.linux.dev,
	Hari Bathini <hbathini@linux.ibm.com>,
	Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
Date: Thu, 28 Dec 2023 03:52:53 +0800	[thread overview]
Message-ID: <202312280350.GpyKSrB6-lkp@intel.com> (raw)
In-Reply-To: <20231227024126.12424-1-kernelfans@gmail.com>

Hi Pingfan,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v6.7-rc7 next-20231222]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pingfan-Liu/powerpc-kernel-Remove-check-on-paca_ptrs_size/20231227-104412
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20231227024126.12424-1-kernelfans%40gmail.com
patch subject: [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask
config: powerpc-iss476-smp_defconfig (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231228/202312280350.GpyKSrB6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312280350.GpyKSrB6-lkp@intel.com/

All errors (new ones prefixed by >>):

   powerpc-linux-ld: arch/powerpc/kernel/setup-common.o: in function `smp_setup_cpu_maps':
>> arch/powerpc/kernel/setup-common.c:440:(.init.text+0x6a): undefined reference to `paca_last_cpu_num'
>> powerpc-linux-ld: arch/powerpc/kernel/setup-common.c:440:(.init.text+0x72): undefined reference to `paca_last_cpu_num'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HOTPLUG_CPU
   Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
   Selected by [y]:
   - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]


vim +440 arch/powerpc/kernel/setup-common.c

   413	
   414	/**
   415	 * setup_cpu_maps - initialize the following cpu maps:
   416	 *                  cpu_possible_mask
   417	 *                  cpu_present_mask
   418	 *
   419	 * Having the possible map set up early allows us to restrict allocations
   420	 * of things like irqstacks to nr_cpu_ids rather than NR_CPUS.
   421	 *
   422	 * We do not initialize the online map here; cpus set their own bits in
   423	 * cpu_online_mask as they come up.
   424	 *
   425	 * This function is valid only for Open Firmware systems.  finish_device_tree
   426	 * must be called before using this.
   427	 *
   428	 * While we're here, we may as well set the "physical" cpu ids in the paca.
   429	 *
   430	 * NOTE: This must match the parsing done in early_init_dt_scan_cpus.
   431	 */
   432	void __init smp_setup_cpu_maps(void)
   433	{
   434		struct device_node *dn;
   435		int cpu = 0;
   436		int nthreads = 1;
   437	
   438		DBG("smp_setup_cpu_maps()\n");
   439	
 > 440		cpu_to_phys_id = memblock_alloc(paca_last_cpu_num * sizeof(u32),
   441						__alignof__(u32));
   442		if (!cpu_to_phys_id)
   443			panic("%s: Failed to allocate %zu bytes align=0x%zx\n",
   444			      __func__, nr_cpu_ids * sizeof(u32), __alignof__(u32));
   445	
   446		for_each_node_by_type(dn, "cpu") {
   447			const __be32 *intserv;
   448			__be32 cpu_be;
   449			int j, len;
   450	
   451			DBG("  * %pOF...\n", dn);
   452	
   453			intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
   454					&len);
   455			if (intserv) {
   456				DBG("    ibm,ppc-interrupt-server#s -> %lu threads\n",
   457				    (len / sizeof(int)));
   458			} else {
   459				DBG("    no ibm,ppc-interrupt-server#s -> 1 thread\n");
   460				intserv = of_get_property(dn, "reg", &len);
   461				if (!intserv) {
   462					cpu_be = cpu_to_be32(cpu);
   463					/* XXX: what is this? uninitialized?? */
   464					intserv = &cpu_be;	/* assume logical == phys */
   465					len = 4;
   466				}
   467			}
   468	
   469			nthreads = len / sizeof(int);
   470	
   471			for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) {
   472				bool avail;
   473	
   474				DBG("    thread %d -> cpu %d (hard id %d)\n",
   475				    j, cpu, be32_to_cpu(intserv[j]));
   476	
   477				avail = of_device_is_available(dn);
   478				if (!avail)
   479					avail = !of_property_match_string(dn,
   480							"enable-method", "spin-table");
   481	
   482				set_cpu_present(cpu, avail);
   483				set_cpu_possible(cpu, true);
   484				cpu_to_phys_id[cpu] = be32_to_cpu(intserv[j]);
   485				cpu++;
   486			}
   487	
   488			if (cpu >= nr_cpu_ids) {
   489				of_node_put(dn);
   490				break;
   491			}
   492		}
   493	
   494		/* If no SMT supported, nthreads is forced to 1 */
   495		if (!cpu_has_feature(CPU_FTR_SMT)) {
   496			DBG("  SMT disabled ! nthreads forced to 1\n");
   497			nthreads = 1;
   498		}
   499	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-12-27 19:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  2:39 [PATCHv10 0/3] enable nr_cpus for powerpc without re-ordering cpu number Pingfan Liu
2023-12-27  2:39 ` Pingfan Liu
2023-12-27  2:39 ` [PATCHv10 1/3] powerpc/kernel: Remove check on paca_ptrs_size Pingfan Liu
2023-12-27  2:39   ` Pingfan Liu
2023-12-27  2:41 ` [PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask Pingfan Liu
2023-12-27  2:41   ` Pingfan Liu
2023-12-27 19:52   ` kernel test robot [this message]
2023-12-27 19:52     ` kernel test robot
2023-12-27 19:52     ` kernel test robot
2023-12-27  2:41 ` [PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu Pingfan Liu
2023-12-27  2:41   ` Pingfan Liu
2023-12-27 20:45   ` kernel test robot
2023-12-27 20:45     ` kernel test robot
2023-12-27 20:45     ` kernel test robot
2023-12-28  4:07   ` kernel test robot
2023-12-28  4:07     ` kernel test robot
2023-12-28  4:07     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202312280350.GpyKSrB6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bhe@redhat.com \
    --cc=hbathini@linux.ibm.com \
    --cc=kernelfans@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=ming.lei@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=piliu@redhat.com \
    --cc=sourabhjain@linux.ibm.com \
    --cc=wenxiong@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.