From c23607185963f5ba31760cbe118cf54af91cc0ec Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Tue, 4 Feb 2020 10:41:29 +0100 Subject: kernel: bump 4.9 to 4.9.212 Refreshed all patches. Fixes: - CVE-2019-14896 - CVE-2019-14897 Compile-tested on: ar71xx Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte --- .../hack-4.9/702-phy_add_aneg_done_function.patch | 2 +- .../pending-4.9/630-packet_socket_type.patch | 16 +++++++-------- .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 14 ++++++------- .../generic/pending-4.9/701-phy_extension.patch | 2 +- ...-add-detach-callback-to-struct-phy_driver.patch | 2 +- .../patches-4.9/0026-NET-multi-phy-support.patch | 6 +++--- .../202-core-linux-support-layerscape.patch | 2 +- .../patches-4.9/302-dts-support-layercape.patch | 18 ++++++++-------- .../patches-4.9/703-phy-support-layerscape.patch | 24 +++++++++++----------- .../patches-4.9/802-clk-support-layerscape.patch | 4 ++-- .../patches-4.9/810-iommu-support-layerscape.patch | 14 ++++++------- 11 files changed, 52 insertions(+), 52 deletions(-) (limited to 'target/linux') diff --git a/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch index b58584091b..e5b610b4c8 100644 --- a/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1315,6 +1315,9 @@ int genphy_update_link(struct phy_device +@@ -1316,6 +1316,9 @@ int genphy_update_link(struct phy_device { int status; diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index e89bf0cfaa..c47bc371c8 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1781,6 +1781,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1787,6 +1787,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1788,6 +1789,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1794,6 +1795,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1800,7 +1802,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1806,7 +1808,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2038,12 +2040,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2044,12 +2046,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2169,12 +2171,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2175,12 +2177,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3292,6 +3294,7 @@ static int packet_create(struct net *net +@@ -3298,6 +3300,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3905,6 +3908,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3920,6 +3923,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3957,6 +3970,13 @@ static int packet_getsockopt(struct sock +@@ -3972,6 +3985,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 9979c22fc3..de45e2982b 100644 --- a/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-4.9/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -350,7 +350,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1904,6 +2066,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1902,6 +2064,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -366,7 +366,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1938,6 +2109,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1936,6 +2107,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_COLLECT_METADATA]) parms->collect_md = true; @@ -413,7 +413,7 @@ Signed-off-by: Steven Barth } static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[], -@@ -2051,6 +2262,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -2049,6 +2260,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -426,7 +426,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -2078,6 +2295,24 @@ static size_t ip6_tnl_get_size(const str +@@ -2076,6 +2293,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(2) + /* IFLA_IPTUN_COLLECT_METADATA */ nla_total_size(0) + @@ -451,7 +451,7 @@ Signed-off-by: Steven Barth 0; } -@@ -2085,6 +2320,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2083,6 +2318,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -461,7 +461,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) || -@@ -2093,9 +2331,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -2091,9 +2329,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -490,7 +490,7 @@ Signed-off-by: Steven Barth if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) || -@@ -2133,6 +2389,7 @@ static const struct nla_policy ip6_tnl_p +@@ -2131,6 +2387,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_ENCAP_SPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 }, [IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG }, diff --git a/target/linux/generic/pending-4.9/701-phy_extension.patch b/target/linux/generic/pending-4.9/701-phy_extension.patch index 628e1d31b9..74931c421f 100644 --- a/target/linux/generic/pending-4.9/701-phy_extension.patch +++ b/target/linux/generic/pending-4.9/701-phy_extension.patch @@ -9,7 +9,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -472,6 +472,50 @@ int phy_ethtool_ksettings_get(struct phy +@@ -473,6 +473,50 @@ int phy_ethtool_ksettings_get(struct phy } EXPORT_SYMBOL(phy_ethtool_ksettings_get); diff --git a/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch index 28181d16f1..04b75b0188 100644 --- a/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1004,6 +1004,9 @@ void phy_detach(struct phy_device *phyde +@@ -1005,6 +1005,9 @@ void phy_detach(struct phy_device *phyde struct mii_bus *bus; int i; diff --git a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch index eb6acdb2f7..e5cfc0a7d3 100644 --- a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch +++ b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -1038,7 +1038,8 @@ void phy_state_machine(struct work_struc +@@ -1039,7 +1039,8 @@ void phy_state_machine(struct work_struc /* If the link is down, give up on negotiation for now */ if (!phydev->link) { phydev->state = PHY_NOLINK; @@ -21,7 +21,7 @@ Signed-off-by: John Crispin phydev->adjust_link(phydev->attached_dev); break; } -@@ -1130,7 +1131,8 @@ void phy_state_machine(struct work_struc +@@ -1131,7 +1132,8 @@ void phy_state_machine(struct work_struc netif_carrier_on(phydev->attached_dev); } else { phydev->state = PHY_NOLINK; @@ -31,7 +31,7 @@ Signed-off-by: John Crispin } phydev->adjust_link(phydev->attached_dev); -@@ -1142,7 +1144,8 @@ void phy_state_machine(struct work_struc +@@ -1143,7 +1145,8 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch index aa77780309..3ad570e8b2 100644 --- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch @@ -197,7 +197,7 @@ Signed-off-by: Yangbo Lu +EXPORT_SYMBOL_GPL(soc_device_match); --- a/include/linux/device.h +++ b/include/linux/device.h -@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(stru +@@ -689,6 +689,25 @@ void __iomem *devm_ioremap_resource(stru int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); diff --git a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch index 8fa89f776f..b23c915e9c 100644 --- a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch +++ b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch @@ -255,9 +255,9 @@ Signed-off-by: Yangbo Lu +}; + &enet0 { - tbi-handle = <&tbi1>; + tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy2>; -@@ -228,6 +241,10 @@ +@@ -235,6 +248,10 @@ }; }; @@ -268,7 +268,7 @@ Signed-off-by: Yangbo Lu &sai1 { status = "okay"; }; -@@ -243,3 +260,11 @@ +@@ -250,3 +267,11 @@ &uart1 { status = "okay"; }; @@ -597,7 +597,7 @@ Signed-off-by: Yangbo Lu clock-names = "dcu", "pix"; big-endian; status = "disabled"; -@@ -626,6 +643,8 @@ +@@ -635,6 +652,8 @@ interrupts = ; dr_mode = "host"; snps,quirk-frame-length-adjustment = <0x20>; @@ -606,7 +606,7 @@ Signed-off-by: Yangbo Lu snps,dis_rxdet_inp3_quirk; }; -@@ -634,7 +653,9 @@ +@@ -643,7 +662,9 @@ reg = <0x00 0x03400000 0x0 0x00010000 /* controller registers */ 0x40 0x00000000 0x0 0x00002000>; /* configuration space */ reg-names = "regs", "config"; @@ -617,7 +617,7 @@ Signed-off-by: Yangbo Lu fsl,pcie-scfg = <&scfg 0>; #address-cells = <3>; #size-cells = <2>; -@@ -643,7 +664,7 @@ +@@ -652,7 +673,7 @@ bus-range = <0x0 0xff>; ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */ 0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ @@ -626,7 +626,7 @@ Signed-off-by: Yangbo Lu #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0000 0 0 1 &gic GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>, -@@ -657,7 +678,9 @@ +@@ -666,7 +687,9 @@ reg = <0x00 0x03500000 0x0 0x00010000 /* controller registers */ 0x48 0x00000000 0x0 0x00002000>; /* configuration space */ reg-names = "regs", "config"; @@ -637,7 +637,7 @@ Signed-off-by: Yangbo Lu fsl,pcie-scfg = <&scfg 1>; #address-cells = <3>; #size-cells = <2>; -@@ -666,7 +689,7 @@ +@@ -675,7 +698,7 @@ bus-range = <0x0 0xff>; ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */ 0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ @@ -646,7 +646,7 @@ Signed-off-by: Yangbo Lu #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0000 0 0 1 &gic GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, -@@ -674,5 +697,45 @@ +@@ -683,5 +706,45 @@ <0000 0 0 3 &gic GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; }; diff --git a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch index d8d550380e..99ffab1b90 100644 --- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch @@ -1607,7 +1607,7 @@ Signed-off-by: Yangbo Lu +MODULE_LICENSE("GPL v2"); --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -591,7 +591,7 @@ int phy_mii_ioctl(struct phy_device *phy +@@ -592,7 +592,7 @@ int phy_mii_ioctl(struct phy_device *phy return 0; case SIOCSHWTSTAMP: @@ -1616,7 +1616,7 @@ Signed-off-by: Yangbo Lu return phydev->drv->hwtstamp(phydev, ifr); /* fall through */ -@@ -616,6 +616,9 @@ static int phy_start_aneg_priv(struct ph +@@ -617,6 +617,9 @@ static int phy_start_aneg_priv(struct ph bool trigger = 0; int err; @@ -1626,7 +1626,7 @@ Signed-off-by: Yangbo Lu mutex_lock(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) -@@ -1015,7 +1018,7 @@ void phy_state_machine(struct work_struc +@@ -1016,7 +1019,7 @@ void phy_state_machine(struct work_struc old_state = phydev->state; @@ -1635,7 +1635,7 @@ Signed-off-by: Yangbo Lu phydev->drv->link_change_notify(phydev); switch (phydev->state) { -@@ -1317,6 +1320,9 @@ EXPORT_SYMBOL(phy_write_mmd_indirect); +@@ -1318,6 +1321,9 @@ EXPORT_SYMBOL(phy_write_mmd_indirect); */ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) { @@ -1645,7 +1645,7 @@ Signed-off-by: Yangbo Lu /* According to 802.3az,the EEE is supported only in full duplex-mode. * Also EEE feature is active when core is operating with MII, GMII * or RGMII (all kinds). Internal PHYs are also allowed to proceed and -@@ -1394,6 +1400,9 @@ EXPORT_SYMBOL(phy_init_eee); +@@ -1395,6 +1401,9 @@ EXPORT_SYMBOL(phy_init_eee); */ int phy_get_eee_err(struct phy_device *phydev) { @@ -1655,7 +1655,7 @@ Signed-off-by: Yangbo Lu return phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_WK_ERR, MDIO_MMD_PCS); } EXPORT_SYMBOL(phy_get_eee_err); -@@ -1410,6 +1419,9 @@ int phy_ethtool_get_eee(struct phy_devic +@@ -1411,6 +1420,9 @@ int phy_ethtool_get_eee(struct phy_devic { int val; @@ -1665,7 +1665,7 @@ Signed-off-by: Yangbo Lu /* Get Supported EEE */ val = phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_ABLE, MDIO_MMD_PCS); if (val < 0) -@@ -1443,6 +1455,9 @@ int phy_ethtool_set_eee(struct phy_devic +@@ -1444,6 +1456,9 @@ int phy_ethtool_set_eee(struct phy_devic { int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); @@ -1675,7 +1675,7 @@ Signed-off-by: Yangbo Lu /* Mask prohibited EEE modes */ val &= ~phydev->eee_broken_modes; -@@ -1454,7 +1469,7 @@ EXPORT_SYMBOL(phy_ethtool_set_eee); +@@ -1455,7 +1470,7 @@ EXPORT_SYMBOL(phy_ethtool_set_eee); int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) { @@ -1684,7 +1684,7 @@ Signed-off-by: Yangbo Lu return phydev->drv->set_wol(phydev, wol); return -EOPNOTSUPP; -@@ -1463,7 +1478,7 @@ EXPORT_SYMBOL(phy_ethtool_set_wol); +@@ -1464,7 +1479,7 @@ EXPORT_SYMBOL(phy_ethtool_set_wol); void phy_ethtool_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) { @@ -1695,7 +1695,7 @@ Signed-off-by: Yangbo Lu EXPORT_SYMBOL(phy_ethtool_get_wol); --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1049,7 +1049,7 @@ int phy_suspend(struct phy_device *phyde +@@ -1050,7 +1050,7 @@ int phy_suspend(struct phy_device *phyde if (wol.wolopts) return -EBUSY; @@ -1704,7 +1704,7 @@ Signed-off-by: Yangbo Lu ret = phydrv->suspend(phydev); if (ret) -@@ -1066,7 +1066,7 @@ int phy_resume(struct phy_device *phydev +@@ -1067,7 +1067,7 @@ int phy_resume(struct phy_device *phydev struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); int ret = 0; @@ -1713,7 +1713,7 @@ Signed-off-by: Yangbo Lu ret = phydrv->resume(phydev); if (ret) -@@ -1723,7 +1723,7 @@ static int phy_remove(struct device *dev +@@ -1724,7 +1724,7 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); diff --git a/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch b/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch index 0d05dc78ab..f17c4633e8 100644 --- a/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/802-clk-support-layerscape.patch @@ -301,7 +301,7 @@ Signed-off-by: Yangbo Lu default: goto bad_args; } -@@ -1253,6 +1398,7 @@ static void __init clockgen_init(struct +@@ -1254,6 +1399,7 @@ static void __init clockgen_init(struct clockgen.info.flags |= CG_CMUX_GE_PLAT; clockgen.sysclk = create_sysclk("cg-sysclk"); @@ -309,7 +309,7 @@ Signed-off-by: Yangbo Lu create_plls(&clockgen); create_muxes(&clockgen); -@@ -1273,8 +1419,11 @@ err: +@@ -1274,8 +1420,11 @@ err: CLK_OF_DECLARE(qoriq_clockgen_1, "fsl,qoriq-clockgen-1.0", clockgen_init); CLK_OF_DECLARE(qoriq_clockgen_2, "fsl,qoriq-clockgen-2.0", clockgen_init); diff --git a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch index ef8c431746..b2d282a751 100644 --- a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch @@ -34,7 +34,7 @@ Signed-off-by: Yangbo Lu return entry->group; } -@@ -3197,9 +3199,10 @@ static bool amd_iommu_capable(enum iommu +@@ -3199,9 +3201,10 @@ static bool amd_iommu_capable(enum iommu return false; } @@ -47,7 +47,7 @@ Signed-off-by: Yangbo Lu struct unity_map_entry *entry; int devid; -@@ -3208,41 +3211,56 @@ static void amd_iommu_get_dm_regions(str +@@ -3210,41 +3213,56 @@ static void amd_iommu_get_dm_regions(str return; list_for_each_entry(entry, &amd_iommu_unity_map, list) { @@ -118,7 +118,7 @@ Signed-off-by: Yangbo Lu { struct dma_ops_domain *dma_dom = to_dma_ops_domain(to_pdomain(domain)); unsigned long start, end; -@@ -3266,9 +3284,9 @@ static const struct iommu_ops amd_iommu_ +@@ -3268,9 +3286,9 @@ static const struct iommu_ops amd_iommu_ .add_device = amd_iommu_add_device, .remove_device = amd_iommu_remove_device, .device_group = amd_iommu_device_group, @@ -995,7 +995,7 @@ Signed-off-by: Yangbo Lu }; struct dmar_atsr_unit { -@@ -4268,27 +4269,40 @@ static inline void init_iommu_pm_ops(voi +@@ -4271,27 +4272,40 @@ static inline void init_iommu_pm_ops(voi int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg) { struct acpi_dmar_reserved_memory *rmrr; @@ -1041,7 +1041,7 @@ Signed-off-by: Yangbo Lu } static struct dmar_atsr_unit *dmar_find_atsr(struct acpi_dmar_atsr *atsr) -@@ -4502,6 +4516,7 @@ static void intel_iommu_free_dmars(void) +@@ -4505,6 +4519,7 @@ static void intel_iommu_free_dmars(void) list_for_each_entry_safe(rmrru, rmrr_n, &dmar_rmrr_units, list) { list_del(&rmrru->list); dmar_free_dev_scope(&rmrru->devices, &rmrru->devices_cnt); @@ -1049,7 +1049,7 @@ Signed-off-by: Yangbo Lu kfree(rmrru); } -@@ -5240,6 +5255,45 @@ static void intel_iommu_remove_device(st +@@ -5243,6 +5258,45 @@ static void intel_iommu_remove_device(st iommu_device_unlink(iommu->iommu_dev, dev); } @@ -1095,7 +1095,7 @@ Signed-off-by: Yangbo Lu #ifdef CONFIG_INTEL_IOMMU_SVM #define MAX_NR_PASID_BITS (20) static inline unsigned long intel_iommu_get_pts(struct intel_iommu *iommu) -@@ -5370,19 +5424,21 @@ struct intel_iommu *intel_svm_device_to_ +@@ -5373,19 +5427,21 @@ struct intel_iommu *intel_svm_device_to_ #endif /* CONFIG_INTEL_IOMMU_SVM */ static const struct iommu_ops intel_iommu_ops = { -- cgit v1.2.3