Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223149
b: refs/heads/master
c: 3b38bb5
h: refs/heads/master
i:
  223147: e08730e
v: v3
  • Loading branch information
Huang Ying authored and Len Brown committed Dec 11, 2010
1 parent 530568e commit f19c330
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 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: b72512ed706efb26087fcbbc5f98ed64ac1230d5
refs/heads/master: 3b38bb5f7f06356a89bb2cbf92ad346025e95192
34 changes: 17 additions & 17 deletions trunk/drivers/acpi/apei/erst.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static struct erst_erange {
* It is used to provide exclusive accessing for ERST Error Log
* Address Range too.
*/
static DEFINE_SPINLOCK(erst_lock);
static DEFINE_RAW_SPINLOCK(erst_lock);

static inline int erst_errno(int command_status)
{
Expand Down Expand Up @@ -421,9 +421,9 @@ ssize_t erst_get_record_count(void)
if (erst_disable)
return -ENODEV;

spin_lock_irqsave(&erst_lock, flags);
raw_spin_lock_irqsave(&erst_lock, flags);
count = __erst_get_record_count();
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);

return count;
}
Expand Down Expand Up @@ -456,9 +456,9 @@ int erst_get_next_record_id(u64 *record_id)
if (erst_disable)
return -ENODEV;

spin_lock_irqsave(&erst_lock, flags);
raw_spin_lock_irqsave(&erst_lock, flags);
rc = __erst_get_next_record_id(record_id);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);

return rc;
}
Expand Down Expand Up @@ -624,25 +624,25 @@ int erst_write(const struct cper_record_header *record)
return -EINVAL;

if (erst_erange.attr & ERST_RANGE_NVRAM) {
if (!spin_trylock_irqsave(&erst_lock, flags))
if (!raw_spin_trylock_irqsave(&erst_lock, flags))
return -EBUSY;
rc = __erst_write_to_nvram(record);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);
return rc;
}

if (record->record_length > erst_erange.size)
return -EINVAL;

if (!spin_trylock_irqsave(&erst_lock, flags))
if (!raw_spin_trylock_irqsave(&erst_lock, flags))
return -EBUSY;
memcpy(erst_erange.vaddr, record, record->record_length);
rcd_erange = erst_erange.vaddr;
/* signature for serialization system */
memcpy(&rcd_erange->persistence_information, "ER", 2);

rc = __erst_write_to_storage(0);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);

return rc;
}
Expand Down Expand Up @@ -696,9 +696,9 @@ ssize_t erst_read(u64 record_id, struct cper_record_header *record,
if (erst_disable)
return -ENODEV;

spin_lock_irqsave(&erst_lock, flags);
raw_spin_lock_irqsave(&erst_lock, flags);
len = __erst_read(record_id, record, buflen);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);
return len;
}
EXPORT_SYMBOL_GPL(erst_read);
Expand All @@ -719,20 +719,20 @@ ssize_t erst_read_next(struct cper_record_header *record, size_t buflen)
if (erst_disable)
return -ENODEV;

spin_lock_irqsave(&erst_lock, flags);
raw_spin_lock_irqsave(&erst_lock, flags);
rc = __erst_get_next_record_id(&record_id);
if (rc) {
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);
return rc;
}
/* no more record */
if (record_id == APEI_ERST_INVALID_RECORD_ID) {
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);
return 0;
}

len = __erst_read(record_id, record, buflen);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);

return len;
}
Expand All @@ -746,12 +746,12 @@ int erst_clear(u64 record_id)
if (erst_disable)
return -ENODEV;

spin_lock_irqsave(&erst_lock, flags);
raw_spin_lock_irqsave(&erst_lock, flags);
if (erst_erange.attr & ERST_RANGE_NVRAM)
rc = __erst_clear_from_nvram(record_id);
else
rc = __erst_clear_from_storage(record_id);
spin_unlock_irqrestore(&erst_lock, flags);
raw_spin_unlock_irqrestore(&erst_lock, flags);

return rc;
}
Expand Down

0 comments on commit f19c330

Please sign in to comment.