if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) { /* * Adjust size if node_end_pfn is not on a proper * pmd boundary. remap_numa_kva will barf otherwise. */ size +=  node_end_pfn[nid] & (PTRS_PER_PTE-1); }  
static unsigned long calculate_numa_remap_pages(void){	int nid;	unsigned long size, reserve_pages = 0;	unsigned long pfn;	for_each_online_node(nid) {		/*		 * The acpi/srat node info can show hot-add memroy zones		 * where memory could be added but not currently present.		 */		if (node_start_pfn[nid] > max_pfn)			continue;		if (node_end_pfn[nid] > max_pfn)			node_end_pfn[nid] = max_pfn;		/* ensure the remap includes space for the pgdat. */		size = node_remap_size[nid] + sizeof(pg_data_t);		/* convert size to large (pmd size) pages, rounding up */		size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES;		/* now the roundup is correct, convert to PAGE_SIZE pages */		size = size * PTRS_PER_PTE;		if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {			/*			 * Adjust size if node_end_pfn is not on a proper			 * pmd boundary. remap_numa_kva will barf otherwise.			 */			size +=  node_end_pfn[nid] & (PTRS_PER_PTE-1);		}		/*		 * Validate the region we are allocating only contains valid		 * pages.		 */		for (pfn = node_end_pfn[nid] - size;		     pfn < node_end_pfn[nid]; pfn++)			if (!page_is_ram(pfn))				break;		if (pfn != node_end_pfn[nid])			size = 0;		printk("Reserving %ld pages of KVA for lmem_map of node %d\n",				size, nid);		node_remap_size[nid] = size;		node_remap_offset[nid] = reserve_pages;		reserve_pages += size;		printk("Shrinking node %d from %ld pages to %ld pages\n",			nid, node_end_pfn[nid], node_end_pfn[nid] - size);		node_end_pfn[nid] -= size;		node_remap_start_pfn[nid] = node_end_pfn[nid];	}	printk("Reserving total of %ld pages for numa KVA remap\n",			reserve_pages);	return reserve_pages;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4b0271eb9da5170ab5cadf2edf97c84712c82550/discontig.c/clean/arch/i386/mm/discontig.c