Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1279820pxb; Thu, 4 Mar 2021 07:39:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5auCUMtIElPRVCVDPzXqylQv7iYHaJGItJhtqxgBYexUQlcvXNLnQbh63AdW7SFYWhCvD X-Received: by 2002:a17:906:495a:: with SMTP id f26mr4713619ejt.271.1614872357481; Thu, 04 Mar 2021 07:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614872357; cv=none; d=google.com; s=arc-20160816; b=HgHnHcZ3hTpQ+Avx8wbapiI7Qq6JAsTwuU3gqUxcOffFJObFwVgEd7Ay6r95X6PtfN roWuOgfT41fyu5lh259EYO5aIhbE+k2CHtCLRBfwR3WHuCC0C83Uhuek/9CuxAdJpOoP x5qAmak93YUoQKW6l3au3V9NaTEy7OKID5wASV/SQ60jEWqw3OaFTfAsKejLOwaliPRb F4oPhn+1PqHLCdk4NifgbGe9UCmKYw0Xp9ntqQRE8HhwVtQLZb0veSdEQrnPnfgVikbo sY+gnH871+oty7Q7Wz26EVakKDW3i4NEDR3/uYoOoAGEgFtUUOYvTSDpkzcTEqjelEYO 2DKw== 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:dkim-signature; bh=tyImSAmUouBU0h3BNJjpkZEX4MBw++5drbgZz8hDIGU=; b=O2se28aeQmzTt9WAca4eu51Q/gSbAe72HOtBvGJdWsm12a4P20a+MGeQYTRG6JOtKY 8H/tgqI/s/z4YSdXXjnN3Mz9cSp2gYhB6Ww3yN2lEwQ2tFhD7svGLJqaWxYK0yGwXVZq ci9DMFcDChWB2aQ4Syd47RWH78At5kOt1Sjn0DSO9hvpUL138A7BuLafrqQgzv45ORNh RpuitcblcIV478KcNOripm/0smrGzXmV1VVBH3sUoY0zG4XgyOyEcmRZdnmBfQmN5gU1 aMqDMQXLqRYc5O98TQXf0F/Y1UH7/bxj0FeGyT4lD7xa7bSYixegI0PJZ2xIkjU7+uiF 62bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NUQWaSsj; 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 a9si2606388ejk.421.2021.03.04.07.38.54; Thu, 04 Mar 2021 07:39:17 -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; dkim=pass header.i=@linaro.org header.s=google header.b=NUQWaSsj; 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 S235939AbhCDIhR (ORCPT + 99 others); Thu, 4 Mar 2021 03:37:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235908AbhCDIgz (ORCPT ); Thu, 4 Mar 2021 03:36:55 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C617C06175F for ; Thu, 4 Mar 2021 00:36:14 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id e6so18440137pgk.5 for ; Thu, 04 Mar 2021 00:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tyImSAmUouBU0h3BNJjpkZEX4MBw++5drbgZz8hDIGU=; b=NUQWaSsj93C5Ky69q4BObjnxtVE2K7CfrahBU5OpyXBpZGhEEZc3annbEsYt8PUuOq SNjF04wsEOQEoee/uZtjDXy9SSzLuQLgT1LEnmpm9RiFQ98T89VISksoM+jESqSIcaqG XYygQ0iPMmr0lKh8ZOdgWOBowFf42hsTt82UTZ0DHxxC8OnUNj3Ju/Xvu9NBuu8lsG7y IZV5Ztyjmn6pqM6N8NT45aN3Btil4faQLRcjKOA2kuiAnoQA4Zy4Cd2aW0TJlc9+mkC/ Z6wyrI0xk+YFTKiSoFRPRyyqpDZKvXrsmtOl0bPiHTfWUDEQARg2Mbb8P1EwvBObLiWZ gGTQ== 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=tyImSAmUouBU0h3BNJjpkZEX4MBw++5drbgZz8hDIGU=; b=Kycd28v5yi1x4lo+i3Hd8YTa1RHbZRLcjJQxmzv2Mg7EvhzjTFELWLfn+CR4vBsMLF SR20Henij95wN9aegcQ+JYXzseqJsjdfBjjLv1QMu9dWXZHuK1IVnV/ryn1yF9aXQ2sJ oIcsii/vPMhM1Q3AuDkNZMpCz7NzSLP4VEzX4ktJkkj1AAIArZsL9JdVD7B/SimUOeKf NjGJHAfK1t00D1RVWw+8TG0JO950i/FyjTfLfZzN+Sb5A+mCJTyP4nfmTqSfxOHv2GLJ Aa4HY2w+pvbqFZ2fS3sJZ0+26kE8jP3D4FiH0oX6afJfFpKq8hNZPV4ZBiGDKWkAKf/H x6YA== X-Gm-Message-State: AOAM531y70rA88C1Xt8FOoBDC57TJMVeIjlifr5mPeMwTZL2QgFqCzpV RTtxkmWU0SbwzxJnekhwwtZEakOw6+5hFDnzYZAjMw== X-Received: by 2002:aa7:9341:0:b029:1ee:ee87:643a with SMTP id 1-20020aa793410000b02901eeee87643amr2868608pfn.55.1614846973885; Thu, 04 Mar 2021 00:36:13 -0800 (PST) MIME-Version: 1.0 References: <1614208985-20851-1-git-send-email-bbhatt@codeaurora.org> <1614208985-20851-4-git-send-email-bbhatt@codeaurora.org> In-Reply-To: <1614208985-20851-4-git-send-email-bbhatt@codeaurora.org> From: Loic Poulain Date: Thu, 4 Mar 2021 09:43:52 +0100 Message-ID: Subject: Re: [PATCH v6 3/4] bus: mhi: core: Process execution environment changes serially To: Bhaumik Bhatt Cc: Manivannan Sadhasivam , linux-arm-msm , Hemant Kumar , Jeffrey Hugo , open list , =?UTF-8?B?Q2FybCBZaW4o5q635byg5oiQKQ==?= , Naveen Kumar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Feb 2021 at 00:23, Bhaumik Bhatt wrote: > > In current design, whenever the BHI interrupt is fired, the > execution environment is updated. This can cause race conditions > and impede ongoing power up/down processing. For example, if a > power down is in progress, MHI host updates to a local "disabled" > execution environment. If a BHI interrupt fires later, that value > gets replaced with one from the BHI EE register. This impacts the > controller as it does not expect multiple RDDM execution > environment change status callbacks as an example. Another issue > would be that the device can enter mission mode and the execution > environment is updated, while device creation for SBL channels is > still going on due to slower PM state worker thread run, leading > to multiple attempts at opening the same channel. > > Ensure that EE changes are handled only from appropriate places > and occur one after another and handle only PBL modes or RDDM EE > changes as critical events directly from the interrupt handler. > Simplify handling by waiting for SYS ERROR before handling RDDM. > This also makes sure that we use the correct execution environment > to notify the controller driver when the device resets to one of > the PBL execution environments. > > Signed-off-by: Bhaumik Bhatt Looking good now Reviewed-by: Loic Poulain