You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PARISC] Add __read_mostly section for parisc
Flag a whole bunch of things as __read_mostly on parisc. Also flag a few branches as unlikely() and cleanup a bit of code. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
This commit is contained in:
committed by
Kyle McMartin
parent
02706647a4
commit
8039de10aa
@@ -57,7 +57,7 @@
|
||||
|
||||
static DEFINE_SPINLOCK(eisa_irq_lock);
|
||||
|
||||
void __iomem *eisa_eeprom_addr;
|
||||
void __iomem *eisa_eeprom_addr __read_mostly;
|
||||
|
||||
/* We can only have one EISA adapter in the system because neither
|
||||
* implementation can be flexed.
|
||||
@@ -141,7 +141,7 @@ static int slave_mask;
|
||||
* in the furure.
|
||||
*/
|
||||
/* irq 13,8,2,1,0 must be edge */
|
||||
static unsigned int eisa_irq_level; /* default to edge triggered */
|
||||
static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered */
|
||||
|
||||
|
||||
/* called by free irq */
|
||||
|
||||
@@ -150,7 +150,7 @@ void __init lasi_led_init(unsigned long lasi_hpa)
|
||||
*
|
||||
*/
|
||||
|
||||
static unsigned long lasi_power_off_hpa;
|
||||
static unsigned long lasi_power_off_hpa __read_mostly;
|
||||
|
||||
static void lasi_power_off(void)
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
/* non-postable I/O port space, densely packed */
|
||||
#define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL)
|
||||
static void __iomem *astro_iop_base;
|
||||
static void __iomem *astro_iop_base __read_mostly;
|
||||
|
||||
#define ELROY_HVERS 0x782
|
||||
#define MERCURY_HVERS 0x783
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* (c) Copyright 2000 Red Hat Software
|
||||
* (c) Copyright 2000 Helge Deller <hdeller@redhat.com>
|
||||
* (c) Copyright 2001-2004 Helge Deller <deller@gmx.de>
|
||||
* (c) Copyright 2001-2005 Helge Deller <deller@gmx.de>
|
||||
* (c) Copyright 2001 Randolph Chung <tausq@debian.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -56,13 +56,13 @@
|
||||
relatively large amount of CPU time, some of the calculations can be
|
||||
turned off with the following variables (controlled via procfs) */
|
||||
|
||||
static int led_type = -1;
|
||||
static int led_type __read_mostly = -1;
|
||||
static unsigned char lastleds; /* LED state from most recent update */
|
||||
static unsigned int led_heartbeat = 1;
|
||||
static unsigned int led_diskio = 1;
|
||||
static unsigned int led_lanrxtx = 1;
|
||||
static char lcd_text[32];
|
||||
static char lcd_text_default[32];
|
||||
static unsigned int led_heartbeat __read_mostly = 1;
|
||||
static unsigned int led_diskio __read_mostly = 1;
|
||||
static unsigned int led_lanrxtx __read_mostly = 1;
|
||||
static char lcd_text[32] __read_mostly;
|
||||
static char lcd_text_default[32] __read_mostly;
|
||||
|
||||
|
||||
static struct workqueue_struct *led_wq;
|
||||
@@ -108,7 +108,7 @@ struct pdc_chassis_lcd_info_ret_block {
|
||||
/* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's
|
||||
* HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */
|
||||
static struct pdc_chassis_lcd_info_ret_block
|
||||
lcd_info __attribute__((aligned(8))) =
|
||||
lcd_info __attribute__((aligned(8))) __read_mostly =
|
||||
{
|
||||
.model = DISPLAY_MODEL_LCD,
|
||||
.lcd_width = 16,
|
||||
@@ -144,7 +144,7 @@ static int start_task(void)
|
||||
device_initcall(start_task);
|
||||
|
||||
/* ptr to LCD/LED-specific function */
|
||||
static void (*led_func_ptr) (unsigned char);
|
||||
static void (*led_func_ptr) (unsigned char) __read_mostly;
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static int led_proc_read(char *page, char **start, off_t off, int count,
|
||||
|
||||
@@ -70,7 +70,7 @@ MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(PDCS_VERSION);
|
||||
|
||||
static unsigned long pdcs_size = 0;
|
||||
static unsigned long pdcs_size __read_mostly;
|
||||
|
||||
/* This struct defines what we need to deal with a parisc pdc path entry */
|
||||
struct pdcspath_entry {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* linux/arch/parisc/kernel/power.c
|
||||
* HP PARISC soft power switch support driver
|
||||
*
|
||||
* Copyright (c) 2001-2002 Helge Deller <deller@gmx.de>
|
||||
* Copyright (c) 2001-2005 Helge Deller <deller@gmx.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
@@ -102,7 +102,7 @@ static DECLARE_WORK(poweroff_work, deferred_poweroff, NULL);
|
||||
|
||||
static void poweroff(void)
|
||||
{
|
||||
static int powering_off;
|
||||
static int powering_off __read_mostly;
|
||||
|
||||
if (powering_off)
|
||||
return;
|
||||
@@ -113,7 +113,7 @@ static void poweroff(void)
|
||||
|
||||
|
||||
/* local time-counter for shutdown */
|
||||
static int shutdown_timer;
|
||||
static int shutdown_timer __read_mostly;
|
||||
|
||||
/* check, give feedback and start shutdown after one second */
|
||||
static void process_shutdown(void)
|
||||
@@ -139,7 +139,7 @@ static void process_shutdown(void)
|
||||
DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0);
|
||||
|
||||
/* soft power switch enabled/disabled */
|
||||
int pwrsw_enabled = 1;
|
||||
int pwrsw_enabled __read_mostly = 1;
|
||||
|
||||
/*
|
||||
* On gecko style machines (e.g. 712/xx and 715/xx)
|
||||
@@ -149,7 +149,7 @@ int pwrsw_enabled = 1;
|
||||
*/
|
||||
static void gecko_tasklet_func(unsigned long unused)
|
||||
{
|
||||
if (!pwrsw_enabled)
|
||||
if (unlikely(!pwrsw_enabled))
|
||||
return;
|
||||
|
||||
if (__getDIAG(25) & 0x80000000) {
|
||||
@@ -173,7 +173,7 @@ static void polling_tasklet_func(unsigned long soft_power_reg)
|
||||
{
|
||||
unsigned long current_status;
|
||||
|
||||
if (!pwrsw_enabled)
|
||||
if (unlikely(!pwrsw_enabled))
|
||||
return;
|
||||
|
||||
current_status = gsc_readl(soft_power_reg);
|
||||
|
||||
Reference in New Issue
Block a user