Skip to content

Commit 0cd39f4

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
locking/seqlock, headers: Untangle the spaghetti monster
By using lockdep_assert_*() from seqlock.h, the spaghetti monster attacked. Attack back by reducing seqlock.h dependencies from two key high level headers: - <linux/seqlock.h>: -Remove <linux/ww_mutex.h> - <linux/time.h>: -Remove <linux/seqlock.h> - <linux/sched.h>: +Add <linux/seqlock.h> The price was to add it to sched.h ... Core header fallout, we add direct header dependencies instead of gaining them parasitically from higher level headers: - <linux/dynamic_queue_limits.h>: +Add <asm/bug.h> - <linux/hrtimer.h>: +Add <linux/seqlock.h> - <linux/ktime.h>: +Add <asm/bug.h> - <linux/lockdep.h>: +Add <linux/smp.h> - <linux/sched.h>: +Add <linux/seqlock.h> - <linux/videodev2.h>: +Add <linux/kernel.h> Arch headers fallout: - PARISC: <asm/timex.h>: +Add <asm/special_insns.h> - SH: <asm/io.h>: +Add <asm/page.h> - SPARC: <asm/timer_64.h>: +Add <uapi/asm/asi.h> - SPARC: <asm/vvar.h>: +Add <asm/processor.h>, <asm/barrier.h> -Remove <linux/seqlock.h> - X86: <asm/fixmap.h>: +Add <asm/pgtable_types.h> -Remove <asm/acpi.h> There's also a bunch of parasitic header dependency fallout in .c files, not listed separately. [ mingo: Extended the changelog, split up & fixed the original patch. ] Co-developed-by: Ingo Molnar <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b354519 commit 0cd39f4

File tree

29 files changed

+38
-15
lines changed

29 files changed

+38
-15
lines changed

arch/sh/include/asm/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <asm/cache.h>
1818
#include <asm/addrspace.h>
1919
#include <asm/machvec.h>
20+
#include <asm/page.h>
2021
#include <linux/pgtable.h>
2122
#include <asm-generic/iomap.h>
2223

arch/sh/kernel/machvec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <asm/setup.h>
1616
#include <asm/io.h>
1717
#include <asm/irq.h>
18+
#include <asm/processor.h>
1819

1920
#define MV_NAME_SIZE 32
2021

arch/sparc/include/asm/timer_64.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef _SPARC64_TIMER_H
88
#define _SPARC64_TIMER_H
99

10+
#include <uapi/asm/asi.h>
1011
#include <linux/types.h>
1112
#include <linux/init.h>
1213

arch/sparc/include/asm/vvar.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#define _ASM_SPARC_VVAR_DATA_H
77

88
#include <asm/clocksource.h>
9-
#include <linux/seqlock.h>
9+
#include <asm/processor.h>
10+
#include <asm/barrier.h>
1011
#include <linux/time.h>
1112
#include <linux/types.h>
1213

arch/sparc/kernel/vdso.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* a different vsyscall implementation for Linux/IA32 and for the name.
88
*/
99

10-
#include <linux/seqlock.h>
1110
#include <linux/time.h>
1211
#include <linux/timekeeper_internal.h>
1312

arch/x86/include/asm/fixmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
#ifndef __ASSEMBLY__
2828
#include <linux/kernel.h>
29-
#include <asm/acpi.h>
3029
#include <asm/apicdef.h>
3130
#include <asm/page.h>
31+
#include <asm/pgtable_types.h>
3232
#ifdef CONFIG_X86_32
3333
#include <linux/threads.h>
3434
#include <asm/kmap_types.h>

arch/x86/kernel/apic/apic_noop.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* like self-ipi, etc...
1111
*/
1212
#include <linux/cpumask.h>
13+
#include <linux/thread_info.h>
1314

1415
#include <asm/apic.h>
1516

arch/x86/kernel/apic/hw_nmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Bits copied from original nmi.c file
1010
*
1111
*/
12+
#include <linux/thread_info.h>
1213
#include <asm/apic.h>
1314
#include <asm/nmi.h>
1415

arch/x86/kernel/apic/probe_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
99
* James Cleverdon.
1010
*/
11+
#include <linux/thread_info.h>
1112
#include <asm/apic.h>
1213

1314
#include "local.h"

arch/x86/kernel/cpu/amd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <asm/cpu.h>
1616
#include <asm/spec-ctrl.h>
1717
#include <asm/smp.h>
18+
#include <asm/numa.h>
1819
#include <asm/pci-direct.h>
1920
#include <asm/delay.h>
2021
#include <asm/debugreg.h>

0 commit comments

Comments
 (0)