Date: Sun, 14 Jan 2018 09:57:14 -0800 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327950 - in head/sys/powerpc: aim include powerpc ps3 Message-ID: <b2b1bf30-177b-af30-54ce-f484224bb2ad@freebsd.org> In-Reply-To: <20180114175211.GD1684@kib.kiev.ua> References: <201801132314.w0DNEra5002692@repo.freebsd.org> <20180113232441.GV1684@kib.kiev.ua> <010d0153-8931-a3c2-db21-dfcbaf848fc0@freebsd.org> <f33e9b1a-28bd-e6cf-4bdb-ec0097c0787d@freebsd.org> <20180114083036.GX1684@kib.kiev.ua> <ede06fc6-7c34-100c-8a7a-6346cd8cd363@freebsd.org> <20180114170502.GB1684@kib.kiev.ua> <184ba3ee-a9f7-01ed-bb02-1bcba9acc041@freebsd.org> <20180114175211.GD1684@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/14/18 09:52, Konstantin Belousov wrote: > On Sun, Jan 14, 2018 at 09:30:53AM -0800, Nathan Whitehorn wrote: >> The immediate consequence of that is that no MI code that knows about >> direct maps can possibly take advantage of the direct map on this >> platform. Do we really want that to save some conditional logic that >> would get optimized out on amd64 and arm64 anyway? I really do not see >> the benefit here. > It is not clear what do you mean. Are you saying that there is no benefit > of providing the conditional logic, or that it is not benefit of exclusing > powerpc ? Sorry, that was poorly stated. Let me try again: If we make a PPC_PHYS_TO_DMAP(), but there is an MI PHYS_TO_DMAP() API, consumer code in the MI parts of the kernel won't be able to benefit from the PPC direct map, which seems unfortunate. The cost from a code perspective of having an if (direct_map_available) seems low, since on systems where direct_map_available is defined to be 1, the compiler will optimize it to the same code as if gated by #ifdef. It might be more cumbersome to write the code, however. > I do not object against adding the conditional, but it should not be > too clumsy to use. > OK. Let me try to draft something in the next couple days and see how much of a pain it is in practice. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2b1bf30-177b-af30-54ce-f484224bb2ad>