Message ID | 20230807135026.636507272@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1492841vqr; Mon, 7 Aug 2023 07:32:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF21t2S9vFynnPKZ/dCCWbDBvYfEenggY8k0yATz6yRepVslmFxuCwQIoV/6uS0bMjZ106N X-Received: by 2002:a05:6a20:7d84:b0:135:4527:efe4 with SMTP id v4-20020a056a207d8400b001354527efe4mr13094670pzj.10.1691418723938; Mon, 07 Aug 2023 07:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691418723; cv=none; d=google.com; s=arc-20160816; b=Aj+c0cAxL40KEOLEZQUFy571kdwpKb/osBMO1mbMkUBCkd03vONSDAL6Pc7NqztLyK il5IBoprxZoXohWMiGASzlvS42S2SXoCYBB3bRPQ9sDPJGKOU6h51B1mYPQUxcNekwrW /vUzmiU/WKX5cdZCnL4Wr8w2KWI1hOM5NB0ov2xQ4DO6Jn31hYpYpC2geT4BlQndL6QY R/psuLUY4vrXDij7f+72W1PDoeOmCvhktwht0i79FiyakIAzh++OTsODOelqctQH0NBj KyoO0N4y1ej6J2Erb8VyNUyeKc7xMc6JmF0RzDa1pXwPM+qDyU9erdfnCfAMEZsjv8Dt Imzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=yzPalGwgNV+hv5fraMZh8WMCr4ypmAb2ZvNhqZKp6/4=; fh=/92WVKYrcN3rA268QXyKzVtm/UtxHeI2lnbU295XDiQ=; b=QyefOcX/AsBqhJba2ncFa/WOktBmOq/X8FTgCHgPcME3268rRib0mIuMg2/c37Vaik n9jmMURdJGTnbBi5pIg6R7cRIYnH6U9RvbRUrtxfsJRge7L7gBxaOeK5QYisRyzppnsz 6WIwQVPZcJmEyTzMUTZET0d90gbmVGOzN2zx0fsgCbkJrXmrbPTTM5QQyOaWMkg3z3VQ AxVrrt+4YlNaaJ4grlCmzO96qO5bUazFmphd+lx8J/EtNDNcJLCjH57+8TgNZZSGFsi3 3GIHu4Dsu3RenV9bZ5v2DwngGvRxX12heNdNLLeJbRBcHt2AHOUgvUSqagr3IMi+9fcU AZxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TCV6O+CG; dkim=neutral (no key) header.i=@linutronix.de; 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 j1-20020a056a00130100b00665c24182bcsi5942932pfu.219.2023.08.07.07.31.50; Mon, 07 Aug 2023 07:32:03 -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=TCV6O+CG; dkim=neutral (no key) header.i=@linutronix.de; 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 S234493AbjHGNxX (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Mon, 7 Aug 2023 09:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234498AbjHGNwp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Aug 2023 09:52:45 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C72510D5 for <linux-kernel@vger.kernel.org>; Mon, 7 Aug 2023 06:52:41 -0700 (PDT) Message-ID: <20230807135026.636507272@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691416360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=yzPalGwgNV+hv5fraMZh8WMCr4ypmAb2ZvNhqZKp6/4=; b=TCV6O+CG00GeXn+a1he4JPWxkG57mzG3b1yu3o/ohWynYnglIUDivLSqz9WmUsMXKUHMrB CWt2yeHBl3HF+uMq0c60c0aI4T7offUADhMCkvapN2UfTyihOfnn7yAEJJVU3xFTBL3jae rhp/mB5x65k9DIj8DfGmEd2PdDnUAZocOlRUpNtiwc2rxTWse00G2ZVdk5f27rPwDAI7lK A+fxMR1kRotwQpAUBmlQ6tyve4uJ9W8gJ336+3dJZ/YsLxYoknlotL6apqLyszTRx/A5JV kDBIx3o0NoBa5AO7kYMPyLMaOQU8LPQVzaHSsD7sDpCV7hR6pcvfZ5P0ZJHv+Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691416360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=yzPalGwgNV+hv5fraMZh8WMCr4ypmAb2ZvNhqZKp6/4=; b=latYlXwaRgAi9FG6M3RL/5Pcp7XFqm5yOyA+yuH/0icD1crJzcUieocZ7hOuQprjxkMS2m CFFI7U91d3ycnSCw== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: x86@kernel.org, Tom Lendacky <thomas.lendacky@amd.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Arjan van de Ven <arjan@linux.intel.com>, Huang Rui <ray.huang@amd.com>, Juergen Gross <jgross@suse.com>, Dimitri Sivanich <dimitri.sivanich@hpe.com>, Michael Kelley <mikelley@microsoft.com>, Sohil Mehta <sohil.mehta@intel.com>, K Prateek Nayak <kprateek.nayak@amd.com>, Kan Liang <kan.liang@linux.intel.com>, Zhang Rui <rui.zhang@intel.com>, "Paul E. McKenney" <paulmck@kernel.org>, Feng Tang <feng.tang@intel.com>, Andy Shevchenko <andy@infradead.org> Subject: [patch 04/53] x86/ioapic: Replace some more set bit nonsense References: <20230807130108.853357011@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Mon, 7 Aug 2023 15:52:39 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773581080088395745 X-GMAIL-MSGID: 1773581080088395745 |
Series |
x86/topology: The final installment
|
|
Commit Message
Thomas Gleixner
Aug. 7, 2023, 1:52 p.m. UTC
Yet another set_bit() operation wrapped in oring a mask.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/include/asm/mpspec.h | 3 ---
arch/x86/kernel/apic/io_apic.c | 6 ++----
2 files changed, 2 insertions(+), 7 deletions(-)
--- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h @@ -86,9 +86,6 @@ typedef struct physid_mask physid_mask_t #define physid_set(physid, map) set_bit(physid, (map).mask) #define physid_isset(physid, map) test_bit(physid, (map).mask) -#define physids_or(dst, src1, src2) \ - bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) - #define physids_clear(map) \ bitmap_zero((map).mask, MAX_LOCAL_APIC) --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2494,9 +2494,8 @@ unsigned int arch_dynirq_lower_bound(uns #ifdef CONFIG_X86_32 static int io_apic_get_unique_id(int ioapic, int apic_id) { - union IO_APIC_reg_00 reg_00; static physid_mask_t apic_id_map = PHYSID_MASK_NONE; - physid_mask_t tmp; + union IO_APIC_reg_00 reg_00; unsigned long flags; int i = 0; @@ -2542,8 +2541,7 @@ static int io_apic_get_unique_id(int ioa apic_id = i; } - physid_set_mask_of_physid(apic_id, &tmp); - physids_or(apic_id_map, apic_id_map, tmp); + physid_set(apic_id, apic_id_map); if (reg_00.bits.ID != apic_id) { reg_00.bits.ID = apic_id;