All of lore.kernel.org
 help / color / mirror / Atom feed
From: liuj97@gmail.com (Jiang Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 6/7] arm64, jump label: optimize jump label implementation
Date: Tue, 07 Jan 2014 21:43:04 +0800	[thread overview]
Message-ID: <52CC0468.1070004@gmail.com> (raw)
In-Reply-To: <20140106185139.GK1096@mudshark.cambridge.arm.com>

On 01/07/2014 02:51 AM, Will Deacon wrote:
> On Sun, Dec 22, 2013 at 03:25:42PM +0000, Jiang Liu wrote:
>> Optimize jump label implementation for ARM64 by dynamically patching
>> kernel text.
> 
> Almost!
> 
>> diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
>> new file mode 100644
>> index 0000000..47cd130
>> --- /dev/null
>> +++ b/arch/arm64/include/asm/jump_label.h
>> @@ -0,0 +1,51 @@
>> +/*
>> + * Copyright (C) 2013 Huawei Ltd.
>> + * Author: Jiang Liu <liuj97@gmail.com>
>> + *
>> + * Based on arch/arm/include/asm/jump_label.h
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
>> + */
>> +#ifndef _ASM_JUMP_LABEL_H
>> +#define _ASM_JUMP_LABEL_H
> 
> It's actually prefixed with double-underscore in our other headers.
OK, will fix.

> 
>> +#include <linux/types.h>
>> +
>> +#ifdef __KERNEL__
>> +
>> +#define JUMP_LABEL_NOP_SIZE		4
> 
> I know you didn't like including asm/insn.h, but I don't see why that's such
> a problem. Does it cause a circular dependency or something?
Not a big deal, just saving some compilation times. Will change to
include asm/insn.h.

> 
> Will
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <liuj97@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Sandeepa Prabhu <sandeepa.prabhu@linaro.org>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	Mark Rutland <Mark.Rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 6/7] arm64, jump label: optimize jump label implementation
Date: Tue, 07 Jan 2014 21:43:04 +0800	[thread overview]
Message-ID: <52CC0468.1070004@gmail.com> (raw)
In-Reply-To: <20140106185139.GK1096@mudshark.cambridge.arm.com>

On 01/07/2014 02:51 AM, Will Deacon wrote:
> On Sun, Dec 22, 2013 at 03:25:42PM +0000, Jiang Liu wrote:
>> Optimize jump label implementation for ARM64 by dynamically patching
>> kernel text.
> 
> Almost!
> 
>> diff --git a/arch/arm64/include/asm/jump_label.h b/arch/arm64/include/asm/jump_label.h
>> new file mode 100644
>> index 0000000..47cd130
>> --- /dev/null
>> +++ b/arch/arm64/include/asm/jump_label.h
>> @@ -0,0 +1,51 @@
>> +/*
>> + * Copyright (C) 2013 Huawei Ltd.
>> + * Author: Jiang Liu <liuj97@gmail.com>
>> + *
>> + * Based on arch/arm/include/asm/jump_label.h
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
>> + */
>> +#ifndef _ASM_JUMP_LABEL_H
>> +#define _ASM_JUMP_LABEL_H
> 
> It's actually prefixed with double-underscore in our other headers.
OK, will fix.

> 
>> +#include <linux/types.h>
>> +
>> +#ifdef __KERNEL__
>> +
>> +#define JUMP_LABEL_NOP_SIZE		4
> 
> I know you didn't like including asm/insn.h, but I don't see why that's such
> a problem. Does it cause a circular dependency or something?
Not a big deal, just saving some compilation times. Will change to
include asm/insn.h.

> 
> Will
> 


  reply	other threads:[~2014-01-07 13:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-22 15:25 [PATCH v7 0/7] Optimize jump label implementation for ARM64 Jiang Liu
2013-12-22 15:25 ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 1/7] arm64: introduce basic aarch64 instruction decoding helpers Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 2/7] arm64: introduce interfaces to hotpatch kernel and module code Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2014-01-06 18:48   ` Will Deacon
2014-01-06 18:48     ` Will Deacon
2013-12-22 15:25 ` [PATCH v7 3/7] arm64: move encode_insn_immediate() from module.c to insn.c Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 4/7] arm64: introduce aarch64_insn_gen_{nop|branch_imm}() helper functions Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 5/7] arm64, jump label: detect %c support for ARM64 Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 6/7] arm64, jump label: optimize jump label implementation Jiang Liu
2013-12-22 15:25   ` Jiang Liu
2014-01-06 18:51   ` Will Deacon
2014-01-06 18:51     ` Will Deacon
2014-01-07 13:43     ` Jiang Liu [this message]
2014-01-07 13:43       ` Jiang Liu
2013-12-22 15:25 ` [PATCH v7 7/7] jump_label: use defined macros instead of hard-coding for better readability Jiang Liu
2013-12-22 15:25   ` Jiang Liu

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=52CC0468.1070004@gmail.com \
    --to=liuj97@gmail.com \
    --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 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.