From: Magnus Damm <magnus@valinux.co.jp>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Magnus Damm <magnus@valinux.co.jp>, ak@suse.de
Subject: [PATCH 02/06] i386: remove redundant generic_identify() calls when identifying cpus
Date: Wed, 9 Aug 2006 10:03:02 +0900 (JST) [thread overview]
Message-ID: <20060809010350.25458.46602.sendpatchset@cherry.local> (raw)
In-Reply-To: <20060809010345.25458.86096.sendpatchset@cherry.local>
i386: remove redundant generic_identify() calls when identifying cpus
cpu_dev->c_identify is only called from arch/i386/common.c:identify_cpu(), and
this after generic_identify() already has been called. There is no need to call
this function twice and hook it in c_identify - but I may be wrong, please
double check before applying.
This patch also removes generic_identify() from cpu.h to avoid unnecessary
future nesting.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---
amd.c | 1 -
common.c | 2 +-
cpu.h | 2 --
cyrix.c | 2 --
intel.c | 1 -
nexgen.c | 1 -
transmeta.c | 1 -
7 files changed, 1 insertion(+), 9 deletions(-)
--- 0001/arch/i386/kernel/cpu/amd.c
+++ work/arch/i386/kernel/cpu/amd.c 2006-08-09 07:51:46.000000000 +0900
@@ -275,7 +275,6 @@ static struct cpu_dev amd_cpu_dev __init
},
},
.c_init = init_amd,
- .c_identify = generic_identify,
.c_size_cache = amd_size_cache,
};
--- 0001/arch/i386/kernel/cpu/common.c
+++ work/arch/i386/kernel/cpu/common.c 2006-08-09 08:06:33.000000000 +0900
@@ -265,7 +265,7 @@ static void __init early_cpu_detect(void
}
}
-void __cpuinit generic_identify(struct cpuinfo_x86 * c)
+static void __cpuinit generic_identify(struct cpuinfo_x86 * c)
{
u32 tfms, xlvl;
int ebx;
--- 0001/arch/i386/kernel/cpu/cpu.h
+++ work/arch/i386/kernel/cpu/cpu.h 2006-08-09 07:52:07.000000000 +0900
@@ -24,7 +24,5 @@ extern struct cpu_dev * cpu_devs [X86_VE
extern int get_model_name(struct cpuinfo_x86 *c);
extern void display_cacheinfo(struct cpuinfo_x86 *c);
-extern void generic_identify(struct cpuinfo_x86 * c);
-
extern void early_intel_workaround(struct cpuinfo_x86 *c);
--- 0004/arch/i386/kernel/cpu/cyrix.c
+++ work/arch/i386/kernel/cpu/cyrix.c 2006-08-09 08:04:46.000000000 +0900
@@ -427,7 +427,6 @@ static void __cpuinit cyrix_identify(str
local_irq_restore(flags);
}
}
- generic_identify(c);
}
static struct cpu_dev cyrix_cpu_dev __initdata = {
@@ -457,7 +456,6 @@ static struct cpu_dev nsc_cpu_dev __init
.c_vendor = "NSC",
.c_ident = { "Geode by NSC" },
.c_init = init_nsc,
- .c_identify = generic_identify,
};
int __init nsc_init_cpu(void)
--- 0001/arch/i386/kernel/cpu/intel.c
+++ work/arch/i386/kernel/cpu/intel.c 2006-08-09 07:51:40.000000000 +0900
@@ -263,7 +263,6 @@ static struct cpu_dev intel_cpu_dev __cp
},
},
.c_init = init_intel,
- .c_identify = generic_identify,
.c_size_cache = intel_size_cache,
};
--- 0004/arch/i386/kernel/cpu/nexgen.c
+++ work/arch/i386/kernel/cpu/nexgen.c 2006-08-09 07:52:47.000000000 +0900
@@ -38,7 +38,6 @@ static void __cpuinit nexgen_identify(st
if ( deep_magic_nexgen_probe() ) {
strcpy(c->x86_vendor_id, "NexGenDriven");
}
- generic_identify(c);
}
static struct cpu_dev nexgen_cpu_dev __initdata = {
--- 0004/arch/i386/kernel/cpu/transmeta.c
+++ work/arch/i386/kernel/cpu/transmeta.c 2006-08-09 07:53:37.000000000 +0900
@@ -88,7 +88,6 @@ static void __init init_transmeta(struct
static void __cpuinit transmeta_identify(struct cpuinfo_x86 * c)
{
u32 xlvl;
- generic_identify(c);
/* Transmeta-defined flags: level 0x80860001 */
xlvl = cpuid_eax(0x80860000);
next prev parent reply other threads:[~2006-08-09 1:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 1:02 [PATCH 01/06] i386: mark cpu identify functions as __cpuinit Magnus Damm
2006-08-09 1:03 ` Magnus Damm [this message]
2006-08-09 2:20 ` [PATCH 02/06] i386: remove redundant generic_identify() calls when identifying cpus Andi Kleen
2006-08-09 1:03 ` [PATCH 03/06] i386: mark cpu init functions as __cpuinit, data as __cpuinitdata Magnus Damm
2006-08-09 1:03 ` [PATCH 04/06] i386: mark cpu cache functions as __cpuinit Magnus Damm
2006-08-09 1:03 ` [PATCH 05/06] i386: mark cpu_dev structures as __cpuinitdata Magnus Damm
2006-08-09 1:03 ` [PATCH 06/06] x86_64: mark init_amd() as __cpuinit Magnus Damm
2006-08-09 2:17 ` Andi Kleen
2006-08-09 1:03 ` [PATCH] i386: mark tsc_init() as __init Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060809010350.25458.46602.sendpatchset@cherry.local \
--to=magnus@valinux.co.jp \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.