f778078...
by
Colin Ian King
on 2021-01-05
UBUNTU: [Config] Align configs with Unleashed defconfigs
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
The Unleashed defconfigs disable PM enable CPU freq with
usermode control'd cpu frequency scaling so ensure we are
following the recommended configuration. This also solves
some mysterious RCU stalling and some spurious flash drive
delays that cause boot and shutdown to become unreliable.
Signed-off-by: Colin Ian King <email address hidden>
d2a6b1e...
by
Greentime Hu <email address hidden>
on 2020-10-29
irqchip/ sifive- plic: Fix getting wrong chip_data when interrupt is hierarchy
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
This oops is caused by a wrong chip_data and it is because plic_irq_unmask
uses irq_get_ chip_data( irq_data- >irq) to get the chip_data. However it may
get another irq_data with the same irq_data->irq if it is hierarchy.
In this case, it will get irq_data of sifive_gpio_irqchip instead of
plic_chip so that it will get a wrong chip_data and then the wrong lmask
of it to cause this oops.
To fix this issue, we can use irq_data_ get_irq_ chip_data( irq_data) to get
the correct chip_data of plic_chip.
(gdb) p d
$11 = (struct irq_data *) 0xffffffe1f695f620
(gdb) p *d
$9 = {
mask = 0,
irq = 57,
hwirq = 6,
common = 0xffffffe1f695f600,
chip = 0xffffffe0018b5630 <sifive_ gpio_irqchip> ,
domain = 0xffffffe1f692c400,
parent_data = 0xffffffe1f68482c0,
chip_data = 0xffffffe1f564a820
}
(gdb) p d
$6 = (struct irq_data *) 0xffffffe1f68482c0
(gdb) p *d
$7 = {
mask = 0,
irq = 57,
hwirq = 29,
common = 0xffffffe1f695f600,
chip = 0xffffffe0018b5070 <plic_chip>,
domain = 0xffffffe1f6635e00,
parent_data = 0x0,
chip_data = 0xffffffe1f660f1a0
}
[ 3.030165] ------------[ cut here ]------------
[ 3.034614] WARNING: CPU: 1 PID: 1 at drivers/ irqchip/ irq-sifive- plic.c: 125 plic_irq_ unmask+ 0xc4/0x114
[ 3.043887] Modules linked in:
[ 3.046932] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.9.0 #1
[ 3.052748] epc: ffffffe000588e90 ra : ffffffe000588e88 sp : ffffffe1f6753940
[ 3.059869] gp : ffffffe001978f48 tp : ffffffe1f6748000 t0 : ffffffe001995cb0
[ 3.067080] t1 : ffffffe001995be8 t2 : 73616d61202c343a s0 : ffffffe1f67539a0
[ 3.074288] s1 : ffffffe1f4968140 a0 : 00000000000000b2 a1 : 0000000000000000
[ 3.081497] a2 : 00000000000000c2 a3 : 0000000000000000 a4 : 381c5a89432fe900
[ 3.088707] a5 : 0000000000000004 a6 : 0000000000000000 a7 : 00000000000001aa
[ 3.095916] s2 : ffffffe1f5901020 s3 : ffffffe00197a0a8 s4 : ffffffe001978b0c
[ 3.103125] s5 : ffffffe00197a1f0 s6 : 0000000000000008 s7 : ffffffe1f4983c9c
[ 3.110335] s8 : ffffffe1f4983c68 s9 : ffffffe1f4983c00 s10: ffffffe00000117c
[ 3.117544] s11: 0000000000000000 t3 : 0000000000000007 t4 : 0000000000000000
[ 3.124753] t5 : 66666666663a6b73 t6 : ffffffe001988479
[ 3.130052] status: 0000000200000100 badaddr: ffffffe001978b0c cause: 0000000000000003
[ 3.137959] ---[ end trace dbc1129f842ecba3 ]---
Fixes: f1ad1133b18f ("irqchip/ sifive- plic: Add support for multiple PLICs")
Signed-off-by: Greentime Hu <email address hidden>
Reviewed-by: Anup Patel <email address hidden>
Reviewed-by: Atish Patra <email address hidden>
Acked-by: Palmer Dabbelt <email address hidden>
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/irqchip- sifive- plix-fix- getting- wrong-chip_ date-when- interrupt- is-hierarchy. patch )
Signed-off-by: Colin Ian King <email address hidden>
21970a1...
by
Greentime Hu <email address hidden>
on 2020-10-20
irqchip/ sifive- plic: Fix broken irq_set_affinity() callback
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
It will always enable the interrupt after calling plic_set_affinity()
however it should set to it previous setting. Staying disabled or enabled.
This patch can also fix this pwm hang issue in Unleashed board.
[ 919.015783] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[ 919.020922] rcu: 0-...0: (0 ticks this GP)
idle=7d2/ 1/0x40000000000 00002 softirq=1424/1424 fqs=105807
[ 919.030295] (detected by 1, t=225825 jiffies, g=1561, q=3496)
[ 919.036109] Task dump for CPU 0:
[ 919.039321] kworker/0:1 R running task 0 30 2 0x00000008
[ 919.046359] Workqueue: events set_brightness_ delayed
[ 919.051302] Call Trace:
[ 919.053738] [<ffffffe000930 d92>] __schedule+ 0x194/0x4de
[ 982.035783] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[ 982.040923] rcu: 0-...0: (0 ticks this GP)
idle=7d2/ 1/0x40000000000 00002 softirq=1424/1424 fqs=113325
[ 982.050294] (detected by 1, t=241580 jiffies, g=1561, q=3509)
[ 982.056108] Task dump for CPU 0:
[ 982.059321] kworker/0:1 R running task 0 30 2 0x00000008
[ 982.066359] Workqueue: events set_brightness_ delayed
[ 982.071302] Call Trace:
[ 982.073739] [<ffffffe000930 d92>] __schedule+ 0x194/0x4de
[..]
Fixes: bb0fed1c60cc ("irqchip/ sifive- plic: Switch to fasteoi flow")
Signed-off-by: Greentime Hu <email address hidden>
Reviewed-by: Anup Patel <email address hidden>
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/irqchip- sifive- plic-fix- broken- irq_set_ affinity- callback. patch )
Signed-off-by: Colin Ian King <email address hidden>
5bf65de...
by
Sagar Shrikant Kadam <email address hidden>
on 2020-10-21
i2c: ocores: fix polling mode workaround on FU540-C000 SoC
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
The FU540-C000 has a broken IRQ and support was added earlier
so that it will operate in polling mode, but seems to work only
in case interrupts property is missing from the i2c0 dt-node.
This should not be the case and the driver should handle polling
mode with the interrupt property present in i2c0 node of the
device tree.
So check if it's the FU540-C000 soc and enable polling mode master
xfers, as the IRQ for this chip is broken.
Fixes commit c45d4ba86731 ("i2c: ocores: add polling mode workaround
for Sifive FU540-C000 SoC")
Signed-off-by: Sagar Shrikant Kadam <email address hidden>
Acked-by: Peter Korsgaard <email address hidden>
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/i2c- ocores- fix-polling- mode-workaround -on-FU540- C000-SoC. patch )
Signed-off-by: Colin Ian King <email address hidden>
b6fc968...
by
David Abdurachmanov <email address hidden>
on 2020-06-05
SiFive HiFive Unleashed: Add PWM LEDs (D1, D2, D3, D4)
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
By default no functions are assigned to LEDs. It's up to user/distribution
to provide udev rules to configure them.
Signed-off-by: David Abdurachmanov <email address hidden>
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/0007- Add-PWM- LEDs-D1- D2-D3-D4. patch )
Signed-off-by: Colin Ian King <email address hidden>
6899295...
by
David Abdurachmanov <email address hidden>
on 2020-01-28
SiFive Unleashed CPUFreq
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
Source: https:/ /github. com/sifive/ riscv-linux/ commits/ dev/paulw/ cpufreq- dt-aloe- v5.3-rc4
Signed-off-by: David Abdurachmanov <email address hidden>
Upstream-Status: Not posted for a review
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/0004- SiFive- Unleashed- CPUFreq. patch )
Signed-off-by: Colin Ian King <email address hidden>
aaa38ad...
by
David Abdurachmanov <email address hidden>
on 2020-01-28
HACK: Revert "of/device: Really only set bus DMA mask when appropriate"
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
This reverts commit 6778be4e5209596 59b27a441c06a84 c9cb009085.
Reverting the commit fixes these error messages and an non-functioning
USB bus when attaching a USB to PCIe card to a RISC-V board:
xhci_hcd 0000:03:00.0: Host took too long to start, waited 16000 microseconds.
xhci_hcd 0000:03:00.0: startup error -19
xhci_hcd 0000:03:00.0: USB bus 2 deregistered
xhci_hcd 0000:03:00.0: WARNING: Host System Error
xhci_hcd 0000:03:00.0: remove, state 1
Signed-off-by: Alistair Francis <email address hidden>
Signed-off-by: David Abdurachmanov <email address hidden>
Upstream-Status: Denied
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/0003- HACK-Revert- of-device- Really- only-set- bus-DMA- mask-w. patch )
Signed-off-by: Colin Ian King <email address hidden>
5e955be...
by
David Abdurachmanov <email address hidden>
on 2020-01-28
Microsemi PCIe expansion board DT entry.
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
Rebased on v5.5 (no actual changes).
Signed-off-by: Atish Patra <email address hidden>
Signed-off-by: Alistair Francis <email address hidden>
Signed-off-by: David Abdurachmanov <email address hidden>
Upstream-Status: Inappropriate [enable feature]
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/0002- Microsemi- PCIe-expansion- board-DT- entry.patch )
Signed-off-by: Colin Ian King <email address hidden>
f73f8f1...
by
David Abdurachmanov <email address hidden>
on 2020-01-28
PCI: microsemi: Add host driver for Microsemi PCIe controller
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
This patch adds support to the Microsemi/Microchip PolarFire
PCIe controller when configured in host (Root Complex) mode.
This was rebased for v5.5 kernel. Modifications are made based
on 3c65ebff8faedfc 3386e6e1ad91adf 2bdb8eeaa7 and
331f63457165a30 c708280de2c77f1 742c6351dc
Signed-off-by: David Abdurachmanov <email address hidden>
Signed-off-by: Daire McNamara <email address hidden>
Upstream-Status: Inappropriate [not author]
Signed-off-by: David Abdurachmanov <email address hidden>
(backported from https:/ /github. com/sifive/ meta-sifive/ blob/2020. 11/recipes- kernel/ linux/files/ freedom- u540/0001- PCI-microsemi- Add-host- driver- for-Microsemi- PCIe-con. patch )
Signed-off-by: Colin Ian King <email address hidden>
574a0d7...
by
Yash Shah <email address hidden>
on 2020-12-02
riscv: dts: add initial board data for the SiFive HiFive Unmatched
BugLink: https:/ /bugs.launchpad .net/bugs/ 1910965
Add initial board data for the SiFive HiFive Unmatched A00
Signed-off-by: Yash Shah <email address hidden>
(backported from https:/ /lore.kernel <email address hidden>/)
Signed-off-by: Colin Ian King <email address hidden>