Skip to contentSkip to conversation

Classic PPC specific ASM (CONFIG_6XX)

DISCUSSION Jerome Glisse 5 participants 12 messages Jan 9, 2005 – Jan 21, 2005 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

With 2.6.10 i get a compilation error with disable_6xx_mmu i guess this is linked with the patch you supplied in december in arch/ppc/boot/common/util.S

Patch which comment disable_6xx_mmu if flags CONFIG_6XX not defined. The problem arise in arch/ppc/boot/simple/misc-prep.c where there is no conditional compilation for this function.

Attached is a patch that use the flags CONFIG_6XX to comment out call to this function if flags not set.

By the way there is many compilation warning related to PPC with 2.6.10 anyone looking to correct them ?

best,
Jerome Glisse

#1 lore raw
Quoted 1 line · Jerome Glisse

With 2.6.10 i get a compilation error with disable_6xx_mmu

What kind of machine is this? Could you send me your .config?

I suspect that maybe we aren't defining CONFIG_6XX for PPC970 machines.

Paul.

#2 lore raw
Quoted 8 lines · Paul Mackerras
Quoted 1 line · Jerome Glisse

With 2.6.10 i get a compilation error with disable_6xx_mmu

What kind of machine is this? Could you send me your .config?

I suspect that maybe we aren't defining CONFIG_6XX for PPC970 machines.

Indeed. It might make most sense to do something like:

arch/ppc/boot/simple/Makefile +4 -0
@@ -112,11 +112,15 @@
          end-$(pcore)			:= pcore
    cacheflag-$(pcore)			:= -include $(clear_L2_L3)
 
+# PPC_PREP can be set to y on a PPC970 configuration, which isn't a real
+# machine.
+ifeq ($(CONFIG_6xx),y)
       zimage-$(CONFIG_PPC_PREP)		:= zImage-PPLUS
 zimageinitrd-$(CONFIG_PPC_PREP)		:= zImage.initrd-PPLUS
      extra.o-$(CONFIG_PPC_PREP)		:= prepmap.o
         misc-$(CONFIG_PPC_PREP)		+= misc-prep.o mpc10x_memory.o
          end-$(CONFIG_PPC_PREP)		:= prep
+endif
 
          end-$(CONFIG_SANDPOINT)	:= sandpoint
    cacheflag-$(CONFIG_SANDPOINT)	:= -include $(clear_L2_L3)
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#3 lore raw

arch/ppc/boot/simple/Makefile line 116

Quoted 2 lines · Tom Rini
arch/ppc/boot/simple/Makefile +2 -0
+# PPC_PREP can be set to y on a PPC970 configuration, which isn't a real
+# machine.

Maybe we should prevent setting PPC_PREP to y for PPC970 instead?

#4 lore raw
Quoted 5 lines · Christoph Hellwig

arch/ppc/boot/simple/Makefile line 116

Quoted 2 lines · Tom Rini
arch/ppc/boot/simple/Makefile +2 -0
+# PPC_PREP can be set to y on a PPC970 configuration, which isn't a real
+# machine.

Maybe we should prevent setting PPC_PREP to y for PPC970 instead?

I don't know if that'll compile. It'd be nice because it means we could try splitting the PREP stuff out of the OpenFirmware (pmac/chrp) stuff again.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#5 lore raw
In reply to Tom Rini
Quoted 11 lines
arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 renamed from arch/ppc/boot/simple/Makefile 2005-01-03 16:49:19 -07:00 +2 -0
@@ -112,11 +112,15 @@
          end-$(pcore)                  := pcore
    cacheflag-$(pcore)                  := -include $(clear_L2_L3)
 
+# PPC_PREP can be set to y on a PPC970 configuration, which isn't a real
+# machine.

arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 line 126

Quoted 10 lines
arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 renamed from arch/ppc/boot/simple/Makefile 2005-01-03 16:49:19 -07:00 +2 -0
+ifeq ($(CONFIG_6xx),y)
       zimage-$(CONFIG_PPC_PREP)                := zImage-PPLUS
 zimageinitrd-$(CONFIG_PPC_PREP)                := zImage.initrd-PPLUS
      extra.o-$(CONFIG_PPC_PREP)                := prepmap.o
         misc-$(CONFIG_PPC_PREP)                += misc-prep.o mpc10x_memory.o
          end-$(CONFIG_PPC_PREP)                := prep
