]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - mm/hugetlb.c
mm: replace all open encodings for NUMA_NO_NODE
authorAnshuman Khandual <anshuman.khandual@arm.com>
Tue, 5 Mar 2019 23:42:58 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:14 +0000 (21:07 -0800)
commit98fa15f34cb379864757670b8e8743b21456a20e
tree18a360dd850e9a5d67db7a0700f0b3a82a3f8e2b
parent6ade20327dbb808882888ed8ccded71e93067cf9
mm: replace all open encodings for NUMA_NO_NODE

Patch series "Replace all open encodings for NUMA_NO_NODE", v3.

All these places for replacement were found by running the following
grep patterns on the entire kernel code.  Please let me know if this
might have missed some instances.  This might also have replaced some
false positives.  I will appreciate suggestions, inputs and review.

1. git grep "nid == -1"
2. git grep "node == -1"
3. git grep "nid = -1"
4. git grep "node = -1"

This patch (of 2):

At present there are multiple places where invalid node number is
encoded as -1.  Even though implicitly understood it is always better to
have macros in there.  Replace these open encodings for an invalid node
number with the global macro NUMA_NO_NODE.  This helps remove NUMA
related assumptions like 'invalid node' from various places redirecting
them to a common definition.

Link: http://lkml.kernel.org/r/1545127933-10711-2-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> [ixgbe]
Acked-by: Jens Axboe <axboe@kernel.dk> [mtip32xx]
Acked-by: Vinod Koul <vkoul@kernel.org> [dmaengine.c]
Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc]
Acked-by: Doug Ledford <dledford@redhat.com> [drivers/infiniband]
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
39 files changed:
arch/alpha/include/asm/topology.h
arch/ia64/kernel/numa.c
arch/ia64/mm/discontig.c
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/powernv/memtrace.c
arch/sparc/kernel/pci_fire.c
arch/sparc/kernel/pci_schizo.c
arch/sparc/kernel/psycho_common.c
arch/sparc/kernel/sbus.c
arch/sparc/mm/init_64.c
arch/x86/include/asm/pci.h
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/smpboot.c
drivers/block/mtip32xx/mtip32xx.c
drivers/dma/dmaengine.c
drivers/infiniband/hw/hfi1/affinity.c
drivers/infiniband/hw/hfi1/init.c
drivers/iommu/dmar.c
drivers/iommu/intel-iommu.c
drivers/misc/sgi-xp/xpc_uv.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
include/linux/device.h
init/init_task.c
kernel/kthread.c
kernel/sched/fair.c
lib/cpumask.c
mm/huge_memory.c
mm/hugetlb.c
mm/ksm.c
mm/memory.c
mm/memory_hotplug.c
mm/mempolicy.c
mm/page_alloc.c
mm/page_ext.c
net/core/pktgen.c
net/qrtr/qrtr.c