From: Ralf Baechle <ralf@linux-mips.org>
To: Prem Mallappa <prem.mallappa@gmail.com>
Cc: 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, 3 Oct 2013 20:29:15 +0200 [thread overview]
Message-ID: <20131003182915.GA15556@linux-mips.org> (raw)
In-Reply-To: <1380786415-24956-2-git-send-email-pmallappa@caviumnetworks.com>
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.
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
next prev parent reply other threads:[~2013-10-03 18:29 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 [this message]
2013-10-03 18:48 ` David Daney
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=20131003182915.GA15556@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=pmallappa@caviumnetworks.com \
--cc=prem.mallappa@gmail.com \
/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.