Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad4e680fb2220518de5118a8e734240d4c374fe2
Commit:     ad4e680fb2220518de5118a8e734240d4c374fe2
Parent:     d958f143329e685d114725b64fe6bef22994c74c
Author:     Alexey Dobriyan <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 13 13:26:23 2007 +0100
Committer:  Andi Kleen <[EMAIL PROTECTED]>
CommitDate: Tue Feb 13 13:26:23 2007 +0100

    [PATCH] i386: use smp_call_function_single()
    
    It will execure cpuid only on the cpu we need.
    
    Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
---
 arch/i386/kernel/cpuid.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
index 4da75fa..eeae0d9 100644
--- a/arch/i386/kernel/cpuid.c
+++ b/arch/i386/kernel/cpuid.c
@@ -48,7 +48,6 @@ static struct class *cpuid_class;
 #ifdef CONFIG_SMP
 
 struct cpuid_command {
-       int cpu;
        u32 reg;
        u32 *data;
 };
@@ -57,8 +56,7 @@ static void cpuid_smp_cpuid(void *cmd_block)
 {
        struct cpuid_command *cmd = (struct cpuid_command *)cmd_block;
 
-       if (cmd->cpu == smp_processor_id())
-               cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
+       cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
                      &cmd->data[3]);
 }
 
@@ -70,11 +68,10 @@ static inline void do_cpuid(int cpu, u32 reg, u32 * data)
        if (cpu == smp_processor_id()) {
                cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
        } else {
-               cmd.cpu = cpu;
                cmd.reg = reg;
                cmd.data = data;
 
-               smp_call_function(cpuid_smp_cpuid, &cmd, 1, 1);
+               smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1, 1);
        }
        preempt_enable();
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to