Commit 9b766010 authored by Russell King's avatar Russell King

[ARM] Reliably update SIZEOF_MACHINE_DESC

Generate SIZEOF_MACHINE_DESC using asm-offsets method rather than
relying on people updating the definition in asm/mach/arch.h
parent 1ad2588c
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/mach/arch.h>
/* /*
* Make sure that the compiler and target are compatible. * Make sure that the compiler and target are compatible.
...@@ -59,5 +60,7 @@ int main(void) ...@@ -59,5 +60,7 @@ int main(void)
DEFINE(PAGE_SZ, PAGE_SIZE); DEFINE(PAGE_SZ, PAGE_SIZE);
BLANK(); BLANK();
DEFINE(SYS_ERROR0, 0x9f0000); DEFINE(SYS_ERROR0, 0x9f0000);
BLANK();
DEFINE(SIZEOF_MACHINE_DESC, sizeof(struct machine_desc));
return 0; return 0;
} }
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/mach/arch.h>
/* /*
* We place the page tables 16K below TEXTADDR. Therefore, we must make sure * We place the page tables 16K below TEXTADDR. Therefore, we must make sure
......
...@@ -8,12 +8,6 @@ ...@@ -8,12 +8,6 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
/*
* The size of struct machine_desc
* (for assembler code)
*/
#define SIZEOF_MACHINE_DESC 52
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct tag; struct tag;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment