mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Andi Kleen <ak@suse.de>, len.brown@intel.com
Cc: Linus Torvalds <torvalds@osdl.org>,
	jeff@garzik.org, linux-kernel@vger.kernel.org, tiwai@suse.de
Subject: [PATCH] ACPI: use MSI_NOT_SUPPORTED bit
Date: Wed, 15 Nov 2006 10:35:25 -0800	[thread overview]
Message-ID: <20061115103525.19e9d3eb.randy.dunlap@oracle.com> (raw)
In-Reply-To: <p73ejs5co0q.fsf@bingen.suse.de>

On 15 Nov 2006 05:49:41 +0100 Andi Kleen wrote:

> BTW there seems to be a new ACPI FADT bit that says "MSI is broken"
> We should probably check that too as a double check.

Do you mean more than just use that bit when you say "double check"?

I wonder why this hasn't already been done. (?)

How's this look?  Build-tested only.

---
From: Randy Dunlap <randy.dunlap@oracle.com>

Implement use of FADT boot_flags.MSI_NOT_SUPPORTED bit to prevent
assigning MSIs.
Force MSI_NOT_SUPPORTED for ACPI 1.0 tables.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/acpi/bus.c             |    6 ++++++
 drivers/acpi/tables/tbconvrt.c |    3 ++-
 include/acpi/actbl.h           |    4 +++-
 include/linux/pci.h            |    2 ++
 4 files changed, 13 insertions(+), 2 deletions(-)

--- linux-2619-rc5.orig/include/acpi/actbl.h
+++ linux-2619-rc5/include/acpi/actbl.h
@@ -290,7 +290,7 @@ struct fadt_descriptor_rev1 {
 	ACPI_FADT_COMMON u32 flags;
 };
 
-/* FADT: Prefered Power Management Profiles */
+/* FADT: Preferred Power Management Profiles */
 
 #define PM_UNSPECIFIED                  0
 #define PM_DESKTOP                      1
