Index: generic/include/context.h
===================================================================
--- generic/include/context.h	(revision fb10289bf2bf13f3538082bb9a71b6d317f1c27c)
+++ generic/include/context.h	(revision e1888f914c2c146f7fa8e416f6465393c32303d9)
@@ -52,12 +52,13 @@
  * address as the corresponding call to context_save().
  *
+ * This MUST be a macro, gcc -O0 does not inline functions even
+ * if they are marked inline and context_save_arch must be called
+ * from level <= that when context_restore is called.
+ *
  * @param c Context structure.
  *
  * @return context_save() returns 1, context_restore() returns 0.
  */
-static inline int context_save(context_t *c)
-{
-	return context_save_arch(c);
-}
+#define context_save(c)   context_save_arch(c)
 
 /** Restore register context.
