Ejemplo n.º 1
0
void free_initmem(void)
{
	const unsigned long text_delta = MEM_SV_START - PAGE_OFFSET;

	/*
	 * Evict the cache on all cores to avoid incoherence.
	 * We are guaranteed that no one will touch the init pages any more.
	 */
	homecache_evict(&cpu_cacheable_map);

	/* Free the data pages that we won't use again after init. */
	free_init_pages("unused kernel data",
			(unsigned long)__init_begin,
			(unsigned long)__init_end);

	/*
	 * Free the pages mapped from 0xc0000000 that correspond to code
	 * pages from MEM_SV_START that we won't use again after init.
	 */
	free_init_pages("unused kernel text",
			(unsigned long)_sinittext - text_delta,
			(unsigned long)_einittext - text_delta);
	/* Do a global TLB flush so everyone sees the changes. */
	flush_tlb_all();
}
Ejemplo n.º 2
0
void free_initmem(void)
{
	const unsigned long text_delta = MEM_SV_INTRPT - PAGE_OFFSET;

	/*
	 * Evict the dirty initdata on the boot cpu, evict the w1data
	 * wherever it's homed, and evict all the init code everywhere.
	 * We are guaranteed that no one will touch the init pages any
	 * more, and although other cpus may be touching the w1data,
	 * we only actually change the caching on tile64, which won't
	 * be keeping local copies in the other tiles' caches anyway.
	 */
	homecache_evict(&cpu_cacheable_map);

	/* Free the data pages that we won't use again after init. */
	free_init_pages("unused kernel data",
			(unsigned long)_sinitdata,
			(unsigned long)_einitdata);

	/*
	 * Free the pages mapped from 0xc0000000 that correspond to code
	 * pages from MEM_SV_INTRPT that we won't use again after init.
	 */
	free_init_pages("unused kernel text",
			(unsigned long)_sinittext - text_delta,
			(unsigned long)_einittext - text_delta);

#if !CHIP_HAS_COHERENT_LOCAL_CACHE()
	/*
	 * Upgrade the .w1data section to globally cached.
	 * We don't do this on tilepro, since the cache architecture
	 * pretty much makes it irrelevant, and in any case we end
	 * up having racing issues with other tiles that may touch
	 * the data after we flush the cache but before we update
	 * the PTEs and flush the TLBs, causing sharer shootdowns
	 * later.  Even though this is to clean data, it seems like
	 * an unnecessary complication.
	 */
	mark_w1data_ro();
#endif

	/* Do a global TLB flush so everyone sees the changes. */
	flush_tlb_all();
}
Ejemplo n.º 3
0
void __init prom_free_prom_memory(void)
{
	unsigned long addr;
	int i;

	for (i = 0; i < boot_mem_map.nr_map; i++) {
		if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
			continue;

		addr = boot_mem_map.map[i].addr;
		free_init_pages("YAMON memory",
				addr, addr + boot_mem_map.map[i].size);
	}
}
Ejemplo n.º 4
0
void __init prom_free_prom_memory(void)
{
	unsigned long addr;
	int i;

	if (prom_flags & PROM_FLAG_DONT_FREE_TEMP)
		return;

	for (i = 0; i < boot_mem_map.nr_map; i++) {
		if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
			continue;

		addr = boot_mem_map.map[i].addr;
		free_init_pages("prom memory",
				addr, addr + boot_mem_map.map[i].size);
	}
}
Ejemplo n.º 5
0
void __init prom_free_prom_memory(void)
{
	unsigned long end;

	/*
	 * Free everything below the kernel itself but leave
	 * the first page reserved for the exception handlers.
	 */

#if defined(CONFIG_DECLANCE) || defined(CONFIG_DECLANCE_MODULE)
	if (IOASIC)
		end = __pa(&_text) - 0x00020000;
	else
#endif
		end = __pa(&_text);

	free_init_pages("unused PROM memory", PAGE_SIZE, end);
}
Ejemplo n.º 6
0
void __init prom_free_prom_memory(void)
{
#ifdef DEBUG
	/* Nothing to do! Need only for DEBUG.	  */
	/* This is may be corrupt working memory. */

	unsigned long addr;
	int i;

	for (i = 0; i < boot_mem_map.nr_map; i++) {
		if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
			continue;

		addr = boot_mem_map.map[i].addr;
		free_init_pages("prom memory", addr, addr + boot_mem_map.map[i].size);
	}
#endif
}
Ejemplo n.º 7
0
void __init prom_free_prom_memory(void)
{
	unsigned long end;

	/*
	 * Free everything below the kernel itself but leave
	 * the first page reserved for the exception handlers.
	 */

#if IS_ENABLED(CONFIG_DECLANCE)
	/*
	 * Leave 128 KB reserved for Lance memory for
	 * IOASIC DECstations.
	 *
	 * XXX: save this address for use in dec_lance.c?
	 */
	if (IOASIC)
		end = __pa(&_text) - 0x00020000;
	else
#endif
		end = __pa(&_text);

	free_init_pages("unused PROM memory", PAGE_SIZE, end);
}
Ejemplo n.º 8
0
void __init prom_free_prom_memory(void)
{
	unsigned long end;

	/*
                                                     
                                                       
  */

#if defined(CONFIG_DECLANCE) || defined(CONFIG_DECLANCE_MODULE)
	/*
                                              
                       
   
                                                  
  */
	if (IOASIC)
		end = __pa(&_text) - 0x00020000;
	else
#endif
		end = __pa(&_text);

	free_init_pages("unused PROM memory", PAGE_SIZE, end);
}
Ejemplo n.º 9
0
void free_initrd_mem(unsigned long start, unsigned long end)
{
	free_init_pages("initrd memory", start, end);
}
Ejemplo n.º 10
0
/*
 * recycle memory containing stuff only required for initialisation
 */
void free_initmem(void)
{
	free_init_pages("unused kernel memory",
			(unsigned long) &__init_begin,
			(unsigned long) &__init_end);
}
Ejemplo n.º 11
0
static void free_init_pages_eva_malta(void *begin, void *end)
{
	free_init_pages("unused kernel", __pa_symbol((unsigned long *)begin),
			__pa_symbol((unsigned long *)end));
}
Ejemplo n.º 12
0
void __init_refok free_initmem(void)
{
    free_init_pages("unused kernel memory",
                    __pa(&__init_begin),
                    __pa(&__init_end));
}
Ejemplo n.º 13
0
void free_initrd_mem(unsigned long start, unsigned long end)
{
    free_init_pages("initrd memory",
                    virt_to_phys((void *) start),
                    virt_to_phys((void *) end));
}
Ejemplo n.º 14
0
void __init free_initrd_mem(unsigned long start, unsigned long end) {
	free_init_pages("initrd", start, end);
}