android_kernel_xiaomi_sm8350/include
David Gibson 25c8a78b1e [PATCH] powerpc: Fix handling of fpscr on 64-bit
The recent merge of fpu.S broken the handling of fpscr for
ARCH=powerpc and CONFIG_PPC64=y.  FP registers could be corrupted,
leading to strange random application crashes.

The confusion arises, because the thread_struct has (and requires) a
64-bit area to save the fpscr, because we use load/store double
instructions to get it in to/out of the FPU.  However, only the low
32-bits are actually used, so we want to treat it as a 32-bit quantity
when manipulating its bits to avoid extra load/stores on 32-bit.  This
patch replaces the current definition with a structure of two 32-bit
quantities (pad and val), to clarify things as much as is possible.
The 'val' field is used when manipulating bits, the structure itself
is used when obtaining the address for loading/unloading the value
from the FPU.

While we're at it, consolidate the 4 (!) almost identical versions of
cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
arch/powerpc/kernel/misc_64.S) into a single version in fpu.S.  The
new version takes a pointer to thread_struct and applies the correct
offset itself, rather than a pointer to the fpscr field itself, again
to avoid confusion as to which is the correct field to use.

Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
code, which it previously did not.

Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
Booted on G5 (ARCH=powerpc) and things which previously fell over no
longer do.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27 20:48:50 +10:00
..
acpi
asm-alpha
asm-arm [ARM] 3028/1: S3C2410 - add DCLK mask definitions 2005-10-20 23:21:20 +01:00
asm-arm26
asm-cris
asm-frv
asm-generic [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
asm-h8300
asm-i386 [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
asm-ia64 [PATCH] ia64 basic __user annotations 2005-09-29 08:46:27 -07:00
asm-m32r [PATCH] m32r: more basic __user annotations 2005-09-26 18:29:50 -07:00
asm-m68k
asm-m68knommu
asm-mips [PATCH] mm: move_pte to remap ZERO_PAGE 2005-09-28 07:46:40 -07:00
asm-parisc
asm-powerpc [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
asm-ppc [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
asm-ppc64 [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
asm-s390 [PATCH] s390 signal annotations 2005-09-29 08:46:27 -07:00
asm-sh
asm-sh64
asm-sparc [PATCH] fix the breakage in sparc headers 2005-10-05 07:33:42 -07:00
asm-sparc64 [SPARC64]: Eliminate PCI IOMMU dma mapping size limit. 2005-10-13 22:15:24 -07:00
asm-um [PATCH] uml: Fix sysrq-r support for skas mode 2005-10-04 13:22:01 -07:00
asm-v850
asm-x86_64 [PATCH] x86_64: Allocate cpu local data for all possible CPUs 2005-10-10 16:33:25 -07:00
asm-xtensa
linux [PATCH] Fix handling spurious page fault for hugetlb region 2005-10-20 09:02:07 -07:00
math-emu
media
mtd
net [TWSK]: Grab the module refcount for timewait sockets 2005-10-10 21:25:23 -07:00
pcmcia [PATCH] yenta: auto-tune EnE bridges for CardBus cards 2005-09-26 13:09:20 +02:00
rdma [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
rxrpc [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
scsi [SCSI] allow REPORT LUN scanning even for LUN 0 PQ of 3 2005-09-25 12:01:48 -05:00
sound [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
video