Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1058773pxb; Sat, 17 Apr 2021 05:31:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmgrFN/z/Kc+II8FkeRLxynsWh4cG6WQPpnnXDkvvmlEo0O1LZYnk50gpcjikro6QCykCA X-Received: by 2002:a17:902:d507:b029:ea:ac65:b98e with SMTP id b7-20020a170902d507b02900eaac65b98emr14362041plg.56.1618662668145; Sat, 17 Apr 2021 05:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618662668; cv=none; d=google.com; s=arc-20160816; b=oUtbk8Yn/KD4t9zV7lOqny/A+EiHfPXQA7o71dsTZ5gcGNGejuK7cIsm+IylFqxS7b /WeSjsJcuxTaZpIRA/Uc1dhcryAjKSoThv/ZElFgovGx2Wrl/ywrpHlyh4qL8S2lJB2j grxeNyEztfwSIgpDrjPUGBd8J+86jrRxziDPywPpIimintR+12R0dTOCVHNQ5XS2Zbo9 Do356cBFCHfSc3DVSqT7dr+JstWRPHUzwnHl0LCBjqErGyE7+okWFz0FU/wsIqbqlbF+ wpCyPIe+e+F8+8PMioRQh50WikK3DK4xQazHgqSnGoeEWeH4SVvgCuz4jfjyCZ1+Jcda +uug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=GHCOwYPqOltid+vew1TweMMqAzis0wi6b8dRnisdFWA=; b=SD+S83fwP/PDJFV5m6AkDeEK0ajP7jwrWQmPwJWdExlWslvjnQd0FC/JmiF3ijCIPb naduevTlh9w7Y8Q2K9O7uJej4lXWsClL6CVgFQE3udgKYntlyF1SXqkIHU89o8XwSH5m OJbB86cEpbf1/SVZBdsKMSWvby/O2ET3lLmPGfnvHLiGWdyg1ar7JcTyzVY2R+ll41s7 TKWAWNlFk48EE3x57X27Qzk9ptngdu7yNTNyj6Y+cXN2LwGnbeyNN/jMQ5fcrz/l9Swj sB4T03DOotye/XIIXSmzZYUZOHd7uIe0rK5DFyfROUsLQxkmQGd+x1vpvMh+LPxfKjrY moJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=aCXQ421y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lk18si11863215pjb.95.2021.04.17.05.30.54; Sat, 17 Apr 2021 05:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=aCXQ421y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236173AbhDQMaw (ORCPT + 99 others); Sat, 17 Apr 2021 08:30:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236058AbhDQMav (ORCPT ); Sat, 17 Apr 2021 08:30:51 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EBD3C061574 for ; Sat, 17 Apr 2021 05:30:25 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4FMsqJ1ckGz9vG3; Sat, 17 Apr 2021 22:30:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1618662620; bh=mtQXXNJfragy4YQoBiwVomNkLwmcNxRqSSFA0RO5LCo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aCXQ421yZApjtSXo4wDJS5qyT1JaMFSEi8NEckR1sYexHW87ktiqBKTQh9rp4jq4B b3RAJU5OL25nzAG9tJ/ylT8EjLNhIJeahLFUNn5ZaCnS6FES6iHeBq0pk4wPjiYnx6 iNwXBy/HK60pJlzELKvX1eyq8QWlGZOMjxAB7XSamDg7JqbFawr9Is+d6i4jNvqKiP n41xrIzhRWrwW5XFQ6oobgw0u66Qz+LouPxrvvuv//RrfLT4aln0SI206UUVgWkTJs /RJ+8l7g6MGSVIxx8L0/odoo8YM041S2FV3bD4zfpnH4Zbl4JaEGK+9LPn0//nSdqH bSJUoxa3H5cGg== From: Michael Ellerman To: Tyrel Datwyler Cc: benh@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/pseries: Add shutdown() to vio_driver and vio_bus In-Reply-To: References: <20210402001325.939668-1-tyreld@linux.ibm.com> Date: Sat, 17 Apr 2021 22:30:14 +1000 Message-ID: <87im4ldrft.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tyrel Datwyler writes: > On 4/1/21 5:13 PM, Tyrel Datwyler wrote: >> Currently, neither the vio_bus or vio_driver structures provide support >> for a shutdown() routine. >> >> Add support for shutdown() by allowing drivers to provide a >> implementation via function pointer in their vio_driver struct and >> provide a proper implementation in the driver template for the vio_bus >> that calls a vio drivers shutdown() if defined. >> >> In the case that no shutdown() is defined by a vio driver and a kexec is >> in progress we implement a big hammer that calls remove() to ensure no >> further DMA for the devices is possible. >> >> Signed-off-by: Tyrel Datwyler >> --- > > Ping... any comments, problems with this approach? The kexec part seems like a bit of a hack. It also doesn't help for kdump, when none of the shutdown code is run. How many drivers do we have? Can we just implement a proper shutdown for them? cheers