Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3573966imm; Mon, 2 Jul 2018 01:22:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLbcwHzKmDStKbnNLxusPFe3U5O9pi+4LHt4zWMyqBVOLOF/hnihq+ky++VXzwSywNbYv4y X-Received: by 2002:a17:902:784d:: with SMTP id e13-v6mr24350095pln.197.1530519760703; Mon, 02 Jul 2018 01:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530519760; cv=none; d=google.com; s=arc-20160816; b=H/m7JNeHBfhPu037QfFsgvuKH4Dxj3GWCIOKvZ2agEgonNW+4v/6dnIRVv5gcn6tMu wwRnZjq8KDA9ZmjHOLYmADRjmqyVWlR4a3rvRYoqUgwPWuvHBfJj+pSIt3ZJXVnTU2Ni Fifd4qLUrq18TIf7vkJb+pMohiaL7gaFt5jJaiqR5GoxxG8wpsZ5UAYbrU9MyxPoyNfZ p+81edHHiCA7uJVS5Esh09d3HgIIuncKmot9XNCdoNFhK9a6wxSQmMN2A2X/c/BSppet GLfvPelEgeQPjoGo0ZQO8qoMzOCkO8JtcHeNzWPiZUh5FaXdI0WT7MTgCF7DXIsHWDwn N/Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:message-id:cc:to :arc-authentication-results; bh=J68gnjZIOCKXq2uGqiuodeGZPJlj1DaR2dwfFxB2oZA=; b=aJDZX7h+nrPtQdERpr+QboyNs0Xt9RNb/ZRX9FbVFAnZhb2+c1gr6nGAkAKluKFmIG yUq4tIw/QDItjrLiSey+zlrvga8jXk5lXxAZY25gv7RKNLAbdJnn8xk2LfeYJJ8Cr3jW Ng3mjCR2TDNpvtTxEnFhiL2DJ0gx34leTyBH5cjze2YYG938qbDqbYb1BfLpw7HyFm9b PL8L7zuthPX9Mbyy4xtSvLU7MYyGrBA7em4yfv09iGL0kk6ReWgcANSDcCLOVzX/bCkB l8mbIkEevaoSVFLWB3F+umCo+bZzc7ROS1YUbo65PPmIY4EN2MTrshyeQ/muOdxzS92X HaiQ== 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 62-v6si14254422pfg.224.2018.07.02.01.22.25; Mon, 02 Jul 2018 01:22:40 -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 S964832AbeGBIV2 (ORCPT + 99 others); Mon, 2 Jul 2018 04:21:28 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:48722 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933534AbeGBIVV (ORCPT ); Mon, 2 Jul 2018 04:21:21 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 2C2282939E; Mon, 2 Jul 2018 04:21:17 -0400 (EDT) To: Benjamin Herrenschmidt Cc: Michael Schmitz , , , Message-Id: From: Finn Thain Subject: [PATCH v4 00/11] macintosh: Resolve various PMU driver problems Date: Mon, 2 Jul 2018 04:21:17 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series of patches has the following aims. 1) Eliminate duplicated code. Linux presently has two drivers for the 68HC05-based PMU devices found in Macs: via-pmu and via-pmu68k. There's no value in having separate PMU drivers for each architecture. 2) Avoid further work on via-pmu68k that's not needed for via-pmu. 3) Fix some bugs in the via-pmu driver. 4) Enable the /dev/pmu and /proc/pmu/* userspace APIs on m68k Macs by adopting via-pmu. 5) Improve stability on early 100-series PowerBooks by loading no PMU driver at all. Neither via-pmu nor via-pmu68k supports the early M50753-based PMU device found in these models. 6) Assist the out-of-tree NuBus PowerMac port to support PMU designs shared with the m68k Mac port (e.g. PowerBooks 190 and 5300). This patch series has been regression tested on various PowerBooks (190, 520, 3400, Pismo G3) and PowerMacs (Beige G3, G5). These patches did not affect userland utilities. (Note that there is a userland- visible change to the contents of /proc/pmu/interrupts.) Changed since v1: 1) Added blank lines after 'break' statements in patch 10. 2) Improved patch description for patch 3. 3) Added reviewed-by tags. 4) Split patch 8 to make code review easier. Changed since v2: 1) Added reviewed-by tag. 2) Retained PMU_68K_V1 and PMU_68K_V2 symbols. Changed since v3: 1) Rebased on v4.18-rc2. 2) Omitted patch 10/12, since these RTC changes now conflict with mainline. It will be reworked once the mainline m68k/powerpc RTC code stabilizes. Finn Thain (11): macintosh/via-pmu: Fix section mismatch warning macintosh/via-pmu: Add missing mmio accessors macintosh/via-pmu: Don't clear shift register interrupt flag twice macintosh/via-pmu: Enhance state machine with new 'uninitialized' state macintosh/via-pmu: Replace via pointer with via1 and via2 pointers macintosh/via-pmu: Add support for m68k PowerBooks macintosh/via-pmu: Explicitly specify CONFIG_PPC_PMAC dependencies macintosh/via-pmu68k: Don't load driver on unsupported hardware macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver macintosh/via-pmu: Clean up interrupt statistics macintosh/via-pmu: Disambiguate interrupt statistics arch/m68k/configs/mac_defconfig | 2 +- arch/m68k/configs/multi_defconfig | 2 +- arch/m68k/mac/config.c | 2 +- arch/m68k/mac/misc.c | 54 +-- drivers/macintosh/Kconfig | 19 +- drivers/macintosh/Makefile | 1 - drivers/macintosh/adb.c | 2 +- drivers/macintosh/via-pmu.c | 346 ++++++++++------ drivers/macintosh/via-pmu68k.c | 850 -------------------------------------- include/uapi/linux/pmu.h | 4 +- 10 files changed, 235 insertions(+), 1047 deletions(-) delete mode 100644 drivers/macintosh/via-pmu68k.c -- 2.16.4