linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: early_printk: use printascii() rather than printch()
Date: Thu, 2 Nov 2017 17:10:19 +0000	[thread overview]
Message-ID: <20171102171018.GH9463@n2100.armlinux.org.uk> (raw)
In-Reply-To: <SG2PR06MB116509D159F4E79D5A788DCE8A5C0@SG2PR06MB1165.apcprd06.prod.outlook.com>

On Thu, Nov 02, 2017 at 04:38:11PM +0000, Chris Brandt wrote:
> On Thursday, November 02, 2017 1, Nicolas Pitre wrote:
> > OK.. I wanted to get to the bottom of this. The gas documentation says:
> > 
> > |9.4.2.1 Instruction Set Syntax
> > |..............................
> > |
> > |Two slightly different syntaxes are supported for ARM and THUMB
> > |instructions.  The default, `divided', uses the old style where ARM and
> > |THUMB instructions had their own, separate syntaxes.  The new,
> > |`unified' syntax, which can be selected via the `.syntax' directive,
> > |and has the following main features:
> > |
> > |   * Immediate operands do not require a `#' prefix.
> 
> Well there you go!
> 
> We all have "gratuitously broken binutils"
> 
> ;)

Yes!

What reason could there be to drop the well established norm of
prefixing constants with "#" in ARM assembly, other than maybe
political pressure?

As I've already pointed out, we can see that this causes problems,
and what it means is that people now must test their changes with
Thumb2 support disabled in the kernel for there to be any valid
testing of assembly.  That basically means I can't trust anyone
elses testing of patches that contain assembly, because I don't
know what configuration they've tested.

This is very bad, and it's going to make it slower to get such
patches into the kernel.

That's an unintended side effect of what was probably thought to be
a trivial decision by the ARM ISA team, but it unfortunately has
wider effects than they could have imagined.

There is another solution to this: I augment the patch system with an
ARM assembly parser that detects this before it gets accepted,
rejecting patches that omit the # for constants.  However, that is
incomplete, because we now live in a world where ARM assembly gets
added to the kernel via many different git trees.

Basically, this change in the ARM syntax should never have been made.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

  reply	other threads:[~2017-11-02 17:10 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02  2:06 [PATCH 0/3] a few debug_ll fixes and improvements Nicolas Pitre
2017-10-02  2:06 ` [PATCH 1/3] ARM: debug.S: move hexbuf to a writable section Nicolas Pitre
2017-10-02  2:06 ` [PATCH 2/3] ARM: semihosting: use proper instruction on v7m processors Nicolas Pitre
2017-10-02  2:06 ` [PATCH 3/3] ARM: early_printk: use printascii() rather than printch() Nicolas Pitre
2017-10-02  5:20   ` Uwe Kleine-König
2017-10-02 14:09     ` Nicolas Pitre
2017-10-31 11:28   ` Chris Brandt
2017-10-31 16:22     ` Nicolas Pitre
2017-10-31 16:38       ` Robin Murphy
2017-10-31 17:06         ` Nicolas Pitre
2017-10-31 17:16           ` Russell King - ARM Linux
2017-10-31 17:48             ` Nicolas Pitre
2017-10-31 17:53               ` Russell King - ARM Linux
2017-10-31 18:15                 ` Nicolas Pitre
2017-10-31 18:20                   ` Russell King - ARM Linux
2017-10-31 18:35                     ` Nicolas Pitre
2017-10-31 19:12                       ` Chris Brandt
2017-10-31 19:28                         ` Nicolas Pitre
2017-10-31 21:50                           ` Russell King - ARM Linux
2017-10-31 23:35                             ` Nicolas Pitre
2017-10-31 23:50                               ` Russell King - ARM Linux
2017-11-02  0:09                         ` Russell King - ARM Linux
2017-11-02  3:59                           ` Nicolas Pitre
2017-11-02  4:16                             ` Nicolas Pitre
2017-11-02 11:09                               ` Russell King - ARM Linux
2017-11-02 15:12                                 ` Nicolas Pitre
2017-11-02 11:06                             ` Chris Brandt
2017-11-02 11:20                               ` Russell King - ARM Linux
2017-11-02 11:28                                 ` Chris Brandt
2017-11-02 13:04                                   ` Russell King - ARM Linux
2017-11-02 15:04                                   ` Nicolas Pitre
2017-11-02 15:18                                     ` Robin Murphy
2017-11-02 15:22                                       ` Russell King - ARM Linux
2017-11-02 15:25                                       ` Chris Brandt
2017-11-02 15:23                                     ` Chris Brandt
2017-11-02 15:35                                       ` Nicolas Pitre
2017-11-02 16:06                                         ` Nicolas Pitre
2017-11-02 16:38                                           ` Chris Brandt
2017-11-02 17:10                                             ` Russell King - ARM Linux [this message]
2017-11-02 17:20                                               ` Nicolas Pitre
2017-11-02 17:28                                               ` Chris Brandt
2017-11-02 18:29                                               ` Robin Murphy
2017-11-02 21:46                                                 ` syntax unified, was " Nicolas Pitre
2017-11-02 15:48                                       ` Russell King - ARM Linux
2017-11-02 16:30                                         ` Chris Brandt

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=20171102171018.GH9463@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).