Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
"Three arm64 fixes for -rc3. They're all pretty straightforward: a
couple of NUMA issues from the Huawei folks and a thinko in
__page_to_voff that seems to be benign, but is certainly better off
fixed.

Summary:
- couple of NUMA fixes
- thinko in __page_to_voff"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: mm: fix __page_to_voff definition
arm64/numa: fix incorrect log for memory-less node
arm64/numa: fix pcpu_cpu_distance() to get correct CPU proximity

+7 -4
+1 -1
arch/arm64/include/asm/memory.h
··· 217 217 #define _virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 218 218 #else 219 219 #define __virt_to_pgoff(kaddr) (((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page)) 220 - #define __page_to_voff(kaddr) (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page)) 220 + #define __page_to_voff(page) (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page)) 221 221 222 222 #define page_to_virt(page) ((void *)((__page_to_voff(page)) | PAGE_OFFSET)) 223 223 #define virt_to_page(vaddr) ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
+6 -3
arch/arm64/mm/numa.c
··· 147 147 148 148 static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) 149 149 { 150 - return node_distance(from, to); 150 + return node_distance(early_cpu_to_node(from), early_cpu_to_node(to)); 151 151 } 152 152 153 153 static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, ··· 223 223 void *nd; 224 224 int tnid; 225 225 226 - pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", 227 - nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1); 226 + if (start_pfn < end_pfn) 227 + pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", nid, 228 + start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1); 229 + else 230 + pr_info("Initmem setup node %d [<memory-less node>]\n", nid); 228 231 229 232 nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); 230 233 nd = __va(nd_pa);