Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp915275rdb; Fri, 19 Jan 2024 02:51:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAbYsAe4POKLdGMIG0DHZfdaOthpWcGdi8oyZLE+HHQK9wB2kFeVW7LG8XZVPUoHPkBcHm X-Received: by 2002:aca:905:0:b0:3bd:446c:a65d with SMTP id 5-20020aca0905000000b003bd446ca65dmr2543543oij.90.1705661491843; Fri, 19 Jan 2024 02:51:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705661491; cv=pass; d=google.com; s=arc-20160816; b=RCJ91dPa5XFaS1daE/qYBtTUwdz8vkSHQ7f4L8QlFivOSo0afa72AToKk6MjmdArbx vWf1rzVpxNpxzhlElDuvUTV/4txJUAk3Reb0uyOE2q/aq5Aq7Ci/F+E8/GhJYKEZZC68 wv4kTXHyPXH9e38LcVul3oTfal58jkaicn2WfNosJvCnEVotkTMpwEQc/UwOrlS3k0Hz cTmpbB9i8P0j3x2B8+cHvlvIdvoBAd5ZqoHg1L+4gb0poC8kTIiXV1g8EWvUwI7caKaS fnygvgJLU4u+kizTfizRM3P2rypapbk9L9V8WakKrayumYcOAjI8KhAIyuzO0NbRkaQM rZ6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Dam+ysOKHmekRdWT+0A8uvWFAbklzxZhnxZqNV/mEds=; fh=l853tIkYxgnik1fw2Sxn5xLiC2jBtKRoTjggHTcG9RM=; b=m77VXwWaaZUN7h0BInvEvKcoEmrydmHHnuLhVCbsKNggqwyqyphcaNDLH4kh9Z+HDx sz6liWNpm0IE3ywZCY/ylOc1F057XYAKRJOzHQfBd3wkjmg6QPytBIGBtA7pQuPRprL+ kjEq0sO2VLmu3exNZL1kv4N7Zb5GK/9DDAsCZAnIkcBbDT0q1eHFgoNv61WqbUOv6KAF UjB+FVs6GE25ekH8KM8HvcgjdgT0UdJwZxCifaWC+uZ8/3sGzLVibXiG+A+MFCnQQDT7 2ggAnaeY3VR5HZ/Yo8CX885kaXOaxXTsLc0F1YGKuNlyIuUJcGMoK4pJ7wO+QsfMQS3o KvrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U1SbTumB; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-31049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n5-20020a634005000000b005cdfdaa0a18si3140915pga.666.2024.01.19.02.51.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 02:51:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U1SbTumB; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-31049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C20EFB23592 for ; Fri, 19 Jan 2024 10:50:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A66C652F68; Fri, 19 Jan 2024 10:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="U1SbTumB" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 238ED51020 for ; Fri, 19 Jan 2024 10:45:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705661151; cv=none; b=kzUrGhkgvaL52jx62s47fbM3z/REj7bNSjqdVTMb4K8L4b5Pc4llOChdTS0EobgJQIoLEEMIQ4oFoS9xwrlnT3MJHwfQcG5hzoMlvVIYDaRUilBJOhtYy4RsEm077drbkFvxM+DlW6GdPVcpNbpeJnS8l4YhrCN0KI2Xlpmi8zo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705661151; c=relaxed/simple; bh=YE3UMIIxQ6MMF0Ha1oOA8mHquJPAns0Jxr3xCN4fzZE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KNsxvFasR8+AusZQrIghf4EYSpA+7y+D67VyNJH4So+GqncOGrnGB7LDWmdVn8LL0rELXo3oQI5m3eX3p9Pu5Qk9VK0rSzCNP7n2u78OCxlCf5/9cWY2rSavaCUamGpY7iax1ukdLVpW/6Hrlh94ybh1Oy5Nq5+hP/T9VOAtGUE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=U1SbTumB; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50eabd1c701so696436e87.3 for ; Fri, 19 Jan 2024 02:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705661147; x=1706265947; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dam+ysOKHmekRdWT+0A8uvWFAbklzxZhnxZqNV/mEds=; b=U1SbTumBsQaZprp5gtw2jAVt25pZXzWQkZhBYeAiFS9Y/hVHuZ8ttXt+Z+meR+woTb tOWgh1MuYenKQOXbNDD8uRId6Is7GAj58i+p213rVhqgsYUmnbtm9+fvAp4UsrKnFMPK PJrHHdE4u04OInVtpu3T4Pb8T6z3lfiQXDPKLk9UkA+mv4agyWNIyci8LFHeBsHZAXvk Pk5Rs9GTwIqyqAd2FmgokeGLUpqm48R6oRma1IBODWvdsEbczcxGTwxz6JjBJuWUyI/H YTPMiJG3dP0cBGtP/OBtGTD62ghlpJtfnHkmdmNcwEZvJrNiIWADnPQBB9zIf6y/t/qZ i3fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705661147; x=1706265947; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dam+ysOKHmekRdWT+0A8uvWFAbklzxZhnxZqNV/mEds=; b=ECdZpVHk5V8oP5FvAGkmanlMkHIXZFMkTmHhd2Cx3KyOLraeDVqm1prfMsCnco/Rpu YM5FOL8jXXlIhUKZfP+U4xhn3oQAC4IR82EU9MlUMCYhoROT8xyF+kJZKB7xRWMtBBXk N5+engQxgYLVXLO8olz2YrcTqaryd46yhxOQn/jnDCScItux1rzoevaxzmCCkLuvIjDh z9uTYUiUsrcL+zwvk6M0wGkSUlEKXbUByAoWzKcCq0wMbfak4Goucu41rnwc82jNA0K8 4J4QLUdOi9ZyYDOOqCyMfvhD0wGtyMNbIdcbZT2d4c1PyWRgb0KKlpUhxNZBif849WDa zphQ== X-Gm-Message-State: AOJu0Yxcfa6ImBJ+RYX4skFRaSqlSyeuee5jUA6TtIW6BjsHxwWoOvpa jGvpIVlBpnbi0vGE1vOnyAPUkSVnE2q+Yy423yQtkuZ2RDMeBFXVwmWCNUV3JAA= X-Received: by 2002:a05:6512:ac2:b0:50e:7b0d:5b66 with SMTP id n2-20020a0565120ac200b0050e7b0d5b66mr742328lfu.73.1705661147229; Fri, 19 Jan 2024 02:45:47 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id fm16-20020a05600c0c1000b0040ea10178f3sm77470wmb.21.2024.01.19.02.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 02:45:46 -0800 (PST) From: Tudor Ambarus To: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, andre.draszik@linaro.org, kernel-team@android.com, peter.griffin@linaro.org, semen.protsenko@linaro.org, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v2 19/19] tty: serial: samsung: shrink memory footprint of ``struct s3c24xx_uart_info`` Date: Fri, 19 Jan 2024 10:45:26 +0000 Message-ID: <20240119104526.1221243-20-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240119104526.1221243-1-tudor.ambarus@linaro.org> References: <20240119104526.1221243-1-tudor.ambarus@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use u32 for the members of ``struct s3c24xx_uart_info`` that are used for register interactions. The purpose of these members becomes clearer. The greater benefit of this change is that it also reduces the memory footprint of the struct, allowing 64-bit architectures to use a single cacheline for the entire struct. struct s3c24xx_uart_info { const char * name; /* 0 8 */ enum s3c24xx_port_type type; /* 8 4 */ unsigned int port_type; /* 12 4 */ unsigned int fifosize; /* 16 4 */ u32 rx_fifomask; /* 20 4 */ u32 rx_fifoshift; /* 24 4 */ u32 rx_fifofull; /* 28 4 */ u32 tx_fifomask; /* 32 4 */ u32 tx_fifoshift; /* 36 4 */ u32 tx_fifofull; /* 40 4 */ u32 clksel_mask; /* 44 4 */ u32 clksel_shift; /* 48 4 */ u32 ucon_mask; /* 52 4 */ u8 def_clk_sel; /* 56 1 */ u8 num_clks; /* 57 1 */ u8 iotype; /* 58 1 */ bool has_divslot; /* 59 1 */ /* size: 64, cachelines: 1, members: 17 */ /* padding: 4 */ }; Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 0a03df44211d..fcc675603b14 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -75,15 +75,15 @@ struct s3c24xx_uart_info { enum s3c24xx_port_type type; unsigned int port_type; unsigned int fifosize; - unsigned long rx_fifomask; - unsigned long rx_fifoshift; - unsigned long rx_fifofull; - unsigned long tx_fifomask; - unsigned long tx_fifoshift; - unsigned long tx_fifofull; - unsigned long clksel_mask; - unsigned long clksel_shift; - unsigned long ucon_mask; + u32 rx_fifomask; + u32 rx_fifoshift; + u32 rx_fifofull; + u32 tx_fifomask; + u32 tx_fifoshift; + u32 tx_fifofull; + u32 clksel_mask; + u32 clksel_shift; + u32 ucon_mask; u8 def_clk_sel; u8 num_clks; u8 iotype; -- 2.43.0.429.g432eaa2c6b-goog