Skip to contentSkip to conversation

S390: Replace deprecated "__initcall" with equivalent

PATCH Robert P. J. Day 1 participant 1 message May 14, 2008 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 33 lines · Heiko Carstens
Quoted 27 lines · Robert P. J. Day
Quoted 1 line · Heiko Carstens

Since when and why is __initcall deprecated?

this goes back several years:

http://www.cs.helsinki.fi/linux/linux-kernel/2002-23/1209.html

given the several levels of "init" calls these days, what used to be a simple __initcall was redefined to represent device_initcall, as you can see in <linux/init.h>:

#define core_initcall(fn)               __define_initcall("1",fn,1)
#define core_initcall_sync(fn)          __define_initcall("1s",fn,1s)
#define postcore_initcall(fn)           __define_initcall("2",fn,2)
#define postcore_initcall_sync(fn)      __define_initcall("2s",fn,2s)
#define arch_initcall(fn)               __define_initcall("3",fn,3)
#define arch_initcall_sync(fn)          __define_initcall("3s",fn,3s)
#define subsys_initcall(fn)             __define_initcall("4",fn,4)
#define subsys_initcall_sync(fn)        __define_initcall("4s",fn,4s)
#define fs_initcall(fn)                 __define_initcall("5",fn,5)
#define fs_initcall_sync(fn)            __define_initcall("5s",fn,5s)
#define rootfs_initcall(fn)             __define_initcall("rootfs",fn,rootfs)
#define device_initcall(fn)             __define_initcall("6",fn,6)
#define device_initcall_sync(fn)        __define_initcall("6s",fn,6s)
#define late_initcall(fn)               __define_initcall("7",fn,7)
#define late_initcall_sync(fn)          __define_initcall("7s",fn,7s)
Quoted 4 lines

#define __initcall(fn) device_initcall(fn)

obviously, the effect will still be the same, but the initcall
ordering will be more obvious when using the newer device_initcall.

Quoted 7 lines

I wouldn't say that any of the initcall names makes it obvious to which level it corresponds... initcall6() would be much more readable than device_initcall().

And even better would be if you could specify what your init function actually depends on, and let the kernel build system figure out the order of initcalls on its own.

i agree that that would be an even better situation, but i was just going by what the situation is at the moment. given the current #define, obviously there's no actual need to change anything, so it's entirely a judgment call.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================