Re: [PATCH v2 2/5] arm64, powerpc, riscv, s390, x86: ptdump: Refactor CONFIG_DEBUG_WX

2024-03-27 Thread Palmer Dabbelt
mark_rodata_ro(); + debug_checkwx(); rodata_test(); } else pr_info("Kernel memory protection disabled.\n"); Acked-by: Palmer Dabbelt # RISC-V

Re: [PATCH v3] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-03-27 Thread Palmer Dabbelt
prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ + early_numa_node_init(); boot_cpu_hotplug_init(); pr_notice("Kernel command line: %s\n", saved_command_line); Acked-by: Palmer Dabbelt # RISC-V I don't really understand the init/main.c stuff all tha

[PATCH] tty: hvc: Don't enable the RISC-V SBI console by default

2024-02-14 Thread Palmer Dabbelt
From: Palmer Dabbelt The new SBI console has the same problem as the old one: there's only one shared backing hardware and no synchronization, so the two drivers end up stepping on each other. This was the same issue the old SBI-0.1 console drivers had, but that was disabled by default when SBI

Re: [PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 19:59:11 PST (-0800), a...@brainfault.org wrote: On Sat, Jan 20, 2024 at 4:15 AM Palmer Dabbelt wrote: From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead

[PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to build due to a linux/drivers/tty/hvc/hvc_r

Re: [PATCH] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 13:56:13 PST (-0800), Palmer Dabbelt wrote: From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SB

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 02:09:18 PST (-0800), apa...@ventanamicro.com wrote: On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: On Thu, 11 Jan 2024 06:50:37 PST (-0800), patchwork-bot+linux-ri...@kernel.org wrote: > Hello: > > This series was applied to riscv/linux.git (for-next) &g

[PATCH] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to build due to a linux/drivers/tty/hvc/hvc_r

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-12 Thread Palmer Dabbelt
On Thu, 11 Jan 2024 06:50:37 PST (-0800), patchwork-bot+linux-ri...@kernel.org wrote: Hello: This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt : On Fri, 24 Nov 2023 12:39:00 +0530 you wrote: The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines

Re: [PATCH v2 10/14] riscv: Add support for kernel-mode FPU

2024-01-10 Thread Palmer Dabbelt
)); + csr_set(CSR_SSTATUS, SR_FS); +} +EXPORT_SYMBOL_GPL(kernel_fpu_begin); + +void kernel_fpu_end(void) +{ + csr_clear(CSR_SSTATUS, SR_FS); + fstate_restore(current, task_pt_regs(current)); + preempt_enable(); +} +EXPORT_SYMBOL_GPL(kernel_fpu_end); Reviewed-by: Palmer Dabbelt

Re: [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-16 Thread Palmer Dabbelt
| 2 +- scripts/Makefile.extrawarn | 5 +++-- 63 files changed, 101 insertions(+), 63 deletions(-) Acked-by: Palmer Dabbelt # RISC-V

Re: [PATCH] treewide: drop CONFIG_EMBEDDED

2023-08-16 Thread Palmer Dabbelt
: linux-ri...@lists.infradead.org Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux...@vger.kernel.org Cc: Max Filippov Cc: Josh Triplett Cc: Masahiro Yamada Cc: linux-kbu...@vger.kernel.org Cc: Andrew Morton --- arch/a

Re: [PATCH v5 11/13] riscv/kexec: refactor for kernel/Kconfig.kexec

2023-07-06 Thread Palmer Dabbelt
main kernel with kexec-tools into a specially - reserved region and then later executed after a crash by - kdump/kexec. - - For more details see Documentation/admin-guide/kdump/kdump.rst +config ARCH_SUPPORTS_CRASH_DUMP + def_bool y config COMPAT bool "Kernel support for 32-bit U-mode" Acked-by: Palmer Dabbelt

Re: [PATCH 11/14] init: consolidate prototypes in linux/init.h

2023-06-22 Thread Palmer Dabbelt
--- a/arch/riscv/include/asm/timex.h +++ b/arch/riscv/include/asm/timex.h @@ -88,6 +88,4 @@ static inline int read_current_timer(unsigned long *timer_val) return 0; } -extern void time_init(void); - #endif /* _ASM_RISCV_TIMEX_H */ Reviewed-by: Palmer Dabbelt # RISC-V Acked-by: Palmer

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-19 Thread Palmer Dabbelt
On Fri, 19 May 2023 14:48:59 PDT (-0700), sch...@linux-m68k.org wrote: On Mai 19 2023, Alexandre Ghiti wrote: I have tested the following patch successfully, can you give it a try while I make sure this is the only place I forgot to add the -fno-pie flag? diff --git

Re: [PATCH] irq_work: consolidate arch_irq_work_raise prototypes

2023-05-16 Thread Palmer Dabbelt
place that is always visible. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/irq_work.h | 2 -- arch/arm64/include/asm/irq_work.h | 2 -- arch/csky/include/asm/irq_work.h| 2 +- arch/powerpc/include/asm/irq_work.h | 1 - arch/riscv/include/asm/irq_work.h | 2 +- Acked-by: Palmer

Re: [PATCH v8 1/3] riscv: Introduce CONFIG_RELOCATABLE

2023-05-12 Thread Palmer Dabbelt
On Thu, 11 May 2023 11:18:23 PDT (-0700), sch...@linux-m68k.org wrote: On Mai 09 2023, Alexandre Ghiti wrote: On 5/9/23 21:07, Andreas Schwab wrote: That does not work with UEFI booting: Loading Linux 6.4.0-rc1-1.g668187d-default ... Loading initial ramdisk ... Unhandled exception:

Re: [PATCH 14/23] riscv/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-05-10 Thread Palmer Dabbelt
md, addr & napot_cont_mask(order)); + pte = pte_offset_huge(pmd, addr & napot_cont_mask(order)); break; } } Acked-by: Palmer Dabbelt

Re: [PATCH v2 29/34] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-05-01 Thread Palmer Dabbelt
); - return __pa(vaddr); + BUG_ON(!ptdesc || !ptdesc_pmd_ctor(ptdesc)); + return __pa((pmd_t *)ptdesc_address(ptdesc)); } static void __init create_pmd_mapping(pmd_t *pmdp, Acked-by: Palmer Dabbelt

Re: [PATCH v6 4/4] risc/purgatory: Add linker script

2023-05-01 Thread Palmer Dabbelt
y_start -z nodefaultlib Acked-by: Palmer Dabbelt

Re: [PATCH 08/19] riscv: Add explicit include for cpu.h

2023-04-29 Thread Palmer Dabbelt
Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt

Re: [PATCH 09/19] riscv: cacheinfo: Adjust includes to remove of_device.h

2023-04-29 Thread Palmer Dabbelt
100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -5,7 +5,6 @@ #include #include -#include #include static struct riscv_cacheinfo_ops *rv_cache_ops; Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt

Re: [PATCH v9 0/6] Introduce 64b relocatable kernel

2023-04-21 Thread Palmer Dabbelt
relocations at compile time in scripts/ https://git.kernel.org/palmer/c/47981b5cc687 [5/6] riscv: Check relocations at compile time https://git.kernel.org/palmer/c/c2dea0bc5339 [6/6] riscv: Use --emit-relocs in order to move .rela.dyn in init https://git.kernel.org/palmer/c/559d1e45a16

Re: [PATCH v9 0/6] Introduce 64b relocatable kernel

2023-04-21 Thread Palmer Dabbelt
On Tue, 28 Mar 2023 21:53:23 PDT (-0700), alexgh...@rivosinc.com wrote: After multiple attempts, this patchset is now based on the fact that the 64b kernel mapping was moved outside the linear mapping. The first patch allows to build relocatable kernels but is not selected by default. That

Re: [PATCH 08/21] riscv: dma-mapping: only invalidate after DMA, not flush

2023-04-19 Thread Palmer Dabbelt
: - ALT_CMO_OP(flush, vaddr, size, riscv_cbom_block_size); + ALT_CMO_OP(inval, vaddr, size, riscv_cbom_block_size); break; default: break; Acked-by: Palmer Dabbelt

Re: [PATCH 09/21] riscv: dma-mapping: skip invalidation before bidirectional DMA

2023-04-19 Thread Palmer Dabbelt
DMA_BIDIRECTIONAL: - ALT_CMO_OP(flush, vaddr, size, riscv_cbom_block_size); + ALT_CMO_OP(clean, vaddr, size, riscv_cbom_block_size); break; default: break; Acked-by: Palmer Dabbelt

Re: [PATCH v2 4/5] riscv: Select ARCH_DMA_DEFAULT_COHERENT

2023-03-14 Thread Palmer Dabbelt
Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt as I'm assuming these should all stay together. Thanks! Wouldn't bother respinning for that unless the dma folk have comments for you. select ARCH_HAS_DMA_PREP_COHERENT select ARCH_HAS_SETUP_DMA_OPS

Re: [PATCH v5 12/26] riscv: Remove COMMAND_LINE_SIZE from uapi

2023-03-07 Thread Palmer Dabbelt
..17fcecd4a2f8 100644 --- a/arch/riscv/include/uapi/asm/setup.h +++ b/arch/riscv/include/uapi/asm/setup.h @@ -3,6 +3,4 @@ #ifndef _UAPI_ASM_RISCV_SETUP_H #define _UAPI_ASM_RISCV_SETUP_H -#define COMMAND_LINE_SIZE 1024 - #endif /* _UAPI_ASM_RISCV_SETUP_H */ Reviewed-by: Palmer Dabbelt Acked

Re: [PATCH v3 00/24] Remove COMMAND_LINE_SIZE from uapi

2023-03-01 Thread Palmer Dabbelt
On Tue, 14 Feb 2023 01:19:02 PST (-0800), h...@linux.ibm.com wrote: On Tue, Feb 14, 2023 at 09:58:17AM +0100, Geert Uytterhoeven wrote: Hi Heiko, On Tue, Feb 14, 2023 at 9:39 AM Heiko Carstens wrote: > On Tue, Feb 14, 2023 at 08:49:01AM +0100, Alexandre Ghiti wrote: > > This all came up in

Re: [PATCH v3 03/24] arm: Remove COMMAND_LINE_SIZE from uapi

2023-03-01 Thread Palmer Dabbelt
iti wrote: >> From: Palmer Dabbelt >> >> As far as I can tell this is not used by userspace and thus should not >> be part of the user-visible API. >> >> Signed-off-by: Palmer Dabbelt > > Looks good to me. What's the merge plan for this? The easiest wa

Re: [PATCH mm-unstable v1 19/26] riscv/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE

2023-02-28 Thread Palmer Dabbelt
. Note that this bit does not conflict with swap PMDs and could also be used in swap PMD context later. While at it, mask the type in __swp_entry(). Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: David Hildenbrand --- arch/riscv/include/asm/pgtable-bits.h | 3 +++ arch

Re: [PATCH 13/19] arch/riscv: rename internal name __xchg to __arch_xchg

2023-02-14 Thread Palmer Dabbelt
ptr)) _x_ = (x); \ - (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr)));\ + (__typeof__(*(ptr))) __arch_xchg((ptr), _x_, sizeof(*(ptr))); \ }) #define xchg32(ptr, x) \ Acked-by: Palmer Dabbelt

