Age | Commit message (Collapse) | Author | Files | Lines |
|
After commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to
archs where they work"), bpf_probe_read{, str}() functions were no longer
available on MIPS, so there exist some errors when running bpf program:
root@linux:/home/loongson/bcc# python examples/tracing/task_switch.py
bpf: Failed to load program: Invalid argument
[...]
11: (85) call bpf_probe_read#4
unknown func bpf_probe_read#4
[...]
Exception: Failed to load BPF program count_sched: Invalid argument
ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE should be restricted to archs
with non-overlapping address ranges, but they can overlap in EVA mode
on MIPS, so select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA in
arch/mips/Kconfig, otherwise the bpf old helper bpf_probe_read() will
not be available.
This is similar with the commit d195b1d1d119 ("powerpc/bpf: Enable
bpf_probe_read{, str}() on powerpc again").
Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work")
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
When page size larger than 16KB, arguments "vaddr + size(16KB)" in
"ioremap_page_range(vaddr, vaddr + size,...)" called by
"add_legacy_isa_io" is not page-aligned.
As loongson64 needs at least page size 16KB to get rid of cache alias,
and "vaddr" is 64KB-aligned, and 64KB is largest page size supported,
rounding "size" up to PAGE_SIZE is enough for all page size supported.
Fixes: 6d0068ad15e4 ("MIPS: Loongson64: Process ISA Node in DeviceTree")
Signed-off-by: Huang Pei <[email protected]>
Acked-by: Jiaxun Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The Ralink MIPS platform does not use Common Clock Framework and does
not define certain clock operations leading to compile test failures:
/usr/bin/mips-linux-gnu-ld: drivers/usb/phy/phy-tegra-usb.o: in function `tegra_usb_phy_init':
phy-tegra-usb.c:(.text+0x1dd4): undefined reference to `clk_get_parent'
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: John Crispin <[email protected]>
Reviewed-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Add default config for Loongson-2K1000.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Add liointc-2.0 properties support, so update the maxItems and
condition description.
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Add IO interrupt controller support for Loongson-2K1000, different
from the Loongson-3A series is that Loongson-2K1000 has 64 interrupt
sources, 0-31 correspond to the device tree liointc0 device node, and
the other correspond to liointc1 node.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Distinguish between Loongson-3A series CPU and Loongson-2K1000 CPU UART0.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Get the fixed-clock from the CPU0 node of the device tree.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Add DTB boot support, only support Loongson-2K1000 processor
for now, determine whether to use the built-in DTB or the DTB
from the firmware by checking the range of CKSEG0 and XKPHYS.
loongson_fw_interface will be used in the future.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Add DeviceTree files for Loongson-2K1000 processor, currently only
supports single-core boot.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Tested-by: Ming Wang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
commit ba9196d2e005 ("MIPS: Make DIEI support as a config option")
use CPU_HAS_DIEI to indicate whether di/ei is implemented correctly,
without this patch, "local_irq_disable" from entry.S in 3A1000
(with buggy di/ei) lose protection of commit e97c5b609880 ("MIPS:
Make irqflags.h functions preempt-safe for non-mipsr2 cpus")
Fixes: ba9196d2e005 ("MIPS: Make DIEI support as a config option")
Signed-off-by: Huang Pei <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Enable support for the onboard PATA PIO mode3 interface, which is one of
the boot devices supported by the CFE firmware with the Broadcom SWARM
board. Include disk, CD-ROM and generic storage drivers.
Signed-off-by: Maciej W. Rozycki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Options have been removed and reordered since the last update, so
regenerate the template so as not to interfere with actual changes.
Signed-off-by: Maciej W. Rozycki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Various malta defconfigs enable CONFIG_IDE for the tc86c001 ide driver,
hich is a Toshiba plug in card that does not make much sense to use on
bigsur platforms. For all other ATA cards libata support is already
enabled.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
bigsur_defconfig enables CONFIG_IDE for the tc86c001 ide driver, which
is a Toshiba plug in card that does not make much sense to use on bigsur
platforms. For all other ATA cards libata support is already enabled.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
rbtx49xx_defconfig enables CONFIG_IDE for the tx4938 and tx4939 ide
drivers, but those aren't actually used by the last known remaining user:
https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Use libata instead of the deprecated legacy ide driver in
workpad_defconfig.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
sb1250_swarm_defconfig enables CONFIG_IDE but no actual host controller
driver, so just drop CONFIG_IDE, CONFIG_BLK_DEV_IDECD and
CONFIG_BLK_DEV_IDETAPE as they are useless.
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Maciej W. Rozycki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
s/packt/packet/
Signed-off-by: Bhaskar Chowdhury <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
s/techically/technically/
Signed-off-by: Bhaskar Chowdhury <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
debugfs_create_file_unsafe does not protect the fops handed to it
against file removal. DEFINE_DEBUGFS_ATTRIBUTE makes the fops aware of
the file lifetime and thus protects it against removal.
Signed-off-by: Wang Qing <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
+. LOONGSON64 use 0x98xx_xxxx_xxxx_xxxx as xphys cached, instread of
0xa8xx_xxxx_xxxx_xxxx
+. let CONFIG_MIPS_PGD_C0_CONTEXT depend on 64bit
+. cast CAC_BASE into u64 to silence warning on MIPS32
CP0 Context has enough room for wraping pgd into its 41-bit PTEBase field.
+. For XPHYS, the trick is that pgd is 4kB aligned, and the PABITS <= 53,
only save 53 - 12 = 41 bits, aka :
bit[63:59] | 0000 00 | bit[53:12] | 0000 0000 0000
+. for CKSEG0, only save 29 - 12 = 17 bits
when switching pgd, only need to save bit[53:12] or bit[28:12] into
CP0 Context's bit[63:23], see folling asm generated at run time
tlbmiss_handler_setup_pgd:
.set push
.set noreorder
dsra a2, a0, 29
move a3, a0
dins a0, zero, 29, 35
daddiu a2, a2, 4 //for CKSEG0, a2 from 0xfffffffffffffffc
//into 0
movn a0, a3, a2
dsll a0, a0, 11
jr ra
dmtc0 a0, CP0_CONTEXT
.set pop
when using it on page walking
dmfc0 k0, CP0_CONTEXT
dins k0, zero, 0, 23 // zero badv2
ori k0, k0, (CAC_BASE >> 53) // *prefix* with bit[63:59]
drotr k0, k0, 11 // kick it in the right place
Signed-off-by: Huang Pei <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The NT39016 panel is a fun beast, even though the documentation states
that the CS line is active-low, it will work just fine if the CS line is
configured as active-high, but it won't work if the CS line is forced
low or forced high.
Since it did actually work with the spi-cs-high property, this is not a
bugfix, but we should nonetheless remove that property to match the
documentation.
Signed-off-by: Paul Cercueil <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The NT39016 panel is a fun beast, even though the documentation states
that the CS line is active-low, it will work just fine if the CS line is
configured as active-high, but it won't work if the CS line is forced
low or forced high.
Since it did actually work with the spi-cs-high property, this is not a
bugfix, but we should nonetheless remove that property from the example
to match the documentation.
Signed-off-by: Paul Cercueil <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Separated function was not improving code quality much (or at all).
Moreover it expected possible flash end address as argument and it was
returning NVRAM size.
The new code always operates on offsets which means less logic and less
calculations.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
This loop requires variable initialization, stop condition and post
iteration increment. It's pretty much a for loop definition.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
This simplifies function finding NVRAM. It doesn't directly deal with
NVRAM structure anymore and is a bit smaller.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
This avoids duplicating code doing casting and checking for NVRAM magic.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
1. Use "bcm47xx_" function name prefix for consistency
2. It takes flash start as argument so s/iobase/flash_start/
3. "off" was used for finding flash end so just call it "flash_size"
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Loongson64 allocates arrays of pglist_data statically and is located
at Node 0, and cpu from Nodes other than 0 need remote access to
pglist_data and zone info.
Delay pglist_data allocation till run time, and make it NUMA-aware
Signed-off-by: Huang Pei <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The purpose of separating loongson_system_configuration from boot_param.h
is to keep the other structure consistent with the firmware.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Acked-by: Jiaxun Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
We don't need them anymore, They are uniform on all Loongson64 systems
and have been fixed in DeviceTree.loongson3_platform_init is replaced
with DTS + driver.
Signed-off-by: Jiaxun Yang <[email protected]>
Signed-off-by: Qing Zhang <[email protected]>
Acked-by: Jiaxun Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Upstream a long-standing OpenWrt patch [0] that fixes MT7620 PCIe PLL
lock check. The existing code checks the wrong register bit: PPLL_SW_SET
is not defined in PPLL_CFG1 and bit 31 of PPLL_CFG1 is marked as reserved
in the MT7620 Programming Guide. The correct bit to check for PLL lock
is PPLL_LD (bit 23).
Also reword the error message for clarity.
Without this change it is unlikely that this driver ever worked with
mainline kernel.
[0]: https://lists.infradead.org/pipermail/lede-commits/2017-July/004441.html
Signed-off-by: Ilya Lipnitskiy <[email protected]>
Cc: John Crispin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Now that there are proper device tree bindings we can start using them.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Change /include/ with #include in order to be able to include header files
from dt-bindings.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
bpftrace is a high-level tracing language for Linux enhanced Berkeley
Packet Filter (eBPF) available in recent Linux kernels (4.x). bpftrace
uses LLVM as a backend to compile scripts to BPF-bytecode and makes use
of BCC for interacting with the Linux BPF system, as well as existing
Linux tracing capabilities: kernel dynamic tracing (kprobes), user-level
dynamic tracing (uprobes), and tracepoints.
According to Linux Kernel Requirements in bpftrace/INSTALL.md [1], the
kernel needs to be built with the following options:
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_FUNCTION_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_HAVE_KPROBES=y
CONFIG_KPROBES=y
CONFIG_KPROBE_EVENTS=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_UPROBES=y
CONFIG_UPROBE_EVENTS=y
CONFIG_DEBUG_FS=y
So enable some missed configs in loongson3_defconfig to make sure
the above configs are set after make loongson3_defconfig.
[1] https://github.com/iovisor/bpftrace/blob/master/INSTALL.md
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
s/revelant/relevant/
Signed-off-by: Bhaskar Chowdhury <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Many architectures duplicate similar shell scripts.
This commit converts mips to use scripts/syscallhdr.sh.
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
Many architectures duplicate similar shell scripts.
This commit converts mips to use scripts/syscalltbl.sh. This also
unifies syscall_table_32_o32.h and syscall_table_64_o32.h into
syscall_table_o32.h.
The offset parameters are unneeded here; __SYSCALL(nr, entry) is defined
as 'PTR entry', so the parameter 'nr' is not used in the first place.
With this commit, syscall tables and generated files are straight
mapped, which makes things easier to understand.
syscall_n32.tbl --> syscall_table_n32.h
syscall_n64.tbl --> syscall_table_n64.h
syscall_o32.tbl --> syscall_table_o32.h
Then, the abi parameters are also unneeded.
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
After removal of the guest part of KVM TE (trap and emulate), also remove
the host part.
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
KVM_GUEST is broken and unmaintained, so let's remove it.
Reviewed-by: Huacai Chen <[email protected]>
Reviewed-by: Jiaxun Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
- fixes for boot breakage because of misaligned FDTs
- fix for overwritten exception handlers
- enable MIPS optimized crypto for all MIPS CPUs to improve wireguard
performance
|
|
BMIPS is one of the few platforms that do change the exception base.
After commit 2dcb39645441 ("memblock: do not start bottom-up allocations
with kernel_end") we started seeing BMIPS boards fail to boot with the
built-in FDT being corrupted.
Before the cited commit, early allocations would be in the [kernel_end,
RAM_END] range, but after commit they would be within [RAM_START +
PAGE_SIZE, RAM_END].
The custom exception base handler that is installed by
bmips_ebase_setup() done for BMIPS5000 CPUs ends-up trampling on the
memory region allocated by unflatten_and_copy_device_tree() thus
corrupting the FDT used by the kernel.
To fix this, we need to perform an early reservation of the custom
exception space. Additional we reserve the first 4k (1k for R3k) for
either normal exception vector space (legacy CPUs) or special vectors
like cache exceptions.
Huge thanks to Serge for analysing and proposing a solution to this
issue.
Fixes: 2dcb39645441 ("memblock: do not start bottom-up allocations with kernel_end")
Reported-by: Kamal Dasu <[email protected]>
Debugged-by: Serge Semin <[email protected]>
Acked-by: Mike Rapoport <[email protected]>
Tested-by: Florian Fainelli <[email protected]>
Reviewed-by: Serge Semin <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The devicetree specification requires 8-byte alignment in
memory. This is now enforced by libfdt since commit 79edff12060f
("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
which included the upstream commit 5e735860c478 ("libfdt: Check for
8-byte address alignment in fdt_ro_probe_()").
This broke the MIPS raw appended DTBs which would be appended to
the image immediately following the initramfs section. This ends
with a 32bit size, resulting in a 4-byte alignment of the DTB.
Fix by padding with zeroes to 8-bytes when MIPS_RAW_APPENDED_DTB
is defined.
Fixes: 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
Cc: Rob Herring <[email protected]>
Cc: Frank Rowand <[email protected]>
Signed-off-by: Bjørn Mork <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|
|
The MIPS Poly1305 implementation is generic MIPS code written such as to
support down to the original MIPS I and MIPS III ISA for the 32-bit and
64-bit variant respectively. Lift the current limitation then to enable
code for MIPSr1 ISA or newer processors only and have it available for
all MIPS processors.
Signed-off-by: Maciej W. Rozycki <[email protected]>
Fixes: a11d055e7a64 ("crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation")
Cc: [email protected] # v5.5+
Acked-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
|