lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Jan 2021 14:51:42 -0600
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Waldemar Rymarkiewicz <waldemar.rymarkiewicz@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>, linux-pm@...r.kernel.org
Subject: Re: Hook up a PCIe device into the thermal framework

[+cc thermal and DT folks]

On Thu, Jan 14, 2021 at 06:04:18PM +0100, Waldemar Rymarkiewicz wrote:
> Hi,
> 
> I've been looking for a nice way to hook up a PCIe device into the
> thermal framework recently and I want to confront my findings with the
> right people here.
> 
> I have a PCIe wireless adapter connected to PCI-to-PCI bridge which in
> turns is connected to a PCI root complex (RC). I want to define a
> thermal zone over the wireless adapter in my system and control it
> over DT (thermal-zones{...})  instead of keeping thermal zone
> definition statically in the PCI device driver (as it's done in the
> iwlwifi wireless driver or the mlxsw ethernet driver for example)
> 
> The issue I have faced is that a PCI device has no DT node
> (pci_dev.dev.of_node) which is reasonable as this is by design
> discoverable device. This, however, prevents me to register the PCI
> device as a thermal sensor (dev.of_node is required by thermal).
> 
> As far as we consider a fixed PCI topology eg. a SoC internal design I
> could put something like this in DT (used by ath11k/ath10k btw).
> 
> pci@... {
>    ...
>    pci-bridge@... {
>    ...
>         wifi:wifi@0 {
>               reg = <0x0 0 0 0 0>;
>               #thermal-sensor-cells = <0>;
>          };
>    };
> };
> 
> but in case we consider an arbitrary location of the device in PCI
> topology that DT modification will not work and still I have no device
> node.

I'm absolutely not a DT expert, but I assume that a thermal zone would
be associated with some resource fixed by the platform, such as a fan,
so I would think a thermal zone would have to be described in terms of
the platform physical topology, not the PCI device type.

> Is there any preferred solution in the Linux kernel for this kind of use-case?
> 
> All the ideas appreciated.
> 
> Thanks,
> /Waldek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