From patchwork Thu Jul 2 02:55:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yshi X-Patchwork-Id: 33599 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n622uOQH001005 for ; Thu, 2 Jul 2009 02:56:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753348AbZGBC4R (ORCPT ); Wed, 1 Jul 2009 22:56:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752945AbZGBC4R (ORCPT ); Wed, 1 Jul 2009 22:56:17 -0400 Received: from mail.windriver.com ([147.11.1.11]:40612 "EHLO mail.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbZGBC4P (ORCPT ); Wed, 1 Jul 2009 22:56:15 -0400 Received: from localhost.localdomain (pek-lpgbuild1.wrs.com [128.224.153.29]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id n622tVdi016501; Wed, 1 Jul 2009 19:55:34 -0700 (PDT) From: Yang Shi To: yu.liu@freescale.com, hollisb@us.ibm.com, avi@redhat.com Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@ozlabs.org Subject: [PATCH 2/2] KVM/PPC: Fix kvm_main.c build error for PPC KVM Date: Thu, 2 Jul 2009 10:55:30 +0800 Message-Id: X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com> References: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com> In-Reply-To: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com> References: <47a7508d4561874c1a052cebe1b7f42b19831393.1246502441.git.yang.shi@windriver.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org With the latest kernel building KVM for PPC, got integer overflow error in kvm_main.c file. The root cause is that compiler consider KVM_PAGES_PER_HPAGE as signed long type, however it should be unsigned long type. So, change it to unsigned long type in include/asm/kvm_host.h Signed-off-by: Yang Shi --- arch/powerpc/include/asm/kvm_host.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index dfdf13c..fddc3ed 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -34,7 +34,7 @@ #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 /* We don't currently support large pages. */ -#define KVM_PAGES_PER_HPAGE (1<<31) +#define KVM_PAGES_PER_HPAGE (1UL << 31) struct kvm; struct kvm_run;