mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 00:47:22 +07:00
86db36a347
Tested using the following bash script and the tc from iproute2-next: #!/bin/bash set -e -u -o pipefail NSEC_PER_SEC="1000000000" gatemask() { local tc_list="$1" local mask=0 for tc in ${tc_list}; do mask=$((${mask} | (1 << ${tc}))) done printf "%02x" ${mask} } if ! systemctl is-active --quiet ptp4l; then echo "Please start the ptp4l service" exit fi now=$(phc_ctl /dev/ptp1 get | gawk '/clock time is/ { print $5; }') # Phase-align the base time to the start of the next second. sec=$(echo "${now}" | gawk -F. '{ print $1; }') base_time="$(((${sec} + 1) * ${NSEC_PER_SEC}))" tc qdisc add dev swp5 parent root handle 100 taprio \ num_tc 8 \ map 0 1 2 3 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ base-time ${base_time} \ sched-entry S $(gatemask 7) 100000 \ sched-entry S $(gatemask "0 1 2 3 4 5 6") 400000 \ clockid CLOCK_TAI flags 2 The "state machine" is a workqueue invoked after each manipulation command on the PTP clock (reset, adjust time, set time, adjust frequency) which checks over the state of the time-aware scheduler. So it is not monitored periodically, only in reaction to a PTP command typically triggered from a userspace daemon (linuxptp). Otherwise there is no reason for things to go wrong. Now that the timecounter/cyclecounter has been replaced with hardware operations on the PTP clock, the TAS Kconfig now depends upon PTP and the standalone clocksource operating mode has been removed. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config NET_DSA_SJA1105
|
|
tristate "NXP SJA1105 Ethernet switch family support"
|
|
depends on NET_DSA && SPI
|
|
select NET_DSA_TAG_SJA1105
|
|
select PACKING
|
|
select CRC32
|
|
help
|
|
This is the driver for the NXP SJA1105 automotive Ethernet switch
|
|
family. These are 5-port devices and are managed over an SPI
|
|
interface. Probing is handled based on OF bindings and so is the
|
|
linkage to PHYLINK. The driver supports the following revisions:
|
|
- SJA1105E (Gen. 1, No TT-Ethernet)
|
|
- SJA1105T (Gen. 1, TT-Ethernet)
|
|
- SJA1105P (Gen. 2, No SGMII, No TT-Ethernet)
|
|
- SJA1105Q (Gen. 2, No SGMII, TT-Ethernet)
|
|
- SJA1105R (Gen. 2, SGMII, No TT-Ethernet)
|
|
- SJA1105S (Gen. 2, SGMII, TT-Ethernet)
|
|
|
|
config NET_DSA_SJA1105_PTP
|
|
bool "Support for the PTP clock on the NXP SJA1105 Ethernet switch"
|
|
depends on NET_DSA_SJA1105
|
|
help
|
|
This enables support for timestamping and PTP clock manipulations in
|
|
the SJA1105 DSA driver.
|
|
|
|
config NET_DSA_SJA1105_TAS
|
|
bool "Support for the Time-Aware Scheduler on NXP SJA1105"
|
|
depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
|
|
depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
|
|
depends on NET_DSA_SJA1105_PTP
|
|
help
|
|
This enables support for the TTEthernet-based egress scheduling
|
|
engine in the SJA1105 DSA driver, which is controlled using a
|
|
hardware offload of the tc-tqprio qdisc.
|