Commit Graph
22 Commits
Author SHA1 Message Date
Mark D. Studebaker bff323e3ca support IPMI version 0.9.
Patch from Yani Ioannou <yani.ioannou@gmail.com>
      http://bmcsensors-26.sourceforge.net/
      and tested by him and others,
      based on a previous patch from
      Vladislav Bogdanov <slava@nsys.by> located here:
      http://bubble.nsys.by/projects/ipmi/


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2934 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-03-19 02:50:35 +00:00
Mark D. Studebaker e958e52598 (mds) fix compile error of mine. Thanks Axel.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2817 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-12-31 14:12:37 +00:00
Jean Delvare 7683ac84a4 Restore controlling_mod argument to i2c_register_entry(). This
is needed to properly lock chip drivers in memory while anyone uses their
/proc entries. This also brings back compatibility with the 2.4 Linux
kernel.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2784 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-12-04 21:18:34 +00:00
Jean Delvare e9d2eaef30 Discard owner field from i2c_driver structure. I do not restore
inc_use/dec_use because they are not actually used anywhere.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2781 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-12-03 22:32:17 +00:00
Mark D. Studebaker d7ade70215 support "linearization function" 1/x.
Modified from a patch by Peter Wilsmore <pwilsmore@asi.com.au>


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2763 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-11-20 01:55:10 +00:00
Mark D. Studebaker b0295fe904 move initialization to kernel thread to fix oops
Ticket #1573

--------------

Another update for his issue [kernel panic triggered by bmcsensors}:

The source of the problem are the non-atomic kernel mallocs for device
registration called from an interrupt context - this doesn't seem to be
supported and as observed can crash the kernel.

A possible solution  is to create a kernel thread on initialisation,
leave that thread hanging round while the device scan runs, and finaly
signal the init thread when device scan is complete to finish
initialisation be registing the sensors found during scan.

A patch implementing such a scheme was created by Yvon JEGOU, I'll post
it here again.

Thanks, Martin

--------------

Hi Mark,


>> I don't fully understand... sorry if I'm slow.
>> is the problem doing mallocs from an interrupt context or non-atomic
>> mallocs?
>> what's non-atomic about the malloc?
>> how did we get in an interrupt context?


Being no kernel programmer this is fairly hard form me to answer; lets
see how far I get

The problem is non-atomic kmallocs from an interrupt context.

Non-atomic refers to the flags specified in the kmalloc call (GFP_ATOMIC
vs. GFP_KERNEL) (Ref. http://lwn.net/Articles/22909/)

Scanning for sensors is triggered by sending an ipmi message in
bmcsensors_reserve_sdr. Building the list of sensors and finally
creating the required proc entries happens on subsequent reception of
ipmi messages in the ipmi call-back. If I understand correctly how
things interact, that would be in an interrupt context.

Where bmcsensors blows up when trying to register lots of sensors is the

-> bmcsensors_command (which is the i2c-ipmi call-back)
-> bmcsensors_msg_handler
-> bmcsensors_rcv_msg
-> bmcsensors_rcv_sdr_msg
-> bmcsensors_build_proc_table
-> i2c_register_entry
-> create_proc_entry
-> proc_create
-> kmalloc

sequence.

My limited understanding of kernel programming is that if memory is
allocated in an interrupt context, GFP_ATOMIC must be used.

While the kmallocs done directly by bmcsensors_build_proc_table would be
fixable, the calls in proc_create_entry are obviously not changeable.
This makes proc_create and its callers unsafe for use in an interrupt
context.

The patch works around this limitation by creating a separate kernel
thread from sm_bmcsensors_init and calling bmcsensors_build_proc_table
from this thread after scanning for sesnsors has finished.

Hope I've managed to adequately explain what I think is wrong.

Bye, Martin


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2482 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-27 01:10:49 +00:00
Mark D. Studebaker 7b6c302155 increase max SDRs
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2333 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-03-05 04:10:55 +00:00
Jean Delvare 1fe75068d1 Do not include unneeded headers.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2286 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-02-12 21:46:36 +00:00
Mark D. Studebaker c1ee53baa0 fix reservations being cancelled. Ticket 1515 and many others.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2239 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-01-22 01:05:49 +00:00
Mark D. Studebaker f38dc972e0 several bmcsensors fixes:
- fix voltage scaling
	- swap voltage limits
	- use lower critical rather than upper hysteresis
	  for non-temperature sensors
	- increase libsensors support to 20 voltage, 10 fan,
	  10 temperature sensors
	Tickets 1406 and 1407.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2017 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-10-13 03:01:45 +00:00
Mark D. Studebaker 2d1d0cbcb8 fix compile; tested ok
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1779 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-06-10 01:08:13 +00:00
Mark D. Studebaker 42ce50ea40 fix compile error when DEBUG=1
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1720 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-03-17 01:32:56 +00:00
Kyosti Malkki 1cfe63804a (Kyösti) Cleanups
Copy sysctl enums to chip drivers from sensors.h for now,
   as seen in drivers included in 2.5 tree. File no longer included
   from kernel side.

   Apply i2c-proc change in CVS tagged -km2.

   Partial clean and sort of includes everywhere.

   Add i2c-dev.h, as a partial copy from i2c.
   Add to sensors.h from i2c-proc.h to compile things.
   Remove i2c-isa.h.

   Reflect header file changes to lib/ and prog/.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1705 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-01-21 20:01:27 +00:00
Kyosti Malkki 39391ba6ea (Kyösti) some cleanups for 2.4+
Module refcounting using .owner, removing of inc/dec_use.
   These require (yet unreleased) i2c 2.8.0+.

   Named initializers everywhere. Unified namespace.

   Cleanup for 2.5, remove EXPORT_NO_SYMBOLS, declare everything
   static. Apply initcalls.

   PCI device registration changes for busses started, replicating
   from i2c-amd*. While everything does compile, nothing really
   works. Well, maybe i2c-amd* ported back from 2.5 tree.

   After updating your work directory, run
    > cvs diff -u -r LAST-PRE-2-8-I2C > lm-2.8-patches-1

   BEWARE: I have not even insmoded any of these yet.

   To compile, you need i2c from cvs too.
   For 2.4 kernel :
    > cvs co -r lk2-4 i2c

   For 2.5 kernel :
    > cvs co i2c


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1698 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-01-17 01:19:52 +00:00
Mark D. Studebaker 73e497eeed updates, cleanup, wait for update before returning values
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1646 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-26 00:12:11 +00:00
Mark D. Studebaker 30238e2d03 Don't read past end of SDR; use resid = 0 for non-partial sdr reads;
leave some resid debugging in;
      handle i2c-ipmi going away and coming back


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1635 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-21 01:37:35 +00:00
Mark D. Studebaker 6e54291649 up cancellation limit, fix hysteresis values
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1633 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-20 17:40:35 +00:00
Mark D. Studebaker 66ce5c75bb cleanup, handle reservation cancellation,
skip non-threshold sensors


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1626 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-19 20:14:39 +00:00
Mark D. Studebaker d999488cd1 BMC cleanup
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1615 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-16 19:40:06 +00:00
Mark D. Studebaker ca292047a5 BMC sysctl names update
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1605 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-16 02:02:44 +00:00
Mark D. Studebaker c8b57bbe40 initial limits support
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1598 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-11 02:02:17 +00:00
Mark D. Studebaker 7bcd435c4c initial checkin IPMI/BMC support
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1593 7894878c-1315-0410-8ee3-d5d059ff63e0
2002-11-10 19:52:44 +00:00