-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarl rebase to yizheng's mm branch
Push my initial work for uploading memory manager add slib_env to use page_alloc.c Add headers from arm/include/asm and try to initilize buddy system freelists recover init/main.c add WANT_PAGE_VIRTUAL to use page->virtual a working version done delete prink debug message add a tiny change try to make no impact on upstream kernel solve OPT=no compiler crash solve undefined symbol for init_mm test add build.sh remove test delete build.sh add #endif solve some unreferced symbol problem change barrier.h disable some compile time check for atomic variables Do cleanup according to Hajime's suggestions. Check here for details: #44 (comment) git rid of #if 0 useless code Resolve Hajime'c commemts. Check here: https://github.com/libos-nuse/net-next-nuse/pull/47/files#r38614406 add cache_is_vivt back to highmem.c again to resolve some warnings resolve pull request comments 1)Change __MR_MAX_ZONES in arch/lib/Makefile 2)Use symbolic link in arch/lib/include 3)Resolve ERRORs reported by checkpatch.pl Lib: 1) resovle undefined symbol rumpns_irq_stat disable compile time check resolve pull request comments add something missing in the last commit
- Loading branch information
Showing
45 changed files
with
898 additions
and
150 deletions.
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 |
Oops, something went wrong.