Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2910592rdb; Fri, 22 Sep 2023 11:44:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMqlcOWXmlvEW5+x5NqIXhssglEGQXBpSNrf27cCpXCYaseiaRPRp+GRy4sVL9y69vlhDK X-Received: by 2002:a05:6a00:28c7:b0:692:afaf:32b4 with SMTP id ci7-20020a056a0028c700b00692afaf32b4mr298737pfb.0.1695408270854; Fri, 22 Sep 2023 11:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695408270; cv=none; d=google.com; s=arc-20160816; b=K2cv1+PqnvmxWzRqudrt1A+TMZUseu8MejhUiW35ZvQfjQMv4EzS2DdAVzl6T+81JD WUAiRm1BYtjC6YBkkrMmR0SizH8KXsIU+IJjncZZFwHQ3v+G6HmG6DU1bpwiK0SBaijB n92J9jnzyspqbVGeMXTdnunwR5gWc7K6sTdGNbUeM2umnS/H4fEFWHUO1bPREwTpHMEc 0eufftcQYd9dNyE7fDG+9Jo2S5PpWYzh2jvRQLbqZGfvLjQontSPc5xZJ2uUm8/ShSP2 K5YaJSvzLFmdsNXzOZImrgSgu8PAaZbwZuu3w6zPr6fMNz/+ov10b72GiUwKxLGfjbnl DxGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XoRUll6CaorBhs0khbfmRz9BF9/JTkYhq0xhHzZ3EUM=; fh=n+P68pXtpZuIh284hCCR3NLQ2ZJ6VhfMR4eylC04kXg=; b=SeaXPBRiKfxDGnhMy1LP4W9gBilb+gHibx+AsQ43rz5XoyEsvK2PcHTD4hKjq0ROb+ QCLLnE1cdX6Dmdrl+PG5LrqbUaYVfK5FfDc0zEQkiAX1pXJendq4g4GNeRfWAqVY/7AZ jEottZM4Pfo6XLWSBJ+i7iHORouTQV22qRO3bfNOIPAkdF0obNRZspVCK6zm9kvW4iuQ apm8+0eB/xWpR4TK27B0d1bgAdIAdf+gsMMB6AzKgi2M7ud0aoC2ggyZQOM7h+nJ61vY 3ESFB5cmC1ijx0OUUcGd7lOJvMukmIBsFYUw7gvSohfkrjVeiCjHG1DUcnMatoPdFPjl mGVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ex4JyoMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id t23-20020a056a00139700b0069058764684si4737139pfg.367.2023.09.22.11.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 11:44:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ex4JyoMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DE5BA83B6BCE; Fri, 22 Sep 2023 07:51:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbjIVOvb (ORCPT + 99 others); Fri, 22 Sep 2023 10:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbjIVOva (ORCPT ); Fri, 22 Sep 2023 10:51:30 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C66180 for ; Fri, 22 Sep 2023 07:51:24 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id B41AA6000B; Fri, 22 Sep 2023 14:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695394282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XoRUll6CaorBhs0khbfmRz9BF9/JTkYhq0xhHzZ3EUM=; b=ex4JyoMjQ1GB/sXvlDYbkr5R/96btL6C1gZgOnfYfsrwAh92b5cF40Go53MegJ5I0xwv3/ hO9PNGlRcP2zlAYmdNI9HO7XnD+GSCliVsIRQ9nC+210FkZh1FA188FXxEBBawpkPOgm2r BaQHPgYtGGyXu7hIAcZcIGT1Ow9nkUHejkz8tuCXNWIvk2sxYGkeyo/WwBy0x9ZZ5IfTPR qxWOsWrayM8AMV+tdnaZ5Tu8FiccEe2VLAs4XE8B1h4CJgVRI0wHuhcEx+B7+hOuUMB6mr 8K8veM4IEAATv7QzSvfwuhpDfIr1iVqWB1nIS5jDCuoHfi87g2X+eXTGf+K/iA== From: Miquel Raynal To: Shivamurthy Shastri , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org Cc: linus.walleij@linaro.org, b.spranger@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: map_ram: prevent use of point and unpoint when NO_XIP is set Date: Fri, 22 Sep 2023 16:51:21 +0200 Message-Id: <20230922145121.578332-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230919113320.16953-1-shivamurthy.shastri@linutronix.de> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'3cff177fc2793a362d784c912f536e69a755925e' Content-Transfer-Encoding: 8bit X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 07:51:29 -0700 (PDT) On Tue, 2023-09-19 at 11:33:20 UTC, Shivamurthy Shastri wrote: > When the DT property no-unaligned-direct-access is set, map->phys is set > to NO_XIP. With this property set, the flash should not be exposed > directly to MTD users, since it cannot be mapped. > > map_ram() exposes the flash direct access unconditionally which leads to > access errors (when the bus width does not match the RAM width). > > Therefore do not set point and unpoint when NO_XIP is set. > > Signed-off-by: Shivamurthy Shastri > Reviewed-by: Benedikt Spranger Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel