Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f09b9979 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King
Browse files

[ARM] 3060/1: allow constants found in asm/memory.h to be used in asm code



Patch from Nicolas Pitre

This patch allows for assorted type of cleanups by letting assembly code
use the same set of defines for constant values and avoid duplicated
definitions that might not always be in sync, or that might simply be
confusing due to the different names for the same thing.

Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c514e58c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@ int main(void)
  DEFINE(VM_EXEC,	       	VM_EXEC);
  BLANK();
  DEFINE(PAGE_SZ,	       	PAGE_SIZE);
  DEFINE(VIRT_OFFSET,		PAGE_OFFSET);
  BLANK();
  DEFINE(SYS_ERROR0,		0x9f0000);
  BLANK();
+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
#include <linux/config.h>

#include <asm/memory.h>
#include <asm/glue.h>
#include <asm/vfpmacros.h>
#include <asm/hardware.h>		/* should be moved into entry-macro.S */
@@ -310,7 +311,7 @@ __pabt_svc:

#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
	@ make sure our user space atomic helper is aborted
	cmp	r2, #VIRT_OFFSET
	cmp	r2, #TASK_SIZE
	bichs	r3, r3, #PSR_Z_BIT
#endif

+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <asm/procinfo.h>
#include <asm/ptrace.h>
#include <asm/asm-offsets.h>
#include <asm/memory.h>
#include <asm/thread_info.h>
#include <asm/system.h>

@@ -76,7 +77,7 @@
	.equ	swapper_pg_dir, DATAADDR - 0x4000

	.macro	pgtbl, rd, phys
	ldr	\rd, =((DATAADDR - 0x4000) - VIRT_OFFSET)
	ldr	\rd, =((DATAADDR - 0x4000) - PAGE_OFFSET)
	add	\rd, \rd, \phys
	.endm
#endif
@@ -324,7 +325,7 @@ __create_page_tables:
	/*
	 * Then map first 1MB of ram in case it contains our boot params.
	 */
	add	r0, r4, #VIRT_OFFSET >> 18
	add	r0, r4, #PAGE_OFFSET >> 18
	orr	r6, r5, r7
	str	r6, [r0]

+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

#include <linux/config.h>

#define PHYS_OFFSET	(0xf0000000UL)
#define PHYS_OFFSET	UL(0xf0000000)

#define __virt_to_bus(x)	__virt_to_phys(x)
#define __bus_to_virt(x)	__phys_to_virt(x)
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
/*
 * Physical DRAM offset.
 */
#define PHYS_OFFSET	(0x10000000UL)
#define PHYS_OFFSET	UL(0x10000000)

/*
 * These are exactly the same on the RiscPC as the
Loading