Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905AbcJFEBr (ORCPT ); Thu, 6 Oct 2016 00:01:47 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:35413 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbcJFEBp (ORCPT ); Thu, 6 Oct 2016 00:01:45 -0400 Date: Thu, 6 Oct 2016 09:31:39 +0530 From: Viresh Kumar To: Markus Mayer Cc: Rob Herring , Mark Rutland , "Rafael J . Wysocki" , Broadcom Kernel List , Device Tree List , Power Management List , Linux Kernel Mailing List Subject: Re: [RESEND PATCH v2 2/3] cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs Message-ID: <20161006040139.GA17619@vireshk-i7> References: <1475272561-8446-1-git-send-email-mmayer@broadcom.com> <1475272561-8446-3-git-send-email-mmayer@broadcom.com> <20161005032509.GG4664@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 830 Lines: 19 Thanks for accepting all the comments :) On 05-10-16, 14:04, Markus Mayer wrote: > Is there an easy way for me to know via the framework whether init is > being called for the first time vs. init is being called on a > different core after a previous attempt to initialize on another core > failed? > > I could use a driver-global variable for the driver to remember if it > has been initialized, but that seems a bit hacky. You don't really need to have any special code here, specially for the case that may never get hit. For example, if we fail to initialize something for CPU0, cpufreq core will try calling this routine for other CPUs as well. I don't think there is anything wrong in letting cpufreq core trying that. Why stop it or return early? It wouldn't happen normally, unless there is a bug in there. -- viresh