Re: [PATCH] mm: remove zap_page_range and create zap_vma_pages

2023-02-14 Thread Palmer Dabbelt
ap_vma_pages(vma); #endif } Acked-by: Palmer Dabbelt # RISC-V Thanks!

Re: [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range

2022-12-29 Thread Palmer Dabbelt
vdso_info.dm)) - zap_page_range(vma, vma->vm_start, size); + zap_vma_page_range(vma, vma->vm_start, size); #endif } Acked-by: Palmer Dabbelt # RISC-V Thanks!

Re: [PATCH 13/19] arch/riscv: rename internal name __xchg to __arch_xchg

2022-12-29 Thread Palmer Dabbelt
ptr)) _x_ = (x); \ - (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr)));\ + (__typeof__(*(ptr))) __arch_xchg((ptr), _x_, sizeof(*(ptr))); \ }) #define xchg32(ptr, x) \ Acked-by: Palmer Dabbelt Thanks!

Re: [PATCH v2] vdso: Improve cmd_vdso_check to check all dynamic relocations

2022-12-29 Thread Palmer Dabbelt
2|R_RISCV_64|R_RISCV_JUMP_SLOT include $(srctree)/lib/vdso/Makefile # Symbols present in the vdso vdso-syms = rt_sigreturn Acked-by: Palmer Dabbelt # RISC-V Thanks!

Re: [PATCH v3 0/8] Generic IPI sending tracepoint

