Received: by 2002:ac8:678b:0:b0:405:464a:c27a with SMTP id b11csp13338qtp; Tue, 1 Aug 2023 12:11:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUMKD1gIov0NFZHSf5GRPmEGKyhPAusEpKWQNxXY51YJeBbV8ySHRRPJP4QB8FgMocdDv+ X-Received: by 2002:a19:711a:0:b0:4fb:77d6:89c3 with SMTP id m26-20020a19711a000000b004fb77d689c3mr2781585lfc.12.1690917094763; Tue, 01 Aug 2023 12:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690917094; cv=none; d=google.com; s=arc-20160816; b=oS6rczLzGEcoU1XEQ5baCXq6aXYlj5PhAmzCXAHfGUtNDMjSbNC2RnfCzBV/orvRux ur/JyEMePpQF4Wiqi9hj+LB/msIUlIQqw79+Ugs70vgYN4BbuvF7CZiCWF52h5Op1Rzv uRvnm1VZXwth9t4epEPPPYpLTvg+9AHlym84T1d+W/mOCIJL9hNCpRYb/NIgQlKlJaYZ 4AZgUlBLyNH6QgHNulKeRMFr9OPy1RB5fF+TGf99IfXIxNoqCs0L4zXvaO/qfh8Pdf7w PBYNEzvYngiQAS2uvnup6xP/NpBct2Ocq5jdFuvMaQDwNZPIB4UqMqWUwGjyaDOpt23o R4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=1vCgVxWVH5Kl9xwajo4Bv2Kr3g29NS8A7MTukOoklQU=; fh=FQ/w6k7Qz6bMR8FOPJiFU9M7OR2iCyejlVLyqUye3Pc=; b=hIrFqkkFLBCRCMEvJfn7L2mjvIQL8qM+mU/x3ih7e93YmsVd+86W0rQGnxRnH+6h8Z SvLU3ZusbcHTRRiH43eFHKcZx5Bqvda8Ll9UUoTAp0iYhmAUjzxhOP8bdixOY6y4BgLD NI/9zpdhwZPxUhognk5NL0aPrO1z7lIxhMaNq9cu7YQO0IBjZMkeEi85r8Alolt14pRf h0ttvhgUsFLhBJyeP7Ue+IXprv07x9GxiVgOQHhIXDdUeJvYCL9MvIVO4Y7fLVohN57+ gK0aLAOXQGmYlc6endDQm64LLpkjAvQwKZczOZfQQbQMtYDjbFoW+/1zTVeTLJ1/6kBs RnAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ba30-20020a0564021ade00b00522b8b66749si4817931edb.492.2023.08.01.12.11.10; Tue, 01 Aug 2023 12:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbjHASkf convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 Aug 2023 14:40:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbjHASke (ORCPT ); Tue, 1 Aug 2023 14:40:34 -0400 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56B77268E; Tue, 1 Aug 2023 11:40:09 -0700 (PDT) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-56c9f7830c2so333245eaf.0; Tue, 01 Aug 2023 11:40:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690915188; x=1691519988; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bJ1fhbjpQoUWJT3y2RKGjKyUCNoTdwOyxERwVOCkTxo=; b=N6gu8jE5JuuhvFAYbXXxxUstouZk5wB6+Gf+kpZPpN+U2jHKlKMnTgRghK0FxzvSBT tbsXzIE+j5m9FAQ23GPFhGrmER6VsTXuGhCMccTbZsD81vJukJQWe3a+G6ShqWGkX2G3 99hXVO61woFfn1tofZnUvwa9rwrYgNGvnMe6XB+mBgWbKB4cy0PB4G4HxwGBulgHX+Qy 7V8elqI5AENWpJX1b1/yaUxwGnGqeOKYsUv2vVDYrtN50OkXsuCnSxggJ6h8KD9tfLdL Gf0DqPJ5nnU+Oy2wZHpXTEFWEBKugtY+3/ahH5ceNBbCgltvZiYdrUz0AyGwXZ7gf8mx Y1NA== X-Gm-Message-State: ABy/qLaHZqak5cP4DYixqgmafeSjx5tPHaOfRHv4dHSx0gSpNxRPkg0Y 5bFPU5llSiR95sDQkIxJQbSSBdk4gbJl1Fadpro= X-Received: by 2002:a05:6820:1686:b0:56c:5e21:c730 with SMTP id bc6-20020a056820168600b0056c5e21c730mr9457475oob.1.1690915187929; Tue, 01 Aug 2023 11:39:47 -0700 (PDT) MIME-Version: 1.0 References: <13318886.uLZWGnKmhe@kreacher> <12254967.O9o76ZdvQC@kreacher> <728e22ab-f68c-a891-f4d0-3d66cd03e9ec@linaro.org> In-Reply-To: <728e22ab-f68c-a891-f4d0-3d66cd03e9ec@linaro.org> From: "Rafael J. Wysocki" Date: Tue, 1 Aug 2023 20:39:36 +0200 Message-ID: Subject: Re: [PATCH v3 0/8] ACPI: thermal: Use trip point table to register thermal zones To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux ACPI , LKML , Linux PM , Michal Wilczynski , Zhang Rui , Srinivas Pandruvada Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 1, 2023 at 8:27 PM Daniel Lezcano wrote: > > > Hi Rafael, > > On 25/07/2023 14:02, Rafael J. Wysocki wrote: > > Hi Everyone, > > > > This is the second iteration of the $subject patch series and its original > > description below is still applicable > > > > On Tuesday, July 18, 2023 8:01:20 PM CEST Rafael J. Wysocki wrote: > >> > >> This patch series makes the ACPI thermal driver register thermal zones > >> with the help of thermal_zone_device_register_with_trips(), so it > >> doesn't need to use the thermal zone callbacks related to trip points > >> any more (and they are dropped in the last patch). > >> > >> The approach presented here is quite radically different from the > >> previous attempts, as it doesn't really rearrange the driver's > >> internal data structures, but adds the trip table support on top of > >> them. For this purpose, it uses an additional field in struct thermal_trip > >> introduced in the first patch. > > > > This update is mostly related to the observation that the critical and hot trip > > points never change after initialization, so they don't really need to be > > connected back to the corresponding thermal_trip structures. It also fixes > > an error code path memory leak in patch [5/8]. > > I've been through the series. It is really cool that we can get rid of > the ops usage at the end of the series. > > However, the series introduces a wrapper to the thermal zone lock and > exports that in the public header. That goes in the opposite direction > of the recent cleanups and obviously will give the opportunity to > drivers to do silly things [again]. Because it is necessary to update the trip points in the table under the zone lock, the driver needs to somehow make that happen. I suppose I can pass a callback to thermal_zone_device_update() or similar, but I'm not sure if that's better. > On the other side, the structure thermal_trip introduces a circular > reference, which is usually something to avoid. What do you mean by "a circular reference"? > Apart those two points, the ACPI changes look ok. > > Comments in the different patches will follow Thanks!