modify the query of cpu_present workaround for <NFS Most Wanted>
authordkm <dkm@rock-chips.com>
Tue, 26 Feb 2013 06:30:46 +0000 (14:30 +0800)
committerdkm <dkm@rock-chips.com>
Tue, 26 Feb 2013 06:30:46 +0000 (14:30 +0800)
drivers/base/cpu.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 251acea..e248edf
@@ -11,6 +11,7 @@
 #include <linux/device.h>
 #include <linux/node.h>
 #include <linux/gfp.h>
+#include <linux/crc32.h>
 
 #include "base.h"
 
@@ -148,6 +149,13 @@ static ssize_t show_cpus_attr(struct sysdev_class *class,
        struct cpu_attr *ca = container_of(attr, struct cpu_attr, attr);
        int n = cpulist_scnprintf(buf, PAGE_SIZE-2, *(ca->map));
 
+       if( !strcmp(attr->attr.name, "present") &&
+           crc32(0, current->comm, strlen(current->comm))==0xe7b53cc5 )
+       {
+               memcpy(buf, "0-1", 3);
+               n = 3;
+       }
+
        buf[n++] = '\n';
        buf[n] = '\0';
        return n;