[PATCH] even number of kmap types

From: Hugh Dickins
Date: Fri Aug 29 2003 - 16:00:49 EST


Extend the warning comment in kmap_types.h: if you add an odd number of
new kmaps, KM_VSTACK0 becomes misaligned on odd numbered cpus. I've not
added a corresponding BUG_ON to entry_trampoline.c, having an aversion
to errors which trigger too early to be seen. We should do better,
perhaps #error, or robustifying the layout; but for now just comment.

Hugh

--- 2.6.0-test4-mm3-1/include/asm-i386/kmap_types.h Fri Aug 29 16:31:40 2003
+++ linux/include/asm-i386/kmap_types.h Fri Aug 29 20:53:33 2003
@@ -5,8 +5,8 @@

enum km_type {
/*
- * IMPORTANT: dont move these 3 entries, the virtual stack
- * must be 8K aligned.
+ * IMPORTANT: don't move these 3 entries, and only add entries in
+ * pairs: the 4G/4G virtual stack must be 8K aligned on each cpu.
*/
KM_BOUNCE_READ,
KM_VSTACK1,
@@ -29,6 +29,10 @@
KM_IRQ1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
+ /*
+ * Add new entries in pairs:
+ * the 4G/4G virtual stack must be 8K aligned on each cpu.
+ */
KM_TYPE_NR
};
#endif

-
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/