LCOV - code coverage report
Current view: top level - core/test - stubs.c (source / functions) Hit Total Coverage
Test: skiboot.info Lines: 5 16 31.2 %
Date: 2024-01-02 21:04:04 Functions: 1 6 16.7 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
       2                 :            : /*
       3                 :            :  * Copyright 2013-2019 IBM Corp
       4                 :            :  */
       5                 :            : 
       6                 :            : #include <stdlib.h>
       7                 :            : #include <stdio.h>
       8                 :            : #include <stdarg.h>
       9                 :            : #include <string.h>
      10                 :            : #include <stdint.h>
      11                 :            : 
      12                 :            : #include <compiler.h>
      13                 :            : #include "../../ccan/list/list.c"
      14                 :            : 
      15                 :            : void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attribute__((format (printf, 2, 3)));
      16                 :            : 
      17                 :            : #ifndef pr_fmt
      18                 :            : #define pr_fmt(fmt) fmt
      19                 :            : #endif
      20                 :            : #define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0)
      21                 :            : 
      22                 :        283 : void _prlog(int log_level __attribute__((unused)), const char* fmt, ...)
      23                 :            : {
      24                 :            :         va_list ap;
      25                 :            : 
      26                 :        283 :         va_start(ap, fmt);
      27                 :        283 :         vprintf(fmt, ap);
      28                 :        283 :         va_end(ap);
      29                 :        283 : }
      30                 :            : 
      31                 :            : /* Add any stub functions required for linking here. */
      32                 :          0 : static void stub_function(void)
      33                 :            : {
      34                 :          0 :         abort();
      35                 :            : }
      36                 :            : 
      37                 :            : struct cpu_thread;
      38                 :            : 
      39                 :            : struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
      40                 :            :                                 const char *name,
      41                 :            :                                 void (*func)(void *data), void *data,
      42                 :            :                                 bool no_return);
      43                 :            : 
      44                 :            : void cpu_wait_job(struct cpu_job *job, bool free_it);
      45                 :            : void cpu_process_local_jobs(void);
      46                 :            : struct cpu_job *cpu_queue_job_on_node(uint32_t chip_id,
      47                 :            :                                        const char *name,
      48                 :            :                                        void (*func)(void *data), void *data);
      49                 :            : 
      50                 :          0 : struct cpu_job *cpu_queue_job_on_node(uint32_t chip_id,
      51                 :            :                                        const char *name,
      52                 :            :                                        void (*func)(void *data), void *data)
      53                 :            : {
      54                 :            :         (void)chip_id;
      55                 :          0 :         return __cpu_queue_job(NULL, name, func, data, false);
      56                 :            : }
      57                 :            : 
      58                 :          0 : struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
      59                 :            :                                 const char *name,
      60                 :            :                                 void (*func)(void *data), void *data,
      61                 :            :                                 bool no_return)
      62                 :            : {
      63                 :            :         (void)cpu;
      64                 :            :         (void)name;
      65                 :          0 :         (func)(data);
      66                 :            :         (void)no_return;
      67                 :          0 :         return NULL;
      68                 :            : }
      69                 :            : 
      70                 :          0 : void cpu_wait_job(struct cpu_job *job, bool free_it)
      71                 :            : {
      72                 :            :         (void)job;
      73                 :            :         (void)free_it;
      74                 :          0 :         return;
      75                 :            : }
      76                 :            : 
      77                 :          0 : void cpu_process_local_jobs(void)
      78                 :            : {
      79                 :          0 : }
      80                 :            : 
      81                 :            : #define STUB(fnname) \
      82                 :            :         void fnname(void) __attribute__((weak, alias ("stub_function")))
      83                 :            : 
      84                 :            : STUB(fdt_begin_node);
      85                 :            : STUB(fdt_property);
      86                 :            : STUB(fdt_end_node);
      87                 :            : STUB(fdt_create_with_flags);
      88                 :            : STUB(fdt_add_reservemap_entry);
      89                 :            : STUB(fdt_finish_reservemap);
      90                 :            : STUB(fdt_strerror);
      91                 :            : STUB(fdt_check_header);
      92                 :            : STUB(fdt_check_node_offset_);
      93                 :            : STUB(fdt_next_tag);
      94                 :            : STUB(fdt_string);
      95                 :            : STUB(fdt_get_name);
      96                 :            : STUB(dt_first);
      97                 :            : STUB(dt_next);
      98                 :            : STUB(dt_has_node_property);
      99                 :            : STUB(dt_get_address);
     100                 :            : STUB(add_chip_dev_associativity);
     101                 :            : STUB(pci_check_clear_freeze);

Generated by: LCOV version 1.14