Loading .gitignore +1 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ *.lst *.symtypes *.order modules.builtin *.elf *.bin *.gz Loading @@ -45,14 +46,8 @@ Module.symvers # # Generated include files # include/asm include/asm-*/asm-offsets.h include/config include/linux/autoconf.h include/linux/compile.h include/linux/version.h include/linux/utsrelease.h include/linux/bounds.h include/generated # stgit generated dirs Loading Documentation/ABI/testing/sysfs-bus-usb +10 −8 Original line number Diff line number Diff line Loading @@ -21,25 +21,27 @@ Contact: Alan Stern <stern@rowland.harvard.edu> Description: Each USB device directory will contain a file named power/level. This file holds a power-level setting for the device, one of "on", "auto", or "suspend". the device, either "on" or "auto". "on" means that the device is not allowed to autosuspend, although normal suspends for system sleep will still be honored. "auto" means the device will autosuspend and autoresume in the usual manner, according to the capabilities of its driver. "suspend" means the device is forced into a suspended state and it will not autoresume in response to I/O requests. However remote-wakeup requests from the device may still be enabled (the remote-wakeup setting is controlled separately by the power/wakeup attribute). capabilities of its driver. During normal use, devices should be left in the "auto" level. The other levels are meant for administrative uses. level. The "on" level is meant for administrative uses. If you want to suspend a device immediately but leave it free to wake up in response to I/O requests, you should write "0" to power/autosuspend. Device not capable of proper suspend and resume should be left in the "on" level. Although the USB spec requires devices to support suspend/resume, many of them do not. In fact so many don't that by default, the USB core initializes all non-hub devices in the "on" level. Some drivers may change this setting when they are bound. What: /sys/bus/usb/devices/.../power/persist Date: May 2007 KernelVersion: 2.6.23 Loading Documentation/cpu-hotplug.txt +17 −32 Original line number Diff line number Diff line Loading @@ -315,42 +315,27 @@ A: The following are what is required for CPU hotplug infrastructure to work Q: I need to ensure that a particular cpu is not removed when there is some work specific to this cpu is in progress. A: First switch the current thread context to preferred cpu A: There are two ways. If your code can be run in interrupt context, use smp_call_function_single(), otherwise use work_on_cpu(). Note that work_on_cpu() is slow, and can fail due to out of memory: int my_func_on_cpu(int cpu) { cpumask_t saved_mask, new_mask = CPU_MASK_NONE; int curr_cpu, err = 0; saved_mask = current->cpus_allowed; cpu_set(cpu, new_mask); err = set_cpus_allowed(current, new_mask); if (err) return err; /* * If we got scheduled out just after the return from * set_cpus_allowed() before running the work, this ensures * we stay locked. */ curr_cpu = get_cpu(); if (curr_cpu != cpu) { err = -EAGAIN; goto ret; } else { /* * Do work : But cant sleep, since get_cpu() disables preempt */ } ret: put_cpu(); set_cpus_allowed(current, saved_mask); int err; get_online_cpus(); if (!cpu_online(cpu)) err = -EINVAL; else #if NEEDS_BLOCKING err = work_on_cpu(cpu, __my_func_on_cpu, NULL); #else smp_call_function_single(cpu, __my_func_on_cpu, &err, true); #endif put_online_cpus(); return err; } Q: How do we determine how many CPUs are available for hotplug. A: There is no clear spec defined way from ACPI that can give us that information today. Based on some input from Natalie of Unisys, Loading Documentation/dontdiff +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ gconf gen-devlist gen_crc32table gen_init_cpio generated genheaders genksyms *_gray256.c Loading Documentation/driver-model/driver.txt +2 −2 Original line number Diff line number Diff line Loading @@ -226,5 +226,5 @@ struct driver_attribute driver_attr_debug; This can then be used to add and remove the attribute from the driver's directory using: int driver_create_file(struct device_driver *, struct driver_attribute *); void driver_remove_file(struct device_driver *, struct driver_attribute *); int driver_create_file(struct device_driver *, const struct driver_attribute *); void driver_remove_file(struct device_driver *, const struct driver_attribute *); Loading
.gitignore +1 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ *.lst *.symtypes *.order modules.builtin *.elf *.bin *.gz Loading @@ -45,14 +46,8 @@ Module.symvers # # Generated include files # include/asm include/asm-*/asm-offsets.h include/config include/linux/autoconf.h include/linux/compile.h include/linux/version.h include/linux/utsrelease.h include/linux/bounds.h include/generated # stgit generated dirs Loading
Documentation/ABI/testing/sysfs-bus-usb +10 −8 Original line number Diff line number Diff line Loading @@ -21,25 +21,27 @@ Contact: Alan Stern <stern@rowland.harvard.edu> Description: Each USB device directory will contain a file named power/level. This file holds a power-level setting for the device, one of "on", "auto", or "suspend". the device, either "on" or "auto". "on" means that the device is not allowed to autosuspend, although normal suspends for system sleep will still be honored. "auto" means the device will autosuspend and autoresume in the usual manner, according to the capabilities of its driver. "suspend" means the device is forced into a suspended state and it will not autoresume in response to I/O requests. However remote-wakeup requests from the device may still be enabled (the remote-wakeup setting is controlled separately by the power/wakeup attribute). capabilities of its driver. During normal use, devices should be left in the "auto" level. The other levels are meant for administrative uses. level. The "on" level is meant for administrative uses. If you want to suspend a device immediately but leave it free to wake up in response to I/O requests, you should write "0" to power/autosuspend. Device not capable of proper suspend and resume should be left in the "on" level. Although the USB spec requires devices to support suspend/resume, many of them do not. In fact so many don't that by default, the USB core initializes all non-hub devices in the "on" level. Some drivers may change this setting when they are bound. What: /sys/bus/usb/devices/.../power/persist Date: May 2007 KernelVersion: 2.6.23 Loading
Documentation/cpu-hotplug.txt +17 −32 Original line number Diff line number Diff line Loading @@ -315,42 +315,27 @@ A: The following are what is required for CPU hotplug infrastructure to work Q: I need to ensure that a particular cpu is not removed when there is some work specific to this cpu is in progress. A: First switch the current thread context to preferred cpu A: There are two ways. If your code can be run in interrupt context, use smp_call_function_single(), otherwise use work_on_cpu(). Note that work_on_cpu() is slow, and can fail due to out of memory: int my_func_on_cpu(int cpu) { cpumask_t saved_mask, new_mask = CPU_MASK_NONE; int curr_cpu, err = 0; saved_mask = current->cpus_allowed; cpu_set(cpu, new_mask); err = set_cpus_allowed(current, new_mask); if (err) return err; /* * If we got scheduled out just after the return from * set_cpus_allowed() before running the work, this ensures * we stay locked. */ curr_cpu = get_cpu(); if (curr_cpu != cpu) { err = -EAGAIN; goto ret; } else { /* * Do work : But cant sleep, since get_cpu() disables preempt */ } ret: put_cpu(); set_cpus_allowed(current, saved_mask); int err; get_online_cpus(); if (!cpu_online(cpu)) err = -EINVAL; else #if NEEDS_BLOCKING err = work_on_cpu(cpu, __my_func_on_cpu, NULL); #else smp_call_function_single(cpu, __my_func_on_cpu, &err, true); #endif put_online_cpus(); return err; } Q: How do we determine how many CPUs are available for hotplug. A: There is no clear spec defined way from ACPI that can give us that information today. Based on some input from Natalie of Unisys, Loading
Documentation/dontdiff +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ gconf gen-devlist gen_crc32table gen_init_cpio generated genheaders genksyms *_gray256.c Loading
Documentation/driver-model/driver.txt +2 −2 Original line number Diff line number Diff line Loading @@ -226,5 +226,5 @@ struct driver_attribute driver_attr_debug; This can then be used to add and remove the attribute from the driver's directory using: int driver_create_file(struct device_driver *, struct driver_attribute *); void driver_remove_file(struct device_driver *, struct driver_attribute *); int driver_create_file(struct device_driver *, const struct driver_attribute *); void driver_remove_file(struct device_driver *, const struct driver_attribute *);