[SERIAL] mark several serial tables const
This patch marks a few serial data structures const, moving them to .rodata where they won't false-share cachelines with things that get written to. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
f5417612d7
commit
cb3592be27
|
@ -102,7 +102,7 @@ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
|
||||||
#define SERIAL_PORT_DFNS
|
#define SERIAL_PORT_DFNS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct old_serial_port old_serial_port[] = {
|
static const struct old_serial_port old_serial_port[] = {
|
||||||
SERIAL_PORT_DFNS /* defined in asm/serial.h */
|
SERIAL_PORT_DFNS /* defined in asm/serial.h */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -468,7 +468,7 @@ static unsigned short timedia_eight_port[] = {
|
||||||
0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
|
0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct timedia_struct {
|
static const struct timedia_struct {
|
||||||
int num;
|
int num;
|
||||||
unsigned short *ids;
|
unsigned short *ids;
|
||||||
} timedia_data[] = {
|
} timedia_data[] = {
|
||||||
|
|
|
@ -1779,7 +1779,7 @@ struct baud_rates {
|
||||||
unsigned int cflag;
|
unsigned int cflag;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct baud_rates baud_rates[] = {
|
static const struct baud_rates baud_rates[] = {
|
||||||
{ 921600, B921600 },
|
{ 921600, B921600 },
|
||||||
{ 460800, B460800 },
|
{ 460800, B460800 },
|
||||||
{ 230400, B230400 },
|
{ 230400, B230400 },
|
||||||
|
|
|
@ -85,7 +85,7 @@ struct multi_id {
|
||||||
int multi; /* 1 = multifunction, > 1 = # ports */
|
int multi; /* 1 = multifunction, > 1 = # ports */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct multi_id multi_id[] = {
|
static const struct multi_id multi_id[] = {
|
||||||
{ MANFID_OMEGA, PRODID_OMEGA_QSP_100, 4 },
|
{ MANFID_OMEGA, PRODID_OMEGA_QSP_100, 4 },
|
||||||
{ MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232, 2 },
|
{ MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232, 2 },
|
||||||
{ MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232_D1, 2 },
|
{ MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232_D1, 2 },
|
||||||
|
@ -354,8 +354,8 @@ next_tuple(client_handle_t handle, tuple_t * tuple, cisparse_t * parse)
|
||||||
|
|
||||||
static int simple_config(dev_link_t *link)
|
static int simple_config(dev_link_t *link)
|
||||||
{
|
{
|
||||||
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
|
static const kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
|
||||||
static int size_table[2] = { 8, 16 };
|
static const int size_table[2] = { 8, 16 };
|
||||||
client_handle_t handle = link->handle;
|
client_handle_t handle = link->handle;
|
||||||
struct serial_info *info = link->priv;
|
struct serial_info *info = link->priv;
|
||||||
struct serial_cfg_mem *cfg_mem;
|
struct serial_cfg_mem *cfg_mem;
|
||||||
|
|
Loading…
Reference in New Issue