Re: [PATCH 06/12] arch: Declare screen_info in <asm/screen_info.h>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Thomas Zimmermann" <tzimmermann@xxxxxxx>, "Helge Deller" <deller@xxxxxx>, "Daniel Vetter" <daniel@xxxxxxxx>, "Dave Airlie" <airlied@xxxxxxxxx>
- Subject: Re: [PATCH 06/12] arch: Declare screen_info in <asm/screen_info.h>
- From: "Arnd Bergmann" <arnd@xxxxxxxx>
- Date: Thu, 29 Jun 2023 15:03:20 +0200
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, "linux-csky@xxxxxxxxxxxxxxx" <linux-csky@xxxxxxxxxxxxxxx>, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, Linux-Arch <linux-arch@xxxxxxxxxxxxxxx>, "Richard Henderson" <richard.henderson@xxxxxxxxxx>, "Ivan Kokshaysky" <ink@xxxxxxxxxxxxxxxxxxxx>, "Matt Turner" <mattst88@xxxxxxxxx>, "Russell King" <linux@xxxxxxxxxxxxxxx>, "Catalin Marinas" <catalin.marinas@xxxxxxx>, "Will Deacon" <will@xxxxxxxxxx>, guoren <guoren@xxxxxxxxxx>, "Brian Cain" <bcain@xxxxxxxxxxx>, "Huacai Chen" <chenhuacai@xxxxxxxxxx>, "WANG Xuerui" <kernel@xxxxxxxxxx>, "Thomas Bogendoerfer" <tsbogend@xxxxxxxxxxxxxxxx>, "Dinh Nguyen" <dinguyen@xxxxxxxxxx>, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>, "Nicholas Piggin" <npiggin@xxxxxxxxx>, "Christophe Leroy" <christophe.leroy@xxxxxxxxxx>, "Paul Walmsley" <paul.walmsley@xxxxxxxxxx>, "Palmer Dabbelt" <palmer@xxxxxxxxxxx>, "Albert Ou" <aou@xxxxxxxxxxxxxxxxx>, "Yoshinori Sato" <ysato@xxxxxxxxxxxxx>, "Rich Felker" <dalias@xxxxxxxx>, "John Paul Adrian Glaubitz" <glaubitz@xxxxxxxxxxxxxxxxxxx>, "David S . Miller" <davem@xxxxxxxxxxxxx>, "Thomas Gleixner" <tglx@xxxxxxxxxxxxx>, "Ingo Molnar" <mingo@xxxxxxxxxx>, "Borislav Petkov" <bp@xxxxxxxxx>, "Dave Hansen" <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, "Chris Zankel" <chris@xxxxxxxxxx>, "Max Filippov" <jcmvbkbc@xxxxxxxxx>, "Kees Cook" <keescook@xxxxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, "Peter Zijlstra" <peterz@xxxxxxxxxxxxx>, "Frederic Weisbecker" <frederic@xxxxxxxxxx>, "Andrew Morton" <akpm@xxxxxxxxxxxxxxxxxxxx>, "Ard Biesheuvel" <ardb@xxxxxxxxxx>, "Sami Tolvanen" <samitolvanen@xxxxxxxxxx>, "Juerg Haefliger" <juerg.haefliger@xxxxxxxxxxxxx>, "Geert Uytterhoeven" <geert@xxxxxxxxxxxxxx>, "Anshuman Khandual" <anshuman.khandual@xxxxxxx>, "Niklas Schnelle" <schnelle@xxxxxxxxxxxxx>, "Russell King" <rmk+kernel@xxxxxxxxxxxxxxx>, "Linus Walleij" <linus.walleij@xxxxxxxxxx>, "Sebastian Reichel" <sebastian.reichel@xxxxxxxxxxxxx>, "Mike Rapoport" <rppt@xxxxxxxxxx>, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, "Zi Yan" <ziy@xxxxxxxxxx>
- Feedback-id: i56a14606:Fastmail
- In-reply-to: <20230629121952.10559-7-tzimmermann@suse.de>
- References: <20230629121952.10559-1-tzimmermann@suse.de> <20230629121952.10559-7-tzimmermann@suse.de>
- User-agent: Cyrus-JMAP/3.9.0-alpha0-499-gf27bbf33e2-fm-20230619.001-gf27bbf33
On Thu, Jun 29, 2023, at 13:45, Thomas Zimmermann wrote:
> diff --git a/include/asm-generic/screen_info.h
> b/include/asm-generic/screen_info.h
> new file mode 100644
> index 0000000000000..6fd0e50fabfcd
> --- /dev/null
> +++ b/include/asm-generic/screen_info.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef _ASM_GENERIC_SCREEN_INFO_H
> +#define _ASM_GENERIC_SCREEN_INFO_H
> +
> +#include <uapi/linux/screen_info.h>
> +
> +#if defined(CONFIG_ARCH_HAS_SCREEN_INFO)
> +extern struct screen_info screen_info;
> +#endif
> +
> +#endif /* _ASM_GENERIC_SCREEN_INFO_H */
> diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
> index eab7081392d50..c764b9a51c24b 100644
> --- a/include/linux/screen_info.h
> +++ b/include/linux/screen_info.h
> @@ -4,6 +4,6 @@
>
> #include <uapi/linux/screen_info.h>
>
> -extern struct screen_info screen_info;
> +#include <asm/screen_info.h>
>
What is the purpose of adding a file in asm-generic? If all
architectures use the same generic file, I'd just leave the
declaration in include/linux/. I wouldn't bother adding the
#ifdef either, but I can see how that helps turn a link
error into an earlier compile error.
Arnd
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]