History log of /freebsd/sys/powerpc/include/cpufunc.h (Results 1 – 25 of 92)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# a8926207 06-Jul-2023 Mitchell Horne <mhorne@FreeBSD.org>

Consistently provide ffs/fls using builtins

Use of compiler builtin ffs/ctz functions will result in optimized
instruction sequences when possible, and fall back to calling a function
provided by th

Consistently provide ffs/fls using builtins

Use of compiler builtin ffs/ctz functions will result in optimized
instruction sequences when possible, and fall back to calling a function
provided by the compiler run-time library. We have slowly shifted our
platforms to take advantage of these builtins in 60645781d613 (arm64),
1c76d3a9fbef (arm), 9e319462a03a (powerpc, partial).

Some platforms still rely on the libkern implementations of these
functions provided by libkern, namely riscv, powerpc (ffs*, flsll), and
i386 (ffsll and flsll). These routines are slow, as they perform a
linear search for the bit in question. Even on platforms lacking
dedicated bit-search instructions, such as riscv, the compiler library
will provide better-optimized routines, e.g. by using binary search.

Consolidate all definitions of these functions (whether currently using
builtins or not) to libkern.h. This should result in equivalent or
better performing routines in all cases.

One wart in all of this is the existing HAVE_INLINE_F*** macros, which
we use in a few places to conditionally avoid the slow libkern routines.
These aren't easily removed in one commit. For now, provide these
defines unconditionally, but marked for removal after subsequent
cleanup.

Removal of the now unused libkern routines will follow in the next
commit.

