From patchwork Mon Sep 21 15:47:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 53970 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id C3AFD22B04 for ; Mon, 21 Sep 2015 15:48:29 +0000 (UTC) Received: by wisv5 with SMTP id v5sf32846047wis.0 for ; Mon, 21 Sep 2015 08:48:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=6J/Hb1m08HmcNTDu3RGK/37n6cARO61p5OnQsGENACU=; b=KjsFJ4hBUxDdLsyqKNCKdjc7mgMORU4xBk8+EeYeMiorZPq+3l3Y+RVcGaP4rhJ8q6 NELXrfzlC0iv42EvfjnLuo8gxV2P/FtjRjB34bK8d2JRbaLomQNEN4a+8b6l2bc9bgKC D6iMM+v2l8X9MPt2rVYwlutNnQQFVbtPsTSC8Kbv7hxqqGFB1Urogcwr08vISYnhBkiL SvLG3Kp5EFyhMrcSgBbQRhNYfQif0A0ed8XUhiPpPvxVE33dvvGBPdzutxLf/7+DGiNQ G7Tl4bnMoq7bxUvzHheR+tiZ+YnpMDSzGK+BmhnewgY2Tt9J0waUC/5qi3xn/6QKWtH7 SBYQ== X-Gm-Message-State: ALoCoQn4BC1+KqrDCSZqDPqQnCEP2JVybt+a5yhmUZBEyvIH1vJu0KVyLlwsAaE9U+WUo3ncXziL X-Received: by 10.180.188.211 with SMTP id gc19mr2201511wic.6.1442850509123; Mon, 21 Sep 2015 08:48:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.42 with SMTP id g10ls550683lah.91.gmail; Mon, 21 Sep 2015 08:48:28 -0700 (PDT) X-Received: by 10.152.237.1 with SMTP id uy1mr2342814lac.33.1442850508931; Mon, 21 Sep 2015 08:48:28 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id jh9si16426807lbc.54.2015.09.21.08.48.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 08:48:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lagj9 with SMTP id j9so71236039lag.2 for ; Mon, 21 Sep 2015 08:48:28 -0700 (PDT) X-Received: by 10.25.145.132 with SMTP id t126mr1535640lfd.88.1442850508789; Mon, 21 Sep 2015 08:48:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1784200lbq; Mon, 21 Sep 2015 08:48:27 -0700 (PDT) X-Received: by 10.68.181.130 with SMTP id dw2mr25836467pbc.70.1442850504617; Mon, 21 Sep 2015 08:48:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd6si38668670pad.84.2015.09.21.08.48.24; Mon, 21 Sep 2015 08:48:24 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932676AbbIUPsN (ORCPT + 30 others); Mon, 21 Sep 2015 11:48:13 -0400 Received: from foss.arm.com ([217.140.101.70]:53998 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932476AbbIUPsK (ORCPT ); Mon, 21 Sep 2015 11:48:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AF749539; Mon, 21 Sep 2015 08:48:14 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4EF443F2E5; Mon, 21 Sep 2015 08:48:08 -0700 (PDT) From: Sudeep Holla To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Thomas Gleixner , "Rafael J. Wysocki" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , Hongtao Jia , Marc Zyngier , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake Date: Mon, 21 Sep 2015 16:47:00 +0100 Message-Id: <1442850433-5903-5-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag as it doesn't guarantee wakeup for that interrupt. This patch removes the redundant mpic_irq_set_wake and sets the IRQCHIP_SKIP_SET_WAKE for only FSL MPIC. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Scott Wood Cc: Hongtao Jia Cc: Marc Zyngier Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Sudeep Holla Acked-by: Scott Wood --- arch/powerpc/sysdev/mpic.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 537e5db85a06..123e43612f0a 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) return IRQ_SET_MASK_OK_NOCOPY; } -static int mpic_irq_set_wake(struct irq_data *d, unsigned int on) -{ - struct irq_desc *desc = container_of(d, struct irq_desc, irq_data); - struct mpic *mpic = mpic_from_irq_data(d); - - if (!(mpic->flags & MPIC_FSL)) - return -ENXIO; - - if (on) - desc->action->flags |= IRQF_NO_SUSPEND; - else - desc->action->flags &= ~IRQF_NO_SUSPEND; - - return 0; -} - void mpic_set_vector(unsigned int virq, unsigned int vector) { struct mpic *mpic = mpic_from_irq(virq); @@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = { .irq_unmask = mpic_unmask_irq, .irq_eoi = mpic_end_irq, .irq_set_type = mpic_set_irq_type, - .irq_set_wake = mpic_irq_set_wake, }; #ifdef CONFIG_SMP @@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = { .irq_mask = mpic_mask_tm, .irq_unmask = mpic_unmask_tm, .irq_eoi = mpic_end_irq, - .irq_set_wake = mpic_irq_set_wake, }; #ifdef CONFIG_MPIC_U3_HT_IRQS @@ -1283,8 +1265,11 @@ struct mpic * __init mpic_alloc(struct device_node *node, flags |= MPIC_NO_RESET; if (of_get_property(node, "single-cpu-affinity", NULL)) flags |= MPIC_SINGLE_DEST_CPU; - if (of_device_is_compatible(node, "fsl,mpic")) + if (of_device_is_compatible(node, "fsl,mpic")) { flags |= MPIC_FSL | MPIC_LARGE_VECTORS; + mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE; + mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE; + } mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL); if (mpic == NULL)