aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Centralize __pcpu definitions.Konstantin Belousov2019-08-291-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | Many extern struct pcpu <something>__pcpu declarations were copied/pasted in sources. The issue is that the definition is MD, but it cannot be provided by machine/pcpu.h due to actual struct pcpu defined in sys/pcpu.h later than the inclusion of machine/pcpu.h. This forced the copying when other code needed direct access to __pcpu. There is no way around it, due to machine/pcpu.h supplying part of struct pcpu fields. To work around the problem, add a new machine/pcpu_aux.h header, which should fill any needed MD definitions after struct pcpu definition is completed. This allows to remove copies of __pcpu spread around the source. Also on x86 it makes it possible to remove work arounds like OFFSETOF_CURTHREAD or clang specific warnings supressions. Reported and tested by: lwhsu, bcran Reviewed by: imp, markj (previous version) Discussed with: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D21418 Notes: svn path=/head/; revision=351594
* mips: hide regnum definitions behind _KERNEL/_WANT_MIPS_REGNUMKyle Evans2019-08-221-5/+6
| | | | | | | | | | | | | | | | | | | machine/regnum.h ends up being included by sys/procfs.h and sys/ptrace.h via machine/reg.h. Many of the regnum definitions are too short and too generic to be exposing to any userland application including one of these two headers. Moreover, these actively cause build failures in googletest (template <typename T1 ...> expanding to template <typename 9 ...>). Hide the definitions behind _KERNEL or _WANT_MIPS_REGNUM, and patch all of the userland consumers to define as needed. Discussed with: imp, jhb Reviewed by: imp, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21330 Notes: svn path=/head/; revision=351409
* mips: avoid empty mdproc structKyle Evans2019-08-191-1/+2
| | | | | | | | Compiling with a more modern toolchain than GCC 4.2 in base warns about the empty struct. Take a hint and comment from r350902+r350953 by luporl@. Notes: svn path=/head/; revision=351227
* Move phys_avail definition into MI code. It is consumed in the MI layer andJeff Roberson2019-08-161-6/+2
| | | | | | | | | | | doing so adds more flexibility with less redundant code. Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21250 Notes: svn path=/head/; revision=351108
* mips: Implement basic pmap_kenter_device, pmap_kremove_deviceConrad Meyer2019-05-161-0/+2
| | | | | | | | | | | Unbreak mips.BERI_DE4_SDROOT build, which uses device xdma. Device xdma depends on the pmap_kenter_device APIs. Reported by: tinderbox (local) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=347888
* amd64 KPTI: add control from procctl(2).Konstantin Belousov2019-03-161-0/+4
| | | | | | | | | | | | | | | | | Add the infrastructure to allow MD procctl(2) commands, and use it to introduce amd64 PTI control and reporting. PTI mode cannot be modified for existing pmap, the knob controls PTI of the new vmspace created on exec. Requested by: jhb Reviewed by: jhb, markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19514 Notes: svn path=/head/; revision=345228
* Remove obsolete wrappers for 64-bit loads/stores which were only used by theJuli Mallett2019-03-161-10/+2
| | | | | | | | | removed (r342255) SiByte port. Reviewed by: imp Notes: svn path=/head/; revision=345221
* Add kernel support for Intel userspace protection keys feature onKonstantin Belousov2019-02-201-0/+7
| | | | | | | | | | | | | | | | Skylake Xeons. See SDM rev. 68 Vol 3 4.6.2 Protection Keys and the description of the RDPKRU and WRPKRU instructions. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D18893 Notes: svn path=/head/; revision=344353
* Remove a few stray "All Rights Reserved." declarations on stuff I'veWarner Losh2019-02-051-1/+1
| | | | | | | written. Notes: svn path=/head/; revision=343810
* atomic_cmpset return value is also an int.Warner Losh2018-12-141-8/+8
| | | | Notes: svn path=/head/; revision=342095
* atomic_fcmpset* return int, not the type of *.Warner Losh2018-12-141-8/+8
| | | | | | | | | | | fcmpset returns true/false as a int, so make the return types and variables match the int to be consistent with other arch. Reviewed by: cognet@ Differential Revision: https://reviews.freebsd.org/D18557 Notes: svn path=/head/; revision=342094
* Correctly implemenet atomic_swap_long for mips64.Warner Losh2018-12-131-6/+9
| | | | | | | | | | | MIPS64 has 64-bit longs, so use uint64_t for it, otherwise uint32_t. sizeof(long) == sizeof(ptr) for all platforms, so define atomic_swap_ptr in terms of atomic_swap_long. Submitted by: hps@ Notes: svn path=/head/; revision=342022
* Implement atomic_swap_xxx() for all platforms.Hans Petter Selasky2018-12-101-0/+64
| | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D18450 Reviewed by: kib@ MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=341787
* Add a KPI for the delay while spinning on a spin lock.John Baldwin2018-11-051-0/+1
| | | | | | | | | | | | | Replace a call to DELAY(1) with a new cpu_lock_delay() KPI. Currently cpu_lock_delay() is defined to DELAY(1) on all platforms. However, platforms with a DELAY() implementation that uses spin locks should implement a custom cpu_lock_delay() doesn't use locks. Reviewed by: kib MFC after: 3 days Notes: svn path=/head/; revision=340164
* Consolidate identical ELF auxargs type defintions.Brooks Davis2018-10-221-31/+0
| | | | | | | | | | | | | | | All platforms except powerpc use the same values and powerpc shares a majority of them. Go ahead and declare AT_NOTELF, AT_UID, and AT_EUID in favor of the unused AT_DCACHEBSIZE, AT_ICACHEBSIZE, and AT_UCACHEBSIZE for powerpc. Reviewed by: jhb, imp Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17397 Notes: svn path=/head/; revision=339625
* Make cache coherency attributes definitions available in machine/vm.h on MIPS.Konstantin Belousov2018-08-013-90/+158
| | | | | | | | | | | | Move definitions from cpuregs.h into the cca.h, and include cca.h into vm.h. This is required to make MIPS MD memattr definitions usable in userspace. Sponsored by: The FreeBSD Foundation, Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D15583 Notes: svn path=/head/; revision=337048
* Back pcpu zone with domain correct pagesMatt Macy2018-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - Change pcpu zone consumers to use a stride size of PAGE_SIZE. (defined as UMA_PCPU_ALLOC_SIZE to make future identification easier) - Allocate page from the correct domain for a given cpu. - Don't initialize pc_domain to non-zero value if NUMA is not defined There are some misconceptions surrounding this field. It is the _VM_ NUMA domain and should only ever correspond to valid domain values as understood by the VM. The former slab size of sizeof(struct pcpu) was somewhat arbitrary. The new value is PAGE_SIZE because that's the smallest granularity which the VM can allocate a slab for a given domain. If you have fewer than PAGE_SIZE/8 counters on your system there will be some memory wasted, but this is obviously something where you want the cache line to be coming from the correct domain. Reviewed by: jeff Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15933 Notes: svn path=/head/; revision=336020
* Fix PT_STEP single-stepping for mips.John Baldwin2018-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that GDB at least implements single stepping for MIPS using software breakpoints explicitly rather than using PT_STEP, so this has only been tested via tests in ptrace_test which now pass rather than fail. - Fix several places to use uintptr_t instead of int for virtual addresses. - Check for errors from ptrace_read_int() when setting a breakpoint for a step. - Properly check for errors from ptrace_write_int() as it returns non-zero, not negative values on failure. - Change the error returns for ptrace_read_int() and ptrace_write_int() from ENOMEM to EFAULT. - Clear a single step breakpoint when it traps rather than waiting for it to be cleared from ptrace(). This matches the behavior of the arm port and in general seems a bit more reliable than waiting for ptrace() to clear it via FIX_SSTEP. - Drop the PROC_LOCK around ptrace_write_int() in ptrace_clear_single_step() since it can sleep. - Reorder the breakpoint handler in trap() to only read the instruction if the address matches the current thread's breakpoint address. - Replace various #if 0'd debugging printfs with KTR_PTRACE traces. Tested on: mips64 Notes: svn path=/head/; revision=332951
* Expose breakpoint() to userland from <machine/cpufunc.h> on MIPS.John Baldwin2018-04-241-6/+6
| | | | | | | | | | Enable ptrace() tests using breakpoint on MIPS as well. Tested on: mips64 MFC after: 1 month Notes: svn path=/head/; revision=332907
* No need to force md code to define a macro that's the same asWarner Losh2018-04-161-5/+0
| | | | | | | _BYTE_ORDER. Use that instead. Notes: svn path=/head/; revision=332563
* Add SMP support for BERI CPU.Ruslan Bukin2018-04-122-0/+9
| | | | | | | | Obtained from: CheriBSD Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=332441
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-064-16/+0
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Move remaining EF_MIPS_* flags to <sys/elf_common.h>.John Baldwin2018-03-231-20/+0
| | | | | | | | | Reviewed by: brooks Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D14789 Notes: svn path=/head/; revision=331459
* MIPS: Implement fue*word* and casueword* in assembly.Brooks Davis2018-03-121-4/+0
| | | | | | | | | | | | | Remove NO_FUEWORD so the 'e' variants are wrapped by the non-'e' variants. This is more correct and leaves sparc64 as the outlier. Reviewed by: jmallett, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14603 Notes: svn path=/head/; revision=330817
* amd64: Protect the kernel text, data, and BSS by setting the RW/NX bitsJonathan T. Looney2018-03-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly for the data contained on each memory page. There are several components to this change: * Add a variable to indicate the start of the R/W portion of the initial memory. * Stop detecting NX bit support for each AP. Instead, use the value from the BSP and, if supported, activate the feature on the other APs just before loading the correct page table. (Functionally, we already assume that the BSP and all APs had the same support or lack of support for the NX bit.) * Set the RW and NX bits correctly for the kernel text, data, and BSS (subject to some caveats below). * Ensure DDB can write to memory when necessary (such as to set a breakpoint). * Ensure GDB can write to memory when necessary (such as to set a breakpoint). For this purpose, add new MD functions gdb_begin_write() and gdb_end_write() which the GDB support code can call before and after writing to memory. This change is not comprehensive: * It doesn't do anything to protect modules. * It doesn't do anything for kernel memory allocated after the kernel starts running. * In order to avoid excessive memory inefficiency, it may let multiple types of data share a 2M page, and assigns the most permissions needed for data on that page. Reviewed by: jhb, kib Discussed with: emaste MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14282 Notes: svn path=/head/; revision=330539
* Do not include float interfaces when using libsa.Warner Losh2018-02-231-0/+2
| | | | | | | | | | We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage. Notes: svn path=/head/; revision=329859
* Move __va_list and related defines to sys/sys/_types.hWarner Losh2018-02-121-14/+0
| | | | | | | | | | __va_list and related defines are identical in all the ARCH/include/_types.h files. Move them to sys/sys/_types.h Sponsored by: Netflix Notes: svn path=/head/; revision=329165
* We don't support gcc < 4.2.1, so varargs.h now is just #errorWarner Losh2018-02-121-61/+0
| | | | | | | | | | | always. Unifdef for versions prior to 4.2.1 and remove now-unused header files. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14323 Notes: svn path=/head/; revision=329164
* Use standard pattern for stdargs.hWarner Losh2018-02-121-135/+30
| | | | | | | | | | | | We don't support older compilers. Most of the code in these files is for pre-3.0 gcc, which is at least 15 years obsolete. Move to using phk's sys/_stdargs.h for all these platforms. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14323 Notes: svn path=/head/; revision=329163
* Consistently use 16-byte alignment for MIPS N32 and N64.John Baldwin2018-01-312-28/+96
| | | | | | | | | | | | | | | | | - Add a new <machine/abi.h> header to hold constants shared between C and assembly such as CALLFRAME_SZ. - Add a new STACK_ALIGN constant to <machine/abi.h> and use it to replace hardcoded constants in the kernel and makecontext(). As a result of this, ensure the stack pointer on N32 and N64 is 16-byte aligned for N32 and N64 after exec(), after pthread_create(), and when sending signals rather than 8-byte aligned. Reviewed by: jmallett Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D13875 Notes: svn path=/head/; revision=328629
* Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across theNathan Whitehorn2018-01-191-0/+6
| | | | | | | | | | | | | | | | | | | kernel by PHYS_TO_DMAP() as previously present on amd64, arm64, riscv, and powerpc64. This introduces a new MI macro (PMAP_HAS_DMAP) that can be evaluated at runtime to determine if the architecture has a direct map; if it does not (or does) unconditionally and PMAP_HAS_DMAP is either 0 or 1, the compiler can remove the conditional logic. As part of this, implement PHYS_TO_DMAP() on sparc64 and mips64, which had similar things but spelled differently. 32-bit MIPS has a partial direct-map that maps poorly to this concept and is unchanged. Reviewed by: kib Suggestions from: marius, alc, kib Runtime tested on: amd64, powerpc64, powerpc, mips64 Notes: svn path=/head/; revision=328168
* Remove mips MD atomic_load_64 and atomic_store_64.Konstantin Belousov2017-12-221-18/+0
| | | | | | | | | | | | | | | | | | The only users of the functions were db_read_bytes() and db_write_bytes() ddb(4) interfaces. Replace the calls with direct reads and writes, which are automatically atomic on 64bits and n32. Note that removed assembler implementation for mips32 is not atomic anyway. Reviewed by: jhb Discussed with: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13586 Notes: svn path=/head/; revision=327097
* Fix mips build after introduction of MD definitions of atomic_load_64Konstantin Belousov2017-12-211-8/+9
| | | | | | | | | | | | | | | | | | and atomic_store_64. The MD definitions are provided for LP64 only, while mips also uses them for 32bit and n32. Only define mips variants for 32bit and n32 and change the syntax to match common definitions. Note that this commit does not fix 32bit asm implementation to follow new KBI, this will be fixed later. The functions are only used for 8 byte ddb accesses so the known bug does not prevent normal kernel operations. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=327074
* Add atomic_load(9) and atomic_store(9) operations.Konstantin Belousov2017-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | They provide relaxed-ordered atomic access semantic. Due to the FreeBSD memory model, the operations are syntaxical wrappers around the volatile accesses. The volatile qualifier is used to ensure that the access not optimized out and in turn depends on the volatile semantic as implemented by supported compilers. The motivation for adding the operation is to help people coming from other systems or knowing the C11/C++ standards where atomics have special type and require use of the special access operations. It is still the case that FreeBSD requires plain load and stores of aligned integer types to be atomic. Suggested by: jhb Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326971
* SPDX: Consider code from Carnegie-Mellon University.Pedro F. Giffuni2017-11-302-1/+5
| | | | | | | Interesting cases, most likely from CMU Mach sources. Notes: svn path=/head/; revision=326403
* sys/mips: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2735-5/+75
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326259
* bhnd(4): implement MIPS and PCI(e) interrupt supportLandon J. Fuller2017-11-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | On BHND MIPS SoCs, this replaces the use of hard-coded MIPS IRQ#s in the common bhnd(4) core drivers; we now register an INTRNG child PIC that handles routing of backplane interrupt vectors via the MIPS core. On BHND PCI devices, backplane interrupt vectors are now routed to the PCI/PCIe host bridge core when bus_setup_intr() is called, where they are dispatched by the PCI core via a host interrupt (e.g. INTx/MSI). The bhndb(4) bridge driver tracks registered interrupt handlers for the bridged bhnd(4) devices and manages backplane interrupt routing, while delegating actual bus interrupt setup/teardown to the parent bus on behalf of the bridged cores. Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12518 Notes: svn path=/head/; revision=326079
* Preemptively map MIPS INTRNG interrupts on non-FDT MIPS targetsLandon J. Fuller2017-11-211-2/+9
| | | | | | | | | | | | | | | | | This replaces a partial workaround introduced in r305527 that was incompatible with nested INTRNG interrupt controllers if not also using FDT. On non-FDT MIPS INTRNG targets, we now preemptively produce a set of fixed mappings for the MIPS IRQ range during nexus attach. On FDT targets, OFW_BUS_MAP_INTR() remains responsible for mapping the MIPS IRQs. Approved by: adrian (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12385 Notes: svn path=/head/; revision=326043
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2029-0/+59
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-184-0/+8
| | | | | | | | | | | | | | | | | | | | 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* Add AT_HWCAP2 ELF auxiliary vector.Michal Meloun2017-10-211-1/+2
| | | | | | | | | | | | | - allocate value for new AT_HWCAP2 auxiliary vector on all platforms. - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly same way as for AT_HWCAP. MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D12699 Notes: svn path=/head/; revision=324814
* Add MIPS32/64 Rev2 CP0 intctl register definitions.Landon J. Fuller2017-09-152-0/+21
| | | | | | | | Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D12300 Notes: svn path=/head/; revision=323621
* Add AT_HWCAP and AT_EHDRFLAGS on all platforms.John Baldwin2017-09-141-1/+3
| | | | | | | | | | | | | | | | | | A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A process ABI can set this field to point to a value holding a mask of architecture-specific CPU feature flags. If an ABI does not wish to supply AT_HWCAP to processes the field can be left as NULL. The support code for AT_EHDRFLAGS was already present on all systems, just the #define was not present. This is a step towards unifying the AT_* constants across platforms. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12290 Notes: svn path=/head/; revision=323579
* Fix limits.h constants to have correct type on MIPSConrad Meyer2017-08-261-9/+15
| | | | | | | | | | | | | Use correctly typed constants to avoid bogus errors like https://lists.freebsd.org/pipermail/svn-src-all/2017-August/150400.html (like x86 _limits.h). Reported by: bde, asomers Reviewed by: mjoras, tinderbox Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=322920
* Clean up MD pollution of bus_dma.h:Jason A. Harmening2017-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --Remove special-case handling of sparc64 bus_dmamap* functions. Replace with a more generic mechanism that allows MD busdma implementations to generate inline mapping functions by defining WANT_INLINE_DMAMAP in <machine/bus_dma.h>. This is currently useful for sparc64, x86, and arm64, which all implement non-load dmamap operations as simple wrappers around map objects which may be bus- or device-specific. --Remove NULL-checked bus_dmamap macros. Implement the equivalent NULL checks in the inlined x86 implementation. For non-x86 platforms, these checks are a minor pessimization as those platforms do not currently allow NULL maps. NULL maps were originally allowed on arm64, which appears to have been the motivation behind adding arm[64]-specific barriers to bus_dma.h, but that support was removed in r299463. --Simplify the internal interface used by the bus_dmamap_load* variants and move it to bus_dma_internal.h --Fix some drivers that directly include sys/bus_dma.h despite the recommendations of bus_dma(9) Reviewed by: kib (previous revision), marius Differential Revision: https://reviews.freebsd.org/D10729 Notes: svn path=/head/; revision=320528
* Make struct syscall_args visible to userspace compilation environmentKonstantin Belousov2017-06-121-2/+0
| | | | | | | | | | | | from machine/proc.h, consistently on all architectures. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 weeks X-Differential revision: https://reviews.freebsd.org/D11080 Notes: svn path=/head/; revision=319871
* Add initial support for the floating point implementation register.John Baldwin2017-05-094-2/+5
| | | | | | | | | | | | | | | | | | - Save the current FIR in the global 'cpuinfo' structure in a new 'fpu_id' member. - Decode flags in the FIR when displaying other CPU flags during boot. - Use the existing "dummy" slot in the floating point register structure to export the FIR in process core dumps and via ptrace(). Note that while the FIR register is not volatile, this practice of storing the FIR in the floating-point register set is used in other OS's. Reviewed by: kan MFC after: 1 month Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10617 Notes: svn path=/head/; revision=318067
* - Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeterGleb Smirnoff2017-04-173-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in place. To do per-cpu stats, convert all fields that previously were maintained in the vmmeters that sit in pcpus to counter(9). - Since some vmmeter stats may be touched at very early stages of boot, before we have set up UMA and we can do counter_u64_alloc(), provide an early counter mechanism: o Leave one spare uint64_t in struct pcpu, named pc_early_dummy_counter. o Point counter(9) fields of vmmeter to pcpu[0].pc_early_dummy_counter, so that at early stages of boot, before counters are allocated we already point to a counter that can be safely written to. o For sparc64 that required a whole dummy pcpu[MAXCPU] array. Further related changes: - Don't include vmmeter.h into pcpu.h. - vm.stats.vm.v_swappgsout and vm.stats.vm.v_swappgsin changed to 64-bit, to match kernel representation. - struct vmmeter hidden under _KERNEL, and only vmstat(1) is an exclusion. This is based on benno@'s 4-year old patch: https://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014471.html Reviewed by: kib, gallatin, marius, lidl Differential Revision: https://reviews.freebsd.org/D10156 Notes: svn path=/head/; revision=317061
* All these files need sys/vmmeter.h, but now they got it implicitlyGleb Smirnoff2017-04-171-0/+1
| | | | | | | included via sys/pcpu.h. Notes: svn path=/head/; revision=317055
* Corrected misspelled versions of rendezvous.Patrick Kelsey2017-04-091-2/+2
| | | | | | | | | | | | The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier(). Reviewed by: gnn, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10313 Notes: svn path=/head/; revision=316648