29 Mar, 2012
4 commits
-
Merge third batch of patches from Andrew Morton:
- Some MM stragglers
- core SMP library cleanups (on_each_cpu_mask)
- Some IPI optimisations
- kexec
- kdump
- IPMI
- the radix-tree iterator work
- various other misc bits."That'll do for -rc1. I still have ~10 patches for 3.4, will send
those along when they've baked a little more."* emailed from Andrew Morton : (35 commits)
backlight: fix typo in tosa_lcd.c
crc32: add help text for the algorithm select option
mm: move hugepage test examples to tools/testing/selftests/vm
mm: move slabinfo.c to tools/vm
mm: move page-types.c from Documentation to tools/vm
selftests/Makefile: make `run_tests' depend on `all'
selftests: launch individual selftests from the main Makefile
radix-tree: use iterators in find_get_pages* functions
radix-tree: rewrite gang lookup using iterator
radix-tree: introduce bit-optimized iterator
fs/proc/namespaces.c: prevent crash when ns_entries[] is empty
nbd: rename the nbd_device variable from lo to nbd
pidns: add reboot_pid_ns() to handle the reboot syscall
sysctl: use bitmap library functions
ipmi: use locks on watchdog timeout set on reboot
ipmi: simplify locking
ipmi: fix message handling during panics
ipmi: use a tasklet for handling received messages
ipmi: increase KCS timeouts
ipmi: decrease the IPMI message transaction time in interrupt mode
... -
The part of the IPMI driver that delivered panic information to the event
log and extended the watchdog timeout during a panic was not properly
handling the messages. It used static messages to avoid allocation, but
wasn't properly waiting for these, or wasn't properly handling the
refcounts.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The IPMI driver would release a lock, deliver a message, then relock.
This is obviously ugly, and this patch converts the message handler
interface to use a tasklet to schedule work. This lets the receive
handler be called from an interrupt handler with interrupts enabled.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`
Signed-off-by: David Howells
27 May, 2011
1 commit
-
The ->read_proc interface is going away, convert to seq_file.
Signed-off-by: Alexey Dobriyan
Cc:Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Dec, 2010
1 commit
-
The IPMI smi_watcher will be used to catch the IPMI interface as they
come or go. In order to communicate with the correct IPMI device, it
should be confirmed whether it is what we wanted especially on the
system with multiple IPMI devices. But the new_smi callback function
of smi_watcher provides very limited info(only the interface number
and dev pointer) and there is no detailed info about the low level
interface. For example: which mechansim registers the IPMI
interface(ACPI, PCI, DMI and so on).This is to add one interface that can get more info of low-level IPMI
device. For example: the ACPI device handle will be returned for the
pnp_acpi IPMI device.Signed-off-by: Zhao Yakui
Signed-off-by: Corey Minyard
Signed-off-by: Len Brown
28 Oct, 2010
1 commit
-
__init and __exit belong after the return type on functions, not
before.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 May, 2010
2 commits
-
Update core IPMI driver printk()'s with dev_printk(), and its constructs,
to provide additional device topology information.An example of the additional device topology for a PNP device -
ipmi_si 00:02: probing via ACPI
ipmi_si 00:02: [io 0x0ca2-0x0ca3] regsize 1 spacing 1 irq 0
ipmi_si 00:02: Found new BMC (man_id: 0x00000b, prod_id: 0x0000, ...
ipmi_si 00:02: IPMI kcs interface initializedand for a PCI device -
ipmi_si 0000:01:04.6: probing via PCI
ipmi_si 0000:01:04.6: PCI INT A -> GSI 21 (level, low) -> IRQ 21
ipmi_si 0000:01:04.6: [mem 0xf1ef0000-0xf1ef00ff] regsize 1 spaci...
ipmi_si 0000:01:04.6: IPMI kcs interface initialized[minyard@acm.org: rework to fix rejects, extended it a bit]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Myron Stowe
Signed-off-by: Corey Minyard
Cc: Zhao Yakui
Cc: Len Brown
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The timeouts in IPMI are in the 1-5 second range in message handling, so a
1 second timeout is a reasonable thing to do. This should help with
reducing power consumption on idle systems.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Mar, 2010
1 commit
-
This fixes a sysfs lockdep warning in the ipmi code.
Thanks to Eric Biederman and Yinghai Lu for the original versions of the
patch, unfortunatly they did not submit them in a form they could be
applied in.Cc: Yinghai Lu
Cc: Eric Biederman
Signed-off-by: Greg Kroah-Hartman
05 Oct, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
22 May, 2009
1 commit
-
Instead of queuing IPMB messages before channel initialization, just
throw them away. Nobody will be listening for them at this point,
anyway, and they will clog up the queue and nothing will be delivered
if we queue them.Also set the current channel to the number of channels, as this value
is used to tell if the channel information has been initialized.Signed-off-by: Corey Minyard
Cc: Ferenc Wagner
Cc: Dan Frazier
Signed-off-by: Linus Torvalds
22 Apr, 2009
2 commits
-
Enable userspace to receive messages that a BMC transmits using an OEM
medium. This is used by the HP iLO2.Based on code originally written by Patrick Schoeller.
Signed-off-by: dann frazier
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Bela Lubkin noticed that the statistics for send IPMB and LAN commands
in the IPMI driver could be incremented even if an error occurred. Move
the increments to the proper place to avoid this.Also add some statistics for retransmissions that failed, and some little
helper functions to neaten up the code a little.Signed-off-by: Corey Minyard
Cc: Bela Lubkin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Mar, 2009
1 commit
-
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
->owner, thus not pinning enything, and release it later resulting
in module refcount underflow.We can keep ->owner and supply it at registration time like ->proc_fops
and ->data.But this leaves ->owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching ->owner. ->proc_fops is declared as "const" which should give
some thoughts.->read_proc/->write_proc were just fixed to not require ->owner for
protection.rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.Removing ->owner will also make PDE smaller.
So, let's nuke it.
Kudos to Jeff Layton for reminding about this, let's say, oversight.
http://bugzilla.kernel.org/show_bug.cgi?id=12454
Signed-off-by: Alexey Dobriyan
13 Nov, 2008
1 commit
-
It turns out that if one registers a struct platform_device, the
platform device code expects that platform_device.device->driver points
to a struct driver inside a struct platform_driver.This is not the case with the ipmi-si, ipmi-msghandler and ibmaem
drivers, which causes the suspend/resume hook functions to jump off into
nowhere, causing a crash. Make this assumption hold true for these
three drivers.Signed-off-by: Darrick J. Wong
Acked-by: Corey Minyard
Cc: Jean Delvare
Cc: Kay Sievers
Cc: Greg KH
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Apr, 2008
9 commits
-
Make the needlessly global ipmi_alloc_recv_msg() static.
Signed-off-by: Adrian Bunk
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
IPMI code theoretically allows ->write_proc users, but nobody uses this thus
far.Signed-off-by: Alexey Dobriyan
Acked-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Lots of style fixes for the base IPMI driver. No functional changes.
Basically fixes everything reported by checkpatch and fixes the comment
style.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert the #defines for statistics into an enum in the IPMI message
handler.Signed-off-by: Corey Minyard
Cc: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Atomics are a lot more efficient and neat than using a lock.
Signed-off-by: Konstantin Baydarov
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Enough bug fixes and changes that we need a new driver version.
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Don't print out that the event queue is full on every event, only
print something out when it becomes full or becomes not full.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch prevents deadlocks in IPMI panic handler caused by msg_lock
in smi_info structure and waiting_msgs_lock in ipmi_smi structure.[cminyard@mvista.com: remove unnecessary memory barriers]
Signed-off-by: Konstantin Baydarov
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The "run_to_completion" mode was somewhat broken. Locks need to be avoided in
run_to_completion mode, and it shouldn't be used by normal users, just
internally for panic situations.This patch removes locks in run_to_completion mode and removes the user call
for setting the mode. The only user was the poweroff code, but it was easily
converted to use the polling interface.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Feb, 2008
2 commits
-
Signed-off-by: Denis Cheng
Cc: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.Signed-off-by: Denis Cheng
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Oct, 2007
2 commits
-
The removal of proc entries was done holding a lock, which is no longer
allowed. There is no need for the lock, only a mutex is required, so switch
over to a mutex.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently the IPMI watchdog timer sets the watchdog timeout on a panic, but it
doesn't actually poll the interface to make sure the message goes out.Add an interface for polling the IPMI driver, and add code to the IPMI
watchdog timer to poll the interface when the timer is set from a panic.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Oct, 2007
1 commit
-
Driver does
proc_mkdir("ipmi", NULL);
but
remove_proc_entry(proc_ipmi_root->name, &proc_root);This is OK and working if only slightly inconsistent. Also changing
proc_root to NULL will help OpenVZ which has multiple proc roots and, as we
now know, requires matching parents in such cases.Signed-off-by: Alexey Dobriyan
Cc: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2007
1 commit
-
sysfs is now completely out of driver/module lifetime game. After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners. Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.This patch kills now unnecessary attribute->owner. Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.For more info regarding lifetime rule cleanup, please read the
following message.http://article.gmane.org/gmane.linux.kernel/510293
(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)Signed-off-by: Tejun Heo
Cc: Cornelia Huck
Cc: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
15 Feb, 2007
1 commit
-
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).Signed-off-by: Tim Schmielau
Acked-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
2 commits
-
Bug: pnx8550 code creates directory but resets ->nlink to 1.
create_proc_entry() et al will correctly set ->nlink for you.
Signed-off-by: Alexey Dobriyan
Cc: Ralf Baechle
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Jeff Dike
Cc: Corey Minyard
Cc: Alan Cox
Cc: Kyle McMartin
Cc: Martin Schwidefsky
Cc: Greg KH
Cc: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix some RCU problem pointed out by Paul McKenney of IBM. These are:
The wholesale move of the command receivers list into a new list was not
safe because the list will point to the new tail during a traversal, so the
traversal will never end on a reader if this happens during a read.Memory barriers were needed to handle proper ordering of the setting of the
IPMI interface as valid. Readers might not see proper ordering of data
otherwise.In ipmi_smi_watcher_register(), the use of the _rcu suffix on the list is
unnecessary.This require the list_splice_init_rcu() patch previously posted.
Signed-off-by: Corey Minyard
Cc: Paul E. McKenney
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Jan, 2007
1 commit
-
Fix a dangling pointer bug in ipmi_timeout_handler. A list of timedout
messages is not re-initialized before reuse, causing the head of the list
to point to freed memory.Signed-off-by: David Barksdale
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Dec, 2006
2 commits
-
Fix various problems pointed out by Andrew Morton and others:
* platform_device_unregister checks for NULL, no need to check here.
* Formatting fixes.
* Remove big macro and convert to a function.
* Use strcmp instead of defining a broken case-insensitive comparison,
and make the output parameter info match the case of the input one
(change "I/O" to "i/o").
* Return the length instead of 0 from the hotmod parameter handler.
* Remove some unused cruft.
* The trydefaults parameter only has to do with scanning the "standard"
addresses, don't check for that on ACPI.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove all =0 and =NULL from static initializers. They are not needed and
removing them saves space in the object files.Signed-off-by: Randy Dunlap
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
2 commits
-
Fix build warnings for PROC_FS=n.
drivers/char/ipmi/ipmi_poweroff.c:707: warning: label 'out_err' defined but not used
drivers/char/ipmi/ipmi_msghandler.c:1774: warning: 'ipmb_file_read_proc' defined but not used
drivers/char/ipmi/ipmi_msghandler.c:1790: warning: 'version_file_read_proc' defined but not used
drivers/char/ipmi/ipmi_msghandler.c:1801: warning: 'stat_file_read_proc' defined but not usedSigned-off-by: Randy Dunlap
Cc: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some commands and operations on a BMC can cause the BMC to "go away" for a
while. This can cause the automatic flag processing and other things of that
nature to timeout and generate annoying logs, or possibly cause other bad
things to happen when in firmware update mode.Add detection of those commands (cold reset, warm reset, and any firmware
command) and turns off automatic processing for 30 seconds. It also add a
manual override either way.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds