[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RESEND v7 1/7] xen/console: promote conring{,_size} to __ro_after_init


  • To: jbeulich@xxxxxxxx
  • From: dmukhin@xxxxxxxx
  • Date: Tue, 14 Jul 2026 05:32:34 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 205.220.161.53) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ford.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ford.com; dkim=pass (signature was verified) header.d=saarlouis.ford.com; dkim=pass (signature was verified) header.d=ford.com; arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qoG3Gz8ZSeVLoThnROpMdrDqPQyPBZqS+jU5PPXUnWs=; b=fmnGpMb0sNrpwDWT/0v8wUqevG9nELhzOQd+rVq8s4m8FTXDJZqfSGmBlLiMWetbm8gCSC9A00Jyy8RLjW/UTfPWClvLv6W1Rk7Rkc3HkXkx1k6iqXXOVFouO3PUbgsj/msOy3VfI7CE+dHH7u8EuFPViZ7X8SspClyHo45bGX6GokJXhen1R1hUKOohlT41kndBbyCj0A7evY+c3Y6qjmmZaoxtMJxKbPD5U96fBxlfgd2R4KPlczVydcwH0ozVmuvV/JwH/F8TvBdNi4lx3oTqPV4VeFkys869zAg2kRBBMyjrZU4VgS7aWenGUmz04JBShEwRPWSeizKNHKMuLA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wMH1f2dV5L0s2ZqhZv40mjuejmCFInfpgxHvWLe4mrqaE01z9lzvqFwpscRQdgoY/cHeBeSsjGdWYOkuepkttVi1dQ7Lxjdmwvxc6SogBnKZaFAJ/OGH8Dg+0JC64BTaEmXmjSqWNWjSgKpMwg+/VRdCo+ENYJQesr1124AMC6YpT01n6W1mZ7OJkLJTK6L9Fxo5Fy+6kI1ONji0A3gFHnD7okYyifo7J72YdbHtVuHKi9I8QsjKD2Yvev3CZvrIhSllQmPU4qYA5zgyB7tudib8onAodmkkCRZHSgJeUsBczOcteSa6qIInfrJWl1xPb/H5B4oxBe+u+6L47tvNsQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=ppford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector2-azureford-onmicrosoft-com header.d=azureford.onmicrosoft.com header.i="@azureford.onmicrosoft.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=ppserprodsaar header.d=saarlouis.ford.com header.i="@saarlouis.ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=ppfserpocford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"
  • Cc: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, dmukhin@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, roger.pau@xxxxxxxxxx, sstabellini@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 14 Jul 2026 12:33:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Pser-m365-app: SER-APP

From: Denis Mukhin <dmukhin@xxxxxxxx> 

Both conring{,_size} should be RO after initialization is completed.

Change the conring integer parameters type to `unsigned int` as required
by CODING_STYLE.

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Resending to include forgotten Jan's A-b from v5:
  
https://lore.kernel.org/xen-devel/1579e081-b945-40b1-9a72-f6c5f7ed69ca@xxxxxxxx/

Changes since v6:
- rebased
- preserved Jan's A-b from v5
---
 xen/drivers/char/console.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index dbda7f259668..5ebbbf63c092 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -340,15 +340,15 @@ static void cf_check do_dec_thresh(unsigned char key, 
bool unused)
  */
 
 /* conring_size: allows a larger console ring than default (16kB). */
-static uint32_t __initdata opt_conring_size;
+static unsigned int __initdata opt_conring_size;
 size_param("conring_size", opt_conring_size);
 
 #define _CONRING_SIZE 16384
 #define CONRING_IDX_MASK(i) ((i)&(conring_size-1))
 static char __initdata _conring[_CONRING_SIZE];
-static char *__read_mostly conring = _conring;
-static uint32_t __read_mostly conring_size = _CONRING_SIZE;
-static uint32_t conringc, conringp;
+static char *__ro_after_init conring = _conring;
+static unsigned int __ro_after_init conring_size = _CONRING_SIZE;
+static unsigned int conringc, conringp;
 
 static void cf_check conring_notify(void *unused)
 {
-- 
2.54.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.