From patchwork Sat Sep 10 15:49:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12972572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5637C6FA82 for ; Sat, 10 Sep 2022 15:50:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.404807.647396 (Exim 4.92) (envelope-from ) id 1oX2kB-0004c6-AB; Sat, 10 Sep 2022 15:50:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 404807.647396; Sat, 10 Sep 2022 15:50:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oX2kB-0004bz-6W; Sat, 10 Sep 2022 15:50:07 +0000 Received: by outflank-mailman (input) for mailman id 404807; Sat, 10 Sep 2022 15:50:05 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oX2k9-0004BJ-Sd for xen-devel@lists.xenproject.org; Sat, 10 Sep 2022 15:50:05 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3ba19b87-3120-11ed-9760-273f2230c3a0; Sat, 10 Sep 2022 17:50:03 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 59B3B21B67; Sat, 10 Sep 2022 15:50:02 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DA88A13441; Sat, 10 Sep 2022 15:50:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id huotMymyHGNQZAAAMHmgww (envelope-from ); Sat, 10 Sep 2022 15:50:01 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3ba19b87-3120-11ed-9760-273f2230c3a0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1662825002; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KvBcSJfTzw6ZlBSYvDzpGTuAHlQYr/2Q9gCeBjhjNFU=; b=a9Lx/Jn/nQKw+dBTWOaTD4U1zTAl9A1DBwroyPHCo87kHMYm8gCNgD7dkwAUhyuuOV0yDH cOmT4AcC18jYwqV9SwVBU7ZIxZcZamJXJRKzjsJAUOP2te6JeNOqLf96vv3pLhqH6dEsfb uBCfD5PeJxmYK7AXusnitYGYvi59W7o= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Tamas K Lengyel , Lukasz Hawrylko , "Daniel P. Smith" , =?utf-8?q?Mateusz_M=C3=B3?= =?utf-8?q?wka?= , Paul Durrant Subject: [RFC PATCH 0/3] xen/spinlock: make recursive spinlocks a dedicated type Date: Sat, 10 Sep 2022 17:49:56 +0200 Message-Id: <20220910154959.15971-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Instead of being able to use normal spinlocks as recursive ones, too, make recursive spinlocks a special lock type. This will make the spinlock structure smaller in production builds and add type-safety. Juergen Gross (3): xen/spinlock: add explicit non-recursive locking functions xen/spinlock: split recursive spinlocks from normal ones xen/spinlock: support higher number of cpus xen/arch/arm/mm.c | 4 +-- xen/arch/x86/domain.c | 12 +++---- xen/arch/x86/include/asm/mm.h | 2 +- xen/arch/x86/mm.c | 12 +++---- xen/arch/x86/mm/mem_sharing.c | 8 ++--- xen/arch/x86/mm/mm-locks.h | 2 +- xen/arch/x86/mm/p2m-pod.c | 6 ++-- xen/arch/x86/mm/p2m.c | 4 +-- xen/arch/x86/numa.c | 4 +-- xen/arch/x86/tboot.c | 4 +-- xen/common/domain.c | 6 ++-- xen/common/domctl.c | 4 +-- xen/common/grant_table.c | 10 +++--- xen/common/ioreq.c | 2 +- xen/common/memory.c | 4 +-- xen/common/page_alloc.c | 18 +++++----- xen/common/spinlock.c | 22 +++++++----- xen/drivers/char/console.c | 24 ++++++------- xen/drivers/passthrough/pci.c | 4 +-- xen/include/xen/sched.h | 6 ++-- xen/include/xen/spinlock.h | 68 +++++++++++++++++++++++++---------- 21 files changed, 131 insertions(+), 95 deletions(-)