forked from libos-nuse/net-next-nuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from markverick/jyizheng-master
MM patch from Jyizheng master
- Loading branch information
Showing
45 changed files
with
879 additions
and
122 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,16 +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) | ||
|
||
#undef smp_load_acquire | ||
#define smp_load_acquire(p) \ | ||
({ \ | ||
typeof(*p) ___p1 = READ_ONCE(*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.