* mmots: mm-correctly-update-zone-managed_pages-fix.patch breaks compilation
@ 2013-06-05 11:16 Michal Hocko
2013-06-05 14:42 ` Jiang Liu
0 siblings, 1 reply; 2+ messages in thread
From: Michal Hocko @ 2013-06-05 11:16 UTC (permalink / raw)
To: Andrew Morton
Cc: H. Peter Anvin, Michael S. Tsirkin, sworddragon2, Arnd Bergmann,
Catalin Marinas, Chris Metcalf, David Howells, Geert Uytterhoeven,
Ingo Molnar, Jeremy Fitzhardinge, Jiang Liu, Jiang Liu,
Jianguo Wu, Joonsoo Kim, Kamezawa Hiroyuki, Konrad Rzeszutek Wilk,
Marek Szyprowski, Mel Gorman, Michel Lespinasse, Minchan Kim,
Rik van Riel, Russell King, Rusty Russell, Tang Chen, Tejun Heo,
Thomas Gleixner, Wen Congyang, Will Deacon, Yasuaki Ishimatsu,
Yinghai Lu, Sergei Shtylyov, linux-mm, LKML
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
--
Michal Hocko
SUSE Labs
--
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] 2+ messages in thread
* Re: mmots: mm-correctly-update-zone-managed_pages-fix.patch breaks compilation
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
0 siblings, 0 replies; 2+ messages in thread
From: Jiang Liu @ 2013-06-05 14:42 UTC (permalink / raw)
To: Michal Hocko
Cc: Andrew Morton, H. Peter Anvin, Michael S. Tsirkin, sworddragon2,
Arnd Bergmann, Catalin Marinas, Chris Metcalf, David Howells,
Geert Uytterhoeven, Ingo Molnar, Jeremy Fitzhardinge, Jiang Liu,
Jianguo Wu, Joonsoo Kim, Kamezawa Hiroyuki, Konrad Rzeszutek Wilk,
Marek Szyprowski, Mel Gorman, Michel Lespinasse, Minchan Kim,
Rik van Riel, Russell King, Rusty Russell, Tang Chen, Tejun Heo,
Thomas Gleixner, Wen Congyang, Will Deacon, Yasuaki Ishimatsu,
Yinghai Lu, Sergei Shtylyov, linux-mm, LKML
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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-05 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).