30 Dec, 2020

6 commits

  • [ Upstream commit 8b7770b877d187bfdae1eaf587bd2b792479a31c ]

    ARM virtual counter supports event stream, it can only trigger an event
    when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes,
    so the actual period of event stream is 2^(cntkctl_evnti + 1). For example,
    when the trigger bit is 0, then virtual counter trigger an event for every
    two cycles.

    While we're at it, rework the way we compute the trigger bit position
    by making it more obvious that when bits [n:n-1] are both set (with n
    being the most significant bit), we pick bit (n + 1).

    Fixes: 037f637767a8 ("drivers: clocksource: add support for ARM architected timer event stream")
    Suggested-by: Marc Zyngier
    Signed-off-by: Keqian Zhu
    Acked-by: Marc Zyngier
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20201204073126.6920-3-zhukeqian1@huawei.com
    Signed-off-by: Sasha Levin

    Keqian Zhu
     
  • [ Upstream commit d8cc3905b8073c7cfbff94af889fa8dc71f21dd5 ]

    In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter
    to access stable counters"), we separate stable and normal count reader to omit
    unnecessary overhead on systems that have no timer erratum.

    However, in erratum_set_next_event_tval_generic(), count reader becomes normal
    reader. This converts it to stable reader.

    Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
    Acked-by: Marc Zyngier
    Signed-off-by: Keqian Zhu
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20201204073126.6920-2-zhukeqian1@huawei.com
    Signed-off-by: Sasha Levin

    Keqian Zhu
     
  • [ Upstream commit ab3105446f1ec4e98fadfc998ee24feec271c16c ]

    The riscv timer is set via SBI timer call, let's make RISCV_TIMER
    depends on RISCV_SBI, and it also fixes some build issue.

    Fixes: d5be89a8d118 ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems")
    Signed-off-by: Kefeng Wang
    Reviewed-by: Palmer Dabbelt
    Acked-by: Palmer Dabbelt
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20201028131230.72907-1-wangkefeng.wang@huawei.com
    Signed-off-by: Sasha Levin

    Kefeng Wang
     
  • [ Upstream commit 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef ]

    The function ingenic_tcu_get_clock() is annotated for the __init
    section but it is actually called from the online cpu callback.

    That will lead to a crash if a CPU is hotplugged after boot time.

    Remove the __init annotation for the ingenic_tcu_get_clock()
    function.

    Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT)
    Reported-by: kernel test robot
    Signed-off-by: Daniel Lezcano
    Reviewed-by: Paul Cercueil
    Tested-by: 周琰杰 (Zhou Yanjie)
    Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org
    Signed-off-by: Sasha Levin

    Daniel Lezcano
     
  • [ Upstream commit eee422c46e6840a81c9db18a497b74387a557b29 ]

    If clk_notifier_register() failed, ttc_setup_clockevent() will return
    without freeing 'ttcce', which will leak memory.

    Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error")
    Reported-by: Hulk Robot
    Signed-off-by: Yu Kuai
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20201116135123.2164033-1-yukuai3@huawei.com
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit c1e6cad00aa2f17845e7270e38ff3cc82c7b022a ]

    After calling clk_prepare_enable(), clk_disable_unprepare() need
    be called on error path.

    Fixes: fbe4b3566ddc ("clocksource/drivers/orion: Convert init function...")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20201111064706.3397156-1-yangyingliang@huawei.com
    Signed-off-by: Sasha Levin

    Yang Yingliang
     

26 Oct, 2020

1 commit

  • Use a more generic form for __section that requires quotes to avoid
    complications with clang and gcc differences.

    Remove the quote operator # from compiler_attributes.h __section macro.

    Convert all unquoted __section(foo) uses to quoted __section("foo").
    Also convert __attribute__((section("foo"))) uses to __section("foo")
    even if the __attribute__ has multiple list entry forms.

    Conversion done using the script at:

    https://lore.kernel.org/lkml/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl

    Signed-off-by: Joe Perches
    Reviewed-by: Nick Desaulniers
    Reviewed-by: Miguel Ojeda
    Signed-off-by: Linus Torvalds

    Joe Perches
     

