Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757235Ab2JJBAS (ORCPT ); Tue, 9 Oct 2012 21:00:18 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:39181 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755174Ab2JJBAO (ORCPT ); Tue, 9 Oct 2012 21:00:14 -0400 MIME-Version: 1.0 In-Reply-To: <20121009154611.GC7639@phenom.dumpdata.com> References: <1349509469-11475-1-git-send-email-yinghai@kernel.org> <1349509469-11475-3-git-send-email-yinghai@kernel.org> <20121009154611.GC7639@phenom.dumpdata.com> Date: Tue, 9 Oct 2012 18:00:12 -0700 X-Google-Sender-Auth: kHkFARDgPou0qcm8jytBZZYlWRU Message-ID: Subject: Re: [PATCH 2/3] x86, mm: Don't clear page table if next range is ram From: Yinghai Lu To: Konrad Rzeszutek Wilk Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jacob Shin , Tejun Heo , Stefano Stabellini , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 913 Lines: 30 On Tue, Oct 9, 2012 at 8:46 AM, Konrad Rzeszutek Wilk wrote: >> + !e820_any_mapped(addr & PAGE_MASK, next, 0)) > > What is the 0 parameter for? any type if type != 0, the will only check entries with same type. int e820_any_mapped(u64 start, u64 end, unsigned type) { int i; for (i = 0; i < e820.nr_map; i++) { struct e820entry *ei = &e820.map[i]; if (type && ei->type != type) continue; if (ei->addr >= end || ei->addr + ei->size <= start) continue; return 1; } return 0; } -- 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/