Date: Wed, 31 Oct 2012 23:04:15 +0100 From: Giovanni Trematerra <gianni@freebsd.org> To: Olivier Houchard <cognet@ci0.org> Cc: freebsd-arm@freebsd.org Subject: Re: [PATCH] use vtophys instead of pmap_kextract Message-ID: <CACfq090X8Uns_EA%2BAKmSJXpbG0Z0uZ_d1EGhf=gmyfTQavtwxQ@mail.gmail.com> In-Reply-To: <20121031102536.GA25336@ci0.org> References: <CACfq093f9w8BXOboHV0jy6OMKjCdVaD5BJPT%2BgZ9bn%2ByuQJHbg@mail.gmail.com> <20121031102536.GA25336@ci0.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 31, 2012 at 11:25 AM, Olivier Houchard <cognet@ci0.org> wrote: > > Hi Giovanni, > > On Tue, Oct 30, 2012 at 11:12:20PM +0100, Giovanni Trematerra wrote: > > Hi, > > could you please review and commit the patch below? > > > > The patch changes the calls to pmap_kextract in vtophys macro. > > This also fixes a compiler warning when SMP is enabled to Marvel > > ARMADA XP boards. > > > > I'm not sure there's a point in doing this, the uses of pmap_kextract() are > legit, and using vtophys() instead would just hide potential type bugs. I'd > rather just explicitely add a cast in the Marvel code, as your original patch > for the TI code did. Well, I'd prefer to not see casts here and there in the kernel and vtophys seems a good way to go. So I can understand to not make changes in busdma_machdep[-v6].c where no casts are needed and my changes were only for uniformity but I still think that to silent the compiler warning we should use vtophys rather than pmap_kextract directly. Anyway I'm not going to argue on that. Here it is the patch to fix the compiler warning for Marvel ARMADA XP board. Thank you -- Gianni Index: sys/arm/mv/armadaxp/armadaxp_mp.c =================================================================== --- sys/arm/mv/armadaxp/armadaxp_mp.c (revision 242212) +++ sys/arm/mv/armadaxp/armadaxp_mp.c (working copy) @@ -179,7 +179,7 @@ platform_mp_start_ap(void) for (cpu_num = 1; cpu_num < mp_ncpus; cpu_num++ ) bus_space_write_4(fdtbus_bs_tag, CPU_PMU(cpu_num), CPU_PMU_BOOT, - pmap_kextract(mpentry)); + pmap_kextract((vm_offset_t)mpentry)); cpu_idcache_wbinv_all();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACfq090X8Uns_EA%2BAKmSJXpbG0Z0uZ_d1EGhf=gmyfTQavtwxQ>