2023-06-13 23:48:18

by Thomas Gleixner

[permalink] [raw]
Subject: [patch 11/17] init: Remove check_bugs() leftovers

Everything is converted over to arch_cpu_finalize_init(). Remove the
check_bugs() leftovers including the empty stubs in asm-generic, alpha,
parisc, powerpc and xtensa.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Chris Zankel <[email protected]>
---
arch/alpha/include/asm/bugs.h | 20 --------------------
arch/parisc/include/asm/bugs.h | 20 --------------------
arch/powerpc/include/asm/bugs.h | 15 ---------------
arch/xtensa/include/asm/bugs.h | 18 ------------------
include/asm-generic/bugs.h | 11 -----------
init/main.c | 5 -----
6 files changed, 89 deletions(-)

--- a/arch/alpha/include/asm/bugs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * include/asm-alpha/bugs.h
- *
- * Copyright (C) 1994 Linus Torvalds
- */
-
-/*
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Needs:
- * void check_bugs(void);
- */
-
-/*
- * I don't know of any alpha bugs yet.. Nice chip
- */
-
-static void check_bugs(void)
-{
-}
--- a/arch/parisc/include/asm/bugs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * include/asm-parisc/bugs.h
- *
- * Copyright (C) 1999 Mike Shaver
- */
-
-/*
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Needs:
- * void check_bugs(void);
- */
-
-#include <asm/processor.h>
-
-static inline void check_bugs(void)
-{
-// identify_cpu(&boot_cpu_data);
-}
--- a/arch/powerpc/include/asm/bugs.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef _ASM_POWERPC_BUGS_H
-#define _ASM_POWERPC_BUGS_H
-
-/*
- */
-
-/*
- * This file is included by 'init/main.c' to check for
- * architecture-dependent bugs.
- */
-
-static inline void check_bugs(void) { }
-
-#endif /* _ASM_POWERPC_BUGS_H */
--- a/arch/xtensa/include/asm/bugs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-xtensa/bugs.h
- *
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Xtensa processors don't have any bugs. :)
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-#ifndef _XTENSA_BUGS_H
-#define _XTENSA_BUGS_H
-
-static void check_bugs(void) { }
-
-#endif /* _XTENSA_BUGS_H */
--- a/include/asm-generic/bugs.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_GENERIC_BUGS_H
-#define __ASM_GENERIC_BUGS_H
-/*
- * This file is included by 'init/main.c' to check for
- * architecture-dependent bugs.
- */
-
-static inline void check_bugs(void) { }
-
-#endif /* __ASM_GENERIC_BUGS_H */
--- a/init/main.c
+++ b/init/main.c
@@ -103,7 +103,6 @@
#include <net/net_namespace.h>

#include <asm/io.h>
-#include <asm/bugs.h>
#include <asm/setup.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
@@ -1079,10 +1078,6 @@ asmlinkage __visible void __init __no_sa
delayacct_init();

arch_cpu_finalize_init();
- /* Temporary conditional until everything has been converted */
-#ifndef CONFIG_ARCH_HAS_CPU_FINALIZE_INIT
- check_bugs();
-#endif

acpi_subsystem_init();
arch_post_acpi_subsys_init();



2023-06-14 06:24:42

by Richard Henderson

[permalink] [raw]
Subject: Re: [patch 11/17] init: Remove check_bugs() leftovers

On 6/14/23 01:39, Thomas Gleixner wrote:
> Everything is converted over to arch_cpu_finalize_init(). Remove the
> check_bugs() leftovers including the empty stubs in asm-generic, alpha,
> parisc, powerpc and xtensa.
>
> Signed-off-by: Thomas Gleixner<[email protected]>
> Cc: Richard Henderson<[email protected]>
> Cc: "James E.J. Bottomley"<[email protected]>
> Cc: Michael Ellerman<[email protected]>
> Cc: Chris Zankel<[email protected]>
> ---
> arch/alpha/include/asm/bugs.h | 20 --------------------
> arch/parisc/include/asm/bugs.h | 20 --------------------
> arch/powerpc/include/asm/bugs.h | 15 ---------------
> arch/xtensa/include/asm/bugs.h | 18 ------------------
> include/asm-generic/bugs.h | 11 -----------
> init/main.c | 5 -----
> 6 files changed, 89 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>


r~

2023-06-16 09:42:17

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: x86/boot] init: Remove check_bugs() leftovers

The following commit has been merged into the x86/boot branch of tip:

Commit-ID: 61235b24b9cb37c13fcad5b9596d59a1afdcec30
Gitweb: https://git.kernel.org/tip/61235b24b9cb37c13fcad5b9596d59a1afdcec30
Author: Thomas Gleixner <[email protected]>
AuthorDate: Wed, 14 Jun 2023 01:39:38 +02:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Fri, 16 Jun 2023 10:16:00 +02:00

init: Remove check_bugs() leftovers

Everything is converted over to arch_cpu_finalize_init(). Remove the
check_bugs() leftovers including the empty stubs in asm-generic, alpha,
parisc, powerpc and xtensa.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
arch/alpha/include/asm/bugs.h | 20 --------------------
arch/parisc/include/asm/bugs.h | 20 --------------------
arch/powerpc/include/asm/bugs.h | 15 ---------------
arch/xtensa/include/asm/bugs.h | 18 ------------------
include/asm-generic/bugs.h | 11 -----------
init/main.c | 5 -----
6 files changed, 89 deletions(-)
delete mode 100644 arch/alpha/include/asm/bugs.h
delete mode 100644 arch/parisc/include/asm/bugs.h
delete mode 100644 arch/powerpc/include/asm/bugs.h
delete mode 100644 arch/xtensa/include/asm/bugs.h
delete mode 100644 include/asm-generic/bugs.h

diff --git a/arch/alpha/include/asm/bugs.h b/arch/alpha/include/asm/bugs.h
deleted file mode 100644
index 78030d1..0000000
--- a/arch/alpha/include/asm/bugs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * include/asm-alpha/bugs.h
- *
- * Copyright (C) 1994 Linus Torvalds
- */
-
-/*
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Needs:
- * void check_bugs(void);
- */
-
-/*
- * I don't know of any alpha bugs yet.. Nice chip
- */
-
-static void check_bugs(void)
-{
-}
diff --git a/arch/parisc/include/asm/bugs.h b/arch/parisc/include/asm/bugs.h
deleted file mode 100644
index 0a7f9db..0000000
--- a/arch/parisc/include/asm/bugs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * include/asm-parisc/bugs.h
- *
- * Copyright (C) 1999 Mike Shaver
- */
-
-/*
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Needs:
- * void check_bugs(void);
- */
-
-#include <asm/processor.h>
-
-static inline void check_bugs(void)
-{
-// identify_cpu(&boot_cpu_data);
-}
diff --git a/arch/powerpc/include/asm/bugs.h b/arch/powerpc/include/asm/bugs.h
deleted file mode 100644
index 01b8f6c..0000000
--- a/arch/powerpc/include/asm/bugs.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef _ASM_POWERPC_BUGS_H
-#define _ASM_POWERPC_BUGS_H
-
-/*
- */
-
-/*
- * This file is included by 'init/main.c' to check for
- * architecture-dependent bugs.
- */
-
-static inline void check_bugs(void) { }
-
-#endif /* _ASM_POWERPC_BUGS_H */
diff --git a/arch/xtensa/include/asm/bugs.h b/arch/xtensa/include/asm/bugs.h
deleted file mode 100644
index 69b29d1..0000000
--- a/arch/xtensa/include/asm/bugs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * include/asm-xtensa/bugs.h
- *
- * This is included by init/main.c to check for architecture-dependent bugs.
- *
- * Xtensa processors don't have any bugs. :)
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of
- * this archive for more details.
- */
-
-#ifndef _XTENSA_BUGS_H
-#define _XTENSA_BUGS_H
-
-static void check_bugs(void) { }
-
-#endif /* _XTENSA_BUGS_H */
diff --git a/include/asm-generic/bugs.h b/include/asm-generic/bugs.h
deleted file mode 100644
index 6902183..0000000
--- a/include/asm-generic/bugs.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_GENERIC_BUGS_H
-#define __ASM_GENERIC_BUGS_H
-/*
- * This file is included by 'init/main.c' to check for
- * architecture-dependent bugs.
- */
-
-static inline void check_bugs(void) { }
-
-#endif /* __ASM_GENERIC_BUGS_H */
diff --git a/init/main.c b/init/main.c
index 77d5316..389ac62 100644
--- a/init/main.c
+++ b/init/main.c
@@ -103,7 +103,6 @@
#include <net/net_namespace.h>

#include <asm/io.h>
-#include <asm/bugs.h>
#include <asm/setup.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
@@ -1079,10 +1078,6 @@ asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(v
delayacct_init();

arch_cpu_finalize_init();
- /* Temporary conditional until everything has been converted */
-#ifndef CONFIG_ARCH_HAS_CPU_FINALIZE_INIT
- check_bugs();
-#endif

acpi_subsystem_init();
arch_post_acpi_subsys_init();

2023-06-25 22:17:07

by Philippe Mathieu-Daudé

[permalink] [raw]
Subject: Re: [patch 11/17] init: Remove check_bugs() leftovers

On 14/6/23 01:39, Thomas Gleixner wrote:
> Everything is converted over to arch_cpu_finalize_init(). Remove the
> check_bugs() leftovers including the empty stubs in asm-generic, alpha,
> parisc, powerpc and xtensa.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> Cc: Richard Henderson <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: Michael Ellerman <[email protected]>
> Cc: Chris Zankel <[email protected]>
> ---
> arch/alpha/include/asm/bugs.h | 20 --------------------
> arch/parisc/include/asm/bugs.h | 20 --------------------
> arch/powerpc/include/asm/bugs.h | 15 ---------------
> arch/xtensa/include/asm/bugs.h | 18 ------------------
> include/asm-generic/bugs.h | 11 -----------
> init/main.c | 5 -----
> 6 files changed, 89 deletions(-)

Yay!

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>