]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
xsm: Dummy hook functions must be always_inline to ensure constant
authorKeir Fraser <keir@xen.org>
Fri, 11 Jan 2013 13:45:09 +0000 (13:45 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 11 Jan 2013 13:45:09 +0000 (13:45 +0000)
propagation and dead-code elimination makes LINKER_BUG_ON() operate
properly.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/include/xsm/dummy.h

index 18f36b22bfe9eae7db15a4c045c5fc374226a965..1ca82b068098517ce7c46b9a061e3a3d82ce818d 100644 (file)
@@ -46,15 +46,15 @@ void __xsm_action_mismatch_detected(void);
  * compile-time checks on the xsm_default_t argument to ensure that the behavior
  * of the dummy XSM module is the same as the behavior with XSM disabled.
  */
-#define XSM_INLINE inline
+#define XSM_INLINE always_inline
 #define XSM_DEFAULT_ARG xsm_default_t action,
 #define XSM_DEFAULT_VOID xsm_default_t action
 #define XSM_ASSERT_ACTION(def) LINKER_BUG_ON(def != action)
 
 #endif /* XSM_ENABLE */
 
-static inline int xsm_default_action(xsm_default_t action, struct domain *src,
-                                     struct domain *target)
+static always_inline int xsm_default_action(
+    xsm_default_t action, struct domain *src, struct domain *target)
 {
     switch ( action ) {
     case XSM_HOOK: