Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181101
b: refs/heads/master
c: 78bf04f
h: refs/heads/master
i:
  181099: f237d51
v: v3
  • Loading branch information
Paul Mundt committed Jan 16, 2010
1 parent 20fb68e commit 2a53a11
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 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: 597fe76ec36e782aa45b8dac5e12e4dbb0588967
refs/heads/master: 78bf04fc96f509474c6b443b515d6b79bb7bf584
28 changes: 24 additions & 4 deletions trunk/arch/sh/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,35 @@ void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size,
}
EXPORT_SYMBOL(__ioremap_caller);

/*
* Simple checks for non-translatable mappings.
*/
static inline int iomapping_nontranslatable(unsigned long offset)
{
#ifdef CONFIG_29BIT
/*
* In 29-bit mode this includes the fixed P1/P2 areas, as well as
* parts of P3.
*/
if (PXSEG(offset) < P3SEG || offset >= P3_ADDR_MAX)
return 1;
#endif

if (is_pci_memory_fixed_range(offset, 0))
return 1;

return 0;
}

void __iounmap(void __iomem *addr)
{
unsigned long vaddr = (unsigned long __force)addr;
unsigned long seg = PXSEG(vaddr);
struct vm_struct *p;

if (seg < P3SEG || vaddr >= P3_ADDR_MAX)
return;
if (is_pci_memory_fixed_range(vaddr, 0))
/*
* Nothing to do if there is no translatable mapping.
*/
if (iomapping_nontranslatable(vaddr))
return;

#ifdef CONFIG_PMB
Expand Down

0 comments on commit 2a53a11

Please sign in to comment.