Re: [PATCH 10/10] backport: implement alloc_percpu_gfp() for < 3.18.

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

 



On Sun, 2018-02-18 at 17:10 +0100, Hauke Mehrtens wrote:
> On 02/18/2018 02:24 PM, Luca Coelho wrote:
> > From: Sara Sharon <sara.sharon@xxxxxxxxx>
> > 
> > mac80211 now uses the alloc_percpu_gfp() function, which doesn't
> > exist
> > in kernels older than 3.18.  Backport it accordingly.
> > 
> > Signed-off-by: Sara Sharon <sara.sharon@xxxxxxxxx>
> > Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
> > ---
> >  backport-include/linux/percpu.h | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >  create mode 100644 backport-include/linux/percpu.h
> > 
> > diff --git a/backport-include/linux/percpu.h b/backport-
> > include/linux/percpu.h
> > new file mode 100644
> > index 000000000000..10be03cba795
> > --- /dev/null
> > +++ b/backport-include/linux/percpu.h
> > @@ -0,0 +1,19 @@
> > +/*
> > + * Copyright (C) 2018 Intel Corporation
> > + */
> > +#ifndef __BACKPORT_PERCPU_H
> > +#define __BACKPORT_PERCPU_H
> > +#include_next <linux/percpu.h>
> > +
> > +#if LINUX_VERSION_IS_LESS(3,18,0)
> > +static inline void __percpu *__alloc_gfp_warn(void)
> > +{
> > +	WARN(1, "Cannot backport alloc_percpu_gfp");
> > +	return NULL;
> 
> Is this only called with GFP_KERNEL for now or why is it ok to only
> show
> an error message here?

Yes, exactly.  For now we only use it with GFP_KERNEL and backporting
for the other cases would be very difficult, so I took this shortcut
here.

--
Luca.
--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux