All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Daney <ddaney@caviumnetworks.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: Implement __read_mostly
Date: Wed, 20 Oct 2010 20:05:34 +0100	[thread overview]
Message-ID: <20101020190534.GB32087@linux-mips.org> (raw)
In-Reply-To: <AANLkTikdRQSsLxPFtY+cav24wEkSVEQ9vCtrMEvvM3CV@mail.gmail.com>

On Sat, Oct 16, 2010 at 10:04:59AM +0200, Geert Uytterhoeven wrote:

> > -const unsigned long mips_io_port_base __read_mostly = -1;
> > +const unsigned long mips_io_port_base = -1;
> >  EXPORT_SYMBOL(mips_io_port_base);
> 
> Ugh. So as soon as someone implements MMU protection for the read-only data
> section, it'll break silently?

That's not the only failure mode.  A const might be replicated by a compiler
for example into multiple small data sections or by loading the rodata
into multiple NUMA nodes.  The later hits IP27 but that one got potencially
many PCI busses anyway, so mips_io_port_base was always problematic.  From
the time I put this optimization hack in it was clear that I was gaming
GCC and sooner or later it was going to blow up.  It's held for like a
decade so I got my money's worth :)

  Ralf

  parent reply	other threads:[~2010-10-20 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 19:36 [PATCH] MIPS: Implement __read_mostly David Daney
2010-10-15 11:25 ` Gleb O. Raiko
2010-10-15 19:04   ` David Daney
2010-10-16  8:04 ` Geert Uytterhoeven
2010-10-16  8:05   ` Geert Uytterhoeven
2010-10-20 19:05   ` Ralf Baechle [this message]
2010-10-21  8:07     ` Geert Uytterhoeven
2011-01-17 23:55 ` Ralf Baechle

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=20101020190534.GB32087@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-mips@linux-mips.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.