|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| | Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47675 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by:	kp, imp, glebius, stevek
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45740 | 
| | 
| 
| 
| 
| 
| | No functional change intended.
MFC after:	1 week | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44131 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44130 | 
| | 
| 
| 
| 
| 
| 
| 
| | Use rman_set_type to set the type of allocated resources everywhere
rman_set_rid is currently called.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44123 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| | Also add IFCAP_VLAN_MTU, since it's supported.
Fixes:		0083fc5c7 ("Mechanically convert dtsec(4) to IfAPI")
MFC after:	1 week | 
| | 
| 
| 
| 
| 
| 
| 
| | Implemented based on the tsec(4) multicast support.  This is the minimum
required to support VLANs.  The hardware does support vlan tagging,
among other acceleration features, which will be added at a later time.
MFC after:	2 weeks | 
| | 
| 
| 
| | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ | 
| | 
| 
| 
| | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ | 
| | 
| 
| 
| 
| 
| | Some changes were missed in 0083fc5c76.
Sponsored by:	Juniper Networks, Inc. | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Overall, this is a non-functional change, except for kernels built with
SCHED_STATS. However, the switch types are useful for communicating the
intent of the caller.
1. Ensure that every caller provides a type. In most cases, we upgrade
   the basic yield to sched_relinquish() aka SWT_RELINQUISH.
2. The case of sched_bind() is distinct, so add a new switch type SWT_BIND.
3. Remove the two unused types, SWT_PREEMPT and SWT_SLEEPQTIMO.
4. Remove SWT_NONE altogether and assert that callers always provide
   a type flag.
5. Reference the mi_switch(9) man page in the comments, as these flags
   will be documented there.
Reviewed by:	kib, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38184 | 
| | 
| 
| 
| 
| | Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37815 | 
| | 
| 
| 
| 
| | The P5040 has the MDIO for FMAN2 on FMAN1 for some reason.  Instead of
trying to manually find the MDIO, use a real xref. | 
| | 
| 
| 
| | Probing disabled devices just adds noise. | 
| | 
| 
| 
| 
| 
| 
| 
| | BUS_PASS_SUPPORTDEV is semantically better than BUS_PASS_RESOURCE, since
it's a support device for dtsec, so only needs probed before dtsec, not
before interrupts.
Suggested by:	manu | 
| | 
| 
| 
| 
| | Avoid the fragile nature of depending on ordering of the devices in the
FDT by forcing the MDIO driver to precede the DTSEC driver. | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | It's possible the MDIO device hasn't been and attached, or is incorrect
in the device tree so can't probe and attach.  In this case,
ofw_bus_find_child_device_by_phandle() will fail, and return NULL.
Return an error from find_mdio() here to prevent the MAC from attaching,
rather than worry about a NULL pointer dereference later on when
accessing the PHY. | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | If fman_init() fails it can leave things in a state where it cannot
attach at all in the future, because it would simply exit without
tearing down everything that was already set up.  Go to the exit point
to clean up on error instead, so that it can try again later.
MFC after:	1 week | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Remove an old workaround that is no longer necessary since rS343824.
There used to be a problem with FMan interrupts firing on multiple CPUS
at the same time.
This ended up being due to multicast interrupts being unsupported in the
Freescale PIC (so instead of using a selection algorithm, it would do some
unspecified action, such as interrupting multiple cpus at random.)
Reviewed by:	jhibbits
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D23829
Notes:
    svn path=/head/; revision=358322 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | After the network epoch was added, we lost the ability to migrate the
ithread in the middle of dispatch, as being in the network epoch will pin
the current thread (for safety reasons.)
Luckily, we don't actually have to do this workaround in the first place,
as we can just bind it to the correct cpu when we preallocate it.
Pass dev through to XX_PreallocAndBindIntr() and actually bind it to the
cpu like it was supposed to in the first place, instad of leaving it
floating and moving it to the correct cpu the first time it fires.
This fixes panics while bringing up dtsec on my X5000.
Reviewed by:	jhibbits
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D23826
Notes:
    svn path=/head/; revision=358307 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | switch over to opt-in instead of opt-out for epoch.
