[Top] [All Lists]

Re: [PATCH] MIPS: KDUMP: Fix to access non-sectioned memory

To: David Daney <>
Subject: Re: [PATCH] MIPS: KDUMP: Fix to access non-sectioned memory
From: Ralf Baechle <>
Date: Thu, 3 Oct 2013 22:16:41 +0200
Cc: Prem Mallappa <>, linux-mips <>, Prem Mallappa <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 03, 2013 at 11:48:34AM -0700, David Daney wrote:

> I wonder, how does /dev/mem handle it?  We should probably do what
> the mem driver does for this.

/dev/mem is converting physical address to virtual addresses using
xlate_dev_mem_ptr() which is defined as:

#define xlate_dev_mem_ptr(p)    __va(p)

which obviously is suffering from similar problems as Prem's suggested

Fortunately /dev/(k)mem have pretty much gotten out of fashion ;-)

The x86 implementation of xlate_dev_mem_ptr() is based on ioremap_cache()
which may be x86-specific - but very handy in situations like this and
there might also be devices which want to be mapped cached.

I'm considering to implement it since ages.  I just don't want a whole
flood of new cache modes like ioremap_uncached_accelerated() or maybe
ioremap_writeback_on_sunday_afternoons_only()  ;-)


<Prev in Thread] Current Thread [Next in Thread>