Re: [RFC][PATCHv2 4/7] printk: make alt_printk available when config printk set

From: Sergey Senozhatsky
Date: Sun Oct 09 2016 - 21:32:14 EST


On (10/06/16 17:23), Petr Mladek wrote:
> This line should be added already in the 3rd patch.
[..]
> Also the initialization of both irq works should be done already
> in the 3rd patch.

indeed. my bad. thanks.

> BTW: I have tried to simulate the compilation on an architecture
> without NMI (commented out HAVE_NMI in arch/x86/Kconfig
> and I have got the following build error with the first three
> patches only:
>
> LD init/built-in.o
> kernel/built-in.o: In function `vprintk':
> /prace/kernel/linux/kernel/printk/printk.c:1914: undefined reference to `vprintk_func'
> kernel/built-in.o: In function `printk':
> /prace/kernel/linux/kernel/printk/printk.c:1976: undefined reference to `vprintk_func'
> Makefile:949: recipe for target 'vmlinux' failed

Fengguang Wu reported a build error for V1 on some .configs, I thought it
was fixed in V2.

thanks a lot!

-ss

> Where the two lines are in:
>
> asmlinkage int vprintk(const char *fmt, va_list args)
> {
> return vprintk_func(fmt, args);
> }
>
> and
>
> asmlinkage __visible int printk(const char *fmt, ...)
> {
> va_list args;
> int r;
>
> va_start(args, fmt);
> r = vprintk_func(fmt, args);
> va_end(args);
>
> return r;
> }
>
>
> I know that it is a pain to make it all correctly. I suffered from headaches
> when preparing the WARN_*DEFERRED() patchset :-)