From patchwork Thu Aug 5 03:32:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 12420227 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=-17.4 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 7EA4BC4320A for ; Thu, 5 Aug 2021 03:35:30 +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 4C72761050 for ; Thu, 5 Aug 2021 03:35:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C72761050 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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=LiXhONmrNyA6QlLh7rmt7o2XYuBmsoYpVgHgJ/cczeE=; b=qqHwZZqd5nwjCZ 0bBE6GoFUHTV+dQXbA+Cc0oUFpxnqrp9HfB285JCYoY0wxPRPpT96u/vUXXSYUsjKqMNg0cog9yy0 6OSeBmlb91WIfJfGEyOIeMTQSdjqJIhUc8jK7JsEl/uvM5qDnEsmluy9tvibK4tPArGHynmDPVM0h c0dhFQOC5tdQpnCUieStlrKYUuOaCLM8cDv/bA4bnxkV+9sJSSb1dXuzOlNX7I4o+3QGlPCWagUbf 0Xl1Hol1fVkqYQpTY7fhYondHgzQr5shM1XIzV7TZOBvfx1l6br74D9y98JdgW6XTppbJRKapmh9L oeWjDPJL8jXw+OD3R7PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBU83-007yUV-MJ; Thu, 05 Aug 2021 03:33:07 +0000 Received: from mail-eopbgr130054.outbound.protection.outlook.com ([40.107.13.54] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBU7z-007yTx-Cw for linux-arm-kernel@lists.infradead.org; Thu, 05 Aug 2021 03:33:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YIFxhwbyDPXDu2+v39taAIa8vw6wFcsyOp3gPlNDwd9e8qSOV8DhapKUWlYY6D7HKfTkhkHNarDLIr0uulW1c8NeRoIJu/dt4Zgwo19gaaIhRvDHzUyA7jD3G1Juzgp63ZofLe7BK9V2N7j+x8W8uqBQ4A61H4A7DebWkBYbM3oFnuZHaFExR2y87vc5DMAwoEIh4KhdRcPMWg04DyYTSIwrYWrSTI46DYZMhrTTpxGy7B/0cWlZG5XKKBVw12BJJSffOH1Q48m58JfH6Nuj8k9JIqK7Tj3QBmfstlvXPgOXVkMd71Scs+ilUBh4uWRyiDYEQkdOMZ9uR0gMty6KGA== 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=bXFJxVIoVk11oX9ieK4a8eXnmL+i5PORCezGKhyEA5s=; b=M28xKwsqLdD+8Z+zSb+I9eaL7VaCku02ih7UDArZg4kb+2mnewdBpQ8ldw4/ePW3N328hQF89suMR0xg04RZ/SojvuXaeUhVpN3nYA1Ntw8fg0KWHZ08XBcAWgZEGNn8SKg58hHzFU1AVn4Q0bCNwoPRD7zpjImT04C/Lybe/o4ekssJlRxzsHHWK4gCD70AM2FNiSKKqTHeO7fcPeLIHLuby7tcsEjtORdYU/PYM09dT3X/kDfbLSjKtpA6kVwpjoeR1nWThnqABR1S0O72mUgK/piBVDGQc17kD/N7CstcPQmWtB4j4NKodiW+XM4uGngt+9dGzCo8Gp2ikKDQow== 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=bXFJxVIoVk11oX9ieK4a8eXnmL+i5PORCezGKhyEA5s=; b=cUKbZxeQJcpwjfU+dgVyvi2XAAldIWydJ7HFCQaYPiBAjtieHkJAQXiEsDz0qEfjj/cXLbHB+h2R0/RIHacjvK8vTSaCIg6agexlCdN03ljci1YWivTHliFvb7DW/WdCOalxX93HjpqT3XMuplI7ZEDMSEIxwJcjT+KIqkzOrQE= 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 DB9PR04MB8448.eurprd04.prod.outlook.com (2603:10a6:10:2bf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Thu, 5 Aug 2021 03:32:57 +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.4394.016; Thu, 5 Aug 2021 03:32:57 +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, cleger@kalray.eu, peng.fan@nxp.com, Dong Aisheng Subject: [PATCH v3 1/5] remoteproc: fix the wrong default value of is_iomem Date: Thu, 5 Aug 2021 11:32:02 +0800 Message-Id: <20210805033206.1295269-1-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR06CA0085.apcprd06.prod.outlook.com (2603:1096:3:14::11) 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 SG2PR06CA0085.apcprd06.prod.outlook.com (2603:1096:3:14::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Thu, 5 Aug 2021 03:32:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02693285-a96b-4ffe-1fcd-08d957c1b7ef X-MS-TrafficTypeDiagnostic: DB9PR04MB8448: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AdWH6WZvliQGqjd5uGNkFkA2X1oAhejh2fITEoY/jwFxeXn5KsSimF65O2Pv5qdMNbQX6S8L04yUhB5pGv5/Jgv+ucCIuaiyFVN/ulyDuy0JNliQvhU9otfCgGnMObHXrxaqNH7bLpdJGeC7L9U7uNSbD7D4SHfXdFJXLtn5CPTYfL2xuiTM2PKnJ6W1bwxOfkMpA2seOyUo7xl9/tSeVe48W3OSOFZNob7Fknbq4TBHifojcMr1/wyUtNYtk+xGAv1T05Y6Px8f4GE7XNi98NjObiVOXSeCVmYF0n7Wb5wk8kXclrqDQjU6F/yWCgErDZRqGnPYwo/2Oyr9FVcFFCDcXbEAD3zPufvmwI7duZwM1rsc5wG50Lpi3GHrIh0wtXTmdU7meHm29kgSFbDeerbVtYYaeANRbLYCqQ0u9dywoGRY7NfWjyF3kdh2DJAWGhAT9/YWwJ1WMUiR29Htu8XMpAFqNfeLglq4mY3oHwGjZP/wIgVwSqBJkQDVM3lp+BN2R/EdB3RNqhsEiOfDxVuOR9z3Fr3UMCF5MX9AFCvN62xgN0xhdwBdH0GSvP/1p+HMNl0mtqOUyj/pdQwiRsstkU0GiAu6j3aMMxqovTvwchOJl/CZ1wDdpnbM7PiwaJqlGfaEdn71BY/cWHdS6Q/gTNT40NzQH1VQ/coZx7KLxsStbjravPG4peo2JbyCMH+2gPb/MFOirBV2+0rh+Q== 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)(396003)(39860400002)(376002)(346002)(136003)(366004)(6916009)(6486002)(66946007)(8676002)(1076003)(6512007)(38350700002)(38100700002)(66476007)(66556008)(8936002)(2906002)(6506007)(186003)(2616005)(36756003)(86362001)(52116002)(478600001)(956004)(316002)(83380400001)(4326008)(5660300002)(6666004)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0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z7Ka/rZwnAEqYf6LHHZFDoz3554sGblBlHr+2Opc+XQ8uHn+wurLM91gPndYlYyoifHUlcH7t/oceu+6hQKZuzRLXrXMQBgSK5r4ywMrdVfl9ZPBC+9E3ZDwVFoLB3iI7MVKImM1DFfF4ryJBkQ/nP7SfUtjyDh4AKx7IyWjqyzWC6LO/4/t3ETRbx3pqj1/nQ+245LxyEonka8sd2R2sn+SGV0OcSa8fP2uu9igfzYFyHWWX9gFwk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02693285-a96b-4ffe-1fcd-08d957c1b7ef X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8477.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2021 03:32:57.8191 (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: JPdzVDGydNCh54D1U+IJbgPz2xXB4RHdsWP5uLsHAEBbXxvT9pmjnVz1yWNoOq3pNhwK58Eo7CvFlDrg2oyisA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8448 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210804_203303_561750_845A8527 X-CRM114-Status: GOOD ( 11.84 ) 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 Fixes: 40df0a91b2a5 ("remoteproc: add is_iomem to da_to_va") Reviewed-by: Peng Fan Signed-off-by: Dong Aisheng Tested-by: Peng Fan --- v2->v3: * no changes v1->v2: * update rproc_copy_segment as well --- drivers/remoteproc/remoteproc_coredump.c | 2 +- drivers/remoteproc/remoteproc_elf_loader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index aee657cc08c6..c892f433a323 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -152,8 +152,8 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, struct rproc_dump_segment *segment, size_t offset, size_t size) { + bool is_iomem = false; void *ptr; - bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index e8078efb3dec..3cd1798f17a3 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;