aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-02-01 22:29:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-02-01 22:29:33 -0500
commit215e871aaa3d94540121a3809d80d0c5e5686e4f (patch)
tree0ed6469c5ad04db8cfa0edb58c676d5155df20cd /drivers/pci/dmar.c
parentb6cf160c4b788a31f6a4017a469b956ca77febf4 (diff)
parentfd7d1ced29e5beb88c9068801da7a362606d8273 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (64 commits) PCI: make pci_bus a struct device PCI: fix codingstyle issues in include/linux/pci.h PCI: fix codingstyle issues in drivers/pci/pci.h PCI: PCIE ASPM support PCI: Fix fakephp deadlock PCI: modify SB700 SATA MSI quirk PCI: Run ACPI _OSC method on root bridges only PCI ACPI: AER driver should only register PCIe devices with _OSC PCI ACPI: Added a function to register _OSC with only PCIe devices. PCI: constify function pointer tables PCI: Convert drivers/pci/proc.c to use unlocked_ioctl pciehp: block new requests from the device before power off pciehp: workaround against Bad DLLP during power off pciehp: wait for 1000ms before LED operation after power off PCI: Remove pci_enable_device_bars() from documentation PCI: Remove pci_enable_device_bars() PCI: Remove users of pci_enable_device_bars() PCI: Add pci_enable_device_{io,mem} intefaces PCI: avoid save the same type of cap multiple times PCI: correctly initialize a structure for pcie_save_pcix_state() ...
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r--drivers/pci/dmar.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 5dfdfdac92e1..91b2dc956be5 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -25,6 +25,7 @@
25 25
26#include <linux/pci.h> 26#include <linux/pci.h>
27#include <linux/dmar.h> 27#include <linux/dmar.h>
28#include "iova.h"
28 29
29#undef PREFIX 30#undef PREFIX
30#define PREFIX "DMAR:" 31#define PREFIX "DMAR:"
@@ -263,8 +264,8 @@ parse_dmar_table(void)
263 if (!dmar) 264 if (!dmar)
264 return -ENODEV; 265 return -ENODEV;
265 266
266 if (!dmar->width) { 267 if (dmar->width < PAGE_SHIFT_4K - 1) {
267 printk (KERN_WARNING PREFIX "Zero: Invalid DMAR haw\n"); 268 printk(KERN_WARNING PREFIX "Invalid DMAR haw\n");
268 return -EINVAL; 269 return -EINVAL;
269 } 270 }
270 271
@@ -301,11 +302,24 @@ parse_dmar_table(void)
301int __init dmar_table_init(void) 302int __init dmar_table_init(void)
302{ 303{
303 304
304 parse_dmar_table(); 305 int ret;
306
307 ret = parse_dmar_table();
308 if (ret) {
309 printk(KERN_INFO PREFIX "parse DMAR table failure.\n");
310 return ret;
311 }
312
305 if (list_empty(&dmar_drhd_units)) { 313 if (list_empty(&dmar_drhd_units)) {
306 printk(KERN_INFO PREFIX "No DMAR devices found\n"); 314 printk(KERN_INFO PREFIX "No DMAR devices found\n");
307 return -ENODEV; 315 return -ENODEV;
308 } 316 }
317
318 if (list_empty(&dmar_rmrr_units)) {
319 printk(KERN_INFO PREFIX "No RMRR found\n");
320 return -ENODEV;
321 }
322
309 return 0; 323 return 0;
310} 324}
311 325