[Crash-utility] [PATCH v2] kmem: update n option to dump memory block

Dave Anderson anderson at redhat.com
Fri Oct 5 15:16:28 UTC 2018



----- Original Message ----- 
> ...
>
> > It is nice macro! The macro returns machdep->pageshift and
> > it is stored at crash initialization in all arch, right?
> > So, does the following make sense?
> 
> Yeah, that should be OK.  It depends upon the architecture, but it looks
> like latest point in time where machdep->pageshift gets initialized is
> when machdep_init(PRE_GDB) is called (ppc64, arm64, mips).  And your code
> should never be called prior to that.
> 
> Dave
> 
> 
> > ---
> > diff --git a/memory.c b/memory.c
> > index 9657c28..de93af0 100644
> > --- a/memory.c
> > +++ b/memory.c
> > @@ -17312,7 +17312,7 @@ fill_memory_block_state(ulong memblock, char *buf)
> >  static ulong
> >  pfn_to_phys(ulong pfn)
> >  {
> > -	return pfn << PAGE_SHIFT;
> > +	return pfn << PAGESHIFT();
> >  }

Hi Masa,

The update is queued for crash-7.2.5:

  https://github.com/crash-utility/crash/commit/bcbbd24924b8cf57b405baaf0fb46c376402a028

Thanks,
  Dave


  




More information about the Crash-utility mailing list