[RFC 01/30] compat: add LINUX_BACKPORT() for prefixing symbols

2013-03-20 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" 

Ben Hutchings notes that "compat_" is already taken as a
prefix for symbols and while this is only slightly true
in practice its best we avoid any future issues.

Others in the past have noted issues with symbols exported
by backporting effort to conflict with other symbols that
might be preferred by the running kernel. In the worst
case scenerio we'd have the same subsystems with two eras
with two sets of drivers using a subystem from an era each.
This patch doesn't address that but tries to address the
namespace conflict by compat itself. The best alternative I
was hoping for was to use core module symbol namespaces but
after reviewing that effort introduced in 2007
by Andi Kleen [0] I see in the end Rusty Russell nack'd
these patches [1] so we're left with dealing with symbol
renaming.

Define LINUX_BACKPORT() to be used to allow us to rename
symbols with a backport_ prefix. The the cleanest, but
its a start. It isn't clean but its something, I welcome
other ideas.

[0] http://thread.gmane.org/gmane.linux.network/78674
[1] http://article.gmane.org/gmane.linux.kernel/606885

Signed-off-by: Luis R. Rodriguez 
---
 include/linux/compat-2.6.h |2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index 68e95d5..d1d24d0 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -3,6 +3,8 @@
 
 #ifndef __ASSEMBLY__
 
+#define LINUX_BACKPORT(__sym) backport_ ##__sym
+
 #include 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
 #include 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC 01/30] compat: add LINUX_BACKPORT() for prefixing symbols

2013-03-20 Thread Luis R. Rodriguez
From: Luis R. Rodriguez mcg...@do-not-panic.com

Ben Hutchings notes that compat_ is already taken as a
prefix for symbols and while this is only slightly true
in practice its best we avoid any future issues.

Others in the past have noted issues with symbols exported
by backporting effort to conflict with other symbols that
might be preferred by the running kernel. In the worst
case scenerio we'd have the same subsystems with two eras
with two sets of drivers using a subystem from an era each.
This patch doesn't address that but tries to address the
namespace conflict by compat itself. The best alternative I
was hoping for was to use core module symbol namespaces but
after reviewing that effort introduced in 2007
by Andi Kleen [0] I see in the end Rusty Russell nack'd
these patches [1] so we're left with dealing with symbol
renaming.

Define LINUX_BACKPORT() to be used to allow us to rename
symbols with a backport_ prefix. The the cleanest, but
its a start. It isn't clean but its something, I welcome
other ideas.

[0] http://thread.gmane.org/gmane.linux.network/78674
[1] http://article.gmane.org/gmane.linux.kernel/606885

Signed-off-by: Luis R. Rodriguez mcg...@do-not-panic.com
---
 include/linux/compat-2.6.h |2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index 68e95d5..d1d24d0 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -3,6 +3,8 @@
 
 #ifndef __ASSEMBLY__
 
+#define LINUX_BACKPORT(__sym) backport_ ##__sym
+
 #include linux/version.h
 #if (LINUX_VERSION_CODE = KERNEL_VERSION(3,1,0))
 #include linux/kconfig.h
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/