From patchwork Wed Aug 9 19:12:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 133498 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c765:0:b0:3f4:cb6f:45e2 with SMTP id a5csp112409vqu; Wed, 9 Aug 2023 13:44:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdFAGHDKSk4UJq1wrlz/KQRL8eW27I9Te/KEoLSmOeXuE3lDH2nlrPXp4z9xjJL1n9NQe8 X-Received: by 2002:a05:6512:360e:b0:4fe:3724:fdac with SMTP id f14-20020a056512360e00b004fe3724fdacmr116297lfs.47.1691613879016; Wed, 09 Aug 2023 13:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691613878; cv=none; d=google.com; s=arc-20160816; b=Tz2FI/u0hFAMdVwgGQU9KwhSxDrg7afw+wYu9PVauUUBayZrtE4lZDj2QBXZkJ42yv IL+vOA+0ntDELdk09ymTWMHqrccf/KvuzQJSVYeLALaQW49CCfKS1fJt0ate+zbEKyIQ 7plBbeCvw35Y8rWHSGJLDX0WU11Fu5ZpxUZ2TD9W2Tu+230DxfQacdCKnv5PBm4z8q0F DZ7v7e2hsc4XsiIC1TZKSIXUKq/pLfhU6MU/djQfyQwZcyi+e8/gPrmUTdXyqg1XlkoC T+wvQJiQ4uFr5nj/U2p5FEiwCQeIfiFD8GZUnOWu2TPKrlEORvuAoCQ7MhUByIs2RgA6 jdqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=YGt04ExDD90fkwtK9eQG4guWZCoYCrl9GUzAoXCPlKs=; fh=jBwjuriIPWA1lnCf5oMMiNAPpgGE0iGPmBzZMsd85oQ=; b=LVv1ByOcyqvQutLmvtkDdM3lmrOQH/q2qWCar4yADuP/zDeSZ8DCbmelIkzGu83Tmm rc1DUGhlhAkgqgwDOYeK/C83tzPi50i2Wnl7MaOJshF15yAqDE3rf7mN6ZynDhPHPVlM xWAIYw9Wr5XaERbsC1MGBjYnYkDDYX7Oun0CbPHozRjZDJl23fGlj23TibrGulR/qnj8 xMRKyuI7rmN/nE0qXli3Ulz1y4tSPgvhsFgb8gw/Mox+pFiqwY/SfSOgK3x1YsSvSc81 5tA9xgeREqQHqlJIQtA5/a6AnxwxDMtvgPJxONnNOK9HqdwG8KY9Qv1vf88MaTr3eBA2 MV4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bXpUWSfh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="ZWM/ZF8F"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a170906190100b0098e38b3b7e3si9788659eje.793.2023.08.09.13.44.15; Wed, 09 Aug 2023 13:44:38 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bXpUWSfh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="ZWM/ZF8F"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233234AbjHITMh (ORCPT + 99 others); Wed, 9 Aug 2023 15:12:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233405AbjHITMc (ORCPT ); Wed, 9 Aug 2023 15:12:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3A98210B; Wed, 9 Aug 2023 12:12:19 -0700 (PDT) Date: Wed, 09 Aug 2023 19:12:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691608338; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGt04ExDD90fkwtK9eQG4guWZCoYCrl9GUzAoXCPlKs=; b=bXpUWSfhkL00gEE2YindtaTf+1y9FCu2c2LcUwvOxO0H2A52BbaUbOivX3dSB1/1PHzETH vKgJMa1d2qelFKQXJOPZVaqqIfqAEUabpGGCtTjDkCzAfszXRSAvg+g25sq39OgaOemRGb f8lJIvv50lgNrKPTceM9x9FYPiVPxn3sinM9OUaKvopHhHE08DHs4mNoOrCNolevX1i316 NWjc59wqzARwzJeXdpWMwuiUowVC0HnsWRsOtIwPYG0xWIimikjpeZPK4GEp0ceV/lqdwF rTi6NrvLnqmtN963pfNs8/jsO+Yy7ehlaPkFmN8d5kOmzuE8joXX6KbyjP+u4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691608338; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGt04ExDD90fkwtK9eQG4guWZCoYCrl9GUzAoXCPlKs=; b=ZWM/ZF8FDRTsrqgWn/v0LmAPDRZ6Ees9SR0gCa53ufd+tfTE+IsSqk2XdsUd7+PKKX+pFQ 4kn6yb61q2QFjqCA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/ioapic/32: Decrapify phys_id_present_map operation Cc: Thomas Gleixner , Dave Hansen , "Peter Zijlstra (Intel)" , Michael Kelley , Sohil Mehta , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169160833776.27769.15048619665774499729.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776089943989366 X-GMAIL-MSGID: 1773785714623601352 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 9faee3ecbfedebc6cdd0d96bfb2788ad8d62ef7e Gitweb: https://git.kernel.org/tip/9faee3ecbfedebc6cdd0d96bfb2788ad8d62ef7e Author: Thomas Gleixner AuthorDate: Tue, 08 Aug 2023 15:03:59 -07:00 Committer: Dave Hansen CommitterDate: Wed, 09 Aug 2023 11:58:26 -07:00 x86/ioapic/32: Decrapify phys_id_present_map operation The operation to set the IOAPIC ID in phys_id_present_map is as convoluted as it can be. 1) Allocate a bitmap of 32byte size on the stack 2) Zero the bitmap and set the IOAPIC ID bit 3) Or the temporary bitmap over phys_id_present_map The same functionality can be achieved by setting the IOAPIC ID bit directly in the phys_id_present_map. Signed-off-by: Thomas Gleixner Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Michael Kelley Tested-by: Sohil Mehta Tested-by: Juergen Gross # Xen PV (dom0 and unpriv. guest) --- arch/x86/kernel/apic/io_apic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 8c47099..ff2d27e 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1511,12 +1511,9 @@ void __init setup_ioapic_ids_from_mpc_nocheck(void) physid_set(i, phys_id_present_map); ioapics[ioapic_idx].mp_config.apicid = i; } else { - physid_mask_t tmp; - - physid_set_mask_of_physid(mpc_ioapic_id(ioapic_idx), &tmp); apic_printk(APIC_VERBOSE, "Setting %d in the phys_id_present_map\n", mpc_ioapic_id(ioapic_idx)); - physids_or(phys_id_present_map, phys_id_present_map, tmp); + physid_set(mpc_ioapic_id(ioapic_idx), phys_id_present_map); } /*