Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp230237rdd; Wed, 22 Nov 2023 14:20:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBzRmAbua9tH0T9h7wTu5z6jHExGaKy0PBfSNo9TpzAJd3kZVxj9dTElAiE/r/c5+Z3+zw X-Received: by 2002:a17:902:ec82:b0:1cf:80db:72e1 with SMTP id x2-20020a170902ec8200b001cf80db72e1mr1665528plg.10.1700691605806; Wed, 22 Nov 2023 14:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700691605; cv=none; d=google.com; s=arc-20160816; b=TAmFJjfNS1+Qw6X1o+axBk8DuBOzPwWGq7m7wZvFS8mQAmJriHuRh15eIcfRS6kGQB nFmaKnHuQSibF2E+i0pcI2AycP5qa6krCgg1pzivQ9S1DoozcL9NsfOatW9HPIC87ai9 HgOyDoDFOznt9p8OxCJOWuuL85o+Ij3IgVJDjiD+HpwcqMz1FHl+FZOBhTozx7SjtEIU K+pav91xRfF0kckf4ayxwgvYbsZRnQDQnWbpaB1xE/jVZgOCZ1YaGZts1eyaMdMw4Y0s PbYm2taxmC+L0ej0j5EfeL4I8e+ZzcpHm+Mz3JYfgclKafgKx/NIg3sUfiIspVmXw8Tj RBNQ== 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=QnMqKfXn1H73QLE2lYc0LXu1L29Kqa0jc5ga+gfz1x9Gy4ee1vPFWmQFdOgocoTw3B H7eJYk+TVOyqwYBdfXdTE5J18pYRPCnsMh2seg3OJESjZVO1bkX2oTHCM0blYycPlFL6 VssVTVIrvG6nRzHxCBiyJ5H39yLwtrtn5bC2QZYxBCaGUlQs16sZxjGPwdAdYdWbZSsu aRU2RkAZFwLBIli5ZoA/xIUUzQ175AelB4qLuqwXOKgpcjCEhBJzdxw6aCKXFB0M3ppf H68HhYopZXFp+vpwBgYgWe2OKOV6MwYVEMVU1yePb1B8pFTk6mpWxaGERDvp7PhqyPx+ D1pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zhLZGpAU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bi5-20020a170902bf0500b001cc53dbf53dsi298394plb.648.2023.11.22.14.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 14:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zhLZGpAU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 7045781F4705; Wed, 22 Nov 2023 14:20:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343586AbjKVWTx (ORCPT + 99 others); Wed, 22 Nov 2023 17:19:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233574AbjKVWTw (ORCPT ); Wed, 22 Nov 2023 17:19:52 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E04CE7 for ; Wed, 22 Nov 2023 14:19:49 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-da307fb7752so339039276.0 for ; Wed, 22 Nov 2023 14:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700691588; x=1701296388; 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=zhLZGpAUuA/22M6TtGTHGgS7ilS41Jy1MH6OMzs/tYtIb0rnu7PKKJQtkcLQFUKj2r tXJu31m7WDO5kWi12UnGqE31cgqyQnmurs2kNufAZ/i2vzMAxb76QBkeT79NLxiuQo6+ A97fasyVXyuwgUAiaWEvtgWomhIJCxwr/TgQb0EEPe5A+EioK/wpVrAWTsSLJA6XVQsx WIzv09c8r0RkuSPvbkZftTXYkp0rjCQY3R6Mrc8YqGx7Y21ZokQNEbv/fbgXI+9k10YO KJekmRAlZOY1oqhIRrqVEzBuSv+XtIXcU0kf3pdRaLPsag/oO4QRCaWrN2Qon0FRjO7w ypdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700691588; x=1701296388; 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=mIw2hjkDgeg5Rd2izDnO/M5DvwGYHT8UZUCkQNcX+B8RFK2oFHi81TKkU95na3TsoJ l6G3j3ZU29p+xHiHu4B/EJyMLKM7xYcnbxL/JHLVPBXe65XcG4dzuaPQY4PMz5CMfVe6 9HFAGQUNaIFckivCqETqZ7YxCVj2yDR+ArvdKD5kSkixRmT88ABeuICNO4OdQVKZNCYE 0QZ+W4lioHoDtFrOKNBR/SUSPLeizcMAQxFaNO1ZN6xKoOgkYXj+0F8MLb/515i/4cmw XQmBO9u4rO8Egkc9eb1zGa2p/6VPj5738FkYMN2frytEzx2+rZCY244R29gks0IX3oee MeHA== X-Gm-Message-State: AOJu0YxFjW+JHlEWeYB6OcSbBh2tzRHNRRP+LKnGz5kgIaQkKAS3Xn7Q 5TY4ZqaPylZvBxQ+AdeAuXxK8wVZDh7wZfc= X-Received: from jsperbeck7.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:26dc]) (user=jsperbeck job=sendgmr) by 2002:a05:6902:1801:b0:daf:660e:9bdb with SMTP id cf1-20020a056902180100b00daf660e9bdbmr101297ybb.6.1700691588594; Wed, 22 Nov 2023 14:19:48 -0800 (PST) Date: Wed, 22 Nov 2023 22:19:47 +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: <20231122221947.781812-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=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 14:20:00 -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.