2022-12-13 Thread Palmer Dabbelt
| 2 +- kernel/smp.c | 78 samples/trace_events/trace-events-sample.c | 2 +- samples/trace_events/trace-events-sample.h | 34 +++-- virt/kvm/kvm_main.c | 1 + 43 files changed, 250 insertions(+), 61 deletions(-) Acked-by: Palmer Dabbelt # riscv

Re: [PATCH] mm: remove kern_addr_valid() completely

2022-11-10 Thread Palmer Dabbelt
goto out; } Acked-by: Palmer Dabbelt Thanks!

Re: [PATCH v3 0/2] Fix /proc/cpuinfo cpumask warning

2022-10-27 Thread Palmer Dabbelt
On Fri, 14 Oct 2022 08:58:43 PDT (-0700), ajo...@ventanamicro.com wrote: Commit 78e5a3399421 ("cpumask: fix checking valid cpu range") has started issuing warnings[*] when cpu indices equal to nr_cpu_ids - 1 are passed to cpumask_next* functions. seq_read_iter() and cpuinfo's start and next seq

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-31 Thread Palmer Dabbelt
On Mon, 30 May 2022 22:58:03 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: On Mon, May 30, 2022 at 04:11:27PM -0700, Palmer Dabbelt wrote: On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: > Hello, > > On Mon, May 30, 2022 at 11:58:16AM -0700, Palme

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Palmer Dabbelt
On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: Hello, On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt wrote: On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: > Without this change arch/riscv/kernel/elf_kexec.c fa

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Palmer Dabbelt
On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: Without this change arch/riscv/kernel/elf_kexec.c fails to compile once commit 233c1e6c319c ("kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]") is also contained in the tree. This currently

Re: [PATCH V12 00/20] riscv: Add COMPAT mode support for 64BIT

2022-05-19 Thread Palmer Dabbelt
On Tue, 05 Apr 2022 00:12:54 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 history issues and can't use standard linux unistd.h. RISC-V would be first

Re: [PATCH V12 00/20] riscv: Add COMPAT mode support for 64BIT

2022-04-28 Thread Palmer Dabbelt
On Thu, 28 Apr 2022 05:25:19 PDT (-0700), guo...@kernel.org wrote: Hi Palmer, I see you have taken v12 into your riscv-compat branch and added asm/signal32.h. Do you need me help put compat_sigcontext & compat_ucontext & compat_rt_sigframe into signal32.h? And could we rename signal32.h to

Re: [PATCH V11 00/20] riscv: Add COMPAT mode support for rv64

2022-04-04 Thread Palmer Dabbelt
On Mon, 04 Apr 2022 07:28:50 PDT (-0700), guo...@kernel.org wrote: On Sat, Apr 2, 2022 at 10:04 PM Guo Ren wrote: 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

Re: [PATCH V9 00/20] riscv: compat: Add COMPAT Kbuild skeletal support

2022-03-22 Thread Palmer Dabbelt
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 history issues and can't use standard linux unistd.h. RISC-V would be first

Re: [PATCH V6 17/20] riscv: compat: vdso: Add setup additional pages implementation

2022-02-24 Thread Palmer Dabbelt
Signed-off-by: Guo Ren Reviewed-by: Palmer Dabbelt Cc: Arnd Bergmann --- arch/riscv/include/asm/elf.h | 5 ++ arch/riscv/include/asm/mmu.h | 1 + arch/riscv/kernel/vdso.c | 103 +++ 3 files changed, 74 insertions(+), 35 deletions(-) diff --git a/arch/riscv

Re: [PATCH V5 00/21] riscv: compat: Add COMPAT mode support for rv64

2022-02-22 Thread Palmer Dabbelt
On Tue, 01 Feb 2022 07:05:24 PST (-0800), 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 history issues and can't use standard linux unistd.h. RISC-V would be first

Re: [PATCH V5 21/21] KVM: compat: riscv: Prevent KVM_COMPAT from being selected

2022-02-22 Thread Palmer Dabbelt
on KVM && COMPAT && !(S390 || ARM64) + depends on KVM && COMPAT && !(S390 || ARM64 || RISCV) config HAVE_KVM_IRQ_BYPASS bool Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt I'm assuming Anup is going to take this as per the discussion, but LMK

Re: [PATCH V5 19/21] riscv: compat: ptrace: Add compat_arch_ptrace implement

2022-02-22 Thread Palmer Dabbelt
bution for detailed copyright notices. Usage: busybox [function [arguments]...] or: busybox --list[-full] ... [Inferior 1 (process 107) exited normally] (gdb) q Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/kernel/ptrace.

Re: [PATCH V5 18/21] riscv: compat: signal: Add rt_frame implementation

2022-02-22 Thread Palmer Dabbelt
RISC-V so I'm not sure it'd be worth doing. Reviewed-by: Palmer Dabbelt Happy to see someone clean this up later, but it seems good enough for now. Thanks! Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/kernel/Makefile| 1 +

Re: [PATCH V5 16/21] riscv: compat: vdso: Add rv32 VDSO base code implementation

2022-02-22 Thread Palmer Dabbelt
820: 8082ret Finally, reuse all *.S from vdso in compat_vdso that makes implementation clear and readable. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/Makefile | 5 ++ arch/riscv/include/asm/v

Re: [PATCH V5 12/21] riscv: compat: syscall: Add entry.S implementation

2022-02-22 Thread Palmer Dabbelt
-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/include/asm/csr.h | 7 +++ arch/riscv/kernel/entry.S| 18 -- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index ae711692eec9

Re: [PATCH V5 13/21] riscv: compat: process: Add UXL_32 support in start_thread

2022-02-22 Thread Palmer Dabbelt
: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/kernel/process.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c index 03ac3aa611f5..1a666ad299b4 100644 --- a/arch/riscv/kernel/process.c +++ b/arch/riscv/kernel/process.c @@ -97,6

Re: [PATCH V5 17/21] riscv: compat: vdso: Add setup additional pages implementation

2022-02-22 Thread Palmer Dabbelt
Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/include/asm/elf.h | 5 ++ arch/riscv/include/asm/mmu.h | 1 + arch/riscv/kernel/vdso.c | 104 +-- 3 files changed, 81 insertions(+), 29 deletions(-) diff --git a/arch/riscv/include/asm

Re: [PATCH V5 09/21] riscv: compat: Add basic compat data type implementation

2022-02-22 Thread Palmer Dabbelt
-off-by: Guo Ren Cc: Arnd Bergmann Cc: Palmer Dabbelt --- arch/riscv/include/asm/compat.h | 129 +++ arch/riscv/include/asm/thread_info.h | 1 + 2 files changed, 130 insertions(+) create mode 100644 arch/riscv/include/asm/compat.h diff --git a/arch/riscv/include/asm

Re: [PATCH v2 18/45] riscv: Use do_kernel_power_off()

2021-10-27 Thread Palmer Dabbelt
machine_power_off(void) { - if (pm_power_off != NULL) - pm_power_off(); - else - default_power_off(); + do_kernel_power_off(); + default_power_off(); } Acked-by: Palmer Dabbelt

Re: [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing

2021-10-26 Thread Palmer Dabbelt
| 10 +- kernel/livepatch/patch.c | 6 -- kernel/trace/trace_event_perf.c | 17 + kernel/trace/trace_functions.c | 5 - 9 files changed, 22 insertions(+), 26 deletions(-) Acked-by: Palmer Dabbelt # RISC-V

Re: [PATCH v7 1/3] riscv: Introduce CONFIG_RELOCATABLE

2021-10-26 Thread Palmer Dabbelt
On Sat, 09 Oct 2021 10:20:20 PDT (-0700), a...@ghiti.fr wrote: Arf, I have sent this patchset with the wrong email address. @Palmer tell me if you want me to resend it correctly. Sorry for being kind of slow here. It's fine: there's a "From:" in the patch, and git picks those up so it'll

Re: [RFC PATCH 7/8] riscv: rely on core code to keep thread_info::cpu updated

2021-09-28 Thread Palmer Dabbelt
/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -317,7 +317,6 @@ clear_bss_done: call setup_trap_vector /* Restore C environment */ la tp, init_task - sw zero, TASK_TI_CPU(tp) la sp, init_thread_union + THREAD_SIZE #ifdef CONFIG_KASAN Acked-by: Palmer

Re: [PATCH 2/3] trace: refactor TRACE_IRQFLAGS_SUPPORT in Kconfig

2021-08-24 Thread Palmer Dabbelt
On Fri, 30 Jul 2021 22:22:32 PDT (-0700), masahi...@kernel.org wrote: Make architectures select TRACE_IRQFLAGS_SUPPORT instead of having many defines. Signed-off-by: Masahiro Yamada --- arch/riscv/Kconfig| 4 +--- Acked-by: Palmer Dabbelt Thanks!

Re: [PATCH] arch: vdso: remove if-conditionals of $(c-gettimeofday-y)

2021-08-24 Thread Palmer Dabbelt
eofday.o is built only under that condition. So, you can always define CFLAGS_vgettimeofday.o Remove all the meaningless conditionals. Signed-off-by: Masahiro Yamada --- arch/riscv/kernel/vdso/Makefile | 5 + Acked-by: Palmer Dabbelt

Re: [PATCH v6 0/3] Introduce 64b relocatable kernel

2021-06-30 Thread Palmer Dabbelt
On Thu, 17 Jun 2021 06:33:48 PDT (-0700), a...@ghiti.fr wrote: Le 18/05/2021 à 12:12, Alexandre Ghiti a écrit : After multiple attempts, this patchset is now based on the fact that the 64b kernel mapping was moved outside the linear mapping. The first patch allows to build relocatable kernels

Re: [PATCH v2] mm: generalize ZONE_[DMA|DMA32]

2021-05-29 Thread Palmer Dabbelt
: Borislav Petkov Cc: Palmer Dabbelt Cc: Richard Henderson Cc: Russell King Acked-by: Catalin Marinas # for arm64 Acked-by: Geert Uytterhoeven # for m68k Acked-by: Mike Rapoport Signed-off-by: Kefeng Wang Acked-by: Palmer Dabbelt # for RISC-V --- v2: -i386 can't enable ZONE_DMA32, fix

Re: [PATCH] docs: kernel-parameters: mark numa=off is supported by a bundle of architectures

2021-05-29 Thread Palmer Dabbelt
a single NUMA node spanning all memory. + numa_balancing= [KNL,ARM64,PPC,RISCV,S390,X86] Enable or disable automatic NUMA balancing. Allowed values are enable and disable Acked-by: Palmer Dabbelt Thanks!

Re: [PATCH 2/6] mm: Generalize SYS_SUPPORTS_HUGETLBFS (rename as ARCH_SUPPORTS_HUGETLBFS)

2021-03-09 Thread Palmer Dabbelt
instead. This reduces code duplication and makes it cleaner. Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Palmer D

Re: [PATCH v2] kbuild: preprocess module linker script

2020-09-08 Thread Palmer Dabbelt
, which is included from scripts/module.lds.S. scripts/module.lds is fine because 'make clean' keeps all the build artifacts under scripts/. You can add arch-specific sections in . for the arch/riscv stuff Acked-by: Palmer Dabbelt Thanks! Signed-off-by: Masahiro Yamada Tested-by: Jessica

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-22 Thread Palmer Dabbelt
On Wed, 22 Jul 2020 02:43:50 PDT (-0700), Arnd Bergmann wrote: On Tue, Jul 21, 2020 at 9:06 PM Palmer Dabbelt wrote: On Tue, 21 Jul 2020 11:36:10 PDT (-0700), a...@ghiti.fr wrote: > Let's try to make progress here: I add linux-mm in CC to get feedback on > this patch as it blocks sv48 s

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-21 Thread Palmer Dabbelt
On Tue, 21 Jul 2020 21:50:42 PDT (-0700), m...@ellerman.id.au wrote: Benjamin Herrenschmidt writes: On Tue, 2020-07-21 at 16:48 -0700, Palmer Dabbelt wrote: > Why ? Branch distance limits ? You can't use trampolines ? Nothing fundamental, it's just that we don't have a large code mo

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-21 Thread Palmer Dabbelt
On Tue, 21 Jul 2020 16:12:58 PDT (-0700), b...@kernel.crashing.org wrote: On Tue, 2020-07-21 at 12:05 -0700, Palmer Dabbelt wrote: * We waste vmalloc space on 32-bit systems, where there isn't a lot of it. * On 64-bit systems the VA space around the kernel is precious because it's the only

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-21 Thread Palmer Dabbelt
On Tue, 21 Jul 2020 16:11:02 PDT (-0700), b...@kernel.crashing.org wrote: On Tue, 2020-07-21 at 14:36 -0400, Alex Ghiti wrote: > > I guess I don't understand why this is necessary at all. > > Specifically: why > > can't we just relocate the kernel within the linear map? That would > > let the

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-21 Thread Palmer Dabbelt
watching, so far all the sv48 patch sets have imposed a significant performance penalty on all systems). Alex Le 7/9/20 à 7:11 AM, Alex Ghiti a écrit : Hi Palmer, Le 7/9/20 à 1:05 AM, Palmer Dabbelt a écrit : On Sun, 07 Jun 2020 00:59:46 PDT (-0700), a...@ghiti.fr wrote: This is a preparatory

