From: Guo Ren
Current riscv doesn't support the 32bit KVM/arm API. Let's make it
clear by not selecting KVM_COMPAT.
Signed-off-by: Guo Ren
---
virt/kvm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index f4834c20e4a6..a8c5c9f06b
From: Guo Ren
Adds initial skeletal COMPAT Kbuild (Runing 32bit U-mode on 64bit
S-mode) support.
- Setup kconfig & dummy functions for compiling.
- Implement compat_start_thread by the way.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/Kconfig | 19
From: Guo Ren
If the current task is in COMPAT mode, set SR_UXL_32 in status for
returning userspace.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/kernel/process.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/riscv/kernel/process.c b/arch/ri
From: Guo Ren
Now, you can use native gdb on riscv64 for rv32 app debugging.
$ uname -a
Linux buildroot 5.16.0-rc4-00036-gbef6b82fdf23-dirty #53 SMP Mon Dec 20
23:06:53 CST 2021 riscv64 GNU/Linux
$ cat /proc/cpuinfo
processor : 0
hart: 0
isa : rv64imafdcsuh
mmu
From: Guo Ren
Implement compat_setup_rt_frame for sigcontext save & restore. The
main process is the same with signal, but the rv32 pt_regs' size
is different from rv64's, so we needs convert them.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/kernel/Makefile
From: Guo Ren
Reconstruct __setup_additional_pages() by appending vdso info
pointer argument to meet compat_vdso_info requirement. And change
vm_special_mapping *dm, *cm initialization into static.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/include/asm/elf
From: Guo Ren
There is no vgettimeofday supported in rv32 that makes simple to
generate rv32 vdso code which only needs riscv64 compiler. Other
architectures need change compiler or -m (machine parameter) to
support vdso32 compiling. If rv32 support vgettimeofday (which
cause C compile) in future
From: Guo Ren
Implement necessary type and macro for compat elf. See the code
comment for detail.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/include/asm/elf.h | 51 +++-
1 file changed, 50 insertions(+), 1 deletion(-)
diff
From: Guo Ren
Implement the entry of compat_sys_call_table[] in asm. Ref to
riscv-privileged spec 4.1.1 Supervisor Status Register (sstatus):
BIT[32:33] = UXL[1:0]:
- 1:32
- 2:64
- 3:128
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/include/asm/csr.h |
From: Guo Ren
Implement compat_syscall_table.c with compat_sys_call_table & fixup
system call such as truncate64,pread64,fallocate which need two
regs to indicate 64bit-arg (copied from arm64).
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/include/asm/syscall
From: Guo Ren
Make TASK_SIZE from const to dynamic detect TIF_32BIT flag
function. Refer to arm64 to implement DEFAULT_MAP_WINDOW_64 for
efi-stub.
Limit 32-bit compatible process in 0-2GB virtual address range
(which is enough for real scenarios), because it could avoid
address sign extend probl
From: Guo Ren
Implement asm/compat.h for struct compat_xxx, RLIM_INFINITY,
OFF_T_MAX, is_compat_task, compat_user_regset, regset convert.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
arch/riscv/include/asm/compat.h | 136 +++
arch/riscv/inc
From: Guo Ren
Let's follow the origin patch's spirit:
The only difference between rv32_defconfig and defconfig is that
rv32_defconfig has CONFIG_ARCH_RV32I=y.
This is helpful to compare rv64-compat-rv32 v.s. rv32-linux.
Fixes: 1b937e8faa87ccfb ("RISC-V: Add separate defconfig for 32bit system
From: Guo Ren
Make "uapi asm unistd.h" could be used for architectures' COMPAT
mode. The __SYSCALL_COMPAT is first used in riscv.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Cc: Arnd Bergmann
---
include/uapi/asm-generic/unistd.h | 4 ++--
tools/include/uapi/asm-generic/unistd.h | 4
From: Guo Ren
There are 7 64bit architectures that support Linux COMPAT mode to
run 32bit applications. A lot of definitions are duplicate:
- COMPAT_USER_HZ
- COMPAT_RLIM_INFINITY
- COMPAT_OFF_T_MAX
- __compat_uid_t, __compat_uid_t
- compat_dev_t
- compat_ipc_pid_t
- struct compat_flock
-
From: Guo Ren
RISC-V doesn't neeed compat_stat, so using __ARCH_WANT_COMPAT_STAT
to exclude unnecessary SYSCALL functions.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Reviewed-by: Arnd Bergmann
---
arch/arm64/include/asm/unistd.h | 1 +
arch/mips/include/asm/unistd.h| 2 ++
arch/pari
From: Guo Ren
The existing per-arch definitions are pretty much historic cruft.
Move SYSVIPC_COMPAT into init/Kconfig.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Acked-by: Arnd Bergmann
Cc: Christoph Hellwig
---
arch/arm64/Kconfig | 4
arch/mips/Kconfig| 5 -
arch/parisc/K
From: Guo Ren
Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
s390, mips, sparc) have supported COMPAT mode. But they all have
history issues and can't use standard linux unistd.h. RISC-V would
be first standard __SYSCALL_COMPAT user of include/uapi/asm-generic
/unistd.h.
The
Le 19/01/2022 à 02:15, Kefeng Wang a écrit :
>
> On 2022/1/11 14:04, Christophe Leroy wrote:
>>
>> Le 11/01/2022 à 05:37, Nicholas Piggin a écrit :
>>> Excerpts from Kefeng Wang's message of January 8, 2022 9:58 pm:
Hi PPC maintainers, ping..
>>> Hmm. I might have confused myself about this
Maxim writes:
> From: Maxim Kiselev
>
> On board rev A, the network interface labels for the switch ports
> written on the front panel are different than on rev B and later.
>
> This patch fixes network interface names for the switch ports according
> to labels that are written on the front panel
This driver is already relying on the core to provide
valid GPIO numbers in spi->cs_gpio through
of_spi_get_gpio_numbers(), so we can switch to letting
the core use GPIO descriptors instead.
The driver was assigning a local function to the custom
chipselect callback, but I chose to just open code
On Wed, Jan 19, 2022 at 08:28:54PM +0100, Christophe Leroy wrote:
> Hi Kees,
>
>
> Le 17/12/2021 à 12:49, Christophe Leroy a écrit :
> > Hi Kees,
> >
> > Le 17/10/2021 à 14:38, Christophe Leroy a écrit :
> > > execute_location() and execute_user_location() intent
> > > to copy do_nothing() text
Hi Kees,
Le 17/12/2021 à 12:49, Christophe Leroy a écrit :
Hi Kees,
Le 17/10/2021 à 14:38, Christophe Leroy a écrit :
execute_location() and execute_user_location() intent
to copy do_nothing() text and execute it at a new location.
However, at the time being it doesn't copy do_nothing() funct
From: Zi Yan
alloc_contig_range() now only needs to be aligned to pageblock_order,
drop virtio_mem size requirement that it needs to be the max of
pageblock_order and MAX_ORDER.
Signed-off-by: Zi Yan
---
drivers/virtio/virtio_mem.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
From: Zi Yan
Now alloc_contig_range() works at pageblock granularity. Change CMA
allocation, which uses alloc_contig_range(), to use pageblock_order
alignment.
Signed-off-by: Zi Yan
---
include/linux/mmzone.h | 5 +
kernel/dma/contiguous.c | 2 +-
mm/cma.c| 6 ++
mm/pa
From: Zi Yan
CMA only requires pageblock alignment now. Change CMA alignment in
fadump too.
Signed-off-by: Zi Yan
---
arch/powerpc/include/asm/fadump-internal.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/fadump-internal.h
b/arch/powerpc/inc
From: Zi Yan
This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.
It prepares for the upcoming removal of the MAX_ORDER-1 alignment
requirement for CMA and alloc_contig_range().
MIGRARTE_HIGHATOMIC should not merge with other migratetypes like
MIGRATE_ISOLATE and MIGRARTE_CMA[1
From: Zi Yan
alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging
pageblocks with different migratetypes. It might unnecessarily convert
extra pageblocks at the beginning and at the end of the range. Change
alloc_contig_range() to work at pageblock granularity.
It is done by r
From: Zi Yan
Enable set_migratetype_isolate() to check specified sub-range for
unmovable pages during isolation. Page isolation is done
at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all
pages within that granularity are intended to be isolated. For example,
alloc_contig_rang
From: Zi Yan
Hi all,
This patchset tries to remove the MAX_ORDER-1 alignment requirement for CMA
and alloc_contig_range(). It prepares for my upcoming changes to make
MAX_ORDER adjustable at boot time[1]. It is on top of mmotm-2021-12-29-20-07.
Changelog from RFC
===
1. Dropped two irrelevant p
From: Zi Yan
has_unmovable_pages() is only used in mm/page_isolation.c. Move it from
mm/page_alloc.c and make it static.
Signed-off-by: Zi Yan
---
include/linux/page-isolation.h | 2 -
mm/page_alloc.c| 119 -
mm/page_isolation.c| 11
On Tue, Jan 18, 2022 at 08:50:25PM -0500, He Ying wrote:
> The following KASAN warning was reported in our kernel.
>
> BUG: KASAN: stack-out-of-bounds in get_wchan+0x188/0x250
> Read of size 4 at addr d216f958 by task ps/14437
>
> CPU: 3 PID: 14437 Comm: ps Tainted: G O 5.10.
Nicholas Piggin wrote:
emulate_step instruction emulation including sc instruction emulation
initially appeared in xmon. It then emulation code was then moved into
sstep.c where kprobes could use it too, and later hw_breakpoint and
uprobes started to use it.
Until uprobes, the only instruction e
Hi Ira, Thanks for reviewing this patch.
Ira Weiny writes:
> On Thu, Jan 13, 2022 at 05:32:52PM +0530, Vaibhav Jain wrote:
> [snip]
>
>>
>> +/* Inject a smart error Add the dirty-shutdown-counter value to the pdsm */
>> +static int papr_pdsm_smart_inject(struct papr_scm_priv *p,
>> +
On Wed, Jan 19, 2022 at 09:44:20PM +0800, Kefeng Wang wrote:
>
> On 2022/1/19 21:22, Matthew Wilcox wrote:
> > On Wed, Jan 19, 2022 at 08:57:58PM +0800, Kefeng Wang wrote:
> > > Only parts of our products wants this feature, we add some interfaces
> > > which
> > > only
> > >
> > > alloc hugevm
On Wed, Jan 19, 2022 at 08:57:58PM +0800, Kefeng Wang wrote:
> Only parts of our products wants this feature, we add some interfaces which
> only
>
> alloc hugevmalloc for them, eg,
> vmap_hugepage/vmalloc_hugepage/remap_vmalloc_hugepage_range..
>
> for our products, but it's not the choice of m
Hi Michael,
Can we get this series in fixes as well ?
Thanks
Christophe
Le 24/12/2021 à 12:07, Christophe Leroy a écrit :
> set_memory_attr() was implemented by commit 4d1755b6a762 ("powerpc/mm:
> implement set_memory_attr()") because the set_memory_xx() couldn't
> be used at that time to modify
Michael, ping.
Le 07/12/2021 à 07:10, Christophe Leroy a écrit :
> Allthough kernel text is always mapped with BATs, we still have
> inittext mapped with pages, so TLB miss handling is required
> when CONFIG_DEBUG_PAGEALLOC or CONFIG_KFENCE is set.
>
> The final solution should be to set a BAT th
On Mon, 17 Jan 2022 23:44:03 +1000, Nicholas Piggin wrote:
> Commit 314f6c23dd8d ("powerpc/64s: Mask NIP before checking against
> SRR0") masked off the low 2 bits of the NIP value in the interrupt
> stack frame in case they are non-zero and mis-compare against a SRR0
> register value of a CPU whic
On Mon, 10 Jan 2022 15:29:25 +, Christophe Leroy wrote:
> It has been reported some configuration where the kernel doesn't
> boot with KASAN enabled.
>
> This is due to wrong BAT allocation for the KASAN area:
>
> ---[ Data Block Address Translation ]---
> 0: 0xc000-0xcfff
On Mon, 10 Jan 2022 15:29:53 +, Christophe Leroy wrote:
> CC arch/powerpc/kernel/time.o
> In file included from :
> ./arch/powerpc/include/asm/hw_irq.h: In function 'do_hard_irq_enable':
> ././include/linux/compiler_types.h:335:45: error: call to
> '__compiletime
On Fri, 14 Jan 2022 08:43:55 +0530, Athira Rajeev wrote:
> power_pmu_wants_prompt_pmi is used to decide if PMI should
> be taken prompt. This is valid only for ppc64 and is used
> in CONFIG_PPC_BOOK3S_64 context. Hence include the function
> under config check for PPC64
>
> Fixes warning for 32-bi
Athira Rajeev writes:
> Trace IMC (In-Memory collection counters) in powerpc is
> useful for application level profiling. For trace_imc,
> presently task context (task_ctx_nr) is set to
> perf_hw_context. But perf_hw_context is to be used for
> cpu PMU. So for trace_imc, even though it is per thre
43 matches
Mail list logo