Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c40d04df authored by David Howells's avatar David Howells
Browse files

Disintegrate asm/system.h for Microblaze



Disintegrate asm/system.h for Microblaze.  Not compiled.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: microblaze-uclinux@itee.uq.edu.au
parent 803f6914
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
#ifndef _ASM_MICROBLAZE_ATOMIC_H
#define _ASM_MICROBLAZE_ATOMIC_H

#include <asm/cmpxchg.h>
#include <asm-generic/atomic.h>
#include <asm-generic/atomic64.h>

+27 −0
Original line number Diff line number Diff line
/*
 * 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 */
+40 −0
Original line number Diff line number Diff line
#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 */
+14 −0
Original line number Diff line number Diff line
/*
 * 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 */
+10 −1
Original line number Diff line number Diff line
@@ -125,7 +125,6 @@ struct thread_struct {
	.pgdir = swapper_pg_dir, \
}


/* Free all resources held by a thread. */
extern inline void release_thread(struct task_struct *dead_task)
{
@@ -144,6 +143,8 @@ static inline void exit_thread(void)

unsigned long get_wchan(struct task_struct *p);

extern void ret_from_fork(void);

/* The size allocated for kernel stacks. This _must_ be a power of two! */
# define KERNEL_STACK_SIZE	0x2000

@@ -166,6 +167,14 @@ unsigned long get_wchan(struct task_struct *p);
#  define STACK_TOP	TASK_SIZE
#  define STACK_TOP_MAX	STACK_TOP

void disable_hlt(void);
void enable_hlt(void);
void default_idle(void);

#ifdef CONFIG_DEBUG_FS
extern struct dentry *of_debugfs_root;
#endif

#  endif /* __ASSEMBLY__ */
# endif /* CONFIG_MMU */
#endif /* _ASM_MICROBLAZE_PROCESSOR_H */
Loading