Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173382
b: refs/heads/master
c: 8386aeb
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Oct 10, 2009
1 parent 9ff1afa commit 2af5a19
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 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: b336f124b1cca55c28b2c5df0e02aa5ace5be7d4
refs/heads/master: 8386aebb9e15a94137693ea4f4df84207f71cc75
8 changes: 1 addition & 7 deletions trunk/arch/sh/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,10 @@ struct pmb_entry {
};

/* arch/sh/mm/pmb.c */
int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
unsigned long flags, int *entry);
int set_pmb_entry(struct pmb_entry *pmbe);
void clear_pmb_entry(struct pmb_entry *pmbe);
struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
unsigned long flags);
void pmb_free(struct pmb_entry *pmbe);
long pmb_remap(unsigned long virt, unsigned long phys,
unsigned long size, unsigned long flags);
void pmb_unmap(unsigned long addr);
int pmb_init(void);
#endif /* __ASSEMBLY__ */

#endif /* __MMU_H */
4 changes: 4 additions & 0 deletions trunk/arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ void __init setup_arch(char **cmdline_p)

paging_init();

#ifdef CONFIG_PMB
pmb_init();
#endif

#ifdef CONFIG_SMP
plat_smp_setup();
#endif
Expand Down
17 changes: 8 additions & 9 deletions trunk/arch/sh/mm/pmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ static int pmb_alloc_entry(void)
return pos;
}

struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
unsigned long flags)
static struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
unsigned long flags)
{
struct pmb_entry *pmbe;
int pos;
Expand All @@ -141,7 +141,7 @@ struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
return pmbe;
}

void pmb_free(struct pmb_entry *pmbe)
static void pmb_free(struct pmb_entry *pmbe)
{
spin_lock_irq(&pmb_list_lock);
pmb_list_del(pmbe);
Expand All @@ -153,8 +153,8 @@ void pmb_free(struct pmb_entry *pmbe)
/*
* Must be in P2 for __set_pmb_entry()
*/
void __set_pmb_entry(unsigned long vpn, unsigned long ppn,
unsigned long flags, int pos)
static void __set_pmb_entry(unsigned long vpn, unsigned long ppn,
unsigned long flags, int pos)
{
ctrl_outl(vpn | PMB_V, mk_pmb_addr(pos));

Expand All @@ -171,14 +171,14 @@ void __set_pmb_entry(unsigned long vpn, unsigned long ppn,
ctrl_outl(ppn | flags | PMB_V, mk_pmb_data(pos));
}

void __uses_jump_to_uncached set_pmb_entry(struct pmb_entry *pmbe)
static void __uses_jump_to_uncached set_pmb_entry(struct pmb_entry *pmbe)
{
jump_to_uncached();
__set_pmb_entry(pmbe->vpn, pmbe->ppn, pmbe->flags, pmbe->entry);
back_to_cached();
}

void __uses_jump_to_uncached clear_pmb_entry(struct pmb_entry *pmbe)
static void __uses_jump_to_uncached clear_pmb_entry(struct pmb_entry *pmbe)
{
unsigned int entry = pmbe->entry;
unsigned long addr;
Expand Down Expand Up @@ -327,7 +327,7 @@ static void pmb_cache_ctor(void *pmb)
memset(pmb, 0, sizeof(struct pmb_entry));
}

static int __uses_jump_to_uncached pmb_init(void)
int __uses_jump_to_uncached pmb_init(void)
{
unsigned int nr_entries = ARRAY_SIZE(pmb_init_map);
unsigned int entry, i;
Expand Down Expand Up @@ -364,7 +364,6 @@ static int __uses_jump_to_uncached pmb_init(void)

return 0;
}
arch_initcall(pmb_init);

static int pmb_seq_show(struct seq_file *file, void *iter)
{
Expand Down

0 comments on commit 2af5a19

Please sign in to comment.