Skip to contentSkip to conversation

Save 2k text size in cpu-probe

PATCH New Thiemo Seufer 1 participant 1 message Jul 3, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Save 2k text size in cpu-probe

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

arch/mips/kernel/cpu-probe.c +3 -3
@@ -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 |