Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3330534imj; Tue, 19 Feb 2019 01:22:02 -0800 (PST) X-Google-Smtp-Source: AHgI3IYo2bUhxv0dQ+zgHdlOvwzmOfxNzNYzn5Rgd6QrDHldTaeE+ebtUG4lze/ieIGWlWfaZzFC X-Received: by 2002:a63:be0a:: with SMTP id l10mr22768243pgf.292.1550568122410; Tue, 19 Feb 2019 01:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550568122; cv=none; d=google.com; s=arc-20160816; b=PyVBr3M7D2jAc6Goc/wvg9vILc7CQ/YHYlr9SLXy41/VffUoEvRrzDsLlIRgW5q/gR kCPODI4kwoUHsmZkSzVSFniTpmrQ+KuNrdjENMEi2C1IK71HcG+IxDNvqco9cG683uPb RhhMuQx2+0e0uMef5UkhfuNiCA/pAiukUU1LTkDsL5Bv25vzm30f5yCSM0i9lRc7bzHC c5vCf7pTpNC71YphsHCq3E6A8dv9o6bsAO4/8IHmSQPGjsx/zIwzI7W58zE/nyaLqohV mfSzAjVZKO9k9zJmHyWKj4RaJQir0GUx5k2CCVw/H9sS7wpehqUmkgWZybUyAECYvqLn lkRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=YaRJXWMPwMF5dOfThdKY2XaRgXEOtBxAahcDGKBFIjY=; b=EeQz4bGMlxIQpDgnV4TWI58ypDjByHg441iO/vzOUFPjOmlojNOEyIR3Ot+Ab1Kang UOHcSh7IHfoq9FnjAS4l7Eb9pSaB7aV98fpu6bfC8bNd2W+KKAFRdG8MUzXPMxP9P+jm Dj0QGbTA+mdy+QtLoDANNHFThpZf/aNiNyN7V6YXNLVu5KoClKZGgDEmcBpdWavKrvos zsBCJPC7o9iWtELNHh8pxYUOdOjh/8WNXTyxHuB9caodAzmvOTM7zmfP53FyBQro5qUv mqBzpDpd+yA/BMIID5zEH85CesYgMDXeg32aTy4FYfADIHVPDbLGVvV32a500BbJSFrY n72w== 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 7si16730336pll.297.2019.02.19.01.21.47; Tue, 19 Feb 2019 01:22:02 -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 S1727907AbfBSJVT (ORCPT + 99 others); Tue, 19 Feb 2019 04:21:19 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:35753 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfBSJVS (ORCPT ); Tue, 19 Feb 2019 04:21:18 -0500 Received: by mail-qt1-f196.google.com with SMTP id p48so22364248qtk.2 for ; Tue, 19 Feb 2019 01:21:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YaRJXWMPwMF5dOfThdKY2XaRgXEOtBxAahcDGKBFIjY=; b=sw4EZxQP8nxorLpFgdc0ZBIpud+2i93E2mj9a7Nq97rE1ZfLNmZsyxUC9eReI5lTPv ibJN6I/Jcq1/Hs1WPSRbLJhHGnltvnFBc2YBqiwZyd0lwSK/tUXjZXENeJ7ONLLXSs9U A7Y9z1LxxM9lzOydnnv83nqij41PvdsPc/4p7BM0hx3syT8GW2tv7+5Z03A0tvP5iSK7 dH1AARraeTlU6aginqmkDm8KIKvfGo/sIUhBAPFK3fNRM4BybxlkUGLKs/2CDfT6Ph91 a2zOOYaXMu5+42eOMIp1EgIhUCmspKi12MZYo7ZdYlgNSXQPXHiCNHbc63NGReP0w/9k VyMA== X-Gm-Message-State: AHQUAuaNX2HILkjb4+FSBk88J5BF3FoE84VFWSnJ2xZ5zoSqJOlhDBJn 99jDWkT7O+hY4Rr0KlrEpUikW1g0qTJXfx8pPcU= X-Received: by 2002:ac8:237b:: with SMTP id b56mr7506433qtb.343.1550568077655; Tue, 19 Feb 2019 01:21:17 -0800 (PST) MIME-Version: 1.0 References: <1549628778-30785-1-git-send-email-sugaya.taichi@socionext.com> <7266af3b-aeec-4c29-c96e-ee0d21d3e867@socionext.com> In-Reply-To: <7266af3b-aeec-4c29-c96e-ee0d21d3e867@socionext.com> From: Arnd Bergmann Date: Tue, 19 Feb 2019 10:21:01 +0100 Message-ID: Subject: Re: [PATCH v2 04/15] ARM: milbeaut: Add basic support for Milbeaut m10v SoC To: "Sugaya, Taichi" Cc: Linux ARM , Linux Kernel Mailing List , Shinji Kanematsu , Masami Hiramatsu , Russell King , Jassi Brar , Takao Orito , Kazuhiro Kasai Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 19, 2019 at 8:12 AM Sugaya, Taichi wrote: > On 2019/02/18 21:15, Arnd Bergmann wrote: > > On Fri, Feb 8, 2019 at 1:26 PM Sugaya Taichi > > wrote: > > >> +static int __init m10v_pm_init(void) > >> +{ > >> + suspend_set_ops(&m10v_pm_ops); > >> + > >> + return 0; > >> +} > >> +late_initcall(m10v_pm_init); > > > > This requires a check to ensure you are actually on the right platform, > > otherwise you break suspend/resume in a multiplatform kernel running > > on anything other than milbeaut. > > > > OK. > I think the solution is adding a "if statement with mlbeaut compatible" > above suspend_set_ops(&m10v_pm_ops). Right, you can either use a call to of_machine_is_compatible(), or you add a machine descriptor with OF_MACHINE_START() and use this as the init_late() callback. Arnd