Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2245585pxm; Fri, 4 Mar 2022 12:13:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4ey9O4OSIpPlUuWGyPUxa6v+pqU/BQZH1G5uluEygGnW9yBV+kgRn7CSVJBRyz/oKHBVh X-Received: by 2002:a17:902:c40e:b0:151:a264:288c with SMTP id k14-20020a170902c40e00b00151a264288cmr78211plk.42.1646424811334; Fri, 04 Mar 2022 12:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646424811; cv=none; d=google.com; s=arc-20160816; b=cX7pIIdnbY0xLTfQvTX7QfvTISbxedh+N8a2c9+z45qbjdoGN17+kHD8xlS9kv2297 nS4JL7CK7Dk18fUFV+PBCW5MHlUwo9QSBLtk5mQyPZbod3w/Z3LaDLE5TVlKSmQHeixD TF8BRruePXj3wSiCN9xkbHG/vWLCeKO1kNd10hghMi0Ld6XunIqqAXVE9AjHVzsgiQDs OUTDbmh68RH+/qh3x8WO0CODSg3OnhgAMH5VvGs9GM+cPLSxLnzLkhI5Y6HuB/bwWFuj dllEO1gh4oTr0W+2+1DPYYbUF1i4fy5zQHWGWIPyG8V0vUcuOQGfGXL8f9S8YKKTYeU0 CAiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=Y6N5sTMGXWaYcvqvmn0CLYSPZgn3F7YzqSj5in8AV2U=; b=PVXH92ZFXSDF94NtqRo0smSBNEAkjZE1ma+Y5XWRd17NnlKcod8jPuI7cKCtYep59q 7dhF0iHDofl39aSCA1yH9SN8T4Bwt1fo/m88oEgM4vufjPNeP1m8Fg4wx+FqZ7s3YriM +z97hzNchDxxGlxbzWtww2tWJn1VolesqrAQmO9urV8ZNcptWDYXrXblct+HiyZcSYoO bLQmGAso86zORxgdXcpkEvJbtV/JcPjhVuLOrJ5DYTnxqINi19Sx29xIG+Gco1ZCOs4K qT1OGqvy5lr7HqJNUFoFciMD3xLwj768G9Pmr+9igW7vhY9jzfDz7ZhUfAtIlvCdDShU vn7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ay5-20020a1709028b8500b001501189c92fsi5253604plb.129.2022.03.04.12.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:13:31 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6B144F9D6; Fri, 4 Mar 2022 11:27:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239344AbiCDLWb (ORCPT + 72 others); Fri, 4 Mar 2022 06:22:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239322AbiCDLWa (ORCPT ); Fri, 4 Mar 2022 06:22:30 -0500 Received: from farmhouse.coelho.fi (paleale.coelho.fi [176.9.41.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0EE137776 for ; Fri, 4 Mar 2022 03:21:43 -0800 (PST) Received: from 91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=kveik.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nQ60C-000QSW-Ne; Fri, 04 Mar 2022 13:21:42 +0200 From: Luca Coelho To: kvalo@kernel.org Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Fri, 4 Mar 2022 13:21:23 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304112129.219513-1-luca@coelho.fi> References: <20220304112129.219513-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Subject: [PATCH 07/13] iwlwifi: yoyo: dump IMR DRAM only for HW and FW error Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mukesh Sisodiya Support debug collection of the platform IMR memory region only for HW and FW error. This region needs to be collected as the last region. Signed-off-by: Mukesh Sisodiya Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 108392234529..53f0fe77aa10 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -2430,6 +2430,9 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt, struct iwl_dump_ini_region_data reg_data = { .dump_data = dump_data, }; + struct iwl_dump_ini_region_data imr_reg_data = { + .dump_data = dump_data, + }; int i; u32 size = 0; u64 regions_mask = le64_to_cpu(trigger->regions_mask) & @@ -2465,10 +2468,32 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt, tp_id); continue; } + /* + * DRAM_IMR can be collected only for FW/HW error timepoint + * when fw is not alive. In addition, it must be collected + * lastly as it overwrites SRAM that can possibly contain + * debug data which also need to be collected. + */ + if (reg_type == IWL_FW_INI_REGION_DRAM_IMR) { + if (tp_id == IWL_FW_INI_TIME_POINT_FW_ASSERT || + tp_id == IWL_FW_INI_TIME_POINT_FW_HW_ERROR) + imr_reg_data.reg_tlv = fwrt->trans->dbg.active_regions[i]; + else + IWL_INFO(fwrt, + "WRT: trying to collect DRAM_IMR at time point: %d, skipping\n", + tp_id); + /* continue to next region */ + continue; + } + size += iwl_dump_ini_mem(fwrt, list, ®_data, &iwl_dump_ini_region_ops[reg_type]); } + /* collect DRAM_IMR region in the last */ + if (imr_reg_data.reg_tlv) + size += iwl_dump_ini_mem(fwrt, list, ®_data, + &iwl_dump_ini_region_ops[IWL_FW_INI_REGION_DRAM_IMR]); if (size) size += iwl_dump_ini_info(fwrt, trigger, list); -- 2.35.1