All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Sander Eikelenboom <linux@eikelenboom.it>,
	David Vrabel <david.vrabel@citrix.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	Lv Zheng <lv.zheng@intel.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	xen-devel@lists.xenproject.org
Subject: [Bugfix 3/3] xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi
Date: Tue, 20 Jan 2015 10:21:07 +0800	[thread overview]
Message-ID: <1421720467-7709-4-git-send-email-jiang.liu@linux.intel.com> (raw)
In-Reply-To: <1421720467-7709-1-git-send-email-jiang.liu@linux.intel.com>

Xen overrides __acpi_register_gsi and leaves __acpi_unregister_gsi as is.
That means, an IRQ allocated by acpi_register_gsi_xen_hvm() or
acpi_register_gsi_xen() will be freed by acpi_unregister_gsi_ioapic(),
which may cause undesired effects. So override __acpi_unregister_gsi to
NULL for safety.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
---
 arch/x86/include/asm/acpi.h |    1 +
 arch/x86/pci/xen.c          |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 0ab4f9fd2687..3a45668f6dc3 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -50,6 +50,7 @@ void acpi_pic_sci_set_trigger(unsigned int, u16);
 
 extern int (*__acpi_register_gsi)(struct device *dev, u32 gsi,
 				  int trigger, int polarity);
+extern void (*__acpi_unregister_gsi)(u32 gsi);
 
 static inline void disable_acpi(void)
 {
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 6e5e89c3c644..9098d880c476 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -458,6 +458,7 @@ int __init pci_xen_hvm_init(void)
 	 * just how GSIs get registered.
 	 */
 	__acpi_register_gsi = acpi_register_gsi_xen_hvm;
+	__acpi_unregister_gsi = NULL;
 #endif
 
 #ifdef CONFIG_PCI_MSI
@@ -482,6 +483,7 @@ int __init pci_xen_initial_domain(void)
 	pci_msi_ignore_mask = 1;
 #endif
 	__acpi_register_gsi = acpi_register_gsi_xen;
+	__acpi_unregister_gsi = NULL;
 	/* Pre-allocate legacy irqs */
 	for (irq = 0; irq < nr_legacy_irqs(); irq++) {
 		int trigger, polarity;
-- 
1.7.10.4


  parent reply	other threads:[~2015-01-20  2:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20  2:21 [Bugfix 0/3] Xen IRQ related hotfixes for v3.19 Jiang Liu
2015-01-20  2:21 ` [Bugfix 1/3] xen/pci: Kill function xen_setup_acpi_sci() Jiang Liu
2015-01-20  9:54   ` David Vrabel
2015-01-20  9:54     ` David Vrabel
2015-01-20  9:54   ` David Vrabel
2015-01-20 10:49   ` [tip:x86/urgent] x86/xen: Treat SCI interrupt as normal GSI interrupt tip-bot for Jiang Liu
2015-01-20  2:21 ` [Bugfix 1/3] xen/pci: Kill function xen_setup_acpi_sci() Jiang Liu
2015-01-20  2:21 ` [Bugfix 2/3] xen/irq, ACPI: Fix regression in xen PCI passthrough caused by cffe0a2b5a34 Jiang Liu
2015-01-20 10:49   ` [tip:x86/urgent] ACPI: pci: Do not clear pci_dev-> irq in acpi_pci_irq_disable() tip-bot for Jiang Liu
2015-01-20  2:21 ` [Bugfix 3/3] xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi Jiang Liu
2015-01-20  2:21 ` Jiang Liu [this message]
2015-01-20  9:56   ` David Vrabel
2015-01-20  9:56   ` David Vrabel
2015-01-20 10:50   ` [tip:x86/urgent] x86/xen: " tip-bot for Jiang Liu
2015-02-05 20:07 ` [Bugfix 0/3] Xen IRQ related hotfixes for v3.19 Sander Eikelenboom
2015-02-09  9:47   ` Stefan Bader
2015-02-09 12:12     ` Jiang Liu
2015-02-09 12:29       ` Stefan Bader
2015-02-09 16:09         ` Stefan Bader
2015-02-09 16:55           ` Sander Eikelenboom
2015-02-09 19:15           ` Sander Eikelenboom
2015-02-10 13:31             ` Stefan Bader
2015-02-09 12:17     ` Sander Eikelenboom

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=1421720467-7709-4-git-send-email-jiang.liu@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=david.vrabel@citrix.com \
    --cc=graeme.gregory@linaro.org \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=lv.zheng@intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.