aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-20 23:19:15 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-20 23:19:15 -0400
commitcfa76f024f7c9e65169425804e5b32e71f66d0ee (patch)
treeee64e98cbfb1b654842c9256446a9584857f6730 /include/asm-parisc
parent093faa1dd26fc6766f8f04c429030757a8a0def4 (diff)
parent7210c678202bb3107085bffeb63f66a9b8ba1c85 (diff)
Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits) [PARISC] fix uninitialized variable warning in asm/rtc.h [PARISC] Port checkstack.pl to parisc [PARISC] Make palo target work when $obj != $src [PARISC] Zap unused variable warnings in pci.c [PARISC] Fix tests in palo target [PARISC] Fix palo target [PARISC] Restore palo target [PARISC] Attempt to clean up parisc/Makefile [PARISC] Fix infinite loop in /proc/iomem [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable [PARISC] Squelch pci_enable_device __must_check warning in superio [PARISC] Kill off broken irqstack code [PARISC] Remove hardcoded uses of PAGE_SIZE [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE [PARISC] Kill off ASM_PAGE_SIZE use [PARISC] Beautify parisc vmlinux.lds.S [PARISC] Clean up a resource_size_t warning in sba_iommu [PARISC] Kill incorrect cast warning in unwinder [PARISC] Kill zone_to_nid printk warning ... Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
Diffstat (limited to 'include/asm-parisc')
-rw-r--r--include/asm-parisc/Kbuild2
-rw-r--r--include/asm-parisc/io.h2
-rw-r--r--include/asm-parisc/page.h4
-rw-r--r--include/asm-parisc/pci.h2
-rw-r--r--include/asm-parisc/pdc.h308
-rw-r--r--include/asm-parisc/pgtable.h40
-rw-r--r--include/asm-parisc/prefetch.h4
-rw-r--r--include/asm-parisc/rtc.h4
-rw-r--r--include/asm-parisc/semaphore.h10
-rw-r--r--include/asm-parisc/unistd.h3
10 files changed, 172 insertions, 207 deletions
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 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2
3unifdef-y += pdc.h
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
138/* Most machines react poorly to I/O-space being cacheable... Instead let's 138/* Most machines react poorly to I/O-space being cacheable... Instead let's
139 * define ioremap() in terms of ioremap_nocache(). 139 * define ioremap() in terms of ioremap_nocache().
140 */ 140 */
141extern inline void __iomem * ioremap(unsigned long offset, unsigned long size) 141static inline void __iomem * ioremap(unsigned long offset, unsigned long size)
142{ 142{
143 return __ioremap(offset, size, _PAGE_NO_CACHE); 143 return __ioremap(offset, size, _PAGE_NO_CACHE);
144} 144}
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 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/const.h>
7
6#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) 8#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
7# define PAGE_SHIFT 12 9# define PAGE_SHIFT 12
8#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) 10#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
@@ -12,7 +14,7 @@
12#else 14#else
13# error "unknown default kernel page size" 15# error "unknown default kernel page size"
14#endif 16#endif
15#define PAGE_SIZE (1UL << PAGE_SHIFT) 17#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
16#define PAGE_MASK (~(PAGE_SIZE-1)) 18#define PAGE_MASK (~(PAGE_SIZE-1))
17 19
18 20
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;
207extern void pcibios_register_hba(struct pci_hba_data *); 207extern void pcibios_register_hba(struct pci_hba_data *);
208extern void pcibios_set_master(struct pci_dev *); 208extern void pcibios_set_master(struct pci_dev *);
209#else 209#else
210extern inline void pcibios_register_hba(struct pci_hba_data *x) 210static inline void pcibios_register_hba(struct pci_hba_data *x)
211{ 211{
212} 212}
213#endif 213#endif
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 876fd8116d4a..5e0c3ca5450b 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -1,7 +1,6 @@
1#ifndef _PARISC_PDC_H 1#ifndef _PARISC_PDC_H
2#define _PARISC_PDC_H 2#define _PARISC_PDC_H
3 3
4
5/* 4/*
6 * PDC return values ... 5 * PDC return values ...
7 * All PDC calls return a subset of these errors. 6 * All PDC calls return a subset of these errors.
@@ -20,7 +19,6 @@
20#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */ 19#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */
21#define PDC_NOT_NARROW -17 /* Narrow mode not supported */ 20#define PDC_NOT_NARROW -17 /* Narrow mode not supported */
22 21
23
24/* 22/*
25 * PDC entry points... 23 * PDC entry points...
26 */ 24 */
@@ -50,6 +48,12 @@
50#define PDC_MODEL_DISPEC 5 /* disable specific option */ 48#define PDC_MODEL_DISPEC 5 /* disable specific option */
51#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ 49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
52#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ 50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */
51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
52#define PDC_MODEL_IOPDIR_FDC (1 << 2)
53#define PDC_MODEL_NVA_MASK (3 << 4)
54#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
55#define PDC_MODEL_NVA_SLOW (1 << 4)
56#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4)
53#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */ 57#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */
54#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */ 58#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */
55 59
@@ -91,7 +95,7 @@
91#define PDC_TOD 9 /* time-of-day clock (TOD) */ 95#define PDC_TOD 9 /* time-of-day clock (TOD) */
92#define PDC_TOD_READ 0 /* read TOD */ 96#define PDC_TOD_READ 0 /* read TOD */
93#define PDC_TOD_WRITE 1 /* write TOD */ 97#define PDC_TOD_WRITE 1 /* write TOD */
94#define PDC_TOD_ITIMER 2 /* calibrate Interval Timer (CR16) */ 98
95 99
96#define PDC_STABLE 10 /* stable storage (sprockets) */ 100#define PDC_STABLE 10 /* stable storage (sprockets) */
97#define PDC_STABLE_READ 0 101#define PDC_STABLE_READ 0
@@ -143,15 +147,6 @@
143#define PDC_MEM_RET_PDT_FULL -11 147#define PDC_MEM_RET_PDT_FULL -11
144#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL 148#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL
145 149
146#ifndef __ASSEMBLY__
147typedef struct {
148 unsigned long long baseAddr;
149 unsigned int pages;
150 unsigned int reserved;
151} MemAddrTable_t;
152#endif
153
154
155#define PDC_PSW 21 /* Get/Set default System Mask */ 150#define PDC_PSW 21 /* Get/Set default System Mask */
156#define PDC_PSW_MASK 0 /* Return mask */ 151#define PDC_PSW_MASK 0 /* Return mask */
157#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */ 152#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */
@@ -274,6 +269,43 @@ typedef struct {
274#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */ 269#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */
275#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */ 270#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */
276 271
272/* cl_class
273 * page 3-33 of IO-Firmware ARS
274 * IODC ENTRY_INIT(Search first) RET[1]
275 */
276#define CL_NULL 0 /* invalid */
277#define CL_RANDOM 1 /* random access (as disk) */
278#define CL_SEQU 2 /* sequential access (as tape) */
279#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */
280#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */
281#define CL_DISPL 9 /* half-duplex console (display) */
282#define CL_FC 10 /* FiberChannel access media */
283
284/* IODC ENTRY_INIT() */
285#define ENTRY_INIT_SRCH_FRST 2
286#define ENTRY_INIT_SRCH_NEXT 3
287#define ENTRY_INIT_MOD_DEV 4
288#define ENTRY_INIT_DEV 5
289#define ENTRY_INIT_MOD 6
290#define ENTRY_INIT_MSG 9
291
292/* IODC ENTRY_IO() */
293#define ENTRY_IO_BOOTIN 0
294#define ENTRY_IO_BOOTOUT 1
295#define ENTRY_IO_CIN 2
296#define ENTRY_IO_COUT 3
297#define ENTRY_IO_CLOSE 4
298#define ENTRY_IO_GETMSG 9
299#define ENTRY_IO_BBLOCK_IN 16
300#define ENTRY_IO_BBLOCK_OUT 17
301
302/* IODC ENTRY_SPA() */
303
304/* IODC ENTRY_CONFIG() */
305
306/* IODC ENTRY_TEST() */
307
308/* IODC ENTRY_TLB() */
277 309
278/* constants for OS (NVM...) */ 310/* constants for OS (NVM...) */
279#define OS_ID_NONE 0 /* Undefined OS ID */ 311#define OS_ID_NONE 0 /* Undefined OS ID */
@@ -295,7 +327,13 @@ typedef struct {
295#define OSTAT_RUN 6 327#define OSTAT_RUN 6
296#define OSTAT_ON 7 328#define OSTAT_ON 7
297 329
298#ifndef __ASSEMBLY__ 330/* Page Zero constant offsets used by the HPMC handler */
331#define BOOT_CONSOLE_HPA_OFFSET 0x3c0
332#define BOOT_CONSOLE_SPA_OFFSET 0x3c4
333#define BOOT_CONSOLE_PATH_OFFSET 0x3a8
334
335#if !defined(__ASSEMBLY__)
336#ifdef __KERNEL__
299 337
300#include <linux/types.h> 338#include <linux/types.h>
301 339
@@ -331,14 +369,6 @@ struct pdc_model { /* for PDC_MODEL */
331 unsigned long curr_key; 369 unsigned long curr_key;
332}; 370};
333 371
334/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
335
336#define PDC_MODEL_IOPDIR_FDC (1 << 2) /* see sba_iommu.c */
337#define PDC_MODEL_NVA_MASK (3 << 4)
338#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
339#define PDC_MODEL_NVA_SLOW (1 << 4)
340#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4)
341
342struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ 372struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */
343 unsigned long 373 unsigned long
344#ifdef CONFIG_64BIT 374#ifdef CONFIG_64BIT
@@ -558,15 +588,97 @@ struct pdc_hpmc_pim_20 { /* PDC_PIM */
558 __u64 fr[32]; 588 __u64 fr[32];
559}; 589};
560 590
561#endif /* __ASSEMBLY__ */ 591void pdc_console_init(void); /* in pdc_console.c */
592void pdc_console_restart(void);
593
594void setup_pdc(void); /* in inventory.c */
595
596/* wrapper-functions from pdc.c */
597
598int pdc_add_valid(unsigned long address);
599int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
600int pdc_chassis_disp(unsigned long disp);
601int pdc_chassis_warn(unsigned long *warn);
602int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
603int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
604 void *iodc_data, unsigned int iodc_data_size);
605int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
606 struct pdc_module_path *mod_path, long mod_index);
607int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
608 long mod_index, long addr_index);
609int pdc_model_info(struct pdc_model *model);
610int pdc_model_sysmodel(char *name);
611int pdc_model_cpuid(unsigned long *cpu_id);
612int pdc_model_versions(unsigned long *versions, int id);
613int pdc_model_capabilities(unsigned long *capabilities);
614int pdc_cache_info(struct pdc_cache_info *cache);
615int pdc_spaceid_bits(unsigned long *space_bits);
616#ifndef CONFIG_PA20
617int pdc_btlb_info(struct pdc_btlb_info *btlb);
618int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
619#endif /* !CONFIG_PA20 */
620int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
621
622int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count);
623int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count);
624int pdc_stable_get_size(unsigned long *size);
625int pdc_stable_verify_contents(void);
626int pdc_stable_initialize(void);
627
628int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa);
629int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl);
630
631int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *);
632int pdc_tod_read(struct pdc_tod *tod);
633int pdc_tod_set(unsigned long sec, unsigned long usec);
634
635#ifdef CONFIG_64BIT
636int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
637 struct pdc_memory_table *tbl, unsigned long entries);
638#endif
639
640void set_firmware_width(void);
641int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
642int pdc_do_reset(void);
643int pdc_soft_power_info(unsigned long *power_reg);
644int pdc_soft_power_button(int sw_control);
645void pdc_io_reset(void);
646void pdc_io_reset_devices(void);
647int pdc_iodc_getc(void);
648void pdc_iodc_putc(unsigned char c);
649void pdc_iodc_outc(unsigned char c);
650void pdc_printf(const char *fmt, ...);
651
652void pdc_emergency_unlock(void);
653int pdc_sti_call(unsigned long func, unsigned long flags,
654 unsigned long inptr, unsigned long outputr,
655 unsigned long glob_cfg);
656
657static inline char * os_id_to_string(u16 os_id) {
658 switch(os_id) {
659 case OS_ID_NONE: return "No OS";
660 case OS_ID_HPUX: return "HP-UX";
661 case OS_ID_MPEXL: return "MPE-iX";
662 case OS_ID_OSF: return "OSF";
663 case OS_ID_HPRT: return "HP-RT";
664 case OS_ID_NOVEL: return "Novell Netware";
665 case OS_ID_LINUX: return "Linux";
666 default: return "Unknown";
667 }
668}
669
670#endif /* __KERNEL__ */
671
672#define PAGE0 ((struct zeropage *)__PAGE_OFFSET)
673
674/* DEFINITION OF THE ZERO-PAGE (PAG0) */
675/* based on work by Jason Eckhardt (jason@equator.com) */
562 676
563/* flags of the device_path (see below) */ 677/* flags of the device_path */
564#define PF_AUTOBOOT 0x80 678#define PF_AUTOBOOT 0x80
565#define PF_AUTOSEARCH 0x40 679#define PF_AUTOSEARCH 0x40
566#define PF_TIMER 0x0F 680#define PF_TIMER 0x0F
567 681
568#ifndef __ASSEMBLY__
569
570struct device_path { /* page 1-69 */ 682struct device_path { /* page 1-69 */
571 unsigned char flags; /* flags see above! */ 683 unsigned char flags; /* flags see above! */
572 unsigned char bc[6]; /* bus converter routing info */ 684 unsigned char bc[6]; /* bus converter routing info */
@@ -586,63 +698,6 @@ struct pz_device {
586 unsigned short cl_class;/* see below */ 698 unsigned short cl_class;/* see below */
587} __attribute__((aligned(8))) ; 699} __attribute__((aligned(8))) ;
588 700
589#endif /* __ASSEMBLY__ */
590
591/* cl_class
592 * page 3-33 of IO-Firmware ARS
593 * IODC ENTRY_INIT(Search first) RET[1]
594 */
595#define CL_NULL 0 /* invalid */
596#define CL_RANDOM 1 /* random access (as disk) */
597#define CL_SEQU 2 /* sequential access (as tape) */
598#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */
599#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */
600#define CL_DISPL 9 /* half-duplex console (display) */
601#define CL_FC 10 /* FiberChannel access media */
602
603#if 0
604/* FIXME: DEVCLASS_* duplicates CL_* (above). Delete DEVCLASS_*? */
605#define DEVCLASS_RANDOM 1
606#define DEVCLASS_SEQU 2
607#define DEVCLASS_DUPLEX 7
608#define DEVCLASS_KEYBD 8
609#define DEVCLASS_DISP 9
610#endif
611
612/* IODC ENTRY_INIT() */
613#define ENTRY_INIT_SRCH_FRST 2
614#define ENTRY_INIT_SRCH_NEXT 3
615#define ENTRY_INIT_MOD_DEV 4
616#define ENTRY_INIT_DEV 5
617#define ENTRY_INIT_MOD 6
618#define ENTRY_INIT_MSG 9
619
620/* IODC ENTRY_IO() */
621#define ENTRY_IO_BOOTIN 0
622#define ENTRY_IO_BOOTOUT 1
623#define ENTRY_IO_CIN 2
624#define ENTRY_IO_COUT 3
625#define ENTRY_IO_CLOSE 4
626#define ENTRY_IO_GETMSG 9
627#define ENTRY_IO_BBLOCK_IN 16
628#define ENTRY_IO_BBLOCK_OUT 17
629
630/* IODC ENTRY_SPA() */
631
632/* IODC ENTRY_CONFIG() */
633
634/* IODC ENTRY_TEST() */
635
636/* IODC ENTRY_TLB() */
637
638
639/* DEFINITION OF THE ZERO-PAGE (PAG0) */
640/* based on work by Jason Eckhardt (jason@equator.com) */
641
642#ifndef __ASSEMBLY__
643
644#define PAGE0 ((struct zeropage *)__PAGE_OFFSET)
645
646struct zeropage { 701struct zeropage {
647 /* [0x000] initialize vectors (VEC) */ 702 /* [0x000] initialize vectors (VEC) */
648 unsigned int vec_special; /* must be zero */ 703 unsigned int vec_special; /* must be zero */
@@ -699,93 +754,6 @@ struct zeropage {
699 __u32 pad608[126]; 754 __u32 pad608[126];
700}; 755};
701 756
702#endif /* __ASSEMBLY__ */ 757#endif /* !defined(__ASSEMBLY__) */
703
704/* Page Zero constant offsets used by the HPMC handler */
705
706#define BOOT_CONSOLE_HPA_OFFSET 0x3c0
707#define BOOT_CONSOLE_SPA_OFFSET 0x3c4
708#define BOOT_CONSOLE_PATH_OFFSET 0x3a8
709
710#ifndef __ASSEMBLY__
711void pdc_console_init(void); /* in pdc_console.c */
712void pdc_console_restart(void);
713
714void setup_pdc(void); /* in inventory.c */
715
716/* wrapper-functions from pdc.c */
717
718int pdc_add_valid(unsigned long address);
719int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
720int pdc_chassis_disp(unsigned long disp);
721int pdc_chassis_warn(unsigned long *warn);
722int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
723int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
724 void *iodc_data, unsigned int iodc_data_size);
725int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
726 struct pdc_module_path *mod_path, long mod_index);
727int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
728 long mod_index, long addr_index);
729int pdc_model_info(struct pdc_model *model);
730int pdc_model_sysmodel(char *name);
731int pdc_model_cpuid(unsigned long *cpu_id);
732int pdc_model_versions(unsigned long *versions, int id);
733int pdc_model_capabilities(unsigned long *capabilities);
734int pdc_cache_info(struct pdc_cache_info *cache);
735int pdc_spaceid_bits(unsigned long *space_bits);
736#ifndef CONFIG_PA20
737int pdc_btlb_info(struct pdc_btlb_info *btlb);
738int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
739#endif /* !CONFIG_PA20 */
740int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
741
742int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count);
743int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count);
744int pdc_stable_get_size(unsigned long *size);
745int pdc_stable_verify_contents(void);
746int pdc_stable_initialize(void);
747
748int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa);
749int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl);
750
751int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *);
752int pdc_tod_read(struct pdc_tod *tod);
753int pdc_tod_set(unsigned long sec, unsigned long usec);
754
755#ifdef CONFIG_64BIT
756int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
757 struct pdc_memory_table *tbl, unsigned long entries);
758#endif
759
760void set_firmware_width(void);
761int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
762int pdc_do_reset(void);
763int pdc_soft_power_info(unsigned long *power_reg);
764int pdc_soft_power_button(int sw_control);
765void pdc_io_reset(void);
766void pdc_io_reset_devices(void);
767int pdc_iodc_getc(void);
768void pdc_iodc_putc(unsigned char c);
769void pdc_iodc_outc(unsigned char c);
770void pdc_printf(const char *fmt, ...);
771
772void pdc_emergency_unlock(void);
773int pdc_sti_call(unsigned long func, unsigned long flags,
774 unsigned long inptr, unsigned long outputr,
775 unsigned long glob_cfg);
776
777static inline char * os_id_to_string(u16 os_id) {
778 switch(os_id) {
779 case OS_ID_NONE: return "No OS";
780 case OS_ID_HPUX: return "HP-UX";
781 case OS_ID_MPEXL: return "MPE-iX";
782 case OS_ID_OSF: return "OSF";
783 case OS_ID_HPRT: return "HP-RT";
784 case OS_ID_NOVEL: return "Novell Netware";
785 case OS_ID_LINUX: return "Linux";
786 default: return "Unknown";
787 }
788}
789#endif /* __ASSEMBLY__ */
790 758
791#endif /* _PARISC_PDC_H */ 759#endif /* _PARISC_PDC_H */
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
index 9ab79c8e5a41..cd0fa4f73320 100644
--- a/include/asm-parisc/pgtable.h
+++ b/include/asm-parisc/pgtable.h
@@ -49,14 +49,6 @@
49#define pgd_ERROR(e) \ 49#define pgd_ERROR(e) \
50 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) 50 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
51 51
52 /* Note: If you change ISTACK_SIZE, you need to change the corresponding
53 * values in vmlinux.lds and vmlinux64.lds (init_istack section). Also,
54 * the "order" and size need to agree.
55 */
56
57#define ISTACK_SIZE 32768 /* Interrupt Stack Size */
58#define ISTACK_ORDER 3
59
60/* This is the size of the initially mapped kernel memory */ 52/* This is the size of the initially mapped kernel memory */
61#ifdef CONFIG_64BIT 53#ifdef CONFIG_64BIT
62#define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ 54#define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */
@@ -325,27 +317,27 @@ static inline void pgd_clear(pgd_t *pgd) {
325 * setup: the pgd is never bad, and a pmd always exists (as it's folded 317 * setup: the pgd is never bad, and a pmd always exists (as it's folded
326 * into the pgd entry) 318 * into the pgd entry)
327 */ 319 */
328extern inline int pgd_none(pgd_t pgd) { return 0; } 320static inline int pgd_none(pgd_t pgd) { return 0; }
329extern inline int pgd_bad(pgd_t pgd) { return 0; } 321static inline int pgd_bad(pgd_t pgd) { return 0; }
330extern inline int pgd_present(pgd_t pgd) { return 1; } 322static inline int pgd_present(pgd_t pgd) { return 1; }
331extern inline void pgd_clear(pgd_t * pgdp) { } 323static inline void pgd_clear(pgd_t * pgdp) { }
332#endif 324#endif
333 325
334/* 326/*
335 * The following only work if pte_present() is true. 327 * The following only work if pte_present() is true.
336 * Undefined behaviour if not.. 328 * Undefined behaviour if not..
337 */ 329 */
338extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } 330static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
339extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 331static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
340extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } 332static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
341extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 333static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
342 334
343extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; } 335static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
344extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } 336static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
345extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; } 337static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; }
346extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; } 338static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; }
347extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; } 339static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
348extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; } 340static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; }
349 341
350/* 342/*
351 * Conversion functions: convert a page and protection to a page entry, 343 * Conversion functions: convert a page and protection to a page entry,
@@ -369,7 +361,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
369 return pte; 361 return pte;
370} 362}
371 363
372extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 364static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
373{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } 365{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
374 366
375/* Permanent address of a page. On parisc we don't have highmem. */ 367/* 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 @@
19#ifdef CONFIG_PREFETCH 19#ifdef CONFIG_PREFETCH
20 20
21#define ARCH_HAS_PREFETCH 21#define ARCH_HAS_PREFETCH
22extern inline void prefetch(const void *addr) 22static inline void prefetch(const void *addr)
23{ 23{
24 __asm__("ldw 0(%0), %%r0" : : "r" (addr)); 24 __asm__("ldw 0(%0), %%r0" : : "r" (addr));
25} 25}
@@ -27,7 +27,7 @@ extern inline void prefetch(const void *addr)
27/* LDD is a PA2.0 addition. */ 27/* LDD is a PA2.0 addition. */
28#ifdef CONFIG_PA20 28#ifdef CONFIG_PA20
29#define ARCH_HAS_PREFETCHW 29#define ARCH_HAS_PREFETCHW
30extern inline void prefetchw(const void *addr) 30static inline void prefetchw(const void *addr)
31{ 31{
32 __asm__("ldd 0(%0), %%r0" : : "r" (addr)); 32 __asm__("ldd 0(%0), %%r0" : : "r" (addr));
33} 33}
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)
50 long int days, rem, y; 50 long int days, rem, y;
51 const unsigned short int *ip; 51 const unsigned short int *ip;
52 52
53 if(pdc_tod_read(&tod_data) < 0) 53 memset(wtime, 0, sizeof(*wtime));
54 if (pdc_tod_read(&tod_data) < 0)
54 return RTC_24H | RTC_BATT_BAD; 55 return RTC_24H | RTC_BATT_BAD;
55 56
56
57 // most of the remainder of this function is: 57 // most of the remainder of this function is:
58// Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc. 58// Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
59// This was originally a part of the GNU C Library. 59// This was originally a part of the GNU C Library.
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 {
54 54
55#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) 55#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
56 56
57extern inline void sema_init (struct semaphore *sem, int val) 57static inline void sema_init (struct semaphore *sem, int val)
58{ 58{
59 *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); 59 *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
60} 60}
@@ -82,7 +82,7 @@ asmlinkage void __up(struct semaphore * sem);
82 * interrupts while we're messing with the semaphore. Sorry. 82 * interrupts while we're messing with the semaphore. Sorry.
83 */ 83 */
84 84
85extern __inline__ void down(struct semaphore * sem) 85static inline void down(struct semaphore * sem)
86{ 86{
87 might_sleep(); 87 might_sleep();
88 spin_lock_irq(&sem->sentry); 88 spin_lock_irq(&sem->sentry);
@@ -94,7 +94,7 @@ extern __inline__ void down(struct semaphore * sem)
94 spin_unlock_irq(&sem->sentry); 94 spin_unlock_irq(&sem->sentry);
95} 95}
96 96
97extern __inline__ int down_interruptible(struct semaphore * sem) 97static inline int down_interruptible(struct semaphore * sem)
98{ 98{
99 int ret = 0; 99 int ret = 0;
100 might_sleep(); 100 might_sleep();
@@ -112,7 +112,7 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
112 * down_trylock returns 0 on success, 1 if we failed to get the lock. 112 * down_trylock returns 0 on success, 1 if we failed to get the lock.
113 * May not sleep, but must preserve irq state 113 * May not sleep, but must preserve irq state
114 */ 114 */
115extern __inline__ int down_trylock(struct semaphore * sem) 115static inline int down_trylock(struct semaphore * sem)
116{ 116{
117 unsigned long flags; 117 unsigned long flags;
118 int count; 118 int count;
@@ -129,7 +129,7 @@ extern __inline__ int down_trylock(struct semaphore * sem)
129 * Note! This is subtle. We jump to wake people up only if 129 * Note! This is subtle. We jump to wake people up only if
130 * the semaphore was negative (== somebody was waiting on it). 130 * the semaphore was negative (== somebody was waiting on it).
131 */ 131 */
132extern __inline__ void up(struct semaphore * sem) 132static inline void up(struct semaphore * sem)
133{ 133{
134 unsigned long flags; 134 unsigned long flags;
135 135
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 @@
797#define __NR_signalfd (__NR_Linux + 302) 797#define __NR_signalfd (__NR_Linux + 302)
798#define __NR_timerfd (__NR_Linux + 303) 798#define __NR_timerfd (__NR_Linux + 303)
799#define __NR_eventfd (__NR_Linux + 304) 799#define __NR_eventfd (__NR_Linux + 304)
800#define __NR_fallocate (__NR_Linux + 305)
800 801
801#define __NR_Linux_syscalls (__NR_eventfd + 1) 802#define __NR_Linux_syscalls (__NR_fallocate + 1)
802 803
803 804
804#define __IGNORE_select /* newselect */ 805#define __IGNORE_select /* newselect */