From patchwork Fri Feb 16 15:17:22 2024 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: 202192 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp589359dyb; Fri, 16 Feb 2024 07:27:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXAuU/rZbXwbpSNpo62eBsa/SzIQYYLwBcwlYgY67Nuzx3re2fYBHvxsRrPJzkoh64Wl9E9huJmazln3Evn1xMFiRKMIg== X-Google-Smtp-Source: AGHT+IHCoOzT10r+PscmrkF2G3N+F8jwhmQngeV4ed4QE92POkfFDhZeuBNSsj07jJT3DrRjvAxj X-Received: by 2002:a05:620a:1a0b:b0:787:2b29:5f24 with SMTP id bk11-20020a05620a1a0b00b007872b295f24mr8131147qkb.34.1708097270734; Fri, 16 Feb 2024 07:27:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097270; cv=pass; d=google.com; s=arc-20160816; b=c52jyPTnUbYbu3S9wZml6Q/Uq3Sebgv1jUdP3JWFGMWSlHPJC3/y8WTXp11YR/KcSk IkMNivv42loNGMH8J4yN32I7YLzDX11+6Rg11OxFl2CjQZLzDXAQvdajC7hw5svY+Ovj 35rRBcAwDttfsL2Xy1ppo5YELD/H5G8jYyidkkCEpUq5DHFPCp2KA+ixk5zR0TFOqMdo GFuVFyK7k+D3V6y5JW7A4IZNrc+Byhwcrirrx435XmTSoskGGoXAdA59IaOAN3WFqeNa K7sPL6wZy6A5Fl/t0TRyDh11e1XAfa+9j5kCkEnMqbJaCQrceR5ZWssdqL6QSRFatdmt G4KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=aTFyXwwlOioHRxjIX6ke3k85czRHtWlk/dgGaN7PYFQ=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=gz1WxVrbYwlc5MhcaUL5CPmRyF7UHgx2NHxc5riOMCyJgFQSV6BOHCKu66u0h/dyS+ svBWVrS9J66TTb90UG9DXzcz2S6X4A6Ym4bDht5RZZ89eKALYUpF3VaiXi2OJgT4uNOt 9+zApVe36XnhqF/TWuBHSMMd2Ci0NpZwNXf6ViuaRrJiLg1MfMI2TY+05ZcDj90WGrdb OwQsux0DeeCK+ETYTUVJiSYUg5daAPq11FqlDlyQNyQlKPyoYOLBaXV8p7huCc506rk4 rON/XJFQhWDPH0EYYX6h/irs2W0TqOizo3Z/0JxS/uoNZDFgbdpGWb8jsYf4cvH+3v4N Ba8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=K6bJAlo3; 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-68838-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68838-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id po13-20020a05620a384d00b0078724a778f4si93789qkn.206.2024.02.16.07.27.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68838-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=K6bJAlo3; 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-68838-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68838-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BBFE1C2309E for ; Fri, 16 Feb 2024 15:27:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B30812FF73; Fri, 16 Feb 2024 15:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="K6bJAlo3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AYcL8YEr" 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 6353414AD09; Fri, 16 Feb 2024 15:17:25 +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=1708096647; cv=none; b=fSHRukjkZGm/B0khlvcjNlixg2+gLMtvZ9FKvCOy1qz4Za2on743T3NzaQD9dmtpaGCP760PhIjwqBrt9VzHDm/AE0j1E7fzhVCoEchYt7t8cRUNo3yYlbWu5sPGT+rN0MnlZqjO/QG1J9IVtcfNebk0gYFk7EL2hILqwMWONCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096647; c=relaxed/simple; bh=CbxqfD57ahlDGsg/W1qoVAKxsYbkt8WtKjjubMB/bKc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nG8GPcQI0Kp4fCbX4NYc2VtXAj4h/eehaTQ3+VKnm0JyUO3AjbR/e/yB7qGiC2o9wvc8M/H1/UPXy1GdzkBaPJtO1BHrUnVOQYjeXX2+E1e1f4acwgpe1GrNbAahfR1R+yk1BI2q7IhdQZNxeD4bQlvjgg5J0D8iWooY8Tj+9xI= 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=K6bJAlo3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AYcL8YEr; 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 Date: Fri, 16 Feb 2024 15:17:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096643; 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: in-reply-to:in-reply-to:references:references; bh=aTFyXwwlOioHRxjIX6ke3k85czRHtWlk/dgGaN7PYFQ=; b=K6bJAlo3psYcoubVQZeE1mz9TdyQfUO48i9jyRS2st8zT5fP+yIzisq8Li62iDpNgJTRHs OfY0BIvm9ZgR3S8Z98eXtP+XOZmlhgrZVwAP9gteRZQhVltb9iSCQMO21O5FP9gztxN0Xa XQvC5o6sOR3RaFuIVZ1VXTCAAfovVt4z+gTN1m+aZaM11I+ksBFKZ3Caer0wZDJboF0C2R uofa/8VbhNINKSla1KUhxKZs7d2d9d1TptidP8AHLxB7q1tfnmqA09iHzrfFITcI8iDYLm eU0GTzfvupjWgxb5wgskv4WMvMIPEuYTOryzHgaZoOnsMeCnm402+FkcmLMmGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096643; 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: in-reply-to:in-reply-to:references:references; bh=aTFyXwwlOioHRxjIX6ke3k85czRHtWlk/dgGaN7PYFQ=; b=AYcL8YErtQ1RnZ5b3Kosu7H9XtE+gaavvmGJGbI9BgdCp2SX6/1Y3bPJ1Ml6u4Jf/2vAvQ 4LOGZevvEC/m95Cw== 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: Replace some more set bit nonsense Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212154638.995080989@linutronix.de> References: <20240212154638.995080989@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809664295.398.9551739358512163557.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790819580413864586 X-GMAIL-MSGID: 1791069803668427341 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 2ac9e529d76a8534fa357e723942dd3f076c37da Gitweb: https://git.kernel.org/tip/2ac9e529d76a8534fa357e723942dd3f076c37da Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:04:55 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:39 +01:00 x86/ioapic: Replace some more set bit nonsense Yet another set_bit() operation wrapped in oring a mask. Signed-off-by: Thomas Gleixner Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240212154638.995080989@linutronix.de --- arch/x86/include/asm/mpspec.h | 3 --- arch/x86/kernel/apic/io_apic.c | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index 4b0f98a..9bf1e75 100644 --- 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) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index e71745e..b62c7ee 100644 --- 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(unsigned int from) #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 ioapic, int apic_id) 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;