Linux Kernel
3.7.1
|
#include <linux/rmap.h>
#include <linux/interrupt.h>
#include <linux/mutex.h>
#include <linux/wait.h>
#include <linux/mmu_notifier.h>
#include "gru.h"
#include "grulib.h"
#include "gruhandles.h"
Go to the source code of this file.
Data Structures | |
struct | gru_stats_s |
struct | mcs_op_statistic |
struct | gru_mm_tracker |
struct | gru_mm_struct |
struct | gru_vma_data |
struct | gru_thread_state |
struct | gru_state |
struct | gru_blade_state |
Macros | |
#define | GRU_MAX_BLADES MAX_NUMNODES |
#define | GRU_MAX_GRUS (GRU_MAX_BLADES * GRU_CHIPLETS_PER_BLADE) |
#define | GRU_DRIVER_ID_STR "SGI GRU Device Driver" |
#define | GRU_DRIVER_VERSION_STR "0.85" |
#define | OPT_DPRINT 1 |
#define | OPT_STATS 2 |
#define | IRQ_GRU 110 /* Starting IRQ number for interrupts */ |
#define | GRU_ASSIGN_DELAY ((HZ * 20) / 1000) |
#define | GRU_STEAL_DELAY ((HZ * 200) / 1000) |
#define | STAT(id) |
#define | gru_dbg(x...) |
#define | MAX_ASID 0xfffff0 |
#define | MIN_ASID 8 |
#define | ASID_INC 8 /* number of regions */ |
#define | VADDR_HI_BIT 64 |
#define | GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) |
#define | GRUASID(asid, addr) ((asid) + GRUREGION(addr)) |
#define | TSID(a, v) (((a) - (v)->vm_start) / GRU_GSEG_PAGESIZE) |
#define | UGRUADDR(gts) |
#define | NULLCTX (-1) /* if context not loaded into GRU */ |
#define | get_tfm_for_cpu(g, c) ((struct gru_tlb_fault_map *)get_tfm((g)->gs_gru_base_vaddr, (c))) |
#define | get_tfh_by_index(g, i) ((struct gru_tlb_fault_handle *)get_tfh((g)->gs_gru_base_vaddr, (i))) |
#define | get_tgh_by_index(g, i) ((struct gru_tlb_global_handle *)get_tgh((g)->gs_gru_base_vaddr, (i))) |
#define | get_cbe_by_index(g, i) |
#define | get_gru(b, c) (&gru_base[b]->bs_grus[c]) |
#define | DSR_BYTES(dsr) ((dsr) * GRU_DSR_AU_BYTES) |
#define | CBR_BYTES(cbr) ((cbr) * GRU_HANDLE_BYTES * GRU_CBR_AU_SIZE * 2) |
#define | thread_cbr_number(gts, n) |
#define | GID_TO_GRU(gid) |
#define | for_each_gru_in_bitmap(gid, map) for_each_set_bit((gid), (map), GRU_MAX_GRUS) |
#define | for_each_gru_on_blade(gru, nid, i) |
#define | foreach_gid(gid) for ((gid) = 0; (gid) < gru_max_gids; (gid)++) |
#define | for_each_gts_on_gru(gts, gru, ctxnum) |
#define | for_each_cbr_in_tfm(i, map) for_each_set_bit((i), (map), GRU_NUM_CBE) |
#define | for_each_cbr_in_allocation_map(i, map, k) |
#define | for_each_dsr_in_allocation_map(i, map, k) |
#define | gseg_physical_address(gru, ctxnum) ((gru)->gs_gru_base_paddr + ctxnum * GRU_GSEG_STRIDE) |
#define | gseg_virtual_address(gru, ctxnum) ((gru)->gs_gru_base_vaddr + ctxnum * GRU_GSEG_STRIDE) |
#define | UV_MAX_INT_CORES 8 |
#define | uv_cpu_socket_number(p) ((cpu_physical_id(p) >> 5) & 1) |
#define | uv_cpu_ht_number(p) (cpu_physical_id(p) & 1) |
#define | uv_cpu_core_number(p) |
Enumerations | |
enum | mcs_op { cchop_allocate, cchop_start, cchop_interrupt, cchop_interrupt_sync, cchop_deallocate, tfhop_write_only, tfhop_write_restart, tghop_invalidate, mcsop_last } |
Variables | |
struct gru_stats_s | gru_stats |
struct gru_blade_state * | gru_base [] |
unsigned long | gru_start_paddr |
unsigned long | gru_end_paddr |
void * | gru_start_vaddr |
unsigned int | gru_max_gids |
struct mcs_op_statistic | mcs_op_statistics [mcsop_last] |
unsigned int | mt_asid_gen |
unsigned int | mt_asid |
unsigned short | mt_ctxbitmap |
struct gru_mm_struct | __attribute__ |
struct vm_operations_struct | gru_vm_ops |
struct device * | grudev |
unsigned long | gru_options |
#define ASID_INC 8 /* number of regions */ |
Definition at line 296 of file grutables.h.
#define CBR_BYTES | ( | cbr | ) | ((cbr) * GRU_HANDLE_BYTES * GRU_CBR_AU_SIZE * 2) |
Definition at line 504 of file grutables.h.
#define DSR_BYTES | ( | dsr | ) | ((dsr) * GRU_DSR_AU_BYTES) |
Definition at line 503 of file grutables.h.
Definition at line 541 of file grutables.h.
#define for_each_cbr_in_tfm | ( | i, | |
map | |||
) | for_each_set_bit((i), (map), GRU_NUM_CBE) |
Definition at line 537 of file grutables.h.
Definition at line 547 of file grutables.h.
#define for_each_gru_in_bitmap | ( | gid, | |
map | |||
) | for_each_set_bit((gid), (map), GRU_MAX_GRUS) |
Definition at line 518 of file grutables.h.
#define for_each_gru_on_blade | ( | gru, | |
nid, | |||
i | |||
) |
Definition at line 522 of file grutables.h.
#define for_each_gts_on_gru | ( | gts, | |
gru, | |||
ctxnum | |||
) |
Definition at line 532 of file grutables.h.
Definition at line 528 of file grutables.h.
Definition at line 491 of file grutables.h.
#define get_tfh_by_index | ( | g, | |
i | |||
) | ((struct gru_tlb_fault_handle *)get_tfh((g)->gs_gru_base_vaddr, (i))) |
Definition at line 487 of file grutables.h.
Definition at line 485 of file grutables.h.
#define get_tgh_by_index | ( | g, | |
i | |||
) | ((struct gru_tlb_global_handle *)get_tgh((g)->gs_gru_base_vaddr, (i))) |
Definition at line 489 of file grutables.h.
#define GID_TO_GRU | ( | gid | ) |
Definition at line 511 of file grutables.h.
#define GRU_ASSIGN_DELAY ((HZ * 20) / 1000) |
Definition at line 268 of file grutables.h.
#define gru_dbg | ( | x... | ) |
Definition at line 288 of file grutables.h.
#define GRU_DRIVER_ID_STR "SGI GRU Device Driver" |
Definition at line 163 of file grutables.h.
#define GRU_DRIVER_VERSION_STR "0.85" |
Definition at line 164 of file grutables.h.
#define GRU_MAX_BLADES MAX_NUMNODES |
Definition at line 160 of file grutables.h.
#define GRU_MAX_GRUS (GRU_MAX_BLADES * GRU_CHIPLETS_PER_BLADE) |
Definition at line 161 of file grutables.h.
#define GRU_STEAL_DELAY ((HZ * 200) / 1000) |
Definition at line 274 of file grutables.h.
Definition at line 301 of file grutables.h.
#define GRUREGION | ( | addr | ) | ((addr) >> (VADDR_HI_BIT - 3) & 3) |
Definition at line 300 of file grutables.h.
#define gseg_physical_address | ( | gru, | |
ctxnum | |||
) | ((gru)->gs_gru_base_paddr + ctxnum * GRU_GSEG_STRIDE) |
Definition at line 552 of file grutables.h.
#define gseg_virtual_address | ( | gru, | |
ctxnum | |||
) | ((gru)->gs_gru_base_vaddr + ctxnum * GRU_GSEG_STRIDE) |
Definition at line 554 of file grutables.h.
Definition at line 265 of file grutables.h.
#define MAX_ASID 0xfffff0 |
Definition at line 294 of file grutables.h.
#define MIN_ASID 8 |
Definition at line 295 of file grutables.h.
Definition at line 402 of file grutables.h.
#define OPT_DPRINT 1 |
Definition at line 261 of file grutables.h.
#define OPT_STATS 2 |
Definition at line 262 of file grutables.h.
#define STAT | ( | id | ) |
Definition at line 276 of file grutables.h.
#define thread_cbr_number | ( | gts, | |
n | |||
) |
Definition at line 507 of file grutables.h.
Definition at line 398 of file grutables.h.
#define UGRUADDR | ( | gts | ) |
Definition at line 399 of file grutables.h.
#define uv_cpu_core_number | ( | p | ) |
Definition at line 619 of file grutables.h.
#define uv_cpu_ht_number | ( | p | ) | (cpu_physical_id(p) & 1) |
Definition at line 618 of file grutables.h.
#define uv_cpu_socket_number | ( | p | ) | ((cpu_physical_id(p) >> 5) & 1) |
Definition at line 617 of file grutables.h.
#define UV_MAX_INT_CORES 8 |
Definition at line 616 of file grutables.h.
#define VADDR_HI_BIT 64 |
Definition at line 299 of file grutables.h.
enum mcs_op |
cchop_allocate | |
cchop_start | |
cchop_interrupt | |
cchop_interrupt_sync | |
cchop_deallocate | |
tfhop_write_only | |
tfhop_write_restart | |
tghop_invalidate | |
mcsop_last |
Definition at line 249 of file grutables.h.
|
read |
Definition at line 171 of file esd_usb2.c.
irqreturn_t gru0_intr | ( | int | irq, |
void * | dev_id | ||
) |
Definition at line 598 of file grufault.c.
irqreturn_t gru1_intr | ( | int | irq, |
void * | dev_id | ||
) |
Definition at line 603 of file grufault.c.
|
read |
|
read |
|
read |
|
read |
void gru_check_context_placement | ( | struct gru_thread_state * | gts | ) |
void gru_drop_mmu_notifier | ( | struct gru_mm_struct * | gms | ) |
Definition at line 329 of file grutlbpurge.c.
Definition at line 188 of file grukdump.c.
int gru_fault | ( | struct vm_area_struct * | , |
struct vm_fault * | vmf | ||
) |
|
read |
|
read |
Definition at line 61 of file grufault.c.
Definition at line 209 of file grutlbpurge.c.
void gru_flush_tlb_range | ( | struct gru_mm_struct * | gms, |
unsigned long | start, | ||
unsigned long | len | ||
) |
Definition at line 158 of file grutlbpurge.c.
Definition at line 695 of file grufault.c.
Definition at line 827 of file grufault.c.
Definition at line 646 of file grufault.c.
irqreturn_t gru_intr_mblade | ( | int | irq, |
void * | dev_id | ||
) |
Definition at line 608 of file grufault.c.
Definition at line 1157 of file grukservices.c.
Definition at line 1152 of file grukservices.c.
Definition at line 1127 of file grukservices.c.
void gru_load_context | ( | struct gru_thread_state * | gts | ) |
Definition at line 378 of file gruprocfs.c.
Definition at line 362 of file gruprocfs.c.
|
read |
Definition at line 298 of file grutlbpurge.c.
Definition at line 858 of file grufault.c.
void gru_steal_context | ( | struct gru_thread_state * | gts | ) |
Definition at line 355 of file grutlbpurge.c.
void gru_unload_context | ( | struct gru_thread_state * | gts, |
int | savestate | ||
) |
int gru_update_cch | ( | struct gru_thread_state * | gts | ) |
Definition at line 800 of file grufault.c.
Definition at line 771 of file grufault.c.
void gts_drop | ( | struct gru_thread_state * | gts | ) |
struct gru_blade_state* gru_base[] |
unsigned long gru_end_paddr |
unsigned int gru_max_gids |
unsigned long gru_options |
unsigned long gru_start_paddr |
void* gru_start_vaddr |
struct gru_stats_s gru_stats |
struct mcs_op_statistic mcs_op_statistics[mcsop_last] |
Definition at line 40 of file gruhandles.c.
unsigned int mt_asid |
Definition at line 320 of file grutables.h.
unsigned int mt_asid_gen |
Definition at line 319 of file grutables.h.
unsigned short mt_ctxbitmap |
Definition at line 321 of file grutables.h.