Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2870893lqt; Tue, 23 Apr 2024 04:25:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2ctYQkoAJojEYaGd/qIOKjKvtgjR6tCTZdcqA2PqMq63Z/dIUTD+5j9L4/zJjOka61+xxo3gGP1bXIw73YljMZX3u4PKoUzVCqxCjkw== X-Google-Smtp-Source: AGHT+IEq49xH/gMgmfZyAvRqTBdP9y3mF8yrMkr4tNsc1NZxzuTCNUv22/80NGilLalqNouJ35zM X-Received: by 2002:a0c:c30f:0:b0:6a0:7d91:1adf with SMTP id f15-20020a0cc30f000000b006a07d911adfmr6462161qvi.35.1713871537239; Tue, 23 Apr 2024 04:25:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713871537; cv=pass; d=google.com; s=arc-20160816; b=LP3xu0ii1/2Dnt8ZKNbc20VlRwuw5syMTruu6DNveRaALwePTnSqSO6INhHeyhS/hz LzPs2lNL2lmsY+hyiWEq3qm0bp/i4pZDqY7lGgV6bIyJ7OhwTCNgMpg0EzI6r+GkQ06D aysJvDUMoAw6jae84ApjeZhoqr4BMj+S4MVU6ErOdlrWnEOvdEqxx+LYSpfs3lo6UQKC tWxAZqqD8ndYOiyayf3jiH67EyR1dN0UoeLW9zr9N1YloFJUmDhkXMZMUsKgPzz8p20K JO55P4JsbBOEJQfvdClNVBx3Z7cVoXgVnCaWn/2FNLePQ1GfrJ4uKWEK0OzfgQq6aMnL YQuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CiQKB25MktD/QLDdLcPUH0+dexeuRZvHnI8X4wiFwkI=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=k13r5TjE+Ac3HVIPi2GH8SWKhEHat4oc1iwf2hwTuiHy22IWP5dWEdTa05SXr0IVfB kcDKFUqQHp/VfOdqgJJifNImO8MpmPZWsYMW81Rl+x3oz9hucNp/C0dTlZrPwO1l8Ks3 e4MFWrlIqD6OLpGZyOkKiGLI1Wgxf591dWgT5TyOTaIgy09s3Q40Lgau7JxJoGuHNk5o Ja24khQSj+v0ZCBspQJxrApYr1LKIhHUJdLHOCQcvA+/X7iskTsRZUZYErLUfTXDq013 dI3DdsY9c8XF3EDl+nqpfQB94pISbXN0X7mZKTJAjVqZu/Si9tV3HsnpAeHb9KxK7gjG Fqzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=KbzSdeRd; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-154974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pn10-20020a056214130a00b0069b4c2b064esi12872915qvb.494.2024.04.23.04.25.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 04:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=KbzSdeRd; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-154974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 49CB01C227EC for ; Tue, 23 Apr 2024 11:25:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DB75823CB; Tue, 23 Apr 2024 11:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="KbzSdeRd" Received: from out0-200.mail.aliyun.com (out0-200.mail.aliyun.com [140.205.0.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F37777E10B for ; Tue, 23 Apr 2024 11:25:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871523; cv=none; b=r/+JzP79OXEcTZuc+1IMO3X+uOFPq/cZi292KoulEPBqriZJZHS6E0Yy4WQQRRUfs8Adjrkw0L8FPrLZsPLYmlPlw0apZ6E9hWMkSIVki6uplV9ZRDyJzztRfjTi9ErSB7Zu8qilhKWFmXbf6RbdbzSjIppSGitW7vRmBw4faKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871523; c=relaxed/simple; bh=vG4w4lm74pJtjt2dxWDDT7funVus0pgdkP3n6FI0+/8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MVXCgqRLY24slHbcJJkkbEe0RcE5WP5Be0bKNy/tq+al3uIGAIWLCEo0WBY5Emk+ppAJ+HLUC/PGp1zAZSpOa94Bv1nyMUUJ9N6JFoyg6gDNKUabLHafdfuh9WwVs1uWTwRBe6YwxWi3NLDyQzx1OfCtelgZUzDuIys74b0rxJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=KbzSdeRd; arc=none smtp.client-ip=140.205.0.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713871513; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=CiQKB25MktD/QLDdLcPUH0+dexeuRZvHnI8X4wiFwkI=; b=KbzSdeRdhEqfTocRcD3qjnwWJWV0DEuvXT/AkDlAGaISR79UMbLn8BNrY9YTq1IeQsOsagA+pnqtq/lzvup3Dx0RaqVe/w64xFwBOpxhVt3UP+blgL+cd6NbzRxUE/4r3VEl1lsCG3Pj4d7dihytjL9R8NMXCrsHW5uPGNUvi7g= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047209;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJTUYhm_1713871512; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJTUYhm_1713871512) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 19:25:12 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 2/7] um: Fix the -Wmissing-prototypes warning for __switch_mm Date: Tue, 23 Apr 2024 19:24:52 +0800 Message-Id: <20240423112457.2409319-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423112457.2409319-1-tiwei.btw@antgroup.com> References: <20240423112457.2409319-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The __switch_mm function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bit") Signed-off-by: Tiwei Bie --- arch/um/include/asm/mmu.h | 2 -- arch/um/include/shared/skas/mm_id.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h index a7555e43ed14..f2923c767bb9 100644 --- a/arch/um/include/asm/mmu.h +++ b/arch/um/include/asm/mmu.h @@ -14,8 +14,6 @@ typedef struct mm_context { struct uml_arch_mm_context arch; } mm_context_t; -extern void __switch_mm(struct mm_id * mm_idp); - /* Avoid tangled inclusion with asm/ldt.h */ extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm); extern void free_ldt(struct mm_context *mm); diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/skas/mm_id.h index e82e203f5f41..bdfab67174ff 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -15,4 +15,6 @@ struct mm_id { int kill; }; +extern void __switch_mm(struct mm_id *mm_idp); + #endif -- 2.34.1