blob: 78a9ef66288ae6cf6195d40906c7df2cfead1474 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2012 ARM Ltd.
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
6#include <linux/linkage.h>
7#include <linux/const.h>
8#include <asm/assembler.h>
9#include <asm/page.h>
10
11/*
12 * Clear page @dest
13 *
14 * Parameters:
15 * x0 - dest
16 */
17ENTRY(clear_page)
18 mrs x1, dczid_el0
19 and w1, w1, #0xf
20 mov x2, #4
21 lsl x1, x2, x1
22
231: dc zva, x0
24 add x0, x0, x1
25 tst x0, #(PAGE_SIZE - 1)
26 b.ne 1b
27 ret
28ENDPROC(clear_page)
David Brazdil0f672f62019-12-10 10:32:29 +000029EXPORT_SYMBOL(clear_page)