Commit 56263875 authored by David Mosberger's avatar David Mosberger

Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5

into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5
parents 8514206e df786e56
......@@ -544,6 +544,8 @@ source "drivers/pnp/Kconfig"
source "drivers/block/Kconfig"
source "drivers/ide/Kconfig"
source "drivers/ieee1394/Kconfig"
source "drivers/message/i2o/Kconfig"
......@@ -787,6 +789,10 @@ config IA64_EARLY_PRINTK_VGA
bool "Early printk on VGA"
depends on IA64_EARLY_PRINTK
config IA64_EARLY_PRINTK_SGI_SN
bool "Early printk on SGI SN serial console"
depends on IA64_EARLY_PRINTK && (IA64_GENERIC || IA64_SGI_SN2)
config DEBUG_SLAB
bool "Debug memory allocations"
depends on DEBUG_KERNEL
......
......@@ -27,7 +27,7 @@ GCC_MINOR_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' |
GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
arch-cppflags := $(shell arch/ia64/scripts/toolchain-flags $(CC) $(LD) $(OBJDUMP))
arch-cppflags := $(shell arch/ia64/scripts/toolchain-flags $(CC) $(OBJDUMP))
cflags-y += $(arch-cppflags)
AFLAGS += $(arch-cppflags)
......@@ -66,7 +66,8 @@ core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
drivers-$(CONFIG_PCI) += arch/ia64/pci/
drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/
drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ \
arch/ia64/sn/
boot := arch/ia64/boot
......
This diff is collapsed.
......@@ -575,59 +575,6 @@ acpi_find_rsdp (void)
}
#ifdef CONFIG_SERIAL_8250_ACPI
#include <linux/acpi_serial.h>
static int __init
acpi_parse_spcr (unsigned long phys_addr, unsigned long size)
{
acpi_ser_t *spcr;
unsigned int gsi;
if (!phys_addr || !size)
return -EINVAL;
if (!iosapic_register_intr)
return -ENODEV;
/*
* ACPI is able to describe serial ports that live at non-standard
* memory addresses and use non-standard interrupts, either via
* direct SAPIC mappings or via PCI interrupts. We handle interrupt
* routing for SAPIC-based (non-PCI) devices here. Interrupt routing
* for PCI devices will be handled when processing the PCI Interrupt
* Routing Table (PRT).
*/
spcr = (acpi_ser_t *) __va(phys_addr);
setup_serial_acpi(spcr);
if (spcr->length < sizeof(acpi_ser_t))
/* Table not long enough for full info, thus no interrupt */
return -ENODEV;
if ((spcr->base_addr.space_id != ACPI_SERIAL_PCICONF_SPACE) &&
(spcr->int_type == ACPI_SERIAL_INT_SAPIC))
{
int vector;
/* We have a UART in memory space with an SAPIC interrupt */
gsi = ( (spcr->global_int[3] << 24) |
(spcr->global_int[2] << 16) |
(spcr->global_int[1] << 8) |
(spcr->global_int[0]) );
vector = iosapic_register_intr(gsi, IOSAPIC_POL_HIGH, IOSAPIC_EDGE);
}
return 0;
}
#endif /* CONFIG_SERIAL_8250_ACPI */
int __init
acpi_boot_init (void)
{
......@@ -682,16 +629,6 @@ acpi_boot_init (void)
if (acpi_table_parse(ACPI_FADT, acpi_parse_fadt) < 1)
printk(KERN_ERR PREFIX "Can't find FADT\n");
#ifdef CONFIG_SERIAL_8250_ACPI
/*
* TBD: Need phased approach to table parsing (only do those absolutely
* required during boot-up). Recommend expanding concept of fix-
* feature devices (LDM) to include table-based devices such as
* serial ports, EC, SMBus, etc.
*/
acpi_table_parse(ACPI_SPCR, acpi_parse_spcr);
#endif
#ifdef CONFIG_SMP
smp_boot_data.cpu_count = available_cpus;
if (available_cpus == 0) {
......
......@@ -46,7 +46,7 @@ static efi_runtime_services_t *runtime;
* prior to creating their own entries under /proc/efi.
*/
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *efi_dir = NULL;
struct proc_dir_entry *efi_dir;
#endif
static unsigned long mem_limit = ~0UL;
......
......@@ -119,7 +119,7 @@ typedef struct _efivar_entry_t {
*/
static spinlock_t efivars_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(efivar_list);
static struct proc_dir_entry *efi_vars_dir = NULL;
static struct proc_dir_entry *efi_vars_dir;
#define efivar_entry(n) list_entry(n, efivar_entry_t, list)
......
......@@ -199,7 +199,7 @@ GLOBAL_ENTRY(__kernel_sigtramp)
cmp.ne p8,p0=r15,r0 // do we need to switch the rbs?
mov.m r9=ar.bsp // fetch ar.bsp
.spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
(p8) br.cond.spnt setup_rbs // yup -> (clobbers r14, r15, and r16)
(p8) br.cond.spnt setup_rbs // yup -> (clobbers p8, r14-r16, and r18-r20)
back_from_setup_rbs:
alloc r8=ar.pfs,0,0,3,0
ld8 out0=[base0],16 // load arg0 (signum)
......@@ -268,26 +268,30 @@ back_from_restore_rbs:
setup_rbs:
mov ar.rsc=0 // put RSE into enforced lazy mode
;;
.save ar.rnat, r16
mov r16=ar.rnat // save RNaT before switching backing store area
.save ar.rnat, r19
mov r19=ar.rnat // save RNaT before switching backing store area
adds r14=(RNAT_OFF+SIGCONTEXT_OFF),sp
mov r18=ar.bspstore
mov ar.bspstore=r15 // switch over to new register backing store area
;;
.spillsp ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
st8 [r14]=r16 // save sc_ar_rnat
st8 [r14]=r19 // save sc_ar_rnat
.body
adds r14=(LOADRS_OFF+SIGCONTEXT_OFF),sp
mov.m r16=ar.bsp // sc_loadrs <- (new bsp - new bspstore) << 16
adds r14=(LOADRS_OFF+SIGCONTEXT_OFF),sp
;;
invala
sub r15=r16,r15
extr.u r20=r18,3,6
;;
mov ar.rsc=0xf // set RSE into eager mode, pl 3
cmp.eq p8,p0=63,r20
shl r15=r15,16
;;
st8 [r14]=r15 // save sc_loadrs
mov ar.rsc=0xf // set RSE into eager mode, pl 3
(p8) st8 [r18]=r19 // if bspstore points at RNaT slot, store RNaT there now
.restore sp // pop .prologue
br.cond.sptk back_from_setup_rbs
......
......@@ -144,13 +144,13 @@ start_ap:
movl r3=task_for_booting_cpu
;;
ld8 r3=[r3]
movl r2=init_thread_union
movl r2=init_task
;;
cmp.eq isBP,isAP=r3,r0
;;
(isAP) mov r2=r3
#else
movl r2=init_thread_union
movl r2=init_task
cmp.eq isBP,isAP=r0,r0
#endif
;;
......
......@@ -26,17 +26,17 @@ struct mm_struct init_mm = INIT_MM(init_mm);
* We need to make sure that this is properly aligned due to the way process stacks are
* handled. This is done by having a special ".data.init_task" section...
*/
#define init_thread_info init_thread_union.s.thread_info
#define init_thread_info init_task_mem.s.thread_info
union init_thread {
static union {
struct {
struct task_struct task;
struct thread_info thread_info;
} s;
unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
} init_thread_union __attribute__((section(".data.init_task"))) = {{
.task = INIT_TASK(init_thread_union.s.task),
.thread_info = INIT_THREAD_INFO(init_thread_union.s.task)
} init_task_mem __attribute__((section(".data.init_task"))) = {{
.task = INIT_TASK(init_task_mem.s.task),
.thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
}};
asm (".global init_task; init_task = init_thread_union");
asm (".global init_task; init_task = init_task_mem");
......@@ -382,7 +382,7 @@ iosapic_startup_edge_irq (unsigned int irq)
static void
iosapic_ack_edge_irq (unsigned int irq)
{
irq_desc_t *idesc = irq_desc(irq);
irq_desc_t *idesc = irq_descp(irq);
/*
* Once we have recorded IRQ_PENDING already, we can mask the
* interrupt for real. This prevents IRQ storms from unhandled
......@@ -478,7 +478,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
else
irq_type = &irq_type_iosapic_level;
idesc = irq_desc(vector);
idesc = irq_descp(vector);
if (idesc->handler != irq_type) {
if (idesc->handler != &no_irq_type)
printk(KERN_WARNING "%s: changing vector %d from %s to %s\n",
......@@ -724,7 +724,7 @@ iosapic_parse_prt (void)
* If vector was previously initialized to a different
* handler, re-initialize.
*/
idesc = irq_desc(vector);
idesc = irq_descp(vector);
if (idesc->handler != irq_type)
register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
IOSAPIC_LEVEL);
......
......@@ -74,7 +74,7 @@ irq_desc_t _irq_desc[NR_IRQS] __cacheline_aligned = {
};
#ifdef CONFIG_IA64_GENERIC
struct irq_desc * __ia64_irq_desc (unsigned int irq)
irq_desc_t * __ia64_irq_desc (unsigned int irq)
{
return _irq_desc + irq;
}
......@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n');
for (i = 0 ; i < NR_IRQS ; i++) {
idesc = irq_desc(i);
idesc = irq_descp(i);
spin_lock_irqsave(&idesc->lock, flags);
action = idesc->action;
if (!action)
......@@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, void *v)
#ifdef CONFIG_SMP
inline void synchronize_irq(unsigned int irq)
{
while (irq_desc(irq)->status & IRQ_INPROGRESS)
while (irq_descp(irq)->status & IRQ_INPROGRESS)
cpu_relax();
}
#endif
......@@ -352,7 +352,7 @@ static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret)
inline void disable_irq_nosync(unsigned int irq)
{
irq_desc_t *desc = irq_desc(irq);
irq_desc_t *desc = irq_descp(irq);
unsigned long flags;
spin_lock_irqsave(&desc->lock, flags);
......@@ -395,7 +395,7 @@ void disable_irq(unsigned int irq)
void enable_irq(unsigned int irq)
{
irq_desc_t *desc = irq_desc(irq);
irq_desc_t *desc = irq_descp(irq);
unsigned long flags;
spin_lock_irqsave(&desc->lock, flags);
......@@ -437,7 +437,7 @@ unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs)
* 0 return value means that this irq is already being
* handled by some other CPU. (or is disabled)
*/
irq_desc_t *desc = irq_desc(irq);
irq_desc_t *desc = irq_descp(irq);
struct irqaction * action;
irqreturn_t action_ret;
unsigned int status;
......@@ -620,7 +620,7 @@ void free_irq(unsigned int irq, void *dev_id)
if (irq >= NR_IRQS)
return;
desc = irq_desc(irq);
desc = irq_descp(irq);
spin_lock_irqsave(&desc->lock,flags);
p = &desc->action;
for (;;) {
......@@ -682,7 +682,7 @@ unsigned long probe_irq_on(void)
* flush such a longstanding irq before considering it as spurious.
*/
for (i = NR_IRQS-1; i > 0; i--) {
desc = irq_desc(i);
desc = irq_descp(i);
spin_lock_irq(&desc->lock);
if (!desc->action)
......@@ -700,7 +700,7 @@ unsigned long probe_irq_on(void)
* happened in the previous stage, it may have masked itself)
*/
for (i = NR_IRQS-1; i > 0; i--) {
desc = irq_desc(i);
desc = irq_descp(i);
spin_lock_irq(&desc->lock);
if (!desc->action) {
......@@ -722,7 +722,7 @@ unsigned long probe_irq_on(void)
*/
val = 0;
for (i = 0; i < NR_IRQS; i++) {
irq_desc_t *desc = irq_desc(i);
irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
......@@ -762,7 +762,7 @@ unsigned int probe_irq_mask(unsigned long val)
mask = 0;
for (i = 0; i < 16; i++) {
irq_desc_t *desc = irq_desc(i);
irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
......@@ -807,7 +807,7 @@ int probe_irq_off(unsigned long val)
nr_irqs = 0;
irq_found = 0;
for (i = 0; i < NR_IRQS; i++) {
irq_desc_t *desc = irq_desc(i);
irq_desc_t *desc = irq_descp(i);
unsigned int status;
spin_lock_irq(&desc->lock);
......@@ -836,7 +836,7 @@ int setup_irq(unsigned int irq, struct irqaction * new)
int shared = 0;
unsigned long flags;
struct irqaction *old, **p;
irq_desc_t *desc = irq_desc(irq);
irq_desc_t *desc = irq_descp(irq);
if (desc->handler == &no_irq_type)
return -ENOSYS;
......@@ -963,15 +963,16 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off,
}
static int irq_affinity_write_proc (struct file *file, const char *buffer,
unsigned long count, void *data)
unsigned long count, void *data)
{
unsigned int irq = (unsigned long) data;
int full_count = count, err;
unsigned long new_value;
const char *buf = buffer;
irq_desc_t *desc = irq_descp(irq);
int redir;
if (!irq_desc(irq)->handler->set_affinity)
if (!desc->handler->set_affinity)
return -EIO;
if (buf[0] == 'r' || buf[0] == 'R') {
......@@ -993,8 +994,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
if (!(new_value & cpu_online_map))
return -EINVAL;
irq_desc(irq)->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value);
desc->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value);
return full_count;
}
......@@ -1030,7 +1030,7 @@ static void register_irq_proc (unsigned int irq)
{
char name [MAX_NAMELEN];
if (!root_irq_dir || (irq_desc(irq)->handler == &no_irq_type) || irq_dir[irq])
if (!root_irq_dir || (irq_descp(irq)->handler == &no_irq_type) || irq_dir[irq])
return;
memset(name, 0, MAX_NAMELEN);
......@@ -1083,7 +1083,7 @@ void init_irq_proc (void)
* Create entries for all existing IRQs.
*/
for (i = 0; i < NR_IRQS; i++) {
if (irq_desc(i)->handler == &no_irq_type)
if (irq_descp(i)->handler == &no_irq_type)
continue;
register_irq_proc(i);
}
......
......@@ -162,7 +162,7 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action)
for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == vec) {
desc = irq_desc(irq);
desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_ia64_lsapic;
if (action)
......
......@@ -734,7 +734,7 @@ ia64_mca_init(void)
if (cpev >= 0) {
for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == cpev) {
desc = irq_desc(irq);
desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_iosapic_level;
setup_irq(irq, &mca_cpe_irqaction);
......
This diff is collapsed.
......@@ -452,7 +452,7 @@ smp_build_cpu_map (void)
sapicid = smp_boot_data.cpu_phys_id[i];
if (sapicid == boot_cpu_id)
continue;
phys_cpu_present_map |= (1 << cpu);
phys_cpu_present_map |= (1UL << cpu);
ia64_cpu_to_sapicid[cpu] = sapicid;
cpu++;
}
......
......@@ -12,12 +12,7 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
lib-$(CONFIG_PERFMON) += carta_random.o
ifeq ($(CONFIG_MD_RAID5),m)
lib-y += xor.o
else
lib-$(CONFIG_MD_RAID5) += xor.o
endif
lib-$(CONFIG_MD_RAID5) += xor.o
IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
__divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
......
......@@ -364,8 +364,6 @@ pcibios_fixup_bus (struct pci_bus *b)
return;
}
#warning pcibios_update_resource() is now a generic implementation - please check
void __devinit
pcibios_update_irq (struct pci_dev *dev, int irq)
{
......
......@@ -3,15 +3,13 @@
# Check whether linker can handle cross-segment @segrel():
#
CC=$1
LD=$2
OBJDUMP=$3
OBJDUMP=$2
dir=$(dirname $0)
tmp=${TMPDIR:-/tmp}
out=$tmp/out$$
$CC -c $dir/check-segrel.S -o $out.o
$LD -static -T$dir/check-segrel.lds $out.o -o $out
$CC -nostdlib -static -Wl,-T$dir/check-segrel.lds $dir/check-segrel.S -o $out
res=$($OBJDUMP --full --section .rodata $out | fgrep 000 | cut -f3 -d' ')
rm -f $out $out.o
rm -f $out
if [ $res != 00000a00 ]; then
echo " -DHAVE_BUGGY_SEGREL"
cat >&2 <<EOF
......
......@@ -9,4 +9,4 @@
EXTRA_CFLAGS := -DLITTLE_ENDIAN
obj-y += ioconfig_bus.o ifconfig_net.o
obj-y += ioconfig_bus.o
/* $Id: ifconfig_net.c,v 1.1 2002/02/28 17:31:25 marcelo Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* ifconfig_net - SGI's Persistent Network Device names.
*
* Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
#include <linux/types.h>
#include <linux/config.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <asm/sn/sgi.h>
#include <linux/devfs_fs.h>
#include <linux/devfs_fs_kernel.h>
#include <asm/io.h>
#include <asm/sn/iograph.h>
#include <asm/sn/invent.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/ifconfig_net.h>
#define SGI_IFCONFIG_NET "SGI-PERSISTENT NETWORK DEVICE NAME DRIVER"
#define SGI_IFCONFIG_NET_VERSION "1.0"
/*
* Some Global definitions.
*/
static devfs_handle_t ifconfig_net_handle;
static unsigned long ifconfig_net_debug;
/*
* ifconfig_net_open - Opens the special device node "/devhw/.ifconfig_net".
*/
static int ifconfig_net_open(struct inode * inode, struct file * filp)
{
if (ifconfig_net_debug) {
printk("ifconfig_net_open called.\n");
}
return(0);
}
/*
* ifconfig_net_close - Closes the special device node "/devhw/.ifconfig_net".
*/
static int ifconfig_net_close(struct inode * inode, struct file * filp)
{
if (ifconfig_net_debug) {
printk("ifconfig_net_close called.\n");
}
return(0);
}
/*
* assign_ifname - Assign the next available interface name from the persistent list.
*/
void
assign_ifname(struct net_device *dev,
struct ifname_num *ifname_num)
{
/*
* Handle eth devices.
*/
if ( (memcmp(dev->name, "eth", 3) == 0) ) {
if (ifname_num->next_eth != -1) {
/*
* Assign it the next available eth interface number.
*/
memset(dev->name, 0, strlen(dev->name));
sprintf(dev->name, "eth%d", (int)ifname_num->next_eth);
ifname_num->next_eth++;
}
return;
}
/*
* Handle fddi devices.
*/
if ( (memcmp(dev->name, "fddi", 4) == 0) ) {
if (ifname_num->next_fddi != -1) {
/*
* Assign it the next available fddi interface number.
*/
memset(dev->name, 0, strlen(dev->name));
sprintf(dev->name, "fddi%d", (int)ifname_num->next_fddi);
ifname_num->next_fddi++;
}
return;
}
/*
* Handle hip devices.
*/
if ( (memcmp(dev->name, "hip", 3) == 0) ) {
if (ifname_num->next_hip != -1) {
/*
* Assign it the next available hip interface number.
*/
memset(dev->name, 0, strlen(dev->name));
sprintf(dev->name, "hip%d", (int)ifname_num->next_hip);
ifname_num->next_hip++;
}
return;
}
/*
* Handle tr devices.
*/
if ( (memcmp(dev->name, "tr", 2) == 0) ) {
if (ifname_num->next_tr != -1) {
/*
* Assign it the next available tr interface number.
*/
memset(dev->name, 0, strlen(dev->name));
sprintf(dev->name, "tr%d", (int)ifname_num->next_tr);
ifname_num->next_tr++;
}
return;
}
/*
* Handle fc devices.
*/
if ( (memcmp(dev->name, "fc", 2) == 0) ) {
if (ifname_num->next_fc != -1) {
/*
* Assign it the next available fc interface number.
*/
memset(dev->name, 0, strlen(dev->name));
sprintf(dev->name, "fc%d", (int)ifname_num->next_fc);
ifname_num->next_fc++;
}
return;
}
}
/*
* find_persistent_ifname: Returns the entry that was seen in previous boot.
*/
struct ifname_MAC *
find_persistent_ifname(struct net_device *dev,
struct ifname_MAC *ifname_MAC)
{
while (ifname_MAC->addr_len) {
if (memcmp(dev->dev_addr, ifname_MAC->dev_addr, dev->addr_len) == 0)
return(ifname_MAC);
ifname_MAC++;
}
return(NULL);
}
/*
* ifconfig_net_ioctl: ifconfig_net driver ioctl interface.
*/
static int ifconfig_net_ioctl(struct inode * inode, struct file * file,
unsigned int cmd, unsigned long arg)
{
extern struct net_device *__dev_get_by_name(const char *);
#ifdef CONFIG_NET
struct net_device *dev;
struct ifname_MAC *found;
char temp[64];
#endif
struct ifname_MAC *ifname_MAC;
struct ifname_MAC *new_devices, *temp_new_devices;
struct ifname_num *ifname_num;
unsigned long size;
if (ifconfig_net_debug) {
printk("HCL: hcl_ioctl called.\n");
}
/*
* Read in the header and see how big of a buffer we really need to
* allocate.
*/
ifname_num = (struct ifname_num *) kmalloc(sizeof(struct ifname_num),
GFP_KERNEL);
copy_from_user( ifname_num, (char *) arg, sizeof(struct ifname_num));
size = ifname_num->size;
kfree(ifname_num);
ifname_num = (struct ifname_num *) kmalloc(size, GFP_KERNEL);
ifname_MAC = (struct ifname_MAC *) ((char *)ifname_num + (sizeof(struct ifname_num)) );
copy_from_user( ifname_num, (char *) arg, size);
new_devices = kmalloc(size - sizeof(struct ifname_num), GFP_KERNEL);
temp_new_devices = new_devices;
memset(new_devices, 0, size - sizeof(struct ifname_num));
#ifdef CONFIG_NET
/*
* Go through the net device entries and make them persistent!
*/
for (dev = dev_base; dev != NULL; dev = dev->next) {
/*
* Skip NULL entries or "lo"
*/
if ( (dev->addr_len == 0) || ( !strncmp(dev->name, "lo", strlen(dev->name))) ){
continue;
}
/*
* See if we have a persistent interface name for this device.
*/
found = NULL;
found = find_persistent_ifname(dev, ifname_MAC);
if (found) {
strcpy(dev->name, found->name);
} else {
/* Never seen this before .. */
assign_ifname(dev, ifname_num);
/*
* Save the information for the next boot.
*/
sprintf(temp,"%s %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
strcpy(temp_new_devices->name, dev->name);
temp_new_devices->addr_len = dev->addr_len;
memcpy(temp_new_devices->dev_addr, dev->dev_addr, dev->addr_len);
temp_new_devices++;
}
}
#endif
/*
* Copy back to the User Buffer area any new devices encountered.
*/
copy_to_user((char *)arg + (sizeof(struct ifname_num)), new_devices,
size - sizeof(struct ifname_num));
return(0);
}
struct file_operations ifconfig_net_fops = {
ioctl:ifconfig_net_ioctl, /* ioctl */
open:ifconfig_net_open, /* open */
release:ifconfig_net_close /* release */
};
/*
* init_ifconfig_net() - Boot time initialization. Ensure that it is called
* after devfs has been initialized.
*
*/
#ifdef MODULE
int init_module (void)
#else
int __init init_ifconfig_net(void)
#endif
{
ifconfig_net_handle = NULL;
ifconfig_net_handle = hwgraph_register(hwgraph_root, ".ifconfig_net",
0, 0,
0, 0,
S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, 0, 0,
&ifconfig_net_fops, NULL);
if (ifconfig_net_handle == NULL) {
panic("Unable to create SGI PERSISTENT NETWORK DEVICE Name Driver.\n");
}
return(0);
}
......@@ -113,22 +113,10 @@ static int hcl_ioctl(struct inode * inode, struct file * file,
}
struct file_operations hcl_fops = {
(struct module *)0,
NULL, /* lseek - default */
NULL, /* read - general block-dev read */
NULL, /* write - general block-dev write */
NULL, /* readdir - bad */
NULL, /* poll */
hcl_ioctl, /* ioctl */
NULL, /* mmap */
hcl_open, /* open */
NULL, /* flush */
hcl_close, /* release */
NULL, /* fsync */
NULL, /* fasync */
NULL, /* lock */
NULL, /* readv */
NULL, /* writev */
.owner = (struct module *)0,
.ioctl = hcl_ioctl,
.open = hcl_open,
.release = hcl_close,
};
......@@ -140,7 +128,6 @@ int __init init_hcl(void)
{
extern void string_table_init(struct string_table *);
extern struct string_table label_string_table;
extern int init_ifconfig_net(void);
extern int init_ioconfig_bus(void);
extern int init_hwgfs_fs(void);
int rv = 0;
......@@ -195,7 +182,6 @@ int __init init_hcl(void)
* Initialize the ifconfgi_net driver that does network devices
* Persistent Naming.
*/
init_ifconfig_net();
init_ioconfig_bus();
return(0);
......@@ -258,6 +244,7 @@ hwgraph_fastinfo_get(vertex_hdl_t de)
if (!de) {
printk(KERN_WARNING "HCL: hwgraph_fastinfo_get handle given is NULL.\n");
dump_stack();
return(-1);
}
......@@ -568,7 +555,7 @@ hwgraph_edge_add(vertex_hdl_t from, vertex_hdl_t to, char *name)
* In this case the vertex was previous created with a REAL pathname.
*/
rv = hwgfs_mk_symlink (from, (const char *)name,
DEVFS_FL_DEFAULT, link,
0, link,
&handle, NULL);
kfree(path);
kfree(link);
......
......@@ -49,6 +49,8 @@ int sn_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size,
vertex_hdl_t device_vertex;
device_vertex = devfn_to_vertex(bus->number, devfn);
if (!device_vertex)
return PCIBIOS_DEVICE_NOT_FOUND;
res = pciio_config_get(device_vertex, (unsigned) where, size);
*val = (unsigned int) res;
return PCIBIOS_SUCCESSFUL;
......@@ -59,6 +61,8 @@ int sn_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size
vertex_hdl_t device_vertex;
device_vertex = devfn_to_vertex(bus->number, devfn);
if (!device_vertex)
return PCIBIOS_DEVICE_NOT_FOUND;
pciio_config_set( device_vertex, (unsigned)where, size, (uint64_t) val);
return PCIBIOS_SUCCESSFUL;
}
......
......@@ -280,7 +280,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
*/
for (i = 0; i < nents; i++, sg++) {
phys_addr = __pa(sg->dma_address ? sg->dma_address :
page_address(sg->page) + sg->offset);
(unsigned long)page_address(sg->page) + sg->offset);
/*
* Handle the most common case: 64 bit cards. This
......@@ -578,7 +578,7 @@ sn_dma_supported(struct device *dev, u64 mask)
{
BUG_ON(dev->bus != &pci_bus_type);
return pci_dma_supported(to_pci_dev(dev), mask);
return sn_pci_dma_supported(to_pci_dev(dev), mask);
}
EXPORT_SYMBOL(sn_dma_supported);
......@@ -587,7 +587,11 @@ sn_dma_set_mask(struct device *dev, u64 dma_mask)
{
BUG_ON(dev->bus != &pci_bus_type);
return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
if (!sn_dma_supported(dev, dma_mask))
return 0;
dev->dma_mask = dma_mask;
return 1;
}
EXPORT_SYMBOL(sn_dma_set_mask);
......@@ -597,7 +601,7 @@ sn_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
{
BUG_ON(dev->bus != &pci_bus_type);
return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
return sn_pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
}
EXPORT_SYMBOL(sn_dma_alloc_coherent);
......@@ -607,7 +611,7 @@ sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
{
BUG_ON(dev->bus != &pci_bus_type);
pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle);
sn_pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle);
}
EXPORT_SYMBOL(sn_dma_free_coherent);
......@@ -617,7 +621,7 @@ sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
{
BUG_ON(dev->bus != &pci_bus_type);
return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction);
return sn_pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_map_single);
......@@ -627,7 +631,7 @@ sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
{
BUG_ON(dev->bus != &pci_bus_type);
pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction);
sn_pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_unmap_single);
......@@ -658,7 +662,7 @@ sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
{
BUG_ON(dev->bus != &pci_bus_type);
return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction);
return sn_pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction);
}
EXPORT_SYMBOL(sn_dma_map_sg);
......@@ -668,7 +672,7 @@ sn_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
{
BUG_ON(dev->bus != &pci_bus_type);
pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction);
sn_pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction);
}
EXPORT_SYMBOL(sn_dma_unmap_sg);
......@@ -678,7 +682,7 @@ sn_dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
{
BUG_ON(dev->bus != &pci_bus_type);
pci_dma_sync_single(to_pci_dev(dev), dma_handle, size, (int)direction);
sn_pci_dma_sync_single(to_pci_dev(dev), dma_handle, size, (int)direction);
}
EXPORT_SYMBOL(sn_dma_sync_single);
......@@ -688,7 +692,7 @@ sn_dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
{
BUG_ON(dev->bus != &pci_bus_type);
pci_dma_sync_sg(to_pci_dev(dev), sg, nelems, (int)direction);
sn_pci_dma_sync_sg(to_pci_dev(dev), sg, nelems, (int)direction);
}
EXPORT_SYMBOL(sn_dma_sync_sg);
......
......@@ -9,7 +9,8 @@
EXTRA_CFLAGS := -DLITTLE_ENDIAN
obj-y := probe.o setup.o sv.o bte.o irq.o mca.o sn2/
obj-y := probe.o setup.o sv.o bte.o irq.o mca.o \
idle.o sn2/
obj-$(CONFIG_IA64_GENERIC) += machvec.o
obj-$(CONFIG_MODULES) += sn_ksyms.o
......@@ -12,7 +12,7 @@
void snidle(int state) {
if (state) {
if (pda.idle_flag == 0) {
if (pda->idle_flag == 0) {
/*
* Turn the activity LED off.
*/
......@@ -24,13 +24,13 @@ void snidle(int state) {
SIMULATOR_SLEEP();
#endif
pda.idle_flag = 1;
pda->idle_flag = 1;
} else {
/*
* Turn the activity LED on.
*/
set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
pda.idle_flag = 0;
pda->idle_flag = 0;
}
}
......@@ -31,4 +31,5 @@
*/
#define MACHVEC_PLATFORM_NAME sn2
#define MACHVEC_PLATFORM_HEADER <asm/machvec_sn2.h>
#include <asm/machvec_init.h>
......@@ -75,11 +75,13 @@ DEFINE_PER_CPU(struct pda_s, pda_percpu);
#define pxm_to_nasid(pxm) ((pxm)<<1)
#define MAX_PHYS_MEMORY (1UL << 49) /* 1 TB */
extern void bte_init_node (nodepda_t *, cnodeid_t);
extern void bte_init_cpu (void);
extern void sn_timer_init (void);
extern void sn_timer_init(void);
extern void (*ia64_mark_idle)(int);
void snidle(int);
extern void snidle(int);
unsigned long sn_rtc_cycles_per_second;
......@@ -296,21 +298,20 @@ sn_setup(char **cmdline_p)
*/
sn_check_for_wars();
ia64_mark_idle = &snidle;
/*
* For the bootcpu, we do this here. All other cpus will make the
* call as part of cpu_init in slave cpu initialization.
*/
sn_cpu_init();
#ifdef CONFIG_SMP
init_smp_config();
#endif
screen_info = sn_screen_info;
sn_timer_init();
ia64_mark_idle = &snidle;
}
/**
......@@ -438,19 +439,3 @@ sn_cpu_init(void)
bte_init_cpu();
}
void snidle(int idleness)
{
if (!idleness) {
if (pda->idle_flag == 0) {
set_led_bits(0, LED_CPU_ACTIVITY);
}
pda->idle_flag = 1;
}
else {
set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
pda->idle_flag = 0;
}
}
......@@ -4,7 +4,7 @@
/*
* IA-64 specific AGP definitions.
*
* Copyright (C) 2002 Hewlett-Packard Co
* Copyright (C) 2002-2003 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
......@@ -18,7 +18,4 @@
#define flush_agp_mappings() /* nothing */
#define flush_agp_cache() mb()
/* Page-protection value to be used for AGP memory mapped into kernel space. */
#define PAGE_AGP PAGE_KERNEL
#endif /* _ASM_IA64_AGP_H */
......@@ -2,7 +2,7 @@
#define _ASM_IA64_HW_IRQ_H
/*
* Copyright (C) 2001-2002 Hewlett-Packard Co
* Copyright (C) 2001-2003 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
......@@ -91,10 +91,10 @@ hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector)
* Default implementations for the irq-descriptor API:
*/
extern struct irq_desc _irq_desc[NR_IRQS];
extern irq_desc_t _irq_desc[NR_IRQS];
#ifndef CONFIG_IA64_GENERIC
static inline struct irq_desc *
static inline irq_desc_t *
__ia64_irq_desc (unsigned int irq)
{
return _irq_desc + irq;
......@@ -124,8 +124,8 @@ __ia64_local_vector_to_irq (ia64_vector vec)
*/
/* Return a pointer to the irq descriptor for IRQ. */
static inline struct irq_desc *
irq_desc (int irq)
static inline irq_desc_t *
irq_descp (int irq)
{
return platform_irq_desc(irq);
}
......
......@@ -37,7 +37,6 @@ struct thread_info {
struct restart_block restart_block;
};
#define INIT_THREAD_SIZE /* tell sched.h not to declare the thread_union */
#define THREAD_SIZE KERNEL_STACK_SIZE
#define INIT_THREAD_INFO(tsk) \
......
......@@ -15,8 +15,15 @@
typedef unsigned long cycles_t;
/*
* Something low processor frequency like 100Mhz but
* yet multiple of HZ to avoid truncation in some formulas.
* For performance reasons, we don't want to define CLOCK_TICK_TRATE as
* local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George
* Anzinger, 1/CLOCK_TICK_RATE is taken as the resolution of the timer clock. The time
* calculation assumes that you will use enough of these so that your tick size <= 1/HZ.
* If the calculation shows that your CLOCK_TICK_RATE can not supply exactly 1/HZ ticks,
* the actual value is calculated and used to update the wall clock each jiffie. Setting
* the CLOCK_TICK_RATE to x*HZ insures that the calculation will find no errors. Hence we
* pick a multiple of HZ which gives us a (totally virtual) CLOCK_TICK_RATE of about
* 100MHz.
*/
#define CLOCK_TICK_RATE (HZ * 100000UL)
......
......@@ -39,6 +39,7 @@
*/
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <asm/processor.h>
#include <asm/tlbflush.h>
......
......@@ -28,11 +28,6 @@
*/
#define node_to_cpumask(node) (node_to_cpu_mask[node])
#else
#define cpu_to_node(cpu) (0)
#define node_to_cpumask(node) (phys_cpu_present_map)
#endif
/*
* Returns the number of the node containing MemBlk 'memblk'
*/
......@@ -65,4 +60,8 @@
void build_cpu_to_node_map(void);
#endif /* CONFIG_NUMA */
#include <asm-generic/topology.h>
#endif /* _ASM_IA64_TOPOLOGY_H */
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