AmpereComputing / ampere-lts-kernel

Linux 5.4 and 5.10 Longterm kernel (LTS) with Ampere patches
21 stars 17 forks source link

rework NODES_SPAN_OTHER_NODES config on 5.10 kernel #149

Open adamliyi opened 2 years ago

adamliyi commented 2 years ago

The commit: https://github.com/AmpereComputing/ampere-lts-kernel/commit/a1120b049800e01560b9d448993897458b7de88e introduced 'NODES_SPAN_OTHER_NODES' to arch/arm64/Kconfig, this does not make sense:

# git checkout linux-5.10.y
# grep NODES_SPAN_OTHER_NODES * -R
arch/arm64/Kconfig:config NODES_SPAN_OTHER_NODES

There is not code actually use NODES_SPAN_OTHER_NODES.

This patch is necessary on 5.4 kernel:

# git checkout linux-5.4.y
# grep NODES_SPAN_OTHER_NODES * -R
arch/arm64/Kconfig:config NODES_SPAN_OTHER_NODES
arch/powerpc/Kconfig:config NODES_SPAN_OTHER_NODES
arch/s390/Kconfig:config NODES_SPAN_OTHER_NODES
arch/sparc/Kconfig:config NODES_SPAN_OTHER_NODES
arch/x86/Kconfig:config NODES_SPAN_OTHER_NODES
mm/page_alloc.c:#ifdef CONFIG_NODES_SPAN_OTHER_NODES  <--------- code actually use it

From upstream commits: https://github.com/torvalds/linux/commit/acd3f5c441e9635857f02a7c21e7dd590dcf672e (mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES). This config is removed since 5.8 kernel.

So we need to revert commit https://github.com/AmpereComputing/ampere-lts-kernel/commit/a1120b049800e01560b9d448993897458b7de88e