Since the minimum architecture level has been raised to z10 a shorter
instruction sequence can be used to implement the OUTSIDE macro. This
also reduces the number of used registers within that macro to one.
Signed-off-by: Heiko Carstens <[email protected]>
---
arch/s390/kernel/entry.S | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index a6b45eaa3450..e1664b45090f 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -169,11 +169,9 @@ _LPP_OFFSET = __LC_LPP
* @outside_label: jump here if @reg is outside of [@start..@end)
*/
.macro OUTSIDE reg,start,end,outside_label
- lgr %r14,\reg
- larl %r13,\start
- slgr %r14,%r13
- lghi %r13,\end - \start
- clgr %r14,%r13
+ larl %r14,\start
+ slgrk %r14,\reg,%r14
+ clgfi %r14,\end - \start
jhe \outside_label
.endm
--
2.32.0
Hi Heiko,
I love your patch! Yet something to improve:
[auto build test ERROR on s390/features]
[also build test ERROR on tip/locking/core masahiroy-kbuild/for-next linus/master v5.18-rc6 next-20220512]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Heiko-Carstens/s390-allow-to-build-with-llvm-s-integrated-assembler/20220511-201054
base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
config: s390-randconfig-r003-20220512 (https://download.01.org/0day-ci/archive/20220513/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/ad8a0a6488ba252aaa84b813dee2c949ae59d88a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Heiko-Carstens/s390-allow-to-build-with-llvm-s-integrated-assembler/20220511-201054
git checkout ad8a0a6488ba252aaa84b813dee2c949ae59d88a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> <instantiation>:2:2: error: instruction requires: distinct-ops
slgrk %r14,%r9,%r14
^
arch/s390/kernel/entry.S:378:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,1f
^
<instantiation>:3:13: error: invalid operand for instruction
clgfi %r14,.Lsie_done - .Lsie_gmap
^
arch/s390/kernel/entry.S:378:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,1f
^
>> <instantiation>:2:2: error: instruction requires: distinct-ops
slgrk %r14,%r9,%r14
^
<instantiation>:12:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,0f
^
arch/s390/kernel/entry.S:488:1: note: while in macro instantiation
INT_HANDLER ext_int_handler,304,do_ext_irq
^
<instantiation>:3:13: error: invalid operand for instruction
clgfi %r14,.Lsie_done - .Lsie_gmap
^
<instantiation>:12:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,0f
^
arch/s390/kernel/entry.S:488:1: note: while in macro instantiation
INT_HANDLER ext_int_handler,304,do_ext_irq
^
>> <instantiation>:2:2: error: instruction requires: distinct-ops
slgrk %r14,%r9,%r14
^
<instantiation>:12:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,0f
^
arch/s390/kernel/entry.S:489:1: note: while in macro instantiation
INT_HANDLER io_int_handler,368,do_io_irq
^
<instantiation>:3:13: error: invalid operand for instruction
clgfi %r14,.Lsie_done - .Lsie_gmap
^
<instantiation>:12:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,0f
^
arch/s390/kernel/entry.S:489:1: note: while in macro instantiation
INT_HANDLER io_int_handler,368,do_io_irq
^
>> <instantiation>:2:2: error: instruction requires: distinct-ops
slgrk %r14,%r9,%r14
^
arch/s390/kernel/entry.S:554:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,6f
^
<instantiation>:3:13: error: invalid operand for instruction
clgfi %r14,.Lsie_done - .Lsie_gmap
^
arch/s390/kernel/entry.S:554:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,6f
^
>> <instantiation>:2:2: error: instruction requires: distinct-ops
slgrk %r14,%r9,%r14
^
arch/s390/kernel/entry.S:555:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_entry,.Lsie_skip,4f
^
<instantiation>:3:13: error: invalid operand for instruction
clgfi %r14,.Lsie_skip - .Lsie_entry
^
arch/s390/kernel/entry.S:555:2: note: while in macro instantiation
OUTSIDE %r9,.Lsie_entry,.Lsie_skip,4f
^
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On Thu, May 12, 2022 at 11:00:31AM -0700, Nick Desaulniers wrote:
> On Thu, May 12, 2022 at 10:22 AM Heiko Carstens <[email protected]> wrote:
> >
> > On Wed, May 11, 2022 at 02:05:27PM +0200, Heiko Carstens wrote:
> > > Since the minimum architecture level has been raised to z10 a shorter
> > > instruction sequence can be used to implement the OUTSIDE macro. This
> > > also reduces the number of used registers within that macro to one.
> > >
> > > Signed-off-by: Heiko Carstens <[email protected]>
> > > ---
> > > arch/s390/kernel/entry.S | 8 +++-----
> > > 1 file changed, 3 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> > > index a6b45eaa3450..e1664b45090f 100644
> > > --- a/arch/s390/kernel/entry.S
> > > +++ b/arch/s390/kernel/entry.S
> > > @@ -169,11 +169,9 @@ _LPP_OFFSET = __LC_LPP
> > > * @outside_label: jump here if @reg is outside of [@start..@end)
> > > */
> > > .macro OUTSIDE reg,start,end,outside_label
> > > - lgr %r14,\reg
> > > - larl %r13,\start
> > > - slgr %r14,%r13
> > > - lghi %r13,\end - \start
> > > - clgr %r14,%r13
> > > + larl %r14,\start
> > > + slgrk %r14,\reg,%r14
> > > + clgfi %r14,\end - \start
> >
> > Clever me.. slgrk was added with z196, and not z10.
> > So dropping this patch.
>
> How do the version numbers work for SystemZ? Is there a list/reference
> you could link me to? If it's too deep a rabbit hole, then nevermind,
> but I would like to learn a little more about the architecture.
If it is only for the machine generations the following links might help:
https://www.ibm.com/support/pages/ibm-mainframe-life-cycle-history
(see linked pdf for list of machine names)
https://en.wikipedia.org/wiki/IBM_Z
There might be better sources, but that's all I could find right now.
On Wed, May 11, 2022 at 02:05:27PM +0200, Heiko Carstens wrote:
> Since the minimum architecture level has been raised to z10 a shorter
> instruction sequence can be used to implement the OUTSIDE macro. This
> also reduces the number of used registers within that macro to one.
>
> Signed-off-by: Heiko Carstens <[email protected]>
> ---
> arch/s390/kernel/entry.S | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> index a6b45eaa3450..e1664b45090f 100644
> --- a/arch/s390/kernel/entry.S
> +++ b/arch/s390/kernel/entry.S
> @@ -169,11 +169,9 @@ _LPP_OFFSET = __LC_LPP
> * @outside_label: jump here if @reg is outside of [@start..@end)
> */
> .macro OUTSIDE reg,start,end,outside_label
> - lgr %r14,\reg
> - larl %r13,\start
> - slgr %r14,%r13
> - lghi %r13,\end - \start
> - clgr %r14,%r13
> + larl %r14,\start
> + slgrk %r14,\reg,%r14
> + clgfi %r14,\end - \start
Clever me.. slgrk was added with z196, and not z10.
So dropping this patch.
Hi Heiko,
I love your patch! Yet something to improve:
[auto build test ERROR on s390/features]
[also build test ERROR on tip/locking/core masahiroy-kbuild/for-next linus/master v5.18-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Heiko-Carstens/s390-allow-to-build-with-llvm-s-integrated-assembler/20220511-201054
base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
config: s390-randconfig-p001-20220512 (https://download.01.org/0day-ci/archive/20220512/[email protected]/config)
compiler: s390-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/ad8a0a6488ba252aaa84b813dee2c949ae59d88a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Heiko-Carstens/s390-allow-to-build-with-llvm-s-integrated-assembler/20220511-201054
git checkout ad8a0a6488ba252aaa84b813dee2c949ae59d88a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash arch/s390/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
arch/s390/kernel/entry.S: Assembler messages:
>> arch/s390/kernel/entry.S:378: Error: Unrecognized opcode: `slgrk'
arch/s390/kernel/entry.S:488: Error: Unrecognized opcode: `slgrk'
arch/s390/kernel/entry.S:489: Error: Unrecognized opcode: `slgrk'
arch/s390/kernel/entry.S:554: Error: Unrecognized opcode: `slgrk'
arch/s390/kernel/entry.S:555: Error: Unrecognized opcode: `slgrk'
vim +378 arch/s390/kernel/entry.S
26a374ae7af8d7 arch/s390/kernel/entry.S Martin Schwidefsky 2019-01-17 359
^1da177e4c3f41 arch/s390/kernel/entry64.S Linus Torvalds 2005-04-16 360 /*
^1da177e4c3f41 arch/s390/kernel/entry64.S Linus Torvalds 2005-04-16 361 * Program check handler routine
^1da177e4c3f41 arch/s390/kernel/entry64.S Linus Torvalds 2005-04-16 362 */
^1da177e4c3f41 arch/s390/kernel/entry64.S Linus Torvalds 2005-04-16 363
144d634a21caff arch/s390/kernel/entry64.S Jan Glauber 2011-07-24 364 ENTRY(pgm_check_handler)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 365 stpt __LC_SYS_ENTER_TIMER
d768bd892fc8f0 arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 366 BPOFF
c5328901aa1db1 arch/s390/kernel/entry64.S Martin Schwidefsky 2011-12-27 367 stmg %r8,%r15,__LC_SAVE_AREA_SYNC
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 368 lg %r12,__LC_CURRENT
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 369 lghi %r10,0
c5328901aa1db1 arch/s390/kernel/entry64.S Martin Schwidefsky 2011-12-27 370 lmg %r8,%r9,__LC_PGM_OLD_PSW
87d5986345219a arch/s390/kernel/entry.S Heiko Carstens 2020-11-16 371 tmhh %r8,0x0001 # coming from user space?
87d5986345219a arch/s390/kernel/entry.S Heiko Carstens 2020-11-16 372 jno .Lpgm_skip_asce
87d5986345219a arch/s390/kernel/entry.S Heiko Carstens 2020-11-16 373 lctlg %c1,%c1,__LC_KERNEL_ASCE
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 374 j 3f # -> fault in user space
87d5986345219a arch/s390/kernel/entry.S Heiko Carstens 2020-11-16 375 .Lpgm_skip_asce:
d0fc41071a6884 arch/s390/kernel/entry.S Martin Schwidefsky 2015-06-22 376 #if IS_ENABLED(CONFIG_KVM)
0a5e2ec2647737 arch/s390/kernel/entry.S Martin Schwidefsky 2017-10-05 377 # cleanup critical section for program checks in sie64a
b5415c8f975506 arch/s390/kernel/entry.S Alexander Gordeev 2021-06-07 @378 OUTSIDE %r9,.Lsie_gmap,.Lsie_done,1f
fbbdfca5c5535f arch/s390/kernel/entry.S Alexander Gordeev 2021-06-18 379 SIEEXIT
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 380 lghi %r10,_PIF_GUEST_FAULT
d0fc41071a6884 arch/s390/kernel/entry.S Martin Schwidefsky 2015-06-22 381 #endif
0b38b5e1d0e2f3 arch/s390/kernel/entry.S Sven Schnelle 2020-01-22 382 1: tmhh %r8,0x4000 # PER bit set in old PSW ?
0b38b5e1d0e2f3 arch/s390/kernel/entry.S Sven Schnelle 2020-01-22 383 jnz 2f # -> enabled, can't be a double fault
c5328901aa1db1 arch/s390/kernel/entry64.S Martin Schwidefsky 2011-12-27 384 tm __LC_PGM_ILC+3,0x80 # check for per exception
86ed42f401cb8f arch/s390/kernel/entry64.S Martin Schwidefsky 2014-12-03 385 jnz .Lpgm_svcper # -> single stepped svc
0b38b5e1d0e2f3 arch/s390/kernel/entry.S Sven Schnelle 2020-01-22 386 2: CHECK_STACK __LC_SAVE_AREA_SYNC
dc7ee00d4771b3 arch/s390/kernel/entry64.S Martin Schwidefsky 2013-04-24 387 aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 388 # CHECK_VMAP_STACK branches to stack_overflow or 4f
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 389 CHECK_VMAP_STACK __LC_SAVE_AREA_SYNC,4f
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 390 3: BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
c5328901aa1db1 arch/s390/kernel/entry64.S Martin Schwidefsky 2011-12-27 391 lg %r15,__LC_KERNEL_STACK
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 392 4: la %r11,STACK_FRAME_OVERHEAD(%r15)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 393 stg %r10,__PT_FLAGS(%r11)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 394 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
c5328901aa1db1 arch/s390/kernel/entry64.S Martin Schwidefsky 2011-12-27 395 stmg %r0,%r7,__PT_R0(%r11)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 396 mvc __PT_R8(64,%r11),__LC_SAVE_AREA_SYNC
3b051e89da70d4 arch/s390/kernel/entry.S Sven Schnelle 2021-04-07 397 mvc __PT_LAST_BREAK(8,%r11),__LC_PGM_LAST_BREAK
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 398 stmg %r8,%r9,__PT_PSW(%r11)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 399
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 400 # clear user controlled registers to prevent speculative use
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 401 xgr %r0,%r0
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 402 xgr %r1,%r1
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 403 xgr %r3,%r3
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 404 xgr %r4,%r4
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 405 xgr %r5,%r5
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 406 xgr %r6,%r6
7041d28115e91f arch/s390/kernel/entry.S Martin Schwidefsky 2018-01-16 407 xgr %r7,%r7
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 408 lgr %r2,%r11
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 409 brasl %r14,__do_pgm_check
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 410 tmhh %r8,0x0001 # returning to user space?
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 411 jno .Lpgm_exit_kernel
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 412 lctlg %c1,%c1,__LC_USER_ASCE
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 413 BPEXIT __TI_flags(%r12),_TIF_ISOLATE_BP
0cd9b7230cc57b arch/s390/kernel/entry.S Heiko Carstens 2020-11-11 414 stpt __LC_EXIT_TIMER
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 415 .Lpgm_exit_kernel:
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 416 mvc __LC_RETURN_PSW(16),STACK_FRAME_OVERHEAD+__PT_PSW(%r15)
3b051e89da70d4 arch/s390/kernel/entry.S Sven Schnelle 2021-04-07 417 LBEAR STACK_FRAME_OVERHEAD+__PT_LAST_BREAK(%r15)
56e62a73702836 arch/s390/kernel/entry.S Sven Schnelle 2020-11-21 418 lmg %r0,%r15,STACK_FRAME_OVERHEAD+__PT_R0(%r15)
3b051e89da70d4 arch/s390/kernel/entry.S Sven Schnelle 2021-04-07 419 LPSWEY __LC_RETURN_PSW,__LC_RETURN_LPSWE
^1da177e4c3f41 arch/s390/kernel/entry64.S Linus Torvalds 2005-04-16 420
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On Thu, May 12, 2022 at 12:15 PM Heiko Carstens <[email protected]> wrote:
>
> On Thu, May 12, 2022 at 11:00:31AM -0700, Nick Desaulniers wrote:
> > On Thu, May 12, 2022 at 10:22 AM Heiko Carstens <[email protected]> wrote:
> > >
> > > On Wed, May 11, 2022 at 02:05:27PM +0200, Heiko Carstens wrote:
> > > > Since the minimum architecture level has been raised to z10 a shorter
> > > > instruction sequence can be used to implement the OUTSIDE macro. This
> > > > also reduces the number of used registers within that macro to one.
> > > >
> > > > Signed-off-by: Heiko Carstens <[email protected]>
> > > > ---
> > > > arch/s390/kernel/entry.S | 8 +++-----
> > > > 1 file changed, 3 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> > > > index a6b45eaa3450..e1664b45090f 100644
> > > > --- a/arch/s390/kernel/entry.S
> > > > +++ b/arch/s390/kernel/entry.S
> > > > @@ -169,11 +169,9 @@ _LPP_OFFSET = __LC_LPP
> > > > * @outside_label: jump here if @reg is outside of [@start..@end)
> > > > */
> > > > .macro OUTSIDE reg,start,end,outside_label
> > > > - lgr %r14,\reg
> > > > - larl %r13,\start
> > > > - slgr %r14,%r13
> > > > - lghi %r13,\end - \start
> > > > - clgr %r14,%r13
> > > > + larl %r14,\start
> > > > + slgrk %r14,\reg,%r14
> > > > + clgfi %r14,\end - \start
> > >
> > > Clever me.. slgrk was added with z196, and not z10.
> > > So dropping this patch.
> >
> > How do the version numbers work for SystemZ? Is there a list/reference
> > you could link me to? If it's too deep a rabbit hole, then nevermind,
> > but I would like to learn a little more about the architecture.
>
> If it is only for the machine generations the following links might help:
>
> https://www.ibm.com/support/pages/ibm-mainframe-life-cycle-history
> (see linked pdf for list of machine names)
>
> https://en.wikipedia.org/wiki/IBM_Z
>
> There might be better sources, but that's all I could find right now.
Interesting! Thanks for the links.
I'm guessing in our CI that we should probably pursue testing some of
the newer revisions. Wasn't defconfig updated from z10 to z12 not too
long ago?
So probably
CONFIG_MARCH_Z13
CONFIG_MARCH_Z14
CONFIG_MARCH_Z15
CONFIG_MARCH_Z16
All look like they're still "supported" (and I'm guessing
CONFIG_MARCH_Z10 and CONFIG_MARCH_Z196 are not too much burden to
continue to maintain kernel support for), with a higher emphasis
perhaps on z15+z16?
--
Thanks,
~Nick Desaulniers
On Thu, May 12, 2022 at 12:25:01PM -0700, Nick Desaulniers wrote:
> Interesting! Thanks for the links.
> I'm guessing in our CI that we should probably pursue testing some of
> the newer revisions. Wasn't defconfig updated from z10 to z12 not too
> long ago?
Yes, that was 1.5 years ago (commit ac94a2911e84 ("s390: update defconfigs")).
> So probably
> CONFIG_MARCH_Z13
> CONFIG_MARCH_Z14
> CONFIG_MARCH_Z15
> CONFIG_MARCH_Z16
>
> All look like they're still "supported" (and I'm guessing
> CONFIG_MARCH_Z10 and CONFIG_MARCH_Z196 are not too much burden to
> continue to maintain kernel support for), with a higher emphasis
> perhaps on z15+z16?
That makes sense. However for the kernel it doesn't make a difference
if compiled for z15 or z16 - there were no general instructions added
with z16 that would make any difference for the kernel.
All new instructions that came with z16 are either only relevant for
user space, or used via .insn notation in the kernel, and only used if
some hardware feature is present.
On Thu, May 12, 2022 at 10:22 AM Heiko Carstens <[email protected]> wrote:
>
> On Wed, May 11, 2022 at 02:05:27PM +0200, Heiko Carstens wrote:
> > Since the minimum architecture level has been raised to z10 a shorter
> > instruction sequence can be used to implement the OUTSIDE macro. This
> > also reduces the number of used registers within that macro to one.
> >
> > Signed-off-by: Heiko Carstens <[email protected]>
> > ---
> > arch/s390/kernel/entry.S | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
> > index a6b45eaa3450..e1664b45090f 100644
> > --- a/arch/s390/kernel/entry.S
> > +++ b/arch/s390/kernel/entry.S
> > @@ -169,11 +169,9 @@ _LPP_OFFSET = __LC_LPP
> > * @outside_label: jump here if @reg is outside of [@start..@end)
> > */
> > .macro OUTSIDE reg,start,end,outside_label
> > - lgr %r14,\reg
> > - larl %r13,\start
> > - slgr %r14,%r13
> > - lghi %r13,\end - \start
> > - clgr %r14,%r13
> > + larl %r14,\start
> > + slgrk %r14,\reg,%r14
> > + clgfi %r14,\end - \start
>
> Clever me.. slgrk was added with z196, and not z10.
> So dropping this patch.
How do the version numbers work for SystemZ? Is there a list/reference
you could link me to? If it's too deep a rabbit hole, then nevermind,
but I would like to learn a little more about the architecture.
--
Thanks,
~Nick Desaulniers