freebsd-skq/sys/powerpc
Leandro Lupori 59621b207c [PPC64] Fix mismatch between thread flags and MSR
When sigreturn() restored a thread's context, SRR1 was being restored
to its previous value, but pcb_flags was not being touched.

This could cause a mismatch between the thread's MSR and its pcb_flags.
For instance, when the thread used the FPU for the first time inside
the signal handler, sigreturn() would clear SRR1, but not pcb_flags.
Then, the thread would return with the FPU bit cleared in MSR and,
the next time it tried to use the FPU, it would fail on a KASSERT
that checked if the FPU was disabled.

This change clears the FPU bit in both pcb_flags and frame->srr1,
as the code that restores the context expects to use the FPU trap
to re-enable it.

PR:		234539
Reported by:	sbruno
Reviewed by:	jhibbits, sbruno
Differential Revision:	https://reviews.freebsd.org/D19166
2019-02-14 15:15:32 +00:00
..
aim [ppc64] prevent infinite loop on icache sync 2019-02-12 11:29:03 +00:00
booke powerpc/booke: Use the 'tlbilx' instruction on newer cores 2019-02-13 03:11:12 +00:00
conf powerpc: Clamp MAXCPU for MPC85XXSPE kernel to 2 2019-02-10 20:21:20 +00:00
cpufreq pmcr: Fix pstate setting on Power8 2018-12-01 21:37:47 +00:00
fpu powerpc: Fix FPU fsqrt emulation special case results 2019-01-16 03:52:43 +00:00
include powerpc: Bind IRQs to only one interrupt on QorIQ SoCs 2019-02-06 03:52:14 +00:00
mambo sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx powerpc/booke: Replace a logical equivalent of pmap_kextract() with a real call 2018-12-10 04:16:40 +00:00
ofw powerpc: Bind IRQs to only one interrupt on QorIQ SoCs 2019-02-06 03:52:14 +00:00
powermac powerpc: Add opaque 'private data' to interrupt vectors 2019-01-12 22:05:42 +00:00
powernv powerpc/powernv: Add a driver for the POWER9 XIVE interrupt controller 2019-02-02 04:15:16 +00:00
powerpc [PPC64] Fix mismatch between thread flags and MSR 2019-02-14 15:15:32 +00:00
ps3 powerpc: Add opaque 'private data' to interrupt vectors 2019-01-12 22:05:42 +00:00
pseries [ppc64] llan: fix fatal kernel trap when system is low on memory 2019-02-05 18:16:14 +00:00
psim add snps IP uart support / genaralize UART 2018-08-19 21:10:21 +00:00