diff options
author | Robert Tivy <rtivy@ti.com> | 2015-01-22 17:23:53 -0800 |
---|---|---|
committer | Robert Tivy <rtivy@ti.com> | 2015-01-22 17:30:51 -0800 |
commit | 3f43fc6dcc579e4ccef0d4b9ee6731a3730c593c (patch) | |
tree | 4ecb3ef6f8226e4635594975bee27fe173966360 | |
parent | 739fc42098cb1e1024a4359057c6981c1f1ebc52 (diff) | |
download | linuxutils-3f43fc6dcc579e4ccef0d4b9ee6731a3730c593c.tar.gz |
Add back allowOverlap processing but deprecate it and warn if used
allowOverlap is not needed since any real overlap of CMEM memory with
kernel memory will be detected and errored. The previous overlap detection
was weak and allowOverlap was originally introduced to overcome false
overlap detection.
-rw-r--r-- | src/cmem/module/cmemk.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmem/module/cmemk.c b/src/cmem/module/cmemk.c index 23b9340..6d850c3 100644 --- a/src/cmem/module/cmemk.c +++ b/src/cmem/module/cmemk.c @@ -174,6 +174,13 @@ module_param_array(pools_3, charp, &npools[3], S_IRUGO); /* end block 3 */ /* cut-and-paste above as part of adding support for more than 4 blocks */ +static int allowOverlap = -1; +MODULE_PARM_DESC(allowOverlap, + "\n\t\t DEPRECATED - ignored if found" + "\n\t\t Set to 1 if cmem range is allowed to overlap memory range" + "\n\t\t allocated to kernel physical mem (via mem=xxx)"); +module_param(allowOverlap, int, S_IRUGO); + static int useHeapIfPoolUnavailable = 0; MODULE_PARM_DESC(useHeapIfPoolUnavailable, "\n\t\t Set to 1 if you want a pool-based allocation request to" @@ -2159,6 +2166,11 @@ int cl_config(void) int i; char *t; + /* if allowOverlap != -1 then it was set on the command line (to 0 or 1) */ + if (allowOverlap != -1) { + pr_warn("cmem_init: allowOverlap parameter has been deprecated, ignoring...\n"); + } + if (npools[0] > MAX_POOLS) { __E("Too many pools specified (%d) for Block 0, only %d supported.\n", npools[0], MAX_POOLS); return -EINVAL; |