diff options
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/Kbuild.asm | 6 | ||||
| -rw-r--r-- | include/asm-generic/bug.h | 10 | ||||
| -rw-r--r-- | include/asm-generic/rtc.h | 12 | ||||
| -rw-r--r-- | include/asm-generic/sections.h | 6 | ||||
| -rw-r--r-- | include/asm-generic/syscall.h | 2 |
5 files changed, 25 insertions, 11 deletions
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 1170dc60e638..1870d5e05f1c 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | 1 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
| 2 | $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | ||
| 2 | header-y += kvm.h | 3 | header-y += kvm.h |
| 3 | endif | 4 | endif |
| 4 | 5 | ||
| 5 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | 6 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
| 7 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | ||
| 6 | unifdef-y += a.out.h | 8 | unifdef-y += a.out.h |
| 7 | endif | 9 | endif |
| 8 | unifdef-y += auxvec.h | 10 | unifdef-y += auxvec.h |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index a3f738cffdb6..edc6ba82e090 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
| @@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line, | |||
| 97 | unlikely(__ret_warn_once); \ | 97 | unlikely(__ret_warn_once); \ |
| 98 | }) | 98 | }) |
| 99 | 99 | ||
| 100 | #define WARN_ONCE(condition, format...) ({ \ | ||
| 101 | static int __warned; \ | ||
| 102 | int __ret_warn_once = !!(condition); \ | ||
| 103 | \ | ||
| 104 | if (unlikely(__ret_warn_once)) \ | ||
| 105 | if (WARN(!__warned, format)) \ | ||
| 106 | __warned = 1; \ | ||
| 107 | unlikely(__ret_warn_once); \ | ||
| 108 | }) | ||
| 109 | |||
| 100 | #define WARN_ON_RATELIMIT(condition, state) \ | 110 | #define WARN_ON_RATELIMIT(condition, state) \ |
| 101 | WARN_ON((condition) && __ratelimit(state)) | 111 | WARN_ON((condition) && __ratelimit(state)) |
| 102 | 112 | ||
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index be4af0029ac0..71ef3f0b9685 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/mc146818rtc.h> | 15 | #include <linux/mc146818rtc.h> |
| 16 | #include <linux/rtc.h> | 16 | #include <linux/rtc.h> |
| 17 | #include <linux/bcd.h> | 17 | #include <linux/bcd.h> |
| 18 | #include <linux/delay.h> | ||
| 18 | 19 | ||
| 19 | #define RTC_PIE 0x40 /* periodic interrupt enable */ | 20 | #define RTC_PIE 0x40 /* periodic interrupt enable */ |
| 20 | #define RTC_AIE 0x20 /* alarm interrupt enable */ | 21 | #define RTC_AIE 0x20 /* alarm interrupt enable */ |
| @@ -43,7 +44,6 @@ static inline unsigned char rtc_is_updating(void) | |||
| 43 | 44 | ||
| 44 | static inline unsigned int get_rtc_time(struct rtc_time *time) | 45 | static inline unsigned int get_rtc_time(struct rtc_time *time) |
| 45 | { | 46 | { |
| 46 | unsigned long uip_watchdog = jiffies; | ||
| 47 | unsigned char ctrl; | 47 | unsigned char ctrl; |
| 48 | unsigned long flags; | 48 | unsigned long flags; |
| 49 | 49 | ||
| @@ -53,19 +53,15 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) | |||
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * read RTC once any update in progress is done. The update | 55 | * read RTC once any update in progress is done. The update |
| 56 | * can take just over 2ms. We wait 10 to 20ms. There is no need to | 56 | * can take just over 2ms. We wait 20ms. There is no need to |
| 57 | * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. | 57 | * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. |
| 58 | * If you need to know *exactly* when a second has started, enable | 58 | * If you need to know *exactly* when a second has started, enable |
| 59 | * periodic update complete interrupts, (via ioctl) and then | 59 | * periodic update complete interrupts, (via ioctl) and then |
| 60 | * immediately read /dev/rtc which will block until you get the IRQ. | 60 | * immediately read /dev/rtc which will block until you get the IRQ. |
| 61 | * Once the read clears, read the RTC time (again via ioctl). Easy. | 61 | * Once the read clears, read the RTC time (again via ioctl). Easy. |
| 62 | */ | 62 | */ |
| 63 | 63 | if (rtc_is_updating()) | |
| 64 | if (rtc_is_updating() != 0) | 64 | mdelay(20); |
| 65 | while (jiffies - uip_watchdog < 2*HZ/100) { | ||
| 66 | barrier(); | ||
| 67 | cpu_relax(); | ||
| 68 | } | ||
| 69 | 65 | ||
| 70 | /* | 66 | /* |
| 71 | * Only the values that we read from the RTC are set. We leave | 67 | * Only the values that we read from the RTC are set. We leave |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 8feeae1f2369..79a7ff925bf8 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
| @@ -14,4 +14,10 @@ extern char __kprobes_text_start[], __kprobes_text_end[]; | |||
| 14 | extern char __initdata_begin[], __initdata_end[]; | 14 | extern char __initdata_begin[], __initdata_end[]; |
| 15 | extern char __start_rodata[], __end_rodata[]; | 15 | extern char __start_rodata[], __end_rodata[]; |
| 16 | 16 | ||
| 17 | /* function descriptor handling (if any). Override | ||
| 18 | * in asm/sections.h */ | ||
| 19 | #ifndef dereference_function_descriptor | ||
| 20 | #define dereference_function_descriptor(p) (p) | ||
| 21 | #endif | ||
| 22 | |||
| 17 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 23 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h index abcf34c2fdc7..ea8087b55ffc 100644 --- a/include/asm-generic/syscall.h +++ b/include/asm-generic/syscall.h | |||
| @@ -126,7 +126,7 @@ void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, | |||
| 126 | * @args: array of argument values to store | 126 | * @args: array of argument values to store |
| 127 | * | 127 | * |
| 128 | * Changes @n arguments to the system call starting with the @i'th argument. | 128 | * Changes @n arguments to the system call starting with the @i'th argument. |
| 129 | * @n'th argument to @val. Argument @i gets value @args[0], and so on. | 129 | * Argument @i gets value @args[0], and so on. |
| 130 | * An arch inline version is probably optimal when @i and @n are constants. | 130 | * An arch inline version is probably optimal when @i and @n are constants. |
| 131 | * | 131 | * |
| 132 | * It's only valid to call this when @task is stopped for tracing on | 132 | * It's only valid to call this when @task is stopped for tracing on |
