linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] NTB: Add AMD NTB support in Kconfig and Makefile
@ 2015-12-17  8:18 Xiangliang Yu
  2015-12-17 11:01 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Xiangliang Yu @ 2015-12-17  8:18 UTC (permalink / raw)
  To: jdmason, dave.jiang, Allen.Hubbe, linux-ntb, linux-kernel
  Cc: SPG_Linux_Kernel, Xiangliang Yu

This patch is to enable AMD NTB support in Kconfig and Makefile.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/ntb/hw/Kconfig  | 1 +
 drivers/ntb/hw/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/ntb/hw/Kconfig b/drivers/ntb/hw/Kconfig
index 4d5535c..0c5c2a6 100644
--- a/drivers/ntb/hw/Kconfig
+++ b/drivers/ntb/hw/Kconfig
@@ -1 +1,2 @@
 source "drivers/ntb/hw/intel/Kconfig"
+source "drivers/ntb/hw/amd/Kconfig"
diff --git a/drivers/ntb/hw/Makefile b/drivers/ntb/hw/Makefile
index 175d7c9..636be7d 100644
--- a/drivers/ntb/hw/Makefile
+++ b/drivers/ntb/hw/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_NTB_INTEL)	+= intel/
+obj-$(CONFIG_NTB_AMD)	+= amd/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/3] NTB: Add AMD NTB support in Kconfig and Makefile
  2015-12-17  8:18 [PATCH 2/3] NTB: Add AMD NTB support in Kconfig and Makefile Xiangliang Yu
@ 2015-12-17 11:01 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2015-12-17 11:01 UTC (permalink / raw)
  To: Xiangliang Yu
  Cc: kbuild-all, jdmason, dave.jiang, Allen.Hubbe, linux-ntb,
	linux-kernel, SPG_Linux_Kernel, Xiangliang Yu

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

Hi Xiangliang,

[auto build test WARNING on v4.4-rc5]
[also build test WARNING on next-20151217]

url:    https://github.com/0day-ci/linux/commits/Xiangliang-Yu/NTB-Add-AMD-PCI-Express-NTB-driver/20151217-113608
config: x86_64-randconfig-n0-12171710 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/ntb/hw/amd/ntb_hw_amd.c:486:12: warning: 'amd_flush_peer_requests' defined but not used [-Wunused-function]
    static int amd_flush_peer_requests(struct amd_ntb_dev *ndev)
               ^
   drivers/ntb/hw/amd/ntb_hw_amd.c:507:12: warning: 'amd_wakeup_peer_side' defined but not used [-Wunused-function]
    static int amd_wakeup_peer_side(struct amd_ntb_dev *ndev)
               ^
   drivers/ntb/hw/amd/ntb_hw_amd.c: In function 'amd_ntb_mw_set_trans':
>> drivers/ntb/hw/amd/ntb_hw_amd.c:187:6: warning: 'limit' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (reg_val != limit) {
         ^

vim +/limit +187 drivers/ntb/hw/amd/ntb_hw_amd.c

a635755a Xiangliang Yu 2015-12-17  171  	if (bar != 1) {
a635755a Xiangliang Yu 2015-12-17  172  		/* Set the limit if supported */
a635755a Xiangliang Yu 2015-12-17  173  		if (limit_reg)
a635755a Xiangliang Yu 2015-12-17  174  			limit = base_addr + size;
a635755a Xiangliang Yu 2015-12-17  175  
a635755a Xiangliang Yu 2015-12-17  176  		/* set and verify setting the translation address */
a635755a Xiangliang Yu 2015-12-17  177  		iowrite64(addr, peer_mmio + xlat_reg);
a635755a Xiangliang Yu 2015-12-17  178  		reg_val = ioread64(peer_mmio + xlat_reg);
a635755a Xiangliang Yu 2015-12-17  179  		if (reg_val != addr) {
a635755a Xiangliang Yu 2015-12-17  180  			iowrite64(0, peer_mmio + xlat_reg);
a635755a Xiangliang Yu 2015-12-17  181  			return -EIO;
a635755a Xiangliang Yu 2015-12-17  182  		}
a635755a Xiangliang Yu 2015-12-17  183  
a635755a Xiangliang Yu 2015-12-17  184  		/* set and verify setting the limit */
a635755a Xiangliang Yu 2015-12-17  185  		iowrite64(limit, mmio + limit_reg);
a635755a Xiangliang Yu 2015-12-17  186  		reg_val = ioread64(mmio + limit_reg);
a635755a Xiangliang Yu 2015-12-17 @187  		if (reg_val != limit) {
a635755a Xiangliang Yu 2015-12-17  188  			iowrite64(base_addr, mmio + limit_reg);
a635755a Xiangliang Yu 2015-12-17  189  			iowrite64(0, peer_mmio + xlat_reg);
a635755a Xiangliang Yu 2015-12-17  190  			return -EIO;
a635755a Xiangliang Yu 2015-12-17  191  		}
a635755a Xiangliang Yu 2015-12-17  192  	} else {
a635755a Xiangliang Yu 2015-12-17  193  		/* split bar addr range must all be 32 bit */
a635755a Xiangliang Yu 2015-12-17  194  		if (addr & (~0ull << 32))
a635755a Xiangliang Yu 2015-12-17  195  			return -EINVAL;

:::::: The code at line 187 was first introduced by commit
:::::: a635755a710138a6f505cc7e62693741786fb19e NTB: Add AMD PCI-Express NTB driver

:::::: TO: Xiangliang Yu <Xiangliang.Yu@amd.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 28696 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-17 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17  8:18 [PATCH 2/3] NTB: Add AMD NTB support in Kconfig and Makefile Xiangliang Yu
2015-12-17 11:01 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).