Open Dineshkumarparameswaran opened 9 years ago
Dinesh, The dev mailing list (http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org) would be a better way to get help... if i recall correctly _sync_fetch_and_add are symbols for atomic instructions on x86. You will have to search for the equivalents in the architecture you are using.
From https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html
"Not all operations are supported by all target processors. If a particular operation cannot be implemented on the target processor, a warning will be generated and a call an external function will be generated. The external function will carry the same name as the builtin, with an additional suffix `_n' where n is the size of the data type."
Looks like ppc is not supported by gcc for these atomic builtins.
Hi,
Where the definition of these two files, __sync_fetch_and_add and __sync_sub_and_fetch.. It is not present with the contrail-agent source code. If so it will in the kernel source code ??
Those are compiler built-ins i.e. gcc implements them.
So, we will not have any definition for this functions ??
yes
What I thought was, to see the definition of the function and change accordingly to support ppc.. If that is not possible, what could be the solution??
I saw in a forum like, by replacing syncfetch to atomic_ will solve this problem, will this work ??
or any other solution you know ?? If so please help
You can add an ifdef for PPC and add equivalent code.
ok let me try. thanks
I am porting vrouter-agent to powerpc platform.While compiling the kernel module i am getting following warnings. While inserting the kernel module it throws the same error.
WARNING: "sync_fetch_and_add_8" undefined WARNING: "sync_sub_and_fetch_8" undefined
Can anyone please comment on this