From patchwork Tue Jul 6 14:23:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 12360617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54EF8C07E96 for ; Tue, 6 Jul 2021 14:27:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E3CD610A6 for ; Tue, 6 Jul 2021 14:27:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E3CD610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+j2mpaQ1tuPgb93BZeofd3g8LmeYWDArt1UQHdUWFmk=; b=MRAPw6caeLOjXC U6chSrWWf3Dr+4K+CgqeIWLHqe+YXMSP2KSFDCOsLArLerV7Kkh2lwJHfFFEtwVSnvKmH0YCGvCll 4YE3OSm81Ga4afAQEtmSY/BVyMwUAxaqrhI4G4jmkKQbqsnEEEiilh7V+4GxiUGenQpHFXym/4qYc bOpq/yb42FLH3w+1O5JMRGb/IR3DCbRVoBiwfRU02rqMlgu/rr8PAemNCi28x+Mt9mCKnqi/nEs3h EQXGZEcaaPhHQQnmUwP30FPnM2x82bMiallgw6pBM5k1Zabb2WssGKDqTbp+7VNMJprzy0ZvZGn/P 6ox/RloPDKR6M8KheFlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0m0B-00BzVR-0s; Tue, 06 Jul 2021 14:24:43 +0000 Received: from mail-eopbgr60084.outbound.protection.outlook.com ([40.107.6.84] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0m07-00BzU5-Ro for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 14:24:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0Kh6cvEv1HxKsKAc1Xg9qBxTAyR+zeXSyDuJa3McgbhPsxv2mRjTwUn1yYLUmVv4jgQAgbe28xg7pCvT6tl2a3Qipx0HlHRpqK2g5x8PpkNCdf+KlYYIw5SAP9oqWyQI2AQvuLDLTp4QEAmKzSgJxvXcUJX5utoFJb0d4vw4G9zZhOlhoXx0kdXaxMWOUG+qxmbKPVVM6OjKYloW5NTotxJSP4aSWef8U85897mmmA2dardtrWvkzv08EfPlFVRzOxo2pDznLY82+7gAbREAFrKkFUzRFrEXm+5fdygevzL0WdytLdGj89N6e/k9sf7zW3+jcnE0J3C9uNsMTnOTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qgKF7hOBZ8nD/BsEySD+8q18OMir5THC/kRwMxImVcc=; b=fMZhSgu9akGMdxpVeTFuJw1HpusjuGfxODqLkXOceWajYqN62NrksEyiHGFFPTTshWQBnd/wjt3qjT5Ie10Mw0IlxcQp1tyPpNB4sBFsHdoi6zqigsBPQKz/CkUYubnVu2REkwSb+yYyLjvk9aYtTx3rXeu57QHFrY5fubVPnVu+l2m1gYHyMlB1ibSvXh57u37r8EVsQDThWnE0WjHU6pVFt6JZS7oLa0Aq2o7YJpk6r1ISbOyrf2wCZ5VsRT5z2TDNVl1QLle2dtZW46MUDn5CmQptLklu03S1udNbUbVH42t0moeiBZlMQ0xH0/MBELRG1sYVaFH34IgwutUqbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qgKF7hOBZ8nD/BsEySD+8q18OMir5THC/kRwMxImVcc=; b=QuS2xdynE8Wugl9RuHqJnliAvRbXMzNXjYxzaKLBEJUSAZxLSu0XdBZWP3B5Jr5fAKwxiKSIbPCW2WtNP5xDdf0QO8A87hqHAPZAQfIQ4rhCBGeRqIBe53HMYeosmoLkKY9Xifvi49NN3rTCrcLQWO6bq/jTIn/8tjB6ruYetSQ= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB8477.eurprd04.prod.outlook.com (2603:10a6:10:2c3::11) by DU2PR04MB8853.eurprd04.prod.outlook.com (2603:10a6:10:2e0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.26; Tue, 6 Jul 2021 14:24:37 +0000 Received: from DB9PR04MB8477.eurprd04.prod.outlook.com ([fe80::9daa:ab21:f749:36d2]) by DB9PR04MB8477.eurprd04.prod.outlook.com ([fe80::9daa:ab21:f749:36d2%9]) with mapi id 15.20.4287.033; Tue, 6 Jul 2021 14:24:37 +0000 From: Dong Aisheng To: linux-remoteproc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, ohad@wizery.com, dongas86@gmail.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, Dong Aisheng , Peng Fan Subject: [PATCH 1/4] remoteproc: fix the wrong default value of is_iomem Date: Tue, 6 Jul 2021 22:23:32 +0800 Message-Id: <20210706142335.952858-1-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR01CA0145.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::25) To DB9PR04MB8477.eurprd04.prod.outlook.com (2603:10a6:10:2c3::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0145.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 6 Jul 2021 14:24:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 072f2f9e-9c8e-4241-5340-08d94089c890 X-MS-TrafficTypeDiagnostic: DU2PR04MB8853: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RcVcjSx8/UMw5H8sIceCqfeHOlls9Q/svrrNhY1EIugsHuQ96Fxm7bkLU0RX68MLshkBtenVxJnYtIOeRlRH2CCKG1f2kQMuMF0h0v89GVdD4eJOcNTwx5JgPaj85uGHyCLFv2hJYmk5pSNspOF4S5ODK1vj9mGruQzFpLDnsmh96tI/qLr38PK+tKBtjws745NRmt+05ZbmhgufNTnwg8XBvUlNxANBzmfM0oGXBYsKLZWRJeBtpOJpFqMEOx7ajoap71SFtYSSb/CC31d0YPPn1fDwfrLtPjQcyoUwasod/UhkVaQ8AStJAszKZx7/PBO5UpshUWqpI4NfqAQCsbCydoguoLfIaDMFbNtXVCN8PMsoIS4v2I0h1Q4mbWj3yZTY6bYYVPrZ2EzVnMWwg5I9j7cmc+WkV0unGRuzFcb9bmC1Mc6C5HbAMWXvhXh/nWcp8iUluGPgX4F5mOGdqQU1LDVpKlEYr1vFoGys+EBIOXQp7ryoGwTGwovwSr3B5joJqgSrTkOddqzIRy0HOJhiGQKnE6qsBMPvVmizy5iOYKVCO9Oz8EHEDig45qG/IPUBQuXO8LJK19UJsRQy3hqvOAqxHNMs2Qm139TYddjyMakUvtCVuSKW5mmLq50DD1TxR6YKHWzOYsG0KfmEVI5oYuZWb2Selyj9aOq+S/OXOficY3W1sb9KZ0WQ9EA6fmTxhWT5hFdKjQex5CssUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR04MB8477.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(39860400002)(136003)(366004)(66556008)(66946007)(8676002)(66476007)(1076003)(316002)(83380400001)(26005)(6916009)(2906002)(38350700002)(54906003)(36756003)(52116002)(956004)(6486002)(8936002)(478600001)(38100700002)(6506007)(2616005)(5660300002)(86362001)(186003)(6512007)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 13982ug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LJCNVaF1LdQt8tC6iMh5lIn7b0P16S7fCC2HdG9ZkrgxG3Gf+xXCROWArTinSmg0Ug7TiFilWyxtMqnTzjQ4G2y+FH/Mwr2luKoa1CV+Tr7LUOG4q9IyyJvYtyZ4Zbu0Z1n3C8v9xNP9n8idF+X2EYkWU+jPSWbXb0rwisQGQdOt2+JbVTgYTitEvPVQEgUA9HOu7CyJWDf4DsymOkXnV+oA4D86pe8uacncrR9hXLyBkig/ZOy4EOqcm88 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 072f2f9e-9c8e-4241-5340-08d94089c890 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8477.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2021 14:24:37.2151 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DW8xrhJN00n24BXbPlWjC9Vjay7X3GgTUy4tumox5eHv9RozbI8Mk7kpdO4yRxthEoXF6APIGy3ljQHP/jwdUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8853 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_072439_947335_131C6F39 X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently the is_iomem is a random value in the stack which may be default to true even on those platforms that not use iomem to store firmware. Cc: Bjorn Andersson Cc: Mathieu Poirier Cc: Peng Fan Fixes: 40df0a91b2a5 ("remoteproc: add is_iomem to da_to_va") Signed-off-by: Dong Aisheng --- drivers/remoteproc/remoteproc_elf_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index 469c52e62faf..2bee4d5a0995 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -178,8 +178,8 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 filesz = elf_phdr_get_p_filesz(class, phdr); u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); + bool is_iomem = false; void *ptr; - bool is_iomem; if (type != PT_LOAD) continue;