2022-07-25 09:20:41

by Alexander Sverdlin

[permalink] [raw]
Subject: [PATCH 1/2] MIPS: Introduce CAVIUM_RESERVE32 Kconfig option

From: Alexander Sverdlin <[email protected]>

This options is used to reserve a shared memory region for user processes
to use for hardware memory buffers. The actual code to support the option
comes in the following patch.

Signed-off-by: Corey Minyard <[email protected]>
Signed-off-by: Alexander Sverdlin <[email protected]>
---
arch/mips/cavium-octeon/Kconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig
index 4984e46..c1899f1 100644
--- a/arch/mips/cavium-octeon/Kconfig
+++ b/arch/mips/cavium-octeon/Kconfig
@@ -67,6 +67,18 @@ config CAVIUM_OCTEON_LOCK_L2_MEMCPY
help
Lock the kernel's implementation of memcpy() into L2.

+config CAVIUM_RESERVE32
+ int "Memory to reserve for user processes shared region (MB)"
+ range 0 1536
+ default "0"
+ help
+ Reserve a shared memory region for user processes to use for hardware
+ memory buffers. This is required for 32bit applications to be able to
+ send and receive packets directly. Applications access this memory by
+ memory mapping /dev/mem for the addresses in /proc/octeon_info. For
+ optimal performance with HugeTLBs, keep this size an even number of
+ megabytes.
+
config OCTEON_ILM
tristate "Module to measure interrupt latency using Octeon CIU Timer"
help
--
2.10.2


2022-08-30 03:14:42

by Yu Zhao

[permalink] [raw]
Subject: Re: [PATCH 1/2] MIPS: Introduce CAVIUM_RESERVE32 Kconfig option

Hi,

This commit produces a bogus error message on systems that use the
default value. Please take a look.

Thanks.

Linux version 6.0.0-rc1 (builder@buildhost) (mips64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19590-042d558536) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sun Jul 31 15:12:47 2022
Failed to allocate CAVIUM_RESERVE32 memory area <<<===
Skipping L2 locking due to reduced L2 cache size
CVMSEG size: 0 cache lines (0 bytes)
printk: bootconsole [early0] enabled
CPU0 revision is: 000d9301 (Cavium Octeon II)

2022-09-05 19:12:33

by Yu Zhao

[permalink] [raw]
Subject: Re: [PATCH 1/2] MIPS: Introduce CAVIUM_RESERVE32 Kconfig option

Hi Alexander,

On Mon, Aug 29, 2022 at 9:03 PM Yu Zhao <[email protected]> wrote:
>
> Hi,
>
> This commit produces a bogus error message on systems that use the
> default value. Please take a look.
>
> Thanks.
>
> Linux version 6.0.0-rc1 (builder@buildhost) (mips64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19590-042d558536) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sun Jul 31 15:12:47 2022
> Failed to allocate CAVIUM_RESERVE32 memory area <<<===
> Skipping L2 locking due to reduced L2 cache size
> CVMSEG size: 0 cache lines (0 bytes)
> printk: bootconsole [early0] enabled
> CPU0 revision is: 000d9301 (Cavium Octeon II)

Following up on this. Please take a look. Thanks.

2022-09-06 08:32:18

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 1/2] MIPS: Introduce CAVIUM_RESERVE32 Kconfig option

Hello Yu,

On 05/09/2022 20:50, Yu Zhao wrote:
>> This commit produces a bogus error message on systems that use the
>> default value. Please take a look.
>>
>> Thanks.
>>
>> Linux version 6.0.0-rc1 (builder@buildhost) (mips64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19590-042d558536) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sun Jul 31 15:12:47 2022
>> Failed to allocate CAVIUM_RESERVE32 memory area <<<===
>> Skipping L2 locking due to reduced L2 cache size
>> CVMSEG size: 0 cache lines (0 bytes)
>> printk: bootconsole [early0] enabled
>> CPU0 revision is: 000d9301 (Cavium Octeon II)
> Following up on this. Please take a look. Thanks.

thanks for following this up! I thought I've sent the patch a week ago, but seems something
went wrong... Nevertheless:
https://lore.kernel.org/linux-mips/[email protected]/T/#u

--
Best regards,
Alexander Sverdlin.