Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3408519imm; Mon, 8 Oct 2018 03:37:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV60FGKX6GuPTAbDYcCEMXvrNhqtbT9Y+xMq+VlrlX8GRk4TOFHBBA3nkUbGkZz1ggM5dtXNF X-Received: by 2002:a63:3c46:: with SMTP id i6-v6mr20403688pgn.286.1538995052479; Mon, 08 Oct 2018 03:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538995052; cv=none; d=google.com; s=arc-20160816; b=tcaC6n2z9q1La79c/BWNAvBRj152rWPo3oiTCgfLbPUdh5RsPyjaKrg9qk+Id7jZw+ +VtgEzUjHlCBR2XIZD0GqHHG9XxW1QesK0qEl+KD2kXrFNgkCaOl7Vp/7W2CDWrj5XzM 1lxB6LtZzqT0pa+bUgyyACTVq3jMZvNkzeK4ngf+ImN9PyvlKfY9b1PWlFUNuKjlsbn5 wemMLlBPV4C6uAzcKQtEL+kBlr4yb9ngc7XXYivbevcx7t1+nZ1hKix9qN+cD63ZAgA4 W1KzHX85UAoTWcj0imPjRN+c6wyNmU34aSwU4Je2qfIcpEf723PydVXpW4FUpEQkpwcT Af9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ABAzHvy42/tuYULpp/Kx5+SxMsW4Nke/wMSs9iUcpHc=; b=HTVgozmNOY2qseKHVRzw8dcysOgVAtQIrT9Xy4sorZhYeaDCKrNj/1XuEXkjmnypst 0MsD5060QL0Ew0g7+ukKMAVBpDcxHWB0ECX9nqHvUp0/EesABF5BgR22E3m6r5HM9dgi 6qLp9/xyEvvNAgWkRaJbNQ6TqIU5tHxMAhTtADRkID15ymZhzfJ080aD+9GKrxPT5F+P HV6Xn87dFW6CzNe9TwecDqxU5ZDHR8d3nQf1eDH0zeGNz65p5BvBvuXIVyupPn04jxni eyYWdOBT94gL1Aa0PrDPLSHPL4YiKKAG3bulwBA8aO8SUDbj5VzKs88F+VnvHqMZOPx6 owUQ== 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 14-v6si17013045pgk.497.2018.10.08.03.37.17; Mon, 08 Oct 2018 03:37:32 -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 S1727279AbeJHRsF (ORCPT + 99 others); Mon, 8 Oct 2018 13:48:05 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34710 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbeJHRsF (ORCPT ); Mon, 8 Oct 2018 13:48:05 -0400 Received: by mail-qk1-f195.google.com with SMTP id p6-v6so11762447qkg.1; Mon, 08 Oct 2018 03:37:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ABAzHvy42/tuYULpp/Kx5+SxMsW4Nke/wMSs9iUcpHc=; b=lWo1eimbZvfBtXD6fF2UTnXbEDGNbrrp+TEifioPhlQGsbBSQerg1TYNRKVLWoSbVs VMiiUCJ0PqqXLfFh8ln8SVcMVNhkYFF8irHBnx6Z1xFKb+PoiVh5rYq5I/vljqOCX5j1 9snR5PmSNU/6+/G8hF2OgF+ihEa3o8nK4TDj2/V7N2thqLSbm4eDAenVU9EtBY54ryCT RBskVh4KepShJvlZct5z8YzW6sbstZV/6X0d/IF9f3s1VJ3bn9MfpzYWPq2BVqmVRFtD dWzif/Gp9lAJ8PrPp/GwLkXIDtkQZhlw+0LQqwz34uaPUwweVIzrstYB/VkilgtSgEXJ sJXQ== X-Gm-Message-State: ABuFfojV9y6t0zdtFM32IC4AafFUrgCCTM80ketp7IXL67VEl6rJDSld nwsVWtB14ZV+wG77ON5A6R6npCDaU6AygOWwCo4= X-Received: by 2002:a37:e21a:: with SMTP id g26-v6mr17611823qki.330.1538995020814; Mon, 08 Oct 2018 03:37:00 -0700 (PDT) MIME-Version: 1.0 References: <20181003132212.12619-1-boris.brezillon@bootlin.com> <20181003132212.12619-8-boris.brezillon@bootlin.com> <20181008122101.7b391070@bbrezillon> In-Reply-To: <20181008122101.7b391070@bbrezillon> From: Arnd Bergmann Date: Mon, 8 Oct 2018 12:36:44 +0200 Message-ID: Subject: Re: [PATCH v8 07/10] i3c: master: Add driver for Cadence IP To: Boris Brezillon Cc: Wolfram Sang , Linux I2C , Jonathan Corbet , "open list:DOCUMENTATION" , gregkh , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , DTML , Linux Kernel Mailing List , Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Przemyslaw Gaj , Peter Rosin , mshettel@codeaurora.org, swboyd@chromium.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 8, 2018 at 12:21 PM Boris Brezillon wrote: > > On Mon, 8 Oct 2018 12:06:30 +0200 > Arnd Bergmann wrote: > > > On Wed, Oct 3, 2018 at 3:22 PM Boris Brezillon > > wrote: > > > > > > Add a driver for Cadence I3C master IP. > > > > > > Signed-off-by: Boris Brezillon > > > --- > > > > > Changes in v7: > > > - Fix readsl/writesl() usage > > > - Add a depends on ARM || ARM64 || XTENSA to forbid selection of this > > > driver on platforms that are not implementing readsl/writesl > > > > Most architectures include asm-generic/io.h, which contains a generic > > implementation of readsl(). Maybe that #ifdef could be extended here? > > I remember discussing this with you not so long ago, which led to > > commit 0bbf47eab469 ("ia64: use asm-generic/io.h"). Do we have > > a list of architectures that don't include asm-generic/io.h? Maybe > > the 'depends on' could be for the set of architectures that fail here. > > Well, we started patching 2 archs (ia64 and sparc) based on kbuild > robots failure report, and then I received other reports (still from > kbuild robots) long after the initial ones. I can't tell for sure which > archs are not implementing those functions, hence the conservative > approach taken here. I think it's a fairly safe assumption that architectures which include asm-generic/io.h will be fine here. If one of them is broken, that can be fixed individually. Looking at the ones that don't include this file: grep -L asm-generic/io.h arch/*/include/asm/io*.h arch/alpha/include/asm/io.h # missing readsl arch/hexagon/include/asm/io.h # has its own readsl arch/mips/include/asm/io.h # missing readsl (but used from ide.h?) arch/parisc/include/asm/io.h # missing readsl arch/powerpc/include/asm/io.h # has its own readsl arch/sh/include/asm/io.h # has its own readsl arch/sparc/include/asm/io.h # has its own readsl Based on this, I would try what happens on mips, and make it depend on !(ALPHA || PARISC) Another option is to just use ioread32_rep(), which should be available everywhere and has almost the same behavior as readsl(). The only difference is that on architectures like x86 it takes a few extra cycles to look at the address. Arnd