[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2][4.15?] x86: fix build when NR_CPUS == 1


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 1 Mar 2021 15:01:27 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=O5AEz9nTmvG94Dz/cZ00sMyD8v8tmrNrIFGLwZqaMJE=; b=JmsUifwB91IyR5j7bybixCSAjXBCfStIFgIDW3mA28qrF0Q8FmtQGk6xQRyaptJbAvLyBgxGosqr2gBEjun1OG/XB80bRCr2zIk8f7tWVpEHsKXXAKR0I4lFmYIGfl6A5Lf1kCNAiAwgOIqXLkRaU/lVYSKHK7+8YjwXJTpbQmocaqMaLIDPFYyItc4wj5pDsCeU9RYpIv0F0wJChat/4DZZ1HiqmFYRMRMsyVWL8NKRyhwQYE20QQt/9vmQOnNxurTIbLVovwRUSXN7e7iEqeYbjyVqaeIhLCUR3NPxti933GTemg16+a7JgMV7BaTunbgqYx0oA5I0f536guihTQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaQtpyi+hhGoZnXIOJUIgUXbFCcGQeq1fsFY0y75PVyFAoFUHBWeEUYbpdTNXw3h5h+YCLPDHvZs5CMlZG73kpfR4zaHSD0d7fAjlD6MGjwmapCTE+Sh0kPIbwNagGYdXK9wrZ9nsyh9lxZMzSBmtXa3ooTR5DbHPCmqkeylbZTg6jXwYf8RmqFxCKPs1FjtGB85Eh36PJ9B59UhbwdYFX8OfNpCdPHBxNJdTfh8SKojZsSUCIxacYkrxGpIIdZbzUymjux5yOeZALSuFH+BmrAMViHBwtok150MBY6cw0fIoP3tSrMdTpuqcU+jd+GaAmOa/o6OqNpBR/+P7OH4AQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Mon, 01 Mar 2021 14:01:49 +0000
  • Ironport-sdr: rMLn6bj7Mxcp9bZvQjv/xeZlwnfurQ4gHBMWzf0587OqCyUPCvxkOjQB0NJuWcUcfFi9Txq0qz U2EN+NRxn2LdCk0c8YTZ31Z2cEZMrQrXGJtHZvUiOsNtcqyOG1ejVVLKCWhVTeJu+aqqwAUvm0 dbT2Y5qXCb3w6C7HF3tHb8FvdHBioyiJ0VUSKeIcaKBWg3rQleKtfdXkAmWZMu+IAIb9IMNdhc qafBahFFhcw3pjws/cw05Dt8tFG3sRKKvpRsUK7OKYxnEnzP19nbuxsiIPn5yBejgF/oIYD4Nw NCc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Mar 01, 2021 at 09:31:07AM +0100, Jan Beulich wrote:
> In this case the compiler is recognizing that no valid array indexes
> remain (in x2apic_cluster()'s access to per_cpu(cpu_2_logical_apicid,
> ...)), but oddly enough isn't really consistent about the checking it
> does (see the code comment).

I assume this is because of the underlying per_cpu access to
__per_cpu_offset using cpu as the index, in which case wouldn't it be
better to place the BUG_ON there?

Also I wonder why the accesses the same function does to the per_cpu
area before the modified chunk using this_cpu as index don't also
trigger such warnings.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.