From: tip-bot for Jiang Liu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: bhe@redhat.com, joro@8bytes.org, fenghua.yu@intel.com,
bhelgaas@google.com, grant.likely@linaro.org,
aubrey.li@linux.intel.com, bp@alien8.de,
lambert.quentin@gmail.com, rdunlap@infradead.org,
tglx@linutronix.de, vgoyal@redhat.com, jiang.liu@linux.intel.com,
mingo@kernel.org, christian.gmeiner@gmail.com,
rafael.j.wysocki@intel.com, hpa@linux.intel.com,
yinghai@kernel.org, matt.fleming@intel.com, tony.luck@intel.com,
gregkh@linuxfoundation.org, hpa@zytor.com,
konrad.wilk@oracle.com, benh@kernel.crashing.org,
rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
prarit@redhat.com, ryan@desfo.org
Subject: [tip:x86/apic] x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h
Date: Fri, 19 Dec 2014 06:09:39 -0800 [thread overview]
Message-ID: <tip-8643e28da27d6d50f772409b8dc80bdab52239fb@git.kernel.org> (raw)
In-Reply-To: <1414397531-28254-14-git-send-email-jiang.liu@linux.intel.com>
Commit-ID: 8643e28da27d6d50f772409b8dc80bdab52239fb
Gitweb: http://git.kernel.org/tip/8643e28da27d6d50f772409b8dc80bdab52239fb
Author: Jiang Liu <jiang.liu@linux.intel.com>
AuthorDate: Mon, 27 Oct 2014 16:12:04 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 16 Dec 2014 14:08:17 +0100
x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h
Clean up code by moving IOAPIC related declarations from hw_irq.h into
io_apic.h.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Aubrey <aubrey.li@linux.intel.com>
Cc: Ryan Desfosses <ryan@desfo.org>
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: http://lkml.kernel.org/r/1414397531-28254-14-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/include/asm/hw_irq.h | 33 ---------------------------------
arch/x86/include/asm/io_apic.h | 20 +++++++++++++++++++-
arch/x86/kernel/apic/io_apic.c | 10 ++++++++++
arch/x86/kernel/crash.c | 1 +
arch/x86/kernel/machine_kexec_32.c | 1 +
arch/x86/kernel/machine_kexec_64.c | 1 +
arch/x86/kernel/reboot.c | 1 +
drivers/pci/hotplug/ibmphp_core.c | 1 +
8 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index a723577..9662290 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -159,39 +159,6 @@ static inline void lock_vector_lock(void) {}
static inline void unlock_vector_lock(void) {}
#endif /* CONFIG_X86_LOCAL_APIC */
-/* IOAPIC */
-#ifdef CONFIG_X86_IO_APIC
-struct io_apic_irq_attr {
- int ioapic;
- int ioapic_pin;
- int trigger;
- int polarity;
-};
-
-static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr,
- int ioapic, int ioapic_pin,
- int trigger, int polarity)
-{
- irq_attr->ioapic = ioapic;
- irq_attr->ioapic_pin = ioapic_pin;
- irq_attr->trigger = trigger;
- irq_attr->polarity = polarity;
-}
-
-extern void setup_IO_APIC(void);
-extern void enable_IO_APIC(void);
-extern void disable_IO_APIC(void);
-extern void setup_ioapic_dest(void);
-extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin);
-extern void print_IO_APICs(void);
-
-extern unsigned long io_apic_irqs;
-#define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs))
-#else /* CONFIG_X86_IO_APIC */
-#define IO_APIC_IRQ(x) 0
-static inline void print_IO_APICs(void) {}
-#endif /* CONFIG_X86_IO_APIC */
-
/* Statistics */
extern atomic_t irq_err_count;
extern atomic_t irq_mis_count;
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index bdd45c2..b7f1499 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -132,6 +132,10 @@ extern int noioapicquirk;
/* -1 if "noapic" boot option passed */
extern int noioapicreroute;
+extern unsigned long io_apic_irqs;
+
+#define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1 << (x)) & io_apic_irqs))
+
/*
* If we use the IO-APIC for IRQ routing, disable automatic
* assignment of PCI IRQ's.
@@ -139,7 +143,6 @@ extern int noioapicreroute;
#define io_apic_assign_pci_irqs \
(mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
-struct io_apic_irq_attr;
struct irq_cfg;
extern void ioapic_insert_resources(void);
@@ -157,6 +160,13 @@ extern int restore_ioapic_entries(void);
extern void setup_ioapic_ids_from_mpc(void);
extern void setup_ioapic_ids_from_mpc_nocheck(void);
+struct io_apic_irq_attr {
+ int ioapic;
+ int ioapic_pin;
+ int trigger;
+ int polarity;
+};
+
enum ioapic_domain_type {
IOAPIC_DOMAIN_INVALID,
IOAPIC_DOMAIN_LEGACY,
@@ -226,11 +236,19 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned
extern void io_apic_eoi(unsigned int apic, unsigned int vector);
+extern void setup_IO_APIC(void);
+extern void enable_IO_APIC(void);
+extern void disable_IO_APIC(void);
+extern void setup_ioapic_dest(void);
+extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin);
+extern void print_IO_APICs(void);
#else /* !CONFIG_X86_IO_APIC */
+#define IO_APIC_IRQ(x) 0
#define io_apic_assign_pci_irqs 0
#define setup_ioapic_ids_from_mpc x86_init_noop
static inline void ioapic_insert_resources(void) { }
+static inline void print_IO_APICs(void) {}
#define gsi_top (NR_IRQS_LEGACY)
static inline int mp_find_ioapic(u32 gsi) { return 0; }
static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; }
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index b1acb68..8dcdb7b 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3023,6 +3023,16 @@ int mp_ioapic_registered(u32 gsi_base)
return 0;
}
+static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr,
+ int ioapic, int ioapic_pin,
+ int trigger, int polarity)
+{
+ irq_attr->ioapic = ioapic;
+ irq_attr->ioapic_pin = ioapic_pin;
+ irq_attr->trigger = trigger;
+ irq_attr->polarity = polarity;
+}
+
int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq,
irq_hw_number_t hwirq)
{
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index f5ab56d..aceb2f9 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -28,6 +28,7 @@
#include <asm/nmi.h>
#include <asm/hw_irq.h>
#include <asm/apic.h>
+#include <asm/io_apic.h>
#include <asm/hpet.h>
#include <linux/kdebug.h>
#include <asm/cpu.h>
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
index 72e8e31..469b23d 100644
--- a/arch/x86/kernel/machine_kexec_32.c
+++ b/arch/x86/kernel/machine_kexec_32.c
@@ -20,6 +20,7 @@
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
#include <asm/apic.h>
+#include <asm/io_apic.h>
#include <asm/cpufeature.h>
#include <asm/desc.h>
#include <asm/cacheflush.h>
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 4859810..415480d 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -22,6 +22,7 @@
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
+#include <asm/io_apic.h>
#include <asm/debugreg.h>
#include <asm/kexec-bzimage64.h>
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 17962e6..bae6c60 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -12,6 +12,7 @@
#include <acpi/reboot.h>
#include <asm/io.h>
#include <asm/apic.h>
+#include <asm/io_apic.h>
#include <asm/desc.h>
#include <asm/hpet.h>
#include <asm/pgtable.h>
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index d261e62..96c5c72 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -36,6 +36,7 @@
#include <linux/wait.h>
#include "../pci.h"
#include <asm/pci_x86.h> /* for struct irq_routing_table */
+#include <asm/io_apic.h>
#include "ibmphp.h"
#define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
next prev parent reply other threads:[~2014-12-19 14:11 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 8:11 [Patch Part1 v3 00/20] Prepare for enabling hierarchy irqdomain on x86 Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 01/20] ACPI, irq, x86: Get rid of special handling of GSI for ACPI SCI Jiang Liu
2014-11-05 16:34 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:12 ` tip-bot for Jiang Liu
2014-12-19 14:05 ` [tip:x86/apic] x86, irq, acpi: " tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 02/20] x86, irq, ACPI: Fix building warning of unused code Jiang Liu
2014-11-05 16:34 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:13 ` tip-bot for Jiang Liu
2014-12-19 14:01 ` tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 03/20] x86, irq: Kill fourth parameter of IO_APIC_get_PCI_irq_vector() Jiang Liu
2014-11-05 16:35 ` [tip:x86/apic] x86, irq: Kill useless parameter 'irq_attr' " tip-bot for Jiang Liu
2014-11-05 17:13 ` tip-bot for Jiang Liu
2014-12-19 14:06 ` tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 04/20] x86, irq: Convert irq_2_pin list to generic list Jiang Liu
2014-11-05 16:35 ` [tip:x86/apic] " tip-bot for Yinghai Lu
2014-11-05 17:13 ` tip-bot for Yinghai Lu
2014-12-19 14:06 ` tip-bot for Yinghai Lu
2014-10-27 8:11 ` [Patch Part1 v3 05/20] x86, irq: Refine hw_irq.h to prepare for irqdomain support Jiang Liu
2014-11-05 16:35 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:13 ` tip-bot for Jiang Liu
2014-12-19 14:06 ` tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 06/20] x86, irq: Rename local APIC related functions in io_apic.c as apic_xxx() Jiang Liu
2014-11-05 16:36 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:14 ` tip-bot for Jiang Liu
2014-12-19 14:07 ` tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 07/20] x86, irq: Protect __clear_irq_vector() with vector_lock Jiang Liu
2014-11-05 16:36 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:14 ` tip-bot for Jiang Liu
2014-12-19 14:07 ` tip-bot for Jiang Liu
2014-10-27 8:11 ` [Patch Part1 v3 08/20] x86, irq: Introduce helpers to access struct irq_cfg Jiang Liu
2014-11-05 16:36 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:14 ` tip-bot for Jiang Liu
2014-12-19 14:07 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 09/20] x86, irq: Move local APIC related code from io_apic.c into vector.c Jiang Liu
2014-11-05 16:37 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:14 ` tip-bot for Jiang Liu
2014-12-19 14:08 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 10/20] x86, irq: Replace printk(KERN_LVL) with pr_lvl() utilities Jiang Liu
2014-11-05 16:37 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 16:47 ` Joe Perches
2014-11-05 17:15 ` tip-bot for Jiang Liu
2014-12-19 14:08 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 11/20] x86, irq: Move PCI MSI related code from io_apic.c into msi.c Jiang Liu
2014-11-05 16:38 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:15 ` tip-bot for Jiang Liu
2014-12-19 14:08 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 12/20] x86, irq: Move HT IRQ related code from io_apic.c into htirq.c Jiang Liu
2014-11-05 16:38 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:16 ` tip-bot for Jiang Liu
2014-12-19 14:09 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 13/20] x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h Jiang Liu
2014-11-05 16:38 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:16 ` tip-bot for Jiang Liu
2014-12-19 14:09 ` tip-bot for Jiang Liu [this message]
2014-10-27 8:12 ` [Patch Part1 v3 14/20] x86, irq: Move IRQ initialization routines from io_apic.c into vector.c Jiang Liu
2014-11-05 16:38 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:16 ` tip-bot for Jiang Liu
2014-12-19 14:09 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 15/20] x86, irq: Make MSI and HT_IRQ indepenent of X86_IO_APIC Jiang Liu
2014-11-05 16:39 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:16 ` tip-bot for Jiang Liu
2014-12-19 14:10 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 16/20] x86, irq: Use helpers to access irq_cfg data structure associated with IRQ Jiang Liu
2014-11-05 16:39 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:17 ` tip-bot for Jiang Liu
2014-12-19 14:10 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 17/20] x86: irq_remapping: " Jiang Liu
2014-11-05 16:39 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:17 ` tip-bot for Jiang Liu
2014-12-19 14:10 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 18/20] iommu/vt-d: " Jiang Liu
2014-11-05 16:39 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:17 ` tip-bot for Jiang Liu
2014-12-19 14:11 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 19/20] iommu/amd: " Jiang Liu
2014-11-05 16:40 ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-05 17:17 ` tip-bot for Jiang Liu
2014-12-19 14:11 ` tip-bot for Jiang Liu
2014-10-27 8:12 ` [Patch Part1 v3 20/20] x86, irq: Fix link error of undefined reference to send_cleanup_vector Jiang Liu
2014-11-05 16:34 ` [tip:x86/apic] x86, irq: Provide empty send_cleanup_vector() stub for UP builds tip-bot for Jiang Liu
2014-11-05 17:12 ` tip-bot for Jiang Liu
2014-12-19 14:00 ` tip-bot for Jiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-8643e28da27d6d50f772409b8dc80bdab52239fb@git.kernel.org \
--to=tipbot@zytor.com \
--cc=aubrey.li@linux.intel.com \
--cc=benh@kernel.crashing.org \
--cc=bhe@redhat.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=christian.gmeiner@gmail.com \
--cc=fenghua.yu@intel.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jiang.liu@linux.intel.com \
--cc=joro@8bytes.org \
--cc=konrad.wilk@oracle.com \
--cc=lambert.quentin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@kernel.org \
--cc=prarit@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rdunlap@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=ryan@desfo.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vgoyal@redhat.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox