From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Ruffer Date: Thu, 6 May 2010 17:04:22 -0700 Subject: [U-Boot] Endless loop in cmd_log.c? In-Reply-To: <1273188447.22784.23.camel@localhost.localdomain> References: <1273069733-6194-1-git-send-email-weisserm@arcor.de> <1273069733-6194-2-git-send-email-weisserm@arcor.de> <1273069733-6194-3-git-send-email-weisserm@arcor.de> <1273069733-6194-4-git-send-email-weisserm@arcor.de> <012501caec88$40387670$c0a96350$@com> <1273188447.22784.23.camel@localhost.localdomain> Message-ID: <019a01caed78$da423170$8ec69450$@com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Peter, reply inline below... > -----Original Message----- > From: Peter Tyser [mailto:ptyser at xes-inc.com] > Sent: Thursday, May 06, 2010 4:27 PM > To: Dennis Ruffer > Cc: u-boot at lists.denx.de > Subject: Re: [U-Boot] Endless loop in cmd_log.c? > > Hi Dennis, > > On Wed, 2010-05-05 at 12:22 -0700, Dennis Ruffer wrote: > > I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our > ARM > > systems and I seem to have run into an endless loop. With loglevel=5 > so we > > still see our console output, the printf at the end of logbuff_printk > > appears to create an endless loop. > > > > I had to replace that line with serial_puts(msg); > > > > Have I missed some other solution or do the systems that use this > never set > > logbuffer higher than default_message_loglevel? > > I see the same issue you describe when enabling CONFIG_LOGBUFFER. It > looks like only a few boards have CONFIG_LOGBUFFER enabled, and many of > them also have CONFIG_SYS_CONSOLE_IS_IN_ENV defined. When > CONFIG_SYS_CONSOLE_IS_IN_ENV is defined I believe the behavior is > changed so that the the stdout/stderr/stdin values are read from the > environment, with a default fallback of 'serial'. > > My guess is most of the boards with CONFIG_LOGBUFFER defined have their > 'stdout' value set to 'serial', so they don't actually utilize the > logbuffer, and thus don't run into the issue you found. > > In any case, I think its a bug and your suggested workaround sounds > good > to me. Have any interest in submitting a patch to fix it? > > Best, > Peter I'm hoping to get setup to submit patches eventually, but I'm not there yet and it's not on my critical path at the moment. I'm just glad to hear I hadn't missed some critical setup piece. Thanks for verifying it! DaR