Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756178AbZDVKSz (ORCPT ); Wed, 22 Apr 2009 06:18:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754906AbZDVKSq (ORCPT ); Wed, 22 Apr 2009 06:18:46 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:35970 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbZDVKSq (ORCPT ); Wed, 22 Apr 2009 06:18:46 -0400 Date: Wed, 22 Apr 2009 12:18:11 +0200 From: Ingo Molnar To: Dmitry Adamushko , Andrew Morton Cc: Rusty Russell , Andreas Herrmann , Peter Oruba , Arjan van de Ven , Hugh Dickins , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86 microcode: work_on_cpu and cleanup of the synchronization logic Message-ID: <20090422101811.GA1115@elte.hu> References: <1240258569.6195.8.camel@earth> <1240344440.5861.10.camel@earth> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1240344440.5861.10.camel@earth> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 834 Lines: 28 * Dmitry Adamushko wrote: > +static long collect_cpu_info_local(void *arg) > +{ > + struct collect_for_cpu *cfc = arg; > + > + BUG_ON(cfc->cpu != raw_smp_processor_id()); > + > + return microcode_ops->collect_cpu_info(cfc->cpu, cfc->cpu_sig); > +} > + > +static int collect_cpu_info_on_target(int cpu, struct cpu_signature *cpu_sig) > +{ > + struct collect_for_cpu cfc = { .cpu_sig = cpu_sig, .cpu = cpu }; > + > + return work_on_cpu(cpu, collect_cpu_info_local, &cfc); > +} Couldnt this be done without work_on_cpu(), by using smp_call_function()? Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/