update to PKT lts-v4.19.20-base-190214T090914Z

Signed-off-by: Alek Du <alek.du@intel.com>
This commit is contained in:
Alek Du 2019-02-18 02:03:12 +00:00
parent be70ea14c0
commit f868e6b881
6 changed files with 448 additions and 5 deletions

View File

@ -0,0 +1,85 @@
From f1424c4a6b7ae11670b87cd5516e70131908fc3b Mon Sep 17 00:00:00 2001
From: Mateusz Polrola <mateuszx.potrola@intel.com>
Date: Tue, 19 Sep 2017 08:37:38 +0200
Subject: [PATCH 1/4] iommu/vt-d: Added option to disable BXT IPU.
VT-d cannot be used with BXT IPU due to HW issues.
This change introduces ipu_off option that allows to disable mapping of
IPU device.
This fixes: 205999
Tracked-On: ACI-5604
Change-Id: I9319e9c64b4cf195ffd49a81dbf93773a5f1457e
Signed-off-by: Mateusz Polrola <mateuszx.potrola@intel.com>
---
drivers/iommu/intel-iommu.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 4339177629e3..214421a65b91 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -61,6 +61,7 @@
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
+#define IS_IPU4(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && (pdev)->device == 0x5a88)
#define IOAPIC_RANGE_START (0xfee00000)
#define IOAPIC_RANGE_END (0xfeefffff)
@@ -427,6 +428,7 @@ int intel_iommu_enabled = 0;
EXPORT_SYMBOL_GPL(intel_iommu_enabled);
static int dmar_map_gfx = 1;
+static int dmar_map_ipu = 1;
static int dmar_forcedac;
static int intel_iommu_strict;
static int intel_iommu_superpage = 1;
@@ -437,6 +439,7 @@ static int iommu_identity_mapping;
#define IDENTMAP_ALL 1
#define IDENTMAP_GFX 2
#define IDENTMAP_AZALIA 4
+#define IDENTMAP_IPU 8
/* Broadwell and Skylake have broken ECS support — normal so-called "second
* level" translation of DMA requests-without-PASID doesn't actually happen
@@ -532,6 +535,10 @@ static int __init intel_iommu_setup(char *str)
} else if (!strncmp(str, "igfx_off", 8)) {
dmar_map_gfx = 0;
pr_info("Disable GFX device mapping\n");
+ } else if (!strncmp(str, "ipu_off", 7)) {
+ dmar_map_ipu = 0;
+ printk(KERN_INFO
+ "Intel-IOMMU: disable IPU device mapping\n");
} else if (!strncmp(str, "forcedac", 8)) {
pr_info("Forcing DAC for PCI devices\n");
dmar_forcedac = 1;
@@ -2926,6 +2933,9 @@ static int iommu_should_identity_map(struct device *dev, int startup)
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
return 1;
+ if ((iommu_identity_mapping & IDENTMAP_IPU) && IS_IPU4(pdev))
+ return 1;
+
if (!(iommu_identity_mapping & IDENTMAP_ALL))
return 0;
@@ -5435,6 +5445,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_calpella_no_shadow_g
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0062, quirk_calpella_no_shadow_gtt);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x006a, quirk_calpella_no_shadow_gtt);
+static void quirk_broxton_ipu(struct pci_dev *dev)
+{
+ if (!dmar_map_ipu) {
+ iommu_identity_mapping |= IDENTMAP_IPU;
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x5a88, quirk_broxton_ipu);
+
/* On Tylersburg chipsets, some BIOSes have been known to enable the
ISOCH DMAR unit for the Azalia sound device, but not give it any
TLB entries, which causes it to deadlock. Check for that. We do
--
2.17.1

View File

@ -0,0 +1,129 @@
From e7566b1d3e0afadc05fbc756d3b7b4b0b73fc19c Mon Sep 17 00:00:00 2001
From: Sean Tranchetti <stranche@codeaurora.org>
Date: Mon, 11 Feb 2019 14:53:48 +0800
Subject: [PATCH 2/4] af_key: unconditionally clone on broadcast
Attempting to avoid cloning the skb when broadcasting by inflating
the refcount with sock_hold/sock_put while under RCU lock is dangerous
and violates RCU principles. It leads to subtle race conditions when
attempting to free the SKB, as we may reference sockets that have
already been freed by the stack.
Unable to handle kernel paging request at virtual address 6b6b6b6b6b6c4b
[006b6b6b6b6b6c4b] address between user and kernel address ranges
Internal error: Oops: 96000004 [#1] PREEMPT SMP
task: fffffff78f65b380 task.stack: ffffff8049a88000
pc : sock_rfree+0x38/0x6c
lr : skb_release_head_state+0x6c/0xcc
Process repro (pid: 7117, stack limit = 0xffffff8049a88000)
Call trace:
sock_rfree+0x38/0x6c
skb_release_head_state+0x6c/0xcc
skb_release_all+0x1c/0x38
__kfree_skb+0x1c/0x30
kfree_skb+0xd0/0xf4
pfkey_broadcast+0x14c/0x18c
pfkey_sendmsg+0x1d8/0x408
sock_sendmsg+0x44/0x60
___sys_sendmsg+0x1d0/0x2a8
__sys_sendmsg+0x64/0xb4
SyS_sendmsg+0x34/0x4c
el0_svc_naked+0x34/0x38
Kernel panic - not syncing: Fatal exception
CRs-Fixed: 2251019
Change-Id: Ib3b01f941a34a7df61fe9445f746b7df33f4656a
Tracked-On: PKT-1728
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
---
net/key/af_key.c | 42 ++++++++++++++++--------------------------
1 file changed, 16 insertions(+), 26 deletions(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 9d61266526e7..099636725a60 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -196,30 +196,22 @@ static int pfkey_release(struct socket *sock)
return 0;
}
-static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
- gfp_t allocation, struct sock *sk)
+static int pfkey_broadcast_one(struct sk_buff *skb, gfp_t allocation,
+ struct sock *sk)
{
int err = -ENOBUFS;
- sock_hold(sk);
- if (*skb2 == NULL) {
- if (refcount_read(&skb->users) != 1) {
- *skb2 = skb_clone(skb, allocation);
- } else {
- *skb2 = skb;
- refcount_inc(&skb->users);
- }
- }
- if (*skb2 != NULL) {
- if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {
- skb_set_owner_r(*skb2, sk);
- skb_queue_tail(&sk->sk_receive_queue, *skb2);
- sk->sk_data_ready(sk);
- *skb2 = NULL;
- err = 0;
- }
- }
- sock_put(sk);
+ if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf)
+ return err;
+
+ skb = skb_clone(skb, allocation);
+
+ if (skb) {
+ skb_set_owner_r(skb, sk);
+ skb_queue_tail(&sk->sk_receive_queue, skb);
+ sk->sk_data_ready(sk);
+ err = 0;
+ }
return err;
}
@@ -234,7 +226,6 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
{
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
struct sock *sk;
- struct sk_buff *skb2 = NULL;
int err = -ESRCH;
/* XXX Do we need something like netlink_overrun? I think
@@ -253,7 +244,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
* socket.
*/
if (pfk->promisc)
- pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
+ pfkey_broadcast_one(skb, GFP_ATOMIC, sk);
/* the exact target will be processed later */
if (sk == one_sk)
@@ -268,7 +259,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
continue;
}
- err2 = pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
+ err2 = pfkey_broadcast_one(skb, GFP_ATOMIC, sk);
/* Error is cleared after successful sending to at least one
* registered KM */
@@ -278,9 +269,8 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
rcu_read_unlock();
if (one_sk != NULL)
- err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
+ err = pfkey_broadcast_one(skb, allocation, one_sk);
- kfree_skb(skb2);
kfree_skb(skb);
return err;
}
--
2.17.1

