I just tested your patch with the OpenAMP echo test example, it works for the atomics, the compiler now goes through the atomics. But the project is not being compiled. there is still some error that I can't understand.
../../openamp_test_bsp/ps7_cortexa9_1/include/metal/irq.h:119:1: error: expected declaration before '}' token
it comes from the include metal/irq.h in helper.c