diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /arch/s390/kernel/time.c | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'arch/s390/kernel/time.c')
-rw-r--r-- | arch/s390/kernel/time.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index ef596d020573..d4c8e9c47c81 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
37 | #include <linux/clocksource.h> | 37 | #include <linux/clocksource.h> |
38 | #include <linux/clockchips.h> | 38 | #include <linux/clockchips.h> |
39 | #include <linux/bootmem.h> | ||
40 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
41 | #include <asm/delay.h> | 40 | #include <asm/delay.h> |
42 | #include <asm/s390_ext.h> | 41 | #include <asm/s390_ext.h> |
@@ -62,15 +61,12 @@ | |||
62 | 61 | ||
63 | u64 sched_clock_base_cc = -1; /* Force to data section. */ | 62 | u64 sched_clock_base_cc = -1; /* Force to data section. */ |
64 | 63 | ||
65 | static ext_int_info_t ext_int_info_cc; | ||
66 | static ext_int_info_t ext_int_etr_cc; | ||
67 | |||
68 | static DEFINE_PER_CPU(struct clock_event_device, comparators); | 64 | static DEFINE_PER_CPU(struct clock_event_device, comparators); |
69 | 65 | ||
70 | /* | 66 | /* |
71 | * Scheduler clock - returns current time in nanosec units. | 67 | * Scheduler clock - returns current time in nanosec units. |
72 | */ | 68 | */ |
73 | unsigned long long sched_clock(void) | 69 | unsigned long long notrace sched_clock(void) |
74 | { | 70 | { |
75 | return ((get_clock_xt() - sched_clock_base_cc) * 125) >> 9; | 71 | return ((get_clock_xt() - sched_clock_base_cc) * 125) >> 9; |
76 | } | 72 | } |
@@ -95,12 +91,6 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime) | |||
95 | xtime->tv_nsec = ((todval * 1000) >> 12); | 91 | xtime->tv_nsec = ((todval * 1000) >> 12); |
96 | } | 92 | } |
97 | 93 | ||
98 | #ifdef CONFIG_PROFILING | ||
99 | #define s390_do_profile() profile_tick(CPU_PROFILING) | ||
100 | #else | ||
101 | #define s390_do_profile() do { ; } while(0) | ||
102 | #endif /* CONFIG_PROFILING */ | ||
103 | |||
104 | void clock_comparator_work(void) | 94 | void clock_comparator_work(void) |
105 | { | 95 | { |
106 | struct clock_event_device *cd; | 96 | struct clock_event_device *cd; |
@@ -109,7 +99,6 @@ void clock_comparator_work(void) | |||
109 | set_clock_comparator(S390_lowcore.clock_comparator); | 99 | set_clock_comparator(S390_lowcore.clock_comparator); |
110 | cd = &__get_cpu_var(comparators); | 100 | cd = &__get_cpu_var(comparators); |
111 | cd->event_handler(cd); | 101 | cd->event_handler(cd); |
112 | s390_do_profile(); | ||
113 | } | 102 | } |
114 | 103 | ||
115 | /* | 104 | /* |
@@ -262,15 +251,11 @@ void __init time_init(void) | |||
262 | stp_reset(); | 251 | stp_reset(); |
263 | 252 | ||
264 | /* request the clock comparator external interrupt */ | 253 | /* request the clock comparator external interrupt */ |
265 | if (register_early_external_interrupt(0x1004, | 254 | if (register_external_interrupt(0x1004, clock_comparator_interrupt)) |
266 | clock_comparator_interrupt, | ||
267 | &ext_int_info_cc) != 0) | ||
268 | panic("Couldn't request external interrupt 0x1004"); | 255 | panic("Couldn't request external interrupt 0x1004"); |
269 | 256 | ||
270 | /* request the timing alert external interrupt */ | 257 | /* request the timing alert external interrupt */ |
271 | if (register_early_external_interrupt(0x1406, | 258 | if (register_external_interrupt(0x1406, timing_alert_interrupt)) |
272 | timing_alert_interrupt, | ||
273 | &ext_int_etr_cc) != 0) | ||
274 | panic("Couldn't request external interrupt 0x1406"); | 259 | panic("Couldn't request external interrupt 0x1406"); |
275 | 260 | ||
276 | if (clocksource_register(&clocksource_tod) != 0) | 261 | if (clocksource_register(&clocksource_tod) != 0) |
@@ -1452,14 +1437,14 @@ static void __init stp_reset(void) | |||
1452 | { | 1437 | { |
1453 | int rc; | 1438 | int rc; |
1454 | 1439 | ||
1455 | stp_page = alloc_bootmem_pages(PAGE_SIZE); | 1440 | stp_page = (void *) get_zeroed_page(GFP_ATOMIC); |
1456 | rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000); | 1441 | rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000); |
1457 | if (rc == 0) | 1442 | if (rc == 0) |
1458 | set_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags); | 1443 | set_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags); |
1459 | else if (stp_online) { | 1444 | else if (stp_online) { |
1460 | pr_warning("The real or virtual hardware system does " | 1445 | pr_warning("The real or virtual hardware system does " |
1461 | "not provide an STP interface\n"); | 1446 | "not provide an STP interface\n"); |
1462 | free_bootmem((unsigned long) stp_page, PAGE_SIZE); | 1447 | free_page((unsigned long) stp_page); |
1463 | stp_page = NULL; | 1448 | stp_page = NULL; |
1464 | stp_online = 0; | 1449 | stp_online = 0; |
1465 | } | 1450 | } |