ntb: perf test: fix address space confusion
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Jan 2016 09:31:45 +0000 (10:31 +0100)
committerJon Mason <jdmason@kudzu.us>
Fri, 18 Mar 2016 00:38:40 +0000 (20:38 -0400)
commit1985a88107b5330b2a911ad4d279e1bd7e4deb24
tree35cf86e2078fbf6af0f8cb3429594a4506e7d373
parentb562e44f507e863c6792946e4e1b1449fbbac85d
ntb: perf test: fix address space confusion

The ntb driver assigns between pointers an __iomem tokens, and
also casts them to 64-bit integers, which results in compiler
warnings on 32-bit systems:

drivers/ntb/test/ntb_perf.c: In function 'perf_copy':
drivers/ntb/test/ntb_perf.c:213:10: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  vbase = (u64)(u64 *)mw->vbase;
          ^
drivers/ntb/test/ntb_perf.c:214:14: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  dst_vaddr = (u64)(u64 *)dst;
              ^

This adds __iomem annotations where needed and changes the temporary
variables to iomem pointers to avoid casting them to u64. I did not
see the problem in linux-next earlier, but it show showed up in
4.5-rc1.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 8a7b6a778a85 ("ntb: ntb perf tool")
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/test/ntb_perf.c