Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751694AbbEFRXm (ORCPT ); Wed, 6 May 2015 13:23:42 -0400 Received: from mail-ob0-f177.google.com ([209.85.214.177]:35093 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbbEFRXl (ORCPT ); Wed, 6 May 2015 13:23:41 -0400 MIME-Version: 1.0 In-Reply-To: <554A0E26.1030605@acm.org> References: <554A0E26.1030605@acm.org> Date: Wed, 6 May 2015 10:23:40 -0700 Message-ID: Subject: Re: [Openipmi-developer] Shutdown behavior with IPMI enabled From: Mandeep Sandhu To: minyard@acm.org Cc: openipmi-developer@lists.sourceforge.net, linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2548 Lines: 66 >> >> I have access to the BMC firmware and I saw that the way BMC handles >> "chassis power off" is by emulating a power button press for 6 >> seconds. But since the host already shuts down in the meantime, the >> button press ends up power up the system again! > > Well that's a very unusual interpretation of "power off". How do you think power off should've been handled by the BMC? Should it have requested the BIOS to put the CPU in the power off state (S5)? Mine is an Intel system and I guess the kernel too requests the BIOS for putting the CPU in S5 state (by writing to some BIOS register). > > Well, theoretically, if the power off function completes, the system > should be powered off and therefore nothing else should run. So there's > no real provision for not calling the other power off functions. I went through the code of ipmi_poweroff module and it seems that the driver ends up replacing the "pm_power_off" function with it's own ipmi_poweroff_function. So I assume only the IPMI power action should be performed. But it seems that there's some other path during the shutdown sequence which also switches off the system. If I disable ACPI (via kernel cmdline), then the kernel power off does not happen, and only IPMI is used. > >> If the host can shut itself down, it should not ask the BMC to do a >> power off or vice-versa. > > I"m not sure I have a great solution. You can, of course, not use the > ipmi_poweroff module. I'm not sure of the utility of it in a modern > system. In the past, before reliable ACPI and such, some systems didn't > have reliable power off function and IPMI was the only way to accomplish > this in some cases. Which is why the function exists. Thanks for giving a background context to the poweroff module. I wasn't sure why or when is it needed. > > Another option would be to spin in the ipmi power off function forever. > I'm not sure I like that option, either. > > It might be best to remove, or at least disable normally, the config > option in most systems. That way systems that really needed it could > have it, but it wouldn't affect most people. Which config option do you refer to here? Something that disables the IPMI power off function? Thanks for your time. Regards, -mandeep > > -corey > >> >> Thanks, >> -mandeep -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/