sh: PMB locking overhaul.
This implements some locking for the PMB code. A high level rwlock is added for dealing with rw accesses on the entry map while a per-entry data structure spinlock is added to deal with the PMB entry changing out from underneath us. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -53,24 +53,6 @@ typedef struct {
|
||||
#endif
|
||||
} mm_context_t;
|
||||
|
||||
struct pmb_entry;
|
||||
|
||||
struct pmb_entry {
|
||||
unsigned long vpn;
|
||||
unsigned long ppn;
|
||||
unsigned long flags;
|
||||
unsigned long size;
|
||||
|
||||
/*
|
||||
* 0 .. NR_PMB_ENTRIES for specific entry selection, or
|
||||
* PMB_NO_ENTRY to search for a free one
|
||||
*/
|
||||
int entry;
|
||||
|
||||
/* Adjacent entry link for contiguous multi-entry mappings */
|
||||
struct pmb_entry *link;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PMB
|
||||
/* arch/sh/mm/pmb.c */
|
||||
long pmb_remap(unsigned long virt, unsigned long phys,
|
||||
|
Reference in New Issue
Block a user