From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbcITJms (ORCPT ); Tue, 20 Sep 2016 05:42:48 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58559 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbcITJmq (ORCPT ); Tue, 20 Sep 2016 05:42:46 -0400 Date: Tue, 20 Sep 2016 11:40:18 +0200 (CEST) From: Thomas Gleixner To: Matt Redfearn cc: Ralf Baechle , Bjorn Andersson , Ohad Ben-Cohen , linux-mips@linux-mips.org, linux-remoteproc@vger.kernel.org, lisa.parratt@imgtec.com, linux-kernel@vger.kernel.org, Marc Zyngier , Jason Cooper Subject: Re: [PATCH v2 1/6] irqchip: mips-gic: Add context saving for MIPS_REMOTEPROC In-Reply-To: <1474361249-31064-2-git-send-email-matt.redfearn@imgtec.com> Message-ID: References: <1474361249-31064-1-git-send-email-matt.redfearn@imgtec.com> <1474361249-31064-2-git-send-email-matt.redfearn@imgtec.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Sep 2016, Matt Redfearn wrote: > +/* > + * The MIPS remote processor driver allows non-Linux firmware to take control > + * of and execute on one of the systems VPEs. If that VPE is brought back under > + * Linux, it is necessary to ensure that all GIC interrupts are routed and > + * masked as Linux expects them, as the firmware can have done anything it > + * likes with the GIC configuration (hopefully just for that VPEs local > + * interrupt sources, but allow for shared external interrupts as well). > + */ > +static int gic_cpu_notify(struct notifier_block *nfb, unsigned long action, > + void *hcpu) > +{ > + unsigned int cpu = mips_cm_vp_id((unsigned long)hcpu); > + > + switch (action) { > + case CPU_UP_PREPARE: > + case CPU_DOWN_FAILED: > + gic_restore_shared(); > + gic_restore_local(cpu); > + default: > + break; > + } > + > + return NOTIFY_OK; > +} Please use the new state machine based infrastructure. Thanks, tglx