Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp460554rwd; Thu, 8 Jun 2023 03:17:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KEfIU/Ru11zCT8q0xx6RTGuH+/Cksjo6ZX/HqZ/EbEIXHtGpApMRAFzrFj4WKNeDFso6a X-Received: by 2002:a05:6a21:1185:b0:10c:513d:2bd9 with SMTP id oj5-20020a056a21118500b0010c513d2bd9mr3307114pzb.50.1686219477053; Thu, 08 Jun 2023 03:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686219477; cv=none; d=google.com; s=arc-20160816; b=UM3S+fn1Dp45FobpfqiTp85JeYWMQErIDuXH7OW7WRwuWs1mImxPufTHc4eegvaBgv yc376pWeJdHclbNanGurTvsz5feLhYDcYLRqf3rti+1oD5Abqa6Hne3mL9NP9TdK5Wf0 Ue247sYswiDld/eG0U8O34vrhPmVy2ejOvrXAGqz0c+Ma8EvdMZSplrKtaPILb7mrGdD rGYW1QIsLK4bO9W+Kb9gGDN1JDqqdZQALUJJbSil882U3fmAIa2jOAjtbR1Qx7EdA2FX hwcwTChDSfL4dDcbm/35JOfprIusx/3v0bsvFR10wJKP3GfM7Gv2YbWIkgor9ZBIP3AD rCIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=KDvLi6qWy2Hgk24AJF6jSkifWa/4NCQaUJ3P0jCufr4=; b=F8v6TkIxZcheepHCwHGcHM8wrFTJcwphwqVZu/6tvP0FfzfPHP54s2b7V3OGwuW+q/ dgSN3RCZ+CPY/VjkaBaP+gNcpKAX67OlH/GdqwbbLpMLp6F10cAgMwE5NvIb5Wnq12it W4Y2WDlh1OUnZu0VTTWcy7uBPoQ9bQXLa4EWqGaXKlCH+PXPLUqvEare/59oQpH+TcoP AxTZ037Y80lM9xmHxUzbLWpzKq37tJgUvPfO9CkAc7Jb/GtbbxFEajySwHhxr7LMbWFb wRwmHu0NeD7RGfJHO8tSBxca/kZ42ExuZneSAJphsDo+qZsTd8/WBrkkWcUj/O5R2Dvg i5eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iy15-20020a170903130f00b001a6ce2cdb20si847543plb.244.2023.06.08.03.17.45; Thu, 08 Jun 2023 03:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235474AbjFHKEA convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Jun 2023 06:04:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235522AbjFHKD6 (ORCPT ); Thu, 8 Jun 2023 06:03:58 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 132C42736; Thu, 8 Jun 2023 03:03:50 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1q7CUZ-000ZFZ-Tz; Thu, 08 Jun 2023 12:03:43 +0200 Received: from p57bd96d9.dip0.t-ipconnect.de ([87.189.150.217] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1q7CUZ-0047u5-Mf; Thu, 08 Jun 2023 12:03:43 +0200 Message-ID: <8205bc2cb9f983914ff6920deed3f54893713ba0.camel@physik.fu-berlin.de> Subject: Re: [PATCH v2 3/3] sh: dma: Correct the number of DMA channels in SH7709 From: John Paul Adrian Glaubitz To: Geert Uytterhoeven Cc: Artur Rojek , Yoshinori Sato , Rich Felker , Rafael Ignacio Zurita , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 08 Jun 2023 12:03:43 +0200 In-Reply-To: References: <20230527164452.64797-1-contact@artur-rojek.eu> <20230527164452.64797-4-contact@artur-rojek.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.2 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.150.217 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert! On Thu, 2023-06-08 at 11:58 +0200, Geert Uytterhoeven wrote: > > > > Aren't we dropping SH_DMAC_BASE1 in the other patch anyway? > > Only for the SH4 parts that do not have it. > It is still set in arch/sh/include/cpu-sh4a/cpu/dma.h for the SH4a parts with > 12 channels and 2 DMACs. OK, thanks for the clarification. I will review the other patches tonight. > > > That is actually safer, as the user can override NR_ONCHIP_DMA_CHANNELS > > > when configuring his kernel, thus breaking DMA due to an incorrect > > > value of SH_DMAC_NR_MD_CH. > > > > > > Unfortunately we cannot protect against that when using a single DMAC, > > > as SH_DMAC_NR_MD_CH can be either 4, 6, or 8. > > > > > > Perhaps this configuration should be moved from Kconfig to , > > > to protect against a user overriding this value? > > > > Isn't SH_DMAC_NR_MD_CH already hardwired to the SoC being used? > > It depends on CONFIG_NR_ONCHIP_DMA_CHANNELS, while it > should be fixed based on the SoC. I agree. However, I would be fine with merging this patch set first and fixing this particular issue in a follow-up series. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913