summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-13 20:56:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-13 20:56:58 -0500
commit2bcc673101268dc50e52b83226c5bbf38391e16d (patch)
tree0cdaf6affa8b05d436c2e8b80ff23e8c7f03a30a /fs
parent670310dfbae0eefe7318ff6a61e29e67a7a7bbce (diff)
parentb24591e2fcf852ad7ad2ccf745c8220bf378d312 (diff)
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner: "Yet another big pile of changes: - More year 2038 work from Arnd slowly reaching the point where we need to think about the syscalls themself. - A new timer function which allows to conditionally (re)arm a timer only when it's either not running or the new expiry time is sooner than the armed expiry time. This allows to use a single timer for multiple timeout requirements w/o caring about the first expiry time at the call site. - A new NMI safe accessor to clock real time for the printk timestamp work. Can be used by tracing, perf as well if required. - A large number of timer setup conversions from Kees which got collected here because either maintainers requested so or they simply got ignored. As Kees pointed out already there are a few trivial merge conflicts and some redundant commits which was unavoidable due to the size of this conversion effort. - Avoid a redundant iteration in the timer wheel softirq processing. - Provide a mechanism to treat RTC implementations depending on their hardware properties, i.e. don't inflict the write at the 0.5 seconds boundary which originates from the PC CMOS RTC to all RTCs. No functional change as drivers need to be updated separately. - The usual small updates to core code clocksource drivers. Nothing really exciting" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (111 commits) timers: Add a function to start/reduce a timer pstore: Use ktime_get_real_fast_ns() instead of __getnstimeofday() timer: Prepare to change all DEFINE_TIMER() callbacks netfilter: ipvs: Convert timers to use timer_setup() scsi: qla2xxx: Convert timers to use timer_setup() block/aoe: discover_timer: Convert timers to use timer_setup() ide: Convert timers to use timer_setup() drbd: Convert timers to use timer_setup() mailbox: Convert timers to use timer_setup() crypto: Convert timers to use timer_setup() drivers/pcmcia: omap1: Fix error in automated timer conversion ARM: footbridge: Fix typo in timer conversion drivers/sgi-xp: Convert timers to use timer_setup() drivers/pcmcia: Convert timers to use timer_setup() drivers/memstick: Convert timers to use timer_setup() drivers/macintosh: Convert timers to use timer_setup() hwrng/xgene-rng: Convert timers to use timer_setup() auxdisplay: Convert timers to use timer_setup() sparc/led: Convert timers to use timer_setup() mips: ip22/32: Convert timers to use timer_setup() ...
Diffstat (limited to 'fs')
-rw-r--r--fs/ncpfs/inode.c4
-rw-r--r--fs/ncpfs/ncp_fs_sb.h2
-rw-r--r--fs/ncpfs/sock.c6
-rw-r--r--fs/pstore/platform.c7
4 files changed, 7 insertions, 12 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 6d0f14c86099..129f1937fa2c 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -618,7 +618,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
618 server->tx.creq = NULL; 618 server->tx.creq = NULL;
619 server->rcv.creq = NULL; 619 server->rcv.creq = NULL;
620 620
621 init_timer(&server->timeout_tm); 621 timer_setup(&server->timeout_tm, ncpdgram_timeout_call, 0);
622#undef NCP_PACKET_SIZE 622#undef NCP_PACKET_SIZE
623#define NCP_PACKET_SIZE 131072 623#define NCP_PACKET_SIZE 131072
624 error = -ENOMEM; 624 error = -ENOMEM;
@@ -650,8 +650,6 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
650 } else { 650 } else {
651 INIT_WORK(&server->rcv.tq, ncpdgram_rcv_proc); 651 INIT_WORK(&server->rcv.tq, ncpdgram_rcv_proc);
652 INIT_WORK(&server->timeout_tq, ncpdgram_timeout_proc); 652 INIT_WORK(&server->timeout_tq, ncpdgram_timeout_proc);
653 server->timeout_tm.data = (unsigned long)server;
654 server->timeout_tm.function = ncpdgram_timeout_call;
655 } 653 }
656 release_sock(sock->sk); 654 release_sock(sock->sk);
657 655
diff --git a/fs/ncpfs/ncp_fs_sb.h b/fs/ncpfs/ncp_fs_sb.h
index 89031d7e3ae1..f06cde4adf71 100644
--- a/fs/ncpfs/ncp_fs_sb.h
+++ b/fs/ncpfs/ncp_fs_sb.h
@@ -150,7 +150,7 @@ extern void ncp_tcp_rcv_proc(struct work_struct *work);
150extern void ncp_tcp_tx_proc(struct work_struct *work); 150extern void ncp_tcp_tx_proc(struct work_struct *work);
151extern void ncpdgram_rcv_proc(struct work_struct *work); 151extern void ncpdgram_rcv_proc(struct work_struct *work);
152extern void ncpdgram_timeout_proc(struct work_struct *work); 152extern void ncpdgram_timeout_proc(struct work_struct *work);
153extern void ncpdgram_timeout_call(unsigned long server); 153extern void ncpdgram_timeout_call(struct timer_list *t);
154extern void ncp_tcp_data_ready(struct sock* sk); 154extern void ncp_tcp_data_ready(struct sock* sk);
155extern void ncp_tcp_write_space(struct sock* sk); 155extern void ncp_tcp_write_space(struct sock* sk);
156extern void ncp_tcp_error_report(struct sock* sk); 156extern void ncp_tcp_error_report(struct sock* sk);
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c
index 7dd7170d6cdf..efb176b1751a 100644
--- a/fs/ncpfs/sock.c
+++ b/fs/ncpfs/sock.c
@@ -117,10 +117,10 @@ void ncp_tcp_write_space(struct sock *sk)
117 schedule_work(&server->tx.tq); 117 schedule_work(&server->tx.tq);
118} 118}
119 119
120void ncpdgram_timeout_call(unsigned long v) 120void ncpdgram_timeout_call(struct timer_list *t)
121{ 121{
122 struct ncp_server *server = (void*)v; 122 struct ncp_server *server = from_timer(server, t, timeout_tm);
123 123
124 schedule_work(&server->timeout_tq); 124 schedule_work(&server->timeout_tq);
125} 125}
126 126
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 2b21d180157c..086e491faf04 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content "
62static int pstore_new_entry; 62static int pstore_new_entry;
63 63
64static void pstore_timefunc(unsigned long); 64static void pstore_timefunc(unsigned long);
65static DEFINE_TIMER(pstore_timer, pstore_timefunc, 0, 0); 65static DEFINE_TIMER(pstore_timer, pstore_timefunc);
66 66
67static void pstore_dowork(struct work_struct *); 67static void pstore_dowork(struct work_struct *);
68static DECLARE_WORK(pstore_work, pstore_dowork); 68static DECLARE_WORK(pstore_work, pstore_dowork);
@@ -482,10 +482,7 @@ void pstore_record_init(struct pstore_record *record,
482 record->psi = psinfo; 482 record->psi = psinfo;
483 483
484 /* Report zeroed timestamp if called before timekeeping has resumed. */ 484 /* Report zeroed timestamp if called before timekeeping has resumed. */
485 if (__getnstimeofday(&record->time)) { 485 record->time = ns_to_timespec(ktime_get_real_fast_ns());
486 record->time.tv_sec = 0;
487 record->time.tv_nsec = 0;
488 }
489} 486}
490 487
491/* 488/*