[PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
When CONFIG_KVM_BOOK3S_64_PR is enabled, MASKABLE_EXCEPTION_PSERIES(0x900 ...) will includes __KVMTEST, it will exceed 0x980 which STD_EXCEPTION_HV(0x980 ...) will use, it will cause compiling issue. The related errors: arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:258: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 Signed-off-by: Chen Gang --- arch/powerpc/include/asm/kvm_asm.h |2 +- arch/powerpc/kernel/exceptions-64s.S |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_asm.h b/arch/powerpc/include/asm/kvm_asm.h index b9dd382..2c65bae 100644 --- a/arch/powerpc/include/asm/kvm_asm.h +++ b/arch/powerpc/include/asm/kvm_asm.h @@ -86,7 +86,7 @@ #define BOOK3S_INTERRUPT_PROGRAM 0x700 #define BOOK3S_INTERRUPT_FP_UNAVAIL0x800 #define BOOK3S_INTERRUPT_DECREMENTER 0x900 -#define BOOK3S_INTERRUPT_HV_DECREMENTER0x980 +#define BOOK3S_INTERRUPT_HV_DECREMENTER0x988 #define BOOK3S_INTERRUPT_SYSCALL 0xc00 #define BOOK3S_INTERRUPT_TRACE 0xd00 #define BOOK3S_INTERRUPT_H_DATA_STORAGE0xe00 diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index e789ee7..bb0e677 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -255,7 +255,7 @@ hardware_interrupt_hv: KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800) MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer) - STD_EXCEPTION_HV(0x980, 0x982, hdecrementer) + STD_EXCEPTION_HV(0x988, 0x982, hdecrementer) MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00) @@ -698,7 +698,7 @@ machine_check_common: STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) - STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt) + STD_EXCEPTION_COMMON(0x988, hdecrementer, .hdec_interrupt) #ifdef CONFIG_PPC_DOORBELL STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception) #else @@ -802,7 +802,7 @@ hardware_interrupt_relon_hv: STD_RELON_EXCEPTION_PSERIES(0x4700, 0x700, program_check) STD_RELON_EXCEPTION_PSERIES(0x4800, 0x800, fp_unavailable) MASKABLE_RELON_EXCEPTION_PSERIES(0x4900, 0x900, decrementer) - STD_RELON_EXCEPTION_HV(0x4980, 0x982, hdecrementer) + STD_RELON_EXCEPTION_HV(0x4988, 0x982, hdecrementer) MASKABLE_RELON_EXCEPTION_PSERIES(0x4a00, 0xa00, doorbell_super) STD_RELON_EXCEPTION_PSERIES(0x4b00, 0xb00, trap_0b) -- 1.7.7.6 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
Hello Mike: Please try this patch, at least it can pass compiling with the config file which you provided under my cross-compiling envrionments. I do not give a running test now, so better to try to run the new kernel with this patch. Thanks. On 2013年04月25日 16:18, Chen Gang wrote: > > When CONFIG_KVM_BOOK3S_64_PR is enabled, > MASKABLE_EXCEPTION_PSERIES(0x900 ...) will includes __KVMTEST, it will > exceed 0x980 which STD_EXCEPTION_HV(0x980 ...) will use, it will cause > compiling issue. > > The related errors: > arch/powerpc/kernel/exceptions-64s.S: Assembler messages: > arch/powerpc/kernel/exceptions-64s.S:258: Error: attempt to move .org > backwards > make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 > > > Signed-off-by: Chen Gang > --- > arch/powerpc/include/asm/kvm_asm.h |2 +- > arch/powerpc/kernel/exceptions-64s.S |6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/include/asm/kvm_asm.h > b/arch/powerpc/include/asm/kvm_asm.h > index b9dd382..2c65bae 100644 > --- a/arch/powerpc/include/asm/kvm_asm.h > +++ b/arch/powerpc/include/asm/kvm_asm.h > @@ -86,7 +86,7 @@ > #define BOOK3S_INTERRUPT_PROGRAM 0x700 > #define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800 > #define BOOK3S_INTERRUPT_DECREMENTER 0x900 > -#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x980 > +#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x988 > #define BOOK3S_INTERRUPT_SYSCALL 0xc00 > #define BOOK3S_INTERRUPT_TRACE 0xd00 > #define BOOK3S_INTERRUPT_H_DATA_STORAGE 0xe00 > diff --git a/arch/powerpc/kernel/exceptions-64s.S > b/arch/powerpc/kernel/exceptions-64s.S > index e789ee7..bb0e677 100644 > --- a/arch/powerpc/kernel/exceptions-64s.S > +++ b/arch/powerpc/kernel/exceptions-64s.S > @@ -255,7 +255,7 @@ hardware_interrupt_hv: > KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800) > > MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer) > - STD_EXCEPTION_HV(0x980, 0x982, hdecrementer) > + STD_EXCEPTION_HV(0x988, 0x982, hdecrementer) > > MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) > KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00) > @@ -698,7 +698,7 @@ machine_check_common: > > STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) > STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) > - STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt) > + STD_EXCEPTION_COMMON(0x988, hdecrementer, .hdec_interrupt) > #ifdef CONFIG_PPC_DOORBELL > STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception) > #else > @@ -802,7 +802,7 @@ hardware_interrupt_relon_hv: > STD_RELON_EXCEPTION_PSERIES(0x4700, 0x700, program_check) > STD_RELON_EXCEPTION_PSERIES(0x4800, 0x800, fp_unavailable) > MASKABLE_RELON_EXCEPTION_PSERIES(0x4900, 0x900, decrementer) > - STD_RELON_EXCEPTION_HV(0x4980, 0x982, hdecrementer) > + STD_RELON_EXCEPTION_HV(0x4988, 0x982, hdecrementer) > MASKABLE_RELON_EXCEPTION_PSERIES(0x4a00, 0xa00, doorbell_super) > STD_RELON_EXCEPTION_PSERIES(0x4b00, 0xb00, trap_0b) > > -- Chen Gang Asianux Corporation ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
于 2013/4/25 16:21, Chen Gang 写道: Hello Mike: Please try this patch, at least it can pass compiling with the config file which you provided under my cross-compiling envrionments. I do not give a running test now, so better to try to run the new kernel with this patch. OK, I will use your patch, and I will send out the result later. Thanks Mike Thanks. On 2013年04月25日 16:18, Chen Gang wrote: When CONFIG_KVM_BOOK3S_64_PR is enabled, MASKABLE_EXCEPTION_PSERIES(0x900 ...) will includes __KVMTEST, it will exceed 0x980 which STD_EXCEPTION_HV(0x980 ...) will use, it will cause compiling issue. The related errors: arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:258: Error: attempt to move .org backwards make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 Signed-off-by: Chen Gang --- arch/powerpc/include/asm/kvm_asm.h |2 +- arch/powerpc/kernel/exceptions-64s.S |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_asm.h b/arch/powerpc/include/asm/kvm_asm.h index b9dd382..2c65bae 100644 --- a/arch/powerpc/include/asm/kvm_asm.h +++ b/arch/powerpc/include/asm/kvm_asm.h @@ -86,7 +86,7 @@ #define BOOK3S_INTERRUPT_PROGRAM 0x700 #define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800 #define BOOK3S_INTERRUPT_DECREMENTER 0x900 -#define BOOK3S_INTERRUPT_HV_DECREMENTER0x980 +#define BOOK3S_INTERRUPT_HV_DECREMENTER0x988 #define BOOK3S_INTERRUPT_SYSCALL 0xc00 #define BOOK3S_INTERRUPT_TRACE0xd00 #define BOOK3S_INTERRUPT_H_DATA_STORAGE 0xe00 diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index e789ee7..bb0e677 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S @@ -255,7 +255,7 @@ hardware_interrupt_hv: KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800) MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer) - STD_EXCEPTION_HV(0x980, 0x982, hdecrementer) + STD_EXCEPTION_HV(0x988, 0x982, hdecrementer) MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00) @@ -698,7 +698,7 @@ machine_check_common: STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) - STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt) + STD_EXCEPTION_COMMON(0x988, hdecrementer, .hdec_interrupt) #ifdef CONFIG_PPC_DOORBELL STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception) #else @@ -802,7 +802,7 @@ hardware_interrupt_relon_hv: STD_RELON_EXCEPTION_PSERIES(0x4700, 0x700, program_check) STD_RELON_EXCEPTION_PSERIES(0x4800, 0x800, fp_unavailable) MASKABLE_RELON_EXCEPTION_PSERIES(0x4900, 0x900, decrementer) - STD_RELON_EXCEPTION_HV(0x4980, 0x982, hdecrementer) + STD_RELON_EXCEPTION_HV(0x4988, 0x982, hdecrementer) MASKABLE_RELON_EXCEPTION_PSERIES(0x4a00, 0xa00, doorbell_super) STD_RELON_EXCEPTION_PSERIES(0x4b00, 0xb00, trap_0b) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
Chen Gang wrote: > > When CONFIG_KVM_BOOK3S_64_PR is enabled, > MASKABLE_EXCEPTION_PSERIES(0x900 ...) will includes __KVMTEST, it will > exceed 0x980 which STD_EXCEPTION_HV(0x980 ...) will use, it will cause > compiling issue. > > The related errors: > arch/powerpc/kernel/exceptions-64s.S: Assembler messages: > arch/powerpc/kernel/exceptions-64s.S:258: Error: attempt to move .org > backwards > make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 This doesn't work at all. It might compile but it's never going to actually work. Comments below. > > > Signed-off-by: Chen Gang > --- > arch/powerpc/include/asm/kvm_asm.h |2 +- > arch/powerpc/kernel/exceptions-64s.S |6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/include/asm/kvm_asm.h > b/arch/powerpc/include/asm/kvm_asm.h > index b9dd382..2c65bae 100644 > --- a/arch/powerpc/include/asm/kvm_asm.h > +++ b/arch/powerpc/include/asm/kvm_asm.h > @@ -86,7 +86,7 @@ > #define BOOK3S_INTERRUPT_PROGRAM 0x700 > #define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800 > #define BOOK3S_INTERRUPT_DECREMENTER 0x900 > -#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x980 > +#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x988 This is hardwird in the architecture.. you can't just move it > #define BOOK3S_INTERRUPT_SYSCALL 0xc00 > #define BOOK3S_INTERRUPT_TRACE 0xd00 > #define BOOK3S_INTERRUPT_H_DATA_STORAGE 0xe00 > diff --git a/arch/powerpc/kernel/exceptions-64s.S > b/arch/powerpc/kernel/exceptions-64s.S > index e789ee7..bb0e677 100644 > --- a/arch/powerpc/kernel/exceptions-64s.S > +++ b/arch/powerpc/kernel/exceptions-64s.S > @@ -255,7 +255,7 @@ hardware_interrupt_hv: > KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800) > > MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer) > - STD_EXCEPTION_HV(0x980, 0x982, hdecrementer) > + STD_EXCEPTION_HV(0x988, 0x982, hdecrementer) Same here > > MASKABLE_EXCEPTION_PSERIES(0xa00, 0xa00, doorbell_super) > KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00) > @@ -698,7 +698,7 @@ machine_check_common: > > STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) > STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) > - STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt) > + STD_EXCEPTION_COMMON(0x988, hdecrementer, .hdec_interrupt) ... and here > #ifdef CONFIG_PPC_DOORBELL > STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception) > #else > @@ -802,7 +802,7 @@ hardware_interrupt_relon_hv: > STD_RELON_EXCEPTION_PSERIES(0x4700, 0x700, program_check) > STD_RELON_EXCEPTION_PSERIES(0x4800, 0x800, fp_unavailable) > MASKABLE_RELON_EXCEPTION_PSERIES(0x4900, 0x900, decrementer) > - STD_RELON_EXCEPTION_HV(0x4980, 0x982, hdecrementer) > + STD_RELON_EXCEPTION_HV(0x4988, 0x982, hdecrementer) ... and here > MASKABLE_RELON_EXCEPTION_PSERIES(0x4a00, 0xa00, doorbell_super) > STD_RELON_EXCEPTION_PSERIES(0x4b00, 0xb00, trap_0b) > > -- > 1.7.7.6 > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
On 2013年04月25日 17:00, Michael Neuling wrote: >> > >> > Signed-off-by: Chen Gang >> > --- >> > arch/powerpc/include/asm/kvm_asm.h |2 +- >> > arch/powerpc/kernel/exceptions-64s.S |6 +++--- >> > 2 files changed, 4 insertions(+), 4 deletions(-) >> > >> > diff --git a/arch/powerpc/include/asm/kvm_asm.h >> > b/arch/powerpc/include/asm/kvm_asm.h >> > index b9dd382..2c65bae 100644 >> > --- a/arch/powerpc/include/asm/kvm_asm.h >> > +++ b/arch/powerpc/include/asm/kvm_asm.h >> > @@ -86,7 +86,7 @@ >> > #define BOOK3S_INTERRUPT_PROGRAM 0x700 >> > #define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800 >> > #define BOOK3S_INTERRUPT_DECREMENTER 0x900 >> > -#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x980 >> > +#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x988 > This is hardwird in the architecture.. you can't just move it > OK, thank you, I need continue to fix it. It seems we have to read the details to shrink one instruction (4 bytes), at least. Welcome additional suggestions or completions. Thanks. -- Chen Gang Asianux Corporation ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] PowerPC: kernel: compiling issue, make additional room in exception vector area
On 2013年04月25日 17:05, Chen Gang wrote: > On 2013年04月25日 17:00, Michael Neuling wrote: Signed-off-by: Chen Gang --- arch/powerpc/include/asm/kvm_asm.h |2 +- arch/powerpc/kernel/exceptions-64s.S |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_asm.h b/arch/powerpc/include/asm/kvm_asm.h index b9dd382..2c65bae 100644 --- a/arch/powerpc/include/asm/kvm_asm.h +++ b/arch/powerpc/include/asm/kvm_asm.h @@ -86,7 +86,7 @@ #define BOOK3S_INTERRUPT_PROGRAM 0x700 #define BOOK3S_INTERRUPT_FP_UNAVAIL 0x800 #define BOOK3S_INTERRUPT_DECREMENTER 0x900 -#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x980 +#define BOOK3S_INTERRUPT_HV_DECREMENTER 0x988 >> This is hardwird in the architecture.. you can't just move it >> > I think of a way to solve it: we just move the related code to another area, after enter the original entry (e.g. 0x900), we let it jump to that area to excuse the related code. :-) > OK, thank you, I need continue to fix it. It seems we have to read the > details to shrink one instruction (4 bytes), at least. > > Welcome additional suggestions or completions. > > Thanks. > -- Chen Gang Asianux Corporation ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev