Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Thu, 26 Nov 2009
 11:30:28 -0700
Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id nAQIURmW031901	for
 <andy.sharp@lsi.com>; Thu, 26 Nov 2009 10:30:27 -0800
Received: from psmtp.com (na3sys009amx250.postini.com [74.125.149.134])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id nAQIQMpE015968	for
 <andy.sharp@lsi.com>; Thu, 26 Nov 2009 10:26:22 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx250.postini.com
 ([74.125.148.14]) with SMTP;	Thu, 26 Nov 2009 12:30:27 CST
Received: from localhost.localdomain ([127.0.0.1]:45903 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1493781AbZKZSaV (ORCPT
        <rfc822;andy.sharp@lsi.com>); Thu, 26 Nov 2009 19:30:21 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 26 Nov 2009 19:30:03
 +0100 (CET)
Received: from h5.dl5rb.org.uk ([81.2.74.5]:37572 "EHLO h5.dl5rb.org.uk"
        rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP        id
 S1493780AbZKZS37 (ORCPT <rfc822;linux-mips@linux-mips.org>);        Thu, 26
 Nov 2009 19:29:59 +0100
Received: from h5.dl5rb.org.uk (localhost.localdomain [127.0.0.1])        by
 h5.dl5rb.org.uk (8.14.3/8.14.3) with ESMTP id nAQIUAPq020261;        Thu, 26
 Nov 2009 18:30:11 GMT
Received: (from ralf@localhost)        by h5.dl5rb.org.uk
 (8.14.3/8.14.3/Submit) id nAQIU8Qr020251;        Thu, 26 Nov 2009 18:30:08
 GMT
From: Ralf Baechle <ralf@linux-mips.org>
To: "Joseph S. Myers" <joseph@codesourcery.com>
CC: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Thu, 26 Nov 2009 11:30:07 -0700
Subject: Re: MIPS asm/mman.h and MADV_HWPOISON
Thread-Topic: MIPS asm/mman.h and MADV_HWPOISON
Thread-Index: AcpuxodVcd8y8SZVT+KBsMx0s/JBGg==
Message-ID: <20091126183007.GA19853@linux-mips.org>
References: <Pine.LNX.4.64.0911252356300.31853@digraph.polyomino.org.uk>
In-Reply-To: <Pine.LNX.4.64.0911252356300.31853@digraph.polyomino.org.uk>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ralf@linux-mips.org> [22/1] 
x-pstn-neptune: 0/0/0.00/0
user-agent: Mutt/1.5.20 (2009-08-17)
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

On Wed, Nov 25, 2009 at 11:57:07PM +0000, Joseph S. Myers wrote:

> In the course of updating glibc ports's bits/mman.h files for new MADV_*=
=20
> definitions, I noticed that arch/mips/include/asm/mman.h does not define=
=20
> MADV_HWPOISON, although architectures using asm-generic/mman.h get that=20
> definition automatically.  Should I take it that this is an oversight and=
=20
> that a definition of MADV_HWPOISON will be added with value 100, or is=20
> there some reason for it not to be defined for MIPS or for it to have a=20
> different value?

Just an omission.  Thanks for reporting.  I've just checked in below
patch.

  Ralf

From: Ralf Baechle <ralf@linux-mips.org>

MIPS: Add missing definition for MADV_HWPOISON.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h
index a2250f3..c892bfb 100644
--- a/arch/mips/include/asm/mman.h
+++ b/arch/mips/include/asm/mman.h
@@ -75,6 +75,7 @@
=20
 #define MADV_MERGEABLE   12		/* KSM may merge identical pages */
 #define MADV_UNMERGEABLE 13		/* KSM may not merge identical pages */
+#define MADV_HWPOISON    100		/* poison a page for testing */
=20
 /* compatibility flags */
 #define MAP_FILE	0

