From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 20 Jan 2017 15:57:23 -0500 Subject: [U-Boot] [U-Boot, 1/2] spl: Move check for SPL_LIBCOMMON support to header In-Reply-To: <547f1960-1437-cb4c-f434-b35fabb21204@ti.com> References: <20170106193545.27832-1-afd@ti.com> <20170120162515.GN25981@bill-the-cat> <547f1960-1437-cb4c-f434-b35fabb21204@ti.com> Message-ID: <20170120205723.GP25981@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Jan 20, 2017 at 10:38:41AM -0600, Andrew F. Davis wrote: > On 01/20/2017 10:25 AM, Tom Rini wrote: > > On Fri, Jan 06, 2017 at 01:35:44PM -0600, Andrew F. Davis wrote: > > > >> Print statements in SPL depend on lib/common support, so many such > >> statements are ifdef'd, move the check to the common.h header and > >> remove these inline checks. > >> > >> Signed-off-by: Andrew F. Davis > >> Reviewed-by: Tom Rini > > > > This patch is a good example of why travis-ci is useful, even if takes a > > few hours for the cycle to complete (kick it off and check the results > > in the morning :)). As is, it's broken on PowerPC (where > > CONFIG_SPL_INIT_MINIMAL is the conditional for puts/printf/etc), mx31pdk > > and evb-rk3036 (and this is an incomplete list). The ARM targets are > > harder to just fix as it shows an underlying problem. Today we have no > > single symbol that means "In SPL I want serial output" (and ditto TPL). > > We try and rely on SPL_SERIAL_SUPPORT but this misses the case where we > > use neither TINY_PRINTF nor LIBCOMMON but instead have only puts > > available in a more raw way. So before we can make the type of change > > you're doing here we need to introduce a symbol that means "I have > > output". That will also greatly reduce the logic needed in the tests in > > common.h for having puts/etc be real or do-while loops. Thanks! > > Ahh, I was expecting something like this happening with all the levels > of ifdef logic involved. Could we keep this patch and add > CONFIG_SPL_INIT_MINIMAL to the check in common.h? I did that, but it does not address the problem of mx31pdk and rockchip and others. > Removing all these various ifdefs from files is still correct, all this > ifdef logic should *not* be around calls to puts/etc in-line in the > code, all we need is to figure out the logic for the function's > definitions in common.h, which can be cleaned up in a later patch. Well, thinking about this harder. What would be OK for now would be a v2 (that you've pushed through travis-ci) that just removes the tests as that should be OK. But... I wonder if we don't have those tests due to needing to #if out the prints due to the gcc bug[1] that's only fixed in gcc 6.x and later. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303 -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: