linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* BOUNCE linux-mm@kvack.org: Header field too long (>2048)
@ 2012-03-29 21:12 owner-linux-mm
  0 siblings, 0 replies; 5+ messages in thread
From: owner-linux-mm @ 2012-03-29 21:12 UTC (permalink / raw)
  To: linux-mm-approval

>From bcrl@kvack.org  Thu Mar 29 17:12:52 2012
Return-Path: <bcrl@kvack.org>
X-Original-To: int-list-linux-mm@kvack.org
Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
	id 2A2D56B007E; Thu, 29 Mar 2012 17:12:52 -0400 (EDT)
X-Original-To: linux-mm@kvack.org
Delivered-To: linux-mm@kvack.org
Received: from psmtp.com (na3sys010amx143.postini.com [74.125.245.143])
	by kanga.kvack.org (Postfix) with SMTP id 70C396B004A
	for <linux-mm@kvack.org>; Thu, 29 Mar 2012 17:12:51 -0400 (EDT)
Received: from metis.ext.pengutronix.de ([92.198.50.35]) (using TLSv1) by na3sys010amx143.postini.com ([74.125.244.10]) with SMTP;
	Thu, 29 Mar 2012 15:12:51 CST
Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c])
	by metis.ext.pengutronix.de with esmtp (Exim 4.72)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDMdX-0007pY-6j; Thu, 29 Mar 2012 23:12:03 +0200
Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.77)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDMd1-00088m-Gz; Thu, 29 Mar 2012 23:11:31 +0200
Date: Thu, 29 Mar 2012 23:11:31 +0200
From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= <u.kleine-koenig@pengutronix.de>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Anatolij Gustschin <agust@denx.de>,
	Andreas Koensgen <ajk@comnets.uni-bremen.de>,
	Andrew Lunn <andrew@lunn.ch>, Andrew Victor <linux@maxim.org.za>,
	Arnd Bergmann <arnd@arndb.de>, Barry Song <baohua.song@csr.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	cbe-oss-dev@lists.ozlabs.org,
	Christoph Lameter <cl@linux-foundation.org>,
	Daniel Walker <dwalker@fifo99.com>,
	David Brown <davidb@codeaurora.org>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Woodhouse <dwmw2@infradead.org>,
	davinci-linux-open-source@linux.davincidsp.com,
	Eric Miao <eric.y.miao@gmail.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	ibm-acpi-devel@lists.sourceforge.net,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Jean Delvare <khali@linux-fr.org>,
	Jean-Paul Roubelat <jpr@f6fbb.org>, Joerg Reuter <jreuter@yaina.de>,
	Josh Boyer <jwboyer@gmail.com>, Kevin Hilman <khilman@ti.com>,
	Klaus Kudielka <klaus.kudielka@ieee.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org,
	linux-hams@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-media@vger.kernel.org,
	linux-mips@linux-mips.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org,
	lm-sensors@lm-sensors.org,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Matt Porter <mporter@kernel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	netdev@vger.kernel.org, Nicolas Ferre <nicolas.ferre@atmel.com>,
	Nicolas Pitre <nico@fluxnic.net>, Paul Mackerras <paulus@samba.org>,
	platform-driver-x86@vger.kernel.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Russell King <linux@arm.linux.org.uk>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Sascha Hauer <kernel@pengutronix.de>, Sekhar Nori <nsekhar@ti.com>,
	Shawn Guo <shawn.guo@linaro.org>, Tejun Heo <tj@kernel.org>,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	Tony Lindgren <tony@atomide.com>, Tony Luck <tony.luck@intel.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: [PATCH 00/17] mark const init data with __initconst instead of
 __initdata
Message-ID: <20120329211131.GA31250@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.5.21 (2010-09-15)
X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c
X-SA-Exim-Mail-From: ukl@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-mm@kvack.org
X-pstn-neptune: 1/1/1.00/100
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-dkim: 0 skipped:not-enabled
X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
X-pstn-addresses: from <u.kleine-koenig@pengutronix.de> [db-null] 
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2

Hello,

