lkml.org 
[lkml]   [2008]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 18/23] AMD IOMMU: simplify dma_mask_to_pages
On Thu, Sep 18, 2008 at 04:20:20AM +0900, FUJITA Tomonori wrote:
> On Wed, 17 Sep 2008 18:52:52 +0200
> Joerg Roedel <joerg.roedel@amd.com> wrote:
>
> > The current calculation is very complicated. This patch replaces it with
> > a much simpler version.
> >
> > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> > ---
> > arch/x86/kernel/amd_iommu.c | 3 +--
> > 1 files changed, 1 insertions(+), 2 deletions(-)
>
> I think that you can use iommu_device_max_index() for what
> dma_mask_to_pages does.

Hmm, in theory yes. But iommu_device_max_index() returns a size in bytes
and not in pages. So I still need to do the page shift somewhere. This
eliminates somewhat the benefit in this particular case.

Joerg

--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy



\
 
 \ /
  Last update: 2008-09-18 09:35    [W:0.096 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site