kernel singleton creation service ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




is there any service whereby I can create a singleton object from within a kernel module, which is not 'owned' by that module ?

From my limited kernel knowledge, the obvious way to share a lock
is to declare and export it in a kernel module, and use it from other modules,
which then become dependent modules (ie stacked on top) of the one that
exports the lock. But this dependency is undesirable when the modules
are otherwise independent.



Heres the scenario Im looking at:

The PC87366 SuperIO chip has 15 logical functions,
ie 15 independent devices on it, and access to them all is thru
a pair of IO addresses, 0x2e, 0x2f. (SIO ports)

LM-Sensors currently 'owns' this device, insofar as it uses
the VLM - voltage level monitor, and TMS - temperature measurement system.
It has a lock in it, but the lock is entirely for its own use,
and is buried within a driver data-structure.

The chip also has a GPIO unit, which I want to use,
and which therefore needs to coordinate with LM-sensors module
to use the SIO to gain access to the otherwise independent functional
units in the chip.


Going further out on my chosen limb, I could imagine:

a kernel module which provides ability to create new singleton objects
by name, to register existing objects by name, or to query for those singletons
by the same name.


presumably the singleton name would be in the /sys/ namespace
perhaps /sys/locks/{spinlock,semaphore,up,down,strange,lepton,boson,..}


does anything like this exist ?

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux