Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread Thomas Zimmermann

Hi

Am 28.03.24 um 13:51 schrieb Arnd Bergmann:

On Thu, Mar 28, 2024, at 13:46, Helge Deller wrote:

On 3/27/24 21:41, Thomas Zimmermann wrote:

+++ b/arch/arc/include/asm/video.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include 
+
+#endif /* _ASM_VIDEO_H_ */

I wonder, since that file simply #includes the generic version,
wasn't there a possibility that kbuild could symlink
the generic version for us?
Does it need to be mandatory in include/asm-generic/Kbuild ?
Same applies to a few other files below.

It should be enough to just remove the files entirely,
as kbuild will generate the same wrappers for mandatory files.


If that works, I'm happy to remove these wrapper files.

Best regards
Thomas



  Arnd


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread kernel test robot
Hi Thomas,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.9-rc1 next-20240328]
[cannot apply to tip/x86/core deller-parisc/for-next arnd-asm-generic/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/arch-Select-fbdev-helpers-with-CONFIG_VIDEO/20240328-044735
base:   linus/master
patch link:
https://lore.kernel.org/r/20240327204450.14914-4-tzimmermann%40suse.de
patch subject: [PATCH v2 3/3] arch: Rename fbdev header and source files
config: um-randconfig-001-20240328 
(https://download.01.org/0day-ci/archive/20240328/202403282102.oekobt3h-...@intel.com/config)
compiler: gcc-12 (Ubuntu 12.3.0-9ubuntu2) 12.3.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240328/202403282102.oekobt3h-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202403282102.oekobt3h-...@intel.com/

All errors (new ones prefixed by >>):

   /usr/bin/ld: drivers/video/fbdev/core/fb_io_fops.o: in function `fb_io_mmap':
>> fb_io_fops.c:(.text+0x251): undefined reference to `pgprot_framebuffer'
   collect2: error: ld returned 1 exit status

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread Arnd Bergmann
On Thu, Mar 28, 2024, at 13:46, Helge Deller wrote:
> On 3/27/24 21:41, Thomas Zimmermann wrote:

>> +++ b/arch/arc/include/asm/video.h
>> @@ -0,0 +1,8 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +#ifndef _ASM_VIDEO_H_
>> +#define _ASM_VIDEO_H_
>> +
>> +#include 
>> +
>> +#endif /* _ASM_VIDEO_H_ */
>
> I wonder, since that file simply #includes the generic version,
> wasn't there a possibility that kbuild could symlink
> the generic version for us?
> Does it need to be mandatory in include/asm-generic/Kbuild ?
> Same applies to a few other files below.

It should be enough to just remove the files entirely,
as kbuild will generate the same wrappers for mandatory files.

 Arnd

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread Helge Deller

On 3/27/24 21:41, Thomas Zimmermann wrote:

The per-architecture fbdev code has no dependencies on fbdev and can
be used for any video-related subsystem. Rename the files to 'video'.
Use video-sti.c on parisc as the source file depends on CONFIG_STI_CORE.

Further update all includes statements, includ guards, and Makefiles.
Also update a few strings and comments to refer to video instead of
fbdev.

Signed-off-by: Thomas Zimmermann 
Cc: Vineet Gupta 
Cc: Catalin Marinas 
Cc: Will Deacon 
Cc: Huacai Chen 
Cc: WANG Xuerui 
Cc: Geert Uytterhoeven 
Cc: Thomas Bogendoerfer 
Cc: "James E.J. Bottomley" 
Cc: Helge Deller 
Cc: Michael Ellerman 
Cc: Nicholas Piggin 
Cc: Yoshinori Sato 
Cc: Rich Felker 
Cc: John Paul Adrian Glaubitz 
Cc: "David S. Miller" 
Cc: Andreas Larsson 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: Borislav Petkov 
Cc: Dave Hansen 
Cc: x...@kernel.org
Cc: "H. Peter Anvin" 
---
  arch/arc/include/asm/fb.h|  8 
  arch/arc/include/asm/video.h |  8 
  arch/arm/include/asm/fb.h|  6 --
  arch/arm/include/asm/video.h |  6 ++
  arch/arm64/include/asm/fb.h  | 10 --
  arch/arm64/include/asm/video.h   | 10 ++
  arch/loongarch/include/asm/{fb.h => video.h} |  8 
  arch/m68k/include/asm/{fb.h => video.h}  |  8 
  arch/mips/include/asm/{fb.h => video.h}  | 12 ++--
  arch/parisc/include/asm/{fb.h => video.h}|  8 
  arch/parisc/video/Makefile   |  2 +-
  arch/parisc/video/{fbdev.c => video-sti.c}   |  2 +-
  arch/powerpc/include/asm/{fb.h => video.h}   |  8 
  arch/powerpc/kernel/pci-common.c |  2 +-
  arch/sh/include/asm/fb.h |  7 ---
  arch/sh/include/asm/video.h  |  7 +++
  arch/sparc/include/asm/{fb.h => video.h} |  8 
  arch/sparc/video/Makefile|  2 +-
  arch/sparc/video/{fbdev.c => video.c}|  4 ++--
  arch/x86/include/asm/{fb.h => video.h}   |  8 
  arch/x86/video/Makefile  |  2 +-
  arch/x86/video/{fbdev.c => video.c}  |  3 ++-
  include/asm-generic/Kbuild   |  2 +-
  include/asm-generic/{fb.h => video.h}|  6 +++---
  include/linux/fb.h   |  2 +-
  25 files changed, 75 insertions(+), 74 deletions(-)
  delete mode 100644 arch/arc/include/asm/fb.h
  create mode 100644 arch/arc/include/asm/video.h
  delete mode 100644 arch/arm/include/asm/fb.h
  create mode 100644 arch/arm/include/asm/video.h
  delete mode 100644 arch/arm64/include/asm/fb.h
  create mode 100644 arch/arm64/include/asm/video.h
  rename arch/loongarch/include/asm/{fb.h => video.h} (86%)
  rename arch/m68k/include/asm/{fb.h => video.h} (86%)
  rename arch/mips/include/asm/{fb.h => video.h} (76%)
  rename arch/parisc/include/asm/{fb.h => video.h} (68%)
  rename arch/parisc/video/{fbdev.c => video-sti.c} (96%)
  rename arch/powerpc/include/asm/{fb.h => video.h} (76%)
  delete mode 100644 arch/sh/include/asm/fb.h
  create mode 100644 arch/sh/include/asm/video.h
  rename arch/sparc/include/asm/{fb.h => video.h} (89%)
  rename arch/sparc/video/{fbdev.c => video.c} (86%)
  rename arch/x86/include/asm/{fb.h => video.h} (77%)
  rename arch/x86/video/{fbdev.c => video.c} (97%)
  rename include/asm-generic/{fb.h => video.h} (96%)

diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h
deleted file mode 100644
index 9c2383d29cbb9..0
--- a/arch/arc/include/asm/fb.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include 
-
-#endif /* _ASM_FB_H_ */
diff --git a/arch/arc/include/asm/video.h b/arch/arc/include/asm/video.h
new file mode 100644
index 0..8ff7263727fe7
--- /dev/null
+++ b/arch/arc/include/asm/video.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include 
+
+#endif /* _ASM_VIDEO_H_ */


I wonder, since that file simply #includes the generic version,
wasn't there a possibility that kbuild could symlink
the generic version for us?
Does it need to be mandatory in include/asm-generic/Kbuild ?
Same applies to a few other files below.

Helge




diff --git a/arch/arm/include/asm/fb.h b/arch/arm/include/asm/fb.h
deleted file mode 100644
index ce20a43c30339..0
--- a/arch/arm/include/asm/fb.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include 
-
-#endif /* _ASM_FB_H_ */
diff --git a/arch/arm/include/asm/video.h b/arch/arm/include/asm/video.h
new file mode 100644
index 0..f570565366e67
--- /dev/null
+++ b/arch/arm/include/asm/video.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include 
+
+#endif /* _ASM_VIDEO_H_ */
diff --git a/arch/arm64/include/asm/fb.h b/arch/arm64/include/asm/fb.h
deleted file mode 100644
index 

Re: [PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-28 Thread Sam Ravnborg
Hi Thomas,

On Wed, Mar 27, 2024 at 09:41:31PM +0100, Thomas Zimmermann wrote:
> The per-architecture fbdev code has no dependencies on fbdev and can
> be used for any video-related subsystem. Rename the files to 'video'.
> Use video-sti.c on parisc as the source file depends on CONFIG_STI_CORE.
> 
> Further update all includes statements, includ guards, and Makefiles.
^ missing 'e' 

> Also update a few strings and comments to refer to video instead of
> fbdev.
> 
> Signed-off-by: Thomas Zimmermann 
> Cc: Vineet Gupta 
> Cc: Catalin Marinas 
> Cc: Will Deacon 
> Cc: Huacai Chen 
> Cc: WANG Xuerui 
> Cc: Geert Uytterhoeven 
> Cc: Thomas Bogendoerfer 
> Cc: "James E.J. Bottomley" 
> Cc: Helge Deller 
> Cc: Michael Ellerman 
> Cc: Nicholas Piggin 
> Cc: Yoshinori Sato 
> Cc: Rich Felker 
> Cc: John Paul Adrian Glaubitz 
> Cc: "David S. Miller" 
> Cc: Andreas Larsson 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: Borislav Petkov 
> Cc: Dave Hansen 
> Cc: x...@kernel.org
> Cc: "H. Peter Anvin" 

If the patch is changed to use the Kbuild file to pick the generic
variant of video.h then it is:

Reviewed-by: Sam Ravnborg 

I also added an unrelated sparc comment, that can be addressed another
time.

Sam

> ---
>  arch/arc/include/asm/fb.h|  8 
>  arch/arc/include/asm/video.h |  8 
>  arch/arm/include/asm/fb.h|  6 --
>  arch/arm/include/asm/video.h |  6 ++
>  arch/arm64/include/asm/fb.h  | 10 --
>  arch/arm64/include/asm/video.h   | 10 ++
>  arch/loongarch/include/asm/{fb.h => video.h} |  8 
>  arch/m68k/include/asm/{fb.h => video.h}  |  8 
>  arch/mips/include/asm/{fb.h => video.h}  | 12 ++--
>  arch/parisc/include/asm/{fb.h => video.h}|  8 
>  arch/parisc/video/Makefile   |  2 +-
>  arch/parisc/video/{fbdev.c => video-sti.c}   |  2 +-
>  arch/powerpc/include/asm/{fb.h => video.h}   |  8 
>  arch/powerpc/kernel/pci-common.c |  2 +-
>  arch/sh/include/asm/fb.h |  7 ---
>  arch/sh/include/asm/video.h  |  7 +++
>  arch/sparc/include/asm/{fb.h => video.h} |  8 
>  arch/sparc/video/Makefile|  2 +-
>  arch/sparc/video/{fbdev.c => video.c}|  4 ++--
>  arch/x86/include/asm/{fb.h => video.h}   |  8 
>  arch/x86/video/Makefile  |  2 +-
>  arch/x86/video/{fbdev.c => video.c}  |  3 ++-
>  include/asm-generic/Kbuild   |  2 +-
>  include/asm-generic/{fb.h => video.h}|  6 +++---
>  include/linux/fb.h   |  2 +-
>  25 files changed, 75 insertions(+), 74 deletions(-)
>  delete mode 100644 arch/arc/include/asm/fb.h
>  create mode 100644 arch/arc/include/asm/video.h
>  delete mode 100644 arch/arm/include/asm/fb.h
>  create mode 100644 arch/arm/include/asm/video.h
>  delete mode 100644 arch/arm64/include/asm/fb.h
>  create mode 100644 arch/arm64/include/asm/video.h
>  rename arch/loongarch/include/asm/{fb.h => video.h} (86%)
>  rename arch/m68k/include/asm/{fb.h => video.h} (86%)
>  rename arch/mips/include/asm/{fb.h => video.h} (76%)
>  rename arch/parisc/include/asm/{fb.h => video.h} (68%)
>  rename arch/parisc/video/{fbdev.c => video-sti.c} (96%)
>  rename arch/powerpc/include/asm/{fb.h => video.h} (76%)
>  delete mode 100644 arch/sh/include/asm/fb.h
>  create mode 100644 arch/sh/include/asm/video.h
>  rename arch/sparc/include/asm/{fb.h => video.h} (89%)
>  rename arch/sparc/video/{fbdev.c => video.c} (86%)
>  rename arch/x86/include/asm/{fb.h => video.h} (77%)
>  rename arch/x86/video/{fbdev.c => video.c} (97%)
>  rename include/asm-generic/{fb.h => video.h} (96%)
> 
> diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h
> deleted file mode 100644
> index 9c2383d29cbb9..0
> --- a/arch/arc/include/asm/fb.h
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -
> -#ifndef _ASM_FB_H_
> -#define _ASM_FB_H_
> -
> -#include 
> -
> -#endif /* _ASM_FB_H_ */
> diff --git a/arch/arc/include/asm/video.h b/arch/arc/include/asm/video.h
> new file mode 100644
> index 0..8ff7263727fe7
> --- /dev/null
> +++ b/arch/arc/include/asm/video.h
> @@ -0,0 +1,8 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef _ASM_VIDEO_H_
> +#define _ASM_VIDEO_H_
> +
> +#include 
> +
> +#endif /* _ASM_VIDEO_H_ */

arch/arc/include/asm/video.h only exists to pick
include/asm-generic/video.h.

The simpler way to do this is to add a line to:
arch/arc/include/asm/Kbuild:
+ generic-y += video.h

While touching the file I suggest to move to the simpler way using the
Kbuild file.

The same goes for all the other video.h files that only picks the
asm-generic variant.




> diff --git a/arch/arm/include/asm/fb.h b/arch/arm/include/asm/fb.h
> deleted file mode 

[PATCH v2 3/3] arch: Rename fbdev header and source files

2024-03-27 Thread Thomas Zimmermann
The per-architecture fbdev code has no dependencies on fbdev and can
be used for any video-related subsystem. Rename the files to 'video'.
Use video-sti.c on parisc as the source file depends on CONFIG_STI_CORE.

Further update all includes statements, includ guards, and Makefiles.
Also update a few strings and comments to refer to video instead of
fbdev.

Signed-off-by: Thomas Zimmermann 
Cc: Vineet Gupta 
Cc: Catalin Marinas 
Cc: Will Deacon 
Cc: Huacai Chen 
Cc: WANG Xuerui 
Cc: Geert Uytterhoeven 
Cc: Thomas Bogendoerfer 
Cc: "James E.J. Bottomley" 
Cc: Helge Deller 
Cc: Michael Ellerman 
Cc: Nicholas Piggin 
Cc: Yoshinori Sato 
Cc: Rich Felker 
Cc: John Paul Adrian Glaubitz 
Cc: "David S. Miller" 
Cc: Andreas Larsson 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: Borislav Petkov 
Cc: Dave Hansen 
Cc: x...@kernel.org
Cc: "H. Peter Anvin" 
---
 arch/arc/include/asm/fb.h|  8 
 arch/arc/include/asm/video.h |  8 
 arch/arm/include/asm/fb.h|  6 --
 arch/arm/include/asm/video.h |  6 ++
 arch/arm64/include/asm/fb.h  | 10 --
 arch/arm64/include/asm/video.h   | 10 ++
 arch/loongarch/include/asm/{fb.h => video.h} |  8 
 arch/m68k/include/asm/{fb.h => video.h}  |  8 
 arch/mips/include/asm/{fb.h => video.h}  | 12 ++--
 arch/parisc/include/asm/{fb.h => video.h}|  8 
 arch/parisc/video/Makefile   |  2 +-
 arch/parisc/video/{fbdev.c => video-sti.c}   |  2 +-
 arch/powerpc/include/asm/{fb.h => video.h}   |  8 
 arch/powerpc/kernel/pci-common.c |  2 +-
 arch/sh/include/asm/fb.h |  7 ---
 arch/sh/include/asm/video.h  |  7 +++
 arch/sparc/include/asm/{fb.h => video.h} |  8 
 arch/sparc/video/Makefile|  2 +-
 arch/sparc/video/{fbdev.c => video.c}|  4 ++--
 arch/x86/include/asm/{fb.h => video.h}   |  8 
 arch/x86/video/Makefile  |  2 +-
 arch/x86/video/{fbdev.c => video.c}  |  3 ++-
 include/asm-generic/Kbuild   |  2 +-
 include/asm-generic/{fb.h => video.h}|  6 +++---
 include/linux/fb.h   |  2 +-
 25 files changed, 75 insertions(+), 74 deletions(-)
 delete mode 100644 arch/arc/include/asm/fb.h
 create mode 100644 arch/arc/include/asm/video.h
 delete mode 100644 arch/arm/include/asm/fb.h
 create mode 100644 arch/arm/include/asm/video.h
 delete mode 100644 arch/arm64/include/asm/fb.h
 create mode 100644 arch/arm64/include/asm/video.h
 rename arch/loongarch/include/asm/{fb.h => video.h} (86%)
 rename arch/m68k/include/asm/{fb.h => video.h} (86%)
 rename arch/mips/include/asm/{fb.h => video.h} (76%)
 rename arch/parisc/include/asm/{fb.h => video.h} (68%)
 rename arch/parisc/video/{fbdev.c => video-sti.c} (96%)
 rename arch/powerpc/include/asm/{fb.h => video.h} (76%)
 delete mode 100644 arch/sh/include/asm/fb.h
 create mode 100644 arch/sh/include/asm/video.h
 rename arch/sparc/include/asm/{fb.h => video.h} (89%)
 rename arch/sparc/video/{fbdev.c => video.c} (86%)
 rename arch/x86/include/asm/{fb.h => video.h} (77%)
 rename arch/x86/video/{fbdev.c => video.c} (97%)
 rename include/asm-generic/{fb.h => video.h} (96%)

diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h
deleted file mode 100644
index 9c2383d29cbb9..0
--- a/arch/arc/include/asm/fb.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include 
-
-#endif /* _ASM_FB_H_ */
diff --git a/arch/arc/include/asm/video.h b/arch/arc/include/asm/video.h
new file mode 100644
index 0..8ff7263727fe7
--- /dev/null
+++ b/arch/arc/include/asm/video.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include 
+
+#endif /* _ASM_VIDEO_H_ */
diff --git a/arch/arm/include/asm/fb.h b/arch/arm/include/asm/fb.h
deleted file mode 100644
index ce20a43c30339..0
--- a/arch/arm/include/asm/fb.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_FB_H_
-#define _ASM_FB_H_
-
-#include 
-
-#endif /* _ASM_FB_H_ */
diff --git a/arch/arm/include/asm/video.h b/arch/arm/include/asm/video.h
new file mode 100644
index 0..f570565366e67
--- /dev/null
+++ b/arch/arm/include/asm/video.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_VIDEO_H_
+#define _ASM_VIDEO_H_
+
+#include 
+
+#endif /* _ASM_VIDEO_H_ */
diff --git a/arch/arm64/include/asm/fb.h b/arch/arm64/include/asm/fb.h
deleted file mode 100644
index 1a495d8fb2ce0..0
--- a/arch/arm64/include/asm/fb.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012 ARM Ltd.
- */
-#ifndef __ASM_FB_H_
-#define __ASM_FB_H_
-
-#include 
-
-#endif /* __ASM_FB_H_ */
diff --git a/arch/arm64/include/asm/video.h b/arch/arm64/include/asm/video.h
new file mode 100644
index