+endif
 
          end-$(CONFIG_SANDPOINT)       := sandpoint
    cacheflag-$(CONFIG_SANDPOINT)       := -include $(clear_L2_L3)

This do not compile with this patch maybe need also to define CONFIG_6xx if PPC970 is selected as processor ?

The errors are:
undefined reference for cols, lines, vidmems, scroll, orig_x, orig_y in functions puts, ClearVideoMemory, putc

Jerome Glisse

#6 lore raw
Quoted 18 lines · Jerome Glisse
Quoted 18 lines
arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 renamed from arch/ppc/boot/simple/Makefile 2005-01-03 16:49:19 -07:00 +4 -0
@@ -112,11 +112,15 @@
          end-$(pcore)                  := pcore
    cacheflag-$(pcore)                  := -include $(clear_L2_L3)
 
+# PPC_PREP can be set to y on a PPC970 configuration, which isn't a real
+# machine.
+ifeq ($(CONFIG_6xx),y)
       zimage-$(CONFIG_PPC_PREP)                := zImage-PPLUS
 zimageinitrd-$(CONFIG_PPC_PREP)                := zImage.initrd-PPLUS
      extra.o-$(CONFIG_PPC_PREP)                := prepmap.o
         misc-$(CONFIG_PPC_PREP)                += misc-prep.o mpc10x_memory.o
          end-$(CONFIG_PPC_PREP)                := prep
+endif
 
Quoted 6 lines

arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 line 126

Quoted 3 lines
arch/ppc/boot/simple/Makefile 2005-01-10 07:51:34 -07:00 renamed from arch/ppc/boot/simple/Makefile 2005-01-03 16:49:19 -07:00 +0 -0
          end-$(CONFIG_SANDPOINT)       := sandpoint
    cacheflag-$(CONFIG_SANDPOINT)       := -include $(clear_L2_L3)

This do not compile with this patch maybe need also to define CONFIG_6xx if PPC970 is selected as processor ?

I have a feeling CONFIG_6xx isn't selected for a good reason. Can you try, as a kludge, removing define_bool PPC_PREP from arch/ppc/Kconfig and seeing if you can build / boot ? Thanks.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#7 lore raw
Quoted 8 lines

I have a feeling CONFIG_6xx isn't selected for a good reason. Can you try, as a kludge, removing define_bool PPC_PREP from arch/ppc/Kconfig and seeing if you can build / boot ? Thanks.

--
Tom Rini
http://gate.crashing.org/~trini/

Seems that this flags is linked to many things :) I tried removing PPC_PREP bool but the kernel fail to compile with again new errors :

arch/ppc/kernel/built-in.o(.init.text+0x610): In function `DoSyscall':
arch/ppc/kernel/entry.S: undefined reference to `prep_init'

