android_kernel_xiaomi_sm8350/include/asm-ppc64
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
..
iSeries powerpc: move iSeries/HvCallPci.h to platforms/iseries/call_pci.h 2005-10-14 17:16:17 +10:00
abs_addr.h powerpc: move iSeries/iSeries_pci.h to platforms/iseries 2005-10-14 14:51:42 +10:00
bitops.h [PATCH] powerpc: merge atomic.h, memory.h 2005-09-25 22:38:46 +10:00
bootinfo.h
btext.h ppc64: Rearrange btext initialization for consistency with ppc32 2005-10-22 15:36:52 +10:00
cache.h
cacheflush.h
compat.h [PATCH] compat: be more consistent about [ug]id_t 2005-09-07 16:57:19 -07:00
current.h
dart.h ppc64: Fix typo in iommu cleanups that broke pmac build. 2005-09-27 14:24:18 +10:00
delay.h
dma-mapping.h [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
eeh.h [PATCH] basic iomem annotations (ppc64) 2005-09-09 10:31:57 -07:00
floppy.h
futex.h [PATCH] powerpc: merge atomic.h, memory.h 2005-09-25 22:38:46 +10:00
hvcall.h [PATCH] ppc64: Add ptrace data breakpoint support 2005-09-12 17:19:12 +10:00
hvconsole.h
hvcserver.h
ide.h
imalloc.h
io.h [PATCH] powerpc: merge atomic.h, memory.h 2005-09-25 22:38:46 +10:00
ipcbuf.h
kexec.h
lppaca.h
mmu_context.h
mmu.h ppc64 iSeries: Update create_pte_mapping to replace iSeries_bolt_kernel() 2005-09-23 14:47:58 +10:00
mmzone.h
naca.h
numnodes.h
nvram.h
paca.h
page.h [PATCH] powerpc: Merged ppc_asm.h 2005-09-19 09:38:49 +10:00
parport.h
pci-bridge.h ppc64: Add a `primary' argument to pci_process_bridge_OF_ranges 2005-10-22 15:03:21 +10:00
pci.h [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
pgalloc.h
pgtable.h
plpar_wrappers.h [PATCH] ppc64: Add ptrace data breakpoint support 2005-09-12 17:19:12 +10:00
ppc32.h powerpc: merge ppc signal.c and ppc64 signal32.c 2005-10-18 11:17:58 +10:00
ppcdebug.h
prom.h powerpc: move iSeries/iSeries_pci.h to platforms/iseries 2005-10-14 14:51:42 +10:00
ptrace-common.h [PATCH] ppc64: Add ptrace data breakpoint support 2005-09-12 17:19:12 +10:00
ptrace.h [PATCH] ppc64: Add definitions for new PTRACE calls 2005-09-12 17:19:12 +10:00
serial.h
sigcontext.h
signal.h
smp.h powerpc: Move smp_mpic_message_pass into mpic.c 2005-10-20 17:09:51 +10:00
sparsemem.h
spinlock.h [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
sstep.h
stat.h
system.h [PATCH] powerpc: Fix handling of fpscr on 64-bit 2005-10-27 20:48:50 +10:00
systemcfg.h
tce.h [PATCH] ppc64: Updated Olof iommu updates 2/3 2005-09-21 19:21:07 +10:00
tlb.h
tlbflush.h Merge by hand from Linus' tree. 2005-09-29 13:13:36 +10:00
uaccess.h [PATCH] ppc64 get_user annotations 2005-09-29 08:46:27 -07:00
ucontext.h
udbg.h powerpc: Merge in 64-bit powermac support. 2005-10-22 16:02:39 +10:00
vdso.h
xics.h