-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port-mm-code #47
Open
jyizheng
wants to merge
35
commits into
libos-nuse:master
Choose a base branch
from
jyizheng:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
port-mm-code #47
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e929a63
Push my initial work for uploading memory manager
c50cd20
add slib_env to use page_alloc.c
f0f45ab
Add headers from arm/include/asm and try to initilize buddy system fr…
ed2c3fe
recover init/main.c
dfe766d
add WANT_PAGE_VIRTUAL to use page->virtual
63b48b1
a working version done
13c94a1
delete prink debug message
abebc87
add a tiny change
05cd7d3
try to make no impact on upstream kernel
fbe7dd3
solve OPT=no compiler crash
883afb4
solve undefined symbol for init_mm
4cbbff4
Merge pull request #1 from libos-nuse/nuse
jyizheng 07bc3b6
Merge pull request #2 from libos-nuse/master
jyizheng 6064bf2
test
jyizheng 305f67b
add build.sh
jyizheng 7a2bd8d
remove test
jyizheng 56bc555
delete build.sh
jyizheng 770464d
merge arch/lib/glue.c
jyizheng 8f1788e
add #endif
jyizheng f583c91
solve some unreferced symbol problem
jyizheng ebcdbff
change barrier.h
jyizheng 16399d4
Merge upstream which solved unresovle symbol "rumpns_end"
jyizheng 93273fd
disable some compile time check for atomic variables
jyizheng 71adfe1
Do cleanup according to Hajime's suggestions.
jyizheng ff865bc
git rid of #if 0 useless code
jyizheng 58602f8
Resolve Hajime'c commemts. Check here:
jyizheng 53d0f17
add cache_is_vivt back to highmem.c again to resolve some warnings
jyizheng 099e19c
resolve merge conflit
jyizheng 396eca8
resolve pull request comments
jyizheng 3573715
1)Change __MR_MAX_ZONES in arch/lib/Makefile
jyizheng 34af0b6
Lib:
jyizheng 7b04e14
disable compile time check
jyizheng a7c9ded
resolve pull request comments
jyizheng a68bf58
add something missing in the last commit
jyizheng fe485cf
Merge remote-tracking branch 'upstream/master'
jyizheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,88 @@ | ||
#include <asm-generic/barrier.h> | ||
#ifndef __ASM_BARRIER_H | ||
#define __ASM_BARRIER_H | ||
|
||
#ifndef __ASSEMBLY__ | ||
#include <asm/outercache.h> | ||
|
||
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
|
||
#if __LINUX_ARM_ARCH__ >= 7 || \ | ||
(__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) | ||
#define sev() __asm__ __volatile__ ("sev" : : : "memory") | ||
#define wfe() __asm__ __volatile__ ("wfe" : : : "memory") | ||
#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") | ||
#endif | ||
|
||
#if __LINUX_ARM_ARCH__ >= 7 | ||
#define isb(option) __asm__ __volatile__ ("isb " #option : : : "memory") | ||
#define dsb(option) __asm__ __volatile__ ("dsb " #option : : : "memory") | ||
#define dmb(option) __asm__ __volatile__ ("dmb " #option : : : "memory") | ||
#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 | ||
#define isb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
: : "r" (0) : "memory") | ||
#define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
: : "r" (0) : "memory") | ||
#define dmb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
: : "r" (0) : "memory") | ||
#elif defined(CONFIG_CPU_FA526) | ||
#define isb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
: : "r" (0) : "memory") | ||
#define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
: : "r" (0) : "memory") | ||
#define dmb(x) __asm__ __volatile__ ("" : : : "memory") | ||
#else | ||
#define isb(x) __asm__ __volatile__ ("" : : : "memory") | ||
#define dsb(x) __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
: : "r" (0) : "memory") | ||
#define dmb(x) __asm__ __volatile__ ("" : : : "memory") | ||
#endif | ||
|
||
#ifdef CONFIG_ARCH_HAS_BARRIERS | ||
#include <mach/barriers.h> | ||
#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) | ||
#define mb() do { dsb(); outer_sync(); } while (0) | ||
#define rmb() dsb() | ||
#define wmb() do { dsb(st); outer_sync(); } while (0) | ||
#define dma_rmb() dmb(osh) | ||
#define dma_wmb() dmb(oshst) | ||
#else | ||
#define mb() barrier() | ||
#define rmb() barrier() | ||
#define wmb() barrier() | ||
#define dma_rmb() barrier() | ||
#define dma_wmb() barrier() | ||
#endif | ||
|
||
#ifndef CONFIG_SMP | ||
#define smp_mb() barrier() | ||
#define smp_rmb() barrier() | ||
#define smp_wmb() barrier() | ||
#else | ||
#define smp_mb() dmb(ish) | ||
#define smp_rmb() smp_mb() | ||
#define smp_wmb() dmb(ishst) | ||
#endif | ||
|
||
#undef smp_store_release | ||
#define smp_store_release(p, v) \ | ||
do { \ | ||
smp_mb(); \ | ||
ACCESS_ONCE(*p) = (v); \ | ||
} while (0) | ||
do { \ | ||
smp_mb(); \ | ||
ACCESS_ONCE(*p) = (v); \ | ||
} while (0) | ||
|
||
#define smp_load_acquire(p) \ | ||
({ \ | ||
typeof(*p) ___p1 = ACCESS_ONCE(*p); \ | ||
smp_mb(); \ | ||
___p1; \ | ||
}) | ||
|
||
#define read_barrier_depends() do { } while(0) | ||
#define smp_read_barrier_depends() do { } while(0) | ||
|
||
#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); smp_mb(); } while (0) | ||
|
||
#define smp_mb__before_atomic() smp_mb() | ||
#define smp_mb__after_atomic() smp_mb() | ||
|
||
#endif /* !__ASSEMBLY__ */ | ||
#endif /* __ASM_BARRIER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/cache.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/cachetype.h |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/elf.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/glue-proc.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* arch/arm/include/asm/glue.h | ||
* | ||
* Copyright (C) 1997-1999 Russell King | ||
* Copyright (C) 2000-2002 Deep Blue Solutions Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This file provides the glue to stick the processor-specific bits | ||
* into the kernel in an efficient manner. The idea is to use branches | ||
* when we're only targeting one class of TLB, or indirect calls | ||
* when we're targeting multiple classes of TLBs. | ||
*/ | ||
#ifdef __KERNEL__ | ||
|
||
#ifdef __STDC__ | ||
#define ____glue(name,fn) name##fn | ||
#else | ||
#define ____glue(name,fn) name/**/fn | ||
#endif | ||
#define __glue(name,fn) ____glue(name,fn) | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/hardirq.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/highmem.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/hwcap.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/kmap_types.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/memory.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/mmu.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/outercache.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/page.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#ifndef _ASM_SIM_PAGE_H | ||
#define _ASM_SIM_PAGE_H | ||
|
||
typedef struct {} pud_t; | ||
|
||
#define THREAD_ORDER 1 | ||
#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | ||
/* | ||
* arch/arm/include/asm/page.h | ||
* | ||
* Copyright (C) 1995-2003 Russell King | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#ifndef _ASM_LIB_PAGE_H | ||
#define _ASM_LIB_PAGE_H | ||
|
||
#define WANT_PAGE_VIRTUAL 1 | ||
#include <asm/page-arm.h> | ||
|
||
#include <asm-generic/page.h> | ||
#include <asm-generic/getorder.h> | ||
|
||
#endif /* _ASM_SIM_PAGE_H */ | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/pgtable-2level-hwdef.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/pgtable-2level-types.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/pgtable-2level.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../arm/include/asm/pgtable-hwdef.h |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(to remind private message to @jyizheng )