Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1965581imm; Sat, 9 Jun 2018 05:21:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLPXyhgUk4RPstdbzNc8orvA6bHcjdJwXCiu+4ja3VOrqBWDr7Li8LGoL3l084kO7EIkgjg X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr10725836plg.170.1528546881495; Sat, 09 Jun 2018 05:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528546881; cv=none; d=google.com; s=arc-20160816; b=tozTBy3GWHCDIUAUwWWwHZrLSCr6Ml834IISBTN1YRYfpV6iEnnqD/hW5u8dlC63P1 9hzzyFUk+gBL3AoH9tLmWWj3RMlVEKwl2tp+Ils3hWK0tA2ATzsnLpY7vAry//ahGRfY M4jsNmRGKIodsuPnIctq6GVLwZC0iHi3xv7AuFTeScT1xWZye5BcJ90yCemlKoFV9N9+ N1509Sw7oLQq8SXjtmVJRhTGPGhX+Yl1nzYLqSkoDiEzwqvrGCoTvls5mhb+/mRx3+i9 2M8xcOSe2fbMp5VuULocDImkeWlj70/7riPp8g1a6Xqh1PFijxcbV+eOxbIYb9NjnQUs q12Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date:arc-authentication-results; bh=WKP14DaRGGVfoKSn+D/gwrNypnkLuAbXK92t1whLoJs=; b=Nbz6paGf7Ow/8UoNuShyWVJ0AqwLAhE0Npvm6K6wqR2FRwaa8VdH1skv/xi/AzhPKI KU/xtfJBoTDDCQKDft9ff3BEYFMlZzsIPTSP0AjAPM1ZKk7/IAq3N/U/sd/oeTY5ZXI7 4xkmFC9/Cpopig6LvhLIoj7gsRpUh1Ilz9lXyVukFAIjBv7NRZDBKf8/QJCeGzXApR1Z ZMGNWl+b9Y1X4p2Q4JTZK01YgNyXc1xDU+KqzKoX7pe6pz/LqrNjzAf12LV4b8qGHkkq EKnvRvW9w0muSeejr4TEgt8qymdX2xzlCJlOXqhFnWX1Kjzk9sILsffnMBQVrD3lSETw Wygw== 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 t9-v6si18039134pgf.222.2018.06.09.05.21.06; Sat, 09 Jun 2018 05:21:21 -0700 (PDT) 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 S1753220AbeFIMUo (ORCPT + 99 others); Sat, 9 Jun 2018 08:20:44 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:35532 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101AbeFIMUl (ORCPT ); Sat, 9 Jun 2018 08:20:41 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 8D8B527256; Sat, 9 Jun 2018 08:20:39 -0400 (EDT) Date: Sat, 9 Jun 2018 22:21:06 +1000 (AEST) From: Finn Thain To: Michael Schmitz cc: Andreas Schwab , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: Re: [PATCH v2 08/12] macintosh/via-pmu68k: Don't load driver on unsupported hardware In-Reply-To: Message-ID: References: <9f015684-4d91-70e4-d2a4-89fe167ff8ab@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > Is this enum used by any user space code? If so, perhaps rather > > > leave the PMU_68K_V1 in there to avoid upsetting that? > > > > It also changes the value of PMU_68K_V2, which is an ABI break. > > Yes, that's what I worry about - but do we know of any users of that > particular interface? There is no ABI issue AFAIK. The value of pmu_kind is visible to userland only on powerpc. /dev/pmu and /proc/pmu/* do not exist on m68k. This patch series will make these UAPIs available on m68k, and for that reason I've chosen the value PMU_UNKNOWN for pmu_kind. New pmu_kind values can be defined as and when the need arises. But that would imply a useful classification scheme for pre-PCI powerbooks, and I don't know what that scheme will look like because at this stage there is neither userland nor kernel code to support backlight, buttons and battery for pre-PCI powerbooks. In anycase, the "v1" and "v2" scheme is obviously inadequate when you consider the range of m68k powerbook models. Also, consider the out-of-tree adaptation of via-pmu by the Nubus-PMac project, which has this ABI break: diff --git a/include/linux/pmu.h b/include/linux/pmu.h index cafe98d9694..9882a185a52 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h @@ -90,6 +90,7 @@ enum { PMU_HEATHROW_BASED, /* PowerBook G3 series */ PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */ PMU_KEYLARGO_BASED, /* Core99 motherboard (PMU99) */ + PMU_NUBUS_BASED, /* 1400, 2300, 5300 */ PMU_68K_V1, /* 68K PMU, version 1 */ PMU_68K_V2, /* 68K PMU, version 2 */ }; (BTW, these powerbooks are not "nubus based", they are "pre-PCI", so I wouldn't want this to go upstream in this form. It could be that PMU_NUBUS_BASED should be PMU_UNKNOWN too.) --