static void __iomem * __init earlycon_map(unsigned long paddr, size_t size)
{
    void __iomem *base;
#ifdef CONFIG_FIX_EARLYCON_MEM
    set_fixmap_io(FIX_EARLYCON_MEM_BASE, paddr & PAGE_MASK);
    base = (void __iomem *)__fix_to_virt(FIX_EARLYCON_MEM_BASE);
    base += paddr & ~PAGE_MASK;
#else
    base = ioremap(paddr, size);
#endif
    if (!base)
        pr_err("%s: Couldn't map 0x%llx\n", __func__,
               (unsigned long long)paddr);

    return base;
}
/*
 * Initialise the CPU possible map early - this describes the CPUs
 * which may be present or become present in the system.
 */
static void __init arm_smp_init_cpus(void)
{
	unsigned int i, ncores;
	void __iomem *base;

	set_fixmap_io(FIX_SMP_MEM_BASE, MSM_APCS_IDR & PAGE_MASK);
	base = (void __iomem *)__fix_to_virt(FIX_SMP_MEM_BASE);
	base += MSM_APCS_IDR & ~PAGE_MASK;

	ncores = (__raw_readl(base)) & 0xF;

	if (ncores > nr_cpu_ids) {
		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
			ncores, nr_cpu_ids);
		ncores = nr_cpu_ids;
	}

	for (i = 0; i < nr_cpu_ids; i++)
		set_cpu_possible(i, true);

}