Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758696Ab3FMNew (ORCPT ); Thu, 13 Jun 2013 09:34:52 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:39335 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1758281Ab3FMN2H (ORCPT ); Thu, 13 Jun 2013 09:28:07 -0400 X-IronPort-AV: E=Sophos;i="4.87,858,1363104000"; d="scan'208";a="7537697" From: Tang Chen To: tglx@linutronix.de, mingo@elte.hu, hpa@zytor.com, akpm@linux-foundation.org, tj@kernel.org, trenn@suse.de, yinghai@kernel.org, jiang.liu@huawei.com, wency@cn.fujitsu.com, laijs@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, mgorman@suse.de, minchan@kernel.org, mina86@mina86.com, gong.chen@linux.intel.com, vasilis.liaskovitis@profitbricks.com, lwoodman@redhat.com, riel@redhat.com, jweiner@redhat.com, prarit@redhat.com Cc: x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Fenghua Yu Subject: [Part1 PATCH v5 02/22] x86, microcode: Use common get_ramdisk_{image|size}() Date: Thu, 13 Jun 2013 21:02:49 +0800 Message-Id: <1371128589-8953-3-git-send-email-tangchen@cn.fujitsu.com> X-Mailer: git-send-email 1.7.10.1 In-Reply-To: <1371128589-8953-1-git-send-email-tangchen@cn.fujitsu.com> References: <1371128589-8953-1-git-send-email-tangchen@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/06/13 20:58:16, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/06/13 20:58:25, Serialize complete at 2013/06/13 20:58:25 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2107 Lines: 55 From: Yinghai Lu In patch1, we change get_ramdisk_image() and get_ramdisk_size() to global, so we can use them instead of using global variable boot_params. We need this to get correct ramdisk adress for 64bits bzImage that initrd can be loaded above 4G by kexec-tools. -v2: fix one typo that is found by Tang Chen Signed-off-by: Yinghai Lu Cc: Fenghua Yu Acked-by: Tejun Heo Tested-by: Thomas Renninger Reviewed-by: Tang Chen Tested-by: Tang Chen --- arch/x86/kernel/microcode_intel_early.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/microcode_intel_early.c b/arch/x86/kernel/microcode_intel_early.c index 2e9e128..54575a9 100644 --- a/arch/x86/kernel/microcode_intel_early.c +++ b/arch/x86/kernel/microcode_intel_early.c @@ -743,8 +743,8 @@ load_ucode_intel_bsp(void) struct boot_params *boot_params_p; boot_params_p = (struct boot_params *)__pa_nodebug(&boot_params); - ramdisk_image = boot_params_p->hdr.ramdisk_image; - ramdisk_size = boot_params_p->hdr.ramdisk_size; + ramdisk_image = get_ramdisk_image(boot_params_p); + ramdisk_size = get_ramdisk_size(boot_params_p); initrd_start_early = ramdisk_image; initrd_end_early = initrd_start_early + ramdisk_size; @@ -753,8 +753,8 @@ load_ucode_intel_bsp(void) (unsigned long *)__pa_nodebug(&mc_saved_in_initrd), initrd_start_early, initrd_end_early, &uci); #else - ramdisk_image = boot_params.hdr.ramdisk_image; - ramdisk_size = boot_params.hdr.ramdisk_size; + ramdisk_image = get_ramdisk_image(&boot_params); + ramdisk_size = get_ramdisk_size(&boot_params); initrd_start_early = ramdisk_image + PAGE_OFFSET; initrd_end_early = initrd_start_early + ramdisk_size; -- 1.7.1 -- 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/