Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/aegl/linux-2.6
  • Loading branch information
Linus Torvalds committed Feb 6, 2006
2 parents e3f749c + 913e4a7 commit c03296a
Show file tree
Hide file tree
Showing 20 changed files with 278 additions and 236 deletions.
4 changes: 3 additions & 1 deletion arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ config IA64_L1_CACHE_SHIFT
default "7" if MCKINLEY
default "6" if ITANIUM

# align cache-sensitive data to 64 bytes
config IA64_CYCLONE
bool "Cyclone (EXA) Time Source support"
help
Expand Down Expand Up @@ -374,6 +373,9 @@ config IA64_PALINFO
To use this option, you have to ensure that the "/proc file system
support" (CONFIG_PROC_FS) is enabled, too.

config SGI_SN
def_bool y if (IA64_SGI_SN2 || IA64_GENERIC)

source "drivers/firmware/Kconfig"

source "fs/Kconfig.binfmt"
Expand Down
75 changes: 75 additions & 0 deletions arch/ia64/kernel/sal.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/spinlock.h>
#include <linux/string.h>

#include <asm/delay.h>
#include <asm/page.h>
#include <asm/sal.h>
#include <asm/pal.h>
Expand Down Expand Up @@ -214,6 +215,78 @@ chk_nointroute_opt(void)
static void __init sal_desc_ap_wakeup(void *p) { }
#endif

/*
* HP rx5670 firmware polls for interrupts during SAL_CACHE_FLUSH by reading
* cr.ivr, but it never writes cr.eoi. This leaves any interrupt marked as
* "in-service" and masks other interrupts of equal or lower priority.
*
* HP internal defect reports: F1859, F2775, F3031.
*/
static int sal_cache_flush_drops_interrupts;

static void __init
check_sal_cache_flush (void)
{
unsigned long flags, itv;
int cpu;
u64 vector;

cpu = get_cpu();
local_irq_save(flags);

/*
* Schedule a timer interrupt, wait until it's reported, and see if
* SAL_CACHE_FLUSH drops it.
*/
itv = ia64_get_itv();
BUG_ON((itv & (1 << 16)) == 0);

ia64_set_itv(IA64_TIMER_VECTOR);
ia64_set_itm(ia64_get_itc() + 1000);

while (!ia64_get_irr(IA64_TIMER_VECTOR))
cpu_relax();

ia64_sal_cache_flush(3);

if (ia64_get_irr(IA64_TIMER_VECTOR)) {
vector = ia64_get_ivr();
ia64_eoi();
WARN_ON(vector != IA64_TIMER_VECTOR);
} else {
sal_cache_flush_drops_interrupts = 1;
printk(KERN_ERR "SAL: SAL_CACHE_FLUSH drops interrupts; "
"PAL_CACHE_FLUSH will be used instead\n");
ia64_eoi();
}

ia64_set_itv(itv);
local_irq_restore(flags);
put_cpu();
}

s64
ia64_sal_cache_flush (u64 cache_type)
{
struct ia64_sal_retval isrv;

if (sal_cache_flush_drops_interrupts) {
unsigned long flags;
u64 progress;
s64 rc;

progress = 0;
local_irq_save(flags);
rc = ia64_pal_cache_flush(cache_type,
PAL_CACHE_FLUSH_INVALIDATE, &progress, NULL);
local_irq_restore(flags);
return rc;
}

SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0);
return isrv.status;
}

void __init
ia64_sal_init (struct ia64_sal_systab *systab)
{
Expand Down Expand Up @@ -262,6 +335,8 @@ ia64_sal_init (struct ia64_sal_systab *systab)
}
p += SAL_DESC_SIZE(*p);
}

check_sal_cache_flush();
}

int
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/sn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
# Makefile for the sn ia64 subplatform
#

CPPFLAGS += -I$(srctree)/arch/ia64/sn/include

obj-y += kernel/ pci/
2 changes: 2 additions & 0 deletions arch/ia64/sn/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All Rights Reserved.
#

CPPFLAGS += -I$(srctree)/arch/ia64/sn/include

obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \
huberror.o io_init.o iomv.o klconflib.o sn2/
obj-$(CONFIG_IA64_GENERIC) += machvec.o
Expand Down
17 changes: 6 additions & 11 deletions arch/ia64/sn/kernel/bte.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
*/

#include <linux/config.h>
Expand Down Expand Up @@ -186,18 +186,13 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)

/* Initialize the notification to a known value. */
*bte->most_rcnt_na = BTE_WORD_BUSY;
notif_phys_addr = TO_PHYS(ia64_tpa((unsigned long)bte->most_rcnt_na));
notif_phys_addr = (u64)bte->most_rcnt_na;

if (is_shub2()) {
src = SH2_TIO_PHYS_TO_DMA(src);
dest = SH2_TIO_PHYS_TO_DMA(dest);
notif_phys_addr = SH2_TIO_PHYS_TO_DMA(notif_phys_addr);
}
/* Set the source and destination registers */
BTE_PRINTKV(("IBSA = 0x%lx)\n", (TO_PHYS(src))));
BTE_SRC_STORE(bte, TO_PHYS(src));
BTE_PRINTKV(("IBDA = 0x%lx)\n", (TO_PHYS(dest))));
BTE_DEST_STORE(bte, TO_PHYS(dest));
BTE_PRINTKV(("IBSA = 0x%lx)\n", src));
BTE_SRC_STORE(bte, src);
BTE_PRINTKV(("IBDA = 0x%lx)\n", dest));
BTE_DEST_STORE(bte, dest);

/* Set the notification register */
BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr));
Expand Down
9 changes: 8 additions & 1 deletion arch/ia64/sn/kernel/io_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
* sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
* each node in the system.
*/
static void sn_fixup_ionodes(void)
static void __init sn_fixup_ionodes(void)
{
struct sn_flush_device_kernel *sn_flush_device_kernel;
struct sn_flush_device_kernel *dev_entry;
Expand Down Expand Up @@ -467,6 +467,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
pcidev_info->pdi_sn_irq_info = NULL;
kfree(sn_irq_info);
}

/*
* MSI currently not supported on altix. Remove this when
* the MSI abstraction patches are integrated into the kernel
* (sometime after 2.6.16 releases)
*/
dev->no_msi = 1;
}

/*
Expand Down
21 changes: 9 additions & 12 deletions arch/ia64/sn/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
*/

#include <linux/irq.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <asm/sn/addrs.h>
#include <asm/sn/arch.h>
#include <asm/sn/intr.h>
Expand Down Expand Up @@ -76,17 +77,15 @@ static void sn_enable_irq(unsigned int irq)

static void sn_ack_irq(unsigned int irq)
{
u64 event_occurred, mask = 0;
u64 event_occurred, mask;

irq = irq & 0xff;
event_occurred =
HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED));
event_occurred = HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED));
mask = event_occurred & SH_ALL_INT_MASK;
HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS),
mask);
HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), mask);
__set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);

move_irq(irq);
move_native_irq(irq);
}

static void sn_end_irq(unsigned int irq)
Expand Down Expand Up @@ -219,9 +218,8 @@ static void register_intr_pda(struct sn_irq_info *sn_irq_info)
pdacpu(cpu)->sn_last_irq = irq;
}

if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq) {
if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq)
pdacpu(cpu)->sn_first_irq = irq;
}
}

static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
Expand Down Expand Up @@ -289,7 +287,7 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]);
spin_unlock(&sn_irq_info_lock);

(void)register_intr_pda(sn_irq_info);
register_intr_pda(sn_irq_info);
}

void sn_irq_unfixup(struct pci_dev *pci_dev)
Expand Down Expand Up @@ -419,7 +417,7 @@ void sn_lb_int_war_check(void)
rcu_read_unlock();
}

void sn_irq_lh_init(void)
void __init sn_irq_lh_init(void)
{
int i;

Expand All @@ -434,5 +432,4 @@ void sn_irq_lh_init(void)

INIT_LIST_HEAD(sn_irq_lh[i]);
}

}
29 changes: 14 additions & 15 deletions arch/ia64/sn/kernel/klconflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,31 +78,30 @@ format_module_id(char *buffer, moduleid_t m, int fmt)
position = MODULE_GET_BPOS(m);

