All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Artyom Tarasenko <atar4qemu@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/isa/i82378.c: use 1900 as a base year
Date: Sun, 14 Apr 2019 19:01:18 +0200	[thread overview]
Message-ID: <29f79530-fd9e-ea60-8cf3-df593b855f10@reactos.org> (raw)
In-Reply-To: <1555103178-21894-5-git-send-email-atar4qemu@gmail.com>

Le 12/04/2019 à 23:06, Artyom Tarasenko a écrit :
> AIX 5.1 expects the base year to be 1900. Adjust accordingly.
> 
> Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
> ---
>   hw/isa/i82378.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
> index a5d67bc..546c928 100644
> --- a/hw/isa/i82378.c
> +++ b/hw/isa/i82378.c
> @@ -107,7 +107,9 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
>       isa = isa_create_simple(isabus, "i82374");
>   
>       /* timer */
> -    isa_create_simple(isabus, TYPE_MC146818_RTC);
> +    isa = isa_create(isabus, TYPE_MC146818_RTC);
> +    qdev_prop_set_int32(DEVICE(isa), "base_year", 1900);
> +    qdev_init_nofail(DEVICE(isa));

I am not sure the base_year should be hardcoded in i82378. I can assume other machines with a i82378 can have another base_year.
Maybe you can you add a base_year property to i82378, and forward it to mc146818 with object_property_add_alias?
Then, change 40p machine to set it to 1900, without changing it for prep machine.

>   }
>   
>   static void i82378_init(Object *obj)
> 

Hervé

  reply	other threads:[~2019-04-14 17:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 21:06 [Qemu-devel] [PATCH 0/4] Improve 40p, make AIX 5.1 boot Artyom Tarasenko
2019-04-12 21:06 ` [Qemu-devel] [PATCH 1/4] lsi53c895a: hide 53c895a registers in 53c810 Artyom Tarasenko
2019-04-12 21:06   ` Artyom Tarasenko
2019-04-14 15:43   ` Hervé Poussineau
2019-04-14 15:43     ` Hervé Poussineau
2019-04-14 18:36     ` Artyom Tarasenko
2019-04-14 18:36       ` Artyom Tarasenko
2019-04-15  9:21       ` Paolo Bonzini
2019-04-15  9:21         ` Paolo Bonzini
2019-04-12 21:06 ` [Qemu-devel] [PATCH 2/4] 40p and prep: implement PCI bus mastering Artyom Tarasenko
2019-04-14 15:43   ` Hervé Poussineau
2019-04-12 21:06 ` [Qemu-devel] [PATCH 3/4] target/ppc: improve performance of large BAT invalidations Artyom Tarasenko
2019-04-14 15:43   ` Hervé Poussineau
2019-04-15  0:20   ` David Gibson
2019-04-15  0:20     ` David Gibson
2019-04-12 21:06 ` [Qemu-devel] [PATCH 4/4] hw/isa/i82378.c: use 1900 as a base year Artyom Tarasenko
2019-04-14 17:01   ` Hervé Poussineau [this message]
2019-04-14 18:53     ` Artyom Tarasenko
2019-04-14 18:53       ` Artyom Tarasenko
2019-04-14 21:24       ` Hervé Poussineau
2019-04-14 21:24         ` Hervé Poussineau
2019-04-15 10:36         ` Philippe Mathieu-Daudé
2019-04-15 10:45           ` Artyom Tarasenko
2019-04-15 10:45             ` Artyom Tarasenko

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=29f79530-fd9e-ea60-8cf3-df593b855f10@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=atar4qemu@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.