Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1134658ybb; Wed, 1 Apr 2020 16:37:10 -0700 (PDT) X-Google-Smtp-Source: APiQypK6fNeKivq5CRzzZLnYVOknB80AUdAWV6nFLnBYdTv00Ya0MTvGjb+5DIyoJCIG/mQDFPyP X-Received: by 2002:a9d:6a12:: with SMTP id g18mr260654otn.19.1585784230063; Wed, 01 Apr 2020 16:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585784230; cv=none; d=google.com; s=arc-20160816; b=DWInv2L13VsCQYg0e/Xgrkk6lupWtcNH38iCcNgTwQ4HNA3A8vCERYOkTTZs+XZB3w MVZ3JxPB3Ua/5kP6FxBqryuGu+dnErDMSnVpM7Nx9WVnFrgIwLfdcOFXF+UlPx9atoz+ agTPLRhvDxyG3uTz83qF1DANlv222BOeviSY2X1av1n/kUjwg+dLnDK+KYIq5eaRJ0y7 GUTy0y/KMzcHyRDFPHG9Vhgm49yVu5WkXpyJ0btneWvWJDtspzf9Y1ImLePW++tX6fa6 Dv2vAskjCEXTHtS1Y+LDOViXfsAgsBL38mzd/7DSaDfwLi4TxXRId3GFFP4vzg8/MBry m4OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:message-id:in-reply-to:subject:cc:to:from:date; bh=GJ3Xc4R2NLYeBfaPQ5+20lVgXh+vzZg3OnqLAl+W20Q=; b=srrZ5V+O37rhpb3LwYCPUZ1pZQAYmxrpvFhKg01ILMjRX5gzapb/7R3p9paQWnn87n 7/9WTF9ge9NTtEhF/sAk8v7Sb00XC1Tt9SpMNQ6RI3wakzxohPM5TFbEbtJ06cmoXr+D vW8W4/LocU+advKDYNbbZl7Yx0m42NqIANkApcuG7M4xThmiab8XJMIDEXacsL7ycQrk asxdpDXEoDsz7LLk5ZLvK5a/EPovIR2mUtLWhXQdzbjTpOewPwrae/c4nMfbGBntOuha dIuQV/2j1IktHPBAjEUCF5UN6ot6qhgl2h45C9/iHE+5zfangTV1LMVcgECnHmflxNAt DwLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si1565700oim.76.2020.04.01.16.36.57; Wed, 01 Apr 2020 16:37:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733145AbgDAXcg (ORCPT + 99 others); Wed, 1 Apr 2020 19:32:36 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:37860 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732503AbgDAXcg (ORCPT ); Wed, 1 Apr 2020 19:32:36 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23993316AbgDAXcamxzAZ (ORCPT ); Thu, 2 Apr 2020 01:32:30 +0200 Date: Thu, 2 Apr 2020 00:32:30 +0100 (BST) From: "Maciej W. Rozycki" To: Andrew Cooper cc: Thomas Gleixner , hpa@zytor.com, LKML , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jan Kiszka , James Morris , David Howells , Matthew Garrett , Josh Boyer , Zhenzhong Duan , Steve Wahl , Mike Travis , Dimitri Sivanich , Arnd Bergmann , "Peter Zijlstra (Intel)" , Giovanni Gherdovich , "Rafael J. Wysocki" , Len Brown , Kees Cook , Martin Molnar , Pingfan Liu , jailhouse-dev@googlegroups.com Subject: Re: [PATCH] x86/smpboot: Remove 486-isms from the modern AP boot path In-Reply-To: Message-ID: References: <20200325101431.12341-1-andrew.cooper3@citrix.com> <601E644A-B046-4030-B3BD-280ABF15BF53@zytor.com> <87r1xgxzy6.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Apr 2020, Andrew Cooper wrote: > > Even though we supported them by spec I believe we never actually ran MP > > on any 486 SMP system (Alan Cox might be able to straighten me out on > > this); none that I know of implemented the MPS even though actual hardware > > might have used the APIC architecture. Compaq had its competing solution > > for 486 and newer SMP, actually deployed, the name of which I long forgot. > > We never supported it due to the lack of documentation combined with the > > lack of enough incentive for someone to reverse-engineer it. > > :) > > I chose "486-ism" based on what the MP spec said about external vs > integrated Local APICs.  I can't claim to have any experience of those days. The spec is quite clear about the use of discrete APICs actually: "5.1 Discrete APIC Configurations " Figure 5-1 shows the default configuration for systems that use the discrete 82489 APIC. The Intel486 processor is shown as an example; however, this configuration can also employ Pentium processors. In Pentium processor systems, PRST is connected to INIT instead of to RESET." :) And if in the way the internal local APIC in P54C processors can be permanently disabled (causing it not to be reported in CPUID flags) via a reset strap, e.g. to support an unusual configuration. As I recall the integrated APIC would in principle support SMP configs beyond dual (the inter-APIC bus was serial at the time and supported 15 APIC IDs with the P54C), but at the time the P54C processor was released the only compatible I/O APICs were available as a part of Intel PCI south bridges (the 82375EB/SB ESC and the 82379AB SIO.A). Those chips were not necessarily compatible with whatever custom chipset was developed to support e.g. a quad-SMP P54C system. Or there were political reasons preventing them from being used. Then the 82489DX used an incompatible protocol (supporting 254 APIC IDs among others, and as I recall the serial bus had a different number of wires even), so it couldn't be mixed with integrated local APICs. That's why discrete APICs were sometimes used even with P54C processors. And the 82093AA standalone I/O APIC was only introduced a few years later, along with the Intel HX (Triton II) SMP chipset. I still have a nice working machine equipped with this chipset and dual P55C processors @233MHz. Even the original CPU fans are going strong. :) Its MP table is however buggy and difficult to work with if the I/O APIC is to be used, especially if PCI-PCI bridges are involved (there's none onboard, but you can have these easily in multiple quantities on option cards nowadays). Maciej