public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Kay Sievers <kay@vrfy.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: linux-next: Tree for May 8 (printk)
Date: Tue, 08 May 2012 16:27:18 -0700	[thread overview]
Message-ID: <4FA9ABD6.6030006@xenotime.net> (raw)
In-Reply-To: <1336518821.728.1.camel@mop>

On 05/08/2012 04:13 PM, Kay Sievers wrote:

> On Tue, 2012-05-08 at 09:24 -0700, Randy Dunlap wrote:
>> On 05/08/2012 01:15 AM, Stephen Rothwell wrote:
> 
>> Build errors on i386 and x86_64 when CONFIG_PRINTK is not enabled:
> 
> This seems to work for me.

It still has one build error which was in the initial report:

drivers/char/mem.c:858:2: error: implicit declaration of function 'printk_emit'



> Thanks,
> Kay
> 
> From: Kay Sievers <kay@vrfy.org>
> Subject: printk - fix compilation for CONFIG_PRINTK=n
> 
> Signed-off-by: Kay Sievers <kay@vrfy.org>
> ---
>  kernel/printk.c |   41 ++++++++++++++++++++++-------------------
>  1 file changed, 22 insertions(+), 19 deletions(-)
> 
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -126,7 +126,6 @@ EXPORT_SYMBOL(console_set_on_cmdline);
>  /* Flag: console code may call schedule() */
>  static int console_may_schedule;
>  
> -#ifdef CONFIG_PRINTK
>  /*
>   * The printk log buffer consists of a chain of concatenated variable
>   * length records. Every record starts with a record header, containing
> @@ -208,16 +207,9 @@ struct log {
>   */
>  static DEFINE_RAW_SPINLOCK(logbuf_lock);
>  
> -/* cpu currently holding logbuf_lock */
> -static volatile unsigned int logbuf_cpu = UINT_MAX;
> -
> -#define LOG_LINE_MAX 1024
> -
> -/* record buffer */
> -#define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
> -static char __log_buf[__LOG_BUF_LEN];
> -static char *log_buf = __log_buf;
> -static u32 log_buf_len = __LOG_BUF_LEN;
> +/* the next printk record to read by syslog(READ) or /proc/kmsg */
> +static u64 syslog_seq;
> +static u32 syslog_idx;
>  
>  /* index and sequence number of the first record stored in the buffer */
>  static u64 log_first_seq;
> @@ -225,15 +217,23 @@ static u32 log_first_idx;
>  
>  /* index and sequence number of the next record to store in the buffer */
>  static u64 log_next_seq;
> +#ifdef CONFIG_PRINTK
>  static u32 log_next_idx;
>  
>  /* the next printk record to read after the last 'clear' command */
>  static u64 clear_seq;
>  static u32 clear_idx;
>  
> -/* the next printk record to read by syslog(READ) or /proc/kmsg */
> -static u64 syslog_seq;
> -static u32 syslog_idx;
> +#define LOG_LINE_MAX 1024
> +
> +/* record buffer */
> +#define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
> +static char __log_buf[__LOG_BUF_LEN];
> +static char *log_buf = __log_buf;
> +static u32 log_buf_len = __LOG_BUF_LEN;
> +
> +/* cpu currently holding logbuf_lock */
> +static volatile unsigned int logbuf_cpu = UINT_MAX;
>  
>  /* human readable text of the record */
>  static char *log_text(const struct log *msg)
> @@ -1425,13 +1425,16 @@ asmlinkage int printk(const char *fmt, .
>  	return r;
>  }
>  EXPORT_SYMBOL(printk);
> +
>  #else
>  
> -static void call_console_drivers(int level, const char *text, size_t len)
> -{
> -}
> +#define LOG_LINE_MAX 0
> +static struct log *log_from_idx(u32 idx) { return NULL; }
> +static u32 log_next(u32 idx) { return 0; }
> +static char *log_text(const struct log *msg) { return NULL; }
> +static void call_console_drivers(int level, const char *text, size_t len) {}
>  
> -#endif
> +#endif /* CONFIG_PRINTK */
>  
>  static int __add_preferred_console(char *name, int idx, char *options,
>  				   char *brl_options)
> @@ -1715,7 +1718,7 @@ static u32 console_idx;
>   * by printk().  If this is the case, console_unlock(); emits
>   * the output prior to releasing the lock.
>   *
> - * If there is output waiting, we wake it /dev/kmsg and syslog() users.
> + * If there is output waiting, we wake /dev/kmsg and syslog() users.
>   *
>   * console_unlock(); may be called from any context.
>   */
> 
> 



-- 
~Randy

  reply	other threads:[~2012-05-08 23:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08  8:15 linux-next: Tree for May 8 Stephen Rothwell
2012-05-08 16:24 ` linux-next: Tree for May 8 (printk) Randy Dunlap
2012-05-08 23:13   ` Kay Sievers
2012-05-08 23:27     ` Randy Dunlap [this message]
2012-05-08 23:37       ` Kay Sievers
2012-05-09  0:18         ` Randy Dunlap
2012-05-09  0:45           ` Kay Sievers
2012-05-08 16:27 ` linux-next: Tree for May 8 (gpu/drm/gma500) Randy Dunlap
2012-05-08 16:30   ` Dave Airlie
2012-05-08 20:53   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FA9ABD6.6030006@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox