Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4447190imu; Tue, 29 Jan 2019 01:32:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN70/pV6l7S5k5Dbi4nXysnmUjE8Su/XOeB7nl+jmzQYTsbt1MaTfFGzK16wl7iclkb6+1ss X-Received: by 2002:a62:2292:: with SMTP id p18mr26090252pfj.9.1548754345652; Tue, 29 Jan 2019 01:32:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548754345; cv=none; d=google.com; s=arc-20160816; b=YpIjhT8MuGZI9xC4pHp8Ql2AegfiDRu7egB/ShmKzraGI2KlFp04O16C/Dk/UXQK74 3k4vwBTUP9zD0ivA91bhmJlhdwoSMLuxi+u5zqwH8K1pGNxvYV6+S+S/p9OSVVPItWsA mZOYwD7opYWE+/mbY25Hj70Wwv3XCrrhftISyMR0s4RsF506sXR5o5jFmooWDgf7RnKW 7huKsBTTgeCmM4XwLEcmxRj/x1HgAWb9cBT3cqEDxU68wQnbzO2IktIDRRgWinWSRu0y YLZK0lhdCF5QiNSt1Yf7bFV9E5SGZXkMhgSCt3R3av36evBsCE81C57JRui25FbIJNRC 5JXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=VYQE8ETne50dDkR21K03Cs5xIBya62s64SLaRLyJrng=; b=V6OogqV94li4JdnqCqt4hXHtEJbiYuO/fjePHyLKi/9BPbIrK/dstbmYdAyCaNFzDm CL8hGm8cnU7CPOBawlG/xa7MNzcibqYZFzCfOtiUnM15munzvsAbXPZYkLc6J9fBCREK HJOqPJLO0rvU1kJWsYrrzYVXSkbt4YGCRKf/FSVuqfXVDPH/Mi3iFgbieh2tmQZPuikG eQYYhxNat/YZBBiTKsVnUUtNsP+ys8rSkel6ATprQUJE6+nXJfqFnxKaIyPc0WyfF7UZ MvS5A+/nhLXPfoHcY2kyuZ99MrISsZl6e9NAbIIybjyDeFQuVGV6tJmeZf578Fmr0nP+ qh9A== 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 j29si12541639pgm.554.2019.01.29.01.32.09; Tue, 29 Jan 2019 01:32:25 -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 S1727232AbfA2Jbx (ORCPT + 99 others); Tue, 29 Jan 2019 04:31:53 -0500 Received: from ozlabs.org ([203.11.71.1]:59757 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725298AbfA2Jbw (ORCPT ); Tue, 29 Jan 2019 04:31:52 -0500 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 (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43ph8k4Qm4z9sDB; Tue, 29 Jan 2019 20:31:50 +1100 (AEDT) From: Michael Ellerman To: Tyrel Datwyler , Michael Bringmann , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Juliet Kim , Thomas Falcon , Tyrel Datwyler Subject: Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info In-Reply-To: References: <20181214204914.16435.59083.stgit@powerkvm6.aus.stglabs.ibm.com> <20181214204957.16435.29255.stgit@powerkvm6.aus.stglabs.ibm.com> Date: Tue, 29 Jan 2019 20:31:49 +1100 Message-ID: <87a7jjstbu.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tyrel Datwyler writes: > On 12/14/2018 12:50 PM, Michael Bringmann wrote: >> Define interface to acquire arch-specific drc info to match against >> hotpluggable devices. The current implementation exposes several >> pseries-specific dynamic memory properties in generic kernel code. >> This patch set provides an interface to pull that code out of the >> generic kernel. >> >> Signed-off-by: Michael Bringmann >> --- >> include/linux/topology.h | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/include/linux/topology.h b/include/linux/topology.h >> index cb0775e..df97f5f 100644 >> --- a/include/linux/topology.h >> +++ b/include/linux/topology.h >> @@ -44,6 +44,15 @@ > > As far as I know pseries is the only platform that uses DR connectors, and I > highly doubt that any other powerpc platform or arch ever will. So, I'm not sure > that this is really generic enough to belong in topology.h. Right. This does not belong in include/linux. > If anything I would > suggest putting this in an include in arch/powerpc/include/ named something like > drcinfo.h or pseries-drc.h. That will make it visible to modules like rpaphp > that want/need to use this functionality. Yeah that would make more sense. Using "arch" in the name is wrong, it's pseries specific so pseries_find_drc_match() would be more appropriate. >> +int arch_find_drc_match(struct device_node *dn, >> + bool (*usercb)(struct device_node *dn, >> + u32 drc_index, char *drc_name, >> + char *drc_type, u32 drc_power_domain, >> + void *data), >> + char *opt_drc_type, char *opt_drc_name, >> + bool match_drc_index, bool ck_php_type, >> + void *data); This function signature is kind of insane. You end with calls like: + return arch_find_drc_match(dn, rpaphp_add_slot_cb, + NULL, NULL, false, true, NULL); Which is impossible to parse. I feel like maybe this isn't the right level of abstraction. cheers