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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <db925f92287825ba702194e867e25c4e3f40b78a.camel@siemens.com>
Date: Fri, 13 Dec 2024 11:45:22 +0000
From: "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>
To: "luca.ceresoli@...tlin.com" <luca.ceresoli@...tlin.com>
CC: "deller@....de" <deller@....de>, "paul.kocialkowski@...tlin.com"
	<paul.kocialkowski@...tlin.com>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
	"saravanak@...gle.com" <saravanak@...gle.com>, "derek.kiernan@....com"
	<derek.kiernan@....com>, "rfoss@...nel.org" <rfoss@...nel.org>,
	"mripard@...nel.org" <mripard@...nel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "jingoohan1@...il.com" <jingoohan1@...il.com>,
	"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "rafael@...nel.org"
	<rafael@...nel.org>, "contact@...lk.fr" <contact@...lk.fr>,
	"thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
	"arnd@...db.de" <arnd@...db.de>, "daniel.thompson@...aro.org"
	<daniel.thompson@...aro.org>, "airlied@...il.com" <airlied@...il.com>,
	"Laurent.pinchart@...asonboard.com" <Laurent.pinchart@...asonboard.com>,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"neil.armstrong@...aro.org" <neil.armstrong@...aro.org>, "robh@...nel.org"
	<robh@...nel.org>, "daniel@...ll.ch" <daniel@...ll.ch>,
	"herve.codina@...tlin.com" <herve.codina@...tlin.com>,
	"andrzej.hajda@...el.com" <andrzej.hajda@...el.com>,
	"jernej.skrabec@...il.com" <jernej.skrabec@...il.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"maarten.lankhorst@...ux.intel.com" <maarten.lankhorst@...ux.intel.com>,
	"wsa+renesas@...g-engineering.com" <wsa+renesas@...g-engineering.com>,
	"dragan.cvetic@....com" <dragan.cvetic@....com>, "tzimmermann@...e.de"
	<tzimmermann@...e.de>, "lee@...nel.org" <lee@...nel.org>, "jonas@...boo.se"
	<jonas@...boo.se>
Subject: Re: [PATCH v4 5/8] i2c: i2c-core-of: follow i2c-parent phandle to
 probe devices from added nodes

Hi Luca!

On Fri, 2024-12-13 at 12:28 +0100, Luca Ceresoli wrote:
> > > However for hotplug connectors described via device tree overlays there is
> > > additional level of indirection, which is needed to decouple the overlay
> > > and the base tree:
> > > 
> > >    --- base device tree ---
> > > 
> > >    i2c1: i2c@...d0000 { compatible = "xyz,i2c-ctrl"; ... };
> > >    i2c5: i2c@...e0000 { compatible = "xyz,i2c-ctrl"; ... };
> > > 
> > >    connector {
> > >        i2c-ctrl {
> > >            i2c-parent = <&i2c1>;
> > >            #address-cells = <1>;
> > >            #size-cells = <0>;
> > >        };
> > > 
> > >        i2c-sensors {
> > >            i2c-parent = <&i2c5>;
> > >            #address-cells = <1>;
> > >            #size-cells = <0>;
> > >        };
> > >    };
> > > 
> > >    --- device tree overlay ---
> > > 
> > >    ...
> > >    // This node will overlay on the i2c-ctrl node of the base tree  
> > 
> > Why don't you overlay it right over &i2c1?
> > It should have worked since commit ea7513bbc041
> > ("i2c/of: Add OF_RECONFIG notifier handler").
> > Doesn't it work for your use-case?
> 
> One reason is decoupling the base board and addon. A different base
> board may wire the same connector pins to 'i2c4' instead of 'i2c1'. We
> want a single overlay to describe the addon, independently of the base
> board, so it has to mention only connector pins, not base board
> hardware.
> 
> Another reason is that using phandles to labels in the base tree in the
> overlay (such as &i2c1) would need properties added by the __symbols__
> node, and overlays adding properties to nodes in the live tree are not
> welcome. This is both for a conceptual reason (adding an overlay ==
> adding hardware and not _changing_ hardware, so adding nodes should be
> enough) and an implementation one (properties added to nodes in the
> live tree become deadprops and thus leak memory.
> 
> This topic was discussed at the latest Linux Plumbers Conference last
> September. Slides and video of the discussion are available here:
> https://lpc.events/event/18/contributions/1696/
> 
> More info are in the cover letter. Discussion leading to this
> implementation started after v2:
> https://lore.kernel.org/all/20240510163625.GA336987-robh@kernel.org/

I see! Thank you for the explanation and for the references!

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