Thread (14 messages) flat view 14 messages, 3 authors, 2021-10-26

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

From: Jiri Slaby <jirislaby@kernel.org>
Date: 2021-10-26 05:10:59
Also in: lkml

On 15. 10. 21, 4:46, Xianting Tian wrote:
quoted hunk ↗ jump to hunk
@@ -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;
  	unsigned i = 0, n = 0;
  	int r, donecr = 0, index = co->index;
+	unsigned long flags;
+	struct hvc_struct *hp;
  
  	/* Console access attempt outside of acceptable console range. */
  	if (index >= MAX_NR_HVC_CONSOLES)
@@ -163,6 +156,13 @@ static void hvc_console_print(struct console *co, const char *b,
  	if (vtermnos[index] == -1)
  		return;
  
+	hp = cons_hvcs[index];
+	if (!hp)
+		return;
You effectively make the console unusable until someone calls 
hvc_alloc() for this device, correct? This doesn't look right. Neither 
you describe this change of behaviour in the commit log.

regards,
-- 
js
suse labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help