From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933342Ab1EYAjx (ORCPT ); Tue, 24 May 2011 20:39:53 -0400 Received: from mga03.intel.com ([143.182.124.21]:37100 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757628Ab1EYAjw (ORCPT ); Tue, 24 May 2011 20:39:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,264,1304319600"; d="scan'208";a="1008291" Date: Tue, 24 May 2011 17:39:42 -0700 From: Fenghua Yu To: Andi Kleen Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Andi Kleen , "Yu, Fenghua" Subject: Re: [PATCH 1/3] x86, intel: Output microcode revision Message-ID: <20110525003941.GA30997@linux-os.sc.intel.com> References: <1306278210-18285-1-git-send-email-andi@firstfloor.org> <1306278210-18285-3-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1306278210-18285-3-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >@@ -300,6 +295,7 @@ static int apply_microcode(int cpu) > struct ucode_cpu_info *uci; > unsigned int val[2]; > int cpu_num; >+ struct cpuinfo_x86 *c = &cpu_data(cpu_num); This is wrong. cpu_num is not initialized yet at this point. You need to assign c after cpu_num is initialized in the next statement. > > cpu_num = raw_smp_processor_id(); > uci = ucode_cpu_info + cpu; Thanks. -Fenghua