Skip to contentSkip to conversation

Remove G2_LE core decl from CLASSIC_PPC part of arch/ppc/kernel/cputable.c

RFC Andrey Volkov 3 participants 6 messages Aug 27, 2004

lore
Share & tools
lore
#0 lore raw

Hello all,

Since G2_LE is NOT a "classic" core ( in particular - true little-endian), may be now is time to remove it from CLASSIC_PPC part of arch/ppc/kernel/cputable.c, and move it to itself part.
I bear in mind next:

from arch/ppc/kernel/cputable.c:

#if CLASSIC_PPC
.....

    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

....
#endif /* CLASSIC_PPC */

May be better like this:

#if CONFIG_G2_LE
    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

#endif

With that move we'll conserve some memory of kernel, but need some explanations which PPCs based on
it, for modify Kconfig ( I know MPC52xx and MPC82xx based on it).

--
Best regards,
Andrey Volkov

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

#1 lore raw

What purpose does this change really serve. Linux does not use the true little-endian feature of the G2_LE core, beyond that it is very much in the class of classic ppc. Is the memory savings really that much?

- kumar

Quoted 37 lines · Andrey Volkov

Hello all,

Since G2_LE is NOT a "classic" core ( in particular - true little-endian),
may be now is time to remove it from CLASSIC_PPC part of arch/ppc/kernel/cputable.c, and move it to itself part. I bear in mind next:

from arch/ppc/kernel/cputable.c:

#if CLASSIC_PPC
.....

    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

....
#endif /* CLASSIC_PPC */

May be better like this:

#if CONFIG_G2_LE
    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

#endif

Quoted 9 lines

With that move we'll conserve some memory of kernel, but need some explanations which PPCs based on
it, for modify Kconfig ( I know MPC52xx and MPC82xx based on it).

--
Best regards,
Andrey Volkov

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

#2 lore raw

Hello Kumar,

Quoted 4 lines · you

What purpose does this change really serve. Linux does not use the true little-endian feature of the G2_LE core, beyond that it is very much in the class of classic ppc.
Is the memory savings really that much?

sizeof(*cpu_table) ~ 1300 bytes
+ code in cpu_setup_6xx.S ~ 1000 bytes
+ more simple to filter out some features in Kconfig (ex. SMP, ALTIVEC...)

And optionally (?):
+ LE (if it will be needed sometime for somebody)
+ "An additional input interrupt signal, core_cint, implements a critical interrupt function."

Quoted 35 lines
Quoted 35 lines

Since G2_LE is NOT a "classic" core ( in particular - true little-endian),
may be now is time to remove it from CLASSIC_PPC part of arch/ppc/kernel/cputable.c, and move it to itself part. I bear in mind next:

from arch/ppc/kernel/cputable.c:

#if CLASSIC_PPC
.....

    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

....
#endif /* CLASSIC_PPC */

May be better like this:

#if CONFIG_G2_LE
    {   /* All G2_LE (603e core, plus some) have the same pvr */
        0x7fff0000, 0x00820000, "G2_LE",
        CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
        CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
        COMMON_PPC,
        32, 32,
        __setup_cpu_603
    },

#endif

Quoted 3 lines
Quoted 3 lines

With that move we'll conserve some memory of kernel, but need some explanations which PPCs based on
it, for modify Kconfig ( I know MPC52xx and MPC82xx based on it).

--
Best regards,
Andrey Volkov

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

#3 lore raw
In reply to Andrey Volkov
Quoted 2 lines · Andrey Volkov

Since G2_LE is NOT a "classic" core ( in particular - true little-endian),

How is it not a classic core? It certainly isn't bookE, and it isn't 8xx.
No one should care about little-endian anyway. I'm voting for the first candidate that makes that illegal. :-)

Quoted 1 line

With that move we'll conserve some memory of kernel,

How does this single change save anything but a few bytes of cpu table?

Quoted 2 lines

but need some explanations which PPCs based on
it, for modify Kconfig ( I know MPC52xx and MPC82xx based on it).

What other kernel changes would you make based on
this configuration?

	-- Dan

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

#4 lore raw

Hello Dan,

Quoted 7 lines · you
Quoted 2 lines

Since G2_LE is NOT a "classic" core ( in particular - true little-endian),

How is it not a classic core? It certainly isn't bookE, and it isn't 8xx.
No one should care about little-endian anyway. I'm voting for the first candidate that makes that illegal. :-)

Agree.

Quoted 4 lines
Quoted 1 line

With that move we'll conserve some memory of kernel,

How does this single change save anything but a few bytes of cpu table?

Maybe ~2K of rubbish for somebody "few" - for me not :) (don't forget its embedded platform).

Quoted 5 lines
Quoted 2 lines

but need some explanations which PPCs based on
it, for modify Kconfig ( I know MPC52xx and MPC82xx based on it).

What other kernel changes would you make based on
this configuration?

Only Kconfig, nothing more.

--
Best regards,
Andrey Volkov

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

#5 lore raw
Quoted 2 lines · Andrey Volkov

Maybe ~2K of rubbish for somebody "few" - for me not :) (don't forget its embedded platform).

If you have a system of this magnitude where a couple of Kbytes is going to be the difference between success or failure, I'd suggest looking other places than adding an superfluous #ifdef around the cpu table.

There are lots of places in the kernel where thorough analysis and careful configuration will save you lots more than this and probably make a difference.

	-- Dan

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