From owner-svn-src-head@freebsd.org Sun Jan 14 17:57:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4B2FE7D5C4; Sun, 14 Jan 2018 17:57:16 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94578258D; Sun, 14 Jan 2018 17:57:16 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (cpe-75-82-218-62.socal.res.rr.com [75.82.218.62]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w0EHvE89015613 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 14 Jan 2018 09:57:14 -0800 Subject: Re: svn commit: r327950 - in head/sys/powerpc: aim include powerpc ps3 To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801132314.w0DNEra5002692@repo.freebsd.org> <20180113232441.GV1684@kib.kiev.ua> <010d0153-8931-a3c2-db21-dfcbaf848fc0@freebsd.org> <20180114083036.GX1684@kib.kiev.ua> <20180114170502.GB1684@kib.kiev.ua> <184ba3ee-a9f7-01ed-bb02-1bcba9acc041@freebsd.org> <20180114175211.GD1684@kib.kiev.ua> From: Nathan Whitehorn Message-ID: Date: Sun, 14 Jan 2018 09:57:14 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180114175211.GD1684@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVZc900QzpK3FaLqJap6wcXAMdg+pRBAI6FkIyvzrfQ8u9dPj1nAG9ZYzc2vZvDoQRC//54EhzrGl5V4m5albj2O0WQqXYKNFSw= X-Sonic-ID: C;EhgrWlT55xGMQuBQ9eIpJw== M;0Jx5WlT55xGMQuBQ9eIpJw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jan 2018 17:57:16 -0000 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