this series fixes a common error to use __initdata to mark const
variables. Most of the time this works well enough to go unnoticed
(though I wonder why the linker doesn't warn about that).
Just try adding something like

	int something __initdata;

to one of the patched files and compile to see the error.

While touching these annotations I also corrected the position where it
was wrong to go between the variable name and the =.

Note this series is not compile tested.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-Ki? 1/2 nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* BOUNCE linux-mm@kvack.org: Header field too long (>2048)
@ 2012-03-30 10:00 owner-linux-mm
  0 siblings, 0 replies; 5+ messages in thread
From: owner-linux-mm @ 2012-03-30 10:00 UTC (permalink / raw)
  To: linux-mm-approval

>From bcrl@kvack.org  Fri Mar 30 06:00:02 2012
Return-Path: <bcrl@kvack.org>
X-Original-To: int-list-linux-mm@kvack.org
Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
	id 71D416B007E; Fri, 30 Mar 2012 06:00:02 -0400 (EDT)
X-Original-To: linux-mm@kvack.org
Delivered-To: linux-mm@kvack.org
Received: from psmtp.com (na3sys010amx139.postini.com [74.125.245.139])
	by kanga.kvack.org (Postfix) with SMTP id BCB776B004A
	for <linux-mm@kvack.org>; Fri, 30 Mar 2012 06:00:01 -0400 (EDT)
Received: from metis.ext.pengutronix.de ([92.198.50.35]) (using TLSv1) by na3sys010amx139.postini.com ([74.125.244.10]) with SMTP;
	Fri, 30 Mar 2012 10:00:01 GMT
Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c])
	by metis.ext.pengutronix.de with esmtp (Exim 4.72)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDYc7-0004Tg-IU; Fri, 30 Mar 2012 11:59:23 +0200
Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.77)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDYbk-0004Z4-0y; Fri, 30 Mar 2012 11:59:00 +0200
Date: Fri, 30 Mar 2012 11:59:00 +0200
From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= <u.kleine-koenig@pengutronix.de>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Anatolij Gustschin <agust@denx.de>,
	Andreas Koensgen <ajk@comnets.uni-bremen.de>,
	Andrew Lunn <andrew@lunn.ch>, Andrew Victor <linux@maxim.org.za>,
	Arnd Bergmann <arnd@arndb.de>, Barry Song <baohua.song@csr.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	cbe-oss-dev@lists.ozlabs.org,
	Christoph Lameter <cl@linux-foundation.org>,
	Daniel Walker <dwalker@fifo99.com>,
	David Brown <davidb@codeaurora.org>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Woodhouse <dwmw2@infradead.org>,
	davinci-linux-open-source@linux.davincidsp.com,
	Eric Miao <eric.y.miao@gmail.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	ibm-acpi-devel@lists.sourceforge.net,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Jean Delvare <khali@linux-fr.org>,
	Jean-Paul Roubelat <jpr@f6fbb.org>, Joerg Reuter <jreuter@yaina.de>,
	Josh Boyer <jwboyer@gmail.com>, Kevin Hilman <khilman@ti.com>,
	Klaus Kudielka <klaus.kudielka@ieee.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org,
	linux-hams@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-media@vger.kernel.org,
	linux-mips@linux-mips.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org,
	lm-sensors@lm-sensors.org,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Matt Porter <mporter@kernel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	netdev@vger.kernel.org, Nicolas Ferre <nicolas.ferre@atmel.com>,
	Nicolas Pitre <nico@fluxnic.net>, Paul Mackerras <paulus@samba.org>,
	platform-driver-x86@vger.kernel.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Russell King <linux@arm.linux.org.uk>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Sascha Hauer <kernel@pengutronix.de>, Sekhar Nori <nsekhar@ti.com>,
	Shawn Guo <shawn.guo@linaro.org>, Tejun Heo <tj@kernel.org>,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	Tony Lindgren <tony@atomide.com>, Tony Luck <tony.luck@intel.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH 00/17] mark const init data with __initconst instead of
 __initdata
Message-ID: <20120330095859.GT15647@pengutronix.de>
References: <20120329211131.GA31250@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20120329211131.GA31250@pengutronix.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c
X-SA-Exim-Mail-From: ukl@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-mm@kvack.org
X-pstn-neptune: 1/1/1.00/100
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-dkim: 0 skipped:not-enabled
X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
X-pstn-addresses: from <u.kleine-koenig@pengutronix.de> [db-null] 
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2

