Skip to contentSkip to conversation

staging: Fix build of VCHIQ driver.

PATCH In review Eric Anholt 3 participants 13 messages Oct 3, 2016 – Oct 15, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover staging: Fix build of VCHIQ driver.

This is a series of fixes for the vchiq driver that Greg recently added to his staging-testing branch.

A full tree with nasty patches to add the other drivers necessary to do "vcdbg log msg" is available at:

https://github.com/anholt/linux/tree/vchiq

Eric Anholt (4):
staging/vchi: Convert to current get_user_pages() arguments. staging/vchi: Update for rename of page_cache_release() to put_page().
ARM: bcm2835: Add #define for VCHIQ property message. drivers/vchi: Remove dependency on CONFIG_BROKEN.

 drivers/staging/vc04_services/Kconfig                              | 2 +-
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 6 +++---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c      | 5 ++---
 include/soc/bcm2835/raspberrypi-firmware.h                         | 2 ++
 4 files changed, 8 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/4 staging/vchi: Convert to current get_user_pages() arguments.

---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +-
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c      | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +1 -1
index c29040fdf9a7..18f268ee6d4b 100644
@@ -420,7 +420,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
 		*need_release = 0; /* do not try and release vmalloc pages */
 	} else {
 		down_read(&task->mm->mmap_sem);
-		actual_pages = get_user_pages(task, task->mm,
+		actual_pages = get_user_pages(
 				          (unsigned long)buf & ~(PAGE_SIZE - 1),
 					  num_pages,
 					  (type == PAGELIST_READ) /*Write */ ,
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +1 -2
index e11c0e07471b..56c2c48f6801 100644
@@ -1473,8 +1473,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
 	}
 
 	down_read(&current->mm->mmap_sem);
-	rc = get_user_pages(current,      /* task */
-		current->mm,              /* mm */
+	rc = get_user_pages(
 		(unsigned long)virt_addr, /* start */
 		num_pages,                /* len */
 		0,                        /* write */
Signature · 1 line
2.9.3
#4 lore raw

PATCH 2/4 staging/vchi: Update for rename of page_cache_release() to put_page().

In reply to Eric Anholt
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++--
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +2 -2
index 18f268ee6d4b..4cb5bff23728 100644
@@ -439,7 +439,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
 			while (actual_pages > 0)
 			{
 				actual_pages--;
-				page_cache_release(pages[actual_pages]);
+				put_page(pages[actual_pages]);
 			}
 			kfree(pagelist);
 			if (actual_pages == 0)
@@ -578,7 +578,7 @@ free_pagelist(PAGELIST_T *pagelist, int actual)
 				offset = 0;
 				set_page_dirty(pg);
 			}
-			page_cache_release(pg);
+			put_page(pg);
 		}
 	}
 
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +1 -1
index 56c2c48f6801..47df1af2219d 100644
@@ -1512,7 +1512,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
 		kunmap(page);
 
 	for (page_idx = 0; page_idx < num_pages; page_idx++)
-		page_cache_release(pages[page_idx]);
+		put_page(pages[page_idx]);
 
 	kfree(pages);
 }
Signature · 1 line
2.9.3
#5 lore raw

PATCH 3/4 ARM: bcm2835: Add #define for VCHIQ property message.

In reply to Eric Anholt

This comes from the downstream tree and is needed for the new VCHIQ driver in staging.

---
 include/soc/bcm2835/raspberrypi-firmware.h | 2 ++
 1 file changed, 2 insertions(+)
include/soc/bcm2835/raspberrypi-firmware.h +2 -0
index 3fb357193f09..a06baffdf580 100644
@@ -109,6 +109,8 @@ enum rpi_firmware_property_tag {
 	RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN =               0x0004800a,
 	RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE =                0x0004800b,
 
+	RPI_FIRMWARE_VCHIQ_INIT =                             0x00048010,
+
 	RPI_FIRMWARE_GET_COMMAND_LINE =                       0x00050001,
 	RPI_FIRMWARE_GET_DMA_CHANNELS =                       0x00060001,
 };
Signature · 1 line
2.9.3
#8 lore raw

PATCH 4/4 drivers/vchi: Remove dependency on CONFIG_BROKEN.

In reply to Eric Anholt

The driver builds now.

---
 drivers/staging/vc04_services/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/Kconfig +1 -1
index 9676fb29075a..db8e1beb89f9 100644
@@ -1,6 +1,6 @@
 config BCM2708_VCHIQ
 	tristate "Videocore VCHIQ"
