Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181104
b: refs/heads/master
c: d9b9487
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jan 18, 2010
1 parent 15a9caf commit 0db7bcf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 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: 0c54de146ef4303ed3c5879b043894c8db637507
refs/heads/master: d9b9487af79955a8e8fcddc963f56697e020cfed
3 changes: 3 additions & 0 deletions trunk/arch/sh/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ struct seq_operations;

extern struct pt_regs fake_swapper_regs;

/* arch/sh/mm/init.c */
extern unsigned int mem_init_done;

/* arch/sh/kernel/setup.c */
const char *get_cpu_subtype(struct sh_cpuinfo *c);
extern const struct seq_operations cpuinfo_op;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/sh/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ static void __init iommu_init(void)
no_iommu_init();
}

unsigned int mem_init_done = 0;

void __init mem_init(void)
{
int codesize, datasize, initsize;
Expand Down Expand Up @@ -287,6 +289,8 @@ void __init mem_init(void)

/* Initialize the vDSO */
vsyscall_init();

mem_init_done = 1;
}

void free_initmem(void)
Expand Down
12 changes: 9 additions & 3 deletions trunk/arch/sh/mm/ioremap_32.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* arch/sh/mm/ioremap.c
*
* (C) Copyright 1995 1996 Linus Torvalds
* (C) Copyright 2005 - 2010 Paul Mundt
*
* Re-map IO memory to kernel address space so that we can access it.
* This is needed for high PCI addresses that aren't mapped in the
* 640k-1MB IO memory area on PC's
*
* (C) Copyright 1995 1996 Linus Torvalds
* (C) Copyright 2005, 2006 Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of this
* archive for more details.
Expand Down Expand Up @@ -64,6 +64,12 @@ void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size,
phys_addr &= PAGE_MASK;
size = PAGE_ALIGN(last_addr+1) - phys_addr;

/*
* If we can't yet use the regular approach, go the fixmap route.
*/
if (!mem_init_done)
return ioremap_fixed(phys_addr, size, __pgprot(flags));

/*
* Ok, go for it..
*/
Expand Down

0 comments on commit 0db7bcf

Please sign in to comment.