From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FF7436C for ; Wed, 6 Nov 2024 00:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730851608; cv=none; b=ZEZa2HBw79M37/sNfIuiPAjMZYQQx/oJo1+wEPMgOGTnXQMwu7wW79eiwWQ5Jd2e7iTqNeGmDHsRgms6kIIwGd/7GZ+zbNhoJcMFBZXufY1gCKsK1Xlin6SUlH8W9aHEFEG74QELZzlrHdDiG3oNKK3gvpOhZ/beWOOjIun+48Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730851608; c=relaxed/simple; bh=+iJID/0K/KasOwTpLpR4XJKYN4rMSxO66SLic9HxW6o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=On8ZF6+O0NtivW0UVNe7U/3JQyYfhLBe6jr76+/gtKz9h5STlzKkY73I/a2uHAVhNsSYA2hFHE5twzi+LX9GGAEc8VGYV98jh0ENDMOKIEpVVKLjdF3wfylG20Fy3Fh2eQu4G1UPpFGZWEuD5uTKnxflfAw3vJesQbdqcY2ljgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=baylibre.com; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7ee11ff7210so4328248a12.1 for ; Tue, 05 Nov 2024 16:06:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730851606; x=1731456406; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Gpxbqm68LJQ46p8jy6SSwPvqm4guZpDNWNtKHjTy7tU=; b=qv00mAS+ZndMmf6dtYN2iYMtwew/6hZLF50yrnTJUaVrG1C3anUiF43vM+LOkbWV5w kKffxXi8VTm5MQnsJ14Z54UiNWlumUmRbYjNQkKREOJIyfcw1y7+XSrPMcLBLi6p2299 TxOfw3j+20eUfzua9TBkCOtEUZAbZG9Op31aHBnF74MGweHiiSzQEPzfidKzbsc+kQtC ejt4Vi7GwwsiMSLShNoLcbNgh2ojRzA8qACteMUcktN83Sy9D2FnTbINuz4mYBpEleaY 5Mw51iLy9172U1ScIYmnqMOaZrAU9MvBVCpj/+ID4L5o83fo9drsrjSlIUMmV/GDfORc 1GfQ== X-Forwarded-Encrypted: i=1; AJvYcCXXs/+ZK28s8Z3gweS3nvOQvvP5kXa61XxKjrK5QZuRC2LC7V0c+PlxHfutbJSFYAQ9ygn7dbLBJy07hcE=@vger.kernel.org X-Gm-Message-State: AOJu0Yyenj6sN2FCKzJtuP+6KSiCawhFIT0esYRYP3R4ukKhoj7BRBEt wwgQxKSS19dug+H+TwLKmIpNKDMQmdw1hiQCUp9FI2vP72XYCtkudJFV+D+TOb8= X-Google-Smtp-Source: AGHT+IE9eRsulH8cpjXGO7rVfrMbZI2XkHJeWXdq3TUXvQidK4aPFSF5njxwl9FhW4xyLO1oH9euXw== X-Received: by 2002:a17:90b:5448:b0:2e2:e8a9:a1f with SMTP id 98e67ed59e1d1-2e94c2c30famr26322573a91.13.1730851605690; Tue, 05 Nov 2024 16:06:45 -0800 (PST) Received: from localhost ([97.126.177.194]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e99a584e68sm129403a91.32.2024.11.05.16.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 16:06:45 -0800 (PST) From: Kevin Hilman To: Bin Liu , Judith Mendez Cc: Santosh Shilimkar , Linus Walleij , Bartosz Golaszewski , linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v2] gpio: omap: Add omap_gpio_disable/enable_irq calls In-Reply-To: <20241105190005.cg6dpeedbirgflqm@iaqt7> References: <20241031145652.342696-1-jm@ti.com> <7h5xp7owmy.fsf@baylibre.com> <520c7e6b-f9c0-441f-8810-8e5ede668f6a@ti.com> <20241105190005.cg6dpeedbirgflqm@iaqt7> Date: Tue, 05 Nov 2024 16:06:44 -0800 Message-ID: <7hy11xjkdn.fsf@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Bin Liu writes: > On Tue, Nov 05, 2024 at 12:47:58PM -0600, Judith Mendez wrote: >> Hi Kevin, >> >> On 11/1/24 9:29 AM, Kevin Hilman wrote: >> > Hi Judith, >> > >> > Judith Mendez writes: >> > >> > > From: Bin Liu >> > > >> > > Add omap_gpio_disable_irq and omap_gpio_enable_irq >> > > calls in gpio-omap. >> > > >> > > Currently, kernel cannot disable gpio interrupts in >> > > case of a irq storm, so add omap_gpio_disable/enable_irq >> > > so that interrupts can be disabled/enabled. >> > > >> > > Signed-off-by: Bin Liu >> > > [Judith: Add commit message] >> > > Signed-off-by: Judith Mendez >> > >> > Thanks for this patch. Can you give a bit more context on the >> > problem(s) this solves and on which SoCs/platforms it was >> > developed/validated? >> >> Sorry for the late response. Patch was tested/developed on am335x >> device BBB, If you feed a PWM signal at 200KHz frequency to >> GPIO, and execute gpiomon 0 12 &, Linux will be unresponsive >> even after CTRL+C without these 2 functions in this patch. Once >> this patch is applied, you can get console back after hitting >> CTRL+C and then proceed to kill gpiomon. > > In addtion to Judith's explanation, when the PWM is applied to a GPIO > pin, kernel detects the interrupt storm and disables the irq, however, > without these callbacks, this gpio platform driver doesn't really > disable the interrupt in the gpio controller, so the interrupt storm is > still happening and handled by this gpio controller driver then causes > Linux unresponsive. Excellent! Thank you both for the detailed explanations. Kevin