Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82316
b: refs/heads/master
c: 093f87d
h: refs/heads/master
v: v3
  • Loading branch information
Fenghua Yu authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent e834e3e commit 115ee1c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 652c538eb5bc3fa04bc5f27db9014f0168aefe97
refs/heads/master: 093f87d279669c74e84530e925e4735c9aae8898
20 changes: 17 additions & 3 deletions trunk/drivers/pci/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <linux/pci.h>
#include <linux/dmar.h>
#include "iova.h"

#undef PREFIX
#define PREFIX "DMAR:"
Expand Down Expand Up @@ -263,8 +264,8 @@ parse_dmar_table(void)
if (!dmar)
return -ENODEV;

if (!dmar->width) {
printk (KERN_WARNING PREFIX "Zero: Invalid DMAR haw\n");
if (dmar->width < PAGE_SHIFT_4K - 1) {
printk(KERN_WARNING PREFIX "Invalid DMAR haw\n");
return -EINVAL;
}

Expand Down Expand Up @@ -301,11 +302,24 @@ parse_dmar_table(void)
int __init dmar_table_init(void)
{

parse_dmar_table();
int ret;

ret = parse_dmar_table();
if (ret) {
printk(KERN_INFO PREFIX "parse DMAR table failure.\n");
return ret;
}

if (list_empty(&dmar_drhd_units)) {
printk(KERN_INFO PREFIX "No DMAR devices found\n");
return -ENODEV;
}

if (list_empty(&dmar_rmrr_units)) {
printk(KERN_INFO PREFIX "No RMRR found\n");
return -ENODEV;
}

return 0;
}

Expand Down

0 comments on commit 115ee1c

Please sign in to comment.