 #ifdef CONFIG_DISCONTIGMEM /* * And for discontig, do some more fixups on the zone sizes.. */ zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT; zones_size[ZONE_NORMAL] = 0; free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0); #endif 
void __init paging_init(void){	unsigned long zones_size[MAX_NR_ZONES] = { 0, };	/*	 * Setup some defaults for the zone sizes.. these should be safe	 * regardless of distcontiguous memory or MMU settings.	 */	zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT;	zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT;#ifdef CONFIG_HIGHMEM	zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT;#endif#ifdef CONFIG_MMU	/*	 * If we have an MMU, and want to be using it .. we need to adjust	 * the zone sizes accordingly, in addition to turning it on.	 */	{		unsigned long max_dma, low, start_pfn;		pgd_t *pg_dir;		int i;		/* We don't need kernel mapping as hardware support that. */		pg_dir = swapper_pg_dir;		for (i = 0; i < PTRS_PER_PGD; i++)			pgd_val(pg_dir[i]) = 0;		/* Turn on the MMU */		enable_mmu();		/* Fixup the zone sizes */		start_pfn = START_PFN;		max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;		low = MAX_LOW_PFN;		if (low < max_dma) {			zones_size[ZONE_DMA] = low - start_pfn;			zones_size[ZONE_NORMAL] = 0;		} else {			zones_size[ZONE_DMA] = max_dma - start_pfn;			zones_size[ZONE_NORMAL] = low - max_dma;		}	}#elif defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4)	/*	 * If we don't have CONFIG_MMU set and the processor in question	 * still has an MMU, care needs to be taken to make sure it doesn't	 * stay on.. Since the boot loader could have potentially already	 * turned it on, and we clearly don't want it, we simply turn it off.	 *	 * We don't need to do anything special for the zone sizes, since the	 * default values that were already configured up above should be	 * satisfactory.	 */	disable_mmu();#endif	NODE_DATA(0)->node_mem_map = NULL;	free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);#ifdef CONFIG_DISCONTIGMEM	/*	 * And for discontig, do some more fixups on the zone sizes..	 */	zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT;	zones_size[ZONE_NORMAL] = 0;	free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0);#endif}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/65463b73b14ed43368dc5961a6c3dcb0d98cfe1f/init.c/clean/arch/sh/mm/init.c