Commit 19f385b0 authored by David S. Miller's avatar David S. Miller

Sparc64 build fixes:

- 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
parent d0f0cde1
......@@ -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);
......
......@@ -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>
......
......@@ -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__
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment