Age | Commit message (Collapse) | Author | Files | Lines |
|
[ Upstream commit 4d276e4d3bb4a503e75086faab54f92c0a8fd368 ]
Seemingly I mis-implemented the dependencies here. The OpenSBI docs only
point out that the "riscv,event-to-mhpmcounters property is mandatory if
riscv,event-to-mhpmevent is present". It never claims that
riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent.
Drop the dependency of riscv,event-to-mhpmcounters on
riscv,event-to-mhpmevent.
Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20230404-tractor-confusing-8852e552539a@spud
Signed-off-by: Rob Herring <robh@kernel.org>
|
|
[ Upstream commit 7e38085d9c59b6d07c1986ea43d046d457dcf646 ]
The SBI PMU extension requires a firmware to be aware of the event to
counter/mhpmevent mappings supported by the hardware. OpenSBI may use
DeviceTree to describe the PMU mappings. This binding is currently
described in markdown in OpenSBI (since v1.0 in Dec 2021) & used by QEMU
since v7.2.0.
Import the binding for use while validating dtb dumps from QEMU and
upcoming hardware (eg JH7110 SoC) that will make use of the event
mapping.
Link: https://github.com/riscv-software-src/opensbi/blob/master/docs/pmu_support.md
Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/riscv-sbi.adoc # Performance Monitoring Unit Extension
Co-developed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230113205435.122712-1-conor@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
|
|
PMU hardware is in the CPU core, move the pmu DT node out of the soc node.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Add the L2 cache DT node and add the next-level-cache for CPUs.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Add cpu-map DT node.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Change to "starfive,dubhe-80" and "starfive,dubhe-90" compatible strings.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Change to use starfive,dubhe-80 and starfive,dubhe-90 compatible strings.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Fix warning from checkpatch.pl.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
This patch fix file permission error reported by checkpatch.pl
("ERROR: do not set execute permissions for source files"),
by removing the executable permission.
Fixes: 48d98fcaffe6 ("perf vendor events riscv: Add JSON metrics for Dubhe-80 Perf")
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
|
|
This patch fix file permission error reported by checkpatch.pl
("ERROR: do not set execute permissions for source files"),
by removing the executable permission.
Fixes: bf1c0c20e4fa ("perf vendor events riscv: Add JSON metrics for Dubhe-90 Perf")
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
|
|
Add mapfile for StarFive's Dubhe-80 to support custom perf events.
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
|
|
Update Dubhe-90 mapfile with new MARCHID and MIMPID.
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
|
|
This patch updates QSPI partition to allow MTD util to update the
content inside the QSPI flash.
The QSPI partition are arranged as follow:
QSPI Flash content | Start Addr | End Addr | Size |
--------------------------------------------------------
Boot Copier(RO) | 0x00000000 | 0x00000fff | 4KB |
Boot Jump Code(RO) | 0x00001000 | 0x00001fff | 4KB |
U-Boot SPL | 0x00002000 | 0x00041fff | 256KB |
U-Boot FIT Image | 0x00042000 | 0x00141fff | 1MB |
Linux + Rootfs | 0x00142000 | 0x07ffffff | 126MB |
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
|
|
So that we can create virtual network consisting of bridge and
TAP interface attached to the bridge as a port.
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
Add Dubhe 80 DT support.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Move Dubhe FPGA common DT to *common.dtsi file, in preparation for Dubhe 80.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
- Add cpu0 and cpu1 label
- Update D cache and I cache settings
- Update "riscv,isa", remove unused 'n'.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Restructure the Dubhe device tree in preparation for Dubhe 80 support.
Rename existing Dubhe to Dubhe 90.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Add sscofpmf extension support and interrupt register.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Commit 338a93e3aea9 ("arch: riscv: kvm: Temporarily comment out
henvcfg-related code") has commented out calling to
kvm_riscv_vcpu_update_config() function. So, comment out
kvm_riscv_vcpu_update_config() function to resolve unused function
warning.
arch/riscv/kvm/vcpu.c:807:13: warning: 'kvm_riscv_vcpu_update_config' defined
but not used [-Wunused-function]
807 | static void kvm_riscv_vcpu_update_config(const unsigned long *isa)
|
Fixes: 338a93e3aea9 ("arch: riscv: kvm: Temporarily comment out henvcfg-related code")
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
[ upstream commit 0b1d60d6dd9e2e867cc6e4277d73ea5a7ff2d4d0 ]
commit 8eb060e10185 ("arch/riscv: add Zihintpause support") broke
building with CONFIG_CC_OPTIMIZE_FOR_SIZE enabled (gcc 11.1.0):
CC arch/riscv/kernel/vdso/vgettimeofday.o
In file included from <command-line>:
./arch/riscv/include/asm/jump_label.h: In function 'cpu_relax':
././include/linux/compiler_types.h:285:33: warning: 'asm' operand 0 probably does not match constraints
285 | #define asm_volatile_goto(x...) asm goto(x)
| ^~~
./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto'
41 | asm_volatile_goto(
| ^~~~~~~~~~~~~~~~~
././include/linux/compiler_types.h:285:33: error: impossible constraint in 'asm'
285 | #define asm_volatile_goto(x...) asm goto(x)
| ^~~
./arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto'
41 | asm_volatile_goto(
| ^~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
make: *** [arch/riscv/Makefile:128: vdso_prepare] Error 2
Having a static branch in cpu_relax() is problematic because that
function is widely inlined, including in some quite complex functions
like in the VDSO. A quick measurement shows this static branch is
responsible by itself for around 40% of the jump table.
Drop the static branch, which ends up being the same number of
instructions anyway. If Zihintpause is supported, we trade the nop from
the static branch for a div. If Zihintpause is unsupported, we trade the
jump from the static branch for (what gets interpreted as) a nop.
Fixes: 8eb060e10185 ("arch/riscv: add Zihintpause support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
|
|
|
|
Change PMU event mapping based on updated Dubhe Q2 2023 release
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Add common perf event support for StarFive Dubhe. Remove unsupported
events for StarFive Dubhe.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Handle different DMA directions.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
DMA_BIDIRECTIONAL cases also use invalidate.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
This patch ensure that only 10M Full Duplex and PAUSE are enabled
for StarFive Dubhe FPGA Platform
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Use marvell,reg-init node in mdio PHY to update the PHY settings
for StarFive Dubhe platform.
The following settings are enabled:
PAUSE+
ADVERTISED SPEED 10MBPS +
COPPER MODE+
AUTONEGOTIATION+
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This reverts commit 057202b6b0f0e9265d6e374f959f715bc3232227.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This reverts commit dbe28bc438226acf5b9523bf0a156433470e417d.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Removes server ip address field from bootargs ip.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This patch includes flash partition changes.
Signed-off-by: Yang Lee <yang.lee@starfivetech.com>
|
|
This patch updates pmu-events json array syntax.
Signed-off-by: Yang Lee <yang.lee@starfivetech.com>
|
|
These two configs are needed to run KVM guest.
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
Dubhe doesn't yet support vector extension.
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
entropy generation
MAX_SAMPLES_PER_BIT is defined as HZ / 15.
However, because of the use of integer division, when HZ < 15, MAX_SAMPLES_BIT_PER_BIT becomes 0. On Linux with CONFIG_HZ < 15, this causes kernel to always assume cycle counter is not suitable for generating jitter entropy.
Empirically, this assumption is not true on Dubhe FPGA with CONFIG_HZ_10, because regardless of the low CONFIG_HZ, Dubhe’s cycle counter is still able to produce entropy very fast, such that stack.samples_per_bit = 1.
Thus, this commit uses round-up when computing MAX_SAMPLES_PER_BIT:
MAX_SAMPLES_PER_BIT = DIV_ROUND_UP(HZ, 15) instead of simply HZ / 15.
This way, on Dubhe FPGA with CONFIG_HZ_10, we get MAX_SAMPLES_PER_BIT = 1, and the speed check in try_to_generate_entropy() will pass, which then allows the use of cycle counter to generate jitter entropy.
With this commit, Dubhe is now able to reach “crng init done” quickly whenever entropy is needed by a program during boot (ssh-keygen used by Buildroot's sshd).
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
This patch adds the dma non-coherent node in device tree.
Sets noncoherent_supported to true for CONFIG_SOC_STARFIVE_DUBHE
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This patch includes mtd configs
Signed-off-by: Yang Lee <yang.lee@starfivetech.com>
|
|
This patch includes flash partition changes.
Signed-off-by: Yang Lee <yang.lee@starfivetech.com>
|
|
Comment out kvm_riscv_vcpu_update_config since it touches currently
non-existent henvcfg CSR on Dubhe, because Dubhe is still using
hypervisor ISA v0.6.1.
Uncommenting is needed once Dubhe is upgraded with hypervisor ISA v1.0.
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
Needed to use ext4 filesystem.
Signed-off-by: Tan En De <ende.tan@starfivetech.com>
|
|
This patch parse the following config to a struct phylink:
* speed = 10Mbps
* duplex = full
* pause = RX on, TX on
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Set ip at kernel bootargs with the following parameters:
* Client IP Address: autoconfg using DHCP
* Server IP Address: not defined
* Gateway IP Address: 192.168.152.1
* Netmask: 255.255.255.0
* Network device to use: eth0
* Autoconfiguration: dhcp
Enable gmac driver.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This patch set AUTONEG_DISABLE during init to disable autonegotiation
by default.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
The Dubhe ace_20221130 bitfile does not support GMAC. This patch
re-enabled booting kernel through initramfs source "rootfs.cpio"
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
The ace_20221130 version does not have GMAC support. Disable GMAC driver
and remove NFS in the bootargs.
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
This patch adds NFS configuration in the bootargs. The bootargs
for NFS is set with the following parameters:
* Client IP Address: 192.168.152.100
* Server IP Address: 192.168.153.221
* Gateway IP Address: 192.168.152.1
* Netmask: 255.255.255.0
* Network device to use: eth0
* Autoconfiguration: off
* NFS root dir: /home/nfsroot
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|
|
Fix ethernet max-speed to 10Mb/s for FPGA.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
|
|
Enable arch_*dma* implementation.
Signed-off-by: Ley Foon Tan <leyfoon.tan@linux.starfivetech.com>
|
|
This patch introduces the support for GMAC drivers to perform flush
and invalidate of L2 Cache:
* sbi_cache_invalidate(): Invalidate L2 cache for data passed from GMAC
to CPU
* sbi_cache_flush(): Flush L2 cache for data passed from CPU to GMAC
Signed-off-by: Genevieve Chan <genevieve.chan@starfivetech.com>
|