Skip to contentSkip to conversation

Patch for PCORE on linuxppc_2_4_devel

PATCH Mark A. Greer 2 participants 5 messages Apr 5, 2003 – Apr 7, 2003

lore
Share & tools
lore
#0 lore raw

This patch does the following:
a) Modifies the CONFIG_MORE_COMPILE_OPTIONS setup at the bottom of arch/ppc/config.in. The way that it was didn't work well and seemed difficult to read. I believe that the new way is "more correct" and easier to understand
b) Updates arch/ppc/configs/pcore_defconfig
c) Add support for SERIAL_IO_PORT to gen550_dbg.c (very simple addition)
d) Turns on L2 cache for PCORE platforms
e) Add KGDB support for PCORE platforms

All of these changes are simple so I hope there is no need to separate them into separate patches.

Please push in if there are no objections.

Mark
--

===== arch/ppc/config.in 1.172 vs edited =====

arch/ppc/config.in +2 -6
@@ -171,6 +171,7 @@
 
 if [ "$CONFIG_PCORE" = "y" -o "$CONFIG_POWERPMC250" = "y" ]; then
   define_bool CONFIG_FORCE y
+  define_bool CONFIG_GEN550 y
 fi
 
 if [ "$CONFIG_EV64260" = "y" -o "$CONFIG_HXEB100" = "y" \
@@ -760,14 +761,9 @@
   # following look a little odd.
   if [ "$CONFIG_KGDB" = "y" -o "$CONFIG_XMON" = "y" \
 	-o "$CONFIG_BDI_SWITCH" = "y" ]; then
-    bool '  Add any additional compile options' CONFIG_MORE_COMPILE_OPTIONS
+    bool '  Add additional compile options' CONFIG_MORE_COMPILE_OPTIONS
     if [ "$CONFIG_MORE_COMPILE_OPTIONS" = "y" ]; then
       string '    Additional compile arguments' CONFIG_COMPILE_OPTIONS "-g -ggdb"
-    else
-      if [ "$CONFIG_KGDB" = "y" ]; then
-        define_bool CONFIG_MORE_COMPILE_OPTIONS y
-	define_string CONFIG_COMPILE_OPTIONS "-g"
-      fi
     fi
   fi
 fi

===== arch/ppc/configs/pcore_defconfig 1.5 vs edited =====

arch/ppc/configs/pcore_defconfig +139 -21

425 lines not on this page · raw message

===== arch/ppc/kernel/gen550_dbg.c 1.1 vs edited =====

arch/ppc/kernel/gen550_dbg.c +1 -0
@@ -129,6 +129,7 @@
 gen550_init(int i, struct serial_struct *serial_req)
 {
 	rs_table[i].io_type = serial_req->io_type;
+	rs_table[i].port = serial_req->port;
 	rs_table[i].iomem_base = serial_req->iomem_base;
 	rs_table[i].iomem_reg_shift = serial_req->iomem_reg_shift;
 }

===== arch/ppc/platforms/pcore_setup.c 1.22 vs edited =====

arch/ppc/platforms/pcore_setup.c +54 -1

92 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Mark A. Greer

This patch does the following:
a) Modifies the CONFIG_MORE_COMPILE_OPTIONS setup at the bottom of arch/ppc/config.in. The way that it was didn't work well and seemed difficult to read. I believe that the new way is "more correct" and easier to understand

Didn't work well when? Then intent is that if you don't select this option, you still get -g added when CONFIG_KGDB=y so that you can effectivly use gdb.

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

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 12 lines · Tom Rini
Quoted 7 lines · Mark A. Greer

This patch does the following:
a) Modifies the CONFIG_MORE_COMPILE_OPTIONS setup at the bottom of arch/ppc/config.in. The way that it was didn't work well and seemed difficult to read. I believe that the new way is "more correct" and easier to understand

Quoted 4 lines

Didn't work well when? Then intent is that if you don't select this option, you still get -g added when CONFIG_KGDB=y so that you can effectivly use gdb.

Try playing with it a little...

I understand the intent, it just didn't work well. The option is still there with a reasonable default. If they want it, they can use it; if they don't, they don't. If they don't know that they probably want -g if they have KGDB, they'll find out soon enough. Simple.

Mark

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 10 lines · Mark A. Greer
Quoted 8 lines · Tom Rini
Quoted 5 lines · Mark A. Greer

This patch does the following:
a) Modifies the CONFIG_MORE_COMPILE_OPTIONS setup at the bottom of arch/ppc/config.in. The way that it was didn't work well and seemed difficult to read. I believe that the new way is "more correct" and easier to understand

Quoted 5 lines
Quoted 3 lines

Didn't work well when? Then intent is that if you don't select this option, you still get -g added when CONFIG_KGDB=y so that you can effectivly use gdb.

Try playing with it a little...

I did. It works like it should.
No (XMON || KGDB || BDI) -> nothing
XMON || BDI && !MORE -> nothing
KGDB && !MORE -> '-g' && MORE being set.

I even gave xconfig a whirl with both MORE being both set and unset at the same time in the .config. It won't let you say no, which is again, the intent.

Quoted 1 line

I understand the intent, it just didn't work well.

When doesn't it work well?

Quoted 4 lines

The option is still
there with a reasonable default. If they want it, they can use it; if they don't, they don't. If they don't know that they probably want -g if they have KGDB, they'll find out soon enough. Simple.

That's just it. You never don't want some form of debugging symbols in your image if you use KGDB. This is why the i386 kgdb docucmentation says that -g will be on if KGDB is enabled.

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

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw

Tom, this has already consumed far more time than its worth. Change it or leave it or do something else, I don't care. Please push the remainder of the patch.

Thanks,

Mark

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/