svn commit: r341781 - head/sys/powerpc/mpc85xx
Justin Hibbits
jhibbits at FreeBSD.org
Mon Dec 10 04:16:41 UTC 2018
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()) {
More information about the svn-src-all
mailing list