* [PATCH] 2.4.21 fixes
@ 2003-06-14 9:38 Geert Uytterhoeven
2003-06-16 15:05 ` Tom Rini
2003-06-19 1:52 ` Paul Mackerras
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2003-06-14 9:38 UTC (permalink / raw)
To: Linux/PPC Development
Hi,
Here are some fixes for 2.4.21 (current linuxppc_2_4):
- arch/ppc/kernel/checks.c: Kill warning about undeclared printf() by
including <stdio.h> _after_ all other includes (including it first doesn't
work)
- arch/ppc/kernel/open_pic.c: Kill warning about unused openpic_reset(). An
alternative is to add an #ifdef, but since it's never used before its
definition, just removing the forward declaration looks better to me
- arch/ppc/kernel/ppc_ksyms.c, arch/ppc/kernel/setup.c: Define and export
screen_info unconditionally, so vga16fb can be built as a module. An
alternative is to make the definition dependent on CONFIG_FB_VGA16 ||
CONFIG_FB_VGA16_MODULE, and the export on CONFIG_FB_VGA16_MODULE, but this
is ugly.
Another reason is that screen_info is referenced in
arch/ppc/platforms/prep_setup.c on the following (complex) condition:
#if defined(CONFIG_PREP_RESIDUAL) && \
(defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \
defined(CONFIG_FB_VESA))
which causes a link failure with the current code, too. The alternative
#ifdef solution would clutter this even more...
- include/asm-ppc/posix_types.h: Kill warning about incorrect printf()-style
format in the ext2 code by making __kernel_ino_t unsigned long, like on
most other architectures.
--- linuxppc_2_4/arch/ppc/kernel/checks.c.orig Fri Jun 13 18:06:31 2003
+++ linuxppc_2_4/arch/ppc/kernel/checks.c Fri Jun 13 21:56:25 2003
@@ -16,6 +16,8 @@
#include <asm/system.h>
#include <asm/io.h>
+#include <stdio.h>
+
/*
* Do various before compile checks of data structures
* -- Cort
--- linuxppc_2_4/arch/ppc/kernel/open_pic.c.orig Fri Jun 13 18:06:57 2003
+++ linuxppc_2_4/arch/ppc/kernel/open_pic.c Sat Jun 14 10:30:41 2003
@@ -69,7 +69,6 @@
* These functions are not used but the code is kept here
* for completeness and future reference.
*/
-static void openpic_reset(void);
#ifdef notused
static void openpic_enable_8259_pass_through(void);
static u_int openpic_get_priority(void);
--- linuxppc_2_4/arch/ppc/kernel/ppc_ksyms.c.orig Fri Jun 13 18:06:11 2003
+++ linuxppc_2_4/arch/ppc/kernel/ppc_ksyms.c Sat Jun 14 10:49:01 2003
@@ -292,9 +292,7 @@
EXPORT_SYMBOL(abs);
-#ifdef CONFIG_VGA_CONSOLE
EXPORT_SYMBOL(screen_info);
-#endif
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__sti);
--- linuxppc_2_4/arch/ppc/kernel/setup.c.orig Fri Jun 13 18:05:54 2003
+++ linuxppc_2_4/arch/ppc/kernel/setup.c Sat Jun 14 10:48:46 2003
@@ -89,7 +89,6 @@
int icache_bsize;
int ucache_bsize;
-#ifdef CONFIG_VGA_CONSOLE
struct screen_info screen_info = {
0, 25, /* orig-x, orig-y */
0, /* unused */
@@ -101,7 +100,6 @@
1, /* orig-video-isVGA */
16 /* orig-video-points */
};
-#endif /* CONFIG_VGA_CONSOLE */
void machine_restart(char *cmd)
{
--- linuxppc_2_4/include/asm-ppc/posix_types.h.orig Fri Jun 13 18:05:45 2003
+++ linuxppc_2_4/include/asm-ppc/posix_types.h Fri Jun 13 21:55:00 2003
@@ -8,7 +8,7 @@
*/
typedef unsigned int __kernel_dev_t;
-typedef unsigned int __kernel_ino_t;
+typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.21 fixes
2003-06-14 9:38 [PATCH] 2.4.21 fixes Geert Uytterhoeven
@ 2003-06-16 15:05 ` Tom Rini
2003-06-19 1:52 ` Paul Mackerras
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2003-06-16 15:05 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/PPC Development
On Sat, Jun 14, 2003 at 11:38:01AM +0200, Geert Uytterhoeven wrote:
> - arch/ppc/kernel/checks.c: Kill warning about undeclared printf() by
> including <stdio.h> _after_ all other includes (including it first doesn't
> work)
This should probably just die since it hasn't been useful in a long
time.
> - arch/ppc/kernel/open_pic.c: Kill warning about unused openpic_reset(). An
> alternative is to add an #ifdef, but since it's never used before its
> definition, just removing the forward declaration looks better to me
That reference can go, but the actual call needs an ifdef, see _devel.
> - arch/ppc/kernel/ppc_ksyms.c, arch/ppc/kernel/setup.c: Define and export
> screen_info unconditionally, so vga16fb can be built as a module. An
> alternative is to make the definition dependent on CONFIG_FB_VGA16 ||
> CONFIG_FB_VGA16_MODULE, and the export on CONFIG_FB_VGA16_MODULE, but this
> is ugly.
>
> Another reason is that screen_info is referenced in
> arch/ppc/platforms/prep_setup.c on the following (complex) condition:
>
> #if defined(CONFIG_PREP_RESIDUAL) && \
> (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \
> defined(CONFIG_FB_VESA))
>
> which causes a link failure with the current code, too. The alternative
> #ifdef solution would clutter this even more...
Eh? What set of conditionals doesn't work, in _devel ? In fact, I bet
what happened is that when Paul updated the prep stuff he forgot to grab
the screen_info stuff. IIRC, there was a "good" reason for not doing it
unconditionally, possibly wasted space.
> - include/asm-ppc/posix_types.h: Kill warning about incorrect printf()-style
> format in the ext2 code by making __kernel_ino_t unsigned long, like on
> most other architectures.
Should be fine.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.21 fixes
2003-06-14 9:38 [PATCH] 2.4.21 fixes Geert Uytterhoeven
2003-06-16 15:05 ` Tom Rini
@ 2003-06-19 1:52 ` Paul Mackerras
2003-06-19 8:02 ` Geert Uytterhoeven
1 sibling, 1 reply; 4+ messages in thread
From: Paul Mackerras @ 2003-06-19 1:52 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/PPC Development
Geert Uytterhoeven writes:
> - arch/ppc/kernel/checks.c: Kill warning about undeclared printf() by
> including <stdio.h> _after_ all other includes (including it first doesn't
> work)
checks.c is broken for cross-compiling anyway, I would rather just
remove it.
> - arch/ppc/kernel/open_pic.c: Kill warning about unused openpic_reset(). An
> alternative is to add an #ifdef, but since it's never used before its
> definition, just removing the forward declaration looks better to me
OK.
> - arch/ppc/kernel/ppc_ksyms.c, arch/ppc/kernel/setup.c: Define and export
> screen_info unconditionally, so vga16fb can be built as a module. An
> alternative is to make the definition dependent on CONFIG_FB_VGA16 ||
> CONFIG_FB_VGA16_MODULE, and the export on CONFIG_FB_VGA16_MODULE, but this
> is ugly.
>
> Another reason is that screen_info is referenced in
> arch/ppc/platforms/prep_setup.c on the following (complex) condition:
>
> #if defined(CONFIG_PREP_RESIDUAL) && \
> (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \
> defined(CONFIG_FB_VESA))
>
> which causes a link failure with the current code, too. The alternative
> #ifdef solution would clutter this even more...
I think we could make this depend on CONFIG_FB. I don't think we want
to make it depend on CONFIG_FB_VGA_16_MODULE since that would mean
that you couldn't set CONFIG_FB_VGA_16=m and make a module that would
work with an existing kernel that had been compiled with
CONFIG_FB_VGA_16=n. The screen_info structure is only 52 bytes so
it's not that big a deal to have it always included if CONFIG_FB=y.
> - include/asm-ppc/posix_types.h: Kill warning about incorrect printf()-style
> format in the ext2 code by making __kernel_ino_t unsigned long, like on
> most other architectures.
Yes, good idea.
I'll send this stuff to Marcelo in due course.
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] 2.4.21 fixes
2003-06-19 1:52 ` Paul Mackerras
@ 2003-06-19 8:02 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2003-06-19 8:02 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Linux/PPC Development
On Thu, 19 Jun 2003, Paul Mackerras wrote:
> Geert Uytterhoeven writes:
> > - arch/ppc/kernel/ppc_ksyms.c, arch/ppc/kernel/setup.c: Define and export
> > screen_info unconditionally, so vga16fb can be built as a module. An
> > alternative is to make the definition dependent on CONFIG_FB_VGA16 ||
> > CONFIG_FB_VGA16_MODULE, and the export on CONFIG_FB_VGA16_MODULE, but this
> > is ugly.
> >
> > Another reason is that screen_info is referenced in
> > arch/ppc/platforms/prep_setup.c on the following (complex) condition:
> >
> > #if defined(CONFIG_PREP_RESIDUAL) && \
> > (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \
> > defined(CONFIG_FB_VESA))
> >
> > which causes a link failure with the current code, too. The alternative
> > #ifdef solution would clutter this even more...
>
> I think we could make this depend on CONFIG_FB. I don't think we want
Don't forget it's also needed for CONFIG_VGA_CONSOLE.
> to make it depend on CONFIG_FB_VGA_16_MODULE since that would mean
> that you couldn't set CONFIG_FB_VGA_16=m and make a module that would
> work with an existing kernel that had been compiled with
> CONFIG_FB_VGA_16=n. The screen_info structure is only 52 bytes so
> it's not that big a deal to have it always included if CONFIG_FB=y.
BTW, the only reason it's needed for vga16fb is the ORIG_VIDEO_ISVGA define.
Perhaps there's some way to kill that one? It's useless on machines without a
PC BIOS anyway. If we would hardcode all ORIG_VIDEO_* defines in <linux/tty.h>,
we can get rid of screen_info for both vga16fb and vgacon.
Then all that's left is screen_info.orig_video_isVGA in vesafb.c...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-19 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-14 9:38 [PATCH] 2.4.21 fixes Geert Uytterhoeven
2003-06-16 15:05 ` Tom Rini
2003-06-19 1:52 ` Paul Mackerras
2003-06-19 8:02 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).