From patchwork Sun Jul 4 18:37:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OSReax8J; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyJN5v6gz9sX1 for ; Mon, 5 Jul 2021 04:38:44 +1000 (AEST) Received: from localhost ([::1]:54838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m070s-0001l1-I0 for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:38:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070H-0001jH-8O for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:05 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:46755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070F-0006MG-UD for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:05 -0400 Received: by mail-wm1-x32a.google.com with SMTP id k16-20020a05600c1c90b02901f4ed0fcfe7so8683713wms.5 for ; Sun, 04 Jul 2021 11:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SCTnh6ViTUcE9tM6sSFAubvn8jw+9dyc2QNPJEEjeRg=; b=OSReax8J1dFzoof68kbrQMcb4QTVQnR7wuLiOgObPKJ+41eVBvHPZkrHS3rebwY8v+ 5rGqQ+uz/dqGmfoJLZnldnJ56W6V7DJVmjFb25yqJ1KNp9pt9xoWxhptZa70ig9tewvR B4j9K4xnEVxGnVC3nCm/vN69Vc5uUhAIwuEzqmgCoqeP/uMshlQ9kVDFewJajoC4af05 Is7syzqAoAwMCKuMV04lpit2AiMN1cQWF3/vq7uUXDtTm9FjbYvnQIhPzfiEwYmVALQ9 s3cJg/GNHnmfiyyoGH+9TK1BhnWDk4n4GYn38uH3FqtFOlzae6MqW0TTL5Ls8DfAk8P0 y4aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SCTnh6ViTUcE9tM6sSFAubvn8jw+9dyc2QNPJEEjeRg=; b=kdyvR7vjXkaKUQt3KY2u7//vpzlAUg+VT/ZRHAY1XDsoie5/+JgRc3ThzDo6PX7XSi wSXCyFXYspZEoo3KD+f6pX+KnnpqCqutwSuh5nZVnxzliu5WdC+RCA0Fl1s6YPV2l+OY jQ/+GrGsknhuNwBSXzmy5xM0GWii1/+yBRuJgp/HL/+e5tpcfICdtKatdVpW00bIZGQX vqWYE+U8SPi4a0PvzocWtkUcwm6vTr8zA7biOzlBPss3FTajYMIRwzr0NX6j+gwtoG+X D78wYwDd/4Wt/41MK8XcSNdiEZ22qIa6iJKBd4VcI2IOJvmiPnZl3m4zylnzhpJFumFO kc6A== X-Gm-Message-State: AOAM5316Ngj+Y0w9W0zPhQhRvi8uhV3g2vNDxPcj93+BKomQPkAuOcrr 7PGhEvuPyBKc1sCwydH0QtUerVyWyzg= X-Google-Smtp-Source: ABdhPJwHcNJTJ4ylZIvwUDF3N/se5egewBbZMoxK5Vq446wODbiNnnmdGIKkmZlhgQkCOKiqs4DU1A== X-Received: by 2002:a05:600c:2052:: with SMTP id p18mr11104167wmg.168.1625423882326; Sun, 04 Jul 2021 11:38:02 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id b7sm6896299wri.96.2021.07.04.11.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/12] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Date: Sun, 4 Jul 2021 20:37:44 +0200 Message-Id: <20210704183755.655002-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/alpha/target_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index fd389422e31..4e6f9360566 100644 --- a/linux-user/alpha/target_syscall.h +++ b/linux-user/alpha/target_syscall.h @@ -44,6 +44,8 @@ struct target_pt_regs { #define UNAME_MACHINE "alpha" #define UNAME_MINIMUM_RELEASE "2.6.32" +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_EDEADLK #define TARGET_EDEADLK 11 #undef TARGET_EAGAIN From patchwork Sun Jul 4 18:37:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500473 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rqjWe3Cm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyJW0DKZz9sX1 for ; Mon, 5 Jul 2021 04:38:50 +1000 (AEST) Received: from localhost ([::1]:55142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m070y-0001xc-G5 for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:38:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070M-0001vF-0r for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:10 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070K-0006PC-Ke for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:09 -0400 Received: by mail-wr1-x42f.google.com with SMTP id m18so19262908wrv.2 for ; Sun, 04 Jul 2021 11:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U2EMDwBpcsIhGIfw+t8mJgctVziY8HatqnjFSuCOg6o=; b=rqjWe3Cmzb+7R9fK2CvpxsA1bQwRpnvp2FZRAFwOs7IBBHBscAhyDBTHRjyDYJo8nu UBF0Zitw/477v/EC5mLBwvtb5Y6fg4ltt12AfrWAiJSgaVw+f6Wpvx1vW5YEuuUCv67C qxqBFgYDOUj6Kh/IEsLg3SbSTCaUlMYsWUDW1HlWRwiwhQJaHOaBbzYmfm8dNhi5G72K EXgCnyqGghOXYqmY+8C35bgEdsDZ82QoC1kJkP/ajO/AGv7oYfyx7/4tYOmx33eGlwI2 4e+B8XemV3hrddGI4zBwmpDon8JmwqaBPGzcL5WafbakZZdrBrGuzFfzMcsEl45pZk05 88sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U2EMDwBpcsIhGIfw+t8mJgctVziY8HatqnjFSuCOg6o=; b=XBmQIvgjt4YxxqaF911c3Zx9Rlu0DWJ5mzW/eWBa8ttGwUwWGzUxzOL+UOUteF+DoF zPMt7jVnF2VLh+z6JfTze30YO9pdMed3QbVXW3u9iahmtEwSJushnhg3Khm5QF6jJlJl rtRQWl/+kSufQlW3n1loAPM4xnF1bgQLj7QpWwyD7by8ar0kcVBEh5lk6rj1lTQKXG4F 2AyVv5//Ek/TDm60GOFEDVi5U3EUbsf7DCmQf9nzQ1575NZfk+FxQYXp2xQrFVRbCofG L/eUpnVHS0NfQRM3EnF/6jXWVCGZ5c1Uhqivn/dJr02JNOsuaV/IO3F9Wtd5tWJ9FVk0 sdLA== X-Gm-Message-State: AOAM531a98rOE48yvmnq/l722+pDakHeVr0K3EvJ33a0ozaYWfJoJJj8 QadvP7ZWG/fcP4vu1CAH0S6FlBvgolc= X-Google-Smtp-Source: ABdhPJxAMrWikCwqldtX2j3JXFL2nk9Za69JoTKPcfF7cqWWiRZZJZG1OBpSxIOjpwAzhd0sTCe3Dg== X-Received: by 2002:a5d:4b8b:: with SMTP id b11mr888345wrt.113.1625423887190; Sun, 04 Jul 2021 11:38:07 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id z25sm5134426wmi.48.2021.07.04.11.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/12] linux-user/hppa: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Date: Sun, 4 Jul 2021 20:37:45 +0200 Message-Id: <20210704183755.655002-3-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/hppa/target_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h index f34e05edb57..97a095656d8 100644 --- a/linux-user/hppa/target_syscall.h +++ b/linux-user/hppa/target_syscall.h @@ -27,6 +27,8 @@ struct target_pt_regs { #define TARGET_MCL_FUTURE 2 #define TARGET_MCL_ONFAULT 4 +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_ENOMSG #define TARGET_ENOMSG 35 #undef TARGET_EIDRM From patchwork Sun Jul 4 18:37:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sSZC9TLG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyLp1hrRz9sX1 for ; Mon, 5 Jul 2021 04:40:50 +1000 (AEST) Received: from localhost ([::1]:34700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m072t-00078V-Ts for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:40:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070Q-00022o-Ml for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:15 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:42561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070P-0006Rk-AD for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:14 -0400 Received: by mail-wr1-x435.google.com with SMTP id t6so9320692wrm.9 for ; Sun, 04 Jul 2021 11:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u7pq/plXZYF6CkchyohXlECRjOPB05y9Xo+CLcNMUW8=; b=sSZC9TLGxan2y/QPX2bBbBbZSO4oc5xvKtrMEiWZqfwSNP9sKgr+LNZj4L+oyPUYbn BVzO3iq8+tEZTLoKRuNDsziDtZTFc5+XfsyJh1kzvgHsKlhb3ikRG4kYu5ds4sVEhzGB BiFKZK8c4ooo1bNMgcCCqNL6Wi7NfOzsWWQ0euHBpTfLAxSbFkfNNDqdqoSRBsUK1Kna 8qY+BEtieTBaArd6yZAtkSc5x9Wv8mDjMmmmgzF86mWuy15IN+zpzT9HK+ALY/bh8/OP MynxcW0I1p5Ozgl1pXOPSi7AVyMLctRPlWBcIojYcvnVzK4S8fc9xjAkJf+7ZIi/Bqk0 YR+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=u7pq/plXZYF6CkchyohXlECRjOPB05y9Xo+CLcNMUW8=; b=d80ts7GeUzG6vDyqWWvRzsGhVWIzkx0YEVQbw8FflIJgDqgC1dWzbsK2W5WEQzPDbj XHqMYEmMWGFwO3K1dgiy4h3SLP9gXLbMxwDdaU3aBIkheJ/86yPcOSnI4VN9vkM034Ht HrxKPGC6zdnvouFBrhXiyo0A8BxJzchfJ0t8civ1S9j/L9lSOxM26H5KjkHReM7npIYu R8tnI8Uwtasel+y9bgMiWIbqexKDJoZh1tn0NKOHd5UMdcybWP6z4iF0Z6lUPnceW4Bv 3fBUvQA4BE1e3VzpAAgPUun4/6XbZ+tWv0eDG3jBgGCvEev6gB0U/lV/PZMck+L0SQV4 jrxg== X-Gm-Message-State: AOAM5328Ls6iEABormEA3rE+dKUNG/W9rHW7yHjBzWKDxOif0BseO94O 2GspnpNw9IgYIAVRSXELMIYlrYj35Zs= X-Google-Smtp-Source: ABdhPJzOQpL77PHdJ8VxjBmJjmAt5JMaEoMBT+hqlLRCBK+3o53JeakwzeFrMLfi3K6yxcKDrTmYhg== X-Received: by 2002:a5d:52c1:: with SMTP id r1mr11546808wrv.294.1625423891850; Sun, 04 Jul 2021 11:38:11 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id u15sm19186421wmq.48.2021.07.04.11.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/12] linux-user/mips: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Date: Sun, 4 Jul 2021 20:37:46 +0200 Message-Id: <20210704183755.655002-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/mips/target_syscall.h | 2 ++ linux-user/mips64/target_syscall.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h index dd6fd7af8ea..3e558fdb4b4 100644 --- a/linux-user/mips/target_syscall.h +++ b/linux-user/mips/target_syscall.h @@ -21,6 +21,8 @@ struct target_pt_regs { }; /* Target errno definitions taken from asm-mips/errno.h */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_ENOMSG #define TARGET_ENOMSG 35 /* Identifier removed */ #undef TARGET_EIDRM diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h index 8594955eec2..c54374c5a29 100644 --- a/linux-user/mips64/target_syscall.h +++ b/linux-user/mips64/target_syscall.h @@ -18,6 +18,8 @@ struct target_pt_regs { }; /* Target errno definitions taken from asm-mips/errno.h */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_ENOMSG #define TARGET_ENOMSG 35 /* Identifier removed */ #undef TARGET_EIDRM From patchwork Sun Jul 4 18:37:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vR0W9RvA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyJc0vKNz9sX1 for ; Mon, 5 Jul 2021 04:38:56 +1000 (AEST) Received: from localhost ([::1]:55496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0713-0002CT-PN for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:38:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070V-00026i-Hn for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:19 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:39921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070U-0006Tk-10 for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:19 -0400 Received: by mail-wm1-x336.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso12506644wmh.4 for ; Sun, 04 Jul 2021 11:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l83MMXMFR2vl9ctHFO603Ad6lSWk25Ov1gyYgtgA0Ts=; b=vR0W9RvAYBZAV3iEKsgpj1VV66b/JdEJ3mHgR0KjmcKVxAQ1Vsb41cB92g6tdA9mBl IWeJ5Dc73q5EJS+c/GMSIGP0rpmXqbx8FBWp5F8YM9s3/5Y+421TRw/OWH4JTNlM44Ux OYzR1ldjTaWjJ6CTTxM/3hooIYCupiLP7xGiISLc2Zeq11m2IF2l8pzhR2YxYn7B36st O0I4XunF4puSdk5K8BVK4Efx018Q8S5P6L2x5UrP9hD2j/F1YCBHkicA364cTK8UEolD /u6YOg9tu/pF2FgsNz9uxkEKsBW6h+k90oiQH/SZv0X9NJWXjx3y3xw443v8dFWHM9oE LrAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=l83MMXMFR2vl9ctHFO603Ad6lSWk25Ov1gyYgtgA0Ts=; b=czibqQaz7PCSGY0DY7bpcsnjjRV85DEbvgFlwThM13h3AgyMxNJ3BHcP/QjVjQqdMS 90Z19HEwXdfd8Yf876ad4KSWWXPq7E5j/gnjSwABRNU+c50VOl7NKj/+5devW52R0sZL uZR/ukiGmjsR5mJN0q9lzOAwhJnEOTV9dRnlW6YzUCbkI2NM/HM1bE2V29UJgXuqyEXe FZZTd84C1/xCdx2oEs/l7XdWzAWwNuYQySI6WknQ8SB6nY81iV6OTgG/WL/Pd0NmBihl MXPB0dnktdJnSYh6idaYYgGvWEbTc6xj0Yl1oj7Djy+PHF7KfViNTW66W4R0/B9Bvi/v cdzw== X-Gm-Message-State: AOAM5302wqo9GihsVYTg3qXLVKaGOS2o2rYAFw5QAiR0sNg9J330NQKD b7TTK6rciQZg/hen3nsHWPZvr/EKdJU= X-Google-Smtp-Source: ABdhPJwBWFkNpM96bk9uhn/Iwy1T1bs8cC2g0ACiIgts2cKck5sJV3Om4tkZm612DF3YyyC8zGQoLQ== X-Received: by 2002:a05:600c:1c27:: with SMTP id j39mr8698742wms.130.1625423896595; Sun, 04 Jul 2021 11:38:16 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id q19sm19209992wmc.44.2021.07.04.11.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/12] linux-user/sparc: Rename target_errno.h -> target_errno_defs.h Date: Sun, 4 Jul 2021 20:37:47 +0200 Message-Id: <20210704183755.655002-5-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We want to have one generic target_errno.h (API to access target errno), and will add target errno definitions in target_errno_defs.h. The sparc target already have its errnos in an header, simply rename it. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/sparc/{target_errno.h => target_errno_defs.h} | 0 linux-user/sparc/target_syscall.h | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename linux-user/sparc/{target_errno.h => target_errno_defs.h} (100%) diff --git a/linux-user/sparc/target_errno.h b/linux-user/sparc/target_errno_defs.h similarity index 100% rename from linux-user/sparc/target_errno.h rename to linux-user/sparc/target_errno_defs.h diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h index 15d531f3897..dad501d008c 100644 --- a/linux-user/sparc/target_syscall.h +++ b/linux-user/sparc/target_syscall.h @@ -1,7 +1,7 @@ #ifndef SPARC_TARGET_SYSCALL_H #define SPARC_TARGET_SYSCALL_H -#include "target_errno.h" +#include "target_errno_defs.h" #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) struct target_pt_regs { From patchwork Sun Jul 4 18:37:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=r0wP+EPL; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyNs3yGCz9sX1 for ; Mon, 5 Jul 2021 04:42:37 +1000 (AEST) Received: from localhost ([::1]:43224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m074d-0004Og-9f for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:42:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070a-0002Gu-VB for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:25 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:43555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070Y-0006Wo-V9 for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:24 -0400 Received: by mail-wr1-x436.google.com with SMTP id a13so19202993wrf.10 for ; Sun, 04 Jul 2021 11:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+9xLc1Oma4AMzemvVhFf9OqI4oWYgcPTq7GE4ljA9t8=; b=r0wP+EPLw3PtFyq4PUJpuxWfV7HLj6PM8vVqpygx8Wk6WDNKclatAbBiymDGVbTlKJ /lvlKEwlkUBjP/EhYhd3n0IukafDPPgovNmkTv4qU7lbI/U9XVeKayYRMp4FGdou7v3e we3f/ueRy8bIs05+gpx93PUF0sqZzVVl9BwC9gcz2P/vYLkO4iVW7Z2cGUC7ineExlxG cQnijmOg4I+Cwo34h25ZtXphBvflxFid2JX5r3JY+r+YhzRJJykTMoYZXojDcRrt70sg QlH+PM+5cyE66Lu7OxCifijkHcedneykXFbLsLKwsSHTbAIEubzHOx3LpxISuqzYv/Ge bCLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+9xLc1Oma4AMzemvVhFf9OqI4oWYgcPTq7GE4ljA9t8=; b=YSpzf+SwTfinFrPKEJen4zUlu34Vg3jhAxvGcsozD3PdZrqIL8+r8YD2b8egNQ1CWg Z1HIcRnv/oOR2QGKCFHCpkFIspcg44+btI8e/SL7Fa6zBWsVf8EbeSuDoaGPPJdQzv65 FFL4phr5h5b06KFQDC0NQqypsQN+bVkQqhNa8oij8Hwug2Y8lj3xtqwrFdHlhUuy6MWw ptAQHIAc/PTD6ReCTCjb6DR4euGHBfcC0kZXajl3KsWG/VkJu1udDfdYQshheuCMLDHu kjFzymM4hEJxwAY4h6zE8WHT9WXCQrk04FI+o1yMBooOqEzG6COADUe16vOClSK8Ya6F iVzw== X-Gm-Message-State: AOAM5323OpxwKZO+pdJgQy5C6bj6TUNhPt13bfSfiOkTcI16e9DuzUMt zDBPQSC1GzuEGFkZIArtsHyz/RqNfgE= X-Google-Smtp-Source: ABdhPJyIbeuO+i+MHB1lYAl6Wrv8k1caqFFrslMnExa727Ta3MwsBs3g7HXf29cNk2piNqsJypqWCQ== X-Received: by 2002:a5d:4906:: with SMTP id x6mr11587572wrq.387.1625423901378; Sun, 04 Jul 2021 11:38:21 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id y8sm10231126wrr.76.2021.07.04.11.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/12] linux-user: Extract target errno to 'target_errno_defs.h' Date: Sun, 4 Jul 2021 20:37:48 +0200 Message-Id: <20210704183755.655002-6-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We want to access the target errno indepently of the rest of the linux-user code. Extract it to a new target-specific header: 'target_errno_defs.h'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Taylor Simpson --- linux-user/aarch64/target_errno_defs.h | 6 ++++++ linux-user/alpha/target_errno_defs.h | 4 ++++ linux-user/arm/target_errno_defs.h | 6 ++++++ linux-user/cris/target_errno_defs.h | 6 ++++++ linux-user/errno_defs.h | 3 +++ linux-user/hexagon/target_errno_defs.h | 6 ++++++ linux-user/hppa/target_errno_defs.h | 4 ++++ linux-user/i386/target_errno_defs.h | 6 ++++++ linux-user/m68k/target_errno_defs.h | 6 ++++++ linux-user/microblaze/target_errno_defs.h | 6 ++++++ linux-user/mips/target_errno_defs.h | 4 ++++ linux-user/mips64/target_errno_defs.h | 4 ++++ linux-user/nios2/target_errno_defs.h | 6 ++++++ linux-user/openrisc/target_errno_defs.h | 6 ++++++ linux-user/ppc/target_errno_defs.h | 6 ++++++ linux-user/riscv/target_errno_defs.h | 6 ++++++ linux-user/s390x/target_errno_defs.h | 6 ++++++ linux-user/sh4/target_errno_defs.h | 6 ++++++ linux-user/sparc/target_syscall.h | 2 -- linux-user/x86_64/target_errno_defs.h | 6 ++++++ linux-user/xtensa/target_errno_defs.h | 6 ++++++ 21 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 linux-user/aarch64/target_errno_defs.h create mode 100644 linux-user/alpha/target_errno_defs.h create mode 100644 linux-user/arm/target_errno_defs.h create mode 100644 linux-user/cris/target_errno_defs.h create mode 100644 linux-user/hexagon/target_errno_defs.h create mode 100644 linux-user/hppa/target_errno_defs.h create mode 100644 linux-user/i386/target_errno_defs.h create mode 100644 linux-user/m68k/target_errno_defs.h create mode 100644 linux-user/microblaze/target_errno_defs.h create mode 100644 linux-user/mips/target_errno_defs.h create mode 100644 linux-user/mips64/target_errno_defs.h create mode 100644 linux-user/nios2/target_errno_defs.h create mode 100644 linux-user/openrisc/target_errno_defs.h create mode 100644 linux-user/ppc/target_errno_defs.h create mode 100644 linux-user/riscv/target_errno_defs.h create mode 100644 linux-user/s390x/target_errno_defs.h create mode 100644 linux-user/sh4/target_errno_defs.h create mode 100644 linux-user/x86_64/target_errno_defs.h create mode 100644 linux-user/xtensa/target_errno_defs.h diff --git a/linux-user/aarch64/target_errno_defs.h b/linux-user/aarch64/target_errno_defs.h new file mode 100644 index 00000000000..a809381165a --- /dev/null +++ b/linux-user/aarch64/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef AARCH64_TARGET_ERRNO_H +#define AARCH64_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/alpha/target_errno_defs.h b/linux-user/alpha/target_errno_defs.h new file mode 100644 index 00000000000..13770b14b82 --- /dev/null +++ b/linux-user/alpha/target_errno_defs.h @@ -0,0 +1,4 @@ +#ifndef ALPHA_TARGET_ERRNO_H +#define ALPHA_TARGET_ERRNO_H + +#endif diff --git a/linux-user/arm/target_errno_defs.h b/linux-user/arm/target_errno_defs.h new file mode 100644 index 00000000000..3d0dc8a6fb3 --- /dev/null +++ b/linux-user/arm/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef ARM_TARGET_ERRNO_H +#define ARM_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/cris/target_errno_defs.h b/linux-user/cris/target_errno_defs.h new file mode 100644 index 00000000000..c6ea84f2366 --- /dev/null +++ b/linux-user/cris/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef CRIS_TARGET_ERRNO_H +#define CRIS_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index aaf5208d62d..01cfb08b802 100644 --- a/linux-user/errno_defs.h +++ b/linux-user/errno_defs.h @@ -164,4 +164,7 @@ */ #define TARGET_QEMU_ESIGRETURN 513 /* Return from signal */ +/* Override with target specific definitions of errnos (keep last). */ +#include "target_errno_defs.h" + #endif diff --git a/linux-user/hexagon/target_errno_defs.h b/linux-user/hexagon/target_errno_defs.h new file mode 100644 index 00000000000..5daac4f5a83 --- /dev/null +++ b/linux-user/hexagon/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef HEXAGON_TARGET_ERRNO_H +#define HEXAGON_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/hppa/target_errno_defs.h b/linux-user/hppa/target_errno_defs.h new file mode 100644 index 00000000000..5ae6b8d0ba2 --- /dev/null +++ b/linux-user/hppa/target_errno_defs.h @@ -0,0 +1,4 @@ +#ifndef HPPA_TARGET_ERRNO_H +#define HPPA_TARGET_ERRNO_H + +#endif diff --git a/linux-user/i386/target_errno_defs.h b/linux-user/i386/target_errno_defs.h new file mode 100644 index 00000000000..14f9fc44bec --- /dev/null +++ b/linux-user/i386/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef I386_TARGET_ERRNO_H +#define I386_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/m68k/target_errno_defs.h b/linux-user/m68k/target_errno_defs.h new file mode 100644 index 00000000000..00b98c619e5 --- /dev/null +++ b/linux-user/m68k/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef M68K_TARGET_ERRNO_H +#define M68K_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/microblaze/target_errno_defs.h b/linux-user/microblaze/target_errno_defs.h new file mode 100644 index 00000000000..014f19ffbc5 --- /dev/null +++ b/linux-user/microblaze/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef MICROBLAZE_TARGET_ERRNO_H +#define MICROBLAZE_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/mips/target_errno_defs.h b/linux-user/mips/target_errno_defs.h new file mode 100644 index 00000000000..05e0bea44bc --- /dev/null +++ b/linux-user/mips/target_errno_defs.h @@ -0,0 +1,4 @@ +#ifndef MIPS_TARGET_ERRNO_H +#define MIPS_TARGET_ERRNO_H + +#endif diff --git a/linux-user/mips64/target_errno_defs.h b/linux-user/mips64/target_errno_defs.h new file mode 100644 index 00000000000..0dd5966d1af --- /dev/null +++ b/linux-user/mips64/target_errno_defs.h @@ -0,0 +1,4 @@ +#ifndef MIPS64_TARGET_ERRNO_H +#define MIPS64_TARGET_ERRNO_H + +#endif diff --git a/linux-user/nios2/target_errno_defs.h b/linux-user/nios2/target_errno_defs.h new file mode 100644 index 00000000000..81f86566f26 --- /dev/null +++ b/linux-user/nios2/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef NIOS2_TARGET_ERRNO_H +#define NIOS2_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/openrisc/target_errno_defs.h b/linux-user/openrisc/target_errno_defs.h new file mode 100644 index 00000000000..4dabdc1a43f --- /dev/null +++ b/linux-user/openrisc/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef OR1K_TARGET_ERRNO_H +#define OR1K_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/ppc/target_errno_defs.h b/linux-user/ppc/target_errno_defs.h new file mode 100644 index 00000000000..743e65cf4ef --- /dev/null +++ b/linux-user/ppc/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef PPC_TARGET_ERRNO_H +#define PPC_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/riscv/target_errno_defs.h b/linux-user/riscv/target_errno_defs.h new file mode 100644 index 00000000000..bf06966dc18 --- /dev/null +++ b/linux-user/riscv/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef RISCV_TARGET_ERRNO_H +#define RISCV_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/s390x/target_errno_defs.h b/linux-user/s390x/target_errno_defs.h new file mode 100644 index 00000000000..1f0003166df --- /dev/null +++ b/linux-user/s390x/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef S390X_TARGET_ERRNO_H +#define S390X_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/sh4/target_errno_defs.h b/linux-user/sh4/target_errno_defs.h new file mode 100644 index 00000000000..ee5eb96af88 --- /dev/null +++ b/linux-user/sh4/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef SH4_TARGET_ERRNO_H +#define SH4_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h index dad501d008c..087b39d39c4 100644 --- a/linux-user/sparc/target_syscall.h +++ b/linux-user/sparc/target_syscall.h @@ -1,8 +1,6 @@ #ifndef SPARC_TARGET_SYSCALL_H #define SPARC_TARGET_SYSCALL_H -#include "target_errno_defs.h" - #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) struct target_pt_regs { abi_ulong u_regs[16]; diff --git a/linux-user/x86_64/target_errno_defs.h b/linux-user/x86_64/target_errno_defs.h new file mode 100644 index 00000000000..69cc6f988ba --- /dev/null +++ b/linux-user/x86_64/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef X86_64_TARGET_ERRNO_H +#define X86_64_TARGET_ERRNO_H + +/* Target uses generic errno */ + +#endif diff --git a/linux-user/xtensa/target_errno_defs.h b/linux-user/xtensa/target_errno_defs.h new file mode 100644 index 00000000000..4a5d19319d0 --- /dev/null +++ b/linux-user/xtensa/target_errno_defs.h @@ -0,0 +1,6 @@ +#ifndef XTENSA_TARGET_ERRNO_H +#define XTENSA_TARGET_ERRNO_H + +/* FIXME */ + +#endif From patchwork Sun Jul 4 18:37:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=msydWrXE; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyQy2D1Dz9sX1 for ; Mon, 5 Jul 2021 04:44:25 +1000 (AEST) Received: from localhost ([::1]:47300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m076M-00075o-It for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:44:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070g-0002Qc-8W for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:30 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:38594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070e-0006aD-CG for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:29 -0400 Received: by mail-wm1-x32e.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so5948591wmb.3 for ; Sun, 04 Jul 2021 11:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CJuIK368crXe4pOjtmWBTUggvUT1LK0ej7CmcSbklm8=; b=msydWrXEBpJq6z/M6aG0q+c7Qjtv+m38qU4fn2hPwQ1MxZzVxvfPNjBFZjebsJk2ey fTXmN0I9DYyEN4wAiGMJSb7RydGsQN3z/4ca3cNJQvTNhNT1LYwOFn65GjLZ6ZFDhTPU tEYTv8T5Kdma2OTuFOdU/Q7Z2ZITQj4qt6IsPcLymKq08Romoud3AwaPBxd1ksNeFpNt 8YfcAlaRCNTmZ+ujsopnG9BQCcvSwJh3WwHIs/cB5Koi1nLBmuM0X5Vr38GGEsDVrUdp mDBNaEd67nsCb9pivAdSKy+IOzA92ZOWDUXs3w9VWTlfWZEF6jVItyAy2eCgX3Ly+jZu n0cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CJuIK368crXe4pOjtmWBTUggvUT1LK0ej7CmcSbklm8=; b=KU/CC4X8QbYoUh8EoeAI3nznfbnLabqzCGtmeJ00/R/Mhm3ikUA6wRGX1uNPiNrF/M gM/mhF9Xd45QifToFi+tKZYOENm5+3ijSFSriAZjombAmY0Gx86nYW+ZqatHXYCtNQFz L8yxu++VaD2r5oLqKkyzgw5Lal0TW1SDTlS/tmUP9Cb0N/UyHt6FqDSLKCRPIXGWBc53 c5NsPIZUGxpjccBxt10Ep7bmQdLB6WblqsWxO8ROBdgvw5K+ZSMiObVmASsCNfkhR7rv IdHSeuM8fCJbjjx7bSoUzmsxSiWiSqB/KADzUJ/KxqavlrOi3QlwABDmM7UDKYj9+j0z m6+Q== X-Gm-Message-State: AOAM533LBwdOMXrieDdbU3gUGSh+OtBuffBCy+tjLr343BuRokF8gz6b QAEN320SlQJxh+IsgZUAlkkIg3L9TJw= X-Google-Smtp-Source: ABdhPJx7rcjIHpLxd0DRmDMdNBaWs3XeeRXEC3IVwiLUhIrXW5/l9qZ08jZD0T4H2uTz0RQqGJtphQ== X-Received: by 2002:a1c:9a8a:: with SMTP id c132mr10700025wme.52.1625423906368; Sun, 04 Jul 2021 11:38:26 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id l17sm2465884wmq.3.2021.07.04.11.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/12] linux-user/alpha: Remove hardcoded tabs (code style) Date: Sun, 4 Jul 2021 20:37:49 +0200 Message-Id: <20210704183755.655002-7-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- Patch trivial to review using 'git-diff --ignore-all-space' --- linux-user/alpha/target_syscall.h | 196 +++++++++++++++--------------- 1 file changed, 97 insertions(+), 99 deletions(-) diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index 4e6f9360566..13a71f35eaf 100644 --- a/linux-user/alpha/target_syscall.h +++ b/linux-user/alpha/target_syscall.h @@ -47,196 +47,194 @@ struct target_pt_regs { #undef TARGET_EWOULDBLOCK #define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ #undef TARGET_EDEADLK -#define TARGET_EDEADLK 11 +#define TARGET_EDEADLK 11 #undef TARGET_EAGAIN -#define TARGET_EAGAIN 35 +#define TARGET_EAGAIN 35 #undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 36 +#define TARGET_EINPROGRESS 36 #undef TARGET_EALREADY -#define TARGET_EALREADY 37 +#define TARGET_EALREADY 37 #undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 38 +#define TARGET_ENOTSOCK 38 #undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 39 +#define TARGET_EDESTADDRREQ 39 #undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 40 +#define TARGET_EMSGSIZE 40 #undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 41 +#define TARGET_EPROTOTYPE 41 #undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 42 +#define TARGET_ENOPROTOOPT 42 #undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 43 +#define TARGET_EPROTONOSUPPORT 43 #undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 44 +#define TARGET_ESOCKTNOSUPPORT 44 #undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 45 +#define TARGET_EOPNOTSUPP 45 #undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 46 +#define TARGET_EPFNOSUPPORT 46 #undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 47 +#define TARGET_EAFNOSUPPORT 47 #undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 48 +#define TARGET_EADDRINUSE 48 #undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 49 +#define TARGET_EADDRNOTAVAIL 49 #undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 50 +#define TARGET_ENETDOWN 50 #undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 51 +#define TARGET_ENETUNREACH 51 #undef TARGET_ENETRESET -#define TARGET_ENETRESET 52 +#define TARGET_ENETRESET 52 #undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 53 +#define TARGET_ECONNABORTED 53 #undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 54 +#define TARGET_ECONNRESET 54 #undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 55 +#define TARGET_ENOBUFS 55 #undef TARGET_EISCONN -#define TARGET_EISCONN 56 +#define TARGET_EISCONN 56 #undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 57 +#define TARGET_ENOTCONN 57 #undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 58 +#define TARGET_ESHUTDOWN 58 #undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 59 +#define TARGET_ETOOMANYREFS 59 #undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 60 +#define TARGET_ETIMEDOUT 60 #undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 61 +#define TARGET_ECONNREFUSED 61 #undef TARGET_ELOOP -#define TARGET_ELOOP 62 +#define TARGET_ELOOP 62 #undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 63 +#define TARGET_ENAMETOOLONG 63 #undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 64 +#define TARGET_EHOSTDOWN 64 #undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 65 +#define TARGET_EHOSTUNREACH 65 #undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 66 -// Unused 67 +#define TARGET_ENOTEMPTY 66 +/* Unused 67 */ #undef TARGET_EUSERS -#define TARGET_EUSERS 68 +#define TARGET_EUSERS 68 #undef TARGET_EDQUOT -#define TARGET_EDQUOT 69 +#define TARGET_EDQUOT 69 #undef TARGET_ESTALE -#define TARGET_ESTALE 70 +#define TARGET_ESTALE 70 #undef TARGET_EREMOTE -#define TARGET_EREMOTE 71 -// Unused 72-76 +#define TARGET_EREMOTE 71 +/* Unused 72-76 */ #undef TARGET_ENOLCK -#define TARGET_ENOLCK 77 +#define TARGET_ENOLCK 77 #undef TARGET_ENOSYS -#define TARGET_ENOSYS 78 -// Unused 79 +#define TARGET_ENOSYS 78 +/* Unused 79 */ #undef TARGET_ENOMSG -#define TARGET_ENOMSG 80 +#define TARGET_ENOMSG 80 #undef TARGET_EIDRM -#define TARGET_EIDRM 81 +#define TARGET_EIDRM 81 #undef TARGET_ENOSR -#define TARGET_ENOSR 82 +#define TARGET_ENOSR 82 #undef TARGET_ETIME -#define TARGET_ETIME 83 +#define TARGET_ETIME 83 #undef TARGET_EBADMSG -#define TARGET_EBADMSG 84 +#define TARGET_EBADMSG 84 #undef TARGET_EPROTO -#define TARGET_EPROTO 85 +#define TARGET_EPROTO 85 #undef TARGET_ENODATA -#define TARGET_ENODATA 86 +#define TARGET_ENODATA 86 #undef TARGET_ENOSTR -#define TARGET_ENOSTR 87 +#define TARGET_ENOSTR 87 #undef TARGET_ECHRNG -#define TARGET_ECHRNG 88 +#define TARGET_ECHRNG 88 #undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 89 +#define TARGET_EL2NSYNC 89 #undef TARGET_EL3HLT -#define TARGET_EL3HLT 90 +#define TARGET_EL3HLT 90 #undef TARGET_EL3RST -#define TARGET_EL3RST 91 +#define TARGET_EL3RST 91 #undef TARGET_ENOPKG -#define TARGET_ENOPKG 92 +#define TARGET_ENOPKG 92 #undef TARGET_ELNRNG -#define TARGET_ELNRNG 93 +#define TARGET_ELNRNG 93 #undef TARGET_EUNATCH -#define TARGET_EUNATCH 94 +#define TARGET_EUNATCH 94 #undef TARGET_ENOCSI -#define TARGET_ENOCSI 95 +#define TARGET_ENOCSI 95 #undef TARGET_EL2HLT -#define TARGET_EL2HLT 96 +#define TARGET_EL2HLT 96 #undef TARGET_EBADE -#define TARGET_EBADE 97 +#define TARGET_EBADE 97 #undef TARGET_EBADR -#define TARGET_EBADR 98 +#define TARGET_EBADR 98 #undef TARGET_EXFULL -#define TARGET_EXFULL 99 +#define TARGET_EXFULL 99 #undef TARGET_ENOANO -#define TARGET_ENOANO 100 +#define TARGET_ENOANO 100 #undef TARGET_EBADRQC -#define TARGET_EBADRQC 101 +#define TARGET_EBADRQC 101 #undef TARGET_EBADSLT -#define TARGET_EBADSLT 102 -// Unused 103 +#define TARGET_EBADSLT 102 +/* Unused 103 */ #undef TARGET_EBFONT -#define TARGET_EBFONT 104 +#define TARGET_EBFONT 104 #undef TARGET_ENONET -#define TARGET_ENONET 105 +#define TARGET_ENONET 105 #undef TARGET_ENOLINK -#define TARGET_ENOLINK 106 +#define TARGET_ENOLINK 106 #undef TARGET_EADV -#define TARGET_EADV 107 +#define TARGET_EADV 107 #undef TARGET_ESRMNT -#define TARGET_ESRMNT 108 +#define TARGET_ESRMNT 108 #undef TARGET_ECOMM -#define TARGET_ECOMM 109 +#define TARGET_ECOMM 109 #undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 110 +#define TARGET_EMULTIHOP 110 #undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 111 +#define TARGET_EDOTDOT 111 #undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 112 +#define TARGET_EOVERFLOW 112 #undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 113 +#define TARGET_ENOTUNIQ 113 #undef TARGET_EBADFD -#define TARGET_EBADFD 114 +#define TARGET_EBADFD 114 #undef TARGET_EREMCHG -#define TARGET_EREMCHG 115 +#define TARGET_EREMCHG 115 #undef TARGET_EILSEQ -#define TARGET_EILSEQ 116 - -// Same as default 117-121 - +#define TARGET_EILSEQ 116 +/* Same as default 117-121 */ #undef TARGET_ELIBACC -#define TARGET_ELIBACC 122 +#define TARGET_ELIBACC 122 #undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 123 +#define TARGET_ELIBBAD 123 #undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 124 +#define TARGET_ELIBSCN 124 #undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 125 +#define TARGET_ELIBMAX 125 #undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 126 +#define TARGET_ELIBEXEC 126 #undef TARGET_ERESTART -#define TARGET_ERESTART 127 +#define TARGET_ERESTART 127 #undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 128 +#define TARGET_ESTRPIPE 128 #undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 129 +#define TARGET_ENOMEDIUM 129 #undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 130 +#define TARGET_EMEDIUMTYPE 130 #undef TARGET_ECANCELED -#define TARGET_ECANCELED 131 +#define TARGET_ECANCELED 131 #undef TARGET_ENOKEY -#define TARGET_ENOKEY 132 +#define TARGET_ENOKEY 132 #undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 133 +#define TARGET_EKEYEXPIRED 133 #undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 134 +#define TARGET_EKEYREVOKED 134 #undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 135 +#define TARGET_EKEYREJECTED 135 #undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 136 +#define TARGET_EOWNERDEAD 136 #undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 137 +#define TARGET_ENOTRECOVERABLE 137 #undef TARGET_ERFKILL -#define TARGET_ERFKILL 138 +#define TARGET_ERFKILL 138 #undef TARGET_EHWPOISON #define TARGET_EHWPOISON 139 From patchwork Sun Jul 4 18:37:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=a6N5Wp8K; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyTV2bpyz9sX1 for ; Mon, 5 Jul 2021 04:46:38 +1000 (AEST) Received: from localhost ([::1]:50154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m078W-0000fX-2k for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:46:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070l-0002f7-0t for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:35 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:33609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070i-0006ca-Us for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:34 -0400 Received: by mail-wr1-x435.google.com with SMTP id i8so19309404wrc.0 for ; Sun, 04 Jul 2021 11:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WG98X5izSZqZWpgtQzpBw6SrWSZh6q07Xw6YeXrnmvo=; b=a6N5Wp8KyEzkVwA/rJBwPm8+AYOib5QMkmXNq2lJQ5aeQ3cOwDrVvokroghINvwhdb CwSAP/OuGYt9Vxclm0CqhsXeq3Oou9V8rjB4pmdwtuts5kDkiFJvx36wBSYlf64LObbZ mdU2E5GMihy57bwaIAm4k3GKJCHSQkqWXgiVZeE33gDh/MVHXhUTa0a9/HVUoy2/pa+3 VoOhSbZ3MPlbZghxaZtngmxp/MrXLa3Z1E+6b2n2x6ba+uzTlbR/AcpNLHYZzvqAKOYK M7LKtlCSl7P8Q+I/hf38rMSs+Tgfw9zpAbY9unQk+nWf45kLjv+MNhg/Yr3T0X2E/ZAE R6+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=WG98X5izSZqZWpgtQzpBw6SrWSZh6q07Xw6YeXrnmvo=; b=H8AOnlpaDjCQnAtfAhoHKQK+Y7iZSm/cRnGqoJRAmNzW7h+Tq141gAsJAOKbkjblOr tNmV0hb2mb/YDXTWbcMTY1PgM00f+q42Ani9IRN6hFTxMfNwfzEz8ieoJJhNxZljKSeW rn4GMbRKQe4AOdJoDnGZ/HUpw9YYuuONUyY4gLxNlypDXXfEkhJjBX9HhTG553OjFAUQ 8y0j5gIxJsUCln8K1vqS/C1OaFrQvdCEzQF8N59A1w+vJGoREm8YJaUbtY6YV/mh/oMh +iOhSk6Niw4FZbrv9MNFEYRbVmmLpTRjetwbbMSh4/rIQc+gwVopLNhMYXVtyPyZoGjO aEWA== X-Gm-Message-State: AOAM530FU5ZWM2SFvxUK/cD7sdAVg9MU8/cvprrpCV0yzE7oCNqyBm7p OTwxrzYGuDOCTHBinMLGhD0d5VX4lBA= X-Google-Smtp-Source: ABdhPJxtZ+pDCDmV+IidJ2val0CCenXwUc1k/zSevAI8rWkhT1Sf4LNFHFHriS0a+Fdc71Mnjf/qxA== X-Received: by 2002:a5d:4dd0:: with SMTP id f16mr11005118wru.44.1625423911231; Sun, 04 Jul 2021 11:38:31 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id e23sm5635259wme.31.2021.07.04.11.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/12] linux-user/alpha: Move errno definitions to 'target_errno_defs.h' Date: Sun, 4 Jul 2021 20:37:50 +0200 Message-Id: <20210704183755.655002-8-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- linux-user/alpha/target_errno_defs.h | 194 +++++++++++++++++++++++++++ linux-user/alpha/target_syscall.h | 194 --------------------------- 2 files changed, 194 insertions(+), 194 deletions(-) diff --git a/linux-user/alpha/target_errno_defs.h b/linux-user/alpha/target_errno_defs.h index 13770b14b82..fae8a4f43a1 100644 --- a/linux-user/alpha/target_errno_defs.h +++ b/linux-user/alpha/target_errno_defs.h @@ -1,4 +1,198 @@ #ifndef ALPHA_TARGET_ERRNO_H #define ALPHA_TARGET_ERRNO_H +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 11 +#undef TARGET_EAGAIN +#define TARGET_EAGAIN 35 +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 36 +#undef TARGET_EALREADY +#define TARGET_EALREADY 37 +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 38 +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 39 +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 40 +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 41 +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 42 +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 43 +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 44 +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 45 +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 46 +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 47 +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 48 +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 49 +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 50 +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 51 +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 52 +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 53 +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 54 +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 55 +#undef TARGET_EISCONN +#define TARGET_EISCONN 56 +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 57 +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 58 +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 59 +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 60 +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 61 +#undef TARGET_ELOOP +#define TARGET_ELOOP 62 +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 63 +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 64 +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 65 +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 66 +/* Unused 67 */ +#undef TARGET_EUSERS +#define TARGET_EUSERS 68 +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 69 +#undef TARGET_ESTALE +#define TARGET_ESTALE 70 +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 71 +/* Unused 72-76 */ +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 77 +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 78 +/* Unused 79 */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 80 +#undef TARGET_EIDRM +#define TARGET_EIDRM 81 +#undef TARGET_ENOSR +#define TARGET_ENOSR 82 +#undef TARGET_ETIME +#define TARGET_ETIME 83 +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 84 +#undef TARGET_EPROTO +#define TARGET_EPROTO 85 +#undef TARGET_ENODATA +#define TARGET_ENODATA 86 +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 87 +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 88 +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 89 +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 90 +#undef TARGET_EL3RST +#define TARGET_EL3RST 91 +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 92 +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 93 +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 94 +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 95 +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 96 +#undef TARGET_EBADE +#define TARGET_EBADE 97 +#undef TARGET_EBADR +#define TARGET_EBADR 98 +#undef TARGET_EXFULL +#define TARGET_EXFULL 99 +#undef TARGET_ENOANO +#define TARGET_ENOANO 100 +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 101 +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 102 +/* Unused 103 */ +#undef TARGET_EBFONT +#define TARGET_EBFONT 104 +#undef TARGET_ENONET +#define TARGET_ENONET 105 +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 106 +#undef TARGET_EADV +#define TARGET_EADV 107 +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 108 +#undef TARGET_ECOMM +#define TARGET_ECOMM 109 +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 110 +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 111 +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 112 +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 113 +#undef TARGET_EBADFD +#define TARGET_EBADFD 114 +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 115 +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 116 +/* Same as default 117-121 */ +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 122 +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 123 +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 124 +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 125 +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 126 +#undef TARGET_ERESTART +#define TARGET_ERESTART 127 +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 128 +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 129 +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 130 +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 131 +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 132 +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 133 +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 134 +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 135 +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 136 +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 137 +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 138 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 139 + #endif diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index 13a71f35eaf..03091bf0a82 100644 --- a/linux-user/alpha/target_syscall.h +++ b/linux-user/alpha/target_syscall.h @@ -44,200 +44,6 @@ struct target_pt_regs { #define UNAME_MACHINE "alpha" #define UNAME_MINIMUM_RELEASE "2.6.32" -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 11 -#undef TARGET_EAGAIN -#define TARGET_EAGAIN 35 -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 36 -#undef TARGET_EALREADY -#define TARGET_EALREADY 37 -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 38 -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 39 -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 40 -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 41 -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 42 -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 43 -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 44 -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 45 -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 46 -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 47 -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 48 -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 49 -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 50 -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 51 -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 52 -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 53 -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 54 -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 55 -#undef TARGET_EISCONN -#define TARGET_EISCONN 56 -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 57 -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 58 -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 59 -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 60 -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 61 -#undef TARGET_ELOOP -#define TARGET_ELOOP 62 -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 63 -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 64 -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 65 -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 66 -/* Unused 67 */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 68 -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 69 -#undef TARGET_ESTALE -#define TARGET_ESTALE 70 -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 71 -/* Unused 72-76 */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 77 -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 78 -/* Unused 79 */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 80 -#undef TARGET_EIDRM -#define TARGET_EIDRM 81 -#undef TARGET_ENOSR -#define TARGET_ENOSR 82 -#undef TARGET_ETIME -#define TARGET_ETIME 83 -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 84 -#undef TARGET_EPROTO -#define TARGET_EPROTO 85 -#undef TARGET_ENODATA -#define TARGET_ENODATA 86 -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 87 -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 88 -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 89 -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 90 -#undef TARGET_EL3RST -#define TARGET_EL3RST 91 -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 92 -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 93 -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 94 -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 95 -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 96 -#undef TARGET_EBADE -#define TARGET_EBADE 97 -#undef TARGET_EBADR -#define TARGET_EBADR 98 -#undef TARGET_EXFULL -#define TARGET_EXFULL 99 -#undef TARGET_ENOANO -#define TARGET_ENOANO 100 -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 101 -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 102 -/* Unused 103 */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 104 -#undef TARGET_ENONET -#define TARGET_ENONET 105 -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 106 -#undef TARGET_EADV -#define TARGET_EADV 107 -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 108 -#undef TARGET_ECOMM -#define TARGET_ECOMM 109 -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 110 -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 111 -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 112 -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 113 -#undef TARGET_EBADFD -#define TARGET_EBADFD 114 -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 115 -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 116 -/* Same as default 117-121 */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 122 -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 123 -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 124 -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 125 -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 126 -#undef TARGET_ERESTART -#define TARGET_ERESTART 127 -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 128 -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 129 -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 130 -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 131 -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 132 -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 133 -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 134 -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 135 -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 136 -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 137 -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 138 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 139 - // For sys_osf_getsysinfo #define TARGET_GSI_UACPROC 8 #define TARGET_GSI_IEEE_FP_CONTROL 45 From patchwork Sun Jul 4 18:37:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500477 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KT9Fc+G+; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyLg2Zw2z9sX1 for ; Mon, 5 Jul 2021 04:40:43 +1000 (AEST) Received: from localhost ([::1]:34128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m072l-0006lY-Qt for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:40:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070p-0002wR-IP for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:39 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:45994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070n-0006gj-HH for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:39 -0400 Received: by mail-wm1-x32f.google.com with SMTP id u8-20020a7bcb080000b02901e44e9caa2aso9802174wmj.4 for ; Sun, 04 Jul 2021 11:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=THfCpiyWDbdLgy9uQqqYdT0LsGOfjlk6B9VN48cjs9U=; b=KT9Fc+G+nQpGoF1kq6YNPyZJpC4DlgAF4kCmS6MaPGRYVoT+W0JHQ1HVPV96zNd1Pv llUy7v/lkbG1KVvQjcFWxk4fklpUSf8QK3MTx2jLYkW8mhPfgJqM3GwVdD1qrzQRFg+A fCubgxEZnJ/BbyD14Ora6cyZp5BS2ufqcOIWnJfFyUQBJBblO1LIeon3pesD4+B3flt+ uDRqcZ8ioc3irew6Ov6AYoXzOiaaRHIa8IUcr/Itl4jNe1ZpPTnm9LKFmuEVH3WwziYE 28y7jUF56LYE6InHjFVSiRVeojMoLI6hljHP5xcCEd2laCgEIuXu//fkjOth9m5i/ooz HHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=THfCpiyWDbdLgy9uQqqYdT0LsGOfjlk6B9VN48cjs9U=; b=Tp1OCr2ARhYiDCSQeF7CW7B5ZMjKozL4cGcDzWHlJqxTfqmQVfC4IwCFoZ/Fz96Jyf xICTRVwxiBrCNHKme/PkIAvBzbFqkCJjI31dKfi4NoMGAtJY/Lr8qkJJOjm/S+AShhbD KNR/6QZiMWXRcOnp+o7mfiPOiM7x0b7E7+G4I3eMLLOsw/ugAsXfFEEd1q9tJBi8FF36 kvU0//TuZI3H62Zmpimf0rk6t1IJgSiMCMBqYvoHyXhHenVmuSahePXc9TaNQSwBvDMc yDhFxoK19mPRNQY1plemfAKfkvZsKqfQwW9YYybaOa1ptvAlRnHBJcrFbcSKqZAc58qU nEow== X-Gm-Message-State: AOAM5337D42Kq79V1MOXMF485dKhFjdhuaFOCFq6eVIoyDMV3/iWLtdu 5MMrfeE1fwLc5et/xbPw/UGTwrSTLgQ= X-Google-Smtp-Source: ABdhPJyeJU85WzwYx/8xwWUmHiWIg4F3MsLWfhRo7yrbFoFFJIMbb39RDiMhSRFy7r0BZ7bplV+kRw== X-Received: by 2002:a1c:cc17:: with SMTP id h23mr10427762wmb.129.1625423916062; Sun, 04 Jul 2021 11:38:36 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id f13sm10764377wrt.86.2021.07.04.11.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/12] linux-user/hppa: Move errno definitions to 'target_errno_defs.h' Date: Sun, 4 Jul 2021 20:37:51 +0200 Message-Id: <20210704183755.655002-9-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- linux-user/hppa/target_errno_defs.h | 210 ++++++++++++++++++++++++++++ linux-user/hppa/target_syscall.h | 210 ---------------------------- 2 files changed, 210 insertions(+), 210 deletions(-) diff --git a/linux-user/hppa/target_errno_defs.h b/linux-user/hppa/target_errno_defs.h index 5ae6b8d0ba2..411dd591edb 100644 --- a/linux-user/hppa/target_errno_defs.h +++ b/linux-user/hppa/target_errno_defs.h @@ -1,4 +1,214 @@ #ifndef HPPA_TARGET_ERRNO_H #define HPPA_TARGET_ERRNO_H +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 35 +#undef TARGET_EIDRM +#define TARGET_EIDRM 36 +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 37 +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 38 +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 39 +#undef TARGET_EL3RST +#define TARGET_EL3RST 40 +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 41 +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 42 +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 43 +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 44 +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 45 +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 46 +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 47 + +#undef TARGET_ENONET +#define TARGET_ENONET 50 +#undef TARGET_ENODATA +#define TARGET_ENODATA 51 +#undef TARGET_ETIME +#define TARGET_ETIME 52 +#undef TARGET_ENOSR +#define TARGET_ENOSR 53 +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 54 +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 55 + +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 57 +#undef TARGET_EADV +#define TARGET_EADV 58 +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 59 +#undef TARGET_ECOMM +#define TARGET_ECOMM 60 +#undef TARGET_EPROTO +#define TARGET_EPROTO 61 + +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 64 + +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 66 +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 67 +#undef TARGET_EUSERS +#define TARGET_EUSERS 68 +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 69 +#undef TARGET_ESTALE +#define TARGET_ESTALE 70 +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 71 +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 72 + +#undef TARGET_EBADE +#define TARGET_EBADE 160 +#undef TARGET_EBADR +#define TARGET_EBADR 161 +#undef TARGET_EXFULL +#define TARGET_EXFULL 162 +#undef TARGET_ENOANO +#define TARGET_ENOANO 163 +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 164 +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 165 +#undef TARGET_EBFONT +#define TARGET_EBFONT 166 +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 167 +#undef TARGET_EBADFD +#define TARGET_EBADFD 168 +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 169 +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 170 +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 171 +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 172 +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 173 +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 174 +#undef TARGET_ERESTART +#define TARGET_ERESTART 175 +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 176 +#undef TARGET_EUCLEAN +#define TARGET_EUCLEAN 177 +#undef TARGET_ENOTNAM +#define TARGET_ENOTNAM 178 +#undef TARGET_ENAVAIL +#define TARGET_ENAVAIL 179 +#undef TARGET_EISNAM +#define TARGET_EISNAM 180 +#undef TARGET_EREMOTEIO +#define TARGET_EREMOTEIO 181 +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 182 +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 183 +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 184 +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 185 +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 186 +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 187 + +/* Never used in linux. */ +/* #define TARGET_ENOSYM 215 */ +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 216 +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 217 +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 218 +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 219 +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 220 +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 221 +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 222 +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 223 +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 224 +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 225 +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 226 +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 227 +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 228 +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 229 +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 230 +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 231 +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 232 +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 233 +#undef TARGET_EISCONN +#define TARGET_EISCONN 234 +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 235 +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 236 +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 237 +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 238 +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 239 +#define TARGET_EREMOTERELEASE 240 +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 241 +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 242 + +#undef TARGET_EALREADY +#define TARGET_EALREADY 244 +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 245 +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 247 +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 248 +#undef TARGET_ELOOP +#define TARGET_ELOOP 249 +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 251 + +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 253 + +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 254 +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 255 + +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 256 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 257 + #endif diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h index 97a095656d8..0018bcb5c4d 100644 --- a/linux-user/hppa/target_syscall.h +++ b/linux-user/hppa/target_syscall.h @@ -27,214 +27,4 @@ struct target_pt_regs { #define TARGET_MCL_FUTURE 2 #define TARGET_MCL_ONFAULT 4 -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 47 - -#undef TARGET_ENONET -#define TARGET_ENONET 50 -#undef TARGET_ENODATA -#define TARGET_ENODATA 51 -#undef TARGET_ETIME -#define TARGET_ETIME 52 -#undef TARGET_ENOSR -#define TARGET_ENOSR 53 -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 54 -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 55 - -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 57 -#undef TARGET_EADV -#define TARGET_EADV 58 -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 59 -#undef TARGET_ECOMM -#define TARGET_ECOMM 60 -#undef TARGET_EPROTO -#define TARGET_EPROTO 61 - -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 64 - -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 66 -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 67 -#undef TARGET_EUSERS -#define TARGET_EUSERS 68 -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 69 -#undef TARGET_ESTALE -#define TARGET_ESTALE 70 -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 71 -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 72 - -#undef TARGET_EBADE -#define TARGET_EBADE 160 -#undef TARGET_EBADR -#define TARGET_EBADR 161 -#undef TARGET_EXFULL -#define TARGET_EXFULL 162 -#undef TARGET_ENOANO -#define TARGET_ENOANO 163 -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 164 -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 165 -#undef TARGET_EBFONT -#define TARGET_EBFONT 166 -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 167 -#undef TARGET_EBADFD -#define TARGET_EBADFD 168 -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 169 -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 170 -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 171 -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 172 -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 173 -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 174 -#undef TARGET_ERESTART -#define TARGET_ERESTART 175 -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 176 -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 177 -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 178 -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 179 -#undef TARGET_EISNAM -#define TARGET_EISNAM 180 -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 181 -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 182 -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 183 -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 184 -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 185 -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 186 -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 187 - -/* Never used in linux. */ -/* #define TARGET_ENOSYM 215 */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 216 -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 217 -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 218 -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 219 -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 220 -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 221 -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 222 -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 223 -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 224 -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 225 -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 226 -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 227 -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 228 -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 229 -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 230 -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 231 -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 232 -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 233 -#undef TARGET_EISCONN -#define TARGET_EISCONN 234 -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 235 -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 236 -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 237 -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 238 -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 239 -#define TARGET_EREMOTERELEASE 240 -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 241 -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 242 - -#undef TARGET_EALREADY -#define TARGET_EALREADY 244 -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 245 -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 247 -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 248 -#undef TARGET_ELOOP -#define TARGET_ELOOP 249 -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 251 - -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 253 - -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 254 -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 255 - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 256 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 257 - #endif /* HPPA_TARGET_SYSCALL_H */ From patchwork Sun Jul 4 18:37:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500485 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=hw9rU7zt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyW315DRz9sX1 for ; Mon, 5 Jul 2021 04:47:59 +1000 (AEST) Received: from localhost ([::1]:53768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m079o-000352-UP for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:47:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070w-0003Nn-5U for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:46 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070s-0006jp-Hf for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:45 -0400 Received: by mail-wr1-x434.google.com with SMTP id i8so19309773wrc.0 for ; Sun, 04 Jul 2021 11:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OmjMEqwHUOTF8i2cvAjMMRkcnEKOnOxKT6qU06JVKh4=; b=hw9rU7ztq2hcVNMN9KJSHTMXqsGK3OarAi7syKakkWH3JXyyaDBVqFVCL7nNFpRf72 cMliUKlnAXO+YrnNu4/+xvBDUYiVJktORNmhLcrc9rLrW/PziwMwCU+RoEf1eoExCtqU 2tN2SQLAi7hMfsyYVWuICttYROfnitG3LKTdXE/SphsmLAVYeOIspKzp2R7Qjd/kaB+9 ZLb6oCzUfsXLXQkpe+cf75AmGC1zUvrt38FEf1eVRkSaCHnbWx35f3oznyB57RSeOTvv 3ESaN/Bcv3qgXhSQig5lSMaTYyApgpRIPfIgNyr1b+X36x/MMTR6R+dkElMMUB+wwqPy 4h5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OmjMEqwHUOTF8i2cvAjMMRkcnEKOnOxKT6qU06JVKh4=; b=ic4MALdIpVA0FcNhpplMOdOsNV+zkPESvEMG8E9ob9Bo+hG5EvQ+QHjBGTi3Mzc2f+ HVFPbO+4cQpvG7biHlntz+eCIByyc3erw71QsEnfCtTKeZCAky9ZAMx1Uql0yQ+30Qwa mKYo2nAMoaOYe6XCFzLycIfbZIScD8YYLRmcwEvgGInttccWdXb41NqP2xalC58UyiLS sv2pSgkxL/5Yh3t4eMLK8ade8ZWLMZkXLLYLm4a4dkZT+kWhvBl4FThOzoKQetUWFgCF cLVZae/Au356AoTB3A+ikPMYczmTUaHyWCw4vuaim7V4XRHdqoahBy8DnKPPF48lqy6I 6Lfw== X-Gm-Message-State: AOAM532xWQbr8YjICflT4X8xvOqxRENOaxZiZ/X8XN2F7WoWdZepWMo6 VVheb4/noq9Kr4Jpd8+wwVgDygmyqiw= X-Google-Smtp-Source: ABdhPJzMLQlAoH4UKW4NhG2yfrTXZINZHhQXbyTVGx7rbu8dD0jFYXJ4MwmAo8BuDiEPrGSRV8yZ2g== X-Received: by 2002:a5d:684f:: with SMTP id o15mr11156250wrw.134.1625423920973; Sun, 04 Jul 2021 11:38:40 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id c9sm3869765wrx.22.2021.07.04.11.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/12] linux-user/mips: Move errno definitions to 'target_errno_defs.h' Date: Sun, 4 Jul 2021 20:37:52 +0200 Message-Id: <20210704183755.655002-10-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- linux-user/mips/target_errno_defs.h | 211 ++++++++++++++++++++++++++ linux-user/mips/target_syscall.h | 211 -------------------------- linux-user/mips64/target_errno_defs.h | 211 ++++++++++++++++++++++++++ linux-user/mips64/target_syscall.h | 211 -------------------------- 4 files changed, 422 insertions(+), 422 deletions(-) diff --git a/linux-user/mips/target_errno_defs.h b/linux-user/mips/target_errno_defs.h index 05e0bea44bc..ba4d10b1d29 100644 --- a/linux-user/mips/target_errno_defs.h +++ b/linux-user/mips/target_errno_defs.h @@ -1,4 +1,215 @@ #ifndef MIPS_TARGET_ERRNO_H #define MIPS_TARGET_ERRNO_H +/* Target errno definitions taken from asm-mips/errno.h */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 35 /* Identifier removed */ +#undef TARGET_EIDRM +#define TARGET_EIDRM 36 /* Identifier removed */ +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 37 /* Channel number out of range */ +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 39 /* Level 3 halted */ +#undef TARGET_EL3RST +#define TARGET_EL3RST 40 /* Level 3 reset */ +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 41 /* Link number out of range */ +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 42 /* Protocol driver not attached */ +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 43 /* No CSI structure available */ +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 44 /* Level 2 halted */ +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 46 /* No record locks available */ +#undef TARGET_EBADE +#define TARGET_EBADE 50 /* Invalid exchange */ +#undef TARGET_EBADR +#define TARGET_EBADR 51 /* Invalid request descriptor */ +#undef TARGET_EXFULL +#define TARGET_EXFULL 52 /* TARGET_Exchange full */ +#undef TARGET_ENOANO +#define TARGET_ENOANO 53 /* No anode */ +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 54 /* Invalid request code */ +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 55 /* Invalid slot */ +#undef TARGET_EDEADLOCK +#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ +#undef TARGET_EBFONT +#define TARGET_EBFONT 59 /* Bad font file format */ +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 60 /* Device not a stream */ +#undef TARGET_ENODATA +#define TARGET_ENODATA 61 /* No data available */ +#undef TARGET_ETIME +#define TARGET_ETIME 62 /* Timer expired */ +#undef TARGET_ENOSR +#define TARGET_ENOSR 63 /* Out of streams resources */ +#undef TARGET_ENONET +#define TARGET_ENONET 64 /* Machine is not on the network */ +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 65 /* Package not installed */ +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 66 /* Object is remote */ +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 67 /* Link has been severed */ +#undef TARGET_EADV +#define TARGET_EADV 68 /* Advertise error */ +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 69 /* Srmount error */ +#undef TARGET_ECOMM +#define TARGET_ECOMM 70 /* Communication error on send */ +#undef TARGET_EPROTO +#define TARGET_EPROTO 71 /* Protocol error */ +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 73 /* RFS specific error */ +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 74 /* Multihop attempted */ +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 77 /* Not a data message */ +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 78 /* File name too long */ +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ +#undef TARGET_EBADFD +#define TARGET_EBADFD 81 /* File descriptor in bad state */ +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 82 /* Remote address changed */ +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 88 /* Illegal byte sequence */ +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 89 /* Function not implemented */ +#undef TARGET_ELOOP +#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ +#undef TARGET_ERESTART +#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 92 /* Streams pipe error */ +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 93 /* Directory not empty */ +#undef TARGET_EUSERS +#define TARGET_EUSERS 94 /* Too many users */ +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 96 /* Destination address required */ +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 97 /* Message too long */ +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 125 /* Address already in use */ +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 127 /* Network is down */ +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 128 /* Network is unreachable */ +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 131 /* Connection reset by peer */ +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 132 /* No buffer space available */ +#undef TARGET_EISCONN +#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ +#undef TARGET_EUCLEAN +#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ +#undef TARGET_ENOTNAM +#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ +#undef TARGET_ENAVAIL +#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ +#undef TARGET_EISNAM +#define TARGET_EISNAM 139 /* Is a named type file */ +#undef TARGET_EREMOTEIO +#define TARGET_EREMOTEIO 140 /* Remote I/O error */ +#undef TARGET_EINIT +#define TARGET_EINIT 141 /* Reserved */ +#undef TARGET_EREMDEV +#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 145 /* Connection timed out */ +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 146 /* Connection refused */ +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 147 /* Host is down */ +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 148 /* No route to host */ +#undef TARGET_EALREADY +#define TARGET_EALREADY 149 /* Operation already in progress */ +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 150 /* Operation now in progress */ +#undef TARGET_ESTALE +#define TARGET_ESTALE 151 /* Stale NFS file handle */ +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 158 /* AIO operation canceled */ +/* + * These error are Linux extensions. + */ +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 159 /* No medium found */ +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 161 /* Required key not available */ +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 162 /* Key has expired */ +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ + +/* for robust mutexes */ +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 165 /* Owner died */ +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ + +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 167 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 168 + +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 1133 /* Quota exceeded */ + #endif diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h index 3e558fdb4b4..f59057493a3 100644 --- a/linux-user/mips/target_syscall.h +++ b/linux-user/mips/target_syscall.h @@ -20,217 +20,6 @@ struct target_pt_regs { abi_ulong cp0_epc; }; -/* Target errno definitions taken from asm-mips/errno.h */ -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 /* Identifier removed */ -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 /* Identifier removed */ -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 /* Channel number out of range */ -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 /* Level 3 halted */ -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 /* Level 3 reset */ -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 /* Link number out of range */ -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 /* Protocol driver not attached */ -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 /* No CSI structure available */ -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 /* Level 2 halted */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 /* No record locks available */ -#undef TARGET_EBADE -#define TARGET_EBADE 50 /* Invalid exchange */ -#undef TARGET_EBADR -#define TARGET_EBADR 51 /* Invalid request descriptor */ -#undef TARGET_EXFULL -#define TARGET_EXFULL 52 /* TARGET_Exchange full */ -#undef TARGET_ENOANO -#define TARGET_ENOANO 53 /* No anode */ -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 54 /* Invalid request code */ -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 55 /* Invalid slot */ -#undef TARGET_EDEADLOCK -#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 59 /* Bad font file format */ -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 60 /* Device not a stream */ -#undef TARGET_ENODATA -#define TARGET_ENODATA 61 /* No data available */ -#undef TARGET_ETIME -#define TARGET_ETIME 62 /* Timer expired */ -#undef TARGET_ENOSR -#define TARGET_ENOSR 63 /* Out of streams resources */ -#undef TARGET_ENONET -#define TARGET_ENONET 64 /* Machine is not on the network */ -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 65 /* Package not installed */ -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 66 /* Object is remote */ -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 67 /* Link has been severed */ -#undef TARGET_EADV -#define TARGET_EADV 68 /* Advertise error */ -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 69 /* Srmount error */ -#undef TARGET_ECOMM -#define TARGET_ECOMM 70 /* Communication error on send */ -#undef TARGET_EPROTO -#define TARGET_EPROTO 71 /* Protocol error */ -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 73 /* RFS specific error */ -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 74 /* Multihop attempted */ -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 77 /* Not a data message */ -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 78 /* File name too long */ -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ -#undef TARGET_EBADFD -#define TARGET_EBADFD 81 /* File descriptor in bad state */ -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 82 /* Remote address changed */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 88 /* Illegal byte sequence */ -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 89 /* Function not implemented */ -#undef TARGET_ELOOP -#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ -#undef TARGET_ERESTART -#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 92 /* Streams pipe error */ -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 93 /* Directory not empty */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 94 /* Too many users */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 96 /* Destination address required */ -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 97 /* Message too long */ -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 125 /* Address already in use */ -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 127 /* Network is down */ -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 128 /* Network is unreachable */ -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 131 /* Connection reset by peer */ -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 132 /* No buffer space available */ -#undef TARGET_EISCONN -#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ -#undef TARGET_EISNAM -#define TARGET_EISNAM 139 /* Is a named type file */ -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 140 /* Remote I/O error */ -#undef TARGET_EINIT -#define TARGET_EINIT 141 /* Reserved */ -#undef TARGET_EREMDEV -#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 145 /* Connection timed out */ -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 146 /* Connection refused */ -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 147 /* Host is down */ -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 148 /* No route to host */ -#undef TARGET_EALREADY -#define TARGET_EALREADY 149 /* Operation already in progress */ -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 150 /* Operation now in progress */ -#undef TARGET_ESTALE -#define TARGET_ESTALE 151 /* Stale NFS file handle */ -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 158 /* AIO operation canceled */ -/* - * These error are Linux extensions. - */ -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 159 /* No medium found */ -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 161 /* Required key not available */ -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 162 /* Key has expired */ -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ - -/* for robust mutexes */ -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 165 /* Owner died */ -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 167 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 168 - -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 1133 /* Quota exceeded */ - #define UNAME_MACHINE "mips" #define UNAME_MINIMUM_RELEASE "2.6.32" diff --git a/linux-user/mips64/target_errno_defs.h b/linux-user/mips64/target_errno_defs.h index 0dd5966d1af..ba79f3123b8 100644 --- a/linux-user/mips64/target_errno_defs.h +++ b/linux-user/mips64/target_errno_defs.h @@ -1,4 +1,215 @@ #ifndef MIPS64_TARGET_ERRNO_H #define MIPS64_TARGET_ERRNO_H +/* Target errno definitions taken from asm-mips/errno.h */ +#undef TARGET_EWOULDBLOCK +#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ +#undef TARGET_ENOMSG +#define TARGET_ENOMSG 35 /* Identifier removed */ +#undef TARGET_EIDRM +#define TARGET_EIDRM 36 /* Identifier removed */ +#undef TARGET_ECHRNG +#define TARGET_ECHRNG 37 /* Channel number out of range */ +#undef TARGET_EL2NSYNC +#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ +#undef TARGET_EL3HLT +#define TARGET_EL3HLT 39 /* Level 3 halted */ +#undef TARGET_EL3RST +#define TARGET_EL3RST 40 /* Level 3 reset */ +#undef TARGET_ELNRNG +#define TARGET_ELNRNG 41 /* Link number out of range */ +#undef TARGET_EUNATCH +#define TARGET_EUNATCH 42 /* Protocol driver not attached */ +#undef TARGET_ENOCSI +#define TARGET_ENOCSI 43 /* No CSI structure available */ +#undef TARGET_EL2HLT +#define TARGET_EL2HLT 44 /* Level 2 halted */ +#undef TARGET_EDEADLK +#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ +#undef TARGET_ENOLCK +#define TARGET_ENOLCK 46 /* No record locks available */ +#undef TARGET_EBADE +#define TARGET_EBADE 50 /* Invalid exchange */ +#undef TARGET_EBADR +#define TARGET_EBADR 51 /* Invalid request descriptor */ +#undef TARGET_EXFULL +#define TARGET_EXFULL 52 /* TARGET_Exchange full */ +#undef TARGET_ENOANO +#define TARGET_ENOANO 53 /* No anode */ +#undef TARGET_EBADRQC +#define TARGET_EBADRQC 54 /* Invalid request code */ +#undef TARGET_EBADSLT +#define TARGET_EBADSLT 55 /* Invalid slot */ +#undef TARGET_EDEADLOCK +#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ +#undef TARGET_EBFONT +#define TARGET_EBFONT 59 /* Bad font file format */ +#undef TARGET_ENOSTR +#define TARGET_ENOSTR 60 /* Device not a stream */ +#undef TARGET_ENODATA +#define TARGET_ENODATA 61 /* No data available */ +#undef TARGET_ETIME +#define TARGET_ETIME 62 /* Timer expired */ +#undef TARGET_ENOSR +#define TARGET_ENOSR 63 /* Out of streams resources */ +#undef TARGET_ENONET +#define TARGET_ENONET 64 /* Machine is not on the network */ +#undef TARGET_ENOPKG +#define TARGET_ENOPKG 65 /* Package not installed */ +#undef TARGET_EREMOTE +#define TARGET_EREMOTE 66 /* Object is remote */ +#undef TARGET_ENOLINK +#define TARGET_ENOLINK 67 /* Link has been severed */ +#undef TARGET_EADV +#define TARGET_EADV 68 /* Advertise error */ +#undef TARGET_ESRMNT +#define TARGET_ESRMNT 69 /* Srmount error */ +#undef TARGET_ECOMM +#define TARGET_ECOMM 70 /* Communication error on send */ +#undef TARGET_EPROTO +#define TARGET_EPROTO 71 /* Protocol error */ +#undef TARGET_EDOTDOT +#define TARGET_EDOTDOT 73 /* RFS specific error */ +#undef TARGET_EMULTIHOP +#define TARGET_EMULTIHOP 74 /* Multihop attempted */ +#undef TARGET_EBADMSG +#define TARGET_EBADMSG 77 /* Not a data message */ +#undef TARGET_ENAMETOOLONG +#define TARGET_ENAMETOOLONG 78 /* File name too long */ +#undef TARGET_EOVERFLOW +#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ +#undef TARGET_ENOTUNIQ +#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ +#undef TARGET_EBADFD +#define TARGET_EBADFD 81 /* File descriptor in bad state */ +#undef TARGET_EREMCHG +#define TARGET_EREMCHG 82 /* Remote address changed */ +#undef TARGET_ELIBACC +#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ +#undef TARGET_ELIBBAD +#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ +#undef TARGET_ELIBSCN +#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ +#undef TARGET_ELIBMAX +#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ +#undef TARGET_ELIBEXEC +#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ +#undef TARGET_EILSEQ +#define TARGET_EILSEQ 88 /* Illegal byte sequence */ +#undef TARGET_ENOSYS +#define TARGET_ENOSYS 89 /* Function not implemented */ +#undef TARGET_ELOOP +#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ +#undef TARGET_ERESTART +#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ +#undef TARGET_ESTRPIPE +#define TARGET_ESTRPIPE 92 /* Streams pipe error */ +#undef TARGET_ENOTEMPTY +#define TARGET_ENOTEMPTY 93 /* Directory not empty */ +#undef TARGET_EUSERS +#define TARGET_EUSERS 94 /* Too many users */ +#undef TARGET_ENOTSOCK +#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ +#undef TARGET_EDESTADDRREQ +#define TARGET_EDESTADDRREQ 96 /* Destination address required */ +#undef TARGET_EMSGSIZE +#define TARGET_EMSGSIZE 97 /* Message too long */ +#undef TARGET_EPROTOTYPE +#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ +#undef TARGET_ENOPROTOOPT +#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ +#undef TARGET_EPROTONOSUPPORT +#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ +#undef TARGET_ESOCKTNOSUPPORT +#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ +#undef TARGET_EOPNOTSUPP +#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ +#undef TARGET_EPFNOSUPPORT +#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ +#undef TARGET_EAFNOSUPPORT +#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ +#undef TARGET_EADDRINUSE +#define TARGET_EADDRINUSE 125 /* Address already in use */ +#undef TARGET_EADDRNOTAVAIL +#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ +#undef TARGET_ENETDOWN +#define TARGET_ENETDOWN 127 /* Network is down */ +#undef TARGET_ENETUNREACH +#define TARGET_ENETUNREACH 128 /* Network is unreachable */ +#undef TARGET_ENETRESET +#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ +#undef TARGET_ECONNABORTED +#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ +#undef TARGET_ECONNRESET +#define TARGET_ECONNRESET 131 /* Connection reset by peer */ +#undef TARGET_ENOBUFS +#define TARGET_ENOBUFS 132 /* No buffer space available */ +#undef TARGET_EISCONN +#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ +#undef TARGET_ENOTCONN +#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ +#undef TARGET_EUCLEAN +#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ +#undef TARGET_ENOTNAM +#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ +#undef TARGET_ENAVAIL +#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ +#undef TARGET_EISNAM +#define TARGET_EISNAM 139 /* Is a named type file */ +#undef TARGET_EREMOTEIO +#define TARGET_EREMOTEIO 140 /* Remote I/O error */ +#undef TARGET_EINIT +#define TARGET_EINIT 141 /* Reserved */ +#undef TARGET_EREMDEV +#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ +#undef TARGET_ESHUTDOWN +#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ +#undef TARGET_ETOOMANYREFS +#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ +#undef TARGET_ETIMEDOUT +#define TARGET_ETIMEDOUT 145 /* Connection timed out */ +#undef TARGET_ECONNREFUSED +#define TARGET_ECONNREFUSED 146 /* Connection refused */ +#undef TARGET_EHOSTDOWN +#define TARGET_EHOSTDOWN 147 /* Host is down */ +#undef TARGET_EHOSTUNREACH +#define TARGET_EHOSTUNREACH 148 /* No route to host */ +#undef TARGET_EALREADY +#define TARGET_EALREADY 149 /* Operation already in progress */ +#undef TARGET_EINPROGRESS +#define TARGET_EINPROGRESS 150 /* Operation now in progress */ +#undef TARGET_ESTALE +#define TARGET_ESTALE 151 /* Stale NFS file handle */ +#undef TARGET_ECANCELED +#define TARGET_ECANCELED 158 /* AIO operation canceled */ +/* + * These error are Linux extensions. + */ +#undef TARGET_ENOMEDIUM +#define TARGET_ENOMEDIUM 159 /* No medium found */ +#undef TARGET_EMEDIUMTYPE +#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ +#undef TARGET_ENOKEY +#define TARGET_ENOKEY 161 /* Required key not available */ +#undef TARGET_EKEYEXPIRED +#define TARGET_EKEYEXPIRED 162 /* Key has expired */ +#undef TARGET_EKEYREVOKED +#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ +#undef TARGET_EKEYREJECTED +#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ + +/* for robust mutexes */ +#undef TARGET_EOWNERDEAD +#define TARGET_EOWNERDEAD 165 /* Owner died */ +#undef TARGET_ENOTRECOVERABLE +#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ + +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 167 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 168 + +#undef TARGET_EDQUOT +#define TARGET_EDQUOT 1133 /* Quota exceeded */ + #endif diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h index c54374c5a29..cd1e1b49691 100644 --- a/linux-user/mips64/target_syscall.h +++ b/linux-user/mips64/target_syscall.h @@ -17,217 +17,6 @@ struct target_pt_regs { target_ulong cp0_epc; }; -/* Target errno definitions taken from asm-mips/errno.h */ -#undef TARGET_EWOULDBLOCK -#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */ -#undef TARGET_ENOMSG -#define TARGET_ENOMSG 35 /* Identifier removed */ -#undef TARGET_EIDRM -#define TARGET_EIDRM 36 /* Identifier removed */ -#undef TARGET_ECHRNG -#define TARGET_ECHRNG 37 /* Channel number out of range */ -#undef TARGET_EL2NSYNC -#define TARGET_EL2NSYNC 38 /* Level 2 not synchronized */ -#undef TARGET_EL3HLT -#define TARGET_EL3HLT 39 /* Level 3 halted */ -#undef TARGET_EL3RST -#define TARGET_EL3RST 40 /* Level 3 reset */ -#undef TARGET_ELNRNG -#define TARGET_ELNRNG 41 /* Link number out of range */ -#undef TARGET_EUNATCH -#define TARGET_EUNATCH 42 /* Protocol driver not attached */ -#undef TARGET_ENOCSI -#define TARGET_ENOCSI 43 /* No CSI structure available */ -#undef TARGET_EL2HLT -#define TARGET_EL2HLT 44 /* Level 2 halted */ -#undef TARGET_EDEADLK -#define TARGET_EDEADLK 45 /* Resource deadlock would occur */ -#undef TARGET_ENOLCK -#define TARGET_ENOLCK 46 /* No record locks available */ -#undef TARGET_EBADE -#define TARGET_EBADE 50 /* Invalid exchange */ -#undef TARGET_EBADR -#define TARGET_EBADR 51 /* Invalid request descriptor */ -#undef TARGET_EXFULL -#define TARGET_EXFULL 52 /* TARGET_Exchange full */ -#undef TARGET_ENOANO -#define TARGET_ENOANO 53 /* No anode */ -#undef TARGET_EBADRQC -#define TARGET_EBADRQC 54 /* Invalid request code */ -#undef TARGET_EBADSLT -#define TARGET_EBADSLT 55 /* Invalid slot */ -#undef TARGET_EDEADLOCK -#define TARGET_EDEADLOCK 56 /* File locking deadlock error */ -#undef TARGET_EBFONT -#define TARGET_EBFONT 59 /* Bad font file format */ -#undef TARGET_ENOSTR -#define TARGET_ENOSTR 60 /* Device not a stream */ -#undef TARGET_ENODATA -#define TARGET_ENODATA 61 /* No data available */ -#undef TARGET_ETIME -#define TARGET_ETIME 62 /* Timer expired */ -#undef TARGET_ENOSR -#define TARGET_ENOSR 63 /* Out of streams resources */ -#undef TARGET_ENONET -#define TARGET_ENONET 64 /* Machine is not on the network */ -#undef TARGET_ENOPKG -#define TARGET_ENOPKG 65 /* Package not installed */ -#undef TARGET_EREMOTE -#define TARGET_EREMOTE 66 /* Object is remote */ -#undef TARGET_ENOLINK -#define TARGET_ENOLINK 67 /* Link has been severed */ -#undef TARGET_EADV -#define TARGET_EADV 68 /* Advertise error */ -#undef TARGET_ESRMNT -#define TARGET_ESRMNT 69 /* Srmount error */ -#undef TARGET_ECOMM -#define TARGET_ECOMM 70 /* Communication error on send */ -#undef TARGET_EPROTO -#define TARGET_EPROTO 71 /* Protocol error */ -#undef TARGET_EDOTDOT -#define TARGET_EDOTDOT 73 /* RFS specific error */ -#undef TARGET_EMULTIHOP -#define TARGET_EMULTIHOP 74 /* Multihop attempted */ -#undef TARGET_EBADMSG -#define TARGET_EBADMSG 77 /* Not a data message */ -#undef TARGET_ENAMETOOLONG -#define TARGET_ENAMETOOLONG 78 /* File name too long */ -#undef TARGET_EOVERFLOW -#define TARGET_EOVERFLOW 79 /* Value too large for defined data type */ -#undef TARGET_ENOTUNIQ -#define TARGET_ENOTUNIQ 80 /* Name not unique on network */ -#undef TARGET_EBADFD -#define TARGET_EBADFD 81 /* File descriptor in bad state */ -#undef TARGET_EREMCHG -#define TARGET_EREMCHG 82 /* Remote address changed */ -#undef TARGET_ELIBACC -#define TARGET_ELIBACC 83 /* Can not access a needed shared library */ -#undef TARGET_ELIBBAD -#define TARGET_ELIBBAD 84 /* Accessing a corrupted shared library */ -#undef TARGET_ELIBSCN -#define TARGET_ELIBSCN 85 /* .lib section in a.out corrupted */ -#undef TARGET_ELIBMAX -#define TARGET_ELIBMAX 86 /* Attempting to link in too many shared libraries */ -#undef TARGET_ELIBEXEC -#define TARGET_ELIBEXEC 87 /* Cannot exec a shared library directly */ -#undef TARGET_EILSEQ -#define TARGET_EILSEQ 88 /* Illegal byte sequence */ -#undef TARGET_ENOSYS -#define TARGET_ENOSYS 89 /* Function not implemented */ -#undef TARGET_ELOOP -#define TARGET_ELOOP 90 /* Too many symbolic links encountered */ -#undef TARGET_ERESTART -#define TARGET_ERESTART 91 /* Interrupted system call should be restarted */ -#undef TARGET_ESTRPIPE -#define TARGET_ESTRPIPE 92 /* Streams pipe error */ -#undef TARGET_ENOTEMPTY -#define TARGET_ENOTEMPTY 93 /* Directory not empty */ -#undef TARGET_EUSERS -#define TARGET_EUSERS 94 /* Too many users */ -#undef TARGET_ENOTSOCK -#define TARGET_ENOTSOCK 95 /* Socket operation on non-socket */ -#undef TARGET_EDESTADDRREQ -#define TARGET_EDESTADDRREQ 96 /* Destination address required */ -#undef TARGET_EMSGSIZE -#define TARGET_EMSGSIZE 97 /* Message too long */ -#undef TARGET_EPROTOTYPE -#define TARGET_EPROTOTYPE 98 /* Protocol wrong type for socket */ -#undef TARGET_ENOPROTOOPT -#define TARGET_ENOPROTOOPT 99 /* Protocol not available */ -#undef TARGET_EPROTONOSUPPORT -#define TARGET_EPROTONOSUPPORT 120 /* Protocol not supported */ -#undef TARGET_ESOCKTNOSUPPORT -#define TARGET_ESOCKTNOSUPPORT 121 /* Socket type not supported */ -#undef TARGET_EOPNOTSUPP -#define TARGET_EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ -#undef TARGET_EPFNOSUPPORT -#define TARGET_EPFNOSUPPORT 123 /* Protocol family not supported */ -#undef TARGET_EAFNOSUPPORT -#define TARGET_EAFNOSUPPORT 124 /* Address family not supported by protocol */ -#undef TARGET_EADDRINUSE -#define TARGET_EADDRINUSE 125 /* Address already in use */ -#undef TARGET_EADDRNOTAVAIL -#define TARGET_EADDRNOTAVAIL 126 /* Cannot assign requested address */ -#undef TARGET_ENETDOWN -#define TARGET_ENETDOWN 127 /* Network is down */ -#undef TARGET_ENETUNREACH -#define TARGET_ENETUNREACH 128 /* Network is unreachable */ -#undef TARGET_ENETRESET -#define TARGET_ENETRESET 129 /* Network dropped connection because of reset */ -#undef TARGET_ECONNABORTED -#define TARGET_ECONNABORTED 130 /* Software caused connection abort */ -#undef TARGET_ECONNRESET -#define TARGET_ECONNRESET 131 /* Connection reset by peer */ -#undef TARGET_ENOBUFS -#define TARGET_ENOBUFS 132 /* No buffer space available */ -#undef TARGET_EISCONN -#define TARGET_EISCONN 133 /* Transport endpoint is already connected */ -#undef TARGET_ENOTCONN -#define TARGET_ENOTCONN 134 /* Transport endpoint is not connected */ -#undef TARGET_EUCLEAN -#define TARGET_EUCLEAN 135 /* Structure needs cleaning */ -#undef TARGET_ENOTNAM -#define TARGET_ENOTNAM 137 /* Not a XENIX named type file */ -#undef TARGET_ENAVAIL -#define TARGET_ENAVAIL 138 /* No XENIX semaphores available */ -#undef TARGET_EISNAM -#define TARGET_EISNAM 139 /* Is a named type file */ -#undef TARGET_EREMOTEIO -#define TARGET_EREMOTEIO 140 /* Remote I/O error */ -#undef TARGET_EINIT -#define TARGET_EINIT 141 /* Reserved */ -#undef TARGET_EREMDEV -#define TARGET_EREMDEV 142 /* TARGET_Error 142 */ -#undef TARGET_ESHUTDOWN -#define TARGET_ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ -#undef TARGET_ETOOMANYREFS -#define TARGET_ETOOMANYREFS 144 /* Too many references: cannot splice */ -#undef TARGET_ETIMEDOUT -#define TARGET_ETIMEDOUT 145 /* Connection timed out */ -#undef TARGET_ECONNREFUSED -#define TARGET_ECONNREFUSED 146 /* Connection refused */ -#undef TARGET_EHOSTDOWN -#define TARGET_EHOSTDOWN 147 /* Host is down */ -#undef TARGET_EHOSTUNREACH -#define TARGET_EHOSTUNREACH 148 /* No route to host */ -#undef TARGET_EALREADY -#define TARGET_EALREADY 149 /* Operation already in progress */ -#undef TARGET_EINPROGRESS -#define TARGET_EINPROGRESS 150 /* Operation now in progress */ -#undef TARGET_ESTALE -#define TARGET_ESTALE 151 /* Stale NFS file handle */ -#undef TARGET_ECANCELED -#define TARGET_ECANCELED 158 /* AIO operation canceled */ -/* - * These error are Linux extensions. - */ -#undef TARGET_ENOMEDIUM -#define TARGET_ENOMEDIUM 159 /* No medium found */ -#undef TARGET_EMEDIUMTYPE -#define TARGET_EMEDIUMTYPE 160 /* Wrong medium type */ -#undef TARGET_ENOKEY -#define TARGET_ENOKEY 161 /* Required key not available */ -#undef TARGET_EKEYEXPIRED -#define TARGET_EKEYEXPIRED 162 /* Key has expired */ -#undef TARGET_EKEYREVOKED -#define TARGET_EKEYREVOKED 163 /* Key has been revoked */ -#undef TARGET_EKEYREJECTED -#define TARGET_EKEYREJECTED 164 /* Key was rejected by service */ - -/* for robust mutexes */ -#undef TARGET_EOWNERDEAD -#define TARGET_EOWNERDEAD 165 /* Owner died */ -#undef TARGET_ENOTRECOVERABLE -#define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ - -#undef TARGET_ERFKILL -#define TARGET_ERFKILL 167 -#undef TARGET_EHWPOISON -#define TARGET_EHWPOISON 168 - -#undef TARGET_EDQUOT -#define TARGET_EDQUOT 1133 /* Quota exceeded */ - #define UNAME_MACHINE "mips64" #define UNAME_MINIMUM_RELEASE "2.6.32" From patchwork Sun Jul 4 18:37:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=AUZx9zmf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyY15My3z9sXL for ; Mon, 5 Jul 2021 04:49:40 +1000 (AEST) Received: from localhost ([::1]:55964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m07BS-0004ba-2R for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:49:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m070y-0003Y4-PY for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:48 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:42557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m070x-0006mp-6n for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:48 -0400 Received: by mail-wr1-x42d.google.com with SMTP id t6so9321840wrm.9 for ; Sun, 04 Jul 2021 11:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FN6OTXMHEFJFr00ceuHp4/qEHrZ4IjdpMf6H1iqmh0o=; b=AUZx9zmfMvkL0j0BW86VqIcCE15/3UymFw4K+GAIe6xaxSbCR4mjYc5mf88A+fH0hp i0r8XhKx4GCs9vlF36WYsPsISY0H3kyk6LFq/Bi3nbD0zsYt7AQnIcFOt6ac6R/7my8a +QCPOwj7CsGqCGWoVpcIFCVfuhYr5uZyhaSRUFV3I+euSL2Z+8slHYs6g8F2RrNtXrj3 E8joCHH7yTTg2xKHYARtSjXDmxX99rcQOUwdI/one4VHlqDpEWJQogGfnm0nWBEtc8tA C3JH/qkHjdPCCA0yDpt1aAQRSrONSWZaPJv44yorXbR7WOPkB8R4213zo32QdUCUzMOp yO5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FN6OTXMHEFJFr00ceuHp4/qEHrZ4IjdpMf6H1iqmh0o=; b=q/vuIhyxR5FYRRScx1FsIL9ujlqG87lqKFGudg7Yh7MhbHpm7HG1XrdypOPlH8aADs JSBHLjuct558iylZaBjh/PyKOq9+RSn6W7Mos423ZZc9rVvxVe6LyY3fSokmMnKh9gi0 Ue5OJMheIYmN1OZK0J9gsbuVT5BOAu7C5mfwBXQUUpx6/wkzEu9Fg8Qj1tMqkwXE9RuT ++QFuBu+LaXtPDdAkBNabigdkBpxwzQx3L90vAgJ7bZb/r1LLro/gTsrtZpkeqP9Brj1 9k7FJl4gfyalXMhlwUZUUrqyhF9DaOsbfXZiAlX/Wi9S6P5WN8WHiU3X5j79030dblKU ZEwA== X-Gm-Message-State: AOAM531WB+MteALTIOntO4HeUyforxTW7wwlT4MXADEAlPbmbU4B3fx9 FDaPotalwc+1cpUt8olr3VqTnDgxYwI= X-Google-Smtp-Source: ABdhPJygt6f1ixP0zbFPf4sc7bOmerxQSiVEoOXM5JRMY6l39FF2zSvzUx0IpmoU4ISY7XBCAfXJ8w== X-Received: by 2002:adf:a74a:: with SMTP id e10mr11188230wrd.185.1625423925746; Sun, 04 Jul 2021 11:38:45 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id w8sm11268801wrt.83.2021.07.04.11.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/12] linux-user/syscall: Refactor target_to_host_errno_table_init() Date: Sun, 4 Jul 2021 20:37:53 +0200 Message-Id: <20210704183755.655002-11-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To be able to move the errno handling code out of syscall.c, first refactor the target_to_host_errno_table[] initialization as a new init() function. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 64bbf331b28..33b7fef12a8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -509,8 +509,10 @@ static inline int next_free_host_timer(void) #define ERRNO_TABLE_SIZE 1200 -/* target_to_host_errno_table[] is initialized from - * host_to_target_errno_table[] in syscall_init(). */ +/* + * target_to_host_errno_table[] is initialized from + * host_to_target_errno_table[] in target_to_host_errno_table_init(). + */ static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = { }; @@ -637,6 +639,17 @@ static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { #endif }; +static void target_to_host_errno_table_init(void) +{ + /* + * Build target_to_host_errno_table[] table + * from host_to_target_errno_table[]. + */ + for (int i = 0; i < ERRNO_TABLE_SIZE; i++) { + target_to_host_errno_table[host_to_target_errno_table[i]] = i; + } +} + static inline int host_to_target_errno(int err) { if (err >= 0 && err < ERRNO_TABLE_SIZE && @@ -7102,7 +7115,6 @@ void syscall_init(void) IOCTLEntry *ie; const argtype *arg_type; int size; - int i; thunk_init(STRUCT_MAX); @@ -7112,11 +7124,7 @@ void syscall_init(void) #undef STRUCT #undef STRUCT_SPECIAL - /* Build target_to_host_errno_table[] table from - * host_to_target_errno_table[]. */ - for (i = 0; i < ERRNO_TABLE_SIZE; i++) { - target_to_host_errno_table[host_to_target_errno_table[i]] = i; - } + target_to_host_errno_table_init(); /* we patch the ioctl size if necessary. We rely on the fact that no ioctl has all the bits at '1' in the size field */ From patchwork Sun Jul 4 18:37:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rhH9+YpY; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyMW3kq0z9sXL for ; Mon, 5 Jul 2021 04:41:27 +1000 (AEST) Received: from localhost ([::1]:38504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m073V-0001IZ-72 for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:41:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0714-0003tf-2n for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:54 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:35331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0712-0006qP-6a for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:53 -0400 Received: by mail-wr1-x432.google.com with SMTP id m18so19264364wrv.2 for ; Sun, 04 Jul 2021 11:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JkJbITRvu3OZJX3RLZJavBspkqwzSZidGU15nXUNZro=; b=rhH9+YpY6vHHMq4I6AGtvrQgGlzkWD48fxIjnQZ2doh1b0EcktyhyjrS/B2RWyBup7 Xzzb1IfldIpgSFk7rXwfaDhRI4AriyjK852HBTGYf73l44Oyd/1VmvnhmSRisIadY+Ab mgMmDy2Pe6wK+7mOu/BeO+pCRI+ZZyNhEgHIHx4yfuiyFSNFMrcGMuM7H3Nfo6innv3V nG38Au9UNgcrsXCDGCgarjZCOP98b5c+GkG+i5PHEKmQSjNwpkHlGsCjHRquI93xPd3D /VyS3vRQjwgZk5p9coCUwxQ2YGlumSNLHvtbwLKCdb3QcpP0lARd4wyFKsX9OLjkdPka WdEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JkJbITRvu3OZJX3RLZJavBspkqwzSZidGU15nXUNZro=; b=T8Itq5fmxcLaoGS6Jb4fEOngVCAqBYtvHXh6l5vqLMePV/pUU3z+15XY5CAA6l2a05 qvMK3ySDbZMavWdFDscTAKtmyLyl3SMmOhB2ypwmQjUkuvszzvfpkhPAMECFP9y89kxO MEvP15/3xzW7DUjo6YOflsf3rBQ7SwrrS5xHXSq354iFK/PVv4el8b9zLO1RGu0xxG6g SGxwcRI1wNqtsylozFvMOGqT38nhCc3Qp0vsIZxKSwxCO+29AaQC2Rnqmbt9hschbLsv mxvX83+hHfsjBzrQEfd+R4spdakYnvGPwqatjM4kNKzdRnMOiXcOBjXcO9shzjjXLp24 4krw== X-Gm-Message-State: AOAM533PchtecycbsqRxSOR58Sp2wtZGX9ZtBwolQVQk8o6Ozt4RhXpo BQO7ZaVpslxevM1hziiRKtIQUszDsjU= X-Google-Smtp-Source: ABdhPJwKXy15ccMef0gBxbAByDuEK3C0HsHPLEoSm0ILFHRIIy8CXUWdlm1Qyvq1bmsV9beH0Xkckg== X-Received: by 2002:a5d:4b45:: with SMTP id w5mr11391266wrs.257.1625423930707; Sun, 04 Jul 2021 11:38:50 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id o11sm9472958wmq.1.2021.07.04.11.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/12] linux-user/syscall: Remove hardcoded tabs (code style) Date: Sun, 4 Jul 2021 20:37:54 +0200 Message-Id: <20210704183755.655002-12-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_75_100=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daudé --- Patch trivial to review using 'git-diff --ignore-all-space' --- linux-user/syscall.c | 188 +++++++++++++++++++++---------------------- 1 file changed, 94 insertions(+), 94 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 33b7fef12a8..3761d3b2d64 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -521,112 +521,112 @@ static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = { * minus the errnos that are not actually generic to all archs. */ static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { - [EAGAIN] = TARGET_EAGAIN, - [EIDRM] = TARGET_EIDRM, - [ECHRNG] = TARGET_ECHRNG, - [EL2NSYNC] = TARGET_EL2NSYNC, - [EL3HLT] = TARGET_EL3HLT, - [EL3RST] = TARGET_EL3RST, - [ELNRNG] = TARGET_ELNRNG, - [EUNATCH] = TARGET_EUNATCH, - [ENOCSI] = TARGET_ENOCSI, - [EL2HLT] = TARGET_EL2HLT, - [EDEADLK] = TARGET_EDEADLK, - [ENOLCK] = TARGET_ENOLCK, - [EBADE] = TARGET_EBADE, - [EBADR] = TARGET_EBADR, - [EXFULL] = TARGET_EXFULL, - [ENOANO] = TARGET_ENOANO, - [EBADRQC] = TARGET_EBADRQC, - [EBADSLT] = TARGET_EBADSLT, - [EBFONT] = TARGET_EBFONT, - [ENOSTR] = TARGET_ENOSTR, - [ENODATA] = TARGET_ENODATA, - [ETIME] = TARGET_ETIME, - [ENOSR] = TARGET_ENOSR, - [ENONET] = TARGET_ENONET, - [ENOPKG] = TARGET_ENOPKG, - [EREMOTE] = TARGET_EREMOTE, - [ENOLINK] = TARGET_ENOLINK, - [EADV] = TARGET_EADV, - [ESRMNT] = TARGET_ESRMNT, - [ECOMM] = TARGET_ECOMM, - [EPROTO] = TARGET_EPROTO, - [EDOTDOT] = TARGET_EDOTDOT, - [EMULTIHOP] = TARGET_EMULTIHOP, - [EBADMSG] = TARGET_EBADMSG, - [ENAMETOOLONG] = TARGET_ENAMETOOLONG, - [EOVERFLOW] = TARGET_EOVERFLOW, - [ENOTUNIQ] = TARGET_ENOTUNIQ, - [EBADFD] = TARGET_EBADFD, - [EREMCHG] = TARGET_EREMCHG, - [ELIBACC] = TARGET_ELIBACC, - [ELIBBAD] = TARGET_ELIBBAD, - [ELIBSCN] = TARGET_ELIBSCN, - [ELIBMAX] = TARGET_ELIBMAX, - [ELIBEXEC] = TARGET_ELIBEXEC, - [EILSEQ] = TARGET_EILSEQ, - [ENOSYS] = TARGET_ENOSYS, - [ELOOP] = TARGET_ELOOP, - [ERESTART] = TARGET_ERESTART, - [ESTRPIPE] = TARGET_ESTRPIPE, - [ENOTEMPTY] = TARGET_ENOTEMPTY, - [EUSERS] = TARGET_EUSERS, - [ENOTSOCK] = TARGET_ENOTSOCK, - [EDESTADDRREQ] = TARGET_EDESTADDRREQ, - [EMSGSIZE] = TARGET_EMSGSIZE, - [EPROTOTYPE] = TARGET_EPROTOTYPE, - [ENOPROTOOPT] = TARGET_ENOPROTOOPT, - [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT, - [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT, - [EOPNOTSUPP] = TARGET_EOPNOTSUPP, - [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT, - [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT, - [EADDRINUSE] = TARGET_EADDRINUSE, - [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL, - [ENETDOWN] = TARGET_ENETDOWN, - [ENETUNREACH] = TARGET_ENETUNREACH, - [ENETRESET] = TARGET_ENETRESET, - [ECONNABORTED] = TARGET_ECONNABORTED, - [ECONNRESET] = TARGET_ECONNRESET, - [ENOBUFS] = TARGET_ENOBUFS, - [EISCONN] = TARGET_EISCONN, - [ENOTCONN] = TARGET_ENOTCONN, - [EUCLEAN] = TARGET_EUCLEAN, - [ENOTNAM] = TARGET_ENOTNAM, - [ENAVAIL] = TARGET_ENAVAIL, - [EISNAM] = TARGET_EISNAM, - [EREMOTEIO] = TARGET_EREMOTEIO, + [EAGAIN] = TARGET_EAGAIN, + [EIDRM] = TARGET_EIDRM, + [ECHRNG] = TARGET_ECHRNG, + [EL2NSYNC] = TARGET_EL2NSYNC, + [EL3HLT] = TARGET_EL3HLT, + [EL3RST] = TARGET_EL3RST, + [ELNRNG] = TARGET_ELNRNG, + [EUNATCH] = TARGET_EUNATCH, + [ENOCSI] = TARGET_ENOCSI, + [EL2HLT] = TARGET_EL2HLT, + [EDEADLK] = TARGET_EDEADLK, + [ENOLCK] = TARGET_ENOLCK, + [EBADE] = TARGET_EBADE, + [EBADR] = TARGET_EBADR, + [EXFULL] = TARGET_EXFULL, + [ENOANO] = TARGET_ENOANO, + [EBADRQC] = TARGET_EBADRQC, + [EBADSLT] = TARGET_EBADSLT, + [EBFONT] = TARGET_EBFONT, + [ENOSTR] = TARGET_ENOSTR, + [ENODATA] = TARGET_ENODATA, + [ETIME] = TARGET_ETIME, + [ENOSR] = TARGET_ENOSR, + [ENONET] = TARGET_ENONET, + [ENOPKG] = TARGET_ENOPKG, + [EREMOTE] = TARGET_EREMOTE, + [ENOLINK] = TARGET_ENOLINK, + [EADV] = TARGET_EADV, + [ESRMNT] = TARGET_ESRMNT, + [ECOMM] = TARGET_ECOMM, + [EPROTO] = TARGET_EPROTO, + [EDOTDOT] = TARGET_EDOTDOT, + [EMULTIHOP] = TARGET_EMULTIHOP, + [EBADMSG] = TARGET_EBADMSG, + [ENAMETOOLONG] = TARGET_ENAMETOOLONG, + [EOVERFLOW] = TARGET_EOVERFLOW, + [ENOTUNIQ] = TARGET_ENOTUNIQ, + [EBADFD] = TARGET_EBADFD, + [EREMCHG] = TARGET_EREMCHG, + [ELIBACC] = TARGET_ELIBACC, + [ELIBBAD] = TARGET_ELIBBAD, + [ELIBSCN] = TARGET_ELIBSCN, + [ELIBMAX] = TARGET_ELIBMAX, + [ELIBEXEC] = TARGET_ELIBEXEC, + [EILSEQ] = TARGET_EILSEQ, + [ENOSYS] = TARGET_ENOSYS, + [ELOOP] = TARGET_ELOOP, + [ERESTART] = TARGET_ERESTART, + [ESTRPIPE] = TARGET_ESTRPIPE, + [ENOTEMPTY] = TARGET_ENOTEMPTY, + [EUSERS] = TARGET_EUSERS, + [ENOTSOCK] = TARGET_ENOTSOCK, + [EDESTADDRREQ] = TARGET_EDESTADDRREQ, + [EMSGSIZE] = TARGET_EMSGSIZE, + [EPROTOTYPE] = TARGET_EPROTOTYPE, + [ENOPROTOOPT] = TARGET_ENOPROTOOPT, + [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT, + [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT, + [EOPNOTSUPP] = TARGET_EOPNOTSUPP, + [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT, + [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT, + [EADDRINUSE] = TARGET_EADDRINUSE, + [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL, + [ENETDOWN] = TARGET_ENETDOWN, + [ENETUNREACH] = TARGET_ENETUNREACH, + [ENETRESET] = TARGET_ENETRESET, + [ECONNABORTED] = TARGET_ECONNABORTED, + [ECONNRESET] = TARGET_ECONNRESET, + [ENOBUFS] = TARGET_ENOBUFS, + [EISCONN] = TARGET_EISCONN, + [ENOTCONN] = TARGET_ENOTCONN, + [EUCLEAN] = TARGET_EUCLEAN, + [ENOTNAM] = TARGET_ENOTNAM, + [ENAVAIL] = TARGET_ENAVAIL, + [EISNAM] = TARGET_EISNAM, + [EREMOTEIO] = TARGET_EREMOTEIO, [EDQUOT] = TARGET_EDQUOT, - [ESHUTDOWN] = TARGET_ESHUTDOWN, - [ETOOMANYREFS] = TARGET_ETOOMANYREFS, - [ETIMEDOUT] = TARGET_ETIMEDOUT, - [ECONNREFUSED] = TARGET_ECONNREFUSED, - [EHOSTDOWN] = TARGET_EHOSTDOWN, - [EHOSTUNREACH] = TARGET_EHOSTUNREACH, - [EALREADY] = TARGET_EALREADY, - [EINPROGRESS] = TARGET_EINPROGRESS, - [ESTALE] = TARGET_ESTALE, - [ECANCELED] = TARGET_ECANCELED, - [ENOMEDIUM] = TARGET_ENOMEDIUM, - [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE, + [ESHUTDOWN] = TARGET_ESHUTDOWN, + [ETOOMANYREFS] = TARGET_ETOOMANYREFS, + [ETIMEDOUT] = TARGET_ETIMEDOUT, + [ECONNREFUSED] = TARGET_ECONNREFUSED, + [EHOSTDOWN] = TARGET_EHOSTDOWN, + [EHOSTUNREACH] = TARGET_EHOSTUNREACH, + [EALREADY] = TARGET_EALREADY, + [EINPROGRESS] = TARGET_EINPROGRESS, + [ESTALE] = TARGET_ESTALE, + [ECANCELED] = TARGET_ECANCELED, + [ENOMEDIUM] = TARGET_ENOMEDIUM, + [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE, #ifdef ENOKEY - [ENOKEY] = TARGET_ENOKEY, + [ENOKEY] = TARGET_ENOKEY, #endif #ifdef EKEYEXPIRED - [EKEYEXPIRED] = TARGET_EKEYEXPIRED, + [EKEYEXPIRED] = TARGET_EKEYEXPIRED, #endif #ifdef EKEYREVOKED - [EKEYREVOKED] = TARGET_EKEYREVOKED, + [EKEYREVOKED] = TARGET_EKEYREVOKED, #endif #ifdef EKEYREJECTED - [EKEYREJECTED] = TARGET_EKEYREJECTED, + [EKEYREJECTED] = TARGET_EKEYREJECTED, #endif #ifdef EOWNERDEAD - [EOWNERDEAD] = TARGET_EOWNERDEAD, + [EOWNERDEAD] = TARGET_EOWNERDEAD, #endif #ifdef ENOTRECOVERABLE - [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE, + [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE, #endif #ifdef ENOMSG [ENOMSG] = TARGET_ENOMSG, From patchwork Sun Jul 4 18:37:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1500487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vQPIFpT0; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHyZZ3bP8z9sX1 for ; Mon, 5 Jul 2021 04:51:01 +1000 (AEST) Received: from localhost ([::1]:58094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m07Cl-00061I-1X for incoming@patchwork.ozlabs.org; Sun, 04 Jul 2021 14:50:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0719-0004G0-9D for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:59 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0717-0006t2-2a for qemu-devel@nongnu.org; Sun, 04 Jul 2021 14:38:59 -0400 Received: by mail-wr1-x42d.google.com with SMTP id f14so18873302wrs.6 for ; Sun, 04 Jul 2021 11:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oz3/9LjOF/DujRVAV4aK72odTL+SNItH8ndIDVrL7Cc=; b=vQPIFpT0avrRTFZcX1IapggI2sqF9HHkNWC88ySXNsUG0BGV6biJKrz+jmgIvXcZfI KIDsAsD1kFcOMPo2emJowwLFF58tcIzKNpDjF4r+rV/tpKtLd2dtBQdOihTEJhzZZXB3 /l49CauVvnpISpD7uOaHV/3Rc53yhm6dASnK70smHZX0mRam6xyYslljA4o8sHTOoof7 OxtOxv5tn2RM++zx4ohNanopfu3+15myCa1UNRmb1OrjOhwOKiKbxJakn8szXQECfS24 gXqrtui4RlBaYgzv4GgK91Kscr/fFKXqVcohGJGxZ36KqvuxLnzqOjbQ0bG5UQwFYRaf zwww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Oz3/9LjOF/DujRVAV4aK72odTL+SNItH8ndIDVrL7Cc=; b=XIwnCfePRXj/k2VgtsOqYOr3g/rS+jIbw1qOWZSMjHaNaB3bJqxqshpr/HxX2elA24 HhqPLLRVrhSmohFNmm6UlxZeD1+iIq+RmiYhAC509rdm0f39T1ch7NOMze9ikWwxZhZU 9dvde76Eipo5dMWNWvotByAiFwgX3wbFCcXcmSqulkecrBl6mCMsTinhyr/JRHbO4A1m wcjulosiMZv60CQzI7vSKK7/HLoswTsBZ5GpAPPKB82y9jM9YKWZksevyn0QQErL99p8 xaYu4Xdyg2//cUU8+zBX6ABLlRt6IzeQ81Gtr21fjFlUKKlo7RjcQVs8s65ukKuvHIGZ Oiwg== X-Gm-Message-State: AOAM531c3eXb2nvKeIlRw7X64gJfW96Ai/oi0no1tgfXwf6Rkdq24RMJ iYfqiBiODUtIqJSwJsEIROc0EeW9CzE= X-Google-Smtp-Source: ABdhPJwu0aMwGWM8VnVjhDt2sPa0r1PD7zNBSELGyOjoA4PtJ8asQNeIoBx2ntJhyCjCWhvsM6Zhfw== X-Received: by 2002:a05:6000:18ca:: with SMTP id w10mr11188229wrq.55.1625423935535; Sun, 04 Jul 2021 11:38:55 -0700 (PDT) Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id f14sm3451041wmq.10.2021.07.04.11.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 11:38:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 12/12] linux-user: Extract target errno related functions to 'target_errno.h' Date: Sun, 4 Jul 2021 20:37:55 +0200 Message-Id: <20210704183755.655002-13-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210704183755.655002-1-f4bug@amsat.org> References: <20210704183755.655002-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Helge Deller , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Taylor Simpson , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Extract target errno related functions to a new 'target_errno.h' header, so we can do the host <-> target errno conversion out of the big syscall.c (which is already 13k LoC). Signed-off-by: Philippe Mathieu-Daudé --- linux-user/target_errno.h | 32 +++++++ linux-user/syscall.c | 162 +-------------------------------- linux-user/target_errno.c | 183 ++++++++++++++++++++++++++++++++++++++ linux-user/meson.build | 1 + 4 files changed, 217 insertions(+), 161 deletions(-) create mode 100644 linux-user/target_errno.h create mode 100644 linux-user/target_errno.c diff --git a/linux-user/target_errno.h b/linux-user/target_errno.h new file mode 100644 index 00000000000..4e5e9d384c9 --- /dev/null +++ b/linux-user/target_errno.h @@ -0,0 +1,32 @@ +/* + * Linux syscalls + * + * Copyright (c) 2003 Fabrice Bellard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef LINUX_USER_TARGET_ERRNO_H +#define LINUX_USER_TARGET_ERRNO_H + +#define ERRNO_TABLE_SIZE 1200 + +int target_to_host_errno(int err); + +void target_to_host_errno_table_init(void); + +int host_to_target_errno(int err); + +#endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3761d3b2d64..06c4358b813 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -131,6 +131,7 @@ #include "qemu/selfmap.h" #include "user/syscall-trace.h" #include "qapi/error.h" +#include "target_errno.h" #include "fd-trans.h" #include "tcg/tcg.h" @@ -507,167 +508,6 @@ static inline int next_free_host_timer(void) } #endif -#define ERRNO_TABLE_SIZE 1200 - -/* - * target_to_host_errno_table[] is initialized from - * host_to_target_errno_table[] in target_to_host_errno_table_init(). - */ -static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = { -}; - -/* - * This list is the union of errno values overridden in asm-/errno.h - * minus the errnos that are not actually generic to all archs. - */ -static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { - [EAGAIN] = TARGET_EAGAIN, - [EIDRM] = TARGET_EIDRM, - [ECHRNG] = TARGET_ECHRNG, - [EL2NSYNC] = TARGET_EL2NSYNC, - [EL3HLT] = TARGET_EL3HLT, - [EL3RST] = TARGET_EL3RST, - [ELNRNG] = TARGET_ELNRNG, - [EUNATCH] = TARGET_EUNATCH, - [ENOCSI] = TARGET_ENOCSI, - [EL2HLT] = TARGET_EL2HLT, - [EDEADLK] = TARGET_EDEADLK, - [ENOLCK] = TARGET_ENOLCK, - [EBADE] = TARGET_EBADE, - [EBADR] = TARGET_EBADR, - [EXFULL] = TARGET_EXFULL, - [ENOANO] = TARGET_ENOANO, - [EBADRQC] = TARGET_EBADRQC, - [EBADSLT] = TARGET_EBADSLT, - [EBFONT] = TARGET_EBFONT, - [ENOSTR] = TARGET_ENOSTR, - [ENODATA] = TARGET_ENODATA, - [ETIME] = TARGET_ETIME, - [ENOSR] = TARGET_ENOSR, - [ENONET] = TARGET_ENONET, - [ENOPKG] = TARGET_ENOPKG, - [EREMOTE] = TARGET_EREMOTE, - [ENOLINK] = TARGET_ENOLINK, - [EADV] = TARGET_EADV, - [ESRMNT] = TARGET_ESRMNT, - [ECOMM] = TARGET_ECOMM, - [EPROTO] = TARGET_EPROTO, - [EDOTDOT] = TARGET_EDOTDOT, - [EMULTIHOP] = TARGET_EMULTIHOP, - [EBADMSG] = TARGET_EBADMSG, - [ENAMETOOLONG] = TARGET_ENAMETOOLONG, - [EOVERFLOW] = TARGET_EOVERFLOW, - [ENOTUNIQ] = TARGET_ENOTUNIQ, - [EBADFD] = TARGET_EBADFD, - [EREMCHG] = TARGET_EREMCHG, - [ELIBACC] = TARGET_ELIBACC, - [ELIBBAD] = TARGET_ELIBBAD, - [ELIBSCN] = TARGET_ELIBSCN, - [ELIBMAX] = TARGET_ELIBMAX, - [ELIBEXEC] = TARGET_ELIBEXEC, - [EILSEQ] = TARGET_EILSEQ, - [ENOSYS] = TARGET_ENOSYS, - [ELOOP] = TARGET_ELOOP, - [ERESTART] = TARGET_ERESTART, - [ESTRPIPE] = TARGET_ESTRPIPE, - [ENOTEMPTY] = TARGET_ENOTEMPTY, - [EUSERS] = TARGET_EUSERS, - [ENOTSOCK] = TARGET_ENOTSOCK, - [EDESTADDRREQ] = TARGET_EDESTADDRREQ, - [EMSGSIZE] = TARGET_EMSGSIZE, - [EPROTOTYPE] = TARGET_EPROTOTYPE, - [ENOPROTOOPT] = TARGET_ENOPROTOOPT, - [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT, - [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT, - [EOPNOTSUPP] = TARGET_EOPNOTSUPP, - [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT, - [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT, - [EADDRINUSE] = TARGET_EADDRINUSE, - [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL, - [ENETDOWN] = TARGET_ENETDOWN, - [ENETUNREACH] = TARGET_ENETUNREACH, - [ENETRESET] = TARGET_ENETRESET, - [ECONNABORTED] = TARGET_ECONNABORTED, - [ECONNRESET] = TARGET_ECONNRESET, - [ENOBUFS] = TARGET_ENOBUFS, - [EISCONN] = TARGET_EISCONN, - [ENOTCONN] = TARGET_ENOTCONN, - [EUCLEAN] = TARGET_EUCLEAN, - [ENOTNAM] = TARGET_ENOTNAM, - [ENAVAIL] = TARGET_ENAVAIL, - [EISNAM] = TARGET_EISNAM, - [EREMOTEIO] = TARGET_EREMOTEIO, - [EDQUOT] = TARGET_EDQUOT, - [ESHUTDOWN] = TARGET_ESHUTDOWN, - [ETOOMANYREFS] = TARGET_ETOOMANYREFS, - [ETIMEDOUT] = TARGET_ETIMEDOUT, - [ECONNREFUSED] = TARGET_ECONNREFUSED, - [EHOSTDOWN] = TARGET_EHOSTDOWN, - [EHOSTUNREACH] = TARGET_EHOSTUNREACH, - [EALREADY] = TARGET_EALREADY, - [EINPROGRESS] = TARGET_EINPROGRESS, - [ESTALE] = TARGET_ESTALE, - [ECANCELED] = TARGET_ECANCELED, - [ENOMEDIUM] = TARGET_ENOMEDIUM, - [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE, -#ifdef ENOKEY - [ENOKEY] = TARGET_ENOKEY, -#endif -#ifdef EKEYEXPIRED - [EKEYEXPIRED] = TARGET_EKEYEXPIRED, -#endif -#ifdef EKEYREVOKED - [EKEYREVOKED] = TARGET_EKEYREVOKED, -#endif -#ifdef EKEYREJECTED - [EKEYREJECTED] = TARGET_EKEYREJECTED, -#endif -#ifdef EOWNERDEAD - [EOWNERDEAD] = TARGET_EOWNERDEAD, -#endif -#ifdef ENOTRECOVERABLE - [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE, -#endif -#ifdef ENOMSG - [ENOMSG] = TARGET_ENOMSG, -#endif -#ifdef ERKFILL - [ERFKILL] = TARGET_ERFKILL, -#endif -#ifdef EHWPOISON - [EHWPOISON] = TARGET_EHWPOISON, -#endif -}; - -static void target_to_host_errno_table_init(void) -{ - /* - * Build target_to_host_errno_table[] table - * from host_to_target_errno_table[]. - */ - for (int i = 0; i < ERRNO_TABLE_SIZE; i++) { - target_to_host_errno_table[host_to_target_errno_table[i]] = i; - } -} - -static inline int host_to_target_errno(int err) -{ - if (err >= 0 && err < ERRNO_TABLE_SIZE && - host_to_target_errno_table[err]) { - return host_to_target_errno_table[err]; - } - return err; -} - -static inline int target_to_host_errno(int err) -{ - if (err >= 0 && err < ERRNO_TABLE_SIZE && - target_to_host_errno_table[err]) { - return target_to_host_errno_table[err]; - } - return err; -} - static inline abi_long get_errno(abi_long ret) { if (ret == -1) diff --git a/linux-user/target_errno.c b/linux-user/target_errno.c new file mode 100644 index 00000000000..2a7320d240f --- /dev/null +++ b/linux-user/target_errno.c @@ -0,0 +1,183 @@ +/* + * Linux syscalls + * + * Copyright (c) 2003 Fabrice Bellard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "target_errno.h" +#include "errno_defs.h" + +/* + * target_to_host_errno_table[] is initialized from + * host_to_target_errno_table[] in target_to_host_errno_table_init(). + */ +static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = { +}; + +/* + * This list is the union of errno values overridden in asm-/errno.h + * minus the errnos that are not actually generic to all archs. + */ +static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { + [EAGAIN] = TARGET_EAGAIN, + [EIDRM] = TARGET_EIDRM, + [ECHRNG] = TARGET_ECHRNG, + [EL2NSYNC] = TARGET_EL2NSYNC, + [EL3HLT] = TARGET_EL3HLT, + [EL3RST] = TARGET_EL3RST, + [ELNRNG] = TARGET_ELNRNG, + [EUNATCH] = TARGET_EUNATCH, + [ENOCSI] = TARGET_ENOCSI, + [EL2HLT] = TARGET_EL2HLT, + [EDEADLK] = TARGET_EDEADLK, + [ENOLCK] = TARGET_ENOLCK, + [EBADE] = TARGET_EBADE, + [EBADR] = TARGET_EBADR, + [EXFULL] = TARGET_EXFULL, + [ENOANO] = TARGET_ENOANO, + [EBADRQC] = TARGET_EBADRQC, + [EBADSLT] = TARGET_EBADSLT, + [EBFONT] = TARGET_EBFONT, + [ENOSTR] = TARGET_ENOSTR, + [ENODATA] = TARGET_ENODATA, + [ETIME] = TARGET_ETIME, + [ENOSR] = TARGET_ENOSR, + [ENONET] = TARGET_ENONET, + [ENOPKG] = TARGET_ENOPKG, + [EREMOTE] = TARGET_EREMOTE, + [ENOLINK] = TARGET_ENOLINK, + [EADV] = TARGET_EADV, + [ESRMNT] = TARGET_ESRMNT, + [ECOMM] = TARGET_ECOMM, + [EPROTO] = TARGET_EPROTO, + [EDOTDOT] = TARGET_EDOTDOT, + [EMULTIHOP] = TARGET_EMULTIHOP, + [EBADMSG] = TARGET_EBADMSG, + [ENAMETOOLONG] = TARGET_ENAMETOOLONG, + [EOVERFLOW] = TARGET_EOVERFLOW, + [ENOTUNIQ] = TARGET_ENOTUNIQ, + [EBADFD] = TARGET_EBADFD, + [EREMCHG] = TARGET_EREMCHG, + [ELIBACC] = TARGET_ELIBACC, + [ELIBBAD] = TARGET_ELIBBAD, + [ELIBSCN] = TARGET_ELIBSCN, + [ELIBMAX] = TARGET_ELIBMAX, + [ELIBEXEC] = TARGET_ELIBEXEC, + [EILSEQ] = TARGET_EILSEQ, + [ENOSYS] = TARGET_ENOSYS, + [ELOOP] = TARGET_ELOOP, + [ERESTART] = TARGET_ERESTART, + [ESTRPIPE] = TARGET_ESTRPIPE, + [ENOTEMPTY] = TARGET_ENOTEMPTY, + [EUSERS] = TARGET_EUSERS, + [ENOTSOCK] = TARGET_ENOTSOCK, + [EDESTADDRREQ] = TARGET_EDESTADDRREQ, + [EMSGSIZE] = TARGET_EMSGSIZE, + [EPROTOTYPE] = TARGET_EPROTOTYPE, + [ENOPROTOOPT] = TARGET_ENOPROTOOPT, + [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT, + [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT, + [EOPNOTSUPP] = TARGET_EOPNOTSUPP, + [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT, + [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT, + [EADDRINUSE] = TARGET_EADDRINUSE, + [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL, + [ENETDOWN] = TARGET_ENETDOWN, + [ENETUNREACH] = TARGET_ENETUNREACH, + [ENETRESET] = TARGET_ENETRESET, + [ECONNABORTED] = TARGET_ECONNABORTED, + [ECONNRESET] = TARGET_ECONNRESET, + [ENOBUFS] = TARGET_ENOBUFS, + [EISCONN] = TARGET_EISCONN, + [ENOTCONN] = TARGET_ENOTCONN, + [EUCLEAN] = TARGET_EUCLEAN, + [ENOTNAM] = TARGET_ENOTNAM, + [ENAVAIL] = TARGET_ENAVAIL, + [EISNAM] = TARGET_EISNAM, + [EREMOTEIO] = TARGET_EREMOTEIO, + [EDQUOT] = TARGET_EDQUOT, + [ESHUTDOWN] = TARGET_ESHUTDOWN, + [ETOOMANYREFS] = TARGET_ETOOMANYREFS, + [ETIMEDOUT] = TARGET_ETIMEDOUT, + [ECONNREFUSED] = TARGET_ECONNREFUSED, + [EHOSTDOWN] = TARGET_EHOSTDOWN, + [EHOSTUNREACH] = TARGET_EHOSTUNREACH, + [EALREADY] = TARGET_EALREADY, + [EINPROGRESS] = TARGET_EINPROGRESS, + [ESTALE] = TARGET_ESTALE, + [ECANCELED] = TARGET_ECANCELED, + [ENOMEDIUM] = TARGET_ENOMEDIUM, + [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE, +#ifdef ENOKEY + [ENOKEY] = TARGET_ENOKEY, +#endif +#ifdef EKEYEXPIRED + [EKEYEXPIRED] = TARGET_EKEYEXPIRED, +#endif +#ifdef EKEYREVOKED + [EKEYREVOKED] = TARGET_EKEYREVOKED, +#endif +#ifdef EKEYREJECTED + [EKEYREJECTED] = TARGET_EKEYREJECTED, +#endif +#ifdef EOWNERDEAD + [EOWNERDEAD] = TARGET_EOWNERDEAD, +#endif +#ifdef ENOTRECOVERABLE + [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE, +#endif +#ifdef ENOMSG + [ENOMSG] = TARGET_ENOMSG, +#endif +#ifdef ERKFILL + [ERFKILL] = TARGET_ERFKILL, +#endif +#ifdef EHWPOISON + [EHWPOISON] = TARGET_EHWPOISON, +#endif +}; + +void target_to_host_errno_table_init(void) +{ + /* + * Build target_to_host_errno_table[] table + * from host_to_target_errno_table[]. + */ + for (int i = 0; i < ERRNO_TABLE_SIZE; i++) { + target_to_host_errno_table[host_to_target_errno_table[i]] = i; + } +} + +int host_to_target_errno(int err) +{ + if (err >= 0 && err < ERRNO_TABLE_SIZE && + host_to_target_errno_table[err]) { + return host_to_target_errno_table[err]; + } + return err; +} + +int target_to_host_errno(int err) +{ + if (err >= 0 && err < ERRNO_TABLE_SIZE && + target_to_host_errno_table[err]) { + return target_to_host_errno_table[err]; + } + return err; +} diff --git a/linux-user/meson.build b/linux-user/meson.build index 9549f81682d..f757b63310b 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -9,6 +9,7 @@ 'signal.c', 'strace.c', 'syscall.c', + 'target_errno.c', 'uaccess.c', 'uname.c', ))