Xtensa fixes for v6.5:
- fix interaction between unaligned exception handler and load/store exception handler - fix parsing ISS network interface specification string - add comment about etherdev freeing to ISS network sriver -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAmS0UsYTHGpjbXZia2Jj QGdtYWlsLmNvbQAKCRBR+cyR+D+gRBAlD/42zoJ5CFHowMIA6RrNz2/+U53qzs1b MpVu69grNhIKPAigXYtM9An6Naa31Vs30oiKrBmxzWUKZZbJ/YaWbAo9HlJTWccK I7uXkhPayntyTFTPce5RXQDHF2EaPLSHGMNicStzHr4bZMoukQdzQBNVSwXmOlwf wQwUhGEnWZ3ttBp56x2ng7mQxXX+ih7fG3jqelJ0j9rn8IRetU/j287A2JrbP7kI vR7fQdQ8DH7fIoT3H1GrSNykUf+8dM5V3/kIRmqjtJCeTTP0vEONotMa6QF1H/O+ IYzu3K09abjUFmLSOdQrktBvNQ5kcspxQIFUGhirbziXkOfSWHvrAtbdlYtHMnow OnXuvazlT6OF406vDVMxQAvUVtaOzKTbZV2+nLmz6fbDpxJ9tGSMi8+ceyYfm8Yd ZC8SvE7jyPAEljb80Xvul+dY3Fq0MIsuRAvfZuoYwzIb05CRFn4JAOHU9w1DSu5u z6weXtlcURHg50ZCytchIvBmipMT+ncTsG+Cgt7eMWb+S31Sgzs9FsSG2tKo8KAt QLQLMnb1tra5lzsQ21w8RfgXvwPOv7f3tWElB8JScestRNOFx31wXY3KZfD6eWRg wYWZ3hvCnHxqb3WpgGun11rItXQXKOM9Eo+qMCnYQJ0Ieh/Pa0fPoEBn7PG5Srwb 0/BCuJPrMYlM+g== =E/W7 -----END PGP SIGNATURE----- Merge tag 'xtensa-20230716' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix interaction between unaligned exception handler and load/store exception handler - fix parsing ISS network interface specification string - add comment about etherdev freeing to ISS network driver * tag 'xtensa-20230716' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: fix unaligned and load/store configuration interaction xtensa: ISS: fix call to split_if_spec xtensa: ISS: add comment about etherdev freeing
This commit is contained in:
commit
5b8d6e8539
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* arch/xtensa/kernel/align.S
|
* arch/xtensa/kernel/align.S
|
||||||
*
|
*
|
||||||
* Handle unalignment exceptions in kernel space.
|
* Handle unalignment and load/store exceptions.
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General
|
* This file is subject to the terms and conditions of the GNU General
|
||||||
* Public License. See the file "COPYING" in the main directory of
|
* Public License. See the file "COPYING" in the main directory of
|
||||||
|
@ -26,20 +26,18 @@
|
||||||
#define LOAD_EXCEPTION_HANDLER
|
#define LOAD_EXCEPTION_HANDLER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XCHAL_UNALIGNED_STORE_EXCEPTION || defined LOAD_EXCEPTION_HANDLER
|
#if XCHAL_UNALIGNED_STORE_EXCEPTION || defined CONFIG_XTENSA_LOAD_STORE
|
||||||
|
#define STORE_EXCEPTION_HANDLER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined LOAD_EXCEPTION_HANDLER || defined STORE_EXCEPTION_HANDLER
|
||||||
#define ANY_EXCEPTION_HANDLER
|
#define ANY_EXCEPTION_HANDLER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XCHAL_HAVE_WINDOWED
|
#if XCHAL_HAVE_WINDOWED && defined CONFIG_MMU
|
||||||
#define UNALIGNED_USER_EXCEPTION
|
#define UNALIGNED_USER_EXCEPTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* First-level exception handler for unaligned exceptions.
|
|
||||||
*
|
|
||||||
* Note: This handler works only for kernel exceptions. Unaligned user
|
|
||||||
* access should get a seg fault.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Big and little endian 16-bit values are located in
|
/* Big and little endian 16-bit values are located in
|
||||||
* different halves of a register. HWORD_START helps to
|
* different halves of a register. HWORD_START helps to
|
||||||
* abstract the notion of extracting a 16-bit value from a
|
* abstract the notion of extracting a 16-bit value from a
|
||||||
|
@ -228,8 +226,6 @@ ENDPROC(fast_load_store)
|
||||||
#ifdef ANY_EXCEPTION_HANDLER
|
#ifdef ANY_EXCEPTION_HANDLER
|
||||||
ENTRY(fast_unaligned)
|
ENTRY(fast_unaligned)
|
||||||
|
|
||||||
#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
|
|
||||||
|
|
||||||
call0 .Lsave_and_load_instruction
|
call0 .Lsave_and_load_instruction
|
||||||
|
|
||||||
/* Analyze the instruction (load or store?). */
|
/* Analyze the instruction (load or store?). */
|
||||||
|
@ -244,8 +240,7 @@ ENTRY(fast_unaligned)
|
||||||
/* 'store indicator bit' not set, jump */
|
/* 'store indicator bit' not set, jump */
|
||||||
_bbci.l a4, OP1_SI_BIT + INSN_OP1, .Lload
|
_bbci.l a4, OP1_SI_BIT + INSN_OP1, .Lload
|
||||||
|
|
||||||
#endif
|
#ifdef STORE_EXCEPTION_HANDLER
|
||||||
#if XCHAL_UNALIGNED_STORE_EXCEPTION
|
|
||||||
|
|
||||||
/* Store: Jump to table entry to get the value in the source register.*/
|
/* Store: Jump to table entry to get the value in the source register.*/
|
||||||
|
|
||||||
|
@ -254,7 +249,7 @@ ENTRY(fast_unaligned)
|
||||||
addx8 a5, a6, a5
|
addx8 a5, a6, a5
|
||||||
jx a5 # jump into table
|
jx a5 # jump into table
|
||||||
#endif
|
#endif
|
||||||
#if XCHAL_UNALIGNED_LOAD_EXCEPTION
|
#ifdef LOAD_EXCEPTION_HANDLER
|
||||||
|
|
||||||
/* Load: Load memory address. */
|
/* Load: Load memory address. */
|
||||||
|
|
||||||
|
@ -328,7 +323,7 @@ ENTRY(fast_unaligned)
|
||||||
mov a14, a3 ; _j .Lexit; .align 8
|
mov a14, a3 ; _j .Lexit; .align 8
|
||||||
mov a15, a3 ; _j .Lexit; .align 8
|
mov a15, a3 ; _j .Lexit; .align 8
|
||||||
#endif
|
#endif
|
||||||
#if XCHAL_UNALIGNED_STORE_EXCEPTION
|
#ifdef STORE_EXCEPTION_HANDLER
|
||||||
.Lstore_table:
|
.Lstore_table:
|
||||||
l32i a3, a2, PT_AREG0; _j .Lstore_w; .align 8
|
l32i a3, a2, PT_AREG0; _j .Lstore_w; .align 8
|
||||||
mov a3, a1; _j .Lstore_w; .align 8 # fishy??
|
mov a3, a1; _j .Lstore_w; .align 8 # fishy??
|
||||||
|
@ -348,7 +343,6 @@ ENTRY(fast_unaligned)
|
||||||
mov a3, a15 ; _j .Lstore_w; .align 8
|
mov a3, a15 ; _j .Lstore_w; .align 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANY_EXCEPTION_HANDLER
|
|
||||||
/* We cannot handle this exception. */
|
/* We cannot handle this exception. */
|
||||||
|
|
||||||
.extern _kernel_exception
|
.extern _kernel_exception
|
||||||
|
@ -377,8 +371,8 @@ ENTRY(fast_unaligned)
|
||||||
|
|
||||||
2: movi a0, _user_exception
|
2: movi a0, _user_exception
|
||||||
jx a0
|
jx a0
|
||||||
#endif
|
|
||||||
#if XCHAL_UNALIGNED_STORE_EXCEPTION
|
#ifdef STORE_EXCEPTION_HANDLER
|
||||||
|
|
||||||
# a7: instruction pointer, a4: instruction, a3: value
|
# a7: instruction pointer, a4: instruction, a3: value
|
||||||
.Lstore_w:
|
.Lstore_w:
|
||||||
|
@ -444,7 +438,7 @@ ENTRY(fast_unaligned)
|
||||||
s32i a6, a4, 4
|
s32i a6, a4, 4
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANY_EXCEPTION_HANDLER
|
|
||||||
.Lexit:
|
.Lexit:
|
||||||
#if XCHAL_HAVE_LOOPS
|
#if XCHAL_HAVE_LOOPS
|
||||||
rsr a4, lend # check if we reached LEND
|
rsr a4, lend # check if we reached LEND
|
||||||
|
@ -539,7 +533,7 @@ ENTRY(fast_unaligned)
|
||||||
__src_b a4, a4, a5 # a4 has the instruction
|
__src_b a4, a4, a5 # a4 has the instruction
|
||||||
|
|
||||||
ret
|
ret
|
||||||
#endif
|
|
||||||
ENDPROC(fast_unaligned)
|
ENDPROC(fast_unaligned)
|
||||||
|
|
||||||
ENTRY(fast_unaligned_fixup)
|
ENTRY(fast_unaligned_fixup)
|
||||||
|
|
|
@ -102,7 +102,8 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = {
|
||||||
#endif
|
#endif
|
||||||
{ EXCCAUSE_INTEGER_DIVIDE_BY_ZERO, 0, do_div0 },
|
{ EXCCAUSE_INTEGER_DIVIDE_BY_ZERO, 0, do_div0 },
|
||||||
/* EXCCAUSE_PRIVILEGED unhandled */
|
/* EXCCAUSE_PRIVILEGED unhandled */
|
||||||
#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION
|
#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION || \
|
||||||
|
IS_ENABLED(CONFIG_XTENSA_LOAD_STORE)
|
||||||
#ifdef CONFIG_XTENSA_UNALIGNED_USER
|
#ifdef CONFIG_XTENSA_UNALIGNED_USER
|
||||||
{ EXCCAUSE_UNALIGNED, USER, fast_unaligned },
|
{ EXCCAUSE_UNALIGNED, USER, fast_unaligned },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -237,7 +237,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)
|
||||||
|
|
||||||
init += sizeof(TRANSPORT_TUNTAP_NAME) - 1;
|
init += sizeof(TRANSPORT_TUNTAP_NAME) - 1;
|
||||||
if (*init == ',') {
|
if (*init == ',') {
|
||||||
rem = split_if_spec(init + 1, &mac_str, &dev_name);
|
rem = split_if_spec(init + 1, &mac_str, &dev_name, NULL);
|
||||||
if (rem != NULL) {
|
if (rem != NULL) {
|
||||||
pr_err("%s: extra garbage on specification : '%s'\n",
|
pr_err("%s: extra garbage on specification : '%s'\n",
|
||||||
dev->name, rem);
|
dev->name, rem);
|
||||||
|
@ -540,6 +540,7 @@ static void iss_net_configure(int index, char *init)
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
pr_err("%s: error registering net device!\n", dev->name);
|
pr_err("%s: error registering net device!\n", dev->name);
|
||||||
platform_device_unregister(&lp->pdev);
|
platform_device_unregister(&lp->pdev);
|
||||||
|
/* dev is freed by the iss_net_pdev_release callback */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|
Loading…
Reference in New Issue