Add commentary about the new "asmlinkage_protect()" macro
[firefly-linux-kernel-4.4.55.git] / include / linux / linkage.h
index fe2a39c489b6735f396d5f661c4b0c1781f2c230..b163c5c40dbcf2bb7a156d8a04b4f88731c025d7 100644 (file)
 # define asmregparm
 #endif
 
+/*
+ * This is used by architectures to keep arguments on the stack
+ * untouched by the compiler by keeping them live until the end.
+ * The argument stack may be owned by the assembly-language
+ * caller, not the callee, and gcc doesn't always understand
+ * that.
+ *
+ * We have the return value, and a maximum of six arguments.
+ *
+ * This should always be followed by a "return ret" for the
+ * protection to work (ie no more work that the compiler might
+ * end up needing stack temporaries for).
+ */
 #ifndef asmlinkage_protect
 # define asmlinkage_protect(n, ret, args...)   do { } while (0)
 #endif