From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69FB3C433EF for ; Tue, 28 Jun 2022 14:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345914AbiF1OLq (ORCPT ); Tue, 28 Jun 2022 10:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345950AbiF1OLn (ORCPT ); Tue, 28 Jun 2022 10:11:43 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC2A36140 for ; Tue, 28 Jun 2022 07:11:40 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id f190so7148082wma.5 for ; Tue, 28 Jun 2022 07:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=z6rZSThE7hjHMykxwD6G3CLunLDgT8dkRZWO7hFrMlc=; b=E14bCHFAJHEKjAz3a2lSSKKAKgMH8nSUaKpBBhdBtLPYkBu0W31aQtkY03sC1zEkVc FiDofXOMIBM6p89lrcTgMas9mDeuNZ2IdHzWfFBULzcC45sbYJVkKgvhrufDwGDkwSby mbNRGEjJ2jkCWZBxE+1M5f+xMG1cZFeiJeiWGhuCZcZedEV9Yee4Kij8RkBC9PhrLfj0 jzR8t7i4zLmaqwwRlVbW5uh5yAr+iVTRaNP2FGEOa72yoXEOY1DDzcVlb03F08k3F7C/ MaAJ3rAMWURmtIcyWHe+yyTuzKWiOEq6IjUKpQCN+SFhgMUN4uNUHhdkVX6DFfwXzc+c Wp2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=z6rZSThE7hjHMykxwD6G3CLunLDgT8dkRZWO7hFrMlc=; b=BBT+HYo9nFpJHyIyFpfyF/+hxn+GeB4ZYN7DTQGSlK1eCpNSl1An+JARU+QQhG++FR HMhnh5o4SEpnjvPqbWTcxMh8qFpPDywWPDHY7MAQ2ottAf8R2+r+2O0mLQ+TDYBHTR9w Bi+dQKZgzWwukL1oGj9zNm3Ej4CQxG4WGgVw2Z36n+R9BR8ralrCF4Pyk7FXKjT8i1RN 9qzc3rDtbY/kCbsgMVLcSASUOdhdV+zA6vozU7cUBl94nVOb+0AJ4Su3c12ebsnJRvQn r8rpDugPsVki1d7JaGO2z+NiJeiRMBVkIeCkvc26aURSnIsbFNdWDFfDPRp0pRcNZpzl /c6w== X-Gm-Message-State: AJIora9COIurISoxd9t05vBfGvKv3ox3wsKghyuDoYOEb8Wt00uvTAd3 y+wjnoH0k+Erk6aqoBd2mf2npw== X-Google-Smtp-Source: AGRyM1sYVVXgAazao0K/lpqse9gQZXQrTog4KvhzBzsiHswnBk9UIffH0I3WCPb3MN3iprzQZzmnFQ== X-Received: by 2002:a05:600c:34d0:b0:3a0:2c07:73ac with SMTP id d16-20020a05600c34d000b003a02c0773acmr27247171wmq.85.1656425498512; Tue, 28 Jun 2022 07:11:38 -0700 (PDT) Received: from google.com (44.232.78.34.bc.googleusercontent.com. [34.78.232.44]) by smtp.gmail.com with ESMTPSA id ay5-20020a05600c1e0500b003a04e900552sm3796880wmb.1.2022.06.28.07.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 07:11:38 -0700 (PDT) Date: Tue, 28 Jun 2022 14:11:36 +0000 From: Sebastian Ene To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Wim Van Sebroeck , Rob Herring , qperret@google.com, maz@kernel.org, linux-watchdog@vger.kernel.org, will@kernel.org, vdonnefort@google.com Subject: Re: [PATCH v8 2/2] misc: Add a mechanism to detect stalls on guest vCPUs Message-ID: References: <20220627102810.1811311-1-sebastianene@google.com> <20220627102810.1811311-3-sebastianene@google.com> <194f5edc-5877-af3f-9aa1-be1e275ea304@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <194f5edc-5877-af3f-9aa1-be1e275ea304@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Jun 28, 2022 at 07:00:05AM -0700, Guenter Roeck wrote: > On 6/28/22 02:54, Sebastian Ene wrote: > [ ... ] > > > > +static struct platform_device *virt_dev; > > > > + Hi, > > > > > > virt_dev is only used to call platform_set_drvdata() and platform_get_drvdata() > > > on it. Why not just have a static variable named vm_stall_detect ? > > > > > > > I think this should also work. I wanted to make use of the provided APIs > > like platform_set/platform_get. > > > > That doesn't mean such APIs should be used just to get used, though. > I will remove these calls and keep it static. > > > > + > > > > + vm_stall_detect = (struct vm_stall_detect_s __percpu *) > > > > + platform_get_drvdata(virt_dev); > > > > > > platform_get_drvdata() returns void *; typecast to it is unnecessary. > > > > > > > > > > I needed this typecast because the variable is per-cpu and some > > compilers(eg. gcc for ARCH=h8300) complain if we don't specify this > > hint. > > > Hmm, interesting. I didn't know that. We live and learn. > Though h8300 is gone now :-) I had some Intel robot complaining about this in my previous series(v5) and I fixed the warnings by adding these compiler hints. > > Did you reply in private on purpose ? > I misused my CC list but I will fix this in my reply. > Thanks, > Guenter Thanks for the response, Seb