From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdJDMcP (ORCPT ); Wed, 4 Oct 2017 08:32:15 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60882 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751949AbdJDMcO (ORCPT ); Wed, 4 Oct 2017 08:32:14 -0400 Subject: Re: [PATCH v2 1/2] bus: arm-ccn: Fix use of smp_processor_id() in preemptible context To: Pawel Moll , Lorenzo Pieralisi , Suzuki Poulose , Mark Rutland Cc: "linux-kernel@vger.kernel.org" References: <20171003171413.18592-1-marc.zyngier@arm.com> <20171003171413.18592-2-marc.zyngier@arm.com> <1507116418.3164.97.camel@arm.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Wed, 4 Oct 2017 13:32:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507116418.3164.97.camel@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/10/17 12:26, Pawel Moll wrote: > On Tue, 2017-10-03 at 18:14 +0100, Marc Zyngier wrote: >> Booting a DEBUG_PREEMPT enabled kernel on a CCN-based system >> results in the following splat: >> >> [...] >> arm-ccn e8000000.ccn: No access to interrupts, using timer. >> BUG: using smp_processor_id() in preemptible [00000000] code: >> swapper/0/1 >> caller is debug_smp_processor_id+0x1c/0x28 >> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0 #6111 >> Hardware name: AMD Seattle/Seattle, BIOS 17:08:23 Jun 26 2017 >> Call trace: >> [] dump_backtrace+0x0/0x278 >> [] show_stack+0x24/0x30 >> [] dump_stack+0x8c/0xb0 >> [] check_preemption_disabled+0xfc/0x100 >> [] debug_smp_processor_id+0x1c/0x28 >> [] arm_ccn_probe+0x358/0x4f0 >> [...] >> >> as we use smp_processor_id() in the wrong context. >> >> Turn this into a get_cpu()/put_cpu() that extends over the CPU >> hotplug >> registration, making sure that we don't race against a CPU down >> operation. >> >> Signed-off-by: Marc Zyngier > > Acked-by: Pawel Moll > > I assume you'll get this merged yourself? Or do you want me to relay > the CCN one (I've got a couple of other small changes to the driver in > the queue). I'd rather you take care of it if you already have a queue of patches. Otherwise, I'll bundle the two patches and ask the armsoc folks to do something with them. Thanks, M. -- Jazz is not dead. It just smells funny...