[PATCH v5 0/6] Unload linux/kernel.h

Yury Norov posted 6 patches 3 weeks, 1 day ago
Documentation/filesystems/sysfs.rst           |   2 +-
arch/s390/include/asm/processor.h             |   1 +
.../drm/i915/gt/selftest_ring_submission.c    |   1 +
drivers/gpu/drm/i915/i915_selftest.h          |   2 +
include/linux/kernel.h                        | 210 +-----------------
include/linux/moduleparam.h                   |   7 +-
include/linux/sysfs.h                         |  13 ++
include/linux/trace_printk.h                  | 204 +++++++++++++++++
include/linux/ww_mutex.h                      |   1 +
kernel/trace/trace.c                          |   7 +-
kernel/trace/trace.h                          |   2 +-
11 files changed, 234 insertions(+), 216 deletions(-)
create mode 100644 include/linux/trace_printk.h
[PATCH v5 0/6] Unload linux/kernel.h
Posted by Yury Norov 3 weeks, 1 day ago
kernel.h hosts declarations that can be placed better. This series
decouples kernel.h with some explicit and implicit dependencies; also,
moves tracing functionality to a new independent header.

For testing, see v4.

v1: https://lore.kernel.org/all/20251129195304.204082-1-yury.norov@gmail.com/
v2: https://lore.kernel.org/all/20251203162329.280182-1-yury.norov@gmail.com/
v3: https://lore.kernel.org/all/20251205175237.242022-1-yury.norov@gmail.com/
v4: https://lore.kernel.org/all/20251225170930.1151781-1-yury.norov@gmail.com/
v5:
 - drop v4#7, i.e. keep trace_printk.h included in kernel.h

Steven Rostedt (1):
  tracing: Remove size parameter in __trace_puts()

Yury Norov (5):
  kernel.h: drop STACK_MAGIC macro
  moduleparam: include required headers explicitly
  kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h
  kernel.h: include linux/instruction_pointer.h explicitly
  tracing: move tracing declarations from kernel.h to a dedicated header

 Documentation/filesystems/sysfs.rst           |   2 +-
 arch/s390/include/asm/processor.h             |   1 +
 .../drm/i915/gt/selftest_ring_submission.c    |   1 +
 drivers/gpu/drm/i915/i915_selftest.h          |   2 +
 include/linux/kernel.h                        | 210 +-----------------
 include/linux/moduleparam.h                   |   7 +-
 include/linux/sysfs.h                         |  13 ++
 include/linux/trace_printk.h                  | 204 +++++++++++++++++
 include/linux/ww_mutex.h                      |   1 +
 kernel/trace/trace.c                          |   7 +-
 kernel/trace/trace.h                          |   2 +-
 11 files changed, 234 insertions(+), 216 deletions(-)
 create mode 100644 include/linux/trace_printk.h

-- 
2.43.0
Re: [PATCH v5 0/6] Unload linux/kernel.h
Posted by Andy Shevchenko 3 weeks, 1 day ago
On Thu, Jan 15, 2026 at 11:25:03PM -0500, Yury Norov wrote:
> kernel.h hosts declarations that can be placed better. This series
> decouples kernel.h with some explicit and implicit dependencies; also,
> moves tracing functionality to a new independent header.

Thanks! Which tree should it go through?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v5 0/6] Unload linux/kernel.h
Posted by Yury Norov 3 weeks ago
On Fri, Jan 16, 2026 at 12:39:02PM +0200, Andy Shevchenko wrote:
> On Thu, Jan 15, 2026 at 11:25:03PM -0500, Yury Norov wrote:
> > kernel.h hosts declarations that can be placed better. This series
> > decouples kernel.h with some explicit and implicit dependencies; also,
> > moves tracing functionality to a new independent header.
> 
> Thanks! Which tree should it go through?

Andrew or Steven maybe? As a last resort, I can move it myself.

Thanks to you and everyone for review!
Re: [PATCH v5 0/6] Unload linux/kernel.h
Posted by Steven Rostedt 2 weeks, 2 days ago
On Fri, 16 Jan 2026 12:06:37 -0500
Yury Norov <ynorov@nvidia.com> wrote:

> > Thanks! Which tree should it go through?  
> 
> Andrew or Steven maybe? As a last resort, I can move it myself.

I think it makes the most sense for Andrew to take it.

Thanks,

-- Steve
Re: [PATCH v5 0/6] Unload linux/kernel.h
Posted by Joel Fernandes 3 weeks ago

On 1/15/2026 11:25 PM, Yury Norov wrote:
> kernel.h hosts declarations that can be placed better. This series
> decouples kernel.h with some explicit and implicit dependencies; also,
> moves tracing functionality to a new independent header.
> 
> For testing, see v4.
> 
> v1: https://lore.kernel.org/all/20251129195304.204082-1-yury.norov@gmail.com/
> v2: https://lore.kernel.org/all/20251203162329.280182-1-yury.norov@gmail.com/
> v3: https://lore.kernel.org/all/20251205175237.242022-1-yury.norov@gmail.com/
> v4: https://lore.kernel.org/all/20251225170930.1151781-1-yury.norov@gmail.com/
> v5:
>  - drop v4#7, i.e. keep trace_printk.h included in kernel.h

Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>

thanks,

 - Joel


> 
> Steven Rostedt (1):
>   tracing: Remove size parameter in __trace_puts()
> 
> Yury Norov (5):
>   kernel.h: drop STACK_MAGIC macro
>   moduleparam: include required headers explicitly
>   kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h
>   kernel.h: include linux/instruction_pointer.h explicitly
>   tracing: move tracing declarations from kernel.h to a dedicated header
> 
>  Documentation/filesystems/sysfs.rst           |   2 +-
>  arch/s390/include/asm/processor.h             |   1 +
>  .../drm/i915/gt/selftest_ring_submission.c    |   1 +
>  drivers/gpu/drm/i915/i915_selftest.h          |   2 +
>  include/linux/kernel.h                        | 210 +-----------------
>  include/linux/moduleparam.h                   |   7 +-
>  include/linux/sysfs.h                         |  13 ++
>  include/linux/trace_printk.h                  | 204 +++++++++++++++++
>  include/linux/ww_mutex.h                      |   1 +
>  kernel/trace/trace.c                          |   7 +-
>  kernel/trace/trace.h                          |   2 +-
>  11 files changed, 234 insertions(+), 216 deletions(-)
>  create mode 100644 include/linux/trace_printk.h
>