Date: Mon, 10 Dec 2018 04:16:40 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341781 - head/sys/powerpc/mpc85xx Message-ID: <201812100416.wBA4Geah036409@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Mon Dec 10 04:16:40 2018 New Revision: 341781 URL: https://svnweb.freebsd.org/changeset/base/341781 Log: powerpc/booke: Replace a logical equivalent of pmap_kextract() with a real call No sense in reinventing the wheel here. AP bringup is not a time-critical point. Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Mon Dec 10 01:52:39 2018 (r341780) +++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Mon Dec 10 04:16:40 2018 (r341781) @@ -347,7 +347,7 @@ mpc85xx_smp_start_cpu_epapr(platform_t plat, struct pc rel_va = rel_page + (rel_pa & PAGE_MASK); pmap_kenter(rel_page, rel_pa & ~PAGE_MASK); rel = (struct cpu_release *)rel_va; - bptr = ((vm_paddr_t)(uintptr_t)__boot_page - __startkernel) + kernload; + bptr = pmap_kextract((uintptr_t)__boot_page); cpu_flush_dcache(__DEVOLATILE(struct cpu_release *,rel), sizeof(*rel)); rel->pir = pc->pc_cpuid; __asm __volatile("sync"); rel->entry_h = (bptr >> 32); @@ -416,7 +416,7 @@ mpc85xx_smp_start_cpu(platform_t plat, struct pcpu *pc /* Flush caches to have our changes hit DRAM. */ cpu_flush_dcache(__boot_page, 4096); - bptr = ((vm_paddr_t)(uintptr_t)__boot_page - __startkernel) + kernload; + bptr = pmap_kextract((uintptr_t)__boot_page); KASSERT((bptr & 0xfff) == 0, ("%s: boot page is not aligned (%#jx)", __func__, (uintmax_t)bptr)); if (mpc85xx_is_qoriq()) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812100416.wBA4Geah036409>