Re: [PATCH v5 1/2] kexec: Consolidate machine_kexec_mask_interrupts() implementation

2024-12-04 Thread Jiri Slaby
On 30. 11. 24, 21:11, Eliav Farber wrote: Consolidate the machine_kexec_mask_interrupts implementation into a common function located in a new file: kernel/irq/kexec.c. This removes duplicate implementations from architecture-specific files in arch/arm, arch/arm64, arch/powerpc, and arch/riscv, r

Re: [PATCH] tty: hvc: Fix incorrect formatted output

2024-11-06 Thread Jiri Slaby
On 07. 11. 24, 8:47, Jiri Slaby wrote: On 07. 11. 24, 8:33, liujing wrote: The termno parameter is defined as an unsigned int in hvc_opal_probe(), So the output format should be %u instead of %d. Signed-off-by: liujing --- v1 -> V2: Modified the description of commit. Yet, this is a

Re: [PATCH] tty: hvc: Fix incorrect formatted output

2024-11-06 Thread Jiri Slaby
On 07. 11. 24, 8:33, liujing wrote: The termno parameter is defined as an unsigned int in hvc_opal_probe(), So the output format should be %u instead of %d. Signed-off-by: liujing --- v1 -> V2: Modified the description of commit. diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_o

Re: [PATCH] tty:hvc:Fix incorrect formatted output

2024-11-06 Thread Jiri Slaby
Also please fix the subject. See: git log --oneline drivers/tty/hvc/hvc_opal.c On 07. 11. 24, 8:10, Jiri Slaby wrote: On 07. 11. 24, 6:47, liujing wrote: The termno parameter is defined as an unsigned int in hvc_opal_probe function, "The termno parameter is defined as an unsigned i

Re: [PATCH] tty:hvc:Fix incorrect formatted output

2024-11-06 Thread Jiri Slaby
On 07. 11. 24, 6:47, liujing wrote: The termno parameter is defined as an unsigned int in hvc_opal_probe function, "The termno parameter is defined as an unsigned int in hvc_opal_probe()." We place () after function names, then "function" is not needed. > So when it output should be modified

Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed

2024-04-11 Thread Jiri Slaby
On 12. 04. 24, 5:38, li.ha...@zte.com.cn wrote: From: Li Hao Cancel the do_wakeup flag in hvc_struct, and change it to immediately wake up tty when hp->n_outbuf is 0 in hvc_push(). When we receive a key input character, the interrupt handling function hvc_handle_interrupt() will be executed, a

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-07 Thread Jiri Slaby
On 08. 04. 24, 7:32, Jiri Slaby wrote: On 08. 04. 24, 7:29, Michael Ellerman wrote: Many maintainers won't drop Cc: tags if they are there in the submitted patch. So I agree with Andy that we should encourage folks not to add them in the first place. But fix the docs first. I am perso

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-07 Thread Jiri Slaby
On 08. 04. 24, 7:29, Michael Ellerman wrote: Many maintainers won't drop Cc: tags if they are there in the submitted patch. So I agree with Andy that we should encourage folks not to add them in the first place. But fix the docs first. I am personally not biased to any variant (as in: I don't

Re: [PATCH] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

2024-04-03 Thread Jiri Slaby
On 04. 04. 24, 0:29, Andy Shevchenko wrote: Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Aneesh Kumar K.V" Cc: "Naveen N. Rao" Cc: linux-m...@lists.linux-m68k.org Second, please move these Cc to be after the '---' line Sorry, but why? --

Re: kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-12 Thread Jiri Slaby
Hi, On 13. 03. 24, 1:48, Baoquan He wrote: Hi Jiri, On 03/12/24 at 10:58am, Jiri Slaby wrote: On 13. 12. 23, 6:57, Baoquan He wrote: ... snip... --- a/include/linux/kexec.h +++ b/include/linux/kexec.h ... @@ -500,6 +500,13 @@ static inline int crash_hotplug_memory_support(void

kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-12 Thread Jiri Slaby
On 13. 12. 23, 6:57, Baoquan He wrote: When specifying 'kexec -c -d', kexec_load interface will print loading information, e.g the regions where kernel/initrd/purgatory/cmdline are put, the memmap passed to 2nd kernel taken as system RAM ranges, and printing all contents of struct kexec_segment,

Re: [PATCH] tty: hvc-iucv: fix function pointer casts

2024-02-13 Thread Jiri Slaby
atible function type [-Werror,-Wcast-function-type-strict] 1100 | priv->dev->release = (void (*)(struct device *)) kfree; | ^ Add a separate function to handle this correctly. Signed-off-by: Arnd Bergmann Revie

[PATCH 12/27] tty: hvc: convert to u8 and size_t

2023-12-05 Thread Jiri Slaby (SUSE)
Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: Jiri Slaby (SUSE) Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Amit Shah Cc: Arnd Bergmann Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou

[PATCH 10/27] tty: ehv_bytechan: convert to u8 and size_t

2023-12-05 Thread Jiri Slaby (SUSE)
Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: Jiri Slaby (SUSE) Cc: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/ehv_bytechan.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions

Re: [PATCH 00/17] tty: small cleanups and fixes

2023-11-27 Thread Jiri Slaby
On 23. 11. 23, 21:19, Greg KH wrote: On Tue, Nov 21, 2023 at 10:22:41AM +0100, Jiri Slaby (SUSE) wrote: This is a series to fix/clean up some obvious issues I revealed during u8+size_t conversions (to be posted later). I applied most of these except the last few, as I think you were going to

[PATCH 11/17] tty: hvc_console: use flexible array for outbuf

2023-11-21 Thread Jiri Slaby (SUSE)
the same thanks to -funsigned-char). The former is now preferred over the latter. It makes the code easier to understand. Signed-off-by: Jiri Slaby (SUSE) Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/hvc/hvc_console.c | 4 +--- drivers/tty/hvc/hvc_console.h | 2 +- 2 files changed, 2

[PATCH 07/17] tty: ehv_bytecha: use memcpy_and_pad() in local_ev_byte_channel_send()

2023-11-21 Thread Jiri Slaby (SUSE)
There is a helper for memcpy(buffer)+memset(the_rest). Use it for simplicity. And add a comment why we are doing the copy in the first place. Signed-off-by: Jiri Slaby (SUSE) Cc: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/ehv_bytechan.c | 7 +-- 1 file changed, 5

[PATCH 00/17] tty: small cleanups and fixes

2023-11-21 Thread Jiri Slaby (SUSE)
ozlabs.org Cc: linux-...@vger.kernel.org Cc: Matt Turner Cc: net...@vger.kernel.org Cc: Paolo Abeni Cc: Richard Henderson Jiri Slaby (SUSE) (17): tty: deprecate tty_write_message() tty: remove unneeded mbz from tiocsti() tty: fix tty_operations types in documentation tty: move locking d

Re: [PATCH v4 4/5] tty: Add SBI debug console support to HVC SBI driver

2023-11-19 Thread Jiri Slaby
On 18. 11. 23, 4:38, Anup Patel wrote: diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c b/drivers/tty/hvc/hvc_riscv_sbi.c index 31f53fa77e4a..697c981221b5 100644 --- a/drivers/tty/hvc/hvc_riscv_sbi.c +++ b/drivers/tty/hvc/hvc_riscv_sbi.c ... -static int __init hvc_sbi_console_init(void) +static int

Re: [PATCH v2 04/15] tty: Remove now superfluous sentinel element from ctl_table array

2023-10-02 Thread Jiri Slaby
~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/zo5yx5jfoggi%2f...@bombadil.infradead.org/) Remove sentinel from tty_table Signed-off-by: Joel Granados Reviewed-by: Jiri Slaby thanks, -- js suse labs

Re: [PATCH 04/15] tty: Remove now superfluous sentinel element from ctl_table array

2023-10-02 Thread Jiri Slaby
On 28. 09. 23, 15:21, Joel Granados via B4 Relay wrote: From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by

Re: [PATCH] tty: hvc: remove set but unused variable

2023-09-11 Thread Jiri Slaby
On 08. 09. 23, 8:17, Bo Liu wrote: The local variable vdev in hvcs_destruct_port() is set but not used. Remove the variable and related code. Signed-off-by: Bo Liu Reviewed-by: Jiri Slaby -- js suse labs

[PATCH 32/36] tty: hvc: convert counts to size_t

2023-08-10 Thread Jiri Slaby (SUSE)
Unify the type of tty_operations::write() counters with the 'count' parameter. I.e. use size_t for them. Signed-off-by: Jiri Slaby (SUSE) Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/hvc/hvc_console.c | 2 +- drivers/tty/hvc/hvcs.c| 6 +++--- drivers/tty/hvc/hvsi.c

[PATCH 03/10] tty: hvsi: remove an extra variable from hvsi_write()

