From patchwork Wed Jan 8 22:41:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sultan Alsawaf X-Patchwork-Id: 1220018 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47tPQ06HChz9sRG; Thu, 9 Jan 2020 09:42:16 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ipK1h-0005Tc-Aq; Wed, 08 Jan 2020 22:42:09 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ipK1f-0005TU-Kz for kernel-team@lists.ubuntu.com; Wed, 08 Jan 2020 22:42:07 +0000 Received: from mail-pl1-f200.google.com ([209.85.214.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ipK0g-0002p0-Ax for kernel-team@lists.ubuntu.com; Wed, 08 Jan 2020 22:41:06 +0000 Received: by mail-pl1-f200.google.com with SMTP id t17so2371585ply.5 for ; Wed, 08 Jan 2020 14:41:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jnkAz9LI0VhqiSuejm/8OQldNh2rguuFDPe8AAqK8Uo=; b=Ytxu6sL5AO4p/lMkdMl+edjq+V3ZqsqYT2QnFchjaVQkrOjLNMlFpGpl59aSS/ZSgy 6siAOw6lmPFCtaX48ogghQoOo2PGU96AOVQZrTre1gIZG3P4r8/XnKH9JUEez5oPwMTC 6+un2JkqGzx3PTiNFvpEeytkh30pRMSjvk83+ma8hhOvS3b41ydQeQRLV1D3n4ldVGLF jXl8BPsw109AIWvNy+NS3xNlkh/vpZkvoSNwonyrZJ4oTaevRa6QfJZzNEdbK5XBQKLW FHASHbb0d6Tjv3wjDT3KhEsNTS1Ym0UTXNFizvkpkZpdH/QfPhlmwhOdXf9wnYXIt3VF nPTQ== X-Gm-Message-State: APjAAAVTr1uS2yQiK5Um3caBxTyv4ime3nYTA7nlSIwOufGn+RBpnqIw SnLMw35tB2RSaN9wyd/N8RAT2gKNcWst1oPo7IMqd5NBcoVuQ9hVdfJEYnemyaXAF9N9ewujFyv /PKMLvQ5L8fnQoC+kj4K8lJJ5/CMwOmPyhuskLdZj0w== X-Received: by 2002:a63:3d8e:: with SMTP id k136mr7685419pga.4.1578523264694; Wed, 08 Jan 2020 14:41:04 -0800 (PST) X-Google-Smtp-Source: APXvYqw9vvMweZQcD4kPucn8EtqcQ6JUi6Rgb8QAW3pZ9pIwKG0Bx2pvo0RKTxJhrqIXjWqtYIlZEA== X-Received: by 2002:a63:3d8e:: with SMTP id k136mr7685401pga.4.1578523264425; Wed, 08 Jan 2020 14:41:04 -0800 (PST) Received: from sultan-box.conference ([104.200.129.62]) by smtp.gmail.com with ESMTPSA id h26sm5262624pfr.9.2020.01.08.14.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 14:41:04 -0800 (PST) From: Sultan Alsawaf To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: irqchip/gic-v3-its: Don't return errors in its_irq_domain_activate() Date: Wed, 8 Jan 2020 14:41:02 -0800 Message-Id: <20200108224102.18932-2-sultan.alsawaf@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200108224102.18932-1-sultan.alsawaf@canonical.com> References: <20200108224102.18932-1-sultan.alsawaf@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1857074 Commit bb9b428a5c83 ("genirq/irqdomain: Allow irq_domain_activate_irq() to fail") added error handling for when irq domain activation would fail. However, our irqchip driver was not written with the intention of handling domain activation failure. When an irqchip's domain activation function fails, __irq_domain_activate_irq() in kernel/irq/irqdomain.c parses the error and disables the parent irq domain in response. This is not what was intended to happen for ITS_FLAGS_WORKAROUND_CAVIUM_23144, which leaves IRQs erroneously disabled on some CPUs. There is no legitimate failure case for its_irq_domain_activate(), so we don't need to subscribe to __irq_domain_activate_irq()'s error handling, and the current state of the driver cannot cope with the error handling anyway. To that end, always return 0 from its_irq_domain_activate() so that IRQs aren't erroneously disabled for machines with ITS_FLAGS_WORKAROUND_CAVIUM_23144. Signed-off-by: Sultan Alsawaf Acked-by: Marcelo Henrique Cerri Acked-by: Connor Kuehl --- drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 5cc27ad2abd1..67386413b907 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -2407,7 +2407,7 @@ static int its_irq_domain_activate(struct irq_domain *domain, cpu = cpumask_first_and(cpu_mask, cpu_online_mask); if (cpu >= nr_cpu_ids) { if (its_dev->its->flags & ITS_FLAGS_WORKAROUND_CAVIUM_23144) - return -EINVAL; + return 0; cpu = cpumask_first(cpu_online_mask); }