All of lore.kernel.org
 help / color / mirror / Atom feed
From: "astian" <astian@memeware.net>
To: "Alejandro Colomar" <alx@kernel.org>
Cc: "linux-man" <linux-man@vger.kernel.org>
Subject: outb(2): terminology correction
Date: Mon, 31 Aug 2026 09:09:46 +0000	[thread overview]
Message-ID: <DL30FONT5B6G.1ETPJ04T023RU@memeware.net> (raw)

outb(2) says:

  You must compile with -O or -O2 or similar.  The functions are defined
  as inline macros, and will not be substituted in without optimization
  enabled, causing unresolved references at link time.

"inline macros [...] not substituted in without optimization" doesn't
make any sense.  C pre-processor macros cannot be inline or not inline.
Indeed these are inline *functions* (at least in this system) with
embedded assembly apparently referencing parameters (which, I surmise,
is why the functions need to be inlined by the compiler or the assembly
will not work).

From /usr/include/x86_64-linux-gnu/sys/io.h (glibc 2.43):

  [...]
  #if defined __GNUC__ && __GNUC__ >= 2

  static __inline unsigned char
  inb (unsigned short int __port)
  {
    unsigned char _v;

    __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port));
    return _v;
  }

  [...]

  static __inline void
  outb (unsigned char __value, unsigned short int __port)
  {
    __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port));
  }

  [...]

So I would say just s/inline macros/inline functions/g.

             reply	other threads:[~2026-08-31  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  9:09 astian [this message]
2026-09-11 11:36 ` outb(2): terminology correction Alejandro Colomar
2026-09-11 11:43   ` Alejandro Colomar
2026-09-11 12:20   ` Arnd Bergmann
2026-09-11 12:54     ` [PATCH v1] man/man2/outb.2: Remove obsolete note about optimizations Alejandro Colomar
2026-09-12 21:58     ` outb(2): terminology correction astian
2026-09-12 22:09       ` Alejandro Colomar

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=DL30FONT5B6G.1ETPJ04T023RU@memeware.net \
    --to=astian@memeware.net \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.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.