^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * linux/arch/alpha/mm/numa.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * DISCONTIGMEM NUMA alpha support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/mm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/memblock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/swap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/initrd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/pfn.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <asm/hwrpb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <asm/sections.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) pg_data_t node_data[MAX_NUMNODES];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) EXPORT_SYMBOL(node_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #undef DEBUG_DISCONTIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #ifdef DEBUG_DISCONTIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #define DBGDCONT(args...) printk(args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define DBGDCONT(args...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define for_each_mem_cluster(memdesc, _cluster, i) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) for ((_cluster) = (memdesc)->cluster, (i) = 0; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) (i) < (memdesc)->numclusters; (i)++, (_cluster)++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) static void __init show_mem_layout(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) struct memclust_struct * cluster;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct memdesc_struct * memdesc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) /* Find free clusters, and init and free the bootmem accordingly. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) memdesc = (struct memdesc_struct *)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) (hwrpb->mddt_offset + (unsigned long) hwrpb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) printk("Raw memory layout:\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) for_each_mem_cluster(memdesc, cluster, i) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) printk(" memcluster %2d, usage %1lx, start %8lu, end %8lu\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) i, cluster->usage, cluster->start_pfn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) cluster->start_pfn + cluster->numpages);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) static void __init
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) setup_memory_node(int nid, void *kernel_end)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) extern unsigned long mem_size_limit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) struct memclust_struct * cluster;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) struct memdesc_struct * memdesc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) unsigned long start_kernel_pfn, end_kernel_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) unsigned long start, end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) unsigned long node_pfn_start, node_pfn_end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) unsigned long node_min_pfn, node_max_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) int show_init = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) /* Find the bounds of current node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) node_pfn_start = (node_mem_start(nid)) >> PAGE_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) node_pfn_end = node_pfn_start + (node_mem_size(nid) >> PAGE_SHIFT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* Find free clusters, and init and free the bootmem accordingly. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) memdesc = (struct memdesc_struct *)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) (hwrpb->mddt_offset + (unsigned long) hwrpb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) /* find the bounds of this node (node_min_pfn/node_max_pfn) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) node_min_pfn = ~0UL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) node_max_pfn = 0UL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) for_each_mem_cluster(memdesc, cluster, i) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) /* Bit 0 is console/PALcode reserved. Bit 1 is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) non-volatile memory -- we might want to mark
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) this for later. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) if (cluster->usage & 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) continue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) start = cluster->start_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) end = start + cluster->numpages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) if (start >= node_pfn_end || end <= node_pfn_start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) continue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) if (!show_init) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) show_init = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) printk("Initializing bootmem allocator on Node ID %d\n", nid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) printk(" memcluster %2d, usage %1lx, start %8lu, end %8lu\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) i, cluster->usage, cluster->start_pfn,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) cluster->start_pfn + cluster->numpages);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) if (start < node_pfn_start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) start = node_pfn_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) if (end > node_pfn_end)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) end = node_pfn_end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) if (start < node_min_pfn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) node_min_pfn = start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) if (end > node_max_pfn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) node_max_pfn = end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) if (mem_size_limit && node_max_pfn > mem_size_limit) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) static int msg_shown = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) if (!msg_shown) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) msg_shown = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) printk("setup: forcing memory size to %ldK (from %ldK).\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) mem_size_limit << (PAGE_SHIFT - 10),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) node_max_pfn << (PAGE_SHIFT - 10));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) node_max_pfn = mem_size_limit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) if (node_min_pfn >= node_max_pfn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) /* Update global {min,max}_low_pfn from node information. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) if (node_min_pfn < min_low_pfn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) min_low_pfn = node_min_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) if (node_max_pfn > max_low_pfn)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) max_pfn = max_low_pfn = node_max_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #if 0 /* we'll try this one again in a little while */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) /* Cute trick to make sure our local node data is on local memory */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) node_data[nid] = (pg_data_t *)(__va(node_min_pfn << PAGE_SHIFT));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) printk(" Detected node memory: start %8lu, end %8lu\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) node_min_pfn, node_max_pfn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) DBGDCONT(" DISCONTIG: node_data[%d] is at 0x%p\n", nid, NODE_DATA(nid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) /* Find the bounds of kernel memory. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) start_kernel_pfn = PFN_DOWN(KERNEL_START_PHYS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) end_kernel_pfn = PFN_UP(virt_to_phys(kernel_end));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) if (!nid && (node_max_pfn < end_kernel_pfn || node_min_pfn > start_kernel_pfn))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) panic("kernel loaded out of ram");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) memblock_add_node(PFN_PHYS(node_min_pfn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) (node_max_pfn - node_min_pfn) << PAGE_SHIFT, nid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) /* Zone start phys-addr must be 2^(MAX_ORDER-1) aligned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Note that we round this down, not up - node memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) has much larger alignment than 8Mb, so it's safe. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) node_min_pfn &= ~((1UL << (MAX_ORDER-1))-1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) NODE_DATA(nid)->node_start_pfn = node_min_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) NODE_DATA(nid)->node_present_pages = node_max_pfn - node_min_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) node_set_online(nid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) void __init
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) setup_memory(void *kernel_end)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) unsigned long kernel_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) int nid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) show_mem_layout();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) nodes_clear(node_online_map);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) min_low_pfn = ~0UL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) max_low_pfn = 0UL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) for (nid = 0; nid < MAX_NUMNODES; nid++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) setup_memory_node(nid, kernel_end);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) kernel_size = virt_to_phys(kernel_end) - KERNEL_START_PHYS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) memblock_reserve(KERNEL_START_PHYS, kernel_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) #ifdef CONFIG_BLK_DEV_INITRD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) initrd_start = INITRD_START;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) if (initrd_start) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) extern void *move_initrd(unsigned long);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) initrd_end = initrd_start+INITRD_SIZE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) printk("Initial ramdisk at: 0x%p (%lu bytes)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) (void *) initrd_start, INITRD_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) if ((void *)initrd_end > phys_to_virt(PFN_PHYS(max_low_pfn))) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) if (!move_initrd(PFN_PHYS(max_low_pfn)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) printk("initrd extends beyond end of memory "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) "(0x%08lx > 0x%p)\ndisabling initrd\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) initrd_end,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) phys_to_virt(PFN_PHYS(max_low_pfn)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) nid = kvaddr_to_nid(initrd_start);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) memblock_reserve(virt_to_phys((void *)initrd_start),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) INITRD_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) #endif /* CONFIG_BLK_DEV_INITRD */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) void __init paging_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) unsigned long max_zone_pfn[MAX_NR_ZONES] = {0, };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) unsigned long dma_local_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) * The old global MAX_DMA_ADDRESS per-arch API doesn't fit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) * in the NUMA model, for now we convert it to a pfn and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * we interpret this pfn as a local per-node information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * This issue isn't very important since none of these machines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) * have legacy ISA slots anyways.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) max_zone_pfn[ZONE_DMA] = dma_local_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) max_zone_pfn[ZONE_NORMAL] = max_pfn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) free_area_init(max_zone_pfn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) /* Initialize the kernel's ZERO_PGE. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) memset((void *)ZERO_PGE, 0, PAGE_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }