Received: by 10.223.185.116 with SMTP id b49csp7320800wrg; Thu, 1 Mar 2018 03:43:11 -0800 (PST) X-Google-Smtp-Source: AG47ELumGgQJwvJFyGD/oSUSOcAxq+FcMnwiCjHlcPmY5vn+GbH0Gspwx4PoMYsffO6VEk83LbI/ X-Received: by 2002:a17:902:47aa:: with SMTP id r39-v6mr1657934pld.72.1519904591817; Thu, 01 Mar 2018 03:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519904591; cv=none; d=google.com; s=arc-20160816; b=PlAlZKPiEdLfAoj16oyhgFnPL52T5Ep7uqDNjCcN+qyuTl4u3oS5dLLdet26ZRog1D OOtYbICGPZYPByorADEmUEBQYiIBPkU99xEG+3aDpf301TZQeMySUjyIGxHVixZ+DWdf JUUZfiJ539eVFmJxIjmIjnwyZuwTKygQ6R7hKuZfmFD3e1D0JbldI5Jak4aLDtU781C4 sUhzWx0OIQqmySI9SmqXshCFNZ67QNrABc+sb6VG4xoDwzu7xTWXrmXSqotobzSRzF4E OGtXfVkUvD9XBgGnMWmyEMn6Df0cD6GGWftNI0rucPxDBEUcFNP7ug4xJyyBca/+Mr61 7r6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=xBUsqb90fD9tTit5sROHX/DYmtslZYgP+Q3NzIIVfk0=; b=xrgqAml+K8/hGJMI+CfF07plcUSlnLayslREWyYxwcwDvm3yYbqcMSsFjuP/BW0hzY b4+sc9XxSllhwNy1tqiaLC1nEw/SfU1XollVGB3xDG/7gjw2iwCpkd+KbnIjxuh06gIg sk64+eFgqvnI2Z1s6P1Wf/m4ABhLaHDS+quhPL1qv94gsnWlAqG43j9gljs8zCHwRpy/ Ih3O/cL3vB1CMOVA/oB180Ne0fMrb/m7EGbgXTUJgAasY1p0pkuCCvCMINMiZmKSPYZO bgUKj1TiOWiw17CRIeN3rSzjt3+0FIBJIu0F8IeKgwHEXWRxiCGqxxBHcL7jjHhLS8gQ p/gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si2320639pgs.667.2018.03.01.03.42.57; Thu, 01 Mar 2018 03:43:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967815AbeCALlv (ORCPT + 99 others); Thu, 1 Mar 2018 06:41:51 -0500 Received: from foss.arm.com ([217.140.101.70]:36782 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967775AbeCALlt (ORCPT ); Thu, 1 Mar 2018 06:41:49 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 97A691529; Thu, 1 Mar 2018 03:41:49 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7A6C3F318; Thu, 1 Mar 2018 03:41:47 -0800 (PST) Date: Thu, 1 Mar 2018 11:41:45 +0000 From: Mark Rutland To: Derek Basehore Cc: linux-kernel@vger.kernel.org, Soby.Mathew@arm.com, sudeep.holla@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com, tglx@linutronix.de, briannorris@chromium.org, marc.zyngier@arm.com Subject: Re: [PATCH v7 1/3] irqchip/gic-v3-its: add ability to save/restore ITS state Message-ID: <20180301114144.nmwu4qtslvj7ogj5@lakrids.cambridge.arm.com> References: <20180301054820.42847-1-dbasehore@chromium.org> <20180301054820.42847-2-dbasehore@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180301054820.42847-2-dbasehore@chromium.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 28, 2018 at 09:48:18PM -0800, Derek Basehore wrote: > Some platforms power off GIC logic in suspend, so we need to > save/restore state. The distributor and redistributor registers need > to be handled in platform code due to access permissions on those > registers, but the ITS registers can be restored in the kernel. > > Signed-off-by: Derek Basehore How much state do we have to save/restore? Given we can apparently read all this state, couldn't we *always* save the state, then upon resume detect if the state has been lost, restoring it if so? That way, we don't need a property in FW tables for DT or ACPI. [...] > @@ -3261,6 +3363,9 @@ static int __init its_probe_one(struct resource *res, > ctlr |= GITS_CTLR_ImDe; > writel_relaxed(ctlr, its->base + GITS_CTLR); > > + if (fwnode_property_present(handle, "reset-on-suspend")) > + its->flags |= ITS_FLAGS_SAVE_SUSPEND_STATE; Does this allow this property on an ACPI system? If we need this on ACPI, we need a spec update to handle this properly, and shouldn't use device properties like this. Thanks, Mark.