Commit 0e670506 authored by Linus Torvalds's avatar Linus Torvalds
parents 238523e1 bf7ececa
This diff is collapsed.
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.14-rc1 # Linux kernel version: 2.6.15-rc4
# Wed Sep 14 15:17:57 2005 # Fri Dec 2 16:06:32 2005
# #
# #
...@@ -58,18 +58,37 @@ CONFIG_MODULE_SRCVERSION_ALL=y ...@@ -58,18 +58,37 @@ CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y CONFIG_STOP_MACHINE=y
#
# Block layer
#
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
# #
# Processor type and features # Processor type and features
# #
CONFIG_IA64=y CONFIG_IA64=y
CONFIG_64BIT=y CONFIG_64BIT=y
CONFIG_MMU=y CONFIG_MMU=y
CONFIG_SWIOTLB=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_TIME_INTERPOLATION=y CONFIG_TIME_INTERPOLATION=y
CONFIG_EFI=y CONFIG_EFI=y
CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_IOMAP=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ZONE_DMA_IS_DMA32=y
# CONFIG_IA64_GENERIC is not set # CONFIG_IA64_GENERIC is not set
CONFIG_IA64_DIG=y CONFIG_IA64_DIG=y
# CONFIG_IA64_HP_ZX1 is not set # CONFIG_IA64_HP_ZX1 is not set
...@@ -82,18 +101,16 @@ CONFIG_MCKINLEY=y ...@@ -82,18 +101,16 @@ CONFIG_MCKINLEY=y
# CONFIG_IA64_PAGE_SIZE_8KB is not set # CONFIG_IA64_PAGE_SIZE_8KB is not set
CONFIG_IA64_PAGE_SIZE_16KB=y CONFIG_IA64_PAGE_SIZE_16KB=y
# CONFIG_IA64_PAGE_SIZE_64KB is not set # CONFIG_IA64_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set # CONFIG_HZ_100 is not set
CONFIG_HZ_250=y CONFIG_HZ_250=y
# CONFIG_HZ_1000 is not set # CONFIG_HZ_1000 is not set
CONFIG_HZ=250 CONFIG_HZ=250
CONFIG_IA64_L1_CACHE_SHIFT=7 CONFIG_IA64_L1_CACHE_SHIFT=7
# CONFIG_NUMA is not set
CONFIG_VIRTUAL_MEM_MAP=y
CONFIG_HOLES_IN_ZONE=y
CONFIG_IA64_CYCLONE=y CONFIG_IA64_CYCLONE=y
CONFIG_IOSAPIC=y CONFIG_IOSAPIC=y
# CONFIG_IA64_SGI_SN_XP is not set CONFIG_FORCE_MAX_ZONEORDER=17
CONFIG_FORCE_MAX_ZONEORDER=18
CONFIG_SMP=y CONFIG_SMP=y
CONFIG_NR_CPUS=4 CONFIG_NR_CPUS=4
CONFIG_HOTPLUG_CPU=y CONFIG_HOTPLUG_CPU=y
...@@ -106,7 +123,13 @@ CONFIG_FLATMEM_MANUAL=y ...@@ -106,7 +123,13 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set # CONFIG_SPARSEMEM_STATIC is not set
CONFIG_HAVE_DEC_LOCK=y CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_VIRTUAL_MEM_MAP=y
CONFIG_HOLES_IN_ZONE=y
CONFIG_IA32_SUPPORT=y CONFIG_IA32_SUPPORT=y
CONFIG_COMPAT=y CONFIG_COMPAT=y
CONFIG_IA64_MCA_RECOVERY=y CONFIG_IA64_MCA_RECOVERY=y
...@@ -118,7 +141,6 @@ CONFIG_IA64_PALINFO=y ...@@ -118,7 +141,6 @@ CONFIG_IA64_PALINFO=y
# #
CONFIG_EFI_VARS=y CONFIG_EFI_VARS=y
CONFIG_EFI_PCDP=y CONFIG_EFI_PCDP=y
# CONFIG_DELL_RBU is not set
CONFIG_BINFMT_ELF=y CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m CONFIG_BINFMT_MISC=m
...@@ -126,6 +148,7 @@ CONFIG_BINFMT_MISC=m ...@@ -126,6 +148,7 @@ CONFIG_BINFMT_MISC=m
# Power management and ACPI # Power management and ACPI
# #
CONFIG_PM=y CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set # CONFIG_PM_DEBUG is not set
# #
...@@ -226,14 +249,16 @@ CONFIG_TCP_CONG_BIC=y ...@@ -226,14 +249,16 @@ CONFIG_TCP_CONG_BIC=y
# CONFIG_NET_DIVERT is not set # CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set # CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set # CONFIG_WAN_ROUTER is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set # CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set
# #
# Network testing # Network testing
# #
# CONFIG_NET_PKTGEN is not set # CONFIG_NET_PKTGEN is not set
# CONFIG_NETFILTER_NETLINK is not set
# CONFIG_HAMRADIO is not set # CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set # CONFIG_IRDA is not set
# CONFIG_BT is not set # CONFIG_BT is not set
...@@ -295,14 +320,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 ...@@ -295,14 +320,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set # CONFIG_CDROM_PKTCDVD is not set
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_ATA_OVER_ETH is not set # CONFIG_ATA_OVER_ETH is not set
# #
...@@ -400,6 +417,7 @@ CONFIG_SCSI_FC_ATTRS=y ...@@ -400,6 +417,7 @@ CONFIG_SCSI_FC_ATTRS=y
# #
# SCSI low-level drivers # SCSI low-level drivers
# #
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_ACARD is not set
...@@ -409,6 +427,7 @@ CONFIG_SCSI_FC_ATTRS=y ...@@ -409,6 +427,7 @@ CONFIG_SCSI_FC_ATTRS=y
# CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC79XX is not set
# CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_SATA is not set # CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set
...@@ -424,7 +443,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 ...@@ -424,7 +443,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
CONFIG_SCSI_QLOGIC_FC=y CONFIG_SCSI_QLOGIC_FC=y
# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
CONFIG_SCSI_QLOGIC_1280=y CONFIG_SCSI_QLOGIC_1280=y
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
CONFIG_SCSI_QLA2XXX=y CONFIG_SCSI_QLA2XXX=y
CONFIG_SCSI_QLA21XX=m CONFIG_SCSI_QLA21XX=m
CONFIG_SCSI_QLA22XX=m CONFIG_SCSI_QLA22XX=m
...@@ -463,6 +481,7 @@ CONFIG_DM_ZERO=m ...@@ -463,6 +481,7 @@ CONFIG_DM_ZERO=m
CONFIG_FUSION=y CONFIG_FUSION=y
CONFIG_FUSION_SPI=y CONFIG_FUSION_SPI=y
CONFIG_FUSION_FC=y CONFIG_FUSION_FC=y
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128 CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_CTL=y CONFIG_FUSION_CTL=y
...@@ -503,6 +522,7 @@ CONFIG_NET_ETHERNET=y ...@@ -503,6 +522,7 @@ CONFIG_NET_ETHERNET=y
CONFIG_MII=m CONFIG_MII=m
# CONFIG_HAPPYMEAL is not set # CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set # CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_3COM is not set
# #
...@@ -727,6 +747,7 @@ CONFIG_MAX_RAW_DEVS=256 ...@@ -727,6 +747,7 @@ CONFIG_MAX_RAW_DEVS=256
# TPM devices # TPM devices
# #
# CONFIG_TCG_TPM is not set # CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
# #
# I2C support # I2C support
...@@ -812,12 +833,15 @@ CONFIG_USB_UHCI_HCD=y ...@@ -812,12 +833,15 @@ CONFIG_USB_UHCI_HCD=y
# #
# USB Device Class drivers # USB Device Class drivers
# #
# CONFIG_USB_BLUETOOTH_TTY is not set
# CONFIG_USB_ACM is not set # CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set # CONFIG_USB_PRINTER is not set
# #
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
#
# may also be needed; see USB_STORAGE Help for more information
# #
CONFIG_USB_STORAGE=m CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DEBUG is not set
...@@ -1123,9 +1147,10 @@ CONFIG_GENERIC_IRQ_PROBE=y ...@@ -1123,9 +1147,10 @@ CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_PENDING_IRQ=y
# #
# Profiling support # Instrumentation Support
# #
# CONFIG_PROFILING is not set # CONFIG_PROFILING is not set
# CONFIG_KPROBES is not set
# #
# Kernel hacking # Kernel hacking
...@@ -1142,7 +1167,8 @@ CONFIG_DETECT_SOFTLOCKUP=y ...@@ -1142,7 +1167,8 @@ CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_FS is not set
# CONFIG_KPROBES is not set # CONFIG_DEBUG_VM is not set
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_IA64_GRANULE_16MB=y CONFIG_IA64_GRANULE_16MB=y
# CONFIG_IA64_GRANULE_64MB is not set # CONFIG_IA64_GRANULE_64MB is not set
# CONFIG_IA64_PRINT_HAZARDS is not set # CONFIG_IA64_PRINT_HAZARDS is not set
......
...@@ -261,8 +261,6 @@ elf32_set_personality (void) ...@@ -261,8 +261,6 @@ elf32_set_personality (void)
{ {
set_personality(PER_LINUX32); set_personality(PER_LINUX32);
current->thread.map_base = IA32_PAGE_OFFSET/3; current->thread.map_base = IA32_PAGE_OFFSET/3;
current->thread.task_size = IA32_PAGE_OFFSET; /* use what Linux/x86 uses... */
set_fs(USER_DS); /* set addr limit for new TASK_SIZE */
} }
static unsigned long static unsigned long
......
...@@ -305,7 +305,6 @@ struct old_linux32_dirent { ...@@ -305,7 +305,6 @@ struct old_linux32_dirent {
#define ELF_DATA ELFDATA2LSB #define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386 #define ELF_ARCH EM_386
#define IA32_PAGE_OFFSET 0xc0000000
#define IA32_STACK_TOP IA32_PAGE_OFFSET #define IA32_STACK_TOP IA32_PAGE_OFFSET
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET #define IA32_GATE_OFFSET IA32_PAGE_OFFSET
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE #define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
......
...@@ -721,8 +721,11 @@ flush_thread (void) ...@@ -721,8 +721,11 @@ flush_thread (void)
/* drop floating-point and debug-register state if it exists: */ /* drop floating-point and debug-register state if it exists: */
current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
ia64_drop_fpu(current); ia64_drop_fpu(current);
if (IS_IA32_PROCESS(ia64_task_regs(current))) if (IS_IA32_PROCESS(ia64_task_regs(current))) {
ia32_drop_partial_page_list(current); ia32_drop_partial_page_list(current);
current->thread.task_size = IA32_PAGE_OFFSET;
set_fs(USER_DS);
}
} }
/* /*
......
...@@ -293,7 +293,7 @@ retry: ...@@ -293,7 +293,7 @@ retry:
if (file->f_flags & O_NONBLOCK) if (file->f_flags & O_NONBLOCK)
return -EAGAIN; return -EAGAIN;
if (down_interruptible(&data->sem)) if (down_interruptible(&data->sem))
return -ERESTARTSYS; return -EINTR;
} }
n = data->cpu_check; n = data->cpu_check;
......
...@@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata; ...@@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata;
* To prevent cache aliasing effects, align per-node structures so that they * To prevent cache aliasing effects, align per-node structures so that they
* start at addresses that are strided by node number. * start at addresses that are strided by node number.
*/ */
#define MAX_NODE_ALIGN_OFFSET (32 * 1024 * 1024)
#define NODEDATA_ALIGN(addr, node) \ #define NODEDATA_ALIGN(addr, node) \
((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE) ((((addr) + 1024*1024-1) & ~(1024*1024-1)) + \
(((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))
/** /**
* build_node_maps - callback to setup bootmem structs for each node * build_node_maps - callback to setup bootmem structs for each node
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
* *
* Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
*/ */
#include <linux/bootmem.h> #include <linux/bootmem.h>
...@@ -146,6 +146,24 @@ sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev, ...@@ -146,6 +146,24 @@ sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
return ret_stuff.v0; return ret_stuff.v0;
} }
/*
* sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
* device.
*/
inline struct pcidev_info *
sn_pcidev_info_get(struct pci_dev *dev)
{
struct pcidev_info *pcidev;
list_for_each_entry(pcidev,
&(SN_PCI_CONTROLLER(dev)->pcidev_info), pdi_list) {
if (pcidev->pdi_linux_pcidev == dev) {
return pcidev;
}
}
return NULL;
}
/* /*
* sn_fixup_ionodes() - This routine initializes the HUB data strcuture for * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
* each node in the system. * each node in the system.
...@@ -229,6 +247,50 @@ static void sn_fixup_ionodes(void) ...@@ -229,6 +247,50 @@ static void sn_fixup_ionodes(void)
} }
/*
* sn_pci_window_fixup() - Create a pci_window for each device resource.
* Until ACPI support is added, we need this code
* to setup pci_windows for use by
* pcibios_bus_to_resource(),
* pcibios_resource_to_bus(), etc.
*/
static void
sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
int64_t * pci_addrs)
{
struct pci_controller *controller = PCI_CONTROLLER(dev->bus);
unsigned int i;
unsigned int idx;
unsigned int new_count;
struct pci_window *new_window;
if (count == 0)
return;
idx = controller->windows;
new_count = controller->windows + count;
new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
if (new_window == NULL)
BUG();
if (controller->window) {
memcpy(new_window, controller->window,
sizeof(struct pci_window) * controller->windows);
kfree(controller->window);
}
/* Setup a pci_window for each device resource. */
for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
if (pci_addrs[i] == -1)
continue;
new_window[idx].offset = dev->resource[i].start - pci_addrs[i];
new_window[idx].resource = dev->resource[i];
idx++;
}
controller->windows = new_count;
controller->window = new_window;
}
void sn_pci_unfixup_slot(struct pci_dev *dev) void sn_pci_unfixup_slot(struct pci_dev *dev)
{ {
struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev; struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
...@@ -246,21 +308,23 @@ void sn_pci_unfixup_slot(struct pci_dev *dev) ...@@ -246,21 +308,23 @@ void sn_pci_unfixup_slot(struct pci_dev *dev)
*/ */
void sn_pci_fixup_slot(struct pci_dev *dev) void sn_pci_fixup_slot(struct pci_dev *dev)
{ {
unsigned int count = 0;
int idx; int idx;
int segment = pci_domain_nr(dev->bus); int segment = pci_domain_nr(dev->bus);
int status = 0; int status = 0;
struct pcibus_bussoft *bs; struct pcibus_bussoft *bs;
struct pci_bus *host_pci_bus; struct pci_bus *host_pci_bus;
struct pci_dev *host_pci_dev; struct pci_dev *host_pci_dev;
struct pcidev_info *pcidev_info;
int64_t pci_addrs[PCI_ROM_RESOURCE + 1];
struct sn_irq_info *sn_irq_info; struct sn_irq_info *sn_irq_info;
unsigned long size; unsigned long size;
unsigned int bus_no, devfn; unsigned int bus_no, devfn;
pci_dev_get(dev); /* for the sysdata pointer */ pci_dev_get(dev); /* for the sysdata pointer */
dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL); pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
if (SN_PCIDEV_INFO(dev) <= 0) if (pcidev_info <= 0)
BUG(); /* Cannot afford to run out of memory */ BUG(); /* Cannot afford to run out of memory */
memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));
sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL); sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
if (sn_irq_info <= 0) if (sn_irq_info <= 0)
...@@ -270,22 +334,34 @@ void sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -270,22 +334,34 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
/* Call to retrieve pci device information needed by kernel. */ /* Call to retrieve pci device information needed by kernel. */
status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number,
dev->devfn, dev->devfn,
(u64) __pa(SN_PCIDEV_INFO(dev)), (u64) __pa(pcidev_info),
(u64) __pa(sn_irq_info)); (u64) __pa(sn_irq_info));
if (status) if (status)
BUG(); /* Cannot get platform pci device information */ BUG(); /* Cannot get platform pci device information */
/* Add pcidev_info to list in sn_pci_controller struct */
list_add_tail(&pcidev_info->pdi_list,
&(SN_PCI_CONTROLLER(dev->bus)->pcidev_info));
/* Copy over PIO Mapped Addresses */ /* Copy over PIO Mapped Addresses */
for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) { for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
unsigned long start, end, addr; unsigned long start, end, addr;
if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx]) if (!pcidev_info->pdi_pio_mapped_addr[idx]) {
pci_addrs[idx] = -1;
continue; continue;
}
start = dev->resource[idx].start; start = dev->resource[idx].start;
end = dev->resource[idx].end; end = dev->resource[idx].end;
size = end - start; size = end - start;
addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx]; if (size == 0) {
pci_addrs[idx] = -1;
continue;
}
pci_addrs[idx] = start;
count++;
addr = pcidev_info->pdi_pio_mapped_addr[idx];
addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
dev->resource[idx].start = addr; dev->resource[idx].start = addr;
dev->resource[idx].end = addr + size; dev->resource[idx].end = addr + size;
...@@ -294,23 +370,27 @@ void sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -294,23 +370,27 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
else else
dev->resource[idx].parent = &iomem_resource; dev->resource[idx].parent = &iomem_resource;
} }
/* Create a pci_window in the pci_controller struct for
* each device resource.
*/
if (count > 0)
sn_pci_window_fixup(dev, count, pci_addrs);
/* /*
* Using the PROMs values for the PCI host bus, get the Linux * Using the PROMs values for the PCI host bus, get the Linux
* PCI host_pci_dev struct and set up host bus linkages * PCI host_pci_dev struct and set up host bus linkages
*/ */
bus_no = (SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32) & 0xff; bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
devfn = SN_PCIDEV_INFO(dev)->pdi_slot_host_handle & 0xffffffff; devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;
host_pci_bus = pci_find_bus(segment, bus_no); host_pci_bus = pci_find_bus(segment, bus_no);
host_pci_dev = pci_get_slot(host_pci_bus, devfn); host_pci_dev = pci_get_slot(host_pci_bus, devfn);
SN_PCIDEV_INFO(dev)->host_pci_dev = host_pci_dev; pcidev_info->host_pci_dev = host_pci_dev;
SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info = pcidev_info->pdi_linux_pcidev = dev;
SN_PCIDEV_INFO(host_pci_dev); pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);
SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;
bs = SN_PCIBUS_BUSSOFT(dev->bus); bs = SN_PCIBUS_BUSSOFT(dev->bus);
SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs; pcidev_info->pdi_pcibus_info = bs;
if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) { if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type]; SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
...@@ -320,11 +400,11 @@ void sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -320,11 +400,11 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
/* Only set up IRQ stuff if this device has a host bus context */ /* Only set up IRQ stuff if this device has a host bus context */
if (bs && sn_irq_info->irq_irq) { if (bs && sn_irq_info->irq_irq) {
SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info; pcidev_info->pdi_sn_irq_info = sn_irq_info;
dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq; dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;
sn_irq_fixup(dev, sn_irq_info); sn_irq_fixup(dev, sn_irq_info);
} else { } else {
SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = NULL; pcidev_info->pdi_sn_irq_info = NULL;
kfree(sn_irq_info); kfree(sn_irq_info);
} }
} }
...@@ -338,6 +418,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) ...@@ -338,6 +418,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
int status = 0; int status = 0;
int nasid, cnode; int nasid, cnode;
struct pci_controller *controller; struct pci_controller *controller;
struct sn_pci_controller *sn_controller;
struct pcibus_bussoft *prom_bussoft_ptr; struct pcibus_bussoft *prom_bussoft_ptr;
struct hubdev_info *hubdev_info; struct hubdev_info *hubdev_info;
void *provider_soft = NULL; void *provider_soft = NULL;
...@@ -349,10 +430,15 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) ...@@ -349,10 +430,15 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
return; /*bus # does not exist */ return; /*bus # does not exist */
prom_bussoft_ptr = __va(prom_bussoft_ptr); prom_bussoft_ptr = __va(prom_bussoft_ptr);
controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL); /* Allocate a sn_pci_controller, which has a pci_controller struct
controller->segment = segment; * as the first member.
if (!controller) */
sn_controller = kzalloc(sizeof(struct sn_pci_controller), GFP_KERNEL);
if (!sn_controller)
BUG(); BUG();
INIT_LIST_HEAD(&sn_controller->pcidev_info);
controller = &sn_controller->pci_controller;
controller->segment = segment;
if (bus == NULL) { if (bus == NULL) {
bus = pci_scan_bus(busnum, &pci_root_ops, controller); bus = pci_scan_bus(busnum, &pci_root_ops, controller);
...@@ -389,6 +475,29 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) ...@@ -389,6 +475,29 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
goto error_return; goto error_return;
} }
/*
* Setup pci_windows for legacy IO and MEM space.
* (Temporary until ACPI support is in place.)
*/
controller->window = kcalloc(2, sizeof(struct pci_window), GFP_KERNEL);
if (controller->window == NULL)
BUG();
controller->window[0].offset = prom_bussoft_ptr->bs_legacy_io;
controller->window[0].resource.name = "legacy_io";
controller->window[0].resource.flags = IORESOURCE_IO;
controller->window[0].resource.start = prom_bussoft_ptr->bs_legacy_io;
controller->window[0].resource.end =
controller->window[0].resource.start + 0xffff;
controller->window[0].resource.parent = &ioport_resource;
controller->window[1].offset = prom_bussoft_ptr->bs_legacy_mem;
controller->window[1].resource.name = "legacy_mem";
controller->window[1].resource.flags = IORESOURCE_MEM;
controller->window[1].resource.start = prom_bussoft_ptr->bs_legacy_mem;
controller->window[1].resource.end =
controller->window[1].resource.start + (1024 * 1024) - 1;
controller->window[1].resource.parent = &iomem_resource;
controller->windows = 2;
/* /*
* Generic bus fixup goes here. Don't reference prom_bussoft_ptr * Generic bus fixup goes here. Don't reference prom_bussoft_ptr
* after this point. * after this point.
...@@ -421,7 +530,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) ...@@ -421,7 +530,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
error_return: error_return:
kfree(controller); kfree(sn_controller);
return; return;
} }
...@@ -434,7 +543,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev) ...@@ -434,7 +543,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__); dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
return; return;
} }
element->sysdata = dev->sysdata; element->sysdata = SN_PCIDEV_INFO(dev);
list_add(&element->entry, &sn_sysdata_list); list_add(&element->entry, &sn_sysdata_list);
} }
......
...@@ -39,9 +39,13 @@ sn2_ptc_deadlock_recovery_core: ...@@ -39,9 +39,13 @@ sn2_ptc_deadlock_recovery_core:
mov r8=r0 mov r8=r0
1: 1:
cmp.ne p8,p9=r0,ptc1 // Test for shub type (ptc1 non-null on shub1)
// p8 = 1 if shub1, p9 = 1 if shub2
add scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register add scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register
;; mov scr1=7;; // Clear DEADLOCK, WRITE_ERROR, MULTI_WRITE_ERROR
ld8.acq scr1=[scr2];; (p8) st8.rel [scr2]=scr1;;
(p9) ld8.acq scr1=[scr2];;
5: ld8.acq scr1=[piowc];; // Wait for PIOs to complete. 5: ld8.acq scr1=[piowc];; // Wait for PIOs to complete.
hint @pause hint @pause
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
# ifdef CONFIG_IA32_SUPPORT # ifdef CONFIG_IA32_SUPPORT
#define IA32_PAGE_OFFSET 0xc0000000
extern void ia32_cpu_init (void); extern void ia32_cpu_init (void);
extern void ia32_mem_init (void); extern void ia32_mem_init (void);
extern void ia32_gdt_init (void); extern void ia32_gdt_init (void);
......
...@@ -17,8 +17,8 @@ typedef struct { ...@@ -17,8 +17,8 @@ typedef struct {
#define local_set(l, i) atomic64_set(&(l)->val, i) #define local_set(l, i) atomic64_set(&(l)->val, i)
#define local_inc(l) atomic64_inc(&(l)->val) #define local_inc(l) atomic64_inc(&(l)->val)
#define local_dec(l) atomic64_dec(&(l)->val) #define local_dec(l) atomic64_dec(&(l)->val)
#define local_add(l) atomic64_add(&(l)->val) #define local_add(i, l) atomic64_add((i), &(l)->val)
#define local_sub(l) atomic64_sub(&(l)->val) #define local_sub(i, l) atomic64_sub((i), &(l)->val)
/* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */ /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */
......
...@@ -3,15 +3,27 @@ ...@@ -3,15 +3,27 @@
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
* *
* Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
*/ */
#ifndef _ASM_IA64_SN_PCI_PCIDEV_H #ifndef _ASM_IA64_SN_PCI_PCIDEV_H
#define _ASM_IA64_SN_PCI_PCIDEV_H #define _ASM_IA64_SN_PCI_PCIDEV_H
#include <linux/pci.h> #include <linux/pci.h>
#define SN_PCIDEV_INFO(pci_dev) \ /*
((struct pcidev_info *)(pci_dev)->sysdata) * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to
* the pcidev_info structs for all devices under a controller, we extend the
* definition of pci_controller, via sn_pci_controller, to include a list
* of pcidev_info.
*/
struct sn_pci_controller {
struct pci_controller pci_controller;
struct list_head pcidev_info;
};
#define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata)
#define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev)
#define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \
(struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data))
...@@ -53,11 +65,13 @@ struct pcidev_info { ...@@ -53,11 +65,13 @@ struct pcidev_info {
struct sn_irq_info *pdi_sn_irq_info; struct sn_irq_info *pdi_sn_irq_info;
struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ struct sn_pcibus_provider *pdi_provider; /* sn pci ops */
struct pci_dev *host_pci_dev; /* host bus link */ struct pci_dev *host_pci_dev; /* host bus link */
struct list_head pdi_list; /* List of pcidev_info */
}; };
extern void sn_irq_fixup(struct pci_dev *pci_dev, extern void sn_irq_fixup(struct pci_dev *pci_dev,
struct sn_irq_info *sn_irq_info); struct sn_irq_info *sn_irq_info);
extern void sn_irq_unfixup(struct pci_dev *pci_dev); extern void sn_irq_unfixup(struct pci_dev *pci_dev);
extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *);
extern void sn_pci_controller_fixup(int segment, int busnum, extern void sn_pci_controller_fixup(int segment, int busnum,
struct pci_bus *bus); struct pci_bus *bus);
extern void sn_bus_store_sysdata(struct pci_dev *dev); extern void sn_bus_store_sysdata(struct pci_dev *dev);
......
...@@ -201,6 +201,16 @@ static inline void __raw_write_unlock(raw_rwlock_t *x) ...@@ -201,6 +201,16 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
#endif /* !ASM_SUPPORTED */ #endif /* !ASM_SUPPORTED */
#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) static inline int __raw_read_trylock(raw_rwlock_t *x)
{
union {
raw_rwlock_t lock;
__u32 word;
} old, new;
old.lock = new.lock = *x;
old.lock.write_lock = new.lock.write_lock = 0;
++new.lock.read_counter;
return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word;
}
#endif /* _ASM_IA64_SPINLOCK_H */ #endif /* _ASM_IA64_SPINLOCK_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