[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4jk0K-c_Z1cRucexH1kigYkEtz7h6U883sGR_b=dh36aQ@mail.gmail.com>
Date: Thu, 7 Jan 2016 11:45:09 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: Tim Gardner <tim.gardner@...onical.com>
Cc: "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Vinod Koul <vinod.koul@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Prarit Bhargava <prarit@...hat.com>,
Nicholas Mc Guire <der.herr@...r.at>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: Re: [PATCH v4.4-rc8] dmaengine: ioatdma: Squelch framesize warnings
On Thu, Jan 7, 2016 at 10:07 AM, <tim.gardner@...onical.com> wrote:
> From: Tim Gardner <tim.gardner@...onical.com>
>
> CC [M] drivers/dma/ioat/prep.o
> drivers/dma/ioat/prep.c: In function 'ioat_prep_pqxor':
> drivers/dma/ioat/prep.c:682:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> }
> ^
> drivers/dma/ioat/prep.c: In function 'ioat_prep_pqxor_val':
> drivers/dma/ioat/prep.c:714:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> }
>
> gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)
>
> Cc: Vinod Koul <vinod.koul@...el.com>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Prarit Bhargava <prarit@...hat.com>
> Cc: Nicholas Mc Guire <der.herr@...r.at>
> Cc: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
> ---
> drivers/dma/ioat/prep.c | 30 ++++++++++++++++++++++--------
> 1 file changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/dma/ioat/prep.c b/drivers/dma/ioat/prep.c
> index 6bb4a13..ff62763 100644
> --- a/drivers/dma/ioat/prep.c
> +++ b/drivers/dma/ioat/prep.c
> @@ -655,30 +655,41 @@ ioat_prep_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
> flags);
> }
>
> +static char *ioat_alloc_scf(unsigned int src_cnt)
> +{
> + if (!src_cnt || src_cnt > MAX_SCF)
> + return NULL;
> +
> + return kzalloc(src_cnt, GFP_KERNEL);
We can't do GFP_KERNEL here since prep_pqxor might be called from
non-sleeping contexts, and I don't want to incur this overhead to
every dma operation.
Instead, let's replace this with a static alloc_percpu() allocation
that gets referenced under get_cpu() (preempt disable).
Powered by blists - more mailing lists