15 Oct, 2020

1 commit

  • Pull Hyper-V updates from Wei Liu:

    - a series from Boqun Feng to support page size larger than 4K

    - a few miscellaneous clean-ups

    * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
    hv: clocksource: Add notrace attribute to read_hv_sched_clock_*() functions
    x86/hyperv: Remove aliases with X64 in their name
    PCI: hv: Document missing hv_pci_protocol_negotiation() parameter
    scsi: storvsc: Support PAGE_SIZE larger than 4K
    Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes
    HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes
    Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes
    hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication
    hv: hyperv.h: Introduce some hvpfn helper functions
    Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header
    Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()
    Drivers: hv: vmbus: Introduce types of GPADL
    Drivers: hv: vmbus: Move __vmbus_open()
    Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl
    drivers: hv: remove cast from hyperv_die_event

    Linus Torvalds
     

13 Oct, 2020

1 commit

  • Pull timekeeping updates from Thomas Gleixner:
    "Updates for timekeeping, timers and related drivers:

    Core:

    - Early boot support for the NMI safe timekeeper by utilizing
    local_clock() up to the point where timekeeping is initialized.
    This allows printk() to store multiple timestamps in the ringbuffer
    which is useful for coordinating dmesg information across a fleet
    of machines.

    - Provide a multi-timestamp accessor for printk()

    - Make timer init more robust by checking for invalid timer flags.

    - Comma vs semicolon fixes

    Drivers:

    - Support for new platforms in existing drivers (SP804 and Renesas
    CMT)

    - Comma vs semicolon fixes

    * tag 'timers-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    clocksource/drivers/armada-370-xp: Use semicolons rather than commas to separate statements
    clocksource/drivers/mps2-timer: Use semicolons rather than commas to separate statements
    timers: Mask invalid flags in do_init_timer()
    clocksource/drivers/sp804: Enable Hisilicon sp804 timer 64bit mode
    clocksource/drivers/sp804: Add support for Hisilicon sp804 timer
    clocksource/drivers/sp804: Support non-standard register offset
    clocksource/drivers/sp804: Prepare for support non-standard register offset
    clocksource/drivers/sp804: Remove a mismatched comment
    clocksource/drivers/sp804: Delete the leading "__" of some functions
    clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h
    clocksource/drivers/sp804: Cleanup clk_get_sys()
    dt-bindings: timer: renesas,cmt: Document r8a774e1 CMT support
    dt-bindings: timer: renesas,cmt: Document r8a7742 CMT support
    alarmtimer: Convert comma to semicolon
    timekeeping: Provide multi-timestamp accessor to NMI safe timekeeper
    timekeeping: Utilize local_clock() for NMI safe timekeeper during early boot

    Linus Torvalds
     

02 Oct, 2020

1 commit


01 Oct, 2020

1 commit


30 Sep, 2020

1 commit


28 Sep, 2020

