Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2117039pxb; Mon, 12 Apr 2021 15:03:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy57oc7Ezt6DNlB8dwOoFQoDDV5j4HN/Blm5A58+is+v2OhUgoUw7in2wj+QidoQ9/0TYKD X-Received: by 2002:a17:902:e202:b029:e8:e924:b3f0 with SMTP id u2-20020a170902e202b02900e8e924b3f0mr28466834plb.50.1618265030889; Mon, 12 Apr 2021 15:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618265030; cv=none; d=google.com; s=arc-20160816; b=u7rUrNXtBNoB2Ax4U4a+TQ4+DJGb1pG0hDDhROn4dnsnvfAZS8PGfVV0ZG0kLTvBiY FRbeJfZmkOfksM3RXdyo839YgKyu/8GkcvUhENGXIEsPnIo5AtOfHvNcwIq1keBa7Y8x bfjRFV45HMSsWf+cKXzMWI7SHh/T8lVX8sWNeXZYa2yUJSNv+POKZjxnPdSzARdSyxzI 8+I2vjdXj4SL+F4wb4z2eM3AfCph54ANFv2dZPLy9wj9LC26O3Kz44fMhvVugldN888F 8MQV9rmIJCplatwFp25XEEfwJWqpytDzzubkl65Kn8CQRlxMasQWmeH9JWjwAQsjUNvI fDZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0aGrU+Yc+M3YWbbzXmJfOHj+QuBY5/vKJA71+zTToo0=; b=PK1hBMDSG+0gn2MycJHE0dOdnyk6riYIDuhKc624sUNOBVKtHerb+bHU5ZYwUsil0q eZtYYQ4ERfMplHiQHL/bcK8XBUXOPzdAgOnincWaUyxCQaPlQvU65H9T4gq4rvqd1ec8 5CHIsjwz4+QIVPaPa3MVzeShbDVi7gxUS0w2ql/1YyCN3p57YPCdbVlWkSzt3DAPSRwG +q2Ykpnk3tym2TAnsBHOC1frtv6M2Zsz9yQd1EJeoskRsWmnyry27OMKkrBpaSVVy3ix DI+z+wYuQztgS84GG6yj31h1fOGNsKTubKpdGfn6lMHUvevAGZR/WgUlLgVXzmGEXy4d nIFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DnIXiNHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si11574186plc.267.2021.04.12.15.03.36; Mon, 12 Apr 2021 15:03:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DnIXiNHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240100AbhDLJXE (ORCPT + 99 others); Mon, 12 Apr 2021 05:23:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:54616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239889AbhDLJBa (ORCPT ); Mon, 12 Apr 2021 05:01:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD9DA6135F; Mon, 12 Apr 2021 08:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217993; bh=JL9fUh2zWV1/Zx8exjNFW2cp7HUKmXACOgrT/Aksdxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DnIXiNHTbuVzP9dUHkUkjgQ21qegFfldekHrawhKZai+fAvXjqpR/zW9YEj0+VaDk iWAvvUFj01zHT0FIEzuIPeK/PutG/+1ksqrega0UJ+CzPq89oYmcBlH3j8GQ/VkzPo oJsPLm6XMph6JNiBc1SDXXH6ZAOekUfHZIaM+ezk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Fancellu , Julien Grall , Wei Liu , Boris Ostrovsky Subject: [PATCH 5.11 014/210] xen/evtchn: Change irq_info lock to raw_spinlock_t Date: Mon, 12 Apr 2021 10:38:39 +0200 Message-Id: <20210412084016.480231903@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luca Fancellu commit d120198bd5ff1d41808b6914e1eb89aff937415c upstream. Unmask operation must be called with interrupt disabled, on preempt_rt spin_lock_irqsave/spin_unlock_irqrestore don't disable/enable interrupts, so use raw_* implementation and change lock variable in struct irq_info from spinlock_t to raw_spinlock_t Cc: stable@vger.kernel.org Fixes: 25da4618af24 ("xen/events: don't unmask an event channel when an eoi is pending") Signed-off-by: Luca Fancellu Reviewed-by: Julien Grall Reviewed-by: Wei Liu Link: https://lore.kernel.org/r/20210406105105.10141-1-luca.fancellu@arm.com Signed-off-by: Boris Ostrovsky Signed-off-by: Greg Kroah-Hartman --- drivers/xen/events/events_base.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -109,7 +109,7 @@ struct irq_info { unsigned short eoi_cpu; /* EOI must happen on this cpu-1 */ unsigned int irq_epoch; /* If eoi_cpu valid: irq_epoch of event */ u64 eoi_time; /* Time in jiffies when to EOI. */ - spinlock_t lock; + raw_spinlock_t lock; union { unsigned short virq; @@ -310,7 +310,7 @@ static int xen_irq_info_common_setup(str info->evtchn = evtchn; info->cpu = cpu; info->mask_reason = EVT_MASK_REASON_EXPLICIT; - spin_lock_init(&info->lock); + raw_spin_lock_init(&info->lock); ret = set_evtchn_to_irq(evtchn, irq); if (ret < 0) @@ -463,28 +463,28 @@ static void do_mask(struct irq_info *inf { unsigned long flags; - spin_lock_irqsave(&info->lock, flags); + raw_spin_lock_irqsave(&info->lock, flags); if (!info->mask_reason) mask_evtchn(info->evtchn); info->mask_reason |= reason; - spin_unlock_irqrestore(&info->lock, flags); + raw_spin_unlock_irqrestore(&info->lock, flags); } static void do_unmask(struct irq_info *info, u8 reason) { unsigned long flags; - spin_lock_irqsave(&info->lock, flags); + raw_spin_lock_irqsave(&info->lock, flags); info->mask_reason &= ~reason; if (!info->mask_reason) unmask_evtchn(info->evtchn); - spin_unlock_irqrestore(&info->lock, flags); + raw_spin_unlock_irqrestore(&info->lock, flags); } #ifdef CONFIG_X86