Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 19:34:25 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a6f89b2b5f7e - releng/13.2 - LinuxKPI: const argument to irq_set_affinity_hint()
Message-ID:  <202302231934.31NJYPnb020155@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/13.2 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6f89b2b5f7e94be6dd14139ff0633526eed9968

commit a6f89b2b5f7e94be6dd14139ff0633526eed9968
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-01-28 16:15:19 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-02-23 19:31:45 +0000

    LinuxKPI: const argument to irq_set_affinity_hint()
    
    irq_set_affinity_hint() takes a const mask argument and some drivers
    pass it in as such where earlier implementations were more lenient.
    Deal with it and __DECONST() the argument when passed to intr_setaffinity().
    
    Sponsored by:   The FreeBSD Foundation
    Approved by:    re (cperciva)
    Differential Revision: https://reviews.freebsd.org/D38242
    
    (cherry picked from commit 4c72d075a57e9a3215639aede16df4df29e1c1da)
    (cherry picked from commit 4724e1867e81ab5de2c6b5a6819998b660f3e96d)
---
 sys/compat/linuxkpi/common/include/linux/interrupt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h
index cb2b1bef4667..1e7a1042d237 100644
--- a/sys/compat/linuxkpi/common/include/linux/interrupt.h
+++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h
@@ -133,12 +133,12 @@ devm_free_irq(struct device *xdev, unsigned int irq, void *p)
 }
 
 static inline int
-irq_set_affinity_hint(int vector, cpumask_t *mask)
+irq_set_affinity_hint(int vector, const cpumask_t *mask)
 {
 	int error;
 
 	if (mask != NULL)
-		error = intr_setaffinity(vector, CPU_WHICH_IRQ, mask);
+		error = intr_setaffinity(vector, CPU_WHICH_IRQ, __DECONST(cpumask_t *, mask));
 	else
 		error = intr_setaffinity(vector, CPU_WHICH_IRQ, cpuset_root);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302231934.31NJYPnb020155>