powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/misc/cxl/api.c | 1 +
drivers/misc/cxl/cxl.h | 2 ++
drivers/misc/cxl/cxllib.c | 1 +
drivers/m
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/i2c/busses/i2c-powermac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/b
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/net/wireless/intersil/orinoco/airport.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wir
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/pci/hotplug/pnv_php.c | 1 +
drivers/pci/hotplug/rpadlpar_core.c | 1 +
drivers/pci/hotplug/rpaphp_co
Christophe Leroy writes:
> powerpc's asm/prom.h brings some headers that it doesn't
> need itself.
>
> In order to clean it up, first add missing headers in
> users of asm/prom.h
>
> Signed-off-by: Christophe Leroy
> ---
> drivers/net/wireless/intersil/orinoco/airport.c | 1 +
> 1 file changed,
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/tty/hvc/hvc_opal.c | 2 +-
drivers/tty/hvc/hvc_vio.c | 2 +-
drivers/tty/hvc/hvsi.c | 2 +-
3 files ch
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c | 1 -
drivers/tty/serial/mpc52xx_uart.c | 2 ++
drivers/tty/
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/char/agp/uninorth-agp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/agp/uninorth-agp.c
powerpc's asm/prom.h brings some headers that it doesn't
need itself.
In order to clean it up, first add missing headers in
users of asm/prom.h
Signed-off-by: Christophe Leroy
---
drivers/char/tpm/tpm_atmel.h | 2 --
drivers/char/tpm/tpm_ibmvtpm.c | 1 -
2 files changed, 3 deletions(-)
diff
On Wed, Mar 23, 2022 at 5:00 AM Palmer Dabbelt wrote:
>
> On Tue, 22 Mar 2022 07:39:43 PDT (-0700), guo...@kernel.org wrote:
> > From: Guo Ren
> >
> > Currently, most 64-bit architectures (x86, parisc, powerpc, arm64,
> > s390, mips, sparc) have supported COMPAT mode. But they all have
> > histor
I got that. I fixed up it in v10.
CC arch/arm64/kernel/asm-offsets.s
In file included from
/home/guoren/source/kernel/riscv-linux/arch/arm64/include/asm/stat.h:13,
from
/home/guoren/source/kernel/riscv-linux/include/linux/stat.h:6,
from
/home/guoren/source/ke
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
From: Christoph Hellwig
Don't bother to define the symbols empty, just don't use them.
That makes the intent a little more clear.
Remove the unused HAVE_ARCH_STRUCT_FLOCK64 define and merge the
32-bit mips struct flock into the generic one.
Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the
From: Christoph Hellwig
The F_GETLK64/F_SETLK64/F_SETLKW64 fcntl opcodes are only implemented
for the 32-bit syscall APIs, but are also needed for compat handling
on 64-bit kernels.
Consolidate them in unistd.h instead of definining the internal compat
definitions in compat.h, which is rather er
From: Christoph Hellwig
Provide a single common definition for the compat_flock and
compat_flock64 structures using the same tricks as for the native
variants. Another extra define is added for the packing required on
x86.
Signed-off-by: Christoph Hellwig
Signed-off-by: Guo Ren
Reviewed-by: A
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
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
Cc: Palmer Dabbelt
---
arch/arm64/Kconfig
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
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
Cc: Palmer Dabbelt
---
arch/arm64/in
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
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
Reviewed-by: Arnd Bergmann
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
---
include/uapi/asm-generic/u
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
Implement riscv asm/compat.h for struct compat_xxx,
is_compat_task, compat_user_regset, regset convert.
The rv64 compat.h has inherited most of the structs
from the generic one.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Tested-by: Heiko Stuebner
Cc: Arnd Bergmann
Cc: Palme
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 compat sys_call_table and some system call functions:
truncate64, ftruncate64, fallocate, pread64, pwrite64,
sync_file_range, readahead, fadvise64_64 which need argument
translation.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Reviewed-by: Arnd Bergmann
Tested-by: He
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stuebner
From: Guo Ren
If the current task is in COMPAT mode, set SR_UXL_32 in status for
returning userspace. We need CONFIG _COMPAT to prevent compiling
errors with rv32 defconfig.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Tested-by: Heiko Stuebner
Cc: Arnd Bergmann
Cc: Palmer Dabbelt
---
arc
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
Reviewed-by: Arnd Bergmann
Tested-by: Heiko Stuebner
---
arch/riscv/include/asm/elf.h | 41 +++-
1 file changed, 40
From: Guo Ren
Detect hardware COMPAT (32bit U-mode) capability in rv64. If not
support COMPAT mode in hw, compat_elf_check_arch would return
false by compat_binfmt_elf.c
Add CLASS to enhance (compat_)elf_check_arch to distinguish
32BIT/64BIT elf.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
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
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stue
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stue
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
Adds initial skeletal COMPAT Kbuild (Running 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
Reviewed-by: Arnd Bergmann
Tested-by: Heiko Stuebner
On Sat, Apr 2, 2022 at 9:39 PM Masahiro Yamada wrote:
>
> On Sat, Apr 2, 2022 at 10:36 PM wrote:
> >
> > 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
On Sat, Apr 2, 2022 at 10:36 PM wrote:
>
> 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
> Reviewed-by: Christoph Hellwig
> Tested-by: H
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
From: Christoph Hellwig
Don't bother to define the symbols empty, just don't use them.
That makes the intent a little more clear.
Remove the unused HAVE_ARCH_STRUCT_FLOCK64 define and merge the
32-bit mips struct flock into the generic one.
Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the
From: Christoph Hellwig
The F_GETLK64/F_SETLK64/F_SETLKW64 fcntl opcodes are only implemented
for the 32-bit syscall APIs, but are also needed for compat handling
on 64-bit kernels.
Consolidate them in unistd.h instead of definining the internal compat
definitions in compat.h, which is rather er
From: Christoph Hellwig
Provide a single common definition for the compat_flock and
compat_flock64 structures using the same tricks as for the native
variants. Another extra define is added for the packing required on
x86.
Signed-off-by: Christoph Hellwig
Signed-off-by: Guo Ren
Reviewed-by: A
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
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
Cc: Palmer Dabbelt
---
arch/arm64/Kconfig
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
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
Cc: Palmer Dabbelt
---
arch/arm64/in
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
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
Reviewed-by: Arnd Bergmann
Reviewed-by: Christoph Hellwig
Tested-by: Heiko Stuebner
---
include/uapi/asm-generic/u
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
Implement riscv asm/compat.h for struct compat_xxx,
is_compat_task, compat_user_regset, regset convert.
The rv64 compat.h has inherited most of the structs
from the generic one.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Tested-by: Heiko Stuebner
Cc: Arnd Bergmann
Cc: Palme
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 compat sys_call_table and some system call functions:
truncate64, ftruncate64, fallocate, pread64, pwrite64,
sync_file_range, readahead, fadvise64_64 which need argument
translation.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Reviewed-by: Arnd Bergmann
Tested-by: He
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stuebner
From: Guo Ren
If the current task is in COMPAT mode, set SR_UXL_32 in status for
returning userspace. We need CONFIG _COMPAT to prevent compiling
errors with rv32 defconfig.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
Tested-by: Heiko Stuebner
Cc: Arnd Bergmann
Cc: Palmer Dabbelt
---
arc
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
Reviewed-by: Arnd Bergmann
Tested-by: Heiko Stuebner
---
arch/riscv/include/asm/elf.h | 41 +++-
1 file changed, 40
From: Guo Ren
Detect hardware COMPAT (32bit U-mode) capability in rv64. If not
support COMPAT mode in hw, compat_elf_check_arch would return
false by compat_binfmt_elf.c
Add CLASS to enhance (compat_)elf_check_arch to distinguish
32BIT/64BIT elf.
Signed-off-by: Guo Ren
Signed-off-by: Guo Ren
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
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stue
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
Reviewed-by: Palmer Dabbelt
Tested-by: Heiko Stue
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
Adds initial skeletal COMPAT Kbuild (Running 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
Reviewed-by: Arnd Bergmann
Tested-by: Heiko Stuebner
Hi Palmer,
Sorry for the late reply, I still want COMPAT to catch up at 5.18..
I've pushed it into my next branch, and it would get in linux-next the
next day. You could have a look at that. The repo is:
https://github.com/c-sky/csky-linux/tree/linux-next
We still need your sending pull request f
From: Chen Jingwen
This is backport for 5.4
Upstream commit 5647a94a26e352beed61788b46e035d9d12664cd
The shadow's page table is not updated when PTE_RPN_SHIFT is 24
and PAGE_SHIFT is 12. It not only causes false positives but
also false negative as shown the following text.
Fix it by bringing
Le 05/08/2020 à 15:35, Laurent Dufour a écrit :
All the LMB from the same set of ibm,dynamic-memory-v2 property are
sharing the same NUMA node. Don't compute that node for each one.
Tested on a system with 1022 LMBs spread on 4 NUMA nodes, only 4 calls to
lmb_set_nid() have been made instead
58 matches
Mail list logo