View File

@ -0,0 +1,66 @@
From c83f63944f94009b16318c6dbf903c0e866ffbf0 Mon Sep 17 00:00:00 2001
From: "Wu, Binbin" <binbin.wu@intel.com>
Date: Wed, 6 Feb 2019 17:23:36 +0530
Subject: [PATCH 3/4] mfd: intel-lpss: Set the device in reset state before
init
In virtualized setup, when system reboots due to warm
reset interrupt storm is seen.
Call Trace:
<IRQ>
dump_stack+0x70/0xa5
__report_bad_irq+0x2e/0xc0
note_interrupt+0x248/0x290
? add_interrupt_randomness+0x30/0x220
handle_irq_event_percpu+0x54/0x80
handle_irq_event+0x39/0x60
handle_fasteoi_irq+0x91/0x150
handle_irq+0x108/0x180
do_IRQ+0x52/0xf0
common_interrupt+0xf/0xf
</IRQ>
RIP: 0033:0x76fc2cfabc1d
Code: 24 28 bf 03 00 00 00 31 c0 48 8d 35 63 77 0e 00 48 8d 15 2e
94 0e 00 4c 89 f9 49 89 d9 4c 89 d3 e8 b8 e2 01 00 48 8b 54 24 18
<48> 89 ef 48 89 de 4c 89 e1 e8 d5 97 01 00 84 c0 74 2d 48 8b 04
24
RSP: 002b:00007ffd247c1fc0 EFLAGS: 00000293 ORIG_RAX: ffffffffffffffda
RAX: 0000000000000000 RBX: 00007ffd247c1ff0 RCX: 000000000003d3ce
RDX: 0000000000000000 RSI: 00007ffd247c1ff0 RDI: 000076fc2cbb6010
RBP: 000076fc2cded010 R08: 00007ffd247c2210 R09: 00007ffd247c22a0
R10: 000076fc29465470 R11: 0000000000000000 R12: 00007ffd247c1fc0
R13: 000076fc2ce8e470 R14: 000076fc27ec9960 R15: 0000000000000414
handlers:
[<000000000d3fa913>] idma64_irq
Disabling IRQ #27
To avoid interrupt storm, set the device in reset state
before bringing out the device from reset state.
Change-Id: Ibcf00c12671bb0a2cd8ddd4faf5539d37f8503fd
Tracked-On: OAM-76110
Signed-off-by: Wu, Binbin <binbin.wu@intel.com>
Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/intel-lpss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 50bffc3382d7..ff3fba16e735 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -273,6 +273,9 @@ static void intel_lpss_init_dev(const struct intel_lpss *lpss)
{
u32 value = LPSS_PRIV_SSP_REG_DIS_DMA_FIN;
+ /* Set the device in reset state */
+ writel(0, lpss->priv + LPSS_PRIV_RESETS);
+
intel_lpss_deassert_reset(lpss);
intel_lpss_set_remap_addr(lpss);
--
2.17.1

View File

@ -0,0 +1,155 @@
From de89fd98c923632bdf7920ec95e23f8073dd5d87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Har=C5=82ozi=C5=84ski?=
<pawel.harlozinski@intel.com>
Date: Wed, 6 Feb 2019 15:51:22 +0100
Subject: [PATCH 4/4] BXT Workaround for HW bug: data loss in 16/16 -> 32/32
copier
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: Ib6dd97f94c7dfbe609a5712c5a47248646ac10ff
Tracked-On: ACI-5615
Tracked-On: OAM-75492
Signed-off-by: Paweł Harłoziński <pawel.harlozinski@intel.com>
---
include/sound/hdaudio.h | 12 +++++++++++-
include/sound/hdaudio_ext.h | 10 ----------
sound/hda/ext/hdac_ext_stream.c | 13 +------------
sound/hda/hdac_stream.c | 33 +++++++++++++++++++++++++++++++++
4 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 5eee13a0c045..0d422ab82701 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -523,7 +523,8 @@ struct hdac_stream *snd_hdac_stream_assign(struct hdac_bus *bus,
void snd_hdac_stream_release(struct hdac_stream *azx_dev);
struct hdac_stream *snd_hdac_get_stream(struct hdac_bus *bus,
int dir, int stream_tag);
-
+void snd_hdac_stream_decouple(struct hdac_bus *bus,
+ struct hdac_stream *hstream, bool decouple);
int snd_hdac_stream_setup(struct hdac_stream *azx_dev);
void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
@@ -575,6 +576,15 @@ void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
(snd_hdac_stream_readb(dev, reg) & \
~(mask)) | (val))
+/* update register macro */
+#define snd_hdac_updatel(addr, reg, mask, val) \
+ writel(((readl(addr + reg) & ~(mask)) | (val)), \
+ addr + reg)
+
+#define snd_hdac_updatew(addr, reg, mask, val) \
+ writew(((readw(addr + reg) & ~(mask)) | (val)), \
+ addr + reg)
+
#ifdef CONFIG_SND_HDA_DSP_LOADER
/* DSP lock helpers */
#define snd_hdac_dsp_lock_init(dev) mutex_init(&(dev)->dsp_mutex)
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 5ebf57fa778d..0cbf44b819e8 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -137,16 +137,6 @@ void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link,
int snd_hdac_ext_bus_link_get(struct hdac_bus *bus, struct hdac_ext_link *link);
int snd_hdac_ext_bus_link_put(struct hdac_bus *bus, struct hdac_ext_link *link);
-/* update register macro */
-#define snd_hdac_updatel(addr, reg, mask, val) \
- writel(((readl(addr + reg) & ~(mask)) | (val)), \
- addr + reg)
-
-#define snd_hdac_updatew(addr, reg, mask, val) \
- writew(((readw(addr + reg) & ~(mask)) | (val)), \
- addr + reg)
-
-
struct hdac_ext_device;
/* ops common to all codec drivers */
diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c
index fa7b80fcba9d..85ff1536ba44 100644
--- a/sound/hda/ext/hdac_ext_stream.c
+++ b/sound/hda/ext/hdac_ext_stream.c
@@ -126,19 +126,8 @@ void snd_hdac_ext_stream_decouple(struct hdac_bus *bus,
struct hdac_ext_stream *stream, bool decouple)
{
struct hdac_stream *hstream = &stream->hstream;
- u32 val;
- int mask = AZX_PPCTL_PROCEN(hstream->index);
-
- spin_lock_irq(&bus->reg_lock);
- val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
-
- if (decouple && !val)
- snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask);
- else if (!decouple && val)
- snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0);
-
+ snd_hdac_stream_decouple(bus, hstream, decouple);
stream->decoupled = decouple;
- spin_unlock_irq(&bus->reg_lock);
}
EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple);
diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
index 67d672192606..1b83a88ae4e5 100644
--- a/sound/hda/hdac_stream.c
+++ b/sound/hda/hdac_stream.c
@@ -178,6 +178,33 @@ void snd_hdac_stream_reset(struct hdac_stream *azx_dev)
}
EXPORT_SYMBOL_GPL(snd_hdac_stream_reset);
+/**
+ * snd_hdac_stream_decouple - decouple the hdac stream
+ * @bus: HD-audio core bus
+ * @stream: HD-audio core stream object to initialize
+ * @decouple: flag to decouple
+ */
+void snd_hdac_stream_decouple(struct hdac_bus *bus,
+ struct hdac_stream *hstream, bool decouple)
+{
+ u32 val;
+ int mask = AZX_PPCTL_PROCEN(hstream->index);
+
+ if (bus->ppcap) {
+ spin_lock_irq(&bus->reg_lock);
+ val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask;
+
+ if (decouple && !val)
+ snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL,
+ mask, mask);
+ else if (!decouple && val)
+ snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0);
+
+ spin_unlock_irq(&bus->reg_lock);
+ }
+}
+EXPORT_SYMBOL_GPL(snd_hdac_stream_decouple);
+
/**
* snd_hdac_stream_setup - set up the SD for streaming
* @azx_dev: HD-audio core stream to set up
@@ -205,10 +232,16 @@ int snd_hdac_stream_setup(struct hdac_stream *azx_dev)
/* program the length of samples in cyclic buffer */
snd_hdac_stream_writel(azx_dev, SD_CBL, azx_dev->bufsize);
+ /* workaround for BXT HW bug */
+ snd_hdac_stream_decouple(bus, azx_dev, false);
+
/* program the stream format */
/* this value needs to be the same as the one programmed */
snd_hdac_stream_writew(azx_dev, SD_FORMAT, azx_dev->format_val);
+ /* workaround for BXT HW bug */
+ snd_hdac_stream_decouple(bus, azx_dev, true);
+
/* program the stream LVI (last valid index) of the BDL */
snd_hdac_stream_writew(azx_dev, SD_LVI, azx_dev->frags - 1);
--
2.17.1

