Skip to content

Commit 2bcc673

Browse files
committed
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() ...
2 parents 670310d + b24591e commit 2bcc673

253 files changed

Lines changed: 1810 additions & 1864 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/timer/renesas,cmt.txt‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ Required Properties:
2020
(CMT1 on sh73a0 and r8a7740)
2121
This is a fallback for the above renesas,cmt-48-* entries.
2222

23-
- "renesas,cmt0-r8a73a4" for the 32-bit CMT0 device included in r8a73a4.
24-
- "renesas,cmt1-r8a73a4" for the 48-bit CMT1 device included in r8a73a4.
25-
- "renesas,cmt0-r8a7790" for the 32-bit CMT0 device included in r8a7790.
26-
- "renesas,cmt1-r8a7790" for the 48-bit CMT1 device included in r8a7790.
27-
- "renesas,cmt0-r8a7791" for the 32-bit CMT0 device included in r8a7791.
28-
- "renesas,cmt1-r8a7791" for the 48-bit CMT1 device included in r8a7791.
29-
- "renesas,cmt0-r8a7793" for the 32-bit CMT0 device included in r8a7793.
30-
- "renesas,cmt1-r8a7793" for the 48-bit CMT1 device included in r8a7793.
31-
- "renesas,cmt0-r8a7794" for the 32-bit CMT0 device included in r8a7794.
32-
- "renesas,cmt1-r8a7794" for the 48-bit CMT1 device included in r8a7794.
23+
- "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4.
24+
- "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
25+
- "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.
26+
- "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790.
27+
- "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791.
28+
- "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791.
29+
- "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793.
30+
- "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793.
31+
- "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794.
32+
- "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794.
3333

3434
- "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2.
3535
- "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2.
@@ -46,7 +46,7 @@ Required Properties:
4646
Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
4747

4848
cmt0: timer@ffca0000 {
49-
compatible = "renesas,cmt0-r8a7790", "renesas,rcar-gen2-cmt0";
49+
compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
5050
reg = <0 0xffca0000 0 0x1004>;
5151
interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
5252
<0 142 IRQ_TYPE_LEVEL_HIGH>;
@@ -55,7 +55,7 @@ Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
5555
};
5656

5757
cmt1: timer@e6130000 {
58-
compatible = "renesas,cmt1-r8a7790", "renesas,rcar-gen2-cmt1";
58+
compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
5959
reg = <0 0xe6130000 0 0x1004>;
6060
interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
6161
<0 121 IRQ_TYPE_LEVEL_HIGH>,

‎MAINTAINERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,8 @@ M: Thomas Gleixner <tglx@linutronix.de>
34443444
L: linux-kernel@vger.kernel.org
34453445
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
34463446
S: Supported
3447-
F: drivers/clocksource
3447+
F: drivers/clocksource/
3448+
F: Documentation/devicetree/bindings/timer/
34483449

34493450
CMPC ACPI DRIVER
34503451
M: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

‎arch/arm/mach-footbridge/dc21285.c‎

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,14 @@ struct pci_ops dc21285_ops = {
136136
static struct timer_list serr_timer;
137137
static struct timer_list perr_timer;
138138

139-
static void dc21285_enable_error(unsigned long __data)
139+
static void dc21285_enable_error(struct timer_list *timer)
140140
{
141-
switch (__data) {
142-
case IRQ_PCI_SERR:
143-
del_timer(&serr_timer);
144-
break;
145-
146-
case IRQ_PCI_PERR:
147-
del_timer(&perr_timer);
148-
break;
149-
}
141+
del_timer(timer);
150142

151-
enable_irq(__data);
143+
if (timer == &serr_timer)
144+
enable_irq(IRQ_PCI_SERR);
145+
else if (timer == &perr_timer)
146+
enable_irq(IRQ_PCI_PERR);
152147
}
153148

154149
/*
@@ -323,13 +318,8 @@ void __init dc21285_preinit(void)
323318
*CSR_PCICMD = (*CSR_PCICMD & 0xffff) | PCICMD_ERROR_BITS;
324319
}
325320

326-
init_timer(&serr_timer);
327-
init_timer(&perr_timer);
328-
329-
serr_timer.data = IRQ_PCI_SERR;
330-
serr_timer.function = dc21285_enable_error;
331-
perr_timer.data = IRQ_PCI_PERR;
332-
perr_timer.function = dc21285_enable_error;
321+
timer_setup(&serr_timer, dc21285_enable_error, 0);
322+
timer_setup(&perr_timer, dc21285_enable_error, 0);
333323

334324
/*
335325
* We don't care if these fail.

‎arch/arm/mach-ixp4xx/dsmg600-setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static int power_button_countdown;
175175
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
176176

177177
static void dsmg600_power_handler(unsigned long data);
178-
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler, 0, 0);
178+
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);
179179

180180
static void dsmg600_power_handler(unsigned long data)
181181
{

‎arch/arm/mach-ixp4xx/nas100d-setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int power_button_countdown;
198198
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
199199

200200
static void nas100d_power_handler(unsigned long data);
201-
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0);
201+
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);
202202

203203
static void nas100d_power_handler(unsigned long data)
204204
{

‎arch/arm/mach-pxa/lubbock.c‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,11 @@ static struct pxafb_mach_info sharp_lm8v31 = {
381381

382382
#define MMC_POLL_RATE msecs_to_jiffies(1000)
383383

384-
static void lubbock_mmc_poll(unsigned long);
385384
static irq_handler_t mmc_detect_int;
385+
static void *mmc_detect_int_data;
386+
static struct timer_list mmc_timer;
386387

387-
static struct timer_list mmc_timer = {
388-
.function = lubbock_mmc_poll,
389-
};
390-
391-
static void lubbock_mmc_poll(unsigned long data)
388+
static void lubbock_mmc_poll(struct timer_list *unused)
392389
{
393390
unsigned long flags;
394391

@@ -401,7 +398,7 @@ static void lubbock_mmc_poll(unsigned long data)
401398
if (LUB_IRQ_SET_CLR & (1 << 0))
402399
mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE);
403400
else {
404-
(void) mmc_detect_int(LUBBOCK_SD_IRQ, (void *)data);
401+
(void) mmc_detect_int(LUBBOCK_SD_IRQ, mmc_detect_int_data);
405402
enable_irq(LUBBOCK_SD_IRQ);
406403
}
407404
}
@@ -421,8 +418,8 @@ static int lubbock_mci_init(struct device *dev,
421418
{
422419
/* detect card insert/eject */
423420
mmc_detect_int = detect_int;
424-
init_timer(&mmc_timer);
425-
mmc_timer.data = (unsigned long) data;
421+
mmc_detect_int_data = data;
422+
timer_setup(&mmc_timer, lubbock_mmc_poll, 0);
426423
return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
427424
0, "lubbock-sd-detect", data);
428425
}

‎arch/arm/mach-pxa/sharpsl_pm.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ static void sharpsl_charge_toggle(struct work_struct *private_)
341341
sharpsl_pm.charge_start_time = jiffies;
342342
}
343343

344-
static void sharpsl_ac_timer(unsigned long data)
344+
static void sharpsl_ac_timer(struct timer_list *unused)
345345
{
346346
int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
347347

@@ -366,7 +366,7 @@ static irqreturn_t sharpsl_ac_isr(int irq, void *dev_id)
366366
return IRQ_HANDLED;
367367
}
368368

