[PATCH] Replace "vmalloc_node" with "vmalloc" for no-mmu architectures in oprofile driver
- From: "Luke Yang" <luke.adi@xxxxxxxxx>
- Date: Tue, 28 Feb 2006 11:20:23 +0800
Hi,
This is a fix to the oprofile driver. It calls "vmalloc_node()" but
no-mmu CPUs do not have that function. "vmalloc()" is OK for no-mmu
CPUs.
Signed-off-by: Luke Yang <luke.adi@xxxxxxxxx>
Index: linux-2.6/drivers/oprofile/cpu_buffer.c
===================================================================
--- linux-2.6/drivers/oprofile/cpu_buffer.c 2006-02-16
16:16:35.000000000 +0800
+++ linux-2.6/drivers/oprofile/cpu_buffer.c 2006-02-16
16:20:58.000000000 +0800
@@ -51,9 +51,13 @@
for_each_online_cpu(i) {
struct oprofile_cpu_buffer * b = &cpu_buffer[i];
-
+
+#ifdef MMU
b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size,
cpu_to_node(i));
+#else
+ b->buffer = vmalloc(sizeof(struct op_sample) * buffer_size);
+#endif
if (!b->buffer)
goto fail;
--
Best regards,
Luke Yang
magic.yyang@xxxxxxxxx; luke.adi@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Prev by Date: Re: [RFC][PATCH -mm 1/2] mm: make shrink_all_memory overflow-resistant
- Next by Date: Re: [RFC][PATCH -mm 2/2] mm: make shrink_all_memory try harder
- Previous by thread: aic79xx + tape 2.6.13.5 -> 2.6.15.4 problem
- Next by thread: Re: [PATCH] Replace "vmalloc_node" with "vmalloc" for no-mmu architectures in oprofile driver
- Index(es):
Relevant Pages
|