public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Linux 2.5.30: [SERIAL] build fails at 8250.c
@ 2002-08-03  0:20 Adam J. Richter
  2002-08-03  8:05 ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Adam J. Richter @ 2002-08-03  0:20 UTC (permalink / raw)
  To: rmk; +Cc: axel, linux-kernel, linux-serial, tytso

On Sat, 3 Aug 2002 01:12:10 +0100, Russell King wrote:
>Ok, here's a fix for the 8250.c build problem (please don't send it
>to Linus; I've other changes that'll be going via BK and patch to
>lkml pending):
>
>--- orig/drivers/serial/8250.c  Fri Aug  2 21:13:31 2002
>+++ linux/drivers/serial/8250.c Sat Aug  3 00:28:47 2002
>@@ -31,7 +31,8 @@
> #include <linux/console.h>
> #include <linux/sysrq.h>
> #include <linux/serial_reg.h>
>-#include <linux/serialP.h>
>+#include <linux/circ_buf.h>
>+#include <linux/serial.h>
> #include <linux/delay.h>
> 
> #include <asm/io.h>

	Your patch still results in a compilation error for me.
It looks like 8250.c needs <linux/serialP.h> for ALPHA_KLUDGE_MCR:

  gcc -Wp,-MD,./.8250.o.d -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i386 -nostdinc -iwithprefix include -DMODULE -include /usr/src/linux/include/linux/modversions.h   -DKBUILD_BASENAME=8250 -DEXPORT_SYMTAB  -c -o 8250.o 8250.c
8250.c: In function `serial8250_set_mctrl':
8250.c:1061: `ALPHA_KLUDGE_MCR' undeclared (first use in this function)
8250.c:1061: (Each undeclared identifier is reported only once
8250.c:1061: for each function it appears in.)

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Linux 2.5.30: [SERIAL] build fails at 8250.c
@ 2002-08-03  8:42 Adam J. Richter
  0 siblings, 0 replies; 7+ messages in thread
From: Adam J. Richter @ 2002-08-03  8:42 UTC (permalink / raw)
  To: rmk; +Cc: axel, linux-kernel, linux-serial, tytso

On Sat, 3 Aug 2002 09:05:23 +0100, Russell King wrote:
>On Fri, Aug 02, 2002 at 05:20:28PM -0700, Adam J. Richter wrote:
>> On Sat, 3 Aug 2002 01:12:10 +0100, Russell King wrote:
>> >Ok, here's a fix for the 8250.c build problem (please don't send it
>> >to Linus; I've other changes that'll be going via BK and patch to
>> >lkml pending):
>> >
>> >--- orig/drivers/serial/8250.c  Fri Aug  2 21:13:31 2002
>> >+++ linux/drivers/serial/8250.c Sat Aug  3 00:28:47 2002
>> >@@ -31,7 +31,8 @@
>> > #include <linux/console.h>
>> > #include <linux/sysrq.h>
>> > #include <linux/serial_reg.h>
>> >-#include <linux/serialP.h>
>> >+#include <linux/circ_buf.h>
>> >+#include <linux/serial.h>
>> > #include <linux/delay.h>
>> > 
>> > #include <asm/io.h>
>> 
>> 	Your patch still results in a compilation error for me.
>> It looks like 8250.c needs <linux/serialP.h> for ALPHA_KLUDGE_MCR:

>Your quote above didn't include the patch for 8250.h which was in my
>mail directly after 8250.c.  Did you specifically miss it for a reason?

	Doh!  Sorry, my mistake.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Linux 2.5.30: [SERIAL] build fails at 8250.c
@ 2002-08-02 22:49 Adam J. Richter
  2002-08-02 23:56 ` Russell King
       [not found] ` <20020803005626.D16963@flint.arm.linux.org.uk>
  0 siblings, 2 replies; 7+ messages in thread
From: Adam J. Richter @ 2002-08-02 22:49 UTC (permalink / raw)
  To: tytso; +Cc: linux-serial, linux-kernel, axel, rmk

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

	linux-2.5.30/include/linux/serialP.h needs struct async_icount,
which is defined in <linux/serial.h>, causing
linux-2.5.30/drivers/serial/8250.c not to compile, among other problems.
In linux-2.5.30, you cannot compile a file that includes <linux/serialP.h>
without including <linux/serial.h>.  So, I think the solution is for
serialP.h to #include serial.h.  I have attached a patch that does this.

	From the comments in serialP.h, it looks like there was some
effort in linux-2.2 to allow inclusion of serialP.h without serial.h,
but I see no indication of what benefit that was supposed to provide.

	Ted (or whowever gathers drivers/serial patches for Linus), do
you want to shepherd this change to Linus, do you want me to submit it
directly, or do you want to do something else?

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

[-- Attachment #2: serialP.diff --]
[-- Type: text/plain, Size: 451 bytes --]

--- linux-2.5.30/include/linux/serialP.h	2002-08-01 14:16:07.000000000 -0700
+++ linux/include/linux/serialP.h	2002-08-02 14:51:03.000000000 -0700
@@ -24,11 +24,7 @@
 #include <linux/tqueue.h>
 #include <linux/circ_buf.h>
 #include <linux/wait.h>
-#if (LINUX_VERSION_CODE < 0x020300)
-/* Unfortunate, but Linux 2.2 needs async_icount defined here and
- * it got moved in 2.3 */
 #include <linux/serial.h>
-#endif
 
 struct serial_state {
 	int	magic;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-08-03  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-03  0:20 Linux 2.5.30: [SERIAL] build fails at 8250.c Adam J. Richter
2002-08-03  8:05 ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2002-08-03  8:42 Adam J. Richter
2002-08-02 22:49 Adam J. Richter
2002-08-02 23:56 ` Russell King
     [not found] ` <20020803005626.D16963@flint.arm.linux.org.uk>
2002-08-03  0:12   ` Russell King
2002-08-03  1:05   ` Kai Germaschewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox