From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 1AE0EC38A24 for ; Thu, 7 May 2020 16:40:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2DA7216FD for ; Thu, 7 May 2020 16:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588869612; bh=GG1N4eYVC6gF2jkWtOf+2i+94GM+Npe39EG8Lf+ifms=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=NAPCIvPygseTPQ6mQItVnI5XrjO8oDrxRmW8P0Jny+B26LVsjwln2ePiszKcEVogl bSv09mn/y27w2W+G3PltnYN6Ivzefx4Y07tv+nTpWHaKygeh+8tOVE2HpAHx5kh9hd FBKRLyroRYV+N3uAAEj/a6IEBFONMbmgnkBrA8eA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbgEGQkM (ORCPT ); Thu, 7 May 2020 12:40:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:35814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgEGQkM (ORCPT ); Thu, 7 May 2020 12:40:12 -0400 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BFD02084D for ; Thu, 7 May 2020 16:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588869611; bh=GG1N4eYVC6gF2jkWtOf+2i+94GM+Npe39EG8Lf+ifms=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HgJwnUm2oLXN80bpkEvbRGUcxO7po8C3x+eey1I1d9h16G8qEy4dyYPWtHMA+/CU8 wMP9Z9o7JuhBTBldGAWOeFWND8Css3TFi7aacE4S84ZElrx+cepmd8zVX0UWmm6+CO mDQ/VUMY2FfS/WO8rZqbmImH6hXwc58bgV3p6Rko= Received: by mail-io1-f42.google.com with SMTP id d7so2790076ioq.5 for ; Thu, 07 May 2020 09:40:11 -0700 (PDT) X-Gm-Message-State: AGi0PuYQZX2ujFsaxdQdZ6u2rCmBvooFoFQOJUACIRXC15jqXQG9w+Fy QsM46fs53+CXIJ9+iRf7aotn8mXtunrj4XVYANk= X-Google-Smtp-Source: APiQypJU8CxXD0K+wmjkUZLW0ktGnLc+EwVNbQw+UBmlCqtOEoPpKmbWJbvupmPg1sRh5Xk+l48nSrDsKKRjQXG30+w= X-Received: by 2002:a02:3341:: with SMTP id k1mr13309473jak.74.1588869610945; Thu, 07 May 2020 09:40:10 -0700 (PDT) MIME-Version: 1.0 References: <1588858868-18039-1-git-send-email-guohanjun@huawei.com> <251b222a-7340-2d06-f07b-f81a9c19ac43@huawei.com> <628896e3-e43f-5814-a5ff-2bd5de223f20@huawei.com> In-Reply-To: <628896e3-e43f-5814-a5ff-2bd5de223f20@huawei.com> From: Ard Biesheuvel Date: Thu, 7 May 2020 18:39:59 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ACPI: IORT: Add extra message "applying workaround" for off-by-1 issue To: Hanjun Guo Cc: Lorenzo Pieralisi , "Rafael J. Wysocki" , Sudeep Holla , Will Deacon , ACPI Devel Maling List , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, 7 May 2020 at 16:02, Hanjun Guo wrote: > > On 2020/5/7 21:53, Hanjun Guo wrote: > > Hi Ard, > > > > On 2020/5/7 21:49, Ard Biesheuvel wrote: > >> On Thu, 7 May 2020 at 15:47, Hanjun Guo wrote: > >>> > >>> As we already applied a workaround for the off-by-1 issue, > >>> it's good to add extra message "applying workaround" to > >>> make people less uneasy to see such message in the boot log. > >>> > >>> Signed-off-by: Hanjun Guo > >> > >> Hi Hanjun, > >> > >>> --- > >>> > >>> Based on top of for-next/acpi branch of ARM64 repo > >>> > >>> drivers/acpi/arm64/iort.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c > >>> index b011d25..f3d492a 100644 > >>> --- a/drivers/acpi/arm64/iort.c > >>> +++ b/drivers/acpi/arm64/iort.c > >>> @@ -328,7 +328,7 @@ static int iort_id_map(struct > >>> acpi_iort_id_mapping *map, u8 type, u32 rid_in, > >>> * Otherwise, things are *really* broken, and we > >>> just disregard > >>> * duplicate matches entirely to retain compatibility. > >>> */ > >>> - pr_err(FW_BUG "[map %p] conflicting mapping for input > >>> ID 0x%x\n", > >>> + pr_err(FW_BUG "[map %p] conflicting mapping for input > >>> ID 0x%x, applying workaround\n", > >> > >> This is not correct. The workaround is only applied if rid_in == > >> map->input_base, so better to print a second line after the 'return' > >> below that is only reached in that particular case. > > > > Obvious I'm wrong, I will update this patch, thanks a lot! > > By the way, how about the print below? Should I add something more? > > if (rid_in != map->input_base) > return -ENXIO; > + > + pr_err(FW_BUG "applying workaround for the conflicting > mapping\n"); > Simply 'applying workaround' should do it imo.