2023-07-31 Thread Jiri Slaby (SUSE)
'source' is the same as 'buf'. Rename the parameter ('buf') to 'source' and drop the local variable. Likely, the two were introduced to have a different type. But 'char' and 'unsigned char' are the same in the kernel for a lo

Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first

2023-07-03 Thread Jiri Slaby
Cc Jacob Young (from kernel bugzilla) On 30. 06. 23, 19:40, Suren Baghdasaryan wrote: On Fri, Jun 30, 2023 at 1:43 AM Jiri Slaby wrote: On 30. 06. 23, 10:28, Jiri Slaby wrote: > 2348 clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SET

Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first

2023-06-30 Thread Jiri Slaby
On 30. 06. 23, 10:28, Jiri Slaby wrote: > 2348 clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7fcaa5882990, parent_tid=0x7fcaa5882990, exit_signal=0, stack=0x7fcaa5082000, stack_s

Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first

2023-06-30 Thread Jiri Slaby
On 30. 06. 23, 8:35, Jiri Slaby wrote: On 29. 06. 23, 17:30, Suren Baghdasaryan wrote: On Thu, Jun 29, 2023 at 7:40 AM Jiri Slaby wrote: Hi, On 27. 02. 23, 18:36, Suren Baghdasaryan wrote: Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based

Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first

2023-06-29 Thread Jiri Slaby
On 29. 06. 23, 17:30, Suren Baghdasaryan wrote: On Thu, Jun 29, 2023 at 7:40 AM Jiri Slaby wrote: Hi, On 27. 02. 23, 18:36, Suren Baghdasaryan wrote: Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Signed-off-by: Suren

Re: [PATCH v4 29/33] x86/mm: try VMA lock-based page fault handling first

2023-06-29 Thread Jiri Slaby
Hi, On 27. 02. 23, 18:36, Suren Baghdasaryan wrote: Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Signed-off-by: Suren Baghdasaryan --- arch/x86/Kconfig| 1 + arch/x86/mm/fault.c | 36

Re: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Jiri Slaby
On 23. 05. 23, 10:59, Herve Codina wrote: In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that n

Re: [PATCH 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Jiri Slaby
On 22. 05. 23, 10:20, Herve Codina wrote: In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that n

Re: [PATCH 0/2] Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

2023-05-23 Thread Jiri Slaby
On 22. 05. 23, 10:20, Herve Codina wrote: This series fixes issues raised by the kernel test robot https://lore.kernel.org/oe-kbuild-all/202305160221.9xgweobz-...@intel.com/ In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM

Re: [PATCH v2 11/13] tty/serial: Call ->dtr_rts() parameter active consistently

2023-01-10 Thread Jiri Slaby
On 10. 01. 23, 13:02, Ilpo Järvinen wrote: Convert various parameter names for ->dtr_rts() and related functions from onoff, on, and raise to active. Much better. Signed-off-by: Ilpo Järvinen Reviewed-by: Jiri Slaby -- js suse labs

Re: [PATCH net-next] Remove DECnet support from kernel

2023-01-09 Thread Jiri Slaby
On 09. 01. 23, 9:14, Jan Engelhardt wrote: On Monday 2023-01-09 08:04, Jiri Slaby wrote: On 18. 08. 22, 2:43, Stephen Hemminger wrote: DECnet is an obsolete network protocol this breaks userspace. Some projects include linux/dn.h: https://codesearch.debian.net/search?q=include.*linux

Re: [PATCH net-next] Remove DECnet support from kernel

2023-01-08 Thread Jiri Slaby
On 18. 08. 22, 2:43, Stephen Hemminger wrote: DECnet is an obsolete network protocol that receives more attention from kernel janitors than users. It belongs in computer protocol history museum not in Linux kernel. It has been "Orphaned" in kernel since 2010. The iproute2 support for DECnet was

Re: [PATCH 07/10] tty: Convert ->dtr_rts() to take bool argument

2023-01-04 Thread Jiri Slaby
viewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen --- ... --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -378,7 +378,7 @@ static void async_mode(MGSLPC_INFO *info); static void tx_timeout(struct timer_list *t); static bool carrier_raised(struct tt

[PATCH 3/3] USB: sisusbvga: use module_usb_driver()

2022-12-08 Thread Jiri Slaby (SUSE)
Cc: linuxppc-dev@lists.ozlabs.org Cc: linux...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) --- drivers/usb/misc/sisusbvga/sisusbvga.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusbvga.c b

[PATCH 2/3] USB: sisusbvga: rename sisusb.c to sisusbvga.c

2022-12-08 Thread Jiri Slaby (SUSE)
linux...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) --- drivers/usb/misc/sisusbvga/Makefile | 2 -- drivers/usb/misc/sisusbvga/{sisusb.c => sisusbvga.c} | 0 2 files changed, 2 deletions(-) rename drivers/usb/misc/sisusbvga/{sisusb.c => sisusbvga.c} (

[PATCH 1/3] USB: sisusbvga: remove console support

2022-12-08 Thread Jiri Slaby (SUSE)
Winischhofer Cc: linuxppc-dev@lists.ozlabs.org Cc: linux...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) --- arch/powerpc/configs/ppc6xx_defconfig|1 - arch/sh/configs/landisk_defconfig|1 - drivers/usb/misc/sisusbvga/Kconfig | 34 - drivers

Re: [PATCH -next] tty: hvc: make hvc_rtas_dev static

2022-10-19 Thread Jiri Slaby
On 19. 10. 22, 8:44, ruanjinjie wrote: The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/tty/hvc/hvc_rtas.c:29:19: warning: symbol 'hvc_rtas_dev' was not declared. Should it be static? Reviewed-by: Jiri Slaby Signed-off-by:

Re: [PATCH] tty: evh_bytechan: Replace NO_IRQ by 0

2022-10-05 Thread Jiri Slaby
: Christophe Leroy Reviewed-by: Jiri Slaby --- drivers/tty/ehv_bytechan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c index 19d32cb6af84..8595483f4697 100644 --- a/drivers/tty/ehv_bytechan.c +++ b/drivers/tty

Re: [PATCH 5/5] tty: hvc: remove HVC_IUCV_MAGIC

2022-09-15 Thread Jiri Slaby
constant offset, but is equivalent Ref: https://lore.kernel.org/linux-doc/yymlovoskuchl...@kroah.com/ Signed-off-by: Ahelenia Ziemiańska Acked-by: Jiri Slaby --- drivers/tty/hvc/hvc_iucv.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/tty/hvc/hvc_iucv.

Re: [PATCH] tty: move from strlcpy with unused retval to strscpy

2022-08-30 Thread Jiri Slaby
On 18. 08. 22, 23:01, Wolfram Sang wrote: Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Reviewed-by: Jiri Slaby Link: https://lore.kernel.

Re: [PATCH v2] tty/hvc_opal: simplify if-if to if-else

2022-04-26 Thread Jiri Slaby
On 26. 04. 22, 9:10, Wan Jiabing wrote: Use if and else instead of if(A) and if (!A). Reviewed-by: Jiri Slaby Signed-off-by: Wan Jiabing --- Change log: v2: - add braces to the if block. --- drivers/tty/hvc/hvc_opal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] tty/hvc_opal: simplify if-if to if-else

2022-04-24 Thread Jiri Slaby
On 24. 04. 22, 11:25, Wan Jiabing wrote: Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing --- drivers/tty/hvc/hvc_opal.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index 84776bc641

Re: [PATCH] tty: serial: Prepare cleanup of powerpc's asm/prom.h

2022-04-06 Thread Jiri Slaby
On 02. 04. 22, 12:20, Christophe Leroy wrote: 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 Reviewed-by: Jiri Slaby --- drivers/tty/seria

Re: [PATCH v2 3/3] vstatus: Display an informational message when the VSTATUS character is pressed or TIOCSTAT ioctl is called.

2022-02-06 Thread Jiri Slaby
On 06. 02. 22, 16:48, Walt Drummond wrote: When triggered by pressing the VSTATUS key or calling the TIOCSTAT ioctl, the n_tty line discipline will display a message on the user's tty that provides basic information about the system and an 'interesting' process in the current foreground process g

Re: [PATCH v12 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-11-10 Thread Jiri Slaby
On 04. 11. 21, 14:06, Xianting Tian wrote: OTOH, you need c[N_OUTBUF] in the console case (hvc_console_print), but not whole hvc_struct. So cons_hvcs should be an array of structs composed of only the lock and the buffer. It is ok for me. = And I would do it even simpler now. One c

Re: [PATCH v12 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-11-01 Thread Jiri Slaby
On 28. 10. 21, 17:09, Xianting Tian wrote: As well known, hvc backend can register its opertions to hvc backend. the operations contain put_chars(), get_chars() and so on. Some hvc backend may do dma in its operations. eg, put_chars() of virtio-console. But in the code of hvc framework, it may p

Re: [PATCH v11 2/3] tty: hvc: pass DMA capable memory to put_chars()

2021-10-25 Thread Jiri Slaby
On 15. 10. 21, 4:46, Xianting Tian wrote: @@ -151,9 +142,11 @@ static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] = static void hvc_console_print(struct console *co, const char *b, unsigned count) { - char c[N_OUTBUF] __ALIGNED__; + char *c; unsign

Re: [PATCH v7 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-17 Thread Jiri Slaby
Hi, On 17. 08. 21, 15:22, Xianting Tian wrote: As well known, hvc backend can register its opertions to hvc backend. the opertions contain put_chars(), get_chars() and so on. "operations". And there too: Some hvc backend may do dma in its opertions. eg, put_chars() of virtio-console. But in

Re: [PATCH v6 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-12 Thread Jiri Slaby
Hi, On 12. 08. 21, 14:26, kernel test robot wrote: drivers/tty/hvc/hvc_console.c:190:26: warning: variable 'hp' is uninitialized when used here [-Wuninitialized] spin_unlock_irqrestore(&hp->c_lock, flags); ^~ drivers/tty/hvc/hvc_console.c:149

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Jiri Slaby
On 05. 08. 21, 9:58, Jiri Slaby wrote: Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,   hp->outbuf_size = outbuf_size;   hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))]; This deserv

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Jiri Slaby
Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data, hp->outbuf_size = outbuf_size; hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))]; + /* +* hvc_con_outbuf is guaranteed to be aligned

Re: [PATCH 2/2] virtio-console: remove unnecessary kmemdup()

2021-08-02 Thread Jiri Slaby
On 02. 08. 21, 10:32, Xianting Tian wrote: 在 2021/8/2 下午3:25, Jiri Slaby 写道: Hi, why is this 2/2? I seem (Lore neither) to find 1/2. You didn't receive 1/2? [PATCH 1/2] tty: hvc: pass DMA capable memory to put_chars() https://lkml.org/lkml/2021/8/1/8 <https://lkml.org/lkml/2021/8/1

Re: [PATCH 2/2] virtio-console: remove unnecessary kmemdup()

2021-08-02 Thread Jiri Slaby
Hi, why is this 2/2? I seem (Lore neither) to find 1/2. On 01. 08. 21, 7:16, Xianting Tian wrote: hvc framework will never pass stack memory to the put_chars() function, Am I blind or missing something? hvc_console_print(...) { char c[N_OUTBUF] ... cons_ops[index]->put_chars(vtermnos[ind

[PATCH 2/8] hvsi: don't panic on tty_register_driver failure

2021-07-23 Thread Jiri Slaby
hvsi_console_init. Instead of shooting down the whole system. This means, we disable interrupts and restore hvsi_wait back to poll_for_state(). Signed-off-by: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/hvc/hvsi.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions

Re: [PATCH v2] xen/hvc: replace BUG_ON() with negative return value

2021-07-07 Thread Jiri Slaby
On 07. 07. 21, 12:40, Juergen Gross wrote: And btw, since I've got puzzled by the linuxppc-dev@ in the recipients list, I did look up relevant entries in ./MAINTAINERS. Shouldn't the file be part of "XEN HYPERVISOR INTERFACE"? I wouldn't mind. Greg, Jiri, what do you think? /me concurs. than

[PATCH 40/44] tty: hvc, drop unneeded forward declarations

2021-03-01 Thread Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org

Re: [PATCH 3/3] tty: vcc: Drop impossible to hit WARN_ON

2021-01-15 Thread Jiri Slaby
warning that is never hit. Signed-off-by: Uwe Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/vcc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index d9b0dc6deae9..e2d6205f83ce 100644 --- a/drivers/tty/vcc.c +++ b/dri

Re: [PATCH 2/3] tty: vcc: Drop unnecessary if block

2021-01-15 Thread Jiri Slaby
: Uwe Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/vcc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index 9ffd42e333b8..d9b0dc6deae9 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -681,9 +681,6 @@ static int vcc_remove(s

Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-15 Thread Jiri Slaby
ff-by: Uwe Kleine-König Reviewed-by: Jiri Slaby --- drivers/tty/hvc/hvcs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 509d1042825a..3e0461285c34 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -825,9 +

Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused

2020-11-05 Thread Jiri Slaby
On 05. 11. 20, 9:36, Lee Jones wrote: On Thu, 05 Nov 2020, Jiri Slaby wrote: On 05. 11. 20, 8:04, Christophe Leroy wrote: Le 04/11/2020 à 20:35, Lee Jones a écrit : Fixes the following W=1 kernel build warning(s):   drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set

Re: [PATCH 34/36] tty: serial: pmac_zilog: Make disposable variable __always_unused

2020-11-04 Thread Jiri Slaby
even if it was, would (void)!read_zsdata(port) fix it? Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linux-ser...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones ---   drivers/tty/serial/pmac_zilog.h

Re: [PATCH] tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()

2020-09-14 Thread Jiri Slaby
ly looking into the code, it looks like we need a fix similar to: commit 24eb2377f977fe06d84fca558f891f95bc28a449 Author: Jiri Slaby Date: Tue May 26 16:56:32 2020 +0200 tty: hvc_console, fix crashes on parallel open/close here too? > Signed-off-by: Tyrel Datwyler > --- > d

Re: [PATCH] serial: ucc_uart: make qe_uart_set_mctrl() static

2020-09-14 Thread Jiri Slaby
On 12. 09. 20, 5:38, Jason Yan wrote: > This eliminates the following sparse warning: > > drivers/tty/serial/ucc_uart.c:286:6: warning: symbol 'qe_uart_set_mctrl' > was not declared. Should it be static? > > Reported-by: Hulk Robot > Signed-off-by: Jason Y

Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

2020-05-20 Thread Jiri Slaby
On 15. 05. 20, 1:22, rana...@codeaurora.org wrote: > On 2020-05-13 00:04, Greg KH wrote: >> On Tue, May 12, 2020 at 02:39:50PM -0700, rana...@codeaurora.org wrote: >>> On 2020-05-12 01:25, Greg KH wrote: >>> > On Tue, May 12, 2020 at 09:22:15AM +0200, Ji

Re: [PATCH v2] tty: hvc: Fix data abort due to race in hvc_open

2020-05-20 Thread Jiri Slaby
On 20. 05. 20, 8:47, Raghavendra Rao Ananta wrote: > Potentially, hvc_open() can be called in parallel when two tasks calls > open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() > callback in the function fails, where it sets the tty->driver_data to > NULL, the parallel hvc_open

Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

2020-05-12 Thread Jiri Slaby
;>>> hvc_open(), >>> >>> How? The tty lock is held in install, and should not conflict with >>> open(), otherwise, we would be seeing this happen in all tty drivers, >>> right? >>> >> Well, I was expecting the same, but IIRC, I see that

Re: [PATCH] tty: hvc: remove hvcs_driver_string

2020-04-03 Thread Jiri Slaby
hvcs_driver_string[] >^~ > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan Acked-by: Jiri Slaby It fixes a commit from 2011: commit c7704d352d45de47333f2d9f10aead820b49044c Author: Benjamin Herrenschmidt Date: Sun Feb 6 18:26:25 2011 + power

Re: [RESEND PATCH v2 9/9] ath5k: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-20 Thread Jiri Slaby
On 19. 02. 20, 18:50, Krzysztof Kozlowski wrote: > The ioreadX() helpers have inconsistent interface. On some architectures > void *__iomem address argument is a pointer to const, on some not. > > Implementations of ioreadX() do not modify the memory under the address > so they can be converted t

Re: [PATCH 01/25] tty: Change return type to void

2018-09-04 Thread Jiri Slaby
On 09/05/2018, 03:08 AM, Jaejoong Kim wrote: > > @@ -688,7 +688,7 @@ extern int tty_port_close_start(struct > tty_port *port, > >   extern void tty_port_close_end(struct tty_port *port, struct > tty_struct *tty); > >   extern void tty_port_close(struct tty_port *port, > >   

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-08-31 Thread Jiri Slaby
On 08/31/2018, 02:10 PM, Pasha Tatashin wrote: > Thanks Jiri, I am now able to reproduce it with your new config. > > I have tried yesterday to enable sparsemem and deferred_struct_init on > x86_32, and that kernel booted fine, there must be something else in > your config that helps to trigger th

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-08-31 Thread Jiri Slaby
On 08/31/2018, 01:26 PM, Jiri Slaby wrote: > On 08/30/2018, 05:45 PM, Pasha Tatashin wrote: >> Hi Jiri, >> >> I believe this bug is fixed with this change: >> >> d39f8fb4b7776dcb09ec3bf7a321547083078ee3 >> mm: make DEFERRED_STRUCT_PAGE_INIT explicitly de

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-08-24 Thread Jiri Slaby
pasha.tatas...@oracle.com -> pavel.tatas...@microsoft.com due to 550 5.1.1 Unknown recipient address. On 08/24/2018, 09:32 AM, Jiri Slaby wrote: > On 06/19/2018, 09:56 PM, Pavel Tatashin wrote: >> On Tue, Jun 19, 2018 at 9:50 AM Pavel Tatashin >> wrote: >>> >>

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-06-16 Thread Jiri Slaby
On 11/21/2017, 08:24 AM, Michal Hocko wrote: > On Thu 16-11-17 20:46:01, Pavel Tatashin wrote: >> There is no need to have ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT, >> as all the page initialization code is in common code. >> >> Also, there is no need to depend on MEMORY_HOTPLUG, as initialization c

Re: [PATCH 4.9 27/33] futex: Remove duplicated code and fix undefined behaviour

2018-05-18 Thread Jiri Slaby
On 05/18/2018, 10:16 AM, Greg Kroah-Hartman wrote: > 4.9-stable review patch. If anyone has any objections, please let me know. > > -- > > From: Jiri Slaby > > commit 30d6e0a4190d37740e9447e4e4815f06992dd8c3 upstream. ... > --- a/kernel/futex.

[PATCH v2 1/1] futex: remove duplicated code and fix UB

2017-08-24 Thread Jiri Slaby
y (it gets optimized away anyway). [v2] - check also for negative values - wait for Will's fix to be in upstream Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Vineet Gupta Acked-by: Russell King Cc: Catalin Marinas Cc: Will Deacon Reviewed-by:

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Jiri Slaby
On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > On Wed, 21 Jun 2017, Jiri Slaby wrote: >> diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h >> index f32b42e8725d..5bb2fd4674e7 100644 >> --- a/arch/arm64/include/asm/futex.h >> +++ b/arc

[PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-21 Thread Jiri Slaby
k check in d12a29703 ("s390/uaccess: remove pointless access_ok() checks") as access_ok there returns true. We introduce it back to the helper for the sake of simplicity (it gets optimized away anyway). Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turn

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-17 Thread Jiri Slaby
On 05/15/2017, 03:16 PM, Will Deacon wrote: > Whilst I think this is a good idea, the code in question actually results > in undefined behaviour per the C spec and is reported by UBSAN. Hi, yes, I know -- this patch was the 1st from the series of 3 which I sent a long time ago to fix that up too.

[PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Jiri Slaby
that s390 removed access_ok check in d12a29703 ("s390/uaccess: remove pointless access_ok() checks") as access_ok there returns true. We introduce it back to the helper for the sake of simplicity (it gets optimized away anyway). Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan

[PATCH 1/3] futex: remove duplicated code

2017-03-03 Thread Jiri Slaby
that s390 removed access_ok check in d12a29703 ("s390/uaccess: remove pointless access_ok() checks") as access_ok there returns true. We introduce it back to the helper for the sake of simplicity (it gets optimized away anyway). Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan

[PATCH 3.12 143/235] powerpc: Fix build warning on 32-bit PPC

2017-01-27 Thread Jiri Slaby
Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Linus Torvalds Signed-off-by: Jiri Slaby --- arch/powerpc/kernel/misc_32.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index ace3

[patch added to 3.12-stable] powerpc: Fix build warning on 32-bit PPC

2017-01-25 Thread Jiri Slaby
in Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Linus Torvalds Signed-off-by: Jiri Slaby --- arch/powerpc/kernel/misc_32.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/misc_32.S b/arch/pow

[PATCH v2] TTY: serial, handle platform_get_irq retval properly

2016-05-09 Thread Jiri Slaby
platform_get_irq can fail, so we should handle negative value when returned. [v2] platform_get_irq can actually return zero on some platforms. So do not remove checks for irq == 0 there. Signed-off-by: Jiri Slaby Cc: Russell King Cc: "Uwe Kleine-König" Cc: Russell King Cc

[PATCH v2 2/4] exit_thread: remove empty bodies

2016-03-31 Thread Jiri Slaby
Define HAVE_EXIT_THREAD for archs which want to do something in exit_thread. For others, let's define exit_thread as an empty inline. This is a cleanup before we change the prototype of exit_thread to accept a task parameter. Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan Koksh

Re: [PATCH 3/4] exit_thread: accept a task parameter to be exited

2016-03-24 Thread Jiri Slaby
On 03/24/2016, 02:03 PM, Peter Zijlstra wrote: > On Thu, Mar 24, 2016 at 01:58:13PM +0100, Jiri Slaby wrote: >> void >> -exit_thread(void) >> +exit_thread(struct task_struct *me) >> { >> } > > task_struct arguments are called: tsk, task, p > 

[PATCH 3/4] exit_thread: accept a task parameter to be exited

2016-03-24 Thread Jiri Slaby
We need to call exit_thread from copy_process in a fail path. So make it accept task_struct as a parameter. Signed-off-by: Jiri Slaby Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Vineet Gupta Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Haavard Skinnemoen Cc

Re: stable: Please include commit bb344ca5b90 ("powerpc/mpc85xx: Add ranges to etsec2 nodes")

2015-03-31 Thread Jiri Slaby
On 03/26/2015, 10:14 PM, Scott Wood wrote: > Commit bb344ca5b90df6 ("powerpc/mpc85xx: Add ranges to etsec2 nodes") > fixes a bug that was exposed by commit 746c9e9f92dd ("of/base: Fix > PowerPC address parsing hack"). The latter commit was applied to stable > trees, so the former should be as well

[PATCH 3.12 013/176] powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2015-01-28 Thread Jiri Slaby
eep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman Signed-off-by: Jiri Slaby --- arch/powe

[patch added to the 3.12 stable tree] powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2015-01-14 Thread Jiri Slaby
or executing the nap/sleep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman Signed-off-by: Jiri Sl

[PATCH 3.12 71/94] locking/mutex: Disable optimistic spinning on some architectures

2014-07-30 Thread Jiri Slaby
ux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: sparcli...@vger.kernel.org Link: http://lkml.kernel.org/r/20140606175316.gv13...@laptop.programming.kicks-ass.net Signed-off-by: Ingo Molnar Signed-off-by: Jiri Slaby --- arch/arm/Kconfig | 1 + arch/arm

[patch added to the 3.12 stable tree] locking/mutex: Disable optimistic spinning on some architectures

2014-07-29 Thread Jiri Slaby
linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: sparcli...@vger.kernel.org Link: http://lkml.kernel.org/r/20140606175316.gv13...@laptop.programming.kicks-ass.net Signed-off-by: Ingo Molnar Signed-off-by: Jiri Slaby --- arch/arm/Kconf

[PATCH 1/2] ftrace: PPC, fix obsolete comment

2014-04-29 Thread Jiri Slaby
CONFIG_MCOUNT is not defined anymore, the corresponding #ifdef there is CONFIG_FUNCTION_TRACER. Signed-off-by: Jiri Slaby Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar --- arch/powerpc/kernel/entry_32.S | 2 +- 1 file changed

Re: [PATCH] drivers/tty/hvc: using strlcpy instead of strncpy

2013-03-05 Thread Jiri Slaby
On 03/05/2013 02:58 AM, Chen Gang wrote: > 于 2013年02月28日 21:47, Jiri Slaby 写道: >>>> when strlen(&pi->location_code[0]) == HVCS_CLC_LENGTH + 2 >> It cannot, pi->location_code is defined as char[HVCS_CLC_LENGTH + 1]. >> > > really, it is, I did not not

Re: [PATCH] drivers/tty/hvc: using strlcpy instead of strncpy

2013-02-28 Thread Jiri Slaby
On 02/28/2013 12:15 PM, Chen Gang wrote: > 于 2013年02月28日 19:13, Chen Gang 写道: >> 于 2013年02月28日 18:41, Jiri Slaby 写道: >>> On 02/26/2013 04:43 AM, Chen Gang wrote: >>>>> >>>>> when strlen pi->location_code is larger than HVCS_CLC_LENGTH + 1,

Re: [PATCH] drivers/tty/hvc: using strlcpy instead of strncpy

2013-02-28 Thread Jiri Slaby
On 02/26/2013 04:43 AM, Chen Gang wrote: > > when strlen pi->location_code is larger than HVCS_CLC_LENGTH + 1, > original implementation can not let hvcsd->p_location_code NUL terminated. > so need fix it (also can simplify the code) It should never be larger because the +1 is exactly for

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Jiri Slaby
ms would boot up but then not display the > login prompt on the console, and attempts to open /dev/hvc0 would > give a "No such device" error. > > This fixes it by removing the extra kref_put() and tty_kref_put() calls. Oh yeah. Thanks. Acked-by: Jiri Slaby &g

[PATCH 41/41] TTY: hvcs, add tty install

2012-08-07 Thread Jiri Slaby
This has two outcomes: * we give the TTY layer a tty_port * we do not find the info structure every time open is called on that tty >From now on, we only increase the reference count in ->install (and decrease in ->cleanup). Signed-off-by: Jiri Slaby Cc: linuxppc-dev@lists.o

  1   2   >