Re: [PATCH v4.4-rc8] dmaengine: ioatdma: Squelch framesize warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 7, 2016 at 10:07 AM,  <tim.gardner@xxxxxxxxxxxxx> wrote:
> From: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
>
>   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@xxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
> Cc: Prarit Bhargava <prarit@xxxxxxxxxx>
> Cc: Nicholas Mc Guire <der.herr@xxxxxxx>
> Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
> Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
> ---
>  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).
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux