Messages in this thread | | | Date | Mon, 3 Dec 2018 14:48:56 +0100 | From | Joerg Roedel <> | Subject | Re: [PATCH v5 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support |
| |
On Wed, Nov 28, 2018 at 11:54:41AM +0800, Lu Baolu wrote: > - > - desc_page = alloc_pages_node(iommu->node, GFP_ATOMIC | __GFP_ZERO, 0); > + /* > + * Need two pages to accommodate 256 descriptors of 256 bits each > + * if the remapping hardware supports scalable mode translation. > + */ > + desc_page = alloc_pages_node(iommu->node, GFP_ATOMIC | __GFP_ZERO, > + !!ecap_smts(iommu->ecap));
Same here, does the allocation really need GFP_ATOMIC?
> struct q_inval { > raw_spinlock_t q_lock; > - struct qi_desc *desc; /* invalidation queue */ > + void *desc; /* invalidation queue */ > int *desc_status; /* desc status */ > int free_head; /* first free entry */ > int free_tail; /* last free entry */
Why do you switch the pointer to void* ?
Joerg
| |