Fix this compile error: ---------------------- ./../common/cpuid.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__get_cpuid' 27 | __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax, | ^~~~~~~~~~~ ---------------------- and this error: ---------------------- unwind.c: In function '__collector_ext_return_address': unwind.c:236:34: error: '__u64' undeclared (first use in this function) 236 | context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \ | ^~~~~ unwind.c:490:3: note: in expansion of macro 'FILL_CONTEXT' 490 | FILL_CONTEXT ((&context)); ---------------------- --- a/gprofng/common/cpuid.c +++ b/gprofng/common/cpuid.c @@ -23,7 +23,7 @@ #elif defined(__aarch64__) #define ATTRIBUTE_UNUSED __attribute__((unused)) -static inline uint_t __attribute_const__ +static inline uint_t __attribute__((__const__)) __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax, unsigned int *ebx ATTRIBUTE_UNUSED, unsigned int *ecx ATTRIBUTE_UNUSED, unsigned int *edx ATTRIBUTE_UNUSED) --- a/gprofng/libcollector/unwind.c +++ b/gprofng/libcollector/unwind.c @@ -233,7 +233,7 @@ memory_error_func (int status ATTRIBUTE_ #elif ARCH(Aarch64) #define FILL_CONTEXT(context) \ { CALL_UTIL (getcontext) (context); \ - context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \ + context->uc_mcontext.sp = (uint64_t) __builtin_frame_address(0); \ } #endif /* ARCH() */ @@ -4579,11 +4579,11 @@ stack_unwind (char *buf, int size, void if (buf && bptr && eptr && context && size + mode > 0) getByteInstruction ((unsigned char *) eptr); int ind = 0; - __u64 *lbuf = (void *) buf; - int lsize = size / sizeof (__u64); - __u64 pc = context->uc_mcontext.pc; - __u64 sp = context->uc_mcontext.sp; - __u64 stack_base; + uint64_t *lbuf = (void *) buf; + int lsize = size / sizeof (uint64_t); + uint64_t pc = context->uc_mcontext.pc; + uint64_t sp = context->uc_mcontext.sp; + uint64_t stack_base; unsigned long tbgn = 0; unsigned long tend = 0; @@ -4594,7 +4594,7 @@ stack_unwind (char *buf, int size, void { stack_base = sp + 0x100000; if (stack_base < sp) // overflow - stack_base = (__u64) -1; + stack_base = (uint64_t) -1; } DprintfT (SP_DUMP_UNWIND, "unwind.c:%d stack_unwind %2d pc=0x%llx sp=0x%llx stack_base=0x%llx\n", @@ -4625,17 +4625,17 @@ stack_unwind (char *buf, int size, void __LINE__, (unsigned long) sp); break; } - pc = ((__u64 *) sp)[1]; - __u64 old_sp = sp; - sp = ((__u64 *) sp)[0]; + pc = ((uint64_t *) sp)[1]; + uint64_t old_sp = sp; + sp = ((uint64_t *) sp)[0]; if (sp < old_sp) break; } if (ind >= lsize) { ind = lsize - 1; - lbuf[ind++] = (__u64) SP_TRUNC_STACK_MARKER; + lbuf[ind++] = (uint64_t) SP_TRUNC_STACK_MARKER; } - return ind * sizeof (__u64); + return ind * sizeof (uint64_t); } #endif /* ARCH() */ ct name='qt'>
path: root/target/linux/generic-2.6/patches-2.6.28/007-samsung_flash.patch
blob: abb753c409fc6c6cb2dc492ff6d9b434f8336f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -51,6 +51,7 @@
 #define SST49LF040B	        0x0050
 #define SST49LF008A		0x005a
 #define AT49BV6416		0x00d6
+#define MANUFACTURER_SAMSUNG	0x00ec
 
 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
@@ -365,12 +366,19 @@ struct mtd_info *cfi_cmdset_0002(struct 
 
 		if (extp->MajorVersion != '1' ||
 		    (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
-			printk(KERN_ERR "  Unknown Amd/Fujitsu Extended Query "
-			       "version %c.%c.\n",  extp->MajorVersion,
-			       extp->MinorVersion);
-			kfree(extp);
-			kfree(mtd);
-			return NULL;
+		        if (cfi->mfr == MANUFACTURER_SAMSUNG &&
+			    (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
+			    printk(KERN_NOTICE "  Newer Samsung flash detected, "
+			           "should be compatibile with Amd/Fujitsu.\n");
+		        }
+		        else {
+			    printk(KERN_ERR "  Unknown Amd/Fujitsu Extended Query "
+			           "version %c.%c.\n",  extp->MajorVersion,
+			           extp->MinorVersion);
+			    kfree(extp);
+			    kfree(mtd);
+			    return NULL;
+		        }
 		}
 
 		/* Install our own private info structure */