git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
sparc
/
kernel
/
pcic.c
diff --git
a/arch/sparc/kernel/pcic.c
b/arch/sparc/kernel/pcic.c
index
c982473
..
42002b7
100644
(file)
--- a/
arch/sparc/kernel/pcic.c
+++ b/
arch/sparc/kernel/pcic.c
@@
-143,7
+143,7
@@
static struct pcic_ca2irq pcic_i_jk[] = {
* as several PROMs may be installed on the same physical board.
*/
#define SN2L_INIT(name, map) \
* as several PROMs may be installed on the same physical board.
*/
#define SN2L_INIT(name, map) \
- { name, map,
sizeof(map)/sizeof(struct pcic_ca2irq
) }
+ { name, map,
ARRAY_SIZE(map
) }
static struct pcic_sn2list pcic_known_sysnames[] = {
SN2L_INIT("SUNW,JavaEngine1", pcic_i_je1a), /* JE1, PROM 2.32 */
static struct pcic_sn2list pcic_known_sysnames[] = {
SN2L_INIT("SUNW,JavaEngine1", pcic_i_je1a), /* JE1, PROM 2.32 */
@@
-161,7
+161,7
@@
static struct pcic_sn2list pcic_known_sysnames[] = {
static int pcic0_up;
static struct linux_pcic pcic0;
static int pcic0_up;
static struct linux_pcic pcic0;
-
unsigned int
pcic_regs;
+
void __iomem *
pcic_regs;
volatile int pcic_speculative;
volatile int pcic_trapped;
volatile int pcic_speculative;
volatile int pcic_trapped;
@@
-313,8
+313,7
@@
int __init pcic_probe(void)
pcic0_up = 1;
pcic->pcic_res_regs.name = "pcic_registers";
pcic0_up = 1;
pcic->pcic_res_regs.name = "pcic_registers";
- pcic->pcic_regs = (unsigned long)
- ioremap(regs[0].phys_addr, regs[0].reg_size);
+ pcic->pcic_regs = ioremap(regs[0].phys_addr, regs[0].reg_size);
if (!pcic->pcic_regs) {
prom_printf("PCIC: Error, cannot map PCIC registers.\n");
prom_halt();
if (!pcic->pcic_regs) {
prom_printf("PCIC: Error, cannot map PCIC registers.\n");
prom_halt();
@@
-328,7
+327,7
@@
int __init pcic_probe(void)
}
pcic->pcic_res_cfg_addr.name = "pcic_cfg_addr";
}
pcic->pcic_res_cfg_addr.name = "pcic_cfg_addr";
- if ((pcic->pcic_config_space_addr =
(unsigned long)
+ if ((pcic->pcic_config_space_addr =
ioremap(regs[2].phys_addr, regs[2].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Address.\n");
ioremap(regs[2].phys_addr, regs[2].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Address.\n");
@@
-340,7
+339,7
@@
int __init pcic_probe(void)
* must be the same. Thus, we need adjust size of data.
*/
pcic->pcic_res_cfg_data.name = "pcic_cfg_data";
* must be the same. Thus, we need adjust size of data.
*/
pcic->pcic_res_cfg_data.name = "pcic_cfg_data";
- if ((pcic->pcic_config_space_data =
(unsigned long)
+ if ((pcic->pcic_config_space_data =
ioremap(regs[3].phys_addr, regs[3].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Data.\n");
ioremap(regs[3].phys_addr, regs[3].reg_size * 2)) == 0) {
prom_printf("PCIC: Error, cannot map"
"PCI Configuration Space Data.\n");
@@
-498,8
+497,8
@@
static void pcic_map_pci_device(struct linux_pcic *pcic,
* CheerIO makes a similar conversion.
* See ebus.c for details.
*
* CheerIO makes a similar conversion.
* See ebus.c for details.
*
- * Note that
check_region()/
request_region()
- * work for these devices.
+ * Note that request_region()
+ * work
s
for these devices.
*
* XXX Neat trick, but it's a *bad* idea
* to shit into regions like that.
*
* XXX Neat trick, but it's a *bad* idea
* to shit into regions like that.
@@
-603,7
+602,7
@@
pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
- struct
list_head *walk
;
+ struct
pci_dev *dev
;
int i, has_io, has_mem;
unsigned int cmd;
struct linux_pcic *pcic;
int i, has_io, has_mem;
unsigned int cmd;
struct linux_pcic *pcic;
@@
-625,9
+624,7
@@
void __init pcibios_fixup_bus(struct pci_bus *bus)
return;
}
return;
}
- walk = &bus->devices;
- for (walk = walk->next; walk != &bus->devices; walk = walk->next) {
- struct pci_dev *dev = pci_dev_b(walk);
+ list_for_each_entry(dev, &bus->devices, bus_list) {
/*
* Comment from i386 branch:
/*
* Comment from i386 branch:
@@
-716,6
+713,9
@@
static irqreturn_t pcic_timer_handler (int irq, void *h, struct pt_regs *regs)
write_seqlock(&xtime_lock); /* Dummy, to show that we remember */
pcic_clear_clock_irq();
do_timer(regs);
write_seqlock(&xtime_lock); /* Dummy, to show that we remember */
pcic_clear_clock_irq();
do_timer(regs);
+#ifndef CONFIG_SMP
+ update_process_times(user_mode(regs));
+#endif
write_sequnlock(&xtime_lock);
return IRQ_HANDLED;
}
write_sequnlock(&xtime_lock);
return IRQ_HANDLED;
}
@@
-840,10
+840,7
@@
static int pci_do_settimeofday(struct timespec *tv)
xtime.tv_sec = tv->tv_sec;
xtime.tv_nsec = tv->tv_nsec;
xtime.tv_sec = tv->tv_sec;
xtime.tv_nsec = tv->tv_nsec;
- time_adjust = 0; /* stop active adjtime() */
- time_status |= STA_UNSYNC;
- time_maxerror = NTP_PHASE_LIMIT;
- time_esterror = NTP_PHASE_LIMIT;
+ ntp_clear();
return 0;
}
return 0;
}
@@
-975,60
+972,66
@@
int pcibios_assign_resource(struct pci_dev *pdev, int resource)
* We do not use horroble macroses here because we want to
* advance pointer by sizeof(size).
*/
* We do not use horroble macroses here because we want to
* advance pointer by sizeof(size).
*/
-void outsb(unsigned long addr, const void *src, unsigned long count) {
+void outsb(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 1;
while (count) {
count -= 1;
-
write
b(*(const char *)src, addr);
+
out
b(*(const char *)src, addr);
src += 1;
src += 1;
- addr += 1;
+ /* addr += 1; */
}
}
}
}
-void outsw(unsigned long addr, const void *src, unsigned long count) {
+void outsw(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 2;
while (count) {
count -= 2;
-
write
w(*(const short *)src, addr);
+
out
w(*(const short *)src, addr);
src += 2;
src += 2;
- addr += 2;
+ /* addr += 2; */
}
}
}
}
-void outsl(unsigned long addr, const void *src, unsigned long count) {
+void outsl(unsigned long addr, const void *src, unsigned long count)
+{
while (count) {
count -= 4;
while (count) {
count -= 4;
-
write
l(*(const long *)src, addr);
+
out
l(*(const long *)src, addr);
src += 4;
src += 4;
- addr += 4;
+ /* addr += 4; */
}
}
}
}
-void insb(unsigned long addr, void *dst, unsigned long count) {
+void insb(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 1;
while (count) {
count -= 1;
- *(unsigned char *)dst =
read
b(addr);
+ *(unsigned char *)dst =
in
b(addr);
dst += 1;
dst += 1;
- addr += 1;
+ /* addr += 1; */
}
}
}
}
-void insw(unsigned long addr, void *dst, unsigned long count) {
+void insw(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 2;
while (count) {
count -= 2;
- *(unsigned short *)dst =
read
w(addr);
+ *(unsigned short *)dst =
in
w(addr);
dst += 2;
dst += 2;
- addr += 2;
+ /* addr += 2; */
}
}
}
}
-void insl(unsigned long addr, void *dst, unsigned long count) {
+void insl(unsigned long addr, void *dst, unsigned long count)
+{
while (count) {
count -= 4;
/*
* XXX I am sure we are in for an unaligned trap here.
*/
while (count) {
count -= 4;
/*
* XXX I am sure we are in for an unaligned trap here.
*/
- *(unsigned long *)dst =
read
l(addr);
+ *(unsigned long *)dst =
in
l(addr);
dst += 4;
dst += 4;
- addr += 4;
+ /* addr += 4; */
}
}
}
}