Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
processor.h File Reference
#include <variant/core.h>
#include <platform/hardware.h>
#include <linux/compiler.h>
#include <asm/ptrace.h>
#include <asm/types.h>
#include <asm/regs.h>

Go to the source code of this file.

Data Structures

struct  mm_segment_t
 
struct  thread_struct
 

Macros

#define ARCH_SLAB_MINALIGN   XCHAL_DATA_WIDTH
 
#define TASK_SIZE   (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
 
#define STACK_TOP   TASK_SIZE
 
#define STACK_TOP_MAX   STACK_TOP
 
#define EXCCAUSE_MAPPED_DEBUG   63
 
#define VALID_DOUBLE_EXCEPTION_ADDRESS   64
 
#define LOCKLEVEL   1
 
#define WSBITS   (XCHAL_NUM_AREGS / 4) /* width of WINDOWSTART in bits */
 
#define WBBITS   (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */
 
#define MAKE_RA_FOR_CALL(ra, ws)   (((ra) & 0x3fffffff) | (ws) << 30)
 
#define MAKE_PC_FROM_RA(ra, sp)   (((ra) & 0x3fffffff) | ((sp) & 0xc0000000))
 
#define current_text_addr()   ({ __label__ _l; _l: &&_l;})
 
#define TASK_UNMAPPED_BASE   (TASK_SIZE / 2)
 
#define INIT_THREAD
 
#define USER_PS_VALUE
 
#define start_thread(regs, new_pc, new_sp)
 
#define release_thread(thread)   do { } while(0)
 
#define copy_segments(p, mm)   do { } while(0)
 
#define release_segments(mm)   do { } while(0)
 
#define forget_segments()   do { } while (0)
 
#define thread_saved_pc(tsk)   (task_pt_regs(tsk)->pc)
 
#define KSTK_EIP(tsk)   (task_pt_regs(tsk)->pc)
 
#define KSTK_ESP(tsk)   (task_pt_regs(tsk)->areg[1])
 
#define cpu_relax()   barrier()
 
#define WSR(v, sr)   __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v));
 
#define RSR(v, sr)   __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));
 
#define set_sr(x, sr)   ({unsigned int v=(unsigned int)x; WSR(v,sr);})
 
#define get_sr(sr)   ({unsigned int v; RSR(v,sr); v; })
 

Functions

unsigned long get_wchan (struct task_struct *p)
 

Macro Definition Documentation

#define ARCH_SLAB_MINALIGN   XCHAL_DATA_WIDTH

Definition at line 28 of file processor.h.

#define copy_segments (   p,
  mm 
)    do { } while(0)

Definition at line 173 of file processor.h.

#define cpu_relax (   void)    barrier()

Definition at line 184 of file processor.h.

#define current_text_addr (   void)    ({ __label__ _l; _l: &&_l;})

Definition at line 122 of file processor.h.

#define EXCCAUSE_MAPPED_DEBUG   63

Definition at line 56 of file processor.h.

#define forget_segments ( )    do { } while (0)

Definition at line 175 of file processor.h.

#define get_sr (   sr)    ({unsigned int v; RSR(v,sr); v; })

Definition at line 192 of file processor.h.

#define INIT_THREAD
Value:
{ \
ra: 0, \
sp: sizeof(init_stack) + (long) &init_stack, \
current_ds: {0}, \
/*info: {0}, */ \
bad_vaddr: 0, \
bad_uaddr: 0, \
error_code: 0, \
}

Definition at line 130 of file processor.h.

#define KSTK_EIP (   tsk)    (task_pt_regs(tsk)->pc)

Definition at line 181 of file processor.h.

#define KSTK_ESP (   tsk)    (task_pt_regs(tsk)->areg[1])

Definition at line 182 of file processor.h.

#define LOCKLEVEL   1

Definition at line 71 of file processor.h.

#define MAKE_PC_FROM_RA (   ra,
  sp 
)    (((ra) & 0x3fffffff) | ((sp) & 0xc0000000))

Definition at line 89 of file processor.h.

#define MAKE_RA_FOR_CALL (   ra,
  ws 
)    (((ra) & 0x3fffffff) | (ws) << 30)

Definition at line 84 of file processor.h.

#define release_segments (   mm)    do { } while(0)

Definition at line 174 of file processor.h.

#define release_thread (   thread)    do { } while(0)

Definition at line 170 of file processor.h.

#define RSR (   v,
  sr 
)    __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v));

Definition at line 189 of file processor.h.

#define set_sr (   x,
  sr 
)    ({unsigned int v=(unsigned int)x; WSR(v,sr);})

Definition at line 191 of file processor.h.

#define STACK_TOP   TASK_SIZE

Definition at line 44 of file processor.h.

#define STACK_TOP_MAX   STACK_TOP

Definition at line 45 of file processor.h.

#define start_thread (   regs,
  new_pc,
  new_sp 
)
Value:
memset(regs, 0, sizeof(*regs)); \
regs->pc = new_pc; \
regs->areg[1] = new_sp; \
regs->areg[0] = 0; \
regs->wmask = 1; \
regs->depc = 0; \
regs->windowbase = 0; \
regs->windowstart = 1;

Definition at line 154 of file processor.h.

Definition at line 41 of file processor.h.

#define TASK_UNMAPPED_BASE   (TASK_SIZE / 2)

Definition at line 128 of file processor.h.

#define thread_saved_pc (   tsk)    (task_pt_regs(tsk)->pc)

Definition at line 177 of file processor.h.

#define USER_PS_VALUE
Value:
((1 << PS_WOE_BIT) | \
(1 << PS_CALLINC_SHIFT) | \
(1 << PS_UM_BIT) | \
(1 << PS_EXCM_BIT))

Definition at line 147 of file processor.h.

#define VALID_DOUBLE_EXCEPTION_ADDRESS   64

Definition at line 66 of file processor.h.

#define WBBITS   (XCHAL_NUM_AREGS_LOG2 - 2) /* width of WINDOWBASE in bits */

Definition at line 77 of file processor.h.

#define WSBITS   (XCHAL_NUM_AREGS / 4) /* width of WINDOWSTART in bits */

Definition at line 76 of file processor.h.

#define WSR (   v,
  sr 
)    __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v));

Definition at line 188 of file processor.h.

Function Documentation

unsigned long get_wchan ( struct task_struct p)

Definition at line 419 of file process.c.