Message ID | 20240303185332.1408-2-shentey@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Simplify initialization of PC machines | expand |
On 3/3/24 19:53, Bernhard Beschow wrote: > Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking > the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, > pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the > link. Remove it again since it is not needed. Argh
On Sun, 3 Mar 2024 at 18:55, Bernhard Beschow <shentey@gmail.com> wrote: > > Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking > the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, > pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the > link. Remove it again since it is not needed. > > Fixes: 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" > Cc: Paolo Bonzini <pbonzini@redhat.com> > Signed-off-by: Bernhard Beschow <shentey@gmail.com> Ah, I did wonder when I was working with this code whether that rtc_state link was really necessary. We could now remove the rtc argument from the pc_cmos_init() function, because we can guarantee that it's in x86ms->rtc, which the function already has access to from its pcms argument. thanks -- PMM
Am 5. März 2024 15:57:08 UTC schrieb Peter Maydell <peter.maydell@linaro.org>: >On Sun, 3 Mar 2024 at 18:55, Bernhard Beschow <shentey@gmail.com> wrote: >> >> Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking >> the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, >> pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the >> link. Remove it again since it is not needed. >> >> Fixes: 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" >> Cc: Paolo Bonzini <pbonzini@redhat.com> >> Signed-off-by: Bernhard Beschow <shentey@gmail.com> > >Ah, I did wonder when I was working with this code whether that >rtc_state link was really necessary. > >We could now remove the rtc argument from the pc_cmos_init() >function, because we can guarantee that it's in x86ms->rtc, >which the function already has access to from its pcms argument. This series goes one step further and inlines this function. It would be a nice to get some feedback before the freeze. Best regards, Bernhard > >thanks >-- PMM
On Tue, Mar 05, 2024 at 07:54:40PM +0000, Bernhard Beschow wrote: > > > Am 5. März 2024 15:57:08 UTC schrieb Peter Maydell <peter.maydell@linaro.org>: > >On Sun, 3 Mar 2024 at 18:55, Bernhard Beschow <shentey@gmail.com> wrote: > >> > >> Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking > >> the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, > >> pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the > >> link. Remove it again since it is not needed. > >> > >> Fixes: 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" > >> Cc: Paolo Bonzini <pbonzini@redhat.com> > >> Signed-off-by: Bernhard Beschow <shentey@gmail.com> > > > >Ah, I did wonder when I was working with this code whether that > >rtc_state link was really necessary. > > > >We could now remove the rtc argument from the pc_cmos_init() > >function, because we can guarantee that it's in x86ms->rtc, > >which the function already has access to from its pcms argument. > > This series goes one step further and inlines this function. It would be a nice to get some feedback before the freeze. > > Best regards, > Bernhard I like it, I tagged it for merge. > > > >thanks > >-- PMM
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f5ff970acf..63b7583af0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -613,14 +613,6 @@ void pc_cmos_init(PCMachineState *pcms, mc146818rtc_set_cmos_data(s, 0x5c, val >> 8); mc146818rtc_set_cmos_data(s, 0x5d, val >> 16); - object_property_add_link(OBJECT(pcms), "rtc_state", - TYPE_ISA_DEVICE, - (Object **)&x86ms->rtc, - object_property_allow_set_link, - OBJ_PROP_LINK_STRONG); - object_property_set_link(OBJECT(pcms), "rtc_state", OBJECT(s), - &error_abort); - set_boot_dev(pcms, s, MACHINE(pcms)->boot_config.order, &error_fatal); val = 0;
Commit 99e1c1137b6f "hw/i386/pc: Populate RTC attribute directly" made linking the "rtc_state" property unnecessary and removed it. Commit 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" accidently reintroduced the link. Remove it again since it is not needed. Fixes: 84e945aad2d0 "vl, pc: turn -no-fd-bootchk into a machine property" Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Bernhard Beschow <shentey@gmail.com> --- hw/i386/pc.c | 8 -------- 1 file changed, 8 deletions(-)