Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp175361rdh; Tue, 13 Feb 2024 13:09:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZ0ov1/BapvJ5QHWnuuDecR03L/rW/ZzevgUan4pe0r8HTy1/DyYHR/dO+nfO8POnVUI8P4c6/5IIPqp0efx8ZstdcHduvj7/pKhmNSw== X-Google-Smtp-Source: AGHT+IH0U0uwTJAqnLXsZ0lfrx1J8atr+LflSdNs+Xyw+h1T9vUHJLsZWUQwCBYvtz8P919Plq/w X-Received: by 2002:a17:906:749:b0:a37:b8fb:50e0 with SMTP id z9-20020a170906074900b00a37b8fb50e0mr304993ejb.52.1707858587349; Tue, 13 Feb 2024 13:09:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858587; cv=pass; d=google.com; s=arc-20160816; b=K5lgbcUp074ZqzIqzaJLpIwoWQSAhmfEYn4zTD6mJbmEhFAbdxJIE01HRAgj3SnS4y OLTYZ8KwLZQ1TlcrrNkfRbdsG8U453AuwEfs+I/oVOoOWdDpkyMKRAU1KIuzSmnFdAg+ jhVhi2IVYjsyhq90P3x54kpyoKFYBYf1NaDyCWVrcyOes08nGuw+mPYfmV4Ot7A4Va5v IVM0mDhz3poqbMQmPa7RrAaOBo/NpYn7BAaWtNyWDVl1IzJ6xi6j0S2XHyCQcUTYGde0 wrvtocBsMiY4jjO2XpucsDMp5RGk2JoQdNju9BFP4Eib6hkaAc6KvnH4q5K5mI3sk4Uc X4WQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=jUZlkCc/jvJdl89X2GtPdPNSmaXo0cCqu9OLjZmb7Lc=; fh=yKhjfmwunBQp2u5QetMvh9P9FR3j9EH99rxJndaplOQ=; b=ZfQul3ZFe5VgoPfxuNgXER3ixtYnoxHAzRycwA/G8XCBWmhTN951YHreqo/JJx7moZ pXTTdWrlN1dzHMYODiWXEdGrOrTadgJZEkqqI2VweDyZI/+rTFxJWBUzEbnloiFUPIub TDWac3XU1+kSpT2/0lJOWJkjip/gizWZulC3ekttWOPI/RTs+FrLhb89VjKMfui9nD1r EaVgCDcdirifdR1OIruGgIthC0FsL6fb3ZG+X+G5cDDlE1XclH2FpAG+IclW6Sai2VEX HVn6Q/y1OQmVkrV979HH2nX8GzcY9TYgUkpoyOSPHzqpw3Hi7iAMjQUhg/4A8xsOjFKj 32ww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QH1F94UV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCWvyvdXVe9QKe1Ol7+nP4kBp/pwfNV07JolMXf1PESfQAUkCZO05pqNI2vsdLGtHlGKJcBshrP802w0t8AyvlAWcjck65pC0H3l4soCmw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q21-20020a170906361500b00a3cfd0c91bcsi1035962ejb.33.2024.02.13.13.09.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:09:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QH1F94UV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 17BC11F283E8 for ; Tue, 13 Feb 2024 21:09:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5855367E7C; Tue, 13 Feb 2024 21:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="QH1F94UV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7HnKYKGS" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 119B86216B for ; Tue, 13 Feb 2024 21:04:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858298; cv=none; b=L/opfwcF8Ad6EylenNWTLU0tEWT0G/JH6xkA5wEYUckrGgdM7MiQuO+CC4FkCy/sfWg32qOi/3c/pEuVVF1BDzfZHsPOexk2ZlrRBpwNE/7WLta9FCFmTisH83aAz0NQiDm+e+a1EtaaOfe/Jn4Jz/4IynPntypt3trPbvDAdcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858298; c=relaxed/simple; bh=bZ3Lsv6X9bv7EA18HKzbW7ZxzwC4tsHSaKq0hcHmERE=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=m7CFgl/ArDWg70wj5YOGp0vc9eSVOVy1nHarJJXeX+7wPFNlS4IynYpqrkkDZelAJZSN8s5KgJNWuSRVoOVTgAmL8i/CKIvvbrVbhh7krYvQrqsd09Ob9SMAEgp+4BsDumnKpY0RpiQA0l7hSGDKvK5otIG4UOIai4fVPFfcMLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=QH1F94UV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7HnKYKGS; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240212154638.995080989@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858295; 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=jUZlkCc/jvJdl89X2GtPdPNSmaXo0cCqu9OLjZmb7Lc=; b=QH1F94UVw+6NVB+HHB9GcZL3lwyRVW0EdwWdQQaiP626+rIiROmZf1q8IpbV8uwAjZZA0x P2RU2UIycP8y1OF7TcxCB239yreBwQEBgWYB70IALNV1QiKMq2LPCp9aZVLYWql/YrSY4y Z6PPEnEIdSyVhc33dlL+2KCQXiuq2Qc2+aVJ5Xb43HNGjw+fhhIg/8G7axPTOUq8nYZYMP nGqo7zEKv8U3lDMW8UyYQ2Dy3JxUBIg+ysNVP/2HxfkXd3ASbGtgNEFdAGZYK9EA+1aqVy 8ntnAPNbdVy+VYJ2F/4NVWcn8CwTUBqK8N1RAOcbY5DyZ6fUO9X41l3mn7NmnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858295; 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=jUZlkCc/jvJdl89X2GtPdPNSmaXo0cCqu9OLjZmb7Lc=; b=7HnKYKGS92RlEqyxHgo3cF+p3yPiy/0rnPeURo0ExhLCpJfj0swFqXli3TIhzP/mgYQ/43 XVbKCLa+Vn3zmGAA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" , Andy Shevchenko , Wei Liu Subject: [patch V3 03/22] x86/ioapic: Replace some more set bit nonsense References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:04:55 +0100 (CET) From: Thomas Gleixner Yet another set_bit() operation wrapped in oring a mask. Signed-off-by: Thomas Gleixner --- 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;