From patchwork Wed Jan 10 10:21:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13515911 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 021F3C3DA6E for ; Wed, 10 Jan 2024 10:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qfq/JlApOXRL1Ra70HtF4nmZtTnvpGot7w0tzOFwK8M=; b=S2kuyz+q3B/kZa L9pVayAU0dgBkIxCcY8LN3dTEZXwenDsMsxvSIzpzA1Hqn0ogxcEmUtDtIubKHc+PM1Eyr7fjz4Sr mzmdNRyITz+eoFYXD19Y3EmhEuhmtCP4ALvoxHZlEOYFZryrrhE2C3vLN/KxVClt2yi5mZ2DOqGto pZA2EaufdvjFzlpQX/Z4lTfc5ffsI9VtAGvjmPa96z9NB/qKE3Jcozcb2BdD4tkiBU8B6xq7kNswD Vs344Q8DSICKcXZ4s1C8ynbi+9dWT6GgkN5mVsgg/v2WaFhC7+mnmuSiGzagQKgKWHgGE318txyNh PUWGJ2JHQWzRduRdiTQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNVik-00B0g2-1T; Wed, 10 Jan 2024 10:22:02 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNVi7-00B079-1K for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2024 10:21:24 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40e5701cbbaso2091245e9.0 for ; Wed, 10 Jan 2024 02:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704882082; x=1705486882; darn=lists.infradead.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=ummHx1igHBI+mPkPK31ezfxthw+Jgvbj/YdjUw2HyQ4=; b=vZnbUec5pSxXDHlUvN0lWgsvLbkDDsqpB5CiK0+/xpJL0386DsM/TLpZGoCn6IpowT 90ccg08fb5UAg+datFgiffJ3aaY2neaXlCyt/ISzPa9esOw1l5ziJceZQnAgP2Xx7j2Y 5jdIxLyShGbth7p08KKIeLyhG8t3kRTO6LXeXGeWeU792nZIGclQbH0gF2ZG0Dp2cpjI pPyD20ShvpxoCwTsvuq+dghCZUG6nzU2ku0zA2RWGkQTg0icnqZJ0LpNy6fsdpQbmrtj ofPrVNecExt/rVRo69SjEen+spiWKcEe2P95vBsWJBQH9IMVMEDKIDlIJzA8vqmug0Zd Ip0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704882082; x=1705486882; 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=ummHx1igHBI+mPkPK31ezfxthw+Jgvbj/YdjUw2HyQ4=; b=rVzY25pzw6sq8sETVcnJD4E8AB+mLd2N1QnUuTEkZl/RU43NE+noFEq4WS1ILHJuJp uJIGXnOdOcix9WYZ46NIvKVf64oP0cYyZCmO6q6C9iJ2z2wvMYcaxphL8OhHm1Tg0JtZ I6tFYEnHMrQuB/qqNym++NkzU7oLNMXUedP4yXphRUFUUOuLh1K6Zc88JBPL2APwLd2U ax09B6S1ZMJw98SfP/BymEzNDPIW9hQj5214JkrBBM4MPxC3Mv3aO4TdYjbkxZqId+MK MYwwKxtI49rT+2WClCUzjJwhPW/tj0RccUBLL/ehHodD/8/t9CkdbMXqSMaXJJjqDeoh qk5g== X-Gm-Message-State: AOJu0YxSSqS4lcEkMMZTgFXjiVt0qmsHhoYhe0YSLHYUlxEIsTXxwvMH buNn10J9PJm4rduD8MFeRJ+DaNQcCgZhWg== X-Google-Smtp-Source: AGHT+IG0xYD6noOiAF06pJmAKPKFGS5k9kf0z5T6NNAMgrhXlZB3r2GVRIKB+IrSXxoBiSdSWW9UzA== X-Received: by 2002:a7b:ce99:0:b0:40d:88b8:1bd1 with SMTP id q25-20020a7bce99000000b0040d88b81bd1mr525747wmj.185.1704882082174; Wed, 10 Jan 2024 02:21:22 -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 j7-20020a05600c190700b0040e52cac976sm1625302wmq.29.2024.01.10.02.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:21:21 -0800 (PST) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH 18/18] tty: serial: samsung: shrink memory footprint of ``struct s3c24xx_uart_info`` Date: Wed, 10 Jan 2024 10:21:02 +0000 Message-ID: <20240110102102.61587-19-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240110102102.61587-1-tudor.ambarus@linaro.org> References: <20240110102102.61587-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240110_022123_481696_9EF90D9E X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 */ u8 has_divslot:1; /* 59: 0 1 */ /* size: 64, cachelines: 1, members: 17 */ /* padding: 4 */ /* bit_padding: 7 bits */ }; Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- 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 598d9fe7a492..40dceb41acb7 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;