Moves alix2 the kernel version 3.7.2.  The newer kernel breaks
crypto-ocf which was using kernel_thread(), no longer exported.
Converted crypto-ocf to use newer kthread_$foo.

Signed-off-by: Russell Senior <russ...@personaltelco.net>
---

diff --git a/target/linux/generic/files/crypto/ocf/random.c 
b/target/linux/generic/files/crypto/ocf/random.c
index a5f2f64..32ead76 100644
--- a/target/linux/generic/files/crypto/ocf/random.c
+++ b/target/linux/generic/files/crypto/ocf/random.c
@@ -49,6 +49,7 @@
 #include <linux/unistd.h>
 #include <linux/poll.h>
 #include <linux/random.h>
+#include <linux/kthread.h>
 #include <cryptodev.h>
 
 #ifdef CONFIG_OCF_FIPS
@@ -79,6 +80,7 @@ struct random_op {
        void *arg;
 };
 
+static struct task_struct *random_thread;
 static int random_proc(void *arg);
 
 static pid_t           randomproc = (pid_t) -1;
@@ -141,13 +143,13 @@ crypto_rregister(
        spin_lock_irqsave(&random_lock, flags);
        list_add_tail(&rops->random_list, &random_ops);
        if (!started) {
-               randomproc = kernel_thread(random_proc, NULL, 
CLONE_FS|CLONE_FILES);
-               if (randomproc < 0) {
-                       ret = randomproc;
-                       printk("crypto: crypto_rregister cannot start random 
thread; "
-                                       "error %d", ret);
-               } else
+               random_thread = kthread_run(random_proc, NULL, "ocf-random");
+               if (IS_ERR(random_thread)) {
+                       ret = PTR_ERR(random_thread);
+               } else {
+                       randomproc = random_thread->pid;
                        started = 1;
+               }
        }
        spin_unlock_irqrestore(&random_lock, flags);
 
@@ -172,7 +174,7 @@ crypto_runregister_all(u_int32_t driverid)
 
        spin_lock_irqsave(&random_lock, flags);
        if (list_empty(&random_ops) && started)
-               kill_proc(randomproc, SIGKILL, 1);
+               kthread_stop(random_thread);
        spin_unlock_irqrestore(&random_lock, flags);
        return(0);
 }
@@ -203,7 +205,6 @@ random_proc(void *arg)
        sprintf(current->comm, "ocf-random");
 #else
        daemonize("ocf-random");
-       allow_signal(SIGKILL);
 #endif
 
        (void) get_fs();
diff --git a/target/linux/x86/alix2/config-3.7 
b/target/linux/x86/alix2/config-3.7
new file mode 100644
index 0000000..8746c51
--- /dev/null
+++ b/target/linux/x86/alix2/config-3.7
@@ -0,0 +1,27 @@
+CONFIG_ALIX=y
+# CONFIG_CHARGER_SMB347 is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DMI=y
+CONFIG_DMIID=y
+# CONFIG_DMI_SYSFS is not set
+CONFIG_GENERIC_GPIO=y
+# CONFIG_GEOS is not set
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_ICH is not set
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_HWMON=y
+# CONFIG_LEDS_CLEVO_MAIL is not set
+# CONFIG_M486 is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MGEODE_LX=y
+CONFIG_NLS=y
+CONFIG_PATA_CS5536=y
+CONFIG_PCI_LABEL=y
+# CONFIG_SCx200 is not set
+CONFIG_THERMAL_HWMON=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_DEBUGCTLMSR=y
+CONFIG_X86_TSC=y
+CONFIG_X86_USE_3DNOW=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
diff --git a/target/linux/x86/alix2/target.mk b/target/linux/x86/alix2/target.mk
index 35fad36..6bf17d5 100644
--- a/target/linux/x86/alix2/target.mk
+++ b/target/linux/x86/alix2/target.mk
@@ -19,7 +19,7 @@ DEFAULT_PACKAGES += \
                        kmod-ledtrig-heartbeat kmod-ledtrig-gpio \
                        kmod-ledtrig-netdev \
                        kmod-cpu-msr hwclock wpad
-
+LINUX_VERSION:=3.7.2
 CS5535_MASK:=0x0b000042
 
 CFLAGS += -march=geode -Os -mmmx -m3dnow -fno-align-jumps -fno-align-functions 
\


-- 
Russell Senior, President
russ...@personaltelco.net
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to