Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270180
b: refs/heads/master
c: 1b9f95f
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Sep 26, 2011
1 parent 8167616 commit 80a1845
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 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: 67f462b29310814a8de29d35b422a9ed41d5f39a
refs/heads/master: 1b9f95f8ade9efc2bd49f0e7b9dc61a038ac3eef
11 changes: 11 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ config ARM_PATCH_PHYS_VIRT
this feature (eg, building a kernel for a single machine) and
you need to shrink the kernel to the minimal size.

config NO_MACH_MEMORY_H
bool
help
Select this when mach/memory.h is removed.

config PHYS_OFFSET
hex "Physical address of main memory"
depends on !ARM_PATCH_PHYS_VIRT && NO_MACH_MEMORY_H
help
Please provide the physical address corresponding to the
location of main memory in your system.

source "init/Kconfig"

Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/arm/include/asm/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#include <linux/compiler.h>
#include <linux/const.h>
#include <linux/types.h>
#include <mach/memory.h>
#include <asm/sizes.h>

#ifndef CONFIG_NO_MACH_MEMORY_H
#include <mach/memory.h>
#endif

/*
* Allow for constants defined here to be used from assembly code
* by prepending the UL suffix only with actual C code compilation.
Expand Down Expand Up @@ -184,7 +187,11 @@ static inline unsigned long __phys_to_virt(unsigned long x)
#endif

#ifndef PHYS_OFFSET
#ifdef PLAT_PHYS_OFFSET
#define PHYS_OFFSET PLAT_PHYS_OFFSET
#else
#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
#endif
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ENTRY(stext)
sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET)
add r8, r8, r4 @ PHYS_OFFSET
#else
ldr r8, =PLAT_PHYS_OFFSET
ldr r8, =PHYS_OFFSET @ always constant in this case
#endif

/*
Expand Down

0 comments on commit 80a1845

Please sign in to comment.