[PATCH v4 1/3] PCI: trace: Add PCI controller LTSSM transition tracepoint

Steven Rostedt rostedt at goodmis.org
Tue Feb 24 06:08:27 PST 2026


On Thu, 22 Jan 2026 10:02:18 +0800
Shawn Lin <shawn.lin at rock-chips.com> wrote:

> +bool pci_ltssm_tp_enabled(void)
> +{
> +	return atomic_read(&pcie_ltssm_tp_enabled) > 0;
> +}
> +EXPORT_SYMBOL(pci_ltssm_tp_enabled);
> +
> +int pci_ltssm_tp_reg(void)
> +{
> +	atomic_inc(&pcie_ltssm_tp_enabled);
> +	return 0;
> +}
> +
> +void pci_ltssm_tp_unreg(void)
> +{
> +	atomic_dec(&pcie_ltssm_tp_enabled);
> +}

This seems totally unnecessary. Why the atomic operations? Why not just
use:

	if (trace_pcie_ltssm_state_transition_enabled()) ...

?

-- Steve



More information about the Linux-rockchip mailing list