Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp694655pxj; Thu, 17 Jun 2021 11:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztAebKgcO3RC1FA+7Ftr436XBJKsj3frOJOIPY+V6ohsnbeKWigXB8bhAMk2tWxy4bj8II X-Received: by 2002:a17:906:f19a:: with SMTP id gs26mr6835114ejb.551.1623954887821; Thu, 17 Jun 2021 11:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623954887; cv=none; d=google.com; s=arc-20160816; b=GUqRsSNXrpv2XfkTmvDntpT076kjp1DD4Nwg8EqBO2Rf1ki7QSxHda9jjv7We1HnM2 cHawPkNvsW4j2WXyRb6dtL0yEfM0T9m1oP3n+1O81q4gyhj/w4qURbHEZTucn/hM0O3M +lFmJJ2K816pnTw4OxbcqnhOb0EnzlKp77i0euW84V2EY0iJyWe/3nZyhCBbnphl4Nv5 T9oKV4IrDRdhh5qLwW1nh5eC1i/gtYuXI/GtpF7+aMKWUXrGCqeLHzTgfytHRnr233fc ufUWz9XAQf5ngvAgWW44BHV6MaxiqmPRkOjaWDADtcwO52lDVgaa9vMsdG9a/Rcald0U LZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=vMtbRKlE5Idkm6Rw+lkoZXWCjk6ZpMLnhEVNBvkvbRc=; b=1JDFK+H8ERbH54RjXC0M/T0ti2I+dAYgwJPChwKKhpBRlY/gn19180+j0dg2qM6v3K HittytUQlzOsOnNLT47Zoxf4NODXU+EKbbN03I9tlkm95V6Ifd1UqwcmjAuECBynJLBD u5b1TZA6TOBMKET9AZuTOuYipL99gEUdyNL4k81q+WgyJK4lPJvjPa8+l1NVyYv7TA37 mDq4mS5Bk8J9Lx4F8JPo3zNpXZN5K2eweJSbjJoZCJqv2e9+IQCGKunJ0IFrGkwRtHJV X8iHrgi1VXaLC5MKP+hPXQDi2Fi3BPWZT30RW2G9ZKeIiErl9eiS4gJ4ptXPJS19VjxB krpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lM40ahyw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si6489316ejs.90.2021.06.17.11.34.23; Thu, 17 Jun 2021 11:34:47 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=lM40ahyw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232301AbhFQQUq (ORCPT + 99 others); Thu, 17 Jun 2021 12:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbhFQQUm (ORCPT ); Thu, 17 Jun 2021 12:20:42 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683F7C0617A8 for ; Thu, 17 Jun 2021 09:18:31 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id t11-20020a1cc30b0000b02901cec841b6a0so4510182wmf.0 for ; Thu, 17 Jun 2021 09:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vMtbRKlE5Idkm6Rw+lkoZXWCjk6ZpMLnhEVNBvkvbRc=; b=lM40ahywSF0wIP6JdGUL4V1dao3i+wLW9SeDeJDRxzMxAjtLxuVKSQwHGGv/YcxS6p 23+/9VMISZD4QWKxj5T+dzoqVqJb5W9u1XwqodFgpU1Xf3rMZRJx9vg4ozFqQzSMjLBK u0R9JRVoAU41FrYTiNeCkZWxlUAXIpKXA/wzCRz2sHhjAI7tbTzws/RrQzWl08TuUL0F epnX69iw6KfFtLrbOy/KsoRnKxHBareOaanPxQY6a1naA9iwK6ESqcYgutsd8kO4pmfW Ksv3eW4oo4p799Rd8BT7flwQAlYbyPMZNmkc0LT2XVZ2XQ/MW4gnptV5/dV56Oliavci PQVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vMtbRKlE5Idkm6Rw+lkoZXWCjk6ZpMLnhEVNBvkvbRc=; b=f+QyeTB8Wp/DhelR8JxmnWCFP1NpqNRDaF9r3vSWjatuHo6YtOlCjyHpup8naa212Z RKwXe8Pf2LuqcbCaZE/0EAcHvE/SHsdapbSfce97oDteEyeOXYYoTTt5MPZ0q1/471Lq nZukKiZ2A8sZseIvLDzBTPLqUIM+cCornNgG+pxNdrXyXTZpbbL2Cl0swHSJqxppF44f g5521Q/Rgr//t4dKaWEcwa5EkgYHIQd7NPjZ7as+7e2TThz1zQppndwWK5y0DnKHcURa P/VtMxwNcOqNlwnJ5ujXlEEnUbR8ilfgxKCeCCR60GAClo8GUEjfPqdzugRw6U99CHDS 5y6A== X-Gm-Message-State: AOAM532TMeOWwv/ycoNnCBaA+Ygd4cQTKBrGqq3XVmHWFzLfZNBxaa3d Uo5FMwyZCmGqY+qk0kSdKZf9Fg== X-Received: by 2002:a05:600c:3b9e:: with SMTP id n30mr6137831wms.48.1623946709720; Thu, 17 Jun 2021 09:18:29 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:a8dd:a686:47bc:b03a? ([2a01:e34:ed2f:f020:a8dd:a686:47bc:b03a]) by smtp.googlemail.com with ESMTPSA id r6sm5868719wrt.21.2021.06.17.09.18.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 09:18:29 -0700 (PDT) Subject: Re: [PATCH RESEND v10 03/11] thermal: Use generic HW-protection shutdown API To: Matti Vaittinen , Matti Vaittinen Cc: Mark Brown , Kees Cook , Andy Shevchenko , Zhang Rui , Guenter Roeck , "agross@kernel.org" , "devicetree@vger.kernel.org" , linux-power , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , "bjorn.andersson@linaro.org" , "lgirdwood@gmail.com" , "robh+dt@kernel.org" , Amit Kucheria , Matteo Croce , Andrew Morton , Petr Mladek , "Rafael J. Wysocki" , Mike Rapoport , Josef Bacik , Kai-Heng Feng , linux-pm@vger.kernel.org References: <5531e89d9e710f5d10e7cdce3ee58957335b9e03.1622628333.git.matti.vaittinen@fi.rohmeurope.com> From: Daniel Lezcano Message-ID: <1c33f42c-4986-b758-da53-631ac0b82c6f@linaro.org> Date: Thu, 17 Jun 2021 18:18:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <5531e89d9e710f5d10e7cdce3ee58957335b9e03.1622628333.git.matti.vaittinen@fi.rohmeurope.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/06/2021 07:41, Matti Vaittinen wrote: > The hardware shutdown function was exported from kernel/reboot for > other subsystems to use. Logic is copied from the thermal_core. The > protection mutex is replaced by an atomic_t to allow calls also from > an IRQ context. Also the WARN() was replaced by pr_emerg() based on > discussions here: > https://lore.kernel.org/lkml/YJuPwAZroVZ%2Fw633@alley/ > and here: > https://lore.kernel.org/linux-iommu/20210331093104.383705-4-geert+renesas@glider.be/ > > Use the exported API instead of implementing own just for the > thermal_core. > > Signed-off-by: Matti Vaittinen > Acked-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog