Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp84235pxb; Mon, 16 Aug 2021 00:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrva4qEWyZLNZXr3W8onSmV717PSaePk//RHlyz4orNUfpFQxUrT3sfVV6SWcZpmpIUh4o X-Received: by 2002:a17:906:2495:: with SMTP id e21mr14760529ejb.244.1629097458834; Mon, 16 Aug 2021 00:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629097458; cv=none; d=google.com; s=arc-20160816; b=ZEYxGRm7NI01+TNR+dBh+syFQBOeBgpJCz8StHoK8SfGz6y2Fw5lPv20SwrYcrUTar lcH/BAxQLjQx5QS2WvXNfeIbTpLscncnAHuNj4LbtyA0N+Zdq5g7xxsQttbgxdBWUGnW O1/e643JKQZr254jr1P/t9SFDQfGYSboBTtl2nsR8rZrbO682UJHQthF84ZsrDLXyZZj iEGQhrfuG673pLwUqcr/2WABTAujW4MMHP8Mmgm+7FgslUNHUaE2i/htQX7FUG/ibpV/ FYEM3kK0+3SWwK0T4UlMhWt5faeAXeMmlQra6OdNdGw+mgG1hbpwAMnEr1nkuos4/1zV Jnig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=avuJheN6hi2zBeYocJlPLHp0B/veiIZFlrU2lO++XZE=; b=cJOKDsUhNujQci8pMvD1o3xxIvCtu6+IgGzHqmhVpVtOgnACII/yfpCO6s1Gytypgf zSAX9FbHN1ySab1x/8j9kpSbPObWzuLz39f5BuhTMLxZPL3rJY8arje9Q0hbxvD5kcjD r3wRg+SeIFIXY8rAC/TjnMlPFI4som9A/AJGmd26RjoxxV/oskLFbn3l7xQeiN7kQ/0b hGDQVfOcXet5foxXnWkQHcHRqFWFi7BfsLScoCziKWR2Ge2gwxYOTYdX62sHqkxnjsEC 5vfBWFMK2B630FCpj+LdS+oLBCfL1eG1Pm+GYl0ATFfCkWPREW5yeJegqaV4PVWoIYv3 O5Ow== 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 k24si258738edv.610.2021.08.16.00.03.55; Mon, 16 Aug 2021 00:04:18 -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; 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 S233600AbhHPHC6 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 Aug 2021 03:02:58 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:40183 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbhHPHC5 (ORCPT ); Mon, 16 Aug 2021 03:02:57 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id AF17724000A; Mon, 16 Aug 2021 07:02:24 +0000 (UTC) Date: Mon, 16 Aug 2021 09:02:23 +0200 From: Miquel Raynal To: Clark Wang Cc: conor.culhane@silvaco.com, alexandre.belloni@bootlin.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH V4 8/8] i3c: master: svc: enable the interrupt in the enable ibi function Message-ID: <20210816090223.32475a5c@xps13> In-Reply-To: <20210809063645.2289988-9-xiaoning.wang@nxp.com> References: <20210809063645.2289988-1-xiaoning.wang@nxp.com> <20210809063645.2289988-9-xiaoning.wang@nxp.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Clark, Clark Wang wrote on Mon, 9 Aug 2021 14:36:45 +0800: > If enable interrupt in the svc_i3c_master_bus_init() but do not call > enable ibi in the device driver, it will cause a kernel dump in the > svc_i3c_master_handle_ibi() when a slave start occurs on the i3c bus, > because the data->ibi_pool is not initialized. > So only enable the interrupt in svc_i3c_master_enable_ibi() function. Is this situation actually happening or is this purely theoretical? Anyway this doesn't hurt so: Reviewed-by: Miquel Raynal > > Signed-off-by: Clark Wang > --- > V4: New patch in this patchset > --- > drivers/i3c/master/svc-i3c-master.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c > index 77f67d407acd..b802afd8eb7d 100644 > --- a/drivers/i3c/master/svc-i3c-master.c > +++ b/drivers/i3c/master/svc-i3c-master.c > @@ -569,8 +569,6 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m) > if (ret) > goto rpm_out; > > - svc_i3c_master_enable_interrupts(master, SVC_I3C_MINT_SLVSTART); > - > rpm_out: > pm_runtime_mark_last_busy(master->dev); > pm_runtime_put_autosuspend(master->dev); > @@ -1398,6 +1396,8 @@ static int svc_i3c_master_enable_ibi(struct i3c_dev_desc *dev) > return ret; > } > > + svc_i3c_master_enable_interrupts(master, SVC_I3C_MINT_SLVSTART); > + > return i3c_master_enec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR); > } > > @@ -1407,6 +1407,8 @@ static int svc_i3c_master_disable_ibi(struct i3c_dev_desc *dev) > struct svc_i3c_master *master = to_svc_i3c_master(m); > int ret; > > + svc_i3c_master_disable_interrupts(master); > + > ret = i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR); > > pm_runtime_mark_last_busy(master->dev); Thanks, Miquèl