aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-274-6/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1610-20/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-167-7/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | 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
* bwn: eliminate dead writes in BWN_GPL_PHYGreg V2022-05-042-5/+10
| | | | | | | | | This fixes the newly Werror'ed useless write warnings with options BWN_GPL_PHY. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35105
* Remove the old dts imported tree.Emmanuel Vadot2021-01-153633-927631/+0
| | | | The new one is in sys/contrib/device-tree
* ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano.Michal Meloun2020-12-281-0/+7
| | | | Add support for the Tergra210 SoC and its companion PMIC MAX77620.
* Brand our DTS with the Linux version it was imported fromEmmanuel Vadot2020-10-101-0/+3
| | | | | | | | | | | | DTS must be synced with the kernel, add a freebsd,dts-version string in the root node of each DTS that we compile so we can later in the kernel check that it contain a correct value. Reviewed by: imp, mmel Differential Revision: https://reviews.freebsd.org/D26724 Notes: svn path=/head/; revision=366599
* Import DTS files for arm, arm64, riscv from Linux 5.8Emmanuel Vadot2020-08-04570-5889/+28245
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=363853
* dts: patch the am33xx dts for upcoming clock supportEmmanuel Vadot2020-06-052-2/+12
| | | | | | | | | | | Some ranges are too small compared to what they really are. Add functional clocks for the timers. Submitted by: Oskar Holmlund (oskar.holmlund@ohdata.se) X-Differential Revision: https://reviews.freebsd.org/D25118 Notes: svn path=/head/; revision=361849
* dts: Update our copy to be in sync with Linux 5.7Emmanuel Vadot2020-06-05514-2850/+20131
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=361848
* dts: Import DTS from Linux 5.6Emmanuel Vadot2020-04-14576-10611/+32926
| | | | Notes: svn path=/head/; revision=359934
* dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5Emmanuel Vadot2020-02-28550-8888/+36982
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=358430
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-5/+9
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still 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 and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Import DTS files for riscv from Linux 5.4Emmanuel Vadot2019-12-032-0/+347
| | | | | | | Requested by: mhorne Notes: svn path=/head/; revision=355324
* Import DTS files from Linux 5.4Emmanuel Vadot2019-11-28456-6682/+29245
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=355187
* arm: dts: ti: Fix mmc3 instance by setting it to disabledEmmanuel Vadot2019-10-071-0/+1
| | | | | | | | | | | | | | | | | DTS Import of Linux 5.3 added a patch that rework the L3 mmc instance in the AM335x SoC but removed the status = 'disabled' on the node. This cause the kernel to probe the device even if the board doesn't have this mmc used and since we don't correctly activate the clock for this module we panic with an external data abort. Beaglebone(s) don't have this device anyway so simply disabling it. Patch for the DTS was sent upstream. https://patchwork.kernel.org/patch/11176921/ PR: 241089 Reported by: phk Notes: svn path=/head/; revision=353172
* Import DTS files from Linux 5.3Emmanuel Vadot2019-09-28447-2074/+27049
| | | | Notes: svn path=/head/; revision=352860
* Import DTS files from Linux 5.2Emmanuel Vadot2019-09-281213-10105/+24965
| | | | Notes: svn path=/head/; revision=352858
* arm: dts: am33xx: Fix the region for uart0Emmanuel Vadot2019-08-071-1/+1
| | | | | | | | | | | | The region for uart0 is declared to be 0x2000 in size but the parent node only declare 0x1000. As the parent only declare a size of 0x1000 in the ranges for it's children this cause the device to not be mappable. https://patchwork.kernel.org/patch/11056769/ Notes: svn path=/head/; revision=350673
* dts: Import files from Linux 5.1Emmanuel Vadot2019-05-08569-2795/+23268
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=347366
* Import DTS files from Linux 5.0Emmanuel Vadot2019-04-10741-11934/+43766
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=346092
* Correct my previous correction to the license. It now matches the textBrooks Davis2019-03-072-4/+2
| | | | | | | in https://spdx.org/licenses/GPL-2.0.html Notes: svn path=/head/; revision=344901
* Correct license boilerplate, to match the SPDX tag.Brooks Davis2019-03-072-2/+2
| | | | | | | | The GPL-2.0 tag is a deprecated tag which means that same thing as GPL-2.0-only. Notes: svn path=/head/; revision=344900
* add GPL text in addition to SPDX tags as requested by coreMatt Macy2019-03-072-0/+28
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=344869
* gcov supportMatt Macy2019-02-234-0/+1810
| | | | | | | | | | | | add gcov support and export results as files in debugfs Reviewed by: hps@ MFC after: 1 week Sponsored by: iX Systems Differential Revision: https://reviews.freebsd.org/D19260 Notes: svn path=/head/; revision=344487
* Import DTS from Linux 4.20Emmanuel Vadot2019-01-11540-6446/+31035
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=342936
* Import DTS includes from 4.19Emmanuel Vadot2019-01-1131-57/+1268
| | | | | | | | | This was missed in r340337 MFC after: 3 days Notes: svn path=/head/; revision=342935
* Update our devicetree to 4.19 for arm and arm64Emmanuel Vadot2018-11-10561-7212/+22678
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=340337
* dts: Import DTS for arm64Emmanuel Vadot2018-08-23376-0/+112958
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Most of the boards are using U-Boot, u-boot embed a DTB that isn't compiled with -@ (overlay ready) so we cannot use overlays. We want overlays, overlays are nice. - The DTS life is going to linux, then sometimes it's imported in U-Boot but it depend on the SoC family, U-Boot doesn't batch import every DTS like we do. So sometimes to U-Boot DTS are very old. Or when an interesting patch in commited upstream it is in Linux X+2 (roughly 4 months from now), we then have to wait for U-Boot to catch up, that give us between 4 and 6 months to have an update. - Some boards like the Marvell ones have 3 DTS, the one in the vendor U-Boot made by Marvell themselves, the one in u-boot mainline and the one in Linux. I found that the DTS in the Marvell U-Boot have some problem with FreeBSD (especially the macchiatobin that declare node with the same address but not the same size, that is not something that the rman code can handle, it could be modified, I don't know the code well enough). Also some compatible are used when they shouldn't, for example they declare the gpio being orion-gpio while this binding requires interrupts supports, which the node doesn't have. - The above situation is mostly the same with RockChip SoCs (possibly others, those are the only SoCs I work on that have this problem). Note that importing the DTS doesn't mean that every board will use them, I don't intend to copy the DTB to the GENERIC memstick image for the Overdrive 1000/3000 for example, the ones provided by the firmware works fine. RPI3 will still stay an exception as we use the DTB provided by the rpi-firmware package, so they come from the rpi foundation linux fork. Notes: svn path=/head/; revision=338245
* Import DTS files from Linux 4.18Emmanuel Vadot2018-08-13464-6181/+14948
| | | | Notes: svn path=/head/; revision=337703
* dts: Update our copy to Linux 4.17Emmanuel Vadot2018-06-14726-17619/+29427
| | | | Notes: svn path=/head/; revision=335121
* gnu/dts: Update our copy of arm dts from Linux 4.16Emmanuel Vadot2018-04-20456-5411/+17735
| | | | Notes: svn path=/head/; revision=332839
* bwn(4): txpid2g/txpid5g[lh] are not defined after sromrev 7; the defaultLandon J. Fuller2018-02-131-0/+3
| | | | | | | | | | | indices into the TX power gain table should be used instead. This enables use of bwn(4) with later BCM4321 revisions. Reported by: Trev Roydhouse Notes: svn path=/head/; revision=329228
* dts: Update our device tree sources files from Linux 4.15Emmanuel Vadot2018-02-10501-11380/+23676
| | | | Notes: svn path=/head/; revision=329104
* bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.Landon J. Fuller2018-02-056-148/+602
| | | | | | | | | | | | | - Remove the shim interface that allowed bwn(4) to use either siba_bwn or bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents. - Drop the legay, now-unused siba_bwn bus driver. - Clean up bhnd(4) board flag defines referenced by bwn(4). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13518 Notes: svn path=/head/; revision=328912
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-3/+2
| | | | | | | | | | | | | | | | | | Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197 Notes: svn path=/head/; revision=328218
* misc geom and gnu: make some use of mallocarray(9).Pedro F. Giffuni2018-01-151-2/+3
| | | | | | | | | | | | | | | | Focus on code where we are doing multiplications within malloc(9). None of these ire likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. Differential revision: https://reviews.freebsd.org/D13837 Notes: svn path=/head/; revision=328026
* Introduce bwn(4) support for the bhnd(4) bus.Landon J. Fuller2017-12-026-33/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect found in post-2009 Broadcom Wi-Fi hardware, are not supported by siba_bwn(4). The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port) provides a unified kernel interface to a superset of the hardware supported by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their SSB or BCMA backplane. This diff introduces opt-in bwn(4) support for bhnd(4) by providing: - A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via bhnd(4) instead of siba_bwn(4). - A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally probes at a higher priority than the siba_bwn(4) PCI driver. - A set of compatibility shims that perform translation of bwn(4)'s siba_bwn function calls into their bhnd(9) API equivalents when bwn(4) is attached via a bhnd(4) bus parent. When bwn(4) is attached via siba_bwn(4), all siba_bwn function calls are simply passed through to their original implementations. To test bwn(4) with bhnd(4), place the following lines in loader.conf(5): hw.bwn_pci.preferred="1" if_bwn_pci_load="YES bwn_v4_ucode_load="YES" bwn_v4_lp_ucode_load="YES" To verify that bwn(4) is using bhnd(4), you can check dmesg: bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0 ... or devinfo(8): pcib2 pci2 bwn_pci0 bhndb0 bhnd0 bwn0 ... bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently supported by bwn(4), including: - BCM4312 - BCM4318 - BCM4321 With minimal changes to the DMA code (not included in this commit), I was also able to test support for newer BCMA devices by bringing up basic working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets: - BCM43224 - BCM43225 Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation & Plausible Labs Differential Revision: https://reviews.freebsd.org/D13041 Notes: svn path=/head/; revision=326454
* Update our copy of DTS from the ones from Linux 4.14Emmanuel Vadot2017-11-18582-2046/+14886
| | | | Notes: svn path=/head/; revision=325968
* dts: Update our device tree sources file fomr Linux 4.13Emmanuel Vadot2017-10-21447-3469/+13276
| | | | Notes: svn path=/head/; revision=324820
* Update DTS files from Linux 4.12Emmanuel Vadot2017-07-09401-2873/+13603
| | | | | | | | | | | | | Notable changes: Allwinner: * H3/H5 were merged into a common dtsi file * include/dt-bindings/sun4i-a10.h is not included anymore in a lot of dts files * Add sun8i-h3-nanopi-neo-air board DTS file Notes: svn path=/head/; revision=320834
* Update the GNU DTS file from Linux 4.11Emmanuel Vadot2017-06-20594-6176/+21373
| | | | Notes: svn path=/head/; revision=320130
* [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code.Adrian Chadd2017-05-062-7/+104
| | | | | | | | | | | * Target module have ic plus etherswitch ip175c. * Also add etherswitch support code on rt driver. Reviewed by: mizhka Differential Revision: https://reviews.freebsd.org/D10336 Notes: svn path=/head/; revision=317873
* Update our device tree files to a Linux 4.10Emmanuel Vadot2017-03-07891-14367/+66506
| | | | Notes: svn path=/head/; revision=314854
* Import latest vendor DTS files for Intel Arria 10.Ruslan Bukin2017-03-033-13/+193
| | | | Notes: svn path=/head/; revision=314599
* Add Ingenic X1000 DTS files (unofficial).Ruslan Bukin2016-11-192-0/+462
| | | | | | | | | This is based on JZ4780 due to missing original X1000 parts. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=308834
* Import Ingenic CI20 (jz4780) DTS files.Ruslan Bukin2016-11-174-0/+1235
| | | | | | | | Submitted by: kan Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=308746
* Revert and redo r306083.Warner Losh2016-09-22512-11762/+18386
| | | | | | | | | | | | | Update the device tree source files to a Linux 4.7-RC. The dts tree currently can't be merged w/o specific revisions. Note: due to a stupid bug in the commit checking script, I couldn't just remove the svn:keyword tag from the new files, I had to add fbsd:nokeywords to all the files (including ones that didn't need it) Notes: svn path=/head/; revision=306197