summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/scs.c
blob: adc97f826faba1f644289482d19990432a03aff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: GPL-2.0
/*
 * Shadow Call Stack support.
 *
 * Copyright (C) 2019 Google LLC
 */

#include <linux/percpu.h>
#include <asm/scs.h>

/* Allocate a static per-CPU shadow stack */
#define DEFINE_SCS(name)						\
	DEFINE_PER_CPU(unsigned long [SCS_SIZE/sizeof(long)], name)	\

DEFINE_SCS(irq_shadow_call_stack);

#ifdef CONFIG_ARM_SDE_INTERFACE
DEFINE_SCS(sdei_shadow_call_stack_normal);
DEFINE_SCS(sdei_shadow_call_stack_critical);
#endif