View File

@ -17,8 +17,8 @@ Name: linux-iot-lts2018
Version: 4.19.20
# upstream number is the number from PKT it consist in
# YYMMDDHHMM a 10 length number
%global upstreamnumber 1902120600
Release: 14
%global upstreamnumber 1902140909
Release: 15
License: GPL-2.0
Summary: The Linux kernel
Url: http://www.kernel.org/
@ -32,8 +32,8 @@ Source5: fragment-sos
# quilt.url: https://github.com/intel/linux-intel-quilt
# quilt.branch: 4.19/base
# quilt.tag: lts-v4.19.20-base-190212T060057Z
# config.tag: lts-v4.19.20-base-190212T060057Z
# quilt.tag: lts-v4.19.20-base-190214T090914Z
# config.tag: lts-v4.19.20-base-190214T090914Z
%define ktarget0 iot-lts2018
%define kversion0 %{version}-%{release}.%{ktarget0}
@ -1042,6 +1042,10 @@ Patch0989: 0989-Get-vcpu-pcpu-mapping.patch
Patch0990: 0990-Fix-the-sample-data-flushing-issue-on-all-c.patch
Patch0991: 0991-Get-profiling-status-info.patch
Patch0992: 0992-ded-support-for-new-hypercall.patch
Patch0993: 0993-iommu-vt-d-Added-option-to-disable-BXT-IPU.patch
Patch0994: 0994-af_key-unconditionally-clone-on-broadcast.patch
Patch0995: 0995-mfd-intel-lpss-Set-the-device-in-reset-stat.patch
Patch0996: 0996-BXT-Workaround-for-HW-bug-data-loss-in-16-1.patch
#END XXXX: PK Series
# Clear Linux Series
@ -2089,6 +2093,10 @@ Linux kernel build files and install script
%patch0990 -p1
%patch0991 -p1
%patch0992 -p1
%patch0993 -p1
%patch0994 -p1
%patch0995 -p1
%patch0996 -p1
# End XXXX PK Series
# Clear Linux Series

View File

@ -1 +1 @@
14
15