Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42041
b: refs/heads/master
c: 09252e7
h: refs/heads/master
i:
  42039: 826e122
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Dec 4, 2006
1 parent 4763529 commit 299faa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: 1681cedaee9f8dcb59d499a9277bc3a190a2378d
refs/heads/master: 09252e77ed13b1b412329825bad5797fbdd5a5c8
22 changes: 11 additions & 11 deletions trunk/arch/s390/mm/extmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct dcss_segment {
int segcnt;
};

static DEFINE_SPINLOCK(dcss_lock);
static DEFINE_MUTEX(dcss_lock);
static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list);
static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
"EW/EN-MIXED" };
Expand Down Expand Up @@ -114,7 +114,7 @@ segment_by_name (char *name)
struct list_head *l;
struct dcss_segment *tmp, *retval = NULL;

assert_spin_locked(&dcss_lock);
BUG_ON(!mutex_is_locked(&dcss_lock));
dcss_mkname (name, dcss_name);
list_for_each (l, &dcss_list) {
tmp = list_entry (l, struct dcss_segment, list);
Expand Down Expand Up @@ -269,7 +269,7 @@ segment_overlaps_others (struct dcss_segment *seg)
struct list_head *l;
struct dcss_segment *tmp;

assert_spin_locked(&dcss_lock);
BUG_ON(!mutex_is_locked(&dcss_lock));
list_for_each(l, &dcss_list) {
tmp = list_entry(l, struct dcss_segment, list);
if ((tmp->start_addr >> 20) > (seg->end >> 20))
Expand Down Expand Up @@ -426,7 +426,7 @@ segment_load (char *name, int do_nonshared, unsigned long *addr,
if (!MACHINE_IS_VM)
return -ENOSYS;

spin_lock (&dcss_lock);
mutex_lock(&dcss_lock);
seg = segment_by_name (name);
if (seg == NULL)
rc = __segment_load (name, do_nonshared, addr, end);
Expand All @@ -441,7 +441,7 @@ segment_load (char *name, int do_nonshared, unsigned long *addr,
rc = -EPERM;
}
}
spin_unlock (&dcss_lock);
mutex_unlock(&dcss_lock);
return rc;
}

Expand All @@ -464,7 +464,7 @@ segment_modify_shared (char *name, int do_nonshared)
unsigned long dummy;
int dcss_command, rc, diag_cc;

spin_lock (&dcss_lock);
mutex_lock(&dcss_lock);
seg = segment_by_name (name);
if (seg == NULL) {
rc = -EINVAL;
Expand Down Expand Up @@ -505,7 +505,7 @@ segment_modify_shared (char *name, int do_nonshared)
&dummy, &dummy);
kfree(seg);
out_unlock:
spin_unlock(&dcss_lock);
mutex_unlock(&dcss_lock);
return rc;
}

Expand All @@ -523,7 +523,7 @@ segment_unload(char *name)
if (!MACHINE_IS_VM)
return;

spin_lock(&dcss_lock);
mutex_lock(&dcss_lock);
seg = segment_by_name (name);
if (seg == NULL) {
PRINT_ERR ("could not find segment %s in segment_unload, "
Expand All @@ -537,7 +537,7 @@ segment_unload(char *name)
kfree(seg);
}
out_unlock:
spin_unlock(&dcss_lock);
mutex_unlock(&dcss_lock);
}

/*
Expand All @@ -556,7 +556,7 @@ segment_save(char *name)
if (!MACHINE_IS_VM)
return;

spin_lock(&dcss_lock);
mutex_lock(&dcss_lock);
seg = segment_by_name (name);

if (seg == NULL) {
Expand Down Expand Up @@ -589,7 +589,7 @@ segment_save(char *name)
goto out;
}
out:
spin_unlock(&dcss_lock);
mutex_unlock(&dcss_lock);
}

EXPORT_SYMBOL(segment_load);
Expand Down

0 comments on commit 299faa1

Please sign in to comment.