[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181203134856.lui4us4ejm4d5avz@8bytes.org>
Date: Mon, 3 Dec 2018 14:48:56 +0100
From: Joerg Roedel <joro@...tes.org>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: David Woodhouse <dwmw2@...radead.org>, ashok.raj@...el.com,
sanjay.k.kumar@...el.com, jacob.jun.pan@...el.com,
kevin.tian@...el.com, yi.l.liu@...el.com, yi.y.sun@...el.com,
peterx@...hat.com,
Jean-Philippe Brucker <jean-philippe.brucker@....com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Jacob Pan <jacob.jun.pan@...ux.intel.com>
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
Powered by blists - more mailing lists