From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 86EB37DF8A for ; Fri, 1 Jun 2018 15:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752706AbeFAPHO (ORCPT ); Fri, 1 Jun 2018 11:07:14 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41868 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203AbeFAPHC (ORCPT ); Fri, 1 Jun 2018 11:07:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D0CB2607B4; Fri, 1 Jun 2018 15:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527865621; bh=JXu0kmUHl6d5+PGD3kDHQPyAK3FEcyKjZNG5e6HC/+E=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=cs7o8VCNECi78n2eFjU0ab4FCtE0+8rQSsWvuf3LKz0Ga865c1L3zgpnmeFohJSKS 3p+c9d0sFkBuDlhYURBZWNWI4q1hpZFG0+M4JNE5M8KSLwoOsjx4GNK6ZPe3YE9TU9 hvVojQfPybz7benFgK1/fgvEwU7lQEKPwA5mXNdU= Received: from [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1C3A1606DD; Fri, 1 Jun 2018 15:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527865617; bh=JXu0kmUHl6d5+PGD3kDHQPyAK3FEcyKjZNG5e6HC/+E=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Tq4VMOmGV2553WTnBeESMvdBJ54sboBFxywQZ0PdTmBGPhAjsgCznXR/f32LXuFA6 JgPrtogS4jqoxzc6PHsdbhToWSJYa0ADPA8GIU9GXcT2jFY8GfJ5zsWN8zkr61p7z5 k5EZQuv1/9pGt5RvzyAjciAJd/PaHrCVkHflzPkM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1C3A1606DD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the common code To: Andy Shevchenko Cc: linux-pci@vger.kernel.org, Timur Tabi , linux-arm-msm@vger.kernel.org, linux-arm Mailing List , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Bjorn Helgaas , Christoffer Dall , "Paul E. McKenney" , Marc Zyngier , Kai-Heng Feng , Thymo van Beers , Frederic Weisbecker , Konrad Rzeszutek Wilk , Greg Kroah-Hartman , David Rientjes , Kate Stewart , Philippe Ombredanne , Tom Lendacky , Juergen Gross , Borislav Petkov , Mikulas Patocka , Petr Tesarik , Andy Lutomirski , Dou Liyang , Ram Pai , Boris Ostrovsky , "open list:DOCUMENTATION" , open list References: <1527654876-26716-1-git-send-email-okaya@codeaurora.org> From: Sinan Kaya Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> Date: Fri, 1 Jun 2018 11:06:53 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On 6/1/2018 11:02 AM, Andy Shevchenko wrote: > On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya wrote: >> Move early dump functionality into common code so that it is available for >> all archtiectures. No need to carry arch specific reads around as the read >> hooks are already initialized by the time pci_setup_device() is getting >> called during scan. > >> /* If set, the PCIe ATS capability will not be used. */ >> static bool pcie_ats_disabled; >> >> +bool pci_early_dump; >> + > > I didn't check above these, but maybe a good idea to add one line > comment what is this about? This was discussed here: https://www.spinics.net/lists/linux-pci/msg72859.html > > >> extern const unsigned char pcie_link_speed[]; >> - >> +extern bool pci_early_dump; >> bool pcie_cap_has_lnkctl(const struct pci_dev *dev); >> > > Hmm... I would rather not attach this line to some function declarations. Sure > >> +static void early_dump_pci_device(struct pci_dev *pdev) >> +{ >> + u32 value[256 / 4]; >> + int i; >> + >> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n", >> + pdev->bus->number, PCI_SLOT(pdev->devfn), >> + PCI_FUNC(pdev->devfn)); > > Shouldn't be this changed to pci_info() ? Yeah, I need to get used to pci_info(). > >> + >> + for (i = 0; i < 256; i += 4) >> + pci_read_config_dword(pdev, i, &value[i / 4]); >> + >> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value, >> + 256, false); >> +} > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html