* A little fix
@ 2001-11-27 22:36 Michael Sokolov
2001-11-28 7:25 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Michael Sokolov @ 2001-11-27 22:36 UTC (permalink / raw)
To: linuxppc-dev
OK, I goofed. It's struct bi_record, not struct bootinfo. I have no idea how I
could have screwed it up and how could the compiler have missed it. Is it
another gcc extension to allow struct never_heard_of * as OK? The patch below
fixes it. It also fixes a remaining bit of the kernel=>platforms rename.
MS
diff --minimal -Nru a/arch/ppc/boot/common/misc-simple.c b/arch/ppc/boot/common/misc-simple.c
--- a/arch/ppc/boot/common/misc-simple.c Tue Nov 27 14:21:26 2001
+++ b/arch/ppc/boot/common/misc-simple.c Tue Nov 27 14:21:26 2001
@@ -58,13 +58,13 @@
extern void gunzip(void *, int, unsigned char *, int *);
extern void setup_legacy(void);
-struct bootinfo *
+struct bi_record *
decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
{
int timer = 0;
char *cp, ch;
struct bi_record *rec;
- struct bootinfo *birecs;
+ struct bi_record *birecs;
setup_legacy();
com_port = serial_init(0, NULL);
diff --minimal -Nru a/arch/ppc/platforms/adir_setup.c b/arch/ppc/platforms/adir_setup.c
--- a/arch/ppc/platforms/adir_setup.c Tue Nov 27 14:21:26 2001
+++ b/arch/ppc/platforms/adir_setup.c Tue Nov 27 14:21:26 2001
@@ -181,7 +181,7 @@
/*
* On the Adirondack we use bi_recs and pass the pointer to them in R3.
*/
- parse_bootinfo((struct bootinfo *) (r3 + KERNELBASE));
+ parse_bootinfo((struct bi_record *) (r3 + KERNELBASE));
/* Remember, isa_io_base is virtual but isa_mem_base is physical! */
isa_io_base = ADIR_PCI32_VIRT_IO_BASE;
diff --minimal -Nru a/arch/ppc/platforms/k2.h b/arch/ppc/platforms/k2.h
--- a/arch/ppc/platforms/k2.h Tue Nov 27 14:21:26 2001
+++ b/arch/ppc/platforms/k2.h Tue Nov 27 14:21:26 2001
@@ -13,8 +13,8 @@
* option) any later version.
*/
-#ifndef __PPC_KERNEL_K2_H
-#define __PPC_KERNEL_K2_H
+#ifndef __PPC_PLATFORMS_K2_H
+#define __PPC_PLATFORMS_K2_H
/*
* SBS K2 definitions
@@ -81,4 +81,4 @@
#define K2_SYS_SLOT_MASK 0x08
-#endif /* __PPC_KERNEL_K2_H */
+#endif /* __PPC_PLATFORMS_K2_H */
diff --minimal -Nru a/arch/ppc/platforms/k2_setup.c b/arch/ppc/platforms/k2_setup.c
--- a/arch/ppc/platforms/k2_setup.c Tue Nov 27 14:21:26 2001
+++ b/arch/ppc/platforms/k2_setup.c Tue Nov 27 14:21:26 2001
@@ -346,7 +346,7 @@
void __init platform_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7)
{
- parse_bootinfo((struct bootinfo *) (r3 + KERNELBASE));
+ parse_bootinfo((struct bi_record *) (r3 + KERNELBASE));
isa_io_base = K2_ISA_IO_BASE;
isa_mem_base = K2_ISA_MEM_BASE;
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A little fix
2001-11-27 22:36 A little fix Michael Sokolov
@ 2001-11-28 7:25 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2001-11-28 7:25 UTC (permalink / raw)
To: linuxppc-dev
On Tue, Nov 27, 2001 at 02:36:12PM -0800, Michael Sokolov wrote:
>
> OK, I goofed. It's struct bi_record, not struct bootinfo. I have no idea how I
> could have screwed it up and how could the compiler have missed it. Is it
> another gcc extension to allow struct never_heard_of * as OK? The patch below
> fixes it. It also fixes a remaining bit of the kernel=>platforms rename.
That's not a GCC extension, it's standard C, actually. It's an opaque
type.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A little fix
@ 2001-11-28 17:05 Michael Sokolov
2001-11-28 23:44 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Michael Sokolov @ 2001-11-28 17:05 UTC (permalink / raw)
To: linuxppc-dev
Tom,
I think you've goofed a little bit again:
ChangeSet@1.699, 2001-11-27 15:44:22-07:00, trini@opus.bloom.county
'bootinfo' is wrong, 'bi_record' is right, whoops.
arch/ppc/boot/common/misc-simple.c
1.12 01/11/27 15:44:21 trini@opus.bloom.county +3 -5
struct bootinfo -> struct bi_record.
After this change misc-simple.c doesn't compile due to a missing semicolon, and
even if it compiled it would return the wrong address (we need the start of
bi_recs, not the end). The fix is below.
MS
diff --minimal -Nru a/arch/ppc/boot/common/misc-simple.c b/arch/ppc/boot/common/misc-simple.c
--- a/arch/ppc/boot/common/misc-simple.c Wed Nov 28 08:53:35 2001
+++ b/arch/ppc/boot/common/misc-simple.c Wed Nov 28 08:53:35 2001
@@ -63,7 +63,8 @@
{
int timer = 0;
char *cp, ch;
- struct bi_record *rec
+ struct bi_record *rec;
+ struct bi_record *birecs;
setup_legacy();
com_port = serial_init(0, NULL);
@@ -159,6 +160,7 @@
*/
rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size) +
(1 << 20) - 1, (1 << 20));
+ birecs = rec;
rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record);
@@ -184,5 +186,5 @@
rec = (struct bi_record *)((unsigned long)rec + rec->size);
puts("Now booting the kernel\n");
- return rec;
+ return birecs;
}
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A little fix
2001-11-28 17:05 Michael Sokolov
@ 2001-11-28 23:44 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2001-11-28 23:44 UTC (permalink / raw)
To: Michael Sokolov; +Cc: linuxppc-dev
On Wed, Nov 28, 2001 at 09:05:56AM -0800, Michael Sokolov wrote:
>
> Tom,
>
> I think you've goofed a little bit again:
>
> ChangeSet@1.699, 2001-11-27 15:44:22-07:00, trini@opus.bloom.county
> 'bootinfo' is wrong, 'bi_record' is right, whoops.
>
> arch/ppc/boot/common/misc-simple.c
> 1.12 01/11/27 15:44:21 trini@opus.bloom.county +3 -5
> struct bootinfo -> struct bi_record.
>
> After this change misc-simple.c doesn't compile due to a missing semicolon, and
> even if it compiled it would return the wrong address (we need the start of
> bi_recs, not the end). The fix is below.
D'oh. Not my day... Thanks.
--
Tom Rini (TR1265)
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
end of thread, other threads:[~2001-11-28 23:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-27 22:36 A little fix Michael Sokolov
2001-11-28 7:25 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2001-11-28 17:05 Michael Sokolov
2001-11-28 23:44 ` Tom Rini
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).