cregit-Linux how code gets into the kernel

Release 4.7 arch/cris/arch-v32/mm/l2cache.c

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <memmap.h>
#include <hwregs/reg_map.h>
#include <hwregs/reg_rdwr.h>
#include <hwregs/l2cache_defs.h>
#include <asm/io.h>


#define L2CACHE_SIZE 64


int __init l2cache_init(void) { reg_l2cache_rw_ctrl ctrl = {0}; reg_l2cache_rw_cfg cfg = {.en = regk_l2cache_yes}; ctrl.csize = L2CACHE_SIZE; ctrl.cbase = L2CACHE_SIZE / 4 + (L2CACHE_SIZE % 4 ? 1 : 0); REG_WR(l2cache, regi_l2cache, rw_ctrl, ctrl); /* Flush the tag memory */ memset((void *)(MEM_INTMEM_START | MEM_NON_CACHEABLE), 0, 2*1024); /* Enable the cache */ REG_WR(l2cache, regi_l2cache, rw_cfg, cfg); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
jesper nilssonjesper nilsson95100.00%1100.00%
Total95100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
jesper nilssonjesper nilsson123100.00%1100.00%
Total123100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}