public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Yodel Eldar <yodel.eldar@yodel.dev>, qemu-devel@nongnu.org
Subject: Re: [PATCH 01/15] hw/alpha/typhoon: Fix whitespace and block comment style problems
Date: Thu, 26 Mar 2026 10:11:05 +1000	[thread overview]
Message-ID: <54c17a64-a7dc-436a-b2a8-724537f6e68c@linaro.org> (raw)
In-Reply-To: <20260310-qomify-alpha-v1-1-4375b00a85ff@yodel.dev>

On 3/11/26 08:31, Yodel Eldar wrote:
> Eliminate trailing whitespaces.
> 
> Use leading "/*", internal "*", and trailing "*/" for block comments.
> 
> Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
> ---
>   hw/alpha/typhoon.c | 84 +++++++++++++++++++++++++++++++++---------------------
>   1 file changed, 52 insertions(+), 32 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index 7722d4fd00..f392772500 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -34,7 +34,7 @@ typedef struct TyphoonWindow {
>       uint64_t wsm;
>       uint64_t tba;
>   } TyphoonWindow;
> -
> +
>   typedef struct TyphoonPchip {
>       MemoryRegion region;
>       MemoryRegion reg_iack;
> @@ -84,8 +84,10 @@ static MemTxResult cchip_read(void *opaque, hwaddr addr,
>       switch (addr) {
>       case 0x0000:
>           /* CSC: Cchip System Configuration Register.  */
> -        /* All sorts of data here; probably the only thing relevant is
> -           PIP<14> Pchip 1 Present = 0.  */
> +        /*
> +         * All sorts of data here; probably the only thing relevant is
> +         * PIP<14> Pchip 1 Present = 0.
> +         */
>           break;
>   
>       case 0x0040:
> @@ -188,7 +190,7 @@ static MemTxResult cchip_read(void *opaque, hwaddr addr,
>       case 0x0780:
>           /* PWR: Power Management Control.   */
>           break;
> -
> +
>       case 0x0c00: /* CMONCTLA */
>       case 0x0c40: /* CMONCTLB */
>       case 0x0c80: /* CMONCNT01 */
> @@ -440,7 +442,7 @@ static MemTxResult cchip_write(void *opaque, hwaddr addr,
>       case 0x0780:
>           /* PWR: Power Management Control.   */
>           break;
> -
> +
>       case 0x0c00: /* CMONCTLA */
>       case 0x0c40: /* CMONCTLB */
>       case 0x0c80: /* CMONCNT01 */
> @@ -605,8 +607,10 @@ static const MemoryRegionOps pchip_ops = {
>       },
>   };
>   
> -/* A subroutine of typhoon_translate_iommu that builds an IOMMUTLBEntry
> -   using the given translated address and mask.  */
> +/*
> + * A subroutine of typhoon_translate_iommu that builds an IOMMUTLBEntry
> + * using the given translated address and mask.
> + */
>   static bool make_iommu_tlbe(hwaddr taddr, hwaddr mask, IOMMUTLBEntry *ret)
>   {
>       *ret = (IOMMUTLBEntry) {
> @@ -618,8 +622,10 @@ static bool make_iommu_tlbe(hwaddr taddr, hwaddr mask, IOMMUTLBEntry *ret)
>       return true;
>   }
>   
> -/* A subroutine of typhoon_translate_iommu that handles scatter-gather
> -   translation, given the address of the PTE.  */
> +/*
> + * A subroutine of typhoon_translate_iommu that handles scatter-gather
> + * translation, given the address of the PTE.
> + */
>   static bool pte_translate(hwaddr pte_addr, IOMMUTLBEntry *ret)
>   {
>       uint64_t pte = address_space_ldq_le(&address_space_memory, pte_addr,
> @@ -633,8 +639,10 @@ static bool pte_translate(hwaddr pte_addr, IOMMUTLBEntry *ret)
>       return make_iommu_tlbe((pte & 0x3ffffe) << 12, 0x1fff, ret);
>   }
>   
> -/* A subroutine of typhoon_translate_iommu that handles one of the
> -   four single-address-cycle translation windows.  */
> +/*
> + * A subroutine of typhoon_translate_iommu that handles one of the
> + * four single-address-cycle translation windows.
> + */
>   static bool window_translate(TyphoonWindow *win, hwaddr addr,
>                                IOMMUTLBEntry *ret)
>   {
> @@ -668,8 +676,10 @@ static bool window_translate(TyphoonWindow *win, hwaddr addr,
>   }
>   
>   /* Handle PCI-to-system address translation.  */
> -/* TODO: A translation failure here ought to set PCI error codes on the
> -   Pchip and generate a machine check interrupt.  */
> +/*
> + * TODO: A translation failure here ought to set PCI error codes on the
> + * Pchip and generate a machine check interrupt.
> + */
>   static IOMMUTLBEntry typhoon_translate_iommu(IOMMUMemoryRegion *iommu,
>                                                hwaddr addr,
>                                                IOMMUAccessFlags flag,
> @@ -773,10 +783,12 @@ static void typhoon_set_timer_irq(void *opaque, int irq, int level)
>       TyphoonState *s = opaque;
>       int i;
>   
> -    /* Thankfully, the mc146818rtc code doesn't track the IRQ state,
> -       and so we don't have to worry about missing interrupts just
> -       because we never actually ACK the interrupt.  Just ignore any
> -       case of the interrupt level going low.  */
> +    /*
> +     * Thankfully, the mc146818rtc code doesn't track the IRQ state,
> +     * and so we don't have to worry about missing interrupts just
> +     * because we never actually ACK the interrupt.  Just ignore any
> +     * case of the interrupt level going low.
> +     */
>       if (level == 0) {
>           return;
>       }
> @@ -787,14 +799,16 @@ static void typhoon_set_timer_irq(void *opaque, int irq, int level)
>           if (cpu != NULL) {
>               uint32_t iic = s->cchip.iic[i];
>   
> -            /* ??? The verbage in Section 10.2.2.10 isn't 100% clear.
> -               Bit 24 is the OverFlow bit, RO, and set when the count
> -               decrements past 0.  When is OF cleared?  My guess is that
> -               OF is actually cleared when the IIC is written, and that
> -               the ICNT field always decrements.  At least, that's an
> -               interpretation that makes sense, and "allows the CPU to
> -               determine exactly how mant interval timer ticks were
> -               skipped".  At least within the next 4M ticks...  */
> +            /*
> +             * ??? The verbage in Section 10.2.2.10 isn't 100% clear.
> +             * Bit 24 is the OverFlow bit, RO, and set when the count
> +             * decrements past 0.  When is OF cleared?  My guess is that
> +             * OF is actually cleared when the IIC is written, and that
> +             * the ICNT field always decrements.  At least, that's an
> +             * interpretation that makes sense, and "allows the CPU to
> +             * determine exactly how mant interval timer ticks were
> +             * skipped".  At least within the next 4M ticks...
> +             */
>   
>               iic = ((iic - 1) & 0x1ffffff) | (iic & 0x1000000);
>               s->cchip.iic[i] = iic;
> @@ -852,13 +866,17 @@ PCIBus *typhoon_init(MemoryRegion *ram, qemu_irq *p_isa_irq,
>       *p_isa_irq = qemu_allocate_irq(typhoon_set_isa_irq, s, 0);
>       *p_rtc_irq = qemu_allocate_irq(typhoon_set_timer_irq, s, 0);
>   
> -    /* Main memory region, 0x00.0000.0000.  Real hardware supports 32GB,
> -       but the address space hole reserved at this point is 8TB.  */
> +    /*
> +     * Main memory region, 0x00.0000.0000.  Real hardware supports 32GB,
> +     * but the address space hole reserved at this point is 8TB.
> +     */
>       memory_region_add_subregion(addr_space, 0, ram);
>   
>       /* TIGbus, 0x801.0000.0000, 1GB.  */
> -    /* ??? The TIGbus is used for delivering interrupts, and access to
> -       the flash ROM.  I'm not sure that we need to implement it at all.  */
> +    /*
> +     * ??? The TIGbus is used for delivering interrupts, and access to
> +     * the flash ROM.  I'm not sure that we need to implement it at all.
> +     */
>   
>       /* Pchip0 CSRs, 0x801.8000.0000, 256MB.  */
>       memory_region_init_io(&s->pchip.region, OBJECT(s), &pchip_ops, s, "pchip0",
> @@ -916,9 +934,11 @@ PCIBus *typhoon_init(MemoryRegion *ram, qemu_irq *p_isa_irq,
>       memory_region_add_subregion(addr_space, 0x801fe000000ULL,
>                                   &s->pchip.reg_conf);
>   
> -    /* For the record, these are the mappings for the second PCI bus.
> -       We can get away with not implementing them because we indicate
> -       via the Cchip.CSC<PIP> bit that Pchip1 is not present.  */
> +    /*
> +     * For the record, these are the mappings for the second PCI bus.
> +     * We can get away with not implementing them because we indicate
> +     * via the Cchip.CSC<PIP> bit that Pchip1 is not present.
> +     */
>       /* Pchip1 PCI memory, 0x802.0000.0000, 4GB.  */
>       /* Pchip1 CSRs, 0x802.8000.0000, 256MB.  */
>       /* Pchip1 PCI special/interrupt acknowledge, 0x802.F800.0000, 64MB.  */
> 



  reply	other threads:[~2026-03-26  0:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 22:31 [PATCH 00/15] hw/alpha: QOMify Clipper and Typhoon Yodel Eldar
2026-03-10 22:31 ` [PATCH 01/15] hw/alpha/typhoon: Fix whitespace and block comment style problems Yodel Eldar
2026-03-26  0:11   ` Richard Henderson [this message]
2026-03-10 22:31 ` [PATCH 02/15] hw/alpha/dp264: Fix " Yodel Eldar
2026-03-26  0:11   ` Richard Henderson
2026-03-10 22:31 ` [PATCH 03/15] hw/alpha/dp264: Validate kernel and initrd sizes Yodel Eldar
2026-03-26  0:11   ` Richard Henderson
2026-03-26  2:04     ` Yodel Eldar
2026-03-26  3:07       ` Richard Henderson
2026-03-26 14:23         ` Yodel Eldar
2026-03-10 22:31 ` [PATCH 04/15] hw/alpha/dp264: Use rom_add_blob_fixed() for initrd params Yodel Eldar
2026-03-26  0:17   ` Richard Henderson
2026-03-10 22:31 ` [PATCH 05/15] hw/alpha/typhoon: Create instance_init and class_init Yodel Eldar
2026-03-11 12:43   ` Philippe Mathieu-Daudé
2026-03-11 18:07     ` Yodel Eldar
2026-03-10 22:31 ` [PATCH 06/15] hw/alpha/dp264: Add CPUs as children of the machine Yodel Eldar
2026-03-10 22:31 ` [PATCH 07/15] hw/alpha: Use QOM composition for the Typhoon chipset Yodel Eldar
2026-03-10 22:31 ` [PATCH 08/15] hw/alpha: Set CPU link properties and use them Yodel Eldar
2026-03-10 22:31 ` [PATCH 09/15] hw/alpha: Convert IRQ pointers to named GPIOs Yodel Eldar
2026-03-10 22:31 ` [PATCH 10/15] hw/alpha: Expose RAM to typhoon via QOM property link Yodel Eldar
2026-03-11 12:39   ` Philippe Mathieu-Daudé
2026-03-10 22:31 ` [PATCH 11/15] hw/alpha: Explicitly define TyphoonClass in alpha_sys.h Yodel Eldar
2026-03-10 22:31 ` [PATCH 12/15] hw/alpha: Move PCI IRQ mapping to TyphoonClass subclass Yodel Eldar
2026-03-10 22:31 ` [PATCH 13/15] hw/alpha: Move minimum PCI device slot to TyphoonClass Yodel Eldar
2026-03-10 22:31 ` [PATCH 14/15] hw/alpha: Use QOM path resolution to get Typhoon PCI bus Yodel Eldar
2026-03-11 13:05   ` Yodel Eldar
2026-03-10 22:31 ` [PATCH 15/15] hw/alpha: Split typhoon_init() into instance_init and realize Yodel Eldar

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=54c17a64-a7dc-436a-b2a8-724537f6e68c@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yodel.eldar@yodel.dev \
    /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