Commit bf3493c9 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/sparc-2.5

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