From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85F26C4363A for ; Thu, 22 Oct 2020 08:28:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26754221EB for ; Thu, 22 Oct 2020 08:28:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="bXrR6ECZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2507766AbgJVI2r (ORCPT ); Thu, 22 Oct 2020 04:28:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:55748 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502321AbgJVI2r (ORCPT ); Thu, 22 Oct 2020 04:28:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603355326; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ak4XkyQcVmIRaA1l0Rz4F8yZmad7xR9rPkb2Zs/I4w=; b=bXrR6ECZL37VdSqI0vbVU00hc8qxobp23r7xk9scCpOzO847J+xYSponAUnuU1AAaIy92H dWF/+ipteKPoLAHbzcWOadipU+15mcv73HClKvqBGugMCUoNjgWhxr2WMrxem55T6urPTr a95IHGfvdlCLfbV6wKdta6PHMmDYrAw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 531E4AFA8; Thu, 22 Oct 2020 08:28:46 +0000 (UTC) Subject: Re: [PATCH 4/5] xen/events: unmask a fifo event channel only if it was masked To: Jan Beulich Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Boris Ostrovsky , Stefano Stabellini References: <20201022074214.21693-1-jgross@suse.com> <20201022074214.21693-5-jgross@suse.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <72cb09c0-4fc7-f02e-c1fb-314e5add381f@suse.com> Date: Thu, 22 Oct 2020 10:28:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.10.20 09:55, Jan Beulich wrote: > On 22.10.2020 09:42, Juergen Gross wrote: >> --- a/drivers/xen/events/events_fifo.c >> +++ b/drivers/xen/events/events_fifo.c >> @@ -236,6 +236,9 @@ static bool clear_masked_cond(volatile event_word_t *word) >> >> w = *word; >> >> + if (!(w & (1 << EVTCHN_FIFO_MASKED))) >> + return true; > > Maybe better move this ... > >> do { >> if (w & (1 << EVTCHN_FIFO_PENDING)) >> return false; >> > > ... into the loop, above this check? Yes, that should be better. Juergen