From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 30 Sep 2016 22:38:22 -0400 Subject: [U-Boot] [PATCH v3 03/29] Convert CONSOLE_PRE_CONSOLE_BUFFER options to Kconfig In-Reply-To: <20160930090044.290cccee@i7> References: <1475180609-14716-1-git-send-email-sjg@chromium.org> <1475180609-14716-4-git-send-email-sjg@chromium.org> <20160930090044.290cccee@i7> Message-ID: <20161001023822.GK4884@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, Sep 30, 2016 at 09:00:44AM +0300, Siarhei Siamashka wrote: > Hello Simon, > > On Thu, 29 Sep 2016 14:23:02 -0600 > Simon Glass wrote: > > > Move these option to Kconfig and tidy up existing uses. > > > > Signed-off-by: Simon Glass > > --- > > > > Changes in v3: None > > Changes in v2: > > - Change CONFIG_PRE_CON_BUF_SZ default to 4096 > > - Change CONFIG_PRE_CON_BUF_SZ to 'int' type > > - Drop the depend clause on the CONFIG_PRE_CON_BUF_SZ default > > - Move CONFIG_PRE_CON_BUF_ADDR default to common/Kconfig > > What is the point moving these defines to Kconfig? They are neither > user configurable, nor board specific. The location of the buffer is > defined per platform or per SoC type and is a part of the global memory > map. Similar to such things as the malloc heap and the stack. This is a good point to bring up. As we're discussing in another thread about moving FSL things out of CONFIG_SYS_... and into Kconfig or a different namespace, we have other examples today where there's addresses in Kconfig. Looking harder still at this code, perhaps as a follow-up CONFIG_PRE_CON_BUF_SZ should just be 'PRE_CON_BUF_SIZE' in the code and 4096, and not in Kconfig at all. And for this series, make the default tbs2910 uses the default for ARCH_MX6. > Allowing the users to redefine the buffer location is a dangerous thing > because everything may go out of control very easily (it may overlap > with some other memory buffer). IMHO it only makes sense to have a > single user configurable boolean flag in Kconfig (the one which > enables/disables the pre-console functionality). > > Regarding the buffer size. It was originally picked rather arbitrarily > as 1MB at least for the sunxi platform: > > https://patchwork.ozlabs.org/patch/426526/ > > Just because making it several orders of magnitude larger than > necessary makes it extremely unlikely that anyone ever gets into > a buffer wraparound situation. Picking smallish sizes does not gain > us anything, but just adds an extra hassle because now one needs to > make some estimations whether the size is large enough or not. > Especially considering that this functionality may be sometimes > used for debugging prints when troubleshooting something. And one > can't easily predict how much debugging output would be actually > necessary. So maybe we should hide the size option under EXPERT? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: