]> git.hungrycats.org Git - linux/commitdiff
Sparc64 build fixes:
authorDavid S. Miller <davem@nuts.ninka.net>
Wed, 22 May 2002 18:00:58 +0000 (11:00 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 22 May 2002 18:00:58 +0000 (11:00 -0700)
- Yes we really do need sched.h in central.c
- Include namei.h in solaris syscall emul layer
- Use generic_fls in sparc64 bitops.
- Add dummy asm-sparc64/suspend.h

arch/sparc64/kernel/central.c
arch/sparc64/solaris/fs.c
include/asm-sparc64/bitops.h

index ba3b4e81a1f5d71da0c894611319844a012e8f99..a2707e75bde635a3089ca10702f49c8ea055be78 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/timer.h>
-#include <linux/jiffies.h>
+#include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
@@ -77,7 +77,7 @@ void apply_fhc_ranges(struct linux_fhc *fhc,
                      struct linux_prom_registers *regs,
                      int nregs)
 {
-       if(fhc->num_fhc_ranges)
+       if (fhc->num_fhc_ranges)
                adjust_regs(regs, nregs, fhc->fhc_ranges,
                            fhc->num_fhc_ranges);
 }
@@ -86,7 +86,7 @@ void apply_fhc_ranges(struct linux_fhc *fhc,
 void apply_central_ranges(struct linux_central *central,
                          struct linux_prom_registers *regs, int nregs)
 {
-       if(central->num_central_ranges)
+       if (central->num_central_ranges)
                adjust_regs(regs, nregs, central->central_ranges,
                            central->num_central_ranges);
 }
@@ -114,7 +114,7 @@ static void probe_other_fhcs(void)
                prom_printf("FHC: Cannot find any toplevel firehose controllers.\n");
                prom_halt();
        }
-       while(node) {
+       while (node) {
                struct linux_fhc *fhc;
                int board;
                u32 tmp;
@@ -139,7 +139,7 @@ static void probe_other_fhcs(void)
                fhc_ranges_init(node, fhc);
 
                /* Non-central FHC's have 64-bit OBP format registers. */
-               if(prom_getproperty(node, "reg",
+               if (prom_getproperty(node, "reg",
                                    (char *)&fpregs[0], sizeof(fpregs)) == -1) {
                        prom_printf("FHC: Fatal error, cannot get fhc regs.\n");
                        prom_halt();
@@ -157,7 +157,7 @@ static void probe_other_fhcs(void)
                fhc->board = board;
 
                tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_JCTRL);
-               if((tmp & FHC_JTAG_CTRL_MENAB) != 0)
+               if ((tmp & FHC_JTAG_CTRL_MENAB) != 0)
                        fhc->jtag_master = 1;
                else
                        fhc->jtag_master = 0;
@@ -180,10 +180,10 @@ static void probe_other_fhcs(void)
 
                /* Look for the next FHC. */
                node = prom_getsibling(node);
-               if(node == 0)
+               if (node == 0)
                        break;
                node = prom_searchsiblings(node, "fhc");
-               if(node == 0)
+               if (node == 0)
                        break;
        }
 }
@@ -196,7 +196,7 @@ static void probe_clock_board(struct linux_central *central,
        int clknode, nslots, tmp, nregs;
 
        clknode = prom_searchsiblings(prom_getchild(fnode), "clock-board");
-       if(clknode == 0 || clknode == -1) {
+       if (clknode == 0 || clknode == -1) {
                prom_printf("Critical error, central lacks clock-board.\n");
                prom_halt();
        }
@@ -213,7 +213,7 @@ static void probe_clock_board(struct linux_central *central,
        central->clkregs = ((((unsigned long)cregs[1].which_io) << 32UL) |
                            ((unsigned long)cregs[1].phys_addr));
 
-       if(nregs == 2)
+       if (nregs == 2)
                central->clkver = 0UL;
        else
                central->clkver = ((((unsigned long)cregs[2].which_io) << 32UL) |
@@ -229,9 +229,9 @@ static void probe_clock_board(struct linux_central *central,
                nslots = 8;
                break;
        case 0x80:
-               if(central->clkver != 0UL &&
+               if (central->clkver != 0UL &&
                   upa_readb(central->clkver) != 0) {
-                       if((upa_readb(central->clkver) & 0x80) != 0)
+                       if ((upa_readb(central->clkver) & 0x80) != 0)
                                nslots = 4;
                        else
                                nslots = 5;
@@ -251,7 +251,7 @@ static void init_all_fhc_hw(void)
 {
        struct linux_fhc *fhc;
 
-       for(fhc = fhc_list; fhc != NULL; fhc = fhc->next) {
+       for (fhc = fhc_list; fhc != NULL; fhc = fhc->next) {
                u32 tmp;
 
                /* Clear all of the interrupt mapping registers
@@ -282,7 +282,7 @@ do {        u32 imap_tmp; \
                tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL);
 
                /* All non-central boards have this bit set. */
-               if(! IS_CENTRAL_FHC(fhc))
+               if (! IS_CENTRAL_FHC(fhc))
                        tmp |= FHC_CONTROL_IXIST;
 
                /* For all FHCs, clear the firmware synchronization
@@ -304,7 +304,7 @@ void central_probe(void)
        int cnode, fnode, err;
 
        cnode = prom_finddevice("/central");
-       if(cnode == 0 || cnode == -1) {
+       if (cnode == 0 || cnode == -1) {
                if (this_is_starfire)
                        starfire_cpu_setup();
                return;
@@ -340,7 +340,7 @@ void central_probe(void)
 
        fhc->parent = central_bus;
        fnode = prom_searchsiblings(prom_getchild(cnode), "fhc");
-       if(fnode == 0 || fnode == -1) {
+       if (fnode == 0 || fnode == -1) {
                prom_printf("Critical error, central board lacks fhc.\n");
                prom_halt();
        }
@@ -418,7 +418,7 @@ static __inline__ void central_ledblink(struct linux_central *central, int on)
        tmp = upa_readb(central->clkregs + CLOCK_CTRL);
 
        /* NOTE: reverse logic on this bit */
-       if(on)
+       if (on)
                tmp &= ~(CLOCK_CTRL_RLED);
        else
                tmp |= CLOCK_CTRL_RLED;
@@ -435,8 +435,8 @@ static void sunfire_timer(unsigned long __ignored)
        struct linux_fhc *fhc;
 
        central_ledblink(central_bus, led_state);
-       for(fhc = fhc_list; fhc != NULL; fhc = fhc->next)
-               if(! IS_CENTRAL_FHC(fhc))
+       for (fhc = fhc_list; fhc != NULL; fhc = fhc->next)
+               if (! IS_CENTRAL_FHC(fhc))
                        fhc_ledblink(fhc, led_state);
        led_state = ! led_state;
        sftimer.expires = jiffies + (HZ >> 1);
index 59373b55816db6222985862d95d851cb5613d137..cd0a73740c0153241d7f85f6ac7387213806ed45 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
+#include <linux/namei.h>
 #include <linux/mm.h>
 #include <linux/file.h>
 #include <linux/stat.h>
index 40af670f7eefce1ebb397c34b2a86a5adc24f59d..1af0f9dc47f7449aec7917c1a7f45ac5cc51e613 100644 (file)
@@ -112,6 +112,12 @@ static __inline__ unsigned long __ffs(unsigned long word)
        return result;
 }
 
+/*
+ * fls: find last bit set.
+ */
+
+#define fls(x) generic_fls(x)
+
 #ifdef __KERNEL__
 
 /*