powerpc: clean up empty lines in .c and .h files
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill not MPSAFE (or already are but aren’t properly marked).Use it in preparation for a general review of all nodes.This is non-functional change that adds annotations to SYSCTL_NODE andSYSCTL_PROC nodes using one of the soon-to-be-required flags.Mark all obvious cases as MPSAFE. All entries that haven't been markedas MPSAFE before are by default marked as NEEDGIANTApproved by: kib (mentor, blanket)Commented by: kib, gallatin, melifaroDifferential Revision: https://reviews.freebsd.org/D23718
show more ...
powerpc: Apply r178139 from sparc64 to powerpc's fpu_sqrtThis fix was committed less than 2 months after the code was forked into thepowerpc kernel. Though powerpc doesn't use quad-precision floa
powerpc: Apply r178139 from sparc64 to powerpc's fpu_sqrtThis fix was committed less than 2 months after the code was forked into thepowerpc kernel. Though powerpc doesn't use quad-precision floating point,or need it for emulation, the changes do look like correctness fixesoverall.This was found while trying to get fsqrt emulation working on e5500, whichdoes have a real FPU, but lacks the fsqrt instruction. This is not thecomplete fix, the rest is to be committed separately.MFC after: 1 week
powerpc: Fix FPU fsqrt emulation special case resultsIf fsqrts is emulated with +INF as its argument, the 0 return value causes aNULL pointer dereference, panicking the system. Follow the PowerIS
powerpc: Fix FPU fsqrt emulation special case resultsIf fsqrts is emulated with +INF as its argument, the 0 return value causes aNULL pointer dereference, panicking the system. Follow the PowerISA andreturn +INF with no FP exception.MFC after: 1 week
powerpc: Sync icache on SIGILL, in case of cache issuesThe update of jemalloc to 5.1.0 exposed a cache syncing issue on a Freescalee500 base system. There was already code in the FPU emulator to
powerpc: Sync icache on SIGILL, in case of cache issuesThe update of jemalloc to 5.1.0 exposed a cache syncing issue on a Freescalee500 base system. There was already code in the FPU emulator to addressthis, but it was limited to a single static variable, and did not attempt tosync the cache. This pulls that out to the higher level program exceptionhandler, and syncs the cache.If a SIGILL is hit a second time at the same address, it will be treated asa real illegal instruction, and handled accordingly.
sys/powerpc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - e
sys/powerpc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
sys: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for
sys: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 3-Clause license.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.Special thanks to Wind River for providing access to "The Duke ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.
spdx: initial adoption of licensing ID tags.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensou
spdx: initial adoption of licensing ID tags.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.Special thanks to Wind River for providing access to "The Duke ofHighlander" tool: an older (2014) run over FreeBSD tree was useful as astarting point.Initially, only tag files that use BSD 4-Clause "Original" license.RelNotes: yesDifferential Revision: https://reviews.freebsd.org/D13133
Un-static two local variables in the FPU emulatorStatic variables aren't MP-safe, and this was causing bizarre segfaults on adual-core e500v2 system (P1022).Still left is one static variable, wh
Un-static two local variables in the FPU emulatorStatic variables aren't MP-safe, and this was causing bizarre segfaults on adual-core e500v2 system (P1022).Still left is one static variable, which should be moved into the pcb instead,but as illegal instructions haven't been hit yet, it's lower priority.MFC after: 1 week
Fix build of powerpc FPU emulator after changes in r295132 to restore theABI of struct fpreg. The FPU emulator operates on the "raw" FPU statestored in the pcb rather than the "cooked" fpreg state
Fix build of powerpc FPU emulator after changes in r295132 to restore theABI of struct fpreg. The FPU emulator operates on the "raw" FPU statestored in the pcb rather than the "cooked" fpreg state used for ptrace()and cores.Reported by: bz
Restore the ABI of 'struct fpreg' on powerpc.The PT_{GET,SET}FPREGS requests use 'struct fpreg' and the NT_FPREGSETcore note stores a copy of 'struct fpreg'. As with x86 and the floatingpoint st
Restore the ABI of 'struct fpreg' on powerpc.The PT_{GET,SET}FPREGS requests use 'struct fpreg' and the NT_FPREGSETcore note stores a copy of 'struct fpreg'. As with x86 and the floatingpoint state there compared to the extended state in XSAVE, struct fpregon powerpc now only holds the 'base' FP state, and setting it viaPT_SETFPREGS leaves the extended vector state in a thread unchanged.Reviewed by: jhibbitsDifferential Revision: https://reviews.freebsd.org/D5004
Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7and POWER8. This instruction set unifies the 32 64-bit scalar floatingpoint registers with the 32 128-bit vector registers in
Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7and POWER8. This instruction set unifies the 32 64-bit scalar floatingpoint registers with the 32 128-bit vector registers into a single bankof 64 128-bit registers. Kernel support mostly amounts to saving andrestoring the wider version of the floating point registers and makingsure that both scalar FP and vector registers are enabled once a VSXinstruction is executed. get_mcontext() and friends currently cannotsee the high bits, which will require a little more work.As the system compiler (GCC 4.2) does not support VSX, making use of thisfrom userland requires either newer GCC or clang.Relnotes: yesSponsored by: FreeBSD Foundation
Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it forpowerpc64. This fixes the LINT64 kernel config.Approved by: nwhitehorn (the idea, not the actual patch)
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bi
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bit int, but does fix the issuefor most cases.A similar change was made in OpenBSD.Discussed with: -arch, rdivackyReviewed by: cperciva
Make single precision floating point arithmetic actually work -- I thinkit never did -- and fix an obvious missing line. Floating point emulationon Book-E still needs some work but this gets it bas
Make single precision floating point arithmetic actually work -- I thinkit never did -- and fix an obvious missing line. Floating point emulationon Book-E still needs some work but this gets it basically functional onsoft-FPU systems (hard FPU for Book-E is not yet implemented).MFC after: 1 week
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else,
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else, there's noreason why it shouldn't be static.
The NetBSD Foundation has granted permission to remove clause 3 and 4 fromtheir software.Obtained from: NetBSD
Include <sys/types.h> before <sys/systm.h> to get typedefs requiredby new atomic.h. Fixes tinderbox LINT build.
Don't define DEBUG. No debugging required.Pointy hat: marcel
Resolve warnings exposed by LINT.o Put prototypes in a single header only.o Fix printf format specifiers.
Add a floating-point emulator so that a single userland or single ABIcan run on processors that don't have a FPU. This is typically thecase for Book E processors. While a tuned system will probably
Add a floating-point emulator so that a single userland or single ABIcan run on processors that don't have a FPU. This is typically thecase for Book E processors. While a tuned system will probably wantto use soft-float (or use a processor that has a FPU if the usage isFP intensive enough), allowing hard-float on FPU-less systems givesgreat portability and flexibility.Obtained from: NetBSD