Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933936Ab0HFFQG (ORCPT ); Fri, 6 Aug 2010 01:16:06 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:41694 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933811Ab0HFFPi (ORCPT ); Fri, 6 Aug 2010 01:15:38 -0400 From: Benjamin Herrenschmidt To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, torvalds@linux-foundation.org, Benjamin Herrenschmidt Subject: [PATCH 35/43] memblock: Make memblock_alloc_try_nid() fallback to MEMBLOCK_ALLOC_ANYWHERE Date: Fri, 6 Aug 2010 15:15:16 +1000 Message-Id: <1281071724-28740-36-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1281071724-28740-1-git-send-email-benh@kernel.crashing.org> References: <1281071724-28740-1-git-send-email-benh@kernel.crashing.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 39 memblock_alloc_nid() used to fallback to allocating anywhere by using memblock_alloc() as a fallback. However, some of my previous patches limit memblock_alloc() to the region covered by MEMBLOCK_ALLOC_ACCESSIBLE which is not quite what we want for memblock_alloc_try_nid(). So we fix it by explicitely using MEMBLOCK_ALLOC_ANYWHERE. Not that so far only sparc uses memblock_alloc_nid() and it hasn't been updated to clamp the accessible zone yet. Thus the temporary "breakage" should have no effect. Signed-off-by: Benjamin Herrenschmidt --- mm/memblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index 1802d97..9de5fcd 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -546,7 +546,7 @@ phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, i if (res) return res; - return memblock_alloc(size, align); + return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE); } -- 1.7.0.4 -- 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/