parisc Dump: lkcd port.
Hi
I've already ask in the past, if there was a dump driver for the linux parisc. The answer was no. So, because I've litle time for It I've restart this port. Now I've a question about a function used for Alpha and i386.
In arch/alpha/kernel/setup.c and arch/i386/mm/init.c, there is a function called page_is_ram. It seems that this function is used by the dump driver to know if a page is a physical page or not. So my question is: does this function exist for parisc ?
Thanks.
Signature · 3 lines
Vidal Bruno, (770-4271)
SSD-HA Team, HP-UX & LINUX Support
[email protected]begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:[email protected]
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard
Quoted 4 lines · Bruno Vidal
Hi
I've already ask in the past, if there was a dump driver for the linux parisc. The answer was no. So, because I've litle time for It I've restart this port.
Oh - excellent!
Quoted 2 lines
Now I've a question
about a function used for Alpha and i386.
and mips and mips64.
Quoted 4 lines
In
arch/alpha/kernel/setup.candarch/i386/mm/init.c, there is a function calledpage_is_ram. It seems that this function is used by the dump driver to know if a page is a physical page or not. So my question is: does this function exist for parisc ?
No. I can think of two or three people who should offhand know how to write this pretty quickly though - one of them is in transit and the other won't see your mail for a few more hours.
My guess is page_is_ram() for parisc would like something like the mips or i386 versions but use npmem_ranges (count) and pmem_ranges[] (table physical page ranges):
/* leveraged from arch/mips/mm/init.c */ static inline int page_is_ram(unsigned long pagenr)
{
int i;
for (i = 0; i < npmem_ranges; i++) {
unsigned long addr, end;
/* Need to look for holes?
** parisc doesn't support CONFIG_DISCONTIGMEM (yet?)
if (pmem_holes[i].start_pfn ...)
continue;
*/
end = addr = pmem_ranges[i].start_pfn;
end += pmem_ranges[i].pages;
if (pagenr >= addr && pagenr < end)
return 1;
}
return 0;
}I might be missing some shifting (PAGE_SHIFT) but that should be easy to figure out.
hth,
grant
ps. I'm very excited to hear you are looking at this again! wohoo!