qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/20] nubus-bridge: embed the NubusBus object directly withi


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 16/20] nubus-bridge: embed the NubusBus object directly within nubus-bridge
Date: Sun, 12 Sep 2021 19:43:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 9/12/21 9:49 AM, Mark Cave-Ayland wrote:
> Since nubus-bridge is a container for NubusBus then it should be embedded
> directly within the bridge device using qbus_create_inplace().
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/m68k/q800.c              | 2 +-
>  hw/nubus/mac-nubus-bridge.c | 7 ++++---
>  hw/nubus/nubus-bridge.c     | 3 ++-
>  include/hw/nubus/nubus.h    | 2 +-
>  4 files changed, 8 insertions(+), 6 deletions(-)

> diff --git a/hw/nubus/mac-nubus-bridge.c b/hw/nubus/mac-nubus-bridge.c
> index c16cfc4ab3..c23d5d508d 100644
> --- a/hw/nubus/mac-nubus-bridge.c
> +++ b/hw/nubus/mac-nubus-bridge.c
> @@ -18,18 +18,19 @@ static void mac_nubus_bridge_init(Object *obj)
>      MacNubusBridge *s = MAC_NUBUS_BRIDGE(obj);
>      NubusBridge *nb = NUBUS_BRIDGE(obj);
>      SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
> +    NubusBus *bus = &nb->bus;
>  
>      /* Macintosh only has slots 0x9 to 0xe available */
> -    nb->bus->slot_available_mask = 0x7e00;
> +    bus->slot_available_mask = 0x7e00;

Re-reading I'd use MAKE_64BIT_MASK(9, 6)
or eventually MAKE_64BIT_MASK(9, 0xe - 0x6 + 1).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]