#
337121 |
|
02-Aug-2018 |
avg |
MFC r335934: remove unneeded inclusion of sys/interrupt.h from several files
|
#
327556 |
|
04-Jan-2018 |
jkim |
MFC: r324501
Do not check whether AcpiOsGetTimer() is called during boot.
|
#
320744 |
|
06-Jul-2017 |
markj |
MFC r320690: Defer ACPI taskqueue creation to SI_SUB_KICK_SCHEDULER.
PR: 220277
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298714 |
|
27-Apr-2016 |
jkim |
Merge ACPICA 20160422.
|
#
272360 |
|
01-Oct-2014 |
will |
Add sysctl to track the resource consumption of ACPI interrupts.
Submitted by: gibbs MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: 636827 on 2012/09/28
|
#
267992 |
|
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
#
267985 |
|
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
#
267961 |
|
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
#
264883 |
|
24-Apr-2014 |
smh |
Remove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox
MFC after: 2 weeks X-MFC-With: r264849
|
#
264849 |
|
23-Apr-2014 |
smh |
Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their values can be viewed.
|
#
246042 |
|
28-Jan-2013 |
jkim |
Fix two misusages of return_*() macros for ACPICA.
Noticed by: avg
|
#
246041 |
|
28-Jan-2013 |
jkim |
Fix white spaces for style consistency.
|
#
235945 |
|
24-May-2012 |
jkim |
Merge ACPICA 20120518.
|
#
232132 |
|
24-Feb-2012 |
jkim |
Fix a long-standing bug for AcpiOsGetTimer(). time_t is 32-bit on i386 and it needs proper casting before multiplication.
MFC after: 3 days
|
#
227293 |
|
07-Nov-2011 |
ed |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
|
#
217236 |
|
10-Jan-2011 |
jkim |
Prefer KASSERT(9) over panic(9) as it was never seen in reality.
|
#
202771 |
|
21-Jan-2010 |
jkim |
Merge ACPICA 20100121.
|
#
194011 |
|
11-Jun-2009 |
jkim |
- Remove unnecessary read memory barriers from atomic operations[1]. - Define a macro to make my intention more clearer.
Submitted by: jhb [1]
|
#
193963 |
|
10-Jun-2009 |
jkim |
Catch up with r193750 (OsdSynch.c locking changes):
- Preallocate some memory for ACPI tasks early enough. We cannot use malloc(9) any more because spin mutex may be held here. The reserved memory can be tuned via debug.acpi.max_tasks tunable or ACPI_MAX_TASKS in kernel configuration. The default is 32 tasks. - Implement a custom taskqueue_fast to wrap the new memory allocation. This implementation is not the fastest in the world but we are being conservative here.
|
#
193530 |
|
05-Jun-2009 |
jkim |
Import ACPICA 20090521.
|
#
184596 |
|
03-Nov-2008 |
mav |
Remove " + 1". Thread ID can't be zero anyway while increment may give owerflow.
|
#
184558 |
|
02-Nov-2008 |
mav |
As soon as we have several threads per process now, it is not correct to use process ID as ACPI thread ID. Concurrent requests with equal thread IDs broke ACPI mutexes operation causing unpredictable errors including AE_AML_MUTEX_NOT_ACQUIRED that I have seen.
Use kernel thread ID instead of process ID for ACPI thread.
|
#
175256 |
|
12-Jan-2008 |
njl |
Fix GPE livelock that occurs on HP/Compaq laptops, mostly in the thermal zone code. The GPE handler method (i.e. _L00) generates various Notify events that need to be run to completion before the GPE is re-enabled. In ACPI-CA, we queue an asynch callback at the same priority as a Notify so that it will only run after all Notify handlers have completed. The callback re-enables the GPE afterwards. We also changed the priority of Notifies to be the same as GPEs, given the possibility that another GPE could arrive before the Notifies have completed and we don't want it to get queued ahead of the rest.
The ACPI-CA change was submitted by Alexey Starikovskiy (SUSE) and will appear in a later release. Special thanks to him for helping track this bug down.
MFC after: 1 week Tested by: jhb, Yousif Hassan <yousif / alumni.jmu.edu>
|
#
167814 |
|
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
#
166909 |
|
23-Feb-2007 |
jhb |
Use 'pause' in several places rather than trying to tsleep() on NULL (which triggers a KASSERT) or local variables. In the case of kern_ndis, the tsleep() actually used a common sleep address (curproc) making it susceptible to a premature wakeup.
|
#
158651 |
|
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
#
157307 |
|
30-Mar-2006 |
scottl |
Revert to using acpi_max_threads instead of the hardcoded value of '3'.
|
#
154333 |
|
13-Jan-2006 |
scottl |
Add the following to the taskqueue api:
taskqueue_start_threads(struct taskqueue **, int count, int pri, const char *name, ...);
This allows the creation of 1 or more threads that will service a single taskqueue. Also rework the taskqueue_create() API to remove the API change that was introduced a while back. Creating a taskqueue doesn't rely on the presence of a process structure, and the proc mechanics are much better encapsulated in taskqueue_start_threads(). Also clean up the taskqueue_terminate() and taskqueue_free() functions to safely drain pending tasks and remove all associated threads.
The TASKQUEUE_DEFINE and TASKQUEUE_DEFINE_THREAD macros have been changed to use the new API, but drivers compiled against the old definitions will still work. Thus, recompiling drivers is not a strict requirement.
|
#
150003 |
|
11-Sep-2005 |
obrien |
Canonize the include of acpi.h.
|
#
148318 |
|
22-Jul-2005 |
njl |
Standardize __FBSDID identifiers.
MFC after: 2 days
|
#
146021 |
|
09-May-2005 |
marks |
Simplify the ACPI taskqueue implementation. Use a thread queue type instead of swi. This allows us to use the taskqueue_thread_* functions instead of rolling our own. It also avoids a double trip through the queue.
Submitted by: njl Reviewed by: sam
|
#
145352 |
|
21-Apr-2005 |
njl |
Add the tunable "debug.acpi.max_threads" to allow users to set the number of task threads to start on boot. Go back to a default of 3 threads to work around lost battery state problems. Users that need a setting of 1 can set this via the tunable. I am investigating the underlying issues and this tunable can be removed once they are solved.
MFC after: 2 days
|
#
138300 |
|
01-Dec-2004 |
marks |
Catch up with AcpiOsSleep() interface change. Catch up with some #define's renaming. Implement AcpiOsGetTimer() as per ACPI 3.0.
Approved by: njl MFC after: 1 week
|
#
133627 |
|
13-Aug-2004 |
njl |
MPSAFE locking
* Simplify taskqueue locking. * Don't acquire Giant around calls to the taskqueue function. * Remove 4.x compatibility routines.
|
#
128990 |
|
06-May-2004 |
njl |
Make unnecessary globals static and remove unused includes.
Pointed out by: cscout
|
#
128228 |
|
14-Apr-2004 |
njl |
Style cleanups, M_ZERO instead of bzero.
|
#
120662 |
|
02-Oct-2003 |
njl |
If requested to Sleep for less than our hz granularity (e.g., 10 ms), use DELAY instead of tsleep.
Submitted by: peter
|
#
120607 |
|
30-Sep-2003 |
njl |
Revert 1.24. It causes a hang on shutdown for Marcel. This is due to AcpiEnterSleepState() calling a long AcpiOsStall() with interrupts disabled. This fix will instead be added to ACPI-CA.
PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
|
#
120571 |
|
29-Sep-2003 |
njl |
If asked to stall for more than 100 us (which is specified as the max in the ACPI standard), call sleep instead since that is probably what the caller meant.
Mentioned by: peter
|
#
106255 |
|
31-Oct-2002 |
iwasaki |
Invoke 3 ACPI task threads as default if option ACPI_MAX_THREADS is not defined. To make previous default behavior (ACPI_MAX_THREADS undefined), define option ACPI_MAX_THREADS as 0.
|
#
105279 |
|
16-Oct-2002 |
jhb |
- In AcpiOsGetThreadId(), allow for curproc to be NULL on 4-stable systems. In that case use proc0's pid to return the thread ID. - For 4-stable, use the generic swi taskqueue for ACPI events rather than implementing our own.
Sponsored by: The Weather Channel
|
#
104354 |
|
02-Oct-2002 |
scottl |
Some kernel threads try to do significant work, and the default KSTACK_PAGES doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates.
Reviewed by: jake, peter, jhb
|
#
96926 |
|
19-May-2002 |
peter |
Brutally deal with __func__ being 'const char *' on gcc-3.1.
|
#
93818 |
|
04-Apr-2002 |
jhb |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
#
92119 |
|
11-Mar-2002 |
peter |
Do not do string concatenation with __func__ (which is not a string)
|
#
91128 |
|
23-Feb-2002 |
msmith |
Match namespace cleanup changes in ACPI CA 20020217 update.
|
#
88900 |
|
05-Jan-2002 |
jhb |
Change the preemption code for software interrupt thread schedules and mutex releases to not require flags for the cases when preemption is not allowed:
The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent switching to a higher priority thread on mutex releease and swi schedule, respectively when that switch is not safe. Now that the critical section API maintains a per-thread nesting count, the kernel can easily check whether or not it should switch without relying on flags from the programmer. This fixes a few bugs in that all current callers of swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from fast interrupt handlers and the swi_sched of softclock needed this flag. Note that to ensure that swi_sched()'s in clock and fast interrupt handlers do not switch, these handlers have to be explicitly wrapped in critical_enter/exit pairs. Presently, just wrapping the handlers is sufficient, but in the future with the fully preemptive kernel, the interrupt must be EOI'd before critical_exit() is called. (critical_exit() can switch due to a deferred preemption in a fully preemptive kernel.)
I've tested the changes to the interrupt code on i386 and alpha. I have not tested ia64, but the interrupt code is almost identical to the alpha code, so I expect it will work fine. PowerPC and ARM do not yet have interrupt code in the tree so they shouldn't be broken. Sparc64 is broken, but that's been ok'd by jake and tmm who will be fixing the interrupt code for sparc64 shortly.
Reviewed by: peter Tested on: i386, alpha
|
#
88420 |
|
22-Dec-2001 |
iwasaki |
Add OS layer ACPI mutex and threading support. - Temporary fix a bug of Intel ACPI CA core code. - Add OS layer ACPI mutex support. This can be disabled by specifying option ACPI_NO_SEMAPHORES. - Add ACPI threading support. Now that we have a dedicate taskqueue for ACPI tasks and more ACPI task threads can be created by specifying option ACPI_MAX_THREADS. - Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given caller's buffer unless AE_BUFFER_OVERFLOW occurs. Also CM battery's evaluations were changed to use acpi_EvaluateIntoBuffer(). - Add new utility function acpi_ConvertBufferToInteger(). - Add simple locking for CM battery and temperature updating. - Fix a minor problem on EC locking. - Make the thermal zone polling rate to be changeable. - Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case, entering Debugger is easier to investigate the problem rather than panic.
|
#
85560 |
|
26-Oct-2001 |
jhb |
- Change the taskqueue locking to protect the necessary parts of a task while it is on a queue with the queue lock and remove the per-task locks. - Remove TASK_DESTROY now that it is no longer needed. - Go back to inlining TASK_INIT now that it is short again.
Inspired by: dfr
|
#
85521 |
|
26-Oct-2001 |
jhb |
Add locking to taskqueues. There is one mutex per task, one mutex per queue, and a mutex to protect the global list of taskqueues. The only visible change is that a TASK_DESTROY() macro has been added to mirror the TASK_INIT() macro to destroy a task before it is free'd.
Submitted by: Andrew Reiter <awr@watson.org>
|
#
85503 |
|
25-Oct-2001 |
jhb |
Use TASK_INIT to initialize taskqueue task instead of violating the abstraction.
Submitted by: Andrew Reiter <arr@watson.org>
|
#
83218 |
|
08-Sep-2001 |
iwasaki |
Don't call tsleep from AcpiOsStall(), call DELAY() always instead. Process switching during calling AcpiOsStall() caused fatal trap 12 at sleeping/wakeup on some machines.
|
#
80071 |
|
21-Jul-2001 |
msmith |
Update the OSD module to match the ACPI CA 20010717 import.
Submitted by: "Grover, Andrew" <andrew.grover@intel.com> (OsdHardware.c)
|
#
77466 |
|
30-May-2001 |
msmith |
What I get for "fixing" at the last minute. Correct a mis-merge of takawata's timeout fix and put proc.h into the right file.
Submitted by: nnd@mail.nsk.ru
|
#
77432 |
|
29-May-2001 |
msmith |
- Updates for new constant naming in the ACPI CA 20010518 update. - Use __func__ instead of __FUNCTION. - Support power-off to S3 or S5 (takawata) - Enable ACPI debugging earlier (with a sysinit) - Fix a deadlock in the EC code (takawata) - Improve arithmetic and reduce the risk of spurious wakeup in AcpiOsSleep. - Add AcpiOsGetThreadId. - Simplify mutex code (still disabled).
|
#
72376 |
|
11-Feb-2001 |
jake |
Implement a unified run queue and adjust priority levels accordingly.
- All processes go into the same array of queues, with different scheduling classes using different portions of the array. This allows user processes to have their priorities propogated up into interrupt thread range if need be. - I chose 64 run queues as an arbitrary number that is greater than 32. We used to have 4 separate arrays of 32 queues each, so this may not be optimal. The new run queue code was written with this in mind; changing the number of run queues only requires changing constants in runq.h and adjusting the priority levels. - The new run queue code takes the run queue as a parameter. This is intended to be used to create per-cpu run queues. Implement wrappers for compatibility with the old interface which pass in the global run queue structure. - Group the priority level, user priority, native priority (before propogation) and the scheduling class into a struct priority. - Change any hard coded priority levels that I found to use symbolic constants (TTIPRI and TTOPRI). - Remove the curpriority global variable and use that of curproc. This was used to detect when a process' priority had lowered and it should yield. We now effectively yield on every interrupt. - Activate propogate_priority(). It should now have the desired effect without needing to also propogate the scheduling class. - Temporarily comment out the call to vm_page_zero_idle() in the idle loop. It interfered with propogate_priority() because the idle process needed to do a non-blocking acquire of Giant and then other processes would try to propogate their priority onto it. The idle process should not do anything except idle. vm_page_zero_idle() will return in the form of an idle priority kernel thread which is woken up at apprioriate times by the vm system. - Update struct kinfo_proc to the new priority interface. Deliberately change its size by adjusting the spare fields. It remained the same size, but the layout has changed, so userland processes that use it would parse the data incorrectly. The size constraint should really be changed to an arbitrary version number. Also add a debug.sizeof sysctl node for struct kinfo_proc.
|
#
71875 |
|
31-Jan-2001 |
msmith |
Add some debugging statements.
|
#
71418 |
|
23-Jan-2001 |
peter |
In answer to the comment: /* XXX is it OK to block here? */, the answer is definately NO! as we are in interrupt context and malloc() does a KASSERT() to be sure.
|
#
70247 |
|
21-Dec-2000 |
takawata |
Re-Enable OSD_PRIORITY_GPE. Now 20001215 has been commited.
|
#
70237 |
|
20-Dec-2000 |
iwasaki |
Disable my previous committed code for a moment.
Note to myself: this needs to be enabled again when newer version of ACPI is imported.
|
#
70236 |
|
20-Dec-2000 |
iwasaki |
Add task priority definition for OSD_PRIORITY_GPE in AcpiOsQueueForExecution(). This is needed to next ACPICA import.
|
#
67760 |
|
28-Oct-2000 |
msmith |
FreeBSD-specific OSD (operating system dependant) modules for the Intel ACPICA code.
|