Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758148AbZIORz4 (ORCPT ); Tue, 15 Sep 2009 13:55:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757648AbZIORzu (ORCPT ); Tue, 15 Sep 2009 13:55:50 -0400 Received: from smtp.zeugmasystems.com ([70.79.96.174]:21265 "EHLO zeugmasystems.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754486AbZIORzt convert rfc822-to-8bit (ORCPT ); Tue, 15 Sep 2009 13:55:49 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH] cleanup legacy console_print function Date: Tue, 15 Sep 2009 10:55:26 -0700 Message-ID: In-Reply-To: <200909151127.10697.bjorn.helgaas@hp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] cleanup legacy console_print function Thread-Index: Aco2Kdv8oTTXMrF/SP23bUvbRH1AuQAA4OgQ References: <200909151127.10697.bjorn.helgaas@hp.com> From: "Anirban Sinha" To: "Bjorn Helgaas" Cc: "Linus Torvalds" , , "Randy Dunlap" , , "Luck, Tony" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5749 Lines: 197 Oops! Sorry for breaking the build. I do not have a intel 64 machine to try my change. However, I believe this will help: diff --git a/arch/ia64/kernel/head.h b/arch/ia64/kernel/head.h index 2e2ac68..e762125 100644 --- a/arch/ia64/kernel/head.h +++ b/arch/ia64/kernel/head.h @@ -1 +1,3 @@ +#ifndef __ASSEMBLY__ extern void console_print(const char *s); +#endif Can you please try this patch and test if this fixed it. If it does, I will go ahead, commit the change locally and post the final patch. Ani >-----Original Message----- >From: Bjorn Helgaas [mailto:bjorn.helgaas@hp.com] >Sent: Tuesday, September 15, 2009 10:27 AM >To: Anirban Sinha >Cc: Linus Torvalds; linux-kernel@vger.kernel.org; Randy Dunlap; linux- >ia64@vger.kernel.org; Luck, Tony >Subject: Re: [PATCH] cleanup legacy console_print function > >On Monday 14 September 2009 12:28:21 pm Anirban Sinha wrote: >> From e096c1774450f8348a7af3b7e47800710a490212 Mon Sep 17 00:00:00 2001 >> From: Anirban Sinha >> Date: Mon, 14 Sep 2009 11:13:37 -0700 >> Subject: cleanup console_print() >> >> console_print() is an old legacy interface mostly unused in the entire >> kernel tree. It's best to clean up its existing use and let developers >> use their own implementation of it as they feel fit. > >This broke the ia64 build, please fix: > >arch/ia64/kernel/head.h: Assembler messages: >arch/ia64/kernel/head.h:1: Error: Unknown opcode `extern void >console_print(const char*s)' >make[1]: *** [arch/ia64/kernel/head.o] Error 1 >make[1]: *** Waiting for unfinished jobs.... > >Bjorn > > >> --- >> arch/ia64/kernel/head.S | 1 + >> arch/ia64/kernel/head.h | 1 + >> arch/ia64/kernel/process.c | 7 +++++++ >> drivers/char/serial167.c | 5 ++--- >> include/linux/dtlk.h | 19 ------------------- >> include/linux/tty.h | 4 ---- >> kernel/printk.c | 6 ------ >> 7 files changed, 11 insertions(+), 32 deletions(-) >> create mode 100644 arch/ia64/kernel/head.h >> >> diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S >> index 23f846d..e6c5c3d 100644 >> --- a/arch/ia64/kernel/head.S >> +++ b/arch/ia64/kernel/head.S >> @@ -34,6 +34,7 @@ >> #include >> #include >> #include >> +#include "head.h" >> >> #ifdef CONFIG_HOTPLUG_CPU >> #define SAL_PSR_BITS_TO_SET \ >> diff --git a/arch/ia64/kernel/head.h b/arch/ia64/kernel/head.h >> new file mode 100644 >> index 0000000..2e2ac68 >> --- /dev/null >> +++ b/arch/ia64/kernel/head.h >> @@ -0,0 +1 @@ >> +extern void console_print(const char *s); >> diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c >> index 89969e9..b34bef7 100644 >> --- a/arch/ia64/kernel/process.c >> +++ b/arch/ia64/kernel/process.c >> @@ -161,6 +161,13 @@ show_regs (struct pt_regs *regs) >> show_stack(NULL, NULL); >> } >> >> +/* local support for deprecated console_print */ >> +void >> +console_print(const char *s) >> +{ >> + printk(KERN_EMERG "%s", s); >> +} >> + >> void >> do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long >> in_syscall) >> { >> diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c >> index 51e7a46..5942a9d 100644 >> --- a/drivers/char/serial167.c >> +++ b/drivers/char/serial167.c >> @@ -171,7 +171,6 @@ static int startup(struct cyclades_port *); >> static void cy_throttle(struct tty_struct *); >> static void cy_unthrottle(struct tty_struct *); >> static void config_setup(struct cyclades_port *); >> -extern void console_print(const char *); >> #ifdef CYCLOM_SHOW_STATUS >> static void show_status(int); >> #endif >> @@ -245,7 +244,7 @@ void SP(char *data) >> { >> unsigned long flags; >> local_irq_save(flags); >> - console_print(data); >> + printk(KERN_EMERG "%s", data); >> local_irq_restore(flags); >> } >> >> @@ -255,7 +254,7 @@ void CP(char data) >> unsigned long flags; >> local_irq_save(flags); >> scrn[0] = data; >> - console_print(scrn); >> + printk(KERN_EMERG "%c", scrn); >> local_irq_restore(flags); >> } /* CP */ >> >> diff --git a/include/linux/dtlk.h b/include/linux/dtlk.h >> index 2896d90..22a7b9a 100644 >> --- a/include/linux/dtlk.h >> +++ b/include/linux/dtlk.h >> @@ -1,22 +1,3 @@ >> -#if 0 >> - >> -#define TRACE_TXT(text) \ >> - { \ >> - if(dtlk_trace) \ >> - { \ >> - console_print(text); \ >> - console_print("\n"); \ >> - } \ >> - } >> - >> -#define TRACE_CHR(chr) \ >> - { \ >> - if(dtlk_trace) \ >> - console_print(chr); \ >> - } \ >> - >> -#endif >> - >> #define DTLK_MINOR 0 >> #define DTLK_IO_EXTENT 0x02 >> >> diff --git a/include/linux/tty.h b/include/linux/tty.h >> index 0d3974f..a916a31 100644 >> --- a/include/linux/tty.h >> +++ b/include/linux/tty.h >> @@ -519,10 +519,6 @@ extern void serial_console_init(void); >> >> extern int pcxe_open(struct tty_struct *tty, struct file *filp); >> >> -/* printk.c */ >> - >> -extern void console_print(const char *); >> - >> /* vt.c */ >> >> extern int vt_ioctl(struct tty_struct *tty, struct file *file, >> diff --git a/kernel/printk.c b/kernel/printk.c >> index e10d193..602033a 100644 >> --- a/kernel/printk.c >> +++ b/kernel/printk.c >> @@ -1075,12 +1075,6 @@ void __sched console_conditional_schedule(void) >> } >> EXPORT_SYMBOL(console_conditional_schedule); >> >> -void console_print(const char *s) >> -{ >> - printk(KERN_EMERG "%s", s); >> -} >> -EXPORT_SYMBOL(console_print); >> - >> void console_unblank(void) >> { >> struct console *c; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/