All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: unlisted-recipients:; (no To-header on input)@bombadil.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>,
	mjpeg-users@lists.sourceforge.net, linux-arch@vger.kernel.org
Subject: [PATCH 1/7] asm-generic, media: allow COMPILE_TEST with virt_to_bus
Date: Fri, 20 Apr 2018 13:42:47 -0400	[thread overview]
Message-ID: <d8bdf4a080d4655d20b532a37ae22ca7e3483cc4.1524245455.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <cover.1524245455.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1524245455.git.mchehab@s-opensource.com>

The virt_to_bus/bus_to_virt macros are arch-specific. Some
archs don't support it. Yet, as it is interesting to allow
doing compilation tests on non-ia32/ia64 archs, provide a
fallback for such archs.

While here, enable COMPILE_TEST for two media drivers that
depends on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/pci/sta2x11/Kconfig | 4 ++--
 drivers/media/pci/zoran/Kconfig   | 3 ++-
 include/asm-generic/io.h          | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
index 7af3f1cbcea8..fb4b4c8ac430 100644
--- a/drivers/media/pci/sta2x11/Kconfig
+++ b/drivers/media/pci/sta2x11/Kconfig
@@ -1,10 +1,10 @@
 config STA2X11_VIP
 	tristate "STA2X11 VIP Video For Linux"
-	depends on STA2X11 || COMPILE_TEST
+	depends on (STA2X11 && VIRT_TO_BUS) || COMPILE_TEST
 	depends on HAS_DMA
 	select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
 	select VIDEOBUF2_DMA_CONTIG
-	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
+	depends on PCI && VIDEO_V4L2
 	depends on VIDEO_V4L2_SUBDEV_API
 	depends on I2C
 	help
diff --git a/drivers/media/pci/zoran/Kconfig b/drivers/media/pci/zoran/Kconfig
index 39ec35bd21a5..5d2678a9e310 100644
--- a/drivers/media/pci/zoran/Kconfig
+++ b/drivers/media/pci/zoran/Kconfig
@@ -1,6 +1,7 @@
 config VIDEO_ZORAN
 	tristate "Zoran ZR36057/36067 Video For Linux"
-	depends on PCI && I2C_ALGOBIT && VIDEO_V4L2 && VIRT_TO_BUS
+	depends on PCI && I2C_ALGOBIT && VIDEO_V4L2
+	depends on VIRT_TO_BUS || COMPILE_TEST
 	depends on !ALPHA
 	help
 	  Say Y for support for MJPEG capture cards based on the Zoran
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 66d1d45fa2e1..f448129ad15c 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -1068,7 +1068,7 @@ static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
 }
 #endif
 
-#ifdef CONFIG_VIRT_TO_BUS
+#if defined(CONFIG_VIRT_TO_BUS) || defined(CONFIG_COMPILE_TEST)
 #ifndef virt_to_bus
 static inline unsigned long virt_to_bus(void *address)
 {
-- 
2.14.3

WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>,
	mjpeg-users@lists.sourceforge.net, linux-arch@vger.kernel.org
Subject: [PATCH 1/7] asm-generic, media: allow COMPILE_TEST with virt_to_bus
Date: Fri, 20 Apr 2018 13:42:47 -0400	[thread overview]
Message-ID: <d8bdf4a080d4655d20b532a37ae22ca7e3483cc4.1524245455.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <cover.1524245455.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1524245455.git.mchehab@s-opensource.com>

The virt_to_bus/bus_to_virt macros are arch-specific. Some
archs don't support it. Yet, as it is interesting to allow
doing compilation tests on non-ia32/ia64 archs, provide a
fallback for such archs.

While here, enable COMPILE_TEST for two media drivers that
depends on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/pci/sta2x11/Kconfig | 4 ++--
 drivers/media/pci/zoran/Kconfig   | 3 ++-
 include/asm-generic/io.h          | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
index 7af3f1cbcea8..fb4b4c8ac430 100644
--- a/drivers/media/pci/sta2x11/Kconfig
+++ b/drivers/media/pci/sta2x11/Kconfig
@@ -1,10 +1,10 @@
 config STA2X11_VIP
 	tristate "STA2X11 VIP Video For Linux"
-	depends on STA2X11 || COMPILE_TEST
+	depends on (STA2X11 && VIRT_TO_BUS) || COMPILE_TEST
 	depends on HAS_DMA
 	select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
 	select VIDEOBUF2_DMA_CONTIG
-	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
+	depends on PCI && VIDEO_V4L2
 	depends on VIDEO_V4L2_SUBDEV_API
 	depends on I2C
 	help
diff --git a/drivers/media/pci/zoran/Kconfig b/drivers/media/pci/zoran/Kconfig
index 39ec35bd21a5..5d2678a9e310 100644
--- a/drivers/media/pci/zoran/Kconfig
+++ b/drivers/media/pci/zoran/Kconfig
@@ -1,6 +1,7 @@
 config VIDEO_ZORAN
 	tristate "Zoran ZR36057/36067 Video For Linux"
-	depends on PCI && I2C_ALGOBIT && VIDEO_V4L2 && VIRT_TO_BUS
+	depends on PCI && I2C_ALGOBIT && VIDEO_V4L2
+	depends on VIRT_TO_BUS || COMPILE_TEST
 	depends on !ALPHA
 	help
 	  Say Y for support for MJPEG capture cards based on the Zoran
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 66d1d45fa2e1..f448129ad15c 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -1068,7 +1068,7 @@ static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
 }
 #endif
 
