Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp19574368ybl; Sat, 4 Jan 2020 04:32:05 -0800 (PST) X-Google-Smtp-Source: APXvYqykEaEFGI4nw5EHnuF+lUdvH6ftw/ql61WHdwbSGZ+wQCLOzcQhUkYAXOGDuLF7/HTNMSQ3 X-Received: by 2002:a05:6830:1e67:: with SMTP id m7mr101338419otr.262.1578141125856; Sat, 04 Jan 2020 04:32:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578141125; cv=none; d=google.com; s=arc-20160816; b=Vvz1aTJa0HlIgV2DRXWCHAsq6tGoKkDJJVY1TotHtf+7pyew7KTpSvI7Qr40rROjyL UIgwp7eKzC9mQRQeF9BKf26GUyAaltBIkd+PSUbwjPw6v2C0IDMIbzamgGCcpgT3bf8V SzZDaVK1VrMv46z442lOK4PnBwB+oCx73VKAijhGggHSJ6lWk4pD2B0FMowKN730UiHF hg6A4w5GB7XUI0Sofc+Qy3dAWiZNyBSH90qYqPH2emIsscQ7DG0J0H7x26Vs55a+W2TT iPb1hENgktQkIhHob0DYD4QWtstjnl53xm8lZCs9MeHOz3My5dzy98nzhCg4CaMxO/j5 UzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/g6y3BpR5MUzznkKfkqUeYjFEU5yV+CLJdtqKmGnosE=; b=k1y5hOetX7mk5DqPwXsSp7eOqv0zNqiCE/2Di4xbf+ysdtCYdOKfgSI30z88mSyf3X h5vBuwGH2y+HV8KY+Nq8aOU4eIGRI4eQunTDaaSbwB3g7OTqj4WVSOfmd6k3XvrZgtQ4 aVqrBEUUSMO721U18T90iCqDeoKL/ViGSuvLQJcyUGF/ViweZmz+DnpcofhuOH/tpqyo 9pconuZ5IYVcvjfBRGTd7W1zQi6FnI0ZNLRJ7I7Rc9NeDAilJgq6GCi3WSjYsk9sRj47 7B3zq8aS7I2MKYyS3IGDTMihDGU7F+Y0slEIyAMMLKHNUPF2wCHYHB6HqozYoZThUhFo /bXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iduUkJNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si33427407otl.138.2020.01.04.04.31.51; Sat, 04 Jan 2020 04:32:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iduUkJNB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725883AbgADMbJ (ORCPT + 99 others); Sat, 4 Jan 2020 07:31:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:34786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgADMbI (ORCPT ); Sat, 4 Jan 2020 07:31:08 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D846620848; Sat, 4 Jan 2020 12:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578141068; bh=QVpjc1/4jlPVd2gtunIVnBcBi4YgLlgOIz3IUTkp1Dg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iduUkJNBpHF62ZC98P46HgSPBOXZwjopv/NCb6k2lqvkGvdinQEjSblWa6PpLuObk NEXIV13S5I91mer+4T/YS07VGa+EcpqXzcp/3V4f/gSAWK4YQEPiU40kQyKqZ2K0Bo ceHppjRkx+0I8EgqR5H5YGhV5JuFcMaPefOkL0fU= Date: Sat, 4 Jan 2020 13:31:06 +0100 From: Greg Kroah-Hartman To: Stephan Gerhold Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Barry Song , Daniel Thompson , Mark Brown , Lee Jones , Sasha Levin Subject: Re: [PATCH 5.4 055/191] mfd: mfd-core: Honour Device Trees request to disable a child-device Message-ID: <20200104123106.GB1296856@kroah.com> References: <20200102215829.911231638@linuxfoundation.org> <20200102215835.819082035@linuxfoundation.org> <20200103102347.GA879@gerhold.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200103102347.GA879@gerhold.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 03, 2020 at 11:23:47AM +0100, Stephan Gerhold wrote: > On Thu, Jan 02, 2020 at 11:05:37PM +0100, Greg Kroah-Hartman wrote: > > From: Lee Jones > > > > [ Upstream commit 6b5c350648b857047b47acf74a57087ad27d6183 ] > > > > Until now, MFD has assumed all child devices passed to it (via > > mfd_cells) are to be registered. It does not take into account > > requests from Device Tree and the like to disable child devices > > on a per-platform basis. > > > > Well now it does. > > > > Link: https://www.spinics.net/lists/arm-kernel/msg366309.html > > Link: https://lkml.org/lkml/2019/8/22/1350 > > As far as I understand it, this commit is not suitable for backporting. > The link above explains the problem for a similar patch: > > But I believe this would introduce a rather ugly bug in > mfd_remove_devices() if the first sub-device is set to disabled: > It iterates over the children devices to find the base address > of the allocated "usage count" array, which is then used to free it. > If the first sub-device is missing, it would free the wrong address. > > This problem does not exist in mainline because the MFD usage counting > was removed entirely as part of the larger "Simplify MFD Core" series [1]. > > None of the device trees in the stable kernels should depend on > disabling MFD devices from the device tree. (They were written at a time > when the MFD core ignored that request entirely...) > Therefore, I would suggest to drop this patch entirely. Thanks for catching this, now dropped from all stable queues. greg k-h