On Thu, Mar 29, 2012 at 11:11:31PM +0200, Uwe Kleine-Ki? 1/2 nig wrote:
> Hello,
> 
> this series fixes a common error to use __initdata to mark const
> variables. Most of the time this works well enough to go unnoticed
> (though I wonder why the linker doesn't warn about that).
> Just try adding something like
> 
> 	int something __initdata;
> 
> to one of the patched files and compile to see the error.
> 
> While touching these annotations I also corrected the position where it
> was wrong to go between the variable name and the =.
> 
> Note this series is not compile tested.
After a question by Shawn Guo I noticed that my command to do the changes
was to lax and changed things that must not be changed (at least not
with further care). Affected are lines like:

	static const char *at91_dt_board_compat[] __initconst = {

While at91_dt_board_compat[0] is const, at91_dt_board_compat is not.

I will send a fixed series later today.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-Ki? 1/2 nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* BOUNCE linux-mm@kvack.org: Header field too long (>2048)
@ 2012-03-30 20:04 owner-linux-mm
  0 siblings, 0 replies; 5+ messages in thread
From: owner-linux-mm @ 2012-03-30 20:04 UTC (permalink / raw)
  To: linux-mm-approval

>From bcrl@kvack.org  Fri Mar 30 16:04:58 2012
Return-Path: <bcrl@kvack.org>
X-Original-To: int-list-linux-mm@kvack.org
Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
	id 46AFA6B004D; Fri, 30 Mar 2012 16:04:58 -0400 (EDT)
X-Original-To: linux-mm@kvack.org
Delivered-To: linux-mm@kvack.org
Received: from psmtp.com (na3sys010amx137.postini.com [74.125.245.137])
	by kanga.kvack.org (Postfix) with SMTP id 99D676B0044
	for <linux-mm@kvack.org>; Fri, 30 Mar 2012 16:04:57 -0400 (EDT)
Received: from metis.ext.pengutronix.de ([92.198.50.35]) (using TLSv1) by na3sys010amx137.postini.com ([74.125.244.10]) with SMTP;
	Fri, 30 Mar 2012 15:04:57 CDT
Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c])
	by metis.ext.pengutronix.de with esmtp (Exim 4.72)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDi3Z-0002ah-Lz; Fri, 30 Mar 2012 22:04:21 +0200
Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.77)
	(envelope-from <ukl@pengutronix.de>)
	id 1SDi3C-0003aa-3i; Fri, 30 Mar 2012 22:03:58 +0200
Date: Fri, 30 Mar 2012 22:03:58 +0200
From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= <u.kleine-koenig@pengutronix.de>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Anatolij Gustschin <agust@denx.de>,
	Andreas Koensgen <ajk@comnets.uni-bremen.de>,
	Andrew Lunn <andrew@lunn.ch>, Andrew Victor <linux@maxim.org.za>,
	Arnd Bergmann <arnd@arndb.de>, Barry Song <baohua.song@csr.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	cbe-oss-dev@lists.ozlabs.org,
	Christoph Lameter <cl@linux-foundation.org>,
	Daniel Walker <dwalker@fifo99.com>,
	David Brown <davidb@codeaurora.org>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	David Woodhouse <dwmw2@infradead.org>,
	davinci-linux-open-source@linux.davincidsp.com,
	Eric Miao <eric.y.miao@gmail.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	ibm-acpi-devel@lists.sourceforge.net,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Jean Delvare <khali@linux-fr.org>,
	Jean-Paul Roubelat <jpr@f6fbb.org>, Joerg Reuter <jreuter@yaina.de>,
	Josh Boyer <jwboyer@gmail.com>, Kevin Hilman <khilman@ti.com>,
	Klaus Kudielka <klaus.kudielka@ieee.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org,
	linux-hams@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-media@vger.kernel.org,
	linux-mips@linux-mips.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org,
	lm-sensors@lm-sensors.org,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Matt Porter <mporter@kernel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	netdev@vger.kernel.org, Nicolas Ferre <nicolas.ferre@atmel.com>,
	Nicolas Pitre <nico@fluxnic.net>, Paul Mackerras <paulus@samba.org>,
	platform-driver-x86@vger.kernel.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Russell King <linux@arm.linux.org.uk>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Sascha Hauer <kernel@pengutronix.de>, Sekhar Nori <nsekhar@ti.com>,
	Shawn Guo <shawn.guo@linaro.org>, Tejun Heo <tj@kernel.org>,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	Tony Lindgren <tony@atomide.com>, Tony Luck <tony.luck@intel.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: [PATCH v2 00/15] mark const init data with __initconst instead of
 __initdata
