lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Dec 2020 14:58:42 -0000
From:   "irqchip-bot for John Garry" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     John Garry <john.garry@...wei.com>, Marc Zyngier <maz@...nel.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] resource: Add irqresource_disabled()

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     9806731db684a475ade1e95d166089b9edbd9da3
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/9806731db684a475ade1e95d166089b9edbd9da3
Author:        John Garry <john.garry@...wei.com>
AuthorDate:    Wed, 02 Dec 2020 18:36:54 +08:00
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Fri, 11 Dec 2020 14:47:50 

resource: Add irqresource_disabled()

Add a common function to set the fields for a irq resource to disabled,
which mimics what is done in acpi_dev_irqresource_disabled(), with a view
to replace that function.

Signed-off-by: John Garry <john.garry@...wei.com>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Link: https://lore.kernel.org/r/1606905417-183214-3-git-send-email-john.garry@huawei.com
---
 include/linux/ioport.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 5135d4b..f9bf374 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -307,6 +307,13 @@ struct resource *devm_request_free_mem_region(struct device *dev,
 struct resource *request_free_mem_region(struct resource *base,
 		unsigned long size, const char *name);
 
+static inline void irqresource_disabled(struct resource *res, u32 irq)
+{
+	res->start = irq;
+	res->end = irq;
+	res->flags = IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
+}
+
 #ifdef CONFIG_IO_STRICT_DEVMEM
 void revoke_devmem(struct resource *res);
 #else

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