mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jason Baron <jbaron@akamai.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Joe Perches <joe@perches.com>
Subject: Re: [PATCH v3] jump_label: reduce the size of struct static_key
Date: Wed, 1 Feb 2017 13:51:03 -0500	[thread overview]
Message-ID: <20170201135103.6b9da1a7@gandalf.local.home> (raw)
In-Reply-To: <1485900043-23183-1-git-send-email-jbaron@akamai.com>

On Tue, 31 Jan 2017 17:00:43 -0500
Jason Baron <jbaron@akamai.com> wrote:

> --- a/kernel/jump_label.c
> +++ b/kernel/jump_label.c
> @@ -236,12 +236,27 @@ void __weak __init_or_module arch_jump_label_transform_static(struct jump_entry
>  
>  static inline struct jump_entry *static_key_entries(struct static_key *key)
>  {
> -	return (struct jump_entry *)((unsigned long)key->entries & ~JUMP_TYPE_MASK);

I wonder if we should add:

	WARN_ON_ONCE(key->type & JUMP_TYPE_LINKED);

> +	return (struct jump_entry *)(key->type & ~JUMP_TYPE_MASK);
>  }
>  

[...]

>  
> +static inline struct static_key_mod *static_key_mod(struct static_key *key)
> +{

	WARN_ON_ONCE(!(key->type & JUMP_TYPE_LINKED));

> +	return (struct static_key_mod *)(key->type & ~JUMP_TYPE_MASK);
> +}
> +

-- Steve

  parent reply	other threads:[~2017-02-01 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 22:00 Jason Baron
2017-02-01  0:32 ` Steven Rostedt
2017-02-01 18:06   ` Jason Baron
2017-02-01 18:51 ` Steven Rostedt [this message]
2017-02-03 20:42   ` [PATCH v4] " Jason Baron

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=20170201135103.6b9da1a7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jbaron@akamai.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@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

all inboxes | Powered by JetHome®