From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 601F920127F for ; Thu, 23 Jan 2025 10:38:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737628718; cv=none; b=cmoS70IfDOQ8802MjXF2plr3b9/x2HfUsaNJN3RznMu4ZIAuxICNPE1Zor3hVPSjledAlbqba/DmfLvuJwPj/T9S7ye4SR84cqqy6w7IzD39bF84cUcOicUiraUiWKqx+XtZyZIZ/c4+A0sZPzttQc+RbYqABO/isNhW8XhLilw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737628718; c=relaxed/simple; bh=A9fAgGirtBaSIPilBJ6/5sb4jYusvk9H39Lk83vbIuo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jDfkjTmE12J82tK10tBVHGVo4STyxQcPMNeHRPZJNY36+DmGF846JItwDa3/TX3jcF5ZH3LcraxHv30k8EHXbmeId6bdbJQPRMm4yZi7lP1e7aDEt6XKsZVxSOvEO+f6HXBQ5AQOauqkuHu3WBciwUX+7yAVyHOr7caafIdD7BM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Wb4+S/1O; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Wb4+S/1O" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-38a34e8410bso372563f8f.2 for ; Thu, 23 Jan 2025 02:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737628715; x=1738233515; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fYJFJJLzNzJAn7tKjvuUDrRgZAArenLWovfu+NUU020=; b=Wb4+S/1OIFMO2hNUZuYMOCfZmZecklayY4Hh8PCl1KLkl8DOqnXOnn8uCQ5U59mPpT PO/kJxY8zvrtfsF6qUY8OmIrCbG2nzOanW/hr0IEnk/+ePlAu7OSmh9diXfN0sxa3+Hj mjJHLt692hPYfETlFipFdM4tl08ZB3ZKzxFF4a8182IbPPVC8FPfgL31BnsP+V7/LLnV p5mk9KLVDQdR3IrEn6VYtA0pVoljqdBbqmPZ6dkliawPW6mATmtY2WdjmCNiLtBWFlcL O0UzbC7s4oNk6HXcm8NppDIzAvjn5/mUb43ZhxWMaDfSHPInJHZ6Zp/ED46TVpsFgxRp vLpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737628715; x=1738233515; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fYJFJJLzNzJAn7tKjvuUDrRgZAArenLWovfu+NUU020=; b=HKe4KZmOmnCdSy6damQRuEStntNTUW9mBVZeGmwPx/f5XB/sWtdvN+lb7P7H1ae/Cx Q4rRHCuknR13ch3F8pqMUhcJ5RezQOlrX5XkCga0HoBZaA9JqpwFZPD51z1xGi5EJtut 6Y8QLGDgviP68pj3/asQn6rVQ+k94Ehfktq+biwN0M1Sf8pKcmXEP0i3mD4my8yu+FyU 469SFGmcu6EWpu3FpQgsV6uOeP7pFmquKMAk1H9y7zkvgJBY/68NdfOBvcVU9X0NLYQy rFuQPpTV+N4Y1P/I45xC4+bROI5qV50pUco+GKqMD3Ff3b8hriOrlfgvArpa0PU808Bj rmtg== X-Forwarded-Encrypted: i=1; AJvYcCXE2Ss8izQGJAnbzO3v7kzYrMEArDoNXPXfL9Bbe4ENZLiswrAcpPUheTPPMv/ljsxIv2V7qXrezoggJWs=@vger.kernel.org X-Gm-Message-State: AOJu0YwqMM6J/VzMXg3thBErvLIRFuFH7IZFBbGGXuYreas65utMaPVa BDnMBR9pXIsb8SrIPR3Ai6tJopL8xFwlyDixaHQDCqM0d7KbNWYZgpH+9CYpICA= X-Gm-Gg: ASbGnctSm6/3I83q2DRnH6qjvaMSOA1PXlk/pytfnRroIXDFRSx/ARC37QrauKh6d47 eUSPkIsdsBirY+SAIZ/bNUzXhFV17sMAogJe/KXzCC3RQwyqUMx3d6jEbpYZKhGXXMr8urOLnJX yjSMI7NjhmdHwJWDxFT2Q1Gck/04lnNIsRTDLJEA9s5drjj66mJJZxm2OkzkjknLDc1WCyskHFO LGcqv+8tVRmu2MzbGZ87Dw09K1FGKUDCWYfA7yHHUOaggwjvW/pnB4jT5Ok4KMUr9tdD5dw1pKa nxRpleGyow== X-Google-Smtp-Source: AGHT+IFVka4iqlv+f8wHSLTkHDxtLa2dS7V4LAO7Kbt+oHZUKJl3kcd38xxqwMLxo7Hl7A2K9Dihww== X-Received: by 2002:a05:6000:188c:b0:38b:ed6f:f012 with SMTP id ffacd0b85a97d-38bf566e472mr23216204f8f.9.1737628714689; Thu, 23 Jan 2025 02:38:34 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438b319f6absm57036035e9.12.2025.01.23.02.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 02:38:34 -0800 (PST) Date: Thu, 23 Jan 2025 13:38:30 +0300 From: Dan Carpenter To: jack21 Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Huangjie Subject: Re: [PATCH] dirvers: scmi: poll again when transfer reach timeout Message-ID: References: <20250123083323.2363749-1-jackhuang021@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250123083323.2363749-1-jackhuang021@gmail.com> s/dirvers/drivers/ On Thu, Jan 23, 2025 at 04:33:24PM +0800, jack21 wrote: > From: Huangjie > > spin_until_cond() not really hold a spin lock, possible timeout may occur > in preemption kernel when preempted after spin_until_cond(). > > We check status again when reach timeout is reached to prevent incorrect > jugement of timeout. > I suspect the real issue is that we exit the spin loop when try_wait_for_completion(&xfer->done) is true. Probably we should add that as a Fixes tag?: Fixes: ed7c04c1fea3 ("firmware: arm_scmi: Handle concurrent and out-of-order messages") Btw, the scmi_xfer_done_no_timeout() has a confusing name, because it does timeout. Was the "_no" an accident? regards, dan carpenter