Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp166003pxb; Thu, 21 Jan 2021 04:15:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcnNAue9bExkDnIGBU9E844q8BkqfNMxyzS5XM+iAXOYYGaX2GB8pL7YCErdKN2v3QyTga X-Received: by 2002:a17:906:589:: with SMTP id 9mr9339376ejn.229.1611231329261; Thu, 21 Jan 2021 04:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611231329; cv=none; d=google.com; s=arc-20160816; b=IyuXaLLmoAsqjMmrTTXibon2eMrHJLTyMJ3lDmPOyDgYqdTULsfl4S7rhqJapcJEmk sq5RTjxQ5l5IPGmFtOfUMgumxL3IvlQBrSGzKcZPy8GVynuV/16VHBXgwyjLVjyyhYIb sRJmxe5lt8NYgkBt+mxMeaX6RVO8ve/sxw2r84KnQbpab2KowdJXtLYPFhLfZYaWgG3M C3jjZaYuI4fcuxrEtdFLaYUbPHBEjlLOxikjcGmh8Xoh1EWPwgka3gg5Q07TCnD+Jrgm ECFRALUzT+ZuLCEa2mSWnrYNUAXgmBZYmcfjM5ptGTpTAF0RooYagjSYtzA93bvpL+OZ bgEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=KN7X5cb1xBM2Aiwbk2CER1u8lNv5H/NY07cvyV8TZWI=; b=NxxrVT5dCNoY59LBkgtqjwMnFz3TKMU/3hU9w9oEqt4JmvYFwv/8OkqNH//2MqDjve G39m20DlQILh9oXL3a8IlzxeGD6KmUlNx52P7M0eTUGALLIwi634z9mOVtAce564c06b 99LqyCmHCLKMyFhpYsbdqJJlGfQMj4SnYBuhlLpqJxirB9cjGVVPeQDEZuQsW4XVNY7g yQaBaK2NXXyE8KDfKr/FK46+R967XueXxUYqZHNAj719iJM3Es+z0uONILJ/UpfPj1zY nCwGMzshm9d128lDPUJpdda10nE/7dFeA0KphITBLgUqzraxNfhyyYtfrow5rSV/Js3J 4ruQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si1953909edv.524.2021.01.21.04.14.57; Thu, 21 Jan 2021 04:15:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730421AbhAUMM5 (ORCPT + 99 others); Thu, 21 Jan 2021 07:12:57 -0500 Received: from mail-ot1-f44.google.com ([209.85.210.44]:33257 "EHLO mail-ot1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728469AbhAUK7i (ORCPT ); Thu, 21 Jan 2021 05:59:38 -0500 Received: by mail-ot1-f44.google.com with SMTP id 63so1217274oty.0; Thu, 21 Jan 2021 02:59:19 -0800 (PST) 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; bh=KN7X5cb1xBM2Aiwbk2CER1u8lNv5H/NY07cvyV8TZWI=; b=aUEMwCfRD1Fiu1xjKKAi6xSGyT/v/Hjs0qFBPtc6jpbKF/qRcf8CDuvZxJM3S+3otT jEt1P0pqk74EMqFHo331i7Psex92e20ELR2upLRcaVCtgbFuB6Q7XW58KqMCNdTH/iUa 6pJ8QqmkxDF8m/iM97m9F6YmGNFSzlqWudDo04TbATnq3qIhpqTvXPX5JLZHo7jbH2cZ IHZosrKdYaiMjAz4X6uqgFf+0YC1uncTM4nYMd1NstsPER3gmTvhNgB9M1YYJFtXcuBf 56kr/llKSwKVt0ervyBg+AZZd7Fazmz0yVHdo8VvoEP0mhDBQv8sIlgF7ndA4eddWQIQ prLQ== X-Gm-Message-State: AOAM530BbmFqbGx2GFd8fXe7idhC0Il4o55jAFYoogLB7/4r9k1KxpOs 3T/2TVXzNEFLZx1cpDhoHAy0fPAUHk0z2YOQpxQ= X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr10022158oth.250.1611226733787; Thu, 21 Jan 2021 02:58:53 -0800 (PST) MIME-Version: 1.0 References: <17nqrn25-rp5s-4652-o5o1-72p2oprqpq90@onlyvoer.pbz> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 21 Jan 2021 11:58:42 +0100 Message-ID: Subject: Re: [PATCH] PM / clk: make PM clock layer compatible with clocks that must sleep To: Naresh Kamboju Cc: Nicolas Pitre , "Rafael J. Wysocki" , Greg Kroah-Hartman , Michael Turquette , Stephen Boyd , Russell King , Linux PM , linux-clk , open list , Mark Brown , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 10:13 AM Naresh Kamboju wrote: > On Tue, 5 Jan 2021 at 08:48, Nicolas Pitre wrote: > > > > The clock API splits its interface into sleepable ant atomic contexts: > > > > - clk_prepare/clk_unprepare for stuff that might sleep > > > > - clk_enable_clk_disable for anything that may be done in atomic context > > > > > > > > > Signed-off-by: Nicolas Pitre > > > > diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c > > index ced6863a16..a62fb0f9b1 100644 > > --- a/drivers/base/power/clock_ops.c > > +++ b/drivers/base/power/clock_ops.c > > > > > @@ -64,17 +166,20 @@ static void pm_clk_acquire(struct device *dev, struct pm_clock_entry *ce) > > ce->clk = clk_get(dev, ce->con_id); > > if (IS_ERR(ce->clk)) { > > ce->status = PCE_STATUS_ERROR; > > + return; > > + } else if (clk_is_enabled_when_prepared(ce->clk)) { > > arm-linux-gnueabihf-ld: drivers/base/power/clock_ops.o: in function > `pm_clk_acquire': > drivers/base/power/clock_ops.c:170: undefined reference to > `clk_is_enabled_when_prepared' > > Reported-by: Naresh Kamboju > > This build error was noticed on arm architecture on linux next 20210121 tag. > Following builds failed. > - arm (omap1_defconfig) with clang-10 - FAILED > - arm (omap1_defconfig) with clang-11 - FAILED > > - arm (omap1_defconfig) with gcc-8 - FAILED > - arm (omap1_defconfig) with gcc-9 - FAILED > - arm (omap1_defconfig) with gcc-10 - FAILED Missing dummy clk_is_enabled_when_prepared() for the !CONFIG_HAVE_CLK case? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds