@@ -77,14 +77,14 @@ struct coresight_device *coresight_get_percpu_sink(int cpu)
77
77
}
78
78
EXPORT_SYMBOL_GPL (coresight_get_percpu_sink );
79
79
80
- static struct coresight_device * coresight_get_source (struct list_head * path )
80
+ static struct coresight_device * coresight_get_source (struct coresight_path * path )
81
81
{
82
82
struct coresight_device * csdev ;
83
83
84
84
if (!path )
85
85
return NULL ;
86
86
87
- csdev = list_first_entry (path , struct coresight_node , link )-> csdev ;
87
+ csdev = list_first_entry (& path -> path_list , struct coresight_node , link )-> csdev ;
88
88
if (!coresight_is_device_source (csdev ))
89
89
return NULL ;
90
90
@@ -333,20 +333,20 @@ static int coresight_enable_helper(struct coresight_device *csdev,
333
333
return helper_ops (csdev )-> enable (csdev , mode , data );
334
334
}
335
335
336
- static void coresight_disable_helper (struct coresight_device * csdev )
336
+ static void coresight_disable_helper (struct coresight_device * csdev , void * data )
337
337
{
338
- helper_ops (csdev )-> disable (csdev , NULL );
338
+ helper_ops (csdev )-> disable (csdev , data );
339
339
}
340
340
341
- static void coresight_disable_helpers (struct coresight_device * csdev )
341
+ static void coresight_disable_helpers (struct coresight_device * csdev , void * data )
342
342
{
343
343
int i ;
344
344
struct coresight_device * helper ;
345
345
346
346
for (i = 0 ; i < csdev -> pdata -> nr_outconns ; ++ i ) {
347
347
helper = csdev -> pdata -> out_conns [i ]-> dest_dev ;
348
348
if (helper && coresight_is_helper (helper ))
349
- coresight_disable_helper (helper );
349
+ coresight_disable_helper (helper , data );
350
350
}
351
351
}
352
352
@@ -363,7 +363,7 @@ static void coresight_disable_helpers(struct coresight_device *csdev)
363
363
void coresight_disable_source (struct coresight_device * csdev , void * data )
364
364
{
365
365
source_ops (csdev )-> disable (csdev , data );
366
- coresight_disable_helpers (csdev );
366
+ coresight_disable_helpers (csdev , NULL );
367
367
}
368
368
EXPORT_SYMBOL_GPL (coresight_disable_source );
369
369
@@ -372,16 +372,16 @@ EXPORT_SYMBOL_GPL(coresight_disable_source);
372
372
* @nd in the list. If @nd is NULL, all the components, except the SOURCE are
373
373
* disabled.
374
374
*/
375
- static void coresight_disable_path_from (struct list_head * path ,
375
+ static void coresight_disable_path_from (struct coresight_path * path ,
376
376
struct coresight_node * nd )
377
377
{
378
378
u32 type ;
379
379
struct coresight_device * csdev , * parent , * child ;
380
380
381
381
if (!nd )
382
- nd = list_first_entry (path , struct coresight_node , link );
382
+ nd = list_first_entry (& path -> path_list , struct coresight_node , link );
383
383
384
- list_for_each_entry_continue (nd , path , link ) {
384
+ list_for_each_entry_continue (nd , & path -> path_list , link ) {
385
385
csdev = nd -> csdev ;
386
386
type = csdev -> type ;
387
387
@@ -419,11 +419,11 @@ static void coresight_disable_path_from(struct list_head *path,
419
419
}
420
420
421
421
/* Disable all helpers adjacent along the path last */
422
- coresight_disable_helpers (csdev );
422
+ coresight_disable_helpers (csdev , path );
423
423
}
424
424
}
425
425
426
- void coresight_disable_path (struct list_head * path )
426
+ void coresight_disable_path (struct coresight_path * path )
427
427
{
428
428
coresight_disable_path_from (path , NULL );
429
429
}
@@ -448,7 +448,7 @@ static int coresight_enable_helpers(struct coresight_device *csdev,
448
448
return 0 ;
449
449
}
450
450
451
- int coresight_enable_path (struct list_head * path , enum cs_mode mode ,
451
+ int coresight_enable_path (struct coresight_path * path , enum cs_mode mode ,
452
452
void * sink_data )
453
453
{
454
454
int ret = 0 ;
@@ -458,12 +458,12 @@ int coresight_enable_path(struct list_head *path, enum cs_mode mode,
458
458
struct coresight_device * source ;
459
459
460
460
source = coresight_get_source (path );
461
- list_for_each_entry_reverse (nd , path , link ) {
461
+ list_for_each_entry_reverse (nd , & path -> path_list , link ) {
462
462
csdev = nd -> csdev ;
463
463
type = csdev -> type ;
464
464
465
465
/* Enable all helpers adjacent to the path first */
466
- ret = coresight_enable_helpers (csdev , mode , sink_data );
466
+ ret = coresight_enable_helpers (csdev , mode , path );
467
467
if (ret )
468
468
goto err ;
469
469
/*
@@ -511,20 +511,21 @@ int coresight_enable_path(struct list_head *path, enum cs_mode mode,
511
511
goto out ;
512
512
}
513
513
514
- struct coresight_device * coresight_get_sink (struct list_head * path )
514
+ struct coresight_device * coresight_get_sink (struct coresight_path * path )
515
515
{
516
516
struct coresight_device * csdev ;
517
517
518
518
if (!path )
519
519
return NULL ;
520
520
521
- csdev = list_last_entry (path , struct coresight_node , link )-> csdev ;
521
+ csdev = list_last_entry (& path -> path_list , struct coresight_node , link )-> csdev ;
522
522
if (csdev -> type != CORESIGHT_DEV_TYPE_SINK &&
523
523
csdev -> type != CORESIGHT_DEV_TYPE_LINKSINK )
524
524
return NULL ;
525
525
526
526
return csdev ;
527
527
}
528
+ EXPORT_SYMBOL_GPL (coresight_get_sink );
528
529
529
530
u32 coresight_get_sink_id (struct coresight_device * csdev )
530
531
{
@@ -680,7 +681,7 @@ static int coresight_get_trace_id(struct coresight_device *csdev,
680
681
void coresight_path_assign_trace_id (struct coresight_path * path ,
681
682
enum cs_mode mode )
682
683
{
683
- struct coresight_device * sink = coresight_get_sink (& path -> path_list );
684
+ struct coresight_device * sink = coresight_get_sink (path );
684
685
struct coresight_node * nd ;
685
686
int trace_id ;
686
687
0 commit comments