Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp910704ybt; Fri, 26 Jun 2020 14:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwSxF6BCBFZNMV79Wmu0CaXFNp9/bMNgavjMnUF21RmQBNLjjcwyKLJYn30tOm2wfZMB4U X-Received: by 2002:aa7:dacb:: with SMTP id x11mr3868880eds.280.1593208243970; Fri, 26 Jun 2020 14:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593208243; cv=none; d=google.com; s=arc-20160816; b=auU85ZRCvw1MozxwjTRYAxREI7NEf+IC1Fr5vWOdHRjXG7BdI1CBnoczbffQcLAqr7 IioDqiHdPTRQF8vCzv1kxb+kMCqH+VvIWSEjvSLJQc8w+MKP6AdRz68Ke/qSC7nLbgvt 3H9a6EK827DY1fo8CaU2UrnRRQkiJ1snT2wCw+GPzMej9WmXaHvqK/6JturUz5nuKbvb ak0spArWCAhDOa51FUKaIhL11kEsxXDK21fJ41YoyLWcDX0v5rGZX664wu1pLIcBlSK5 POqdmKK++VvtjcdGIR85jSOx3sEu3pJ9z8NheQszdA4E3j5438HG+BnfKRnw4Ek9iJwP KPbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UILKlvs+GHBhKFphEyncEpPSUsoHCqFUMYUBW3SvT5s=; b=BAObWTEFaOHTdr/2jIGTQiYPqJLZXAZeXmfM3ZG8X9TWoWAdxODURMmZkPQ4nlVChD PuIJ9kG1kOIItZAiq00jQpsJg4XCA/LGoVK19k3DNzvt2HazhB/zb/9TRK92zODFoy6B GHT8/IDs0gyUnHhwXCkd9Oe89TZgHeXxbfN6hFvVHVDzPuVWXkZKI8vV+k6AHByvOJT/ ljpMTOYeXjeM7OV/JatjVgb3acrjeWwxkcCR+V6XTZ1f+4HEwCpetpns6YvPkzXd9hnX LatKKaFAeXesKG3+XDzT6wUdflIvJEodfdJuCs4otSkJV5SYgCQgZCBDwWxxCcH2O42J KkYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jKgTWVCF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc20si19106972edb.108.2020.06.26.14.50.19; Fri, 26 Jun 2020 14:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jKgTWVCF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725917AbgFZVtU (ORCPT + 99 others); Fri, 26 Jun 2020 17:49:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbgFZVtQ (ORCPT ); Fri, 26 Jun 2020 17:49:16 -0400 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C12DC03E97B for ; Fri, 26 Jun 2020 14:49:15 -0700 (PDT) Received: by mail-ua1-x942.google.com with SMTP id g44so3490162uae.12 for ; Fri, 26 Jun 2020 14:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UILKlvs+GHBhKFphEyncEpPSUsoHCqFUMYUBW3SvT5s=; b=jKgTWVCFrYAd3dJXBqQFQxSBYQjuuixCxOjPukeyqxUO/e+fi8dK32Eh9DjzJtOLL1 nFWBuOWUVUO7aVSpIP1hVhfwFGkZBUrnRhfWlAH8a5WeFoRMyEyPpabt6LRLzTLDWcOA CqkvBWP4wDRZPRHKmpKJwVEZuyNtMSBjHBQLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UILKlvs+GHBhKFphEyncEpPSUsoHCqFUMYUBW3SvT5s=; b=q9MzxfBCs/pch4DJh264G9mTiABYKeAEt3ks2D2e7zgmF1k/CAmCG80yr0T0xqnp2r DxCFi+DF1IpNWv9TQIoKKSbvM1J3cBqtmf8OvUG5W4K0J9870INr//BPTN0bOaktyN92 lTN1X7n6GDgi7oOaWoe/lutZBqhP1ZSqlFR5/mNKXoPuQxzllgaL9AmWv30EhWil+QCa R8q0L7NddE57/iSzLklcm80aio3mzZPK2mwBO8xa4+Ww23Z32NOGcAHNvYCMQsNhnYE4 bsCxcdIQok7rIqP7/GJCbApHBfxklrbSrPouKrRMH1ZZdgF6PyistrST205R7+BCOAmA PwFw== X-Gm-Message-State: AOAM532IvKOkswiNG0rNaCZ/YgVx+Y8yHfx4ro/JgyYCdR+m8Ufv4v/Y ewLDCQlPtykH8n20XzsUkjc7T/031/k= X-Received: by 2002:a9f:2d83:: with SMTP id v3mr3808623uaj.92.1593208154024; Fri, 26 Jun 2020 14:49:14 -0700 (PDT) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com. [209.85.217.49]) by smtp.gmail.com with ESMTPSA id q134sm2720144vkb.18.2020.06.26.14.49.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jun 2020 14:49:13 -0700 (PDT) Received: by mail-vs1-f49.google.com with SMTP id o2so6273542vsr.0 for ; Fri, 26 Jun 2020 14:49:13 -0700 (PDT) X-Received: by 2002:a67:62c4:: with SMTP id w187mr4135305vsb.109.1593208152714; Fri, 26 Jun 2020 14:49:12 -0700 (PDT) MIME-Version: 1.0 References: <1593193967-29897-1-git-send-email-pillair@codeaurora.org> In-Reply-To: From: Doug Anderson Date: Fri, 26 Jun 2020 14:49:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ath10k: Add interrupt summary based CE processing To: Rakesh Pillai , Kalle Valo Cc: ath10k@lists.infradead.org, linux-wireless , LKML 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 Hi, On Fri, Jun 26, 2020 at 2:37 PM Doug Anderson wrote: > > Hi, > > On Fri, Jun 26, 2020 at 10:53 AM Rakesh Pillai wrote: > > > > Currently the NAPI processing loops through all > > the copy engines and processes a particular copy > > engine is the copy completion is set for that copy > > engine. The host driver is not supposed to access > > any copy engine register after clearing the interrupt > > status register. > > > > This might result in kernel crash like the one below > > [ 1159.220143] Call trace: > > [ 1159.220170] ath10k_snoc_read32+0x20/0x40 [ath10k_snoc] > > [ 1159.220193] ath10k_ce_per_engine_service_any+0x78/0x130 [ath10k_core] > > [ 1159.220203] ath10k_snoc_napi_poll+0x38/0x8c [ath10k_snoc] > > [ 1159.220270] net_rx_action+0x100/0x3b0 > > [ 1159.220312] __do_softirq+0x164/0x30c > > [ 1159.220345] run_ksoftirqd+0x2c/0x64 > > [ 1159.220380] smpboot_thread_fn+0x1b0/0x288 > > [ 1159.220405] kthread+0x11c/0x12c > > [ 1159.220423] ret_from_fork+0x10/0x18 > > > > To avoid such a scenario, we generate an interrupt > > summary by reading the copy completion for all the > > copy engine before actually processing any of them. > > This will avoid reading the interrupt status register > > for any CE after the interrupt status is cleared. > > > > Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 > > > > Signed-off-by: Rakesh Pillai > > --- > > drivers/net/wireless/ath/ath10k/ce.c | 63 ++++++++++++++++++++++-------------- > > drivers/net/wireless/ath/ath10k/ce.h | 5 +-- > > 2 files changed, 42 insertions(+), 26 deletions(-) > > I'm not an expert on this driver, but your change seems sane to me. > > Reviewed-by: Douglas Anderson > > With your patch I can no longer find a place to put in a magic delay > and reproduce the crash, thus: > > Tested-by: Douglas Anderson > > > If it matters, my WiFi firmware reports this: > > WLAN.HL.3.2.2-00490-QCAHLSWMTPL-1 > > ...and it should also be WCN3990. I should also note that, while I'm not terribly familiar with Kalle's workflow, I would have expected to see him in the "To:" list. I've added him, but it's possible he'll need you to repost the patch with him in the "To:" list. -Doug