Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp97841pxb; Tue, 12 Apr 2022 18:00:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztujJdz7aJNTOzIsqPlhBCXGtpGTKRos2NFanUtcwtjggcIbRfVDaDEAngYhlcCLQQ4cqN X-Received: by 2002:a17:902:ec86:b0:158:5039:a145 with SMTP id x6-20020a170902ec8600b001585039a145mr15369228plg.5.1649811637951; Tue, 12 Apr 2022 18:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649811637; cv=none; d=google.com; s=arc-20160816; b=BMHrUIL+EqtS+Sio9qNnQ7RkrY1QLh+PWEkLx/Qy0MZoLxcb2MbHApKkkO9tB8z73v 4H0NzHPGeG861XkzTYw/Wgxb2sMTTbuX9mTPID4VcVxOVpqGAdMlwAegF3ehTOx4VMUp nY9CE85vL2nzJ2eCp4rt/Mx4x3HpwHb+Bl+rXR8okcDf3X2xEwCABIeyQ3LwFCZbU4Tg mcC1fMwb9CVx+F6cuxsbU1ux22dBD6boM+iGDl5cxHeBrGyIrNeihroDqLvHq9GPIk6m Gl6rWSwCTcL880JCUicSgeR7q9FiRwmn4rwKwVZZzki5UQV95N9u/6AntT+f48lCYGhE 60hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=MV2Izk9Q6MrGX3jOp0wTXO/kaqMRqKtFSmpCGSICnqI=; b=vvsvTOW1YNB7tjjY0LhVKOfv55Kb88IZRb61zzalflEFJUupV0MXcg9MCq1FV94We5 EOjfQDOpxsRfBS1Oa4Da3gfijei/uCL040XB+wvjIJR1NQmIT4TuAZ1ReYug9xMKUfX9 xmNeQDUlGbNq3pAH68+FbLltK4gQtXNm7A3MKVAl79nq+7YkZYRxyjIMknB14tSiHX+1 K6xBlKYp8fEEqcaiWh5LT7TT3soznylzpbPZpP/1uPoBxpXmcp/vK/Ez0TUTjSjrtrZN j+SN3pkAPykenFeRpIUbmzvqpU5uGMot79n9soOXQZkx1i2UwHePRs2D57+gI/wOfCTf WbUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020a63fb17000000b0039d74ad4055si4431407pgh.760.2022.04.12.17.59.56; Tue, 12 Apr 2022 18:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbiDLXci (ORCPT + 99 others); Tue, 12 Apr 2022 19:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbiDLXb6 (ORCPT ); Tue, 12 Apr 2022 19:31:58 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70CBD90FC8 for ; Tue, 12 Apr 2022 15:17:53 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 8D1B592009C; Wed, 13 Apr 2022 00:17:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 7EA6492009B; Tue, 12 Apr 2022 23:17:50 +0100 (BST) Date: Tue, 12 Apr 2022 23:17:50 +0100 (BST) From: "Maciej W. Rozycki" To: Thomas Gleixner cc: Daniel Vacek , "H. Peter Anvin" , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, open list Subject: Re: [PATCH] x86/apic: Clarify i82489DX bit overlap in APIC_LVT0 In-Reply-To: <87ee22f3ci.ffs@tglx> Message-ID: References: <20220202140244.1681140-1-neelx@redhat.com> <874k361liu.ffs@tglx> <87ee22f3ci.ffs@tglx> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, 12 Apr 2022, Thomas Gleixner wrote: > Daniel stumbled over the undocumented bit overlap of the i82498DX external > APIC and the TSC deadline timer configuration bit in modern APICs. For the record, it's documented in the i82498DX datasheet[1] and user manual[2]: 'Bits [19:18] Timer Base: This field selects the time base input to be used by the timer. 00: (Base 0): Uses "CLKIN" as input. 01: (Base 1): Uses "TMBASE". 10: (Base 2): Uses the output of the divider (Base 2).' (the wording is virtually the same in both sources). Base 2 setting is compatible with later APIC implementations. Since you're removing the macros and the documents referred aren't easily available it may be worth to mention the settings somewhere, such as the comment you're adding. Intel indeed did not document the two-bit field in any later literature, and the i82498DX part cannot be used with any other APIC device due to a protocol (and also wiring) difference in the inter-APIC communication bus. There's also bit 2 of the Divide Configuration Register. That bit is hardwired to 0 in later APIC versions, however in the i82498DX it selects the time base input to be used by the divider, 0 for CLK (CLKIN) or 1 for TMBASE. Conversely bit 3 is hardwired to 0 in the i82498DX. References: [1] "82489DX Advanced Programmable Interrupt Controller", Intel Corporation, Order Number: 290446-002, October 1993, Section 6.12 "Timer Registers", p.27 [2] M. Jayakumar, "AP-388 82489DX User's Manual", Multiprocessor Technology Group, Intel Corporation, Order Number: 292116-002, November 1995, Section "Register Programming Details", p.22 FWIW, Maciej