Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2160968pja; Thu, 26 Mar 2020 10:38:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt1L0FXdeop54rgpzLByPstG9/Xl3WC47bE9Oy/Fbt/Xdh5/FA7UZppRfXLPguLn1wSGNBB X-Received: by 2002:a9d:4f0:: with SMTP id 103mr7095832otm.336.1585244281796; Thu, 26 Mar 2020 10:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585244281; cv=none; d=google.com; s=arc-20160816; b=oPoRiwUo6L9qheUSzIyDRT423Ue6SJCwcSu18A3BHjzlVCVt+jN2QMCL6cuz4aE2MH YlvT6bpzz6oGEW9VlDpctanpzlPruLVA+zzeRE9uITsdYPGnZNJUbOKMntyLn1KNlFPe 6la8+vU/XPY91ccTfbyGb49Yhuc1UvXHzDcnwKtKd2+4aMSsO/xZeAL71yJZDxHUMs/u YzP7eanDitToORk/SrR5PN+XklINJrOawixdhP6mzF9LSsU6+WSefinCfjaWJ2xSExVC qKO9Bg0AEwC9sxPDkfJiU5zx1k6dvFSFEh69MBaCysptwhkd9fhb10igFomKNYj45NxL AFqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ksp5Sn0D2BCzxAWL5WIyush4E3FbeS39jm1gaEuKlPM=; b=CQxspY8DGYhnQdSVNvCJFsgDDZ6CkjFhP4Z2en3FAGtjNB7l0C1Sp9dQCKb5138+/A dOkaPDj6Pi1zNYnnyDKd6EInPKtF3wWKF89wVFwktDS7nEe4CbbppSlmkNHf8LLXZPcf OAcCuQK2bZe1+/VZgsjWmSQNBa5sZPyv2DczSWBRXs7QSpaMwDLkYcTCtEgMzPILTVP3 tPE5y7IqkKA40Yu7PwiPi/jCc7Y8nMdMuqHBvp64Z72qE/B0cvtD0Mkj1VyKG4lbOhzX ldVyzPyyZWz+Q1DS5w429ss2QG/DT2XPQX+pnDuU511D3A4F9CxORHPZJIBfLWFP0VKH k4YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aom4ucNc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si1212212ooq.63.2020.03.26.10.37.47; Thu, 26 Mar 2020 10:38:01 -0700 (PDT) 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=@google.com header.s=20161025 header.b=aom4ucNc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727995AbgCZRgb (ORCPT + 99 others); Thu, 26 Mar 2020 13:36:31 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:34381 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgCZRga (ORCPT ); Thu, 26 Mar 2020 13:36:30 -0400 Received: by mail-oi1-f193.google.com with SMTP id d3so1674208oic.1 for ; Thu, 26 Mar 2020 10:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Ksp5Sn0D2BCzxAWL5WIyush4E3FbeS39jm1gaEuKlPM=; b=aom4ucNcTUQhWPzVTqDvFvPAfYHfWfK0KLSjwT7h+o8E+zDmiouxvPbHIuwl5pVfUY 8GCufmcl8u3PZF9YMIWcrKqJ6EHbF4eYWr2mRvWj34BTIFk34r6TcInkAgUovApwkg3O 2ueLARfDzJxGCUeT6GiGdxUIGSyvnbUjRimkCviSJnK35uI+KiZXfruurW3fNlZJ+Xzw DmeeGVPr7T+um/KhA6QhHNfJsIVI7uhiXqReqvolCWpHGw83HSDPOZTp+nNX5yJSNuMZ p2b0ANcN/SPeBjNg8ybQ5St4js7J2n7+inzA+w60BpHcz407XVGG5RZNHRhVZc2NE76J 1t3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Ksp5Sn0D2BCzxAWL5WIyush4E3FbeS39jm1gaEuKlPM=; b=nY1drfC4vCI/BPkTO4wbZ7HTWWXN8cko3s28JsJgSb/CtbVyvWSZZMVyhHmF17yU01 uNSgYA8GfH/GDsIfSsSKXArGehoNKDrS7RxMoWuv0i7BxnpOhTuhuL0N8HNtsnTlM9cI mjBWUN8EI0qsGVTptVR5oplpag5MCiXdw8Qx5J9N3DHVr4NmdswKg84FMuJpyp1ktFZv zKji+gnnPOOGVp7wQffdpdg+ODKUlIqDaQEh7Pzu8FMpdPnX1gF3pdK2mUXtBeUvCSkJ S+/NOBtKZozltYz8vuyk8nj1WKR5S7FhXfkA0KkNFLPspKYhtQKzoNgMduWdYw9KkG9G kfsQ== X-Gm-Message-State: ANhLgQ3aeJ2B/kpbgtAWwR6fgK4FKUw6hVCsvQ7GsM95bsJ6I9JFtD9J OnThvVwp3aV3a5LADObpE3ESOODvckmQ552NYPejvg== X-Received: by 2002:aca:f541:: with SMTP id t62mr993785oih.172.1585244189614; Thu, 26 Mar 2020 10:36:29 -0700 (PDT) MIME-Version: 1.0 References: <20200111052125.238212-1-saravanak@google.com> <158460766637.28353.11325960928759668587.tip-bot2@tip-bot2> <20200324175955.GA16972@arm.com> <87lfnoxg2a.fsf@nanos.tec.linutronix.de> <4be7d1bf-9039-4ca0-02ac-d90d01cf1c4b@linaro.org> In-Reply-To: <4be7d1bf-9039-4ca0-02ac-d90d01cf1c4b@linaro.org> From: Saravana Kannan Date: Thu, 26 Mar 2020 10:35:46 -0700 Message-ID: Subject: Re: [tip: timers/core] clocksource/drivers/timer-probe: Avoid creating dead devices To: Daniel Lezcano Cc: Thomas Gleixner , Ionela Voinescu , LKML , linux-tip-commits@vger.kernel.org, x86 , liviu.dudau@arm.com, sudeep.holla@arm.com, Lorenzo Pieralisi , Jon Hunter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 3:18 AM Daniel Lezcano wrote: > > > Hi Saravana, > > On 25/03/2020 23:56, Saravana Kannan wrote: > > On Wed, Mar 25, 2020 at 2:47 PM Thomas Gleixner > > wrote: > >> > >> Saravana Kannan writes: > >>> On Tue, Mar 24, 2020 at 11:34 AM Saravana Kannan > >>> wrote: I took a closer look. So two > >>> different drivers [1] [2] are saying they know how to handle > >>> "arm,vexpress-sysreg" and are expecting to run at the same > >>> time. That seems a bit unusual to me. I wonder if this is a > >>> violation of the device-driver model because this expectation > >>> would never be allowed if these device drivers were actual > >>> drivers registered with driver-core. But that's a discussion > >>> for another time. > >>> > >>> To fix this issue you are facing, this patch should work: > >>> https://lore.kernel.org/lkml/20200324195302.203115-1-saravanak@google= .com/T/#u > >> > >> > >>> > >>> > >>> > > Sorry, that's not a fix. That's a crude hack. > > > > If device nodes are being handled by drivers without binding a > > driver to struct devices, then not setting OF_POPULATED is wrong. > > So the original patch sets it. There are also very valid reasons > > for allowing OF_POPULATED to be cleared by a driver as discussed > > here [1]. > > > > The approach of the original patch (setting the flag and letting > > the driver sometimes clear it) is also followed by many other > > frameworks like irq, clk, i2c, etc. Even ingenic-timer.c already > > does it for the exact same reason. > > > > So, why is the vexpress fix a crude hack? > > > >> As this is also causing trouble on tegra30-cardhu-a04 the only > >> sane solution is to revert it and start over with a proper > >> solution for the vexpress problem and a root cause analysis for > >> the tegra. > > > > If someone can tell me which of the timer drivers are relevant for > > tegra30-cardhu-a04, I can help fix it. If you want to revert the > > original patch first before waiting for a tegra fix, that's okay by > > me. > > > It seems the OF_POPULATED flag change spotted something wrong in > different drivers and that is a good thing. Thanks for your patch for > that. > > Without putting in question your analysis, we need to stabilize the > release, can you send a revert of your patch? > > Let's try to figure out what is happening and fix the issues in the > other drivers for the next cycle. Make sense. Will do soon. -Saravana > > Thanks > > -- Daniel > > > > -- > Linaro.org =E2=94=82 Open source software for AR= M SoCs > > Follow Linaro: Facebook | > Twitter | > Blog