Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7570917imu; Fri, 28 Dec 2018 00:31:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ubiHc5uDApsV8qvyw/X6WyRl4HllAGSTMvlJnLsy5a9GQZ6j0W77xvYCCmDC4yIA++0kS X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr26645924plr.56.1545985910827; Fri, 28 Dec 2018 00:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545985910; cv=none; d=google.com; s=arc-20160816; b=CT1WoTRTuX3v5qmY9aGs9Miv8ycIhJwwgmSZZzlpBPRdN//lOtG7IFx6HtKGPLaTBv lf53tfaMYIq6z+u1uUloZuoJ/q2p+FVqsW0NuQXPtW1BJ3uuFEnO9OHgfinyJBp+AngD lgwGS4hGVclc+oaFjiuY2+Nf9bqJo1XEJ/mqblMqG69sZsyH5jwYacOGJB2P4YiT47FD 90SL4CYQdeVfZ+GF+HBGHe1lTPTCgYoixSJ5gqHwm8tYM/xShVk/+4z51HC2Q1xUgbIc enZgCieQus68aWMuuyOs1hWvUPQwhrtJvzhacyzx8s0uOOrbZhdIqzQYMAS1kgIZ5FrN X7qQ== 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:mime-version :user-agent:date:cc:to:from:subject:message-id:dkim-signature; bh=fLELQD4JXgCT/r0PIvOYlrh7WN5Faf5K04yz+v20rAE=; b=Z9rCcOGBJbOx/ve8wlzLOfeM/3VZ15YO+LP33/t1kVld5fpHlz9uW8ZmTsJSt5MA2P j4qcJYdPVYUWxjNVPy5px76r87Sctu/FfLXDh+PDGaLQQPFUMM7i7zxNTvDoBLTH3Nym 4rQz2ZKYQl8WhkF+sEsTkiAVJFfUSzTaGxY+nWhW/dULb1H2Pa0ubIh9f5Hu/vbPrIE9 SZ0dGi516uZzC3snp0xW+jNSfW12n416s3K9nUylpkCphg9yNdujZ9kAwP/KtXSGsVkN S3shNqkBkSl7gp2X5bu7X450vBOAClNGi9HpSbTPWS0vpLFShym304dxqHDsXCLsurez R4Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CZ3rid4O; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si37988366pgq.535.2018.12.28.00.31.36; Fri, 28 Dec 2018 00:31:50 -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=@gmail.com header.s=20161025 header.b=CZ3rid4O; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731291AbeL0XCY (ORCPT + 99 others); Thu, 27 Dec 2018 18:02:24 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41214 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729108AbeL0XCY (ORCPT ); Thu, 27 Dec 2018 18:02:24 -0500 Received: by mail-wr1-f65.google.com with SMTP id x10so19521399wrs.8; Thu, 27 Dec 2018 15:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:user-agent:mime-version :content-transfer-encoding; bh=fLELQD4JXgCT/r0PIvOYlrh7WN5Faf5K04yz+v20rAE=; b=CZ3rid4Ow9qubxqL1wUT3OQhJ5BNlYIXwGl4Gfr64dck6K01TArGZfB6TWsePt+JCU CGQ1q6583w/XEp44Y8xyP6sHpifIjG+mdPNmPLVPMTLBct1y3Cb+tvciJ+7MVB80rsRJ aFXkw32wVST5VMJLzAabxZffQSuFQncQwxFbu/peoYnXiUoj2det0vnx3+AIr67ZPoPy Gj9y9En6W2GZw7pu58WUeHUqNvTQsfDSpcJoEUk83lBIFVI1vbQXuPxxCyWNH5MKsohZ FEJpzMBmy23rzWvb8ESDesYeQL9X/5gnYLtEw0zHY4PnXqPnLECQg3TBsEEi8Cf9vQXJ g8PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:user-agent :mime-version:content-transfer-encoding; bh=fLELQD4JXgCT/r0PIvOYlrh7WN5Faf5K04yz+v20rAE=; b=fm4MuAiRKhjAqSawirB2zf//HCoIDikN/j+4gCJnhclm/FH3G3SGroxP6WQd/6zu3u zlc+jvj3fNncG/wlQSe2pwAOUWYwjjSYgRmntZqTiLWFGRYNBhhrtPENUzI2QUxXR1Kv wpqZEVWH/vk68q4b2gQV2BioITb/U7UkMYcfqdSPRKqB6YhF5P3Wday/c6i9+ezeBF1c A8xYJdqvL3wWg3z+odff456PNDfaDgvw4JGa1Fm+UUuTkgSOsxfQ4act19gye5/WKAzn mdMdmLDOsvnAa3XoNMaQU+jdCrJA3DYtmLuFTtmT9MDduV1ZDzFZnRB8PuMLAFaOa201 I6Ag== X-Gm-Message-State: AJcUukcZrN2BbQ4yxehyNUgFjzk0XJZ3+zfHV9eGmc/XvaOnQhqBOFJq Ox16Z9dGVz74WP9z0VJeCmw= X-Received: by 2002:adf:82a4:: with SMTP id 33mr22184511wrc.252.1545951742282; Thu, 27 Dec 2018 15:02:22 -0800 (PST) Received: from festbox ([85.204.4.237]) by smtp.googlemail.com with ESMTPSA id k135sm49209322wmd.42.2018.12.27.15.02.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 15:02:21 -0800 (PST) Message-ID: <4085fc648ff5086bd6e6237d74d2a11e945a617b.camel@gmail.com> Subject: Interrupt storm from pinctrl-amd on Acer AN515-42 From: Leonard Crestez To: Daniel Kurtz , Thomas Gleixner , Nehal Shah , Shyam Sundar S K Cc: Linus Walleij , Daniel Drake , Nitesh Kumar Agrawal , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hans de Goede Date: Fri, 28 Dec 2018 01:02:19 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, My Acer Nitro 5 AN515-42 laptop with a Ryzen 2700U hangs on boot with recent kernel on an interrupt storm from pinctrl-amd. Older kernels work but this seems to be because this module was disabled by default. I tried to copy over old driver from 4.9 but it still experiences same issue. Digging a little deeper it seems the touchpad interrupt is active on boot and since it's configured as "level" and no touchpad driver is available yet there does not seem to be any way to clear it. I don't know how this should be handled, booting with an active enabled but unclearable interrupt seems like a platform bug to me. There is even an option to set touchpad to "basic" which does some sort of ps2 emulation but the IRQ issue still happens! One workaround is to explicitly disable the interrupt from the handler if no mapping is found; this will keep it disabled until amd_gpio_irq_set_type is called later. --- drivers/pinctrl/pinctrl-amd.c +++ drivers/pinctrl/pinctrl-amd.c @@ -567,22 +567,27 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id) regval = readl(regs + i); if (!(regval & PIN_IRQ_PENDING) || !(regval & BIT(INTERRUPT_MASK_OFF))) continue; irq = irq_find_mapping(gc->irq.domain, irqnr + i); - generic_handle_irq(irq); + if (irq) { + generic_handle_irq(irq); + ret = IRQ_HANDLED; + } /* Clear interrupt. * We must read the pin register again, in case the * value was changed while executing * generic_handle_irq() above. */ raw_spin_lock_irqsave(&gpio_dev->lock, flags); regval = readl(regs + i); + /* Disable if pending but unmapped */ + if (!irq && (regval & PIN_IRQ_PENDING)) + regval &= ~BIT(INTERRUPT_ENABLE_OFF); writel(regval, regs + i); raw_spin_unlock_irqrestore(&gpio_dev->lock, flags); - ret = IRQ_HANDLED; } } /* Signal EOI to the GPIO unit */ When in "i2c mode" the touchpad has an ACPI hid "ELAN0504", there are many similar compatibe hids in elan_i2c driver and if I add this one it probes successfully and handles irqs but fails to report input (i2c read data is invalid). Same laptop experiences some severe p-state throttling issues so there are many things wrong here. Let me know if you want more version info or ACPI dumps. -- Regards, Leonard