All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Bin Meng <bmeng@tinylab.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	linux-serial <linux-serial@vger.kernel.org>
Cc: "catalin.marinas" <catalin.marinas@arm.com>,
	gregkh <gregkh@linuxfoundation.org>,
	linux <linux@armlinux.org.uk>, will <will@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/3] serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h
Date: Thu, 8 Dec 2022 10:37:42 +0100	[thread overview]
Message-ID: <035f431c-15ee-b604-79be-ec2861b45b86@kernel.org> (raw)
In-Reply-To: <em14380c7e-ee2b-45d5-8879-dde687f03b2b@eea79fc7.com>

On 08. 12. 22, 10:32, Bin Meng wrote:
>>> +#ifdef CONFIG_THUMB2_KERNEL
>>> +#define SEMIHOST_SWI    "0xab"
>>> +#else
>>> +#define SEMIHOST_SWI    "0x123456"
>>> +#endif
>>> +
>>> +static inline void smh_putc(struct uart_port *port, unsigned char c)
>>
>> 2) port is unused in all implementations. So it should be dropped.
>> 3) can you make "c" an explicit u8?
> 
> The smh_putc function signature is defined by the uart_console_write 
> helper. I don't think we can change it.

Ah. Of course. Then at least forward-declare struct uart_port here. So 
that it works also when someone decides to include the header outside 
serial.

thanks,
-- 
js
suse labs


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Slaby <jirislaby@kernel.org>
To: Bin Meng <bmeng@tinylab.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	linux-serial <linux-serial@vger.kernel.org>
Cc: "catalin.marinas" <catalin.marinas@arm.com>,
	gregkh <gregkh@linuxfoundation.org>,
	linux <linux@armlinux.org.uk>, will <will@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/3] serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h
Date: Thu, 8 Dec 2022 10:37:42 +0100	[thread overview]
Message-ID: <035f431c-15ee-b604-79be-ec2861b45b86@kernel.org> (raw)
In-Reply-To: <em14380c7e-ee2b-45d5-8879-dde687f03b2b@eea79fc7.com>

On 08. 12. 22, 10:32, Bin Meng wrote:
>>> +#ifdef CONFIG_THUMB2_KERNEL
>>> +#define SEMIHOST_SWI    "0xab"
>>> +#else
>>> +#define SEMIHOST_SWI    "0x123456"
>>> +#endif
>>> +
>>> +static inline void smh_putc(struct uart_port *port, unsigned char c)
>>
>> 2) port is unused in all implementations. So it should be dropped.
>> 3) can you make "c" an explicit u8?
> 
> The smh_putc function signature is defined by the uart_console_write 
> helper. I don't think we can change it.

Ah. Of course. Then at least forward-declare struct uart_port here. So 
that it works also when someone decides to include the header outside 
serial.

thanks,
-- 
js
suse labs


WARNING: multiple messages have this Message-ID (diff)
From: Jiri Slaby <jirislaby@kernel.org>
To: Bin Meng <bmeng@tinylab.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	linux-serial <linux-serial@vger.kernel.org>
Cc: "catalin.marinas" <catalin.marinas@arm.com>,
	gregkh <gregkh@linuxfoundation.org>,
	linux <linux@armlinux.org.uk>, will <will@kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/3] serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h
Date: Thu, 8 Dec 2022 10:37:42 +0100	[thread overview]
Message-ID: <035f431c-15ee-b604-79be-ec2861b45b86@kernel.org> (raw)
In-Reply-To: <em14380c7e-ee2b-45d5-8879-dde687f03b2b@eea79fc7.com>

On 08. 12. 22, 10:32, Bin Meng wrote:
>>> +#ifdef CONFIG_THUMB2_KERNEL
>>> +#define SEMIHOST_SWI    "0xab"
>>> +#else
>>> +#define SEMIHOST_SWI    "0x123456"
>>> +#endif
>>> +
>>> +static inline void smh_putc(struct uart_port *port, unsigned char c)
>>
>> 2) port is unused in all implementations. So it should be dropped.
>> 3) can you make "c" an explicit u8?
> 
> The smh_putc function signature is defined by the uart_console_write 
> helper. I don't think we can change it.

Ah. Of course. Then at least forward-declare struct uart_port here. So 
that it works also when someone decides to include the header outside 
serial.

thanks,
-- 
js
suse labs


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-08  9:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 13:53 [PATCH v2 1/3] serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h Bin Meng
2022-12-07 13:53 ` Bin Meng
2022-12-07 13:53 ` Bin Meng
2022-12-07 13:53 ` [PATCH v2 2/3] riscv: Implement semihost.h for earlycon semihost driver Bin Meng
2022-12-07 13:53   ` Bin Meng
2022-12-07 16:40   ` Conor Dooley
2022-12-07 16:40     ` Conor Dooley
2022-12-07 13:53 ` [PATCH v2 3/3] serial: Rename " Bin Meng
2022-12-07 13:53   ` Bin Meng
2022-12-08  6:08 ` [PATCH v2 1/3] serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h Jiri Slaby
2022-12-08  6:08   ` Jiri Slaby
2022-12-08  6:08   ` Jiri Slaby
2022-12-08  9:32   ` Bin Meng
2022-12-08  9:32     ` Bin Meng
2022-12-08  9:32     ` Bin Meng
2022-12-08  9:37     ` Jiri Slaby [this message]
2022-12-08  9:37       ` Jiri Slaby
2022-12-08  9:37       ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=035f431c-15ee-b604-79be-ec2861b45b86@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=bmeng@tinylab.org \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.