lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/34] AMD IOMMU: clue initialization code together
On Thu, 10 Jul 2008 14:37:47 +0200 Joerg Roedel <joerg.roedel@amd.com> wrote:

> > Is there a reason for using __get_free_pages() in this manner everywhere?
> > kmalloc() or kzalloc() are unsuitable?
>
> Yes. The device table has to be page aligned and has a maximum size of
> 2 MB.

OK

> > > + if (amd_iommu_dev_table == NULL)
> > > + goto out;
> > > +
> > > + /*
> > > + * Alias table - map PCI Bus/Dev/Func to Bus/Dev/Func the
> > > + * IOMMU see for that device
> > > + */
> > > + amd_iommu_alias_table = (void *)__get_free_pages(GFP_KERNEL,
> > > + get_order(alias_table_size));
>
> Hmm, maybe this table will fit into a kmalloc allocation. Its maximum
> size is 128 kb.

Might as well keep it all consistent in that case.



\
 
 \ /
  Last update: 2008-07-10 15:13    [W:0.098 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site