aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/sigio.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2015-10-06 18:57:33 -0400
committerRob Herring <robh@kernel.org>2015-10-27 17:12:13 -0400
commit1b7c501b51a8c851ff82769cbe905ef19cb70239 (patch)
tree3085fd663e1a4704fe210298ffe3786609c8210c /arch/um/os-Linux/sigio.c
parent9ffecb10283508260936b96022d4ee43a7798b4c (diff)
of: add config option to enable building of all dtbs
Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs are not really dependent on a platform being enabled or any other kernel config, so for testing coverage it is convenient to build all of the dtbs. In order to only build dtbs, this option can be used by creating an allno.config file containing: CONFIG_COMPILE_TEST=y CONFIG_OF=y CONFIG_OF_ALL_DTBS=y And then running: make KCONFIG_ALLCONFIG=1 allnoconfig make dtbs While building the dtbs themselves don't need a cross compiler, the scripts dependency does need one. This can be hacked around by commenting out "subdir-y += mod" in scripts/Makefile. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch/um/os-Linux/sigio.c')
0 files changed, 0 insertions, 0 deletions
com> 2008-11-05 10:36:15 -0500 committer Avi Kivity <avi@redhat.com> 2008-12-31 09:52:21 -0500 ppc: Create disassemble.h to extract instruction fields' href='/cgit/cgit.cgi/litmus-rt-ext-res.git/commit/arch/powerpc/kvm/emulate.c?id=c381a04313e7c0fb04246b1ff711e0b5726de6c0'>c381a04313e7
9123c5ed45a5
73e75b416ffc
46f43c6ee022
bbf45ba57eae
75f74f0dbe08
bbf45ba57eae
544c6761bb05
dc2babfea592
9a7a9b09fee8
544c6761bb05
dfd4d47e9a71

00c3a37ca332
7706664d39a8


513579e3a391

513579e3a391



dfd4d47e9a71













6e35994d1f68





dfd4d47e9a71



bbf45ba57eae

5ce941ee4258


dfd4d47e9a71





5ce941ee4258


388cf9ee3c75






5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75






388cf9ee3c75





5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75

a3ff5fbc94a8


388cf9ee3c75
cbbc58d4fdfa

388cf9ee3c75

















5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75






388cf9ee3c75











5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75

5deb8e7ad8ac
388cf9ee3c75







cbbc58d4fdfa

388cf9ee3c75













bbf45ba57eae











bbf45ba57eae
75f74f0dbe08

bbf45ba57eae

c7f38f46f2a9
c46dc9a86148



bbf45ba57eae


73e75b416ffc


689fd14ae9b2
513579e3a391
bbf45ba57eae
cea5d8c9de66
00c3a37ca332
513579e3a391
daf5e27109c8
513579e3a391
b59049720dd9

513579e3a391
bbf45ba57eae


bbf45ba57eae


6df79df5b27d











cea5d8c9de66
ac3cd34e4eb9


cea5d8c9de66
bbf45ba57eae


1c85e73303fa
1c85e73303fa
6020c0f6e788
1c85e73303fa

cea5d8c9de66
ac3cd34e4eb9
8e5b26b55a8b
ac3cd34e4eb9


cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae
978b4fae45b3
bbf45ba57eae

1c85e73303fa
1c85e73303fa


cea5d8c9de66
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
388cf9ee3c75
bbf45ba57eae

cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
388cf9ee3c75
bbf45ba57eae

c32498ee6416
d3286144c92e
cea5d8c9de66
bbf45ba57eae






cea5d8c9de66
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae

cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
8e5b26b55a8b
bbf45ba57eae


bbf45ba57eae
75f74f0dbe08
bbf45ba57eae
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae


6c5cb7392981





cea5d8c9de66
bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae


6c5cb7392981







cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae


cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae
6020c0f6e788
bbf45ba57eae

cea5d8c9de66
bbf45ba57eae


cea5d8c9de66
bbf45ba57eae
6020c0f6e788
bbf45ba57eae

3587d5348ced
3587d5348ced



3587d5348ced
6020c0f6e788
3587d5348ced

cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae


cea5d8c9de66
8e5b26b55a8b

bbf45ba57eae
6020c0f6e788
bbf45ba57eae


bbf45ba57eae
75f74f0dbe08


cbbc58d4fdfa

37f5bca64e20


75f74f0dbe08


5f2b105a1d6a
75f74f0dbe08
bbf45ba57eae

c7f38f46f2a9
3b4bd7969f7b
c7f38f46f2a9
bbf45ba57eae
c7f38f46f2a9
bbf45ba57eae


2ba9f0d88750
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486














                                                                            
                                               




                                                 
                          


                           
                             
 
                    


                          
                            
                           
                   
                  
 
                                              
 
                               
                                    
 
                                                

                                                     
                        


                                                            

                                                                  



                                            













                                                                     





                                                                              



                                                                 

 


                                                 





                                


                                   






                                                                        
                                               

                       
                                               






                                                         





                                         
                                                

                        
                                                

                        
                                                

                        
                                                

                      


                                                          
                

                                                                             

















                                                                        
                                                

                       
                                                






                                         











                                                              
                                                 

                        
                                                 

                        
                                                 

                        
                                                 







                                                           

                                                                             













                                                              











             
   

                                                                               

                                                                          
                                              



                                  


                                                      


                                                                     
                                                                            
 
                               
                     
                        
                        
                                                               
     

                                                                            
      


                            


                                        











                                                                          
                                    


                                                                           
                                    


                                                                           
                                     
                                                                           
                                                                            

                              
                                    
                                                                 
                                                                                


                                                             
                                    
                                                                 
                                                                                


                                                             
                                     
                                                                 
                                                                                
                                                             
                                                                            

                              
                                    


                                                                            
                                    


                                                                           
                                     
                                                                           
                                                                            

                              
                                     
                                                                        

                              
                                    
                                                                 
                                                                                


                                                             
                                     
                                                                 
                                                                                
                                                             
                                                                            

                              
                                     
                                                                        

                              
                                     
                                    
                                    






                                                                               
                                     


                                                                           
                                       

                              
                                      
                                                                 
                                                                                


                                                             
                                     


                                                                           
                                      
                                                                 
                                                                                


                                                             
                        
                                                                    
                                                


                      
                    


                                                                   





                                                                                      
                     
                                                                   
                                                                    

                      
                    


                                                                   
                     
                                                                   
                                                                    

                      
                    

                                                                        


                                                     







                                                                                          
                     

                                                                        
                                                     
                                                                    

                      
                    

                                                                        


                                                     
                     

                                                                        
                                                     
                                                                    

                      
                    


                                                                   
                     
                                                                   
                                                                    

                      
                    



                                                                    
                                                                    
                                                                    

                      
                    

                                                                        


                                                     
                     

                                                                        
                                                     
                                                                    


                      
                                        


                                       

                                                                               


                                                      


                                                                                      
                                                           
                 

         
                                                                 
 
                                                
                    
                                                             


                        
                                              
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, version 2, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Copyright IBM Corp. 2007
 * Copyright 2011 Freescale Semiconductor, Inc.
 *
 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
 */

#include <linux/jiffies.h>
#include <linux/hrtimer.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kvm_host.h>
#include <linux/clockchips.h>

#include <asm/reg.h>
#include <asm/time.h>
#include <asm/byteorder.h>
#include <asm/kvm_ppc.h>
#include <asm/disassemble.h>
#include <asm/ppc-opcode.h>
#include "timing.h"
#include "trace.h"

void kvmppc_emulate_dec(struct kvm_vcpu *vcpu)
{
	unsigned long dec_nsec;
	unsigned long long dec_time;

	pr_debug("mtDEC: %x\n", vcpu->arch.dec);
	hrtimer_try_to_cancel(&vcpu->arch.dec_timer);

#ifdef CONFIG_PPC_BOOK3S
	/* mtdec lowers the interrupt line when positive. */
	kvmppc_core_dequeue_dec(vcpu);

	/* POWER4+ triggers a dec interrupt if the value is < 0 */
	if (vcpu->arch.dec & 0x80000000) {
		kvmppc_core_queue_dec(vcpu);
		return;
	}
#endif

#ifdef CONFIG_BOOKE
	/* On BOOKE, DEC = 0 is as good as decrementer not enabled */
	if (vcpu->arch.dec == 0)
		return;
#endif

	/*
	 * The decrementer ticks at the same rate as the timebase, so
	 * that's how we convert the guest DEC value to the number of
	 * host ticks.
	 */

	dec_time = vcpu->arch.dec;
	/*
	 * Guest timebase ticks at the same frequency as host decrementer.
	 * So use the host decrementer calculations for decrementer emulation.
	 */
	dec_time = dec_time << decrementer_clockevent.shift;
	do_div(dec_time, decrementer_clockevent.mult);
	dec_nsec = do_div(dec_time, NSEC_PER_SEC);
	hrtimer_start(&vcpu->arch.dec_timer,
		ktime_set(dec_time, dec_nsec), HRTIMER_MODE_REL);
	vcpu->arch.dec_jiffies = get_tb();
}

u32 kvmppc_get_dec(struct kvm_vcpu *vcpu, u64 tb)
{
	u64 jd = tb - vcpu->arch.dec_jiffies;

#ifdef CONFIG_BOOKE
	if (vcpu->arch.dec < jd)
		return 0;
#endif

	return vcpu->arch.dec - jd;
}

static int kvmppc_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
{
	enum emulation_result emulated = EMULATE_DONE;
	ulong spr_val = kvmppc_get_gpr(vcpu, rs);

	switch (sprn) {
	case SPRN_SRR0:
		kvmppc_set_srr0(vcpu, spr_val);
		break;
	case SPRN_SRR1:
		kvmppc_set_srr1(vcpu, spr_val);
		break;

	/* XXX We need to context-switch the timebase for
	 * watchdog and FIT. */
	case SPRN_TBWL: break;
	case SPRN_TBWU: break;

	case SPRN_DEC:
		vcpu->arch.dec = spr_val;
		kvmppc_emulate_dec(vcpu);
		break;

	case SPRN_SPRG0:
		kvmppc_set_sprg0(vcpu, spr_val);
		break;
	case SPRN_SPRG1:
		kvmppc_set_sprg1(vcpu, spr_val);
		break;
	case SPRN_SPRG2:
		kvmppc_set_sprg2(vcpu, spr_val);