From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933469AbeAOQRU (ORCPT + 1 other); Mon, 15 Jan 2018 11:17:20 -0500 Received: from mail-oi0-f42.google.com ([209.85.218.42]:42122 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753699AbeAOQRS (ORCPT ); Mon, 15 Jan 2018 11:17:18 -0500 X-Google-Smtp-Source: ACJfBouF6SVjtyDw2rY93w8cXNLOTRsq2ykZHdZWTRybYItObP1htL5kNzlGOPKzlGEMQ86b1fErIvmH//1DtboCsgY= MIME-Version: 1.0 In-Reply-To: References: <4928977.5hd79RbQlp@aspire.rjw.lan> <12351114.Ym7QOfxZhK@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Mon, 15 Jan 2018 17:17:16 +0100 X-Google-Sender-Auth: xQPLildoJf4VZMGv3WCglzHyYSg Message-ID: Subject: Re: [PATCH 0/2] PM / core: genpd fix and pm_runtime_force_suspend|resume() rework To: Ulf Hansson , Geert Uytterhoeven Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , LKML , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 15, 2018 at 3:26 PM, Ulf Hansson wrote: > On 15 January 2018 at 14:22, Geert Uytterhoeven wrote: [cut] >> >> I did miss a small difference in topology: in pm/linux-next, H3 has DMA >> enabled for SCIF2, while M3 hasn't (yet). >> With DMA enabled on M3, it fails in the same way. >> >> As genpd_resume_noirq() no longer calls pm_runtime_force_resume(), >> rcar_dmac_runtime_resume() is no longer called, and the DMAC's registers >> are no longer reinitialized after system resume, breaking the serial port. > > In drivers/dma/sh/rcar-dmac.c, I would try to replace the below line: > SET_SYSTEM_SLEEP_PM_OPS(rcar_dmac_sleep_suspend, rcar_dmac_sleep_resume) > > with: > SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) Yes, that probably is the least intrusive thing that can be done to address the issue. > in case that may be too early to suspend the dma device (which is > rather common for dma devices) then try; > > SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) Good suggestion, and I would go straight for it anyway. Geert, can you try if this works, please? Thanks, Rafael