projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa534f6
)
modify the query of cpu_present workaround for <NFS Most Wanted>
author
dkm
<dkm@rock-chips.com>
Tue, 26 Feb 2013 06:30:46 +0000
(14:30 +0800)
committer
dkm
<dkm@rock-chips.com>
Tue, 26 Feb 2013 06:30:46 +0000
(14:30 +0800)
drivers/base/cpu.c
[changed mode: 0644->0755]
patch
|
blob
|
history
diff --git
a/drivers/base/cpu.c
b/drivers/base/cpu.c
old mode 100644
(file)
new mode 100755
(executable)
index
251acea
..
e248edf
--- a/
drivers/base/cpu.c
+++ b/
drivers/base/cpu.c
@@
-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;