Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9211
b: refs/heads/master
c: 4881e2c
h: refs/heads/master
i:
  9209: 3c8bafe
  9207: 97842b0
v: v3
  • Loading branch information
Hidetoshi Seto authored and Tony Luck committed Sep 22, 2005
1 parent 1c1c71f commit 28145d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 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: 20bb86852a6b7d9ca8c48ff921ff3904038959cf
refs/heads/master: 4881e2cd25d2d9cf9fca263caff3a0ce732d7d6b
21 changes: 15 additions & 6 deletions trunk/arch/ia64/kernel/mca_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ static struct page *page_isolate[MAX_PAGE_ISOLATE];
static int num_page_isolate = 0;

typedef enum {
ISOLATE_NG = 0,
ISOLATE_OK = 1
ISOLATE_NG,
ISOLATE_OK,
ISOLATE_NONE
} isolate_status_t;

/*
Expand All @@ -74,7 +75,7 @@ static struct {
* @paddr: poisoned memory location
*
* Return value:
* ISOLATE_OK / ISOLATE_NG
* one of isolate_status_t, ISOLATE_OK/NG/NONE.
*/

static isolate_status_t
Expand All @@ -85,7 +86,10 @@ mca_page_isolate(unsigned long paddr)

/* whether physical address is valid or not */
if (!ia64_phys_addr_valid(paddr))
return ISOLATE_NG;
return ISOLATE_NONE;

if (!pfn_valid(paddr))
return ISOLATE_NONE;

/* convert physical address to physical page number */
p = pfn_to_page(paddr>>PAGE_SHIFT);
Expand Down Expand Up @@ -122,10 +126,15 @@ mca_handler_bh(unsigned long paddr)
current->pid, current->comm);

spin_lock(&mca_bh_lock);
if (mca_page_isolate(paddr) == ISOLATE_OK) {
switch (mca_page_isolate(paddr)) {
case ISOLATE_OK:
printk(KERN_DEBUG "Page isolation: ( %lx ) success.\n", paddr);
} else {
break;
case ISOLATE_NG:
printk(KERN_DEBUG "Page isolation: ( %lx ) failure.\n", paddr);
break;
default:
break;
}
spin_unlock(&mca_bh_lock);

Expand Down

0 comments on commit 28145d3

Please sign in to comment.