arch/ppc/platforms/built-in.o(.pmac.text+0x936): In function 'note_bootable_part':
: undefined reference to `boot_dev'

I attach my config, someone asked me for that previously but i crashed my system since, thus here it is.

Jerome Glisse

#8 lore raw
Quoted 4 lines · Jerome Glisse
Quoted 4 lines

I have a feeling CONFIG_6xx isn't selected for a good reason. Can you try, as a kludge, removing define_bool PPC_PREP from arch/ppc/Kconfig and seeing if you can build / boot ? Thanks.

Quoted 8 lines
Quoted 4 lines

--
Tom Rini
http://gate.crashing.org/~trini/

Seems that this flags is linked to many things :) I tried removing PPC_PREP bool but the kernel fail to compile with again new errors :

One last thing before we just do what you suggested originally, can you hack it so that PPC_PREP is still set, but on 970 we still set CONFIG_6xx? Thanks again.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#9 lore raw

On Mon, 10 Jan 2005 12:12:48 -0700, Tom Rini <[email protected]> wr= ote:

Quoted 2 lines · Jerome Glisse
Quoted 1 line
Quoted 1 line

I have a feeling CONFIG_6xx isn't selected for a good reason. Can yo=

u

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

try, as a kludge, removing define_bool PPC_PREP from arch/ppc/Kconfig and seeing if you can build / boot ? Thanks.

--
Tom Rini
http://gate.crashing.org/~trini/

Seems that this flags is linked to many things :) I tried removing PPC_=

PREP

Quoted 11 lines
Quoted 2 lines

bool but the kernel fail to compile with again new errors :

=20
One last thing before we just do what you suggested originally, can you hack it so that PPC_PREP is still set, but on 970 we still set CONFIG_6xx? Thanks again.
=20
--
Tom Rini
http://gate.crashing.org/~trini/
=20

This issue must be strongly linked with the Murphy Law. Got another compile error when y a add CONFIG_6xx=3Dy to my kernel config.

LD .tmp_vmlinux1
ld: arch/ppc/kernel/idle_6xx.o: No such file: Aucun fichier ou r=E9pertoire de ce type

Unfortunetly i've got to move (some trip for my study) and i won't be able to have access any g5 or PPC970 with linux on it until i came back friday or saturday. Anyway i may access my mail until then.

Does this disable_6xx_mmu function do something that we should really have on PPC970 ? I hadn't get enought time to look at this function and understand it.

By the way, even if i pretty sure this is not related, my kernel is patched with one of my patch (i posted it on this mailling list) that add support o= f U3
agp bridge on G5.

This patch only affect few file and if i remember well, i have tested witho= ut
it too with no success.

Files affected by my patch pciids.h, uninorth.c(char/driver/agp),=20 uninorth.h(asm-ppc&64). and some change in Kconfig of (char/driver/agp)

One strange things is that no one except me report error on compilation ? No one use linux with g5, am i alone :) ?

best,
Jerome Glisse

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw
Quoted 7 lines · Tom Rini
Quoted 2 lines · Jerome Glisse

Wanted to know what is going on with CONFIG_6xx? You will use my patch or do you have another better way ? :)

Can you resend it please?

Here is another version (the previous one used ifdef to comment out function call but i read somewhere that this doesn't follow codeguideline). Anyway i think that my patch is a ugly hack.

best,
Jerome Glisse

diff -Naur linux/arch/ppc/boot/simple/misc-prep.c linux-2.6.10/arch/ppc/boot/simple/misc-prep.c
--- linux/arch/ppc/boot/simple/misc-prep.c 2004-12-24 22:33:51.000000000 +0100
+++ linux-2.6.10/arch/ppc/boot/simple/misc-prep.c 2005-01-21
12:09:50.976426672 +0100
@@ -34,7 +34,11 @@
extern void serial_fixups(void);
extern struct bi_record *decompress_kernel(unsigned long load_addr,
int num_words, unsigned long cksum);
+#ifdef CONFIG_6XX
extern void disable_6xx_mmu(void);
+#elif
+void disable_6xx_mmu(void) {}
+#endif
extern unsigned long mpc10x_get_mem_size(void);

static void

#13 lore raw
Quoted 26 lines · Jerome Glisse
Quoted 7 lines · Tom Rini
Quoted 2 lines · Jerome Glisse

Wanted to know what is going on with CONFIG_6xx? You will use my patch or do you have another better way ? :)

Can you resend it please?

Here is another version (the previous one used ifdef to comment out function call but i read somewhere that this doesn't follow codeguideline). Anyway i think that my patch is a ugly hack.

best,
Jerome Glisse

diff -Naur linux/arch/ppc/boot/simple/misc-prep.c
linux-2.6.10/arch/ppc/boot/simple/misc-prep.c

arch/ppc/boot/simple/misc-prep.c +0 -0

12:09:50.976426672 +0100

arch/ppc/boot/simple/misc-prep.c line 40

Quoted 7 lines
arch/ppc/boot/simple/misc-prep.c +3 -0
@@ -34,7 +34,11 @@
 extern void serial_fixups(void);
 extern struct bi_record *decompress_kernel(unsigned long load_addr,
 		int num_words, unsigned long cksum);
+#ifdef CONFIG_6XX
 extern void disable_6xx_mmu(void);
+#elif
+void disable_6xx_mmu(void) {}

^^^^^^^^^^^^^^^^^^^^
You better make this one static inline.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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