summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dexcr.c
blob: d5cd77421088d8332b76d1842fe10b639d20bfc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: GPL-2.0-or-later

#include <linux/capability.h>
#include <linux/cpu.h>
#include <linux/init.h>
#include <linux/prctl.h>
#include <linux/sched.h>

#include <asm/cpu_has_feature.h>
#include <asm/cputable.h>
#include <asm/processor.h>
#include <asm/reg.h>

static int __init init_task_dexcr(void)
{
	if (!early_cpu_has_feature(CPU_FTR_ARCH_31))
		return 0;

	current->thread.dexcr_onexec = mfspr(SPRN_DEXCR);

	return 0;
}
early_initcall(init_task_dexcr)