linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] powerpc/kexec: Use global IND_FLAGS macro
  2013-12-12  0:18 [PATCH 0/4] Minor fixes and improvements for kexec Geoff Levand
@ 2013-12-12  0:18 ` Geoff Levand
  2013-12-12  0:18 ` [PATCH 2/4] kexec: Add " Geoff Levand
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Geoff Levand @ 2013-12-12  0:18 UTC (permalink / raw)
  To: Eric Biederman; +Cc: kexec, linuxppc-dev, Paul Mackerras

linux/kexec.h now defines an IND_FLAGS macro.  Remove the local powerpc
definition and use the generic one.

Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
 arch/powerpc/kernel/machine_kexec_64.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index be4e6d6..1fab1f0 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -96,8 +96,6 @@ int default_machine_kexec_prepare(struct kimage *image)
 	return 0;
 }
 
-#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE)
-
 static void copy_segments(unsigned long ind)
 {
 	unsigned long entry;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 0/4] Minor fixes and improvements for kexec
@ 2013-12-12  0:18 Geoff Levand
  2013-12-12  0:18 ` [PATCH 3/4] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Geoff Levand @ 2013-12-12  0:18 UTC (permalink / raw)
  To: Eric Biederman; +Cc: linux-sh, kexec, Paul Mundt, Paul Mackerras, linuxppc-dev

Hi Eric,

Here are a few minor fixes and improvements for kexec.  Please consider.

-Geoff

The following changes since commit 374b105797c3d4f29c685f3be535c35f5689b30e:

  Linux 3.13-rc3 (2013-12-06 09:34:04 -0800)

are available in the git repository at:

  git://git.linaro.org/people/geoff.levand/linux-kexec.git for-kexec

for you to fetch changes up to 594a3d26aac66e9668edc81d7bfb4e801575514f:

  sh/kexec: Fix kexec build warning (2013-12-11 16:03:27 -0800)

----------------------------------------------------------------
Geoff Levand (4):
      kexec: Simplify conditional
      kexec: Add IND_FLAGS macro
      powerpc/kexec: Use global IND_FLAGS macro
      sh/kexec: Fix kexec build warning

 arch/powerpc/kernel/machine_kexec_64.c |  2 --
 arch/sh/kernel/machine_kexec.c         |  2 +-
 include/linux/kexec.h                  |  1 +
 kernel/kexec.c                         | 17 ++++++++++-------
 4 files changed, 12 insertions(+), 10 deletions(-)

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/4] kexec: Add IND_FLAGS macro
  2013-12-12  0:18 [PATCH 0/4] Minor fixes and improvements for kexec Geoff Levand
  2013-12-12  0:18 ` [PATCH 3/4] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
@ 2013-12-12  0:18 ` Geoff Levand
  2013-12-12  1:35   ` Zhang Yanfei
  2013-12-12  5:11 ` [PATCH 0/4] Minor fixes and improvements for kexec Simon Horman
  2013-12-17  5:37 ` WANG Chao
  3 siblings, 1 reply; 7+ messages in thread
From: Geoff Levand @ 2013-12-12  0:18 UTC (permalink / raw)
  To: Eric Biederman; +Cc: kexec, linuxppc-dev, Paul Mackerras

Add a new kexec preprocessor macro IND_FLAGS, which is the bitwise OR of
all the possible kexec IND_ kimage_entry indirection flags.

Having this macro allows for simplified code in the prosessing of the
kexec kimage_entry items.

Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
---
 include/linux/kexec.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index d78d28a..f755ec3 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -67,6 +67,7 @@ typedef unsigned long kimage_entry_t;
 #define IND_INDIRECTION  0x2
 #define IND_DONE         0x4
 #define IND_SOURCE       0x8
+#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE)
 
 struct kexec_segment {
 	void __user *buf;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] kexec: Add IND_FLAGS macro
  2013-12-12  0:18 ` [PATCH 2/4] kexec: Add " Geoff Levand
@ 2013-12-12  1:35   ` Zhang Yanfei
  2013-12-12 19:33     ` Geoff Levand
  0 siblings, 1 reply; 7+ messages in thread
From: Zhang Yanfei @ 2013-12-12  1:35 UTC (permalink / raw)
  To: Geoff Levand; +Cc: linuxppc-dev, kexec, Eric Biederman, Paul Mackerras

Hello

On 12/12/2013 08:18 AM, Geoff Levand wrote:
> Add a new kexec preprocessor macro IND_FLAGS, which is the bitwise OR of
> all the possible kexec IND_ kimage_entry indirection flags.
> 
> Having this macro allows for simplified code in the prosessing of the
> kexec kimage_entry items.

Where? I didn't see any place you use this macro to help simplification.

Thanks
Zhang

> 
> Signed-off-by: Geoff Levand <geoff@infradead.org> for Huawei, Linaro
> ---
>  include/linux/kexec.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
> index d78d28a..f755ec3 100644
> --- a/include/linux/kexec.h
> +++ b/include/linux/kexec.h
> @@ -67,6 +67,7 @@ typedef unsigned long kimage_entry_t;
>  #define IND_INDIRECTION  0x2
>  #define IND_DONE         0x4
>  #define IND_SOURCE       0x8
> +#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE)
>  
>  struct kexec_segment {
>  	void __user *buf;
> 


-- 
Thanks.
Zhang Yanfei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] Minor fixes and improvements for kexec
  2013-12-12  0:18 [PATCH 0/4] Minor fixes and improvements for kexec Geoff Levand
  2013-12-12  0:18 ` [PATCH 3/4] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
  2013-12-12  0:18 ` [PATCH 2/4] kexec: Add " Geoff Levand
@ 2013-12-12  5:11 ` Simon Horman
  2013-12-17  5:37 ` WANG Chao
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2013-12-12  5:11 UTC (permalink / raw)
  To: Geoff Levand
  Cc: linux-sh, kexec, Paul Mundt, Paul Mackerras, Eric Biederman,
	linuxppc-dev

On Thu, Dec 12, 2013 at 12:18:56AM +0000, Geoff Levand wrote:
> Hi Eric,
> 
> Here are a few minor fixes and improvements for kexec.  Please consider.

FWIW,

Reviewed-by: Simon Horman <horms@verge.net.au>

> 
> -Geoff
> 
> The following changes since commit 374b105797c3d4f29c685f3be535c35f5689b30e:
> 
>   Linux 3.13-rc3 (2013-12-06 09:34:04 -0800)
> 
> are available in the git repository at:
> 
>   git://git.linaro.org/people/geoff.levand/linux-kexec.git for-kexec
> 
> for you to fetch changes up to 594a3d26aac66e9668edc81d7bfb4e801575514f:
> 
>   sh/kexec: Fix kexec build warning (2013-12-11 16:03:27 -0800)
> 
> ----------------------------------------------------------------
> Geoff Levand (4):
>       kexec: Simplify conditional
>       kexec: Add IND_FLAGS macro
>       powerpc/kexec: Use global IND_FLAGS macro
>       sh/kexec: Fix kexec build warning
> 
>  arch/powerpc/kernel/machine_kexec_64.c |  2 --
>  arch/sh/kernel/machine_kexec.c         |  2 +-
>  include/linux/kexec.h                  |  1 +
>  kernel/kexec.c                         | 17 ++++++++++-------
>  4 files changed, 12 insertions(+), 10 deletions(-)
> 
> -- 
> 1.8.1.2
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] kexec: Add IND_FLAGS macro
  2013-12-12  1:35   ` Zhang Yanfei
