linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Jiang Liu <liuj97@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	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>,
	Rusty Russell <rusty@rustcorp.com.au>,
	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: Re: [RFC PATCH v1 01/33] mm: introduce common help functions to deal with reserved/managed pages
Date: Wed, 6 Mar 2013 17:21:41 +0000	[thread overview]
Message-ID: <20130306172140.GS17833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130305194722.GA12225@merkur.ravnborg.org>

On Tue, Mar 05, 2013 at 08:47:22PM +0100, Sam Ravnborg wrote:
> On Tue, Mar 05, 2013 at 10:54:44PM +0800, Jiang Liu wrote:
> > +static inline void free_initmem_default(int poison)
> > +{
> 
> Why request user to supply the poison argumet. If this is the default
> implmentation then use the default poison value too (POISON_FREE_INITMEM)

That poison value is inappropriate on some architectures like ARM - it's
executable.  The default poison value leads to:

   0:	cccccccc 	stclgt	12, cr12, [ip], {204}	; 0xcc

or

   4:	cccc      	ldmia	r4!, {r2, r3, r6, r7}

And we might as well forget using any kind of poison in that case.

The value which use is an undefined instruction on ARM and Thumb.

Notice the calls to poison_init_mem() in arch/arm/mm/init.c, which are
left by these patches, allowing us to continue using an appropriate
architecture specific value which will help to ensure that people
calling discarded init functions get appropriately bitten.

--
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>

  reply	other threads:[~2013-03-06 17:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 14:54 [RFC PATCH v1 00/33] accurately calculate pages managed by buddy system Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 01/33] mm: introduce common help functions to deal with reserved/managed pages Jiang Liu
2013-03-05 19:47   ` Sam Ravnborg
2013-03-06 17:21     ` Russell King - ARM Linux [this message]
2013-03-09  2:17     ` Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 02/33] mm/alpha: use common help functions to free reserved pages Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 03/33] mm/ARM: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 04/33] mm/avr32: " Jiang Liu
2013-03-05 16:50   ` Hans-Christian Egtvedt
2013-03-05 14:54 ` [RFC PATCH v1 05/33] mm/blackfin: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 06/33] mm/c6x: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 07/33] mm/cris: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 08/33] mm/FRV: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 09/33] mm/h8300: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 10/33] mm/IA64: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 11/33] mm/m32r: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 12/33] mm/m68k: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 13/33] mm/microblaze: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 14/33] mm/MIPS: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 15/33] mm/mn10300: " Jiang Liu
2013-03-05 14:54 ` [RFC PATCH v1 16/33] mm/openrisc: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 17/33] mm/parisc: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 18/33] mm/ppc: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 19/33] mm/s390: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 20/33] mm/score: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 21/33] mm/SH: " Jiang Liu
2013-03-06  2:21   ` Paul Mundt
2013-03-05 14:55 ` [RFC PATCH v1 22/33] mm/SPARC: " Jiang Liu
2013-03-05 19:49   ` David Miller
2013-03-05 19:58   ` Sam Ravnborg
2013-03-05 22:57     ` Sam Ravnborg
2013-03-06 15:56     ` Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 23/33] mm/um: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 24/33] mm/unicore32: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 25/33] mm/x86: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 26/33] mm/xtensa: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 27/33] mm,kexec: " Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 28/33] mm: introduce free_highmem_page() helper to free highmem pages inti buddy system Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 29/33] mm: accurately calculate zone->managed_pages for highmem zones Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 30/33] mm: use a dedicated lock to protect totalram_pages and zone->managed_pages Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 31/33] mm: avoid using __free_pages_bootmem() at runtime Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 32/33] mm: correctly update zone->mamaged_pages Jiang Liu
2013-03-05 14:55 ` [RFC PATCH v1 33/33] mm: report available pages as "MemTotal" for each NUMA node Jiang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130306172140.GS17833@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=a-jacquiot@ti.com \
    --cc=agust@denx.de \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=chris2553@googlemail.com \
    --cc=chris@zankel.net \
    --cc=cmetcalf@tilera.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=egtvedt@samfundet.no \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=hskinnemoen@gmail.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=jejb@parisc-linux.org \
    --cc=jeremy@goop.org \
    --cc=jiang.liu@huawei.com \
    --cc=jonas@southpole.se \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lennox.wu@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=liuj97@gmail.com \
    --cc=maciej.rutecki@gmail.com \
    --cc=mattst88@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=msalter@redhat.com \
    --cc=mst@redhat.com \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=rjw@sisk.pl \
    --cc=rth@twiddle.net \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=starvik@axis.com \
    --cc=takata@linux-m32r.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vapier@gentoo.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=walken@google.com \
    --cc=wency@cn.fujitsu.com \
    --cc=will.deacon@arm.com \
    --cc=wujianguo@huawei.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=yasutake.koichi@jp.panasonic.com \
    --cc=yinghai@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).