@@ -386,6 +386,50 @@ kernel_ptr(void)
386
386
static void __init
387
387
struct_resource (void )
388
388
{
389
+ struct resource test_resource = {
390
+ .start = 0xc0ffee00 ,
391
+ .end = 0xc0ffee00 ,
392
+ .flags = IORESOURCE_MEM ,
393
+ };
394
+
395
+ test ("[mem 0xc0ffee00 flags 0x200]" ,
396
+ "%pr" , & test_resource );
397
+
398
+ test_resource = (struct resource ) {
399
+ .start = 0xc0ffee ,
400
+ .end = 0xba5eba11 ,
401
+ .flags = IORESOURCE_MEM ,
402
+ };
403
+ test ("[mem 0x00c0ffee-0xba5eba11 flags 0x200]" ,
404
+ "%pr" , & test_resource );
405
+
406
+ test_resource = (struct resource ) {
407
+ .start = 0xba5eba11 ,
408
+ .end = 0xc0ffee ,
409
+ .flags = IORESOURCE_MEM ,
410
+ };
411
+ test ("[mem 0xba5eba11-0x00c0ffee flags 0x200]" ,
412
+ "%pr" , & test_resource );
413
+
414
+ test_resource = (struct resource ) {
415
+ .start = 0xba5eba11 ,
416
+ .end = 0xba5eca11 ,
417
+ .flags = IORESOURCE_MEM ,
418
+ };
419
+
420
+ test ("[mem 0xba5eba11-0xba5eca11 flags 0x200]" ,
421
+ "%pr" , & test_resource );
422
+
423
+ test_resource = (struct resource ) {
424
+ .start = 0xba11 ,
425
+ .end = 0xca10 ,
426
+ .flags = IORESOURCE_IO |
427
+ IORESOURCE_DISABLED |
428
+ IORESOURCE_UNSET ,
429
+ };
430
+
431
+ test ("[io size 0x1000 disabled]" ,
432
+ "%pR" , & test_resource );
389
433
}
390
434
391
435
static void __init
0 commit comments