Message-ID: <20120330200358.GV15647@pengutronix.de>
References: <20120329211131.GA31250@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20120329211131.GA31250@pengutronix.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c
X-SA-Exim-Mail-From: ukl@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-mm@kvack.org
X-pstn-neptune: 0/0/0.00/0
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-dkim: 0 skipped:not-enabled
X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
X-pstn-addresses: from <u.kleine-koenig@pengutronix.de> [db-null] 
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2

Hello,

On Thu, Mar 29, 2012 at 11:11:31PM +0200, Uwe Kleine-Ki? 1/2 nig wrote:
> this series fixes a common error to use __initdata to mark const
> variables. Most of the time this works well enough to go unnoticed
> (though I wonder why the linker doesn't warn about that).
> Just try adding something like
> 
> 	int something __initdata;
> 
> to one of the patched files and compile to see the error.
> 
> While touching these annotations I also corrected the position where it
> was wrong to go between the variable name and the =.
> 
> Note this series is not compile tested.
I now dropped the wrong annotations. So two patches became obsolete
(mtd and percpu). Note that I also dropped fixing the position of
__initdata if changing it to __initconst was wrong. (I think if
__initdata is placed before the variable name it doesn't have any
effect.)

I didn't promote the Acks I got because all acked changes changed in v2.

For the details changed in each patch see the changelogs in the
respective patch mails that I follow up to this mail.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-Ki? 1/2 nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* BOUNCE linux-mm@kvack.org: Header field too long (>2048)
@ 2013-03-05 14:57 owner-linux-mm
  0 siblings, 0 replies; 5+ messages in thread
From: owner-linux-mm @ 2013-03-05 14:57 UTC (permalink / raw)
  To: linux-mm-approval

>From bcrl@kvack.org  Tue Mar  5 09:57:21 2013
Return-Path: <bcrl@kvack.org>
X-Original-To: int-list-linux-mm@kvack.org
Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
	id D47C16B0007; Tue,  5 Mar 2013 09:57:21 -0500 (EST)
X-Original-To: linux-mm@kvack.org
Delivered-To: linux-mm@kvack.org
Received: from psmtp.com (na3sys010amx197.postini.com [74.125.245.197])
	by kanga.kvack.org (Postfix) with SMTP id 435F86B0002
	for <linux-mm@kvack.org>; Tue,  5 Mar 2013 09:57:21 -0500 (EST)
Received: from mail-pb0-f50.google.com ([209.85.160.50]) (using TLSv1) by na3sys010amx197.postini.com ([74.125.244.10]) with SMTP;
	Tue, 05 Mar 2013 14:57:21 GMT
Received: by mail-pb0-f50.google.com with SMTP id up1so4557255pbc.37
        for <linux-mm@kvack.org>; Tue, 05 Mar 2013 06:57:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:from:to:cc:subject:date:message-id:x-mailer;
        bh=C/LbATEuMTxceHeqCfbtow+CB/E+oDOEhyeAFqIWm9I=;
        b=a8/7mbTxaRDmm6gNiEm1jh8OIevsWhIrY7WvWBp5an07HtF/slqFrNNFeNFbtEa3mh
         sgl9uBuJh11vsZ6Q1PJX3r4NmQIWOakzqSQphdDwFeRtteiKdVNPo2ygLUCQ8UI6bzZ5
         yBBlyz9lpYXNAcGRBVDBPXna0fftrn/qd1QMT3cmBgnXVKIS8y7liGZGSUgFZdwQ3Ue8
         D+CbquEsWiflmdQWhLDmjJUrduN4soafK4aQi5L3fL/barf+ZzyqxpoeCxdXuJfdMYCH
         XEfiGJ6EVVzl1aZ1KBQr/qXVfVtYFcmovXGiwLp7WZcmDfPb4DTMmPP9ivBUFhR8ZN2V
         HaCQ==
X-Received: by 10.68.225.99 with SMTP id rj3mr38573293pbc.183.1362495438727;
        Tue, 05 Mar 2013 06:57:18 -0800 (PST)
Received: from localhost.localdomain ([114.250.86.208])
        by mx.google.com with ESMTPS id rr14sm26970373pbb.34.2013.03.05.06.56.41
        (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 05 Mar 2013 06:57:17 -0800 (PST)
From: Jiang Liu <liuj97@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>
Cc: Jiang Liu <jiang.liu@huawei.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Maciej Rutecki <maciej.rutecki@gmail.com>,
	Chris Clayton <chris2553@googlemail.com>,
	"Rafael J . Wysocki" <rjw@sisk.pl>,
	Mel Gorman <mgorman@suse.de>,
	Minchan Kim <minchan@kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>,
	Jianguo Wu <wujianguo@huawei.com>,
	Anatolij Gustschin <agust@denx.de>,
	Aurelien Jacquiot <a-jacquiot@ti.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Chen Liqin <liqin.chen@sunplusct.com>,
	Chris Metcalf <cmetcalf@tilera.com>,
	Chris Zankel <chris@zankel.net>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biederman <ebiederm@xmission.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Helge Deller <deller@gmx.de>,
	Hirokazu Takata <takata@linux-m32r.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@redhat.com>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Jeff Dike <jdike@addtoit.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Jonas Bonn <jonas@southpole.se>,
	Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Lennox Wu <lennox.wu@gmail.com>,
	Mark Salter <msalter@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Matt Turner <mattst88@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Michal Simek <monstr@monstr.eu>,
	Michel Lespinasse <walken@google.com>,
	Mikael Starvik <starvik@axis.com>,
	Mike Frysinger <vapier@gentoo.org>,
	Paul Mackerras <paulus@samba.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@twiddle.net>,
	Rik van Riel <riel@redhat.com>,
	Russell King <linux@arm.linux.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Sam Ravnborg <sam@ravnborg.org>,
	Tang Chen <tangchen@cn.fujitsu.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	Will Deacon <will.deacon@arm.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	x86@kernel.org,
	xen-devel@lists.xensource.com,
	linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,
	linux-arm-kernel@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Subject: [RFC PATCH v1 00/33] accurately calculate pages managed by buddy system
Date: Tue,  5 Mar 2013 22:54:43 +0800
Message-Id: <1362495317-32682-1-git-send-email-jiang.liu@huawei.com>
X-Mailer: git-send-email 1.7.9.5
X-pstn-neptune: 0/0/0.00/0
X-pstn-levels:     (S:36.81945/99.90000 CV:99.9000 FC:93.6803 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
X-pstn-dkim: 1 skipped:not-enabled
X-pstn-settings: 3 (1.0000:0.0100) s cv GT3 gt2 gt1 r p m c 
X-pstn-addresses: from <liuj97@gmail.com> [db-null] 
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.3

The original goal of this patchset is to fix the bug reported by
https://bugzilla.kernel.org/show_bug.cgi?id=53501

Now it has also been expanded to reduce common code used by memory
initializion. In total it has reduced about 550 lines of code.

Patch 1:
	Extract common help functions from free_init_mem() and
	free_initrd_mem() on different architectures.
Patch 2-27:
	Use help functions to simplify free_init_mem() and
	free_initrd_mem() on different architectures. This has reduced
	about 500 lines of code.
Patch 28:
	Introduce common help function to free highmem pages when
	initializing memory subsystem.
Patch 29-32:
	Adjust totalhigh_pages, totalram_pages and zone->managed_pages
	altogether when reserving/unreserving pages.
Patch 33:
	Change /sys/.../node/nodex/meminfo to report available pages
	within the node as "MemTotal".

We have only tested these patchset on x86 platforms, and have done basic
compliation tests using cross-compilers from ftp.kernel.org. That means
some code may not pass compilation on some architectures. So any help
to test this patchset are welcomed!

Jiang Liu (33):
  mm: introduce common help functions to deal with reserved/managed
    pages
  mm/alpha: use common help functions to free reserved pages
  mm/ARM: use common help functions to free reserved pages
  mm/avr32: use common help functions to free reserved pages
  mm/blackfin: use common help functions to free reserved pages
  mm/c6x: use common help functions to free reserved pages
  mm/cris: use common help functions to free reserved pages
  mm/FRV: use common help functions to free reserved pages
  mm/h8300: use common help functions to free reserved pages
  mm/IA64: use common help functions to free reserved pages
  mm/m32r: use common help functions to free reserved pages
  mm/m68k: use common help functions to free reserved pages
  mm/microblaze: use common help functions to free reserved pages
  mm/MIPS: use common help functions to free reserved pages
  mm/mn10300: use common help functions to free reserved pages
  mm/openrisc: use common help functions to free reserved pages
  mm/parisc: use common help functions to free reserved pages
  mm/ppc: use common help functions to free reserved pages
  mm/s390: use common help functions to free reserved pages
  mm/score: use common help functions to free reserved pages
  mm/SH: use common help functions to free reserved pages
  mm/SPARC: use common help functions to free reserved pages
  mm/um: use common help functions to free reserved pages
  mm/unicore32: use common help functions to free reserved pages
  mm/x86: use common help functions to free reserved pages
  mm/xtensa: use common help functions to free reserved pages
  mm,kexec: use common help functions to free reserved pages
  mm: introduce free_highmem_page() helper to free highmem pages inti
    buddy system
  mm: accurately calculate zone->managed_pages for highmem zones
  mm: use a dedicated lock to protect totalram_pages and
    zone->managed_pages
  mm: avoid using __free_pages_bootmem() at runtime
  mm: correctly update zone->mamaged_pages
  mm: report available pages as "MemTotal" for each NUMA node

 arch/alpha/kernel/sys_nautilus.c             |    5 +-
 arch/alpha/mm/init.c                         |   24 ++-------
 arch/alpha/mm/numa.c                         |    3 +-
 arch/arm/mm/init.c                           |   46 ++++++-----------
 arch/arm64/mm/init.c                         |   26 +---------
 arch/avr32/mm/init.c                         |   24 +--------
 arch/blackfin/mm/init.c                      |   20 +-------
 arch/c6x/mm/init.c                           |   30 +----------
 arch/cris/mm/init.c                          |   16 +-----
 arch/frv/mm/init.c                           |   32 ++----------
 arch/h8300/mm/init.c                         |   28 +----------
 arch/ia64/mm/init.c                          |   23 ++-------
 arch/m32r/mm/init.c                          |   26 ++--------
 arch/m68k/mm/init.c                          |   24 +--------
 arch/microblaze/include/asm/setup.h          |    1 -
 arch/microblaze/mm/init.c                    |   33 ++----------
 arch/mips/mm/init.c                          |   36 ++++----------
 arch/mips/sgi-ip27/ip27-memory.c             |    4 +-
 arch/mn10300/mm/init.c                       |   23 +--------
 arch/openrisc/mm/init.c                      |   27 ++--------
 arch/parisc/mm/init.c                        |   24 ++-------
 arch/powerpc/kernel/crash_dump.c             |    5 +-
 arch/powerpc/kernel/fadump.c                 |    5 +-
 arch/powerpc/kernel/kvm.c                    |    7 +--
 arch/powerpc/mm/mem.c                        |   34 ++-----------
 arch/powerpc/platforms/512x/mpc512x_shared.c |    5 +-
 arch/s390/mm/init.c                          |   35 +++----------
 arch/score/mm/init.c                         |   33 ++----------
 arch/sh/mm/init.c                            |   26 ++--------
 arch/sparc/kernel/leon_smp.c                 |   15 ++----
 arch/sparc/mm/init_32.c                      |   50 +++----------------
 arch/sparc/mm/init_64.c                      |   25 ++--------
 arch/tile/mm/init.c                          |    4 +-
 arch/um/kernel/mem.c                         |   25 ++--------
 arch/unicore32/mm/init.c                     |   26 +---------
 arch/x86/mm/init.c                           |    5 +-
 arch/x86/mm/init_32.c                        |   10 +---
 arch/x86/mm/init_64.c                        |   18 +------
 arch/xtensa/mm/init.c                        |   21 ++------
 drivers/virtio/virtio_balloon.c              |    8 +--
 drivers/xen/balloon.c                        |   19 ++-----
 include/linux/mm.h                           |   36 ++++++++++++++
 include/linux/mmzone.h                       |   14 ++++--
 kernel/kexec.c                               |    8 +--
 mm/bootmem.c                                 |   16 ++----
 mm/hugetlb.c                                 |    2 +-
 mm/memory_hotplug.c                          |   31 ++----------
 mm/nobootmem.c                               |   14 ++----
 mm/page_alloc.c                              |   69 ++++++++++++++++++++++----
 49 files changed, 248 insertions(+), 793 deletions(-)

-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* BOUNCE linux-mm@kvack.org: Header field too long (>2048)
@ 2013-03-05 14:58 owner-linux-mm
  0 siblings, 0 replies; 5+ messages in thread
From: owner-linux-mm @ 2013-03-05 14:58 UTC (permalink / raw)
  To: linux-mm-approval

>From bcrl@kvack.org  Tue Mar  5 09:58:04 2013
Return-Path: <bcrl@kvack.org>
X-Original-To: int-list-linux-mm@kvack.org
Delivered-To: int-list-linux-mm@kvack.org
Received: by kanga.kvack.org (Postfix, from userid 63042)
	id 9E42E6B0007; Tue,  5 Mar 2013 09:58:04 -0500 (EST)
X-Original-To: linux-mm@kvack.org
Delivered-To: linux-mm@kvack.org
Received: from psmtp.com (na3sys010amx127.postini.com [74.125.245.127])
	by kanga.kvack.org (Postfix) with SMTP id D6E8C6B0002
	for <linux-mm@kvack.org>; Tue,  5 Mar 2013 09:58:03 -0500 (EST)
Received: from mail-pb0-f46.google.com ([209.85.160.46]) (using TLSv1) by na3sys010amx127.postini.com ([74.125.244.10]) with SMTP;
	Tue, 05 Mar 2013 14:58:03 GMT
Received: by mail-pb0-f46.google.com with SMTP id uo15so4521155pbc.5
        for <linux-mm@kvack.org>; Tue, 05 Mar 2013 06:58:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
         :references;
        bh=JvgwYTJxADQGPl6rTdYeAlOcQVGHasJT/8OAP0hAyqM=;
        b=Ob7yhp6dZgbAJMiIPpIDfRVtwXo/JXi5+GbrSZN1pKK3vm/kvb+znFG2qLhERPnHjE
         BpDCoQyxi9zsLg22WyUp7Dv3E8LA6mK6nztNHf+dNMAt3T/R4Qt/+ID38dp5u4kC3CUi
         e1S9dr1/+4o5BDYSn6GNRCQKJbmxrlkzaOWzFyxZiNxEJeghL5WsbV4iK2F+XPhMXLjC
         5MkyRgnQPWUNpnrTPCQHEfxf2Cs4aogCUIpJ94rTfltm1ASTPjO49GvMRZgLFQMGYIe/
         Z2GfeMozEBUmSRJqWsIISop2y8tj8a9Q6pkzs5DBadBiUF5KPeao94wr7b3aAA6Z6wZD
         o67w==
X-Received: by 10.68.189.133 with SMTP id gi5mr37078438pbc.129.1362495482729;
        Tue, 05 Mar 2013 06:58:02 -0800 (PST)
Received: from localhost.localdomain ([114.250.86.208])
        by mx.google.com with ESMTPS id rr14sm26970373pbb.34.2013.03.05.06.57.19
        (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 05 Mar 2013 06:58:01 -0800 (PST)
From: Jiang Liu <liuj97@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>
Cc: Jiang Liu <jiang.liu@huawei.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Maciej Rutecki <maciej.rutecki@gmail.com>,
	Chris Clayton <chris2553@googlemail.com>,
	"Rafael J . Wysocki" <rjw@sisk.pl>,
	Mel Gorman <mgorman@suse.de>,
	Minchan Kim <minchan@kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>,
	Jianguo Wu <wujianguo@huawei.com>,
	Anatolij Gustschin <agust@denx.de>,
	Aurelien Jacquiot <a-jacquiot@ti.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Chen Liqin <liqin.chen@sunplusct.com>,
	Chris Metcalf <cmetcalf@tilera.com>,
	Chris Zankel <chris@zankel.net>,
	David Howells <dhowells@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biederman <ebiederm@xmission.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Helge Deller <deller@gmx.de>,
	Hirokazu Takata <takata@linux-m32r.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@redhat.com>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Jeff Dike <jdike@addtoit.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Jonas Bonn <jonas@southpole.se>,
	Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Lennox Wu <lennox.wu@gmail.com>,
	Mark Salter <msalter@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Matt Turner <mattst88@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Michal Simek <monstr@monstr.eu>,
	Michel Lespinasse <walken@google.com>,
	Mikael Starvik <starvik@axis.com>,
	Mike Frysinger <vapier@gentoo.org>,
	Paul Mackerras <paulus@samba.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@twiddle.net>,
	Rik van Riel <riel@redhat.com>,
	Russell King <linux@arm.linux.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Sam Ravnborg <sam@ravnborg.org>,
	Tang Chen <tangchen@cn.fujitsu.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	Will Deacon <will.deacon@arm.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	x86@kernel.org,
	xen-devel@lists.xensource.com,
	linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,
	linux-arm-kernel@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Subject: [RFC PATCH v1 01/33] mm: introduce common help functions to deal with reserved/managed pages
Date: Tue,  5 Mar 2013 22:54:44 +0800
Message-Id: <1362495317-32682-2-git-send-email-jiang.liu@huawei.com>
X-Mailer: git-send-email 1.7.9.5
In-Reply-To: <1362495317-32682-1-git-send-email-jiang.liu@huawei.com>
References: <1362495317-32682-1-git-send-email-jiang.liu@huawei.com>
X-pstn-neptune: 0/0/0.00/0
X-pstn-levels:     (S:64.57341/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-dkim: 1 skipped:not-enabled
X-pstn-settings: 3 (1.0000:0.0100) s cv GT3 gt2 gt1 r p m c 
X-pstn-addresses: from <liuj97@gmail.com> [db-null] 
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.3

Code to deal with reserved/managed pages are duplicated by many
architectures, so introduce common help functions to reduce duplicated
code. These common help functions will also be used to concentrate code
to modify totalram_pages and zone->managed_pages, which makes the code
much more clear.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
 include/linux/mm.h |   37 +++++++++++++++++++++++++++++++++++++
 mm/page_alloc.c    |   20 ++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7acc9dc..881461c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1295,6 +1295,43 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
 		unsigned long zone_start_pfn, unsigned long *zholes_size);
 extern void free_initmem(void);
 
+/* Help functions to deal with reserved/managed pages. */
+extern unsigned long free_reserved_area(unsigned long start, unsigned long end,
+					int poison, char *s);
+
+static inline void adjust_managed_page_count(struct page *page, long count)
+{
+	totalram_pages += count;
+}
+
+static inline void __free_reserved_page(struct page *page)
+{
+	ClearPageReserved(page);
+	init_page_count(page);
+	__free_page(page);
+}
+
+static inline void free_reserved_page(struct page *page)
+{
+	__free_reserved_page(page);
+	adjust_managed_page_count(page, 1);
+}
+
+static inline void mark_page_reserved(struct page *page)
+{
+	SetPageReserved(page);
+	adjust_managed_page_count(page, -1);
+}
+
+static inline void free_initmem_default(int poison)
+{
+	extern char __init_begin[], __init_end[];
+
+	free_reserved_area(PAGE_ALIGN((unsigned long)&__init_begin) ,
+			   ((unsigned long)&__init_end) & PAGE_MASK,
+			   poison, "unused kernel");
+}
+
 #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
 /*
  * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8fcced7..0fadb09 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5113,6 +5113,26 @@ early_param("movablecore", cmdline_parse_movablecore);
 
 #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
 
+unsigned long free_reserved_area(unsigned long start, unsigned long end,
+				 int poison, char *s)
+{
+	unsigned long pages, pos;
+
+	pos = start = PAGE_ALIGN(start);
+	end &= PAGE_MASK;
+	for (pages = 0; pos < end; pos += PAGE_SIZE, pages++) {
+		if (poison)
+			memset((void *)pos, poison, PAGE_SIZE);
+		free_reserved_page(virt_to_page(pos));
+	}
+
+	if (pages && s)
+		pr_info("Freeing %s memory: %ldK (%lx - %lx)\n",
+			s, pages << (PAGE_SHIFT - 10), start, end);
+
+	return pages;
+}
+
 /**
  * set_dma_reserve - set the specified number of pages reserved in the first zone
  * @new_dma_reserve: The number of pages to mark reserved
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-05 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 10:00 BOUNCE linux-mm@kvack.org: Header field too long (>2048) owner-linux-mm
  -- strict thread matches above, loose matches on Subject: below --
2013-03-05 14:58 owner-linux-mm
2013-03-05 14:57 owner-linux-mm
2012-03-30 20:04 owner-linux-mm
2012-03-29 21:12 owner-linux-mm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).