v4.14.4, Fixes for dwmac-sun8i, Fixes for Cavium ThunderX (rhbz 1521190)
This commit is contained in:
parent
2b0281e242
commit
c1a45a3c17
|
@ -1,108 +0,0 @@
|
|||
From a8f97366452ed491d13cf1e44241bc0b5740b1f0 Mon Sep 17 00:00:00 2001
|
||||
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
|
||||
Date: Mon, 27 Nov 2017 06:21:25 +0300
|
||||
Subject: [PATCH] mm, thp: Do not make page table dirty unconditionally in
|
||||
touch_p[mu]d()
|
||||
|
||||
Currently, we unconditionally make page table dirty in touch_pmd().
|
||||
It may result in false-positive can_follow_write_pmd().
|
||||
|
||||
We may avoid the situation, if we would only make the page table entry
|
||||
dirty if caller asks for write access -- FOLL_WRITE.
|
||||
|
||||
The patch also changes touch_pud() in the same way.
|
||||
|
||||
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||
Cc: Michal Hocko <mhocko@suse.com>
|
||||
Cc: Hugh Dickins <hughd@google.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
mm/huge_memory.c | 36 +++++++++++++-----------------------
|
||||
1 file changed, 13 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
|
||||
index 86fe697e8bfb..0e7ded98d114 100644
|
||||
--- a/mm/huge_memory.c
|
||||
+++ b/mm/huge_memory.c
|
||||
@@ -842,20 +842,15 @@ EXPORT_SYMBOL_GPL(vmf_insert_pfn_pud);
|
||||
#endif /* CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD */
|
||||
|
||||
static void touch_pmd(struct vm_area_struct *vma, unsigned long addr,
|
||||
- pmd_t *pmd)
|
||||
+ pmd_t *pmd, int flags)
|
||||
{
|
||||
pmd_t _pmd;
|
||||
|
||||
- /*
|
||||
- * We should set the dirty bit only for FOLL_WRITE but for now
|
||||
- * the dirty bit in the pmd is meaningless. And if the dirty
|
||||
- * bit will become meaningful and we'll only set it with
|
||||
- * FOLL_WRITE, an atomic set_bit will be required on the pmd to
|
||||
- * set the young bit, instead of the current set_pmd_at.
|
||||
- */
|
||||
- _pmd = pmd_mkyoung(pmd_mkdirty(*pmd));
|
||||
+ _pmd = pmd_mkyoung(*pmd);
|
||||
+ if (flags & FOLL_WRITE)
|
||||
+ _pmd = pmd_mkdirty(_pmd);
|
||||
if (pmdp_set_access_flags(vma, addr & HPAGE_PMD_MASK,
|
||||
- pmd, _pmd, 1))
|
||||
+ pmd, _pmd, flags & FOLL_WRITE))
|
||||
update_mmu_cache_pmd(vma, addr, pmd);
|
||||
}
|
||||
|
||||
@@ -884,7 +879,7 @@ struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr,
|
||||
return NULL;
|
||||
|
||||
if (flags & FOLL_TOUCH)
|
||||
- touch_pmd(vma, addr, pmd);
|
||||
+ touch_pmd(vma, addr, pmd, flags);
|
||||
|
||||
/*
|
||||
* device mapped pages can only be returned if the
|
||||
@@ -995,20 +990,15 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
||||
|
||||
#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
|
||||
static void touch_pud(struct vm_area_struct *vma, unsigned long addr,
|
||||
- pud_t *pud)
|
||||
+ pud_t *pud, int flags)
|
||||
{
|
||||
pud_t _pud;
|
||||
|
||||
- /*
|
||||
- * We should set the dirty bit only for FOLL_WRITE but for now
|
||||
- * the dirty bit in the pud is meaningless. And if the dirty
|
||||
- * bit will become meaningful and we'll only set it with
|
||||
- * FOLL_WRITE, an atomic set_bit will be required on the pud to
|
||||
- * set the young bit, instead of the current set_pud_at.
|
||||
- */
|
||||
- _pud = pud_mkyoung(pud_mkdirty(*pud));
|
||||
+ _pud = pud_mkyoung(*pud);
|
||||
+ if (flags & FOLL_WRITE)
|
||||
+ _pud = pud_mkdirty(_pud);
|
||||
if (pudp_set_access_flags(vma, addr & HPAGE_PUD_MASK,
|
||||
- pud, _pud, 1))
|
||||
+ pud, _pud, flags & FOLL_WRITE))
|
||||
update_mmu_cache_pud(vma, addr, pud);
|
||||
}
|
||||
|
||||
@@ -1031,7 +1021,7 @@ struct page *follow_devmap_pud(struct vm_area_struct *vma, unsigned long addr,
|
||||
return NULL;
|
||||
|
||||
if (flags & FOLL_TOUCH)
|
||||
- touch_pud(vma, addr, pud);
|
||||
+ touch_pud(vma, addr, pud, flags);
|
||||
|
||||
/*
|
||||
* device mapped pages can only be returned if the
|
||||
@@ -1424,7 +1414,7 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
|
||||
page = pmd_page(*pmd);
|
||||
VM_BUG_ON_PAGE(!PageHead(page) && !is_zone_device_page(page), page);
|
||||
if (flags & FOLL_TOUCH)
|
||||
- touch_pmd(vma, addr, pmd);
|
||||
+ touch_pmd(vma, addr, pmd, flags);
|
||||
if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) {
|
||||
/*
|
||||
* We don't mlock() pte-mapped THPs. This way we can avoid
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -1789,3 +1789,186 @@ index ef0371811296..738ef1d9e844 100644
|
|||
--
|
||||
2.14.3
|
||||
|
||||
From 4497478c60c04d2bf37082e27fc98f4f835db96b Mon Sep 17 00:00:00 2001
|
||||
From: Niklas Cassel <niklas.cassel@axis.com>
|
||||
Date: Tue, 14 Nov 2017 11:15:54 +0100
|
||||
Subject: net: stmmac: fix LPI transitioning for dwmac4
|
||||
|
||||
The LPI transitioning logic in stmmac_main uses
|
||||
priv->tx_path_in_lpi_mode to enter/exit LPI.
|
||||
|
||||
However, priv->tx_path_in_lpi_mode is assigned
|
||||
using the return value from host_irq_status().
|
||||
|
||||
So for dwmac4, priv->tx_path_in_lpi_mode was always false,
|
||||
so stmmac_tx_clean() would always try to put us in eee mode,
|
||||
and stmmac_xmit() would never take us out of eee mode.
|
||||
|
||||
To fix this, make host_irq_status() read and return the LPI
|
||||
irq status also for dwmac4.
|
||||
|
||||
This also increments the existing LPI counters, so that
|
||||
ethtool --statistics shows LPI transitions also for dwmac4.
|
||||
|
||||
For dwmac1000, irqs are enabled/disabled using the register
|
||||
named "Interrupt Mask Register", and thus setting a bit disables
|
||||
that specific irq.
|
||||
|
||||
For dwmac4 the matching register is named "MAC_Interrupt_Enable",
|
||||
and thus setting a bit enables that specific irq.
|
||||
|
||||
Looking at dwmac1000_core.c, the irqs that are always enabled are:
|
||||
LPI and PMT.
|
||||
|
||||
Looking at dwmac4_core.c, the irqs that are always enabled are:
|
||||
PMT.
|
||||
|
||||
To be able to read the LPI irq status, we need to enable the LPI
|
||||
irq also for dwmac4.
|
||||
|
||||
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 7 ++++++-
|
||||
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 19 +++++++++++++++++++
|
||||
2 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
|
||||
index aeda3ab..789dad8 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
|
||||
@@ -98,7 +98,7 @@
|
||||
#define GMAC_PCS_IRQ_DEFAULT (GMAC_INT_RGSMIIS | GMAC_INT_PCS_LINK | \
|
||||
GMAC_INT_PCS_ANE)
|
||||
|
||||
-#define GMAC_INT_DEFAULT_MASK GMAC_INT_PMT_EN
|
||||
+#define GMAC_INT_DEFAULT_MASK (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN)
|
||||
|
||||
enum dwmac4_irq_status {
|
||||
time_stamp_irq = 0x00001000,
|
||||
@@ -106,6 +106,7 @@ enum dwmac4_irq_status {
|
||||
mmc_tx_irq = 0x00000400,
|
||||
mmc_rx_irq = 0x00000200,
|
||||
mmc_irq = 0x00000100,
|
||||
+ lpi_irq = 0x00000020,
|
||||
pmt_irq = 0x00000010,
|
||||
};
|
||||
|
||||
@@ -132,6 +133,10 @@ enum power_event {
|
||||
#define GMAC4_LPI_CTRL_STATUS_LPITXA BIT(19) /* Enable LPI TX Automate */
|
||||
#define GMAC4_LPI_CTRL_STATUS_PLS BIT(17) /* PHY Link Status */
|
||||
#define GMAC4_LPI_CTRL_STATUS_LPIEN BIT(16) /* LPI Enable */
|
||||
+#define GMAC4_LPI_CTRL_STATUS_RLPIEX BIT(3) /* Receive LPI Exit */
|
||||
+#define GMAC4_LPI_CTRL_STATUS_RLPIEN BIT(2) /* Receive LPI Entry */
|
||||
+#define GMAC4_LPI_CTRL_STATUS_TLPIEX BIT(1) /* Transmit LPI Exit */
|
||||
+#define GMAC4_LPI_CTRL_STATUS_TLPIEN BIT(0) /* Transmit LPI Entry */
|
||||
|
||||
/* MAC Debug bitmap */
|
||||
#define GMAC_DEBUG_TFCSTS_MASK GENMASK(18, 17)
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
|
||||
index 2f7d7ec..f3ed8f7 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
|
||||
@@ -580,6 +580,25 @@ static int dwmac4_irq_status(struct mac_device_info *hw,
|
||||
x->irq_receive_pmt_irq_n++;
|
||||
}
|
||||
|
||||
+ /* MAC tx/rx EEE LPI entry/exit interrupts */
|
||||
+ if (intr_status & lpi_irq) {
|
||||
+ /* Clear LPI interrupt by reading MAC_LPI_Control_Status */
|
||||
+ u32 status = readl(ioaddr + GMAC4_LPI_CTRL_STATUS);
|
||||
+
|
||||
+ if (status & GMAC4_LPI_CTRL_STATUS_TLPIEN) {
|
||||
+ ret |= CORE_IRQ_TX_PATH_IN_LPI_MODE;
|
||||
+ x->irq_tx_path_in_lpi_mode_n++;
|
||||
+ }
|
||||
+ if (status & GMAC4_LPI_CTRL_STATUS_TLPIEX) {
|
||||
+ ret |= CORE_IRQ_TX_PATH_EXIT_LPI_MODE;
|
||||
+ x->irq_tx_path_exit_lpi_mode_n++;
|
||||
+ }
|
||||
+ if (status & GMAC4_LPI_CTRL_STATUS_RLPIEN)
|
||||
+ x->irq_rx_path_in_lpi_mode_n++;
|
||||
+ if (status & GMAC4_LPI_CTRL_STATUS_RLPIEX)
|
||||
+ x->irq_rx_path_exit_lpi_mode_n++;
|
||||
+ }
|
||||
+
|
||||
dwmac_pcs_isr(ioaddr, GMAC_PCS_BASE, intr_status, x);
|
||||
if (intr_status & PCS_RGSMIIIS_IRQ)
|
||||
dwmac4_phystatus(ioaddr, x);
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
From 1c08ac0c4bd8e9d66c4dde29bc496c3b430dd028 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe.montjoie@gmail.com>
|
||||
Date: Tue, 28 Nov 2017 17:48:22 +0100
|
||||
Subject: net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
|
||||
|
||||
The driver expect "allwinner,leds-active-low" to be in PHY node, but
|
||||
the binding doc expect it to be in MAC node.
|
||||
|
||||
Since all board DT use it also in MAC node, the driver need to search
|
||||
allwinner,leds-active-low in MAC node.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
index e5ff734..9eb7f65 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
||||
@@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
|
||||
val, reg);
|
||||
|
||||
if (gmac->variant->soc_has_internal_phy) {
|
||||
- if (of_property_read_bool(priv->plat->phy_node,
|
||||
- "allwinner,leds-active-low"))
|
||||
+ if (of_property_read_bool(node, "allwinner,leds-active-low"))
|
||||
reg |= H3_EPHY_LED_POL;
|
||||
else
|
||||
reg &= ~H3_EPHY_LED_POL;
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
From 45ab4b13e46325d00f4acdb365d406e941a15f81 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Persson <lars.persson@axis.com>
|
||||
Date: Fri, 1 Dec 2017 11:12:44 +0100
|
||||
Subject: stmmac: reset last TSO segment size after device open
|
||||
|
||||
The mss variable tracks the last max segment size sent to the TSO
|
||||
engine. We do not update the hardware as long as we receive skb:s with
|
||||
the same value in gso_size.
|
||||
|
||||
During a network device down/up cycle (mapped to stmmac_release() and
|
||||
stmmac_open() callbacks) we issue a reset to the hardware and it
|
||||
forgets the setting for mss. However we did not zero out our mss
|
||||
variable so the next transmission of a gso packet happens with an
|
||||
undefined hardware setting.
|
||||
|
||||
This triggers a hang in the TSO engine and eventuelly the netdev
|
||||
watchdog will bark.
|
||||
|
||||
Fixes: f748be531d70 ("stmmac: support new GMAC4")
|
||||
Signed-off-by: Lars Persson <larper@axis.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
index f63c2dd..d725053 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -2588,6 +2588,7 @@ static int stmmac_open(struct net_device *dev)
|
||||
|
||||
priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
|
||||
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
|
||||
+ priv->mss = 0;
|
||||
|
||||
ret = alloc_dma_desc_resources(priv);
|
||||
if (ret < 0) {
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
From fa6d7cb5d76cf0467c61420fc9238045aedfd379 Mon Sep 17 00:00:00 2001
|
||||
From: Sunil Goutham <sgoutham@cavium.com>
|
||||
Date: Thu, 23 Nov 2017 22:34:31 +0300
|
||||
Subject: net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts
|
||||
|
||||
Don't offload IP header checksum to NIC.
|
||||
|
||||
This fixes a previous patch which enabled checksum offloading
|
||||
for both IPv4 and IPv6 packets. So L3 checksum offload was
|
||||
getting enabled for IPv6 pkts. And HW is dropping these pkts
|
||||
as it assumes the pkt is IPv4 when IP csum offload is set
|
||||
in the SQ descriptor.
|
||||
|
||||
Fixes: 3a9024f52c2e ("net: thunderx: Enable TSO and checksum offloads for ipv6")
|
||||
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@auriga.com>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
(limited to 'drivers/net/ethernet/cavium/thunder/nicvf_queues.c')
|
||||
|
||||
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
|
||||
index d4496e9..8b2c31e 100644
|
||||
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
|
||||
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
|
||||
@@ -1355,7 +1355,6 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
|
||||
|
||||
/* Offload checksum calculation to HW */
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
- hdr->csum_l3 = 1; /* Enable IP csum calculation */
|
||||
hdr->l3_offset = skb_network_offset(skb);
|
||||
hdr->l4_offset = skb_transport_offset(skb);
|
||||
|
||||
--
|
||||
cgit v1.1
|
||||
|
12
kernel.spec
12
kernel.spec
|
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||
%if 0%{?released_kernel}
|
||||
|
||||
# Do we have a -stable update to apply?
|
||||
%define stable_update 3
|
||||
%define stable_update 4
|
||||
# Set rpm version accordingly
|
||||
%if 0%{?stable_update}
|
||||
%define stablerev %{stable_update}
|
||||
|
@ -623,6 +623,8 @@ Patch332: arm64-socionext-96b-enablement.patch
|
|||
|
||||
Patch335: arm-exynos-fix-usb3.patch
|
||||
|
||||
Patch399: arm64-thunderX-fix-ipv6-checksum-offload.patch
|
||||
|
||||
# 400 - IBM (ppc/s390x) patches
|
||||
|
||||
# 500 - Temp fixes/CVEs etc
|
||||
|
@ -653,9 +655,6 @@ Patch625: v3-2-2-Input-synaptics---Lenovo-X1-Carbon-5-should-use-SMBUS-RMI.patch
|
|||
# Fixes for QXL issues
|
||||
Patch627: qxl-fixes.patch
|
||||
|
||||
# CVE-2017-1000405 rhbz 1516514 1519115
|
||||
Patch628: 0001-mm-thp-Do-not-make-page-table-dirty-unconditionally-.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
@ -2210,6 +2209,11 @@ fi
|
|||
#
|
||||
#
|
||||
%changelog
|
||||
* Wed Dec 6 2017 Peter Robinson <pbrobinson@fedoraproject.org> 4.14.4-300
|
||||
- Linux v4.14.4
|
||||
- Fixes for dwmac-sun8i for A64/Pine64
|
||||
- Fixes for Cavium ThunderX (rhbz 1521190)
|
||||
|
||||
* Mon Dec 04 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.14.3-300
|
||||
- Linux v4.14.3 rebase
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1,3 +1,3 @@
|
|||
SHA512 (linux-4.14.tar.xz) = 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8
|
||||
SHA512 (perf-man-4.14.tar.gz) = 76a9d8adc284cdffd4b3fbb060e7f9a14109267707ce1d03f4c3239cd70d8d164f697da3a0f90a363fbcac42a61d3c378afbcc2a86f112c501b9cb5ce74ef9f8
|
||||
SHA512 (patch-4.14.3.xz) = 36a08a4c1c93c4fefb95273f3bfe4cac724d8e7c4f90d6e42a11c3afbbdd35b537f3380985a730c9aca491359f9bbdc4747ac444dd6b2625443c28df285cf74a
|
||||
SHA512 (patch-4.14.4.xz) = 9232c7816a92f1499cd2a58417250af18cb519fe1abf7b250f82470b1a931f99cb473951fcba9e9a8ffd7246b63db2054ddaa127b7aaa9632d440be5f6c00111
|
||||
|
|
Loading…
Reference in New Issue