Received: by 10.192.165.148 with SMTP id m20csp1732536imm; Sat, 21 Apr 2018 14:45:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/IKgN/fEBg3sAY9C1p9xUsz9jmwBDVigt77hqK7P1DBf0we4mVb0F+S/SsGQHZzUFU7Iis X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr14758546pln.203.1524347107408; Sat, 21 Apr 2018 14:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524347107; cv=none; d=google.com; s=arc-20160816; b=WYOMANLNMBUAFGUoNIaKl9zkuQuLfEHS8jHbNcu4DNJJTbV4mu0gXFF0eKSvbc34Pa CyoO9x/AzGvldq6Q7fTmu8FUKz3eiFBOzf1Yg29qtseDLHggREX01pqrkPZtdH+omGQT 1VAljPlFdcagLmwLb15iWjLB6bKLLQVhbsTnW56JE8rD+bNe6hFa76/foAnHjKI5Scec ZLqhXmI5Db4+0FFzs0/tW3YLzzpzu79iA+phfWxGu5k60sA+Ds0Kwl8Z1H/+xelEZSuI F8D/toB6ElPYesXPwDJMv5/iVqh+YOHq23kFpTJPVGLlHMtab3WnOXuWjgWJWTklAPqe IJRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:references:in-reply-to:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=FDV/v2+VrNKyAnianIgr9f3DE0koomcuPso74mHya2M=; b=f+UZKETndiR+gAVt7b8YYtP+xIkYW0K9k+w6OAwuWjyjdFc3c3VBukil6CXmnq3MTE zq32OXQ08/RATMBTxj1wI2DHqi8/3Lpd9GOgSBiqmflexjr/s0tFJ6nYQwP43kiHt/cr sitiJOHo6+IMVN7YcfQmFfSeB93o/oKi3Nfa5TL+vbkp73OfPI8graZ8k8b3wOOUWYHd +0XGFqcL4knolbqlbdLgS0DnejdPhwkmdh7JEf9R6X3WUE3LtysxhRMUdnwgBxwsL9FA 4AQCa6uT+/XJiUiZ53wtpABJY4RifugEE6j11RnjKmtU9OjuC3KBQkP1h0ma4aA7ISa0 TOcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CF5gKdSD; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si6975935pgt.185.2018.04.21.14.44.50; Sat, 21 Apr 2018 14:45:07 -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; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=CF5gKdSD; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753310AbeDUVnn (ORCPT + 99 others); Sat, 21 Apr 2018 17:43:43 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:37292 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753208AbeDUVnk (ORCPT ); Sat, 21 Apr 2018 17:43:40 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 5A6548EE293; Sat, 21 Apr 2018 14:43:39 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j1c0brfn0tXU; Sat, 21 Apr 2018 14:43:39 -0700 (PDT) Received: from [192.168.40.139] (unknown [80.169.201.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 99CFF8EE062; Sat, 21 Apr 2018 14:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1524347019; bh=kEvjgfbLMupXTTrgLua+DoW/ew+TwXcXtmmo4ZLyU5U=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=CF5gKdSDf/rrIj4dkjkaASDEblkK50Zb8OG4PPi+BeT9rKiQ/zIhy0BB190bya6A9 9eTvmnlGOnQ69hpHMedshOsIUzaYGTEX6PohbFsGTk/ggzbMhjRrvBtQNfepOaC894 beFK7LnTn+hmAf05wa/ZNjFP7Byjp8EHddkcEGsI= Message-ID: <1524346967.3335.9.camel@HansenPartnership.com> Subject: Re: [PATCH 22/22] parisc: use generic dma_noncoherent_ops From: James Bottomley To: Christoph Hellwig Cc: linux-arch@vger.kernel.org, Michal Simek , Greentime Hu , Vincent Chen , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org In-Reply-To: <20180420080313.18796-23-hch@lst.de> References: <20180420080313.18796-1-hch@lst.de> <20180420080313.18796-23-hch@lst.de> Content-Type: text/plain; charset="UTF-8" Date: Sat, 21 Apr 2018 22:42:47 +0100 Mime-Version: 1.0 X-Mailer: Evolution 3.22.6 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-04-20 at 10:03 +0200, Christoph Hellwig wrote: > diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c > index 8d3a7b80ac42..4e87c35c22b7 100644 > --- a/arch/parisc/kernel/setup.c > +++ b/arch/parisc/kernel/setup.c > @@ -97,14 +97,12 @@ void __init dma_ops_init(void) >   panic( "PA-RISC Linux currently only supports > machines that conform to\n" >   "the PA-RISC 1.1 or 2.0 architecture > specification.\n"); >   > - case pcxs: > - case pcxt: > - hppa_dma_ops = &pcx_dma_ops; > - break; >   case pcxl2: >   pa7300lc_init(); >   case pcxl: /* falls through */ > - hppa_dma_ops = &pcxl_dma_ops; > + case pcxs: > + case pcxt: > + hppa_dma_ops = &dma_noncoherent_ops; >   break; >   default: >   break; Well, this is wrong: you just made every 32 bit parisc system unnecessarily use non-coherent. We actually only have a small small set of non-coherent systems. The pxcs and pcxt systems (which are about 99% of the user base) can use coherent dma ops. The problem seems to be in your new world you only have one dma_noncoherent_ops pointer ... we definitely need two on parisc, so whether arch_dma_cache_sync is present or not needs to be dynamic not config defined. James