Skip to content

Commit 8a5d1fb

Browse files
author
Daniel Rossier
committed
Still a fix for clang bad format
1 parent 2887161 commit 8a5d1fb

2 files changed

Lines changed: 41 additions & 27 deletions

File tree

so3/arch/arm64/rpi4_64/include/mach/ipamap.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121

2222
#include <asm/mmu.h>
2323

24-
ipamap_t agency_ipamap[] =
25-
{
26-
24+
ipamap_t agency_ipamap[] = {
25+
2726
/* I/O Memory space*/
2827
{
2928
.ipa_addr = 0xf0000000,

so3/devices/irq/gic.c

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ void display_lr(unsigned int n)
106106

107107
printk("LR state: \n");
108108
printk(" - virq: %x\n", lr & GICH_LR_VIRT_ID_MASK);
109-
printk(" - prio: %x\n", (lr >> GICH_LR_PRIORITY_SHIFT) & GICH_LR_PRIORITY_MASK);
109+
printk(" - prio: %x\n",
110+
(lr >> GICH_LR_PRIORITY_SHIFT) & GICH_LR_PRIORITY_MASK);
110111
printk(" - pending: %x\n", lr & GICH_LR_PENDING_BIT);
111112
printk(" - active: %x\n", lr & GICH_LR_ACTIVE_BIT);
112113
printk(" - hw: %x\n", lr & GICH_LR_HW_BIT);
@@ -127,7 +128,8 @@ void fdt_interrupt_node(int fdt_offset, irq_def_t *irq_def)
127128
const fdt32_t *p;
128129

129130
/* Interrupts - as described in the bindings - have 3 specific cells */
130-
prop = fdt_get_property(__fdt_addr, fdt_offset, "interrupts", &prop_len);
131+
prop = fdt_get_property(__fdt_addr, fdt_offset, "interrupts",
132+
&prop_len);
131133
BUG_ON(!prop);
132134

133135
p = (const fdt32_t *) prop->data;
@@ -141,9 +143,11 @@ void fdt_interrupt_node(int fdt_offset, irq_def_t *irq_def)
141143
/* Not all combinations are currently handled. */
142144

143145
if (irq_def->irq_class != GIC_IRQ_TYPE_SGI)
144-
irq_def->irqnr += 16; /* Possibly for a Private Peripheral Interrupt (PPI) */
146+
irq_def->irqnr +=
147+
16; /* Possibly for a Private Peripheral Interrupt (PPI) */
145148

146-
if (irq_def->irq_class == GIC_IRQ_TYPE_SPI) /* It is a Shared Peripheral Interrupt (SPI) */
149+
if (irq_def->irq_class ==
150+
GIC_IRQ_TYPE_SPI) /* It is a Shared Peripheral Interrupt (SPI) */
147151
irq_def->irqnr += 16;
148152

149153
} else {
@@ -514,7 +518,8 @@ static void gic_handle(void *data)
514518

515519
if (irq_nr < 16) {
516520
#ifdef CONFIG_AVZ
517-
if ((smp_processor_id() == ME_CPU) && current_domain->avz_shared->evtchn_upcall_pending)
521+
if ((smp_processor_id() == ME_CPU) &&
522+
current_domain->avz_shared->evtchn_upcall_pending)
518523
gic_set_pending(irq_nr);
519524

520525
#else
@@ -603,7 +608,9 @@ void gic_hw_reset(void)
603608
/* Distributor interface initialization */
604609

605610
/* Disable distributor */
606-
iowrite32(&gic->gicd->ctlr, ioread32(((void *) &gic->gicd->ctlr) + INTC_CPU_CTRL_REG0) & ~INTC_DISABLE);
611+
iowrite32(&gic->gicd->ctlr,
612+
ioread32(((void *) &gic->gicd->ctlr) + INTC_CPU_CTRL_REG0) &
613+
~INTC_DISABLE);
607614

608615
/* All interrupts level triggered, active high by default */
609616
for (n = 32; n < NR_IRQS; n++)
@@ -658,8 +665,7 @@ static int gic_init(dev_t *dev, int fdt_offset)
658665
int prop_len;
659666
int cpu;
660667

661-
for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++)
662-
{
668+
for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++) {
663669
spin_lock_init(&per_cpu(intc_lock, cpu));
664670
}
665671

@@ -679,33 +685,42 @@ static int gic_init(dev_t *dev, int fdt_offset)
679685

680686
/* Mapping the two mem area of GIC (distributor & CPU interface) */
681687
#ifdef CONFIG_ARCH_ARM32
682-
gic->gicd = (struct gicd_regs *) io_map(fdt32_to_cpu(((const fdt32_t *) prop->data)[0]),
683-
fdt32_to_cpu(((const fdt32_t *) prop->data)[1]));
684-
gic->gicd_paddr = (void *) fdt32_to_cpu(((const fdt32_t *) prop->data)[0]);
685-
686-
gic->gicc = (struct gicc_regs *) io_map(fdt32_to_cpu(((const fdt32_t *) prop->data)[2]),
687-
fdt32_to_cpu(((const fdt32_t *) prop->data)[3]));
688+
gic->gicd = (struct gicd_regs *) io_map(
689+
fdt32_to_cpu(((const fdt32_t *) prop->data)[0]),
690+
fdt32_to_cpu(((const fdt32_t *) prop->data)[1]));
691+
gic->gicd_paddr =
692+
(void *) fdt32_to_cpu(((const fdt32_t *) prop->data)[0]);
693+
694+
gic->gicc = (struct gicc_regs *) io_map(
695+
fdt32_to_cpu(((const fdt32_t *) prop->data)[2]),
696+
fdt32_to_cpu(((const fdt32_t *) prop->data)[3]));
688697
#else
689-
gic->gicd = (struct gicd_regs *) io_map(fdt64_to_cpu(((const fdt64_t *) prop->data)[0]),
690-
fdt64_to_cpu(((const fdt64_t *) prop->data)[1]));
691-
gic->gicd_paddr = (void *) fdt64_to_cpu(((const fdt64_t *) prop->data)[0]);
692-
693-
gic->gicc = (struct gicc_regs *) io_map(fdt64_to_cpu(((const fdt64_t *) prop->data)[2]),
694-
fdt64_to_cpu(((const fdt64_t *) prop->data)[3]));
698+
gic->gicd = (struct gicd_regs *) io_map(
699+
fdt64_to_cpu(((const fdt64_t *) prop->data)[0]),
700+
fdt64_to_cpu(((const fdt64_t *) prop->data)[1]));
701+
gic->gicd_paddr =
702+
(void *) fdt64_to_cpu(((const fdt64_t *) prop->data)[0]);
703+
704+
gic->gicc = (struct gicc_regs *) io_map(
705+
fdt64_to_cpu(((const fdt64_t *) prop->data)[2]),
706+
fdt64_to_cpu(((const fdt64_t *) prop->data)[3]));
695707
#endif
696708

697709
#ifdef CONFIG_AVZ
698710

699-
gic->gich = (struct gich_regs *) io_map(fdt64_to_cpu(((const fdt64_t *) prop->data)[4]),
700-
fdt64_to_cpu(((const fdt64_t *) prop->data)[5]));
711+
gic->gich = (struct gich_regs *) io_map(
712+
fdt64_to_cpu(((const fdt64_t *) prop->data)[4]),
713+
fdt64_to_cpu(((const fdt64_t *) prop->data)[5]));
701714

702715
spin_lock_init(&pending_irqs.lock);
703716

704717
/* Disable PPIs, except for the maintenance interrupt. */
705-
iowrite32(&gic->gicd->isenabler, 0xffff0000 & ~(1 << IRQ_ARCH_ARM_MAINT));
718+
iowrite32(&gic->gicd->isenabler,
719+
0xffff0000 & ~(1 << IRQ_ARCH_ARM_MAINT));
706720

707721
/* Ensure all IPIs and the maintenance PPI are enabled */
708-
iowrite32(&gic->gicd->isenabler, 0x0000ffff & ~(1 << IRQ_ARCH_ARM_MAINT));
722+
iowrite32(&gic->gicd->isenabler,
723+
0x0000ffff & ~(1 << IRQ_ARCH_ARM_MAINT));
709724

710725
#endif
711726

0 commit comments

Comments
 (0)