From: <gregkh@linuxfoundation.org>
To: abbotti@mev.co.uk, atull@kernel.org, gregkh@linuxfoundation.org,
mdf@kernel.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "fpga: altera-hps2fpga: fix multiple init of l3_remap_lock" has been added to the 4.13-stable tree
Date: Thu, 07 Sep 2017 16:48:19 +0200 [thread overview]
Message-ID: <150479569923966@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
fpga: altera-hps2fpga: fix multiple init of l3_remap_lock
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
fpga-altera-hps2fpga-fix-multiple-init-of-l3_remap_lock.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 4ae2bd4b3ada3dfd80ca8110b4f567752966ca1e Mon Sep 17 00:00:00 2001
From: Ian Abbott <abbotti@mev.co.uk>
Date: Tue, 1 Aug 2017 21:20:54 -0500
Subject: fpga: altera-hps2fpga: fix multiple init of l3_remap_lock
From: Ian Abbott <abbotti@mev.co.uk>
commit 4ae2bd4b3ada3dfd80ca8110b4f567752966ca1e upstream.
The global spinlock `l3_remap_lock` is reinitialized every time the
"probe" function `alt_fpga_bridge_probe()` is called. It should only be
initialized once. Use `DEFINE_SPINLOCK()` to initialize it statically.
Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-By: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/fpga/altera-hps2fpga.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/fpga/altera-hps2fpga.c
+++ b/drivers/fpga/altera-hps2fpga.c
@@ -66,7 +66,7 @@ static int alt_hps2fpga_enable_show(stru
/* The L3 REMAP register is write only, so keep a cached value. */
static unsigned int l3_remap_shadow;
-static spinlock_t l3_remap_lock;
+static DEFINE_SPINLOCK(l3_remap_lock);
static int _alt_hps2fpga_enable_set(struct altera_hps2fpga_data *priv,
bool enable)
@@ -171,8 +171,6 @@ static int alt_fpga_bridge_probe(struct
return -EBUSY;
}
- spin_lock_init(&l3_remap_lock);
-
if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) {
if (enable > 1) {
dev_warn(dev, "invalid bridge-enable %u > 1\n", enable);
Patches currently in stable-queue which might be from abbotti@mev.co.uk are
queue-4.13/fpga-altera-hps2fpga-fix-multiple-init-of-l3_remap_lock.patch
reply other threads:[~2017-09-07 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=150479569923966@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=atull@kernel.org \
--cc=mdf@kernel.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.