search for: orderly_poweroff

Displaying 20 results from an estimated 41 matches for "orderly_poweroff".

2013 Nov 08
4
[PATCH 3/4] xen/manage: Guard against user-space initiated poweroff and XenBus.
...p making a duplicate call to kernel_power_off. There is no locking there so we walk in the same steps as what ''poweroff'' has been doing. The code in kernel/reboot.c has a mutex guarding against multiple ''poweroff'' operations. But not against the kernel ''orderly_poweroff''. As such, lets detect this so that we don''t invoke orderly_poweroff if the user had initiated a poweroff. This is code by changing the ''shutting_down'' to an atomic and having a reboot notifier. If the ''shutting_down'' is set to anything but SH...
2013 Feb 03
1
[PATCH 1/3] drm/nouveau/therm: turn on a fan only when crossing threshold in positive direction
...de(therm, NOUVEAU_THERM_CTRL_AUTO); + } break; case NOUVEAU_THERM_THRS_DOWNCLOCK: if (priv->emergency.downclock) @@ -126,7 +128,8 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm, priv->emergency.pause(therm, active); break; case NOUVEAU_THERM_THRS_SHUTDOWN: - orderly_poweroff(true); + if (active) + orderly_poweroff(true); break; case NOUVEAU_THERM_THRS_NR: break; -- 1.8.1
2016 Oct 25
2
noveau: emergency shutdown handling is overcomplex and broken
...subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); + /* FIXME: + 1) this is total overkill, orderly_poweroff() already + uses schedule_work internally + 2) it would be good to at least printk what is going on + */ if (work) { INIT_WORK(work, nv_poweroff_work); schedule_work(work); GFP_ATOMIC is not reliable. Plus, see the fixme. Best regards, Pavel -- (engl...
2010 Dec 13
3
[PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize
...ontext) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, shut_txf_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +149,25 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2010 Dec 13
3
[PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize
...ontext) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, shut_txf_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +149,25 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2016 Oct 25
0
noveau: emergency shutdown handling is overcomplex and broken
...erm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, > struct work_struct *work; > > work = kmalloc(sizeof(*work), GFP_ATOMIC); > + /* FIXME: > + 1) this is total overkill, orderly_poweroff() already > + uses schedule_work internally > + 2) it would be good to at least printk what is going on > + */ > if (work) { > INIT_WORK(work, nv_poweroff_...
2017 Sep 23
0
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling
...120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); + /* FIXME: + 1) this is total overkill, orderly_poweroff() already + uses schedule_work internally + 2) it would be good to at least printk what is going on + */ if (work) { INIT_WORK(work, nv_poweroff_work);...
2010 May 05
1
[PATCH 1/1] staging: hv: Add Time Sync feature to hv_utils module
...XPORT_SYMBOL(hv_cb_utils); diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c index cbebad3..9174f79 100644 --- a/drivers/staging/hv/hyperv_utils.c +++ b/drivers/staging/hv/hyperv_utils.c @@ -106,6 +106,82 @@ static void shutdown_onchannelcallback(void *context) orderly_poweroff(false); } + +/* + * Synchronize time with host after reboot, restore, etc. + */ +static void adj_guesttime(winfiletime_t hosttime, u8 flags) +{ + s64 host_tns; + struct timespec host_ts; + static s32 scnt = 50; + + host_tns = (hosttime - WLTIMEDELTA) * 100; + host_ts = ns_to_timespec(host_tns);...
2010 May 05
1
[PATCH 1/1] staging: hv: Add Time Sync feature to hv_utils module
...XPORT_SYMBOL(hv_cb_utils); diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c index cbebad3..9174f79 100644 --- a/drivers/staging/hv/hyperv_utils.c +++ b/drivers/staging/hv/hyperv_utils.c @@ -106,6 +106,82 @@ static void shutdown_onchannelcallback(void *context) orderly_poweroff(false); } + +/* + * Synchronize time with host after reboot, restore, etc. + */ +static void adj_guesttime(winfiletime_t hosttime, u8 flags) +{ + s64 host_tns; + struct timespec host_ts; + static s32 scnt = 50; + + host_tns = (hosttime - WLTIMEDELTA) * 100; + host_ts = ns_to_timespec(host_tns);...
2010 Nov 22
6
[PATCH 2/3]: An Implementation of HyperV KVP functionality
The hv_utils module will be composed of more than one file; rename hv_utils.c to accommodate this without changing the module name. Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hv_util_cleanup.patch Url:
2010 Nov 22
6
[PATCH 2/3]: An Implementation of HyperV KVP functionality
The hv_utils module will be composed of more than one file; rename hv_utils.c to accommodate this without changing the module name. Signed-off-by: K. Y. Srinivasan <ksrinivasan at novell.com> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hv_util_cleanup.patch Url:
2010 Dec 13
3
[PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize
...ontext) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, shut_txf_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +149,25 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2010 Dec 13
3
[PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize
...ontext) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, shut_txf_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +149,25 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2010 Dec 13
2
[PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize
...d *context) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, chan_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +148,24 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2010 Dec 13
2
[PATCH 1/1] hv: Use only one receive buffer and kmalloc on initialize
...d *context) icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION | ICMSGHDRFLAG_RESPONSE; - vmbus_sendpacket(channel, buf, + vmbus_sendpacket(channel, chan_buf, recvlen, requestid, VmbusPacketTypeDataInBand, 0); } - kfree(buf); - if (execute_shutdown == true) orderly_poweroff(false); } @@ -150,28 +148,24 @@ static inline void adj_guesttime(u64 hosttime, u8 flags) static void timesync_onchannelcallback(void *context) { struct vmbus_channel *channel = context; - u8 *buf; - u32 buflen, recvlen; + u32 recvlen; u64 requestid; struct icmsg_hdr *icmsghdrp; struct ic...
2010 Apr 28
1
[PATCH 1/1] hv: Added new hv_utils driver to hyper-v
...c., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + * + * Authors: + * Haiyang Zhang <haiyangz at microsoft.com> + * Hank Janssen <hjanssen at microsoft.com> + */ +#include <linux/reboot.h> +#include "utils.h" + +void shutdown_linux_system() +{ + orderly_poweroff(false); +} diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c new file mode 100644 index 0000000..2a48647 --- /dev/null +++ b/drivers/staging/hv/hyperv_utils.c @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2010, Microsoft Corporation. + * + * This program is free software;...
2010 Apr 28
1
[PATCH 1/1] hv: Added new hv_utils driver to hyper-v
...c., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + * + * Authors: + * Haiyang Zhang <haiyangz at microsoft.com> + * Hank Janssen <hjanssen at microsoft.com> + */ +#include <linux/reboot.h> +#include "utils.h" + +void shutdown_linux_system() +{ + orderly_poweroff(false); +} diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c new file mode 100644 index 0000000..2a48647 --- /dev/null +++ b/drivers/staging/hv/hyperv_utils.c @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2010, Microsoft Corporation. + * + * This program is free software;...
2010 May 04
2
[PATCH 1/1] hv: Added new hv_utils driver with shutdown as first functionality - NO OUTLOOK
...on, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + * + * Authors: + * Haiyang Zhang <haiyangz at microsoft.com> + * Hank Janssen <hjanssen at microsoft.com> + */ +#include <linux/reboot.h> +#include "utils.h" + +void shutdown_linux_system() +{ + orderly_poweroff(false); +} diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c new file mode 100644 index 0000000..2a48647 --- /dev/null +++ b/drivers/staging/hv/hyperv_utils.c @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2010, Microsoft Corporation. + * + * This program is free software;...
2010 May 04
2
[PATCH 1/1] hv: Added new hv_utils driver with shutdown as first functionality - NO OUTLOOK
...on, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + * + * Authors: + * Haiyang Zhang <haiyangz at microsoft.com> + * Hank Janssen <hjanssen at microsoft.com> + */ +#include <linux/reboot.h> +#include "utils.h" + +void shutdown_linux_system() +{ + orderly_poweroff(false); +} diff --git a/drivers/staging/hv/hyperv_utils.c b/drivers/staging/hv/hyperv_utils.c new file mode 100644 index 0000000..2a48647 --- /dev/null +++ b/drivers/staging/hv/hyperv_utils.c @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2010, Microsoft Corporation. + * + * This program is free software;...
2011 Aug 27
46
[PATCH 0000/0046] Staging: hv: Driver cleanup
Further cleanup of the hv drivers. 1) Cleanup reference counting. 2) Handle all block devices using the storvsc driver. I have modified the implementation here based on Christoph's feedback on my earlier implementation. 3) Fix bugs. 4) Accomodate some host side scsi emulation bugs. 5) In case of scsi errors off-line the device. This patch-set further reduces the size of