-	depends on RASPBERRYPI_FIRMWARE && BROKEN
+	depends on RASPBERRYPI_FIRMWARE
 	default y
 	help
 		Kernel to VideoCore communication interface for the
Signature · 1 line
2.9.3
#3 lore raw

Re: [PATCH 1/4] staging/vchi: Convert to current get_user_pages() arguments.

Quoted 5 lines · Greg Kroah-Hartman
Quoted 1 line · Eric Anholt

In the future, it's good to put at least some changelog text in here. I normally do not accept patches without it. But I'll take these two.

I'm generally verbose in commit messages, but these seemed like they
didn't have useful context to be added.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161007/5a2699fc/attachment.sig>

#9 lore raw

Re: [PATCH 4/4] staging/vchi: Remove dependency on CONFIG_BROKEN.

In reply to Eric Anholt
Quoted 12 lines · Eric Anholt

The driver builds now.

---
 drivers/staging/vc04_services/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/Kconfig +0 -0
index 9676fb29075a..db8e1beb89f9 100644

drivers/staging/vc04_services/Kconfig line 6

Quoted 7 lines
drivers/staging/vc04_services/Kconfig +1 -1
@@ -1,6 +1,6 @@
 config BCM2708_VCHIQ
 	tristate "Videocore VCHIQ"
-	depends on RASPBERRYPI_FIRMWARE && BROKEN
+	depends on RASPBERRYPI_FIRMWARE
 	default y
 	help
 		Kernel to VideoCore communication interface for the

I've dropped this patch from my branch as there are build errors on arm64 systems still, and we don't want regressions like that.

I've forwarded you the error messages, and I'll be glad to add this patch back once these issues are fixed.

thanks,

greg k-h

#6 lore raw

Re: [PATCH 3/4] ARM: bcm2835: Add #define for VCHIQ property message.

In reply to Eric Anholt

Hi Greg,

Quoted 5 lines

Eric Anholt <[email protected]> hat am 3. Oktober 2016 um 20:52 geschrieben:

This comes from the downstream tree and is needed for the new VCHIQ driver in staging.

maybe it's not clear from the commit message, but RPI_FIRMWARE_VCHIQ_INIT is already used in drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c

So this patch fixes also a build issue.

Quoted 28 lines
---
 include/soc/bcm2835/raspberrypi-firmware.h | 2 ++
 1 file changed, 2 insertions(+)
include/soc/bcm2835/raspberrypi-firmware.h +2 -0
index 3fb357193f09..a06baffdf580 100644
@@ -109,6 +109,8 @@ enum rpi_firmware_property_tag {
 	RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN =               0x0004800a,
 	RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE =                0x0004800b,
 
+	RPI_FIRMWARE_VCHIQ_INIT =                             0x00048010,
+
 	RPI_FIRMWARE_GET_COMMAND_LINE =                       0x00050001,
 	RPI_FIRMWARE_GET_DMA_CHANNELS =                       0x00060001,
 };
Signature · 7 lines
2.9.3


_______________________________________________
linux-rpi-kernel mailing list
linux-rpi-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel
#7 lore raw

Re: [PATCH 3/4] ARM: bcm2835: Add #define for VCHIQ property message.

Quoted 10 lines

Stefan Wahren <[email protected]> hat am 15. Oktober 2016 um 09:53 geschrieben:

Hi Greg,

Quoted 3 lines

Eric Anholt <[email protected]> hat am 3. Oktober 2016 um 20:52 geschrieben:

Quoted 9 lines
Quoted 2 lines

This comes from the downstream tree and is needed for the new VCHIQ driver in staging.

maybe it's not clear from the commit message, but RPI_FIRMWARE_VCHIQ_INIT is already used in drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c

So this patch fixes also a build issue.

Sorry about the noise. You already applied it.

#10 lore raw

Re: [PATCH 4/4] staging/vchi: Remove dependency on CONFIG_BROKEN.

In reply to Greg Kroah-Hartman
Quoted 30 lines

Greg Kroah-Hartman <[email protected]> hat am 13. Oktober 2016 um 09:05 geschrieben:

Quoted 13 lines · Eric Anholt

The driver builds now.

---
 drivers/staging/vc04_services/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/Kconfig +0 -0
index 9676fb29075a..db8e1beb89f9 100644

drivers/staging/vc04_services/Kconfig line 6

