From nobody Wed Feb 14 04:05:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TZPkB0V6Lz59rQ2; Wed, 14 Feb 2024 04:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TZPk96dyGz49l1; Wed, 14 Feb 2024 04:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707883537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA8FaPVpcb3Sqige06ygWCbESdbRvYBoUPX6L2hNCTc=; b=oEbTZpIr68BjJ4rQ0oc8de7O/IcTeEzHbUD4R2cJKmhF091VQw3ofmAIherG9uhySGNS2n u2t2ZnVGXc7tx/AJFiOzMNE1lYyy+S8QCmEG3edu1qOovwTzPAm5hQKep7vldXhbII9dyR yJrJOiK/fp3WcEUnZlz5jSGQFM20yH3ZonodLKAOrt/8EWtw9SKDXrDxRj8DOyHacoxmnc Kx/HvUxC4rCibl2jFiFxqHKYMNlla46n2ohFgwwSFnjsZswFG3uOygFy4UoZDCtULJUA7S ayvBDSnnnm3s6kL66Fz/Yen1JSd07ubZAtZ8gjmYLOhbCn4Q7ylbcsbPShwlpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707883537; a=rsa-sha256; cv=none; b=RZCqTH9NS187zandwf3LSeOINChIfER6n82Iz969tqKwAevs7+82/rVtUAOxPqkZZSSzGZ eiCUDXWOIZo56pl+olOREBP51rE/LSNx3F46N/v2QzthtV90VIljRAqb94qrsfV3RBvXFx kr50LEDefhInXp72CM0lq0JVbs2JSpSC9axC6XxnJXGcIS14UPuryVxYNVOFsnzwrEMbG+ /bXtQHk8wB8CUWPic/K1oIvjBoytiZSOLnjlbMBe4y+hGc3VxoPIdjpyMDC4N6ZWS26U2W NcGY+4lmdiGG+N/kd7b/jzsTwejWfWVVOQkHeLQDHKqvsRpHYN7jOrjXnGWSfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707883537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA8FaPVpcb3Sqige06ygWCbESdbRvYBoUPX6L2hNCTc=; b=I2nxZ2u8hM0lCB50C9GCbVRDJnXWlNeUwgVbV9KVDF0AMN5p/X3TZaiMZ6eY8hnBmf6dyN WxguXBdDKYDNfbsa7+ylGVVMZR4bOflfMKD19Pp8DwPYbZTRZ7t94qQOV5N++/QJAn7tpE TuW3RxgqcxWrYWmQ3zVp14yUWHd51CXXkqh2lAk73Xqq9qo6r82ORJnD6EJVeAgTOZKYYr LK9dV31UX1rnc43gQBpG6eWfXgWe5x8aIzGCCfRHnrkMkcfyzPzSdWw/1EvQMF2vJFukYv MW4nng+2boRWIDf1E8dsX4DbTYMTLzZyyocipjZtJpNuO/9KKZvgNkvjzoj8Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TZPk95kJCzkDf; Wed, 14 Feb 2024 04:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41E45baZ082506; Wed, 14 Feb 2024 04:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41E45bGr082503; Wed, 14 Feb 2024 04:05:37 GMT (envelope-from git) Date: Wed, 14 Feb 2024 04:05:37 GMT Message-Id: <202402140405.41E45bGr082503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 976b3cf86d79 - stable/13 - amd64 gdt_segs: use designated initializers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 976b3cf86d799de4d53c56d83ce47ccbbe192a7a Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=976b3cf86d799de4d53c56d83ce47ccbbe192a7a commit 976b3cf86d799de4d53c56d83ce47ccbbe192a7a Author: Konstantin Belousov AuthorDate: 2024-02-09 04:59:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-14 03:54:00 +0000 amd64 gdt_segs: use designated initializers (cherry picked from commit 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a) --- sys/amd64/amd64/machdep.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index eef11f0bdddd..928203a690ac 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -357,8 +357,8 @@ CTASSERT(sizeof(struct nmi_pcpu) == 16); * slots as corresponding segments for i386 kernel. */ struct soft_segment_descriptor gdt_segs[] = { -/* GNULL_SEL 0 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL_SEL] = { /* 0 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -366,8 +366,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GNULL2_SEL 1 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL2_SEL] = { /* 1 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -375,8 +375,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUFS32_SEL 2 32 bit %gs Descriptor for user */ -{ .ssd_base = 0x0, +[GUFS32_SEL] = { /* 2 32 bit %gs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -384,8 +384,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUGS32_SEL 3 32 bit %fs Descriptor for user */ -{ .ssd_base = 0x0, +[GUGS32_SEL] = { /* 3 32 bit %fs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -393,8 +393,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GCODE_SEL 4 Code Descriptor for kernel */ -{ .ssd_base = 0x0, +[GCODE_SEL] = { /* 4 Code Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_KPL, @@ -402,8 +402,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GDATA_SEL 5 Data Descriptor for kernel */ -{ .ssd_base = 0x0, +[GDATA_SEL] = { /* 5 Data Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_KPL, @@ -411,8 +411,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GUCODE32_SEL 6 32 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE32_SEL] = { /* 6 32 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -420,8 +420,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUDATA_SEL 7 32/64 bit Data Descriptor for user */ -{ .ssd_base = 0x0, +[GUDATA_SEL] = { /* 7 32/64 bit Data Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -429,8 +429,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUCODE_SEL 8 64 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE_SEL] = { /* 8 64 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -438,8 +438,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GPROC0_SEL 9 Proc 0 Tss Descriptor */ -{ .ssd_base = 0x0, +[GPROC0_SEL] = { /* 9 Proc 0 TSS Descriptor */ + .ssd_base = 0x0, .ssd_limit = sizeof(struct amd64tss) + IOPERM_BITMAP_SIZE - 1, .ssd_type = SDT_SYSTSS, .ssd_dpl = SEL_KPL, @@ -447,8 +447,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* Actually, the TSS is a system descriptor which is double size */ -{ .ssd_base = 0x0, +[GPROC0_SEL + 1] = { /* 10 Proc 0 TSS descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -456,8 +456,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 11 LDT Descriptor */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL] = { /* 11 LDT Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -465,8 +465,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 12 LDT Descriptor, double size */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL + 1] = { /* 12 LDT Descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0,