Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186490
b: refs/heads/master
c: 4cfa8e7
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Mar 2, 2010
1 parent 44e071b commit a457532
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90e7d649d86f21d478dc134f74c88e19dd472393
refs/heads/master: 4cfa8e75d6854699597e21fd570721d63f899934
17 changes: 17 additions & 0 deletions trunk/arch/sh/mm/pmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static DEFINE_RWLOCK(pmb_rwlock);
static struct pmb_entry pmb_entry_list[NR_PMB_ENTRIES];
static DECLARE_BITMAP(pmb_map, NR_PMB_ENTRIES);

static unsigned int pmb_iomapping_enabled;

static __always_inline unsigned long mk_pmb_entry(unsigned int entry)
{
return (entry & PMB_E_MASK) << PMB_E_SHIFT;
Expand Down Expand Up @@ -284,6 +286,9 @@ void __iomem *pmb_remap_caller(phys_addr_t phys, unsigned long size,
unsigned long aligned;
struct vm_struct *area;

if (!pmb_iomapping_enabled)
return NULL;

/*
* Small mappings need to go through the TLB.
*/
Expand Down Expand Up @@ -684,6 +689,18 @@ static void __init pmb_resize(void)
}
#endif

static int __init early_pmb(char *p)
{
if (!p)
return 0;

if (strstr(p, "iomap"))
pmb_iomapping_enabled = 1;

return 0;
}
early_param("pmb", early_pmb);

void __init pmb_init(void)
{
/* Synchronize software state */
Expand Down

0 comments on commit a457532

Please sign in to comment.