From 2cfc5be7df26b6fbe9a293e2abf388a6e5b9a39e Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Fri, 28 Sep 2007 13:25:59 -0400 Subject: [PARISC] Wire up sys_fallocate (and compat_sys_fallocate) Signed-off-by: Kyle McMartin --- include/asm-parisc/unistd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/asm-parisc') diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index f74099bdca3c..081b4ae61866 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h @@ -797,8 +797,9 @@ #define __NR_signalfd (__NR_Linux + 302) #define __NR_timerfd (__NR_Linux + 303) #define __NR_eventfd (__NR_Linux + 304) +#define __NR_fallocate (__NR_Linux + 305) -#define __NR_Linux_syscalls (__NR_eventfd + 1) +#define __NR_Linux_syscalls (__NR_fallocate + 1) #define __IGNORE_select /* newselect */ -- cgit v1.2.3 From c75ac712df81bf0b9a561bd89f74282650440035 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 28 Sep 2007 14:22:19 -0400 Subject: [PARISC] Export pdc.h for palo Signed-off-by: Jeff Bailey Signed-off-by: Kyle McMartin --- include/asm-parisc/Kbuild | 2 ++ include/asm-parisc/pdc.h | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'include/asm-parisc') diff --git a/include/asm-parisc/Kbuild b/include/asm-parisc/Kbuild index c68e1680da01..f88b252e419c 100644 --- a/include/asm-parisc/Kbuild +++ b/include/asm-parisc/Kbuild @@ -1 +1,3 @@ include include/asm-generic/Kbuild.asm + +unifdef-y += pdc.h diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index 876fd8116d4a..775726d8a716 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h @@ -143,14 +143,15 @@ #define PDC_MEM_RET_PDT_FULL -11 #define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL -#ifndef __ASSEMBLY__ +#ifdef __KERNEL__ +# ifndef __ASSEMBLY__ typedef struct { unsigned long long baseAddr; unsigned int pages; unsigned int reserved; } MemAddrTable_t; -#endif - +# endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ #define PDC_PSW 21 /* Get/Set default System Mask */ #define PDC_PSW_MASK 0 /* Return mask */ @@ -296,8 +297,11 @@ typedef struct { #define OSTAT_ON 7 #ifndef __ASSEMBLY__ - #include +#endif /* __ASSEMBLY__ */ + +#ifdef __KERNEL__ +# ifndef __ASSEMBLY__ extern int pdc_type; @@ -558,7 +562,8 @@ struct pdc_hpmc_pim_20 { /* PDC_PIM */ __u64 fr[32]; }; -#endif /* __ASSEMBLY__ */ +# endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ /* flags of the device_path (see below) */ #define PF_AUTOBOOT 0x80 @@ -707,6 +712,7 @@ struct zeropage { #define BOOT_CONSOLE_SPA_OFFSET 0x3c4 #define BOOT_CONSOLE_PATH_OFFSET 0x3a8 +#ifdef __KERNEL__ #ifndef __ASSEMBLY__ void pdc_console_init(void); /* in pdc_console.c */ void pdc_console_restart(void); @@ -786,6 +792,7 @@ static inline char * os_id_to_string(u16 os_id) { default: return "Unknown"; } } -#endif /* __ASSEMBLY__ */ +# endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ #endif /* _PARISC_PDC_H */ -- cgit v1.2.3 From 218c998caa4ec76a9da15f3946dbb2cc22564114 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 18 Oct 2007 00:03:34 -0700 Subject: [PARISC] Clean up asm-parisc/pdc.h If we're going to export the header, at least let's organize it sensibly and not have a mishmash of userspace, assembly, and kernel visible defines. Signed-off-by: Kyle McMartin --- include/asm-parisc/pdc.h | 313 +++++++++++++++++++++-------------------------- 1 file changed, 137 insertions(+), 176 deletions(-) (limited to 'include/asm-parisc') diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index 775726d8a716..5e0c3ca5450b 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h @@ -1,7 +1,6 @@ #ifndef _PARISC_PDC_H #define _PARISC_PDC_H - /* * PDC return values ... * All PDC calls return a subset of these errors. @@ -20,7 +19,6 @@ #define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */ #define PDC_NOT_NARROW -17 /* Narrow mode not supported */ - /* * PDC entry points... */ @@ -50,6 +48,12 @@ #define PDC_MODEL_DISPEC 5 /* disable specific option */ #define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ #define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ +/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ +#define PDC_MODEL_IOPDIR_FDC (1 << 2) +#define PDC_MODEL_NVA_MASK (3 << 4) +#define PDC_MODEL_NVA_SUPPORTED (0 << 4) +#define PDC_MODEL_NVA_SLOW (1 << 4) +#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4) #define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */ #define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */ @@ -91,7 +95,7 @@ #define PDC_TOD 9 /* time-of-day clock (TOD) */ #define PDC_TOD_READ 0 /* read TOD */ #define PDC_TOD_WRITE 1 /* write TOD */ -#define PDC_TOD_ITIMER 2 /* calibrate Interval Timer (CR16) */ + #define PDC_STABLE 10 /* stable storage (sprockets) */ #define PDC_STABLE_READ 0 @@ -143,16 +147,6 @@ #define PDC_MEM_RET_PDT_FULL -11 #define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL -#ifdef __KERNEL__ -# ifndef __ASSEMBLY__ -typedef struct { - unsigned long long baseAddr; - unsigned int pages; - unsigned int reserved; -} MemAddrTable_t; -# endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ - #define PDC_PSW 21 /* Get/Set default System Mask */ #define PDC_PSW_MASK 0 /* Return mask */ #define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */ @@ -275,6 +269,43 @@ typedef struct { #define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */ #define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */ +/* cl_class + * page 3-33 of IO-Firmware ARS + * IODC ENTRY_INIT(Search first) RET[1] + */ +#define CL_NULL 0 /* invalid */ +#define CL_RANDOM 1 /* random access (as disk) */ +#define CL_SEQU 2 /* sequential access (as tape) */ +#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */ +#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */ +#define CL_DISPL 9 /* half-duplex console (display) */ +#define CL_FC 10 /* FiberChannel access media */ + +/* IODC ENTRY_INIT() */ +#define ENTRY_INIT_SRCH_FRST 2 +#define ENTRY_INIT_SRCH_NEXT 3 +#define ENTRY_INIT_MOD_DEV 4 +#define ENTRY_INIT_DEV 5 +#define ENTRY_INIT_MOD 6 +#define ENTRY_INIT_MSG 9 + +/* IODC ENTRY_IO() */ +#define ENTRY_IO_BOOTIN 0 +#define ENTRY_IO_BOOTOUT 1 +#define ENTRY_IO_CIN 2 +#define ENTRY_IO_COUT 3 +#define ENTRY_IO_CLOSE 4 +#define ENTRY_IO_GETMSG 9 +#define ENTRY_IO_BBLOCK_IN 16 +#define ENTRY_IO_BBLOCK_OUT 17 + +/* IODC ENTRY_SPA() */ + +/* IODC ENTRY_CONFIG() */ + +/* IODC ENTRY_TEST() */ + +/* IODC ENTRY_TLB() */ /* constants for OS (NVM...) */ #define OS_ID_NONE 0 /* Undefined OS ID */ @@ -296,12 +327,15 @@ typedef struct { #define OSTAT_RUN 6 #define OSTAT_ON 7 -#ifndef __ASSEMBLY__ -#include -#endif /* __ASSEMBLY__ */ +/* Page Zero constant offsets used by the HPMC handler */ +#define BOOT_CONSOLE_HPA_OFFSET 0x3c0 +#define BOOT_CONSOLE_SPA_OFFSET 0x3c4 +#define BOOT_CONSOLE_PATH_OFFSET 0x3a8 +#if !defined(__ASSEMBLY__) #ifdef __KERNEL__ -# ifndef __ASSEMBLY__ + +#include extern int pdc_type; @@ -335,14 +369,6 @@ struct pdc_model { /* for PDC_MODEL */ unsigned long curr_key; }; -/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ - -#define PDC_MODEL_IOPDIR_FDC (1 << 2) /* see sba_iommu.c */ -#define PDC_MODEL_NVA_MASK (3 << 4) -#define PDC_MODEL_NVA_SUPPORTED (0 << 4) -#define PDC_MODEL_NVA_SLOW (1 << 4) -#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4) - struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ unsigned long #ifdef CONFIG_64BIT @@ -562,16 +588,97 @@ struct pdc_hpmc_pim_20 { /* PDC_PIM */ __u64 fr[32]; }; -# endif /* __ASSEMBLY__ */ +void pdc_console_init(void); /* in pdc_console.c */ +void pdc_console_restart(void); + +void setup_pdc(void); /* in inventory.c */ + +/* wrapper-functions from pdc.c */ + +int pdc_add_valid(unsigned long address); +int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); +int pdc_chassis_disp(unsigned long disp); +int pdc_chassis_warn(unsigned long *warn); +int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); +int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, + void *iodc_data, unsigned int iodc_data_size); +int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info, + struct pdc_module_path *mod_path, long mod_index); +int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info, + long mod_index, long addr_index); +int pdc_model_info(struct pdc_model *model); +int pdc_model_sysmodel(char *name); +int pdc_model_cpuid(unsigned long *cpu_id); +int pdc_model_versions(unsigned long *versions, int id); +int pdc_model_capabilities(unsigned long *capabilities); +int pdc_cache_info(struct pdc_cache_info *cache); +int pdc_spaceid_bits(unsigned long *space_bits); +#ifndef CONFIG_PA20 +int pdc_btlb_info(struct pdc_btlb_info *btlb); +int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); +#endif /* !CONFIG_PA20 */ +int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa); + +int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count); +int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count); +int pdc_stable_get_size(unsigned long *size); +int pdc_stable_verify_contents(void); +int pdc_stable_initialize(void); + +int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa); +int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl); + +int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *); +int pdc_tod_read(struct pdc_tod *tod); +int pdc_tod_set(unsigned long sec, unsigned long usec); + +#ifdef CONFIG_64BIT +int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, + struct pdc_memory_table *tbl, unsigned long entries); +#endif + +void set_firmware_width(void); +int pdc_do_firm_test_reset(unsigned long ftc_bitmap); +int pdc_do_reset(void); +int pdc_soft_power_info(unsigned long *power_reg); +int pdc_soft_power_button(int sw_control); +void pdc_io_reset(void); +void pdc_io_reset_devices(void); +int pdc_iodc_getc(void); +void pdc_iodc_putc(unsigned char c); +void pdc_iodc_outc(unsigned char c); +void pdc_printf(const char *fmt, ...); + +void pdc_emergency_unlock(void); +int pdc_sti_call(unsigned long func, unsigned long flags, + unsigned long inptr, unsigned long outputr, + unsigned long glob_cfg); + +static inline char * os_id_to_string(u16 os_id) { + switch(os_id) { + case OS_ID_NONE: return "No OS"; + case OS_ID_HPUX: return "HP-UX"; + case OS_ID_MPEXL: return "MPE-iX"; + case OS_ID_OSF: return "OSF"; + case OS_ID_HPRT: return "HP-RT"; + case OS_ID_NOVEL: return "Novell Netware"; + case OS_ID_LINUX: return "Linux"; + default: return "Unknown"; + } +} + #endif /* __KERNEL__ */ -/* flags of the device_path (see below) */ +#define PAGE0 ((struct zeropage *)__PAGE_OFFSET) + +/* DEFINITION OF THE ZERO-PAGE (PAG0) */ +/* based on work by Jason Eckhardt (jason@equator.com) */ + +/* flags of the device_path */ #define PF_AUTOBOOT 0x80 #define PF_AUTOSEARCH 0x40 #define PF_TIMER 0x0F -#ifndef __ASSEMBLY__ - struct device_path { /* page 1-69 */ unsigned char flags; /* flags see above! */ unsigned char bc[6]; /* bus converter routing info */ @@ -591,63 +698,6 @@ struct pz_device { unsigned short cl_class;/* see below */ } __attribute__((aligned(8))) ; -#endif /* __ASSEMBLY__ */ - -/* cl_class - * page 3-33 of IO-Firmware ARS - * IODC ENTRY_INIT(Search first) RET[1] - */ -#define CL_NULL 0 /* invalid */ -#define CL_RANDOM 1 /* random access (as disk) */ -#define CL_SEQU 2 /* sequential access (as tape) */ -#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */ -#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */ -#define CL_DISPL 9 /* half-duplex console (display) */ -#define CL_FC 10 /* FiberChannel access media */ - -#if 0 -/* FIXME: DEVCLASS_* duplicates CL_* (above). Delete DEVCLASS_*? */ -#define DEVCLASS_RANDOM 1 -#define DEVCLASS_SEQU 2 -#define DEVCLASS_DUPLEX 7 -#define DEVCLASS_KEYBD 8 -#define DEVCLASS_DISP 9 -#endif - -/* IODC ENTRY_INIT() */ -#define ENTRY_INIT_SRCH_FRST 2 -#define ENTRY_INIT_SRCH_NEXT 3 -#define ENTRY_INIT_MOD_DEV 4 -#define ENTRY_INIT_DEV 5 -#define ENTRY_INIT_MOD 6 -#define ENTRY_INIT_MSG 9 - -/* IODC ENTRY_IO() */ -#define ENTRY_IO_BOOTIN 0 -#define ENTRY_IO_BOOTOUT 1 -#define ENTRY_IO_CIN 2 -#define ENTRY_IO_COUT 3 -#define ENTRY_IO_CLOSE 4 -#define ENTRY_IO_GETMSG 9 -#define ENTRY_IO_BBLOCK_IN 16 -#define ENTRY_IO_BBLOCK_OUT 17 - -/* IODC ENTRY_SPA() */ - -/* IODC ENTRY_CONFIG() */ - -/* IODC ENTRY_TEST() */ - -/* IODC ENTRY_TLB() */ - - -/* DEFINITION OF THE ZERO-PAGE (PAG0) */ -/* based on work by Jason Eckhardt (jason@equator.com) */ - -#ifndef __ASSEMBLY__ - -#define PAGE0 ((struct zeropage *)__PAGE_OFFSET) - struct zeropage { /* [0x000] initialize vectors (VEC) */ unsigned int vec_special; /* must be zero */ @@ -704,95 +754,6 @@ struct zeropage { __u32 pad608[126]; }; -#endif /* __ASSEMBLY__ */ - -/* Page Zero constant offsets used by the HPMC handler */ - -#define BOOT_CONSOLE_HPA_OFFSET 0x3c0 -#define BOOT_CONSOLE_SPA_OFFSET 0x3c4 -#define BOOT_CONSOLE_PATH_OFFSET 0x3a8 - -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ -void pdc_console_init(void); /* in pdc_console.c */ -void pdc_console_restart(void); - -void setup_pdc(void); /* in inventory.c */ - -/* wrapper-functions from pdc.c */ - -int pdc_add_valid(unsigned long address); -int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); -int pdc_chassis_disp(unsigned long disp); -int pdc_chassis_warn(unsigned long *warn); -int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); -int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, - void *iodc_data, unsigned int iodc_data_size); -int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info, - struct pdc_module_path *mod_path, long mod_index); -int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info, - long mod_index, long addr_index); -int pdc_model_info(struct pdc_model *model); -int pdc_model_sysmodel(char *name); -int pdc_model_cpuid(unsigned long *cpu_id); -int pdc_model_versions(unsigned long *versions, int id); -int pdc_model_capabilities(unsigned long *capabilities); -int pdc_cache_info(struct pdc_cache_info *cache); -int pdc_spaceid_bits(unsigned long *space_bits); -#ifndef CONFIG_PA20 -int pdc_btlb_info(struct pdc_btlb_info *btlb); -int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); -#endif /* !CONFIG_PA20 */ -int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa); - -int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count); -int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count); -int pdc_stable_get_size(unsigned long *size); -int pdc_stable_verify_contents(void); -int pdc_stable_initialize(void); - -int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa); -int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl); - -int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *); -int pdc_tod_read(struct pdc_tod *tod); -int pdc_tod_set(unsigned long sec, unsigned long usec); - -#ifdef CONFIG_64BIT -int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, - struct pdc_memory_table *tbl, unsigned long entries); -#endif - -void set_firmware_width(void); -int pdc_do_firm_test_reset(unsigned long ftc_bitmap); -int pdc_do_reset(void); -int pdc_soft_power_info(unsigned long *power_reg); -int pdc_soft_power_button(int sw_control); -void pdc_io_reset(void); -void pdc_io_reset_devices(void); -int pdc_iodc_getc(void); -void pdc_iodc_putc(unsigned char c); -void pdc_iodc_outc(unsigned char c); -void pdc_printf(const char *fmt, ...); - -void pdc_emergency_unlock(void); -int pdc_sti_call(unsigned long func, unsigned long flags, - unsigned long inptr, unsigned long outputr, - unsigned long glob_cfg); - -static inline char * os_id_to_string(u16 os_id) { - switch(os_id) { - case OS_ID_NONE: return "No OS"; - case OS_ID_HPUX: return "HP-UX"; - case OS_ID_MPEXL: return "MPE-iX"; - case OS_ID_OSF: return "OSF"; - case OS_ID_HPRT: return "HP-RT"; - case OS_ID_NOVEL: return "Novell Netware"; - case OS_ID_LINUX: return "Linux"; - default: return "Unknown"; - } -} -# endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ +#endif /* !defined(__ASSEMBLY__) */ #endif /* _PARISC_PDC_H */ -- cgit v1.2.3 From f13cec8447f18cca3a0feb4b83b7ba6fae9e59ae Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 16 Oct 2007 14:24:59 -0700 Subject: [PARISC] parisc: "extern inline" -> "static inline" "extern inline" will have different semantics with gcc 4.3, and "static inline" is correct here. Signed-off-by: Adrian Bunk Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Kyle McMartin --- arch/parisc/lib/memcpy.c | 4 ++-- include/asm-parisc/io.h | 2 +- include/asm-parisc/pci.h | 2 +- include/asm-parisc/pgtable.h | 32 ++++++++++++++++---------------- include/asm-parisc/prefetch.h | 4 ++-- include/asm-parisc/semaphore.h | 10 +++++----- include/asm-parisc/tlbflush.h | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) (limited to 'include/asm-parisc') diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index 2c43ebe99a9c..d22042d33100 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c @@ -139,12 +139,12 @@ DECLARE_PER_CPU(struct exception_data, exception_data); #define stw(_s,_t,_o,_a,_e) def_store_insn(stw,"r",_s,_t,_o,_a,_e) #ifdef CONFIG_PREFETCH -extern inline void prefetch_src(const void *addr) +static inline void prefetch_src(const void *addr) { __asm__("ldw 0(" s_space ",%0), %%r0" : : "r" (addr)); } -extern inline void prefetch_dst(const void *addr) +static inline void prefetch_dst(const void *addr) { __asm__("ldd 0(" d_space ",%0), %%r0" : : "r" (addr)); } diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 95f00e11c7b4..55ddb1842107 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -138,7 +138,7 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign /* Most machines react poorly to I/O-space being cacheable... Instead let's * define ioremap() in terms of ioremap_nocache(). */ -extern inline void __iomem * ioremap(unsigned long offset, unsigned long size) +static inline void __iomem * ioremap(unsigned long offset, unsigned long size) { return __ioremap(offset, size, _PAGE_NO_CACHE); } diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index 61fbd57a8323..4ba868f44a5e 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h @@ -207,7 +207,7 @@ extern struct pci_bios_ops *pci_bios; extern void pcibios_register_hba(struct pci_hba_data *); extern void pcibios_set_master(struct pci_dev *); #else -extern inline void pcibios_register_hba(struct pci_hba_data *x) +static inline void pcibios_register_hba(struct pci_hba_data *x) { } #endif diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index e88cacd63724..33ed0e73227b 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -325,27 +325,27 @@ static inline void pgd_clear(pgd_t *pgd) { * setup: the pgd is never bad, and a pmd always exists (as it's folded * into the pgd entry) */ -extern inline int pgd_none(pgd_t pgd) { return 0; } -extern inline int pgd_bad(pgd_t pgd) { return 0; } -extern inline int pgd_present(pgd_t pgd) { return 1; } -extern inline void pgd_clear(pgd_t * pgdp) { } +static inline int pgd_none(pgd_t pgd) { return 0; } +static inline int pgd_bad(pgd_t pgd) { return 0; } +static inline int pgd_present(pgd_t pgd) { return 1; } +static inline void pgd_clear(pgd_t * pgdp) { } #endif /* * The following only work if pte_present() is true. * Undefined behaviour if not.. */ -extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } -extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } -extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } -extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } - -extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } -extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } -extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; } -extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } -extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } -extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; } +static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } +static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } +static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } +static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } + +static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } +static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } +static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; } +static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } +static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } +static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; } /* * Conversion functions: convert a page and protection to a page entry, @@ -369,7 +369,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) return pte; } -extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) +static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } /* Permanent address of a page. On parisc we don't have highmem. */ diff --git a/include/asm-parisc/prefetch.h b/include/asm-parisc/prefetch.h index 5d021726fa33..c5edc60c059f 100644 --- a/include/asm-parisc/prefetch.h +++ b/include/asm-parisc/prefetch.h @@ -19,7 +19,7 @@ #ifdef CONFIG_PREFETCH #define ARCH_HAS_PREFETCH -extern inline void prefetch(const void *addr) +static inline void prefetch(const void *addr) { __asm__("ldw 0(%0), %%r0" : : "r" (addr)); } @@ -27,7 +27,7 @@ extern inline void prefetch(const void *addr) /* LDD is a PA2.0 addition. */ #ifdef CONFIG_PA20 #define ARCH_HAS_PREFETCHW -extern inline void prefetchw(const void *addr) +static inline void prefetchw(const void *addr) { __asm__("ldd 0(%0), %%r0" : : "r" (addr)); } diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index b771dcfcfdd1..a16271cdc748 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h @@ -54,7 +54,7 @@ struct semaphore { #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -extern inline void sema_init (struct semaphore *sem, int val) +static inline void sema_init (struct semaphore *sem, int val) { *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); } @@ -82,7 +82,7 @@ asmlinkage void __up(struct semaphore * sem); * interrupts while we're messing with the semaphore. Sorry. */ -extern __inline__ void down(struct semaphore * sem) +static inline void down(struct semaphore * sem) { might_sleep(); spin_lock_irq(&sem->sentry); @@ -94,7 +94,7 @@ extern __inline__ void down(struct semaphore * sem) spin_unlock_irq(&sem->sentry); } -extern __inline__ int down_interruptible(struct semaphore * sem) +static inline int down_interruptible(struct semaphore * sem) { int ret = 0; might_sleep(); @@ -112,7 +112,7 @@ extern __inline__ int down_interruptible(struct semaphore * sem) * down_trylock returns 0 on success, 1 if we failed to get the lock. * May not sleep, but must preserve irq state */ -extern __inline__ int down_trylock(struct semaphore * sem) +static inline int down_trylock(struct semaphore * sem) { unsigned long flags; int count; @@ -129,7 +129,7 @@ extern __inline__ int down_trylock(struct semaphore * sem) * Note! This is subtle. We jump to wake people up only if * the semaphore was negative (== somebody was waiting on it). */ -extern __inline__ void up(struct semaphore * sem) +static inline void up(struct semaphore * sem) { unsigned long flags; diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index 270cf309772b..7758ee3832af 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h @@ -57,7 +57,7 @@ static inline void flush_tlb_mm(struct mm_struct *mm) #endif } -extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) +static inline void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) { } -- cgit v1.2.3 From 1c593571093ae0f259d3bd7a66988a7a8eb5c7bc Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Thu, 18 Oct 2007 00:04:34 -0700 Subject: [PARISC] Kill off ASM_PAGE_SIZE use We have the macro _AC() generally available now so the calculation of PAGE_SIZE can be made assembler compatible. Introduce use of _AC() and kill all users of ASM_PAGE_SIZE. Signed-off-by: Sam Ravnborg Signed-off-by: Kyle McMartin --- arch/parisc/kernel/asm-offsets.c | 1 - arch/parisc/kernel/syscall.S | 11 ++++++----- arch/parisc/kernel/vmlinux.lds.S | 14 +++++++------- include/asm-parisc/page.h | 4 +++- 4 files changed, 16 insertions(+), 14 deletions(-) (limited to 'include/asm-parisc') diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c index d3b7917a87cb..8c2bcdbd494a 100644 --- a/arch/parisc/kernel/asm-offsets.c +++ b/arch/parisc/kernel/asm-offsets.c @@ -290,7 +290,6 @@ int main(void) DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE); DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT); DEFINE(ASM_PT_INITIAL, PT_INITIAL); - DEFINE(ASM_PAGE_SIZE, PAGE_SIZE); DEFINE(ASM_PAGE_SIZE_DIV64, PAGE_SIZE/64); DEFINE(ASM_PAGE_SIZE_DIV128, PAGE_SIZE/128); BLANK(); diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 56f6231cb863..06cde9e700e9 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,7 @@ * pointers. */ - .align ASM_PAGE_SIZE + .align PAGE_SIZE ENTRY(linux_gateway_page) /* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */ @@ -597,7 +598,7 @@ cas_action: /* Make sure nothing else is placed on this page */ - .align ASM_PAGE_SIZE + .align PAGE_SIZE END(linux_gateway_page) ENTRY(end_linux_gateway_page) @@ -608,7 +609,7 @@ ENTRY(end_linux_gateway_page) .section .rodata,"a" - .align ASM_PAGE_SIZE + .align PAGE_SIZE /* Light-weight-syscall table */ /* Start of lws table. */ ENTRY(lws_table) @@ -617,13 +618,13 @@ ENTRY(lws_table) END(lws_table) /* End of lws table */ - .align ASM_PAGE_SIZE + .align PAGE_SIZE ENTRY(sys_call_table) #include "syscall_table.S" END(sys_call_table) #ifdef CONFIG_64BIT - .align ASM_PAGE_SIZE + .align PAGE_SIZE ENTRY(sys_call_table64) #define SYSCALL_TABLE_64BIT #include "syscall_table.S" diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index d6951bb5a9c9..d6dbcbcdcc2e 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -73,7 +73,7 @@ SECTIONS * that we can properly leave these * as writable */ - . = ALIGN(ASM_PAGE_SIZE); + . = ALIGN(PAGE_SIZE); data_start = .; . = ALIGN(16); /* Exception table */ @@ -119,12 +119,12 @@ SECTIONS /* nosave data is really only used for software suspend...it's here * just in case we ever implement it */ - . = ALIGN(ASM_PAGE_SIZE); + . = ALIGN(PAGE_SIZE); __nosave_begin = .; .data_nosave : { *(.data.nosave) } - . = ALIGN(ASM_PAGE_SIZE); + . = ALIGN(PAGE_SIZE); __nosave_end = .; /* End of data section */ @@ -133,7 +133,7 @@ SECTIONS /* BSS */ __bss_start = .; /* page table entries need to be PAGE_SIZE aligned */ - . = ALIGN(ASM_PAGE_SIZE); + . = ALIGN(PAGE_SIZE); .data.vmpages : { *(.data.vm0.pmd) *(.data.vm0.pgd) @@ -229,7 +229,7 @@ SECTIONS *(.exit.data) } #ifdef CONFIG_BLK_DEV_INITRD - . = ALIGN(ASM_PAGE_SIZE); + . = ALIGN(PAGE_SIZE); .init.ramfs : { __initramfs_start = .; *(.init.ramfs) @@ -237,8 +237,8 @@ SECTIONS } #endif - PERCPU(ASM_PAGE_SIZE) - . = ALIGN(ASM_PAGE_SIZE); + PERCPU(PAGE_SIZE) + . = ALIGN(PAGE_SIZE); __init_end = .; /* freed after init ends here */ _end = . ; diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index f6bba4c13664..b59a1504fc7a 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h @@ -3,6 +3,8 @@ #ifdef __KERNEL__ +#include + #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) # define PAGE_SHIFT 12 #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) @@ -12,7 +14,7 @@ #else # error "unknown default kernel page size" #endif -#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) -- cgit v1.2.3 From 6cc4525d29e22ab831387b6fac371e0118693a25 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 18 Oct 2007 00:04:56 -0700 Subject: [PARISC] Kill off broken irqstack code It's been unfinished and broken long enough, and I have some ideas on how to do it more cleanly. Signed-off-by: Kyle McMartin --- arch/parisc/kernel/entry.S | 37 +++---------------------------------- arch/parisc/kernel/head.S | 4 ---- arch/parisc/kernel/init_task.c | 1 - arch/parisc/kernel/smp.c | 12 ------------ arch/parisc/kernel/vmlinux.lds.S | 8 -------- include/asm-parisc/pgtable.h | 8 -------- 6 files changed, 3 insertions(+), 67 deletions(-) (limited to 'include/asm-parisc') diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index f324939bb9af..111d47284eac 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -98,7 +98,6 @@ * The "get_stack" macros are responsible for determining the * kernel stack value. * - * For Faults: * If sr7 == 0 * Already using a kernel stack, so call the * get_stack_use_r30 macro to push a pt_regs structure @@ -110,26 +109,6 @@ * task pointer pointed to by cr30. Set the stack * pointer to point to the end of the task structure. * - * For Interrupts: - * If sr7 == 0 - * Already using a kernel stack, check to see if r30 - * is already pointing to the per processor interrupt - * stack. If it is, call the get_stack_use_r30 macro - * to push a pt_regs structure on the stack, and store - * registers there. Otherwise, call get_stack_use_cr31 - * to get a pointer to the base of the interrupt stack - * and push a pt_regs structure on that stack. - * else - * Need to set up a kernel stack, so call the - * get_stack_use_cr30 macro to set up a pointer - * to the pt_regs structure contained within the - * task pointer pointed to by cr30. Set the stack - * pointer to point to the end of the task structure. - * N.B: We don't use the interrupt stack for the - * first interrupt from userland, because signals/ - * resched's are processed when returning to userland, - * and we can sleep in those cases. - * * Note that we use shadowed registers for temps until * we can save %r26 and %r29. %r26 is used to preserve * %r8 (a shadowed register) which temporarily contained @@ -1086,23 +1065,13 @@ intr_do_preempt: intr_extint: CMPIB=,n 0,%r16,1f + get_stack_use_cr30 - b,n 3f + b,n 2f 1: -#if 0 /* Interrupt Stack support not working yet! */ - mfctl %cr31,%r1 - copy %r30,%r17 - /* FIXME! depi below has hardcoded idea of interrupt stack size (32k)*/ - DEPI 0,31,15,%r17 - CMPB=,n %r1,%r17,2f - get_stack_use_cr31 - b,n 3f -#endif -2: get_stack_use_r30 - -3: +2: save_specials %r29 virt_map save_general %r29 diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 369919d828fb..a7b8859488bb 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -128,10 +128,6 @@ $pgt_fill_loop: /* And the stack pointer too */ ldo THREAD_SZ_ALGN(%r6),%sp - /* And the interrupt stack */ - load32 interrupt_stack,%r6 - mtctl %r6,%cr31 - #ifdef CONFIG_SMP /* Set the smp rendevous address into page zero. ** It would be safer to do this in init_smp_config() but diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c index 3b2f7d395bde..26198a074d67 100644 --- a/arch/parisc/kernel/init_task.c +++ b/arch/parisc/kernel/init_task.c @@ -49,7 +49,6 @@ EXPORT_SYMBOL(init_mm); * way process stacks are handled. This is done by having a special * "init_task" linker map entry.. */ -unsigned char interrupt_stack[ISTACK_SIZE] __attribute__ ((section("init_istack"), aligned(PAGE_SIZE))); union thread_union init_thread_union __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = { INIT_THREAD_INFO(init_task) }; diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index d7bc7bb42c94..85fc7754ec25 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -432,22 +432,10 @@ smp_cpu_init(int cpunum) void __init smp_callin(void) { int slave_id = cpu_now_booting; -#if 0 - void *istack; -#endif smp_cpu_init(slave_id); preempt_disable(); -#if 0 /* NOT WORKING YET - see entry.S */ - istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER); - if (istack == NULL) { - printk(KERN_CRIT "Failed to allocate interrupt stack for cpu %d\n",slave_id); - BUG(); - } - mtctl(istack,31); -#endif - flush_cache_all_local(); /* start with known state */ flush_tlb_all_local(NULL); diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index d6dbcbcdcc2e..40d0ff9b81ab 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -153,14 +153,6 @@ SECTIONS *(.data.init_task) } - /* The interrupt stack is currently partially coded, but not yet - * implemented - */ - . = ALIGN(16384); - init_istack : { - *(init_istack) - } - #ifdef CONFIG_64BIT . = ALIGN(16); /* Linkage tables */ diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 33ed0e73227b..b5a8797dcc5c 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -49,14 +49,6 @@ #define pgd_ERROR(e) \ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) - /* Note: If you change ISTACK_SIZE, you need to change the corresponding - * values in vmlinux.lds and vmlinux64.lds (init_istack section). Also, - * the "order" and size need to agree. - */ - -#define ISTACK_SIZE 32768 /* Interrupt Stack Size */ -#define ISTACK_ORDER 3 - /* This is the size of the initially mapped kernel memory */ #ifdef CONFIG_64BIT #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ -- cgit v1.2.3 From 7210c678202bb3107085bffeb63f66a9b8ba1c85 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sat, 20 Oct 2007 13:23:00 -0700 Subject: [PARISC] fix uninitialized variable warning in asm/rtc.h get_rtc_time, in the case that PDC returns that the battery is bad, returns an unmodified rtc_time arg to the caller, which then uses uninitialized values. Fix this by memset-ing the arg with zeroes, so it will at least be cleared if we return failure. Spotted by John David Anglin. Signed-off-by: Kyle McMartin --- include/asm-parisc/rtc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-parisc') diff --git a/include/asm-parisc/rtc.h b/include/asm-parisc/rtc.h index f4ebff11dcbd..099d641a42c2 100644 --- a/include/asm-parisc/rtc.h +++ b/include/asm-parisc/rtc.h @@ -50,10 +50,10 @@ static inline unsigned int get_rtc_time(struct rtc_time *wtime) long int days, rem, y; const unsigned short int *ip; - if(pdc_tod_read(&tod_data) < 0) + memset(wtime, 0, sizeof(*wtime)); + if (pdc_tod_read(&tod_data) < 0) return RTC_24H | RTC_BATT_BAD; - // most of the remainder of this function is: // Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc. // This was originally a part of the GNU C Library. -- cgit v1.2.3