From patchwork Mon Nov 11 18:27:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179108 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7028175ilf; Mon, 11 Nov 2019 10:35:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyWuKJAZtRgOJ2jFz2F7DYj+3VdB7BN1YqQM/x5ZIGWezzFLW82EzsxF/HVcKYFjfVMgqbS X-Received: by 2002:aa7:c493:: with SMTP id m19mr28202961edq.39.1573497355331; Mon, 11 Nov 2019 10:35:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573497355; cv=none; d=google.com; s=arc-20160816; b=B1aUseJhCILX8eQ1k50aEBy/OQ78P+3VNk+sF07hIoSBrgK6kDciBcDYId+S27bK0O GB2/kiRgVpSYsw8WtCLO7a1pbiqmVcUm3KrGgzvMAcPzKu77sxuxQl4+Hag1WeRYBj1m VAcb0Tn7Y6BNmWlSe0jrObxtpZ00pBQBZhyk7L6fuyXxSeLkCnKvWaiCFbWxZ8UPIi7g zkHrlBiJgn7BeVY7m3J4J59W6vV8ateZySe6Mxdm65afyQTvcIsoXfFPz0rB5YuIUpj6 /0iGyCNeAJq9Y0SoG4m0n1NOp2ZgOpBdQC+6R6Y5Kzg/fCc0ai7LHonL8CjL/tMClsAx DFUA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9ih/a4XkyWD6nf/8vltwWHG/Kuv2LbUlVtQTvfdTy+Y=; b=JfMCPoogTe5T03YkOeb8zugQrImq+CjvatHs2ldKZbr5amgf761VPkXAGenlQymUe6 XzdeWx7td8UR1qb7D5T7B+kTZvWYMsDi2YVbq/ubR2gWxhFYbysdxuWYLrIb9/xyykqS MC4tE2zDjO5hz5cW7MM1YA4ej7KBkxDlharUdJ7X8966TFuE0Jd4V15wxNB2yliL+q5h v/jMTIzz9PGNCm+WUhf3sdZjsa98aPW4lG3ORBPm0wJfmk3lyp00ZrJHvd9Hu2heEcKV bwK2PZzYSgBnFiX9yshSkfGQUv+Nq84C3x1Vyny5iSokeXb0rcun1Sg8DkNXS1YwGqTs NVvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yDfc0waT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23si10098727ejk.143.2019.11.11.10.35.55; Mon, 11 Nov 2019 10:35:55 -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=@kernel.org header.s=default header.b=yDfc0waT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbfKKSfx (ORCPT + 26 others); Mon, 11 Nov 2019 13:35:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:53838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728596AbfKKSft (ORCPT ); Mon, 11 Nov 2019 13:35:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 03D812196E; Mon, 11 Nov 2019 18:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497348; bh=DgOeGiA0kYlJ1pwptbjhYwSRiBmoHrCye0hH9BMijLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yDfc0waTE+mJ83/fjioNmFOwQvf60cCPnTLaLpk4RyaIlTJ3J8WQPjlXnxB4mqLGo KWnrmMBJxHfGWnlpGr4Mhn9ePDHq7L6d4pd/MCdU0VIzMh3hxJRe50xL+W/HJaVMhs mzeWMNqrnsck4LvKBTmvMxCisKugWI4zHTEI+Nw4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Steve Capper , John Stultz , Catalin Marinas Subject: [PATCH 4.14 023/105] arm64: Do not mask out PTE_RDONLY in pte_same() Date: Mon, 11 Nov 2019 19:27:53 +0100 Message-Id: <20191111181436.637567352@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181421.390326245@linuxfoundation.org> References: <20191111181421.390326245@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Catalin Marinas commit 6767df245f4736d0cf0c6fb7cf9cf94b27414245 upstream. Following commit 73e86cb03cf2 ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()"), the PTE_RDONLY bit is no longer managed by set_pte_at() but built into the PAGE_* attribute definitions. Consequently, pte_same() must include this bit when checking two PTEs for equality. Remove the arm64-specific pte_same() function, practically reverting commit 747a70e60b72 ("arm64: Fix copy-on-write referencing in HugeTLB") Fixes: 73e86cb03cf2 ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()") Cc: # 4.14.x- Cc: Will Deacon Cc: Steve Capper Reported-by: John Stultz Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/pgtable.h | 17 ----------------- 1 file changed, 17 deletions(-) --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -258,23 +258,6 @@ static inline void set_pte_at(struct mm_ set_pte(ptep, pte); } -#define __HAVE_ARCH_PTE_SAME -static inline int pte_same(pte_t pte_a, pte_t pte_b) -{ - pteval_t lhs, rhs; - - lhs = pte_val(pte_a); - rhs = pte_val(pte_b); - - if (pte_present(pte_a)) - lhs &= ~PTE_RDONLY; - - if (pte_present(pte_b)) - rhs &= ~PTE_RDONLY; - - return (lhs == rhs); -} - /* * Huge pte definitions. */ From patchwork Mon Nov 11 18:28:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179120 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7065125ilf; Mon, 11 Nov 2019 11:07:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxChnIxDMtSeFGUh02IP/0KIsALGHbWtxmCGlWxZfQYPV7Y0/BuEWk6qIsEw78pZ8c1grBQ X-Received: by 2002:a17:906:7051:: with SMTP id r17mr23500628ejj.155.1573499271452; Mon, 11 Nov 2019 11:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573499271; cv=none; d=google.com; s=arc-20160816; b=cMCiuvqkc5cbtX3moUHwC9/wQDqb75ehwEcSLPbxNC21Zj58JD3hNh8avGCkMz6iBD BUlT97lhb025b4KHV9HjiOJCEf/BWY2GEy3RE2CTXVXpuUfH4gU9mDekQocQkYF6FNMv QD/W3yy004YqgwszliFRvnlCB1iIVw77nSw1kiA1VoXgmeW3f5zZ4Gh7EHVUtCbnObdH uJzong82Zp7EMPqcapu1oJQv0cKlJI/3Qi97/pYQXcbG2ddaEmRMy883SYoEwgCcqFGx O14NVUebUPt5rqrnnYx9sCHWSwdTn1YNMsMxMdFqPh0UY0oiPO2uw4ovjqncLijneVMw mb4w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8QWhB3RV5b7bH2Nn8YXSHCymZWUlKKPs+dUhOqrCiy0=; b=v7WV93fwP3teFIBj1iToUyrLzHGd14nYmo59etX+eWq/zPNZri2Cnn55Ec6ctrdgOk kuVtDjJCRuDNPSOuGJ2QhKTKFmL5wgDM2Nj7arOgFUxpiVqaZHBBEjBuFRgrn3j48EkF zb+aXL190eFsCohjKznX+bcyKS7ge/0hHjvcmSR5/PJ6rQKRlw/8mg3vDhysVtYTxF2R mh1rzmBCgJm3P0+Ql1Iy02f/XX3BKH8ft245UqpB4Q1LMaFYFRH2UEQfnEu/a6SERRX7 5vf1vBLBRgQtyQQICU072RkiZk9c/n1tPvixGBztMHIf4lX2sjZFGhPncxkerrer7UW9 cp4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HieXN1De; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z26si9706222ejb.223.2019.11.11.11.07.51; Mon, 11 Nov 2019 11:07:51 -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=@kernel.org header.s=default header.b=HieXN1De; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728897AbfKKTHs (ORCPT + 26 others); Mon, 11 Nov 2019 14:07:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:55912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728169AbfKKShN (ORCPT ); Mon, 11 Nov 2019 13:37:13 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 C156521655; Mon, 11 Nov 2019 18:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497433; bh=LXXefkn7p8AQImuoepIaWvtbHVSn6+lPhVa3zsDkwBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HieXN1DeKkp7EcbMy49/wKEMuPLRqFWlwF308j8l1vZQDRxMatP7DHrz1jVz/+ugi UbHpUwMe8SKbW41vel/S7PJJrUeLpmdF2UU2X/U2K2Ml9R4hbMix4z2as1ohK7IPKd ex5p30Zd+BSUu4B8D+7pdbprYxskWkf5MUA4CY6I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Kishon Vijay Abraham I , Bjorn Helgaas , Mathieu Poirier Subject: [PATCH 4.14 053/105] misc: pci_endpoint_test: Fix BUG_ON error during pci_disable_msi() Date: Mon, 11 Nov 2019 19:28:23 +0100 Message-Id: <20191111181443.403909088@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181421.390326245@linuxfoundation.org> References: <20191111181421.390326245@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kishon Vijay Abraham I commit b7636e816adcb52bc96b6fb7bc9d141cbfd17ddb upstream pci_disable_msi() throws a Kernel BUG if the driver has successfully requested an IRQ and not released it. Fix it here by freeing IRQs before invoking pci_disable_msi(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- drivers/misc/pci_endpoint_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -92,6 +92,7 @@ struct pci_endpoint_test { void __iomem *bar[6]; struct completion irq_raised; int last_irq; + int num_irqs; /* mutex to protect the ioctls */ struct mutex mutex; struct miscdevice miscdev; @@ -514,6 +515,7 @@ static int pci_endpoint_test_probe(struc irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI); if (irq < 0) dev_err(dev, "failed to get MSI interrupts\n"); + test->num_irqs = irq; } err = devm_request_irq(dev, pdev->irq, pci_endpoint_test_irqhandler, @@ -581,6 +583,9 @@ err_iounmap: pci_iounmap(pdev, test->bar[bar]); } + for (i = 0; i < irq; i++) + devm_free_irq(dev, pdev->irq + i, test); + err_disable_msi: pci_disable_msi(pdev); pci_release_regions(pdev); @@ -594,6 +599,7 @@ err_disable_pdev: static void pci_endpoint_test_remove(struct pci_dev *pdev) { int id; + int i; enum pci_barno bar; struct pci_endpoint_test *test = pci_get_drvdata(pdev); struct miscdevice *misc_device = &test->miscdev; @@ -609,6 +615,8 @@ static void pci_endpoint_test_remove(str if (test->bar[bar]) pci_iounmap(pdev, test->bar[bar]); } + for (i = 0; i < test->num_irqs; i++) + devm_free_irq(&pdev->dev, pdev->irq + i, test); pci_disable_msi(pdev); pci_release_regions(pdev); pci_disable_device(pdev); From patchwork Mon Nov 11 18:28:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179109 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7029827ilf; Mon, 11 Nov 2019 10:37:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzsBLcESvuuJGwErcIVyGLMGcEO1TMuP8oADlw00//uti5Yce1fmbLkv9M8YG86ZgVMbmbh X-Received: by 2002:aa7:c695:: with SMTP id n21mr28192040edq.204.1573497443177; Mon, 11 Nov 2019 10:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573497443; cv=none; d=google.com; s=arc-20160816; b=t8UsNcg6B1doVkJ1E8GubS3ycZRgfPqaJrydcF3OoFtxrF/ZIIbH0YNeoF12ZZnwiy 0w4F7D7SN+x4btSuMyRSNvAd7s7xRJxFq9a4fZOcuAPXdC33m1iA2yQEL0Hgx8Lx+xhz OUWab6DihUGiwiEasu3XyYJrRwXpyJoiiBGxO0/xeMkFLvvT2UhgKZv9UawYpUC18Sxn 4eFRfaqBEq4E3S8HiDIlBK9wrPZeX78GF1CxyUVGDUnS24bNuLMQ5quKXKK/oflPtZqf ce3kj/+fb/VmaIhH7+UE/X3F2plCH43wDeGIc8R4POpjeOglarqOElYc/CpT8MMH1vVc kPQg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Aq6SN4Ha0kATsfz+g1RwOeKOrWWgigh6/rW5A3c86Y4=; b=vkUYC+iAnb+BDyKyMnziTvaVyHtniuTjm5/n/6dFdeMH3IFFJhIt7mhZIhCwFb5rvF jKLYMHK8A5t4A8xwxDirgKENw6uWmFNAZzfNl/Ng7trck51i6UfEwTpwOOpR9NkNjtCI eOqw4SyCbWxgqiAMUjH221uxpHtRaX20kyTYXDT1MtwJpdPKOUDQNhWfWi9xR81NCBvi MyU5zQa//fnQL8M9rYOw28630nK2C1gV436cZ8/haYsjmK7MDjBw8BMfrOINU21/B5un 9L0mQO31WVtBV7ZJU/hVP8CWRdRpmMrbEcMGu9coQucAuqiKEHOmSJwahPCBopR0dHwe GAFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pvsbFIkd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si9761716ejf.270.2019.11.11.10.37.22; Mon, 11 Nov 2019 10:37:23 -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=@kernel.org header.s=default header.b=pvsbFIkd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbfKKShV (ORCPT + 26 others); Mon, 11 Nov 2019 13:37:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:55946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728828AbfKKShR (ORCPT ); Mon, 11 Nov 2019 13:37:17 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DEA7B204FD; Mon, 11 Nov 2019 18:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573497436; bh=qQ5L4rfGHyWCFEcxEHYJAqF8P0ll5C/kHsoR9YbzQ1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pvsbFIkdQJ1k0jeuqUcch/lnrUDLFqTXIadVeMse7q1dK6kxA4XWqJLn0KUGhdFtK MILE9n1i54wTj+ZebmkOKlkv+c4kSlby36QibIKO32ZXQyhf8Dkl5Nn8wFT/lXxcTq ZQxLDjLOIX1KS0NGX8UikGj5NZIyXwBOoFk+hjls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Alexey Klimov , Sudeep Holla , Jassi Brar , Mathieu Poirier Subject: [PATCH 4.14 054/105] mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Date: Mon, 11 Nov 2019 19:28:24 +0100 Message-Id: <20191111181443.524703978@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111181421.390326245@linuxfoundation.org> References: <20191111181421.390326245@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla commit 33cd7123ac0ba5360656ae27db453de5b9aa711f upstream Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if the controller sets txdone_by_poll. However some clients can have a mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone. However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that case. In such scenario, we may end up with below warnings as the tx ticker is run both by mailbox framework and the client. WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 #242 Hardware name: ARM LTD ARM Juno Development Platform task: ffff8009768ca700 task.stack: ffff8009768f8000 PC is at hrtimer_forward+0x88/0xd8 LR is at txdone_hrtimer+0xd4/0xf8 Call trace: hrtimer_forward+0x88/0xd8 __hrtimer_run_queues+0xe4/0x158 hrtimer_interrupt+0xa4/0x220 arch_timer_handler_phys+0x30/0x40 handle_percpu_devid_irq+0x78/0x130 generic_handle_irq+0x24/0x38 __handle_domain_irq+0x5c/0xb8 gic_handle_irq+0x54/0xa8 This patch fixes the issue by resetting TXDONE_BY_POLL if client has set knows_txdone. Cc: Alexey Klimov Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- drivers/mailbox/mailbox.c | 4 ++-- drivers/mailbox/pcc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -351,7 +351,7 @@ struct mbox_chan *mbox_request_channel(s init_completion(&chan->tx_complete); if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone) - chan->txdone_method |= TXDONE_BY_ACK; + chan->txdone_method = TXDONE_BY_ACK; spin_unlock_irqrestore(&chan->lock, flags); @@ -420,7 +420,7 @@ void mbox_free_channel(struct mbox_chan spin_lock_irqsave(&chan->lock, flags); chan->cl = NULL; chan->active_req = NULL; - if (chan->txdone_method == (TXDONE_BY_POLL | TXDONE_BY_ACK)) + if (chan->txdone_method == TXDONE_BY_ACK) chan->txdone_method = TXDONE_BY_POLL; module_put(chan->mbox->dev->driver->owner); --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -266,7 +266,7 @@ struct mbox_chan *pcc_mbox_request_chann init_completion(&chan->tx_complete); if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone) - chan->txdone_method |= TXDONE_BY_ACK; + chan->txdone_method = TXDONE_BY_ACK; spin_unlock_irqrestore(&chan->lock, flags); @@ -312,7 +312,7 @@ void pcc_mbox_free_channel(struct mbox_c spin_lock_irqsave(&chan->lock, flags); chan->cl = NULL; chan->active_req = NULL; - if (chan->txdone_method == (TXDONE_BY_POLL | TXDONE_BY_ACK)) + if (chan->txdone_method == TXDONE_BY_ACK) chan->txdone_method = TXDONE_BY_POLL; spin_unlock_irqrestore(&chan->lock, flags);