Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp303500pxx; Thu, 29 Oct 2020 03:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycgJ2zik2WL1k3opdLyst4qz1rvEniiShyI0sp1G6YfxLMa97AasG4+j2WtpbQSOeUjvJa X-Received: by 2002:a17:907:204c:: with SMTP id pg12mr3095317ejb.464.1603965967478; Thu, 29 Oct 2020 03:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603965967; cv=none; d=google.com; s=arc-20160816; b=OaHJuM0oTz3UTPgYtY3TvwNxbMdwN5NPxWOXJNccJ3Xoxhe2Os4M5rrXu7oEsirkHi 2T9/Y+4WC5lB1iLHKmcHS6rkal4Yd/3NPNKqImnNc12tkxIaGFCYgzhNYAEE9EGEcoqL Fia7nYu2lAeyBuI/U+wR3JNSksWaaFYudA4PfDljYm1ciSjt58XRd0yRrbyaXoHRJbvS gQjQaK/KxG/2gw5XlemXCcAY7PJ+G+N02Mrdb5MbuGeRDnivVacWns56hqKQOE5jW4d0 EPmqAtv03gxAURs2LVMHYM0zE0WdEy+8CuiEitD96/cgnhAgIfoVtsI2TEgkv2U4oDaK SvSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iodCAO3AAfy7xWWNl8AM4wJsDf3U+c02RnDO8vL2JRs=; b=xuZokPIJdM14J3XJK/2b7CFuoYPBXlsgvOZgQoD7F+mACa9iAmk1GjN5pWPqXtAUi6 6X/szfbVuVBvftS4gGyrREyXrzLO63YyxIKda7xhYEaI4wD2j++lCf+57nL6LABc9MeL yJu8SE9whVxCtqNxzGS3+vQ1T7vIm1NKhtN+XgCXIl5RJdmnQ2GKIyu0v7LfufAQBI4d XrykUbwmPh0hxeDXVBv+7vWM9xRaOser5H28k9BnPFQIW5ydx2caUKTWdqkLcD0vS/pl Wp5oMW08kR8GWVhjT9g5iNAZciZECkAyGWezDKFLwPMYR9n3/XBS2esrln2XVS0NH2BE 787g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vMd1WTw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nw19si1422121ejb.586.2020.10.29.03.05.44; Thu, 29 Oct 2020 03:06:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vMd1WTw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725937AbgJ2KCY (ORCPT + 99 others); Thu, 29 Oct 2020 06:02:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:44760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbgJ2KCX (ORCPT ); Thu, 29 Oct 2020 06:02:23 -0400 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 6DB54215A4; Thu, 29 Oct 2020 09:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603965098; bh=9kcfotFFJ47rYdLC6ZxzdCDBa1k7PeFD878Gh2iRMYw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vMd1WTw46NmbdjDfGERZXE49CkIxTu62Lo98SE3sftOXo2ak1wjE9ZykA5QSCJ4f6 RDyWIZLY0FUMnquHbcpT2wuFgnwMWGJcElPYN/dCVDOBDKjwtw6POjOBjpvi7Bxxzs IPD7rWkW0qA5Zp3lwpn5CoP9SOsl9SQ1SBIW0R2s= Received: by mail-qv1-f54.google.com with SMTP id b11so1072516qvr.9; Thu, 29 Oct 2020 02:51:38 -0700 (PDT) X-Gm-Message-State: AOAM531iPFjBDH77Fzh6gQbCnPxvw2RSjiH09W81ktIs33bDifYtZd2Z iZ9fVclvnvl4DqzGCkdGa0d2BHxI6WBsCG1nBpw= X-Received: by 2002:ad4:4203:: with SMTP id k3mr2986180qvp.8.1603965097361; Thu, 29 Oct 2020 02:51:37 -0700 (PDT) MIME-Version: 1.0 References: <20201028212417.3715575-1-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 29 Oct 2020 10:51:21 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [v2] x86: apic: avoid -Wshadow warning in header To: Paolo Bonzini Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , Arnd Bergmann , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "H. Peter Anvin" , "Rafael J. Wysocki" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-hyperv@vger.kernel.org, "linux-kernel@vger.kernel.org" , kvm list , Platform Driver , xen-devel , "open list:IOMMU DRIVERS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2020 at 8:04 AM Paolo Bonzini wrote: > > On 28/10/20 22:20, Arnd Bergmann wrote: > > Avoid this by renaming the global 'apic' variable to the more descriptive > > 'x86_system_apic'. It was originally called 'genapic', but both that > > and the current 'apic' seem to be a little overly generic for a global > > variable. > > The 'apic' affects only the current CPU, so one of 'x86_local_apic', > 'x86_lapic' or 'x86_apic' is probably preferrable. Ok, I'll change it to x86_local_apic then, unless someone else has a preference between them. > I don't have huge objections to renaming 'apic' variables and arguments > in KVM to 'lapic'. I do agree with Sean however that it's going to > break again very soon. I think ideally there would be no global variable, withall accesses encapsulated in function calls, possibly using static_call() optimizations if any of them are performance critical. It doesn't seem hard to do, but I'd rather leave that change to an x86 person ;-) Arnd