mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 17:46:15 +07:00
fc69910f32
After the split of linux/sched.h, several platforms in arch/mips stopped building.
Add the respective additional #include statements to fix the problem I first
tried adding these into asm/processor.h, but ran into circular header
dependencies with that which I could not figure out.
The commit I listed as causing the problem is the branch merge, as there is
likely a combination of multiple patches in that branch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: ralf@linux-mips.org
Fixes: 1827adb11a
("Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
Link: http://lkml.kernel.org/r/20170308072931.3836696-1-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2009 Wind River Systems,
|
|
* written by Ralf Baechle <ralf@linux-mips.org>
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/irqflags.h>
|
|
#include <linux/notifier.h>
|
|
#include <linux/prefetch.h>
|
|
#include <linux/ptrace.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/sched/task_stack.h>
|
|
|
|
#include <asm/cop2.h>
|
|
#include <asm/current.h>
|
|
#include <asm/mipsregs.h>
|
|
#include <asm/page.h>
|
|
#include <asm/octeon/octeon.h>
|
|
|
|
static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action,
|
|
void *data)
|
|
{
|
|
unsigned long flags;
|
|
unsigned int status;
|
|
|
|
switch (action) {
|
|
case CU2_EXCEPTION:
|
|
prefetch(¤t->thread.cp2);
|
|
local_irq_save(flags);
|
|
KSTK_STATUS(current) |= ST0_CU2;
|
|
status = read_c0_status();
|
|
write_c0_status(status | ST0_CU2);
|
|
octeon_cop2_restore(&(current->thread.cp2));
|
|
write_c0_status(status & ~ST0_CU2);
|
|
local_irq_restore(flags);
|
|
|
|
return NOTIFY_BAD; /* Don't call default notifier */
|
|
}
|
|
|
|
return NOTIFY_OK; /* Let default notifier send signals */
|
|
}
|
|
|
|
static int __init cnmips_cu2_setup(void)
|
|
{
|
|
return cu2_notifier(cnmips_cu2_call, 0);
|
|
}
|
|
early_initcall(cnmips_cu2_setup);
|