https://github.com/torvalds/linux
Raw File
Tip revision: 0c8efd610b58cb23cefdfa12015799079aef94ae authored by Linus Torvalds on 12 March 2018, 00:25:09 UTC
Linux 4.16-rc5
Tip revision: 0c8efd6
cacheflush.c
/*
 * Copyright (C) 2017 SiFive
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU General Public License
 *   as published by the Free Software Foundation, version 2.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 */

#include <asm/pgtable.h>
#include <asm/cacheflush.h>

void flush_icache_pte(pte_t pte)
{
	struct page *page = pte_page(pte);

	if (!test_and_set_bit(PG_dcache_clean, &page->flags))
		flush_icache_all();
}
back to top