Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp702192imm; Fri, 1 Jun 2018 08:08:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJng6gaWVseuIDsePvURZKXRfexDjS4mmlT0PrwS6WWJ8bG2bqRKbMwt/KjZUWVlvfV/va5 X-Received: by 2002:a63:3488:: with SMTP id b130-v6mr9078478pga.396.1527865707433; Fri, 01 Jun 2018 08:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527865707; cv=none; d=google.com; s=arc-20160816; b=rULlrKI8ZW4YZ7fu98kBDXG4AxUqhoxEanBWyPec/UITA5WkUuzKsdCP8b0CI2IOto bdy3ZeKkv3RhMFzUtBXp4Y4HzAHlH5irgp+OjnhLqGOSZ1SpoaWJU/M/VhWlEmcbBKjL xPWEHCbD0t0dA0hQpAYuaykWp6GIbtgM07zUq9ahdzZm1LmQsUZwZzZSENFugXlK4ary 0Hl3dnwyc40B2AEXXI3dQfTCUZEsmv+oYWwn5arBZCQobXunE9J8Zpk2z6nzVMo5Eu+M yBcwsrHtHaINyK0w/lSfdB25sQKfgAUloTQTKYpxhE0B/A2KC2o1ebjrQobbB4v/HMsq Z04g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=LAXSjDyjv6Z9Jt492d7qZvDlI4vZRKoIcYriidpJaV4=; b=duRu+8pLSlcJvY2rFEJ8Ib88j33e+z6nnugk3qb651A37UrrLPrWLw8BdhBCDjHqZe oke9g7ihQuZ68G7TlPzhIkWVJw3zJEfocOF+ipCxm6iMZ8TaCZw+2MWOhQ1FgQQhzXFG aYAkO6nRGuuB+b7onI5iuUuC15mYPoGOKrPn3ey4bX5FjVqAgsQdd3aMyhsKtksoIveX KcLzauHa1Y9CxVilLJEX8ygdqMSZ2Ki4FXiVnhiOW3pPduIOXFn/txWxGDKUOhaByBfm 5dsqbVvZieBMpQAS1U5ueqNB4ZRTxQMKa2MAT1cZY0TuqZnAq7Jm70ePt68jOkSZlY1f kdSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cs7o8VCN; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tq4VMOmG; 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 r17-v6si13225634pfg.305.2018.06.01.08.08.11; Fri, 01 Jun 2018 08:08:27 -0700 (PDT) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=cs7o8VCN; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tq4VMOmG; 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 S1752810AbeFAPHQ (ORCPT + 99 others); Fri, 1 Jun 2018 11:07:16 -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= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.