Instead of IFF_NEEDSEPOCH, provide IFF_KNOWSEPOCH. If driver marks
itself with IFF_KNOWSEPOCH, then ether_input() would not enter epoch
when processing its packets.
Now this will create recursive entrance in epoch in >90% network
drivers, but will guarantee safeness of the transition.
Mark several tested drivers as IFF_KNOWSEPOCH.
Reviewed by:		hselasky, jeff, bz, gallatin
Differential Revision:	https://reviews.freebsd.org/D23674
Notes:
    svn path=/head/; revision=358301 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | supposedly may call into ether_input() without network epoch.
They all need to be reviewed before 13.0-RELEASE.  Some may need
be fixed.  The flag is not planned to be used in the kernel for
a long time.
Notes:
    svn path=/head/; revision=357010 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Don't hold the scheduler lock while doing context switches.  Instead we
unlock after selecting the new thread and switch within a spinlock
section leaving interrupts and preemption disabled to prevent local
concurrency.  This means that mi_switch() is entered with the thread
locked but returns without.  This dramatically simplifies scheduler
locking because we will not hold the schedlock while spinning on
blocked lock in switch.
This change has not been made to 4BSD but in principle it would be
more straightforward.
Discussed with:	markj
Reviewed by:	kib
Tested by:	pho
Differential Revision: https://reviews.freebsd.org/D22778
Notes:
    svn path=/head/; revision=355784 | 
| | 
| 
| 
| 
| 
| 
| | These are all trivial warnings that have no real functional change.
Notes:
    svn path=/head/; revision=351322 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The BMan softc must exist when dtsec devices are created, else a NULL
pointer is dereferenced.  QMan likely as well.  Until now, we have relied on
order within the fdt parsing to attach correctly, but this obviously is not
foolproof.  Mark these as BUS_PASS_SUPPORTDEV so they're probed and attached
explicitly before dtsec devices.
Notes:
    svn path=/head/; revision=339632 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Change OF_getencprop_alloc semantics to be combination of malloc and
OF_getencprop and return size of the property, not number of elements
allocated.
For the use cases where number of elements is preferred introduce
OF_getencprop_alloc_multi helper function that copies semantics
of OF_getencprop_alloc prior to this change.
This is to make OF_getencprop_alloc and OF_getencprop_alloc_multi
function signatures consistent with OF_getencprop_alloc and
OF_getencprop_alloc_multi.
Functionality-wise this patch is mostly rename of OF_getencprop_alloc
to OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfo
where 1 was used as a block size.
Notes:
    svn path=/head/; revision=332341 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | Official Linux dts's put the individual portals under a simple-bus, rather
than under a '*-portals' grouping.  This adds a hack to permit that, which
gets us closer to using stock device trees for DPAA-based devices.
Notes:
    svn path=/head/; revision=326840 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | XX_VirtToPhys(), by way of pmap_kextract(), is an expensive operation.
Profiling via dtrace during a series of iperf tests I found 16111 / 30432
stack frames were located in mmu_booke_kextract(), so eliminating this
expensive call should improve performance slightly.  XX_PhysToVirt() is not
as expensive, but redundant calls in this context is wasteful.
Notes:
    svn path=/head/; revision=326004 | 
| | 
| 
| 
| 
| 
| 
| | MFC after:	2 weeks
Notes:
    svn path=/head/; revision=325927 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | The macId is the dTSEC unit within the FMan, so use the cell-index, not the unit
number, which may not match the cell index.
MFC after:	1 week
Notes:
    svn path=/head/; revision=325305 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Some devices (P5040, P4080) have multiple frame managers in their DPAA
subsystems.  This was prevented by use of a softc singleton in the DPAA
driver.  Since if_dtsec(4) has moved to be a child of fman, it can access
the fman device data via the parent object.
Notes:
    svn path=/head/; revision=325255 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Rework the dTSEC and FMan drivers to be more like a full bus relationship,
