lkml.org 
[lkml]   [2008]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] Clean up namespace in kmap_types.h
Date
On Wednesday 03 December 2008, Andi Kleen wrote:
> Clean up namespace in kmap_types.h
>
> During debugging I often use custom "D" macros. But I ran
> into a name space conflict with kmap_types.h which also defines a D macro.
> Rename the kmap_types.h one to KMAPD.
>
> No semantical changes.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

The patch looks ok, but it seems wrong to do this only on one architecture,
because kmap_types.h is mostly identical across all architectures.

I'm working on patches to consolidate a lot of generic headers, why not
add this in a generic way and make x86 use that version?

Arnd <><

--- /dev/null
+++ b/include/asm-generic/kmap_types.h
@@ -0,0 +1,29 @@
+#ifndef __ASM_GENERIC_KMAP_TYPES_H
+#define __ASM_GENERIC_KMAP_TYPES_H
+
+#ifdef CONFIG_DEBUG_HIGHMEM
+# define KMAPD(n) __KM_FENCE_##n ,
+#else
+# define KMAPD(n)
+#endif
+
+enum km_type {
+KMAPD(0) KM_BOUNCE_READ,
+KMAPD(1) KM_SKB_SUNRPC_DATA,
+KMAPD(2) KM_SKB_DATA_SOFTIRQ,
+KMAPD(3) KM_USER0,
+KMAPD(4) KM_USER1,
+KMAPD(5) KM_BIO_SRC_IRQ,
+KMAPD(6) KM_BIO_DST_IRQ,
+KMAPD(7) KM_PTE0,
+KMAPD(8) KM_PTE1,
+KMAPD(9) KM_IRQ0,
+KMAPD(10) KM_IRQ1,
+KMAPD(11) KM_SOFTIRQ0,
+KMAPD(12) KM_SOFTIRQ1,
+KMAPD(13) KM_TYPE_NR
+};
+
+#undef KMAPD
+
+#endif /* __ASM_GENERIC_KMAP_TYPES_H */

\
 
 \ /
  Last update: 2008-12-03 11:43    [W:0.056 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site