Received: by 10.223.185.116 with SMTP id b49csp5215834wrg; Tue, 27 Feb 2018 09:34:52 -0800 (PST) X-Google-Smtp-Source: AG47ELuFElc59K0sNFRDk53zyx5Kmoo1qDeURx3IQFPbEuFnlzvUMR6aNOfX4O9oDfAgwih5yJvb X-Received: by 10.98.144.146 with SMTP id q18mr7872629pfk.103.1519752892109; Tue, 27 Feb 2018 09:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519752892; cv=none; d=google.com; s=arc-20160816; b=e8G/bIfTWNfcujBiUYMEXajcKqYY03EsWpqMaJzUlARZf+4hlwO791Y064aVgdLdNF A4GCy3zURPnNRz4UycoJ9U2zs5MX9laktW0saIEq8WjWCJTcbS1J1bYsV+sCLva9v5vd qEdWOnU1lBebWIdFsa5yi6JlItD5Lbbo8KAXPZ8uwygz2nB8WC3NrG/voeJhd5mxvvoK +Mj0ypiy4J1IyZnplFcFeHa8e1IppiH7bMzPyvUKbkPVEp/M1X8GRdYQRv2kQpn/gqa1 gZSOHj7dn+WONiOS+Smvd6uxd+TarnLGZpU6izAoLeweLPxY0Elv1BwvgXuTH3mxVo6C a3Tg== 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=Eb/tYaUYfrPtWcmZSM2C9Zl/fL6KWpIJd/g4N8jXETE=; b=rwOvzp9XVcCnm14nRy9ZQVXO0AKix348JFfYxnoKykG4mWDKoHVtUd9e15sJHQGsAr rOG4SiIZq9S3au00yqsnHTHAluFcDmnuj1yap9NalsBduqVGBb8X40cfVjxV2GOWNGn2 st5BmGQvliTT4RKNsJG5zhpxJWln698dw8zWvfajDHAUPdiSbhst6AJG+jkWpvj//+bM QzZj8vOboGIyRhsvdj2RyPVq5JA790GQjhxLQouzCEnG8+O0RbgCrqTmrbsEfE2Ev9vu 35MCIAalWgwii9bg5xsVQglXQCAR4pnoisMxzUIgCTtfl66phmUVu+OKhEFk+uIkqLsL YKIw== 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 k21si7260652pgf.382.2018.02.27.09.34.37; Tue, 27 Feb 2018 09:34:52 -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 S1751801AbeB0Rdf (ORCPT + 99 others); Tue, 27 Feb 2018 12:33:35 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46870 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbeB0RdW (ORCPT ); Tue, 27 Feb 2018 12:33:22 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1eqj4N-00072e-Lt; Tue, 27 Feb 2018 18:29:39 +0100 Date: Tue, 27 Feb 2018 18:33:14 +0100 From: Sebastian Andrzej Siewior To: Gary R Hook Cc: "Hook, Gary" , linux-crypto@vger.kernel.org, Tom Lendacky , Herbert Xu , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs) Message-ID: <20180227173314.uko5xpf4od2fn74g@linutronix.de> References: <20180223223307.18882-1-bigeasy@linutronix.de> <3f0e1a62-a7ea-6d0c-d305-67080803aefd@amd.com> <20180226083508.th2m3xssp36lx3zh@linutronix.de> <372b353d-017d-a72c-b750-9417f6265874@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <372b353d-017d-a72c-b750-9417f6265874@amd.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > serialized? Observations on my CCPs says that they occur in order, but I > don't know for certain that serialization is guaranteed. > > Is there a definitive statement on this somewhere that I just don't know > about? So the question if a driver can probe two devices simultaneously. I'm not sure. We have PROBE_PREFER_ASYNCHRONOUS which defers the probe to worker. However I have no idea if two of those worker can run at the same time. > I think a mutex would be just fine; I got this wrong, clearly. Let me work > up a patch using a mutex. I've sent one. Why not just ack it and be done with it? > Gary Sebastian