Kevin Winchester wrote:(Added Stephen to cc as he is the maintainer here) After looking at this for a while to figure out the necessary locking, I discovered drivers/char/apm_emulation.c, which has very similar structures to arch/x86/kernel/apm_32.c, and has much more locking (e.g. A state_lock mutex, a user_list_lock rwsem) and it uses a list_head for the apm_user_list instead of an open coded doubly linked list. This brought up the following question: - Should I just copy the locking from apm_emulation to apm? Another patch from Alan moved the BKL down into the apm_emulation ioctl method, but it seems pretty well locked as it is - so that BKL can probably just be removed there. Also - as far as I can tell, the two files both do the exact same thing from the point of view of the kapmd thread and /dev/apm_bios file, but the real apm makes actual bios calls to perform the suspend/standby operations, and apm_emulation just uses pm methods like pm_suspend(). - Thus, shouldn't the two files share code from a common third file? If so, I could take on the task of that refactoring, if I were given an idea of where I should put the new file (where does an x86 and drivers/char common file go?). Possible reasons this may not be worth it include: - The APM code is possibly fragile, and not often used anymore. If this is the case, then perhaps just adding the same locking from the emulation file to the true apm file would be a good idea. - There are subtle differences I am not seeing that requires the code to be quite separate. If so, please let me know. Thank you for any comments, -- Kevin Winchester --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Kamalesh Babulal | [BUILD-FAILURE] 2.6.26-rc8-mm1 - build failure at drivers/char/hvc_rtas.c |
| Luciano Rocha | usb hdd problems with 2.6.27.2 |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Christoph Lameter | Network latency regressions from 2.6.22 to 2.6.29 |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
git: | |
