From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbcF0JNM (ORCPT ); Mon, 27 Jun 2016 05:13:12 -0400 Received: from foss.arm.com ([217.140.101.70]:38728 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751385AbcF0JNJ (ORCPT ); Mon, 27 Jun 2016 05:13:09 -0400 Subject: Re: BUG?: kernel does not (re)set irq smp_affinity to reboot_cpu To: Hans de Goede , linux-arm-kernel , Linux Kernel Mailing List , Thomas Gleixner References: <4dc8bd4c-8456-9f94-b7eb-c5d227ddc673@redhat.com> Cc: Maxime Ripard , Chen-Yu Tsai , Russell King From: Marc Zyngier X-Enigmail-Draft-Status: N1110 Organization: ARM Ltd Message-ID: <5770EE21.90103@arm.com> Date: Mon, 27 Jun 2016 10:13:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <4dc8bd4c-8456-9f94-b7eb-c5d227ddc673@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Thanks Maxime for pointing me to this discussion, +RMK] Hi Hans, On 26/06/16 17:00, Hans de Goede wrote: > Hi, > > I've just spend most of my Sunday debugging a problem > where Allwinner ARM SoC based boards will not shutdown when > using a Fedora 24 userland, where as the exact same > kernel works fine with Fedora 22. > > It turns out that irq-balanced is to blame. In Fedora 24 > it pins the i2c controller, which talks to the pmic > which is needed for poweroff to cpu-id 1: > > [root@localhost ~]# cat /proc/irq/49/smp_affinity > 2 > > Where as the reboot_cpu is cpu-id 0 and with > cpu 1 disabled at poweroff time, the i2c transfer > never gets past its first step leading to an i2c > driver timeout + kernel panic due to machine_power_off() > returning. > > As a workaround I can stop irq-balanced and do: > > echo 3 > /proc/irq/49/smp_affinity > > Before doing poweroff and then everything works as > expected again. > > Now the question is how to fix this? [...] I'm wondering if that's not an effect of this patch: https://lkml.org/lkml/2015/9/24/138 missing on the ARM side (the corresponding arm64 patch is 217d453d473c). Otherwise, can you instrument the GIC set_affinity method and find out if we're even trying to move this IRQ away from the CPU that is being torn down? Thanks, M. -- Jazz is not dead. It just smells funny...