Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, uv: Remove recursion in uv_heartbeat_enable()
x86, uv: uv_global_gru_mmr_address() macro fix
x86, uv: Add serial number parameter to uv_bios_get_sn_info()

+27 -18
+4 -3
arch/x86/include/asm/uv/bios.h
··· 18 18 * along with this program; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 * 21 - * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. 22 - * Copyright (c) Russ Anderson 21 + * Copyright (c) 2008-2009 Silicon Graphics, Inc. All Rights Reserved. 22 + * Copyright (c) Russ Anderson <rja@sgi.com> 23 23 */ 24 24 25 25 #include <linux/rtc.h> ··· 90 90 extern s64 uv_bios_call_irqsave(enum uv_bios_cmd, u64, u64, u64, u64, u64); 91 91 extern s64 uv_bios_call_reentrant(enum uv_bios_cmd, u64, u64, u64, u64, u64); 92 92 93 - extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *); 93 + extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *, long *); 94 94 extern s64 uv_bios_freq_base(u64, u64 *); 95 95 extern int uv_bios_mq_watchlist_alloc(unsigned long, unsigned int, 96 96 unsigned long *); ··· 106 106 extern long sn_partition_id; 107 107 extern long sn_coherency_id; 108 108 extern long sn_region_size; 109 + extern long system_serial_number; 109 110 #define partition_coherence_id() (sn_coherency_id) 110 111 111 112 extern struct kobject *sgi_uv_kobj; /* /sys/firmware/sgi_uv */
+2 -1
arch/x86/include/asm/uv/uv_hub.h
··· 329 329 */ 330 330 static inline unsigned long uv_global_gru_mmr_address(int pnode, unsigned long offset) 331 331 { 332 - return UV_GLOBAL_GRU_MMR_BASE | offset | (pnode << uv_hub_info->m_val); 332 + return UV_GLOBAL_GRU_MMR_BASE | offset | 333 + ((unsigned long)pnode << uv_hub_info->m_val); 333 334 } 334 335 335 336 static inline void uv_write_global_mmr8(int pnode, unsigned long offset, unsigned char val)
+7 -8
arch/x86/kernel/apic/x2apic_uv_x.c
··· 5 5 * 6 6 * SGI UV APIC functions (note: not an Intel compatible APIC) 7 7 * 8 - * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. 8 + * Copyright (C) 2007-2009 Silicon Graphics, Inc. All rights reserved. 9 9 */ 10 10 #include <linux/cpumask.h> 11 11 #include <linux/hardirq.h> ··· 488 488 489 489 static void __cpuinit uv_heartbeat_enable(int cpu) 490 490 { 491 - if (!uv_cpu_hub_info(cpu)->scir.enabled) { 491 + while (!uv_cpu_hub_info(cpu)->scir.enabled) { 492 492 struct timer_list *timer = &uv_cpu_hub_info(cpu)->scir.timer; 493 493 494 494 uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY); ··· 496 496 timer->expires = jiffies + SCIR_CPU_HB_INTERVAL; 497 497 add_timer_on(timer, cpu); 498 498 uv_cpu_hub_info(cpu)->scir.enabled = 1; 499 - } 500 499 501 - /* check boot cpu */ 502 - if (!uv_cpu_hub_info(0)->scir.enabled) 503 - uv_heartbeat_enable(0); 500 + /* also ensure that boot cpu is enabled */ 501 + cpu = 0; 502 + } 504 503 } 505 504 506 505 #ifdef CONFIG_HOTPLUG_CPU ··· 703 704 } 704 705 705 706 uv_bios_init(); 706 - uv_bios_get_sn_info(0, &uv_type, &sn_partition_id, 707 - &sn_coherency_id, &sn_region_size); 707 + uv_bios_get_sn_info(0, &uv_type, &sn_partition_id, &sn_coherency_id, 708 + &sn_region_size, &system_serial_number); 708 709 uv_rtc_init(); 709 710 710 711 for_each_present_cpu(cpu) {
+14 -6
arch/x86/kernel/bios_uv.c
··· 15 15 * along with this program; if not, write to the Free Software 16 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 * 18 - * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. 19 - * Copyright (c) Russ Anderson 18 + * Copyright (c) 2008-2009 Silicon Graphics, Inc. All Rights Reserved. 19 + * Copyright (c) Russ Anderson <rja@sgi.com> 20 20 */ 21 21 22 22 #include <linux/efi.h> ··· 30 30 s64 uv_bios_call(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, u64 a4, u64 a5) 31 31 { 32 32 struct uv_systab *tab = &uv_systab; 33 + s64 ret; 33 34 34 35 if (!tab->function) 35 36 /* ··· 38 37 */ 39 38 return BIOS_STATUS_UNIMPLEMENTED; 40 39 41 - return efi_call6((void *)__va(tab->function), 42 - (u64)which, a1, a2, a3, a4, a5); 40 + ret = efi_call6((void *)__va(tab->function), (u64)which, 41 + a1, a2, a3, a4, a5); 42 + return ret; 43 43 } 44 + EXPORT_SYMBOL_GPL(uv_bios_call); 44 45 45 46 s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3, 46 47 u64 a4, u64 a5) ··· 76 73 EXPORT_SYMBOL_GPL(sn_coherency_id); 77 74 long sn_region_size; 78 75 EXPORT_SYMBOL_GPL(sn_region_size); 76 + long system_serial_number; 77 + EXPORT_SYMBOL_GPL(system_serial_number); 79 78 int uv_type; 79 + EXPORT_SYMBOL_GPL(uv_type); 80 80 81 81 82 82 s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher, 83 - long *region) 83 + long *region, long *ssn) 84 84 { 85 85 s64 ret; 86 86 u64 v0, v1; ··· 103 97 *coher = part.coherence_id; 104 98 if (region) 105 99 *region = part.region_size; 100 + if (ssn) 101 + *ssn = v1; 106 102 return ret; 107 103 } 104 + EXPORT_SYMBOL_GPL(uv_bios_get_sn_info); 108 105 109 106 int 110 107 uv_bios_mq_watchlist_alloc(unsigned long addr, unsigned int mq_size, ··· 213 204 214 205 void uv_bios_init(void) { } 215 206 #endif 216 -