diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grufile.c')
| -rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 27 | 
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 28852dfa310..104a05f6b73 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c @@ -6,7 +6,7 @@   * This file supports the user system call for file open, close, mmap, etc.   * This also incudes the driver initialization code.   * - *  Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved. + *  Copyright (c) 2008-2014 Silicon Graphics, Inc.  All Rights Reserved.   *   *  This program is free software; you can redistribute it and/or modify   *  it under the terms of the GNU General Public License as published by @@ -58,6 +58,11 @@ static int max_user_cbrs, max_user_dsr_bytes;  static struct miscdevice gru_miscdev; +static int gru_supported(void) +{ +	return is_uv_system() && +		(uv_hub_info->hub_revision < UV3_HUB_REVISION_BASE); +}  /*   * gru_vma_close @@ -108,9 +113,8 @@ static int gru_file_mmap(struct file *file, struct vm_area_struct *vma)  				vma->vm_end & (GRU_GSEG_PAGESIZE - 1))  		return -EINVAL; -	vma->vm_flags |= -	    (VM_IO | VM_DONTCOPY | VM_LOCKED | VM_DONTEXPAND | VM_PFNMAP | -			VM_RESERVED); +	vma->vm_flags |= VM_IO | VM_PFNMAP | VM_LOCKED | +			 VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP;  	vma->vm_page_prot = PAGE_SHARED;  	vma->vm_ops = &gru_vm_ops; @@ -173,6 +177,7 @@ static long gru_get_config_info(unsigned long arg)  		nodesperblade = 2;  	else  		nodesperblade = 1; +	memset(&info, 0, sizeof(info));  	info.cpus = num_online_cpus();  	info.nodes = num_online_nodes();  	info.blades = info.nodes / nodesperblade; @@ -348,15 +353,15 @@ static unsigned long gru_chiplet_cpu_to_mmr(int chiplet, int cpu, int *corep)  static int gru_irq_count[GRU_CHIPLETS_PER_BLADE]; -static void gru_noop(unsigned int irq) +static void gru_noop(struct irq_data *d)  {  }  static struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE] = {  	[0 ... GRU_CHIPLETS_PER_BLADE - 1] { -		.mask		= gru_noop, -		.unmask		= gru_noop, -		.ack		= gru_noop +		.irq_mask	= gru_noop, +		.irq_unmask	= gru_noop, +		.irq_ack	= gru_noop  	}  }; @@ -373,7 +378,7 @@ static int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,  	if (gru_irq_count[chiplet] == 0) {  		gru_chip[chiplet].name = irq_name; -		ret = set_irq_chip(irq, &gru_chip[chiplet]); +		ret = irq_set_chip(irq, &gru_chip[chiplet]);  		if (ret) {  			printk(KERN_ERR "%s: set_irq_chip failed, errno=%d\n",  			       GRU_DRIVER_ID_STR, -ret); @@ -518,7 +523,7 @@ static int __init gru_init(void)  {  	int ret; -	if (!is_uv_system()) +	if (!gru_supported())  		return 0;  #if defined CONFIG_IA64 @@ -573,7 +578,7 @@ exit0:  static void __exit gru_exit(void)  { -	if (!is_uv_system()) +	if (!gru_supported())  		return;  	gru_teardown_tlb_irqs();  | 
