Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp329268rwb; Thu, 12 Jan 2023 20:52:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsImvzXgRrchHKvHaT9p2SmqUbC920WGYMN8u4BwylBj5lIxMUm8XvQGKoBFONjSbg9dOq1 X-Received: by 2002:a05:6a20:94a1:b0:ad:c694:3fbb with SMTP id hs33-20020a056a2094a100b000adc6943fbbmr78673814pzb.25.1673585567887; Thu, 12 Jan 2023 20:52:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673585567; cv=none; d=google.com; s=arc-20160816; b=HpDF7BQ6Ag3UR36QnHX5vlFNK43MfYM+APxHWOKwXlfchCkFBmq/Rx28tauzYRomCw GbcIovtMXI+KEJWTP6V4GxnO0JPpQyee8X7V8EsUs5l3oN08radNLSeDygni34AaNQBg KjBrW6F5uGvWqVq0rfVV3bwrbvMZOfuL/rjJv0TdMpdgAv1/eqhdbrw7trK12QsT5E2K xeaizj3jJNbqfTjR8je0Rr2nSjxk4Ff7ttRa2PRRuzIiG/3j447tK3qc5Ov9JkhZ7Eby KlHHBLW5p2diVk+ZXYxNLXX/S0D9KidxcMaaJpPZvv1RDv+7R1QLhUnAaKdhyLN9Gh8m 8Y0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lVbqtFvEqcEY6PTmCOfzPzIYvqXqj8MQaEjPBYbJAVg=; b=G3AmUH2UFka19tgu4xTnY8++WaySJtuZBa3iKapNBfqzZZubcKGhHDv4eVgU4J0yPW +OdPIpnSWNs6JzlbTt8BXxAjI8F1PYxiHoVIZKUpwqzYt7cY26y+NtxI2wzDEF5aiSIu IK92zAScaOpxh4RMfnyekeqpx+Gu/54qy44mWeIGOoeUthjAjfsycHrV3Co7zTBhGL0W S1Nee++af5j0HFMbqQZKKtbak/Jj9DTcjfr7/TXpEORt9Rn7Hc6r5OusLGeeXSpxHfus lPsIAmuKMDqLdGzTrID1KlajZPZL/5O3UFvVMS1VM16C8fJQB22myIbeukJSy9vxJXqX 2qag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pefoley.com header.s=google header.b=oSg0uTIK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b22-20020a056a000a9600b0057509d0411esi20460301pfl.192.2023.01.12.20.52.41; Thu, 12 Jan 2023 20:52:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@pefoley.com header.s=google header.b=oSg0uTIK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232506AbjAMEtZ (ORCPT + 50 others); Thu, 12 Jan 2023 23:49:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjAMEtR (ORCPT ); Thu, 12 Jan 2023 23:49:17 -0500 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40CD65B141 for ; Thu, 12 Jan 2023 20:49:16 -0800 (PST) Received: by mail-qt1-x831.google.com with SMTP id x7so8186348qtv.13 for ; Thu, 12 Jan 2023 20:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pefoley.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lVbqtFvEqcEY6PTmCOfzPzIYvqXqj8MQaEjPBYbJAVg=; b=oSg0uTIKfexVL+8ythAlt7gKQD/HGKHc+xpRHILJIbXc/Q6TtTwAm9x3UWR9dlzThP PjoCNQjMofO/IuVqMEF74cp1PkNogOp+PcpAFL2pivlh//Mz+FnEt/Zc80N/JXgNln/A 8mcDcquFzM7ANPNCVQiN/Bsv6C2yDAJnlJf6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVbqtFvEqcEY6PTmCOfzPzIYvqXqj8MQaEjPBYbJAVg=; b=A/FzzmS5Iq81QHsirM7+LyKeg5gLl/4W98KhaM4wYGDg4J5b5ccwz0ALEKGkIqA8Jn UJWW0tbYrQT64mrh65aueIeohcw1ui+3Ju3cMJU0sx6uXgeTy6kJvhKOuQjPzI1aI9sN BbH8tREbBTR5Z3+L7V3N5l2ngafMtShmQuYU1AOAWvDuGcsD0cCQvge+n0DIVYNT/CXZ 8Q5obQI2w59DSZA3uNxIiJVgxjQvCAngiQBaMLeMDD7TLpdkBdRokCJV+qqh6YpR/il+ 078lCeFV4Rv70DLmxVU/ANqIOzskdth8m7mmKO2DMKZrsQ3yEPkHU93IXHKFzLOuwIbN 6uCQ== X-Gm-Message-State: AFqh2kpwy4GEvWUa0w5yxQ2GOfZe1rKBX6JANwG3T7FR6yyTYLxqVD4c DH9vY8RFnAaa68A3V/MsWh7rYw== X-Received: by 2002:a05:622a:1750:b0:3ad:d7a6:76d8 with SMTP id l16-20020a05622a175000b003add7a676d8mr30209523qtk.38.1673585355266; Thu, 12 Jan 2023 20:49:15 -0800 (PST) Received: from [192.168.1.3] ([2600:4040:29fb:d300:887b:7eff:fe74:68b2]) by smtp.gmail.com with ESMTPSA id s11-20020a05620a0bcb00b00704a9942708sm12099472qki.73.2023.01.12.20.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 20:49:14 -0800 (PST) From: Peter Foley Date: Thu, 12 Jan 2023 23:49:07 -0500 Subject: [PATCH 1/4] um: Make the definition of cpu_data more compatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: <20230112-um-v1-1-6bec9e97ad13@pefoley.com> References: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> In-Reply-To: <20230112-um-v1-0-6bec9e97ad13@pefoley.com> To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Peter Foley X-Mailer: b4 0.11.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673585354; l=1683; i=pefoley2@pefoley.com; s=20230111; h=from:subject:message-id; bh=aGrL0ysPMYznOqdL0cA76sdMuDBI2JGj/mTkJStMEDk=; b=N2azVPGy0zYLU0iU3/UHyqtpzJsGGCVO2bIRlbOLxNGtGUyvZZ/Jdj31qhwLcIqfA33a965MpYY5 tv/1TV+mARDuKlsafc554to1VTS6vsw1ltMTV8PZOe4nzSx4GHum X-Developer-Key: i=pefoley2@pefoley.com; a=ed25519; pk=DCQqIdN6rHnvfQH58WQiQzJFfGUo1HyWSvdYG8vnO5o= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Match the x86 implementation to improve build errors. Noticed when building allyesconfig. e.g. ../arch/um/include/asm/processor-generic.h:94:19: error: called object is not a function or function pointer 94 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:16: note: in expansion of macro ‘cpu_data’ 2157 | return cpu_data(first_cpu_of_numa_node).apicid; Signed-off-by: Peter Foley --- arch/um/include/asm/processor-generic.h | 2 +- arch/um/kernel/um_arch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index bb5f06480da9..7414154b8e9a 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h @@ -91,7 +91,7 @@ struct cpuinfo_um { extern struct cpuinfo_um boot_cpu_data; -#define cpu_data (&boot_cpu_data) +#define cpu_data(cpu) boot_cpu_data #define current_cpu_data boot_cpu_data #define cache_line_size() (boot_cpu_data.cache_alignment) diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 786b44dc20c9..8dcda617b8bf 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -96,7 +96,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) static void *c_start(struct seq_file *m, loff_t *pos) { - return *pos < nr_cpu_ids ? cpu_data + *pos : NULL; + return *pos < nr_cpu_ids ? &boot_cpu_data + *pos : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) -- 2.39.0