Commit 8039de10 authored by Helge Deller's avatar Helge Deller Committed by Kyle McMartin
Browse files

[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: default avatarHelge Deller <deller@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 02706647
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -29,9 +29,9 @@
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/sections.h>
#include <asm/sections.h>


int split_tlb;
int split_tlb __read_mostly;
int dcache_stride;
int dcache_stride __read_mostly;
int icache_stride;
int icache_stride __read_mostly;
EXPORT_SYMBOL(dcache_stride);
EXPORT_SYMBOL(dcache_stride);




@@ -45,9 +45,9 @@ DEFINE_SPINLOCK(pa_tlb_lock);
EXPORT_SYMBOL(pa_tlb_lock);
EXPORT_SYMBOL(pa_tlb_lock);
#endif
#endif


struct pdc_cache_info cache_info;
struct pdc_cache_info cache_info __read_mostly;
#ifndef CONFIG_PA20
#ifndef CONFIG_PA20
static struct pdc_btlb_info btlb_info;
static struct pdc_btlb_info btlb_info __read_mostly;
#endif
#endif


#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
@@ -332,7 +332,7 @@ void clear_user_page_asm(void *page, unsigned long vaddr)
}
}


#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
#define FLUSH_THRESHOLD 0x80000 /* 0.5MB */
int parisc_cache_flush_threshold = FLUSH_THRESHOLD;
int parisc_cache_flush_threshold __read_mostly = FLUSH_THRESHOLD;


void parisc_setup_cache_timing(void)
void parisc_setup_cache_timing(void)
{
{
+1 −1
Original line number Original line Diff line number Diff line
@@ -39,7 +39,7 @@
#include <asm/parisc-device.h>
#include <asm/parisc-device.h>


/* See comments in include/asm-parisc/pci.h */
/* See comments in include/asm-parisc/pci.h */
struct hppa_dma_ops *hppa_dma_ops;
struct hppa_dma_ops *hppa_dma_ops __read_mostly;
EXPORT_SYMBOL(hppa_dma_ops);
EXPORT_SYMBOL(hppa_dma_ops);


static struct device root = {
static struct device root = {
+1 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,7 @@ static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));


/* Firmware needs to be initially set to narrow to determine the 
/* Firmware needs to be initially set to narrow to determine the 
 * actual firmware width. */
 * actual firmware width. */
int parisc_narrow_firmware = 1;
int parisc_narrow_firmware __read_mostly = 1;
#endif
#endif


/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
/* On most currently-supported platforms, IODC I/O calls are 32-bit calls
+3 −3
Original line number Original line Diff line number Diff line
@@ -38,7 +38,7 @@
*/
*/
#undef DEBUG_PAT
#undef DEBUG_PAT


int pdc_type = PDC_TYPE_ILLEGAL;
int pdc_type __read_mostly = PDC_TYPE_ILLEGAL;


void __init setup_pdc(void)
void __init setup_pdc(void)
{
{
@@ -120,8 +120,8 @@ set_pmem_entry(physmem_range_t *pmem_ptr, unsigned long start,
	 * pdc info is bad in this case).
	 * pdc info is bad in this case).
	 */
	 */


	if (   ((start & (PAGE_SIZE - 1)) != 0)
	if (unlikely( ((start & (PAGE_SIZE - 1)) != 0)
	    || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) ) {
	    || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) )) {


		panic("Memory range doesn't align with page size!\n");
		panic("Memory range doesn't align with page size!\n");
	}
	}
+3 −3
Original line number Original line Diff line number Diff line
@@ -33,10 +33,10 @@
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/tlbflush.h>	/* for purge_tlb_*() macros */
#include <asm/tlbflush.h>	/* for purge_tlb_*() macros */


static struct proc_dir_entry * proc_gsc_root = NULL;
static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
static unsigned long pcxl_used_bytes = 0;
static unsigned long pcxl_used_bytes __read_mostly = 0;
static unsigned long pcxl_used_pages = 0;
static unsigned long pcxl_used_pages __read_mostly = 0;


extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
static spinlock_t   pcxl_res_lock;
static spinlock_t   pcxl_res_lock;
Loading