From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7687C001DE for ; Mon, 31 Jul 2023 23:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qTcl2GRbHUAVwINDuDk+i5l6LiUzEw9VyerGIJA/xBg=; b=WLQl0gv/IzScSD +XCP1mAfJrExpKzMh13mLSHDvjTiaCqK2fKi62uFPIwQgUdsKLRlzz8vRZdi4C2mY9Ut7qee8yzOL rm4HubzXsZ/k2VaL1/YvQvEue/dEa6FnJXrhwYE+rGM6YSiMoY8Sy7UwQDSo92c+nRaFguXASeCyk jd7ogc7uDNNrC4jOQLF8wUosFTxfKGYZTiKCNX0GPp69eTDQeho3Ov5I2MeeHSni0SsxJFAUa2ECK aKIl/gaZ4jdq9jq3LI+VkPA84S5dDdyJ7monYKd79xR4TJATQLeFPUhH++qh32JaZbGLhnndLE/as pjYhEMoPd2BccHFAxmHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQcOW-00HZgL-03; Mon, 31 Jul 2023 23:33:44 +0000 Received: from mail-mw2nam04on20626.outbound.protection.outlook.com ([2a01:111:f400:7e8c::626] helo=NAM04-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQcOS-00HZfm-2s for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 23:33:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f5PMQ7KEbJDYnQf+J7U/uFwcKYBNtiGjivVEc/ZbyMjKr9OD2CC+dzYzm9lg988z8IsdON+ZsK97gCxybrHrGUWJMP8Tpye/thekqfgC4bmF41JLry6yYzMnm04xd204fDbHoTkxBMCKo3YEmu4vh9gPw+k0hbfsWSxPjbD6aNjsEe1BPvQM0dG2iJQx0ImGdGGn/XJxYJtFCIlubqD/zjRzF/33gg3pZg5g06nyWIJA159/wxcyXv+pjV8VctyQtxuYTdsHkf25+Q05D4Gq0wAFFdOjcRabKLJZp6BMo802OWjRt1tiB8k8PfsVOa4+piqqWYrUcSeUsShpJ2nkpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=00ut3Ve806cVSbiC5dWkGa4Es61yiODNHY/PLp2FdoI=; b=FYof+fsUuPhU+FsUtVgbdXFEIiZkLGpEr/6N5615wcy1sl0oH+6KqzolX/GANtpIMMOXIKnnY+POliRbqHkvYk8BMjdxIjdP4hl+cu/z4sZf/0SXrMpWc+IdDJGeUa93eBO4+HW1HuXDd6zAxsy+kUfeiZUjT6A/7ZQy7lzYESblznqJDsf3iycWaVNV4mMaJSF+f4Ko8rLiEiqjKmq+7lVtxOB+Ad0omelDJFTK0+pqwK9on3YAmzwsXOETNFnakkcQ0XYYJc/2dIBB+bhI1PndPXuiDiryiQYbz2+NwreTyAlp2zcN9lc0pNGF2EhP8TS5xan/qFq2YGGtaKzAGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=00ut3Ve806cVSbiC5dWkGa4Es61yiODNHY/PLp2FdoI=; b=thw6IquCwA4gPx0L+dTRKySbg6gozASgdNOO7P4sUBYcEtMvuWz2xa2sArtNlKG0441AC2tNdtrhowfm3QY0PIEqIuLLoCBsvKfFtZyh/tz88VW7/D8B1FwOfONKiHegk7H2t5sAIjH2655NAR4Au4sDqk/zSG7Yu5xpIrwPKJQ= Received: from CY5PR10CA0015.namprd10.prod.outlook.com (2603:10b6:930:1c::34) by MN2PR12MB4518.namprd12.prod.outlook.com (2603:10b6:208:266::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.43; Mon, 31 Jul 2023 23:33:30 +0000 Received: from CY4PEPF0000EE33.namprd05.prod.outlook.com (2603:10b6:930:1c:cafe::c4) by CY5PR10CA0015.outlook.office365.com (2603:10b6:930:1c::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Mon, 31 Jul 2023 23:33:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE33.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.29 via Frontend Transport; Mon, 31 Jul 2023 23:33:29 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 18:33:28 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 16:33:28 -0700 Received: from [172.19.74.144] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Mon, 31 Jul 2023 18:33:27 -0500 Message-ID: Date: Mon, 31 Jul 2023 16:33:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/4] dmaengine: xilinx: xdma: Fix interrupt vector setting Content-Language: en-US To: Miquel Raynal , Brian Xu , Raj Kumar Rampelli , Vinod Koul CC: Michal Simek , Max Zhen , "Sonal Santan" , , , Thomas Petazzoni , References: <20230731101442.792514-1-miquel.raynal@bootlin.com> <20230731101442.792514-2-miquel.raynal@bootlin.com> From: Lizhi Hou In-Reply-To: <20230731101442.792514-2-miquel.raynal@bootlin.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE33:EE_|MN2PR12MB4518:EE_ X-MS-Office365-Filtering-Correlation-Id: ab485e12-1509-4100-94fd-08db921e8b91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ewGLmgx2tihCIzg+j+DNtDWHeUoTNvVbeGNeBNXxna9xmkGMnPSYpkJeI53eTMiMB52GPNzaVjgfvrvDnWqKdG2E4hhYTvOyDFCSVVhMEaoV2P+u/6qZIq6fOODprVnnpPc7J2oNC33a06uZgxCD9lPI3gYux1xUt3mALTb9k6WkGuMuHT6W+l9S9X5Mf75vszoRDjMh9MevYLm8MFxdrKXYaELE+HA64z7DCSpcGzQOTy/lFE9m3Br2WEgnAp+UkY4Z2puQ1RVZ8bgM5Qp6oMv76UvLsUNU2okYRXg/Mi+EoV+NOaxLIyLVrqFgrywvrsc4FBU1aW8flPY3pvw3stu2+ooeqNk27HBkS0cr+gghKOssNUHHIrtI3FT7rWwCnMqNuKl5BVFAR0vw0rxU97ri2FqRhln4S0EoDq9+S0etlabqcVC8BrlZ6CPK+AXidF+X6v+lu4CcSNT8DM0sgaFgFm+FLsjiT+j7Ed7Nmjudw90GkecPAZHtnWUfiqg1WXE9/t8AMQhX+/BCOC0aFxeQj+fgEPqoxBZtW/H0uh5bFXCDknYxSmlV9AGLXVe6JH1UxeLXkEig01q9bByC/3C5fhwNbifjdEVjQreRy7u5GglPtLvciRh44AMVw9Y+tp/DZ1loZQWDgEjiMacEo9WcaZJ8d0uIwSqiXhZA/41NusxHlQxus3yFDjrhlm4orAvIq4bbBgoA3H6tRgwF6aOgWxj7ZgyqHlVLjVRz6a+dzAUHHTgk+8IY//TUOGxq8ACXLc1QGS+ZJ24wdQLdet793Ej2jDOuajITPxh701u/HWExas7oxUbsj12P8Zqw X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(396003)(376002)(136003)(82310400008)(451199021)(36840700001)(46966006)(40470700004)(44832011)(47076005)(36860700001)(36756003)(53546011)(40480700001)(2616005)(40460700003)(26005)(83380400001)(336012)(186003)(426003)(70586007)(70206006)(41300700001)(81166007)(356005)(54906003)(82740400003)(110136005)(31696002)(86362001)(316002)(16576012)(4326008)(5660300002)(8936002)(8676002)(31686004)(2906002)(478600001)(43740500002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2023 23:33:29.0211 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab485e12-1509-4100-94fd-08db921e8b91 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE33.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4518 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_163340_956336_B6130E42 X-CRM114-Status: GOOD ( 19.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/31/23 03:14, Miquel Raynal wrote: > A couple of hardware registers need to be set to reflect which > interrupts have been allocated to the device. Each register is 32-bit > wide and can receive four 8-bit values. If we provide any other interrupt > number than four, the irq_num variable will never be 0 within the while > check and the while block will loop forever. > > There is an easy way to prevent this: just break the for loop > when we reach "irq_num == 0", which anyway means all interrupts have > been processed. > > Cc: stable@vger.kernel.org > Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver") > Signed-off-by: Miquel Raynal > --- > drivers/dma/xilinx/xdma.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c > index 93ee298d52b8..359123526dd0 100644 > --- a/drivers/dma/xilinx/xdma.c > +++ b/drivers/dma/xilinx/xdma.c > @@ -668,6 +668,8 @@ static int xdma_set_vector_reg(struct xdma_device *xdev, u32 vec_tbl_start, > val |= irq_start << shift; > irq_start++; > irq_num--; > + if (!irq_num) > + break; Thanks for fixing this. Acked-by: Lizhi Hou Lizhi > } > > /* write IRQ register */ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel