Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96458
b: refs/heads/master
c: a7dfa94
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Linus Torvalds committed May 13, 2008
1 parent dc65b0b commit 76cdce3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 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: 6d0742426c9adc7465ef5c62a99a1d3e9696ea19
refs/heads/master: a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682
14 changes: 7 additions & 7 deletions trunk/arch/um/include/as-layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
*/

#ifdef __ASSEMBLY__
#define _AC(X, Y) (Y)
#define _UML_AC(X, Y) (Y)
#else
#define __AC(X, Y) (X (Y))
#define _AC(X, Y) __AC(X, Y)
#define __UML_AC(X, Y) (X(Y))
#define _UML_AC(X, Y) __UML_AC(X, Y)
#endif

#define STUB_START _AC(, 0x100000)
#define STUB_CODE _AC((unsigned long), STUB_START)
#define STUB_DATA _AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE)
#define STUB_END _AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE)
#define STUB_START _UML_AC(, 0x100000)
#define STUB_CODE _UML_AC((unsigned long), STUB_START)
#define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE)
#define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE)

#ifndef __ASSEMBLY__

Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/um/kernel/dyn.lds.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <asm-generic/vmlinux.lds.h>
#include <asm/page.h>

OUTPUT_FORMAT(ELF_FORMAT)
OUTPUT_ARCH(ELF_ARCH)
Expand All @@ -21,7 +22,7 @@ SECTIONS
_einittext = .;
}

. = ALIGN(4096);
. = ALIGN(PAGE_SIZE);

/* Read-only sections, merged into text segment: */
.hash : { *(.hash) }
Expand Down Expand Up @@ -68,9 +69,9 @@ SECTIONS
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)

. = ALIGN(4096);
. = ALIGN(PAGE_SIZE);
} =0x90909090
. = ALIGN(4096);
. = ALIGN(PAGE_SIZE);
.syscall_stub : {
__syscall_stub_start = .;
*(.__syscall_stub*)
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/um/kernel/uml.lds.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <asm-generic/vmlinux.lds.h>
#include <asm/page.h>

OUTPUT_FORMAT(ELF_FORMAT)
OUTPUT_ARCH(ELF_ARCH)
Expand Down Expand Up @@ -26,7 +27,7 @@ SECTIONS
INIT_TEXT
_einittext = .;
}
. = ALIGN(4096);
. = ALIGN(PAGE_SIZE);

.text :
{
Expand All @@ -39,7 +40,7 @@ SECTIONS
*(.gnu.linkonce.t*)
}

. = ALIGN(4096);
. = ALIGN(PAGE_SIZE);
.syscall_stub : {
__syscall_stub_start = .;
*(.__syscall_stub*)
Expand Down Expand Up @@ -79,7 +80,7 @@ SECTIONS
.sdata : { *(.sdata) }
_edata = .;
PROVIDE (edata = .);
. = ALIGN(0x1000);
. = ALIGN(PAGE_SIZE);
.sbss :
{
__bss_start = .;
Expand Down
17 changes: 11 additions & 6 deletions trunk/include/asm-um/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
#ifndef __UM_PAGE_H
#define __UM_PAGE_H

struct page;

#include <linux/types.h>
#include <asm/vm-flags.h>
#include <linux/const.h>

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))

#ifndef __ASSEMBLY__

struct page;

#include <linux/types.h>
#include <asm/vm-flags.h>

/*
* These are used to make use of C type-checking..
*/
Expand Down Expand Up @@ -120,4 +124,5 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif
#endif /* __ASSEMBLY__ */
#endif /* __UM_PAGE_H */

0 comments on commit 76cdce3

Please sign in to comment.