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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 8CC82C433E0 for ; Mon, 8 Mar 2021 09:11:30 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2467F651BC for ; Mon, 8 Mar 2021 09:11:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2467F651BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cq28W9YCQoX0fr9xMblEuQLbgfvTLnt2KbGlLr4q+qU=; b=lD4DnAOCmaEy6J5MyyMyrtHAS K/nuDJ2OFC4Y185ZwTdDfpSUk17euLCQXcgn4S28Bg/oBRK02H2bW83q4ekMYwrMsLezd2geSpDEN uXFSZh501hr3VDGfYh1POMnKLf/vYCbJKmEIHbZG4JSN8sXQBhGtwvsOW0cMGo0culpmPqIP5Bs/A WaV/Ya9aCP+9U68IerwQ8wRoLKB8wO94m3wH6ujWA+GNMwLYyDsOjpjl6LByqpdZwc/15ovO7wekR w+oSwV7HLm3htC0cC11aqydPgHGLgnSj08eoS2+aHM586OMVJbLLFMDlXco1/uwA783vt/ewndxYX uhE59oRbg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJBto-00G6g9-MW; Mon, 08 Mar 2021 09:10:01 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJBtk-00G6eQ-1z; Mon, 08 Mar 2021 09:09:57 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 07720651B9; Mon, 8 Mar 2021 09:09:53 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lJBtf-000IHt-0Y; Mon, 08 Mar 2021 09:09:51 +0000 MIME-Version: 1.0 Date: Mon, 08 Mar 2021 09:09:50 +0000 From: Marc Zyngier To: Mark-PK Tsai Cc: daniel@thingy.jp, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, tglx@linutronix.de, yj.chiang@mediatek.com Subject: Re: [PATCH] irqchip/irq-mst: Support polarity configuration In-Reply-To: <20210308030102.5161-1-mark-pk.tsai@mediatek.com> References: <874khorux9.wl-maz@kernel.org> <20210308030102.5161-1-mark-pk.tsai@mediatek.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <01b1c85119619c2418908a2fdabfb5dc@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: mark-pk.tsai@mediatek.com, daniel@thingy.jp, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, tglx@linutronix.de, yj.chiang@mediatek.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210308_090956_379020_84F5DABC X-CRM114-Status: GOOD ( 19.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-03-08 03:01, Mark-PK Tsai wrote: > From: Marc Zyngier > >> > >> > Support irq polarity configuration and save and restore the config >> > when system suspend and resume. >> > >> > Signed-off-by: Mark-PK Tsai >> > --- >> > drivers/irqchip/irq-mst-intc.c | 87 ++++++++++++++++++++++++++++++++-- >> > 1 file changed, 84 insertions(+), 3 deletions(-) >> > >> > diff --git a/drivers/irqchip/irq-mst-intc.c b/drivers/irqchip/irq-mst-intc.c >> > index 143657b0cf28..979a4d55bcb1 100644 >> > --- a/drivers/irqchip/irq-mst-intc.c >> > +++ b/drivers/irqchip/irq-mst-intc.c >> > @@ -13,15 +13,25 @@ >> > #include >> > #include >> > #include >> > +#include >> > >> > -#define INTC_MASK 0x0 >> > -#define INTC_EOI 0x20 >> > +#define INTC_MASK 0x0 >> > +#define INTC_REV_POLARITY 0x10 >> > +#define INTC_EOI 0x20 >> > + >> > +#ifdef CONFIG_PM_SLEEP >> > +static LIST_HEAD(mst_intc_list); >> > +#endif >> > >> > struct mst_intc_chip_data { >> > raw_spinlock_t lock; >> > unsigned int irq_start, nr_irqs; >> > void __iomem *base; >> > bool no_eoi; >> > +#ifdef CONFIG_PM_SLEEP >> > + struct list_head entry; >> > + u16 saved_polarity_conf[DIV_ROUND_UP(64, 16)]; >> >> Where is this 64 coming from? > > The maximum number of interrupts a mst-intc supports is 64 in > Mstar and Mediatek SoCs now. > So I just use the maximum number of interrupts here. Then please use a named constant instead of a magic number. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel