aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/configs/sn2_defconfig
Commit message (Expand)AuthorAge
* [IA64] update sn2 defconfig to 64kb pagesJes Sorensen2007-10-29
* task cgroups: enable cgroups by default in some configsPaul Jackson2007-10-19
* [IA64] update sn2_defconfigJes Sorensen2007-10-15
* [IA64] Update arch/ia64/configs/* s/SLAB/SLUB/Christoph Lameter2007-08-13
* [IA64] Convert to generic timekeeping/clocksourceTony Luck2007-07-20
* [IA64] update sn2_defconfigJes Sorensen2006-10-17
* [PATCH] sgiioc4: Always share IRQBrent Casavant2006-07-31
* [IA64] sn2 defconfigJes Sorensen2006-05-17
* [IA64] update sn2 defconfigJes Sorensen2006-04-27
* [IA64] Increase max node count on SN platformsJack Steiner2006-03-24
* [IA64] refresh default config filesTony Luck2006-02-27
* [PATCH] Altix: ioc3 serial supportPatrick Gefre2006-01-14
* [IA64-SGI] change default_sn2 to NR_CPUS==1024hawkes@sgi.com2005-12-16
* [IA64] Updates to the sn2_defconfig for 2.6.15.Robin Holt2005-12-02
* [IA64] 4-level page tablesRobin Holt2005-11-11
* [IA64] Manual merge fix for 3 filesTony Luck2005-09-08
|\
| * [ACPI] delete CONFIG_ACPI_PCILen Brown2005-08-25
| * [ACPI] IA64-related ACPI Kconfig fixesLen Brown2005-08-25
| * [ACPI] delete CONFIG_ACPI_BUSLen Brown2005-08-24
| * [ACPI] delete CONFIG_ACPI_INTERPRETERLen Brown2005-08-24
| * [ACPI] delete CONFIG_ACPI_BOOTLen Brown2005-08-24
* | [IA64] Minor cleanups - remove CONFIG_ACPI_DEALLOCATE_IRQKenji Kaneshige2005-09-07
|/
* [IA64] Refresh arch/ia64/configs/sn2_defconfig.Greg Edwards2005-08-16
* [IA64] remove CONFIG_IA64_SGI_SN_SIMGreg Edwards2005-07-12
* [IA64-SGI] altix: enable vgacon supportMark Maule2005-06-28
* [PATCH] update all defconfigs for ARCH_DISCONTIGMEM_ENABLEDave Hansen2005-06-23
* [PATCH] ioc4: CONFIG splitBrent Casavant2005-06-21
* [IA64-SGI] Bus driver for the CX port of SGI's TIO chip.Bruce Losure2005-04-25
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-16
href='/cgit/cgit.cgi/litmus-rt-budgetable-locks.git/.git/commit/kernel/freezer.c?h=update_litmus_2019&id=a0acae0e886d44bd5ce6d2f173c1ace0fcf0d9f6'>a0acae0e886d
8174f1503f4b




37ad8aca94a1



8174f1503f4b


839e3407d90a

8174f1503f4b
37f08be11be9


839e3407d90a


8174f1503f4b
839e3407d90a
8174f1503f4b
0c9af0926286
0c9af0926286
613f5d13b569











0c9af0926286
a3201227f803



8174f1503f4b
5d8f72b55c27
8cfe400ca54f
5d8f72b55c27
8174f1503f4b
a3201227f803
0c9af0926286
a3201227f803
8174f1503f4b

a5be2d0d1a87
dc52ddc0e6f4
0c9af0926286
a5be2d0d1a87
6907483b4e80





0c9af0926286
34b087e48367
a5be2d0d1a87
0c9af0926286
dc52ddc0e6f4
96ee6d8539c9

34b087e48367
96ee6d8539c9


34b087e48367
96ee6d8539c9









96ee6d8539c9



34b087e48367
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182







                                                  
                         

                           
                          
 







                                                                      





                                                                      

                                              
 










                                                                               
                                                       




                                                    
                                                    





                                  
                                                                  
                                         


                                                                       
                                
                                   
 

                                                             

                                                        


                                             
                                         
                                                               



                                                     
                              
                                  

                           
 
                                                          






                                                                       

                          
 
                              




                                                      



                                               


   

                                                    
  


                                                                         


                                                                    
   
                                       
 
                            
 











                                                                              
                                                



                                                             
 
                                     
                                       
            
                                                     
 
                                                     
                    

 
                                       
 
                            
 





                                                                           
                                                
                      
                                   
                                                     
 

   
                                          


                                                               
                        









                                                                     



                                       
                             
/*
 * kernel/freezer.c - Function to freeze a process
 *
 * Originally from kernel/power/process.c
 */

#include <linux/interrupt.h>
#include <linux/suspend.h>
#include <linux/export.h>
#include <linux/syscalls.h>
#include <linux/freezer.h>
#include <linux/kthread.h>

/* total number of freezing conditions in effect */
atomic_t system_freezing_cnt = ATOMIC_INIT(0);
EXPORT_SYMBOL(system_freezing_cnt);

