aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi
Commit message (Collapse)AuthorAge
* ipmi: Fix multi-part message handlingCorey Minyard2015-05-05
| | | | | | | | | | | | | | | | | | Lots of little fixes for multi-part messages: The values was not being re-initialized, if something went wrong handling a multi-part message and it got left in a bad state, it might be an issue. The commands were not correct when issuing multi-part reads, the code was not passing in the proper value for commands. Also clean up some minor formatting issues. Get the block number from the right location, limit the maximum send message size to 63 bytes and explain why, and fix some minor sylistic issues. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Add alert handling to SSIFCorey Minyard2015-05-05
| | | | | | | | | | | The SSIF interface can optionally have an SMBus alert come in when data is ready. Unfortunately, the IPMI spec gives wiggle room to the implementer to allow them to always have the alert enabled, even if the driver doesn't enable it. So implement alerts. If you don't in this situation, the SMBus alert handling will constantly complain. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix a problem that messages are not issued in run_to_completion modeHidehiro Kawai2015-05-05
| | | | | | | | | | | | | | | start_next_msg() issues a message placed in smi_info->waiting_msg if it is non-NULL. However, sender() sets a message to smi_info->curr_msg and NULL to smi_info->waiting_msg in the context of run_to_completion mode. As the result, it leads an infinite loop by waiting the completion of unissued message when leaving dying message after kernel panic. sender() should set the message to smi_info->waiting_msg not curr_msg. Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Report an error if ACPI _IFT doesn't existCorey Minyard2015-05-05
| | | | | | | When probing an ACPI table, report a specific error, instead of just returning an error, if _IFT doesn't exist. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove unused including <linux/version.h>Wei Yongjun2015-05-05
| | | | | | | Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Don't report err in the SI driver for SSIF devicesCorey Minyard2015-05-05
| | | | | | | Really ignore them by returning -ENODEV from the probe, but not doing anything. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove incorrect use of seq_has_overflowedJoe Perches2015-05-05
| | | | | | | | | | | | | | | | commit d6c5dc18d863 ("ipmi: Remove uses of return value of seq_printf") incorrectly changed the return value of various proc_show functions to use seq_has_overflowed(). These functions should return 0 on completion rather than 1/true on overflow. 1 is the same as #define SEQ_SKIP which would cause the output to not be emitted (skipped) instead. This is a logical defect only as the length of these outputs are all smaller than the initial allocation done by the seq filesystem. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi:ssif: Ignore spaces when comparing I2C adapter namesCorey Minyard2015-05-05
| | | | | | | | Some of the adapters have spaces in their names, but that's really hard to pass in as a module or kernel parameters. So ignore the spaces. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_ssif: Fix the logic on user-supplied addressesCorey Minyard2015-05-05
| | | | | | Returning zero is success. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* Merge tag 'char-misc-4.1-rc1' of ↵Linus Torvalds2015-04-21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver patchset for 4.1-rc1. Lots of different driver subsystem updates here, nothing major, full details are in the shortlog. All of this has been in linux-next for a while" * tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits) mei: trace: remove unused TRACE_SYSTEM_STRING DTS: ARM: OMAP3-N900: Add lis3lv02d support Documentation: DT: lis302: update wakeup binding lis3lv02d: DT: add wakeup unit 2 and wakeup threshold lis3lv02d: DT: use s32 to support negative values Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case mei: replace check for connection instead of transitioning mei: use mei_cl_is_connected consistently mei: fix mei_poll operation hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() Drivers: hv: hv_balloon: survive ballooning request with num_pages=0 Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function Drivers: hv: hv_balloon: do not online pages in offline blocks hv: remove the per-channel workqueue hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind() hv: run non-blocking message handlers in the dispatch tasklet coresight: moving to new "hwtracing" directory coresight-tmc: Adding a status interface to sysfs coresight: remove the unnecessary configuration coresight-default-sink ...
| * char: constify of_device_id arrayFabian Frederick2015-03-16
| | | | | | | | | | | | | | | | of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ipmi_ssif: Use interruptible completion for waiting in the threadCorey Minyard2015-04-10
| | | | | | | | | | | | | | The code was using an normal completion, but that caused stuck task errors after a while. Use an interruptible one to avoid that. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi/powernv: Fix minor locking bugAlistair Popple2015-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | If ipmi_powernv_recv(...) is called without a current message it prints a warning and returns. However it fails to release the message lock causing the system to dead lock during any subsequent IPMI operations. This error path should never normally be taken unless there are bugs elsewhere in the system. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Handle BMCs that don't allow clearing the rcv irq bitCorey Minyard2015-04-10
|/ | | | | | | | | | | Some BMCs don't let you clear the receive irq bit in the global enables. This is kind of silly, but they give an error if you try to clear it. Compensate for this by detecting the situation and working around it. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Thomas D <whissi@whissi.de> Reviewed-by: Thomas D <whissi@whissi.de>
* ipmi: Fix a memory ordering issueCorey Minyard2015-02-19
| | | | | | | | | | From a locking point of view it is safe to check waiting_msg without a lock, but there is a memory ordering issue that causes it to possibly not be set right when viewed from another processor. We are already claiming a lock right after that, move the check to inside the lock to enforce the memory ordering. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove uses of return value of seq_printfJoe Perches2015-02-19
| | | | | | | | | The seq_printf like functions will soon be changed to return void. Convert these uses to check seq_has_overflowed instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Use is_visible callback for conditional sysfs entriesTakashi Iwai2015-02-19
| | | | | | | | | | Instead of manual calls of device_create_file() and device_remove_file(), implement the condition in is_visible callback for the attribute group and put these entries to the group, too. This simplifies the code and avoids the possible races. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Free ipmi_recv_msg messages from the linked list on closeNicholas Krause2015-02-19
| | | | | | | | | | | | This adds a loop through the elements in the linked list, recv_msgs using list_for_entry_safe in order to free messages in this list. In addition we are using the safe version of this marco in order to prevent use after bugs related to deleting the element we are on currently by holding a pointer to the next element after the current one we are on and freeing with the function, ipmi_free_recv_msg internally in this loop. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: avoid gcc warningArnd Bergmann2015-02-19
| | | | | | | | | | | | | | | | | | | A new harmless warning has come up on ARM builds with gcc-4.9: drivers/char/ipmi/ipmi_msghandler.c: In function 'smi_send.isra.11': include/linux/spinlock.h:372:95: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] raw_spin_unlock_irqrestore(&lock->rlock, flags); ^ drivers/char/ipmi/ipmi_msghandler.c:1490:16: note: 'flags' was declared here unsigned long flags; ^ This could be worked around by initializing the 'flags' variable, but it seems better to rework the code to avoid this. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 7ea0ed2b5be81 ("ipmi: Make the message handler easier to use for SMI interfaces") Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Update timespec usage to timespec64John Stultz2015-02-19
| | | | | | | | | | As part of the internal y2038 cleanup, this patch removes timespec usage in the ipmi driver, replacing it timespec64 Cc: openipmi-developer@lists.sourceforge.net Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Corey Minyard <minyard@mvista.com>
* ipmi: Cleanup DEBUG_TIMING ifdef usageJohn Stultz2015-02-19
| | | | | | | | | | | | | | | The driver uses #ifdef DEBUG_TIMING in order to conditionally print out timestamped debug messages. Unfortunately it adds the ifdefs all over the usage sites. This patch cleans it up by adding a debug_timestamp() function which is compiled out if DEBUG_TIMING isn't present. This cleans up all the ugly ifdefs in the function logic. Cc: openipmi-developer@lists.sourceforge.net Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Corey Minyard <minyard@mvista.com>
* drivers:char:ipmi: Remove unneeded FIXME comment in the file,ipmi_si_intf.cNicholas Krause2015-02-19
| | | | | | | | | | | Removes a no longer needed FIXME comment in the function,acpi_gpe_irq_setup for the file,ipmi_si_intf.c. This comment is no longer needed as clearly we are passing the correct level of ACPI_GPE_LEVEL_TRIGGERED to the installer function,acpi_install_gpe_handler due to no breakage after years of using this ACPI level in the function,acpi_install_gpe_handler. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* char: ipmi: Remove obsolete cleanup for clientdataWolfram Sang2015-02-19
| | | | | | | | A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit or error. This is obsolete meanwhile, the core will do it. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove a FIXME for slab conversionCorey Minyard2015-02-19
| | | | | | | | | There can't be more than a few IPMI messages allocated at any one time, so converting the messages to slabs would be a waste. So just remove the FIXME. Suggested-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix compile warning with tv_usecCorey Minyard2014-12-30
| | | | | | It's not a long int on all arches. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix compile issue with isspace()Corey Minyard2014-12-21
| | | | | | | Some arches don't get ctypes.h included from these includes, so add it explicitly. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Finish cleanup of BMC attributesCorey Minyard2014-12-21
| | | | | | | | | | | | | | | | The previous cleanup of BMC attributes left a few holes, and if you run with lockdep debugging with a BMC with the proper attributes, you could get a warning. This patch removes all the unused attributes from the BMC structure, since they are all declared in the .data section now. It makes the attributes all static. It fixes the referencing of the attributes in a couple of cases that dynamically added the files depending on BMC information. Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Huang Ying <ying.huang@intel.com> Tested-by: Alexei Starovoitov <ast@plumgrid.com>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * char: ipmi: drop owner assignment from platform_driversWolfram Sang2014-10-20
| | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | ipmi: Check the BT interrupt enable periodicallyCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | On a reset, the BMC may reset the BT enable in the processor registers (different than the global enables in the BMC). Check it periodically and fix it if necessary. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Tony Rex <tony.rex@ericsson.com> Tested-by: Magnus Johansson E <magnus.e.johansson@ericsson.com>
* | ipmi: Fix attention handling for system interfacesCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | If an attention came in while handling a message response, it could cause the state machine to go into the wrong mode and lock things up if the state machine wasn't in normal mode. So if the state machine is not in normal mode, save the attention flag for later. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Tony Rex <tony.rex@ericsson.com> Tested-by: Magnus Johansson E <magnus.e.johansson@ericsson.com> Cc: Per Fogelström <per.fogelstrom@ericsson.com>
* | ipmi: Periodically check to see if irqs and messages are set rightCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | | | The BMC can be reset while we are running; that means the interrupt and event message buffer settings may be wrong. So periodically check to see if these values are correct, and fix them if they are wrong. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Tony Rex <tony.rex@ericsson.com> Tested-by: Magnus Johansson E <magnus.e.johansson@ericsson.com>
* | drivers/char/ipmi: Add powernv IPMI driverJeremy Kerr2014-12-11
| | | | | | | | | | | | | | | | | | | | This change adds an initial IPMI driver for powerpc OPAL firmware. The interface is exposed entirely through firmware: we have two functions to send and receive IPMI messages, and an interrupt notification from the firmware to signify that a message is available. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Add SMBus interface driver (SSIF)Corey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the SMBus interface to the IPMI driver. Signed-off-by: Corey Minyard <minyard@acm.org> Documentation/IPMI.txt | 32 drivers/char/ipmi/Kconfig | 11 drivers/char/ipmi/Makefile | 1 drivers/char/ipmi/ipmi_smb.c | 1737 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1769 insertions(+), 12 deletions(-)
* | ipmi: Remove the now unused priority from SMI senderCorey Minyard2014-12-11
| | | | | | | | | | | | | | Since the queue was moved into the message handler, the priority field is now irrelevant. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Remove the now unnecessary message queueCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | A message queue was added to the message handler, so the SMI interfaces only need to handle one message at a time. Pull out the message queue. This also leads to some significant simplification in the shutdown of an interface, since the message handler now does a lot of the cleanup. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Make the message handler easier to use for SMI interfacesCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | The message handler expected the SMI interface to keep a queue of messages, but that was kind of silly, the queue would be easier to manage in the message handler itself. As part of that, fix the message cleanup to make sure no messages are outstanding when an SMI interface is unregistered. This makes it easier for an SMI interface to unregister, it just has to call ipmi_unregister_smi() first and all processing from the message handler will be cleaned up. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Move message sending into its own functionCorey Minyard2014-12-11
| | | | | | | | | | | | Getting ready for a transmit queue. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: rename waiting_msgs to waiting_rcv_msgsCorey Minyard2014-12-11
| | | | | | | | | | | | To avoid confusion with the coming transmit message queue. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Fix handling of BMC flagsCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | The handling of BMC flags wasn't quite right in a few places, mainly around enabling and disabling interrupts in the BMC. Clean up the code and fix the handling of the flags. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Initialize BMC device attributesCorey Minyard2014-12-11
| | | | | | | | | | | | | | This avoids an oops at initialization time. Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Sanjeev <singhsan@codeaurora.org>
* | ipmi: Unregister previously registered driver in error casetrenn@suse.de2014-12-11
| | | | | | | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Fix a bug in hot add/removeCorey Minyard2014-12-11
| | | | | | | | | | | | There was a wrong variable used in the name parsing. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Remove useless sysfs_name parametersCorey Minyard2014-12-11
| | | | | | | | | | | | | | It was always "bmc", so just hardcode it. It makes no sense to pass that in. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: clean up the device handling for the bmc deviceCorey Minyard2014-12-11
| | | | | | | | | | | | | | | | Embed the platform device in the bmc device instead of externally allocating it, use more proper form for creating the device attributes, and other general cleanups. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Move the address source to string to ipmi-generic codeCorey Minyard2014-12-11
| | | | | | | | | | | | It was in the system interface driver, but is generic functionality. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* | ipmi: Ignore SSIF in the PNP handlingCorey Minyard2014-12-11
|/ | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Clear drvdata when interface is removedTakao Indoh2014-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bug on hotmod removing. After ipmi interface is removed using hotmod, kernel panic occurs when rmmod impi_si. For example, try this: # echo "remove,"`cat /proc/ipmi/0/params` > \ /sys/module/ipmi_si/parameters/hotmod # rmmod ipmi_si Then, rmmod fails with the following messages. ------------[ cut here ]------------ WARNING: CPU: 12 PID: 10819 at /mnt/repos/linux/lib/list_debug.c:53 __list_del_entry+0x63/0xd0() CPU: 12 PID: 10819 Comm: rmmod Not tainted 3.17.0-rc1 #19 Hardware name: FUJITSU-SV PRIMERGY BX920 S2/D3030, BIOS 080015 Rev.3D81.3030 02/10/2012 Call Trace: dump_stack+0x45/0x56 warn_slowpath_common+0x7d/0xa0 warn_slowpath_fmt+0x4c/0x50 __list_del_entry+0x63/0xd0 list_del+0xd/0x30 cleanup_one_si+0x2a/0x230 [ipmi_si] ipmi_pnp_remove+0x15/0x20 [ipmi_si] pnp_device_remove+0x24/0x40 __device_release_driver+0x7f/0xf0 driver_detach+0xb0/0xc0 bus_remove_driver+0x55/0xd0 driver_unregister+0x2c/0x50 pnp_unregister_driver+0x12/0x20 cleanup_ipmi_si+0xbc/0xf0 [ipmi_si] SyS_delete_module+0x132/0x1c0 system_call_fastpath+0x16/0x1b ---[ end trace 70b4377268f85c23 ]--- list_del in cleanup_one_si() fails because the smi_info is already removed when hotmod removing. When ipmi interface is removed by hotmod, smi_info is removed by cleanup_one_si(), but is is still set in drvdata. Therefore when rmmod ipmi_si, ipmi_pnp_remove tries to remove it again and fails. By this patch, a pointer to smi_info in drvdata is cleared when hotmod removing so that it will be not accessed when rmmod. changelog: v2: - Clear drvdata in cleanup_one_si - Change subject v1: https://lkml.org/lkml/2014/9/8/741 Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipmi: work around gcc-4.9 build warningArnd Bergmann2014-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Building ipmi on arm with gcc-4.9 results in this warning for an allmodconfig build: drivers/char/ipmi/ipmi_si_intf.c: In function 'ipmi_thread': include/linux/time.h:28:5: warning: 'busy_until.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] if (lhs->tv_sec > rhs->tv_sec) ^ drivers/char/ipmi/ipmi_si_intf.c:1007:18: note: 'busy_until.tv_sec' was declared here struct timespec busy_until; ^ The warning is bogus and this case can not occur. Apparently this is a false positive resulting from gcc getting a little smarter about tracking assignments but not smart enough. Marking the ipmi_thread_busy_wait function as inline gives the gcc optimization logic enough information to figure out for itself that the case cannot happen, which gets rid of the warning without adding any fake initialization. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipmi/of: Don't use unavailable interfacesBenjamin Herrenschmidt2014-10-07
| | | | | | | | | If an IPMI controller is used by the firmware and as such marked with a reserved status, we shouldn't use it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>