]> git.openfabrics.org - ~emulex/for-vlad/old/compat.git/commitdiff
Add the COMPAT_BASE_TREE and COMPAT_BASE_TREE_VERSION
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 17 May 2010 21:18:39 +0000 (14:18 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 17 May 2010 21:18:39 +0000 (14:18 -0700)
These are to be used by projects using this tree for their
own backport projects.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Makefile
compat/main.c

index 0f583bb44a00b4ea29b2a68c0ea722538af054d3..838bf82852e8e2f98692764d9f50be52d305cada 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,13 @@ export KLIB_BUILD ?=    $(KLIB)/build
 export PWD := $(shell pwd)
 
 ifeq ($(KERNELRELEASE),)
+export COMPAT_BASE_TREE := "linux-next.git"
+# For this specific tree this is only relevant in
+# terms of the last time we synched code up with upstream
+# for internal stuff. For other compatability projects this
+# would be the git describe of the base tree you are
+# working with.
+export COMPAT_BASE_TREE_VERSION := "next-20100517"
 export COMPAT_VERSION := $(shell git describe)
 endif
 
@@ -36,6 +43,8 @@ obj-y += compat/
 NOSTDINC_FLAGS := -I$(M)/include/ \
        -include $(M)/include/linux/compat-2.6.h \
        $(CFLAGS) \
+       -DCOMPAT_BASE_TREE=\"$(COMPAT_BASE_TREE)\" \
+       -DCOMPAT_BASE_TREE_VERSION=\"$(COMPAT_BASE_TREE_VERSION)\" \
        -DCOMPAT_VERSION=\"$(COMPAT_VERSION)\"
 
 modules:
index 1a4ad6dd8b97a110bbe825915ec8a3f2f577789c..ef18516b234e6b59165922f1fd1701d8beea6e7f 100644 (file)
@@ -4,23 +4,45 @@ MODULE_AUTHOR("Luis R. Rodriguez");
 MODULE_DESCRIPTION("Kernel compatibility module");
 MODULE_LICENSE("GPL");
 
+#ifndef COMPAT_BASE_TREE
+#error "You need a COMPAT_BASE_TREE"
+#endif
+
+#ifndef COMPAT_BASE_TREE_VERSION
+#error "You need a COMPAT_BASE_TREE_VERSION"
+#endif
+
 #ifndef COMPAT_VERSION
 #error "You need a COMPAT_VERSION"
 #endif
 
+static char *compat_base_tree = COMPAT_BASE_TREE;
+static char *compat_base_tree_version = COMPAT_BASE_TREE_VERSION;
 static char *compat_version = COMPAT_VERSION;
 
+module_param(compat_base_tree, charp, 0400);
+MODULE_PARM_DESC(compat_base_tree,
+                "The upstream tree used as base for this backport");
+
+module_param(compat_base_tree_version, charp, 0400);
+MODULE_PARM_DESC(compat_base_tree_version,
+                "The git-describe of the upstream base tree");
+
 module_param(compat_version, charp, 0400);
-MODULE_PARM_DESC(compat_version, "Version of the kernel compat backport");
+MODULE_PARM_DESC(compat_version,
+                "Version of the kernel compat backport work");
 
 static int __init compat_init(void)
 {
        /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */
        compat_pm_qos_power_init();
 
-       printk(KERN_INFO "Generic kernel compatibility enabled based on "
+       printk(KERN_INFO "Kernel backport release: "
               COMPAT_VERSION
               "\n");
+       printk(KERN_INFO "Backport based on "
+              COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
+              "\n");
 
         return 0;
 }