Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4739444iob; Sun, 8 May 2022 23:51:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsnOwWtqrYSDS6nzB7iS0ZS28WQiI8xCvv7vo5xNUfB7bwCg5FK/QYDOOWQHNCpQMSdgTG X-Received: by 2002:a17:90b:80c:b0:1dc:1340:744b with SMTP id bk12-20020a17090b080c00b001dc1340744bmr25266353pjb.94.1652079073261; Sun, 08 May 2022 23:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652079073; cv=none; d=google.com; s=arc-20160816; b=sPg18h1jASoqv3+Q3jAEmlawPeK6tU3bR0hlq4+vshtbBlJqMmr/IDX0UCgNBdy3Jk sumogrvAlYgorwy71xOEMBs1mIcQyuWZIG4IxHi0CW1xvdEgrOg66cQWDd4eh15rrb4r GwlBIdQ8a355eArw435aeFnDsgxbVPB7N7g3qS6xhsQ2XlQmhLPe+6qscEwetgRt3uBE YZy3pPa0jZwxJT6x9qP2me6nVEzXmvVLZQF90ExuFPknhCe2O0o8Ik+hJEm2rMGa8Iuq jZWDhROviAuqeiXjKWS/1FnUkHI8XlHqiCooHTn50AnQboZVvvk2FRBvzfBMnjvO/yEI pDtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=WEBD3i+RCMCV6ItWgJTNpoS5Qp50+5gg+1MUzDbcFWU=; b=dM/i5pd4NFyFACRUEATDTsnZZc49I9IR4yB5ZNz8xxkr1nBQNiRvEBCkICIIdSqxA9 Eb6ARY+9XUgpAP0bkdJhIBWbm2RVat1k1zG8/kI4OA0EngCbihExQiy6H5dYknyClVMP dbfGE7PT0kzeiCU8BUY2S3dtyjR+tZ4mDbjeEXawOAdaZ6qLcyfUoZFGLeGLSTBa7vPV F7yolSvWucuUe7GJzWypWjDIXyqThZBsLXlsGURDnaVAgQK0ECEDb8EFrfoVJg0FSJGV 2QV+3WbyaB0ljZhotlbe4UZ31Gotu75K4ofeRRjpbxrMzqf5HjSYAmv6Prdr/dKDmurh mN4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0gf5bTX4; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t6-20020a056a0021c600b0050df2065f65si13103707pfj.124.2022.05.08.23.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:51:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0gf5bTX4; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 814F5195791; Sun, 8 May 2022 23:48:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444558AbiEFVpD (ORCPT + 99 others); Fri, 6 May 2022 17:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444551AbiEFVo7 (ORCPT ); Fri, 6 May 2022 17:44:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E236F4B6 for ; Fri, 6 May 2022 14:41:15 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651873274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WEBD3i+RCMCV6ItWgJTNpoS5Qp50+5gg+1MUzDbcFWU=; b=0gf5bTX4NIQykq3iPPRZunSuSvrZWoWSo2b1NIiTagpKSMaW3qdtrw7UmeRdrKArDQE/+S Zy8ijWhMlujrmAIZPJRjxCHh90monbTV12KDhye6vQM/3CAQqw8JRQAdzQBwiG/t4sAVLj VGlEJ6vxHVjRXIiYcdNdyHl9i3CHV9mgzff5fRJV7Md00WfSlsUarMqfVzZqx0g0/sFCEG xHPKgvCjYezzLHm0ZxrVkOJkWlQ9+ITm9Ner24gSmKr1U37+vm+cp040VQJzXjfoPeTXFE 2Z1+E0/StooqcZKBaNaiZO9gcjhFy0aSijMrtLORg57UfwyNDwEREhdL85JJhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651873274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WEBD3i+RCMCV6ItWgJTNpoS5Qp50+5gg+1MUzDbcFWU=; b=EPFGmOCZQqvpMfXX+kTEn3pMBEYvOWTDsHxx4zzYwsn3Efr3jSRiPe+y2939MMnRZZC56U K4PVioMmImoIJ3Dw== To: Ricardo Neri , x86@kernel.org Cc: Tony Luck , Andi Kleen , Stephane Eranian , Andrew Morton , Joerg Roedel , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Nicholas Piggin , "Ravi V. Shankar" , Ricardo Neri , iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: Re: [PATCH v6 15/29] x86/hpet: Add helper function hpet_set_comparator_periodic() In-Reply-To: <20220506000008.30892-16-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> <20220506000008.30892-16-ricardo.neri-calderon@linux.intel.com> Date: Fri, 06 May 2022 23:41:13 +0200 Message-ID: <87mtfufifa.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > Programming an HPET channel as periodic requires setting the > HPET_TN_SETVAL bit in the channel configuration. Plus, the comparator > register must be written twice (once for the comparator value and once for > the periodic value). Since this programming might be needed in several > places (e.g., the HPET clocksource and the HPET-based hardlockup detector), > add a helper function for this purpose. > > A helper function hpet_set_comparator_oneshot() could also be implemented. > However, such function would only program the comparator register and the > function would be quite small. Hence, it is better to not bloat the code > with such an obvious function. This word salad above does not provide a single reason why the periodic programming function is required and better suited for the NMI watchdog case and then goes on and blurbs about why a function which is not required is not implemented. The argument about not bloating the code with an "obvious???" function which is quite small is slightly beyond my comprehension level. Thanks, tglx