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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 D7173C433DF for ; Mon, 20 Jul 2020 12:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB56C22BF3 for ; Mon, 20 Jul 2020 12:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595248036; bh=A7gxILitgLHX3aWBdzmsdLYsLfst797hmKf9H1sJ5VQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=gTY+kdpp+7UepYlDPCfOJ8sAQHjPOJZdtUTTqgdfQGDRK9IpV9HofTa1olpe+uLcF DtujXh/zjmLFIvt+aYX7GhyT3PFMPDJ+WUGMvehkaajJm4NZIxnwHBdn+jQ76TnLFH 4wbAXctqeZfcIP7k102JykJLz6XcemUgGijDN2W0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728590AbgGTM1Q (ORCPT ); Mon, 20 Jul 2020 08:27:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728460AbgGTM1Q (ORCPT ); Mon, 20 Jul 2020 08:27:16 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3907920684; Mon, 20 Jul 2020 12:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595248035; bh=A7gxILitgLHX3aWBdzmsdLYsLfst797hmKf9H1sJ5VQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A1Ew0PmZ+yOmZQPp9ra3qSeFpeaeAMtNxfykgh4I5dnxV+EpUc1uUdls8nvEePVJj feNDl+RRpdP2+mrq0ChsJrZ1J+jQlG0Q3ATF1CNCrl1P2cw1JRlT6d5dY0gtnYCjL4 NC/Zqo3+UcstkLiCqyP3MCMSGREOeF9Lvqajavg4= Date: Mon, 20 Jul 2020 14:27:25 +0200 From: Greg KH To: Marc Zyngier Cc: stable@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH][STABLE 4.9] irqchip/gic: Atomically update affinity Message-ID: <20200720122725.GB3147730@kroah.com> References: <20200707153741.1935141-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200707153741.1935141-1-maz@kernel.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Jul 07, 2020 at 04:37:41PM +0100, Marc Zyngier wrote: > Commit 005c34ae4b44f085120d7f371121ec7ded677761 upstream. > > The GIC driver uses a RMW sequence to update the affinity, and > relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences > to update it atomically. > > But these sequences only expand into anything meaningful if > the BL_SWITCHER option is selected, which almost never happens. > > It also turns out that using a RMW and locks is just as silly, > as the GIC distributor supports byte accesses for the GICD_TARGETRn > registers, which when used make the update atomic by definition. > > Drop the terminally broken code and replace it by a byte write. > > Fixes: 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only feature") > Cc: stable@vger.kernel.org > Signed-off-by: Marc Zyngier > --- > drivers/irqchip/irq-gic.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) Thanks for the backport, now queued up. greg k-h