From: Jiang Liu <liuj97@gmail.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
sworddragon2@aol.com, Arnd Bergmann <arnd@arndb.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Chris Metcalf <cmetcalf@tilera.com>,
David Howells <dhowells@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Ingo Molnar <mingo@redhat.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Jiang Liu <jiang.liu@huawei.com>,
Jianguo Wu <wujianguo@huawei.com>, Joonsoo Kim <js1304@gmail.com>,
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Mel Gorman <mel@csn.ul.ie>, Michel Lespinasse <walken@google.com>,
Minchan Kim <minchan@kernel.org>, Rik van Riel <riel@redhat.com>,
Russell King <rmk@arm.linux.org.uk>,
Rusty Russell <rusty@rustcorp.com.au>,
Tang Chen <tangchen@cn.fujitsu.com>, Tejun Heo <tj@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Wen Congyang <wency@cn.fujitsu.com>,
Will Deacon <will.deacon@arm.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Yinghai Lu <yinghai@kernel.org>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: mmots: mm-correctly-update-zone-managed_pages-fix.patch breaks compilation
Date: Wed, 05 Jun 2013 22:42:07 +0800 [thread overview]
Message-ID: <51AF4E3F.1010102@gmail.com> (raw)
In-Reply-To: <20130605111607.GM15997@dhcp22.suse.cz>
On 06/05/2013 07:16 PM, Michal Hocko wrote:
> Hi Andrew,
> the above patch breaks compilation:
> mm/page_alloc.c: In function a??adjust_managed_page_counta??:
> mm/page_alloc.c:5226: error: lvalue required as left operand of assignment
>
> Could you drop the mm/page_alloc.c hunk, please? Not all versions of gcc
> are able to cope with this obviously (mine is 4.3.4).
>
> Thanks
>
Hi Andrew,
When CONFIG_HIGHMEM is undefined, totalhigh_pages is defined as:
#define totalhigh_pages 0UL
Thus statement "totalhigh_pages += count" will cause build failure as:
CC mm/page_alloc.o
mm/page_alloc.c: In function a??adjust_managed_page_counta??:
mm/page_alloc.c:5262:19: error: lvalue required as left operand of
assignment
make[1]: *** [mm/page_alloc.o] Error 1
make: *** [mm/page_alloc.o] Error 2
So we still need to use CONFIG_HIGHMEM to guard the statement.
---
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3437f7a..860d639 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5258,8 +5258,10 @@ void adjust_managed_page_count(struct page *page,
long count)
spin_lock(&managed_page_count_lock);
page_zone(page)->managed_pages += count;
totalram_pages += count;
+#ifdef CONFIG_HIGHMEM
if (PageHighMem(page))
totalhigh_pages += count;
+#endif
spin_unlock(&managed_page_count_lock);
}
EXPORT_SYMBOL(adjust_managed_page_count);
---
--
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>
prev parent reply other threads:[~2013-06-05 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 11:16 mmots: mm-correctly-update-zone-managed_pages-fix.patch breaks compilation Michal Hocko
2013-06-05 14:42 ` Jiang Liu [this message]
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=51AF4E3F.1010102@gmail.com \
--to=liuj97@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cmetcalf@tilera.com \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=hpa@zytor.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=jeremy@goop.org \
--cc=jiang.liu@huawei.com \
--cc=js1304@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mel@csn.ul.ie \
--cc=mhocko@suse.cz \
--cc=minchan@kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=riel@redhat.com \
--cc=rmk@arm.linux.org.uk \
--cc=rusty@rustcorp.com.au \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=sworddragon2@aol.com \
--cc=tangchen@cn.fujitsu.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=walken@google.com \
--cc=wency@cn.fujitsu.com \
--cc=will.deacon@arm.com \
--cc=wujianguo@huawei.com \
--cc=yinghai@kernel.org \
/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).