All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vmxnet3: prevent building with 256K pages
@ 2021-06-15 12:35 Michael Ellerman
  2021-06-15 12:41 ` Christophe Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2021-06-15 12:35 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, kuba, davem, pv-drivers, doshir, christophe.leroy

This driver assigns PAGE_SIZE to a u16, which can't work when the page
size is 256K. As reported by lkp:

 drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_init':
 arch/powerpc/include/asm/page.h:24:20: warning: conversion from 'long unsigned int' to 'u16' changes value from '262144' to '0'
 drivers/net/vmxnet3/vmxnet3_drv.c:1784:29: note: in expansion of macro 'PAGE_SIZE'
  1784 |    rq->buf_info[0][i].len = PAGE_SIZE;
                                     ^~~~~~~~~

Simliar to what was done previously in commit fbdf0e28d061 ("vmxnet3:
prevent building with 64K pages"), prevent the driver from building when
256K pages are enabled.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/net/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 74dc8e249faa..da46898f060a 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -549,7 +549,7 @@ config VMXNET3
 	depends on PCI && INET
 	depends on !(PAGE_SIZE_64KB || ARM64_64K_PAGES || \
 		     IA64_PAGE_SIZE_64KB || MICROBLAZE_64K_PAGES || \
-		     PARISC_PAGE_SIZE_64KB || PPC_64K_PAGES)
+		     PARISC_PAGE_SIZE_64KB || PPC_64K_PAGES || PPC_256K_PAGES)
 	help
 	  This driver supports VMware's vmxnet3 virtual ethernet NIC.
 	  To compile this driver as a module, choose M here: the
-- 
2.25.1


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

end of thread, other threads:[~2021-06-16  5:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 12:35 [PATCH] vmxnet3: prevent building with 256K pages Michael Ellerman
2021-06-15 12:41 ` Christophe Leroy
2021-06-16  5:21   ` Christoph Hellwig
2021-06-16  5:33     ` Christophe Leroy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.