* [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
@ 2020-08-31 7:11 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-08-31 7:11 UTC (permalink / raw)
To: Dan Williams; +Cc: kbuild-all, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b36c969764ab12faebb74711c942fa3e6eaf1e96
commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
config: arm64-randconfig-r016-20200831 (attached as .config)
compiler: aarch64-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
git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
vim +658 drivers/acpi/numa/hmat.c
643
644 static void hmat_register_target_devices(struct memory_target *target)
645 {
646 struct resource *res;
647
648 /*
649 * Do not bother creating devices if no driver is available to
650 * consume them.
651 */
652 if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM))
653 return;
654
655 for (res = target->memregions.child; res; res = res->sibling) {
656 int target_nid = acpi_map_pxm_to_node(target->memory_pxm);
657
> 658 hmem_register_device(target_nid, res);
659 }
660 }
661
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42768 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
@ 2020-08-31 7:11 ` kernel test robot
0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-08-31 7:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b36c969764ab12faebb74711c942fa3e6eaf1e96
commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
config: arm64-randconfig-r016-20200831 (attached as .config)
compiler: aarch64-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
git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
vim +658 drivers/acpi/numa/hmat.c
643
644 static void hmat_register_target_devices(struct memory_target *target)
645 {
646 struct resource *res;
647
648 /*
649 * Do not bother creating devices if no driver is available to
650 * consume them.
651 */
652 if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM))
653 return;
654
655 for (res = target->memregions.child; res; res = res->sibling) {
656 int target_nid = acpi_map_pxm_to_node(target->memory_pxm);
657
> 658 hmem_register_device(target_nid, res);
659 }
660 }
661
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42768 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
2020-08-31 7:11 ` kernel test robot
@ 2020-08-31 19:38 ` Andrew Morton
-1 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2020-08-31 19:38 UTC (permalink / raw)
To: kernel test robot
Cc: Dan Williams, kbuild-all, Linux Memory Management List,
Joao Martins, Vishal Verma
(cc Vishal & Joao)
On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
> config: arm64-randconfig-r016-20200831 (attached as .config)
> compiler: aarch64-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
> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
> >> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> vim +658 drivers/acpi/numa/hmat.c
>
> 643
> 644 static void hmat_register_target_devices(struct memory_target *target)
> 645 {
> 646 struct resource *res;
> 647
> 648 /*
> 649 * Do not bother creating devices if no driver is available to
> 650 * consume them.
> 651 */
> 652 if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM))
> 653 return;
> 654
> 655 for (res = target->memregions.child; res; res = res->sibling) {
> 656 int target_nid = acpi_map_pxm_to_node(target->memory_pxm);
> 657
> > 658 hmem_register_device(target_nid, res);
> 659 }
> 660 }
> 661
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
@ 2020-08-31 19:38 ` Andrew Morton
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2020-08-31 19:38 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]
(cc Vishal & Joao)
On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
> config: arm64-randconfig-r016-20200831 (attached as .config)
> compiler: aarch64-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
> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
> >> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
> vim +658 drivers/acpi/numa/hmat.c
>
> 643
> 644 static void hmat_register_target_devices(struct memory_target *target)
> 645 {
> 646 struct resource *res;
> 647
> 648 /*
> 649 * Do not bother creating devices if no driver is available to
> 650 * consume them.
> 651 */
> 652 if (!IS_ENABLED(CONFIG_DEV_DAX_HMEM))
> 653 return;
> 654
> 655 for (res = target->memregions.child; res; res = res->sibling) {
> 656 int target_nid = acpi_map_pxm_to_node(target->memory_pxm);
> 657
> > 658 hmem_register_device(target_nid, res);
> 659 }
> 660 }
> 661
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
2020-08-31 19:38 ` Andrew Morton
@ 2020-09-01 12:57 ` Joao Martins
-1 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2020-09-01 12:57 UTC (permalink / raw)
To: Andrew Morton, Vishal Verma
Cc: kernel test robot, Dan Williams, kbuild-all,
Linux Memory Management List
On 8/31/20 8:38 PM, Andrew Morton wrote:
> (cc Vishal & Joao)
>
> On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
>> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
>> config: arm64-randconfig-r016-20200831 (attached as .config)
>> compiler: aarch64-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
>> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>>>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>>
Here's a proposed fix (first patch) but I'm not sure if there's a better
one, though. Also, after fixing the one reported above, there's an additional flaw
with the reported kconfig. Specifically ARM64 with NUMA=y and MEMORY_HOTPLUG=n.
It wasn't reported above, but we would see it right after. See the second patch for that.
The two patches could be just one patch as they are introduced by the refactor above
("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device"), but thought
I would split them up per-issue while we discuss the fix. I can attach them merged if you
prefer.
Joao
---------------------->8-------------------
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 07:29:44 -0400
Subject: [PATCH 1/2] device-dax: CONFIG_DEV_DAX_HMEM_DEVICES should depend on
CONFIG_DAX=y
HMAT requires hmem_register_device() which is now placed
under drivers/dax. ACPI_HMAT is a bool and built-in, and to
use hmem_register_device() CONFIG_DAX also needs to be builtin.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a229f45d34aa..a66dff78f298 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,7 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
- depends on DEV_DAX_HMEM
+ depends on DEV_DAX_HMEM && DAX=y
def_bool y
config DEV_DAX_KMEM
--
2.17.1
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 08:06:35 -0400
Subject: [PATCH 2/2] device-dax: Require MEMORY_HOTPLUG for
phys_to_target_node()
phys_to_target_node() and memory_add_physaddr_to_nid() are only
defined with both CONFIG_NUMA=y and CONFIG_MEMORY_HOTPLUG=y, so
reflect that in its header file declaration. Otherwise, ARM64
configs with CONFIG_NUMA=y and CONFIG_MEMORY_HOTPLUG=n see:
drivers/dax/hmem/device.o: in function `hmem_register_one':
drivers/dax/hmem/device.c:85: undefined reference to `phys_to_target_node'
X86 is a special case in which both can be defined without depending
on MEMORY_HOTPLUG. The other case is powerpc but like ARM64 dependencies,
the arch-specific override requires CONFIG_NUMA and CONFIG_MEMORY_HOTPLUG.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a66dff78f298..6e86ac52f41a 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,6 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
+ depends on NUMA && (MEMORY_HOTPLUG || X86) # for phys_to_target_node()
depends on DEV_DAX_HMEM && DAX=y
def_bool y
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
@ 2020-09-01 12:57 ` Joao Martins
0 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2020-09-01 12:57 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4221 bytes --]
On 8/31/20 8:38 PM, Andrew Morton wrote:
> (cc Vishal & Joao)
>
> On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
>> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
>> config: arm64-randconfig-r016-20200831 (attached as .config)
>> compiler: aarch64-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
>> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>>>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>>
Here's a proposed fix (first patch) but I'm not sure if there's a better
one, though. Also, after fixing the one reported above, there's an additional flaw
with the reported kconfig. Specifically ARM64 with NUMA=y and MEMORY_HOTPLUG=n.
It wasn't reported above, but we would see it right after. See the second patch for that.
The two patches could be just one patch as they are introduced by the refactor above
("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device"), but thought
I would split them up per-issue while we discuss the fix. I can attach them merged if you
prefer.
Joao
---------------------->8-------------------
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 07:29:44 -0400
Subject: [PATCH 1/2] device-dax: CONFIG_DEV_DAX_HMEM_DEVICES should depend on
CONFIG_DAX=y
HMAT requires hmem_register_device() which is now placed
under drivers/dax. ACPI_HMAT is a bool and built-in, and to
use hmem_register_device() CONFIG_DAX also needs to be builtin.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a229f45d34aa..a66dff78f298 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,7 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
- depends on DEV_DAX_HMEM
+ depends on DEV_DAX_HMEM && DAX=y
def_bool y
config DEV_DAX_KMEM
--
2.17.1
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 08:06:35 -0400
Subject: [PATCH 2/2] device-dax: Require MEMORY_HOTPLUG for
phys_to_target_node()
phys_to_target_node() and memory_add_physaddr_to_nid() are only
defined with both CONFIG_NUMA=y and CONFIG_MEMORY_HOTPLUG=y, so
reflect that in its header file declaration. Otherwise, ARM64
configs with CONFIG_NUMA=y and CONFIG_MEMORY_HOTPLUG=n see:
drivers/dax/hmem/device.o: in function `hmem_register_one':
drivers/dax/hmem/device.c:85: undefined reference to `phys_to_target_node'
X86 is a special case in which both can be defined without depending
on MEMORY_HOTPLUG. The other case is powerpc but like ARM64 dependencies,
the arch-specific override requires CONFIG_NUMA and CONFIG_MEMORY_HOTPLUG.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a66dff78f298..6e86ac52f41a 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,6 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
+ depends on NUMA && (MEMORY_HOTPLUG || X86) # for phys_to_target_node()
depends on DEV_DAX_HMEM && DAX=y
def_bool y
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
2020-09-01 12:57 ` Joao Martins
@ 2020-09-03 12:31 ` Joao Martins
-1 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2020-09-03 12:31 UTC (permalink / raw)
To: Andrew Morton, Vishal Verma
Cc: kernel test robot, Dan Williams, kbuild-all,
Linux Memory Management List
On 9/1/20 1:57 PM, Joao Martins wrote:
> On 8/31/20 8:38 PM, Andrew Morton wrote:
>> (cc Vishal & Joao)
>>
>> On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
>>> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
>>> config: arm64-randconfig-r016-20200831 (attached as .config)
>>> compiler: aarch64-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
>>> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>>>>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>>>
>
> Here's a proposed fix (first patch) but I'm not sure if there's a better
> one, though. Also, after fixing the one reported above, there's an additional flaw
> with the reported kconfig. Specifically ARM64 with NUMA=y and MEMORY_HOTPLUG=n.
> It wasn't reported above, but we would see it right after. See the second patch for that.
>
> The two patches could be just one patch as they are introduced by the refactor above
> ("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device"), but thought
> I would split them up per-issue while we discuss the fix. I can attach them merged if you
> prefer.
>
lkp now reported the second bug, but the problem is introduced elsewhere when we start
using phys_to_target_node() in hmem_register_device(), which is unrelated to this
regression. I'll comment on today's failure with the adjusted fix.
Meanwhile for this one, see below the scissors mark (re-sending it as I forgot the
Reported-by).
--------------------------->8----------------------------
From a902a7304a5cdbd3484bdc4cdcd762520edbfd20 Mon Sep 17 00:00:00 2001
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 07:29:44 -0400
Subject: [PATCH] device-dax: CONFIG_DEV_DAX_HMEM_DEVICES should depend on
CONFIG_DAX=y
HMAT requires hmem_register_device() which is now placed
under drivers/dax. ACPI_HMAT is a bool and built-in, and to
use hmem_register_device() CONFIG_DAX also needs to be builtin.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a229f45d34aa..a66dff78f298 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,7 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
- depends on DEV_DAX_HMEM
+ depends on DEV_DAX_HMEM && DAX=y
def_bool y
config DEV_DAX_KMEM
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
@ 2020-09-03 12:31 ` Joao Martins
0 siblings, 0 replies; 8+ messages in thread
From: Joao Martins @ 2020-09-03 12:31 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3398 bytes --]
On 9/1/20 1:57 PM, Joao Martins wrote:
> On 8/31/20 8:38 PM, Andrew Morton wrote:
>> (cc Vishal & Joao)
>>
>> On Mon, 31 Aug 2020 15:11:42 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head: b36c969764ab12faebb74711c942fa3e6eaf1e96
>>> commit: f7782cc946fea99b8a4a0a83b6c3775a6beff8ce [3093/3958] ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device
>>> config: arm64-randconfig-r016-20200831 (attached as .config)
>>> compiler: aarch64-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
>>> git checkout f7782cc946fea99b8a4a0a83b6c3775a6beff8ce
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>> aarch64-linux-ld: drivers/acpi/numa/hmat.o: in function `hmat_register_target_devices':
>>>>> drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device'
>>>
>
> Here's a proposed fix (first patch) but I'm not sure if there's a better
> one, though. Also, after fixing the one reported above, there's an additional flaw
> with the reported kconfig. Specifically ARM64 with NUMA=y and MEMORY_HOTPLUG=n.
> It wasn't reported above, but we would see it right after. See the second patch for that.
>
> The two patches could be just one patch as they are introduced by the refactor above
> ("ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device"), but thought
> I would split them up per-issue while we discuss the fix. I can attach them merged if you
> prefer.
>
lkp now reported the second bug, but the problem is introduced elsewhere when we start
using phys_to_target_node() in hmem_register_device(), which is unrelated to this
regression. I'll comment on today's failure with the adjusted fix.
Meanwhile for this one, see below the scissors mark (re-sending it as I forgot the
Reported-by).
--------------------------->8----------------------------
>From a902a7304a5cdbd3484bdc4cdcd762520edbfd20 Mon Sep 17 00:00:00 2001
From: Joao Martins <joao.m.martins@oracle.com>
Date: Tue, 1 Sep 2020 07:29:44 -0400
Subject: [PATCH] device-dax: CONFIG_DEV_DAX_HMEM_DEVICES should depend on
CONFIG_DAX=y
HMAT requires hmem_register_device() which is now placed
under drivers/dax. ACPI_HMAT is a bool and built-in, and to
use hmem_register_device() CONFIG_DAX also needs to be builtin.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
drivers/dax/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index a229f45d34aa..a66dff78f298 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -49,7 +49,7 @@ config DEV_DAX_HMEM
Say M if unsure.
config DEV_DAX_HMEM_DEVICES
- depends on DEV_DAX_HMEM
+ depends on DEV_DAX_HMEM && DAX=y
def_bool y
config DEV_DAX_KMEM
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-03 12:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 7:11 [linux-next:master 3093/3958] drivers/acpi/numa/hmat.c:658: undefined reference to `hmem_register_device' kernel test robot
2020-08-31 7:11 ` kernel test robot
2020-08-31 19:38 ` Andrew Morton
2020-08-31 19:38 ` Andrew Morton
2020-09-01 12:57 ` Joao Martins
2020-09-01 12:57 ` Joao Martins
2020-09-03 12:31 ` Joao Martins
2020-09-03 12:31 ` Joao Martins
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.