-#ifdef CONFIG_VIRT_TO_BUS
+#if defined(CONFIG_VIRT_TO_BUS) || defined(CONFIG_COMPILE_TEST)
 #ifndef virt_to_bus
 static inline unsigned long virt_to_bus(void *address)
 {
-- 
2.14.3

  reply	other threads:[~2018-04-20 17:43 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 17:42 [PATCH 0/7] Enable most media drivers to build on ARM Mauro Carvalho Chehab
2018-04-20 17:42 ` Mauro Carvalho Chehab
2018-04-20 17:42 ` Mauro Carvalho Chehab
2018-04-20 17:42 ` Mauro Carvalho Chehab
2018-04-20 17:42 ` Mauro Carvalho Chehab [this message]
2018-04-20 17:42   ` [PATCH 1/7] asm-generic, media: allow COMPILE_TEST with virt_to_bus Mauro Carvalho Chehab
2018-04-24  7:33   ` Geert Uytterhoeven
2018-04-24  7:33     ` Geert Uytterhoeven
2018-04-24  7:55   ` Arnd Bergmann
2018-04-24  7:55     ` Arnd Bergmann
2018-04-24 10:25     ` Mauro Carvalho Chehab
2018-04-24 10:25       ` Mauro Carvalho Chehab
2018-04-20 17:42 ` [PATCH 2/7] media: meye: allow building it with COMPILE_TEST on non-x86 Mauro Carvalho Chehab
2018-04-22 18:12   ` Andy Shevchenko
2018-05-04 14:12     ` [PATCH 2/7 v2] " Mauro Carvalho Chehab
2018-04-20 17:42 ` [PATCH 3/7] media: rc: allow build pnp-dependent drivers with COMPILE_TEST Mauro Carvalho Chehab
2018-04-23  8:56   ` Sean Young
2018-04-20 17:42 ` [PATCH 4/7] media: ipu3: allow building it with COMPILE_TEST on non-x86 archs Mauro Carvalho Chehab
2018-04-23 20:32   ` Sakari Ailus
2018-04-20 17:42 ` [PATCH 5/7] omapfb: omapfb_dss.h: add stubs to build with COMPILE_TEST && DRM_OMAP Mauro Carvalho Chehab
2018-04-20 17:42   ` Mauro Carvalho Chehab
2018-04-20 17:42   ` Mauro Carvalho Chehab
2018-04-23 12:47   ` Bartlomiej Zolnierkiewicz
2018-04-23 12:47     ` Bartlomiej Zolnierkiewicz
2018-04-23 12:47     ` Bartlomiej Zolnierkiewicz
2018-04-23 13:55     ` Mauro Carvalho Chehab
2018-04-23 13:55       ` Mauro Carvalho Chehab
2018-04-23 13:55       ` Mauro Carvalho Chehab
     [not found]       ` <CGME20180425104736eucas1p1b448ce1c188b661c5e743217511110d7@eucas1p1.samsung.com>
2018-04-25 10:47         ` Bartlomiej Zolnierkiewicz
2018-04-25 10:47           ` Bartlomiej Zolnierkiewicz
2018-04-25 10:47           ` Bartlomiej Zolnierkiewicz
2018-05-04 13:52           ` Mauro Carvalho Chehab
2018-05-04 13:52             ` Mauro Carvalho Chehab
2018-05-04 13:52             ` Mauro Carvalho Chehab
     [not found]     ` <CGME20180423135655eucas1p1a935ce9c167e52cf1e76adcc0b4486e4@eucas1p1.samsung.com>
2018-04-23 13:56       ` Bartlomiej Zolnierkiewicz
2018-04-23 13:56         ` Bartlomiej Zolnierkiewicz
2018-04-23 13:56         ` Bartlomiej Zolnierkiewicz
2018-04-23 14:11         ` Tomi Valkeinen
2018-04-23 14:11           ` Tomi Valkeinen
2018-04-23 14:11           ` Tomi Valkeinen
2018-04-23 14:25           ` Mauro Carvalho Chehab
2018-04-23 14:25             ` Mauro Carvalho Chehab
2018-04-23 14:25             ` Mauro Carvalho Chehab
     [not found]           ` <CGME20180425111319eucas1p163fa4f5f7f51bc854763ba3c3c87b605@eucas1p1.samsung.com>
2018-04-25 11:13             ` Bartlomiej Zolnierkiewicz
2018-04-25 11:13               ` Bartlomiej Zolnierkiewicz
2018-04-25 11:13               ` Bartlomiej Zolnierkiewicz
2018-04-26  6:36               ` Tomi Valkeinen
2018-04-26  6:36                 ` Tomi Valkeinen
2018-04-26  6:36                 ` Tomi Valkeinen
2018-04-23 14:22         ` Mauro Carvalho Chehab
2018-04-23 14:22           ` Mauro Carvalho Chehab
2018-04-23 14:22           ` Mauro Carvalho Chehab
2018-04-23 19:48           ` Laurent Pinchart
2018-04-23 19:48             ` Laurent Pinchart
2018-04-23 19:48             ` Laurent Pinchart
2018-04-23 20:09             ` Mauro Carvalho Chehab
2018-04-23 20:09               ` Mauro Carvalho Chehab
2018-04-23 20:09               ` Mauro Carvalho Chehab
2018-04-23 20:22               ` Laurent Pinchart
2018-04-23 20:22                 ` Laurent Pinchart
2018-04-23 20:22                 ` Laurent Pinchart
2018-04-25  6:24               ` Tomi Valkeinen
2018-04-25  6:24                 ` Tomi Valkeinen
2018-04-25  6:24                 ` Tomi Valkeinen
2018-04-25  9:03                 ` Laurent Pinchart
2018-04-25  9:03                   ` Laurent Pinchart
2018-04-25  9:03                   ` Laurent Pinchart
2018-04-25  9:33                   ` Tomi Valkeinen
2018-04-25  9:33                     ` Tomi Valkeinen
2018-04-25  9:33                     ` Tomi Valkeinen
2018-04-25 10:02                     ` Laurent Pinchart
2018-04-25 10:02                       ` Laurent Pinchart
2018-04-25 10:02                       ` Laurent Pinchart
2018-04-25 10:10                       ` Tomi Valkeinen
2018-04-25 10:10                         ` Tomi Valkeinen
2018-04-25 10:10                         ` Tomi Valkeinen
2018-04-25 10:28                         ` Laurent Pinchart
2018-04-25 10:28                           ` Laurent Pinchart
2018-04-25 10:28                           ` Laurent Pinchart
2018-04-20 17:42 ` [PATCH 6/7] media: omap2: allow building it " Mauro Carvalho Chehab
2018-04-20 17:42 ` [PATCH 7/7] media: via-camera: allow build on non-x86 archs with COMPILE_TEST Mauro Carvalho Chehab
2018-04-20 17:42   ` Mauro Carvalho Chehab
2018-04-20 19:03   ` [PATCH v2 " Mauro Carvalho Chehab
2018-04-20 19:03     ` Mauro Carvalho Chehab
     [not found]     ` <CGME20180423121932eucas1p212eb6412ff8df511047c3afa782db6e0@eucas1p2.samsung.com>
2018-04-23 12:19       ` Bartlomiej Zolnierkiewicz
2018-04-23 12:19         ` Bartlomiej Zolnierkiewicz
2018-05-04 14:02         ` Mauro Carvalho Chehab
2018-05-04 14:02           ` Mauro Carvalho Chehab
2018-05-04 14:07         ` Mauro Carvalho Chehab
2018-05-04 14:07           ` Mauro Carvalho Chehab
     [not found]           ` <CGME20180504142416eucas1p1d8028ba30719c1a0a6e7c5edfb2bc152@eucas1p1.samsung.com>
2018-05-04 14:24             ` Bartlomiej Zolnierkiewicz
2018-05-04 14:24               ` Bartlomiej Zolnierkiewicz
     [not found]               ` <CGME20180515102628eucas1p16f05cb2a1189768f1426b6e5e99aa0a3@eucas1p1.samsung.com>
2018-05-15 10:26                 ` Bartlomiej Zolnierkiewicz
2018-05-15 10:26                   ` Bartlomiej Zolnierkiewicz

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=d8bdf4a080d4655d20b532a37ae22ca7e3483cc4.1524245455.git.mchehab@s-opensource.com \
    --to=mchehab@s-opensource.com \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mjpeg-users@lists.sourceforge.net \
    /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 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.