Files
linux/drivers
Nicolai Stange 15ca197c8d x86: Don't include linux/irq.h from asm/hardirq.h
commit 447ae31667 upstream

The next patch in this series will have to make the definition of
irq_cpustat_t available to entering_irq().

Inclusion of asm/hardirq.h into asm/apic.h would cause circular header
dependencies like

  asm/smp.h
    asm/apic.h
      asm/hardirq.h
        linux/irq.h
          linux/topology.h
            linux/smp.h
              asm/smp.h

or

  linux/gfp.h
    linux/mmzone.h
      asm/mmzone.h
        asm/mmzone_64.h
          asm/smp.h
            asm/apic.h
              asm/hardirq.h
                linux/irq.h
                  linux/irqdesc.h
                    linux/kobject.h
                      linux/sysfs.h
                        linux/kernfs.h
                          linux/idr.h
                            linux/gfp.h

and others.

This causes compilation errors because of the header guards becoming
effective in the second inclusion: symbols/macros that had been defined
before wouldn't be available to intermediate headers in the #include chain
anymore.

A possible workaround would be to move the definition of irq_cpustat_t
into its own header and include that from both, asm/hardirq.h and
asm/apic.h.

However, this wouldn't solve the real problem, namely asm/harirq.h
unnecessarily pulling in all the linux/irq.h cruft: nothing in
asm/hardirq.h itself requires it. Also, note that there are some other
archs, like e.g. arm64, which don't have that #include in their
asm/hardirq.h.

Remove the linux/irq.h #include from x86' asm/hardirq.h.

Fix resulting compilation errors by adding appropriate #includes to *.c
files as needed.

Note that some of these *.c files could be cleaned up a bit wrt. to their
set of #includes, but that should better be done from separate patches, if
at all.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[dwmw2: More fixes for EFI and Xen in 4.9]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-12 16:55:20 +09:00
..
2023-05-12 16:27:16 +09:00
2023-05-12 16:42:44 +09:00
2023-05-12 16:28:00 +09:00
2018-07-03 18:27:19 +02:00
2018-05-30 13:19:56 +02:00
2018-06-06 18:34:12 +02:00
2023-05-12 16:46:14 +09:00
2018-05-30 13:19:56 +02:00
2018-02-25 11:05:55 +01:00
2018-06-13 16:37:10 +02:00
2017-09-09 17:39:41 +02:00
2018-05-25 17:06:35 +02:00
2018-07-17 12:36:18 +02:00
2018-03-22 09:54:47 +01:00
2018-06-26 09:32:02 +08:00
2018-04-30 06:05:25 -07:00
2023-05-12 16:37:13 +09:00
2018-07-03 18:27:19 +02:00
2023-05-12 16:19:59 +09:00