linux/drivers/clk
Jernej Skrabec 8dc592c41f clk: sunxi-ng: Fix H6 RTC clock definition
While RTC clock was added in H616 ccu_common list, it was not in H6
list. That caused invalid pointer dereference like this:

Unable to handle kernel NULL pointer dereference at virtual address 000000000000020c
Mem abort info:
  ESR = 0x96000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000004d574000
[000000000000020c] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 96000004 [#1] PREEMPT SMP
CPU: 3 PID: 339 Comm: cat Tainted: G    B             5.18.0-rc1+ #1352
Hardware name: Tanix TX6 (DT)
pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : ccu_gate_is_enabled+0x48/0x74
lr : ccu_gate_is_enabled+0x40/0x74
sp : ffff80000c0b76d0
x29: ffff80000c0b76d0 x28: 00000000016e3600 x27: 0000000000000000
x26: 0000000000000000 x25: 0000000000000002 x24: ffff00000952fe08
x23: ffff800009611400 x22: ffff00000952fe79 x21: 0000000000000000
x20: 0000000000000001 x19: ffff80000aad6f08 x18: 0000000000000000
x17: 2d2d2d2d2d2d2d2d x16: 2d2d2d2d2d2d2d2d x15: 2d2d2d2d2d2d2d2d
x14: 0000000000000000 x13: 00000000f2f2f2f2 x12: ffff700001816e89
x11: 1ffff00001816e88 x10: ffff700001816e88 x9 : dfff800000000000
x8 : ffff80000c0b7447 x7 : 0000000000000001 x6 : ffff700001816e88
x5 : ffff80000c0b7440 x4 : 0000000000000001 x3 : ffff800008935c50
x2 : dfff800000000000 x1 : 0000000000000000 x0 : 000000000000020c
Call trace:
 ccu_gate_is_enabled+0x48/0x74
 clk_core_is_enabled+0x7c/0x1c0
 clk_summary_show_subtree+0x1dc/0x334
 clk_summary_show_subtree+0x250/0x334
 clk_summary_show_subtree+0x250/0x334
 clk_summary_show_subtree+0x250/0x334
 clk_summary_show_subtree+0x250/0x334
 clk_summary_show+0x90/0xdc
 seq_read_iter+0x248/0x6d4
 seq_read+0x17c/0x1fc
 full_proxy_read+0x90/0xf0
 vfs_read+0xdc/0x28c
 ksys_read+0xc8/0x174
 __arm64_sys_read+0x44/0x5c
 invoke_syscall+0x60/0x190
 el0_svc_common.constprop.0+0x7c/0x160
 do_el0_svc+0x38/0xa0
 el0_svc+0x68/0x160
 el0t_64_sync_handler+0x10c/0x140
 el0t_64_sync+0x18c/0x190
Code: d1006260 97e5c981 785e8260 8b0002a0 (b9400000)
---[ end trace 0000000000000000 ]---

Fix that by adding rtc clock to H6 ccu_common list too.

Fixes: 38d321b61b ("clk: sunxi-ng: h6-r: Add RTC gate clock")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220719183725.2605141-1-jernej.skrabec@gmail.com
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2022-07-27 16:45:58 -07:00
..
actions clk: actions: remove redundant assignment after a mask operation 2022-04-22 19:01:20 -07:00
analogbits
at91 clk: at91: generated: consider range when calculating best rate 2022-05-17 12:41:07 -07:00
axis clk: cleanup comments 2022-03-11 18:22:15 -08:00
axs10x
baikal-t1
bcm Mainly driver updates this time around. There's a single patch to the core clk 2022-05-27 15:33:24 -07:00
berlin
davinci
hisilicon Merge branches 'clk-starfive', 'clk-ti', 'clk-terminate' and 'clk-cleanup' into clk-next 2022-03-29 10:19:10 -07:00
imgtec
imx Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
ingenic clk: ingenic-tcu: Fix missing TCU clock for X1000 SoCs 2022-05-18 17:30:36 -07:00
keystone clk: keystone: syscon-clk: Add support for AM62 epwm-tbclk 2022-04-22 19:04:47 -07:00
loongson1 clk: loongson1: Terminate clk_div_table with sentinel element 2022-03-11 18:13:24 -08:00
mediatek clk: mediatek: mt8173: Switch to clk_hw provider APIs 2022-05-19 16:57:57 -07:00
meson clk: cleanup comments 2022-03-11 18:22:15 -08:00
microchip clk: microchip: mpfs: add RTCREF clock control 2022-04-22 18:40:26 -07:00
mmp Merge branches 'clk-starfive', 'clk-ti', 'clk-terminate' and 'clk-cleanup' into clk-next 2022-03-29 10:19:10 -07:00
mstar
mvebu clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it 2022-02-17 14:06:12 -08:00
mxs
nxp clk: nxp: Declare mux table parameter as const u32 * 2022-02-25 16:41:39 -08:00
pistachio clk: pistachio: Declare mux table as const u32[] 2022-02-25 16:41:39 -08:00
pxa ARM: pxa: move clk register definitions to driver 2022-05-07 22:55:49 +02:00
qcom Mainly driver updates this time around. There's a single patch to the core clk 2022-05-27 15:33:24 -07:00
ralink clk: ralink: make system controller node a reset provider 2022-02-15 17:06:37 +01:00
renesas dmaengine updates for v5.19-rc1 2022-05-29 11:38:27 -07:00
rockchip clk: rockchip: Mark hclk_vo as critical on rk3568 2022-05-03 11:16:48 +02:00
samsung clk: samsung: exynosautov9: add cmu_peric1 clock support 2022-05-10 19:19:34 +02:00
sifive clk: sifive: Move all stuff into SoCs header files from C files 2022-03-15 15:56:28 -07:00
socfpga clk: cleanup comments 2022-03-11 18:22:15 -08:00
spear
sprd
st clk: st: clkgen-mux: search reg within node or parent 2022-01-05 17:21:28 -08:00
starfive clk: starfive: Add JH7100 audio clock driver 2022-03-10 18:17:33 -08:00
stm32 clk: stm32: rcc_reset: Fix missing spin_lock_init() 2022-06-09 15:34:08 -07:00
sunxi clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() 2022-04-25 19:50:53 +02:00
sunxi-ng clk: sunxi-ng: Fix H6 RTC clock definition 2022-07-27 16:45:58 -07:00
tegra clk: tegra: Update kerneldoc to match prototypes 2022-05-06 10:56:00 +02:00
ti clk: ti: clkctrl: replace usage of found with dedicated list iterator variable 2022-05-20 20:40:58 -07:00
uniphier clk: uniphier: Fix fixed-rate initialization 2022-03-11 19:29:02 -08:00
ux500 clk: ux500: fix a possible off-by-one in u8500_prcc_reset_base() 2022-05-18 13:34:03 -07:00
versatile clk: versatile: clk-icst: use after free on error path 2021-12-07 12:25:29 -08:00
visconti clk: visconti: prevent array overflow in visconti_clk_register_gates() 2022-03-17 12:21:28 -07:00
x86 clk: x86: Fix clk_gate_flags for RV_CLK_GATE 2022-01-06 17:57:53 -08:00
xilinx
zynq clk: zynq: Update the parameters to zynq_clk_register_periph_clk 2022-03-29 10:17:49 -07:00
zynqmp clk: zynqmp: replace warn_once with pr_debug for failed clock ops 2022-01-24 17:18:23 -08:00
.kunitconfig clk: Introduce Kunit Tests for the framework 2022-03-11 19:14:38 -08:00
clk_test.c Revert "clk: Drop the rate range on clk_put()" 2022-04-02 19:28:53 -07:00
clk-apple-nco.c clk: clk-apple-nco: Allow and fix module building 2022-03-15 09:56:12 -07:00
clk-asm9260.c
clk-aspeed.c
clk-aspeed.h
clk-ast2600.c clk/ast2600: Fix soc revision for AHB 2021-11-03 19:42:35 -07:00
clk-axi-clkgen.c
clk-axm5516.c
clk-bd718x7.c
clk-bm1880.c clk: bm1880: remove kfrees on static allocations 2022-01-06 17:46:56 -08:00
clk-bulk.c
clk-cdce706.c clk: cdce706: use simple i2c probe function 2022-04-22 19:28:06 -07:00
clk-cdce925.c clk: cdce925: use i2c_match_id and simple i2c probe 2022-04-22 19:28:07 -07:00
clk-clps711x.c clk: clps711x: Terminate clk_div_table with sentinel element 2022-03-11 18:13:24 -08:00
clk-composite.c clk: composite: Fix 'switching' to same clock 2021-11-03 17:49:54 -07:00
clk-conf.c
clk-cs2000-cp.c clk: cs2000-cp: use simple i2c probe function 2022-04-22 19:28:07 -07:00
clk-devres.c
clk-divider.c
clk-en7523.c clk: en7523: fix wrong pointer check in en7523_clk_probe() 2022-04-26 11:17:47 -07:00
clk-fixed-factor.c clk: fixed-factor: Introduce devm_clk_hw_register_fixed_factor_index() 2022-03-18 14:04:54 -07:00
clk-fixed-mmio.c
clk-fixed-rate.c clk: fixed-rate: Remove redundant if statement 2022-05-16 23:45:53 -07:00
clk-fractional-divider.c clk: cleanup comments 2022-03-11 18:22:15 -08:00
clk-fractional-divider.h
clk-fsl-flexspi.c
clk-fsl-sai.c
clk-gate_test.c clk: gate: Add some kunit test suites 2022-01-24 17:22:53 -08:00
clk-gate.c clk: gate: Add devm_clk_hw_register_gate() 2021-12-08 11:19:20 +01:00
clk-gemini.c clk: Gemini: fix struct name in kernel-doc 2021-12-02 17:27:48 -08:00
clk-gpio.c
clk-hi655x.c
clk-highbank.c
clk-hsdk-pll.c
clk-k210.c
clk-lan966x.c clk: lan966x: Fix the lan966x clock gate register address 2022-07-19 00:04:10 -07:00
clk-lmk04832.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
clk-lochnagar.c
clk-max9485.c clk: max9485: use simple i2c probe function 2022-04-22 19:28:08 -07:00
clk-max77686.c
clk-milbeaut.c
clk-moxart.c
clk-multiplier.c
clk-mux.c clk: mux: remove redundant initialization of variable width 2022-04-25 15:49:20 -07:00
clk-nomadik.c
clk-npcm7xx.c
clk-nspire.c
clk-oxnas.c clk: Use of_device_get_match_data() 2022-03-11 19:23:30 -08:00
clk-palmas.c
clk-plldig.c
clk-pwm.c
clk-qoriq.c
clk-renesas-pcie.c clk: renesas-pcie: use simple i2c probe function 2022-04-22 19:28:09 -07:00
clk-rk808.c
clk-s2mps11.c
clk-scmi.c clk: scmi: Support atomic clock enable/disable API 2022-02-21 10:37:00 +00:00
clk-scpi.c
clk-si514.c clk: si514: use simple i2c probe function 2022-04-22 19:28:08 -07:00
clk-si544.c clk: si544: use i2c_match_id and simple i2c probe 2022-04-22 19:28:08 -07:00
clk-si570.c clk: si570: use i2c_match_id and simple i2c probe 2022-04-22 19:28:08 -07:00
clk-si5341.c clk: si5341: use simple i2c probe function 2022-04-22 19:28:08 -07:00
clk-si5351.c clk: si5351: use i2c_match_id and simple i2c probe 2022-04-22 19:28:08 -07:00
clk-si5351.h clk: si5351: Update datasheet references 2021-11-02 14:29:17 -07:00
clk-sparx5.c
clk-stm32f4.c clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell 2021-12-15 22:45:48 -08:00
clk-stm32h7.c
clk-stm32mp1.c clk: stm32mp1: Add parent_data to ETHRX clock 2022-01-24 17:17:31 -08:00
clk-tps68470.c clk: Introduce clk-tps68470 driver 2021-12-15 20:12:07 -08:00
clk-twl6040.c
clk-versaclock5.c clk: vc5: Use i2c .probe_new 2021-11-02 14:28:51 -07:00
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync 2022-04-22 19:03:00 -07:00
clk.h
clkdev.c
Kconfig Merge branches 'clk-rockchip', 'clk-ingenic', 'clk-bindings', 'clk-samsung' and 'clk-stm' into clk-next 2022-05-25 00:27:09 -07:00
Makefile Mainly driver updates this time around. There's a single patch to the core clk 2022-05-27 15:33:24 -07:00