All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Prem Mallappa <prem.mallappa@gmail.com>,
	linux-mips <linux-mips@linux-mips.org>,
	Prem Mallappa <pmallappa@caviumnetworks.com>
Subject: Re: [PATCH] MIPS: KDUMP: Fix to access non-sectioned memory
Date: Thu, 03 Oct 2013 11:48:34 -0700	[thread overview]
Message-ID: <524DBC02.6020009@gmail.com> (raw)
In-Reply-To: <20131003182915.GA15556@linux-mips.org>

On 10/03/2013 11:29 AM, Ralf Baechle wrote:
> On Thu, Oct 03, 2013 at 01:16:55PM +0530, Prem Mallappa wrote:
>
>> @@ -41,19 +42,20 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
>>   	if (!csize)
>>   		return 0;
>>
>> -	vaddr = kmap_atomic_pfn(pfn);
>> +	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
>
> This is not portable, I'm afraid.

It raised a red flag for me too.

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

David Daney


>
> Ioremap on MIPS is creating uncached mappings - on most systems, that is.
> However there is no guarantee that the data accessed through this mapping
> does not reside in a cache on another CPU or another virtual address
> which would make the operation undefined.
>
> On SGI IP27 and IP35 ioremap is not even able to create RAM mappings at
> all.  If you're lucky this would result in a bus error; if you're unlucky
> it'll make the SCSI controller scribble the answer to the universe, life
> and everything on the disk drive only to corrupt it again before you have
> a chance to read it ;-)
>
> I think this is bulletproof on Octeon so until there's a better patch you
> may want to keep this around for the SDK.
>
> I wonder, does commit 5395d97b675986e7e8f3140f9e0819d20b1d22cd
> in upstream-sfr.git fix your issue?
>
> Cheers,
>
>    Ralf
>
>
>

  reply	other threads:[~2013-10-03 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  7:46 MIPS: KDUMP: fix for crashkernel to load from non-sectioned memory Prem Mallappa
2013-10-03  7:46 ` [PATCH] MIPS: KDUMP: Fix to access " Prem Mallappa
2013-10-03 18:29   ` Ralf Baechle
2013-10-03 18:48     ` David Daney [this message]
2013-10-03 20:16       ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524DBC02.6020009@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=pmallappa@caviumnetworks.com \
    --cc=prem.mallappa@gmail.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.