linux-mips
[Top] [All Lists]

[PATCH] Save 2k text size in cpu-probe

To: ralf@linux-mips.org
Subject: [PATCH] Save 2k text size in cpu-probe
From: Thiemo Seufer <ths@networkno.de>
Date: Mon, 3 Jul 2006 13:30:01 +0100
Cc: linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11+cvs20060403
The appended patch drops the inline for decode_configs, this saves about
2k of text size. It also uses MIPS_CONF_AR instead of magic constants.


Thiemo


Signed-off-by: Thiemo Seufer <ths@networkno.de>

--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -467,7 +467,7 @@ static inline unsigned int decode_config
        isa = (config0 & MIPS_CONF_AT) >> 13;
        switch (isa) {
        case 0:
-               switch ((config0 >> 10) & 7) {
+               switch ((config0 & MIPS_CONF_AR) >> 10) {
                case 0:
                        c->isa_level = MIPS_CPU_ISA_M32R1;
                        break;
@@ -479,7 +479,7 @@ static inline unsigned int decode_config
                }
                break;
        case 2:
-               switch ((config0 >> 10) & 7) {
+               switch ((config0 & MIPS_CONF_AR) >> 10) {
                case 0:
                        c->isa_level = MIPS_CPU_ISA_M64R1;
                        break;
@@ -556,7 +556,7 @@ static inline unsigned int decode_config
        return config3 & MIPS_CONF_M;
 }
 
-static inline void decode_configs(struct cpuinfo_mips *c)
+__init static void decode_configs(struct cpuinfo_mips *c)
 {
        /* MIPS32 or MIPS64 compliant CPU.  */
        c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Save 2k text size in cpu-probe, Thiemo Seufer <=