Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1475403ybg; Thu, 11 Jun 2020 10:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl7cvY1U9a8TI8TbFGaNCTrM6OTjleUKmlmzvyRvprkAMDPwJfXfSimSlNWj1JZtnL/CFI X-Received: by 2002:a50:af25:: with SMTP id g34mr8029496edd.85.1591897611847; Thu, 11 Jun 2020 10:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591897611; cv=none; d=google.com; s=arc-20160816; b=0gaflWRlkBkjy9Uq/Pk671Y/q9JNtIe7EBFZya5NbK7GrB+oiKPckCJX7UW3SXabK0 16wlagSlOCjnpmlLUikFT/pZWE1joIkXtcwWrL5t1PvdBgIXX6s8vL35Pn1gwqZmVkyC HdPZiL+QfHoz9ImbFhOIjyH612TNe11ZAMCIBWi1ykWo0hedg/ieD8WUwedTNVMpi+wT VJaJ9sJToF3ZUIrSqzpHipjV1J1H7FkR+oolex6speDWHRFd4dmuKpsSs4tnqLLiKx9b +Yy7NvKWR/FH2vxqKdSdPpkVAnWHRC8iJd62N/AeKgjG+XeKtwoPq62TBM9xqHLd/Jv1 VLMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=0UQpkSkjycSpzD/UOWSKnCj3CKcnNCyS9jvdaJ/jWjA=; b=ki9btlaCRZvBcZasv8DXNmJO2Buf3vmHM+CafTYOGzl71/I/t3cnYzN3MIn4ShqpYF ih5k3sRyxsbzqZz4JCyNiXLSDOY8eK4zj9a0P1hpOCraITNRKxBtUMClRgibf//GscO9 B2dB6nDFl0hdxqdD1MqOSJ+J3hZ++JW8GCrwxWCI/zX8qodoUZX36Zp6mOJGcZTWKXKs j40+ve0pj0EdofJAL9ffeDA6oe7XHdrlnBLW1zARbs2B2StaOKl/0k+MiizofEbSt/rQ YHPU2LvVqvBcUvY7nK4FtFVZx0dsGJ3wfoLaxKFvkhZBgJevgikctIoNe0EMAekk96bg HAcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hp7Wf3F9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si2301349ejs.458.2020.06.11.10.46.29; Thu, 11 Jun 2020 10:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hp7Wf3F9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728676AbgFKP7d (ORCPT + 99 others); Thu, 11 Jun 2020 11:59:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:48844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728626AbgFKP7d (ORCPT ); Thu, 11 Jun 2020 11:59:33 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89205206A4; Thu, 11 Jun 2020 15:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591891172; bh=962xtKWgTDEusfx1PTcBEzMlO7DbuFNlASZTgPgTJTM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hp7Wf3F9DcxzLsY1qM9fAmS0se0BjdmR22syK8qjVzgNs1mhp0NFx5ae/VnO06G9b XhA/V5PBd9bijIb2HlzE8a4DxF99OBmLlB1JMdLPGU+2lEufytOzGk3tXwg+CeNrID PSoJNDYTuIRysfEtk8+5iuKfPtgfLP2IxEPNHduc= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjPc3-0029nu-6W; Thu, 11 Jun 2020 16:59:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 11 Jun 2020 16:59:31 +0100 From: Marc Zyngier To: Bharat Kumar Gogada Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org Subject: Re: [PATCH v8 2/2] PCI: xilinx-cpm: Add Versal CPM Root Port driver In-Reply-To: References: <1591622338-22652-1-git-send-email-bharat.kumar.gogada@xilinx.com> <1591622338-22652-3-git-send-email-bharat.kumar.gogada@xilinx.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: <777c4abbbfcc99ddf968d2040bc86835@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: bharatku@xilinx.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-11 16:51, Bharat Kumar Gogada wrote: [...] >> > +/** >> > + * xilinx_cpm_pcie_init_port - Initialize hardware >> > + * @port: PCIe port information >> > + */ >> > +static void xilinx_cpm_pcie_init_port(struct xilinx_cpm_pcie_port >> > *port) >> > +{ >> > + if (cpm_pcie_link_up(port)) >> > + dev_info(port->dev, "PCIe Link is UP\n"); >> > + else >> > + dev_info(port->dev, "PCIe Link is DOWN\n"); >> > + >> > + /* Disable all interrupts */ >> > + pcie_write(port, ~XILINX_CPM_PCIE_IDR_ALL_MASK, >> > + XILINX_CPM_PCIE_REG_IMR); >> > + >> > + /* Clear pending interrupts */ >> > + pcie_write(port, pcie_read(port, XILINX_CPM_PCIE_REG_IDR) & >> > + XILINX_CPM_PCIE_IMR_ALL_MASK, >> > + XILINX_CPM_PCIE_REG_IDR); >> > + >> > + /* Enable all interrupts */ >> > + pcie_write(port, XILINX_CPM_PCIE_IMR_ALL_MASK, >> > + XILINX_CPM_PCIE_REG_IMR); >> > + pcie_write(port, XILINX_CPM_PCIE_IDRN_MASK, >> > + XILINX_CPM_PCIE_REG_IDRN_MASK); >> >> No. I've explained in the previous review why this was a terrible >> thing to do, >> and my patch got rid of it for a good reason. >> >> If the mask/unmask calls do not work, please explain what is wrong, >> and let's >> fix them. But we DO NOT enable interrupts outside of an irqchip >> callback, full >> stop. > The issue here is, we do not have any other register to enable > interrupts for above > events, in order to see an interrupt assert for these events, the > respective mask bits > shall be set to 1. I still disagree, because you're not explaining anything. We enable the interrupts as they are requested already (that's why we write to the these register in the respective mask/unmask callbacks). Why do you need to enable them ahead of the request? M. -- Jazz is not dead. It just smells funny...