@@ -6754,6 +6754,19 @@
memory at 0x284500000 that is 12Megs. The per CPU buffers of that
instance will be split up accordingly.
+ Alternatively, the memory can be reserved by the reserve_mem option:
+
+ reserve_mem=12M:4096:trace trace_instance=boot_map@trace
+
+ This will reserve 12 megabytes at boot up with a 4096 byte alignment
+ and place the ring buffer in this memory. Note that due to KASLR, the
+ memory may not be the same location each time, which will not preserve
+ the buffer content.
+
+ Also note that the layout of the ring buffer data may change between
+ kernel versions where the validator will fail and reset the ring buffer
+ if the layout is not the same as the previous kernel.
+
trace_options=[option-list]
[FTRACE] Enable or disable tracer options at boot.
The option-list is a comma delimited list of options
@@ -10465,22 +10465,20 @@ __init static void enable_instances(void)
str = boot_instance_info;
while ((curr_str = strsep(&str, "\t"))) {
- unsigned long start = 0;
- unsigned long size = 0;
+ phys_addr_t start = 0;
+ phys_addr_t size = 0;
unsigned long addr = 0;
tok = strsep(&curr_str, ",");
name = strsep(&tok, "@");
- if (tok) {
+
+ if (tok && isdigit(*tok)) {
start = memparse(tok, &tok);
if (!start) {
pr_warn("Tracing: Invalid boot instance address for %s\n",
name);
continue;
}
- }
-
- if (start) {
if (*tok != ':') {
pr_warn("Tracing: No size specified for instance %s\n", name);
continue;
@@ -10492,6 +10490,15 @@ __init static void enable_instances(void)
name);
continue;
}
+ } else if (tok) {
+ if (!reserve_mem_find_by_name(tok, &start, &size)) {
+ start = 0;
+ pr_warn("Failed to map boot instance %s to %s\n", name, tok);
+ continue;
+ }
+ }
+
+ if (start) {
addr = map_pages(start, size);
if (addr) {
pr_info("Tracing: mapped boot instance %s at physical memory 0x%lx of size 0x%lx\n",