Reviewed by: dougm, imp (previous version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40698

show more ...


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0
# 7844e5a4 28-Jul-2021 Leandro Lupori <luporl@FreeBSD.org>

powerpc: change mfpvr return type to uint32_t

As the Processor Version Register (PVR) is a 32-bit PowerPC
register, change mfpvr() return type to match it and avoid
type casts on its callers.

Sugge

powerpc: change mfpvr return type to uint32_t

As the Processor Version Register (PVR) is a 32-bit PowerPC
register, change mfpvr() return type to match it and avoid
type casts on its callers.

Suggested by: jhibbits
Reviewed by: jhibbits, imp
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D31332

show more ...


Revision tags: release/13.0.0
# ab571179 13-Dec-2020 Brandon Bergren <bdragon@FreeBSD.org>

[PowerPC] Floating-point exception trap followup

* Fix incorrect operation on 32-bit caused by incorrectly-sized storage
for a temporary FPSCR.
* Fix several whitespace problems.
* Don't try to en

[PowerPC] Floating-point exception trap followup

* Fix incorrect operation on 32-bit caused by incorrectly-sized storage
for a temporary FPSCR.
* Fix several whitespace problems.
* Don't try to enable VSX during cleanup_fpscr().

Reviewed by: alfredo, jhibbits (earlier version)
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D27453

show more ...


# 5d0e8619 06-Nov-2020 Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>

[POWERPC] Floating-Point Exception trap support

Add support for Floating-Point Exception traps on 32 and 64 bit platforms.
Also make sure to clean FPSCR on EXEC and thread exit

Author of initial ve

[POWERPC] Floating-Point Exception trap support

Add support for Floating-Point Exception traps on 32 and 64 bit platforms.
Also make sure to clean FPSCR on EXEC and thread exit

Author of initial version: Renato Riolino <renato.riolino@eldorad.org.br>

Reviewed by: jhibbits
Sponsored by: Eldorado Research Institute (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D23623

show more ...


Revision tags: release/12.2.0
# b64b3133 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

powerpc: clean up empty lines in .c and .h files


Revision tags: release/11.4.0
# 65bbba25 11-May-2020 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc64: Implement Radix MMU for POWER9 CPUs

Summary:
POWER9 supports two MMU formats: traditional hashed page tables, and Radix
page tables, similar to what's presesnt on most other architectures

powerpc64: Implement Radix MMU for POWER9 CPUs

Summary:
POWER9 supports two MMU formats: traditional hashed page tables, and Radix
page tables, similar to what's presesnt on most other architectures. The
PowerISA also specifies a process table -- a table of page table pointers--
which on the POWER9 is only available with the Radix MMU, so we can take
advantage of it with the Radix MMU driver.

Written by Matt Macy.

Differential Revision: https://reviews.freebsd.org/D19516

show more ...


# 9e319462 08-Dec-2019 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc: Use builtins for fls/flsl

Summary:
There's no need to use the fallback fls() and flsl() libkern functions
when the PowerISA includes instructions that already do the bulk of the
work. Take

powerpc: Use builtins for fls/flsl

Summary:
There's no need to use the fallback fls() and flsl() libkern functions
when the PowerISA includes instructions that already do the bulk of the
work. Take advantage of this through the GCC builtins __builtin_clz()
and __builtin_clzl().

Reviewed by: luporl
Differential Revision: https://reviews.freebsd.org/D22340

show more ...


Revision tags: release/12.1.0, release/11.3.0
# 7648bc9f 13-May-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @347527

Sponsored by: The FreeBSD Foundation


# e92d228b 12-Apr-2019 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc: Adjust priority NOPs, and make them functions

PowerISA 2.07 and PowerISA 3.0 both specify special NOPs for priority
adjustments, with "medium" priority being normal. We had been setting
me

powerpc: Adjust priority NOPs, and make them functions

PowerISA 2.07 and PowerISA 3.0 both specify special NOPs for priority
adjustments, with "medium" priority being normal. We had been setting
medium-low as our normal priority. Rather than guess each time as to what
we want and the right NOP, wrap them in inline functions, and replace the
occurrances of the NOPs with the functions. Also, make DELAY() drop to very
low priority while waiting, so we don't burn CPU.

Coupled with r346143, this shaves off a modest 5-8% on buildworld times with
-j72. There may be more room for improvement with judicious use of these
NOPs.

MFC after: 2 weeks

show more ...


Revision tags: release/12.0.0, release/11.2.0
# 71e3c308 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/powerpc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was 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 I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 6ae9acde 23-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r313896 through r314128.


# e2a8d178 19-Feb-2017 Jason A. Harmening <jah@FreeBSD.org>

Bring back r313037, with fixes for mips:

Implement get_pcpu() for amd64/sparc64/mips/powerpc, and use it to
replace pcpu_find(curcpu) in MI code.

Reviewed by: andreast, kan, lidl
Tested by: lidl(mi

Bring back r313037, with fixes for mips:

Implement get_pcpu() for amd64/sparc64/mips/powerpc, and use it to
replace pcpu_find(curcpu) in MI code.

Reviewed by: andreast, kan, lidl
Tested by: lidl(mips, sparc64), andreast(powerpc)
Differential Revision: https://reviews.freebsd.org/D9587

show more ...


# f9edb084 05-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r313055 through r313300.


# ad62ba6e 04-Feb-2017 Jason A. Harmening <jah@FreeBSD.org>

Revert r313037

The switch to get_pcpu() in MI code seems to cause hangs on MIPS.
Back out until we can get a better idea of what's happening there.

Reported by: kan, lidl


# 71fe94fd 01-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r312968 through r313054.


# 65ed4836 01-Feb-2017 Jason A. Harmening <jah@FreeBSD.org>

Implement get_pcpu() for the remaining architectures and use it to
replace pcpu_find(curcpu) in MI code.


# 3a091dba 25-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r309166 through r309169.


# 5ccc0779 25-Nov-2016 Justin Hibbits <jhibbits@FreeBSD.org>

Add an isync to after mtsrin, required by the MPC750 errata

MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr,
mtsrin, and mtmsr all require a isync after the instruction and

Add an isync to after mtsrin, required by the MPC750 errata

MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr,
mtsrin, and mtmsr all require a isync after the instruction and before data
address translation uses any of the segment registers. This should make FreeBSD
run correctly on the G3 again.

Reported by: Mark Millard
MFC after: 1 week

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0
# 6a068746 15-May-2012 Alexander Motin <mav@FreeBSD.org>

MFC


# 3d328873 30-Apr-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Merge head r233826 through r234834.


# 38f1b189 26-Apr-2012 Peter Grehan <grehan@FreeBSD.org>

IFC @ r234692

sys/amd64/include/cpufunc.h
sys/amd64/include/fpu.h
sys/amd64/amd64/fpu.c
sys/amd64/vmm/vmm.c

- Add API to allow vmm FPU state init/save/restore.

FP stuff discussed with: kib


# 14758466 22-Apr-2012 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Correctly specify assembler constrains for synchronization instructions.

MFC after: 3 days


# a1f8f448 22-Apr-2012 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Remove dead code. The routines in atomic.S did not work properly anyway, and
were everywhere unused. If we turn out to need them, they should be
reimplemented.

MFC after: 2 weeks


1234