2 commits

  • When selecting function_graph tracer with the command:
    # echo function_graph > /sys/kernel/debug/tracing/current_tracer

    The kernel crashes with the following stack trace:

    [69703.122389] BUG: stack guard page was hit at 000000001056545c (stack is 00000000fa3f8fed..0000000005d39503)
    [69703.122403] kernel stack overflow (double-fault): 0000 [#1] SMP PTI
    [69703.122413] CPU: 0 PID: 16982 Comm: bash Kdump: loaded Not tainted 4.18.0-236.el8.x86_64 #1
    [69703.122420] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.0 12/17/2019
    [69703.122433] RIP: 0010repare_ftrace_return+0xa/0x110
    [69703.122458] Code: 05 00 0f 0b 48 c7 c7 10 ca 69 ae 0f b6 f0 e8 4b 52 0c 00 31 c0 eb ca 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 41 55 41 54 48 83 ec 18 65 48 8b 04 25 28 00 00 00 48 89 45 d8 31 c0 48 85
    [69703.122467] RSP: 0018:ffffbd6d01118000 EFLAGS: 00010086
    [69703.122476] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000003
    [69703.122484] RDX: 0000000000000000 RSI: ffffbd6d011180d8 RDI: ffffffffadce7550
    [69703.122491] RBP: ffffbd6d01118018 R08: 0000000000000000 R09: ffff9d4b09266000
    [69703.122498] R10: ffff9d4b0fc04540 R11: ffff9d4b0fc20a00 R12: ffff9d4b6e42aa90
    [69703.122506] R13: ffff9d4b0fc20ab8 R14: 00000000000003e8 R15: ffffbd6d0111837c
    [69703.122514] FS: 00007fd5f2588740(0000) GS:ffff9d4b6e400000(0000) knlGS:0000000000000000
    [69703.122521] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [69703.122528] CR2: ffffbd6d01117ff8 CR3: 00000000565d8001 CR4: 00000000003606f0
    [69703.122538] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [69703.122545] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [69703.122552] Call Trace:
    [69703.122568] ftrace_graph_caller+0x6b/0xa0
    [69703.122589] ? read_hv_sched_clock_tsc+0x5/0x20
    [69703.122599] read_hv_sched_clock_tsc+0x5/0x20
    [69703.122611] sched_clock+0x5/0x10
    [69703.122621] sched_clock_local+0x12/0x80
    [69703.122631] sched_clock_cpu+0x8c/0xb0
    [69703.122644] trace_clock_global+0x21/0x90
    [69703.122655] ring_buffer_lock_reserve+0x100/0x3c0
    [69703.122671] trace_buffer_lock_reserve+0x16/0x50
    [69703.122683] __trace_graph_entry+0x28/0x90
    [69703.122695] trace_graph_entry+0xfd/0x1a0
    [69703.122705] ? read_hv_clock_tsc_cs+0x10/0x10
    [69703.122714] ? sched_clock+0x5/0x10
    [69703.122723] prepare_ftrace_return+0x99/0x110
    [69703.122734] ? read_hv_clock_tsc_cs+0x10/0x10
    [69703.122743] ? sched_clock+0x5/0x10
    [69703.122752] ftrace_graph_caller+0x6b/0xa0
    [69703.122768] ? read_hv_clock_tsc_cs+0x10/0x10
    [69703.122777] ? sched_clock+0x5/0x10
    [69703.122786] ? read_hv_sched_clock_tsc+0x5/0x20
    [69703.122796] ? ring_buffer_unlock_commit+0x1d/0xa0
    [69703.122805] read_hv_sched_clock_tsc+0x5/0x20
    [69703.122814] ftrace_graph_caller+0xa0/0xa0
    [ ... recursion snipped ... ]

    Setting the notrace attribute for read_hv_sched_clock_msr() and
    read_hv_sched_clock_tsc() fixes it.

    Fixes: bd00cd52d5be ("clocksource/drivers/hyperv: Add Hyper-V specific sched clock function")
    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: Mohammed Gamal
    Link: https://lore.kernel.org/r/20200924151117.767442-1-mgamal@redhat.com
    Signed-off-by: Wei Liu

    Mohammed Gamal
     
  • Pull timer updates from Thomas Gleixner:
    "A set of clocksource/clockevents updates:

    - Reset the TI/DM timer before enabling it instead of doing it the
    other way round.

    - Initialize the reload value for the GX6605s timer correctly so the
    hardware counter starts at 0 again after overrun.

    - Make error return value negative in the h8300 timer init function"

    * tag 'timers-urgent-2020-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    clocksource/drivers/timer-gx6605s: Fixup counter reload
    clocksource/drivers/timer-ti-dm: Do reset before enable
    clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()

    Linus Torvalds
     

24 Sep, 2020

8 commits

  • A 100MHZ 32-bit timer will be wrapped up less than 43s. Although the
    kernel maintains a software high 32-bit count in the tick IRQ. But it's
    not applicable to the user mode APPs.

    Note: The kernel still uses the lower 32 bits of the timer.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-9-thunder.leizhen@huawei.com

    Zhen Lei
     
  • The ARM SP804 supports a maximum of 32-bit counter, but Hisilicon extends
    it to 64-bit. That means, the registers: TimerXload, TimerXValue and
    TimerXBGLoad are 64bits, all other registers are the same as those in the
    SP804. The driver code can be completely reused except that the register
    offset is different.

    Use compatible = "hisilicon,sp804" mark as Hisilicon sp804 timer.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-8-thunder.leizhen@huawei.com

    Zhen Lei
     
  • The ARM SP804 supports a maximum of 32-bit counter, but Hisilicon extends
    it to 64-bit. That means, the registers: TimerXload, TimerXValue and
    TimerXBGLoad are 64bits, all other registers are the same as those in the
    SP804. The driver code can be completely reused except that the register
    offset is different.

    Currently, we get a timer register address by: add the constant register
    offset to the timer base address. e.g. "base + TIMER_CTRL". It can not be
    dynamically adjusted at run time.

    So create a new structure "sp804_timer" to record the original registers
    offset, and create a new structure "sp804_clkevt" to record the
    calculated registers address. So the "base + TIMER_CTRL" is changed to
    "clkevt->ctrl", this will faster than "base + timer->ctrl".

    For example:
    struct sp804_timer arm_sp804_timer = {
    .ctrl = TIMER_CTRL,
    };

    struct sp804_clkevt clkevt;

    clkevt.ctrl = base + arm_sp804_timer.ctrl.

    - writel(0, base + TIMER_CTRL);
    + writel(0, clkevt->ctrl);

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-7-thunder.leizhen@huawei.com

    Zhen Lei
     
  • Add two local variables: timer1_base and timer2_base in sp804_of_init(),
    to avoid repeatedly calculate the base address of timer2, and make it
    easier to recognize timer1. Hope to make the next patch looks more clear.

    No functional change.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-6-thunder.leizhen@huawei.com

    Zhen Lei
     
  • writel(0, base + TIMER_CTRL);
    ... ...
    writel(xxx | TIMER_CTRL_PERIODIC, base + TIMER_CTRL);

    The timer is just temporarily disabled, and it will be set to periodic
    mode later.

    The description of the field TimerMode of the register TimerXControl
    as shown below:
    0 = Timer module is in free-running mode (default)
    1 = Timer module is in periodic mode.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-5-thunder.leizhen@huawei.com

    Zhen Lei
     
  • Delete the leading "__" of __sp804_clocksource_and_sched_clock_init() and
    __sp804_clockevents_init(), make it looks a little more comfortable.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-4-thunder.leizhen@huawei.com

    Zhen Lei
     
  • Since commit 7484c727b636 ("ARM: realview: delete the RealView board
    files") and commit 16956fed35fe ("ARM: versatile: switch to DT only
    booting and remove legacy code"), there's no one to use the functions
    defined or declared in include/clocksource/timer-sp804.h. Delete it.

    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-3-thunder.leizhen@huawei.com

    Zhen Lei
     
  • Move the clk_get_sys() part into sp804_get_clock_rate(), cleanup the same
    code.

    Signed-off-by: Kefeng Wang
    Signed-off-by: Zhen Lei
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200918132237.3552-2-thunder.leizhen@huawei.com

    Kefeng Wang
     

21 Sep, 2020

1 commit

  • Pull RISC-V fixes from Palmer Dabbelt:

    - A fix for a lockdep issue to avoid an asserting triggering during
    early boot. There shouldn't be any incorrect behavior as the system
    isn't concurrent at the time.

    - The addition of a missing fence when installing early fixmap
    mappings.

    - A corretion to the K210 device tree's interrupt map.

    - A fix for M-mode timer handling on the K210.

    * tag 'riscv-for-linus-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    RISC-V: Resurrect the MMIO timer implementation for M-mode systems
    riscv: Fix Kendryte K210 device tree
    riscv: Add sfence.vma after early page table changes
    RISC-V: Take text_mutex in ftrace_init_nop()

    Linus Torvalds
     

20 Sep, 2020

1 commit

  • The K210 doesn't implement rdtime in M-mode, and since that's where Linux runs
    in the NOMMU systems that means we can't use rdtime. The K210 is the only
    system that anyone is currently running NOMMU or M-mode on, so here we're just
    inlining the timer read directly.

    This also adds the CLINT driver as an !MMU dependency, as it's currently the
    only timer driver availiable for these systems and without it we get a build
    failure for some configurations.

    Tested-by: Damien Le Moal
    Signed-off-by: Palmer Dabbelt

    Palmer Dabbelt
     

24 Aug, 2020

4 commits

  • When the timer counts to the upper limit, an overflow interrupt is
    generated, and the count is reset with the value in the TIME_INI
    register. But the software expects to start counting from 0 when
    the count overflows, so it forces TIME_INI to 0 to solve the
    potential interrupt storm problem.

    Signed-off-by: Guo Ren
    Tested-by: Xu Kai
    Cc: Daniel Lezcano
    Cc: Thomas Gleixner
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/1597735877-71115-1-git-send-email-guoren@kernel.org

    Guo Ren
     
  • Commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and
    resume for am3 and am4") exposed a new issue for type2 dual mode timers
    on at least omap5 where the clockevent will stop when the SoC starts
    entering idle states during the boot.

    Turns out we are wrongly first enabling the system timer and then
    resetting it, while we must also re-enable it after reset. The current
    sequence leaves the timer module in a partially initialized state. This
    issue went unnoticed earlier with ti-sysc driver reconfiguring the timer
    module until we fixed the issue of ti-sysc reconfiguring system timers.

    Let's fix the issue by calling dmtimer_systimer_enable() from reset for
    both type1 and type2 timers, and switch the order of reset and enable in
    dmtimer_systimer_setup(). Let's also move dmtimer_systimer_enable() and
    dmtimer_systimer_disable() to do this without adding forward declarations.

    Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4")
    Reported-by: H. Nikolaus Schaller"
    Signed-off-by: Tony Lindgren
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200817092428.6176-1-tony@atomide.com

    Tony Lindgren
     
  • In the init function, if the call to of_iomap() fails, the return
    value is ENXIO instead of -ENXIO.

    Change to the right negative errno.

    Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error")
    Cc: Daniel Lezcano
    Signed-off-by: Tianjia Zhang
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200802111541.5429-1-tianjia.zhang@linux.alibaba.com

    Tianjia Zhang
     
  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

21 Aug, 2020

2 commits

  • Right now the RISC-V timer driver is convoluted to support:
    1. Linux RISC-V S-mode (with MMU) where it will use TIME CSR for
    clocksource and SBI timer calls for clockevent device.
    2. Linux RISC-V M-mode (without MMU) where it will use CLINT MMIO
    counter register for clocksource and CLINT MMIO compare register
    for clockevent device.

    We now have a separate CLINT timer driver which also provide CLINT
    based IPI operations so let's remove CLINT MMIO related code from
    arch/riscv directory and RISC-V timer driver.

    Signed-off-by: Anup Patel
    Tested-by: Emil Renner Berhing
    Acked-by: Daniel Lezcano
    Reviewed-by: Atish Patra
    Reviewed-by: Palmer Dabbelt
    Signed-off-by: Palmer Dabbelt

    Anup Patel
     
  • We add a separate CLINT timer driver for Linux RISC-V M-mode (i.e.
    RISC-V NoMMU kernel).

    The CLINT MMIO device provides three things:
    1. 64bit free running counter register
    2. 64bit per-CPU time compare registers
    3. 32bit per-CPU inter-processor interrupt registers

    Unlike other timer devices, CLINT provides IPI registers along with
    timer registers. To use CLINT IPI registers, the CLINT timer driver
    provides IPI related callbacks to arch/riscv.

    Signed-off-by: Anup Patel
    Tested-by: Emil Renner Berhing
    Acked-by: Daniel Lezcano
    Reviewed-by: Atish Patra
    Reviewed-by: Palmer Dabbelt
    Signed-off-by: Palmer Dabbelt

    Anup Patel
     

15 Aug, 2020

1 commit

  • Pull MFD updates from Lee Jones:
    "Core Frameworks
    - Make better attempt at matching device with the correct OF node
    - Allow batch removal of hierarchical sub-devices

    New Drivers
    - Add STM32 Clocksource driver
    - Add support for Khadas System Control Microcontroller

    Driver Removal
    - Remove unused driver for TI's SMSC ECE1099

    New Device Support
    - Add support for Intel Emmitsburg PCH to Intel LPSS PCI
    - Add support for Intel Tiger Lake PCH-H to Intel LPSS PCI
    - Add support for Dialog DA revision to Dialog DA9063

    New Functionality
    - Add support for AXP803 to be probed by I2C

    Fix-ups
    - Numerous W=1 warning fixes
    - Device Tree changes (stm32-lptimer, gateworks-gsc, khadas,mcu, stmfx, cros-ec, j721e-system-controller)
    - Enabled Regmap 'fast I/O' in stm32-lptimer
    - Change BUG_ON to WARN_ON in arizona-core
    - Remove superfluous code/initialisation (madera, max14577)
    - Trivial formatting/spelling issues (madera-core, madera-i2c, da9055, max77693-private)
    - Switch to of_platform_populate() in sprd-sc27xx-spi
    - Expand out set/get brightness/pwm macros in lm3533-ctrlbank
    - Disable IRQs on suspend in motorola-cpcap
    - Clean-up error handling in intel_soc_pmic_mrfld
    - Ensure correct removal order of sub-devices in madera
    - Many s/HTTP/HTTPS/ link changes
    - Ensure name used with Regmap is unique in syscon

    Bug Fixes
    - Properly 'put' clock on unbind and error in arizona-core
    - Fix revision handling in da9063
    - Fix 'assignment of read-only location' error in kempld-core
    - Avoid using the Regmap API when atomic in rn5t618
    - Redefine volatile register description in rn5t618
    - Use locking to protect event handler in dln2"

    * tag 'mfd-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (76 commits)
    mfd: syscon: Use a unique name with regmap_config
    mfd: Replace HTTP links with HTTPS ones
    mfd: dln2: Run event handler loop under spinlock
    mfd: madera: Improve handling of regulator unbinding
    mfd: mfd-core: Add mechanism for removal of a subset of children
    mfd: intel_soc_pmic_mrfld: Simplify the return expression of intel_scu_ipc_dev_iowrite8()
    mfd: max14577: Remove redundant initialization of variable current_bits
    mfd: rn5t618: Fix caching of battery related registers
    mfd: max77693-private: Drop a duplicated word
    mfd: da9055: pdata.h: Drop a duplicated word
    mfd: rn5t618: Make restart handler atomic safe
    mfd: kempld-core: Fix 'assignment of read-only location' error
    mfd: axp20x: Allow the AXP803 to be probed by I2C
    mfd: da9063: Add support for latest DA silicon revision
    mfd: da9063: Fix revision handling to correctly select reg tables
    dt-bindings: mfd: st,stmfx: Remove I2C unit name
    dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller
    mfd: motorola-cpcap: Disable interrupt for suspend
    mfd: smsc-ece1099: Remove driver
    mfd: core: Add OF_MFD_CELL_REG() helper
    ...

    Linus Torvalds
     

05 Aug, 2020

1 commit

  • Pull timer updates from Thomas Gleixner:
    "Time, timers and related driver updates:

    - Prevent unnecessary timer softirq invocations by extending the
    tracking of the next expiring timer in the timer wheel beyond the
    existing NOHZ functionality.

    The tracking overhead at enqueue time is within the noise, but on
    sensitive workloads the avoidance of the soft interrupt invocation
    is a measurable improvement.

    - The obligatory new clocksource driver for Ingenic X100 OST

    - The usual fixes, improvements, cleanups and extensions for newer
    chip variants all over the driver space"

    * tag 'timers-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits)
    timers: Recalculate next timer interrupt only when necessary
    clocksource/drivers/ingenic: Add support for the Ingenic X1000 OST.
    dt-bindings: timer: Add Ingenic X1000 OST bindings.
    clocksource/drivers: Replace HTTP links with HTTPS ones
    clocksource/drivers/nomadik-mtu: Handle 32kHz clock
    clocksource/drivers/sh_cmt: Use "kHz" for kilohertz
    clocksource/drivers/imx: Add support for i.MX TPM driver with ARM64
    clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT.
    timers: Lower base clock forwarding threshold
    timers: Remove must_forward_clk
    timers: Spare timer softirq until next expiry
    timers: Expand clk forward logic beyond nohz
    timers: Reuse next expiry cache after nohz exit
    timers: Always keep track of next expiry
    timers: Optimize _next_timer_interrupt() level iteration
    timers: Add comments about calc_index() ceiling work
    timers: Move trigger_dyntick_cpu() to enqueue_timer()
    timers: Use only bucket expiry for base->next_expiry value
    timers: Preserve higher bits of expiration on index calculation
    clocksource/drivers/timer-atmel-tcb: Add sama5d2 support
    ...

    Linus Torvalds
     

26 Jul, 2020

1 commit


24 Jul, 2020

1 commit

  • Pull clock event/surce driver changes from Daniel Lezcano:

    - Add sama5d2 support and rework the 32kHz clock handling (Alexandre Belloni)
    - Add the high resolution support for SMP/SMT on the Ingenic timer (Zhou Yanjie)
    - Add support for i.MX TPM driver with ARM64 (Anson Huang)
    - Fix typo by replacing KHz to kHz (Geert Uytterhoeven)
    - Add 32kHz support by setting the minimum ticks to 5 on Nomadik MTU (Linus Walleij)
    - Replace HTTP links with HTTPS ones for security reasons (Alexander A. Klimov)
    - Add support for the Ingenic X1000 OST (Zhou Yanjie)

    Thomas Gleixner
     

23 Jul, 2020

6 commits

  • X1000 and SoCs after X1000 (such as X1500 and X1830) had a separate
    OST, it no longer belongs to TCU. This driver will register both a
    clocksource and a sched_clock to the system.

    Tested-by: 周正 (Zhou Zheng)
    Co-developed-by: 漆鹏振 (Qi Pengzhen)
    Signed-off-by: 漆鹏振 (Qi Pengzhen)
    Signed-off-by: 周琰杰 (Zhou Yanjie)
    Reviewed-by: Paul Cercueil
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200722171804.97559-3-zhouyanjie@wanyeetech.com

    周琰杰 (Zhou Yanjie)
     
  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Acked-by: Rob Herring
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200708165856.15322-1-grandmaster@al2klimov.de

    Alexander A. Klimov
     
  • It happens on the U8420-sysclk Ux500 PRCMU firmware
    variant that the MTU clock is just 32768 Hz, and in this
    mode the minimum ticks is 5 rather than two.

    I think this is simply so that there is enough time
    for the register write to propagate through the
    interconnect to the registers.

    Signed-off-by: Linus Walleij
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200628220153.67011-1-linus.walleij@linaro.org

    Linus Walleij
     
  • "K" stands for "kelvin".

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200618080212.16560-1-geert+renesas@glider.be

    Geert Uytterhoeven
     
  • Allows building and compile-testing the i.MX TPM driver for ARM64.

    Signed-off-by: Anson Huang
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/1594178168-13007-1-git-send-email-Anson.Huang@nxp.com

    Anson Huang
     
  • Enable clock event handling on per CPU core basis. Make sure that
    interrupts raised on the first core execute event handlers on the
    correct CPU core. This driver is required by Ingenic processors
    that support SMP/SMT, such as JZ4780 and X2000.

    Tested-by: H. Nikolaus Schaller
    Tested-by: Paul Boddie
    Signed-off-by: Paul Cercueil
    Signed-off-by: 周琰杰 (Zhou Yanjie)
    Signed-off-by: Daniel Lezcano
    Link: https://lore.kernel.org/r/20200624170749.31762-2-zhouyanjie@wanyeetech.com

    周琰杰 (Zhou Yanjie)