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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDB15C433F5 for ; Wed, 22 Sep 2021 22:21:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEAFB60F6F for ; Wed, 22 Sep 2021 22:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238296AbhIVWXM (ORCPT ); Wed, 22 Sep 2021 18:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238293AbhIVWXK (ORCPT ); Wed, 22 Sep 2021 18:23:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7B33C061574; Wed, 22 Sep 2021 15:21:39 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632349298; 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=0A6qByAjupG5ZLznnStIKLY1X8Qel1/Sug5VuQBE2dA=; b=FAC6stJzb16S5VN9VA4cYLEPKiuJ7YST9bvrH7P/nTQyc1a945nwPe5w0JdcdIimC42aAx na5h3WSbyuqP2qXbOiZexv6sd6CDjXaykK6U6TaZ2Tggf00yp/tXXxO31SVTXfJgnGslMP UskPRaNQaiyzxPsCNlNiBgKvQ3CrhyzPnhmYSdPuaf2f9ANa1S+vtLnrZX2GcY7AWZJMEo Wckz0X+XHumePRBRTI40zq2Zf4PKCWqUgvoGuMyK5sYd8ohbTWf2ilcv+uIwrqAYxMxwKh r1teJ5+OVdurfHwV9YEIzs2tKWRXhTCfk8IMBfmarnONrxMHzWj9Rrs3tQtpMw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632349298; 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=0A6qByAjupG5ZLznnStIKLY1X8Qel1/Sug5VuQBE2dA=; b=qTQwlYwfvHFWjde9GzRO44+mLYwFzGtg/y8pgV0QMduMbpkKkr7I/iGZA00lCEzfWPEFJg EAJLfoO6zE/c6JDw== To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Peter Zijlstra , Bjorn Helgaas , Jakub Kicinski , the arch/x86 maintainers , jose.souza@intel.com, "H. Peter Anvin" , Borislav Petkov , Ingo Molnar , Kai-Heng Feng , Bjorn Helgaas , Linux PCI , rudolph@fb.com, xapienz@fb.com, bmilton@fb.com, Stable , Arjan van de Ven , Tom Lendacky , "rafael@kernel.org" Subject: Re: [PATCH] x86/intel: Disable HPET on another Intel Coffee Lake platform In-Reply-To: References: <20210916131739.1260552-1-kuba@kernel.org> <20210916150707.GA1611532@bjorn-Precision-5520> <87v92x775x.ffs@tglx> <82c1b753-586d-dadf-54de-6509e70a00ea@intel.com> <87y27p65tz.ffs@tglx> Date: Thu, 23 Sep 2021 00:21:37 +0200 Message-ID: <87sfxwgsjy.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Sep 22 2021 at 22:27, Rafael J. Wysocki wrote: > On Tue, Sep 21, 2021 at 10:18 PM Thomas Gleixner wrote: >> >> On Tue, Sep 21 2021 at 20:05, Rafael J. Wysocki wrote: >> > On 9/19/2021 2:14 AM, Thomas Gleixner wrote: >> >> What's the proper way to figure out whether PC10 is supported? >> > >> > I can't say without research. I think it'd be sufficient to check if >> > C10 is supported, because asking for it is the only way to get PC10. >> >> Do we have a common function for that or do I need to implement the >> gazillionst CPUID query for that? > > intel_idle has intel_idle_verify_cstate() that works on MWAIT > substates from CPUID. It looks like this could be reused. Not to me. That's some cpuidle/intel_idle specific check which depends on cpuidle_state_table being set up which is not available during early boot. The question I was asking whether we have a central place where we can retrieve such information w/o invoking CPUID over and over again and applying voodoo checks on it. Obviously we don't, which sucks. Thanks, tglx