Commit 3e9dad0a authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.5

into nuts.ninka.net:/home/davem/src/BK/sparc-2.5
parents 4f38da4d dd243518
......@@ -53,27 +53,26 @@ NET_Y := $(patsubst %/, %/built-in.o, $(net-y))
LIBS_Y := $(patsubst %/, %/lib.a, $(libs-y))
export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD
image: vmlinux
$(MAKE) -C arch/sparc/boot image
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
image tftpboot.img: vmlinux
$(call makeboot,arch/sparc/boot/$@)
archclean:
rm -f $(TOPDIR)/vmlinux.aout
-$(MAKE) -C arch/sparc/boot clean
$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
archmrproper:
rm -f $(TOPDIR)/include/asm-sparc/asm_offsets.h
prepare: include/asm-$(ARCH)/asm_offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/asm_offsets.h: include/asm-$(ARCH)/asm_offsets.h.tmp
include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
@echo -n ' Generating $@'
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed)
tftpboot.img:
$(MAKE) -C arch/sparc/boot tftpboot.img
CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h.tmp \
include/asm-$(ARCH)/asm_offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s
......@@ -4,38 +4,35 @@
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
# Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
ROOT_IMG =/usr/src/root.img
ELFTOAOUT =elftoaout
ROOT_IMG := /usr/src/root.img
ELFTOAOUT := elftoaout
all: btfix.o
host-progs := piggyback btfixupprep
EXTRA_TARGETS := tftpboot.img btfix.o btfix.s image
tftpboot.img: piggyback
$(ELFTOAOUT) $(TOPDIR)/vmlinux -o tftpboot.img
./piggyback tftpboot.img $(TOPDIR)/System.map $(ROOT_IMG)
piggyback: piggyback.c
$(HOSTCC) $(HOSTCFLAGS) -o piggyback piggyback.c
btfixupprep: btfixupprep.c
$(HOSTCC) $(HOSTCFLAGS) -o btfixupprep btfixupprep.c
clean:
rm -f btfixupprep piggyback tftpboot.img btfix.o btfix.s image
quiet_cmd_elftoaout = ELFTOAOUT $@
cmd_elftoaout = $(ELFTOAOUT) $(obj)/image -o $@
quiet_cmd_piggy = PIGGY $@
cmd_piggy = $(obj)/piggyback $@ $(obj)/System.map $(ROOT_IMG)
quiet_cmd_btfix = BTFIX $@
cmd_btfix = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
BTOBJS := $(HEAD) $(INIT_Y)
BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
LDFLAGS_image := -T arch/sparc/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group
# Actual linking
image: btfix.o
$(LD) $(LDFLAGS) -T ../vmlinux.lds.s \
$(patsubst %,$(TOPDIR)/%,$(BTOBJS)) \
--start-group \
$(patsubst %,$(TOPDIR)/%,$(BTLIBS)) \
btfix.o \
--end-group -o image
btfix.s: btfixupprep $(TOPDIR)/vmlinux
$(OBJDUMP) -x $(TOPDIR)/vmlinux | ./btfixupprep > btfix.s
btfix.o: btfix.s
$(CC) -c -o btfix.o btfix.s
$(obj)/image: $(obj)/btfix.o FORCE
$(call if_changed,ld)
$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(obj)/System.map
$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
$(call if_changed,elftoaout)
$(call if_changed,piggy)
$(obj)/btfix.s: $(obj)/btfixupprep vmlinux FORCE
$(call if_changed,btfix)
archhelp:
@echo '* image - kernel image ($(obj)/image)'
@echo ' tftpboot.img - image prepared for tftp'
......@@ -2,15 +2,13 @@
# Makefile for the linux kernel.
#
SH = $(CONFIG_SHELL)
EXTRA_TARGETS := head.o init_task.o
EXTRA_AFLAGS := -ansi
EXTRA_AFLAGS := -ansi
export-objs := sparc_ksyms.o
IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \
obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
process.o signal.o ioport.o setup.o idprom.o \
sys_sparc.o sunos_asm.o systbls.o \
time.o windows.o cpu.o devices.o sclow.o \
......
......@@ -103,7 +103,8 @@ __attribute__((section("__ksymtab"))) = \
/* used by various drivers */
EXPORT_SYMBOL(sparc_cpu_model);
EXPORT_SYMBOL(kernel_thread);
#ifdef SPIN_LOCK_DEBUG
#ifdef CONFIG_DEBUG_SPINLOCK
#ifdef CONFIG_SMP
EXPORT_SYMBOL(_do_spin_lock);
EXPORT_SYMBOL(_do_spin_unlock);
EXPORT_SYMBOL(_spin_trylock);
......@@ -111,10 +112,12 @@ EXPORT_SYMBOL(_do_read_lock);
EXPORT_SYMBOL(_do_read_unlock);
EXPORT_SYMBOL(_do_write_lock);
EXPORT_SYMBOL(_do_write_unlock);
#endif
#else
EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
// XXX find what uses (or used) these.
// EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
// EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
// EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
#endif
/* semaphores */
EXPORT_SYMBOL(__up);
......
......@@ -34,6 +34,7 @@
#include <asm/sun4paddr.h>
#include <asm/idprom.h>
#include <asm/machines.h>
#include <asm/sbus.h>
#if 0
static struct resource sun4c_timer_eb = { "sun4c_timer" };
......@@ -51,6 +52,17 @@ static struct resource sun4c_intr_eb = { "sun4c_intr" };
*/
unsigned char *interrupt_enable = 0;
static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };
unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
{
if (sbint >= sizeof(sun4c_pil_map)) {
printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
BUG();
}
return sun4c_pil_map[sbint];
}
static void sun4c_disable_irq(unsigned int irq_nr)
{
unsigned long flags;
......@@ -213,6 +225,7 @@ void __init sun4c_init_IRQ(void)
int_regs[0].reg_size, "sun4c_intr");
}
BTFIXUPSET_CALL(sbint_to_irq, sun4c_sbint_to_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_irq, sun4c_enable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(disable_irq, sun4c_disable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_pil_irq, sun4c_enable_irq, BTFIXUPCALL_NORM);
......
......@@ -252,6 +252,15 @@ unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq)
return irq;
}
unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
{
if (sbint >= sizeof(sbus_to_pil)) {
printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
BUG();
}
return sun4d_build_irq(sdev, sbus_to_pil[sbint]);
}
int sun4d_request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
......@@ -541,6 +550,7 @@ void __init sun4d_init_IRQ(void)
{
local_irq_disable();
BTFIXUPSET_CALL(sbint_to_irq, sun4d_sbint_to_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_irq, sun4d_enable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(disable_irq, sun4d_disable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM);
......
......@@ -36,6 +36,7 @@
#include <asm/smp.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/sbus.h>
static unsigned long dummy;
......@@ -77,6 +78,17 @@ static unsigned long irq_mask[] = {
SUN4M_INT_SBUS(6) /* 14 irq 13 */
};
static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 };
unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
{
if (sbint >= sizeof(sun4m_pil_map)) {
printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
BUG();
}
return sun4m_pil_map[sbint] | 0x30;
}
inline unsigned long sun4m_get_irqmask(unsigned int irq)
{
unsigned long mask;
......@@ -366,6 +378,7 @@ void __init sun4m_init_IRQ(void)
&sun4m_interrupts->undirected_target;
sun4m_interrupts->undirected_target = 0;
}
BTFIXUPSET_CALL(sbint_to_irq, sun4m_sbint_to_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_irq, sun4m_enable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(disable_irq, sun4m_disable_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(enable_pil_irq, sun4m_enable_pil_irq, BTFIXUPCALL_NORM);
......
......@@ -986,7 +986,7 @@ choice
optional
depends on SCSI && PCI
source "drivers/scsi/aic7xxx/Kconfig"
source "drivers/scsi/aic7xxx/Kconfig.aic7xxx"
config SCSI_AIC7XXX_OLD
tristate "Old driver"
......
......@@ -74,8 +74,13 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/
tftpboot.img vmlinux.aout:
$(Q)$(MAKE) $(build)=arch/sparc64/boot arch/sparc64/boot/$@
archclean:
archmrproper:
define archhelp
echo '* vmlinux - Standard sparc64 kernel'
echo ' vmlinux.aout - a.out kernel for sparc64'
echo ' tftpboot.img - Image prepared for tftp'
endef
......@@ -1496,6 +1496,7 @@ static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev)
#ifdef CONFIG_SUN4
#include <asm/sun4paddr.h>
#include <asm/machines.h>
/* Find all the lance cards on the system and initialize them */
static int __init sparc_lance_probe(void)
......
......@@ -20,6 +20,7 @@
struct sbus_bus *sbus_root = NULL;
static struct linux_prom_irqs irqs[PROMINTR_MAX] __initdata = { { 0 } };
static int interrupts[PROMINTR_MAX] __initdata = { 0 };
#ifdef CONFIG_PCI
extern int pcic_present(void);
......@@ -126,20 +127,37 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
#else
len = prom_getproperty(prom_node, "intr",
(char *)irqs, sizeof(irqs));
if (len == -1)
len = 0;
sdev->num_irqs = len / 8;
if (sdev->num_irqs == 0) {
sdev->irqs[0] = 0;
} else if (sparc_cpu_model == sun4d) {
extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq);
for (len = 0; len < sdev->num_irqs; len++)
sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri);
if (len != -1) {
sdev->num_irqs = len / 8;
if (sdev->num_irqs == 0) {
sdev->irqs[0] = 0;
} else if (sparc_cpu_model == sun4d) {
extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq);
for (len = 0; len < sdev->num_irqs; len++)
sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri);
} else {
for (len = 0; len < sdev->num_irqs; len++)
sdev->irqs[len] = irqs[len].pri;
}
} else {
for (len = 0; len < sdev->num_irqs; len++)
sdev->irqs[len] = irqs[len].pri;
}
/* No "intr" node found-- check for "interrupts" node.
* This node contains SBus interrupt levels, not IPLs
* as in "intr", and no vector values. We convert
* SBus interrupt levels to PILs (platform specific).
*/
len = prom_getproperty(prom_node, "interrupts",
(char *)interrupts, sizeof(interrupts));
if (len == -1) {
sdev->irqs[0] = 0;
sdev->num_irqs = 0;
} else {
sdev->num_irqs = len / sizeof(int);
for (len = 0; len < sdev->num_irqs; len++) {
sdev->irqs[len] = sbint_to_irq(sdev, interrupts[len]);
}
}
}
#endif /* !__sparc_v9__ */
}
......
......@@ -72,6 +72,7 @@
#endif
#include <linux/module.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
......
......@@ -35,6 +35,7 @@
#include <linux/completion.h>
#include <linux/uts.h> /* for UTS_SYSNAME */
#include <linux/pci.h> /* for hcd->pdev and dma addressing */
#include <linux/dma-mapping.h>
#include <asm/byteorder.h>
#include <linux/usb.h>
......
......@@ -355,7 +355,7 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
scratch,
(info & ED_SKIP) ? " s" : "",
(ed->hwHeadP & ED_H) ? " H" : "",
(ed->hwHeadP & ED_C) ? data1 : data0);
(ed->hwHeadP & ED_C) ? "data1" : "data0");
size -= temp;
buf += temp;
......
......@@ -321,7 +321,7 @@ encode_attrs(struct xdr_stream *xdr, struct iattr *iap)
* Now we backfill the bitmap and the attribute buffer length.
*/
if (len != ((char *)p - (char *)q) + 4) {
printk ("encode_attr: Attr length calculation error! %u != %u\n",
printk ("encode_attr: Attr length calculation error! %u != %Zu\n",
len, ((char *)p - (char *)q) + 4);
BUG();
}
......
......@@ -9,9 +9,8 @@
#ifndef _SPARC_BITOPS_H
#define _SPARC_BITOPS_H
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <asm/byteorder.h>
#include <asm/system.h>
#ifdef __KERNEL__
......
......@@ -78,11 +78,9 @@ static __inline__ void ide_init_default_hwifs(void)
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
* The following is not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1)
#define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0)
/* XXX Known to be broken. Axboe will fix the problems this
* XXX has by making seperate IN/OUT macros for IDE_DATA
......
......@@ -121,4 +121,15 @@ extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int, int);
extern void sbus_dma_sync_single(struct sbus_dev *, dma_addr_t, size_t, int);
extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int, int);
/* Eric Brower (ebrower@usa.net)
* Translate SBus interrupt levels to ino values--
* this is used when converting sbus "interrupts" OBP
* node values to "intr" node values, and is platform
* dependent. If only we could call OBP with
* "sbus-intr>cpu (sbint -- ino)" from kernel...
* See .../drivers/sbus/sbus.c for details.
*/
BTFIXUPDEF_CALL(unsigned int, sbint_to_irq, struct sbus_dev *sdev, unsigned int)
#define sbint_to_irq(sdev, sbint) BTFIXUP_CALL(sbint_to_irq)(sdev, sbint)
#endif /* !(_SPARC_SBUS_H) */
......@@ -7,6 +7,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/threads.h> /* NR_CPUS */
#include <linux/thread_info.h>
#include <asm/segment.h>
#include <asm/page.h>
......
......@@ -11,8 +11,6 @@
#ifndef _ASM_THREAD_INFO_H
#define _ASM_THREAD_INFO_H
// XXX todo: comment thread_info components and see what breaks.
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
......
......@@ -75,11 +75,9 @@ static __inline__ void ide_init_default_hwifs(void)
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
* The following is not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1)
#define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0)
/* XXX Known to be broken. Axboe will fix the problems this
* XXX has by making seperate IN/OUT macros for IDE_DATA
......
......@@ -8,12 +8,14 @@
#include <linux/config.h>
#include <linux/threads.h>
#include <linux/cache.h>
#include <asm/asi.h>
#include <asm/starfire.h>
#include <asm/spitfire.h>
#ifndef __ASSEMBLY__
#include <linux/cache.h>
/* PROM provided per-processor information we need
* to start them all up.
*/
......
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