if ((fmt == MODULE_FORMAT_BRIEF) || (fmt == MODULE_FORMAT_LCD)) {
/* Brief module number format, eg. 002c15 */
/* Brief module number format, eg. 002c15 */

/* Decompress the rack number */
*buffer++ = '0' + RACK_GET_CLASS(rack);
*buffer++ = '0' + RACK_GET_GROUP(rack);
*buffer++ = '0' + RACK_GET_NUM(rack);
/* Decompress the rack number */
*buffer++ = '0' + RACK_GET_CLASS(rack);
*buffer++ = '0' + RACK_GET_GROUP(rack);
*buffer++ = '0' + RACK_GET_NUM(rack);

/* Add the brick type */
*buffer++ = brickchar;
/* Add the brick type */
*buffer++ = brickchar;
}
else if (fmt == MODULE_FORMAT_LONG) {
/* Fuller hwgraph format, eg. rack/002/bay/15 */
/* Fuller hwgraph format, eg. rack/002/bay/15 */

strcpy(buffer, "rack" "/"); buffer += strlen(buffer);
strcpy(buffer, "rack" "/"); buffer += strlen(buffer);

*buffer++ = '0' + RACK_GET_CLASS(rack);
*buffer++ = '0' + RACK_GET_GROUP(rack);
*buffer++ = '0' + RACK_GET_NUM(rack);
*buffer++ = '0' + RACK_GET_CLASS(rack);
*buffer++ = '0' + RACK_GET_GROUP(rack);
*buffer++ = '0' + RACK_GET_NUM(rack);

strcpy(buffer, "/" "bay" "/"); buffer += strlen(buffer);
strcpy(buffer, "/" "bay" "/"); buffer += strlen(buffer);
}

/* Add the bay position, using at least two digits */
if (position < 10)
*buffer++ = '0';
*buffer++ = '0';
sprintf(buffer, "%d", position);

}
19 changes: 12 additions & 7 deletions arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void __init early_sn_setup(void)
}

extern int platform_intr_list[];
static int __initdata shub_1_1_found = 0;
static int __initdata shub_1_1_found;

/*
* sn_check_for_wars
Expand Down Expand Up @@ -578,13 +578,17 @@ void __init sn_cpu_init(void)
sn_prom_type = 2;
else
sn_prom_type = 1;
printk("Running on medusa with %s PROM\n", (sn_prom_type == 1) ? "real" : "fake");
printk(KERN_INFO "Running on medusa with %s PROM\n",
(sn_prom_type == 1) ? "real" : "fake");
}

memset(pda, 0, sizeof(pda));
if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2, &sn_hub_info->nasid_bitmask, &sn_hub_info->nasid_shift,
&sn_system_size, &sn_sharing_domain_size, &sn_partition_id,
&sn_coherency_id, &sn_region_size))
if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2,
&sn_hub_info->nasid_bitmask,
&sn_hub_info->nasid_shift,
&sn_system_size, &sn_sharing_domain_size,
&sn_partition_id, &sn_coherency_id,
&sn_region_size))
BUG();
sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2;

Expand Down Expand Up @@ -716,7 +720,8 @@ void __init build_cnode_tables(void)
for_each_online_node(node) {
kl_config_hdr_t *klgraph_header;
nasid = cnodeid_to_nasid(node);
if ((klgraph_header = ia64_sn_get_klconfig_addr(nasid)) == NULL)
klgraph_header = ia64_sn_get_klconfig_addr(nasid);
if (klgraph_header == NULL)
BUG();
brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info);
while (brd) {
Expand All @@ -734,7 +739,7 @@ nasid_slice_to_cpuid(int nasid, int slice)
{
long cpu;

for (cpu=0; cpu < NR_CPUS; cpu++)
for (cpu = 0; cpu < NR_CPUS; cpu++)
if (cpuid_to_nasid(cpu) == nasid &&
cpuid_to_slice(cpu) == slice)
return cpu;
Expand Down
2 changes: 2 additions & 0 deletions arch/ia64/sn/kernel/sn2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
# sn2 specific kernel files
#

CPPFLAGS += -I$(srctree)/arch/ia64/sn/include

obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \
prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
Loading

0 comments on commit c03296a

Please sign in to comment.