cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

setup.c (586B)


      1// SPDX-License-Identifier: GPL-2.0-or-later
      2/*
      3 * Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
      4 * Author: Fuxin Zhang, zhangfx@lemote.com
      5 */
      6#include <linux/export.h>
      7#include <linux/init.h>
      8
      9#include <asm/wbflush.h>
     10#include <asm/bootinfo.h>
     11
     12#include <loongson.h>
     13
     14static void wbflush_loongson(void)
     15{
     16	asm(".set\tpush\n\t"
     17	    ".set\tnoreorder\n\t"
     18	    ".set mips3\n\t"
     19	    "sync\n\t"
     20	    "nop\n\t"
     21	    ".set\tpop\n\t"
     22	    ".set mips0\n\t");
     23}
     24
     25void (*__wbflush)(void) = wbflush_loongson;
     26EXPORT_SYMBOL(__wbflush);
     27
     28void __init plat_mem_setup(void)
     29{
     30}