Message ID | 20200318204408.010461877@linutronix.de (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show |
Series | Lock ordering documentation and annotation for lockdep | expand |
On Wed, 18 Mar 2020, Thomas Gleixner wrote: >--- a/include/linux/rcuwait.h >+++ b/include/linux/rcuwait.h >@@ -3,6 +3,7 @@ > #define _LINUX_RCUWAIT_H_ > > #include <linux/rcupdate.h> >+#include <linux/sched/signal.h> So this is causing build to fail for me: CC arch/x86/boot/compressed/cmdline.o arch/x86/boot/compressed/cmdline.c:5:20: error: conflicting types for âset_fsâ static inline void set_fs(unsigned long seg) ^~~~~~ In file included from ./include/linux/uaccess.h:11:0, from ./include/linux/sched/task.h:11, from ./include/linux/sched/signal.h:9, from ./include/linux/rcuwait.h:6, from ./include/linux/percpu-rwsem.h:8, from ./include/linux/fs.h:34, from ./include/linux/proc_fs.h:9, from ./include/acpi/acpi_bus.h:83, from ./include/linux/acpi.h:32, from arch/x86/boot/compressed/misc.h:28, from arch/x86/boot/compressed/cmdline.c:2: ./arch/x86/include/asm/uaccess.h:29:20: note: previous definition of âset_fsâ was here static inline void set_fs(mm_segment_t fs) ^~~~~~ make[2]: *** [scripts/Makefile.build:268: arch/x86/boot/compressed/cmdline.o] Error 1 make[1]: *** [arch/x86/boot/Makefile:113: arch/x86/boot/compressed/vmlinux] Error 2 make: *** [arch/x86/Makefile:285: bzImage] Error 2 Right now I'm not sure what the proper fix should be. Thanks, Davidlohr
On 2020-03-19 22:36:57 [-0700], Davidlohr Bueso wrote: > On Wed, 18 Mar 2020, Thomas Gleixner wrote: > > Right now I'm not sure what the proper fix should be. I though that v2 has it fixed with the previous commit (acpi: Remove header dependency). The kbot just reported that everything is fine. Let me look… > Thanks, > Davidlohr Sebastian
On Fri, 20 Mar 2020, Sebastian Andrzej Siewior wrote: >I though that v2 has it fixed with the previous commit (acpi: Remove >header dependency). The kbot just reported that everything is fine. >Let me look??? Nah my bad, that build did not have the full series applied :) Sorry for the noise. Thanks, Davidlohr
--- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h @@ -3,6 +3,7 @@ #define _LINUX_RCUWAIT_H_ #include <linux/rcupdate.h> +#include <linux/sched/signal.h> /* * rcuwait provides a way of blocking and waking up a single @@ -30,23 +31,30 @@ extern void rcuwait_wake_up(struct rcuwa * The caller is responsible for locking around rcuwait_wait_event(), * such that writes to @task are properly serialized. */ -#define rcuwait_wait_event(w, condition) \ +#define rcuwait_wait_event(w, condition, state) \ ({ \ + int __ret = 0; \ rcu_assign_pointer((w)->task, current); \ for (;;) { \ /* \ * Implicit barrier (A) pairs with (B) in \ * rcuwait_wake_up(). \ */ \ - set_current_state(TASK_UNINTERRUPTIBLE); \ + set_current_state(state); \ if (condition) \ break; \ \ + if (signal_pending_state(state, current)) { \ + __ret = -EINTR; \ + break; \ + } \ + \ schedule(); \ } \ \ WRITE_ONCE((w)->task, NULL); \ __set_current_state(TASK_RUNNING); \ + __ret; \ }) #endif /* _LINUX_RCUWAIT_H_ */ --- a/kernel/locking/percpu-rwsem.c +++ b/kernel/locking/percpu-rwsem.c @@ -162,7 +162,7 @@ void percpu_down_write(struct percpu_rw_ */ /* Wait for all now active readers to complete. */ - rcuwait_wait_event(&sem->writer, readers_active_check(sem)); + rcuwait_wait_event(&sem->writer, readers_active_check(sem), TASK_UNINTERRUPTIBLE); } EXPORT_SYMBOL_GPL(percpu_down_write);