From patchwork Thu Mar 31 00:41:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 678271 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2V0eoIp012442 for ; Thu, 31 Mar 2011 00:42:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755363Ab1CaAmH (ORCPT ); Wed, 30 Mar 2011 20:42:07 -0400 Received: from relay2.sgi.com ([192.48.179.30]:48528 "HELO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1754207Ab1CaAmG (ORCPT ); Wed, 30 Mar 2011 20:42:06 -0400 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id BD6473040AA; Wed, 30 Mar 2011 17:42:02 -0700 (PDT) Received: from [134.15.31.35] (vpn-2-travis.corp.sgi.com [134.15.31.35]) by estes.americas.sgi.com (Postfix) with ESMTP id 5429D7002434; Wed, 30 Mar 2011 19:42:00 -0500 (CDT) Message-ID: <4D93CDD7.8000708@sgi.com> Date: Wed, 30 Mar 2011 17:41:59 -0700 From: Mike Travis User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Yinghai Lu , Ingo Molnar Cc: David Rientjes , Jack Steiner , Robin Holt , Len Brown , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Linus Torvalds Subject: [PATCH 1/2] memblock: add error return when CONFIG_HAVE_MEMBLOCK is not set References: <20110225180633.857892225@gulag1.americas.sgi.com> <20110225180634.017570095@gulag1.americas.sgi.com> <20110227120949.GF16453@elte.hu> <20110227121518.GA19165@elte.hu> <4D6AFBB0.70401@kernel.org> <4D6BF63D.2020404@sgi.com> <4D6BFF46.3050001@sgi.com> In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 31 Mar 2011 00:42:08 +0000 (UTC) --- linux.orig/include/linux/memblock.h +++ linux/include/linux/memblock.h @@ -2,6 +2,8 @@ #define _LINUX_MEMBLOCK_H #ifdef __KERNEL__ +#define MEMBLOCK_ERROR 0 + #ifdef CONFIG_HAVE_MEMBLOCK /* * Logical memory blocks. @@ -20,7 +22,6 @@ #include #define INIT_MEMBLOCK_REGIONS 128 -#define MEMBLOCK_ERROR 0 struct memblock_region { phys_addr_t base; @@ -160,6 +161,12 @@ static inline unsigned long memblock_reg #define __initdata_memblock #endif +#else +static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align) +{ + return MEMBLOCK_ERROR; +} + #endif /* CONFIG_HAVE_MEMBLOCK */ #endif /* __KERNEL__ */