Skip to content

Commit

Permalink
x86, generic: mark early_printk as asmlinkage
Browse files Browse the repository at this point in the history
It's not explicitly marked as asmlinkage, but invoked from x86_32
startup code with parameters on stack.

No other architectures define early_printk and none of them are affected
by this change, since defines asmlinkage as empty token.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jiri Slaby authored and Ingo Molnar committed Jun 18, 2008
1 parent 87c8a64 commit e17ba73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static struct console simnow_console = {
static struct console *early_console = &early_vga_console;
static int early_console_initialized;

void early_printk(const char *fmt, ...)
asmlinkage void early_printk(const char *fmt, ...)
{
char buf[512];
int n;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
{ return false; }
#endif

extern void __attribute__((format(printf, 1, 2)))
extern void asmlinkage __attribute__((format(printf, 1, 2)))
early_printk(const char *fmt, ...);

unsigned long int_sqrt(unsigned long);
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/*
* Architectures can override it:
*/
void __attribute__((weak)) early_printk(const char *fmt, ...)
void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
{
}

Expand Down

0 comments on commit e17ba73

Please sign in to comment.