[PATCH] powerpc/64: Fix an out of date comment about MMIO ordering

2020-07-16 Thread Palmer Dabbelt
From: Palmer Dabbelt This primitive has been renamed, but because it was spelled incorrectly in the first place it must have escaped the fixup patch. As far as I can tell this logic is still correct: smp_mb__after_spinlock() uses the default smp_mb() implementation, which is "sync" r

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-07-08 Thread Palmer Dabbelt
On Sun, 07 Jun 2020 00:59:46 PDT (-0700), a...@ghiti.fr wrote: This is a preparatory patch for relocatable kernel. The kernel used to be linked at PAGE_OFFSET address and used to be loaded physically at the beginning of the main memory. Therefore, we could use the linear mapping for the kernel

Re: [PATCH 19/31] riscv: use asm-generic/cacheflush.h

2020-05-12 Thread Palmer Dabbelt
SYS_RISCV_FLUSH_ICACHE_ALL (SYS_RISCV_FLUSH_ICACHE_LOCAL) +#include + #endif /* _ASM_RISCV_CACHEFLUSH_H */ Thanks! Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Were you trying to get these all in at once, or do you want me to take it into my tree?

Re: Re: linux-next: build warning after merge of the bpf-next tree

2020-01-10 Thread Palmer Dabbelt
On Fri, 10 Jan 2020 14:28:17 PST (-0800), alexan...@ghiti.fr wrote: Hi guys, On 10/27/19 8:02 PM, Stephen Rothwell wrote: Hi all, On Fri, 18 Oct 2019 10:56:57 +1100 Stephen Rothwell wrote: Hi all, After merging the bpf-next tree, today's linux-next build (powerpc ppc64_defconfig) produced

Re: [PATCH v2 2/4] Add fchmodat4(), a new syscall

2019-07-16 Thread Palmer Dabbelt
On Tue, 16 Jul 2019 18:48:02 PDT (-0700), v...@zeniv.linux.org.uk wrote: On Tue, Jul 16, 2019 at 06:27:17PM -0700, Palmer Dabbelt wrote: -int do_fchmodat(int dfd, const char __user *filename, umode_t mode) +int do_fchmodat4(int dfd, const char __user *filename, umode_t mode, int flags

[PATCH v2 4/4] tools: Add fchmodat4

2019-07-16 Thread Palmer Dabbelt
I'm not sure why it's necessary to add this explicitly to tools/ as well as arch/, but there were a few instances of fspick in here so I blindly added fchmodat4 in the same fashion. Signed-off-by: Palmer Dabbelt --- tools/include/uapi/asm-generic/unistd.h | 4 +++- tools/perf/arch/x86

[PATCH v2 3/4] arch: Register fchmodat4, usually as syscall 434

2019-07-16 Thread Palmer Dabbelt
This registers the new fchmodat4 syscall in most places as nuber 434, with alpha being the exception where it's 544. I found all these sites by grepping for fspick, which I assume has found me everything. Signed-off-by: Palmer Dabbelt --- arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch

Add a new fchmodat4() syscall, v2

2019-07-16 Thread Palmer Dabbelt
This patch set adds fchmodat4(), a new syscall. The actual implementation is super simple: essentially it's just the same as fchmodat(), but LOOKUP_FOLLOW is conditionally set based on the flags. I've attempted to make this match "man 2 fchmodat" as closely as possible, which says EINVAL is

[PATCH v2 1/4] Non-functional cleanup of a "__user * filename"

2019-07-16 Thread Palmer Dabbelt
The next patch defines a very similar interface, which I copied from this definition. Since I'm touching it anyway I don't see any reason not to just go fix this one up. Signed-off-by: Palmer Dabbelt --- include/linux/syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 2/4] Add fchmodat4(), a new syscall

2019-07-16 Thread Palmer Dabbelt
filesystem implemenation, but the functionality is pretty generic so I'm assuming there would be other use cases. Signed-off-by: Palmer Dabbelt --- fs/open.c| 20 include/linux/syscalls.h | 7 +-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/fs

