mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
[PATCH] optional ZONE_DMA: optional ZONE_DMA in the VM
Make ZONE_DMA optional in core code. - ifdef all code for ZONE_DMA and related definitions following the example for ZONE_DMA32 and ZONE_HIGHMEM. - Without ZONE_DMA, ZONE_HIGHMEM and ZONE_DMA32 we get to a ZONES_SHIFT of 0. - Modify the VM statistics to work correctly without a DMA zone. - Modify slab to not create DMA slabs if there is no ZONE_DMA. [akpm@osdl.org: cleanup] [jdike@addtoit.com: build fix] [apw@shadowen.org: Simplify calculation of the number of bits we need for ZONES_SHIFT] Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Wilcox <willy@debian.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
66701b1499
commit
4b51d66989
8 changed files with 90 additions and 23 deletions
|
@ -408,6 +408,12 @@ const struct seq_operations fragmentation_op = {
|
|||
.show = frag_show,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
#define TEXT_FOR_DMA(xx) xx "_dma",
|
||||
#else
|
||||
#define TEXT_FOR_DMA(xx)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ZONE_DMA32
|
||||
#define TEXT_FOR_DMA32(xx) xx "_dma32",
|
||||
#else
|
||||
|
@ -420,7 +426,7 @@ const struct seq_operations fragmentation_op = {
|
|||
#define TEXT_FOR_HIGHMEM(xx)
|
||||
#endif
|
||||
|
||||
#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
|
||||
#define TEXTS_FOR_ZONES(xx) TEXT_FOR_DMA(xx) TEXT_FOR_DMA32(xx) xx "_normal", \
|
||||
TEXT_FOR_HIGHMEM(xx)
|
||||
|
||||
static const char * const vmstat_text[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue