Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp229610rdd; Wed, 22 Nov 2023 14:18:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAanxnbjWFmfyVfez9zT7wowkvRBlUsOdScBSWXF8sPPhxgdUXcHX3pTOIBIh9IbhpyuHz X-Received: by 2002:a17:90b:3903:b0:283:2932:e8ec with SMTP id ob3-20020a17090b390300b002832932e8ecmr3588646pjb.49.1700691519522; Wed, 22 Nov 2023 14:18:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700691519; cv=none; d=google.com; s=arc-20160816; b=KTK4TC6a4tfYsR1aUhYpqJ0nJwgX8YbXUv5UG+CaYg8U8+v9AwQOCogzj0XoKarwrC muQjm011yEEVUPLGsYVdNiNR6T9SpmZU2+nLl4WBCBVgfXA6NHYm/Astqj/1kH4N2/A2 ykImonFIdIOoDAgIiKyjonxepCwZKlfcy+DJcodC4laYi7LNQytHkeXLXoehEDiXxiTi visgwbxCCMr8ee1IZCYE4XNi7yVW9c7Fy+sZ4pCLD+m/fADT2MfPQ8rYbhWBRmnqoGpk EbHN8r7MuypQFF2pelUwa2SxD5IvM9UhLOrIeJ3+wpyR4x8C7pfLy+dS1zc0AbD0YsMY R6Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=4w9WGlpV+oKNURgCWJmbzMqmytRuxi/IH9HmVAy3vpk=; fh=Np6PftENKhvX2DmSCNWn2TsxKeCZNBk/SeAao4Dorgg=; b=hElzM7+agRATKzPIPexjAJAN0AryeCmqqtseRblMsKN7z0rvmh5krliFpeR9kr89ay WGQVMxAcfgR/bV3W+cL82/gP0KSfwH+DGTlAR1O+hnoLEnR026cQrLYULlxWINoNBs6b J8MKaW2XqPububQid7+sdTxXCzVAYKO2FrqLgsBnXBB0IpwofweYro6Gqtu21L5kucsa WBvbJoPbMO7UPvrDNrV58zhI1cOhwYnVxyiOcudSn/Xv43kmB6oiCvG5uFCvs1P0rMdk u/B55uhyg0qlbAfN/WsA10y1GtKkkWYT3PdWgd4TomTwU6WEDhD/tIIKwyVykeLVegI0 S5fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VFOx2zbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s11-20020a17090aad8b00b0028321d69667si22880pjq.67.2023.11.22.14.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 14:18:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VFOx2zbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C026F801C1BA; Wed, 22 Nov 2023 14:18:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344660AbjKVWS1 (ORCPT + 99 others); Wed, 22 Nov 2023 17:18:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344652AbjKVWSY (ORCPT ); Wed, 22 Nov 2023 17:18:24 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B64D47 for ; Wed, 22 Nov 2023 14:18:20 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5ca26c07848so3381257b3.0 for ; Wed, 22 Nov 2023 14:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700691499; x=1701296299; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=4w9WGlpV+oKNURgCWJmbzMqmytRuxi/IH9HmVAy3vpk=; b=VFOx2zbYyRI5iOtqLe04Owvw/t5/ER1zO7V34uuIPqdfT6WhdKlHs+LrVmQJv9gtkq +LRqcrtVvP6duFU/kod7koZwX8Nbv2ZKh8Tq5gKhXJqvCjeAGJvq5YwB0epsyiIlLCCd CWxTvd+bFgQ4rRLF3Vmeg6w+7acGjeZnErIqToJFnwHQkMcfI7VpZeQffTQKC6ORTW+O w5GprmcLL3w4VBMV2Bqv/OK2wX1nuR2DPMJ4w6NyHJBR71RBMqj8sAGUTIrngINtPLop 5cHOr2CQ+sOIH9qdrwWXr47MFI65Bv24jr233oG++EeEMVeR7YvUEpon9kFCgkesVM2t +Daw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700691499; x=1701296299; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4w9WGlpV+oKNURgCWJmbzMqmytRuxi/IH9HmVAy3vpk=; b=EV8inh10n1MN8K6MFmkAAKehjNFKQPw95QqiHs4c6belvfKiqbFKgWySqEhmqhKega o+sfex6+//UpiQpjvhzMZeAMf7lnX5/n40N+2SkJITNIPFsxzKwc3EGEaQcCVN+KlUOx MY57eNOeh4P4JBdEQNnHHYOdsBWgMRHsg+89g2+3apWA9+IlNwEnfalzqq6ubrX1rCHm f7gNCwLlwVsWWTXPOoJ/EvtIWKSwDkL0pw9EGU9mvi8MCsI99Pxe2gIahDwDGVW0ex4o OjGqCV5RJ0YnNHZVVN69QplpuSBBmTDge/UmTwINXxMCW8TyA70W6rgqqeGcypsm7Mqo xJzA== X-Gm-Message-State: AOJu0YzKMqXaEvTo8qU9KaW35+D5wq8FZuYGz6csCtA7AmlRrqePikdh OCXMUUYkJLMOQYljL17vONxCPzQkhE/cvY4= X-Received: from jsperbeck7.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:26dc]) (user=jsperbeck job=sendgmr) by 2002:a0d:ca0e:0:b0:5cb:9a67:8b7b with SMTP id m14-20020a0dca0e000000b005cb9a678b7bmr123886ywd.3.1700691499640; Wed, 22 Nov 2023 14:18:19 -0800 (PST) Date: Wed, 22 Nov 2023 22:18:18 +0000 In-Reply-To: <169953729188.3135.6804572126118798018.tip-bot2@tip-bot2> Mime-Version: 1.0 References: <169953729188.3135.6804572126118798018.tip-bot2@tip-bot2> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog Message-ID: <20231122221818.781387-1-jsperbeck@google.com> Subject: Re: [tip: x86/urgent] x86/acpi: Ignore invalid x2APIC entries From: John Sperbeck To: tip-bot2@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, peterz@infradead.org, rui.zhang@intel.com, tglx@linutronix.de, x86@kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 14:18:36 -0800 (PST) I have a platform with both LOCAL_APIC and LOCAL_X2APIC entries for each CPU. However, the ids for the LOCAL_APIC entries are all invalid ids of 255, so they have always been skipped in acpi_parse_lapic() by this code from f3bf1dbe64b6 ("x86/acpi: Prevent LAPIC id 0xff from being accounted"): /* Ignore invalid ID */ if (processor->id == 0xff) return 0; With the change in this thread, the return value of 0 means that the 'count' variable in acpi_parse_entries_array() is incremented. The positive return value means that 'has_lapic_cpus' is set, even though no entries were actually matched. Then, when the MADT is iterated with acpi_parse_x2apic(), the x2apic entries with ids less than 255 are skipped and most of my CPUs aren't recognized. I think the original version of this change was okay for this case in https://lore.kernel.org/lkml/87pm4bp54z.ffs@tglx/T/ P.S. I could be convinced that the MADT for my platform is somewhat ill-formed and that I'm relying on pre-existing behavior. I'm not well-versed enough in the topic to know for sure.