Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp569294ybv; Wed, 19 Feb 2020 05:08:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwoghUZmr0cq2gTEQOqRk98peMhVa79XW/9DvICMYbF2k24VUeyU4TTuDfYjLcZazMP4BU1 X-Received: by 2002:a54:4418:: with SMTP id k24mr4659462oiw.46.1582117689413; Wed, 19 Feb 2020 05:08:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582117689; cv=none; d=google.com; s=arc-20160816; b=UCk0iVt6gVPaUJFizxDXnBAD+8f6rfQp9mLwnl2aIW8IMIaaCooY5cDcr6dMSxIbJL Jrk/f4qJCtrrs0XgYfJ1Y+CmKq8lgK27Ykk55I1rBeF4cTlE5qqAlXHMtx7WDo6jdrVz UVjZLIRiIh2U9x0JzDwJS5f9Rvqbsy1cikNAA9tPnvqZnTpNCIAuzJK+wlPSLxzlpMBl hKF7ANr4r7NE+reORG6EMa32WjkyegQko0qMO7aWZXDRWKMvn8lHaX2cQ/WZEY0WTW3f xOdb/uuCiuJt04E3P6X0ZlUVpD+B/qyBmXXxgWt35OiplE5Dq9rl/Q90K/sB3kU+U5KX TbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=l/B3KaEv2Jvj0I5nAEs7f8vFAJgLMsUxBXAa1hAOuA4=; b=GG6u/i/8c/GJ7tlIf0Saymbvt3QezuYUFNi9UJyeitCIGbYG16+djXr8gdBv1oWHKD vdN4eUSSmWKzFsixLvPHaR6Dycoe2vNDYf3C9oSjBBT1zVZsjEEHh+o80TxzqFZewpux kUOnzdBOdFEdWg80pRlyWyF9J+vFk6Xw645VAof0kWLT0jkFXsqM66dZBfgmZanyOIW9 QUXM+61TwKAldA/CVQd7pp1f9S/usAg/SvKy0sRUjhfFdgNt6oqRX4Cp/17gY0Tcqdai 7c/QnFD3uXDry2ddHVbz+jh+7nopVTLW6q6CHDySARj3hQTiqUwUK+EkyXQuK/TNEuOI O2Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=jGsQCxqd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62si9756698oiz.271.2020.02.19.05.07.57; Wed, 19 Feb 2020 05:08:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=jGsQCxqd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726736AbgBSNHl (ORCPT + 99 others); Wed, 19 Feb 2020 08:07:41 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:33376 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbgBSNHk (ORCPT ); Wed, 19 Feb 2020 08:07:40 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01JD3oYT005776; Wed, 19 Feb 2020 14:07:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=l/B3KaEv2Jvj0I5nAEs7f8vFAJgLMsUxBXAa1hAOuA4=; b=jGsQCxqd5C6Dz0am6OYuV40mCFaFg2SA/u4pdvfonZvOL3L/WfWZrsXlHjKwsV45rvHY RK+iInIFU1/I6jktLK2xXr6MdAdz+5cZb8cq0gQeRL4OJnb5MiVuxN0r4siuocm6vb5W MG3hHz5nTHVuwMumfAetokeVW+oxdoMYnX12Lm9X33pFtdGXWmU5HIT0JHFw/gLrnwa4 BifVIDuDD1NAkrurCuQj0eSBe1Sm0JIWeDEQGgN7JFH5FmLUSKB/DcyTPGIkW7HbXagX DNtiH4Kau2QswwlMPmY/hoI8wEEtKpIkrKtYJbnZE7kctabFDMN9rWv+dxxIBrL/JFZd qQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2y8ub033wj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Feb 2020 14:07:24 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CE32D10002A; Wed, 19 Feb 2020 14:07:23 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BC2132B739B; Wed, 19 Feb 2020 14:07:23 +0100 (CET) Received: from lmecxl0912.lme.st.com (10.75.127.47) by SFHDAG3NODE2.st.com (10.75.127.8) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 19 Feb 2020 14:07:23 +0100 Subject: Re: [PATCH v2 1/2] irqchip/stm32: Add irq retrigger support To: Marc Zyngier CC: Thomas Gleixner , Jason Cooper , Linus Walleij , , , , References: <20200218131218.10789-1-alexandre.torgue@st.com> <20200218131218.10789-2-alexandre.torgue@st.com> <16d27f75-8157-7a92-ae61-b5b3ab05bdd9@st.com> <608d9c84813323ee3839f6ac21aa8f4e@kernel.org> From: Alexandre Torgue Message-ID: Date: Wed, 19 Feb 2020 14:07:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <608d9c84813323ee3839f6ac21aa8f4e@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-19_03:2020-02-19,2020-02-19 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/19/20 12:43 PM, Marc Zyngier wrote: > On 2020-02-19 11:33, Alexandre Torgue wrote: >> Fix Marc email address >> >> On 2/18/20 2:12 PM, Alexandre Torgue wrote: >>> This commit introduces retrigger support for stm32_ext_h chip. >>> It consists to rise the GIC interrupt mapped to an EXTI line. >>> >>> Signed-off-by: Alexandre Torgue >>> >>> diff --git a/drivers/irqchip/irq-stm32-exti.c >>> b/drivers/irqchip/irq-stm32-exti.c >>> index e00f2fa27f00..c971d115edb4 100644 >>> --- a/drivers/irqchip/irq-stm32-exti.c >>> +++ b/drivers/irqchip/irq-stm32-exti.c >>> @@ -604,12 +604,24 @@ static void stm32_exti_h_syscore_deinit(void) >>>       unregister_syscore_ops(&stm32_exti_h_syscore_ops); >>>   } >>>   +static int stm32_exti_h_retrigger(struct irq_data *d) >>> +{ >>> +    struct stm32_exti_chip_data *chip_data = >>> irq_data_get_irq_chip_data(d); >>> +    const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; >>> +    void __iomem *base = chip_data->host_data->base; >>> +    u32 mask = BIT(d->hwirq % IRQS_PER_BANK); >>> + >>> +    writel_relaxed(mask, base + stm32_bank->swier_ofst); >>> + >>> +    return irq_chip_retrigger_hierarchy(d); > > Calling irq_chip_retrigger_hierarchy here is really odd. If the write > above has the effect of making the interrupt pending again, why do you > need to force the retrigger any further? To be honest, as we use hierarchical irq_chip, I thought it was the way to follow (to retrigger parent irq_chip). It makes maybe no sens here. The most important to regenerate gic interrupt (associate to the exti line) is to write in SWIER register. Alex > >             M.