All of lore.kernel.org
 help / color / mirror / Atom feed
From: dbrace <dab@hp.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad@darnok.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: kmap_atomic issue with SLES11SP1 32bit XEN driver code
Date: Thu, 15 Dec 2011 17:19:32 -0600	[thread overview]
Message-ID: <4EEA8084.8030208@hp.com> (raw)
In-Reply-To: <4EEA304402000078000684C8@nat28.tlf.novell.com>

Can you give me some URLs to documentation that can help me understand 
my issue?

Is sounds like I cannot go back to the correct virtual address after I 
map it for DMA.



On 12/15/2011 10:37 AM, Jan Beulich wrote:
>>>> On 15.12.11 at 17:15, "Brace, Don"<dab@hp.com>  wrote:
>> I do not understand what this means:
>> " That is, we'd be susceptible to this problem only if within a
>> lazy-mode enabled section k{,un}map_atomic were used
>> synchronously (which I'd consider a coding mistake)."
>>
>> Could you elaborate on this?
> Not sure what additional explanation is needed. kmap_atomic() is
> intended to be used in atomic context, and if you use it elsewhere
> that's a mis-use.
>
>> Here is what I am trying to do.
>> I am in a LLD I have bus addresses that are DMA-able that I would normally
>> DMA to except this driver is emulating hardware in software and so it does
>> not need to DMA is needs to transfer the data with the CPU.
> So this makes clear that what I told you about a possibly missing
> translation is likely the culprit. Quoting from your original mail
>
>                   linux_page = __pfn_to_page(physical_address>>  PAGE_SHIFT);
>
> I have to assume that physical_address really isn't a physical address,
> but a bus one. Hence you first need to translate it to a physical one
> before passing it to __pfn_to_page().
>
>> On non-XEN 32bit kernels I use kmap_atomic() and it handles both highmem
>> addresses and non highmem addresses with no issues.
> And so does it on Xen.
>
>> When I am running 32bit XEN kernels I run into issues like this:
>>      "BUG: unable to handle kernel paging request at 9822bf40"
> Because you pass in a random struct page *.
>
> Jan
>

-- 
Don Brace
SPSN Linux Development
Hewlett-Packard Company

  reply	other threads:[~2011-12-15 23:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 21:47 kmap_atomic issue with SLES11SP1 32bit XEN driver code dbrace
2011-12-07 21:52 ` scameron
2011-12-07 21:57   ` dbrace
2011-12-12 15:16 ` Jan Beulich
2011-12-14 21:34   ` Konrad Rzeszutek Wilk
2011-12-15  8:43     ` Jan Beulich
2011-12-15 16:15       ` Brace, Don
2011-12-15 16:37         ` Jan Beulich
2011-12-15 23:19           ` dbrace [this message]
2011-12-16  8:51             ` Jan Beulich
2011-12-16 15:16             ` Konrad Rzeszutek Wilk
2011-12-15  0:47   ` dbrace
2011-12-15  8:45     ` Jan Beulich
2011-12-19  7:52     ` Jan Beulich

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=4EEA8084.8030208@hp.com \
    --to=dab@hp.com \
    --cc=JBeulich@suse.com \
    --cc=konrad@darnok.org \
    --cc=xen-devel@lists.xensource.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.