so that dtsec can use bus_alloc_resource() instead of trying to handle the
offset from the dts.  This required taking some code from the sparc64 ebus
driver to allow subdividing the fman region for the dTSEC devices.
Notes:
    svn path=/head/; revision=325204 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This adds some support for ARM as well as 64-bit.  64-bit on PowerPC is
currently not working, and ARM support has not been completed or tested on the
FreeBSD side.
As this was imported from a Linux tree, it includes some Linux-isms
(ioread/iowrite), so compile with the LinuxKPI for now.  This may change in the
future.
Notes:
    svn path=/head/; revision=325118 | 
| | 
| 
| 
| | Notes:
    svn path=/head/; revision=324569 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | All of these arguments are stored in m_ext, so there is no reason
to pass them in the argument list.  Not all functions need the second
argument, some don't even need the first one.  The second argument
lives in next cache line, so not dereferencing it is a performance
gain.  This was discovered in sendfile(2), which will be covered by
next commits.
The second goal of this commit is to bring even more flexibility
to m_ext mbufs, allowing to create more fields in m_ext, opaque to
the generic mbuf code, and potentially set and dereferenced by
subsystems.
Reviewed by:	gallatin, kbowling
Differential Revision:	https://reviews.freebsd.org/D12615
Notes:
    svn path=/head/; revision=324446 | 
| | 
| 
| 
| 
| 
| 
| | Suggested by:	jhb
Notes:
    svn path=/head/; revision=318209 | 
| | 
| 
| 
| 
| 
| 
| 
| | The alignment argument is the mask of low bits to mask off when allocating
items in a zone, not the block-size alignment.
Notes:
    svn path=/head/; revision=318171 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Drop the tracking down to the pmap layer, with optimizations to only track
necessary pages.  This should give a (slight) performance improvement, as well
as a stability improvement, as the tracking is already mostly handled by the
pmap layer.
Notes:
    svn path=/head/; revision=308718 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Linux has a slightly different device tree definition for DPAA than originally
done in the FreeBSD driver.  This changes the driver to be mostly compatible
with the Linux device tree definitions.  Currently the differences are:
bman-portals: compatible = "fsl,bman-portals" (Linux is "simple-bus")
qman-portals: compatible = "fsl,qman-portals" (Linux is "simple-bus")
fman: compatible = "fsl,fman" (Linux is "simple-bus")
The Linux device tree doesn't specify anything for rgmii in the mdio.  This
change still requires the device tree to specify the phy-handle, and doesn't yet
support tbi.
Notes:
    svn path=/head/; revision=308584 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | No need to have two functions that do the same thing, let's let fdt_* go away,
and use ofw_bus_* equivalents instead.
Requested by:	andrew
Notes:
    svn path=/head/; revision=308536 | 
| | 
| 
| 
| 
| 
| 
| | This file was copy&pasted from bman_fdt, and it still shows.
Notes:
    svn path=/head/; revision=307830 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | If the device tree doesn't contain a cpu-handle field in any bman-portal or
qman-portal, it will exit without setting up the devinfo, leaving it
uninitialized.  This will lead to attempts to free random memory, and ultimately
panic.
Notes:
    svn path=/head/; revision=307763 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Instead replace it with a different hack, that turns fman into a simplebus
subclass, and maps its children within its address space.
Since all PHY communication is done through dtsec0's mdio space, the FDT
contains a reference to the dtsec0 mdio handle in all nodes that need it.
Instead of using Freescale's implementation for MII access, use our own (copied
loosely from the eTSEC driver, and could possibly be merged eventually).  This
lets us access the registers directly rather than needing a full dtsec interface
just to access the registers.
Future directions will include turning fman into more of a simplebus, and not
mapping the region and playing games.  This will require changes to the dtsec
driver to make it a child of fman, and possibly other drivers as well.
Notes:
    svn path=/head/; revision=307696 | 
| | 
| 
| 
| | Notes:
    svn path=/head/; revision=307695 |