linux-mips
[Top] [All Lists]

Re: [patch] mips, mm: avoid using HPAGE constants without CONFIG_HUGETLB

To: Hillf Danton <dhillf@gmail.com>
Subject: Re: [patch] mips, mm: avoid using HPAGE constants without CONFIG_HUGETLB_PAGE
From: David Daney <ddaney.cavm@gmail.com>
Date: Mon, 21 Nov 2011 11:25:44 -0800
Cc: David Rientjes <rientjes@google.com>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, Andrew Morton <akpm@linux-foundation.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ponTTO+wZvcKPS31iBFPz3DXm2cDH6IuD0Xi3kE7ynI=; b=ttJ0VwFP+eKJFhJnEJaAIJDa533GnAd6oM8OA09uWDo0maSQgeIZGTj3+m6tm6ajhz L5yOOJwmbFBK25G49SW+mZZJAD+Olse4yzZbEeHLjFgaZidB5+fn1DYWzLnL+K69kEse tNPa89sriR8PDjThIoPkbGUEyWhbscTqD9aq4=
In-reply-to: <CAJd=RBBmODwpUi1_eObE47yCQVfEGLHyy45=aqUtxM-9Bpki6A@mail.gmail.com>
References: <alpine.DEB.2.00.1111191855410.5457@chino.kir.corp.google.com> <CAJd=RBBmODwpUi1_eObE47yCQVfEGLHyy45=aqUtxM-9Bpki6A@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 11/19/2011 09:27 PM, Hillf Danton wrote:
[...]

--- a/arch/mips/include/asm/page.h      Sun Nov 20 13:08:44 2011
+++ b/arch/mips/include/asm/page.h      Sun Nov 20 13:17:43 2011
@@ -38,6 +38,11 @@
  #define HPAGE_SIZE    (_AC(1,UL)<<  HPAGE_SHIFT)
  #define HPAGE_MASK    (~(HPAGE_SIZE - 1))
  #define HUGETLB_PAGE_ORDER    (HPAGE_SHIFT - PAGE_SHIFT)
+#else
+#define HPAGE_SHIFT    ({ BUG(); 0; })
+#define HPAGE_SIZE     ({ BUG(); 0; })
+#define HPAGE_MASK     ({ BUG(); 0; })

These three are taken care of in linux/hugetlb.h by the patches that Andrew Morton has in his tree, the full discussion starts at:

http://www.linux-mips.org/archives/linux-mips/2011-11/msg00412.html

+#define HUGETLB_PAGE_ORDER     ({ BUG(); 0; })

This value doesn't appear to be necessary at this point.

David Daney

<Prev in Thread] Current Thread [Next in Thread>