Re: [PATCH 13/15] riscv: switch to generic version of pte allocation

2019-05-06 Thread Palmer Dabbelt
to the generic version removes the __GFP_RETRY_MAYFAIL and ensures that GFP_ACCOUNT is used for the user PTE allocations. Reviewed-by: Palmer Dabbelt I'm assuming this is going in along with the rest of the patches, so I'm not going to add it to my tree. The pte_free() and pte_free_kernel() versions

[PATCH] KVM: PPC: Book3S HV: smb->smp comment fixup

2019-04-25 Thread Palmer Dabbelt
I made the same typo when trying to grep for uses of smp_wmb and figured I might as well fix it. Signed-off-by: Palmer Dabbelt --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index

Re: [PATCH 02/11] riscv: remove the HAVE_KPROBES option

2019-02-19 Thread Palmer Dabbelt
On Tue, 19 Feb 2019 07:17:59 PST (-0800), Christoph Hellwig wrote: On Fri, Feb 15, 2019 at 06:32:07PM +0900, Masahiro Yamada wrote: On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > HAVE_KPROBES is defined genericly in arch/Kconfig and architectures > should just select it if

Re: [PATCH RFC 4/7] riscv/vdso: don't clear PG_reserved

2018-12-07 Thread Palmer Dabbelt
leave the pages marked as reserved. Cc: Palmer Dabbelt Cc: Albert Ou Cc: Tobias Klauser Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- arch/riscv/kernel/vdso.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv

Re: [PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument

2018-11-21 Thread Palmer Dabbelt
Cc: linux...@lists.infradead.org Cc: linux-xte...@linux-xtensa.org Cc: linuxppc-dev@lists.ozlabs.org Cc: nios2-...@lists.rocketboards.org Cc: openr...@lists.librecores.org Cc: sparcli...@vger.kernel.org Cc: uclinux-h8-de...@lists.sourceforge.jp Cc: x...@kernel.org Signed-off-by: Dmitry V. Levin Reviewed-

Re: [PATCH 6/9] PCI: consolidate PCI config entry in drivers/pci

2018-10-19 Thread Palmer Dabbelt
I config PCI_DOMAINS_GENERIC def_bool PCI -source "drivers/pci/Kconfig" - -endmenu - menu "Power management options" source kernel/power/Kconfig Reviewed-by: Palmer Dabbelt I'm assuming this will go in via PCI tree of some sort, so I'm not going to touch it any further. Thanks for cleaning this up!

Re: [PATCH v2 1/2] mm: introduce ARCH_HAS_PTE_SPECIAL

2018-04-10 Thread Palmer Dabbelt
On Tue, 10 Apr 2018 09:09:32 PDT (-0700), wi...@infradead.org wrote: On Tue, Apr 10, 2018 at 05:25:50PM +0200, Laurent Dufour wrote: arch/powerpc/include/asm/pte-common.h | 3 --- arch/riscv/Kconfig | 1 + arch/s390/Kconfig

Re: [PATCH v2 02/16] riscv: Use INITRAMFS_GENERIC_UNLOAD.

2018-03-25 Thread Palmer Dabbelt
d long end) -{ -} -#endif /* CONFIG_BLK_DEV_INITRD */ I haven't looked through the rest of the patch set, but this is a pretty trivial change so feel free to add a Reviewed-By: Palmer Dabbelt <pal...@sifive.com> if you'd like. If you'd like it merged through my tree then just say something!

[PATCH] tty: New RISC-V SBI console driver

2017-06-26 Thread Palmer Dabbelt
The RISC-V ISA defines a simple console that is availiable via SBI calls on all systems. This patch adds a driver for this console interface that can act as both a target for early printk and as the system console. Signed-off-by: Palmer Dabbelt <pal...@dabbelt.com> --- drivers/tty/hvc/K

Re: [PATCH 12/17] tty: New RISC-V SBI Console Driver

2017-06-23 Thread Palmer Dabbelt
On Wed, 07 Jun 2017 00:58:04 PDT (-0700), Arnd Bergmann wrote: > On Wed, Jun 7, 2017 at 9:15 AM, Geert Uytterhoeven <ge...@linux-m68k.org> > wrote: >> CC (hypervisor) console folks >> >> On Wed, Jun 7, 2017 at 1:00 AM, Palmer Dabbelt <pal...@dabbelt.com> wro