-
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.
Disintegrate asm/system.h for Microblaze
Disintegrate asm/system.h for Microblaze. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> cc: microblaze-uclinux@itee.uq.edu.au
- Loading branch information
David Howells
committed
Mar 28, 2012
1 parent
803f691
commit c40d04d
Showing
17 changed files
with
129 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2006 Atmark Techno, Inc. | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#ifndef _ASM_MICROBLAZE_BARRIER_H | ||
#define _ASM_MICROBLAZE_BARRIER_H | ||
|
||
#define nop() asm volatile ("nop") | ||
|
||
#define smp_read_barrier_depends() do {} while (0) | ||
#define read_barrier_depends() do {} while (0) | ||
|
||
#define mb() barrier() | ||
#define rmb() mb() | ||
#define wmb() mb() | ||
#define set_mb(var, value) do { var = value; mb(); } while (0) | ||
#define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
|
||
#define smp_mb() mb() | ||
#define smp_rmb() rmb() | ||
#define smp_wmb() wmb() | ||
|
||
#endif /* _ASM_MICROBLAZE_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,40 @@ | ||
#ifndef _ASM_MICROBLAZE_CMPXCHG_H | ||
#define _ASM_MICROBLAZE_CMPXCHG_H | ||
|
||
void __bad_xchg(volatile void *ptr, int size); | ||
|
||
static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | ||
int size) | ||
{ | ||
unsigned long ret; | ||
unsigned long flags; | ||
|
||
switch (size) { | ||
case 1: | ||
local_irq_save(flags); | ||
ret = *(volatile unsigned char *)ptr; | ||
*(volatile unsigned char *)ptr = x; | ||
local_irq_restore(flags); | ||
break; | ||
|
||
case 4: | ||
local_irq_save(flags); | ||
ret = *(volatile unsigned long *)ptr; | ||
*(volatile unsigned long *)ptr = x; | ||
local_irq_restore(flags); | ||
break; | ||
default: | ||
__bad_xchg(ptr, size), ret = 0; | ||
break; | ||
} | ||
|
||
return ret; | ||
} | ||
|
||
#define xchg(ptr, x) \ | ||
((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | ||
|
||
#include <asm-generic/cmpxchg.h> | ||
#include <asm-generic/cmpxchg-local.h> | ||
|
||
#endif /* _ASM_MICROBLAZE_CMPXCHG_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,14 @@ | ||
/* | ||
* Copyright (C) 2006 Atmark Techno, Inc. | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#ifndef _ASM_MICROBLAZE_EXEC_H | ||
#define _ASM_MICROBLAZE_EXEC_H | ||
|
||
#define arch_align_stack(x) (x) | ||
|
||
#endif /* _ASM_MICROBLAZE_EXEC_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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (C) 2006 Atmark Techno, Inc. | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#ifndef _ASM_MICROBLAZE_SWITCH_TO_H | ||
#define _ASM_MICROBLAZE_SWITCH_TO_H | ||
|
||
struct task_struct; | ||
struct thread_info; | ||
|
||
extern struct task_struct *_switch_to(struct thread_info *prev, | ||
struct thread_info *next); | ||
|
||
#define switch_to(prev, next, last) \ | ||
do { \ | ||
(last) = _switch_to(task_thread_info(prev), \ | ||
task_thread_info(next)); \ | ||
} while (0) | ||
|
||
#endif /* _ASM_MICROBLAZE_SWITCH_TO_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,97 +1,7 @@ | ||
/* | ||
* Copyright (C) 2006 Atmark Techno, Inc. | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
|
||
#ifndef _ASM_MICROBLAZE_SYSTEM_H | ||
#define _ASM_MICROBLAZE_SYSTEM_H | ||
|
||
#include <asm/registers.h> | ||
#include <asm/setup.h> | ||
#include <asm/irqflags.h> | ||
#include <asm/cache.h> | ||
|
||
#include <asm-generic/cmpxchg.h> | ||
#include <asm-generic/cmpxchg-local.h> | ||
|
||
struct task_struct; | ||
struct thread_info; | ||
|
||
extern struct task_struct *_switch_to(struct thread_info *prev, | ||
struct thread_info *next); | ||
|
||
#define switch_to(prev, next, last) \ | ||
do { \ | ||
(last) = _switch_to(task_thread_info(prev), \ | ||
task_thread_info(next)); \ | ||
} while (0) | ||
|
||
#define smp_read_barrier_depends() do {} while (0) | ||
#define read_barrier_depends() do {} while (0) | ||
|
||
#define nop() asm volatile ("nop") | ||
#define mb() barrier() | ||
#define rmb() mb() | ||
#define wmb() mb() | ||
#define set_mb(var, value) do { var = value; mb(); } while (0) | ||
#define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
|
||
#define smp_mb() mb() | ||
#define smp_rmb() rmb() | ||
#define smp_wmb() wmb() | ||
|
||
void __bad_xchg(volatile void *ptr, int size); | ||
|
||
static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | ||
int size) | ||
{ | ||
unsigned long ret; | ||
unsigned long flags; | ||
|
||
switch (size) { | ||
case 1: | ||
local_irq_save(flags); | ||
ret = *(volatile unsigned char *)ptr; | ||
*(volatile unsigned char *)ptr = x; | ||
local_irq_restore(flags); | ||
break; | ||
|
||
case 4: | ||
local_irq_save(flags); | ||
ret = *(volatile unsigned long *)ptr; | ||
*(volatile unsigned long *)ptr = x; | ||
local_irq_restore(flags); | ||
break; | ||
default: | ||
__bad_xchg(ptr, size), ret = 0; | ||
break; | ||
} | ||
|
||
return ret; | ||
} | ||
|
||
void disable_hlt(void); | ||
void enable_hlt(void); | ||
void default_idle(void); | ||
|
||
#define xchg(ptr, x) \ | ||
((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | ||
|
||
void free_init_pages(char *what, unsigned long begin, unsigned long end); | ||
void free_initmem(void); | ||
extern char *klimit; | ||
extern void ret_from_fork(void); | ||
|
||
extern void *alloc_maybe_bootmem(size_t size, gfp_t mask); | ||
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); | ||
|
||
#ifdef CONFIG_DEBUG_FS | ||
extern struct dentry *of_debugfs_root; | ||
#endif | ||
|
||
#define arch_align_stack(x) (x) | ||
|
||
#endif /* _ASM_MICROBLAZE_SYSTEM_H */ | ||
/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */ | ||
#include <asm/barrier.h> | ||
#include <asm/cmpxchg.h> | ||
#include <asm/exec.h> | ||
#include <asm/special_insns.h> | ||
#include <asm/switch_to.h> | ||
extern void free_initmem(void); |
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
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