mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
xen: tmem: enable Xen tmem shim to be built/loaded as a module
Allow Xen tmem shim to be built/loaded as a module. Xen self-ballooning and frontswap-selfshrinking are now also "lazily" initialized when the Xen tmem shim is loaded as a module, unless explicitly disabled by module parameters. Note runtime dependency disallows loading if cleancache/frontswap lazy initialization patches are not present. If built-in (not built as a module), the original mechanism of enabling via a kernel boot parameter is retained, but this should be considered deprecated. Note that module unload is explicitly not yet supported. [v1: Removed the [CLEANCACHE|FRONTSWAP]_HAS_LAZY_INIT ifdef] [v2: Squashed the xen/tmem: Remove the subsys call patch in] [[email protected]: fix build (disable_frontswap_selfshrinking undeclared)] Signed-off-by: Dan Magenheimer <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ff610a1d55
commit
10a7a07713
4 changed files with 46 additions and 19 deletions
|
|
@ -3,7 +3,15 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef CONFIG_XEN_TMEM_MODULE
|
||||
#define tmem_enabled true
|
||||
#else
|
||||
/* defined in drivers/xen/tmem.c */
|
||||
extern bool tmem_enabled;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XEN_SELFBALLOONING
|
||||
extern int xen_selfballoon_init(bool, bool);
|
||||
#endif
|
||||
|
||||
#endif /* _XEN_TMEM_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue