Greg Reid | cf10549 | 2012-10-12 12:14:12 -0400 | [diff] [blame] | 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _ARM_KERNEL_USER_ACCESSIBLE_TIMER_H_ |
| 14 | #define _ARM_KERNEL_USER_ACCESSIBLE_TIMER_H_ |
| 15 | |
| 16 | #define ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE -1 |
| 17 | |
| 18 | extern unsigned long zero_pfn; |
| 19 | |
| 20 | #ifdef CONFIG_ARM_USE_USER_ACCESSIBLE_TIMERS |
| 21 | #ifndef CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE |
| 22 | #define CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE 0xfffef000 |
| 23 | #endif |
| 24 | extern void setup_user_timer_offset(unsigned long addr); |
| 25 | extern int get_timer_page_address(void); |
| 26 | static inline int get_user_accessible_timers_base(void) |
| 27 | { |
| 28 | return CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE; |
| 29 | } |
| 30 | extern void set_user_accessible_timer_flag(bool flag); |
| 31 | #else |
| 32 | #define CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE 0 |
| 33 | static inline void setup_user_timer_offset(unsigned long addr) |
| 34 | { |
| 35 | } |
| 36 | static inline int get_timer_page_address(void) |
| 37 | { |
| 38 | return ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE; |
| 39 | } |
| 40 | static inline int get_user_accessible_timers_base(void) |
| 41 | { |
| 42 | return 0; |
| 43 | } |
| 44 | static inline void set_user_accessible_timer_flag(bool flag) |
| 45 | { |
| 46 | } |
| 47 | #endif |
| 48 | |
| 49 | #endif |