369-
static void sharpsl_chrg_full_timer(unsigned long data)
369+
static void sharpsl_chrg_full_timer(struct timer_list *unused)
370370
{
371371
dev_dbg(sharpsl_pm.dev, "Charge Full at time: %lx\n", jiffies);
372372

@@ -841,9 +841,9 @@ static int sharpsl_pm_probe(struct platform_device *pdev)
841841
sharpsl_pm.charge_mode = CHRG_OFF;
842842
sharpsl_pm.flags = 0;
843843

844-
setup_timer(&sharpsl_pm.ac_timer, sharpsl_ac_timer, 0UL);
844+
timer_setup(&sharpsl_pm.ac_timer, sharpsl_ac_timer, 0);
845845

846-
setup_timer(&sharpsl_pm.chrg_full_timer, sharpsl_chrg_full_timer, 0UL);
846+
timer_setup(&sharpsl_pm.chrg_full_timer, sharpsl_chrg_full_timer, 0);
847847

848848
led_trigger_register_simple("sharpsl-charge", &sharpsl_charge_led_trigger);
849849

‎arch/ia64/include/asm/sn/bte.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <asm/sn/types.h>
1818
#include <asm/sn/shub_mmr.h>
1919

20+
struct nodepda_s;
21+
2022
#define IBCT_NOTIFY (0x1UL << 4)
2123
#define IBCT_ZFIL_MODE (0x1UL << 0)
2224

@@ -210,7 +212,7 @@ struct bteinfo_s {
210212
*/
211213
extern bte_result_t bte_copy(u64, u64, u64, u64, void *);
212214
extern bte_result_t bte_unaligned_copy(u64, u64, u64, u64);
213-
extern void bte_error_handler(unsigned long);
215+
extern void bte_error_handler(struct nodepda_s *);
214216

215217
#define bte_zero(dest, len, mode, notification) \
216218
bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification)

‎arch/ia64/kernel/mca.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
15131513
*
15141514
*/
15151515
static void
1516-
ia64_mca_cmc_poll (unsigned long dummy)
1516+
ia64_mca_cmc_poll (struct timer_list *unused)
15171517
{
15181518
/* Trigger a CMC interrupt cascade */
15191519
platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CMCP_VECTOR,
@@ -1590,7 +1590,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
15901590
*
15911591
*/
15921592
static void
1593-
ia64_mca_cpe_poll (unsigned long dummy)
1593+
ia64_mca_cpe_poll (struct timer_list *unused)
15941594
{
15951595
/* Trigger a CPE interrupt cascade */
15961596
platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CPEP_VECTOR,
@@ -2098,7 +2098,7 @@ ia64_mca_late_init(void)
20982098
return 0;
20992099

21002100
/* Setup the CMCI/P vector and handler */
2101-
setup_timer(&cmc_poll_timer, ia64_mca_cmc_poll, 0UL);
2101+
timer_setup(&cmc_poll_timer, ia64_mca_cmc_poll, 0);
21022102

21032103
/* Unmask/enable the vector */
21042104
cmc_polling_enabled = 0;
@@ -2109,7 +2109,7 @@ ia64_mca_late_init(void)
21092109
#ifdef CONFIG_ACPI
21102110
/* Setup the CPEI/P vector and handler */
21112111
cpe_vector = acpi_request_vector(ACPI_INTERRUPT_CPEI);
2112-
setup_timer(&cpe_poll_timer, ia64_mca_cpe_poll, 0UL);
2112+
timer_setup(&cpe_poll_timer, ia64_mca_cpe_poll, 0);
21132113

21142114
{
21152115
unsigned int irq;

‎arch/ia64/kernel/salinfo.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ salinfo_timeout_check(struct salinfo_data *data)
263263
}
264264

265265
static void
266-
salinfo_timeout (unsigned long arg)
266+
salinfo_timeout(struct timer_list *unused)
267267
{
268268
ia64_mlogbuf_dump();
269269
salinfo_timeout_check(salinfo_data + SAL_INFO_TYPE_MCA);
@@ -623,9 +623,8 @@ salinfo_init(void)
623623

624624
*sdir++ = salinfo_dir;
625625

626-
init_timer(&salinfo_timer);
626+
timer_setup(&salinfo_timer, salinfo_timeout, 0);
627627
salinfo_timer.expires = jiffies + SALINFO_TIMER_DELAY;
628-
salinfo_timer.function = &salinfo_timeout;
629628
add_timer(&salinfo_timer);
630629

631630
i = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "ia64/salinfo:online",

0 commit comments

Comments
 (0)