Skip to content

clocksource/timer-econet-en751221: Support irq number per timer

Caleb James DeLisle linux-devicetree linux-mips lkml 12 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest5 patches 0 repliesNew
  2. v115 patches 0 repliesSuperseded
  3. v105 patches 1 replySuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v95 patches4 repliesSuperseded
v85 patches1 replySuperseded
v75 patches4 repliesSuperseded
v65 patches3 repliesSuperseded
v54 patches0 repliesSuperseded
v44 patches4 repliesSuperseded
v34 patches2 repliesSuperseded
v25 patches6 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v12 from the cover letter

* Update to tip/timers/core Nov 1, see base-commit.

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5dt-bindings: timer: econet: Update EN751627 for multi-IRQDocumentation/devicetree/bindings/timer/econet,en751221-timer.yaml+20 -110 replies
2/5clocksource/timer-econet-en751221: Init teardown on error if possibledrivers/clocksource/timer-econet-en751221.c+50 -340 replies
3/5clocksource/timer-econet-en751221: Disable IRQ until cevt registereddrivers/clocksource/timer-econet-en751221.c+8 -40 replies
4/5clocksource/timer-econet-en751221: Support EN751627 without percpu IRQdrivers/clocksource/timer-econet-en751221.c+108 -230 replies
5/5clocksource/timer-econet-en751221: Do not use NR_CPUS for resource array sizedrivers/clocksource/timer-econet-en751221.c+20 -90 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchConor Dooley
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v12 thread

Cover letter [PATCH v12 0/5] clocksource/timer-econet-en751221: Support irq number per timer

This timer appears on both the EcoNet EN751221 (34Kc) and on the EN751627 / EN7528 (1004Kc) SoCs. On the 34Kc the interrupt controller uses a percpu interrupt while on the others it uses an individual IRQ number for each CPU timer. Add support for EN751627 and EN7528. Add support for IRQ number for each CPU timer under the econet,en751627-timer compatible.

Changes since v11:
* Update to tip/timers/core Nov 1, see base-commit.

Changes since v10:
* Unconditionally setup clock_event_device for all possible CPUs so that error log will not access uninitialized data. Identified by:

Changes since v9:
* Use dynamic size irq and iomem block arrays based on DT
* Update commit message explicating that CPU hotplug is intentionally not supported

Changes since v8:
* Actually git commit changes from v7. Guys, I sincerely apologize for the spam.

Changes since v7:
* Use %zd for logging with ARRAY_SIZE to avoid compiler errors if test-compiling on 64 bit.

Changes since v6:
* Rebase to tip/timers/core (base-commit below)

Changes since v5:
* Integrate patch fix refcount leak from:

* NULL econet_timer.membase after unmapping
* NULL check dev->event_handler in case clockevents_config_and_register failed to fully register.
* v5: https://lore.kernel.org/linux-mips/[email protected]/

Changes from v4:
* Fixed incorrect compatible in DT schema
* Bracing in out_irq_free if statement
* I did not move cpuhp_setup_state past the point of no return
* v4: https://lore.kernel.org/linux-mips/[email protected]

Changes from v3:
* off-by-one in out_irq_free
* Gracefully fail if too many address resources are provided in the DT
* Allow fewer actual timers than num_possible_cpus, as long as they never start
* v3: https://lore.kernel.org/linux-mips/[email protected]

v3 note:

I decided to take this patchset in a slightly different direction from v2. There is a certain amount of initialization that once it has run, it cannot be reverted in case of error. The original driver init was a mixture of revertible and non-revertible code which made it too easy for code which is designed with best practices in mind to in fact introduce a bug. Therefore I start by making the init process more legible but without any business logic changes, then fix a race condition by keeping IRQ disabled until after cevt is setup, then finally add non-percpu IRQ support.

* v2: https://lore.kernel.org/linux-mips/[email protected]

Changes from v1:
* Split changes over 3 refactoring patches + main patch
* Remove driver discussion from dt commit message
* v1: https://lore.kernel.org/linux-mips/[email protected]/

Caleb James DeLisle (5):
dt-bindings: timer: econet: Update EN751627 for multi-IRQ clocksource/timer-econet-en751221: Init teardown on error if possible clocksource/timer-econet-en751221: Disable IRQ until cevt registered clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ clocksource/timer-econet-en751221: Do not use NR_CPUS for resource
array size

 .../bindings/timer/econet,en751221-timer.yaml |  31 ++-
 drivers/clocksource/timer-econet-en751221.c   | 206 ++++++++++++++----
 2 files changed, 181 insertions(+), 56 deletions(-)

base-commit: 0359ecff58853a491dd0f09792fea8e87235ae06

Signature · 1 line
2.39.5