/* indicate whether PM freezing is in effect, protected by pm_mutex */
bool pm_freezing;
bool pm_nosig_freezing;

/*
 * Temporary export for the deadlock workaround in ata_scsi_hotplug().
 * Remove once the hack becomes unnecessary.
 */
EXPORT_SYMBOL_GPL(pm_freezing);

/* protects freezing and frozen transitions */
static DEFINE_SPINLOCK(freezer_lock);

/**
 * freezing_slow_path - slow path for testing whether a task needs to be frozen
 * @p: task to be tested
 *
 * This function is called by freezing() if system_freezing_cnt isn't zero
 * and tests whether @p needs to enter and stay in frozen state.  Can be
 * called under any context.  The freezers are responsible for ensuring the
 * target tasks see the updated state.
 */
bool freezing_slow_path(struct task_struct *p)
{
	if (p->flags & (PF_NOFREEZE | PF_SUSPEND_TASK))
		return false;

	if (pm_nosig_freezing || cgroup_freezing(p))
		return true;

	if (pm_freezing && !(p->flags & PF_KTHREAD))
		return true;

	return false;
}
EXPORT_SYMBOL(freezing_slow_path);

/* Refrigerator is place where frozen processes are stored :-). */
bool __refrigerator(bool check_kthr_stop)
{
	/* Hmm, should we be allowed to suspend when there are realtime
	   processes around? */
	bool was_frozen = false;
	long save = current->state;

	pr_debug("%s entered refrigerator\n", current->comm);

	for (;;) {
		set_current_state(TASK_UNINTERRUPTIBLE);

		spin_lock_irq(&freezer_lock);
		current->flags |= PF_FROZEN;
		if (!freezing(current) ||
		    (check_kthr_stop && kthread_should_stop()))
			current->flags &= ~PF_FROZEN;
		spin_unlock_irq(&freezer_lock);

		if (!(current->flags & PF_FROZEN))
			break;
		was_frozen = true;
		schedule();
	}

	pr_debug("%s left refrigerator\n", current->comm);

	/*
	 * Restore saved task state before returning.  The mb'd version
	 * needs to be used; otherwise, it might silently break
	 * synchronization which depends on ordered task state change.
	 */
	set_current_state(save);

	return was_frozen;
}
EXPORT_SYMBOL(__refrigerator);

static void fake_signal_wake_up(struct task_struct *p)
{
	unsigned long flags;

	if (lock_task_sighand(p, &flags)) {
		signal_wake_up(p, 0);
		unlock_task_sighand(p, &flags);
	}
}

/**
 * freeze_task - send a freeze request to given task
 * @p: task to send the request to
 *
 * If @p is freezing, the freeze request is sent either by sending a fake
 * signal (if it's not a kernel thread) or waking it up (if it's a kernel
 * thread).
 *
 * RETURNS:
 * %false, if @p is not freezing or already frozen; %true, otherwise
 */
bool freeze_task(struct task_struct *p)
{
	unsigned long flags;

	/*
	 * This check can race with freezer_do_not_count, but worst case that
	 * will result in an extra wakeup being sent to the task.  It does not
	 * race with freezer_count(), the barriers in freezer_count() and
	 * freezer_should_skip() ensure that either freezer_count() sees
	 * freezing == true in try_to_freeze() and freezes, or
	 * freezer_should_skip() sees !PF_FREEZE_SKIP and freezes the task
	 * normally.
	 */
	if (freezer_should_skip(p))
		return false;

	spin_lock_irqsave(&freezer_lock, flags);
	if (!freezing(p) || frozen(p)) {
		spin_unlock_irqrestore(&freezer_lock, flags);
		return false;
	}

	if (!(p->flags & PF_KTHREAD))
		fake_signal_wake_up(p);
	else
		wake_up_state(p, TASK_INTERRUPTIBLE);

	spin_unlock_irqrestore(&freezer_lock, flags);
	return true;
}

void __thaw_task(struct task_struct *p)
{
	unsigned long flags;

	/*
	 * Clear freezing and kick @p if FROZEN.  Clearing is guaranteed to
	 * be visible to @p as waking up implies wmb.  Waking up inside
	 * freezer_lock also prevents wakeups from leaking outside
	 * refrigerator.
	 */
	spin_lock_irqsave(&freezer_lock, flags);
	if (frozen(p))
		wake_up_process(p);
	spin_unlock_irqrestore(&freezer_lock, flags);
}

/**
 * set_freezable - make %current freezable
 *
 * Mark %current freezable and enter refrigerator if necessary.
 */
bool set_freezable(void)
{
	might_sleep();

	/*
	 * Modify flags while holding freezer_lock.  This ensures the
	 * freezer notices that we aren't frozen yet or the freezing
	 * condition is visible to try_to_freeze() below.
	 */
	spin_lock_irq(&freezer_lock);
	current->flags &= ~PF_NOFREEZE;
	spin_unlock_irq(&freezer_lock);

	return try_to_freeze();
}
EXPORT_SYMBOL(set_freezable);