@ 2013-12-12 19:33     ` Geoff Levand
  0 siblings, 0 replies; 7+ messages in thread
From: Geoff Levand @ 2013-12-12 19:33 UTC (permalink / raw)
  To: Zhang Yanfei; +Cc: linuxppc-dev, kexec, Eric Biederman, Paul Mackerras

Hi Zhang,

On Thu, 2013-12-12 at 09:35 +0800, Zhang Yanfei wrote:
> On 12/12/2013 08:18 AM, Geoff Levand wrote:
> > Add a new kexec preprocessor macro IND_FLAGS, which is the bitwise OR of
> > all the possible kexec IND_ kimage_entry indirection flags.
> > 
> > Having this macro allows for simplified code in the prosessing of the
> > kexec kimage_entry items.
> 
> Where? I didn't see any place you use this macro to help simplification.

As in powerpc, it allows constructions like this:

  switch (entry & IND_FLAGS) {
  case IND_DESTINATION:
  ...
  case IND_INDIRECTION:
  ...
  }

-Geoff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] Minor fixes and improvements for kexec
  2013-12-12  0:18 [PATCH 0/4] Minor fixes and improvements for kexec Geoff Levand
                   ` (2 preceding siblings ...)
  2013-12-12  5:11 ` [PATCH 0/4] Minor fixes and improvements for kexec Simon Horman
@ 2013-12-17  5:37 ` WANG Chao
  3 siblings, 0 replies; 7+ messages in thread
From: WANG Chao @ 2013-12-17  5:37 UTC (permalink / raw)
  To: Geoff Levand
  Cc: linux-sh, kexec, Paul Mundt, Paul Mackerras, Eric Biederman,
	linuxppc-dev

On 12/12/13 at 12:18am, Geoff Levand wrote:
> Hi Eric,
> 
> Here are a few minor fixes and improvements for kexec.  Please consider.
> 
> -Geoff
> 
> The following changes since commit 374b105797c3d4f29c685f3be535c35f5689b30e:
> 
>   Linux 3.13-rc3 (2013-12-06 09:34:04 -0800)
> 
> are available in the git repository at:
> 
>   git://git.linaro.org/people/geoff.levand/linux-kexec.git for-kexec
> 
> for you to fetch changes up to 594a3d26aac66e9668edc81d7bfb4e801575514f:
> 
>   sh/kexec: Fix kexec build warning (2013-12-11 16:03:27 -0800)
> 
> ----------------------------------------------------------------
> Geoff Levand (4):
>       kexec: Simplify conditional
>       kexec: Add IND_FLAGS macro
>       powerpc/kexec: Use global IND_FLAGS macro
>       sh/kexec: Fix kexec build warning

For this series (besides 4/4 v2):

Acked-by: WANG Chao <chaowang@redhat.com>

> 
>  arch/powerpc/kernel/machine_kexec_64.c |  2 --
>  arch/sh/kernel/machine_kexec.c         |  2 +-
>  include/linux/kexec.h                  |  1 +
>  kernel/kexec.c                         | 17 ++++++++++-------
>  4 files changed, 12 insertions(+), 10 deletions(-)
> 
> -- 
> 1.8.1.2
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-17  5:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12  0:18 [PATCH 0/4] Minor fixes and improvements for kexec Geoff Levand
2013-12-12  0:18 ` [PATCH 3/4] powerpc/kexec: Use global IND_FLAGS macro Geoff Levand
2013-12-12  0:18 ` [PATCH 2/4] kexec: Add " Geoff Levand
2013-12-12  1:35   ` Zhang Yanfei
2013-12-12 19:33     ` Geoff Levand
2013-12-12  5:11 ` [PATCH 0/4] Minor fixes and improvements for kexec Simon Horman
2013-12-17  5:37 ` WANG Chao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).