Quoted 7 lines
drivers/staging/vc04_services/Kconfig +1 -1
@@ -1,6 +1,6 @@
 config BCM2708_VCHIQ
 	tristate "Videocore VCHIQ"
-	depends on RASPBERRYPI_FIRMWARE && BROKEN
+	depends on RASPBERRYPI_FIRMWARE
 	default y
 	help
 		Kernel to VideoCore communication interface for the

I've dropped this patch from my branch as there are build errors on arm64 systems still, and we don't want regressions like that.

Quoted 2 lines

I've forwarded you the error messages, and I'll be glad to add this patch back once these issues are fixed.

I ask the author of this downstream pull request [1] to send the VHCIQ part as indiviual patches.
He is interested to submit them upstream.

[1] - https://github.com/raspberrypi/linux/pull/1611

Quoted 9 lines

thanks,

greg k-h

_______________________________________________
linux-rpi-kernel mailing list
linux-rpi-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

#11 lore raw

Re: [PATCH 4/4] staging/vchi: Remove dependency on CONFIG_BROKEN.

Quoted 30 lines · Stefan Wahren
Quoted 30 lines

Greg Kroah-Hartman <[email protected]> hat am 13. Oktober 2016 um 09:05 geschrieben:

Quoted 13 lines · Eric Anholt

The driver builds now.

---
 drivers/staging/vc04_services/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/Kconfig +0 -0
index 9676fb29075a..db8e1beb89f9 100644

drivers/staging/vc04_services/Kconfig line 6

Quoted 7 lines
drivers/staging/vc04_services/Kconfig +1 -1
@@ -1,6 +1,6 @@
 config BCM2708_VCHIQ
 	tristate "Videocore VCHIQ"
-	depends on RASPBERRYPI_FIRMWARE && BROKEN
+	depends on RASPBERRYPI_FIRMWARE
 	default y
 	help
 		Kernel to VideoCore communication interface for the

I've dropped this patch from my branch as there are build errors on arm64 systems still, and we don't want regressions like that.

Quoted 8 lines
Quoted 2 lines

I've forwarded you the error messages, and I'll be glad to add this patch back once these issues are fixed.

I ask the author of this downstream pull request [1] to send the VHCIQ part as indiviual patches.
He is interested to submit them upstream.

[1] - https://github.com/raspberrypi/linux/pull/1611

Ok, but what does that mean for us here? The code should be all now merged into our "upstream" trees, it just needs to be cleaned up properly.

confused,

greg k-h

#12 lore raw

Re: [PATCH 4/4] staging/vchi: Remove dependency on CONFIG_BROKEN.

Hi Greg,

Quoted 45 lines

Greg Kroah-Hartman <[email protected]> hat am 15. Oktober 2016 um 13:27 geschrieben:

Quoted 33 lines · Stefan Wahren
Quoted 30 lines

Greg Kroah-Hartman <[email protected]> hat am 13. Oktober 2016 um 09:05 geschrieben:

Quoted 13 lines · Eric Anholt

The driver builds now.

---
 drivers/staging/vc04_services/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vc04_services/Kconfig +0 -0
index 9676fb29075a..db8e1beb89f9 100644

drivers/staging/vc04_services/Kconfig line 6

Quoted 7 lines
drivers/staging/vc04_services/Kconfig +1 -1
@@ -1,6 +1,6 @@
 config BCM2708_VCHIQ
 	tristate "Videocore VCHIQ"
-	depends on RASPBERRYPI_FIRMWARE && BROKEN
+	depends on RASPBERRYPI_FIRMWARE
 	default y
 	help
 		Kernel to VideoCore communication interface for the

I've dropped this patch from my branch as there are build errors on arm64 systems still, and we don't want regressions like that.

Quoted 2 lines

I've forwarded you the error messages, and I'll be glad to add this patch back once these issues are fixed.

Quoted 6 lines

I ask the author of this downstream pull request [1] to send the VHCIQ part as
indiviual patches.
He is interested to submit them upstream.

[1] - https://github.com/raspberrypi/linux/pull/1611

Quoted 7 lines

Ok, but what does that mean for us here? The code should be all now merged into our "upstream" trees, it just needs to be cleaned up properly.

confused,

greg k-h

sorry for the confusion. I mean that he wants to send email patches based on your staging tree. So we avoid patching the kernel twice.

The link was only for illustration that he already fixed most of the arm64 build issues.

Stefan