Skip to contentSkip to conversation

drm/mgag200: fix build on alpha arch

PATCH In review Sam Ravnborg 3 participants 6 messages Aug 7, 2020 – Aug 11, 2020

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

PATCH 1/1 drm/mgag200: fix build on alpha arch

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -0
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Sam Ravnborg

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>
Quoted 4 lines

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

$ dim status # fetches all the trees
$ dim tag-contains e20dfd27f7aa
drm-misc/drm-misc-next

You guess correctly :-)

Quoted 25 lines

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -1
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
--

2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Hi Daniel.

Quoted 23 lines · Daniel Vetter
Quoted 17 lines · Sam Ravnborg

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>
Quoted 4 lines

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

Quoted 1 line
$ dim status # fetches all the trees

Hmm, except that it did not update drm-misc-next?!?

I have read "Commiters that want to check the status of their current branch should use normal git status commands."

So that, I guess, may explain it.

Quoted 2 lines
$ dim tag-contains e20dfd27f7aa
drm-misc/drm-misc-next

Nice little command - but no "tag-contains" in my dim version. There is "dim tc" but no-one have any chance guessing what tc is an abbrevation for - sigh.

Quoted 4 lines

You guess correctly :-)

Thanks, pushed to drm-misc-next.

Sam

Quoted 21 lines
Quoted 21 lines

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -1
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
--

2.25.1

Quoted 15 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Sam Ravnborg

Hi Sam

thanks for taken care of this issue. Alpha is a rare architecture these days. How do you build and test for it?

Am 07.08.20 um 20:05 schrieb Sam Ravnborg:

Quoted 11 lines

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Sorry for being (too) late, but still:

Best regards
Thomas

Quoted 28 lines
Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -0
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Hi Thomas.

Quoted 4 lines · Thomas Zimmermann

Hi Sam

thanks for taken care of this issue. Alpha is a rare architecture these days. How do you build and test for it?

I am on ubuntu here so I have installed:
apt install gcc-alpha-linux-gnu

And then alpha is one of the architectures I build for. My full list:
archs="alpha arm arm64 sparc64 i386 x86 powerpc s390 riscv sh"

I build these configs:
configs="allmodconfig allyesconfig allnoconfig defconfig"

It takes a while so usually I build only the relevant sub-set such as drivers/gpu/drm/bridge/

I have, unfortunately, no testing. Would love something qemu based but have never invested time into this.

Sam

Quoted 46 lines

Am 07.08.20 um 20:05 schrieb Sam Ravnborg:

Quoted 11 lines

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Sorry for being (too) late, but still:

Best regards
Thomas

Quoted 25 lines
Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -0
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
Quoted 12 lines
Quoted 3 lines
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -0
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
Quoted 15 lines · Sam Ravnborg

Hi Thomas.

Quoted 4 lines · Thomas Zimmermann

Hi Sam

thanks for taken care of this issue. Alpha is a rare architecture these days. How do you build and test for it?

I am on ubuntu here so I have installed:
apt install gcc-alpha-linux-gnu

And then alpha is one of the architectures I build for. My full list:
archs="alpha arm arm64 sparc64 i386 x86 powerpc s390 riscv sh"

Quoted 8 lines

I build these configs:
configs="allmodconfig allyesconfig allnoconfig defconfig"

It takes a while so usually I build only the relevant sub-set such as drivers/gpu/drm/bridge/

I have, unfortunately, no testing. Would love something qemu based but have never invested time into this.

So the long term idea here was that we'd do at least all the build testing on gitlab. But moving the drm repos over to gitlab has kinda been on hold for a bit, with all the gitlab.freedesktop.org struggles past few months. It does look like it's on a really good track though.

Then we could do build testing for pretty much any reasonable architecture, and also qemu based runs (within reasons at least). And committers wouldn't have to duplicate it all for their own setup, since it's all shared.
-Daniel

Quoted 68 lines

Sam

Quoted 46 lines

Am 07.08.20 um 20:05 schrieb Sam Ravnborg:

Quoted 11 lines

When building imgag200 for the alpha architecture it fails like this:
mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’

  233 |  bios = vmalloc(size);
      |         ^~~~~~~
      |         kmalloc

When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h.
Use an explicit include of vmalloc.h to fix the build.

Sorry for being (too) late, but still:

Best regards
Thomas

Quoted 25 lines
Fixes e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards")
Cc Thomas Zimmermann <[email protected]>
Cc Egbert Eich <[email protected]>
Cc Takashi Iwai <[email protected]>
Cc Lyude Paul <[email protected]>

---
I have lost track if the offending commit is on the way to upstream or it is just in drm-misc-next. But I think it is the latter so we can apply this to drm-misc-next.

Sam

 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mgag200/mgag200_drv.c +1 -0
index 09170d46aa53..b282b0e42c2d 100644
@@ -9,6 +9,7 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/vmalloc.h>
 
Quoted 12 lines
Quoted 3 lines
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -0
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel