Add CFI start/end proc directives to arm64, i386, and ppcFollow-up to r353959 and r368070: do the same for other architectures.arm32 already seems to use its own .fnstart/.fnend directives, which
Add CFI start/end proc directives to arm64, i386, and ppcFollow-up to r353959 and r368070: do the same for other architectures.arm32 already seems to use its own .fnstart/.fnend directives, whichappear to be ARM-specific variants of the same thing. Likewise, MIPSuses .frame directives.Reviewed by: arichardsonDifferential Revision: https://reviews.freebsd.org/D27387
show more ...
powerpc: clean up empty lines in .c and .h files
powerpc/mmu: Convert PowerPC pmap drivers to ifunc from kobjWith IFUNC support in the kernel, we can finally get rid of our poor-man'sifunc for pmap, utilizing kobj. Since moea64 uses a second ti
powerpc/mmu: Convert PowerPC pmap drivers to ifunc from kobjWith IFUNC support in the kernel, we can finally get rid of our poor-man'sifunc for pmap, utilizing kobj. Since moea64 uses a second tier kobj aswell, for its own private methods, this adds a second pmap install function(pmap_mmu_init()) to perform pmap 'post-install pre-bootstrap'initialization, before the IFUNCs get initialized.Reviewed by: bdragon
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
Convert to if_foreach_llmaddr() KPI.
powerpc/pmap64: Make moea64 statistics optionalSummary:It turns out statistics accounting is very expensive in the pmap driver,and doesn't seem necessary in the common case. Make this optionalb
powerpc/pmap64: Make moea64 statistics optionalSummary:It turns out statistics accounting is very expensive in the pmap driver,and doesn't seem necessary in the common case. Make this optionalbehind a MOEA64_STATS #define, which one can set if they really needstatistics.This saves ~7-8% on buildworld time on a POWER9.Found by bdragon.Reviewed by: luporlDifferential Revision: https://reviews.freebsd.org/D20903
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces headerpollution substantially.EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .cfiles into appropriate headers (e.g., sys/proc.h, powernv/opal.h).As a side effect of reduced header pollution, many .c files and headers nolonger contain needed definitions. The remainder of the patch addressesadding appropriate includes to fix those files.LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required bysys/mutex.h since r326106 (but silently protected by header pollution priorto this change).No functional change (intended). Of course, any out of tree modules thatrelied on header pollution for sys/eventhandler.h, sys/lock.h, orsys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
powerpc: Add opaque 'private data' to interrupt vectorsThe XICS and XIVE need extra data beyond irq and vector. Rather thanperforming a separate search, it's better for the general interrupt faci
powerpc: Add opaque 'private data' to interrupt vectorsThe XICS and XIVE need extra data beyond irq and vector. Rather thanperforming a separate search, it's better for the general interrupt facilityto hold a private pointer, since the search already must be done anyway atthat level.
powerpc: Fix regression introduced in r342771In r342771, I introduced a regression in Power by abusing the platformsmp_topo() method as a shortcut for providing the MI information needed forthe s
powerpc: Fix regression introduced in r342771In r342771, I introduced a regression in Power by abusing the platformsmp_topo() method as a shortcut for providing the MI information needed forthe stated sysctls. The smp_topo() method was already called later bysched_ule (under the name cpu_topo()), and initializes a static array ofscheduler topology information. I had skimmed the smp_topo_foo() functionsand assumed they were idempotent; empirically, they are not (or at least,detect re-initialization and panic).Do the cleaner thing I should have done in the first place and add aplatform method specifically for core- and thread-count probing.Reported by: luporl via jhibbitsReviewed by: luporlX-MFC-With: r342771Differential Revision: https://reviews.freebsd.org/D18777
Expose threads-per-core and physical core count informationWith new sysctls (to the best of our ability do detect them). Restructuredsmp.4 slightly for clarity (keep relevant stuff closer to the
Expose threads-per-core and physical core count informationWith new sysctls (to the best of our ability do detect them). Restructuredsmp.4 slightly for clarity (keep relevant stuff closer to the top) whiledocumenting.Reviewed by: markj, jhibbits (ppc parts)MFC after: 3 daysSponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D18322
ifnet: Replace if_addr_lock rwlock with epoch + mutexRun on LLNW canaries and tested by pho@gallatin:Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5based ConnectX 4-LX NIC, I
ifnet: Replace if_addr_lock rwlock with epoch + mutexRun on LLNW canaries and tested by pho@gallatin:Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5based ConnectX 4-LX NIC, I see an almost 12% improvement in receivedpacket rate, and a larger improvement in bytes delivered all the wayto userspace.When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1,I see, using nstat -I mce0 1 before the patch:InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.324.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.324.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.324.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.324.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.324.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.324.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32After the patchInMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.515.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.515.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.515.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.515.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.525.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patchReviewed by: gallatinSponsored by: Limelight NetworksDifferential Revision: https://reviews.freebsd.org/D15366
Move the powerpc64 direct map base address from zero to high memory. Thisaccomplishes a few things:- Makes NULL an invalid address in the kernel, which is useful for catching bugs.- Lays groundw
Move the powerpc64 direct map base address from zero to high memory. Thisaccomplishes a few things:- Makes NULL an invalid address in the kernel, which is useful for catching bugs.- Lays groundwork for radix-tree translation on POWER9, which requires the direct map be at high memory.- Similarly lays groundwork for a direct map on 64-bit Book-E.The new base address is chosen as the base of the fourth radix quadrant(the minimum kernel address in this translation mode) and because allsupported CPUs ignore at least the first two bits of addresses in realmode, allowing direct-map addresses to be used in real-mode handlers.This is required by Linux and is part of the architecture standardstarting in POWER ISA 3, so can be relied upon.Reviewed by: jhibbits, Breno LeitaoDifferential Revision: D14499
Honor physical memory regions marked unavailable in the FDT, when present.The most notable of these is the FDT itself, which it is a bad idea tooverwrite.
Remove assumption that all physical memory is available to the kernel andthat the physical and available memory arrays are interchangeable.
Avoid dereferencing random memory when kickstarting DMA.MFC after: 1 week
Merge AIM and Book-E PCPU fieldsThis is part of a long-term goal of merging Book-E and AIM into a single GENERICkernel. As more work is done, the struct may be optimized further.Reviewed by: nw
Merge AIM and Book-E PCPU fieldsThis is part of a long-term goal of merging Book-E and AIM into a single GENERICkernel. As more work is done, the struct may be optimized further.Reviewed by: nwhitehorn
Document places we assume that physical memory is direct-mapped at zero byusing a new macro PHYS_TO_DMAP, which deliberately has the same name as theequivalent macro on amd64. This also sets the st
Document places we assume that physical memory is direct-mapped at zero byusing a new macro PHYS_TO_DMAP, which deliberately has the same name as theequivalent macro on amd64. This also sets the stage for moving the directmap to another base address.
Fix reversed endianness that crept in at some point. Blue is now blueinstead of pink.MFC after: 3 days
Use data from the boot loader to pick the appropriate output graphics modeinstead of hard-coding a default. This information is passed implicitly bythe PS3 firmware and can be relied upon. Also adj
Use data from the boot loader to pick the appropriate output graphics modeinstead of hard-coding a default. This information is passed implicitly bythe PS3 firmware and can be relied upon. Also adjust the default mode, ifsomehow firmware doesn't pass one, to 1920x1080 from 720x480 since it is2017.MFC after: 2 weeks
Remove logic for early console with loader.ps3 now that loader.ps3 is dead.
Change the way SMP startup works to match the new multi-AP features inlocore64.S introduced in r327358.MFC after: 3 weeks
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.
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/c
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.However, the kernel doesn't null-terminate them. A bunch of copy-pasted codeuses strncpy to write them, and doesn't guarantee null-termination. For atleast 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actuallyoverflows. You can see the result by doing "camcontrol negotiate da0 -v".This change null-terminates those fields everywhere they're set in thekernel. It also shortens a few strings to ensure they'll fit within the16-character field.PR: 215474Reported by: CoverityCID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187CID: 1010035 1010036 1010042 1010041 1010040 1010039Reviewed by: imp, sephe, slmMFC after: 4 weeksSponsored by: Spectra Logic CorpDifferential Revision: https://reviews.freebsd.org/D9037Differential Revision: https://reviews.freebsd.org/D9038
Fix the resource_list_print_type() calls to use uintmax_t.Missed a bunch from r297000.
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd.org/D5373
1234