Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932386Ab2HFSiG (ORCPT ); Mon, 6 Aug 2012 14:38:06 -0400 Received: from usindpps06.hds.com ([207.126.252.19]:38595 "EHLO usindpps06.hds.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756404Ab2HFSiE convert rfc822-to-8bit (ORCPT ); Mon, 6 Aug 2012 14:38:04 -0400 From: Seiji Aguchi To: "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "x86@kernel.org" , "Thomas Gleixner (tglx@linutronix.de)" , "'mingo@elte.hu' (mingo@elte.hu)" , "H. Peter Anvin (hpa@linux.intel.com)" , "matt.fleming@intel.com" , "olof@lixom.net" , "Paul Gortmaker (paul.gortmaker@windriver.com)" CC: "dle-develop@lists.sourceforge.net" , Satoru Moriya , Matthew Garrett Subject: [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable Thread-Topic: [RESEND][PATCH]efi: initialize efi.runtime_version to make query_variable_info/update_capsule workable Thread-Index: Ac10Agc/XnA3Qh5yTkKGuWpYlkjSxg== Date: Mon, 6 Aug 2012 18:37:20 +0000 Message-ID: Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.74.43.113] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.260,0.0.0000 definitions=2012-08-06_04:2012-08-06,2012-08-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1208060203 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 39 A value of efi.runtime_version is checked before calling update_capsule()/query_variable_info() as follows. But it isn't initialized anywhere. static efi_status_t virt_efi_query_variable_info(u32 attr, u64 *storage_space, u64 *remaining_space, u64 *max_variable_size) { if (efi.runtime_version < EFI_2_00_SYSTEM_TABLE_REVISION) return EFI_UNSUPPORTED; This patch initializes a value of efi.runtime_version at boot time. Acked-by: Matthew Garrett Signed-off-by: Seiji Aguchi --- arch/x86/platform/efi/efi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 2dc29f5..4c82998 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -868,6 +868,7 @@ void __init efi_enter_virtual_mode(void) * * Call EFI services through wrapper functions. */ + efi.runtime_version = efi_systab.fw_revision; efi.get_time = virt_efi_get_time; efi.set_time = virt_efi_set_time; efi.get_wakeup_time = virt_efi_get_wakeup_time; -- 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/