Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
trap_block.h File Reference
#include <asm/hypervisor.h>
#include <asm/asi.h>
#include <asm/scratchpad.h>

Go to the source code of this file.

Data Structures

struct  trap_per_cpu
 
struct  cpuid_patch_entry
 
struct  sun4v_1insn_patch_entry
 
struct  sun4v_2insn_patch_entry
 

Macros

#define TRAP_PER_CPU_THREAD   0x00
 
#define TRAP_PER_CPU_PGD_PADDR   0x08
 
#define TRAP_PER_CPU_CPU_MONDO_PA   0x10
 
#define TRAP_PER_CPU_DEV_MONDO_PA   0x18
 
#define TRAP_PER_CPU_RESUM_MONDO_PA   0x20
 
#define TRAP_PER_CPU_RESUM_KBUF_PA   0x28
 
#define TRAP_PER_CPU_NONRESUM_MONDO_PA   0x30
 
#define TRAP_PER_CPU_NONRESUM_KBUF_PA   0x38
 
#define TRAP_PER_CPU_FAULT_INFO   0x40
 
#define TRAP_PER_CPU_CPU_MONDO_BLOCK_PA   0xc0
 
#define TRAP_PER_CPU_CPU_LIST_PA   0xc8
 
#define TRAP_PER_CPU_TSB_HUGE   0xd0
 
#define TRAP_PER_CPU_TSB_HUGE_TEMP   0xd8
 
#define TRAP_PER_CPU_IRQ_WORKLIST_PA   0xe0
 
#define TRAP_PER_CPU_CPU_MONDO_QMASK   0xe8
 
#define TRAP_PER_CPU_DEV_MONDO_QMASK   0xec
 
#define TRAP_PER_CPU_RESUM_QMASK   0xf0
 
#define TRAP_PER_CPU_NONRESUM_QMASK   0xf4
 
#define TRAP_PER_CPU_PER_CPU_BASE   0xf8
 
#define TRAP_BLOCK_SZ_SHIFT   8
 
#define __GET_CPUID(REG)
 
#define TRAP_LOAD_TRAP_BLOCK(DEST, TMP)
 
#define TRAP_LOAD_PGD_PHYS(DEST, TMP)
 
#define TRAP_LOAD_IRQ_WORK_PA(DEST, TMP)
 
#define TRAP_LOAD_THREAD_REG(DEST, TMP)
 
#define LOAD_PER_CPU_BASE(DEST, THR, REG1, REG2, REG3)
 

Functions

struct trap_per_cpu __attribute__ ((aligned(64)))
 
void init_cur_cpu_trap (struct thread_info *)
 
void setup_tba (void)
 
unsigned long real_hard_smp_processor_id (void)
 

Variables

struct thread_infothread
 
unsigned long pgd_paddr
 
unsigned long cpu_mondo_pa
 
unsigned long dev_mondo_pa
 
unsigned long resum_mondo_pa
 
unsigned long resum_kernel_buf_pa
 
unsigned long nonresum_mondo_pa
 
unsigned long nonresum_kernel_buf_pa
 
struct hv_fault_status fault_info
 
unsigned long cpu_mondo_block_pa
 
unsigned long cpu_list_pa
 
unsigned long tsb_huge
 
unsigned long tsb_huge_temp
 
unsigned long irq_worklist_pa
 
unsigned int cpu_mondo_qmask
 
unsigned int dev_mondo_qmask
 
unsigned int resum_qmask
 
unsigned int nonresum_qmask
 
unsigned long __per_cpu_base
 
struct trap_per_cpu trap_block [NR_CPUS]
 
int ncpus_probed
 
struct cpuid_patch_entry __attribute__
 
struct cpuid_patch_entry
__cpuid_patch 
__cpuid_patch_end
 
struct sun4v_1insn_patch_entry
__sun4v_1insn_patch 
__sun4v_1insn_patch_end
 
struct sun4v_2insn_patch_entry
__sun4v_2insn_patch 
__sun4v_2insn_patch_end
 

Macro Definition Documentation

#define __GET_CPUID (   REG)
Value:
/* Spitfire implementation (default). */ \
661: ldxa [%g0] ASI_UPA_CONFIG, REG; \
srlx REG, 17, REG; \
and REG, 0x1f, REG; \
nop; \
.section .cpuid_patch, "ax"; \
/* Instruction location. */ \
.word 661b; \
/* Cheetah Safari implementation. */ \
ldxa [%g0] ASI_SAFARI_CONFIG, REG; \
srlx REG, 17, REG; \
and REG, 0x3ff, REG; \
nop; \
/* Cheetah JBUS implementation. */ \
ldxa [%g0] ASI_JBUS_CONFIG, REG; \
srlx REG, 17, REG; \
and REG, 0x1f, REG; \
nop; \
/* Starfire implementation. */ \
sethi %hi(0x1fff40000d0 >> 9), REG; \
sllx REG, 9, REG; \
or REG, 0xd0, REG; \
/* sun4v implementation. */ \
ldxa [REG] ASI_SCRATCHPAD, REG; \
nop; \
nop; \
.previous;

Definition at line 110 of file trap_block.h.

#define LOAD_PER_CPU_BASE (   DEST,
  THR,
  REG1,
  REG2,
  REG3 
)

Definition at line 203 of file trap_block.h.

