|ARM Technical Support Knowledge Articles|
Applies to: DS-5
The following error messages may be encountered when attempting to build the gator module against v2.6.32 of the Linux kernel:
CC [M] [...]/gator_pmnc_armv6.o
[...]/gator_pmnc_armv6.c: In function 'gator_armv6_pmnc_start':
[...]/gator_pmnc_armv6.c:169: error: expected ')' before '*' token
[...]/gator_pmnc_armv6.c:169: error: cast specifies array type
CC [M] [...]/gator_pmnc_armv7.o
[...]/gator_pmnc_armv7.c: In function 'gator_armv7_pmnc_start':
[...]/gator_pmnc_armv7.c:354: error: expected ')' before '*' token
[...]/gator_pmnc_armv7.c:354: error: cast specifies array type
The alloc_percpu() macro provided by the kernel and defined in include/linux/percpu.h file was slightly changed between v2.6.32 and v2.6.33. The gator driver code shipped with DS-5 v5.2a requires the newer version of this function in order to build correctly.
The issue can be resolved by making two small changes to the gator source as shown below:
Open file gator_pmnc_armv6.c in a text editor, go to line 169:
pmnc_percpu_ptr = alloc_percpu(int[CNTMAX * 2]);
Change it to:
pmnc_percpu_ptr = alloc_percpu(typeof(int[CNTMAX * 2]));
Repeat the same operation with file gator_pmnc_armv7.c, line 354.
Article last edited on: 2010-11-12 10:28:00
Did you find this article helpful? Yes No
How can we improve this article?