qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	qemu-devel@nongnu.org
Cc: cohuck@redhat.com, david@redhat.com
Subject: Re: [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S
Date: Wed, 22 Jul 2020 08:47:42 +0200	[thread overview]
Message-ID: <fed4d927-a404-bf40-7f69-a5e457a3c5f0@de.ibm.com> (raw)
In-Reply-To: <0692c47b-6c3b-fdd8-72af-66c337a434e2@redhat.com>



On 21.07.20 09:05, Thomas Huth wrote:
> On 15/07/2020 11.40, Janosch Frank wrote:
[..]
>>  #ifndef S390_ARCH_H
>>  #define S390_ARCH_H
>>  
>> +/* s390 psw bit masks */
>> +#define PSW_MASK_EXT        0x0100000000000000UL
>> +#define PSW_MASK_IOINT      0x0200000000000000ULL
>> +#define PSW_MASK_SHORTPSW   0x0008000000000000ULL
>> +#define PSW_MASK_WAIT       0x0002000000000000ULL
>> +#define PSW_MASK_EAMODE     0x0000000100000000ULL
>> +#define PSW_MASK_BAMODE     0x0000000080000000ULL
>> +#define PSW_MASK_SHORT_ADDR 0x000000007fffffffULL
>> +#define PSW_MASK_64         (PSW_MASK_EAMODE | PSW_MASK_BAMODE)
>> +#define PSW_MASK_DWAIT      (PSW_MASK_64 | PSW_MASK_WAIT)
>> +#define PSW_MASK_EWAIT      (PSW_MASK_DWAIT | PSW_MASK_IOINT | PSW_MASK_EXT)
>> +
>> +#ifndef __ASSEMBLER__
>> +
>>  typedef struct PSW {
>>      uint64_t mask;
>>      uint64_t addr;
>> @@ -24,15 +38,6 @@ typedef struct PSWLegacy {
>>  } __attribute__ ((aligned(8))) PSWLegacy;
>>  _Static_assert(sizeof(struct PSWLegacy) == 8, "PSWLegacy size incorrect");
>>  
>> -/* s390 psw bit masks */
>> -#define PSW_MASK_IOINT      0x0200000000000000ULL
>> -#define PSW_MASK_SHORTPSW   0x0008000000000000ULL
>> -#define PSW_MASK_WAIT       0x0002000000000000ULL
>> -#define PSW_MASK_EAMODE     0x0000000100000000ULL
>> -#define PSW_MASK_BAMODE     0x0000000080000000ULL
>> -#define PSW_MASK_SHORT_ADDR 0x000000007fffffffULL
>> -#define PSW_MASK_64         (PSW_MASK_EAMODE | PSW_MASK_BAMODE)
>> -
>>  /* Low core mapping */
>>  typedef struct LowCore {
>>      /* prefix area: defined by architecture */
>> @@ -107,5 +112,5 @@ static inline uint32_t store_prefix(void)
>>      asm volatile("stpx %0" : "=m" (address));
>>      return address;
>>  }
>> -
>> +#endif /* !__ASSEMBLER__ */
>>  #endif
>> diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S
>> index ce519300a1..01c4c21b26 100644
>> --- a/pc-bios/s390-ccw/start.S
>> +++ b/pc-bios/s390-ccw/start.S
>> @@ -9,6 +9,7 @@
>>   * your option) any later version. See the COPYING file in the top-level
>>   * directory.
>>   */
>> +#include "s390-arch.h"
>>  
>>          .globl _start
>>  _start:
>> @@ -108,10 +109,10 @@ io_new_code:
>>  
>>          .align  8
>>  disabled_wait_psw:
>> -        .quad   0x0002000180000000,0x0000000000000000
>> +        .quad   PSW_MASK_DWAIT, 0x0000000000000000
>>  enabled_wait_psw:
>> -        .quad   0x0302000180000000,0x0000000000000000
>> +        .quad   PSW_MASK_EWAIT, 0x0000000000000000
>>  external_new_mask:
>> -        .quad   0x0000000180000000
>> +        .quad   PSW_MASK_64

I find the old numbers EASIER to parse (as I know how a PSW looks like) than a
macro that I first have to look up.

>>  io_new_mask:
>> -        .quad   0x0000000180000000
>> +        .quad   PSW_MASK_64
>>
> 
> This fails to compile with older versions of binutils (e.g. the ones in
> RHEL7):
> 
> pc-bios/s390-ccw/start.S: Assembler messages:
> pc-bios/s390-ccw/start.S:108: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:108: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:108: Error: junk at end of line, first
> unrecognized character is `L'
> pc-bios/s390-ccw/start.S:110: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:110: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:110: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:110: Error: junk at end of line, first
> unrecognized character is `L'
> pc-bios/s390-ccw/start.S:112: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:112: Error: junk at end of line, first
> unrecognized character is `L'
> pc-bios/s390-ccw/start.S:114: Error: found 'L', expected: ')'
> pc-bios/s390-ccw/start.S:114: Error: junk at end of line, first
> unrecognized character is `L'
> 
> You either need some macro-magic for this, or simply drop the patch.

So I suggest to drop this patch. 


  reply	other threads:[~2020-07-22  6:48 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15  9:40 [PATCH 0/7] pc-bios: s390x: Cleanup part 2 Janosch Frank
2020-07-15  9:40 ` [PATCH 1/7] pc-bios: s390x: Fix bootmap.c zipl component entry data handling Janosch Frank
2020-07-17 15:05   ` Thomas Huth
2020-07-22  6:50   ` Christian Borntraeger
2020-07-22  7:30     ` Janosch Frank
2020-07-22  7:33       ` Christian Borntraeger
2020-07-22  8:06         ` Janosch Frank
2020-07-15  9:40 ` [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code Janosch Frank
2020-07-17 15:13   ` Thomas Huth
2020-07-21 13:07     ` Janosch Frank
2020-07-21 13:54     ` Christian Borntraeger
2020-07-15  9:40 ` [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes Janosch Frank
2020-07-20 11:45   ` Thomas Huth
2020-07-20 12:16     ` Janosch Frank
2020-07-21  7:10       ` Thomas Huth
2020-07-15  9:40 ` [PATCH 4/7] pc-bios: s390x: Rework data initialization Janosch Frank
2020-07-20 11:56   ` Thomas Huth
2020-07-20 12:10     ` Janosch Frank
2020-07-15  9:40 ` [PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c Janosch Frank
2020-07-21  7:00   ` Thomas Huth
2020-07-15  9:40 ` [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S Janosch Frank
2020-07-21  7:05   ` Thomas Huth
2020-07-22  6:47     ` Christian Borntraeger [this message]
2020-07-15  9:40 ` [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once Janosch Frank
2020-07-15 13:13   ` Janosch Frank
2020-07-15 13:16     ` Christian Borntraeger
2020-07-15 14:08       ` [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup Janosch Frank
2020-07-21  7:03         ` Thomas Huth
2020-07-22  6:43         ` Christian Borntraeger
2020-07-22  7:24           ` Janosch Frank
2020-07-22  7:39             ` Christian Borntraeger
2020-07-22  8:05               ` Janosch Frank
2020-08-27  9:20                 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fed4d927-a404-bf40-7f69-a5e457a3c5f0@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).