Re: [PATCH v6 0/3] mailbox: Add APM X-Gene platform mailbox driver

From: Duc Dang
Date: Sat Feb 13 2016 - 00:54:03 EST


Hi Itaru,

On Friday, February 12, 2016, Itaru Kitayama <itaru.kitayama@xxxxxxxx> wrote:
>
> Hi Duc,
>
> I've been testing your patch set for v4.5-rc1 on Mustang, with ACPI, however the boot hangs in the middle of it:
>
> EFI stub: Booting Linux Kernel...
> EFI stub: Using DTB from configuration table
> EFI stub: Exiting boot services and installing virtual address map...
> L3c Cache: 8MB
> Booting Linux on physical CPU 0x0
> Linux version 4.5.0-rc1+ (itaru.kitayama@r2-a21) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #96 SMP PREEMPT Fri Feb 12 22:43:54 CST 2016
> Boot CPU: AArch64 Processor [500f0001]
> earlycon: Early serial console at MMIO32 0x1c020000 (options '')
> bootconsole [uart0] enabled
> efi: Getting EFI parameters from FDT:
> EFI v2.40 by X-Gene Mustang Board EFI Nov 24 2015 13:22:41
> efi: ACPI=0x47fa869000 ACPI 2.0=0x47fa869014 SMBIOS 3.0=0x47fa867000
> cma: Reserved 512 MiB at 0x00000040e0000000
> ACPI: Early table checksum verification disabled
> ACPI: RSDP 0x00000047FA869014 000024 (v02 APM )
> ACPI: XSDT 0x00000047FA8680E8 00006C (v01 APM XGENE 00000003 01000013)
> ACPI: FACP 0x00000047FA85F000 00010C (v05 APM XGENE 00000003 INTL 20140724)
> ACPI: DSDT 0x00000047FA860000 00495F (v05 APM APM88xxx 00000001 INTL 20140724)
> ACPI: DBG2 0x00000047FA865000 0000AA (v00 APMC0D XGENEDBG 00000000 INTL 20140724)
> ACPI: GTDT 0x00000047FA85D000 0000E0 (v02 APM XGENE 00000001 INTL 20140724)
> ACPI: MCFG 0x00000047FA85C000 00003C (v01 APM XGENE 00000002 INTL 20140724)
> ACPI: SPCR 0x00000047FA85B000 000050 (v02 APMC0D XGENESPC 00000000 INTL 20140724)
> ACPI: SSDT 0x00000047FA85A000 00002D (v02 APM XGENE 00000001 INTL 20140724)
> ACPI: APIC 0x00000047FA859000 0002A4 (v03 APM XGENE 00000003 01000013)
> ACPI: SSDT 0x00000047FA858000 000078 (v02 REDHAT MACADDRS 00000001 01000013)
> ACPI: SSDT 0x00000047FA857000 000032 (v02 REDHAT UARTCLKS 00000001 01000013)
> psci: is not implemented in ACPI.
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> Unsupported ACPI enable-method
> PERCPU: Embedded 2 pages/cpu @fffffe07fff90000 s41472 r8192 d81408 u131072
> Detected PIPT I-cache on CPU0
> Built 1 zonelists in Zone order, mobility grouping on. Total pages: 523776
> Kernel command line: BOOT_IMAGE=/vmlinuz-4.5.0-rc1+ root=UUID=0e305934-49d5-4f66-b10b-23ec6029fab9 ro acpi=force earlycon=uart8250,mmio32,0x1c020000 console=ttyS0,115200 LANG=en_US.UTF-8
> PID hash table entries: 4096 (order: -1, 32768 bytes)
> Dentry cache hash table entries: 4194304 (order: 9, 33554432 bytes)
> Inode-cache hash table entries: 2097152 (order: 8, 16777216 bytes)
> software IO TLB [mem 0x40dbff0000-0x40dfff0000] (64MB) mapped at [fffffe00dbff0000-fffffe00dffeffff]
> Memory: 32856256K/33554432K available (6158K kernel code, 725K rwdata, 4032K rodata, 768K init, 399K bss, 173888K reserved, 524288K cma-reserved)
> Virtual kernel memory layout:
> vmalloc : 0xfffffc0000000000 - 0xfffffdfedfff0000 ( 2043 GB)
> vmemmap : 0xfffffdfee0000000 - 0xfffffdffe0000000 ( 4 GB maximum)
> 0xfffffdfef0000000 - 0xfffffdfef2000000 ( 32 MB actual)
> fixed : 0xfffffdfffa7d0000 - 0xfffffdfffac00000 ( 4288 KB)
> PCI I/O : 0xfffffdfffae00000 - 0xfffffdfffbe00000 ( 16 MB)
> modules : 0xfffffdfffc000000 - 0xfffffe0000000000 ( 64 MB)
> memory : 0xfffffe0000000000 - 0xfffffe0800000000 ( 32768 MB)
> .init : 0xfffffe0000a80000 - 0xfffffe0000b40000 ( 768 KB)
> .text : 0xfffffe0000080000 - 0xfffffe0000a75b44 ( 10199 KB)
> .data : 0xfffffe0000b40000 - 0xfffffe0000bf5400 ( 725 KB)
> SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Preemptible hierarchical RCU implementation.
> Build-time adjustment of leaf fanout to 64.
> RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
> RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
> NR_IRQS:64 nr_irqs:64 0
> GIC: Using split EOI/Deactivate mode
> Architected cp15 timer(s) running at 50.00MHz (phys).
> clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
> sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
> Console: colour dummy device 80x25
> Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=200000)
> pid_max: default: 32768 minimum: 301
> ACPI: Core revision 20160108
> ACPI: 4 ACPI AML tables successfully acquired and loaded
>
> Security Framework initialized
> Mount-cache hash table entries: 65536 (order: 3, 524288 bytes)
> Mountpoint-cache hash table entries: 65536 (order: 3, 524288 bytes)
> ASID allocator initialised with 65536 entries
>
> Is the patch set supposed to be evaluated without ACPI?

The patch set is aimed for DT support. To support ACPI, additional
changes are required in mailbox common (core) code, which is not
available right now. And PCC seems to be the current mailbox
implementation approach for ACPI so I am not sure if Jassi has plan to
pull any non-PCC changes to support ACPI in mailbox core code or not.

But the patch should not cause the hang though. The hang is due to GIC
EOI feature. We have a new Tianocore firmware that correctly does GIC
fix-up to avoid the hang, but it may take a while before we release
it. In the mean time, you can comment out following likes of code in
function gic_v2_acpi_init of drivers/irqchip/irq-gic.c file to
continue booting in ACPI mode:

/*
* Disable split EOI/Deactivate if HYP is not available. ACPI
* guarantees that we'll always have a GICv2, so the CPU
* interface will always be the right size.
*/

/*
if (!is_hyp_mode_available())
static_key_slow_dec(&supports_deactivate);
*/

Regards,
Duc Dang.