From: Bernhard Walle <bwalle@suse.de>
To: John Keller <jpk@sgi.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ia64: SN specific version of dma_get_required_mask()
Date: Sun, 23 Nov 2008 13:37:22 +0000 [thread overview]
Message-ID: <20081123143722.03dbbfcc@kopernikus.site> (raw)
In-Reply-To: <200811181408.mAIE8BHH057134@fcbayern.americas.sgi.com>
Hi,
[Sorry for the late reply and for not following the whole thread, I'm
just busy.]
* John Keller [2008-11-18 08:08]:
>
> This patch addresses a problem on SN Altix systems with < 4GB, where
> device drivers using the dma_get_required_mask() API would be told
> to use 32 bit DMA, when 64 bit is more efficient.
>
> How exactly the use of dma_get_required_mask() relates to the crash
> kernel code you refer to is unclear to me.
I'm not sure myself. The crashkernel reservation code on IA64 (for
other architectures I don't know any machines that have basically their
whole memory except a small amount which is used for booting mapped
above 4 GiB physical address space) needs to check if it's okay to
use memory for the crashkernel that is *all* above 4 GiB.
This is only possible if a hardware IO/MMU is present (and working
correctly in the kdump case which isn't the case on HP IA64) and SWIOTBL
is not used because SWIOTBL needs some memory below that 4 GiB margin.
Now I thought that there's a relationship between "memory above 4 GiB
can be used for DMA" and the return value of dma_get_required_mask().
My assumption was:
(dma_get_required_mask() & 0xffffffff00000000ull) > 0
-> memory above 4 GiB can be used for DMA and so the
crashkernel memory can reside above 4 GiB
(dma_get_required_mask() & 0xffffffff00000000ull) = 0
-> memory above 4 GiB can not be used for DMA and so the
crashkernel memory can not all reside above 4 GiB
Is that wrong?
> If, for all platforms, the crash kernel code could use the mask returned
> from dma_get_required_mask() to do its check, then switching the code
> might be OK. But, if that's not possible for some platforms, then I'd
> wonder if dma_get_required_mask() is being used in the wrong context in
> this case.
The crashkernel reservation code is different for every platform, so it
does not matter. However, in theory I think the check would return
correct results.
Regards,
Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
next prev parent reply other threads:[~2008-11-23 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 16:24 [PATCH] ia64: SN specific version of dma_get_required_mask() John Keller
2008-11-17 16:39 ` Bernhard Walle
2008-11-18 14:08 ` John Keller
2008-11-18 15:35 ` Luck, Tony
2008-11-23 13:37 ` Bernhard Walle [this message]
2008-11-18 15:53 ` John Keller
2008-11-19 4:07 ` FUJITA Tomonori
2008-11-19 16:12 ` John Keller
2008-11-20 4:49 ` FUJITA Tomonori
2008-11-20 22:57 ` John Keller
2008-11-21 5:11 ` FUJITA Tomonori
2008-11-25 20:50 ` John Keller
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=20081123143722.03dbbfcc@kopernikus.site \
--to=bwalle@suse.de \
--cc=jpk@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox