Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3556707pxb; Mon, 24 Jan 2022 12:08:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCy72ELWk6ln8iY1zyZp3EqH9snEWFF5pncHqakS8hJLf+gKbfO0dd+1zBAAdt9oKfed/L X-Received: by 2002:a17:90a:194e:: with SMTP id 14mr9192pjh.106.1643054939335; Mon, 24 Jan 2022 12:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054939; cv=none; d=google.com; s=arc-20160816; b=CgZTt6TXbLqebXMURcf+08QVeyDmaADYUu/3DSFKlLHnrfn55HBhFlxWcQkfRn3GuZ mQmfyG7scn/ulr81Eox7IVimmC1omduIBou0areLw6gq+YEAyFDTyp4i3vVBMuk3uTNC 8gRFHSrVzisZJhNIMyHSDf9fmapEC1A1FCEZvFw7LKMmW32Nsm8xYdoqKK+EK5xttPKx 2qjRgWE2XE2ET2ivPMMc2S/sUxHENqxf/XkvdxSnvbpkfWHch1T3/W/HD2fcBhLo+dDr 1iSfYbRb2OT3mOxLcpZe2ntpynJxnjD4QymqU+sCrUvMF1TQVICOqgm2xDSjfc3ZVhuL Ltjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qXZnrAdDt8iU5gafO2HednQYkt4ldMYHNI8LWUfwPP0=; b=EkNM5bjQYH1CKUmI76WlBPGdRKnZFaahuSVuwTAd+fhQXVgreIdYk0CHehLr90XoKv k07uyfeQR+u2T1x1prG+3IjQ/3JsulX0aHDpz9ugBucUd8G6Ofeyg1k+9luP3Sn3WHib Z6gEAfn5bww0KL7LIunodZUXKybROMY8z4buHdV4wjlE9rZ8Fqu99X/5MjK18U8Dq2ba qdNP3wVRdwH6qZNL7YEW7dvx00NTVSku5RKas4X9+e6sTjhMtvK/In7GxtsgGh3ecEDY BeynLB23z6dSBEbQPDbYSCmK0fhYbcSg5qMvmVqm2k7TuRY6ZOb8EaWccxeYNnXL9zno P5Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qiGRah1i; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si457978plo.171.2022.01.24.12.08.39; Mon, 24 Jan 2022 12:08:59 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=qiGRah1i; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347021AbiAXTJ1 (ORCPT + 99 others); Mon, 24 Jan 2022 14:09:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344320AbiAXTDG (ORCPT ); Mon, 24 Jan 2022 14:03:06 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADEAAC0617AD; Mon, 24 Jan 2022 10:58:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 74B57B8122C; Mon, 24 Jan 2022 18:58:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A219EC340E5; Mon, 24 Jan 2022 18:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050724; bh=M6edZIbd7JkwHb10SCA5x8BMURt0Yhbc6PoZH1PX6tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qiGRah1iU3b3SSpt4/OqYhy1oTmYPJG3muZ0etPayryaEx9TvMfZLqVpjcg3/gGab gs0y0J3Ip3a2oEWZblj4BoGvmo8/usYTMETv+wU40aZF4rN4gnIsXg6qKwVcjFiH+8 Zw2pHVoBhkL6DgkB4rnxw6FRTO/ZqjXbVMwrauu8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Sasha Levin Subject: [PATCH 4.9 093/157] um: registers: Rename function names to avoid conflicts and build problems Date: Mon, 24 Jan 2022 19:43:03 +0100 Message-Id: <20220124183935.730425818@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit 077b7320942b64b0da182aefd83c374462a65535 ] The function names init_registers() and restore_registers() are used in several net/ethernet/ and gpu/drm/ drivers for other purposes (not calls to UML functions), so rename them. This fixes multiple build errors. Signed-off-by: Randy Dunlap Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/include/shared/registers.h | 4 ++-- arch/um/os-Linux/registers.c | 4 ++-- arch/um/os-Linux/start_up.c | 2 +- arch/x86/um/syscalls_64.c | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/um/include/shared/registers.h b/arch/um/include/shared/registers.h index a74449b5b0e31..12ad7c435e97f 100644 --- a/arch/um/include/shared/registers.h +++ b/arch/um/include/shared/registers.h @@ -16,8 +16,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs); extern int save_fpx_registers(int pid, unsigned long *fp_regs); extern int restore_fpx_registers(int pid, unsigned long *fp_regs); extern int save_registers(int pid, struct uml_pt_regs *regs); -extern int restore_registers(int pid, struct uml_pt_regs *regs); -extern int init_registers(int pid); +extern int restore_pid_registers(int pid, struct uml_pt_regs *regs); +extern int init_pid_registers(int pid); extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs); extern unsigned long get_thread_reg(int reg, jmp_buf *buf); extern int get_fp_registers(int pid, unsigned long *regs); diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c index 2ff8d4fe83c4f..34a5963bd7efd 100644 --- a/arch/um/os-Linux/registers.c +++ b/arch/um/os-Linux/registers.c @@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs) return 0; } -int restore_registers(int pid, struct uml_pt_regs *regs) +int restore_pid_registers(int pid, struct uml_pt_regs *regs) { int err; @@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs) static unsigned long exec_regs[MAX_REG_NR]; static unsigned long exec_fp_regs[FP_SIZE]; -int init_registers(int pid) +int init_pid_registers(int pid) { int err; diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 22a358ef1b0cd..dc06933ba63d9 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -334,7 +334,7 @@ void __init os_early_checks(void) check_tmpexec(); pid = start_ptraced_child(); - if (init_registers(pid)) + if (init_pid_registers(pid)) fatal("Failed to initialize default registers"); stop_ptraced_child(pid, 1, 1); } diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index e6552275320bc..40ecacb2c54b3 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -9,6 +9,7 @@ #include #include /* XXX This should get the constants from libc */ #include +#include long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) { @@ -32,7 +33,7 @@ long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) switch (code) { case ARCH_SET_FS: case ARCH_SET_GS: - ret = restore_registers(pid, ¤t->thread.regs.regs); + ret = restore_pid_registers(pid, ¤t->thread.regs.regs); if (ret) return ret; break; -- 2.34.1