mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel: mark all struct k_clock instances const
Date: Tue, 23 May 2017 09:01:14 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1705230900150.2740@nanos> (raw)
In-Reply-To: <20170523044851.GA15761@lst.de>

On Tue, 23 May 2017, Christoph Hellwig wrote:
> On Tue, May 23, 2017 at 12:17:31AM +0200, Thomas Gleixner wrote:
> > On Mon, 15 May 2017, Christoph Hellwig wrote:
> > 
> > > And keep a pointer to it instead of a copy in the posix_clocks array.
> > > 
> > > Based on similar changes in the Grsecurity patchset, but redone from
> > > scratch including a few tweaks.
> > 
> > Hmm, that adds another level of indirection, but yes, we can do it.
> > 
> > > diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
> > > index 0e7fcb04f01e..e501403dd860 100644
> > > --- a/drivers/char/mmtimer.c
> > > +++ b/drivers/char/mmtimer.c
> > > @@ -53,7 +53,7 @@ MODULE_LICENSE("GPL");
> > >  
> > >  #define RTC_BITS 55 /* 55 bits for this implementation */
> > >  
> > > -static struct k_clock sgi_clock;
> > > +static const struct k_clock sgi_clock;
> > 
> > Bah. This mmtimer which is used by 3 people in the world requires that we
> > keep the register_clock() function around after init and even export it.
> 
> We can require the driver to be built into the kernel, which seems pretty
> reasonable for a timer.  It's only selectable on IA64 anyway.

That still requires that we "register" the clock as it's SN2 specific and
we don't want to end up with a non initialized clock ....

Thanks,

	tglx

  reply	other threads:[~2017-05-23  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 20:32 Christoph Hellwig
2017-05-22 22:17 ` Thomas Gleixner
2017-05-23  4:48   ` Christoph Hellwig
2017-05-23  7:01     ` Thomas Gleixner [this message]
2017-05-23  7:04       ` Christoph Hellwig

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=alpine.DEB.2.20.1705230900150.2740@nanos \
    --to=tglx@linutronix.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®