From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out.google.com ([74.125.121.35]:8156 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047Ab0DSTXq (ORCPT ); Mon, 19 Apr 2010 15:23:46 -0400 Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id o3JJNjGO024468 for ; Mon, 19 Apr 2010 21:23:45 +0200 Received: from wyb28 (wyb28.prod.google.com [10.241.225.92]) by kpbe12.cbf.corp.google.com with ESMTP id o3JJNSSQ015693 for ; Mon, 19 Apr 2010 12:23:28 -0700 Received: by wyb28 with SMTP id 28so207755wyb.24 for ; Mon, 19 Apr 2010 12:23:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1271704277.15004.8.camel@c-dwalke-linux.qualcomm.com> References: <1271700189-8376-5-git-send-email-dwalker@codeaurora.org> <1271703705.15004.4.camel@c-dwalke-linux.qualcomm.com> <1271704277.15004.8.camel@c-dwalke-linux.qualcomm.com> Date: Mon, 19 Apr 2010 12:23:27 -0700 Message-ID: Subject: Re: [PATCH 5/5] arm: msm: smd: fix SMD modem processor sync condition From: Dima Zavin Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Daniel Walker Cc: linux-arm-msm@vger.kernel.org On Mon, Apr 19, 2010 at 12:11 PM, Daniel Walker wrote: > On Mon, 2010-04-19 at 12:06 -0700, Dima Zavin wrote: >> On Mon, Apr 19, 2010 at 12:01 PM, Daniel Walker wrote: >> > On Mon, 2010-04-19 at 11:34 -0700, Dima Zavin wrote: >> >> Do we really need a formalized blocking point here? The apps processor >> >> can do other useful initialization work while the modem is booting. >> >> The first time you do a proc_comm call, it checks the PCOM_READY >> >> state, and will block anyway. Preventing the apps processor from >> >> continuing until then is suboptimal. If there are bugs in the modem >> >> code where it incorrectly stomps on shared resources, then those >> >> should be fixed. This patch looks like a hack to me. >> > >> > >> > Yes, we need to formalize a blocking point .. The apps processor waits >> > in this way no matter what you do .. Like your saying above "The first >> > time you do a proc_comm call, it checks the PCOM_READY state, and will >> > block anyway" that's a hack .. What your saying is _maybe_ there exists >> > a proc_comm call early enough to prevent a crash, or maybe not .. That's >> > not formal enough. >> >> That's not at all what I am saying. There's no maybe. If I don't need >> anything from the modem, I won't make a proc_comm call. If there is a >> crash because the modem is modifying shared resources that affect the >> apps processor without an appropriate synchronization point, then it's >> a bug on the modem side. Making this change will only mask modem bugs. > > If you don't make a proc_call call SMD won't initialize properly early > on, since the modem may or may not be booted far enough to accept input > over SMD.. Then you can basically have a failed SMD init, which means > you crash when you actually need stuff through SMD. But smd_core_init is already waiting for smd to be up. It waits for SMEM_SMSM_SHARED_STATE to be published. What does proc_comm have to do with it except for the fact that PCOM_READY gets set relatively late in the modem boot? If the shared state infrastructure is not yet initialized, it shouldn't be publishing it. Otherwise, you are just overloading PCOM_READY and again masking issues. Especially when we move to chips that don't need proc_comm for most things, and 7x30 is one of them where we get a lot of local clock control, it really seems wrong to wait for proc_comm to be up. You mentioned that this change will prevent some random crashes. Have you traced them down to what exactly is failing? Thanks. --Dima > > Daniel > >