Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229323
b: refs/heads/master
c: cef0d5a
h: refs/heads/master
i:
  229321: d2cfac7
  229319: 1bfe5b3
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Nov 30, 2010
1 parent a552775 commit 4c4efcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 578914cffc283b907777796420148d582072cbae
refs/heads/master: cef0d5ad62ec6e0c8456b8f58e898aa3219311a5
19 changes: 10 additions & 9 deletions trunk/arch/powerpc/kernel/nvram_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int __init nvram_create_partition(const char *name, int sig,
struct nvram_partition *part;
struct nvram_partition *new_part;
struct nvram_partition *free_part = NULL;
int seq_init[2] = { 0, 0 };
static char nv_init_vals[16];
loff_t tmp_index;
long size = 0;
int rc;
Expand Down Expand Up @@ -379,14 +379,15 @@ static int __init nvram_create_partition(const char *name, int sig,
return rc;
}

/* make sure and initialize to zero the sequence number and the error
type logged */
tmp_index = new_part->index + NVRAM_HEADER_LEN;
rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
if (rc <= 0) {
printk(KERN_ERR "nvram_create_os_partition: nvram_write "
"failed (%d)\n", rc);
return rc;
/* Clear the partition */
for (tmp_index = new_part->index + NVRAM_HEADER_LEN;
tmp_index < ((size - 1) * NVRAM_BLOCK_LEN);
tmp_index += NVRAM_BLOCK_LEN) {
rc = ppc_md.nvram_write(nv_init_vals, NVRAM_BLOCK_LEN, &tmp_index);
if (rc <= 0) {
pr_err("nvram_create_partition: nvram_write failed (%d)\n", rc);
return rc;
}
}

nvram_error_log_index = new_part->index + NVRAM_HEADER_LEN;
Expand Down

0 comments on commit 4c4efcc

Please sign in to comment.