#define TRAP_BLOCK_SZ_SHIFT   8

Definition at line 106 of file trap_block.h.

#define TRAP_LOAD_IRQ_WORK_PA (   DEST,
  TMP 
)
Value:

Definition at line 194 of file trap_block.h.

#define TRAP_LOAD_PGD_PHYS (   DEST,
  TMP 
)
Value:

Definition at line 189 of file trap_block.h.

#define TRAP_LOAD_THREAD_REG (   DEST,
  TMP 
)
Value:

Definition at line 198 of file trap_block.h.

#define TRAP_LOAD_TRAP_BLOCK (   DEST,
  TMP 
)
Value:
sethi %hi(trap_block), DEST; \
or DEST, %lo(trap_block), DEST; \

Definition at line 184 of file trap_block.h.

#define TRAP_PER_CPU_CPU_LIST_PA   0xc8

Definition at line 96 of file trap_block.h.

#define TRAP_PER_CPU_CPU_MONDO_BLOCK_PA   0xc0

Definition at line 95 of file trap_block.h.

#define TRAP_PER_CPU_CPU_MONDO_PA   0x10

Definition at line 88 of file trap_block.h.

#define TRAP_PER_CPU_CPU_MONDO_QMASK   0xe8

Definition at line 100 of file trap_block.h.

#define TRAP_PER_CPU_DEV_MONDO_PA   0x18

Definition at line 89 of file trap_block.h.

#define TRAP_PER_CPU_DEV_MONDO_QMASK   0xec

Definition at line 101 of file trap_block.h.

#define TRAP_PER_CPU_FAULT_INFO   0x40

Definition at line 94 of file trap_block.h.

#define TRAP_PER_CPU_IRQ_WORKLIST_PA   0xe0

Definition at line 99 of file trap_block.h.

#define TRAP_PER_CPU_NONRESUM_KBUF_PA   0x38

Definition at line 93 of file trap_block.h.

#define TRAP_PER_CPU_NONRESUM_MONDO_PA   0x30

Definition at line 92 of file trap_block.h.

#define TRAP_PER_CPU_NONRESUM_QMASK   0xf4

Definition at line 103 of file trap_block.h.

#define TRAP_PER_CPU_PER_CPU_BASE   0xf8

Definition at line 104 of file trap_block.h.

#define TRAP_PER_CPU_PGD_PADDR   0x08

Definition at line 87 of file trap_block.h.

#define TRAP_PER_CPU_RESUM_KBUF_PA   0x28

Definition at line 91 of file trap_block.h.

#define TRAP_PER_CPU_RESUM_MONDO_PA   0x20

Definition at line 90 of file trap_block.h.

#define TRAP_PER_CPU_RESUM_QMASK   0xf0

Definition at line 102 of file trap_block.h.

#define TRAP_PER_CPU_THREAD   0x00

Definition at line 86 of file trap_block.h.

#define TRAP_PER_CPU_TSB_HUGE   0xd0

Definition at line 97 of file trap_block.h.

#define TRAP_PER_CPU_TSB_HUGE_TEMP   0xd8

Definition at line 98 of file trap_block.h.

Function Documentation

void init_cur_cpu_trap ( struct thread_info )

Definition at line 2654 of file traps_64.c.

unsigned long real_hard_smp_processor_id ( void  )
void setup_tba ( void  )

Variable Documentation

struct cpuid_patch_entry __cpuid_patch __cpuid_patch_end
unsigned long __per_cpu_base

Definition at line 80 of file trap_block.h.

struct sun4v_1insn_patch_entry __sun4v_1insn_patch __sun4v_1insn_patch_end
struct sun4v_2insn_patch_entry __sun4v_2insn_patch __sun4v_2insn_patch_end
unsigned long cpu_list_pa

Definition at line 70 of file trap_block.h.

unsigned long cpu_mondo_block_pa

Definition at line 69 of file trap_block.h.

unsigned long cpu_mondo_pa

Definition at line 56 of file trap_block.h.

unsigned int cpu_mondo_qmask

Definition at line 76 of file trap_block.h.

unsigned long dev_mondo_pa

Definition at line 57 of file trap_block.h.

unsigned int dev_mondo_qmask

Definition at line 77 of file trap_block.h.

struct hv_fault_status fault_info

Definition at line 66 of file trap_block.h.

unsigned long irq_worklist_pa

Definition at line 75 of file trap_block.h.

int ncpus_probed

Definition at line 29 of file cpu.c.

unsigned long nonresum_kernel_buf_pa

Definition at line 63 of file trap_block.h.

unsigned long nonresum_mondo_pa

Definition at line 62 of file trap_block.h.

unsigned int nonresum_qmask

Definition at line 79 of file trap_block.h.

unsigned long pgd_paddr

Definition at line 55 of file trap_block.h.

unsigned long resum_kernel_buf_pa

Definition at line 61 of file trap_block.h.

unsigned long resum_mondo_pa

Definition at line 60 of file trap_block.h.

unsigned int resum_qmask

Definition at line 78 of file trap_block.h.

Definition at line 54 of file trap_block.h.

Definition at line 2648 of file traps_64.c.

unsigned long tsb_huge

Definition at line 71 of file trap_block.h.

unsigned long tsb_huge_temp

Definition at line 72 of file trap_block.h.