qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, cohuck@redhat.com, david@redhat.com
Subject: Re: [PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c
Date: Tue, 21 Jul 2020 09:00:34 +0200	[thread overview]
Message-ID: <6370ed83-902b-4607-4c88-5486e7a2573e@redhat.com> (raw)
In-Reply-To: <20200715094045.381984-6-frankja@linux.ibm.com>

On 15/07/2020 11.40, Janosch Frank wrote:
> Let's replace some more constant offsets with references into the
> lowcore for better readability.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  pc-bios/s390-ccw/dasd-ipl.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
> index 0543334ed4..9ab9a0fa12 100644
> --- a/pc-bios/s390-ccw/dasd-ipl.c
> +++ b/pc-bios/s390-ccw/dasd-ipl.c
> @@ -120,8 +120,8 @@ static void run_readipl(SubChannelId schid, uint16_t cutype)
>   */
>  static void check_ipl1(void)
>  {
> -    Ccw0 *ccwread = (Ccw0 *)0x08;
> -    Ccw0 *ccwtic = (Ccw0 *)0x10;
> +    Ccw0 *ccwread = (Ccw0 *) &lowcore->ccw1;
> +    Ccw0 *ccwtic = (Ccw0 *) &lowcore->ccw2;
>  
>      if (ccwread->cmd_code != CCW_CMD_DASD_READ ||
>          ccwtic->cmd_code != CCW_CMD_TIC) {
> @@ -143,15 +143,15 @@ static void check_ipl2(uint32_t ipl2_addr)
>  
>  static uint32_t read_ipl2_addr(void)
>  {
> -    Ccw0 *ccwtic = (Ccw0 *)0x10;
> +    Ccw0 *ccwtic = (Ccw0 *)&lowcore->ccw2;
>  
>      return ccwtic->cda;
>  }
>  
>  static void ipl1_fixup(void)
>  {
> -    Ccw0 *ccwSeek = (Ccw0 *) 0x08;
> -    Ccw0 *ccwSearchID = (Ccw0 *) 0x10;
> +    Ccw0 *ccwSeek = (Ccw0 *) &lowcore->ccw1;
> +    Ccw0 *ccwSearchID = (Ccw0 *) &lowcore->ccw2;
>      Ccw0 *ccwSearchTic = (Ccw0 *) 0x18;
>      Ccw0 *ccwRead = (Ccw0 *) 0x20;
>      CcwSeekData *seekData = (CcwSeekData *) 0x30;
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2020-07-21  7:02 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 [this message]
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
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=6370ed83-902b-4607-4c88-5486e7a2573e@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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).