Path: blob/master/drivers/misc/sgi-gru/grutables.h
15111 views
/*1* SN Platform GRU Driver2*3* GRU DRIVER TABLES, MACROS, externs, etc4*5* Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20*/2122#ifndef __GRUTABLES_H__23#define __GRUTABLES_H__2425/*26* GRU Chiplet:27* The GRU is a user addressible memory accelerator. It provides28* several forms of load, store, memset, bcopy instructions. In addition, it29* contains special instructions for AMOs, sending messages to message30* queues, etc.31*32* The GRU is an integral part of the node controller. It connects33* directly to the cpu socket. In its current implementation, there are 234* GRU chiplets in the node controller on each blade (~node).35*36* The entire GRU memory space is fully coherent and cacheable by the cpus.37*38* Each GRU chiplet has a physical memory map that looks like the following:39*40* +-----------------+41* |/////////////////|42* |/////////////////|43* |/////////////////|44* |/////////////////|45* |/////////////////|46* |/////////////////|47* |/////////////////|48* |/////////////////|49* +-----------------+50* | system control |51* +-----------------+ _______ +-------------+52* |/////////////////| / | |53* |/////////////////| / | |54* |/////////////////| / | instructions|55* |/////////////////| / | |56* |/////////////////| / | |57* |/////////////////| / |-------------|58* |/////////////////| / | |59* +-----------------+ | |60* | context 15 | | data |61* +-----------------+ | |62* | ...... | \ | |63* +-----------------+ \____________ +-------------+64* | context 1 |65* +-----------------+66* | context 0 |67* +-----------------+68*69* Each of the "contexts" is a chunk of memory that can be mmaped into user70* space. The context consists of 2 parts:71*72* - an instruction space that can be directly accessed by the user73* to issue GRU instructions and to check instruction status.74*75* - a data area that acts as normal RAM.76*77* User instructions contain virtual addresses of data to be accessed by the78* GRU. The GRU contains a TLB that is used to convert these user virtual79* addresses to physical addresses.80*81* The "system control" area of the GRU chiplet is used by the kernel driver82* to manage user contexts and to perform functions such as TLB dropin and83* purging.84*85* One context may be reserved for the kernel and used for cross-partition86* communication. The GRU will also be used to asynchronously zero out87* large blocks of memory (not currently implemented).88*89*90* Tables:91*92* VDATA-VMA Data - Holds a few parameters. Head of linked list of93* GTS tables for threads using the GSEG94* GTS - Gru Thread State - contains info for managing a GSEG context. A95* GTS is allocated for each thread accessing a96* GSEG.97* GTD - GRU Thread Data - contains shadow copy of GRU data when GSEG is98* not loaded into a GRU99* GMS - GRU Memory Struct - Used to manage TLB shootdowns. Tracks GRUs100* where a GSEG has been loaded. Similar to101* an mm_struct but for GRU.102*103* GS - GRU State - Used to manage the state of a GRU chiplet104* BS - Blade State - Used to manage state of all GRU chiplets105* on a blade106*107*108* Normal task tables for task using GRU.109* - 2 threads in process110* - 2 GSEGs open in process111* - GSEG1 is being used by both threads112* - GSEG2 is used only by thread 2113*114* task -->|115* task ---+---> mm ->------ (notifier) -------+-> gms116* | |117* |--> vma -> vdata ---> gts--->| GSEG1 (thread1)118* | | |119* | +-> gts--->| GSEG1 (thread2)120* | |121* |--> vma -> vdata ---> gts--->| GSEG2 (thread2)122* .123* .124*125* GSEGs are marked DONTCOPY on fork126*127* At open128* file.private_data -> NULL129*130* At mmap,131* vma -> vdata132*133* After gseg reference134* vma -> vdata ->gts135*136* After fork137* parent138* vma -> vdata -> gts139* child140* (vma is not copied)141*142*/143144#include <linux/rmap.h>145#include <linux/interrupt.h>146#include <linux/mutex.h>147#include <linux/wait.h>148#include <linux/mmu_notifier.h>149#include "gru.h"150#include "grulib.h"151#include "gruhandles.h"152153extern struct gru_stats_s gru_stats;154extern struct gru_blade_state *gru_base[];155extern unsigned long gru_start_paddr, gru_end_paddr;156extern void *gru_start_vaddr;157extern unsigned int gru_max_gids;158159#define GRU_MAX_BLADES MAX_NUMNODES160#define GRU_MAX_GRUS (GRU_MAX_BLADES * GRU_CHIPLETS_PER_BLADE)161162#define GRU_DRIVER_ID_STR "SGI GRU Device Driver"163#define GRU_DRIVER_VERSION_STR "0.85"164165/*166* GRU statistics.167*/168struct gru_stats_s {169atomic_long_t vdata_alloc;170atomic_long_t vdata_free;171atomic_long_t gts_alloc;172atomic_long_t gts_free;173atomic_long_t gms_alloc;174atomic_long_t gms_free;175atomic_long_t gts_double_allocate;176atomic_long_t assign_context;177atomic_long_t assign_context_failed;178atomic_long_t free_context;179atomic_long_t load_user_context;180atomic_long_t load_kernel_context;181atomic_long_t lock_kernel_context;182atomic_long_t unlock_kernel_context;183atomic_long_t steal_user_context;184atomic_long_t steal_kernel_context;185atomic_long_t steal_context_failed;186atomic_long_t nopfn;187atomic_long_t asid_new;188atomic_long_t asid_next;189atomic_long_t asid_wrap;190atomic_long_t asid_reuse;191atomic_long_t intr;192atomic_long_t intr_cbr;193atomic_long_t intr_tfh;194atomic_long_t intr_spurious;195atomic_long_t intr_mm_lock_failed;196atomic_long_t call_os;197atomic_long_t call_os_wait_queue;198atomic_long_t user_flush_tlb;199atomic_long_t user_unload_context;200atomic_long_t user_exception;201atomic_long_t set_context_option;202atomic_long_t check_context_retarget_intr;203atomic_long_t check_context_unload;204atomic_long_t tlb_dropin;205atomic_long_t tlb_preload_page;206atomic_long_t tlb_dropin_fail_no_asid;207atomic_long_t tlb_dropin_fail_upm;208atomic_long_t tlb_dropin_fail_invalid;209atomic_long_t tlb_dropin_fail_range_active;210atomic_long_t tlb_dropin_fail_idle;211atomic_long_t tlb_dropin_fail_fmm;212atomic_long_t tlb_dropin_fail_no_exception;213atomic_long_t tfh_stale_on_fault;214atomic_long_t mmu_invalidate_range;215atomic_long_t mmu_invalidate_page;216atomic_long_t flush_tlb;217atomic_long_t flush_tlb_gru;218atomic_long_t flush_tlb_gru_tgh;219atomic_long_t flush_tlb_gru_zero_asid;220221atomic_long_t copy_gpa;222atomic_long_t read_gpa;223224atomic_long_t mesq_receive;225atomic_long_t mesq_receive_none;226atomic_long_t mesq_send;227atomic_long_t mesq_send_failed;228atomic_long_t mesq_noop;229atomic_long_t mesq_send_unexpected_error;230atomic_long_t mesq_send_lb_overflow;231atomic_long_t mesq_send_qlimit_reached;232atomic_long_t mesq_send_amo_nacked;233atomic_long_t mesq_send_put_nacked;234atomic_long_t mesq_page_overflow;235atomic_long_t mesq_qf_locked;236atomic_long_t mesq_qf_noop_not_full;237atomic_long_t mesq_qf_switch_head_failed;238atomic_long_t mesq_qf_unexpected_error;239atomic_long_t mesq_noop_unexpected_error;240atomic_long_t mesq_noop_lb_overflow;241atomic_long_t mesq_noop_qlimit_reached;242atomic_long_t mesq_noop_amo_nacked;243atomic_long_t mesq_noop_put_nacked;244atomic_long_t mesq_noop_page_overflow;245246};247248enum mcs_op {cchop_allocate, cchop_start, cchop_interrupt, cchop_interrupt_sync,249cchop_deallocate, tfhop_write_only, tfhop_write_restart,250tghop_invalidate, mcsop_last};251252struct mcs_op_statistic {253atomic_long_t count;254atomic_long_t total;255unsigned long max;256};257258extern struct mcs_op_statistic mcs_op_statistics[mcsop_last];259260#define OPT_DPRINT 1261#define OPT_STATS 2262263264#define IRQ_GRU 110 /* Starting IRQ number for interrupts */265266/* Delay in jiffies between attempts to assign a GRU context */267#define GRU_ASSIGN_DELAY ((HZ * 20) / 1000)268269/*270* If a process has it's context stolen, min delay in jiffies before trying to271* steal a context from another process.272*/273#define GRU_STEAL_DELAY ((HZ * 200) / 1000)274275#define STAT(id) do { \276if (gru_options & OPT_STATS) \277atomic_long_inc(&gru_stats.id); \278} while (0)279280#ifdef CONFIG_SGI_GRU_DEBUG281#define gru_dbg(dev, fmt, x...) \282do { \283if (gru_options & OPT_DPRINT) \284printk(KERN_DEBUG "GRU:%d %s: " fmt, smp_processor_id(), __func__, x);\285} while (0)286#else287#define gru_dbg(x...)288#endif289290/*-----------------------------------------------------------------------------291* ASID management292*/293#define MAX_ASID 0xfffff0294#define MIN_ASID 8295#define ASID_INC 8 /* number of regions */296297/* Generate a GRU asid value from a GRU base asid & a virtual address. */298#define VADDR_HI_BIT 64299#define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3)300#define GRUASID(asid, addr) ((asid) + GRUREGION(addr))301302/*------------------------------------------------------------------------------303* File & VMS Tables304*/305306struct gru_state;307308/*309* This structure is pointed to from the mmstruct via the notifier pointer.310* There is one of these per address space.311*/312struct gru_mm_tracker { /* pack to reduce size */313unsigned int mt_asid_gen:24; /* ASID wrap count */314unsigned int mt_asid:24; /* current base ASID for gru */315unsigned short mt_ctxbitmap:16;/* bitmap of contexts using316asid */317} __attribute__ ((packed));318319struct gru_mm_struct {320struct mmu_notifier ms_notifier;321atomic_t ms_refcnt;322spinlock_t ms_asid_lock; /* protects ASID assignment */323atomic_t ms_range_active;/* num range_invals active */324char ms_released;325wait_queue_head_t ms_wait_queue;326DECLARE_BITMAP(ms_asidmap, GRU_MAX_GRUS);327struct gru_mm_tracker ms_asids[GRU_MAX_GRUS];328};329330/*331* One of these structures is allocated when a GSEG is mmaped. The332* structure is pointed to by the vma->vm_private_data field in the vma struct.333*/334struct gru_vma_data {335spinlock_t vd_lock; /* Serialize access to vma */336struct list_head vd_head; /* head of linked list of gts */337long vd_user_options;/* misc user option flags */338int vd_cbr_au_count;339int vd_dsr_au_count;340unsigned char vd_tlb_preload_count;341};342343/*344* One of these is allocated for each thread accessing a mmaped GRU. A linked345* list of these structure is hung off the struct gru_vma_data in the mm_struct.346*/347struct gru_thread_state {348struct list_head ts_next; /* list - head at vma-private */349struct mutex ts_ctxlock; /* load/unload CTX lock */350struct mm_struct *ts_mm; /* mm currently mapped to351context */352struct vm_area_struct *ts_vma; /* vma of GRU context */353struct gru_state *ts_gru; /* GRU where the context is354loaded */355struct gru_mm_struct *ts_gms; /* asid & ioproc struct */356unsigned char ts_tlb_preload_count; /* TLB preload pages */357unsigned long ts_cbr_map; /* map of allocated CBRs */358unsigned long ts_dsr_map; /* map of allocated DATA359resources */360unsigned long ts_steal_jiffies;/* jiffies when context last361stolen */362long ts_user_options;/* misc user option flags */363pid_t ts_tgid_owner; /* task that is using the364context - for migration */365short ts_user_blade_id;/* user selected blade */366char ts_user_chiplet_id;/* user selected chiplet */367unsigned short ts_sizeavail; /* Pagesizes in use */368int ts_tsid; /* thread that owns the369structure */370int ts_tlb_int_select;/* target cpu if interrupts371enabled */372int ts_ctxnum; /* context number where the373context is loaded */374atomic_t ts_refcnt; /* reference count GTS */375unsigned char ts_dsr_au_count;/* Number of DSR resources376required for contest */377unsigned char ts_cbr_au_count;/* Number of CBR resources378required for contest */379char ts_cch_req_slice;/* CCH packet slice */380char ts_blade; /* If >= 0, migrate context if381ref from different blade */382char ts_force_cch_reload;383char ts_cbr_idx[GRU_CBR_AU];/* CBR numbers of each384allocated CB */385int ts_data_valid; /* Indicates if ts_gdata has386valid data */387struct gru_gseg_statistics ustats; /* User statistics */388unsigned long ts_gdata[0]; /* save area for GRU data (CB,389DS, CBE) */390};391392/*393* Threaded programs actually allocate an array of GSEGs when a context is394* created. Each thread uses a separate GSEG. TSID is the index into the GSEG395* array.396*/397#define TSID(a, v) (((a) - (v)->vm_start) / GRU_GSEG_PAGESIZE)398#define UGRUADDR(gts) ((gts)->ts_vma->vm_start + \399(gts)->ts_tsid * GRU_GSEG_PAGESIZE)400401#define NULLCTX (-1) /* if context not loaded into GRU */402403/*-----------------------------------------------------------------------------404* GRU State Tables405*/406407/*408* One of these exists for each GRU chiplet.409*/410struct gru_state {411struct gru_blade_state *gs_blade; /* GRU state for entire412blade */413unsigned long gs_gru_base_paddr; /* Physical address of414gru segments (64) */415void *gs_gru_base_vaddr; /* Virtual address of416gru segments (64) */417unsigned short gs_gid; /* unique GRU number */418unsigned short gs_blade_id; /* blade of GRU */419unsigned char gs_chiplet_id; /* blade chiplet of GRU */420unsigned char gs_tgh_local_shift; /* used to pick TGH for421local flush */422unsigned char gs_tgh_first_remote; /* starting TGH# for423remote flush */424spinlock_t gs_asid_lock; /* lock used for425assigning asids */426spinlock_t gs_lock; /* lock used for427assigning contexts */428429/* -- the following are protected by the gs_asid_lock spinlock ---- */430unsigned int gs_asid; /* Next availe ASID */431unsigned int gs_asid_limit; /* Limit of available432ASIDs */433unsigned int gs_asid_gen; /* asid generation.434Inc on wrap */435436/* --- the following fields are protected by the gs_lock spinlock --- */437unsigned long gs_context_map; /* bitmap to manage438contexts in use */439unsigned long gs_cbr_map; /* bitmap to manage CB440resources */441unsigned long gs_dsr_map; /* bitmap used to manage442DATA resources */443unsigned int gs_reserved_cbrs; /* Number of kernel-444reserved cbrs */445unsigned int gs_reserved_dsr_bytes; /* Bytes of kernel-446reserved dsrs */447unsigned short gs_active_contexts; /* number of contexts448in use */449struct gru_thread_state *gs_gts[GRU_NUM_CCH]; /* GTS currently using450the context */451int gs_irq[GRU_NUM_TFM]; /* Interrupt irqs */452};453454/*455* This structure contains the GRU state for all the GRUs on a blade.456*/457struct gru_blade_state {458void *kernel_cb; /* First kernel459reserved cb */460void *kernel_dsr; /* First kernel461reserved DSR */462struct rw_semaphore bs_kgts_sema; /* lock for kgts */463struct gru_thread_state *bs_kgts; /* GTS for kernel use */464465/* ---- the following are used for managing kernel async GRU CBRs --- */466int bs_async_dsr_bytes; /* DSRs for async */467int bs_async_cbrs; /* CBRs AU for async */468struct completion *bs_async_wq;469470/* ---- the following are protected by the bs_lock spinlock ---- */471spinlock_t bs_lock; /* lock used for472stealing contexts */473int bs_lru_ctxnum; /* STEAL - last context474stolen */475struct gru_state *bs_lru_gru; /* STEAL - last gru476stolen */477478struct gru_state bs_grus[GRU_CHIPLETS_PER_BLADE];479};480481/*-----------------------------------------------------------------------------482* Address Primitives483*/484#define get_tfm_for_cpu(g, c) \485((struct gru_tlb_fault_map *)get_tfm((g)->gs_gru_base_vaddr, (c)))486#define get_tfh_by_index(g, i) \487((struct gru_tlb_fault_handle *)get_tfh((g)->gs_gru_base_vaddr, (i)))488#define get_tgh_by_index(g, i) \489((struct gru_tlb_global_handle *)get_tgh((g)->gs_gru_base_vaddr, (i)))490#define get_cbe_by_index(g, i) \491((struct gru_control_block_extended *)get_cbe((g)->gs_gru_base_vaddr,\492(i)))493494/*-----------------------------------------------------------------------------495* Useful Macros496*/497498/* Given a blade# & chiplet#, get a pointer to the GRU */499#define get_gru(b, c) (&gru_base[b]->bs_grus[c])500501/* Number of bytes to save/restore when unloading/loading GRU contexts */502#define DSR_BYTES(dsr) ((dsr) * GRU_DSR_AU_BYTES)503#define CBR_BYTES(cbr) ((cbr) * GRU_HANDLE_BYTES * GRU_CBR_AU_SIZE * 2)504505/* Convert a user CB number to the actual CBRNUM */506#define thread_cbr_number(gts, n) ((gts)->ts_cbr_idx[(n) / GRU_CBR_AU_SIZE] \507* GRU_CBR_AU_SIZE + (n) % GRU_CBR_AU_SIZE)508509/* Convert a gid to a pointer to the GRU */510#define GID_TO_GRU(gid) \511(gru_base[(gid) / GRU_CHIPLETS_PER_BLADE] ? \512(&gru_base[(gid) / GRU_CHIPLETS_PER_BLADE]-> \513bs_grus[(gid) % GRU_CHIPLETS_PER_BLADE]) : \514NULL)515516/* Scan all active GRUs in a GRU bitmap */517#define for_each_gru_in_bitmap(gid, map) \518for_each_set_bit((gid), (map), GRU_MAX_GRUS)519520/* Scan all active GRUs on a specific blade */521#define for_each_gru_on_blade(gru, nid, i) \522for ((gru) = gru_base[nid]->bs_grus, (i) = 0; \523(i) < GRU_CHIPLETS_PER_BLADE; \524(i)++, (gru)++)525526/* Scan all GRUs */527#define foreach_gid(gid) \528for ((gid) = 0; (gid) < gru_max_gids; (gid)++)529530/* Scan all active GTSs on a gru. Note: must hold ss_lock to use this macro. */531#define for_each_gts_on_gru(gts, gru, ctxnum) \532for ((ctxnum) = 0; (ctxnum) < GRU_NUM_CCH; (ctxnum)++) \533if (((gts) = (gru)->gs_gts[ctxnum]))534535/* Scan each CBR whose bit is set in a TFM (or copy of) */536#define for_each_cbr_in_tfm(i, map) \537for_each_set_bit((i), (map), GRU_NUM_CBE)538539/* Scan each CBR in a CBR bitmap. Note: multiple CBRs in an allocation unit */540#define for_each_cbr_in_allocation_map(i, map, k) \541for_each_set_bit((k), (map), GRU_CBR_AU) \542for ((i) = (k)*GRU_CBR_AU_SIZE; \543(i) < ((k) + 1) * GRU_CBR_AU_SIZE; (i)++)544545/* Scan each DSR in a DSR bitmap. Note: multiple DSRs in an allocation unit */546#define for_each_dsr_in_allocation_map(i, map, k) \547for_each_set_bit((k), (const unsigned long *)(map), GRU_DSR_AU) \548for ((i) = (k) * GRU_DSR_AU_CL; \549(i) < ((k) + 1) * GRU_DSR_AU_CL; (i)++)550551#define gseg_physical_address(gru, ctxnum) \552((gru)->gs_gru_base_paddr + ctxnum * GRU_GSEG_STRIDE)553#define gseg_virtual_address(gru, ctxnum) \554((gru)->gs_gru_base_vaddr + ctxnum * GRU_GSEG_STRIDE)555556/*-----------------------------------------------------------------------------557* Lock / Unlock GRU handles558* Use the "delresp" bit in the handle as a "lock" bit.559*/560561/* Lock hierarchy checking enabled only in emulator */562563/* 0 = lock failed, 1 = locked */564static inline int __trylock_handle(void *h)565{566return !test_and_set_bit(1, h);567}568569static inline void __lock_handle(void *h)570{571while (test_and_set_bit(1, h))572cpu_relax();573}574575static inline void __unlock_handle(void *h)576{577clear_bit(1, h);578}579580static inline int trylock_cch_handle(struct gru_context_configuration_handle *cch)581{582return __trylock_handle(cch);583}584585static inline void lock_cch_handle(struct gru_context_configuration_handle *cch)586{587__lock_handle(cch);588}589590static inline void unlock_cch_handle(struct gru_context_configuration_handle591*cch)592{593__unlock_handle(cch);594}595596static inline void lock_tgh_handle(struct gru_tlb_global_handle *tgh)597{598__lock_handle(tgh);599}600601static inline void unlock_tgh_handle(struct gru_tlb_global_handle *tgh)602{603__unlock_handle(tgh);604}605606static inline int is_kernel_context(struct gru_thread_state *gts)607{608return !gts->ts_mm;609}610611/*612* The following are for Nehelem-EX. A more general scheme is needed for613* future processors.614*/615#define UV_MAX_INT_CORES 8616#define uv_cpu_socket_number(p) ((cpu_physical_id(p) >> 5) & 1)617#define uv_cpu_ht_number(p) (cpu_physical_id(p) & 1)618#define uv_cpu_core_number(p) (((cpu_physical_id(p) >> 2) & 4) | \619((cpu_physical_id(p) >> 1) & 3))620/*-----------------------------------------------------------------------------621* Function prototypes & externs622*/623struct gru_unload_context_req;624625extern const struct vm_operations_struct gru_vm_ops;626extern struct device *grudev;627628extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma,629int tsid);630extern struct gru_thread_state *gru_find_thread_state(struct vm_area_struct631*vma, int tsid);632extern struct gru_thread_state *gru_alloc_thread_state(struct vm_area_struct633*vma, int tsid);634extern struct gru_state *gru_assign_gru_context(struct gru_thread_state *gts);635extern void gru_load_context(struct gru_thread_state *gts);636extern void gru_steal_context(struct gru_thread_state *gts);637extern void gru_unload_context(struct gru_thread_state *gts, int savestate);638extern int gru_update_cch(struct gru_thread_state *gts);639extern void gts_drop(struct gru_thread_state *gts);640extern void gru_tgh_flush_init(struct gru_state *gru);641extern int gru_kservices_init(void);642extern void gru_kservices_exit(void);643extern irqreturn_t gru0_intr(int irq, void *dev_id);644extern irqreturn_t gru1_intr(int irq, void *dev_id);645extern irqreturn_t gru_intr_mblade(int irq, void *dev_id);646extern int gru_dump_chiplet_request(unsigned long arg);647extern long gru_get_gseg_statistics(unsigned long arg);648extern int gru_handle_user_call_os(unsigned long address);649extern int gru_user_flush_tlb(unsigned long arg);650extern int gru_user_unload_context(unsigned long arg);651extern int gru_get_exception_detail(unsigned long arg);652extern int gru_set_context_option(unsigned long address);653extern void gru_check_context_placement(struct gru_thread_state *gts);654extern int gru_cpu_fault_map_id(void);655extern struct vm_area_struct *gru_find_vma(unsigned long vaddr);656extern void gru_flush_all_tlb(struct gru_state *gru);657extern int gru_proc_init(void);658extern void gru_proc_exit(void);659660extern struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma,661int cbr_au_count, int dsr_au_count,662unsigned char tlb_preload_count, int options, int tsid);663extern unsigned long gru_reserve_cb_resources(struct gru_state *gru,664int cbr_au_count, char *cbmap);665extern unsigned long gru_reserve_ds_resources(struct gru_state *gru,666int dsr_au_count, char *dsmap);667extern int gru_fault(struct vm_area_struct *, struct vm_fault *vmf);668extern struct gru_mm_struct *gru_register_mmu_notifier(void);669extern void gru_drop_mmu_notifier(struct gru_mm_struct *gms);670671extern int gru_ktest(unsigned long arg);672extern void gru_flush_tlb_range(struct gru_mm_struct *gms, unsigned long start,673unsigned long len);674675extern unsigned long gru_options;676677#endif /* __GRUTABLES_H__ */678679680