updated Altix patch
Subsystems (5)
PATCH 1/1 updated Altix patch
Here's a patch against Linus' tree + David's -test5 patch that should get you going on Altix. We're still debugging some console issues, so expect random hangs and/or panics on keypress during bootup. Once the system is up though, it seems pretty stable (that is, I've done some overnight benchmarking runs w/o incident).
However, I can't guarantee that this patch will work for you, all I can say is that it Works For Me :).
MAINTAINERS | 6 arch/ia64/Kconfig | 16 arch/ia64/Makefile | 2 arch/ia64/kernel/acpi.c | 8 arch/ia64/kernel/setup.c | 167 -------- arch/ia64/mm/Makefile | 3 arch/ia64/mm/discontig.c | 375 ++++++++++-------- arch/ia64/mm/init.c | 225 ++++------- drivers/acpi/pci_irq.c | 3 drivers/acpi/tables.c | 15 drivers/char/Kconfig | 16 drivers/char/Makefile | 1 drivers/char/sn_serial.c | 870 +++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla1280.c | 4 include/asm-ia64/mmzone.h | 144 +------ include/asm-ia64/nodedata.h | 39 - include/asm-ia64/numa.h | 16 include/asm-ia64/page.h | 28 - include/asm-ia64/percpu.h | 1 include/asm-ia64/pgtable.h | 32 + include/asm-ia64/processor.h | 2
Thanks,
Jesse
MAINTAINERS +6 -0
@@ -1679,6 +1679,12 @@ W: http://www.nsa.gov/selinux S: Supported +SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER +P: Chad Talbott +M: [email protected] +L: [email protected] +S: Supported + SGI VISUAL WORKSTATION 320 AND 540 P: Andrey Panin M: [email protected]
arch/ia64/Kconfig +0 -16
@@ -220,22 +220,6 @@ Access). This option is for configuring high-end multiprocessor server systems. If in doubt, say N. -choice - prompt "Maximum Memory per NUMA Node" if NUMA && IA64_DIG - depends on NUMA && IA64_DIG - default IA64_NODESIZE_16GB - -config IA64_NODESIZE_16GB - bool "16GB" - -config IA64_NODESIZE_64GB - bool "64GB" - -config IA64_NODESIZE_256GB - bool "256GB" - -endchoice - config DISCONTIGMEM bool "Discontiguous memory support" if (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC) && NUMA default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
arch/ia64/Makefile +1 -1
@@ -64,7 +64,7 @@ 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/ drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ boot := arch/ia64/hp/sim/boot
arch/ia64/kernel/acpi.c +0 -8
@@ -421,14 +421,6 @@ min_hole_size = hole_size; } -if (min_hole_size) { -if (min_hole_size > size) { -printk (KERN_ERR "Too huge memory hole. Ignoring %ld MBytes at %lx\n" , - size/(1024 *1024 ), paddr); -return ; - } - } -/* record this node in proximity bitmap */ pxm_bit_set (pxm);
arch/ia64/kernel/setup.c +10 -157
218 lines not on this page · raw message
arch/ia64/mm/Makefile +3 -0
@@ -7,3 +7,6 @@ obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_DISCONTIGMEM) += discontig.o +ifndef CONFIG_DISCONTIGMEM +obj-y += contig.o +endif
arch/ia64/mm/discontig.c +219 -156
490 lines not on this page · raw message
arch/ia64/mm/init.c +88 -137
302 lines not on this page · raw message
drivers/acpi/pci_irq.c +3 -0
@@ -71,6 +71,9 @@ACPI_FUNCTION_TRACE ("acpi_pci_irq_find_prt_entry" ); +if (!acpi_prt.count) +return_PTR (NULL ); +/* * Parse through all PRT entries looking for a match on the specified * PCI device's segment, bus, device, and pin (don't care about func).
drivers/acpi/tables.c +2 -13
@@ -69,7 +69,8 @@static unsigned long sdt_pa;/* Physical Address */ static unsigned long sdt_count;/* Table count */ -static struct acpi_table_sdt *sdt_entry; + +static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES ];void acpi_table_print (
@@ -425,12 +426,6 @@ sdt_count =ACPI_MAX_TABLES ; } - sdt_entry =alloc_bootmem (sdt_count *sizeof (struct acpi_table_sdt )); -if (!sdt_entry) { -printk (KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n" ); -return -ENOMEM ; - } -for (i =0 ; i < sdt_count; i++) sdt_entry[i].pa = (unsigned long ) mapped_xsdt->entry[i]; }
@@ -477,12 +472,6 @@ sdt_count =ACPI_MAX_TABLES ; } - sdt_entry =alloc_bootmem (sdt_count *sizeof (struct acpi_table_sdt )); -if (!sdt_entry) { -printk (KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n" ); -return -ENOMEM ; - } -for (i =0 ; i < sdt_count; i++) sdt_entry[i].pa = (unsigned long ) mapped_rsdt->entry[i]; }
drivers/char/Kconfig +16 -0
@@ -393,6 +393,22 @@ If you have an Alchemy AU1000 processor (MIPS based) and you want to use a console on a serial port, say Y. Otherwise, say N. +config SGI_L1_SERIAL + bool "SGI SN2 L1 serial port support" + depends on SERIAL_NONSTANDARD && IA64 + help + If you have an SGI SN2 and you want to use the serial port + connected to the system controller (you want this!), say Y. + Otherwise, say N. + +config SGI_L1_SERIAL_CONSOLE + bool "SGI SN2 L1 serial console support" + depends on SGI_L1_SERIAL + help + If you have an SGI SN2 and you would like to use the system + controller serial port as your console (you want this!), + say Y. Otherwise, say N. + config QTRONIX_KEYBOARD bool "Enable Qtronix 990P Keyboard Support" depends on IT8712
drivers/char/Makefile +1 -0
@@ -41,6 +41,7 @@ obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o obj-$(CONFIG_RAW_DRIVER) += raw.o +obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o
drivers/char/sn_serial.c +870 -0
870 lines not on this page · raw message
drivers/scsi/qla1280.c +2 -2
@@ -3359,9 +3359,9 @@ ha->bus_settings[bus].scsi_bus_dead =1 ; ha->bus_settings[bus].failed_reset_count++; }else { -spin_unlock_irq (HOST_LOCK ); +// spin_unlock_irq(HOST_LOCK); schedule_timeout (reset_delay *HZ ); -spin_lock_irq (HOST_LOCK ); +// spin_lock_irq(HOST_LOCK); ha->bus_settings[bus].scsi_bus_dead =0 ; ha->bus_settings[bus].failed_reset_count =0 ;
include/asm-ia64/mmzone.h +22 -122
179 lines not on this page · raw message
include/asm-ia64/nodedata.h +9 -30
@@ -13,7 +13,7 @@#ifndef _ASM_IA64_NODEDATA_H#define _ASM_IA64_NODEDATA_H - +#include <asm/percpu.h> #include <asm/mmzone.h> /*
@@ -22,15 +22,17 @@struct pglist_data ;struct ia64_node_data { -short active_cpu_count;short node; +short active_cpu_count; +/* +* The fields are read-only (after boot). They contain pointers +* to various structures located on other nodes. Ths data is +* replicated on each node in order to reduce off-node references. +*/ struct pglist_data *pg_data_ptrs[NR_NODES ]; -struct page *bank_mem_map_base[NR_BANKS ];struct ia64_node_data *node_data_ptrs[NR_NODES ]; -short node_id_map[NR_BANKS ]; }; -/* * Return a pointer to the node_data structure for the executing cpu. */
@@ -40,7 +42,8 @@/* * Return a pointer to the node_data structure for the specified node. */ -#define node_data (node) (local_node_data->node_data_ptrs[node]) +#define node_data (node) (local_node_data->node_data_ptrs[node]) +#define NODE_DATA (nid) (local_node_data->pg_data_ptrs[nid])/* * Get a pointer to the node_id/node_data for the current cpu.
@@ -49,28 +52,4 @@extern int boot_get_local_nodeid (void );extern struct ia64_node_data *get_node_data_ptr (void ); -/* -* Given a node id, return a pointer to the pg_data_t for the node. -* The following 2 macros are similar. -* -* NODE_DATA - should be used in all code not related to system -* initialization. It uses pernode data structures to minimize -* offnode memory references. However, these structure are not -* present during boot. This macro can be used once cpu_init -* completes. -* -* BOOT_NODE_DATA -* - should be used during system initialization -* prior to freeing __initdata. It does not depend on the percpu -* area being present. -* -* NOTE: The names of these macros are misleading but are difficult to change -* since they are used in generic linux & on other architecures. -*/ -#define NODE_DATA (nid) (local_node_data->pg_data_ptrs[nid]) -#define BOOT_NODE_DATA (nid) boot_get_pg_data_ptr((long)(nid)) - -struct pglist_data ; -extern struct pglist_data *__init boot_get_pg_data_ptr (long ); -#endif /* _ASM_IA64_NODEDATA_H */
include/asm-ia64/numa.h +15 -1
@@ -15,13 +15,21 @@#ifdef CONFIG_DISCONTIGMEM # include <asm/mmzone.h> -# define NR_MEMBLKS (NR_BANKS)#else # define NR_NODES (8)# define NR_MEMBLKS (NR_NODES * 8)#endif #include <linux/cache.h> +#include <linux/threads.h> +#include <linux/smp.h> + +#define NODEMASK_WORDCOUNT ((NR_NODES+(BITS_PER_LONG-1))/BITS_PER_LONG) + +#define NODE_MASK_NONE { [0 ... ((NR_NODES+BITS_PER_LONG-1)/BITS_PER_LONG)-1] = 0 } + +typedef unsigned long nodemask_t [NODEMASK_WORDCOUNT ]; + extern volatile char cpu_to_node_map[NR_CPUS] __cacheline_aligned; extern volatile unsigned long node_to_cpu_mask[NR_NODES] __cacheline_aligned;
@@ -64,6 +72,12 @@#define local_nodeid (cpu_to_node_map[smp_processor_id()]) +#else /* !CONFIG_NUMA */ + +#define node_distance (from,to) 10 +#define paddr_to_nid (x) 0 +#define local_nodeid 0 +#endif /* CONFIG_NUMA */ #endif /* _ASM_IA64_NUMA_H */
include/asm-ia64/page.h +18 -10
@@ -94,19 +94,27 @@#define virt_addr_valid (kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) -#ifndef CONFIG_DISCONTIGMEM -# ifdef CONFIG_VIRTUAL_MEM_MAP -extern int ia64_pfn_valid (unsigned long pfn); -# define pfn_valid (pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) -# else -# define pfn_valid (pfn) ((pfn) < max_mapnr) -# endif -#define virt_to_page (kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) -#define page_to_pfn (page) ((unsigned long) (page - mem_map)) +#ifdef CONFIG_VIRTUAL_MEM_MAP +extern int ia64_pfn_valid (unsigned long pfn); +#else +#define ia64_pfn_valid (pfn) (1) +#endif + +extern unsigned long max_low_pfn; +#define pfn_valid (pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) + +#if defined(CONFIG_VIRTUAL_MEM_MAP ) +extern struct page *vmem_map; +#define pfn_to_page (pfn) (vmem_map + (pfn)) +#define page_to_pfn (page) ((unsigned long) (page - vmem_map)) +#else #define pfn_to_page (pfn) (mem_map + (pfn)) -#define page_to_phys (page) (page_to_pfn(page) << PAGE_SHIFT) +#define page_to_pfn (page) ((unsigned long) (page - mem_map))#endif +#define virt_to_page (kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) +#define page_to_phys (page) (page_to_pfn(page) << PAGE_SHIFT) + typedef union ia64_va { struct { unsigned long off : 61; /* intra-region offset */
include/asm-ia64/percpu.h +1 -0
@@ -46,6 +46,7 @@extern void percpu_modcopy (void *pcpudst,const void *src,unsigned long size);extern void setup_per_cpu_areas (void ); +extern void *per_cpu_init (void );#else /* ! SMP */
include/asm-ia64/pgtable.h +0 -1
@@ -174,7 +174,6 @@return (addr & (local_cpu_data->unimpl_pa_mask)) =0 ; } -#ifndef CONFIG_DISCONTIGMEM /* * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel * memory. For the return value to be meaningful, ADDR must be >@@ -190,7 +189,6 @@
*/
#define kern_addr_valid(addr) (1)
-#endif
/*
* Now come the defines and routines to manage and access the three-level
@@ -241,10 +239,8 @@
#define pte_none(pte) (!pte_val(pte))
#define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE))
#define pte_clear(pte) (pte_val(*(pte)) = 0UL)
-#ifndef CONFIG_DISCONTIGMEM
/* pte_page() returns the "struct page *" corresponding to the PTE: */
#define pte_page(pte) virt_to_page(((pte_val(pte) & _PFN_MASK) + PAGE_OFFSET))
-#endif
#define pmd_none(pmd) (!pmd_val(pmd))
#define pmd_bad(pmd) (!ia64_phys_addr_valid(pmd_val(pmd)))
@@ -415,7 +411,35 @@
}
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+extern unsigned long MAX_DMA_ADDRESS;
+
+/*
+ * Entries defined so far:
+ * - boot param structure itself
+ * - memory map
+ * - initrd (optional)
+ * - command line string
+ * - kernel code & data
+ *
+ * More could be added if necessary
+ */
+struct rsvd_region {
+ unsigned long start; /* virtual address of beginning of element */
+ unsigned long end; /* virtual address of end of element + 1 */
+};
+#define IA64_MAX_RSVD_REGIONS 5
+extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1]; +extern int num_rsvd_regions;
extern void paging_init (void);
+extern int filter_rsvd_memory(unsigned long start, unsigned long end, void *arg); +#ifdef CONFIG_DISCONTIGMEM
+extern void discontig_mem_init(void);
+extern void call_pernode_memory(unsigned long start, unsigned long end, void *arg); +#else
+extern unsigned long bootmap_start;
+extern int find_max_pfn(unsigned long start, unsigned long end, void *arg); +extern int find_bootmap_location(unsigned long start, unsigned long end, void *arg); +#endif
/*
* Note: The macros below rely on the fact that MAX_SWAPFILES_SHIFT <= number of
include/asm-ia64/processor.h +2 -0
@@ -186,6 +186,8 @@#endif #ifdef CONFIG_NUMA struct ia64_node_data *node_data; +struct cpuinfo_ia64 *cpu_data[NR_CPUS ]; +int nodeid;#endif };