Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1182610 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2015-07-13 11:00 +0200 |
| Last post | 2015-07-14 11:20 +0200 |
| Articles | 8 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Geert Uytterhoeven <geert@linux-m68k.org> - 2015-07-13 11:00 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Dave Young <dyoung@redhat.com> - 2015-07-14 10:50 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Geert Uytterhoeven <geert@linux-m68k.org> - 2015-07-14 11:00 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Geert Uytterhoeven <geert@linux-m68k.org> - 2015-07-14 11:20 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Dave Young <dyoung@redhat.com> - 2015-07-14 11:30 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Geert Uytterhoeven <geert@linux-m68k.org> - 2015-07-14 11:50 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Dave Young <dyoung@redhat.com> - 2015-07-15 03:40 +0200
Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code Dave Young <dyoung@redhat.com> - 2015-07-14 11:20 +0200
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-07-13 11:00 +0200 |
| Subject | Re: [PATCH 2/3] [PATCH 2/3] kexec: split kexec_load syscall from kexec core code |
| Message-ID | <pLHKH-2Sb-13@gated-at.bofh.it> |
On Mon, Jul 13, 2015 at 4:13 AM, <dyoung@redhat.com> wrote:
> Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
> architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
> KEXEC_CORE in arch Kconfig. Also updated general kernel code with
> to kexec_load syscall.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> arch/arm/Kconfig | 4 +
> arch/ia64/Kconfig | 4 +
> arch/m68k/Kconfig | 4 +
> arch/mips/Kconfig | 4 +
> arch/powerpc/Kconfig | 4 +
> arch/sh/Kconfig | 4 +
> arch/tile/Kconfig | 4 +
> arch/x86/Kconfig | 6 +-
> arch/x86/boot/header.S | 2 +-
> arch/x86/include/asm/kdebug.h | 2 +-
> arch/x86/kernel/Makefile | 4 +-
> arch/x86/kernel/kvmclock.c | 4 +-
> arch/x86/kernel/reboot.c | 4 +-
> arch/x86/kernel/setup.c | 2 +-
> arch/x86/kernel/vmlinux.lds.S | 2 +-
> arch/x86/kvm/vmx.c | 8 +-
> arch/x86/platform/efi/efi.c | 4 +-
> arch/x86/platform/uv/uv_nmi.c | 6 +-
> drivers/firmware/efi/Kconfig | 2 +-
> drivers/pci/pci-driver.c | 2 +-
> include/linux/kexec.h | 12 +-
> init/initramfs.c | 4 +-
> kernel/Makefile | 1 +
> kernel/events/core.c | 2 +-
> kernel/kexec.c | 1578 +---------------------------------------
> kernel/kexec_core.c | 1594 +++++++++++++++++++++++++++++++++++++++++
> kernel/ksysfs.c | 6 +-
> kernel/printk/printk.c | 2 +-
> kernel/reboot.c | 2 +-
> kernel/sysctl.c | 2 +-
> 30 files changed, 1668 insertions(+), 1611 deletions(-)
> create mode 100644 kernel/kexec_core.c
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 1c50210..20c48b3 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
> be linked for and stored to. This address is dependent on your
> own flash usage.
>
> +config KEXEC_CORE
> + bool
> +
> config KEXEC
> bool "Kexec system call (EXPERIMENTAL)"
> depends on (!SMP || PM_SLEEP_SMP)
> depends on !CPU_V7M
> + select KEXEC_CORE
> help
> kexec is a system call that implements the ability to shutdown your
> current kernel, and to start another kernel. It is like a reboot
As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
and let arch/*/Kconfig select that if the architecture has kexec support.
Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
without the need to duplicate it.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Date | 2015-07-14 10:50 +0200 |
| Message-ID | <pM44y-8nD-7@gated-at.bofh.it> |
| In reply to | #1182610 |
Hi, Geert Sorry for reply late, I'm occupied by other things. On 07/13/15 at 10:55am, Geert Uytterhoeven wrote: > On Mon, Jul 13, 2015 at 4:13 AM, <dyoung@redhat.com> wrote: > > Because there's general code need CONFIG_KEXEC_CORE, so I updated all the > > architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects > > KEXEC_CORE in arch Kconfig. Also updated general kernel code with > > to kexec_load syscall. > > > > Signed-off-by: Dave Young <dyoung@redhat.com> > > --- > > arch/arm/Kconfig | 4 + > > arch/ia64/Kconfig | 4 + > > arch/m68k/Kconfig | 4 + > > arch/mips/Kconfig | 4 + > > arch/powerpc/Kconfig | 4 + > > arch/sh/Kconfig | 4 + > > arch/tile/Kconfig | 4 + > > arch/x86/Kconfig | 6 +- > > arch/x86/boot/header.S | 2 +- > > arch/x86/include/asm/kdebug.h | 2 +- > > arch/x86/kernel/Makefile | 4 +- > > arch/x86/kernel/kvmclock.c | 4 +- > > arch/x86/kernel/reboot.c | 4 +- > > arch/x86/kernel/setup.c | 2 +- > > arch/x86/kernel/vmlinux.lds.S | 2 +- > > arch/x86/kvm/vmx.c | 8 +- > > arch/x86/platform/efi/efi.c | 4 +- > > arch/x86/platform/uv/uv_nmi.c | 6 +- > > drivers/firmware/efi/Kconfig | 2 +- > > drivers/pci/pci-driver.c | 2 +- > > include/linux/kexec.h | 12 +- > > init/initramfs.c | 4 +- > > kernel/Makefile | 1 + > > kernel/events/core.c | 2 +- > > kernel/kexec.c | 1578 +--------------------------------------- > > kernel/kexec_core.c | 1594 +++++++++++++++++++++++++++++++++++++++++ > > kernel/ksysfs.c | 6 +- > > kernel/printk/printk.c | 2 +- > > kernel/reboot.c | 2 +- > > kernel/sysctl.c | 2 +- > > 30 files changed, 1668 insertions(+), 1611 deletions(-) > > create mode 100644 kernel/kexec_core.c > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > index 1c50210..20c48b3 100644 > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR > > be linked for and stored to. This address is dependent on your > > own flash usage. > > > > +config KEXEC_CORE > > + bool > > + > > config KEXEC > > bool "Kexec system call (EXPERIMENTAL)" > > depends on (!SMP || PM_SLEEP_SMP) > > depends on !CPU_V7M > > + select KEXEC_CORE > > help > > kexec is a system call that implements the ability to shutdown your > > current kernel, and to start another kernel. It is like a reboot > > As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's > time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file), > and let arch/*/Kconfig select that if the architecture has kexec support. > > Then KEXEC and KEXEC_CORE can live in the common Kconfig file, > without the need to duplicate it. I'm not sure I understand your idea well, do you means like in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE? How about simply move below chunk to arch/Kconfig instead of introducing another ARCH_HAS_KEXEC: config KEXEC_CORE bool BTW, I found I missed one arch that is s390, I need update the patches and resend. Thanks Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-07-14 11:00 +0200 |
| Message-ID | <pM4ee-8r4-17@gated-at.bofh.it> |
| In reply to | #1183466 |
Hi Dave,
On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote:
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> > index 1c50210..20c48b3 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
>> > be linked for and stored to. This address is dependent on your
>> > own flash usage.
>> >
>> > +config KEXEC_CORE
>> > + bool
>> > +
>> > config KEXEC
>> > bool "Kexec system call (EXPERIMENTAL)"
>> > depends on (!SMP || PM_SLEEP_SMP)
>> > depends on !CPU_V7M
>> > + select KEXEC_CORE
>> > help
>> > kexec is a system call that implements the ability to shutdown your
>> > current kernel, and to start another kernel. It is like a reboot
>>
>> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
>> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
>> and let arch/*/Kconfig select that if the architecture has kexec support.
>>
>> Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
>> without the need to duplicate it.
>
> I'm not sure I understand your idea well, do you means like
> in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE?
No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig.
All other KEXEC config options should depend on ARCH_HAS_KEXEC,
which can be selected by architectures that support kexec.
> How about simply move below chunk to arch/Kconfig instead of introducing
> another ARCH_HAS_KEXEC:
> config KEXEC_CORE
> bool
Not all architectures support kexec, hence my proposed dependency on
ARCH_HAS_KEXEC.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-07-14 11:20 +0200 |
| Message-ID | <pM4xA-lo-5@gated-at.bofh.it> |
| In reply to | #1183473 |
Hi Dave,
On Tue, Jul 14, 2015 at 11:11 AM, Dave Young <dyoung@redhat.com> wrote:
> On 07/14/15 at 10:50am, Geert Uytterhoeven wrote:
>> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote:
>> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> >> > index 1c50210..20c48b3 100644
>> >> > --- a/arch/arm/Kconfig
>> >> > +++ b/arch/arm/Kconfig
>> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
>> >> > be linked for and stored to. This address is dependent on your
>> >> > own flash usage.
>> >> >
>> >> > +config KEXEC_CORE
>> >> > + bool
>> >> > +
>> >> > config KEXEC
>> >> > bool "Kexec system call (EXPERIMENTAL)"
>> >> > depends on (!SMP || PM_SLEEP_SMP)
>> >> > depends on !CPU_V7M
>> >> > + select KEXEC_CORE
>> >> > help
>> >> > kexec is a system call that implements the ability to shutdown your
>> >> > current kernel, and to start another kernel. It is like a reboot
>> >>
>> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
>> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
>> >> and let arch/*/Kconfig select that if the architecture has kexec support.
>> >>
>> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
>> >> without the need to duplicate it.
>> >
>> > I'm not sure I understand your idea well, do you means like
>> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE?
>>
>> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig.
>> All other KEXEC config options should depend on ARCH_HAS_KEXEC,
>> which can be selected by architectures that support kexec.
>
> So it will be like below? problem is KEXEC_FILE is x86 only now, how
> to handle it then?
>
> arch/Kconfig:
> config ARCH_HAS_KEXEC
> ...
> config KEXEC_CORE
> ...
> config KEXEC
depends on ARCH_HAS_KEXEC
> ...
> config KEXEC_FILE
depends on ARCH_HAS_KEXEC
> ...
>
> arch/arm/Kconfig:
> select ARCH_HAS_KEXEC
Right, that's the idea.
(Minor nit: ARM has dependencies for kexec, so it should be
"select ARCH_HAS_KEXEC if (!SMP || PM_SLEEP_SMP) && !CPU_V7M")
>> > How about simply move below chunk to arch/Kconfig instead of introducing
>> > another ARCH_HAS_KEXEC:
>> > config KEXEC_CORE
>> > bool
>>
>> Not all architectures support kexec, hence my proposed dependency on
>> ARCH_HAS_KEXEC.
>
> KEXEC_CORE is not visible in menuconfig, it is selected by KEXEC and KEXEC_FILE
> so move it in arch/Kconfig is ok?
Yes.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Date | 2015-07-14 11:30 +0200 |
| Message-ID | <pM4Hg-oF-17@gated-at.bofh.it> |
| In reply to | #1183483 |
Hi, Geert On 07/14/15 at 11:16am, Geert Uytterhoeven wrote: > Hi Dave, > > On Tue, Jul 14, 2015 at 11:11 AM, Dave Young <dyoung@redhat.com> wrote: > > On 07/14/15 at 10:50am, Geert Uytterhoeven wrote: > >> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote: > >> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > >> >> > index 1c50210..20c48b3 100644 > >> >> > --- a/arch/arm/Kconfig > >> >> > +++ b/arch/arm/Kconfig > >> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR > >> >> > be linked for and stored to. This address is dependent on your > >> >> > own flash usage. > >> >> > > >> >> > +config KEXEC_CORE > >> >> > + bool > >> >> > + > >> >> > config KEXEC > >> >> > bool "Kexec system call (EXPERIMENTAL)" > >> >> > depends on (!SMP || PM_SLEEP_SMP) > >> >> > depends on !CPU_V7M > >> >> > + select KEXEC_CORE > >> >> > help > >> >> > kexec is a system call that implements the ability to shutdown your > >> >> > current kernel, and to start another kernel. It is like a reboot > >> >> > >> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's > >> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file), > >> >> and let arch/*/Kconfig select that if the architecture has kexec support. > >> >> > >> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file, > >> >> without the need to duplicate it. > >> > > >> > I'm not sure I understand your idea well, do you means like > >> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE? > >> > >> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig. > >> All other KEXEC config options should depend on ARCH_HAS_KEXEC, > >> which can be selected by architectures that support kexec. > > > > So it will be like below? problem is KEXEC_FILE is x86 only now, how > > to handle it then? > > > > arch/Kconfig: > > config ARCH_HAS_KEXEC > > ... > > config KEXEC_CORE > > ... > > config KEXEC > > depends on ARCH_HAS_KEXEC > > > ... > > config KEXEC_FILE > > depends on ARCH_HAS_KEXEC But only x86 has KEXEC_FILE, if we make this change one will see KEXEC_FILE on arches other than x86.. > > > ... > > > > arch/arm/Kconfig: > > select ARCH_HAS_KEXEC > > Right, that's the idea. > > (Minor nit: ARM has dependencies for kexec, so it should be > "select ARCH_HAS_KEXEC if (!SMP || PM_SLEEP_SMP) && !CPU_V7M") > > >> > How about simply move below chunk to arch/Kconfig instead of introducing > >> > another ARCH_HAS_KEXEC: > >> > config KEXEC_CORE > >> > bool > >> > >> Not all architectures support kexec, hence my proposed dependency on > >> ARCH_HAS_KEXEC. > > > > KEXEC_CORE is not visible in menuconfig, it is selected by KEXEC and KEXEC_FILE > > so move it in arch/Kconfig is ok? > > Yes. I means how about only moving KEXEC_CORE to general Kconfig, but do not introduce ARCH_HAS_KEXEC.. Thanks Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-07-14 11:50 +0200 |
| Message-ID | <pM50F-w0-69@gated-at.bofh.it> |
| In reply to | #1183489 |
Hi Dave,
On Tue, Jul 14, 2015 at 11:24 AM, Dave Young <dyoung@redhat.com> wrote:
> On 07/14/15 at 11:16am, Geert Uytterhoeven wrote:
>> On Tue, Jul 14, 2015 at 11:11 AM, Dave Young <dyoung@redhat.com> wrote:
>> > On 07/14/15 at 10:50am, Geert Uytterhoeven wrote:
>> >> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote:
>> >> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> >> >> > index 1c50210..20c48b3 100644
>> >> >> > --- a/arch/arm/Kconfig
>> >> >> > +++ b/arch/arm/Kconfig
>> >> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
>> >> >> > be linked for and stored to. This address is dependent on your
>> >> >> > own flash usage.
>> >> >> >
>> >> >> > +config KEXEC_CORE
>> >> >> > + bool
>> >> >> > +
>> >> >> > config KEXEC
>> >> >> > bool "Kexec system call (EXPERIMENTAL)"
>> >> >> > depends on (!SMP || PM_SLEEP_SMP)
>> >> >> > depends on !CPU_V7M
>> >> >> > + select KEXEC_CORE
>> >> >> > help
>> >> >> > kexec is a system call that implements the ability to shutdown your
>> >> >> > current kernel, and to start another kernel. It is like a reboot
>> >> >>
>> >> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
>> >> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
>> >> >> and let arch/*/Kconfig select that if the architecture has kexec support.
>> >> >>
>> >> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
>> >> >> without the need to duplicate it.
>> >> >
>> >> > I'm not sure I understand your idea well, do you means like
>> >> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE?
>> >>
>> >> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig.
>> >> All other KEXEC config options should depend on ARCH_HAS_KEXEC,
>> >> which can be selected by architectures that support kexec.
>> >
>> > So it will be like below? problem is KEXEC_FILE is x86 only now, how
>> > to handle it then?
>> >
>> > arch/Kconfig:
>> > config ARCH_HAS_KEXEC
>> > ...
>> > config KEXEC_CORE
>> > ...
>> > config KEXEC
>>
>> depends on ARCH_HAS_KEXEC
>>
>> > ...
>> > config KEXEC_FILE
>>
>> depends on ARCH_HAS_KEXEC
>
> But only x86 has KEXEC_FILE, if we make this change one will see KEXEC_FILE
> on arches other than x86..
Is there any technical reason why it's limited to x86?
Else we may need ARCH_HAS_KEXEC_FILE, too :-(
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Date | 2015-07-15 03:40 +0200 |
| Message-ID | <pMjPX-14u-1@gated-at.bofh.it> |
| In reply to | #1183531 |
Hi, Geert On 07/14/15 at 11:47am, Geert Uytterhoeven wrote: > Hi Dave, > > On Tue, Jul 14, 2015 at 11:24 AM, Dave Young <dyoung@redhat.com> wrote: > > On 07/14/15 at 11:16am, Geert Uytterhoeven wrote: > >> On Tue, Jul 14, 2015 at 11:11 AM, Dave Young <dyoung@redhat.com> wrote: > >> > On 07/14/15 at 10:50am, Geert Uytterhoeven wrote: > >> >> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote: > >> >> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > >> >> >> > index 1c50210..20c48b3 100644 > >> >> >> > --- a/arch/arm/Kconfig > >> >> >> > +++ b/arch/arm/Kconfig > >> >> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR > >> >> >> > be linked for and stored to. This address is dependent on your > >> >> >> > own flash usage. > >> >> >> > > >> >> >> > +config KEXEC_CORE > >> >> >> > + bool > >> >> >> > + > >> >> >> > config KEXEC > >> >> >> > bool "Kexec system call (EXPERIMENTAL)" > >> >> >> > depends on (!SMP || PM_SLEEP_SMP) > >> >> >> > depends on !CPU_V7M > >> >> >> > + select KEXEC_CORE > >> >> >> > help > >> >> >> > kexec is a system call that implements the ability to shutdown your > >> >> >> > current kernel, and to start another kernel. It is like a reboot > >> >> >> > >> >> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's > >> >> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file), > >> >> >> and let arch/*/Kconfig select that if the architecture has kexec support. > >> >> >> > >> >> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file, > >> >> >> without the need to duplicate it. > >> >> > > >> >> > I'm not sure I understand your idea well, do you means like > >> >> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE? > >> >> > >> >> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig. > >> >> All other KEXEC config options should depend on ARCH_HAS_KEXEC, > >> >> which can be selected by architectures that support kexec. > >> > > >> > So it will be like below? problem is KEXEC_FILE is x86 only now, how > >> > to handle it then? > >> > > >> > arch/Kconfig: > >> > config ARCH_HAS_KEXEC > >> > ... > >> > config KEXEC_CORE > >> > ... > >> > config KEXEC > >> > >> depends on ARCH_HAS_KEXEC > >> > >> > ... > >> > config KEXEC_FILE > >> > >> depends on ARCH_HAS_KEXEC > > > > But only x86 has KEXEC_FILE, if we make this change one will see KEXEC_FILE > > on arches other than x86.. > > Is there any technical reason why it's limited to x86? It was implemented for UEFI secure boot, til now only done in x86. Of course it is also doable for other archtecture even if there's no secure boot. Basiclly one need port the userspace code in kexec-tools to kernel space, also need code to verify kernel signature. > Else we may need ARCH_HAS_KEXEC_FILE, too :-( Hmm, I'm not sure it will have much benefits now to add two ARCH_HAS options. I would prefer current solution, but I can move the KEXEC_CORE to arch/Kconfig Thanks Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Date | 2015-07-14 11:20 +0200 |
| Message-ID | <pM4xA-lo-7@gated-at.bofh.it> |
| In reply to | #1183473 |
On 07/14/15 at 10:50am, Geert Uytterhoeven wrote:
> Hi Dave,
>
> On Tue, Jul 14, 2015 at 10:46 AM, Dave Young <dyoung@redhat.com> wrote:
> >> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >> > index 1c50210..20c48b3 100644
> >> > --- a/arch/arm/Kconfig
> >> > +++ b/arch/arm/Kconfig
> >> > @@ -2001,10 +2001,14 @@ config XIP_PHYS_ADDR
> >> > be linked for and stored to. This address is dependent on your
> >> > own flash usage.
> >> >
> >> > +config KEXEC_CORE
> >> > + bool
> >> > +
> >> > config KEXEC
> >> > bool "Kexec system call (EXPERIMENTAL)"
> >> > depends on (!SMP || PM_SLEEP_SMP)
> >> > depends on !CPU_V7M
> >> > + select KEXEC_CORE
> >> > help
> >> > kexec is a system call that implements the ability to shutdown your
> >> > current kernel, and to start another kernel. It is like a reboot
> >>
> >> As this KEXEC_CORE is appearing in all arch/*/Kconfig files, I think it's
> >> time to add an ARCH_HAS_KEXEC symbol (to a common Kconfig file),
> >> and let arch/*/Kconfig select that if the architecture has kexec support.
> >>
> >> Then KEXEC and KEXEC_CORE can live in the common Kconfig file,
> >> without the need to duplicate it.
> >
> > I'm not sure I understand your idea well, do you means like
> > in arch/Kconfig add ARCH_HAS_KEXEC which depends on KEXEC_CORE?
>
> No, ARCH_HAS_KEXEC and all other KEXEC config options in arch/Kconfig.
> All other KEXEC config options should depend on ARCH_HAS_KEXEC,
> which can be selected by architectures that support kexec.
So it will be like below? problem is KEXEC_FILE is x86 only now, how
to handle it then?
arch/Kconfig:
config ARCH_HAS_KEXEC
...
config KEXEC_CORE
...
config KEXEC
...
config KEXEC_FILE
...
arch/arm/Kconfig:
select ARCH_HAS_KEXEC
>
> > How about simply move below chunk to arch/Kconfig instead of introducing
> > another ARCH_HAS_KEXEC:
> > config KEXEC_CORE
> > bool
>
> Not all architectures support kexec, hence my proposed dependency on
> ARCH_HAS_KEXEC.
KEXEC_CORE is not visible in menuconfig, it is selected by KEXEC and KEXEC_FILE
so move it in arch/Kconfig is ok?
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web