mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Christian König" <deathsimple@vodafone.de>
Cc: kbuild-all@01.org, helgaas@kernel.org, linux-pci@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v8 4/6] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v4
Date: Tue, 11 Jul 2017 20:07:29 +0800	[thread overview]
Message-ID: <201707112000.h3N0wEJq%fengguang.wu@intel.com> (raw)
In-Reply-To: <1499698794-1718-5-git-send-email-deathsimple@vodafone.de>

[-- Attachment #1: Type: text/plain, Size: 3627 bytes --]

Hi Christian,

[auto build test WARNING on pci/next]
[also build test WARNING on next-20170710]
[cannot apply to v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/PCI-add-a-define-for-the-PCI-resource-type-mask-v2/20170711-104904
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   arch/x86/pci/fixup.c: In function 'pci_amd_enable_64bit_bar':
>> arch/x86/pci/fixup.c:674:15: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     res->start = 0x100000000ull;
                  ^~~~~~~~~~~~~~
   arch/x86/pci/fixup.c:675:13: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     res->end = 0xfd00000000ull - 1;
                ^~~~~~~~~~~~~~~
>> arch/x86/pci/fixup.c:686:22: warning: right shift count >= width of type [-Wshift-count-overflow]
     high = ((res->start >> 40) & AMD_141b_MMIO_HIGH_MMIOBASE_MASK) |
                         ^~
   arch/x86/pci/fixup.c:687:21: warning: right shift count >= width of type [-Wshift-count-overflow]
      ((((res->end + 1) >> 40) << AMD_141b_MMIO_HIGH_MMIOLIMIT_SHIFT)
                        ^~

vim +674 arch/x86/pci/fixup.c

   634	
   635	/*
   636	 * The PCI Firmware Spec, rev 3.2 notes that ACPI should optionally allow
   637	 * configuring host bridge windows using the _PRS and _SRS methods.
   638	 *
   639	 * But this is rarely implemented, so we manually enable a large 64bit BAR for
   640	 * PCIe device on AMD Family 15h (Models 30h-3fh) Processors here.
   641	 */
   642	static void pci_amd_enable_64bit_bar(struct pci_dev *dev)
   643	{
   644		struct resource *res, *conflict;
   645		u32 base, limit, high;
   646		unsigned i;
   647	
   648		for (i = 0; i < 8; ++i) {
   649			pci_read_config_dword(dev, AMD_141b_MMIO_BASE(i), &base);
   650			pci_read_config_dword(dev, AMD_141b_MMIO_HIGH(i), &high);
   651	
   652			/* Is this slot free? */
   653			if (!(base & (AMD_141b_MMIO_BASE_RE_MASK |
   654				      AMD_141b_MMIO_BASE_WE_MASK)))
   655				break;
   656	
   657			base >>= 8;
   658			base |= high << 24;
   659	
   660			/* Abort if a slot already configures a 64bit BAR. */
   661			if (base > 0x10000)
   662				return;
   663		}
   664		if (i == 8)
   665			return;
   666	
   667		res = kzalloc(sizeof(*res), GFP_KERNEL);
   668		if (!res)
   669			return;
   670	
   671		res->name = "PCI Bus 0000:00";
   672		res->flags = IORESOURCE_PREFETCH | IORESOURCE_MEM |
   673			IORESOURCE_MEM_64 | IORESOURCE_WINDOW;
 > 674		res->start = 0x100000000ull;
   675		res->end = 0xfd00000000ull - 1;
   676	
   677		/* Just grab the free area behind system memory for this */
   678		while ((conflict = request_resource_conflict(&iomem_resource, res)))
   679			res->start = conflict->end + 1;
   680	
   681		dev_info(&dev->dev, "adding root bus resource %pR\n", res);
   682	
   683		base = ((res->start >> 8) & AMD_141b_MMIO_BASE_MMIOBASE_MASK) |
   684			AMD_141b_MMIO_BASE_RE_MASK | AMD_141b_MMIO_BASE_WE_MASK;
   685		limit = ((res->end + 1) >> 8) & AMD_141b_MMIO_LIMIT_MMIOLIMIT_MASK;
 > 686		high = ((res->start >> 40) & AMD_141b_MMIO_HIGH_MMIOBASE_MASK) |

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60844 bytes --]

  reply	other threads:[~2017-07-11 12:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 14:59 Resizeable PCI BAR support V8 Christian König
2017-07-10 14:59 ` [PATCH v8 1/6] PCI: add a define for the PCI resource type mask v2 Christian König
2017-07-10 21:47   ` Bjorn Helgaas
2017-07-10 14:59 ` [PATCH v8 2/6] PCI: add resizeable BAR infrastructure v5 Christian König
2017-07-11 12:39   ` kbuild test robot
2017-07-10 14:59 ` [PATCH v8 3/6] PCI: add functionality for resizing resources v7 Christian König
2017-07-10 14:59 ` [PATCH v8 4/6] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v4 Christian König
2017-07-11 12:07   ` kbuild test robot [this message]
2017-07-11 17:50     ` Andy Shevchenko
2017-07-10 14:59 ` [PATCH v8 5/6] drm/amdgpu: move hw generation check into amdgpu_doorbell_init v2 Christian König
2017-07-10 14:59 ` [PATCH v8 6/6] drm/amdgpu: resize VRAM BAR for CPU access v4 Christian König
2017-07-10 22:23   ` Bjorn Helgaas
2017-09-14  8:06 ` Resizeable PCI BAR support V8 Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201707112000.h3N0wEJq%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®