LCOV - code coverage report
Current view: top level - include/linux - acpi_pmtmr.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 0 2 0.0 %
Date: 2021-04-22 12:43:58 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #ifndef _ACPI_PMTMR_H_
       3             : #define _ACPI_PMTMR_H_
       4             : 
       5             : #include <linux/clocksource.h>
       6             : 
       7             : /* Number of PMTMR ticks expected during calibration run */
       8             : #define PMTMR_TICKS_PER_SEC 3579545
       9             : 
      10             : /* limit it to 24 bits */
      11             : #define ACPI_PM_MASK CLOCKSOURCE_MASK(24)
      12             : 
      13             : /* Overrun value */
      14             : #define ACPI_PM_OVRRUN  (1<<24)
      15             : 
      16             : #ifdef CONFIG_X86_PM_TIMER
      17             : 
      18             : extern u32 acpi_pm_read_verified(void);
      19             : extern u32 pmtmr_ioport;
      20             : 
      21             : static inline u32 acpi_pm_read_early(void)
      22             : {
      23             :         if (!pmtmr_ioport)
      24             :                 return 0;
      25             :         /* mask the output to 24 bits */
      26             :         return acpi_pm_read_verified() & ACPI_PM_MASK;
      27             : }
      28             : 
      29             : #else
      30             : 
      31           0 : static inline u32 acpi_pm_read_early(void)
      32             : {
      33           0 :         return 0;
      34             : }
      35             : 
      36             : #endif
      37             : 
      38             : #endif
      39             : 

Generated by: LCOV version 1.14