backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Coelho <luciano.coelho@intel.com>
To: Hauke Mehrtens <hauke@hauke-m.de>, backports@vger.kernel.org
Cc: Sara Sharon <sara.sharon@intel.com>
Subject: Re: [PATCH 10/10] backport: implement alloc_percpu_gfp() for < 3.18.
Date: Sun, 18 Feb 2018 19:58:56 +0200	[thread overview]
Message-ID: <1518976736.7832.64.camel@intel.com> (raw)
In-Reply-To: <4eb11ec9-3d1e-91ee-6585-7c8221454faf@hauke-m.de>

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@intel.com>
> > 
> > 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@intel.com>
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> > ---
> >  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

  reply	other threads:[~2018-02-18 17:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-18 13:24 [PATCH 00/10] backport: updates for v4.16 Luca Coelho
2018-02-18 13:24 ` [PATCH 01/10] compat: only define thermal backports if CONFIG_THERMAL is enabled Luca Coelho
2018-02-18 13:24 ` [PATCH 02/10] backport: add pcie_find_root_port() Luca Coelho
2018-02-18 13:24 ` [PATCH 03/10] backport: include lib/bucket_locks.c Luca Coelho
2018-02-18 13:24 ` [PATCH 04/10] backport: update genl_dump_check_consistent() backport Luca Coelho
2018-02-18 13:24 ` [PATCH 05/10] backport: remove pkcs7_verify.c patch hunk Luca Coelho
2018-02-18 13:24 ` [PATCH 06/10] backport: add new build_bug.h file Luca Coelho
2018-02-18 13:24 ` [PATCH 07/10] backports: fix typo "TIMKEEPING" and fix gfp.h Luca Coelho
2018-02-18 13:24 ` [PATCH 08/10] backport: remove stddef.h inclusions Luca Coelho
2018-02-18 13:24 ` [PATCH 09/10] backport: increase max stack frame size compiler check to 1280 Luca Coelho
2018-02-18 13:24 ` [PATCH 10/10] backport: implement alloc_percpu_gfp() for < 3.18 Luca Coelho
2018-02-18 16:10   ` Hauke Mehrtens
2018-02-18 17:58     ` Luciano Coelho [this message]
2018-02-28 18:32   ` Hauke Mehrtens
2018-02-28 18:48     ` Luca Coelho
2018-02-18 16:11 ` [PATCH 00/10] backport: updates for v4.16 Hauke Mehrtens
2018-02-19  8:08   ` Luciano Coelho
2018-02-23 11:35 ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518976736.7832.64.camel@intel.com \
    --to=luciano.coelho@intel.com \
    --cc=backports@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=sara.sharon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).