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: 29382 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id D49D8B70D8 for ; Thu, 2 Jul 2009 12:56:32 +1000 (EST) Received: by ozlabs.org (Postfix) id C6F1FDDDA0; Thu, 2 Jul 2009 12:56:32 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id B5525DDD1C for ; Thu, 2 Jul 2009 12:56:32 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 60374B7175 for ; Thu, 2 Jul 2009 12:56:07 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2EB30B712D for ; Thu, 2 Jul 2009 12:56:00 +1000 (EST) Received: by ozlabs.org (Postfix) id 12617DDDA1; Thu, 2 Jul 2009 12:56:00 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from mail.wrs.com (mail.windriver.com [147.11.1.11]) by ozlabs.org (Postfix) with ESMTP id B52F1DDD0C for ; Thu, 2 Jul 2009 12:55:58 +1000 (EST) 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 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> Cc: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.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;