Section Mismatches
Hi Uwe,
I see that your commit 0db252452378aa7a9e001a13226e1cd1dc61453d removed the *_driver from the symbol whitelist when referencing init section (heh, it took a while), but could you explain what's the rationale behind that ?
Thanks a lot
Signature · 3 lines
balbi DefectiveByDesign.org
Hi Felipe,
Quoted 4 lines · Felipe Balbi
I see that your commit
0db252452378aa7a9e001a13226e1cd1dc61453dremoved the*_driverfrom the symbol whitelist when referencing init section (heh, it took a while), but could you explain what's the rationale behind that ?
The rational is that it's AFAIK wrong if a driver references a function that lives in .init.text.
Do you think that's wrong?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 9 lines · ext Uwe Kleine-König
Hi Felipe,
Quoted 4 lines · Felipe Balbi
I see that your commit
0db252452378aa7a9e001a13226e1cd1dc61453dremoved the*_driverfrom the symbol whitelist when referencing init section (heh, it took a while), but could you explain what's the rationale behind that ?The rational is that it's AFAIK wrong if a driver references a function that lives in .init.text.
how about all the driver structures ? should they remove __init from probe() or stop saving the probe() function's pointer ?
That can be done for e.g. platform drivers, but for cpufreq_driver structures, I can't see a way to avoid a section mismatch (not without changing the cpufreq code a bit, at least). And, to me, that init has to live in the .init.text section as it's pretty much only called to initialize the frequency table for the cpu.
Quoted 1 line
Do you think that's wrong?
no, no. Not saying that. Just wondering what will happen with several drivers, will they change from _driver to _ops or try to stop saving probe() pointers into the driver structure.
Signature · 3 lines
balbi DefectiveByDesign.org
Hello Felipe,
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · ext Uwe Kleine-König
Hi Felipe,
Quoted 4 lines · Felipe Balbi
I see that your commit
0db252452378aa7a9e001a13226e1cd1dc61453dremoved the*_driverfrom the symbol whitelist when referencing init section (heh, it took a while), but could you explain what's the rationale behind that ?The rational is that it's AFAIK wrong if a driver references a function that lives in .init.text.
Quoted 8 lines
how about all the driver structures ? should they remove
__initfromprobe()or stop saving theprobe()function's pointer ?That can be done for e.g. platform drivers, but for
cpufreq_driverstructures, I can't see a way to avoid a section mismatch (not without changing the cpufreq code a bit, at least). And, to me, that init has to live in the .init.text section as it's pretty much only called to initialize the frequency table for the cpu.
I think they need handling similar handling like the usb gadget drivers.
See
http://thread.gmane.org/gmane.linux.ports.ppc.embedded/37291/focus=34468
for the changes I suggested there.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Hi,
Quoted 3 lines · ext Uwe Kleine-König
http://thread.gmane.org/gmane.linux.ports.ppc.embedded/37291/focus=34468for the changes I suggested there.
I see, will look into it. Thanks
Signature · 3 lines
balbi DefectiveByDesign.org