Received: by 10.223.185.116 with SMTP id b49csp1139609wrg; Fri, 23 Feb 2018 12:38:17 -0800 (PST) X-Google-Smtp-Source: AG47ELuzZSLsCZAMnRTYEdO+xfbylFHsNehKFI5mifjR3pUTRWoWPijrrrclIsM1NqFbb2Z7g2ea X-Received: by 2002:a17:902:7290:: with SMTP id d16-v6mr825572pll.31.1519418297632; Fri, 23 Feb 2018 12:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418297; cv=none; d=google.com; s=arc-20160816; b=p9/IuUx+sEfhkaGOxTTfUON4mKsBfAMJ/JEvOEROFmhtBYXWestJiv6gk2vR7xzITR rmnqciwF3MSCgp9OOxJcVJbHTI4a1xwJn4W7pTyaF8hFjzqJAK0RSTOg5NnVgOOdsjK3 zl553NYfO82CRxj4chPcglm7JzyIdanjDW4Zg1xVef69/kDSj/7oK4Hx1xHbrtuqjEp7 tOTecuxoeW+xT8EFyoYEqnXWZvOtMNolYDZPBVVKCqT6c49+/KZNeph6q5va7OOgrMCf 1Dsrk9Hgw5y0GaNEAN3HRLDajMXHo8QPxdv5RtTxmiS+jxaRBqCqJfIl551IEH2YjFTV c39w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=k0X8iWy3nNcHjE/9yQiJv97QMOVckbaudYA/12Jlslw=; b=JbrWrE3s014cslfjRuP6jQaw7biRghaWqJFDTkPT7NmubVzmFrsKguN3vHsGU0SbwC Ol2b66XojkeHj4A35ChZaqmZNWqCjdAcmFRinhT1nDtt0RYkza7WNdHWnaoP2RgdW6gG JTO8wf2gyMcbzNlew77ynRmh9z6xUIEOB8/Klxp3FUQULM0vBtMpa2JQOvJeBKVkMRdX vugr6nExl9yzIS6qApAw2E5Mm0/Vdp4G74EkBIVdDZZByLl1WVKy6yMQW5mpgtoMT4FT JBmSaNoK6+yhgOuBPcPbEccq+6ILSIlb20Cv7+rU8AVLNDO/LlhZJd+dwmq2DDZLr0yA H4qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si1946990pfj.140.2018.02.23.12.38.03; Fri, 23 Feb 2018 12:38:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753868AbeBWUgr (ORCPT + 99 others); Fri, 23 Feb 2018 15:36:47 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37010 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753581AbeBWSeh (ORCPT ); Fri, 23 Feb 2018 13:34:37 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6F7A2123E; Fri, 23 Feb 2018 18:34:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zumeng Chen , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 045/193] gianfar: fix a flooded alignment reports because of padding issue. Date: Fri, 23 Feb 2018 19:24:38 +0100 Message-Id: <20180223170333.056361099@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zumeng Chen [ Upstream commit 58117672943734715bbe7565ac9f062effa524f0 ] According to LS1021A RM, the value of PAL can be set so that the start of the IP header in the receive data buffer is aligned to a 32-bit boundary. Normally, setting PAL = 2 provides minimal padding to ensure such alignment of the IP header. However every incoming packet's 8-byte time stamp will be inserted into the packet data buffer as padding alignment bytes when hardware time stamping is enabled. So we set the padding 8+2 here to avoid the flooded alignment faults: root@128:~# cat /proc/cpu/alignment User: 0 System: 17539 (inet_gro_receive+0x114/0x2c0) Skipped: 0 Half: 0 Word: 0 DWord: 0 Multi: 17539 User faults: 2 (fixup) Also shown when exception report enablement CPU: 0 PID: 161 Comm: irq/66-eth1_g0_ Not tainted 4.1.21-rt13-WR8.0.0.0_preempt-rt #16 Hardware name: Freescale LS1021A [<8001b420>] (unwind_backtrace) from [<8001476c>] (show_stack+0x20/0x24) [<8001476c>] (show_stack) from [<807cfb48>] (dump_stack+0x94/0xac) [<807cfb48>] (dump_stack) from [<80025d70>] (do_alignment+0x720/0x958) [<80025d70>] (do_alignment) from [<80009224>] (do_DataAbort+0x40/0xbc) [<80009224>] (do_DataAbort) from [<80015398>] (__dabt_svc+0x38/0x60) Exception stack(0x86ad1cc0 to 0x86ad1d08) 1cc0: f9b3e080 86b3d072 2d78d287 00000000 866816c0 86b3d05e 86e785d0 00000000 1ce0: 00000011 0000000e 80840ab0 86ad1d3c 86ad1d08 86ad1d08 806d7fc0 806d806c 1d00: 40070013 ffffffff [<80015398>] (__dabt_svc) from [<806d806c>] (inet_gro_receive+0x114/0x2c0) [<806d806c>] (inet_gro_receive) from [<80660eec>] (dev_gro_receive+0x21c/0x3c0) [<80660eec>] (dev_gro_receive) from [<8066133c>] (napi_gro_receive+0x44/0x17c) [<8066133c>] (napi_gro_receive) from [<804f0538>] (gfar_clean_rx_ring+0x39c/0x7d4) [<804f0538>] (gfar_clean_rx_ring) from [<804f0bf4>] (gfar_poll_rx_sq+0x58/0xe0) [<804f0bf4>] (gfar_poll_rx_sq) from [<80660b10>] (net_rx_action+0x27c/0x43c) [<80660b10>] (net_rx_action) from [<80033638>] (do_current_softirqs+0x1e0/0x3dc) [<80033638>] (do_current_softirqs) from [<800338c4>] (__local_bh_enable+0x90/0xa8) [<800338c4>] (__local_bh_enable) from [<8008025c>] (irq_forced_thread_fn+0x70/0x84) [<8008025c>] (irq_forced_thread_fn) from [<800805e8>] (irq_thread+0x16c/0x244) [<800805e8>] (irq_thread) from [<8004e490>] (kthread+0xe8/0x104) [<8004e490>] (kthread) from [<8000fda8>] (ret_from_fork+0x14/0x2c) Signed-off-by: Zumeng Chen Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/gianfar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1375,9 +1375,11 @@ static int gfar_probe(struct platform_de gfar_init_addr_hash_table(priv); - /* Insert receive time stamps into padding alignment bytes */ + /* Insert receive time stamps into padding alignment bytes, and + * plus 2 bytes padding to ensure the cpu alignment. + */ if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) - priv->padding = 8; + priv->padding = 8 + DEFAULT_PADDING; if (dev->features & NETIF_F_IP_CSUM || priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)