* [PATCH] arm64: remove dead code
@ 2015-07-16 17:58 ` Mark Salter
0 siblings, 0 replies; 12+ messages in thread
From: Mark Salter @ 2015-07-16 17:58 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon
Cc: Ard Biesheuvel, Mark Rutland, linux-kernel, linux-arm-kernel,
Mark Salter
Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
soft_reset() from the kernel. This was the only caller of
setup_mm_for_reboot(), so remove that also.
Signed-off-by: Mark Salter <msalter@redhat.com>
---
arch/arm64/include/asm/mmu.h | 1 -
arch/arm64/mm/mmu.c | 11 -----------
2 files changed, 12 deletions(-)
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 79fcfb0..0302087 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -28,7 +28,6 @@ typedef struct {
#define ASID(mm) ((mm)->context.id & 0xffff)
extern void paging_init(void);
-extern void setup_mm_for_reboot(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
extern void init_mem_pgprot(void);
extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index a4ede4e..63012fe 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -461,17 +461,6 @@ void __init paging_init(void)
}
/*
- * Enable the identity mapping to allow the MMU disabling.
- */
-void setup_mm_for_reboot(void)
-{
- cpu_set_reserved_ttbr0();
- flush_tlb_all();
- cpu_set_idmap_tcr_t0sz();
- cpu_switch_mm(idmap_pg_dir, &init_mm);
-}
-
-/*
* Check whether a kernel address is valid (derived from arch/x86/).
*/
int kern_addr_valid(unsigned long addr)
--
2.4.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-16 17:58 ` Mark Salter
0 siblings, 0 replies; 12+ messages in thread
From: Mark Salter @ 2015-07-16 17:58 UTC (permalink / raw)
To: linux-arm-kernel
Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
soft_reset() from the kernel. This was the only caller of
setup_mm_for_reboot(), so remove that also.
Signed-off-by: Mark Salter <msalter@redhat.com>
---
arch/arm64/include/asm/mmu.h | 1 -
arch/arm64/mm/mmu.c | 11 -----------
2 files changed, 12 deletions(-)
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 79fcfb0..0302087 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -28,7 +28,6 @@ typedef struct {
#define ASID(mm) ((mm)->context.id & 0xffff)
extern void paging_init(void);
-extern void setup_mm_for_reboot(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
extern void init_mem_pgprot(void);
extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index a4ede4e..63012fe 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -461,17 +461,6 @@ void __init paging_init(void)
}
/*
- * Enable the identity mapping to allow the MMU disabling.
- */
-void setup_mm_for_reboot(void)
-{
- cpu_set_reserved_ttbr0();
- flush_tlb_all();
- cpu_set_idmap_tcr_t0sz();
- cpu_switch_mm(idmap_pg_dir, &init_mm);
-}
-
-/*
* Check whether a kernel address is valid (derived from arch/x86/).
*/
int kern_addr_valid(unsigned long addr)
--
2.4.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: remove dead code
2015-07-16 17:58 ` Mark Salter
@ 2015-07-17 6:49 ` Ard Biesheuvel
-1 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 6:49 UTC (permalink / raw)
To: Mark Salter, Geoff Levand, Takahiro Akashi
Cc: Catalin Marinas, Will Deacon, Mark Rutland, linux-kernel,
linux-arm-kernel
(adding Geoff and Takahiro)
On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> soft_reset() from the kernel. This was the only caller of
> setup_mm_for_reboot(), so remove that also.
>
I am wondering if setup_mm_for_reboot() is being used in the kexec
patches. Perhaps we should check that before removing it.
Geoff?
> Signed-off-by: Mark Salter <msalter@redhat.com>
> ---
> arch/arm64/include/asm/mmu.h | 1 -
> arch/arm64/mm/mmu.c | 11 -----------
> 2 files changed, 12 deletions(-)
>
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index 79fcfb0..0302087 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -28,7 +28,6 @@ typedef struct {
> #define ASID(mm) ((mm)->context.id & 0xffff)
>
> extern void paging_init(void);
> -extern void setup_mm_for_reboot(void);
> extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
> extern void init_mem_pgprot(void);
> extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index a4ede4e..63012fe 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -461,17 +461,6 @@ void __init paging_init(void)
> }
>
> /*
> - * Enable the identity mapping to allow the MMU disabling.
> - */
> -void setup_mm_for_reboot(void)
> -{
> - cpu_set_reserved_ttbr0();
> - flush_tlb_all();
> - cpu_set_idmap_tcr_t0sz();
> - cpu_switch_mm(idmap_pg_dir, &init_mm);
> -}
> -
> -/*
> * Check whether a kernel address is valid (derived from arch/x86/).
> */
> int kern_addr_valid(unsigned long addr)
> --
> 2.4.3
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-17 6:49 ` Ard Biesheuvel
0 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 6:49 UTC (permalink / raw)
To: linux-arm-kernel
(adding Geoff and Takahiro)
On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> soft_reset() from the kernel. This was the only caller of
> setup_mm_for_reboot(), so remove that also.
>
I am wondering if setup_mm_for_reboot() is being used in the kexec
patches. Perhaps we should check that before removing it.
Geoff?
> Signed-off-by: Mark Salter <msalter@redhat.com>
> ---
> arch/arm64/include/asm/mmu.h | 1 -
> arch/arm64/mm/mmu.c | 11 -----------
> 2 files changed, 12 deletions(-)
>
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index 79fcfb0..0302087 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -28,7 +28,6 @@ typedef struct {
> #define ASID(mm) ((mm)->context.id & 0xffff)
>
> extern void paging_init(void);
> -extern void setup_mm_for_reboot(void);
> extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
> extern void init_mem_pgprot(void);
> extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index a4ede4e..63012fe 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -461,17 +461,6 @@ void __init paging_init(void)
> }
>
> /*
> - * Enable the identity mapping to allow the MMU disabling.
> - */
> -void setup_mm_for_reboot(void)
> -{
> - cpu_set_reserved_ttbr0();
> - flush_tlb_all();
> - cpu_set_idmap_tcr_t0sz();
> - cpu_switch_mm(idmap_pg_dir, &init_mm);
> -}
> -
> -/*
> * Check whether a kernel address is valid (derived from arch/x86/).
> */
> int kern_addr_valid(unsigned long addr)
> --
> 2.4.3
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: remove dead code
2015-07-17 6:49 ` Ard Biesheuvel
@ 2015-07-17 6:50 ` Ard Biesheuvel
-1 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 6:50 UTC (permalink / raw)
To: Mark Salter, Takahiro Akashi, Geoff Levand
Cc: Catalin Marinas, Will Deacon, Mark Rutland, linux-kernel,
linux-arm-kernel
(use Geoff's correct email address)
On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> (adding Geoff and Takahiro)
>
> On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
>> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
>> soft_reset() from the kernel. This was the only caller of
>> setup_mm_for_reboot(), so remove that also.
>>
>
> I am wondering if setup_mm_for_reboot() is being used in the kexec
> patches. Perhaps we should check that before removing it.
>
> Geoff?
>
>
>> Signed-off-by: Mark Salter <msalter@redhat.com>
>> ---
>> arch/arm64/include/asm/mmu.h | 1 -
>> arch/arm64/mm/mmu.c | 11 -----------
>> 2 files changed, 12 deletions(-)
>>
>> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
>> index 79fcfb0..0302087 100644
>> --- a/arch/arm64/include/asm/mmu.h
>> +++ b/arch/arm64/include/asm/mmu.h
>> @@ -28,7 +28,6 @@ typedef struct {
>> #define ASID(mm) ((mm)->context.id & 0xffff)
>>
>> extern void paging_init(void);
>> -extern void setup_mm_for_reboot(void);
>> extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
>> extern void init_mem_pgprot(void);
>> extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
>> index a4ede4e..63012fe 100644
>> --- a/arch/arm64/mm/mmu.c
>> +++ b/arch/arm64/mm/mmu.c
>> @@ -461,17 +461,6 @@ void __init paging_init(void)
>> }
>>
>> /*
>> - * Enable the identity mapping to allow the MMU disabling.
>> - */
>> -void setup_mm_for_reboot(void)
>> -{
>> - cpu_set_reserved_ttbr0();
>> - flush_tlb_all();
>> - cpu_set_idmap_tcr_t0sz();
>> - cpu_switch_mm(idmap_pg_dir, &init_mm);
>> -}
>> -
>> -/*
>> * Check whether a kernel address is valid (derived from arch/x86/).
>> */
>> int kern_addr_valid(unsigned long addr)
>> --
>> 2.4.3
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-17 6:50 ` Ard Biesheuvel
0 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 6:50 UTC (permalink / raw)
To: linux-arm-kernel
(use Geoff's correct email address)
On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> (adding Geoff and Takahiro)
>
> On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
>> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
>> soft_reset() from the kernel. This was the only caller of
>> setup_mm_for_reboot(), so remove that also.
>>
>
> I am wondering if setup_mm_for_reboot() is being used in the kexec
> patches. Perhaps we should check that before removing it.
>
> Geoff?
>
>
>> Signed-off-by: Mark Salter <msalter@redhat.com>
>> ---
>> arch/arm64/include/asm/mmu.h | 1 -
>> arch/arm64/mm/mmu.c | 11 -----------
>> 2 files changed, 12 deletions(-)
>>
>> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
>> index 79fcfb0..0302087 100644
>> --- a/arch/arm64/include/asm/mmu.h
>> +++ b/arch/arm64/include/asm/mmu.h
>> @@ -28,7 +28,6 @@ typedef struct {
>> #define ASID(mm) ((mm)->context.id & 0xffff)
>>
>> extern void paging_init(void);
>> -extern void setup_mm_for_reboot(void);
>> extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
>> extern void init_mem_pgprot(void);
>> extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
>> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
>> index a4ede4e..63012fe 100644
>> --- a/arch/arm64/mm/mmu.c
>> +++ b/arch/arm64/mm/mmu.c
>> @@ -461,17 +461,6 @@ void __init paging_init(void)
>> }
>>
>> /*
>> - * Enable the identity mapping to allow the MMU disabling.
>> - */
>> -void setup_mm_for_reboot(void)
>> -{
>> - cpu_set_reserved_ttbr0();
>> - flush_tlb_all();
>> - cpu_set_idmap_tcr_t0sz();
>> - cpu_switch_mm(idmap_pg_dir, &init_mm);
>> -}
>> -
>> -/*
>> * Check whether a kernel address is valid (derived from arch/x86/).
>> */
>> int kern_addr_valid(unsigned long addr)
>> --
>> 2.4.3
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: remove dead code
2015-07-17 6:50 ` Ard Biesheuvel
@ 2015-07-17 9:45 ` Will Deacon
-1 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2015-07-17 9:45 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: msalter, Takahiro Akashi, Geoff Levand, Catalin Marinas,
Mark Rutland, linux-kernel, linux-arm-kernel
On Fri, Jul 17, 2015 at 07:50:30AM +0100, Ard Biesheuvel wrote:
> (use Geoff's correct email address)
>
> On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > (adding Geoff and Takahiro)
> >
> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> >> soft_reset() from the kernel. This was the only caller of
> >> setup_mm_for_reboot(), so remove that also.
> >>
> >
> > I am wondering if setup_mm_for_reboot() is being used in the kexec
> > patches. Perhaps we should check that before removing it.
Well, given that I can't see any kexec patches on the radar for 4.3, I'm
happy to merge this clean-up and Geoff can reintroduce the function in
his series if he needs it.
Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-17 9:45 ` Will Deacon
0 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2015-07-17 9:45 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jul 17, 2015 at 07:50:30AM +0100, Ard Biesheuvel wrote:
> (use Geoff's correct email address)
>
> On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > (adding Geoff and Takahiro)
> >
> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> >> soft_reset() from the kernel. This was the only caller of
> >> setup_mm_for_reboot(), so remove that also.
> >>
> >
> > I am wondering if setup_mm_for_reboot() is being used in the kexec
> > patches. Perhaps we should check that before removing it.
Well, given that I can't see any kexec patches on the radar for 4.3, I'm
happy to merge this clean-up and Geoff can reintroduce the function in
his series if he needs it.
Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: remove dead code
2015-07-17 9:45 ` Will Deacon
@ 2015-07-17 9:46 ` Ard Biesheuvel
-1 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 9:46 UTC (permalink / raw)
To: Will Deacon
Cc: msalter, Takahiro Akashi, Geoff Levand, Catalin Marinas,
Mark Rutland, linux-kernel, linux-arm-kernel
On 17 July 2015 at 11:45, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jul 17, 2015 at 07:50:30AM +0100, Ard Biesheuvel wrote:
>> (use Geoff's correct email address)
>>
>> On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>> > (adding Geoff and Takahiro)
>> >
>> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
>> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
>> >> soft_reset() from the kernel. This was the only caller of
>> >> setup_mm_for_reboot(), so remove that also.
>> >>
>> >
>> > I am wondering if setup_mm_for_reboot() is being used in the kexec
>> > patches. Perhaps we should check that before removing it.
>
> Well, given that I can't see any kexec patches on the radar for 4.3, I'm
> happy to merge this clean-up and Geoff can reintroduce the function in
> his series if he needs it.
>
OK, fair enough
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-17 9:46 ` Ard Biesheuvel
0 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2015-07-17 9:46 UTC (permalink / raw)
To: linux-arm-kernel
On 17 July 2015 at 11:45, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jul 17, 2015 at 07:50:30AM +0100, Ard Biesheuvel wrote:
>> (use Geoff's correct email address)
>>
>> On 17 July 2015 at 08:49, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>> > (adding Geoff and Takahiro)
>> >
>> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
>> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
>> >> soft_reset() from the kernel. This was the only caller of
>> >> setup_mm_for_reboot(), so remove that also.
>> >>
>> >
>> > I am wondering if setup_mm_for_reboot() is being used in the kexec
>> > patches. Perhaps we should check that before removing it.
>
> Well, given that I can't see any kexec patches on the radar for 4.3, I'm
> happy to merge this clean-up and Geoff can reintroduce the function in
> his series if he needs it.
>
OK, fair enough
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: remove dead code
2015-07-17 6:50 ` Ard Biesheuvel
@ 2015-07-17 17:42 ` Geoff Levand
-1 siblings, 0 replies; 12+ messages in thread
From: Geoff Levand @ 2015-07-17 17:42 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Mark Salter, Takahiro Akashi, Catalin Marinas, Will Deacon,
Mark Rutland, linux-kernel, linux-arm-kernel
Hi,
On Fri, 2015-07-17 at 08:50 +0200, Ard Biesheuvel wrote:
> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> >> soft_reset() from the kernel. This was the only caller of
> >> setup_mm_for_reboot(), so remove that also.
> >
> > I am wondering if setup_mm_for_reboot() is being used in the kexec
> > patches. Perhaps we should check that before removing it.
The whole CPU reset support that kexec was using was removed.
I started on reimplementing a new cpu_reset() routine (in my
master branch at [1]), but I can only work on it when I have
some extra time, and these days that is not very often.
[1] https://git.kernel.org/cgit/linux/kernel/git/geoff/linux-kexec.git/
-Geoff
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] arm64: remove dead code
@ 2015-07-17 17:42 ` Geoff Levand
0 siblings, 0 replies; 12+ messages in thread
From: Geoff Levand @ 2015-07-17 17:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, 2015-07-17 at 08:50 +0200, Ard Biesheuvel wrote:
> > On 16 July 2015 at 19:58, Mark Salter <msalter@redhat.com> wrote:
> >> Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed
> >> soft_reset() from the kernel. This was the only caller of
> >> setup_mm_for_reboot(), so remove that also.
> >
> > I am wondering if setup_mm_for_reboot() is being used in the kexec
> > patches. Perhaps we should check that before removing it.
The whole CPU reset support that kexec was using was removed.
I started on reimplementing a new cpu_reset() routine (in my
master branch at [1]), but I can only work on it when I have
some extra time, and these days that is not very often.
[1] https://git.kernel.org/cgit/linux/kernel/git/geoff/linux-kexec.git/
-Geoff
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-07-17 17:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 17:58 [PATCH] arm64: remove dead code Mark Salter
2015-07-16 17:58 ` Mark Salter
2015-07-17 6:49 ` Ard Biesheuvel
2015-07-17 6:49 ` Ard Biesheuvel
2015-07-17 6:50 ` Ard Biesheuvel
2015-07-17 6:50 ` Ard Biesheuvel
2015-07-17 9:45 ` Will Deacon
2015-07-17 9:45 ` Will Deacon
2015-07-17 9:46 ` Ard Biesheuvel
2015-07-17 9:46 ` Ard Biesheuvel
2015-07-17 17:42 ` Geoff Levand
2015-07-17 17:42 ` Geoff Levand
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.