--- /dev/null
+From de478a61389cacafe94dc8b035081b681b878f9d Mon Sep 17 00:00:00 2001
+From: Oleksij Rempel <linux@rempel-privat.de>
+Date: Tue, 12 Apr 2016 19:37:44 +0200
+Subject: ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
+
+From: Oleksij Rempel <linux@rempel-privat.de>
+
+commit de478a61389cacafe94dc8b035081b681b878f9d upstream.
+
+by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move
+mask_m & mask_p initialisation. This coused a performance regression
+on ar9281.
+
+Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.")
+Reported-by: Gustav Frederiksen <lkml2017@openmailbox.org>
+Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
+Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/ar5008_phy.c | 8 +++-----
+ drivers/net/wireless/ath/ath9k/ar9002_phy.c | 5 -----
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+@@ -274,6 +274,9 @@ void ar5008_hw_cmn_spur_mitigate(struct
+ };
+ static const int inc[4] = { 0, 100, 0, 0 };
+
++ memset(&mask_m, 0, sizeof(int8_t) * 123);
++ memset(&mask_p, 0, sizeof(int8_t) * 123);
++
+ cur_bin = -6000;
+ upper = bin + 100;
+ lower = bin - 100;
+@@ -424,14 +427,9 @@ static void ar5008_hw_spur_mitigate(stru
+ int tmp, new;
+ int i;
+
+- int8_t mask_m[123];
+- int8_t mask_p[123];
+ int cur_bb_spur;
+ bool is2GHz = IS_CHAN_2GHZ(chan);
+
+- memset(&mask_m, 0, sizeof(int8_t) * 123);
+- memset(&mask_p, 0, sizeof(int8_t) * 123);
+-
+ for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
+ cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz);
+ if (AR_NO_SPUR == cur_bb_spur)
+--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+@@ -178,14 +178,9 @@ static void ar9002_hw_spur_mitigate(stru
+ int i;
+ struct chan_centers centers;
+
+- int8_t mask_m[123];
+- int8_t mask_p[123];
+ int cur_bb_spur;
+ bool is2GHz = IS_CHAN_2GHZ(chan);
+
+- memset(&mask_m, 0, sizeof(int8_t) * 123);
+- memset(&mask_p, 0, sizeof(int8_t) * 123);
+-
+ ath9k_hw_get_channel_centers(ah, chan, ¢ers);
+ freq = centers.synth_center;
+
--- /dev/null
+From 7df89e92a56a3d2c8f84aa76c61471e4a7bc24f9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Mon, 25 Apr 2016 16:01:19 +0300
+Subject: gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit 7df89e92a56a3d2c8f84aa76c61471e4a7bc24f9 upstream.
+
+Calling gpiod_get() from a module and then unloading the module leads to an
+oops due to acpi_can_fallback_to_crs() storing the pointer to the passed
+'con_id' string onto acpi_crs_lookup_list. The next guy to come along will then
+try to access the string but the memory may now be gone with the module.
+Make a copy of the passed string instead, and store the copy on the list.
+
+BUG: unable to handle kernel paging request at ffffffffa03e7855
+IP: [<ffffffff81338322>] strcmp+0x12/0x30
+PGD 2a07067 PUD 2a08063 PMD 74720067 PTE 0
+Oops: 0000 [#1] PREEMPT SMP
+Modules linked in: i915(+) drm_kms_helper drm intel_gtt snd_hda_codec snd_hda_core i2c_algo_bit syscopya
+rea sysfillrect sysimgblt fb_sys_fops agpgart snd_soc_sst_bytcr_rt5640 coretemp hwmon intel_rapl intel_soc_dts_thermal
+punit_atom_debug snd_soc_rt5640 snd_soc_rl6231 serio snd_intel_sst_acpi snd_intel_sst_core video snd_soc_sst_mfld_platf
+orm snd_soc_sst_match backlight int3402_thermal processor_thermal_device int3403_thermal int3400_thermal acpi_thermal_r
+el snd_soc_core intel_soc_dts_iosf int340x_thermal_zone snd_compress i2c_hid hid snd_pcm snd_timer snd soundcore evdev
+sch_fq_codel efivarfs ipv6 autofs4 [last unloaded: drm]
+CPU: 2 PID: 3064 Comm: modprobe Tainted: G U W 4.6.0-rc3-ffrd-ipvr+ #302
+Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLAKFF81.X64.0088.R10.1403240443 FFD8
+_X64_R_2014_13_1_00 03/24/2014
+task: ffff8800701cd200 ti: ffff880070034000 task.ti: ffff880070034000
+RIP: 0010:[<ffffffff81338322>] [<ffffffff81338322>] strcmp+0x12/0x30
+RSP: 0000:ffff880070037748 EFLAGS: 00010286
+RAX: 0000000080000000 RBX: ffff88007a342800 RCX: 0000000000000006
+RDX: 0000000000000006 RSI: ffffffffa054f856 RDI: ffffffffa03e7856
+RBP: ffff880070037748 R08: 0000000000000000 R09: 0000000000000001
+R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa054f855
+R13: ffff88007281cae0 R14: 0000000000000010 R15: ffffffffffffffea
+FS: 00007faa51447700(0000) GS:ffff880079300000(0000) knlGS:0000000000000000
+CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+CR2: ffffffffa03e7855 CR3: 0000000041eba000 CR4: 00000000001006e0
+Stack:
+ ffff880070037770 ffffffff8136ad28 ffffffffa054f855 0000000000000000
+ ffff88007a0a2098 ffff8800700377e8 ffffffff8136852e ffff88007a342800
+ 00000007700377a0 ffff8800700377a0 ffffffff81412442 70672d6c656e6170
+Call Trace:
+ [<ffffffff8136ad28>] acpi_can_fallback_to_crs+0x88/0x100
+ [<ffffffff8136852e>] gpiod_get_index+0x25e/0x310
+ [<ffffffff81412442>] ? mipi_dsi_attach+0x22/0x30
+ [<ffffffff813685f2>] gpiod_get+0x12/0x20
+ [<ffffffffa04fcf41>] intel_dsi_init+0x421/0x480 [i915]
+ [<ffffffffa04d3783>] intel_modeset_init+0x853/0x16b0 [i915]
+ [<ffffffffa0504864>] ? intel_setup_gmbus+0x214/0x260 [i915]
+ [<ffffffffa0510158>] i915_driver_load+0xdc8/0x19b0 [i915]
+ [<ffffffff8160fb53>] ? _raw_spin_unlock_irqrestore+0x43/0x70
+ [<ffffffffa026b13b>] drm_dev_register+0xab/0xc0 [drm]
+ [<ffffffffa026d7b3>] drm_get_pci_dev+0x93/0x1f0 [drm]
+ [<ffffffff8160fb53>] ? _raw_spin_unlock_irqrestore+0x43/0x70
+ [<ffffffffa043f1f4>] i915_pci_probe+0x34/0x50 [i915]
+ [<ffffffff81379751>] pci_device_probe+0x91/0x100
+ [<ffffffff8141a75a>] driver_probe_device+0x20a/0x2d0
+ [<ffffffff8141a8be>] __driver_attach+0x9e/0xb0
+ [<ffffffff8141a820>] ? driver_probe_device+0x2d0/0x2d0
+ [<ffffffff81418439>] bus_for_each_dev+0x69/0xa0
+ [<ffffffff8141a04e>] driver_attach+0x1e/0x20
+ [<ffffffff81419c20>] bus_add_driver+0x1c0/0x240
+ [<ffffffff8141b6d0>] driver_register+0x60/0xe0
+ [<ffffffff81377d20>] __pci_register_driver+0x60/0x70
+ [<ffffffffa026d9f4>] drm_pci_init+0xe4/0x110 [drm]
+ [<ffffffff810ce04e>] ? trace_hardirqs_on+0xe/0x10
+ [<ffffffffa02f1000>] ? 0xffffffffa02f1000
+ [<ffffffffa02f1094>] i915_init+0x94/0x9b [i915]
+ [<ffffffff810003bb>] do_one_initcall+0x8b/0x1c0
+ [<ffffffff810eb616>] ? rcu_read_lock_sched_held+0x86/0x90
+ [<ffffffff811de6d6>] ? kmem_cache_alloc_trace+0x1f6/0x270
+ [<ffffffff81183826>] do_init_module+0x60/0x1dc
+ [<ffffffff81115a8d>] load_module+0x1d0d/0x2390
+ [<ffffffff811120b0>] ? __symbol_put+0x70/0x70
+ [<ffffffff811f41b2>] ? kernel_read_file+0x92/0x120
+ [<ffffffff811162f4>] SYSC_finit_module+0xa4/0xb0
+ [<ffffffff8111631e>] SyS_finit_module+0xe/0x10
+ [<ffffffff81001ff3>] do_syscall_64+0x63/0x350
+ [<ffffffff816103da>] entry_SYSCALL64_slow_path+0x25/0x25
+Code: f7 48 8d 76 01 48 8d 52 01 0f b6 4e ff 84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0
+ 74 18 48 8d 7f 01 48 8d 76 01 <0f> b6 47 ff 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31 c0 5d c3 66
+RIP [<ffffffff81338322>] strcmp+0x12/0x30
+ RSP <ffff880070037748>
+CR2: ffffffffa03e7855
+
+v2: Make the copied con_id const
+
+Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
+Cc: Alexandre Courbot <gnurou@gmail.com>
+Fixes: 10cf4899f8af ("gpiolib: tighten up ACPI legacy gpio lookups")
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpiolib-acpi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpiolib-acpi.c
++++ b/drivers/gpio/gpiolib-acpi.c
+@@ -977,7 +977,7 @@ bool acpi_can_fallback_to_crs(struct acp
+ lookup = kmalloc(sizeof(*lookup), GFP_KERNEL);
+ if (lookup) {
+ lookup->adev = adev;
+- lookup->con_id = con_id;
++ lookup->con_id = kstrdup(con_id, GFP_KERNEL);
+ list_add_tail(&lookup->node, &acpi_crs_lookup_list);
+ }
+ }
--- /dev/null
+From e6436be21e77e3659b4ff7e357ab5a8342d132d2 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Tue, 26 Apr 2016 13:47:08 +0200
+Subject: mac80211: fix statistics leak if dev_alloc_name() fails
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit e6436be21e77e3659b4ff7e357ab5a8342d132d2 upstream.
+
+In the case that dev_alloc_name() fails, e.g. because the name was
+given by the user and already exists, we need to clean up properly
+and free the per-CPU statistics. Fix that.
+
+Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics")
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/mac80211/iface.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -1750,7 +1750,7 @@ int ieee80211_if_add(struct ieee80211_lo
+
+ ret = dev_alloc_name(ndev, ndev->name);
+ if (ret < 0) {
+- free_netdev(ndev);
++ ieee80211_if_free(ndev);
+ return ret;
+ }
+
+@@ -1836,7 +1836,7 @@ int ieee80211_if_add(struct ieee80211_lo
+
+ ret = register_netdevice(ndev);
+ if (ret) {
+- free_netdev(ndev);
++ ieee80211_if_free(ndev);
+ return ret;
+ }
+ }
--- /dev/null
+From 9c573de3283af007ea11c17bde1e4568d9417328 Mon Sep 17 00:00:00 2001
+From: Shaohua Li <shli@fb.com>
+Date: Mon, 25 Apr 2016 16:52:38 -0700
+Subject: MD: make bio mergeable
+
+From: Shaohua Li <shli@fb.com>
+
+commit 9c573de3283af007ea11c17bde1e4568d9417328 upstream.
+
+blk_queue_split marks bio unmergeable, which makes sense for normal bio.
+But if dispatching the bio to underlayer disk, the blk_queue_split
+checks are invalid, hence it's possible the bio becomes mergeable.
+
+In the reported bug, this bug causes trim against raid0 performance slash
+https://bugzilla.kernel.org/show_bug.cgi?id=117051
+
+Reported-and-tested-by: Park Ju Hyung <qkrwngud825@gmail.com>
+Fixes: 6ac45aeb6bca(block: avoid to merge splitted bio)
+Cc: Ming Lei <ming.lei@canonical.com>
+Cc: Neil Brown <neilb@suse.de>
+Reviewed-by: Jens Axboe <axboe@fb.com>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/md.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -284,6 +284,8 @@ static blk_qc_t md_make_request(struct r
+ * go away inside make_request
+ */
+ sectors = bio_sectors(bio);
++ /* bio could be mergeable after passing to underlayer */
++ bio->bi_rw &= ~REQ_NOMERGE;
+ mddev->pers->make_request(mddev, bio);
+
+ cpu = part_stat_lock();
--- /dev/null
+From 689de1d6ca95b3b5bd8ee446863bf81a4883ea25 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Mon, 2 May 2016 12:46:42 -0700
+Subject: Minimal fix-up of bad hashing behavior of hash_64()
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 689de1d6ca95b3b5bd8ee446863bf81a4883ea25 upstream.
+
+This is a fairly minimal fixup to the horribly bad behavior of hash_64()
+with certain input patterns.
+
+In particular, because the multiplicative value used for the 64-bit hash
+was intentionally bit-sparse (so that the multiply could be done with
+shifts and adds on architectures without hardware multipliers), some
+bits did not get spread out very much. In particular, certain fairly
+common bit ranges in the input (roughly bits 12-20: commonly with the
+most information in them when you hash things like byte offsets in files
+or memory that have block factors that mean that the low bits are often
+zero) would not necessarily show up much in the result.
+
+There's a bigger patch-series brewing to fix up things more completely,
+but this is the fairly minimal fix for the 64-bit hashing problem. It
+simply picks a much better constant multiplier, spreading the bits out a
+lot better.
+
+NOTE! For 32-bit architectures, the bad old hash_64() remains the same
+for now, since 64-bit multiplies are expensive. The bigger hashing
+cleanup will replace the 32-bit case with something better.
+
+The new constants were picked by George Spelvin who wrote that bigger
+cleanup series. I just picked out the constants and part of the comment
+from that series.
+
+Cc: George Spelvin <linux@horizon.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/hash.h | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+--- a/include/linux/hash.h
++++ b/include/linux/hash.h
+@@ -32,12 +32,28 @@
+ #error Wordsize not 32 or 64
+ #endif
+
++/*
++ * The above primes are actively bad for hashing, since they are
++ * too sparse. The 32-bit one is mostly ok, the 64-bit one causes
++ * real problems. Besides, the "prime" part is pointless for the
++ * multiplicative hash.
++ *
++ * Although a random odd number will do, it turns out that the golden
++ * ratio phi = (sqrt(5)-1)/2, or its negative, has particularly nice
++ * properties.
++ *
++ * These are the negative, (1 - phi) = (phi^2) = (3 - sqrt(5))/2.
++ * (See Knuth vol 3, section 6.4, exercise 9.)
++ */
++#define GOLDEN_RATIO_32 0x61C88647
++#define GOLDEN_RATIO_64 0x61C8864680B583EBull
++
+ static __always_inline u64 hash_64(u64 val, unsigned int bits)
+ {
+ u64 hash = val;
+
+-#if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64
+- hash = hash * GOLDEN_RATIO_PRIME_64;
++#if BITS_PER_LONG == 64
++ hash = hash * GOLDEN_RATIO_64;
+ #else
+ /* Sigh, gcc can't optimise this alone like it does for 32 bits. */
+ u64 n = hash;
pwm-omap-dmtimer-add-sanity-checking-for-load-and-match-values.patch
pwm-omap-dmtimer-round-load-and-match-values-rather-than-truncate.patch
lpfc-fix-misleading-indentation.patch
+gpiolib-acpi-duplicate-con_id-string-when-adding-it-to-the-crs-lookup-list.patch
+ath9k-ar5008_hw_cmn_spur_mitigate-add-missing-mask_m-mask_p-initialisation.patch
+mac80211-fix-statistics-leak-if-dev_alloc_name-fails.patch
+tracing-don-t-display-trigger-file-for-events-that-can-t-be-enabled.patch
+md-make-bio-mergeable.patch
+minimal-fix-up-of-bad-hashing-behavior-of-hash_64.patch
--- /dev/null
+From 854145e0a8e9a05f7366d240e2f99d9c1ca6d6dd Mon Sep 17 00:00:00 2001
+From: Chunyu Hu <chuhu@redhat.com>
+Date: Tue, 3 May 2016 19:34:34 +0800
+Subject: tracing: Don't display trigger file for events that can't be enabled
+
+From: Chunyu Hu <chuhu@redhat.com>
+
+commit 854145e0a8e9a05f7366d240e2f99d9c1ca6d6dd upstream.
+
+Currently register functions for events will be called
+through the 'reg' field of event class directly without
+any check when seting up triggers.
+
+Triggers for events that don't support register through
+debug fs (events under events/ftrace are for trace-cmd to
+read event format, and most of them don't have a register
+function except events/ftrace/functionx) can't be enabled
+at all, and an oops will be hit when setting up trigger
+for those events, so just not creating them is an easy way
+to avoid the oops.
+
+Link: http://lkml.kernel.org/r/1462275274-3911-1-git-send-email-chuhu@redhat.com
+
+Fixes: 85f2b08268c01 ("tracing: Add basic event trigger framework")
+Signed-off-by: Chunyu Hu <chuhu@redhat.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace_events.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/kernel/trace/trace_events.c
++++ b/kernel/trace/trace_events.c
+@@ -2095,8 +2095,13 @@ event_create_dir(struct dentry *parent,
+ trace_create_file("filter", 0644, file->dir, file,
+ &ftrace_event_filter_fops);
+
+- trace_create_file("trigger", 0644, file->dir, file,
+- &event_trigger_fops);
++ /*
++ * Only event directories that can be enabled should have
++ * triggers.
++ */
++ if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE))
++ trace_create_file("trigger", 0644, file->dir, file,
++ &event_trigger_fops);
+
+ trace_create_file("format", 0444, file->dir, call,
+ &ftrace_event_format_fops);