What do you think ?
Looks a bit over-engineered, and will require us to import a header
(likely kmemdump.h) in these files, which I don't really enjoy.
I would start simple, without any such macro-magic. It's a very simple
function after all, and likely you won't end up having many of these?
Thanks David, I will do it as you suggested and see what comes out of it.
I have one side question you might know much better to answer:
As we have a start and a size for each region, this start is a virtual
address. The firmware/coprocessor that reads the memory and dumps it,
requires physical addresses.
Right. I was asking myself the same question while reviewing: should we
directly export physical ranges here instead of virtual ones. I guess
virtual ones is ok.
What do you suggest to use to retrieve that
address ? virt_to_phys might be problematic, __pa or __pa_symbol? or
better lm_alias ?
All areas should either come from memblock or be global variables, right?
IIRC, virt_to_phys() should work for these. Did you run into any
problems with them or why do you think virt_to_phys could be problematic?
--
Cheers
David / dhildenb