@@ -304,6 +304,8 @@ struct fadt_descriptor_rev1 {
 
 #define BAF_LEGACY_DEVICES              0x0001
 #define BAF_8042_KEYBOARD_CONTROLLER    0x0002
+#define BAF_VGA_NOT_PRESENT		0x0004
+#define BAF_MSI_NOT_SUPPORTED		0x0008
 
 #define FADT2_REVISION_ID               3
 #define FADT2_MINUS_REVISION_ID         2
--- linux-2619-rc5.orig/drivers/acpi/tables/tbconvrt.c
+++ linux-2619-rc5/drivers/acpi/tables/tbconvrt.c
@@ -289,7 +289,8 @@ acpi_tb_convert_fadt1(struct fadt_descri
 		 * Since there isn't any equivalence in 1.0 and since it is highly
 		 * likely that a 1.0 system has legacy support.
 		 */
-		local_fadt->iapc_boot_arch = BAF_LEGACY_DEVICES;
+		local_fadt->iapc_boot_arch = BAF_LEGACY_DEVICES |
+						BAF_MSI_NOT_SUPPORTED;
 	}
 
 	/*
--- linux-2619-rc5.orig/include/linux/pci.h
+++ linux-2619-rc5/include/linux/pci.h
@@ -610,6 +610,7 @@ static inline int pci_enable_msix(struct
 	struct msix_entry *entries, int nvec) {return -1;}
 static inline void pci_disable_msix(struct pci_dev *dev) {}
 static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
+static inline void pci_no_msi(void) {}
 #else
 extern void pci_scan_msi_device(struct pci_dev *dev);
 extern int pci_enable_msi(struct pci_dev *dev);
@@ -618,6 +619,7 @@ extern int pci_enable_msix(struct pci_de
 	struct msix_entry *entries, int nvec);
 extern void pci_disable_msix(struct pci_dev *dev);
 extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
+extern void pci_no_msi(void);
 #endif
 
 #ifdef CONFIG_HT_IRQ
--- linux-2619-rc5.orig/drivers/acpi/bus.c
+++ linux-2619-rc5/drivers/acpi/bus.c
@@ -28,6 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/sched.h>
+#include <linux/pci.h>
 #include <linux/pm.h>
 #include <linux/pm_legacy.h>
 #include <linux/device.h>
@@ -637,6 +638,11 @@ void __init acpi_early_init(void)
 	}
 #endif
 
+	if (acpi_fadt.iapc_boot_arch & BAF_MSI_NOT_SUPPORTED) {
+		printk(KERN_DEBUG PREFIX "MSI not supported, disabling it\n");
+		pci_no_msi();
+	}
+
 	status =
 	    acpi_enable_subsystem(~
 				  (ACPI_NO_HARDWARE_INIT |

  parent reply	other threads:[~2006-11-15 18:40 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200611150059.kAF0xBTl009796@hera.kernel.org>
2006-11-15  1:34 ` [PATCH] ALSA: hda-intel - Disable MSI support by default Jeff Garzik
2006-11-15  1:55   ` Linus Torvalds
2006-11-15  2:40     ` Jeff Garzik
2006-11-15  2:49       ` Linus Torvalds
2006-11-15  3:00         ` David Miller
2006-11-15  3:10           ` Linus Torvalds
2006-11-15  3:21             ` David Miller
2006-11-15  3:54               ` Linus Torvalds
2006-11-15  4:11                 ` Jeff Garzik
2006-11-15  4:15                   ` David Miller
2006-11-15  4:24                     ` Jeff Garzik
2006-11-15  4:28                       ` David Miller
2006-11-16  2:25                         ` Benjamin Herrenschmidt
2006-11-16  2:28                           ` Benjamin Herrenschmidt
2006-11-16  3:25                           ` Jeff Garzik
2006-11-16  4:12                             ` Benjamin Herrenschmidt
2006-11-16  6:13                               ` Jeff Garzik
2006-11-16 14:41                                 ` Krzysztof Halasa
2006-11-16 15:27                                   ` Jeff Garzik
2006-11-16 17:24                                     ` Roland Dreier
2006-11-15 19:09                       ` Stephen Hemminger
2006-11-15 19:23                         ` Jeff Garzik
2006-11-15 19:49                           ` Stephen Hemminger
2006-11-15 22:31                             ` Roland Dreier
2006-11-16  2:24                     ` Benjamin Herrenschmidt
2006-11-15  4:30                   ` Roland Dreier
2006-11-15  4:56                     ` Jeff Garzik
2006-11-15 15:53                     ` Linus Torvalds
2006-11-15 18:30                       ` Jeff Garzik
2006-11-15 18:45                       ` Roland Dreier
2006-11-16  2:29                     ` Benjamin Herrenschmidt
2006-11-15 13:34                   ` Krzysztof Halasa
2006-11-15 18:42                     ` Jeff Garzik
2006-11-15 19:04                       ` Linus Torvalds
2006-11-15 19:20                         ` Jeff Garzik
2006-11-15 19:35                           ` Linus Torvalds
2006-11-15 19:59                             ` Mws
2006-11-15 20:14                               ` Linus Torvalds
2006-11-15 20:53                                 ` Olivier Nicolas
2006-11-16  6:08                                   ` Yinghai Lu
2006-11-16 23:25                                     ` Olivier Nicolas
2006-11-15 21:10                                 ` Mws
2006-11-16 11:10                                   ` Mws
2006-11-15  4:14                 ` Roland Dreier
2006-11-15  4:49                 ` Andi Kleen
2006-11-15  4:57                   ` Roland Dreier
2006-11-15  5:11                     ` Andi Kleen
2006-11-15 22:43                       ` Roland Dreier
2006-11-15 18:35                   ` Randy Dunlap [this message]
2006-11-15 18:44                     ` [PATCH] ACPI: use MSI_NOT_SUPPORTED bit Andi Kleen
2006-11-15 19:41                       ` [PATCH v2] " Randy Dunlap
2006-11-15 19:58                         ` [PATCH v3] " Randy Dunlap
2006-11-15 20:19                     ` [PATCH] " Len Brown
2006-11-16  2:22                 ` [PATCH] ALSA: hda-intel - Disable MSI support by default Benjamin Herrenschmidt
2006-11-15 10:31               ` Takashi Iwai
2006-11-15 16:19                 ` Linus Torvalds
2006-11-15 16:24                   ` Arjan van de Ven
2006-11-15 16:36                     ` Linus Torvalds
2006-11-15 18:40                       ` Jeff Garzik
2006-11-15 18:51                         ` Linus Torvalds
2006-11-15 19:01                           ` Arjan van de Ven
2006-11-15 19:34                       ` Stephen Clark
2006-11-15 19:48                         ` Jeff Garzik
2006-11-15 20:01                           ` Stephen Clark
2006-11-15 18:32                 ` Jeff Garzik
2006-11-15 18:32                   ` Jeff Garzik
2006-11-15 18:58                   ` Takashi Iwai
2006-11-15 19:15                     ` Jeff Garzik
2006-11-16 10:44                       ` Takashi Iwai
2006-11-16 23:01                         ` Olivier Nicolas
2006-11-17 10:55                           ` Takashi Iwai
2006-11-17 16:17                             ` Yinghai Lu
2006-11-17 16:35                               ` Linus Torvalds
2006-11-15 19:20                 ` Stephen Hemminger
2006-11-15 22:35                   ` Roland Dreier
2006-11-15  4:01           ` Benjamin Herrenschmidt
2006-11-15  4:07             ` David Miller
2006-11-15  7:23               ` Benjamin Herrenschmidt
2006-11-15 10:06                 ` Segher Boessenkool
2006-11-15  4:23             ` Roland Dreier
2006-11-15  7:24               ` Benjamin Herrenschmidt
2006-11-15  4:04         ` Benjamin Herrenschmidt
2006-11-15  4:14           ` Jeff Garzik
2006-11-15  4:24           ` Roland Dreier
2006-11-15  2:58       ` Randy Dunlap
2006-11-15  3:10       ` D. Hazelton
2006-11-15  3:30         ` Jeff Garzik
2006-11-15  3:53           ` D. Hazelton
2006-11-15 11:40             ` Alan
2006-11-16  4:06               ` D. Hazelton

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=20061115103525.19e9d3eb.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=ak@suse.de \
    --cc=jeff@garzik.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=torvalds@osdl.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

Powered by JetHome