From: Vivek Goyal <vgoyal@redhat.com>
To: Geoff Levand <geoff@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Eric Biederman <ebiederm@xmission.com>,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/5] kexec: Add bit definitions for kimage entry flags
Date: Mon, 25 Aug 2014 13:52:57 -0400 [thread overview]
Message-ID: <20140825175256.GF14379@redhat.com> (raw)
In-Reply-To: <b13fc1b6d923e7063746f34968bd2f1c4cb09002.1408731991.git.geoff@infradead.org>
On Fri, Aug 22, 2014 at 06:39:47PM +0000, Geoff Levand wrote:
> Define new kexec preprocessor macros IND_*_BIT that define the bit position of
> the kimage entry flags. Change the existing IND_* flag macros to be defined as
> bit shifts of the corresponding IND_*_BIT macros. Also wrap all C language code
> in kexec.h with #if !defined(__ASSEMBLY__) so assembly files can include kexec.h
> to get the IND_* and IND_*_BIT macros.
>
> Some CPU instruction sets have tests for bit position which are convenient in
> implementing routines that operate on the kimage entry list. The addition of
> these bit position macros in a common location will avoid duplicate definitions
> and the chance that changes to the IND_* flags will not be propagated to
> assembly files.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Vivek
> ---
> include/linux/kexec.h | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 4b2a0e1..8c628ca 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -1,6 +1,18 @@
> #ifndef LINUX_KEXEC_H
> #define LINUX_KEXEC_H
>
> +#define IND_DESTINATION_BIT 0
> +#define IND_INDIRECTION_BIT 1
> +#define IND_DONE_BIT 2
> +#define IND_SOURCE_BIT 3
> +
> +#define IND_DESTINATION (1 << IND_DESTINATION_BIT)
> +#define IND_INDIRECTION (1 << IND_INDIRECTION_BIT)
> +#define IND_DONE (1 << IND_DONE_BIT)
> +#define IND_SOURCE (1 << IND_SOURCE_BIT)
> +
> +#if !defined(__ASSEMBLY__)
> +
> #include <uapi/linux/kexec.h>
>
> #ifdef CONFIG_KEXEC
> @@ -64,10 +76,6 @@
> */
>
> typedef unsigned long kimage_entry_t;
> -#define IND_DESTINATION 0x1
> -#define IND_INDIRECTION 0x2
> -#define IND_DONE 0x4
> -#define IND_SOURCE 0x8
>
> struct kexec_segment {
> /*
> @@ -312,4 +320,7 @@ struct task_struct;
> static inline void crash_kexec(struct pt_regs *regs) { }
> static inline int kexec_should_crash(struct task_struct *p) { return 0; }
> #endif /* CONFIG_KEXEC */
> +
> +#endif /* !defined(__ASSEBMLY__) */
> +
> #endif /* LINUX_KEXEC_H */
> --
> 1.9.1
>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Geoff Levand <geoff@infradead.org>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Eric Biederman <ebiederm@xmission.com>,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/5] kexec: Add bit definitions for kimage entry flags
Date: Mon, 25 Aug 2014 13:52:57 -0400 [thread overview]
Message-ID: <20140825175256.GF14379@redhat.com> (raw)
In-Reply-To: <b13fc1b6d923e7063746f34968bd2f1c4cb09002.1408731991.git.geoff@infradead.org>
On Fri, Aug 22, 2014 at 06:39:47PM +0000, Geoff Levand wrote:
> Define new kexec preprocessor macros IND_*_BIT that define the bit position of
> the kimage entry flags. Change the existing IND_* flag macros to be defined as
> bit shifts of the corresponding IND_*_BIT macros. Also wrap all C language code
> in kexec.h with #if !defined(__ASSEMBLY__) so assembly files can include kexec.h
> to get the IND_* and IND_*_BIT macros.
>
> Some CPU instruction sets have tests for bit position which are convenient in
> implementing routines that operate on the kimage entry list. The addition of
> these bit position macros in a common location will avoid duplicate definitions
> and the chance that changes to the IND_* flags will not be propagated to
> assembly files.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Vivek
> ---
> include/linux/kexec.h | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 4b2a0e1..8c628ca 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -1,6 +1,18 @@
> #ifndef LINUX_KEXEC_H
> #define LINUX_KEXEC_H
>
> +#define IND_DESTINATION_BIT 0
> +#define IND_INDIRECTION_BIT 1
> +#define IND_DONE_BIT 2
> +#define IND_SOURCE_BIT 3
> +
> +#define IND_DESTINATION (1 << IND_DESTINATION_BIT)
> +#define IND_INDIRECTION (1 << IND_INDIRECTION_BIT)
> +#define IND_DONE (1 << IND_DONE_BIT)
> +#define IND_SOURCE (1 << IND_SOURCE_BIT)
> +
> +#if !defined(__ASSEMBLY__)
> +
> #include <uapi/linux/kexec.h>
>
> #ifdef CONFIG_KEXEC
> @@ -64,10 +76,6 @@
> */
>
> typedef unsigned long kimage_entry_t;
> -#define IND_DESTINATION 0x1
> -#define IND_INDIRECTION 0x2
> -#define IND_DONE 0x4
> -#define IND_SOURCE 0x8
>
> struct kexec_segment {
> /*
> @@ -312,4 +320,7 @@ struct task_struct;
> static inline void crash_kexec(struct pt_regs *regs) { }
> static inline int kexec_should_crash(struct task_struct *p) { return 0; }
> #endif /* CONFIG_KEXEC */
> +
> +#endif /* !defined(__ASSEBMLY__) */
> +
> #endif /* LINUX_KEXEC_H */
> --
> 1.9.1
>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Geoff Levand <geoff@infradead.org>
Cc: Eric Biederman <ebiederm@xmission.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andrew Morton <akpm@linux-foundation.org>,
kexec@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] kexec: Add bit definitions for kimage entry flags
Date: Mon, 25 Aug 2014 13:52:57 -0400 [thread overview]
Message-ID: <20140825175256.GF14379@redhat.com> (raw)
In-Reply-To: <b13fc1b6d923e7063746f34968bd2f1c4cb09002.1408731991.git.geoff@infradead.org>
On Fri, Aug 22, 2014 at 06:39:47PM +0000, Geoff Levand wrote:
> Define new kexec preprocessor macros IND_*_BIT that define the bit position of
> the kimage entry flags. Change the existing IND_* flag macros to be defined as
> bit shifts of the corresponding IND_*_BIT macros. Also wrap all C language code
> in kexec.h with #if !defined(__ASSEMBLY__) so assembly files can include kexec.h
> to get the IND_* and IND_*_BIT macros.
>
> Some CPU instruction sets have tests for bit position which are convenient in
> implementing routines that operate on the kimage entry list. The addition of
> these bit position macros in a common location will avoid duplicate definitions
> and the chance that changes to the IND_* flags will not be propagated to
> assembly files.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
Looks good to me.
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Vivek
> ---
> include/linux/kexec.h | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index 4b2a0e1..8c628ca 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -1,6 +1,18 @@
> #ifndef LINUX_KEXEC_H
> #define LINUX_KEXEC_H
>
> +#define IND_DESTINATION_BIT 0
> +#define IND_INDIRECTION_BIT 1
> +#define IND_DONE_BIT 2
> +#define IND_SOURCE_BIT 3
> +
> +#define IND_DESTINATION (1 << IND_DESTINATION_BIT)
> +#define IND_INDIRECTION (1 << IND_INDIRECTION_BIT)
> +#define IND_DONE (1 << IND_DONE_BIT)
> +#define IND_SOURCE (1 << IND_SOURCE_BIT)
> +
> +#if !defined(__ASSEMBLY__)
> +
> #include <uapi/linux/kexec.h>
>
> #ifdef CONFIG_KEXEC
> @@ -64,10 +76,6 @@
> */
>
> typedef unsigned long kimage_entry_t;
> -#define IND_DESTINATION 0x1
> -#define IND_INDIRECTION 0x2
> -#define IND_DONE 0x4
> -#define IND_SOURCE 0x8
>
> struct kexec_segment {
> /*
> @@ -312,4 +320,7 @@ struct task_struct;
> static inline void crash_kexec(struct pt_regs *regs) { }
> static inline int kexec_should_crash(struct task_struct *p) { return 0; }
> #endif /* CONFIG_KEXEC */
> +
> +#endif /* !defined(__ASSEBMLY__) */
> +
> #endif /* LINUX_KEXEC_H */
> --
> 1.9.1
>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-08-25 17:53 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 18:39 [PATCH 0/5] kexec: minor fixups and enhancements Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` [PATCH 4/5] kexec: Add IND_FLAGS macro Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-25 17:54 ` Vivek Goyal
2014-08-25 17:54 ` Vivek Goyal
2014-08-25 17:54 ` Vivek Goyal
2014-08-22 18:39 ` [PATCH 1/5] kexec: Fix make headers_check Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-25 17:22 ` Vivek Goyal
2014-08-25 17:22 ` Vivek Goyal
2014-08-25 17:22 ` Vivek Goyal
2014-08-30 12:47 ` Paul Bolle
2014-08-30 12:47 ` Paul Bolle
2014-08-30 12:47 ` Paul Bolle
2014-10-06 14:12 ` Paul Bolle
2014-10-06 14:12 ` Paul Bolle
2014-10-06 14:12 ` Paul Bolle
2014-10-06 17:34 ` Geoff Levand
2014-10-06 17:34 ` Geoff Levand
2014-10-06 17:34 ` Geoff Levand
2014-10-06 18:21 ` Paul Bolle
2014-10-06 18:21 ` Paul Bolle
2014-10-06 18:21 ` Paul Bolle
2014-10-06 19:28 ` Geoff Levand
2014-10-06 19:28 ` Geoff Levand
2014-10-06 19:28 ` Geoff Levand
2014-10-06 17:44 ` H. Peter Anvin
2014-10-06 17:44 ` H. Peter Anvin
2014-10-06 17:44 ` H. Peter Anvin
2014-08-22 18:39 ` [PATCH 5/5] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` [PATCH 2/5] kexec: Simplify conditional Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-25 17:42 ` Vivek Goyal
2014-08-25 17:42 ` Vivek Goyal
2014-08-25 17:42 ` Vivek Goyal
2014-08-22 18:39 ` [PATCH 3/5] kexec: Add bit definitions for kimage entry flags Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-22 18:39 ` Geoff Levand
2014-08-25 17:52 ` Vivek Goyal [this message]
2014-08-25 17:52 ` Vivek Goyal
2014-08-25 17:52 ` Vivek Goyal
2014-08-25 16:59 ` [PATCH 0/5] kexec: minor fixups and enhancements Vivek Goyal
2014-08-25 16:59 ` Vivek Goyal
2014-08-25 16:59 ` Vivek Goyal
2014-08-26 7:41 ` Dave Young
2014-08-26 7:41 ` Dave Young
2014-08-26 7:41 ` Dave Young
2014-08-27 0:33 ` Geoff Levand
2014-08-27 0:33 ` Geoff Levand
2014-08-27 0:33 ` Geoff Levand
2014-08-27 0:42 ` Vivek Goyal
2014-08-27 0:42 ` Vivek Goyal
2014-08-27 0:42 ` Vivek Goyal
2014-10-07 0:21 ` [PATCH V2 0/5] kexec: Minor " Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` [PATCH V22/5] kexec: Simplify conditional Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` [PATCH V24/5] kexec: Add IND_FLAGS macro Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 20:26 ` [PATCH V3 4/5] " Geoff Levand
2014-10-07 20:26 ` Geoff Levand
2014-10-07 20:26 ` Geoff Levand
2014-10-07 0:21 ` [PATCH V21/5] kexec: Fix make headers_check Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` [PATCH V25/5] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 17:52 ` Vivek Goyal
2014-10-07 17:52 ` Vivek Goyal
2014-10-07 17:52 ` Vivek Goyal
2014-11-12 19:29 ` [PATCH V3] kexec: Add " Geoff Levand
2014-11-12 19:29 ` Geoff Levand
2014-11-12 19:29 ` Geoff Levand
2014-11-12 23:06 ` Benjamin Herrenschmidt
2014-11-12 23:06 ` Benjamin Herrenschmidt
2014-11-12 23:06 ` Benjamin Herrenschmidt
2014-10-07 0:21 ` [PATCH V23/5] kexec: Add bit definitions for kimage entry flags Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-10-07 0:21 ` Geoff Levand
2014-11-13 0:19 ` [PATCH V3 0/4] kexec: minor fixups and enhancements Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` [PATCH V3 3/4] kexec: Add bit definitions for kimage entry flags Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` [PATCH V3 4/4] kexec: Add IND_FLAGS macro Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` [PATCH V3 1/4] kexec: Fix make headers_check Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` [PATCH V3 2/4] kexec: Simplify conditional Geoff Levand
2014-11-13 0:19 ` Geoff Levand
2014-11-13 0:19 ` Geoff Levand
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=20140825175256.GF14379@redhat.com \
--to=vgoyal@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=ebiederm@xmission.com \
--cc=geoff@infradead.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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.