aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-27 13:11:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-27 13:11:12 -0400
commita2508c0814c6d2c0259fa859a6184343b1e39ea3 (patch)
tree3c42cb3daf50b419f8cc20ff1625647306b66e0d /arch
parent0f5a2c553d1484141ebb369ecab61894e9cb074f (diff)
parent6ee4e28be80add86a64908472e4b7ab01dab33d9 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC32]: Fix build-warning in io-unit.c [SPARC64]: Fix BACKOFF_SPIN on non-SMP. [SPARC32]: __inline__ --> inline [SPARC64]: __inline__ --> inline
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/pcic.c2
-rw-r--r--arch/sparc/kernel/process.c7
-rw-r--r--arch/sparc/kernel/time.c9
-rw-r--r--arch/sparc/mm/btfixup.c5
-rw-r--r--arch/sparc/mm/io-unit.c2
-rw-r--r--arch/sparc/mm/sun4c.c15
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c4
-rw-r--r--arch/sparc64/kernel/central.c9
-rw-r--r--arch/sparc64/kernel/semaphore.c5
-rw-r--r--arch/sparc64/kernel/smp.c4
-rw-r--r--arch/sparc64/kernel/traps.c9
-rw-r--r--arch/sparc64/mm/init.c4
-rw-r--r--arch/sparc64/prom/console.c9
-rw-r--r--arch/sparc64/prom/tree.c49
14 files changed, 55 insertions, 78 deletions
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index f2eae457fc9a..f2d432edc92d 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -753,7 +753,7 @@ void __init pci_time_init(void)
753 local_irq_enable(); 753 local_irq_enable();
754} 754}
755 755
756static __inline__ unsigned long do_gettimeoffset(void) 756static inline unsigned long do_gettimeoffset(void)
757{ 757{
758 /* 758 /*
759 * We divide all by 100 759 * We divide all by 100
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 33f7a3ddb104..77460e316a03 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -1,7 +1,6 @@
1/* $Id: process.c,v 1.161 2002/01/23 11:27:32 davem Exp $ 1/* linux/arch/sparc/kernel/process.c
2 * linux/arch/sparc/kernel/process.c
3 * 2 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 */ 5 */
7 6
@@ -397,7 +396,7 @@ void flush_thread(void)
397 } 396 }
398} 397}
399 398
400static __inline__ struct sparc_stackf __user * 399static inline struct sparc_stackf __user *
401clone_stackframe(struct sparc_stackf __user *dst, 400clone_stackframe(struct sparc_stackf __user *dst,
402 struct sparc_stackf __user *src) 401 struct sparc_stackf __user *src)
403{ 402{
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 4bf78a5e8e0f..45cb7c5286d7 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -1,7 +1,6 @@
1/* $Id: time.c,v 1.60 2002/01/23 14:33:55 davem Exp $ 1/* linux/arch/sparc/kernel/time.c
2 * linux/arch/sparc/kernel/time.c
3 * 2 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) 4 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
6 * 5 *
7 * Chris Davis (cdavis@cois.on.ca) 03/27/1998 6 * Chris Davis (cdavis@cois.on.ca) 03/27/1998
@@ -210,7 +209,7 @@ static void __devinit kick_start_clock(void)
210} 209}
211 210
212/* Return nonzero if the clock chip battery is low. */ 211/* Return nonzero if the clock chip battery is low. */
213static __inline__ int has_low_battery(void) 212static inline int has_low_battery(void)
214{ 213{
215 struct mostek48t02 *regs = (struct mostek48t02 *)mstk48t02_regs; 214 struct mostek48t02 *regs = (struct mostek48t02 *)mstk48t02_regs;
216 unsigned char data1, data2; 215 unsigned char data1, data2;
@@ -252,7 +251,7 @@ static void __devinit mostek_set_system_time(void)
252} 251}
253 252
254/* Probe for the real time clock chip on Sun4 */ 253/* Probe for the real time clock chip on Sun4 */
255static __inline__ void sun4_clock_probe(void) 254static inline void sun4_clock_probe(void)
256{ 255{
257#ifdef CONFIG_SUN4 256#ifdef CONFIG_SUN4
258 int temp; 257 int temp;
diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c
index ec4231c2855a..a312d127d47a 100644
--- a/arch/sparc/mm/btfixup.c
+++ b/arch/sparc/mm/btfixup.c
@@ -1,5 +1,4 @@
1/* $Id: btfixup.c,v 1.10 2000/05/09 17:40:13 davem Exp $ 1/* btfixup.c: Boot time code fixup and relocator, so that
2 * btfixup.c: Boot time code fixup and relocator, so that
3 * we can get rid of most indirect calls to achieve single 2 * we can get rid of most indirect calls to achieve single
4 * image sun4c and srmmu kernel. 3 * image sun4c and srmmu kernel.
5 * 4 *
@@ -69,7 +68,7 @@ static void __init set_addr(unsigned int *addr, unsigned int q1, int fmangled, u
69 } 68 }
70} 69}
71#else 70#else
72static __inline__ void set_addr(unsigned int *addr, unsigned int q1, int fmangled, unsigned int value) 71static inline void set_addr(unsigned int *addr, unsigned int q1, int fmangled, unsigned int value)
73{ 72{
74 *addr = value; 73 *addr = value;
75} 74}
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index 1666087c5b80..b86dfce8eee4 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -144,7 +144,7 @@ static void iounit_get_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus
144 spin_lock_irqsave(&iounit->lock, flags); 144 spin_lock_irqsave(&iounit->lock, flags);
145 while (sz != 0) { 145 while (sz != 0) {
146 --sz; 146 --sz;
147 sg->dvma_address = iounit_get_area(iounit, sg_virt(sg), sg->length); 147 sg->dvma_address = iounit_get_area(iounit, (unsigned long) sg_virt(sg), sg->length);
148 sg->dvma_length = sg->length; 148 sg->dvma_length = sg->length;
149 sg = sg_next(sg); 149 sg = sg_next(sg);
150 } 150 }
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index a2cc141291c7..0729305f2f59 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -1,7 +1,6 @@
1/* $Id: sun4c.c,v 1.212 2001/12/21 04:56:15 davem Exp $ 1/* sun4c.c: Doing in software what should be done in hardware.
2 * sun4c.c: Doing in software what should be done in hardware.
3 * 2 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 1996 Andrew Tridgell (Andrew.Tridgell@anu.edu.au) 5 * Copyright (C) 1996 Andrew Tridgell (Andrew.Tridgell@anu.edu.au)
7 * Copyright (C) 1997-2000 Anton Blanchard (anton@samba.org) 6 * Copyright (C) 1997-2000 Anton Blanchard (anton@samba.org)
@@ -719,7 +718,7 @@ static void add_ring(struct sun4c_mmu_ring *ring,
719 ring->num_entries++; 718 ring->num_entries++;
720} 719}
721 720
722static __inline__ void add_lru(struct sun4c_mmu_entry *entry) 721static inline void add_lru(struct sun4c_mmu_entry *entry)
723{ 722{
724 struct sun4c_mmu_ring *ring = &sun4c_ulru_ring; 723 struct sun4c_mmu_ring *ring = &sun4c_ulru_ring;
725 struct sun4c_mmu_entry *head = &ring->ringhd; 724 struct sun4c_mmu_entry *head = &ring->ringhd;
@@ -746,7 +745,7 @@ static void add_ring_ordered(struct sun4c_mmu_ring *ring,
746 add_lru(entry); 745 add_lru(entry);
747} 746}
748 747
749static __inline__ void remove_ring(struct sun4c_mmu_ring *ring, 748static inline void remove_ring(struct sun4c_mmu_ring *ring,
750 struct sun4c_mmu_entry *entry) 749 struct sun4c_mmu_entry *entry)
751{ 750{
752 struct sun4c_mmu_entry *next = entry->next; 751 struct sun4c_mmu_entry *next = entry->next;
@@ -1836,7 +1835,7 @@ static unsigned long sun4c_pte_to_pgoff(pte_t pte)
1836} 1835}
1837 1836
1838 1837
1839static __inline__ unsigned long sun4c_pmd_page_v(pmd_t pmd) 1838static inline unsigned long sun4c_pmd_page_v(pmd_t pmd)
1840{ 1839{
1841 return (pmd_val(pmd) & PAGE_MASK); 1840 return (pmd_val(pmd) & PAGE_MASK);
1842} 1841}
@@ -1922,7 +1921,7 @@ static void sun4c_free_pgd_fast(pgd_t *pgd)
1922} 1921}
1923 1922
1924 1923
1925static __inline__ pte_t * 1924static inline pte_t *
1926sun4c_pte_alloc_one_fast(struct mm_struct *mm, unsigned long address) 1925sun4c_pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
1927{ 1926{
1928 unsigned long *ret; 1927 unsigned long *ret;
@@ -1956,7 +1955,7 @@ static struct page *sun4c_pte_alloc_one(struct mm_struct *mm, unsigned long addr
1956 return virt_to_page(pte); 1955 return virt_to_page(pte);
1957} 1956}
1958 1957
1959static __inline__ void sun4c_free_pte_fast(pte_t *pte) 1958static inline void sun4c_free_pte_fast(pte_t *pte)
1960{ 1959{
1961 *(unsigned long *)pte = (unsigned long) pte_quicklist; 1960 *(unsigned long *)pte = (unsigned long) pte_quicklist;
1962 pte_quicklist = (unsigned long *) pte; 1961 pte_quicklist = (unsigned long *) pte;
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 9ad84ff10a17..1587a29a4b0e 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra. 2 * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
3 * 3 *
4 * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
@@ -133,7 +133,7 @@ struct elf_prpsinfo32
133 133
134#undef cputime_to_timeval 134#undef cputime_to_timeval
135#define cputime_to_timeval cputime_to_compat_timeval 135#define cputime_to_timeval cputime_to_compat_timeval
136static __inline__ void 136static inline void
137cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) 137cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
138{ 138{
139 unsigned long jiffies = cputime_to_jiffies(cputime); 139 unsigned long jiffies = cputime_to_jiffies(cputime);
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c
index 8230099f0d8a..b61b8dfb09cf 100644
--- a/arch/sparc64/kernel/central.c
+++ b/arch/sparc64/kernel/central.c
@@ -1,7 +1,6 @@
1/* $Id: central.c,v 1.15 2001/12/19 00:29:51 davem Exp $ 1/* central.c: Central FHC driver for Sunfire/Starfire/Wildfire.
2 * central.c: Central FHC driver for Sunfire/Starfire/Wildfire.
3 * 2 *
4 * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) 3 * Copyright (C) 1997, 1999 David S. Miller (davem@davemloft.net)
5 */ 4 */
6 5
7#include <linux/kernel.h> 6#include <linux/kernel.h>
@@ -385,7 +384,7 @@ void __init central_probe(void)
385 init_all_fhc_hw(); 384 init_all_fhc_hw();
386} 385}
387 386
388static __inline__ void fhc_ledblink(struct linux_fhc *fhc, int on) 387static inline void fhc_ledblink(struct linux_fhc *fhc, int on)
389{ 388{
390 u32 tmp; 389 u32 tmp;
391 390
@@ -402,7 +401,7 @@ static __inline__ void fhc_ledblink(struct linux_fhc *fhc, int on)
402 upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL); 401 upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL);
403} 402}
404 403
405static __inline__ void central_ledblink(struct linux_central *central, int on) 404static inline void central_ledblink(struct linux_central *central, int on)
406{ 405{
407 u8 tmp; 406 u8 tmp;
408 407
diff --git a/arch/sparc64/kernel/semaphore.c b/arch/sparc64/kernel/semaphore.c
index a809e63f03ef..9974a6899551 100644
--- a/arch/sparc64/kernel/semaphore.c
+++ b/arch/sparc64/kernel/semaphore.c
@@ -1,5 +1,4 @@
1/* $Id: semaphore.c,v 1.9 2001/11/18 00:12:56 davem Exp $ 1/* semaphore.c: Sparc64 semaphore implementation.
2 * semaphore.c: Sparc64 semaphore implementation.
3 * 2 *
4 * This is basically the PPC semaphore scheme ported to use 3 * This is basically the PPC semaphore scheme ported to use
5 * the sparc64 atomic instructions, so see the PPC code for 4 * the sparc64 atomic instructions, so see the PPC code for
@@ -19,7 +18,7 @@
19 * sem->count = tmp; 18 * sem->count = tmp;
20 * return old_count; 19 * return old_count;
21 */ 20 */
22static __inline__ int __sem_update_count(struct semaphore *sem, int incr) 21static inline int __sem_update_count(struct semaphore *sem, int incr)
23{ 22{
24 int old_count, tmp; 23 int old_count, tmp;
25 24
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 407d74a8a542..7cd8d94df0dc 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -459,7 +459,7 @@ again:
459 } 459 }
460} 460}
461 461
462static __inline__ void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) 462static inline void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask)
463{ 463{
464 u64 pstate; 464 u64 pstate;
465 int i; 465 int i;
@@ -906,7 +906,7 @@ extern atomic_t dcpage_flushes;
906extern atomic_t dcpage_flushes_xcall; 906extern atomic_t dcpage_flushes_xcall;
907#endif 907#endif
908 908
909static __inline__ void __local_flush_dcache_page(struct page *page) 909static inline void __local_flush_dcache_page(struct page *page)
910{ 910{
911#ifdef DCACHE_ALIASING_POSSIBLE 911#ifdef DCACHE_ALIASING_POSSIBLE
912 __flush_dcache_page(page_address(page), 912 __flush_dcache_page(page_address(page),
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index e9c7e4f07abf..04998388259f 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1,7 +1,6 @@
1/* $Id: traps.c,v 1.85 2002/02/09 19:49:31 davem Exp $ 1/* arch/sparc64/kernel/traps.c
2 * arch/sparc64/kernel/traps.c
3 * 2 *
4 * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) 4 * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com)
6 */ 5 */
7 6
@@ -765,7 +764,7 @@ static unsigned long cheetah_afsr_errors;
765 */ 764 */
766struct cheetah_err_info *cheetah_error_log; 765struct cheetah_err_info *cheetah_error_log;
767 766
768static __inline__ struct cheetah_err_info *cheetah_get_error_log(unsigned long afsr) 767static inline struct cheetah_err_info *cheetah_get_error_log(unsigned long afsr)
769{ 768{
770 struct cheetah_err_info *p; 769 struct cheetah_err_info *p;
771 int cpu = smp_processor_id(); 770 int cpu = smp_processor_id();
@@ -1085,7 +1084,7 @@ static unsigned char cheetah_mtag_syntab[] = {
1085}; 1084};
1086 1085
1087/* Return the highest priority error conditon mentioned. */ 1086/* Return the highest priority error conditon mentioned. */
1088static __inline__ unsigned long cheetah_get_hipri(unsigned long afsr) 1087static inline unsigned long cheetah_get_hipri(unsigned long afsr)
1089{ 1088{
1090 unsigned long tmp = 0; 1089 unsigned long tmp = 0;
1091 int i; 1090 int i;
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 100c4456ed1e..e18ccf85224f 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -201,7 +201,7 @@ inline void flush_dcache_page_impl(struct page *page)
201#define dcache_dirty_cpu(page) \ 201#define dcache_dirty_cpu(page) \
202 (((page)->flags >> PG_dcache_cpu_shift) & PG_dcache_cpu_mask) 202 (((page)->flags >> PG_dcache_cpu_shift) & PG_dcache_cpu_mask)
203 203
204static __inline__ void set_dcache_dirty(struct page *page, int this_cpu) 204static inline void set_dcache_dirty(struct page *page, int this_cpu)
205{ 205{
206 unsigned long mask = this_cpu; 206 unsigned long mask = this_cpu;
207 unsigned long non_cpu_bits; 207 unsigned long non_cpu_bits;
@@ -223,7 +223,7 @@ static __inline__ void set_dcache_dirty(struct page *page, int this_cpu)
223 : "g1", "g7"); 223 : "g1", "g7");
224} 224}
225 225
226static __inline__ void clear_dcache_dirty_cpu(struct page *page, unsigned long cpu) 226static inline void clear_dcache_dirty_cpu(struct page *page, unsigned long cpu)
227{ 227{
228 unsigned long mask = (1UL << PG_dcache_dirty); 228 unsigned long mask = (1UL << PG_dcache_dirty);
229 229
diff --git a/arch/sparc64/prom/console.c b/arch/sparc64/prom/console.c
index 3fafa9a8b50b..e1c3fc87484d 100644
--- a/arch/sparc64/prom/console.c
+++ b/arch/sparc64/prom/console.c
@@ -1,8 +1,7 @@
1/* $Id: console.c,v 1.9 1997/10/29 07:41:43 ecd Exp $ 1/* console.c: Routines that deal with sending and receiving IO
2 * console.c: Routines that deal with sending and receiving IO
3 * to/from the current console device using the PROM. 2 * to/from the current console device using the PROM.
4 * 3 *
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
6 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 6 */
8 7
@@ -19,7 +18,7 @@ extern int prom_stdin, prom_stdout;
19/* Non blocking get character from console input device, returns -1 18/* Non blocking get character from console input device, returns -1
20 * if no input was taken. This can be used for polling. 19 * if no input was taken. This can be used for polling.
21 */ 20 */
22__inline__ int 21inline int
23prom_nbgetchar(void) 22prom_nbgetchar(void)
24{ 23{
25 char inc; 24 char inc;
@@ -35,7 +34,7 @@ prom_nbgetchar(void)
35/* Non blocking put character to console device, returns -1 if 34/* Non blocking put character to console device, returns -1 if
36 * unsuccessful. 35 * unsuccessful.
37 */ 36 */
38__inline__ int 37inline int
39prom_nbputchar(char c) 38prom_nbputchar(char c)
40{ 39{
41 char outc; 40 char outc;
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index b2c5b12c9818..a99ccd7fb1b0 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -18,14 +18,12 @@
18/* Return the child of node 'node' or zero if no this node has no 18/* Return the child of node 'node' or zero if no this node has no
19 * direct descendent. 19 * direct descendent.
20 */ 20 */
21__inline__ int 21inline int __prom_getchild(int node)
22__prom_getchild(int node)
23{ 22{
24 return p1275_cmd ("child", P1275_INOUT(1, 1), node); 23 return p1275_cmd ("child", P1275_INOUT(1, 1), node);
25} 24}
26 25
27__inline__ int 26inline int prom_getchild(int node)
28prom_getchild(int node)
29{ 27{
30 int cnode; 28 int cnode;
31 29
@@ -35,8 +33,7 @@ prom_getchild(int node)
35 return (int)cnode; 33 return (int)cnode;
36} 34}
37 35
38__inline__ int 36inline int prom_getparent(int node)
39prom_getparent(int node)
40{ 37{
41 int cnode; 38 int cnode;
42 39
@@ -49,14 +46,12 @@ prom_getparent(int node)
49/* Return the next sibling of node 'node' or zero if no more siblings 46/* Return the next sibling of node 'node' or zero if no more siblings
50 * at this level of depth in the tree. 47 * at this level of depth in the tree.
51 */ 48 */
52__inline__ int 49inline int __prom_getsibling(int node)
53__prom_getsibling(int node)
54{ 50{
55 return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node); 51 return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node);
56} 52}
57 53
58__inline__ int 54inline int prom_getsibling(int node)
59prom_getsibling(int node)
60{ 55{
61 int sibnode; 56 int sibnode;
62 57
@@ -72,8 +67,7 @@ prom_getsibling(int node)
72/* Return the length in bytes of property 'prop' at node 'node'. 67/* Return the length in bytes of property 'prop' at node 'node'.
73 * Return -1 on error. 68 * Return -1 on error.
74 */ 69 */
75__inline__ int 70inline int prom_getproplen(int node, const char *prop)
76prom_getproplen(int node, const char *prop)
77{ 71{
78 if((!node) || (!prop)) return -1; 72 if((!node) || (!prop)) return -1;
79 return p1275_cmd ("getproplen", 73 return p1275_cmd ("getproplen",
@@ -86,8 +80,8 @@ prom_getproplen(int node, const char *prop)
86 * 'buffer' which has a size of 'bufsize'. If the acquisition 80 * 'buffer' which has a size of 'bufsize'. If the acquisition
87 * was successful the length will be returned, else -1 is returned. 81 * was successful the length will be returned, else -1 is returned.
88 */ 82 */
89__inline__ int 83inline int prom_getproperty(int node, const char *prop,
90prom_getproperty(int node, const char *prop, char *buffer, int bufsize) 84 char *buffer, int bufsize)
91{ 85{
92 int plen; 86 int plen;
93 87
@@ -107,8 +101,7 @@ prom_getproperty(int node, const char *prop, char *buffer, int bufsize)
107/* Acquire an integer property and return its value. Returns -1 101/* Acquire an integer property and return its value. Returns -1
108 * on failure. 102 * on failure.
109 */ 103 */
110__inline__ int 104inline int prom_getint(int node, const char *prop)
111prom_getint(int node, const char *prop)
112{ 105{
113 int intprop; 106 int intprop;
114 107
@@ -122,8 +115,7 @@ prom_getint(int node, const char *prop)
122 * integer. 115 * integer.
123 */ 116 */
124 117
125int 118int prom_getintdefault(int node, const char *property, int deflt)
126prom_getintdefault(int node, const char *property, int deflt)
127{ 119{
128 int retval; 120 int retval;
129 121
@@ -134,8 +126,7 @@ prom_getintdefault(int node, const char *property, int deflt)
134} 126}
135 127
136/* Acquire a boolean property, 1=TRUE 0=FALSE. */ 128/* Acquire a boolean property, 1=TRUE 0=FALSE. */
137int 129int prom_getbool(int node, const char *prop)
138prom_getbool(int node, const char *prop)
139{ 130{
140 int retval; 131 int retval;
141 132
@@ -148,8 +139,7 @@ prom_getbool(int node, const char *prop)
148 * string on error. The char pointer is the user supplied string 139 * string on error. The char pointer is the user supplied string
149 * buffer. 140 * buffer.
150 */ 141 */
151void 142void prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size)
152prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size)
153{ 143{
154 int len; 144 int len;
155 145
@@ -163,8 +153,7 @@ prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size)
163/* Does the device at node 'node' have name 'name'? 153/* Does the device at node 'node' have name 'name'?
164 * YES = 1 NO = 0 154 * YES = 1 NO = 0
165 */ 155 */
166int 156int prom_nodematch(int node, const char *name)
167prom_nodematch(int node, const char *name)
168{ 157{
169 char namebuf[128]; 158 char namebuf[128];
170 prom_getproperty(node, "name", namebuf, sizeof(namebuf)); 159 prom_getproperty(node, "name", namebuf, sizeof(namebuf));
@@ -175,8 +164,7 @@ prom_nodematch(int node, const char *name)
175/* Search siblings at 'node_start' for a node with name 164/* Search siblings at 'node_start' for a node with name
176 * 'nodename'. Return node if successful, zero if not. 165 * 'nodename'. Return node if successful, zero if not.
177 */ 166 */
178int 167int prom_searchsiblings(int node_start, const char *nodename)
179prom_searchsiblings(int node_start, const char *nodename)
180{ 168{
181 169
182 int thisnode, error; 170 int thisnode, error;
@@ -197,8 +185,7 @@ prom_searchsiblings(int node_start, const char *nodename)
197/* Return the first property type for node 'node'. 185/* Return the first property type for node 'node'.
198 * buffer should be at least 32B in length 186 * buffer should be at least 32B in length
199 */ 187 */
200__inline__ char * 188inline char *prom_firstprop(int node, char *buffer)
201prom_firstprop(int node, char *buffer)
202{ 189{
203 *buffer = 0; 190 *buffer = 0;
204 if(node == -1) return buffer; 191 if(node == -1) return buffer;
@@ -212,8 +199,7 @@ prom_firstprop(int node, char *buffer)
212 * at node 'node' . Returns NULL string if no more 199 * at node 'node' . Returns NULL string if no more
213 * property types for this node. 200 * property types for this node.
214 */ 201 */
215__inline__ char * 202inline char *prom_nextprop(int node, const char *oprop, char *buffer)
216prom_nextprop(int node, const char *oprop, char *buffer)
217{ 203{
218 char buf[32]; 204 char buf[32];
219 205
@@ -279,8 +265,7 @@ prom_setprop(int node, const char *pname, char *value, int size)
279 node, pname, value, P1275_SIZE(size)); 265 node, pname, value, P1275_SIZE(size));
280} 266}
281 267
282__inline__ int 268inline int prom_inst2pkg(int inst)
283prom_inst2pkg(int inst)
284{ 269{
285 int node; 270 int node;
286 271