Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4803047ooa; Tue, 14 Aug 2018 10:45:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwAh1U57o9OEQ0KpbF2czi1F9sQYD2PZT9X71CvC0E+naDgH6TBmieLt257C5gxcJ826E2B X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr24031366pfi.58.1534268750193; Tue, 14 Aug 2018 10:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534268750; cv=none; d=google.com; s=arc-20160816; b=ksnkXSBy9HLJMPgSdoyYIxfiaOg2f3i40RPrzKrOpNqW+3K21hAGReldrZs6kmFs0K fQ2hxpC1epq3OCzHv1I+8OioY1W20+cGCS3TXZ6TixKO0Q6DLeA/VMzTrybWxVKZjhWc Ygap2c2wqqQ0I50qgEErhwxSvgZP/1vaoaQ4/+gSSnDbqjfG52Xn0Iv40ATh5/RuJs+3 Yi00p2lZmWv5+MjNOMV37TWoDdZtk/0pSY5AvgmiCyyHF6Ps3df6rlP/7M/9DYFNZgqy OO5K86XdSnPrRTKrc1jKP0sRzVPew96aM1V8OH/rnNw806vH6g1dpjapyEHYekiLX7eK zuIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NOZ5OLLnSLQ+UUZQeNhI4SKGQ+w3SlDt7y2CpTJE8uo=; b=YHyWeqY7vvqwTozm2VZ5fvKZyIXEcjaWRUuHlSJDaPauKWFKQNzr9WorVDg4oxhNtG sv4wcOvgn0r+M5uSksZAkucdsQbdXh448/DljCwro3raaMUDFm8S7ICD0urj8V9NBLZ4 9f1SKIc02nK9K1LFoUN1SYAA0/Fc+WEHNyQSCp3VKBPeChRF62BPzgLOfpfkQY3RmUoo kX/qDMeQ2qhwrLd2sj47nkzKSQT5xiMNqZEl6Po3/5Isyx0daxnBIZG82qlsyOlLADJr DwByvguv9UoOUvW2fb2/PJMf3xqgCpFDeCvND17tI905x0BvX8mcBEeaJRFrBX2so6Tn kzqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si16718653pla.84.2018.08.14.10.45.35; Tue, 14 Aug 2018 10:45:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390719AbeHNUcZ (ORCPT + 99 others); Tue, 14 Aug 2018 16:32:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59974 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728642AbeHNUcY (ORCPT ); Tue, 14 Aug 2018 16:32:24 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E0642C7B; Tue, 14 Aug 2018 17:44:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolai Stange , Thomas Gleixner , David Woodhouse Subject: [PATCH 4.9 088/107] x86: Dont include linux/irq.h from asm/hardirq.h Date: Tue, 14 Aug 2018 19:17:51 +0200 Message-Id: <20180814171526.200092621@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814171520.883143803@linuxfoundation.org> References: <20180814171520.883143803@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicolai Stange commit 447ae316670230d7d29430e2cbf1f5db4f49d14c 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 Signed-off-by: Thomas Gleixner [dwmw2: More fixes for EFI and Xen in 4.9] Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/dmi.h | 2 +- arch/x86/include/asm/hardirq.h | 1 - arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kernel/apic/apic.c | 2 ++ arch/x86/kernel/apic/htirq.c | 2 ++ arch/x86/kernel/apic/io_apic.c | 1 + arch/x86/kernel/apic/msi.c | 1 + arch/x86/kernel/apic/vector.c | 1 + arch/x86/kernel/fpu/core.c | 1 + arch/x86/kernel/ftrace.c | 1 + arch/x86/kernel/hpet.c | 1 + arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/irq.c | 1 + arch/x86/kernel/irq_32.c | 1 + arch/x86/kernel/irq_64.c | 1 + arch/x86/kernel/irqinit.c | 1 + arch/x86/kernel/kprobes/core.c | 1 + arch/x86/kernel/kprobes/opt.c | 1 + arch/x86/kernel/smpboot.c | 1 + arch/x86/kernel/time.c | 1 + arch/x86/mm/fault.c | 1 + arch/x86/mm/kaiser.c | 1 + arch/x86/platform/efi/efi_64.c | 1 + arch/x86/platform/efi/quirks.c | 1 + arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 1 + arch/x86/xen/enlighten.c | 1 + arch/x86/xen/setup.c | 1 + drivers/pci/host/pci-hyperv.c | 2 ++ 28 files changed, 30 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/dmi.h +++ b/arch/x86/include/asm/dmi.h @@ -3,8 +3,8 @@ #include #include +#include -#include #include static __always_inline __init void *dmi_alloc(unsigned len) --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -2,7 +2,6 @@ #define _ASM_X86_HARDIRQ_H #include -#include typedef struct { u16 __softirq_pending; --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -55,6 +56,7 @@ #include #include #include +#include unsigned int num_processors; --- a/arch/x86/kernel/apic/htirq.c +++ b/arch/x86/kernel/apic/htirq.c @@ -16,6 +16,8 @@ #include #include #include +#include + #include #include #include --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c @@ -26,6 +26,7 @@ #include #include +#include #include #include --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -61,6 +61,7 @@ #include #include #include +#include #include "common.h" --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "common.h" --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -76,6 +76,7 @@ #include #include #include +#include /* Number of siblings per CPU package */ int smp_num_siblings = 1; --- a/arch/x86/kernel/time.c +++ b/arch/x86/kernel/time.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -23,6 +23,7 @@ #include /* emulate_vsyscall */ #include /* struct vm86 */ #include /* vma_pkey() */ +#include #define CREATE_TRACE_POINTS #include --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -20,6 +20,7 @@ #include #include #include +#include int kaiser_enabled __read_mostly = 1; EXPORT_SYMBOL(kaiser_enabled); /* for inlined TLB flush functions */ --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -45,6 +45,7 @@ #include #include #include +#include /* * We allocate runtime services regions bottom-up, starting from -4G, i.e. --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -13,6 +13,7 @@ #include #include #include +#include #define EFI_MIN_RESERVE 5120 --- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c +++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #define TANGIER_EXT_TIMER0_MSI 12 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -35,6 +35,7 @@ #include #include +#include #include #include --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -52,6 +52,8 @@ #include #include #include +#include + #include #include #include