Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
"This adds a new timer wheel function which is required for the
conversion of the timer callback function from the 'unsigned long
data' argument to 'struct timer_list *timer'. This conversion has two
benefits:

1) It makes struct timer_list smaller

2) Many callers hand in a pointer to the timer or to the structure
containing the timer, which happens via type casting both at setup
and in the callback. This change gets rid of the typecasts.

Once the conversion is complete, which is planned for 4.15, the old
setup function and the intermediate typecast in the new setup function
go away along with the data field in struct timer_list.

Merging this now into mainline allows a smooth queueing of the actual
conversion in the affected maintainer trees without creating
dependencies"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
um/time: Fixup namespace collision
timer: Prepare to change timer callback argument type

+16 -2
+2 -2
arch/um/kernel/time.c
··· 98 98 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 99 99 }; 100 100 101 - static void __init timer_setup(void) 101 + static void __init um_timer_setup(void) 102 102 { 103 103 int err; 104 104 ··· 132 132 void __init time_init(void) 133 133 { 134 134 timer_set_signal_handler(); 135 - late_time_init = timer_setup; 135 + late_time_init = um_timer_setup; 136 136 }
+14
include/linux/timer.h
··· 168 168 #define setup_pinned_deferrable_timer_on_stack(timer, fn, data) \ 169 169 __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED) 170 170 171 + #define TIMER_DATA_TYPE unsigned long 172 + #define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) 173 + 174 + static inline void timer_setup(struct timer_list *timer, 175 + void (*callback)(struct timer_list *), 176 + unsigned int flags) 177 + { 178 + __setup_timer(timer, (TIMER_FUNC_TYPE)callback, 179 + (TIMER_DATA_TYPE)timer, flags); 180 + } 181 + 182 + #define from_timer(var, callback_timer, timer_fieldname) \ 183 + container_of(callback_timer, typeof(*var), timer_fieldname) 184 + 171 185 /** 172 186 * timer_pending - is a timer pending? 173 187 * @timer: the timer in question