Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp636413pxb; Wed, 16 Feb 2022 00:33:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDLbztL5SmgN9tuI1E56bu5trVlUcm6ZdiBanootJyD/c9spGkx+6HrX/CkrUSvBGLo810 X-Received: by 2002:a63:6849:0:b0:370:3b34:4a57 with SMTP id d70-20020a636849000000b003703b344a57mr1389075pgc.37.1645000415384; Wed, 16 Feb 2022 00:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645000415; cv=none; d=google.com; s=arc-20160816; b=xg2ids3tcFncvDiEsh9LUcI84nAOlnDtKnvMpBUXJAK09cCoOgFhR3K2IJuqkm3s8u IyjCLKr9o1TRZWdkfdcgGy96xKzIQ9+WDJ8zoJV9Tl8PJvgoK7A1jWZoGOlr0HKHZmOW jwWLQpLdbXZzpk3orrQek+A6QweysXRuSZEiFotIgT18qGCR6qg++dk4YDi9KByi73iZ 6StHF4knuCWJMLwhkGIIMWX4wwU74cUF2cvfnPfxmUnSrNlJd+XjnmxqRCdixSXz+SjV oup6ORX9LWuHKItYzwtFlElN+D6/W0R11BXFJV1T2F4swGZb+iUVvYwEFEwIaCcwqO+R /+oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=ht6zc7GnMpiGMKIpCWjwzLSAlsWkcboTn5FCJx2yIrY=; b=i0vJgvOvWZJ3HTIBnoXJuIjR1oOkulrMhYjCaiKf9quPkqmpG1niamtD6C2QUzPE41 rTGuecILTudlvfBlvYbkGWvr/N7tgEYuRwFav+BMg4w2ZrLRwOKLi96juKmgY9WRCBlV aEG7EHKU62b7tAVc8CMTxbMZmhLZn/RjN4XV1tZ2e9KTSZ+3E7X0PnEmm1UlILxQ4iGb rhfbalaxWbeHDZdxmhhFp8A0JoIG5Apob3xIxatkTFjmGJEkuSwR7XHshTa8SY10BvQa mjOOlDWIWPjHK7rT287Mt3v+OAKSg99Gvv5YCtAsDKwclqmT2JE416Vn04owJNEQpdIU IWzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=SOH9uS7b; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i7si17965148pla.554.2022.02.16.00.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 00:33:35 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=SOH9uS7b; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4A60299270; Wed, 16 Feb 2022 00:28:23 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbiBPI2d (ORCPT + 73 others); Wed, 16 Feb 2022 03:28:33 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:48368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiBPI23 (ORCPT ); Wed, 16 Feb 2022 03:28:29 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62CB7296900 for ; Wed, 16 Feb 2022 00:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645000098; x=1676536098; h=from:to:cc:subject:date:message-id:mime-version; bh=ht6zc7GnMpiGMKIpCWjwzLSAlsWkcboTn5FCJx2yIrY=; b=SOH9uS7blzcII4Q6g/LhmyIwqPEq+SHLrcj6alIgghTmkFo+TRX9FMcf Z6T20hztBOuRcbYghy/TMhBXw94+51KqUvOqR7+g9Y1aqIcg6TidiUq6R aP6AdrZUbTKN3MwbwiAnDSiSRtgpV3WB+sh3Eu5Yp+3VS5gVdlgn5lOLa g=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 16 Feb 2022 00:28:18 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 00:28:18 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 16 Feb 2022 00:28:17 -0800 Received: from ramess-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 16 Feb 2022 00:28:15 -0800 From: Rameshkumar Sundaram To: CC: , Rameshkumar Sundaram Subject: [PATCH] ath11k: Invalidate cached reo ring entry before accessing it Date: Wed, 16 Feb 2022 13:57:51 +0530 Message-ID: <1645000071-25832-1-git-send-email-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org REO2SW ring descriptor is currently allocated in cacheable memory. While reaping reo ring entries on second trial after updating head pointer, first entry needs to be invalidated before accessing it. Move the try_again: label above ath11k_hal_srng_access_begin() so that first entry will be invalidated and prefetched. Tested on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Fixes: 6452f0a3d565 ("ath11k: allocate dst ring descriptors from cacheable memory") Signed-off-by: Rameshkumar Sundaram --- drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index c212a78..e432f8d 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2642,9 +2642,9 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id, spin_lock_bh(&srng->lock); +try_again: ath11k_hal_srng_access_begin(ab, srng); -try_again: while (likely(desc = (struct hal_reo_dest_ring *)ath11k_hal_srng_dst_get_next_entry(ab, srng))) { -- 2.7.4