kernel update (relative to v2.4.0-test1)
Subsystems (42)
[Linux-ia64] kernel update (relative to 2.4.2)
In reply to David MosbergerThe latest IA-64 patch is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.2-ia64-010228.diff*
What's in this patch:
- everything that was in the previous test patch, including:
o cpu-state clearing on execve()
o virtually mapped per-CPU data
o clearing of "invalid partition" when lowering privilege level
- sync with kernel v2.4.2
- CONFIG_ITANIUM_PTCG is now turned on automatically for CPUs newer than B2
- lots of SN1 updates from Kanoj
- add support for multiple interrupt domains (i.e., systems where the interrupt vectors are not necessarily shared by all CPUs)
- perfmon update from Stephane
- add Jack's ptc.g workaround fix and increase the ptc.g timeout value
Note: since there were non-trivial changes to the kernel exit path, I still consider this patch somewhat experimental. It has worked very well for me so far, but as always, ymmv and you may want to give it a good workout before burning it on a cd or similar...
This kernel has been tested on 4-way Lion, 2-way Big Sur, and 1-way Ski simulator.
Enjoy,
--david
arch/ia64/config.in +9 -7
@@ -18,7 +18,6 @@ comment 'General setup' define_bool CONFIG_IA64 y -define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data structure to 64 bytes define_bool CONFIG_ISA n define_bool CONFIG_EISA n
@@ -58,7 +57,12 @@ if [ "$CONFIG_ITANIUM_CSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium C0-step specific code' CONFIG_ITANIUM_C0_SPECIFIC fi - bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG + if [ "$CONFIG_ITANIUM_ASTEP_SPECIFIC" = "y" -o "$CONFIG_ITANIUM_B0_SPECIFIC" = "y" + -o "$CONFIG_ITANIUM_B1_SPECIFIC" = "y" -o "$CONFIG_ITANIUM_B2_SPECIFIC" = "y" ]; then + define_bool CONFIG_ITANIUM_PTCG n + else + define_bool CONFIG_ITANIUM_PTCG y + fi fi if [ "$CONFIG_IA64_DIG" = "y" ]; then
@@ -70,15 +74,11 @@ define_bool CONFIG_PM y define_bool CONFIG_ACPI y define_bool CONFIG_ACPI_INTERPRETER y + define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data structure to 64 bytes fi fi if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then - bool ' Enable use of global TLB purge instruction (ptc.g)' CONFIG_ITANIUM_PTCG - bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC - if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then - bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC - fi bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN1_SIM define_bool CONFIG_DEVFS_DEBUG y define_bool CONFIG_DEVFS_FS y
@@ -90,6 +90,7 @@ define_int CONFIG_CACHE_LINE_SHIFT 7 bool ' Enable DISCONTIGMEM support' CONFIG_DISCONTIGMEM bool ' Enable NUMA support' CONFIG_NUMA + define_int CONFIG_IA64_L1_CACHE_SHIFT 7 # align cache-sensitive data structure to 64 bytes fi define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
@@ -242,6 +243,7 @@ if [ "$CONFIG_SCSI" != "n" ]; then bool 'Simulated SCSI disk' CONFIG_SCSI_SIM fi + define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data structure to 64 bytes endmenu fi
arch/ia64/hp/hpsim_irq.c +7 -5
@@ -1,8 +1,8 @@/* * Platform dependent support for HP simulator. * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #include <linux/init.h>
@@ -35,10 +35,12 @@void __init hpsim_irq_init (void ) { +irq_desc_t *idesc;int i; -for (i =IA64_MIN_VECTORED_IRQ ; i <=IA64_MAX_VECTORED_IRQ ; ++i) { -if (irq_desc[i].handler = &no_irq_type) - irq_desc[i].handler = &irq_type_hp_sim; +for (i =0 ; i <NR_IRQS ; ++i) { + idesc =irq_desc (i); +if (idesc->handler = &no_irq_type) + idesc->handler = &irq_type_hp_sim; } }
arch/ia64/kernel/brl_emu.c +3 -3
@@ -24,8 +24,8 @@* or all 1's for the address to be valid. */ #define unimplemented_virtual_address (va) ( \ - ((va) & current_cpu_data->unimpl_va_mask) != 0 && \ - ((va) & current_cpu_data->unimpl_va_mask) != current_cpu_data->unimpl_va_mask \ + ((va) & local_cpu_data->unimpl_va_mask) != 0 && \ + ((va) & local_cpu_data->unimpl_va_mask) != local_cpu_data->unimpl_va_mask \ )/*
@@ -35,7 +35,7 @@* address to be valid. */ #define unimplemented_physical_address (pa) ( \ - ((pa) & current_cpu_data->unimpl_pa_mask) != 0 \ + ((pa) & local_cpu_data->unimpl_pa_mask) != 0 \ )/*
arch/ia64/kernel/ia64_ksyms.c +4 -6
@@ -24,8 +24,11 @@EXPORT_SYMBOL (strstr);EXPORT_SYMBOL (strtok); -#include <asm/hw_irq.h> +#include <linux/irq.h> EXPORT_SYMBOL (isa_irq_to_vector_map); +EXPORT_SYMBOL (enable_irq); +EXPORT_SYMBOL (disable_irq); +EXPORT_SYMBOL (disable_irq_nosync);#include <linux/in6.h> #include <asm/checksum.h>
@@ -39,11 +42,6 @@EXPORT_SYMBOL (__ia64_memcpy_fromio);EXPORT_SYMBOL (__ia64_memcpy_toio);EXPORT_SYMBOL (__ia64_memset_c_io); - -#include <asm/irq.h> -EXPORT_SYMBOL (enable_irq); -EXPORT_SYMBOL (disable_irq); -EXPORT_SYMBOL (disable_irq_nosync);#include <asm/semaphore.h> EXPORT_SYMBOL_NOVERS (__down);
arch/ia64/kernel/iosapic.c +36 -29
171 lines not on this page · raw message
arch/ia64/kernel/irq.c +52 -63
350 lines not on this page · raw message
arch/ia64/kernel/irq_ia64.c +24 -24
91 lines not on this page · raw message
arch/ia64/kernel/mca.c +6 -8
@@ -235,7 +235,7 @@/* Register the rendezvous interrupt vector with SAL */ if (ia64_sal_mc_set_params (SAL_MC_PARAM_RENDEZ_INT ,SAL_MC_PARAM_MECHANISM_INT , -IA64_MCA_RENDEZ_INT_VECTOR , +IA64_MCA_RENDEZ_VECTOR ,IA64_MCA_RENDEZ_TIMEOUT ,0 ))return ;
@@ -243,7 +243,7 @@/* Register the wakeup interrupt vector with SAL */ if (ia64_sal_mc_set_params (SAL_MC_PARAM_RENDEZ_WAKEUP ,SAL_MC_PARAM_MECHANISM_INT , -IA64_MCA_WAKEUP_INT_VECTOR , +IA64_MCA_WAKEUP_VECTOR ,0 ,0 ))return ;
@@ -252,8 +252,7 @@/* * Setup the correctable machine check vector */ -ia64_mca_cmc_vector_setup (IA64_CMC_INT_ENABLE , -IA64_MCA_CMC_INT_VECTOR ); +ia64_mca_cmc_vector_setup (IA64_CMC_INT_ENABLE ,IA64_CMC_VECTOR );IA64_MCA_DEBUG ("ia64_mca_init : correctable mca vector setup done\n" );
@@ -334,8 +333,8 @@void ia64_mca_wakeup_ipi_wait (void ) { -int irr_num = (IA64_MCA_WAKEUP_INT_VECTOR >>6 ); -int irr_bit = (IA64_MCA_WAKEUP_INT_VECTOR &0x3f ); +int irr_num = (IA64_MCA_WAKEUP_VECTOR >>6 ); +int irr_bit = (IA64_MCA_WAKEUP_VECTOR &0x3f );u64 irr =0 ; do {
@@ -368,9 +367,8 @@void ia64_mca_wakeup (int cpu) { -platform_send_ipi (cpu,IA64_MCA_WAKEUP_INT_VECTOR ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (cpu,IA64_MCA_WAKEUP_VECTOR ,IA64_IPI_DM_INT ,0 ); ia64_mc_info.imi_rendez_checkin[cpu] =IA64_MCA_RENDEZ_CHECKIN_NOTDONE ; - }/* * ia64_mca_wakeup_all
arch/ia64/kernel/perfmon.c +44 -49
267 lines not on this page · raw message
arch/ia64/kernel/setup.c +3 -3
@@ -263,8 +263,8 @@ia64_mca_init ();#endif -paging_init ();platform_setup (cmdline_p); +paging_init (); }/*
@@ -417,7 +417,7 @@ia64_mmu_init (); -identify_cpu (current_cpu_data); +identify_cpu (local_cpu_data);#ifdef CONFIG_IA32_SUPPORT /* initialize global ia32 state - CR0 and CR4 */
@@ -456,5 +456,5 @@printk ("cpu_init: PAL RSE info failed, assuming 96 physical stacked regs\n" ); num_phys_stacked =96 ; } - current_cpu_data->phys_stacked_size_p8 = num_phys_stacked*8 +8 ; + local_cpu_data->phys_stacked_size_p8 = num_phys_stacked*8 +8 ; }
arch/ia64/kernel/smp.c +23 -12
@@ -159,11 +159,11 @@void handle_IPI (int irq,void *dev_id,struct pt_regs *regs) { -unsigned long *pending_ipis = ¤t_cpu_data->ipi_operation; +unsigned long *pending_ipis = &local_cpu_data->ipi_operation;unsigned long ops;/* Count this now; we may make a call that never returns. */ - current_cpu_data->ipi_count++; + local_cpu_data->ipi_count++;mb ();/* Order interrupt and bit testing. */ while ((ops =xchg (pending_ipis,0 )) !=0 ) {
@@ -278,7 +278,7 @@return ;set_bit (op, &cpu_data[dest_cpu].ipi_operation); -platform_send_ipi (dest_cpu,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (dest_cpu,IA64_IPI_VECTOR ,IA64_IPI_DM_INT ,0 ); } static inline void
@@ -320,11 +320,23 @@ }#ifndef CONFIG_ITANIUM_PTCG +void smp_send_flush_tlb (void ) {send_IPI_allbutself (IPI_FLUSH_TLB ); } + +void +smp_resend_flush_tlb (void ) +{ +/* +* Really need a null IPI but since this rarely should happen & since this code +* will go away, lets not add one. +*/ +send_IPI_allbutself (IPI_RESCHEDULE ); +} +#endif /* !CONFIG_ITANIUM_PTCG */ /*
@@ -427,7 +439,7 @@int i;for (i =0 ; i < smp_num_cpus; i++) {if (i !=smp_processor_id ()) -platform_send_ipi (i,IPI_IRQ ,IA64_IPI_DM_INT ,0 ); +platform_send_ipi (i,IA64_IPI_VECTOR ,IA64_IPI_DM_INT ,0 ); } goto retry;#else
@@ -460,8 +472,8 @@static inline void __init smp_setup_percpu_timer (void ) { - current_cpu_data->prof_counter =1 ; - current_cpu_data->prof_multiplier =1 ; + local_cpu_data->prof_counter =1 ; + local_cpu_data->prof_multiplier =1 ; }void
@@ -469,8 +481,8 @@ {int user =user_mode (regs); -if (--current_cpu_data->prof_counter <=0 ) { - current_cpu_data->prof_counter = current_cpu_data->prof_multiplier; +if (--local_cpu_data->prof_counter <=0 ) { + local_cpu_data->prof_counter = local_cpu_data->prof_multiplier;update_process_times (user); } }
@@ -506,11 +518,10 @@#ifdef CONFIG_PERFMON perfmon_init_percpu ();#endif -local_irq_enable ();/* Interrupts have been off until now */ calibrate_delay (); - current_cpu_data->loops_per_jiffy = loops_per_jiffy; + local_cpu_data->loops_per_jiffy = loops_per_jiffy;/* allow the master to continue */ set_bit (cpu, &cpu_callin_map);
@@ -602,7 +613,7 @@unsigned long bogosum;/* on the BP, the kernel already called calibrate_delay_loop() in init/main.c */ - current_cpu_data->loops_per_jiffy = loops_per_jiffy; + local_cpu_data->loops_per_jiffy = loops_per_jiffy;#if 0 smp_tune_scheduling ();#endif
@@ -680,7 +691,7 @@* Assume that CPU's have been discovered by some platform-dependant * interface. For SoftSDV/Lion, that would be ACPI. * -* Setup of the IPI irq handler is done in irq.c:init_IRQ_SMP(). +* Setup of the IPI irq handler is done in irq.c:init_IRQ(). * * This also registers the AP OS_MC_REDVEZ address with SAL. */
arch/ia64/kernel/time.c +17 -21
@@ -74,7 +74,7 @@unsigned long now =ia64_get_itc (), last_tick;unsigned long elapsed_cycles, lost = jiffies - wall_jiffies; - last_tick = (current_cpu_data->itm_next - (lost+1 )*current_cpu_data->itm_delta); + last_tick = (local_cpu_data->itm_next - (lost+1 )*local_cpu_data->itm_delta);# if 1 if ((long ) (now - last_tick) <0 ) { printk("Yikes: now < last_tick (now=0x%lx,last_tick=%lx)! No can do.\n",
@@ -83,7 +83,7 @@ }# endif elapsed_cycles = now - last_tick; -return (elapsed_cycles*current_cpu_data->usec_per_cyc) >>IA64_USEC_PER_CYC_SHIFT ; +return (elapsed_cycles*local_cpu_data->usec_per_cyc) >>IA64_USEC_PER_CYC_SHIFT ;#endif }
@@ -144,7 +144,7 @@ {unsigned long new_itm; - new_itm = current_cpu_data->itm_next; + new_itm = local_cpu_data->itm_next;if (!time_after (ia64_get_itc (), new_itm)) printk("Oops: timer tick before it's due (itc=%lx,itm=%lx)\n",
@@ -174,8 +174,8 @@write_unlock (&xtime_lock); } - new_itm += current_cpu_data->itm_delta; - current_cpu_data->itm_next = new_itm; + new_itm += local_cpu_data->itm_delta; + local_cpu_data->itm_next = new_itm;if (time_after (new_itm,ia64_get_itc ()))break ; }
@@ -188,8 +188,8 @@* let our clock run too fast (with the potentially devastating effect of * losing monotony of time). */ -while (!time_after (new_itm,ia64_get_itc () + current_cpu_data->itm_delta/2 )) - new_itm += current_cpu_data->itm_delta; +while (!time_after (new_itm,ia64_get_itc () + local_cpu_data->itm_delta/2 )) + new_itm += local_cpu_data->itm_delta;ia64_set_itm (new_itm);/* double check, in case we got hit by a (slow) PMI: */ }while (time_after_eq (ia64_get_itc (), new_itm));
@@ -205,9 +205,9 @@unsigned long shift =0 , delta;/* arrange for the cycle counter to generate a timer interrupt: */ -ia64_set_itv (TIMER_IRQ ); +ia64_set_itv (IA64_TIMER_VECTOR ); - delta = current_cpu_data->itm_delta; + delta = local_cpu_data->itm_delta;/* * Stagger the timer tick for each CPU so they don't occur all at (almost) the * same time:
@@ -216,8 +216,8 @@unsigned long hi =1UL <<ia64_fls (cpu); shift = (2 *(cpu - hi) +1 ) * delta/hi/2 ; } - current_cpu_data->itm_next =ia64_get_itc () + delta + shift; -ia64_set_itm (current_cpu_data->itm_next); + local_cpu_data->itm_next =ia64_get_itc () + delta + shift; +ia64_set_itm (local_cpu_data->itm_next); }void __init
@@ -258,16 +258,16 @@ itc_ratio.den =1 ;/* avoid division by zero */ itc_freq = (platform_base_freq*itc_ratio.num)/itc_ratio.den; - current_cpu_data->itm_delta = (itc_freq +HZ /2 ) /HZ ; + local_cpu_data->itm_delta = (itc_freq +HZ /2 ) /HZ ;printk ("CPU %d: base freq=%lu.%03luMHz, ITC ratio=%lu/%lu, ITC freq=%lu.%03luMHz\n" ,smp_processor_id (), platform_base_freq /1000000 , (platform_base_freq /1000 ) %1000 , itc_ratio.num, itc_ratio.den, itc_freq /1000000 , (itc_freq /1000 ) %1000 ); - current_cpu_data->proc_freq = (platform_base_freq*proc_ratio.num)/proc_ratio.den; - current_cpu_data->itc_freq = itc_freq; - current_cpu_data->cyc_per_usec = (itc_freq +500000 ) /1000000 ; - current_cpu_data->usec_per_cyc = ((1000000UL <<IA64_USEC_PER_CYC_SHIFT ) + local_cpu_data->proc_freq = (platform_base_freq*proc_ratio.num)/proc_ratio.den; + local_cpu_data->itc_freq = itc_freq; + local_cpu_data->cyc_per_usec = (itc_freq +500000 ) /1000000 ; + local_cpu_data->usec_per_cyc = ((1000000UL <<IA64_USEC_PER_CYC_SHIFT ) + itc_freq/2 )/itc_freq;/* Setup the CPU local timer tick */
@@ -283,11 +283,7 @@void __init time_init (void ) { -/* we can't do request_irq() here because the kmalloc() would fail... */ - irq_desc[TIMER_IRQ ].status |=IRQ_PER_CPU ; - irq_desc[TIMER_IRQ ].handler = &irq_type_ia64_sapic; -setup_irq (TIMER_IRQ , &timer_irqaction); - +register_percpu_irq (IA64_TIMER_VECTOR , &timer_irqaction);efi_gettimeofday (&xtime);ia64_init_itm (); }
arch/ia64/kernel/unwind.c +3 -3
@@ -1613,7 +1613,7 @@case UNW_INSN_LOAD :#if UNW_DEBUG -if ((s[val] & (current_cpu_data->unimpl_va_mask |0x7 )) !=0 +if ((s[val] & (local_cpu_data->unimpl_va_mask |0x7 )) !=0 || s[val] <TASK_SIZE ) {debug (1 ,"unwind: rejecting bad psp=0x%lx\n" , s[val]);
@@ -1647,7 +1647,7 @@int have_write_lock =0 ;struct unw_script *scr; -if ((info->ip & (current_cpu_data->unimpl_va_mask |0xf )) || info->ip <TASK_SIZE ) { +if ((info->ip & (local_cpu_data->unimpl_va_mask |0xf )) || info->ip <TASK_SIZE ) {/* don't let obviously bad addresses pollute the cache */ debug (1 ,"unwind: rejecting bad ip=0x%lx\n" , info->ip); info->rp_loc =0 ;
@@ -1945,7 +1945,7 @@return -1 ; info->ip =read_reg (info, sol -2 , &is_nat); -if (is_nat || (info->ip & (current_cpu_data->unimpl_va_mask |0xf ))) +if (is_nat || (info->ip & (local_cpu_data->unimpl_va_mask |0xf )))/* reject let obviously bad addresses */ return -1 ;
arch/ia64/mm/init.c +3 -3
@@ -1,8 +1,8 @@/* * Initialize MMU support. * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #include <linux/config.h> #include <linux/kernel.h>
@@ -368,7 +368,7 @@# define vmlpt_bits (impl_va_bits - PAGE_SHIFT + pte_bits)# define POW2 (n) (1ULL << (n)) - impl_va_bits =ffz (~(current_cpu_data->unimpl_va_mask | (7UL <<61 ))); + impl_va_bits =ffz (~(local_cpu_data->unimpl_va_mask | (7UL <<61 )));if (impl_va_bits <51 || impl_va_bits >61 )panic ("CPU has bogus IMPL_VA_MSB value of %lu!\n" , impl_va_bits -1 );
arch/ia64/mm/tlb.c +16 -15
@@ -71,7 +71,7 @@if (!(flags &IA64_PSR_I )) { saved_tpr =ia64_get_tpr ();ia64_srlz_d (); -ia64_set_tpr (IPI_IRQ -16 ); +ia64_set_tpr (IA64_IPI_VECTOR -16 );ia64_srlz_d ();local_irq_enable (); }
@@ -97,13 +97,14 @@/* * Wait for other CPUs to finish purging entries. */ -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC ) { +extern void smp_resend_flush_tlb (void );unsigned long start =ia64_get_itc (); +while (atomic_read (&flush_cpu_count) >0 ) { -if ((ia64_get_itc () - start) >40000UL ) { -atomic_set (&flush_cpu_count, smp_num_cpus -1 ); -smp_send_flush_tlb (); +if ((ia64_get_itc () - start) >400000UL ) { +smp_resend_flush_tlb (); start =ia64_get_itc (); } }
@@ -166,11 +167,11 @@ {unsigned long i, j, flags, count0, count1, stride0, stride1, addr; - addr = current_cpu_data->ptce_base; - count0 = current_cpu_data->ptce_count[0 ]; - count1 = current_cpu_data->ptce_count[1 ]; - stride0 = current_cpu_data->ptce_stride[0 ]; - stride1 = current_cpu_data->ptce_stride[1 ]; + addr = local_cpu_data->ptce_base; + count0 = local_cpu_data->ptce_count[0 ]; + count1 = local_cpu_data->ptce_count[1 ]; + stride0 = local_cpu_data->ptce_stride[0 ]; + stride1 = local_cpu_data->ptce_stride[1 ];local_irq_save (flags);for (i =0 ; i < count0; ++i) {
@@ -249,11 +250,11 @@ia64_ptce_info_t ptce_info;ia64_get_ptce (&ptce_info); - current_cpu_data->ptce_base = ptce_info.base; - current_cpu_data->ptce_count[0 ] = ptce_info.count[0 ]; - current_cpu_data->ptce_count[1 ] = ptce_info.count[1 ]; - current_cpu_data->ptce_stride[0 ] = ptce_info.stride[0 ]; - current_cpu_data->ptce_stride[1 ] = ptce_info.stride[1 ]; + local_cpu_data->ptce_base = ptce_info.base; + local_cpu_data->ptce_count[0 ] = ptce_info.count[0 ]; + local_cpu_data->ptce_count[1 ] = ptce_info.count[1 ]; + local_cpu_data->ptce_stride[0 ] = ptce_info.stride[0 ]; + local_cpu_data->ptce_stride[1 ] = ptce_info.stride[1 ];__flush_tlb_all ();/* nuke left overs from bootstrapping... */ }
drivers/acpi/acpiconf.c +3 -3
@@ -353,9 +353,9 @@if (prt) {for ( ; prt->length >0 ; pvec++) { pvec->bus = (UINT16 )i; - pvec->pci_id = prt->data.address; - pvec->pin = (UINT8 )prt->data.pin; - pvec->irq = (UINT8 )prt->data.source_index; + pvec->pci_id = prt->address; + pvec->pin = (UINT8 )prt->pin; + pvec->irq = (UINT8 )prt->source_index; prt = (PCI_ROUTING_TABLE *) ((NATIVE_UINT )prt + (NATIVE_UINT )prt->length);//prt = ROUND_PTR_UP_TO_4(prt, PCI_ROUTING_TABLE);
drivers/acpi/os.c +1 -1
@@ -244,7 +244,7 @@ acpi_irq_handler =NULL ; - desc = irq_desc + irq; + desc =irq_desc (irq);spin_lock_irqsave (&desc->lock,flags); p = &desc->action;for (;;) {
drivers/char/simserial.c +1 -0
@@ -153,6 +153,7 @@ }else if ( seen_esc =2 ) {if ( ch ='P' )show_state ();/* F1 key */ if ( ch ='Q' )show_buffers ();/* F2 key */ + seen_esc =0 ;continue ; }
fs/proc/base.c +2 -0
@@ -400,8 +400,10 @@switch (orig) {case 0 : file->f_pos = offset; +break ;case 1 : file->f_pos += offset; +break ;default :return -EINVAL ; }
include/asm-ia64/delay.h +1 -1
@@ -76,7 +76,7 @@ udelay (unsigned long usecs) {unsigned long start =ia64_get_itc (); -unsigned long cycles = usecs*current_cpu_data->cyc_per_usec; +unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;while (ia64_get_itc () - start < cycles)/* skip */ ;
include/asm-ia64/hardirq.h +23 -16
@@ -18,24 +18,31 @@*/ #define softirq_active (cpu) (cpu_data[cpu].softirq.active)#define softirq_mask (cpu) (cpu_data[cpu].softirq.mask) -#define local_irq_count (cpu) (cpu_data[cpu].irq_stat.f.irq_count) -#define local_bh_count (cpu) (cpu_data[cpu].irq_stat.f.bh_count) +#define irq_count (cpu) (cpu_data[cpu].irq_stat.f.irq_count) +#define bh_count (cpu) (cpu_data[cpu].irq_stat.f.bh_count)#define syscall_count (cpu)/* unused on IA-64 */ #define nmi_count (cpu) 0 +#define local_softirq_active () (local_cpu_data->softirq.active) +#define local_softirq_mask () (local_cpu_data->softirq.mask) +#define local_irq_count () (local_cpu_data->irq_stat.f.irq_count) +#define local_bh_count () (local_cpu_data->irq_stat.f.bh_count) +#define local_syscall_count ()/* unused on IA-64 */ +#define local_nmi_count () 0 +/* * Are we in an interrupt context? Either doing bottom half or hardware interrupt * processing? */ -#define in_interrupt () (current_cpu_data->irq_stat.irq_and_bh_counts != 0) -#define in_irq () (current_cpu_data->irq_stat.f.irq_count != 0) +#define in_interrupt () (local_cpu_data->irq_stat.irq_and_bh_counts != 0) +#define in_irq () (local_cpu_data->irq_stat.f.irq_count != 0)#ifndef CONFIG_SMP -# define hardirq_trylock (cpu) (local_irq_count(cpu) = 0) -# define hardirq_endlock (cpu) do { } while (0) +# define local_hardirq_trylock () (local_irq_count() = 0) +# define local_hardirq_endlock () do { } while (0) -# define irq_enter (cpu, irq) (local_irq_count(cpu)++) -# define irq_exit (cpu, irq) (local_irq_count(cpu)--) +# define local_irq_enter (irq) (local_irq_count(cpu)++) +# define local_irq_exit (irq) (local_irq_count(cpu)--)# define synchronize_irq () barrier()#else
@@ -52,7 +59,7 @@int i;for (i =0 ; i < smp_num_cpus; i++) -if (local_irq_count (i)) +if (irq_count (i))return 1 ;return 0 ; }
@@ -68,9 +75,9 @@ }static inline void -irq_enter (int cpu,int irq) +local_irq_enter (int irq) { -local_irq_count (cpu)++; +local_irq_count ()++;while (test_bit (0 ,&global_irq_lock)) {/* nothing */ ;
@@ -78,18 +85,18 @@ }static inline void -irq_exit (int cpu,int irq) +local_irq_exit (int irq) { -local_irq_count (cpu)--; +local_irq_count ()--; }static inline int -hardirq_trylock (int cpu) +local_hardirq_trylock (void ) { -return !local_irq_count (cpu) && !test_bit (0 ,&global_irq_lock); +return !local_irq_count () && !test_bit (0 ,&global_irq_lock); } -#define hardirq_endlock (cpu) do { } while (0) +#define local_hardirq_endlock () do { } while (0)extern void synchronize_irq (void );
include/asm-ia64/hw_irq.h +74 -11
120 lines not on this page · raw message
include/asm-ia64/machvec.h +24 -2
@@ -4,8 +4,8 @@* Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) Srinivasa Thirumalachar <[email protected]> * Copyright (C) Vijay Chander <[email protected]> -* Copyright (C) 1999-2000 Hewlett-Packard Co. -* Copyright (C) 1999-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1999-2001 Hewlett-Packard Co. +* Copyright (C) 1999-2001 David Mosberger-Tang <[email protected]> */ #ifndef _ASM_IA64_MACHVEC_H#define _ASM_IA64_MACHVEC_H
@@ -17,6 +17,7 @@struct pci_dev ;struct pt_regs ;struct scatterlist ; +struct irq_desc ;typedef void ia64_mv_setup_t (char **);typedef void ia64_mv_irq_init_t (void );
@@ -27,6 +28,9 @@typedef void ia64_mv_cmci_handler_t (int ,void *,struct pt_regs *);typedef void ia64_mv_log_print_t (void );typedef void ia64_mv_send_ipi_t (int ,int ,int ,int ); +typedef struct irq_desc *ia64_mv_irq_desc (unsigned int ); +typedef u8 ia64_mv_irq_to_vector (u8 ); +typedef unsigned int ia64_mv_local_vector_to_irq (u8 vector);/* PCI-DMA interface: */ typedef void ia64_mv_pci_dma_init (void );
@@ -88,6 +92,9 @@# define platform_pci_dma_sync_single ia64_mv.sync_single# define platform_pci_dma_sync_sg ia64_mv.sync_sg# define platform_pci_dma_address ia64_mv.dma_address +# define platform_irq_desc ia64_mv.irq_desc +# define platform_irq_to_vector ia64_mv.irq_to_vector +# define platform_local_vector_to_irq ia64_mv.local_vector_to_irq# define platform_inb ia64_mv.inb# define platform_inw ia64_mv.inw# define platform_inl ia64_mv.inl
@@ -117,6 +124,9 @@ia64_mv_pci_dma_sync_single *sync_single;ia64_mv_pci_dma_sync_sg *sync_sg;ia64_mv_pci_dma_address *dma_address; +ia64_mv_irq_desc *irq_desc; +ia64_mv_irq_to_vector *irq_to_vector; +ia64_mv_local_vector_to_irq *local_vector_to_irq;ia64_mv_inb_t *inb;ia64_mv_inw_t *inw;ia64_mv_inl_t *inl;
@@ -147,6 +157,9 @@ platform_pci_dma_sync_single, \ platform_pci_dma_sync_sg, \ platform_pci_dma_address, \ + platform_irq_desc, \ + platform_irq_to_vector, \ + platform_local_vector_to_irq, \ platform_inb, \ platform_inw, \ platform_inl, \
@@ -233,6 +246,15 @@#endif #ifndef platform_pci_dma_address# define platform_pci_dma_address swiotlb_dma_address +#endif +#ifndef platform_irq_desc +# define platform_irq_desc __ia64_irq_desc +#endif +#ifndef platform_irq_to_vector +# define platform_irq_to_vector __ia64_irq_to_vector +#endif +#ifndef platform_local_vector_to_irq +# define platform_local_vector_to_irq __ia64_local_vector_to_irq#endif #ifndef platform_inb# define platform_inb __ia64_inb
include/asm-ia64/machvec_sn1.h +1 -0
@@ -41,6 +41,7 @@#define platform_outb sn1_outb#define platform_outw sn1_outw#define platform_outl sn1_outl +#define platform_pci_dma_init machvec_noop#define platform_pci_alloc_consistent sn1_pci_alloc_consistent#define platform_pci_free_consistent sn1_pci_free_consistent#define platform_pci_map_single sn1_pci_map_single
include/asm-ia64/mca.h +0 -6
@@ -18,7 +18,6 @@#include <asm/param.h> #include <asm/sal.h> #include <asm/processor.h> -#include <asm/hw_irq.h> /* These are the return codes from all the IA64_MCA specific interfaces */ typedef int ia64_mca_return_code_t ;
@@ -30,11 +29,6 @@#define IA64_MCA_RENDEZ_TIMEOUT (100 * HZ)/* 1000 milliseconds */ -/* Interrupt vectors reserved for MC handling. */ -#define IA64_MCA_RENDEZ_INT_VECTOR MCA_RENDEZ_IRQ/* Rendez interrupt */ -#define IA64_MCA_WAKEUP_INT_VECTOR MCA_WAKEUP_IRQ/* Wakeup interrupt */ -#define IA64_MCA_CMC_INT_VECTOR CMC_IRQ/* Correctable machine check interrupt */ -#define IA64_CMC_INT_DISABLE 0#define IA64_CMC_INT_ENABLE 1
include/asm-ia64/offsets.h +3 -2
@@ -11,7 +11,7 @@#define PT_PTRACED_BIT 0#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 3376/* 0xd30 */ +#define IA64_TASK_SIZE 3904/* 0xf40 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -24,7 +24,8 @@#define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ #define IA64_TASK_THREAD_OFFSET 1456/* 0x5b0 */ #define IA64_TASK_THREAD_KSP_OFFSET 1456/* 0x5b0 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 3224/* 0xc98 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 3752/* 0xea8 */ +#define IA64_TASK_PFM_NOTIFY_OFFSET 3648/* 0xe40 */ #define IA64_TASK_PID_OFFSET 196/* 0xc4 */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
include/asm-ia64/pgalloc.h +6 -6
@@ -8,8 +8,8 @@* This hopefully works with any (fixed) ia-64 page-size, as defined * in <asm/page.h> (currently 8192). * -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> * Copyright (C) 2000, Goutham Rao <[email protected]> */
@@ -28,10 +28,10 @@* a lot of work and caused unnecessary memory traffic. How broken... * We fix this by caching them. */ -#define pgd_quicklist (current_cpu_data->pgd_quick) -#define pmd_quicklist (current_cpu_data->pmd_quick) -#define pte_quicklist (current_cpu_data->pte_quick) -#define pgtable_cache_size (current_cpu_data->pgtable_cache_sz) +#define pgd_quicklist (local_cpu_data->pgd_quick) +#define pmd_quicklist (local_cpu_data->pmd_quick) +#define pte_quicklist (local_cpu_data->pte_quick) +#define pgtable_cache_size (local_cpu_data->pgtable_cache_sz)static __inline__pgd_t *get_pgd_slow (void )
include/asm-ia64/pgtable.h +1 -1
@@ -175,7 +175,7 @@static inline long ia64_phys_addr_valid (unsigned long addr) { -return (addr & (current_cpu_data->unimpl_pa_mask)) =0 ; +return (addr & (local_cpu_data->unimpl_pa_mask)) =0 ; }/*
include/asm-ia64/processor.h +5 -1
@@ -283,7 +283,11 @@#endif } __attribute__ ((aligned (PAGE_SIZE))) ; -#define current_cpu_data ((struct cpuinfo_ia64 *) PERCPU_ADDR) +/* +* The "local" data pointer. It points to the per-CPU data of the currently executing +* CPU, much like "current" points to the per-task data of the currently executing task. +*/ +#define local_cpu_data ((struct cpuinfo_ia64 *) PERCPU_ADDR)extern struct cpuinfo_ia64 cpu_data[NR_CPUS ];
include/asm-ia64/softirq.h +5 -8
@@ -2,17 +2,14 @@#define _ASM_IA64_SOFTIRQ_H/* -* Copyright (C) 1998-2000 Hewlett-Packard Co -* Copyright (C) 1998-2000 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998-2001 Hewlett-Packard Co +* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> */ #include <asm/hardirq.h> -#define cpu_bh_disable (cpu) do { local_bh_count(cpu)++; barrier(); } while (0) -#define cpu_bh_enable (cpu) do { barrier(); local_bh_count(cpu)--; } while (0) +#define local_bh_disable () do { local_bh_count()++; barrier(); } while (0) +#define local_bh_enable () do { barrier(); local_bh_count()--; } while (0) -#define local_bh_disable () cpu_bh_disable(smp_processor_id()) -#define local_bh_enable () cpu_bh_enable(smp_processor_id()) - -#define in_softirq () (local_bh_count(smp_processor_id()) != 0) +#define in_softirq () (local_bh_count() != 0)#endif /* _ASM_IA64_SOFTIRQ_H */
include/linux/irq.h +1 -3
@@ -44,15 +44,13 @@* * Pad this out to 32 bytes for cache and indexing reasons. */ -typedef struct { +typedef struct irq_desc {unsigned int status;/* IRQ status */ hw_irq_controller *handler;struct irqaction *action;/* IRQ action list */ unsigned int depth;/* nested irq disables */ spinlock_t lock; }____cacheline_aligned irq_desc_t ; - -extern irq_desc_t irq_desc [NR_IRQS ];#include <asm/hw_irq.h> /* the arch dependent stuff */
include/linux/irq_cpustat.h +2 -2
@@ -28,8 +28,8 @@/* arch independent irq_stat fields */ #define softirq_active (cpu) __IRQ_STAT((cpu), __softirq_active)#define softirq_mask (cpu) __IRQ_STAT((cpu), __softirq_mask) -#define local_irq_count (cpu) __IRQ_STAT((cpu), __local_irq_count) -#define local_bh_count (cpu) __IRQ_STAT((cpu), __local_bh_count) +#define irq_count (cpu) __IRQ_STAT((cpu), __irq_count) +#define bh_count (cpu) __IRQ_STAT((cpu), __bh_count)#define syscall_count (cpu) __IRQ_STAT((cpu), __syscall_count)/* arch dependent irq_stat fields */ #define nmi_count (cpu) __IRQ_STAT((cpu), __nmi_count)/* i386, ia64 */
kernel/softirq.c +2 -4
@@ -245,18 +245,16 @@static void bh_action (unsigned long nr) { -int cpu =smp_processor_id (); -if (!spin_trylock (&global_bh_lock)) goto resched; -if (!hardirq_trylock (cpu)) +if (!local_hardirq_trylock ()) goto resched_unlock;if (bh_base[nr]) bh_base[nr](); -hardirq_endlock (cpu); +local_hardirq_endlock ();spin_unlock (&global_bh_lock);return ;
kernel/timer.c +1 -1
@@ -592,7 +592,7 @@else kstat.per_cpu_user[cpu] += user_tick; kstat.per_cpu_system[cpu] += system; - }else if (local_bh_count (cpu) ||local_irq_count (cpu) >1 ) + }else if (local_bh_count () ||local_irq_count () >1 ) kstat.per_cpu_system[cpu] += system; }
Re: [Linux-ia64] kernel update (relative to 2.4.2)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> The latest IA-64 patch is now available at: |> |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ |> |> in file linux-2.4.2-ia64-010228.diff*
This doesn't compile:
irq.c:458:28: too many arguments in invocation of macro "local_irq_count" irq.c:474:27: too many arguments in invocation of macro "local_irq_count" irq.c: In function `handle_IRQ_event':
irq.c:458: `local_irq_count' undeclared (first use in this function) irq.c:458: (Each undeclared identifier is reported only once irq.c:458: for each function it appears in.)
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.2)
In reply to David MosbergerAndreas Schwab <[email protected]> writes:
|> David Mosberger <[email protected]> writes: |> |> |> The latest IA-64 patch is now available at: |> |> |> |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ |> |> |> |> in file linux-2.4.2-ia64-010228.diff* |> |> This doesn't compile: |> |> irq.c:458:28: too many arguments in invocation of macro "local_irq_count" |> irq.c:474:27: too many arguments in invocation of macro "local_irq_count" |> irq.c: In function `handle_IRQ_event': |> irq.c:458: `local_irq_count' undeclared (first use in this function) |> irq.c:458: (Each undeclared identifier is reported only once |> irq.c:458: for each function it appears in.)
Another bug:
irq_ia64.c: In function `init_IRQ':
irq_ia64.c:158: `ipi_irqaction' undeclared (first use in this function) irq_ia64.c:158: (Each undeclared identifier is reported only once irq_ia64.c:158: for each function it appears in.)
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.2)
In reply to David MosbergerOK, turns out there were two silly typos which I didn't catch because the simulator configuration was accidentally set for CONFIG_SMP...
Here are the fixes:
ia64/kernel/irq_ia64.c renamed from ia64/kernel/irq_ia64.c~ +2 -0
@@ -155,7 +155,9 @@init_IRQ (void) {register_percpu_irq (IA64_SPURIOUS_INT_VECTOR ,NULL ); +#ifdef CONFIG_SMP register_percpu_irq (IA64_IPI_VECTOR , &ipi_irqaction); +#endif platform_irq_init (); }
asm-ia64/hardirq.h renamed from asm-ia64/hardirq.h~ +2 -2
@@ -41,8 +41,8 @@# define local_hardirq_trylock () (local_irq_count() == 0)# define local_hardirq_endlock () do { } while (0) -# define local_irq_enter (irq) (local_irq_count(cpu)++) -# define local_irq_exit (irq) (local_irq_count(cpu)--) +# define local_irq_enter (irq) (local_irq_count()++) +# define local_irq_exit (irq) (local_irq_count()--)# define synchronize_irq () barrier()#else
I also updated the patch on linux.kernel.org. The fixed version has a size of 456023 bytes.
--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> Andreas Schwab <[email protected]> writes: |> David Mosberger Andreas> <[email protected]> writes: |> |> |> The latest IA-64 patch Andreas> is now available at: |> |> |> |>
Andreas> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ |> |> |> Andreas> |> in file linux-2.4.2-ia64-010228.diff* |> |> This doesn't Andreas> compile: |> |> irq.c:458:28: too many arguments in Andreas> invocation of macro "local_irq_count" |> irq.c:474:27: too Andreas> many arguments in invocation of macro "local_irq_count" |> Andreas> irq.c: In function `handle_IRQ_event': |> irq.c:458:
Andreas> `local_irq_count' undeclared (first use in this function) Andreas> |> irq.c:458: (Each undeclared identifier is reported only Andreas> once |> irq.c:458: for each function it appears in.)
Andreas> Another bug:
Andreas> irq_ia64.c: In function `init_IRQ': irq_ia64.c:158:
Andreas> `ipi_irqaction' undeclared (first use in this function) Andreas> irq_ia64.c:158: (Each undeclared identifier is reported Andreas> only once irq_ia64.c:158: for each function it appears in.)
Andreas> Andreas.
Andreas> -- Andreas Schwab "And now for something SuSE Labs Andreas> completely different." [email protected] SuSE GmbH, Andreas> Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA Andreas> 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.2)
In reply to David MosbergerQuoted 3 lines · David Mosberger
The latest IA-64 patch is now available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.2-ia64-010228.diff*
The latest IA-64 kdb patch is now available at:
ftp://oss.sgi.com/projects/kdb/download/ia64
in file kdb-v1.8-2.4.2-ia64-010228.gz.
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 5 lines · David Mosberger
The latest IA-64 patch is (finally) available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.4-ia64-010508.diff*.
kdb is available
ftp://oss.sgi.com/projects/kdb/download/ia64/kdb-v1.8-2.4.4-ia64-010508.gz
[Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerThe latest IA-64 patch is (finally) available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.4-ia64-010508.diff*. Thanks to Johannes Erdfelt, USB is working again and I hope this kernel will be quite stable for everybody (famous last words...).
What's changed:
- clean up boot parameter passing between elilo and kernel (Stephane Eranian)
- optimized do_csum() some more (Jun Nakajima)
- AGP GART update (Chris Ahna)
- fix pci-pool routines to work on 64-bit platforms (Johannes Erdfelt)
- more IA-32 updates (Don Dugger, me)
- make machine_halt() do nothing instead of rebooting the machine; this has the desirable effect that "shutdown -h" will really halt instead of rebooting the machine; the machine does *not* power off, however (I don't think the current firmware/hw supports this)
- use KERNEL_PG_* constants instead of hardcoding the page size used in the kernel's identity mapped regions (Tony Luck)
- added getunwind() system call as a means to get unwind info for the gate page (signal handler trampoline for now; light-weight syscall stubs in the future) and add unwind info to signal trampoline
- move EFI vars from /proc/efi to /proc/efi/vars/ (Matt Domsch)
- for MP machines, sync cycle counter register (ar.itc) of each CPU with the time keeper CPU on boot up & exploit this to provide fine-grained time in gettimeofday()
- clean up & fix coredump creation
- clean up debug messages in cs4281 drivers to avoid compiler warnings
- make the register backing store of a newly execve()'d process start at a nicely aligned address again
- fix spin_unlock() to do barrier() in correct place (Jack Steiner)
- add a couple of spare longs to sigcontext structure to provide room for future extensibility
Some notes: I didn't apply Jes's qla1280 clean up patch yet. I'd very much like to do that, but since qlogic is maintaing this driver, I'm waiting until they've had a chance to review it.
If you look at the cycle counter sync'ing code, you'll see that it's very different from what has been proposed in the past. There is a good reason for this: the new code allows arbitrary pairs of CPUs to sync at any point in time. At this point, the only time the syncing is actually done is at boot time, but in the future we'll want to support online replacement of CPUs and with a pair-wise syncing approach, this is trivial to support. Also, the new code uses a close loop to sync the counters. This ensures that there are no unaccounted-for error sources. The syncing tends to work quite well in pratice: usually, we seem to get a pair of CPUs to within <10 cycles of each other (assuming that the interconnect between the two CPUs has symmetric latencies). However, I'm also quite sure that someone with a better memory of control theory could optimize the current code for faster convergence (and perhaps more stable behavior in the presence of large amounts of noise). Please feel free to take this as a challenge! ;-)
BIG CAVEAT: even though the kernel currently is syncing the cycle counters, application code MUST NOT rely on this. Instead, if an application needs fine-grained and light-weight timestamps, it should use the POSIX *clock* routines that Uli added recently to libc. I can almost guarantee you that future machines will NOT have synchronized clocks (and we'll also want to support systems where different CPUs have different clock speeds) and because of this, the *clock* routines and gettimeofday() are the recommended and RELIABLE way for obtaining fine-grained timestamps.
Enjoy,
--david
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 5 lines · David Mosberger
The latest IA-64 patch is (finally) available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.4-ia64-010508.diff*.
There were two versions of linux-2.4.4-ia64-010508.diff.bz2 on ports/ia64, about 45 minutes apart. The kdb patch was against the first version of ia64-010508 and gets a compile error on E1_PAUSE. I have uploaded a new copy of kdb-v1.8-2.4.4-ia64-010508.gz to oss.sgi.com, this one is timestamped May 9 11:37 UTC and is against the copy of ia64-010508 with timestamp May 9 04:51 UTC.
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 9 lines
Quoted 9 lines
BIG CAVEAT: even though the kernel currently is syncing the cycle counters, application code MUST NOT rely on this. Instead, if an application needs fine-grained and light-weight timestamps, it should use the POSIX *clock* routines that Uli added recently to libc. I can almost guarantee you that future machines will NOT have synchronized clocks (and we'll also want to support systems where different CPUs have different clock speeds) and because of this, the *clock* routines and
gettimeofday()are the recommended and RELIABLE way for obtaining fine-grained timestamps.
FYI, The IA64 system being built by SGI has multiple nodes. The clocks on different nodes are not synchronized.
Signature · 3 lines
Thanks Jack Steiner (651-683-5302) (vnet 233-5302) [email protected]
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jack Steiner
Jack> FYI, The IA64 system being built by SGI has multiple Jack> nodes. The clocks on different nodes are not synchronized.
This means that (a) you'll have to disable gettimeofday() interpolation in the kernel and (b) implement an alternate version of the *clock* routines in libc. Does SN1 provides some other means to obtain a system-wide fine-grained timestamp?
--david
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines · Jack Steiner
Jack> FYI, The IA64 system being built by SGI has multiple Jack> nodes. The clocks on different nodes are not synchronized.
This means that (a) you'll have to disable
gettimeofday()interpolation in the kernel and (b) implement an alternate version of the *clock* routines in libc. Does SN1 provides some other means to obtain a system-wide fine-grained timestamp?
OK, thanks. I'll add that to our (never ending) worklist.
Up to this point, we were not aware that we would have to make any changes in any library routines. I have not looked at the libc clock routine, but it sounds like I should take a look...
BTW, The SN platform does have a hi-res synchronized clock that can be mmapped & read from user space. The clock is located in the "chipset" and is synchronized across all nodes/FSBs.
Signature · 3 lines
Thanks Jack Steiner (651-683-5302) (vnet 233-5302) [email protected]
Re: [Linux-ia64] kernel update (relative to 2.4.4)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jack Steiner
Jack> BTW, The SN platform does have a hi-res synchronized clock that can be Jack> mmapped & read from user space. The clock is located in the "chipset" Jack> and is synchronized across all nodes/FSBs.
Good. This was indeed the working assumption: on machines where ITCs aren't synchronous, there needs to be some other mechanism to obtain fine-grained time stamps. So, I think what you'll need is a device driver for your chipset which will allow mapping the hi-res clock into user space where libc can use it to implement the *clock* routines. In the kernel, we can make gettimeoffset() a platform-specific function, so SN1 and other platforms with non-synchronous clocks can use an external hi-res timer to implement it.
The only challenge is to decide when to use ITCs and when to use other hardware. Unfortunately, I don't believe SAL provides info on whether the ITC clocks are synchronized (I think it should!). For now, we could implement it such that an external hi-res timer is used in favor of ITCs whenever such hardware is present.
--david
[Linux-ia64] kernel update (relative to 2.4.5)
In reply to David MosbergerThe latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.5-ia64-010530.diff*.
What's changed:
- updates for 2.4.5
- fix exception table lookup so it really works for modules (Tony Luck)
- fix perfmon bug (Sumit Roy & Stephane Eranian)
- clean up smp boot code and structure it like on x86 (Rohit Seth)
- set siginfo.si_code to SI_FAULT for SIGFPE (Asit Mallick)
- fix ACPI code to handle _PRT for secondary buses (Jung-Ik Lee)
- more cleanup for gcc3.0
- fix some dependency-violations in MCA code (note: this doesn't fix the MCA INIT handler yet; that patch is yet to come...)
- fix IA-32 context switch typo
- fix ptrace() so "strace -f" works again
- don't call tty_write_message() when an unaligned fault occurs inside the kernel (could deadlock otherwise)
- tune the VM system to allow page table cache to grow bigger
- reorg thread_struct for better cache-usage
- initialize archdata for the module structure representing the kernel
The only really important fix here is the one for the exception table lookup. It turns out that there was a typo in that code which prevented the module-specific code to get compiled into the kernel when modules were enabled. Thanks to Tony Luck for finding this! Keith, you may want to look at my comment in kernel/module.c for a suggestion on how to clean up kernel module initialization at some point in the future.
As usual, the patch below is fyi only. The patch has been tested on Big Sur (SMP) and on HP Ski simulator (UP).
Enjoy,
--david
arch/ia64/Makefile +1 -1
@@ -23,7 +23,7 @@ GCC_VERSION=$(shell $(CROSS_COMPILE)$(HOSTCC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') ifneq ($(GCC_VERSION),2) - CFLAGS += -frename-registers -fno-optimize-sibling-calls + CFLAGS += -frename-registers endif ifeq ($(CONFIG_ITANIUM_ASTEP_SPECIFIC),y)
arch/ia64/boot/bootloader.c +0 -3
@@ -87,9 +87,6 @@ asmvolatile ("movl gp=__gp;;" :::"memory" ); asmvolatile ("mov sp=%0" ::"r" (stack) :"memory" ); asmvolatile ("bsw.1;;" ); -#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC - asm volative ("nop 0;; nop 0;; nop 0;;"); -#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */ ssc (0 ,0 ,0 ,0 ,SSC_CONSOLE_INIT );
arch/ia64/hp/hpsim_setup.c +9 -22
@@ -27,28 +27,15 @@/* * Simulator system call. */ -inline long -ia64_ssc (long arg0,long arg1,long arg2,long arg3,int nr) -{ -#ifdef __GCC_DOESNT_KNOW_IN_REGS__ - register long in0 asm ("r32") = arg0; - register long in1 asm ("r33") = arg1; - register long in2 asm ("r34") = arg2; - register long in3 asm ("r35") = arg3; -#else - register long in0 asm ("in0") = arg0; - register long in1 asm ("in1") = arg1; - register long in2 asm ("in2") = arg2; - register long in3 asm ("in3") = arg3; -#endif - registerlong r8 asm ("r8" ); - register long r15 asm ("r15") = nr; - - asmvolatile ("break 0x80001" - :"=r" (r8) - :"r" (r15),"r" (in0),"r" (in1),"r" (in2),"r" (in3)); -return r8; -} +asm (".text\n" +".align 32\n" +".global ia64_ssc\n" +".proc ia64_ssc\n" +"ia64_ssc:\n" +"mov r15=r36\n" +"break 0x80001\n" +"br.ret.sptk.many rp\n" +".endp\n" );void ia64_ssc_connect_irq (long intr,long irq)
arch/ia64/kernel/head.S +9 -3
@@ -123,11 +123,12 @@ #define isAP p2 // are we an Application Processor? #define isBP p3 // are we the Bootstrap Processor? +#ifdef CONFIG_SMP /* * Find the init_task for the currently booting CPU. At poweron, and in - * UP mode, cpu_now_booting is 0. + * UP mode, cpucount is 0. */ - movl r3=cpu_now_booting + movl r3=cpucount ;; ld4 r3=[r3] // r3 <- smp_processor_id() movl r2=init_tasks
@@ -135,6 +136,11 @@ shladd r2=r3,3,r2 ;; ld8 r2=[r2] +#else + mov r3=0 + movl r2=init_task_union + ;; +#endif cmp4.ne isAP,isBP=r3,r0 ;; // RAW on r2 extr r3=r2,0,61 // r3 = phys addr of task struct
@@ -182,7 +188,7 @@ #endif /* CONFIG_IA64_EARLY_PRINTK */ #ifdef CONFIG_SMP -(isAP) br.call.sptk.few rp=smp_callin +(isAP) br.call.sptk.few rp=start_secondary .ret0: (isAP) br.cond.sptk.few self #endif
arch/ia64/kernel/ia64_ksyms.c +2 -0
@@ -7,6 +7,7 @@#include <linux/string.h> EXPORT_SYMBOL_NOVERS (memset); +EXPORT_SYMBOL (memchr);EXPORT_SYMBOL (memcmp);EXPORT_SYMBOL_NOVERS (memcpy);EXPORT_SYMBOL (memmove);
@@ -75,6 +76,7 @@EXPORT_SYMBOL (smp_call_function);EXPORT_SYMBOL (smp_call_function_single);EXPORT_SYMBOL (cpu_online_map); +EXPORT_SYMBOL (ia64_cpu_to_sapicid);#include <linux/smp.h> EXPORT_SYMBOL (smp_num_cpus);
arch/ia64/kernel/mca_asm.S +1 -1
@@ -672,7 +672,7 @@ // mov r17=cr.lid // XXX fix me: this is wrong: hard_smp_processor_id() is a pair of lid/eid - movl r18=__cpu_physical_id + movl r18=ia64_cpu_to_sapicid ;; dep r18=0,r18,61,3 // convert to physical address ;;
arch/ia64/kernel/perfmon.c +2 -6
@@ -787,26 +787,22 @@/* XXX: ctx locking may be required here */ for (i =0 ; i < count; i++, req++) { -int k; -if (copy_from_user (&tmp, req,sizeof (tmp)))return -EFAULT ;if (!PMD_IS_IMPL (tmp.pfr_reg.reg_num))return -EINVAL ; - k = tmp.pfr_reg.reg_num -PMU_FIRST_COUNTER ; -if (PMD_IS_COUNTER (tmp.pfr_reg.reg_num)) {if (ta = current){ val =ia64_get_pmd (tmp.pfr_reg.reg_num); }else { - val = th->pmd[k]; + val = th->pmd[tmp.pfr_reg.reg_num]; } val &= pmu_conf.perf_ovfl_val;/* * lower part of .val may not be zero, so we must be an addition because of * residual count (see update_counters). */ - val += ctx->ctx_pmds[k].val; + val += ctx->ctx_pmds[tmp.pfr_reg.reg_num -PMU_FIRST_COUNTER ].val; }else {/* for now */ if (ta != current)return -EINVAL ;
arch/ia64/kernel/process.c +3 -2
@@ -282,10 +282,11 @@* state from the current task to the new task */ if (IS_IA32_PROCESS (ia64_task_regs (current))) -ia32_save_state (&p->thread); +ia32_save_state (p);#endif #ifdef CONFIG_PERFMON -if (current->thread.pfm_context) + p->thread.pfm_pend_notify =0 ; +if (p->thread.pfm_context) retval =pfm_inherit (p);#endif return retval;
arch/ia64/kernel/ptrace.c +24 -11
@@ -438,6 +438,25 @@ }/* +* Simulate user-level "flushrs". Note: we can't just add pt->loadrs>>16 to +* pt->ar_bspstore because the kernel backing store and the user-level backing store may +* have different alignments (and therefore a different number of intervening rnat slots). +*/ +static void +user_flushrs (struct task_struct *task,struct pt_regs *pt) +{ +unsigned long *krbs; +long ndirty; + + krbs = (unsigned long *) task +IA64_RBS_OFFSET /8 ; + ndirty =ia64_rse_num_regs (krbs, krbs + (pt->loadrs >>19 )); + + pt->ar_bspstore = (unsigned long )ia64_rse_skip_regs ((unsigned long *) pt->ar_bspstore, + ndirty); + pt->loadrs =0 ; +} + +/* * Synchronize the RSE backing store of CHILD and all tasks that share the address space * with it. CHILD_URBS_END is the address of the end of the register backing store of * CHILD. If MAKE_WRITABLE is set, a user-level "flushrs" is simulated such that the VM
@@ -467,11 +486,8 @@ sw = (struct switch_stack *) (child->thread.ksp +16 ); pt =ia64_task_regs (child);ia64_sync_user_rbs (child, sw, pt->ar_bspstore, child_urbs_end); -if (make_writable) { -/* simulate a user-level "flushrs": */ - pt->loadrs =0 ; - pt->ar_bspstore = child_urbs_end; - } +if (make_writable) +user_flushrs (child, pt); }else {read_lock (&tasklist_lock); {
@@ -481,11 +497,8 @@ pt =ia64_task_regs (p); urbs_end =ia64_get_user_rbs_end (p, pt,NULL );ia64_sync_user_rbs (p, sw, pt->ar_bspstore, urbs_end); -if (make_writable) { -/* simulate a user-level "flushrs": */ - pt->loadrs =0 ; - pt->ar_bspstore = urbs_end; - } +if (make_writable) +user_flushrs (p, pt); } } }
@@ -781,8 +794,8 @@ long arg4, long arg5, long arg6, long arg7, long stack) { struct pt_regs *pt, *regs = (struct pt_regs *) &stack; -struct task_struct *child;unsigned long flags, urbs_end; +struct task_struct *child;struct switch_stack *sw;long ret;
arch/ia64/kernel/smp.c +119 -417
696 lines not on this page · raw message
arch/ia64/kernel/smpboot.c +398 -1
424 lines not on this page · raw message
arch/ia64/kernel/traps.c +2 -2
@@ -320,7 +320,7 @@ } siginfo.si_signo =SIGFPE ; siginfo.si_errno =0 ; - siginfo.si_code =0 ; + siginfo.si_code = __SI_FAULT;/* default code */ siginfo.si_addr = (void *) (regs->cr_iip +ia64_psr (regs)->ri);if (isr &0x11 ) { siginfo.si_code =FPE_FLTINV ;
@@ -338,7 +338,7 @@/* raise exception */ siginfo.si_signo =SIGFPE ; siginfo.si_errno =0 ; - siginfo.si_code =0 ; + siginfo.si_code = __SI_FAULT;/* default code */ siginfo.si_addr = (void *) (regs->cr_iip +ia64_psr (regs)->ri);if (isr &0x880 ) { siginfo.si_code =FPE_FLTOVF ;
arch/ia64/kernel/unaligned.c +6 -1
@@ -1299,7 +1299,12 @@ len =sprintf (buf,"%s(%d): unaligned access to 0x%016lx, " "ip=0x%016lx\n\r" , current->comm, current->pid, ifa, regs->cr_iip + ipsr->ri); -tty_write_message (current->tty, buf); +/* +* Don't call tty_write_message() if we're in the kernel; we might +* be holding locks... +*/ +if (user_mode (regs)) +tty_write_message (current->tty, buf); buf[len-1 ] ='\0' ;/* drop '\r' */ printk (KERN_WARNING "%s" , buf);/* watch for command names containing %s */ }
arch/ia64/kernel/unwind.c +4 -4
@@ -1847,9 +1847,9 @@static void init_unwind_table (struct unw_table *table,const char *name,unsigned long segment_base, -unsigned long gp,void *table_start,void *table_end) +unsigned long gp,const void *table_start,const void *table_end) { -struct unw_table_entry *start = table_start, *end = table_end; +const struct unw_table_entry *start = table_start, *end = table_end; table->name = name; table->segment_base = segment_base;
@@ -1862,9 +1862,9 @@void *unw_add_unwind_table (const char *name,unsigned long segment_base,unsigned long gp, -void *table_start,void *table_end) +const void *table_start,const void *table_end) { -struct unw_table_entry *start = table_start, *end = table_end; +const struct unw_table_entry *start = table_start, *end = table_end;struct unw_table *table;unsigned long flags;
arch/ia64/lib/swiotlb.c +1 -1
@@ -263,7 +263,7 @@memset (ret,0 , size); pci_addr =virt_to_phys (ret); -if ((pci_addr & ~hwdev->dma_mask) !=0 ) +if (hwdev && (pci_addr & ~hwdev->dma_mask) !=0 )panic ("swiotlb_alloc_consistent: allocated memory is out of range for PCI device" ); *dma_handle = pci_addr;return ret;
arch/ia64/mm/extable.c +17 -24
83 lines not on this page · raw message
arch/ia64/mm/init.c +14 -0
@@ -354,6 +354,7 @@ {extern char __start_gate_section[];long reserved_pages, codesize, datasize, initsize; +unsigned long num_pgt_pages;#ifdef CONFIG_PCI /*
@@ -386,6 +387,19 @@ (unsigned long )nr_free_pages () << (PAGE_SHIFT -10 ), max_mapnr << (PAGE_SHIFT -10 ), codesize >>10 , reserved_pages << (PAGE_SHIFT -10 ), datasize >> 10, initsize >> 10); + +/* +* Allow for enough (cached) page table pages so that we can map the entire memory +* at least once. Each task also needs a couple of page tables pages, so add in a +* fudge factor for that (don't use "threads-max" here; that would be wrong!). +* Don't allow the cache to be more than 10% of total memory, though. +*/ +# define NUM_TASKS 500/* typical number of tasks */ + num_pgt_pages =nr_free_pages () /PTRS_PER_PGD +NUM_TASKS ; +if (num_pgt_pages >nr_free_pages () /10 ) + num_pgt_pages =nr_free_pages () /10 ; +if (num_pgt_pages > pgt_cache_water[1 ]) + pgt_cache_water[1 ] = num_pgt_pages;/* install the gate page in the global page table: */ put_gate_page (virt_to_page (__start_gate_section),GATE_ADDR );
drivers/acpi/acpiconf.c +294 -107
521 lines not on this page · raw message
include/asm-ia64/bitops.h +39 -12
87 lines not on this page · raw message
include/asm-ia64/mca_asm.h +130 -129
362 lines not on this page · raw message
include/asm-ia64/processor.h +19 -18
@@ -314,20 +314,10 @@struct thread_struct {__u64 ksp;/* kernel stack pointer */ unsigned long flags;/* various flags */ -struct ia64_fpreg fph[96 ];/* saved/loaded on demand */ -__u64 dbr[IA64_NUM_DBG_REGS ]; -__u64 ibr[IA64_NUM_DBG_REGS ]; -#ifdef CONFIG_PERFMON -__u64 pmc[IA64_NUM_PMC_REGS ]; -__u64 pmd[IA64_NUM_PMD_REGS ]; -unsigned long pfm_pend_notify;/* non-zero if we need to notify and block */ -void *pfm_context;/* pointer to detailed PMU context */ -# define INIT_THREAD_PM {0, }, {0, }, 0, 0, -#else -# define INIT_THREAD_PM -#endif __u64 map_base;/* base address for get_unmapped_area() */ __u64 task_size;/* limit for task size */ +struct siginfo *siginfo;/* current siginfo struct for ptrace() */ +#ifdef CONFIG_IA32_SUPPORT __u64 eflag;/* IA32 EFLAGS reg */ __u64 fsr;/* IA32 floating pt status reg */
@@ -345,7 +335,18 @@#else # define INIT_THREAD_IA32 #endif /* CONFIG_IA32_SUPPORT */ -struct siginfo *siginfo;/* current siginfo struct for ptrace() */ +#ifdef CONFIG_PERFMON +__u64 pmc[IA64_NUM_PMC_REGS ]; +__u64 pmd[IA64_NUM_PMD_REGS ]; +unsigned long pfm_pend_notify;/* non-zero if we need to notify and block */ +void *pfm_context;/* pointer to detailed PMU context */ +# define INIT_THREAD_PM {0, }, {0, }, 0, 0, +#else +# define INIT_THREAD_PM +#endif +__u64 dbr[IA64_NUM_DBG_REGS ]; +__u64 ibr[IA64_NUM_DBG_REGS ]; +struct ia64_fpreg fph[96 ];/* saved/loaded on demand */ };#define INIT_MMAP { \
@@ -356,14 +357,14 @@#define INIT_THREAD { \ 0,/* ksp */ \0 ,/* flags */ \ - {{{{0}}}, }, /* fph */ \ - {0, }, /* dbr */ \ - {0, }, /* ibr */ \ - INIT_THREAD_PM \DEFAULT_MAP_BASE ,/* map_base */ \DEFAULT_TASK_SIZE ,/* task_size */ \ +0 ,/* siginfo */ \INIT_THREAD_IA32 \ - 0 /* siginfo */ \ + INIT_THREAD_PM \ + {0, }, /* dbr */ \ + {0, }, /* ibr */ \ + {{{{0}}}, } /* fph */ \ } #define start_thread(regs,new_ip,new_sp) do { \
include/asm-ia64/smp.h +6 -7
@@ -1,7 +1,7 @@/* * SMP Support * -* Copyright (C) 1999 VA Linux Systems +* Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond <[email protected]> * Copyright (C) 2001 Hewlett-Packard Co * Copyright (C) 2001 David Mosberger-Tang <[email protected]>
@@ -35,14 +35,13 @@extern char no_int_routing__initdata ; -extern unsigned long cpu_present_map;extern unsigned long cpu_online_map;extern unsigned long ipi_base_addr; -extern int __cpu_physical_id[NR_CPUS ];extern unsigned char smp_int_redirect;extern int smp_num_cpus; -#define cpu_physical_id (i) __cpu_physical_id[i] +extern volatile int ia64_cpu_to_sapicid[]; +#define cpu_physical_id (i) ia64_cpu_to_sapicid[i]#define cpu_number_map (i) (i)#define cpu_logical_map (i) (i)
@@ -70,7 +69,7 @@* max_xtp : never deliver interrupts to this CPU. */ -static inline void +static inline void min_xtp (void ) {if (smp_int_redirect &SMP_IRQ_REDIRECTION )
@@ -85,13 +84,13 @@ }static inline void -max_xtp (void ) +max_xtp (void ) {if (smp_int_redirect &SMP_IRQ_REDIRECTION )writeb (0x0f , ipi_base_addr |XTP_OFFSET );/* Set XTP to max */ } -static inline unsigned int +static inline unsigned int hard_smp_processor_id (void ) {union {
include/asm-ia64/unaligned.h +2 -0
@@ -1,6 +1,8 @@#ifndef _ASM_IA64_UNALIGNED_H#define _ASM_IA64_UNALIGNED_H +#include <linux/types.h> +/* * The main single-value unaligned transfer routines. Derived from * the Linux/Alpha version.
include/asm-ia64/unwind.h +1 -1
@@ -97,7 +97,7 @@extern void unw_create_gate_table (void );extern void *unw_add_unwind_table (const char *name,unsigned long segment_base,unsigned long gp, -void *table_start,void *table_end); +const void *table_start,const void *table_end);extern void unw_remove_unwind_table (void *handle);
kernel/module.c +15 -0
@@ -246,8 +246,23 @@ { kernel_module.nsyms = __stop___ksymtab - __start___ksymtab; +/* +* XXX fix me: this should be cleaned up. Perhaps calling +* module_arch_init(&kernel_module) here would be cleanest, but this would require +* updating all platform specific header files. +*/ #ifdef __alpha__ __asm__("stq $29,%0" :"=m" (kernel_module.gp)); +#endif +#ifdef __ia64__ + { +static struct archdata archdata; + registerchar *kernel_gp asm ("gp" ); + + archdata.gp = kernel_gp; + kernel_module.archdata_start = (const char *) &archdata; + kernel_module.archdata_end = (const char *) (&archdata +1 ); + }#endif }
[Linux-ia64] kernel update (relative to 2.4.5)
In reply to David MosbergerThe latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.5-ia64-010626.diff*.
There are no major new features in this patch, mostly bug fixes, clean-ups for gcc3.0, etc. However, I did start to tune things a bit more for Itanium and those changes result in dramatically better fork+exit performance as well as large improvements in various bandwidth intensive tests (such as pipe bandwidth or TCP bandwidth). The tuning didn't require any significant code changes (thanks largely to the software-pipelining support in ia64) but still, I'd recommend testing things heavily before including the new kernel in a distribution (I should say that I have run with these mods for weeks now without any problems).
More detailed change log:
- included Martin's /dev/guid support (the implementation is likely to contiue to evolve, but I think the features is important enough to warrant inclusion in the normal sources)
- NEC contributed an I/O SAPIC implementation of set_affinity() which allows to direct a particular irq to a particular cpu via /proc/irq/. Note: I/O SAPIC can direct to only one CPU at a time. If you attempt to target multiple CPUs, only the CPU with the smallest id will receive the interrupt. Needless to say: it's easy to shoot yourself in the foot by playing with the irq redirection, but it can be useful, of course.
- fixed ia32 version of lseek() (needed to get profile-feedback to work in the Intel compilers)
- use a separate irq vector for smp rescheduling instead of going through the generic (and slow) IPI path
- fix the mmap() problem reported by the Debian project
- bring FPSWA support in sync with documentation
- tune clear_page(), clear_user(), and copy_user() also for uncached case (important, e.g., for smp fork/exit)
- include the inode initialization bug fix forwarded by Keith
As usual the patch below is fyi only. Oh, I should say that gcc3.0 compiles this kernel just fine. My earlier suspicion turned out to be wrong. The problem I was seeing wasn't related to gcc3.0 after all.
Enjoy,
--david
Documentation/Configure.help +6 -0
@@ -12036,6 +12036,12 @@ were partitioned using EFI GPT. Presently only useful on the IA-64 platform. +/dev/guid support (EXPERIMENTAL) +CONFIG_DEVFS_GUID + Say Y here if you would like to access disks and partitions by + their Globally Unique Identifiers (GUIDs) which will appear as + symbolic links in /dev/guid. + Ultrix partition support CONFIG_ULTRIX_PARTITION Say Y here if you would like to be able to read the hard disk
MAINTAINERS +7 -0
@@ -602,6 +602,13 @@ W: http://www.kernelconcepts.de/ S: Maintained +IA64 (Itanium) PLATFORM +P: David Mosberger-Tang +M: [email protected] +L: [email protected] +W: http://www.linuxia64.org/ +S: Maintained + IBM MCA SCSI SUBSYSTEM DRIVER P: Michael Lang M: [email protected]
arch/ia64/ia32/ia32_entry.S +1 -1
@@ -140,7 +140,7 @@ data8 sys_lchown data8 sys32_ni_syscall /* old break syscall holder */ data8 sys32_ni_syscall - data8 sys_lseek + data8 sys32_lseek data8 sys_getpid /* 20 */ data8 sys_mount data8 sys_oldumount
arch/ia64/ia32/sys_ia32.c +9 -0
@@ -2784,6 +2784,15 @@return ret; } +int +sys32_lseek (unsigned int fd,int offset,unsigned int whence) +{ +extern off_t sys_lseek (unsigned int fd,off_t offset,unsigned int origin); + +/* Sign-extension of "offset" is important here... */ +return sys_lseek (fd, offset, whence); +} +#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ /* In order to reduce some races, while at the same time doing additional
arch/ia64/kernel/Makefile +1 -1
@@ -13,7 +13,7 @@ export-objs := ia64_ksyms.o -obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o irq.o irq_ia64.o irq_sapic.o ivt.o \ +obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o irq.o irq_ia64.o irq_lsapic.o ivt.o \ machvec.o pal.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += machvec.o iosapic.o
arch/ia64/kernel/fw-emu.c +57 -62
125 lines not on this page · raw message
arch/ia64/kernel/gate.S +0 -2
@@ -15,8 +15,6 @@ .section .text.gate,"ax" - .align PAGE_SIZE - # define ARG0_OFF (16 + IA64_SIGFRAME_ARG0_OFFSET) # define ARG1_OFF (16 + IA64_SIGFRAME_ARG1_OFFSET) # define ARG2_OFF (16 + IA64_SIGFRAME_ARG2_OFFSET)
arch/ia64/kernel/iosapic.c +38 -2
@@ -20,7 +20,7 @@* Here is what the interrupt logic between a PCI device and the CPU looks like: * * (1) A PCI device raises one of the four interrupt pins (INTA, INTB, INTC, INTD). The -* device is uniquely identified by its bus-, device-, and slot-number (the function +* device is uniquely identified by its bus--, and slot-number (the function * number does not matter here because all functions share the same interrupt * lines). *
@@ -205,7 +205,43 @@static void iosapic_set_affinity (unsigned int irq,unsigned long mask) { -printk ("iosapic_set_affinity: not implemented yet\n" ); +unsigned long flags; +u32 high32, low32; +int dest, pin; +char *addr; + + mask &= (1UL << smp_num_cpus) -1 ; + +if (!mask || irq >=IA64_NUM_VECTORS ) +return ; + + dest =ffz (~mask); + + pin = iosapic_irq[irq].pin; + addr = iosapic_irq[irq].addr; + +if (pin <0 ) +return ;/* not an IOSAPIC interrupt */ + +/* dest contains both id and eid */ + high32 = dest <<IOSAPIC_DEST_SHIFT ; + +spin_lock_irqsave (&iosapic_lock, flags); + { +/* get current delivery mode by reading the low32 */ +writel (IOSAPIC_RTE_LOW (pin), addr +IOSAPIC_REG_SELECT ); + low32 =readl (addr +IOSAPIC_WINDOW ); + +/* change delivery mode to fixed */ + low32 &= ~(7 <<IOSAPIC_DELIVERY_SHIFT ); + low32 |= (IOSAPIC_FIXED <<IOSAPIC_DELIVERY_SHIFT ); + +writel (IOSAPIC_RTE_HIGH (pin), addr +IOSAPIC_REG_SELECT ); +writel (high32, addr +IOSAPIC_WINDOW ); +writel (IOSAPIC_RTE_LOW (pin), addr +IOSAPIC_REG_SELECT ); +writel (low32, addr +IOSAPIC_WINDOW ); + } +spin_unlock_irqrestore (&iosapic_lock, flags); }/*
arch/ia64/kernel/irq_ia64.c +20 -14
@@ -72,6 +72,11 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) { unsigned long saved_tpr; +#ifdef CONFIG_SMP +# define IS_RESCHEDULE (vec) (vec = IA64_IPI_RESCHEDULE) +#else +# define IS_RESCHEDULE (vec) (0) +#endif #if IRQ_DEBUG {
@@ -110,24 +115,25 @@*/ saved_tpr =ia64_get_tpr ();ia64_srlz_d (); -do { -ia64_set_tpr (vector); -ia64_srlz_d (); - -do_IRQ (local_vector_to_irq (vector), regs); - -/* -* Disable interrupts and send EOI: -*/ -local_irq_disable (); -ia64_set_tpr (saved_tpr); +while (vector !=IA64_SPURIOUS_INT_VECTOR ) { +if (!IS_RESCHEDULE (vector)) { +ia64_set_tpr (vector); +ia64_srlz_d (); + +do_IRQ (local_vector_to_irq (vector), regs); + +/* +* Disable interrupts and send EOI: +*/ +local_irq_disable (); +ia64_set_tpr (saved_tpr); + }ia64_eoi (); vector =ia64_get_ivr (); - }while (vector !=IA64_SPURIOUS_INT_VECTOR ); + } }#ifdef CONFIG_SMP -extern void handle_IPI (int irq,void *dev_id,struct pt_regs *regs); static struct irqaction ipi_irqaction = {
@@ -147,7 +153,7 @@if (irq_to_vector (irq) = vec) { desc =irq_desc (irq); desc->status |=IRQ_PER_CPU ; - desc->handler = &irq_type_ia64_sapic; + desc->handler = &irq_type_ia64_lsapic;if (action)setup_irq (irq, action); }
arch/ia64/kernel/irq_lsapic.c +38 -0
@@ -0,0 +1,38 @@ +/* +* LSAPIC Interrupt Controller +* +* This takes care of interrupts that are generated by the CPU's +* internal Streamlined Advanced Programmable Interrupt Controller +* (LSAPIC), such as the ITC and IPI interrupts. +* +* Copyright (C) 1999 VA Linux Systems +* Copyright (C) 1999 Walt Drummond <[email protected]> +* Copyright (C) 2000 Hewlett-Packard Co +* Copyright (C) 2000 David Mosberger-Tang <[email protected]> +*/ + +#include <linux/sched.h> +#include <linux/irq.h> + +static unsigned int +lsapic_noop_startup (unsigned int irq) +{ +return 0 ; +} + +static void +lsapic_noop (unsigned int irq) +{ +/* nuthing to do... */ +} + +struct hw_interrupt_type irq_type_ia64_lsapic = { + typename:"LSAPIC" , + startup: lsapic_noop_startup, + shutdown: lsapic_noop, + enable: lsapic_noop, + disable: lsapic_noop, + ack: lsapic_noop, + end: lsapic_noop, + set_affinity: (void (*)(unsigned int ,unsigned long )) lsapic_noop +};
arch/ia64/kernel/irq_sapic.c +0 -38
@@ -1,38 +0,0 @@ -/* -* SAPIC Interrupt Controller -* -* This takes care of interrupts that are generated by the CPU's -* internal Streamlined Advanced Programmable Interrupt Controller -* (SAPIC), such as the ITC and IPI interrupts. -* -* Copyright (C) 1999 VA Linux Systems -* Copyright (C) 1999 Walt Drummond <[email protected]> -* Copyright (C) 2000 Hewlett-Packard Co -* Copyright (C) 2000 David Mosberger-Tang <[email protected]> -*/ - -#include <linux/sched.h> -#include <linux/irq.h> - -static unsigned int -sapic_noop_startup (unsigned int irq) -{ -return 0 ; -} - -static void -sapic_noop (unsigned int irq) -{ -/* nuthing to do... */ -} - -struct hw_interrupt_type irq_type_ia64_sapic = { - typename:"SAPIC" , - startup: sapic_noop_startup, - shutdown: sapic_noop, - enable: sapic_noop, - disable: sapic_noop, - ack: sapic_noop, - end: sapic_noop, - set_affinity: (void (*)(unsigned int ,unsigned long )) sapic_noop -};
arch/ia64/kernel/ivt.S +13 -12
@@ -9,16 +9,14 @@ * 00/12/20 David Mosberger-Tang <[email protected]> DTLB/ITLB handler now uses virtual PT. */ /* - * This file defines the interrupt vector table used by the CPU. + * This file defines the interruption vector table used by the CPU. * It does not include one entry per possible cause of interruption. * - * External interrupts only use 1 entry. All others are internal interrupts - * * The first 20 entries of the table contain 64 bundles each while the * remaining 48 entries contain only 16 bundles each. * * The 64 bundles are used to allow inlining the whole handler for critical - * interrupts like TLB misses. + * interruptions like TLB misses. * * For each entry, the comment is as follows: *
@@ -27,7 +25,7 @@ * entry number ---------/ / / / * size of the entry -------------/ / / * vector name -------------------------------------/ / - * related interrupts (what is the real interrupt?) ----------/ + * interruptions triggering this vector ----------------------/ * * The table is 32KB in size and must be aligned on 32KB boundary. * (The CPU ignores the 15 lower bits of the address)
@@ -363,7 +361,7 @@ ;; ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collectin is on ;; (p15) ssm psr.i // restore psr.i movl r14=ia64_leave_kernel
@@ -650,7 +648,7 @@ ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 ;; (p15) ssm psr.i // restore psr.i
@@ -724,11 +722,14 @@ tnat.nz p15,p0=in7 (p11) mov in3=-1 + tnat.nz p8,p0=r15 // demining r15 is not a must, but it is safer + (p12) mov in4=-1 (p13) mov in5=-1 ;; (p14) mov in6=-1 (p15) mov in7=-1 +(p8) mov r15=-1 br.ret.sptk.many rp END(demine_args)
@@ -790,7 +791,7 @@ SAVE_MIN_WITH_COVER ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on ;; (p15) ssm psr.i // restore psr.i adds r3=8,r2 // set up second base pointer for SAVE_REST
@@ -839,7 +840,7 @@ mov r14=cr.isr ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on ;; (p15) ssm psr.i adds r3=8,r2 // Base pointer for SAVE_REST
@@ -927,7 +928,7 @@ ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on ;; (p15) ssm psr.i // restore psr.i movl r15=ia64_leave_kernel
@@ -960,7 +961,7 @@ ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on ;; (p15) ssm psr.i // restore psr.i adds r3=8,r2 // set up second base pointer
@@ -1002,7 +1003,7 @@ ;; ssm psr.ic | PSR_DEFAULT_BITS ;; - srlz.i // guarantee that interrupt collection is enabled + srlz.i // guarantee that interruption collection is on ;; (p15) ssm psr.i // restore psr.i adds r3=8,r2 // set up second base pointer for SAVE_REST
arch/ia64/kernel/setup.c +1 -9
@@ -57,12 +57,6 @@unsigned long ia64_cycles_per_usec;struct ia64_boot_param *ia64_boot_param;struct screen_info screen_info; -/* This tells _start which CPU is booting. */ -int cpu_now_booting; - -#ifdef CONFIG_SMP -volatile unsigned long cpu_online_map; -#endif unsigned long ia64_iobase;/* virtual address for I/O accesses */
@@ -514,9 +508,7 @@#ifdef CONFIG_IA32_SUPPORT /* initialize global ia32 state - CR0 and CR4 */ - __asm__("mov ar.cflg = %0" - :/* no outputs */ - :"r" (((ulong )IA32_CR4 <<32 ) |IA32_CR0 )); + asmvolatile ("mov ar.cflg = %0" ::"r" (((ulong )IA32_CR4 <<32 ) |IA32_CR0 ));#endif /* disable all local interrupt sources: */
arch/ia64/kernel/smp.c +15 -21
@@ -68,11 +68,10 @@static volatile struct call_data_struct *call_data; -#define IPI_RESCHEDULE 0 -#define IPI_CALL_FUNC 1 -#define IPI_CPU_STOP 2 +#define IPI_CALL_FUNC 0 +#define IPI_CPU_STOP 1#ifndef CONFIG_ITANIUM_PTCG -# define IPI_FLUSH_TLB 3 +# define IPI_FLUSH_TLB 2#endif /*!CONFIG_ITANIUM_PTCG */ static void
@@ -107,13 +106,6 @@ ops &= ~(1 << which);switch (which) { -case IPI_RESCHEDULE : -/* -* Reschedule callback. Everything to be done is done by the -* interrupt return path. -*/ -break ; -case IPI_CALL_FUNC : {struct call_data_struct *data;
@@ -200,10 +192,6 @@static inline void send_IPI_single (int dest_cpu,int op) { - -if (dest_cpu =-1 ) -return ; -set_bit (op, &cpu_data[dest_cpu].ipi_operation);platform_send_ipi (dest_cpu,IA64_IPI_VECTOR ,IA64_IPI_DM_INT ,0 ); }
@@ -237,7 +225,7 @@void smp_send_reschedule (int cpu) { -send_IPI_single (cpu,IPI_RESCHEDULE ); +platform_send_ipi (cpu,IA64_IPI_RESCHEDULE ,IA64_IPI_DM_INT ,0 ); }#ifndef CONFIG_ITANIUM_PTCG
@@ -255,7 +243,9 @@* Really need a null IPI but since this rarely should happen & since this code * will go away, lets not add one. */ - send_IPI_allbutself(IPI_RESCHEDULE); +for (i =0 ; i < smp_num_cpus; ++i) { +if (i !=smp_processor_id ()) +smp_send_reschedule (i); }#endif /* !CONFIG_ITANIUM_PTCG */
@@ -285,7 +275,8 @@ {struct call_data_struct data;int cpus =1 ; -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))unsigned long timeout;#endif
@@ -307,7 +298,8 @@ resend:send_IPI_single (cpuid,IPI_CALL_FUNC ); -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))/* Wait for response */ timeout = jiffies +HZ ;while ((atomic_read (&data.started) != cpus) &&time_before (jiffies, timeout))
@@ -352,7 +344,8 @@ {struct call_data_struct data;int cpus = smp_num_cpus-1 ; -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))unsigned long timeout;#endif
@@ -373,7 +366,8 @@/* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself (IPI_CALL_FUNC ); -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC )) +#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))/* Wait for response */ timeout = jiffies +HZ ;while ((atomic_read (&data.started) != cpus) &&time_before (jiffies, timeout))
arch/ia64/kernel/smpboot.c +6 -5
@@ -467,7 +467,7 @@set_bit (0 , &cpu_online_map);set_bit (0 , &cpu_callin_map); -printk ("Loops_per_jiffy for BOOT CPU = 0x%x\n" , loops_per_jiffy); +printk ("Loops_per_jiffy for BOOT CPU = 0x%lx\n" , loops_per_jiffy); local_cpu_data->loops_per_jiffy = loops_per_jiffy; ia64_cpu_to_sapicid[0 ] = boot_cpu_id;
@@ -508,8 +508,8 @@do_boot_cpu (sapicid);/* -* Make sure we unmap all failed CPUs -*/ +* Make sure we unmap all failed CPUs +*/ if (ia64_cpu_to_sapicid[cpu] =-1 )printk ("phys CPU#%d not responding - cannot use it.\n" , cpu); }
@@ -517,8 +517,8 @@ smp_num_cpus = cpucount +1 ;/* -* Allow the user to impress friends. -*/ +* Allow the user to impress friends. +*/ printk ("Before bogomips.\n" );if (!cpucount) {
@@ -534,6 +534,7 @@ } } smp_done: + ; }/*
arch/ia64/kernel/sys_ia64.c +14 -10
@@ -178,11 +178,22 @@unsigned long roff;struct file *file =0 ; + flags &= ~(MAP_EXECUTABLE |MAP_DENYWRITE ); +if (!(flags &MAP_ANONYMOUS )) { + file =fget (fd); +if (!file) +return -EBADF ; + +if (!file->f_op || !file->f_op->mmap) +return -ENODEV ; + } +/* -* A zero mmap always succeeds in Linux, independent of -* whether or not the remaining arguments are valid. +* A zero mmap always succeeds in Linux, independent of whether or not the +* remaining arguments are valid. */ -if (PAGE_ALIGN (len) =0 ) + len =PAGE_ALIGN (len); +if (len =0 )return addr;/* don't permit mappings into unmapped space or the virtual page table of a region: */
@@ -193,13 +204,6 @@/* don't permit mappings that would cross a region boundary: */ if (rgn_index (addr) !=rgn_index (addr + len))return -EINVAL ; - - flags &= ~(MAP_EXECUTABLE |MAP_DENYWRITE ); -if (!(flags &MAP_ANONYMOUS )) { - file =fget (fd); -if (!file) -return -EBADF ; - }down_write (¤t->mm->mmap_sem); addr =do_mmap_pgoff (file, addr, len, prot, flags, pgoff);
arch/ia64/kernel/time.c +1 -1
@@ -292,6 +292,6 @@time_init (void) {register_percpu_irq (IA64_TIMER_VECTOR , &timer_irqaction); -efi_gettimeofday (&xtime); +efi_gettimeofday ((struct timeval *) &xtime);ia64_init_itm (); }
arch/ia64/kernel/traps.c +11 -32
63 lines not on this page · raw message
arch/ia64/kernel/unwind.c +4 -4
@@ -1361,10 +1361,10 @@ } } -static inline struct unw_table_entry * +static inline const struct unw_table_entry *lookup (struct unw_table *table,unsigned long rel_ip) { -struct unw_table_entry *e =0 ; +const struct unw_table_entry *e =0 ;unsigned long lo, hi, mid;/* do a binary search for right entry: */
@@ -1389,7 +1389,7 @@ build_script (struct unw_frame_info *info) {struct unw_reg_state *rs, *next; -struct unw_table_entry *e =0 ; +const struct unw_table_entry *e =0 ;struct unw_script *script =0 ;unsigned long ip = info->ip;struct unw_state_record sr;
@@ -1951,7 +1951,7 @@ {extern char __start_gate_section[], __stop_gate_section[];unsigned long *lp, start, end, segbase = unw.kernel_table.segment_base; -struct unw_table_entry *entry, *first; +const struct unw_table_entry *entry, *first;size_t info_size, size;char *info;
arch/ia64/kernel/unwind_i.h +1 -1
@@ -58,7 +58,7 @@unsigned long segment_base;/* base for offsets in the unwind table entries */ unsigned long start;unsigned long end; -struct unw_table_entry *array; +const struct unw_table_entry *array;unsigned long length; };
arch/ia64/lib/clear_page.S +27 -15
62 lines not on this page · raw message
arch/ia64/lib/clear_user.S +1 -1
@@ -69,7 +69,7 @@ (p6) br.cond.dptk.few long_do_clear ;; // WAR on ar.lc // - // worst case 16 cyles, avg 8 cycles + // worst case 16 iterations, avg 8 iterations // // We could have played with the predicates to use the extra // M slot for 2 stores/iteration but the cost the initialization
arch/ia64/lib/copy_page.S +54 -48
135 lines not on this page · raw message
arch/ia64/lib/copy_user.S +1 -1
@@ -35,7 +35,7 @@ // Tuneable parameters // #define COPY_BREAK 16 // we do byte copy below (must be >) -#define PIPE_DEPTH 4 // pipe depth +#define PIPE_DEPTH 21 // pipe depth #define EPI p[PIPE_DEPTH-1] // PASTE(p,16+PIPE_DEPTH-1)
arch/ia64/vmlinux.lds.S +1 -1
@@ -25,7 +25,7 @@ .text : AT(ADDR(.text) - PAGE_OFFSET) { *(.text.ivt) - /* these are not really text pages, but the zero page needs to be in a fixed location: */ + /* these are not really text pages, but they need to be page aligned: */ *(__special_page_section) __start_gate_section = .; *(.text.gate)
fs/block_dev.c +3 -2
@@ -595,14 +595,15 @@int ioctl_by_bdev (struct block_device *bdev,unsigned cmd,unsigned long arg) { -kdev_t rdev =to_kdev_t (bdev->bd_dev);struct inode inode_fake;int res;mm_segment_t old_fs =get_fs ();if (!bdev->bd_op->ioctl)return -EINVAL ; - inode_fake.i_rdev=rdev; +memset (&inode_fake,0 ,sizeof (inode_fake)); + inode_fake.i_rdev =to_kdev_t (bdev->bd_dev); + inode_fake.i_bdev = bdev;init_waitqueue_head (&inode_fake.i_wait);set_fs (KERNEL_DS ); res = bdev->bd_op->ioctl (&inode_fake,NULL , cmd, arg);
fs/devfs/base.c +24 -0
@@ -1903,6 +1903,27 @@return master->slave; }/* End Function devfs_get_unregister_slave */ +#ifdef CONFIG_DEVFS_GUID +/** +* devfs_unregister_slave - remove the slave that is unregistered when @master is unregistered. +* Destroys the connection established by devfs_auto_unregister. +* +* @master: The master devfs entry. +*/ + +void devfs_unregister_slave (devfs_handle_t master) +{ +devfs_handle_t slave; + +if (master =NULL )return ; + + slave = master->slave; +if (slave) { + master->slave =NULL ; +unregister (slave); + }; +} +#endif /* CONFIG_DEVFS_GUID */ /** * devfs_get_name - Get the name for a device entry in its parent directory.
@@ -2103,6 +2124,9 @@EXPORT_SYMBOL (devfs_get_next_sibling);EXPORT_SYMBOL (devfs_auto_unregister);EXPORT_SYMBOL (devfs_get_unregister_slave); +#ifdef CONFIG_DEVFS_GUID +EXPORT_SYMBOL (devfs_unregister_slave); +#endif EXPORT_SYMBOL (devfs_register_chrdev);EXPORT_SYMBOL (devfs_register_blkdev);EXPORT_SYMBOL (devfs_unregister_chrdev);
fs/partitions/Config.in +1 -0
@@ -25,6 +25,7 @@ bool ' Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION bool ' Unixware slices support' CONFIG_UNIXWARE_DISKLABEL bool ' EFI GUID Partition support' CONFIG_EFI_PARTITION + dep_bool ' /dev/guid support (EXPERIMENTAL)' CONFIG_DEVFS_GUID $CONFIG_DEVFS_FS $CONFIG_EFI_PARTITION fi bool ' SGI partition support' CONFIG_SGI_PARTITION bool ' Ultrix partition table support' CONFIG_ULTRIX_PARTITION
fs/partitions/check.c +149 -2
207 lines not on this page · raw message
fs/partitions/efi.c +35 -3
@@ -61,7 +61,7 @@#include "check.h" #include "efi.h" -#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID +#if CONFIG_BLK_DEV_MD extern void md_autodetect_dev (kdev_t dev);#endif
@@ -479,7 +479,30 @@return 0 ; } +#ifdef CONFIG_DEVFS_GUID +/* set_partition_guid */ +/* Fill in the GUID field of the partition. +It is set to NULL by register_disk before. */ +static void set_partition_guid (struct gendisk *hd, +const int minor, +const efi_guid_t *guid) +{ +efi_guid_t *part_guid = hd->part[minor].guid; + +if (!guid || !hd)return ; + + part_guid =kmalloc (sizeof (efi_guid_t),GFP_KERNEL ); +if (part_guid) { +memcpy (part_guid, guid,sizeof (efi_guid_t)); + }else { +printk (KERN_WARNING +"add_gpt_partitions: cannot allocate GUID memory!\n" ); + }; + + hd->part[minor].guid = part_guid; +} +#endif /* CONFIG_DEVFS_GUID */ /* * Create devices for each entry in the GUID Partition Table Entries.
@@ -502,7 +525,7 @@u32 i, nummade=0 ;efi_guid_t unusedGuid =UNUSED_ENTRY_GUID ; -#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID +#if CONFIG_BLK_DEV_MD efi_guid_t raidGuid =PARTITION_LINUX_RAID_GUID ;#endif
@@ -516,6 +539,11 @@ }debug_printk (efi_printk_level"GUID Partition Table is valid! Yea!\n" ); + +#ifdef CONFIG_DEVFS_GUID +set_partition_guid (hd, nextminor -1 , &(gpt->DiskGUID)); +#endif +for (i =0 ; i < gpt->NumberOfPartitionEntries && nummade < (hd->max_p -1 ); i++) {if (!efi_guidcmp (unusedGuid, ptes[i].PartitionTypeGuid))
@@ -524,8 +552,12 @@add_gd_partition (hd, nextminor, ptes[i].StartingLBA, (ptes[i].EndingLBA-ptes[i].StartingLBA +1 )); +#ifdef CONFIG_DEVFS_GUID +set_partition_guid (hd, nextminor, &(ptes[i].UniquePartitionGuid)); +#endif +/* If there's this is a RAID volume, tell md */ -#if CONFIG_BLK_DEV_MD &&CONFIG_AUTODETECT_RAID +#if CONFIG_BLK_DEV_MD if (!efi_guidcmp (raidGuid, ptes[i].PartitionTypeGuid)) {md_autodetect_dev (MKDEV (MAJOR (dev),nextminor)); }
include/asm-ia64/fpswa.h +0 -4
@@ -9,10 +9,6 @@* Copyright (C) 1999 Goutham Rao <[email protected]> */ -#if 1 -#define FPSWA_BUG -#endif - typedef struct { /* 4 * 128 bits */ unsigned long fp_lp[4*2];
include/asm-ia64/hw_irq.h +2 -1
@@ -49,6 +49,7 @@#define IA64_PERFMON_VECTOR 0xee/* performanc monitor interrupt vector */ #define IA64_TIMER_VECTOR 0xef/* use highest-prio group 15 interrupt for timer */ #define IA64_MCA_WAKEUP_VECTOR 0xf0/* MCA wakeup (must be >MCA_RENDEZ_VECTOR) */ +#define IA64_IPI_RESCHEDULE 0xfd/* SMP reschedule */ #define IA64_IPI_VECTOR 0xfe/* inter-processor interrupt vector */ /* IA64 inter-cpu interrupt related definitions */
@@ -69,7 +70,7 @@extern unsigned long ipi_base_addr; -extern struct hw_interrupt_type irq_type_ia64_sapic;/* CPU-internal interrupt controller */ +extern struct hw_interrupt_type irq_type_ia64_lsapic;/* CPU-internal interrupt controller */ extern int ia64_alloc_irq (void );/* allocate a free irq */ extern void ia64_send_ipi (int cpu,int vector,int delivery_mode,int redirect);
include/asm-ia64/offsets.h +2 -2
@@ -25,8 +25,8 @@#define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ #define IA64_TASK_THREAD_OFFSET 1456/* 0x5b0 */ #define IA64_TASK_THREAD_KSP_OFFSET 1456/* 0x5b0 */ -#define IA64_TASK_THREAD_SIGMASK_OFFSET 3752/* 0xea8 */ -#define IA64_TASK_PFM_NOTIFY_OFFSET 3648/* 0xe40 */ +#define IA64_TASK_THREAD_SIGMASK_OFFSET 1568/* 0x620 */ +#define IA64_TASK_PFM_NOTIFY_OFFSET 2088/* 0x828 */ #define IA64_TASK_PID_OFFSET 196/* 0xc4 */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
include/asm-ia64/signal.h +1 -2
@@ -56,7 +56,7 @@* SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. -* SA_INTERRUPT is a no-op, but left due to historical reasons. Use the +* SA_INTERRUPT is a no-op, but left due to historical reasons. * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered.
@@ -105,7 +105,6 @@#define SA_PROBE SA_ONESHOT#define SA_SAMPLE_RANDOM SA_RESTART#define SA_SHIRQ 0x04000000 -#define SA_LEGACY 0x02000000/* installed via a legacy irq? */ #endif /* __KERNEL__ */
include/asm-ia64/smp.h +1 -1
@@ -35,7 +35,7 @@extern char no_int_routing__initdata ; -extern unsigned long cpu_online_map; +extern volatile unsigned long cpu_online_map;extern unsigned long ipi_base_addr;extern unsigned char smp_int_redirect;extern int smp_num_cpus;
include/linux/devfs_fs_kernel.h +3 -0
@@ -81,6 +81,9 @@extern devfs_handle_t devfs_get_next_sibling (devfs_handle_t de);extern void devfs_auto_unregister (devfs_handle_t master,devfs_handle_t slave);extern devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master); +#ifdef CONFIG_DEVFS_GUID +extern void devfs_unregister_slave (devfs_handle_t master); +#endif extern const char *devfs_get_name (devfs_handle_t de,unsigned int *namelen);extern int devfs_register_chrdev (unsigned int major,const char *name,struct file_operations *fops);
include/linux/genhd.h +7 -0
@@ -13,6 +13,10 @@#include <linux/types.h> #include <linux/major.h> +#ifdef CONFIG_DEVFS_GUID +#include <asm/efi.h> +#endif +/* These three have identical behaviour; use the second one if DOS fdisk gets confused about extended/logical partitions starting past cylinder 1023. */ #define DOS_EXTENDED_PARTITION 5
@@ -51,6 +55,9 @@long start_sect;long nr_sects;devfs_handle_t de;/* primary (master) devfs entry */ +#ifdef CONFIG_DEVFS_GUID +efi_guid_t *guid; +#endif };#define GENHD_FL_REMOVABLE 1
include/linux/irq.h +0 -1
@@ -54,7 +54,6 @@#include <asm/hw_irq.h> /* the arch dependent stuff */ -extern void do_IRQ_per_cpu (unsigned long irq,struct pt_regs *regs);extern int handle_IRQ_event (unsigned int ,struct pt_regs *,struct irqaction *);extern int setup_irq (unsigned int ,struct irqaction * );
include/linux/sched.h +1 -1
@@ -537,7 +537,7 @@extern unsigned long volatile jiffies;extern unsigned long itimer_ticks;extern unsigned long itimer_next; -extern struct timeval xtime; +extern volatile struct timeval xtime;extern void do_timer (struct pt_regs *);extern unsigned int * prof_buffer;
include/linux/smp.h +1 -1
@@ -53,7 +53,7 @@/* * True once the per process idle is forked */ -extern int smp_threads_ready; +extern volatile int smp_threads_ready;extern int smp_num_cpus;
mm/memory.c +3 -1
@@ -103,8 +103,10 @@ } pmd =pmd_offset (dir,0 );pgd_clear (dir); -for (j =0 ; j <PTRS_PER_PMD ; j++) +for (j =0 ; j <PTRS_PER_PMD ; j++) { + asmvolatile ("lfetch.excl [%0]" ::"r" (pmd + j +16 ));free_one_pmd (pmd+j); + }pmd_free (pmd); }
Re: [Linux-ia64] kernel update (relative to 2.4.5)
In reply to David MosbergerQuoted 5 lines · David Mosberger
The latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.5-ia64-010626.diff*.
I appled that to a Linus 2.4.5 tree, but it doesn't compile with devfs enabled but dev/guid disabled. fs/partitions/check.c:522 has an unprotected call to free_disk_guids().
Richard
Re: [Linux-ia64] kernel update (relative to 2.4.5)
In reply to David MosbergerQuoted 3 lines
I appled that to a Linus 2.4.5 tree, but it doesn't compile with devfs enabled but dev/guid disabled.
fs/partitions/check.c:522has an unprotected call tofree_disk_guids().
I am sorry. The patch is almost too trivial to post it here, but may still save people time:
fs/partitions/check.c renamed from fs/partitions/check.c~ +2 -0
@@ -519,7 +519,9 @@if (unregister) {devfs_unregister (dev->part[minor].de); dev->part[minor].de =NULL ; +#ifdef CONFIG_DEVFS_GUID free_disk_guids (dev, minor); +#endif }#endif /* CONFIG_DEVFS_FS */ }
Martin
Signature · 2 lines
Martin Wilck <[email protected]> FSC EP PS DS1, Paderborn Tel. +49 5251 8 15113
[Linux-ia64] kernel update (relative to 2.4.7)
In reply to David MosbergerThe latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.7-ia64-010723.diff*.
There are no major new features in this patch but mostly bug fixes and syncing up with 2.4.7. Note that 2.4.7 introduces a somewhat non-trivial change in how softirqs are handled: they are now checked only as a result of a hard irq and not every time the kernel returns to user mode. While I'm not particularly happy to see such changes this late in the 2.4.x series, I do believe it is safe and I have been running a fairly busy machine since Saturday without any problems. As usual your mileage may vary, so test well before you ship with this kernel.
One big caveat: the ACPI power management does NOT work at the moment. Do not turn on CONFIG_ACPI_BUSMGR etc. or you may end up with a non-booting system. Intel is working on fixing this, so stay tuned.
More detailed change log:
- more McKinley related updates from Alex
- get legacy I/O base address from EFI memory map (Alex)
- mark MMX and FXSR extensions as available in IA-32 mode (Asit)
- add support for placing per-CPU data in NUMA-node local memory (Jack)
- perfmon fix from Stephane
- more error checking in IA-32 subsystem (based on patch from Arnaldo)
- drop support for A-step CPUs
- make iosapic_set_affinity() a no-op on UP machines
- update /proc/cpuinfo to output "CPU family" info in a manner consistent with Intel's interpretation of this field; specifically, the architecture (IA-64) is now listed with tag "arch" and the "family" tag now contains "Itanium", "McKinley", or whatever...
- fix copy_user() to work properly with PIPE_DEPTH!=4 (this patch was already sent to the list earlier on)
- fix time conversion in "joydev" driver
- merge in QLA 2100 driver from Qlogic
As usual the patch below is fyi only.
Note: I'd like to remove support for B0-B2 step CPUs asap. If you really need support for such old CPUs, make your case now... ;-)
Enjoy,
--david
arch/ia64/config.in +13 -6
@@ -25,9 +25,12 @@ define_bool CONFIG_SBUS n define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n -define_bool CONFIG_ACPI y -define_bool CONFIG_ACPI_INTERPRETER y -define_bool CONFIG_ACPI_KERNEL_CONFIG y + +if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then + define_bool CONFIG_ACPI y + define_bool CONFIG_ACPI_INTERPRETER y + define_bool CONFIG_ACPI_KERNEL_CONFIG y +fi choice 'IA-64 processor type' \ "Itanium CONFIG_ITANIUM \
@@ -47,7 +50,6 @@ if [ "$CONFIG_ITANIUM" = "y" ]; then define_bool CONFIG_IA64_BRL_EMU y - bool ' Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC if [ "$CONFIG_ITANIUM_BSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium B0-step specific code' CONFIG_ITANIUM_B0_SPECIFIC
@@ -62,7 +64,7 @@ if [ "$CONFIG_ITANIUM_CSTEP_SPECIFIC" = "y" ]; then bool ' Enable Itanium C0-step specific code' CONFIG_ITANIUM_C0_SPECIFIC fi - if [ "$CONFIG_ITANIUM_ASTEP_SPECIFIC" = "y" -o "$CONFIG_ITANIUM_B0_SPECIFIC" = "y" \ + if [ "$CONFIG_ITANIUM_B0_SPECIFIC" = "y" \ -o "$CONFIG_ITANIUM_B1_SPECIFIC" = "y" -o "$CONFIG_ITANIUM_B2_SPECIFIC" = "y" ]; then define_bool CONFIG_ITANIUM_PTCG n else
@@ -87,7 +89,6 @@ if [ "$CONFIG_IA64_DIG" = "y" ]; then bool ' Force interrupt redirection' CONFIG_IA64_HAVE_IRQREDIR bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA - bool ' Enable ACPI 2.0 with errata 1.3' CONFIG_ACPI20 define_bool CONFIG_PM y fi
@@ -121,6 +122,8 @@ if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then +source drivers/acpi/Config.in + bool 'PCI support' CONFIG_PCI source drivers/pci/Config.in
@@ -244,6 +247,10 @@ endmenu source drivers/usb/Config.in + +if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + source net/bluetooth/Config.in +fi fi # !HP_SIM
arch/ia64/ia32/sys_ia32.c +52 -32
187 lines not on this page · raw message
arch/ia64/kernel/acpi.c +21 -7
@@ -205,11 +205,16 @@case ACPI20_ENTRY_IO_SAPIC : iosapic = (acpi_entry_iosapic_t *) p;if (iosapic_init) -iosapic_init (iosapic->address, iosapic->irq_base); +/* +* The PCAT_COMPAT flag indicates that the system has a +* dual-8259 compatible setup. +*/ +iosapic_init (iosapic->address, iosapic->irq_base, + (madt->flags &MADT_PCAT_COMPAT ));break ;case ACPI20_ENTRY_PLATFORM_INT_SOURCE : -printk ("ACPI 2.0 MADT: PLATFORM INT SOUCE\n" ); +printk ("ACPI 2.0 MADT: PLATFORM INT SOURCE\n" );acpi20_platform (p);break ;
@@ -256,6 +261,7 @@int __init acpi20_parse (acpi20_rsdp_t *rsdp20) { +# ifdef CONFIG_ACPI acpi_xsdt_t *xsdt;acpi_desc_table_hdr_t *hdrp;int tables, i;
@@ -304,13 +310,14 @@acpi_cf_terminate (); -#ifdef CONFIG_SMP +# ifdef CONFIG_SMP if (available_cpus =0 ) {printk ("ACPI: Found 0 CPUS; assuming 1\n" ); available_cpus =1 ;/* We've got at least one of these, no? */ } smp_boot_data.cpu_count = total_cpus; -#endif +# endif +# endif /* CONFIG_ACPI */ return 1 ; }/*
@@ -390,7 +397,12 @@case ACPI_ENTRY_IO_SAPIC : iosapic = (acpi_entry_iosapic_t *) p;if (iosapic_init) -iosapic_init (iosapic->address, iosapic->irq_base); +/* +* The ACPI I/O SAPIC table doesn't have a PCAT_COMPAT +* flag like the MADT table, but we can safely assume that +* ACPI 1.0b systems have a dual-8259 setup. +*/ +iosapic_init (iosapic->address, iosapic->irq_base,1 );break ;case ACPI_ENTRY_INT_SRC_OVERRIDE :
@@ -416,6 +428,7 @@int __init acpi_parse (acpi_rsdp_t *rsdp) { +# ifdef CONFIG_ACPI acpi_rsdt_t *rsdt;acpi_desc_table_hdr_t *hdrp;long tables, i;
@@ -449,12 +462,13 @@acpi_cf_terminate (); -#ifdef CONFIG_SMP +# ifdef CONFIG_SMP if (available_cpus =0 ) {printk ("ACPI: Found 0 CPUS; assuming 1\n" ); available_cpus =1 ;/* We've got at least one of these, no? */ } smp_boot_data.cpu_count = total_cpus; -#endif +# endif +# endif /* CONFIG_ACPI */ return 1 ; }
arch/ia64/kernel/efi.c +26 -0
@@ -453,6 +453,32 @@ efi.reset_system =__va (runtime->reset_system); } +/* +* Walk the EFI memory map looking for the I/O port range. There can only be one entry of +* this type, other I/O port ranges should be described via ACPI. +*/ +u64 +efi_get_iobase (void ) +{ +void *efi_map_start, *efi_map_end, *p; +efi_memory_desc_t *md; +u64 efi_desc_size; + + efi_map_start =__va (ia64_boot_param->efi_memmap); + efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size; + efi_desc_size = ia64_boot_param->efi_memdesc_size; + +for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { + md = p; +if (md->type =EFI_MEMORY_MAPPED_IO_PORT_SPACE ) { +/* paranoia attribute checking */ +if (md->attribute = (EFI_MEMORY_UC |EFI_MEMORY_RUNTIME )) +return md->phys_addr; + } + } +return 0 ; +} + static void __exitefivars_exit (void ) {
arch/ia64/kernel/entry.S +11 -61
141 lines not on this page · raw message
arch/ia64/kernel/entry.h +1 -1
@@ -1,7 +1,7 @@#include <linux/config.h> /* XXX fixme */ -#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B1_SPECIFIC ) +#if defined(CONFIG_ITANIUM_B1_SPECIFIC )# define MOVBR (type,br,gr,lbl) mov br=gr#else # define MOVBR (type,br,gr,lbl) mov##type br=gr,lbl
arch/ia64/kernel/fw-emu.c +2 -2
@@ -123,8 +123,8 @@ asm (" .proc pal_emulator_static\n" -"pal_emulator_static: - mov r8=-1\n" +"pal_emulator_static:" +" mov r8=-1\n" " mov r9%6\n" " ;;\n" " cmp.gtu p6,p7=r9,r28 /* r28 <= 255? */\n"
arch/ia64/kernel/head.S +3 -6
@@ -218,8 +218,7 @@ add r19=IA64_NUM_DBG_REGS*8,in0 ;; 1: mov r16Ûr[r18] -#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC) \ - || defined(CONFIG_ITANIUM_C0_SPECIFIC) +#if defined(CONFIG_ITANIUM_C0_SPECIFIC) ;; srlz.d #endif
@@ -236,8 +235,7 @@ GLOBAL_ENTRY(ia64_load_debug_regs) alloc r16=ar.pfs,1,0,0,0 -#if !(defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) \ - || defined(CONFIG_ITANIUM_B0_SPECIFIC) || defined(CONFIG_ITANIUM_B1_SPECIFIC)) +#if !(defined(CONFIG_ITANIUM_B0_SPECIFIC) || defined(CONFIG_ITANIUM_B1_SPECIFIC)) lfetch.nta [in0] #endif mov r20=ar.lc // preserve ar.lc
@@ -250,8 +248,7 @@ add r18=1,r18 ;; mov dbr[r18]=r16 -#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC) \ - || defined(CONFIG_ITANIUM_C0_SPECIFIC) +#if defined(CONFIG_ITANIUM_BSTEP_SPECIFIC) || defined(CONFIG_ITANIUM_C0_SPECIFIC) ;; srlz.d #endif
arch/ia64/kernel/ia64_ksyms.c +6 -1
@@ -31,6 +31,9 @@EXPORT_SYMBOL (disable_irq);EXPORT_SYMBOL (disable_irq_nosync); +#include <linux/interrupt.h> +EXPORT_SYMBOL (probe_irq_mask); +#include <linux/in6.h> #include <asm/checksum.h> /* not coded yet?? EXPORT_SYMBOL(csum_ipv6_magic); */
@@ -54,7 +57,9 @@EXPORT_SYMBOL (clear_page);#include <asm/processor.h> -EXPORT_SYMBOL (cpu_data); +# ifndef CONFIG_NUMA +EXPORT_SYMBOL (_cpu_data); +# endif EXPORT_SYMBOL (kernel_thread);#include <asm/system.h>
arch/ia64/kernel/iosapic.c +5 -3
@@ -205,6 +205,7 @@static void iosapic_set_affinity (unsigned int irq,unsigned long mask) { +#ifdef CONFIG_SMP unsigned long flags;u32 high32, low32;int dest, pin;
@@ -215,7 +216,7 @@if (!mask || irq >=IA64_NUM_VECTORS )return ; - dest =ffz (~mask); + dest =cpu_physical_id (ffz (~mask)); pin = iosapic_irq[irq].pin; addr = iosapic_irq[irq].addr;
@@ -242,6 +243,7 @@ writel(low32, addr + IOSAPIC_WINDOW); }spin_unlock_irqrestore (&iosapic_lock, flags); +#endif }/*
@@ -364,7 +366,7 @@ }void __init -iosapic_init (unsigned long phys_addr,unsigned int base_irq) +iosapic_init (unsigned long phys_addr,unsigned int base_irq,int pcat_compat) {struct hw_interrupt_type *irq_type;int i, irq, max_pin, vector;
@@ -393,7 +395,7 @@printk ("IOSAPIC: version %x.%x, address 0x%lx, IRQs 0x%02x-0x%02x\n" , (ver &0xf0 ) >>4 , (ver &0x0f ), phys_addr, base_irq, base_irq + max_pin); -if (base_irq =0 ) +if ((base_irq =0 ) && pcat_compat)/* * Map the legacy ISA devices into the IOSAPIC data. Some of these may * get reprogrammed later on with data from the ACPI Interrupt Source
arch/ia64/kernel/irq.c +2 -0
@@ -626,6 +626,8 @@ desc->handler->end (irq);spin_unlock (&desc->lock); } +if (local_softirq_pending ()) +do_softirq ();return 1 ; }
arch/ia64/kernel/ivt.S +2 -4
@@ -534,8 +534,7 @@ ;; 1: ld8 r18=[r17] ;; -# if defined(CONFIG_IA32_SUPPORT) && \ - (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_B0_SPECIFIC)) +# if defined(CONFIG_IA32_SUPPORT) && defined(CONFIG_ITANIUM_B0_SPECIFIC) /* * Erratum 85 (Access bit fault could be reported before page not present fault) * If the PTE is indicates the page is not present, then just turn this into a
@@ -565,8 +564,7 @@ ;; 1: ld8 r18=[r17] ;; -# if defined(CONFIG_IA32_SUPPORT) && \ - (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC) || defined(CONFIG_ITANIUM_B0_SPECIFIC)) +# if defined(CONFIG_IA32_SUPPORT) && defined(CONFIG_ITANIUM_B0_SPECIFIC) /* * Erratum 85 (Access bit fault could be reported before page not present fault) * If the PTE is indicates the page is not present, then just turn this into a
arch/ia64/kernel/minstate.h +3 -9
@@ -235,12 +235,6 @@ stf.spill [r2]ø,32; \ stf.spill [r3]ù,32 -#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC -# define STOPS nop.i 0x0;; nop.i 0x0;; nop.i 0x0;; -#else -# define STOPS -#endif - -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs,) STOPS -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs, mov r15=r19) STOPS -#define SAVE_MIN DO_SAVE_MIN( , mov rCRIFS=r0, ) STOPS +#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs,) +#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs, mov r15=r19) +#define SAVE_MIN DO_SAVE_MIN( , mov rCRIFS=r0, )
arch/ia64/kernel/perfmon.c +0 -4
@@ -574,11 +574,7 @@/* cannot send to process 1, 0 means do not notify */ if (pfx->notify_pid <0 || pfx->notify_pid =1 )return 0 ; -/* asked for sampling, but nothing to record ! */ -if (pfx->smpl_entries >0 &&pfm_smpl_entry_size (&pfx->smpl_regs,1 ) =0 )return 0 ; -/* probably more to add here */ -return 1 ; }
arch/ia64/kernel/setup.c +74 -33
176 lines not on this page · raw message
arch/ia64/kernel/smp.c +14 -8
@@ -192,7 +192,7 @@static inline void send_IPI_single (int dest_cpu,int op) { -set_bit (op, &cpu_data[dest_cpu].ipi_operation); +set_bit (op, &cpu_data (dest_cpu)->ipi_operation);platform_send_ipi (dest_cpu,IA64_IPI_VECTOR ,IA64_IPI_DM_INT ,0 ); }
@@ -239,11 +239,13 @@void smp_resend_flush_tlb (void ) { +int i; +/* * Really need a null IPI but since this rarely should happen & since this code * will go away, lets not add one. */ -for (i =0 ; i < smp_num_cpus; ++i) { +for (i =0 ; i < smp_num_cpus; ++i)if (i !=smp_processor_id ())smp_send_reschedule (i); }
@@ -275,7 +277,7 @@ {struct call_data_struct data;int cpus =1 ; -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ +#if (defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))unsigned long timeout;#endif
@@ -295,11 +297,11 @@spin_lock_bh (&call_lock); call_data = &data; +#if (defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC )) resend:send_IPI_single (cpuid,IPI_CALL_FUNC ); -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ - || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))/* Wait for response */ timeout = jiffies +HZ ;while ((atomic_read (&data.started) != cpus) &&time_before (jiffies, timeout))
@@ -307,6 +309,8 @@if (atomic_read (&data.started) != cpus) goto resend;#else +send_IPI_single (cpuid,IPI_CALL_FUNC ); +/* Wait for response */ while (atomic_read (&data.started) != cpus)barrier ();
@@ -344,7 +348,7 @@ {struct call_data_struct data;int cpus = smp_num_cpus-1 ; -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ +#if (defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))unsigned long timeout;#endif
@@ -362,12 +366,12 @@spin_lock_bh (&call_lock); call_data = &data; +#if (defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ + || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC )) resend:/* Send a message to all other CPUs and wait for them to respond */ send_IPI_allbutself (IPI_CALL_FUNC ); -#if (defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_B0_SPECIFIC ) \ - || defined(CONFIG_ITANIUM_B1_SPECIFIC ) || defined(CONFIG_ITANIUM_B2_SPECIFIC ))/* Wait for response */ timeout = jiffies +HZ ;while ((atomic_read (&data.started) != cpus) &&time_before (jiffies, timeout))
@@ -375,6 +379,8 @@if (atomic_read (&data.started) != cpus) goto resend;#else +send_IPI_allbutself (IPI_CALL_FUNC ); +/* Wait for response */ while (atomic_read (&data.started) != cpus)barrier ();
arch/ia64/kernel/smpboot.c +3 -5
@@ -467,8 +467,6 @@set_bit (0 , &cpu_online_map);set_bit (0 , &cpu_callin_map); -printk ("Loops_per_jiffy for BOOT CPU = 0x%lx\n" , loops_per_jiffy); - local_cpu_data->loops_per_jiffy = loops_per_jiffy; ia64_cpu_to_sapicid[0 ] = boot_cpu_id;
@@ -481,7 +479,7 @@/* * If SMP should be disabled, then really disable it! */ -if ((!max_cpus) || (max_cpus <-1 )) { +if (!max_cpus || (max_cpus <-1 )) {printk (KERN_INFO "SMP mode deactivated.\n" ); cpu_online_map =1 ; smp_num_cpus =1 ;
@@ -502,7 +500,7 @@if ((sapicid =-1 ) || (sapicid =hard_smp_processor_id ()))continue ; -if ((max_cpus >0 ) && (max_cpus = cpucount+1 )) +if ((max_cpus >0 ) && (cpucount +1 >= max_cpus))break ;do_boot_cpu (sapicid);
@@ -527,7 +525,7 @@unsigned long bogosum =0 ;for (cpu =0 ; cpu <NR_CPUS ; cpu++)if (cpu_online_map & (1 <<cpu)) - bogosum += cpu_data[cpu].loops_per_jiffy; + bogosum +=cpu_data (cpu)->loops_per_jiffy;printk (KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n" , cpucount +1 , bogosum/(500000 /HZ ), (bogosum/(5000 /HZ ))%100 );
arch/ia64/kernel/time.c +2 -2
@@ -67,8 +67,8 @@unsigned long now, last_tick;# define time_keeper_id 0/* smp_processor_id() of time-keeper */ - last_tick = (cpu_data[time_keeper_id].itm_next - - (lost +1 )*cpu_data[time_keeper_id].itm_delta); + last_tick = (cpu_data (time_keeper_id)->itm_next + - (lost +1 )*cpu_data (time_keeper_id)->itm_delta); now =ia64_get_itc ();if ((long ) (now - last_tick) <0 ) {
arch/ia64/kernel/traps.c +0 -2
@@ -421,14 +421,12 @@sprintf (buf,"General Exception: %s%s" , reason[code], (code =3 ) ? ((isr & (1UL <<37 )) ?" (RSE access)" :" (data access)" ) :"" ); -#ifndef CONFIG_ITANIUM_ASTEP_SPECIFIC if (code =8 ) {# ifdef CONFIG_IA64_PRINT_HAZARDS printk ("%016lx:possible hazard, pr = %016lx\n" , regs->cr_iip, regs->pr);# endif return ; } -#endif break ;case 25 :/* Disabled FP-Register */
arch/ia64/lib/copy_user.S +21 -19
@@ -37,7 +37,7 @@ #define COPY_BREAK 16 // we do byte copy below (must be >) #define PIPE_DEPTH 21 // pipe depth -#define EPI p[PIPE_DEPTH-1] // PASTE(p,16+PIPE_DEPTH-1) +#define EPI p[PIPE_DEPTH-1] // // arguments
@@ -148,8 +148,8 @@ // // - // Optimization. If dst1 is 8-byte aligned (not rarely), we don't need - // to copy the head to dst1, to start 8-byte copy software pipleline. + // Optimization. If dst1 is 8-byte aligned (quite common), we don't need + // to copy the head to dst1, to start 8-byte copy software pipeline. // We know src1 is not 8-byte aligned in this case. // cmp.eq p14,p15=r0,dst2
@@ -233,15 +233,23 @@ #define SWITCH(pred, shift) cmp.eq pred,p0=shift,rshift #define CASE(pred, shift) \ (pred) br.cond.spnt.few copy_user_bit##shift -#define BODY(rshift) \ -copy_user_bit##rshift: \ -1: \ - EX(failure_out,(EPI) st8 [dst1]=tmp,8); \ -(EPI_1) shrp tmp=val1[PIPE_DEPTH-3],val1[PIPE_DEPTH-2],rshift; \ - EX(failure_in2,(p16) ld8 val1[0]=[src1],8); \ - br.ctop.dptk.few 1b; \ - ;; \ - br.cond.spnt.few .diff_align_do_tail +#define BODY(rshift) \ +copy_user_bit##rshift: \ +1: \ + EX(failure_out,(EPI) st8 [dst1]=tmp,8); \ +(EPI_1) shrp tmp=val1[PIPE_DEPTH-3],val1[PIPE_DEPTH-2],rshift; \ + EX(3f,(p16) ld8 val1[0]=[src1],8); \ + br.ctop.dptk.few 1b; \ + ;; \ + br.cond.sptk.few .diff_align_do_tail; \ +2: \ +(EPI) st8 [dst1]=tmp,8; \ +(EPI_1) shrp tmp=val1[PIPE_DEPTH-3],val1[PIPE_DEPTH-2],rshift; \ +3: \ +(p16) mov val1[0]=r0; \ + br.ctop.dptk.few 2b; \ + ;; \ + br.cond.sptk.few failure_in2 // // Since the instruction 'shrp' requires a fixed 128-bit value
@@ -581,13 +589,7 @@ br.ret.dptk.few rp failure_in2: - sub ret0=endsrc,src1 // number of bytes to zero, i.e. not copied - ;; -3: -(p16) mov val1[0]=r0 -(EPI) st8 [dst1]=val1[PIPE_DEPTH-1],8 - br.ctop.dptk.few 3b - ;; + sub ret0=endsrc,src1 cmp.ne p6,p0=dst1,enddst // Do we need to finish the tail ? sub len=enddst,dst1,1 // precompute len (p6) br.cond.dptk.few failure_in1bis
arch/ia64/mm/init.c +4 -3
@@ -140,6 +140,8 @@printk ("Freeing initrd memory: %ldkB freed\n" , (end - start) >>10 );for (; start < end; start +=PAGE_SIZE ) { +if (!VALID_PAGE (virt_to_page (start))) +continue ;clear_bit (PG_reserved, &virt_to_page (start)->flags);set_page_count (virt_to_page (start),1 );free_page (start);
@@ -225,7 +227,7 @@ }void __init -ia64_mmu_init (void ) +ia64_mmu_init (void *my_cpu_data) {unsigned long flags, rid, pta, impl_va_bits;extern void __init tlb_init (void );
@@ -251,8 +253,7 @@ia64_srlz_d ();ia64_itr (0x2 ,IA64_TR_PERCPU_DATA ,PERCPU_ADDR , -pte_val (mk_pte_phys (__pa (&cpu_data[smp_processor_id ()]),PAGE_KERNEL )), -PAGE_SHIFT ); +pte_val (mk_pte_phys (__pa (my_cpu_data),PAGE_KERNEL )),PAGE_SHIFT );__restore_flags (flags);ia64_srlz_i ();
arch/ia64/mm/tlb.c +1 -1
@@ -97,7 +97,7 @@/* * Wait for other CPUs to finish purging entries. */ -#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) || defined(CONFIG_ITANIUM_BSTEP_SPECIFIC ) +#if defined(CONFIG_ITANIUM_BSTEP_SPECIFIC ) {extern void smp_resend_flush_tlb (void );unsigned long start =ia64_get_itc ();
arch/ia64/tools/print_offsets.c +0 -2
@@ -175,8 +175,6 @@ { "IA64_CLONE_VM", CLONE_VM }, { "IA64_CPU_IRQ_COUNT_OFFSET", offsetof (struct cpuinfo_ia64, irq_stat.f.irq_count) }, { "IA64_CPU_BH_COUNT_OFFSET", offsetof (struct cpuinfo_ia64, irq_stat.f.bh_count) }, - { "IA64_CPU_SOFTIRQ_ACTIVE_OFFSET", offsetof (struct cpuinfo_ia64, softirq.active) }, - { "IA64_CPU_SOFTIRQ_MASK_OFFSET", offsetof (struct cpuinfo_ia64, softirq.mask) }, { "IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET", offsetof (struct cpuinfo_ia64, phys_stacked_size_p8) }, };
drivers/acpi/Makefile +1 -1
@@ -37,7 +37,7 @@ obj-$(CONFIG_ACPI) += os.o acpi_ksyms.o obj-$(CONFIG_ACPI) += $(foreach dir,$(acpi-subdirs),$(dir)/$(dir).o) ifdef CONFIG_ACPI_KERNEL_CONFIG - obj-$(CONFIG_ACPI) += acpiconf.o osconf.o + obj-$(CONFIG_ACPI) += acpiconf.o osconf.o driver.o else obj-$(CONFIG_ACPI) += driver.o endif
drivers/acpi/driver.c +4 -0
@@ -128,7 +128,9 @@printk (KERN_INFO "ACPI: Subsystem enabled\n" ); +#ifdef CONFIG_PM pm_active =1 ; +#endif return 0 ; }
@@ -141,7 +143,9 @@ {acpi_terminate (); +#ifdef CONFIG_PM pm_active =0 ; +#endif printk (KERN_ERR "ACPI: Subsystem disabled\n" ); }
drivers/acpi/os.c +66 -17
170 lines not on this page · raw message
drivers/acpi/osconf.c +1 -9
@@ -112,15 +112,6 @@ACPI_STATUS -acpi_os_queue_for_execution ( -u32 priority, -OSD_EXECUTION_CALLBACK callback, -void *context) -{ -return acpi_osd->queue_for_exec (priority, callback, context); -} - -ACPI_STATUS acpi_os_read_pci_cfg_byte (u32 segbus,u32 func,u32 addr,u8 * val) {return acpi_osd->read_pci_cfg_byte (segbus, func, addr, val);
@@ -251,6 +242,7 @@ (*callback)(context);return AE_OK ; } +static ACPI_STATUS __init acpi_os_read_pci_cfg_byte_bt (u32 segbus,u32 func,u32 addr,u8 * val)
drivers/acpi/osconf.h +0 -7
@@ -34,13 +34,6 @@ACPI_STATUS -acpi_os_queue_for_execution ( -u32 priority, -OSD_EXECUTION_CALLBACK callback, -void *context - ); - -ACPI_STATUS acpi_os_read_pci_cfg_byte (u32 segbus,u32 func,u32 addr,u8 * val);ACPI_STATUS
drivers/char/Config.in +5 -0
@@ -188,12 +188,17 @@ dep_tristate '/dev/agpgart (AGP Support)' CONFIG_AGP $CONFIG_DRM_AGP if [ "$CONFIG_AGP" != "n" ]; then bool ' Intel 440LX/BX/GX and I815/I840/I850 support' CONFIG_AGP_INTEL + dep_bool ' Intel 460GX support (EXPERIMENTAL)' CONFIG_AGP_I460 $CONFIG_AGP_PTE_FIXUPS + if [ "$CONFIG_AGP_I460" != "n" ]; then + bool ' Enable Full AGP RQ (Requires BigSur BIOS 99 or Newer)' CONFIG_AGP_I460_FULLRQ + fi bool ' Intel I810/I815 (on-board) support' CONFIG_AGP_I810 bool ' VIA chipset support' CONFIG_AGP_VIA bool ' AMD Irongate support' CONFIG_AGP_AMD bool ' Generic SiS support' CONFIG_AGP_SIS bool ' ALI chipset support' CONFIG_AGP_ALI bool ' Serverworks LE/HE support' CONFIG_AGP_SWORKS + bool 'AGPGART PTE Fixups (Required by 460GX)' CONFIG_AGP_PTE_FIXUPS fi source drivers/char/drm/Config.in
drivers/input/joydev.c +8 -2
@@ -86,6 +86,12 @@MODULE_DESCRIPTION ("Joystick device driver" );MODULE_SUPPORTED_DEVICE ("input/js" ); +static inline unsigned long +jiffies_to_msec (unsigned long t) +{ +return 1000 *(t /HZ ) +1000 *(t %HZ )/HZ ; +} +static int joydev_correct (int value,struct js_corr *corr) {switch (corr->type) {
@@ -133,7 +139,7 @@return ; } - event.time = jiffies * (1000 /HZ ); + event.time =jiffies_to_msec (jiffies);while (list) {
@@ -278,7 +284,7 @@struct js_event event; - event.time = jiffies * (1000 /HZ ); + event.time =jiffies_to_msec (jiffies);if (list->startup < joydev->nkey) { event.type =JS_EVENT_BUTTON |JS_EVENT_INIT ;
drivers/net/eepro100.c +8 -4
@@ -43,13 +43,17 @@static int txdmacount =128 ;static int rxdmacount/* = 0 */ ; +#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__) || defined(__arm__) +/* align rx buffers to 2 bytes so that IP header is aligned */ +# define RX_ALIGN +# define RxFD_ALIGNMENT __attribute__ ((aligned (2), packed)) +#else +# define RxFD_ALIGNMENT +#endif +/* Set the copy breakpoint for the copy-only-tiny-buffer Rx method. Lower values use more memory, but are faster. */ -#if defined(__alpha__) || defined(__sparc__) || defined(__arm__) -static int rx_copybreak =1518 ; -#else static int rx_copybreak =200 ; -#endif /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work =20 ;
drivers/scsi/Config.in +1 -0
@@ -152,6 +152,7 @@ dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI dep_tristate 'Qlogic ISP FC SCSI support' CONFIG_SCSI_QLOGIC_FC $CONFIG_SCSI dep_tristate 'Qlogic QLA 1280 SCSI support' CONFIG_SCSI_QLOGIC_1280 $CONFIG_SCSI + dep_tristate 'Qlogic QLA 2100 driver support' CONFIG_SCSI_QLOGIC_QLA2100 $CONFIG_SCSI fi if [ "$CONFIG_X86" = "y" ]; then dep_tristate 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE $CONFIG_SCSI
drivers/scsi/Makefile +1 -0
@@ -86,6 +86,7 @@ obj-$(CONFIG_SCSI_QLOGIC_ISP) += qlogicisp.o obj-$(CONFIG_SCSI_QLOGIC_FC) += qlogicfc.o obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o +obj-$(CONFIG_SCSI_QLOGIC_QLA2100) += qla2x00.o obj-$(CONFIG_SCSI_PAS16) += pas16.o obj-$(CONFIG_SCSI_SEAGATE) += seagate.o obj-$(CONFIG_SCSI_FD_8xx) += seagate.o
drivers/scsi/qla1280.c +0 -1
@@ -1624,7 +1624,6 @@ {printk (KERN_INFO "scsi(): Interrupt with NULL host ptr\n" );COMTRACE ('X' ) -spin_unlock_irqrestore (&io_request_lock, cpu_flags); return; }#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,1 ,95 )
fs/devfs/base.c +3 -0
@@ -2143,6 +2143,9 @@EXPORT_SYMBOL (devfs_register_blkdev);EXPORT_SYMBOL (devfs_unregister_chrdev);EXPORT_SYMBOL (devfs_unregister_blkdev); +#ifdef CONFIG_DEVFS_GUID +EXPORT_SYMBOL (devfs_unregister_slave); +#endif /**
fs/partitions/check.c +13 -3
@@ -46,6 +46,9 @@#ifdef CONFIG_ACORN_PARTITION acorn_partition,#endif +#ifdef CONFIG_EFI_PARTITION + efi_partition, +#endif #ifdef CONFIG_MSDOS_PARTITION msdos_partition,#endif
@@ -73,9 +76,6 @@#ifdef CONFIG_IBM_PARTITION ibm_partition, #endif -#ifdef CONFIG_EFI_PARTITION - efi_partition, -#endifNULL };
@@ -523,6 +523,9 @@ dev->part[minor].de =NULL ;devfs_dealloc_unique_number (&disc_numspace, dev->part[minor].number); +# ifdef CONFIG_DEVFS_GUID +free_disk_guids (dev, minor); +# endif }#endif /* CONFIG_DEVFS_FS */ }
@@ -572,6 +575,13 @@if (!size || minors =1 )return ; +#ifdef CONFIG_DEVFS_GUID +/* In case this is a revalidation, free GUID memory. +On the first call for this device, +register_disk has set all entries to NULL, +and nothing will happen. */ +free_disk_guids (dev, first_minor); +#endif check_partition (dev,MKDEV (dev->major, first_minor),1 + first_minor);/*
include/asm-ia64/acpi-ext.h +5 -2
@@ -5,12 +5,12 @@* Advanced Configuration and Power Infterface * Based on 'ACPI Specification 1.0b' Febryary 2, 1999 * and 'IA-64 Extensions to the ACPI Specification' Rev 0.6 -* +* * Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond <[email protected]> * Copyright (C) 2000 Intel Corp. * Copyright (C) 2000 J.I. Lee <[email protected]> -* ACPI 2.0 specification +* ACPI 2.0 specification */ #include <linux/types.h>
@@ -146,6 +146,9 @@u32 lapic_address;u32 flags; } acpi_madt_t; + +/* acpi 2.0 MADT flags */ +#define MADT_PCAT_COMPAT (1<<0)/* acpi 2.0 MADT structure types */ #define ACPI20_ENTRY_LOCAL_APIC 0
include/asm-ia64/efi.h +1 -1
@@ -238,7 +238,7 @@extern void efi_memmap_walk (efi_freemem_callback_t callback,void *arg);extern void efi_gettimeofday (struct timeval *tv);extern void efi_enter_virtual_mode (void );/* switch EFI to virtual mode, if possible */ - +extern u64 efi_get_iobase (void );/* * Variable Attributes
include/asm-ia64/hardirq.h +6 -6
@@ -16,15 +16,15 @@/* * No irq_cpustat_t for IA-64. The data is held in the per-CPU data structure. */ -#define softirq_active (cpu) (cpu_data[cpu].softirq.active) -#define softirq_mask (cpu) (cpu_data[cpu].softirq.mask) -#define irq_count (cpu) (cpu_data[cpu].irq_stat.f.irq_count) -#define bh_count (cpu) (cpu_data[cpu].irq_stat.f.bh_count) +#define softirq_pending (cpu) (cpu_data(cpu)->softirq_pending) +#define ksoftirqd_task (cpu) (cpu_data(cpu)->ksoftirqd) +#define irq_count (cpu) (cpu_data(cpu)->irq_stat.f.irq_count) +#define bh_count (cpu) (cpu_data(cpu)->irq_stat.f.bh_count)#define syscall_count (cpu)/* unused on IA-64 */ #define nmi_count (cpu) 0 -#define local_softirq_active () (local_cpu_data->softirq.active) -#define local_softirq_mask () (local_cpu_data->softirq.mask) +#define local_softirq_pending () (local_cpu_data->softirq_pending) +#define local_ksoftirqd () (local_cpu_data->ksoftirqd);#define local_irq_count () (local_cpu_data->irq_stat.f.irq_count)#define local_bh_count () (local_cpu_data->irq_stat.f.bh_count)#define local_syscall_count ()/* unused on IA-64 */
include/asm-ia64/ia32.h +3 -3
@@ -367,10 +367,10 @@ | ((((sd) >> IA32_SEG_DB) & 0x1) << SEG_DB) \ | ((((sd) >> IA32_SEG_G) & 0x1) << SEG_G)) -#define IA32_IOBASE 0x2000000000000000/* Virtual address for I/O space */ +#define IA32_IOBASE 0x2000000000000000/* Virtual address for I/O space */ -#define IA32_CR0 0x80000001/* Enable PG and PE bits */ -#define IA32_CR4 0/* No architectural extensions */ +#define IA32_CR0 0x80000001/* Enable PG and PE bits */ +#define IA32_CR4 0x600/* MMXEX and FXSR on */ /* * IA32 floating point control registers starting values
include/asm-ia64/io.h +1 -1
@@ -333,7 +333,7 @@#define readb (a) __readb((void *)(a))#define readw (a) __readw((void *)(a))#define readl (a) __readl((void *)(a)) -#define readq (a) __readqq((void *)(a)) +#define readq (a) __readq((void *)(a))#define __raw_readb readb#define __raw_readw readw#define __raw_readl readl
include/asm-ia64/iosapic.h +2 -1
@@ -51,7 +51,8 @@#ifndef __ASSEMBLY__ -extern void __init iosapic_init (unsigned long address,unsigned int base_irq); +extern void __init iosapic_init (unsigned long address,unsigned int base_irq, +int pcat_compat);extern void iosapic_register_legacy_irq (unsigned long irq,unsigned long pin,unsigned long polarity,unsigned long trigger);extern void iosapic_pci_fixup (int );
include/asm-ia64/offsets.h +10 -15
@@ -1,16 +1,13 @@#ifndef _ASM_IA64_OFFSETS_H#define _ASM_IA64_OFFSETS_H -/* * DO NOT MODIFY * -* This file was generated by arch/ia64/tools/print_offsets. +* This file was generated by arch/ia64/tools/print_offsets.awk. * */ - -#define PT_PTRACED_BIT 0 -#define PT_TRACESYS_BIT 1 - +#define PT_PTRACED_BIT 0 +#define PT_TRACESYS_BIT 1#define IA64_TASK_SIZE 3904/* 0xf40 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */
@@ -76,7 +73,7 @@#define IA64_PT_REGS_F8_OFFSET 368/* 0x170 */ #define IA64_PT_REGS_F9_OFFSET 384/* 0x180 */ #define IA64_SWITCH_STACK_CALLER_UNAT_OFFSET 0/* 0x0 */ -#define IA64_SWITCH_STACK_AR_FPSR_OFFSET 8/* 0x8 */ +#define IA64_SWITCH_STACK_AR_FPSR_OFFSET 8/* 0x8 */ #define IA64_SWITCH_STACK_F2_OFFSET 16/* 0x10 */ #define IA64_SWITCH_STACK_F3_OFFSET 32/* 0x20 */ #define IA64_SWITCH_STACK_F4_OFFSET 48/* 0x30 */
@@ -115,8 +112,8 @@#define IA64_SWITCH_STACK_B5_OFFSET 504/* 0x1f8 */ #define IA64_SWITCH_STACK_AR_PFS_OFFSET 512/* 0x200 */ #define IA64_SWITCH_STACK_AR_LC_OFFSET 520/* 0x208 */ -#define IA64_SWITCH_STACK_AR_UNAT_OFFSET 528/* 0x210 */ -#define IA64_SWITCH_STACK_AR_RNAT_OFFSET 536/* 0x218 */ +#define IA64_SWITCH_STACK_AR_UNAT_OFFSET 528/* 0x210 */ +#define IA64_SWITCH_STACK_AR_RNAT_OFFSET 536/* 0x218 */ #define IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET 544/* 0x220 */ #define IA64_SWITCH_STACK_PR_OFFSET 552/* 0x228 */ #define IA64_SIGCONTEXT_AR_BSP_OFFSET 72/* 0x48 */
@@ -135,12 +132,10 @@#define IA64_SIGFRAME_RBS_BASE_OFFSET 24/* 0x18 */ #define IA64_SIGFRAME_HANDLER_OFFSET 32/* 0x20 */ #define IA64_SIGFRAME_SIGCONTEXT_OFFSET 176/* 0xb0 */ -#define IA64_CLONE_VFORK 16384/* 0x4000 */ +#define IA64_CLONE_VFORK 16384/* 0x4000 */ #define IA64_CLONE_VM 256/* 0x100 */ -#define IA64_CPU_IRQ_COUNT_OFFSET 8/* 0x8 */ -#define IA64_CPU_BH_COUNT_OFFSET 12/* 0xc */ -#define IA64_CPU_SOFTIRQ_ACTIVE_OFFSET 0/* 0x0 */ -#define IA64_CPU_SOFTIRQ_MASK_OFFSET 4/* 0x4 */ -#define IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET 16/* 0x10 */ +#define IA64_CPU_IRQ_COUNT_OFFSET 0/* 0x0 */ +#define IA64_CPU_BH_COUNT_OFFSET 4/* 0x4 */ +#define IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET 12/* 0xc */ #endif /* _ASM_IA64_OFFSETS_H */
include/asm-ia64/processor.h +22 -7
@@ -235,11 +235,7 @@* state comes earlier: */ struct cpuinfo_ia64 { - /* irq_stat and softirq should be 64-bit aligned */ - struct { - __u32 active; - __u32 mask; - } softirq; + /* irq_stat must be 64-bit aligned */ union { struct { __u32 irq_count;
@@ -247,8 +243,8 @@ } f;__u64 irq_and_bh_counts; } irq_stat; +__u32 softirq_pending;__u32 phys_stacked_size_p8;/* size of physical stacked registers + 8 */ -__u32 pad0;__u64 itm_delta;/* # of clock cycles between clock ticks */ __u64 itm_next;/* interval timer mask value to use for next clock tick */ __u64 *pgd_quick;
@@ -273,6 +269,7 @@__u64 ptce_base;__u32 ptce_count[2 ];__u32 ptce_stride[2 ]; +struct task_struct *ksoftirqd;/* kernel softirq daemon for this CPU */ #ifdef CONFIG_SMP __u64 loops_per_jiffy;__u64 ipi_count;
@@ -280,6 +277,9 @@__u64 prof_multiplier;__u64 ipi_operation;#endif +#ifdef CONFIG_NUMA +struct cpuinfo_ia64 *cpu_data[NR_CPUS ]; +#endif } __attribute__ ((aligned (PAGE_SIZE))) ;/*
@@ -288,7 +288,22 @@*/ #define local_cpu_data ((struct cpuinfo_ia64 *) PERCPU_ADDR) -extern struct cpuinfo_ia64 cpu_data[NR_CPUS ]; +/* +* On NUMA systems, cpu_data for each cpu is allocated during cpu_init() & is allocated on +* the node that contains the cpu. This minimizes off-node memory references. cpu_data +* for each cpu contains an array of pointers to the cpu_data structures of each of the +* other cpus. +* +* On non-NUMA systems, cpu_data is a static array allocated at compile time. References +* to the cpu_data of another cpu is done by direct references to the appropriate entry of +* the array. +*/ +#ifdef CONFIG_NUMA +# define cpu_data (cpu) local_cpu_data->cpu_data_ptrs[cpu] +#else +extern struct cpuinfo_ia64 _cpu_data[NR_CPUS ]; +# define cpu_data (cpu) (&_cpu_data[cpu]) +#endif extern void identify_cpu (struct cpuinfo_ia64 *);extern void print_cpu_info (struct cpuinfo_ia64 *);
include/asm-ia64/smp.h +1 -1
@@ -40,7 +40,7 @@extern unsigned char smp_int_redirect;extern int smp_num_cpus; -extern volatile int ia64_cpu_to_sapicid[]; +extern volatile int ia64_cpu_to_sapicid[];#define cpu_physical_id (i) ia64_cpu_to_sapicid[i]#define cpu_number_map (i) (i)#define cpu_logical_map (i) (i)
include/asm-ia64/softirq.h +11 -1
@@ -7,8 +7,18 @@*/ #include <asm/hardirq.h> +#define __local_bh_enable () do { barrier(); local_bh_count()--; } while (0) +#define local_bh_disable () do { local_bh_count()++; barrier(); } while (0) -#define local_bh_enable () do { barrier(); local_bh_count()--; } while (0) +#define local_bh_enable () \ +do { \ + __local_bh_enable(); \ + if (__builtin_expect(local_softirq_pending(), 0) && local_bh_count() = 0) \ + do_softirq(); \ +} while (0) + + +#define __cpu_raise_softirq (cpu,nr) set_bit((nr), &softirq_pending(cpu))#define in_softirq () (local_bh_count() != 0)
include/asm-ia64/string.h +0 -3
@@ -10,7 +10,6 @@*/ #include <linux/config.h> /* remove this once we remove the A-step workaround... */ -#ifndef CONFIG_ITANIUM_ASTEP_SPECIFIC #define __HAVE_ARCH_STRLEN 1/* see arch/ia64/lib/strlen.S */ #define __HAVE_ARCH_MEMSET 1/* see arch/ia64/lib/memset.S */
@@ -20,7 +19,5 @@extern __kernel_size_t strlen (const char *);extern void *memset (void *,int ,__kernel_size_t );extern void *memcpy (void *,const void *,__kernel_size_t ); - -#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */ #endif /* _ASM_IA64_STRING_H */
include/asm-ia64/system.h +1 -2
@@ -29,8 +29,7 @@#define GATE_ADDR (0xa000000000000000 + PAGE_SIZE)#define PERCPU_ADDR (0xa000000000000000 + 2*PAGE_SIZE) -#if defined(CONFIG_ITANIUM_ASTEP_SPECIFIC ) \ - || defined(CONFIG_ITANIUM_B0_SPECIFIC ) || defined(CONFIG_ITANIUM_B1_SPECIFIC ) +#if defined(CONFIG_ITANIUM_B0_SPECIFIC ) || defined(CONFIG_ITANIUM_B1_SPECIFIC )/* Workaround for Errata 97. */ # define IA64_SEMFIX_INSN mf;# define IA64_SEMFIX "mf;"
include/linux/agp_backend.h +1 -0
@@ -50,6 +50,7 @@INTEL_I815 ,INTEL_I840 ,INTEL_I850 , +INTEL_460GX ,VIA_GENERIC ,VIA_VP3 , VIA_MVP3,
include/linux/genhd.h +3 -0
@@ -56,6 +56,9 @@long nr_sects;devfs_handle_t de;/* primary (master) devfs entry */ int number;/* stupid old code wastes space */ +#ifdef CONFIG_DEVFS_GUID +efi_guid_t *guid; +#endif };#define GENHD_FL_REMOVABLE 1
include/linux/irq_cpustat.h +3 -3
@@ -23,12 +23,12 @@#define __IRQ_STAT (cpu, member) (irq_stat[cpu].member)#else #define __IRQ_STAT (cpu, member) ((void)(cpu), irq_stat[0].member) -#endif +#endif /* arch independent irq_stat fields */ #define softirq_pending (cpu) __IRQ_STAT((cpu), __softirq_pending) -#define local_irq_count (cpu) __IRQ_STAT((cpu), __local_irq_count) -#define local_bh_count (cpu) __IRQ_STAT((cpu), __local_bh_count) +#define irq_count (cpu) __IRQ_STAT((cpu), __irq_count) +#define bh_count (cpu) __IRQ_STAT((cpu), __bh_count)#define syscall_count (cpu) __IRQ_STAT((cpu), __syscall_count)#define ksoftirqd_task (cpu) __IRQ_STAT((cpu), __ksoftirqd_task)/* arch dependent irq_stat fields */
include/linux/sched.h +1 -1
@@ -539,7 +539,7 @@extern unsigned long volatile jiffies;extern unsigned long itimer_ticks;extern unsigned long itimer_next; -extern volatile struct timeval xtime; +extern struct timeval xtime;extern void do_timer (struct pt_regs *);extern unsigned int * prof_buffer;
include/linux/string.h +1 -0
@@ -79,6 +79,7 @@#ifndef __HAVE_ARCH_MEMCHRextern void *memchr (const void *,int ,__kernel_size_t );#endif +extern char *kstrdup (const char *,int ); #ifdef __cplusplus }
kernel/pm.c +2 -2
@@ -162,7 +162,7 @@case PM_SUSPEND :case PM_RESUME : prev_state = dev->state; - next_state = (int ) data; + next_state = (long ) data;if (prev_state != next_state) {if (dev->callback) status = (*dev->callback)(dev, rqst, data);
@@ -197,7 +197,7 @@*/ pm_request_t undo = (dev->prev_state ?PM_SUSPEND :PM_RESUME ); -pm_send (dev, undo, (void *) dev->prev_state); +pm_send (dev, undo, (void *) (long ) dev->prev_state); } entry = entry->prev; }
kernel/softirq.c +3 -3
@@ -40,10 +40,10 @@- Bottom halves: globally serialized, grr... */ -/* No separate irq_stat for s390, it is part of PSA */ +/* No separate irq_stat for s390 and ia64, it is part of PSA */ #if !defined(CONFIG_ARCH_S390 ) && !defined(CONFIG_IA64 )irq_cpustat_t irq_stat[NR_CPUS ]; -#endif +#endif /* CONFIG_ARCH_S390 || CONFIG_IA64 */ static struct softirq_action softirq_vec[32] __cacheline_aligned;
@@ -124,7 +124,7 @@* Otherwise we wake up ksoftirqd to make sure we * schedule the softirq soon. */ -if (!(local_irq_count (cpu) |local_bh_count (cpu))) +if (!(irq_count (cpu) |bh_count (cpu)))wakeup_softirqd (cpu); }
Re: [Linux-ia64] kernel update (relative to 2.4.7)
In reply to David MosbergerQuoted 3 lines · David Mosberger
The latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.7-ia64-010723.diff*.
The new __get_user code breaks older versions of gcc for IA64.
gcc version 2.96-ia64-000717 snap 001117scsi_ioctl.c: In function `scsi_ioctl_send_command':
scsi_ioctl.c:366: Internal compiler error in `rws_access_regno', at config/ia64/ia64.c:3671
ia64-unknown-linux-gcc: Internal compiler error: program cpp got fatal signal 13
Time to upgrade gcc. Workaround for old versions.
Index: 7.11/drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_ioctl.c Tue, 24 Jul 2001 11:44:19 +1000 kaos (linux-2.4/U/b/19_scsi_ioctl 1.2.2.3 644) renamed from drivers/scsi/scsi_ioctl.c Fri, 06 Jul 2001 09:49:24 +1000 kaos (linux-2.4/U/b/19_scsi_ioctl 1.2.2.3 644) +2 -2
@@ -209,10 +209,10 @@ int scsi_ioctl_send_command(Scsi_Device if (verify_area(VERIFY_READ, sic, sizeof(Scsi_Ioctl_Command))) return -EFAULT; - if(__get_user(inlen, &sic->inlen)) + if(get_user(inlen, &sic->inlen)) return -EFAULT; - if(__get_user(outlen, &sic->outlen)) + if(get_user(outlen, &sic->outlen)) return -EFAULT; /*
Re: [Linux-ia64] kernel update (relative to 2.4.7)
In reply to David MosbergerQuoted 3 lines · David Mosberger
The latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.7-ia64-010723.diff*.
2.4.7 has __set_bit and similar functions, used by devfs, there is no IA64 implementation. Most of the patch is adding DocBook headers.
Index: 7.11/include/asm-ia64/bitops.h
include/asm-ia64/bitops.h Tue, 24 Jul 2001 12:47:45 +1000 kaos (linux-2.4/t/47_bitops.h 1.1.3.1.1.1 644) renamed from include/asm-ia64/bitops.h Tue, 24 Jul 2001 11:08:09 +1000 kaos (linux-2.4/t/47_bitops.h 1.1.3.1.1.1 644) +120 -17
@@ -10,15 +10,23 @@ #include <asm/system.h> -/* - * These operations need to be atomic. The address must be (at least) "long" aligned. +/** + * set_bit - Atomically set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * This function is atomic and may not be reordered. See __set_bit() + * if you do not require the atomic guarantees. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + * + * The address must be (at least) "long" aligned. * Note that there are driver (e.g., eepro100) which use these operations to operate on * hw-defined data-structures, so we can't easily change these operations to force a * bigger alignment. * * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). */ - static __inline__ void set_bit (int nr, volatile void *addr) {
@@ -35,11 +43,36 @@ set_bit (int nr, volatile void *addr) } while (cmpxchg_acq(m, old, new) != old); } +/** + * __set_bit - Set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike set_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. + */ +static __inline__ void __set_bit(int nr, volatile void * addr) +{ + *((__u32 *) addr + (nr >> 5)) |= (1 << (nr & 31)); +} + /* * clear_bit() doesn't provide any barrier for the compiler. */ #define smp_mb__before_clear_bit() smp_mb() #define smp_mb__after_clear_bit() smp_mb() + +/** + * clear_bit - Clears a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * clear_bit() is atomic and may not be reordered. However, it does + * not contain a memory barrier, so if it is used for locking purposes, + * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() + * in order to ensure changes are visible on other processors. + */ static __inline__ void clear_bit (int nr, volatile void *addr) {
@@ -56,18 +89,29 @@ clear_bit (int nr, volatile void *addr) } while (cmpxchg_acq(m, old, new) != old); } -/* - * WARNING: non atomic version. +/** + * __change_bit - Toggle a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike change_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. */ -static __inline__ void -__change_bit (int nr, void *addr) +static __inline__ void __change_bit(int nr, volatile void * addr) { - volatile __u32 *m = (__u32 *) addr + (nr >> 5); - __u32 bit = (1 << (nr & 31)); - - *m = *m ^ bit; + *((__u32 *) addr + (nr >> 5)) ^= (1 << (nr & 31)); } +/** + * change_bit - Toggle a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * change_bit() is atomic and may not be reordered. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ static __inline__ void change_bit (int nr, volatile void *addr) {
@@ -84,6 +128,14 @@ change_bit (int nr, volatile void *addr) } while (cmpxchg_acq(m, old, new) != old); } +/** + * test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ static __inline__ int test_and_set_bit (int nr, volatile void *addr) {
@@ -101,6 +153,30 @@ test_and_set_bit (int nr, volatile void return (old & bit) != 0; } +/** + * __test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_set_bit(int nr, volatile void * addr) +{ + int oldbit = *((__u32 *) addr + (nr >> 5)) & (1 << (nr & 31)); + *((__u32 *) addr + (nr >> 5)) |= (1 << (nr & 31)); + return(oldbit != 0); +} + +/** + * test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ static __inline__ int test_and_clear_bit (int nr, volatile void *addr) {
@@ -118,6 +194,22 @@ test_and_clear_bit (int nr, volatile voi return (old & ~mask) != 0; } +/** + * __test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit = *((__u32 *) addr + (nr >> 5)) & (1 << (nr & 31)); + *((__u32 *) addr + (nr >> 5)) &= ~(1 << (nr & 31)); + return(oldbit != 0); +} + /* * WARNING: non atomic version. */
@@ -132,6 +224,14 @@ __test_and_change_bit (int nr, void *add return (old & bit) != 0; } +/** + * test_and_change_bit - Change a bit and return its new value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ static __inline__ int test_and_change_bit (int nr, volatile void *addr) {
@@ -155,10 +255,13 @@ test_bit (int nr, volatile void *addr) return 1 & (((const volatile __u32 *) addr)[nr >> 5] >> (nr & 31)); } -/* - * ffz = "find first zero". Returns the bit number (0..63) of the first (least - * significant) bit that is zero in X. Undefined if no zero exists, so code should check - * against ~0UL first... +/** + * find_first_zero_bit - find the first zero bit in a memory region + * @x: The address to start the search at + * + * Returns the bit-number (0..63) of the first (least significant) zero bit, not + * the number of the byte containing a bit. Undefined if no zero exists, so + * code should check against ~0UL first... */ static inline unsigned long ffz (unsigned long x)
@@ -172,8 +275,8 @@ ffz (unsigned long x) #ifdef __KERNEL__ /* - * Find the most significant bit that is set (undefined if no bit is - * set). + * find_last_zero_bit - find the last zero bit in a 64 bit quantity + * @x: The value to search */ static inline unsigned long ia64_fls (unsigned long x)
Re: [Linux-ia64] kernel update (relative to 2.4.7)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> The latest IA-64 patch is available at: |> |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ |> |> in file linux-2.4.7-ia64-010723.diff*. |> |> There are no major new features in this patch but mostly bug fixes and |> syncing up with 2.4.7. Note that 2.4.7 introduces a somewhat |> non-trivial change in how softirqs are handled: they are now checked |> only as a result of a hard irq and not every time the kernel returns |> to user mode. While I'm not particularly happy to see such changes |> this late in the 2.4.x series, I do believe it is safe and I have been |> running a fairly busy machine since Saturday without any problems. As |> usual your mileage may vary, so test well before you ship with this |> kernel.
Did you try out the UP kernel? It hangs in ksoftirqd.
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.7)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> Did you try out the UP kernel? It hangs in ksoftirqd.
I thought I did. Got as far as building and installing the UP kernel but I seem to have mistyped the kernel name when booting the system. You are right, the kernel hangs early in the boot.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerQuoted 5 lines · David Mosberger
Note that Linus switched to the DRM code needed for XFree86-4.1. But since we don't 460gx have AGP support for this version yet and since most folks are presumably still running 4.0.x, I kept the old DRM code instead. I assume this will stay so until someone (Chris?) has had a chance up update the 460gx code to 4.1.
I have updated DRM code for 460gx working on my machines and should have a patch out sometime tomorrow.
Chris
[Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerThe latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.8-ia64-010814.diff*.
One major improvement in this patch is that the machine check support (MCA code) should work again and better. Thanks to Asit & crew. Note that Linus switched to the DRM code needed for XFree86-4.1. But since we don't 460gx have AGP support for this version yet and since most folks are presumably still running 4.0.x, I kept the old DRM code instead. I assume this will stay so until someone (Chris?) has had a chance up update the 460gx code to 4.1.
Oh, I dropped support for B0-B2 CPUs. So now, only B3 or newer CPUs are supported.
Enjoy,
--david
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerQuoted 5 lines · David Mosberger
that Linus switched to the DRM code needed for XFree86-4.1. But since we don't 460gx have AGP support for this version yet and since most folks are presumably still running 4.0.x, I kept the old DRM code instead. I assume this will stay so until someone (Chris?) has had a chance up update the 460gx code to 4.1.
If you are going to keep both DRM 4.0 and 4.1, please do it the same way that Alan Cox did, to reduce the number of solutions to this "problem". The -ac kernels have, in drivers/char/Config.in
bool 'Direct Rendering Manager (XFree86 DRI support)' CONFIG_DRM
if [ "$CONFIG_DRM" = "y" ]; then
bool ' Build drivers for new (XFree 4.1) DRM' CONFIG_DRM_NEW if [ "$CONFIG_DRM_NEW" = "y" ]; then
source drivers/char/drm/Config.in
else
define_bool CONFIG_DRM_OLD y
source drivers/char/drm-4.0/Config.in
fi
fi
drivers/char/drm-4.0/ is a copy of the previous drivers/char/drm with CONFIG_DRM_foo replaced by CONFIG_DRM40_foo.
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> If you are going to keep both DRM 4.0 and 4.1, please do it Keith> the same way that Alan Cox did, to reduce the number of Keith> solutions to this "problem". The -ac kernels have, in Keith> drivers/char/Config.in
At the moment, only 4.0 is there. Perhaps I should include both once 4.1 works for IA64.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerDavid-
I discovered a minor typo, you must be using GCC 3.0.
Quoted 25 lines · David Mosberger
The latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.8-ia64-010814.diff*.
One major improvement in this patch is that the machine check support (MCA code) should work again and better. Thanks to Asit & crew. Note that Linus switched to the DRM code needed for XFree86-4.1. But since we don't 460gx have AGP support for this version yet and since most folks are presumably still running 4.0.x, I kept the old DRM code instead. I assume this will stay so until someone (Chris?) has had a chance up update the 460gx code to 4.1.
Oh, I dropped support for B0-B2 CPUs. So now, only B3 or newer CPUs are supported.
Enjoy,
--david_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/938-9838
drivers/scsi/scsi_ioctl.c +1 -1
@@ -213,7 +213,7 @@return -EFAULT ;#if __GNUC__ <3 - foo = __get_user(inlen, &sic->inlen) + foo =__get_user (inlen, &sic->inlen);if (foo)return -EFAULT ;
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Don Dugger
Don> David- I discovered a minor typo, you must be using GCC 3.0.
Yes, I am. Sorry about that.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.8)
In reply to David MosbergerQuoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> If you are going to keep both DRM 4.0 and 4.1, please do it Keith> the same way that Alan Cox did, to reduce the number of Keith> solutions to this "problem". The -ac kernels have, in Keith>
drivers/char/Config.inAt the moment, only 4.0 is there. Perhaps I should include both once 4.1 works for IA64.
I recommend doing it now. The ia64 patch is much larger that it need be because you delete the 4.1 code as well as adding back the 4.0 code. If you just add 4.0 as drm-old (the same way as AC) then you get a smaller patch footprint. Not to mention making it easier to track Linus's and AC's kernels.
The only downside is that ia64 users have to select drm-old instead of drm, but that is already true for a lot of non-ia64 users.
[Linux-ia64] kernel update (relative to 2.4.9)
In reply to David MosbergerThe latest IA-64 patch is available at:
ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/
in file linux-2.4.9-ia64-010820.diff*.
The big news in this patch is a major cleanup of the DRM source tree(s) by Chris Ahna. Much of the ia64 specific code has now been restructured so it fits much better into the existing framework. This should make it a lot easier in getting the changes accepted by the DRM maintainers. Other changes:
o Small bug fix to the perfmon support (Stephane)
o Various updated for 2.4.9.
o Minor fixes to get rid of warnings (code in ACPI and the cs4281 and qla1280 driver are affected by this)
Enjoy,
--david
Documentation/Configure.help +1 -1
@@ -2537,7 +2537,7 @@ CONFIG_AGP_I460 This option gives you AGP support for the Intel 460GX chipset. This chipset, the first to support Intel Itanium processors, is new and - this option is correspondingly experimental. + this option is correspondingly a little experimental. If you don't have a 460GX based machine (such as BigSur) with an AGP slot then this option isn't going to do you much good. If you're
Makefile +0 -3
@@ -136,9 +136,6 @@ drivers/net/net.o \ drivers/media/media.o DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o -ifeq ($(CONFIG_AGP)$(CONFIG_AGP_PTE_FIXUPS), my) -DRIVERS-y += drivers/char/agp/agp.o -endif DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
arch/ia64/kernel/perfmon.c +10 -0
@@ -657,6 +657,16 @@/* upper part is ignored on rval */ ia64_set_pmd (cnum, ctx->ctx_pmds[i].smpl_rval); + +/* +* we must reset BTB index (clears pmd16.full to make +* sure we do not report the same branches twice. +* The non-blocking case in handled in update_counters(). +*/ +if (cnum = ctx->ctx_btb_counter) { +DBprintk (("reseting PMD16\n" )); +ia64_set_pmd (16 ,0 ); + } } } }
arch/ia64/kernel/smpboot.c +1 -2
@@ -324,8 +324,7 @@ phys_id =hard_smp_processor_id ();if (test_and_set_bit (cpuid, &cpu_online_map)) { -printk ("huh, phys CPU#0x%x, CPU#0x%x already present??\n" , - phys_id, cpuid); +printk ("huh, phys CPU#0x%x, CPU#0x%x already present??\n" , phys_id, cpuid);BUG (); }
drivers/acpi/acpiconf.c +6 -3
@@ -243,10 +243,11 @@acpi_rpb_t rpb;PCI_ROUTING_TABLE *prt; -ACPI_BUFFER ret_buf;UINT8 path_name[PATHNAME_MAX ];#ifdef CONFIG_ACPI_KERNEL_CONFIG_DEBUG +ACPI_BUFFER ret_buf; + ret_buf.length =PATHNAME_MAX ; ret_buf.pointer = (void *) path_name;
@@ -325,10 +326,11 @@NATIVE_UINT devfn;UINT8 bn; -ACPI_BUFFER ret_buf;UINT8 path_name[PATHNAME_MAX ];#ifdef CONFIG_ACPI_KERNEL_CONFIG_DEBUG +ACPI_BUFFER ret_buf; + ret_buf.length =PATHNAME_MAX ; ret_buf.pointer = (void *) path_name;
@@ -422,10 +424,11 @@NATIVE_UINT temp =0x0F ;ACPI_STATUS status; -ACPI_BUFFER ret_buf;UINT8 path_name[PATHNAME_MAX ];#ifdef CONFIG_ACPI_KERNEL_CONFIG_DEBUG +ACPI_BUFFER ret_buf; + ret_buf.length =PATHNAME_MAX ; ret_buf.pointer = (void *) path_name;
drivers/acpi/driver.c +1 -1
@@ -87,7 +87,7 @@ return -ENODEV; }#else - rsdp_phys = efi.acpi; + rsdp_phys = (ACPI_PHYSICAL_ADDRESS ) efi.acpi;#endif /* from this point on, on error we must call acpi_terminate() */
drivers/char/Config.in +1 -4
@@ -189,10 +189,7 @@ if [ "$CONFIG_AGP" != "n" ]; then bool ' Intel 440LX/BX/GX and I815/I840/I850 support' CONFIG_AGP_INTEL if [ "$CONFIG_IA64" != "n" ]; then - bool ' Intel 460GX support (EXPERIMENTAL)' CONFIG_AGP_I460 - if [ "$CONFIG_AGP_I460" != "n" ]; then - define_bool CONFIG_AGP_PTE_FIXUPS y - fi + bool ' Intel 460GX support' CONFIG_AGP_I460 fi bool ' Intel I810/I815 (on-board) support' CONFIG_AGP_I810 bool ' VIA chipset support' CONFIG_AGP_VIA
drivers/char/Makefile +0 -3
@@ -201,9 +201,6 @@ subdir-$(CONFIG_DRM_OLD) += drm-4.0 subdir-$(CONFIG_PCMCIA) += pcmcia subdir-$(CONFIG_AGP) += agp -ifeq ($(CONFIG_AGP)$(CONFIG_AGP_PTE_FIXUPS), my) - subdir-y += agp -endif ifeq ($(CONFIG_FTAPE),y) obj-y += ftape/ftape.o
drivers/char/agp/Makefile +1 -2
@@ -5,13 +5,12 @@ O_TARGET := agp.o -export-objs := agpgart_be.o vmmap.o +export-objs := agpgart_be.o list-multi := agpgart.o agpgart-objs := agpgart_fe.o agpgart_be.o obj-$(CONFIG_AGP) += agpgart.o -obj-$(CONFIG_AGP_PTE_FIXUPS) += vmmap.o include $(TOPDIR)/Rules.make
drivers/char/agp/vmmap.c +0 -234
234 lines not on this page · raw message
drivers/char/drm/drmP.h +23 -22
98 lines not on this page · raw message
drivers/char/drm/drm_agpsupport.h +8 -16
@@ -249,22 +249,6 @@return 0 ; } -#ifdef CONFIG_AGP_PTE_FIXUPS -void *DRM (agp_ioremap )(unsigned long offset,unsigned long size) -{ -if (drm_agp->ioremap) -return drm_agp->ioremap (offset, size); - -return NULL ; -} - -void DRM (agp_iounmap )(void *handle) -{ -if (drm_agp->iounmap) - drm_agp->iounmap (handle); -} -#endif /* CONFIG_AGP_PTE_FIXUPS */ -drm_agp_head_t *DRM (agp_init )(void ) {drm_agp_head_t *head =NULL ;
@@ -333,6 +317,14 @@default : head->chipset ="Unknown" ;break ; } +#if LINUX_VERSION_CODE <=0x020408 + head->cant_use_aperture =0 ; + head->page_mask = ~(0xfff ); +#else + head->cant_use_aperture = head->agp_info.cant_use_aperture; + head->page_mask = head->agp_info.page_mask; +#endif + DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n", head->agp_info.version.major, head->agp_info.version.minor,
drivers/char/drm/drm_bufs.h +2 -2
@@ -124,7 +124,7 @@ MTRR_TYPE_WRCOMB, 1 ); }#endif - map->handle =DRM (ioremap)( map->offset, map->size ); + map->handle =DRM (ioremap)( map->offset, map->size, dev );break ;case _DRM_SHM:
@@ -249,7 +249,7 @@ DRM_DEBUG("mtrr_del = %d\n", retcode); }#endif -DRM (ioremapfree)(map->handle, map->size); +DRM (ioremapfree)(map->handle, map->size, dev);break ;case _DRM_SHM:vfree (map->handle);
drivers/char/drm/drm_drv.h +1 -1
@@ -438,7 +438,7 @@ DRM_DEBUG( "mtrr_del=%d\n", retcode ); }#endif -DRM (ioremapfree)( map->handle, map->size ); +DRM (ioremapfree)( map->handle, map->size, dev );break ;case _DRM_SHM:vfree (map->handle);
drivers/char/drm/drm_ioctl.h +3 -3
@@ -98,7 +98,6 @@ }sprintf (dev->devname,"%s@%s" , dev->name, dev->unique); -#ifdef __alpha__ do { struct pci_dev *pci_dev; int b, d, f;
@@ -116,10 +115,11 @@ pci_dev =pci_find_slot (b,PCI_DEVFN (d,f));if (pci_dev) { dev->pdev = pci_dev; - dev->hose = pci_dev->sysdata; +#ifdef __alpha__ + dev->hose = pci_dev->sysdata; +#endif } }while (0 ); -#endif return 0 ; }
drivers/char/drm/drm_memory.h +45 -5
79 lines not on this page · raw message
drivers/char/drm/drm_vm.h +63 -52
184 lines not on this page · raw message
drivers/char/drm/i810_dma.c +5 -4
@@ -315,7 +315,7 @@if (dev_priv->ring.virtual_start) {DRM (ioremapfree)((void *) dev_priv->ring.virtual_start, - dev_priv->ring.Size); + dev_priv->ring.Size, dev); }if (dev_priv->hw_status_page !=0UL ) {i810_free_page (dev, dev_priv->hw_status_page);
@@ -329,7 +329,8 @@for (i =0 ; i < dma->buf_count; i++) {drm_buf_t *buf = dma->buflist[ i ];drm_i810_buf_priv_t *buf_priv = buf->dev_private; -DRM (ioremapfree)(buf_priv->kernel_virtual, buf->total); +DRM (ioremapfree)(buf_priv->kernel_virtual, + buf->total, dev); } }return 0 ;
@@ -402,7 +403,7 @@ *buf_priv->in_use =I810_BUF_FREE ; buf_priv->kernel_virtual =DRM (ioremap)(buf->bus_address, - buf->total); + buf->total, dev); }return 0 ; }
@@ -458,7 +459,7 @@ dev_priv->ring.virtual_start =DRM (ioremap)(dev->agp->base + init->ring_start, - init->ring_size); + init->ring_size, dev);if (dev_priv->ring.virtual_start =NULL ) { dev->dev_private = (void *) dev_priv;
drivers/char/drm/mga_dma.c +6 -6
@@ -557,9 +557,9 @@ (drm_mga_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); -DRM_IOREMAP ( dev_priv->warp ); -DRM_IOREMAP ( dev_priv->primary ); -DRM_IOREMAP ( dev_priv->buffers ); +DRM_IOREMAP ( dev_priv->warp, dev ); +DRM_IOREMAP ( dev_priv->primary, dev ); +DRM_IOREMAP ( dev_priv->buffers, dev ); if(!dev_priv->warp->handle || !dev_priv->primary->handle ||
@@ -647,9 +647,9 @@if ( dev->dev_private ) {drm_mga_private_t *dev_priv = dev->dev_private; -DRM_IOREMAPFREE ( dev_priv->warp ); -DRM_IOREMAPFREE ( dev_priv->primary ); -DRM_IOREMAPFREE ( dev_priv->buffers ); +DRM_IOREMAPFREE ( dev_priv->warp, dev ); +DRM_IOREMAPFREE ( dev_priv->primary, dev ); +DRM_IOREMAPFREE ( dev_priv->buffers, dev );if ( dev_priv->head !=NULL ) {mga_freelist_cleanup ( dev );
drivers/char/drm/r128_cce.c +6 -6
@@ -593,9 +593,9 @@ init->sarea_priv_offset);if ( !dev_priv->is_pci ) { -DRM_IOREMAP ( dev_priv->cce_ring ); -DRM_IOREMAP ( dev_priv->ring_rptr ); -DRM_IOREMAP ( dev_priv->buffers ); +DRM_IOREMAP ( dev_priv->cce_ring, dev ); +DRM_IOREMAP ( dev_priv->ring_rptr, dev ); +DRM_IOREMAP ( dev_priv->buffers, dev );if (!dev_priv->cce_ring->handle || !dev_priv->ring_rptr->handle || !dev_priv->buffers->handle) {
@@ -667,9 +667,9 @@drm_r128_private_t *dev_priv = dev->dev_private;if ( !dev_priv->is_pci ) { -DRM_IOREMAPFREE ( dev_priv->cce_ring ); -DRM_IOREMAPFREE ( dev_priv->ring_rptr ); -DRM_IOREMAPFREE ( dev_priv->buffers ); +DRM_IOREMAPFREE ( dev_priv->cce_ring, dev ); +DRM_IOREMAPFREE ( dev_priv->ring_rptr, dev ); +DRM_IOREMAPFREE ( dev_priv->buffers, dev ); } else { if (!DRM(ati_pcigart_cleanup)( dev, dev_priv->phys_pci_gart,
drivers/char/drm/radeon_cp.c +7 -6
@@ -641,6 +641,7 @@ tmp_ofs = dev_priv->ring_rptr->offset - dev->sg->handle; page_ofs = tmp_ofs >>PAGE_SHIFT ; +#if defined(__alpha__) && (LINUX_VERSION_CODE >=0x020400 )RADEON_WRITE (RADEON_CP_RB_RPTR_ADDR , entry->busaddr[page_ofs]);
@@ -865,9 +866,9 @@ init->sarea_priv_offset);if ( !dev_priv->is_pci ) { -DRM_IOREMAP ( dev_priv->cp_ring ); -DRM_IOREMAP ( dev_priv->ring_rptr ); -DRM_IOREMAP ( dev_priv->buffers ); +DRM_IOREMAP ( dev_priv->cp_ring, dev ); +DRM_IOREMAP ( dev_priv->ring_rptr, dev ); +DRM_IOREMAP ( dev_priv->buffers, dev );if (!dev_priv->cp_ring->handle || !dev_priv->ring_rptr->handle || !dev_priv->buffers->handle) {
@@ -1012,9 +1013,9 @@drm_radeon_private_t *dev_priv = dev->dev_private;if ( !dev_priv->is_pci ) { -DRM_IOREMAPFREE ( dev_priv->cp_ring ); -DRM_IOREMAPFREE ( dev_priv->ring_rptr ); -DRM_IOREMAPFREE ( dev_priv->buffers ); +DRM_IOREMAPFREE ( dev_priv->cp_ring, dev ); +DRM_IOREMAPFREE ( dev_priv->ring_rptr, dev ); +DRM_IOREMAPFREE ( dev_priv->buffers, dev ); } else { if (!DRM(ati_pcigart_cleanup)( dev, dev_priv->phys_pci_gart,
drivers/char/drm/tdfx_drv.c +18 -1
@@ -44,13 +44,30 @@#define DRIVER_MINOR 0#define DRIVER_PATCHLEVEL 0 +#ifndef PCI_VENDOR_ID_3DFX +#define PCI_VENDOR_ID_3DFX 0x121A +#endif #ifndef PCI_DEVICE_ID_3DFX_VOODOO5 #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009#endif +#ifndef PCI_DEVICE_ID_3DFX_VOODOO4 +#define PCI_DEVICE_ID_3DFX_VOODOO4 0x0007 +#endif +#ifndef PCI_DEVICE_ID_3DFX_VOODOO3_3000 /* Voodoo3 3000 */ +#define PCI_DEVICE_ID_3DFX_VOODOO3_3000 0x0005 +#endif +#ifndef PCI_DEVICE_ID_3DFX_VOODOO3_2000 /* Voodoo3 3000 */ +#define PCI_DEVICE_ID_3DFX_VOODOO3_2000 0x0004 +#endif +#ifndef PCI_DEVICE_ID_3DFX_BANSHEE +#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 +#endif static drm_pci_list_t DRM (idlist )[] = { {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_BANSHEE }, - {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_VOODOO3 }, + {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_VOODOO3_2000 }, + {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_VOODOO3_3000 }, + {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_VOODOO4 }, {PCI_VENDOR_ID_3DFX ,PCI_DEVICE_ID_3DFX_VOODOO5 }, {0 ,0 } };
drivers/char/drm-4.0/agpsupport.c +10 -18
@@ -193,22 +193,6 @@return drm_unbind_agp (entry->memory); } -#ifdef CONFIG_AGP_PTE_FIXUPS -void *drm_agp_ioremap (unsigned long offset,unsigned long size) -{ -if (drm_agp->ioremap) -return drm_agp->ioremap (offset, size); - -return NULL ; -} - -void drm_agp_iounmap (void *handle) -{ -if (drm_agp->iounmap) - drm_agp->iounmap (handle); -} -#endif /* CONFIG_AGP_PTE_FIXUPS */ -int drm_agp_bind (struct inode *inode,struct file *filp,unsigned int cmd,unsigned long arg) {
@@ -310,11 +294,19 @@case ALI_M1651 : head->chipset ="ALi M1651" ;break ;case SVWRKS_GENERIC : head->chipset ="Serverworks Generic" ;break ; -case SVWRKS_HE : head->chipset ="Serverworks HE" ; -case SVWRKS_LE : head->chipset ="Serverworks LE" ; +case SVWRKS_HE : head->chipset ="Serverworks HE" ;break ; +case SVWRKS_LE : head->chipset ="Serverworks LE" ;break ;default : head->chipset ="Unknown" ;break ; } +#if LINUX_VERSION_CODE <=0x020408 + head->cant_use_aperture =0 ; + head->page_mask = ~(0xfff ); +#else + head->cant_use_aperture = head->agp_info.cant_use_aperture; + head->page_mask = head->agp_info.page_mask; +#endif + DRM_INFO("AGP %d.%d on %s @ 0x%08lx %ZuMB\n", head->agp_info.version.major, head->agp_info.version.minor,
drivers/char/drm-4.0/bufs.c +1 -1
@@ -87,7 +87,7 @@ MTRR_TYPE_WRCOMB, 1); }#endif - map->handle =drm_ioremap (map->offset, map->size); + map->handle =drm_ioremap (map->offset, map->size, dev);break ;
drivers/char/drm-4.0/drm.h +2 -2
@@ -84,7 +84,7 @@#include "i810_drm.h" #include "r128_drm.h" #include "radeon_drm.h" -#ifdef CONFIG_DRM_SIS +#ifdef CONFIG_DRM40_SIS #include "sis_drm.h" #endif
@@ -399,7 +399,7 @@#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( 0x4c, drm_radeon_stipple_t)#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(0x4d, drm_radeon_indirect_t) -#ifdef CONFIG_DRM_SIS +#ifdef CONFIG_DRM40_SIS /* SiS specific ioctls */ #define SIS_IOCTL_FB_ALLOC DRM_IOWR(0x44, drm_sis_mem_t)#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t)
drivers/char/drm-4.0/drmP.h +6 -15
@@ -294,14 +294,6 @@#define DRM_BUFCOUNT (x) ((x)->count - DRM_LEFTCOUNT(x))#define DRM_WAITCOUNT (dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist) -#ifdef CONFIG_AGP_PTE_FIXUPS -# define IOREMAP_SAFE (_x, _y) drm_agp_ioremap(_x, _y) -# define IOUNMAP_SAFE (_x) drm_agp_iounmap(_x) -#else -# define IOREMAP_SAFE (_x, _y) ioremap(_x, _y) -# define IOUNMAP_SAFE (_x) iounmap(_x) -#endif -typedef int drm_ioctl_t (struct inode *inode,struct file *filp,unsigned int cmd,unsigned long arg);
@@ -518,6 +510,8 @@int acquired;unsigned long base;int agp_mtrr; +int cant_use_aperture; + unsigned long page_mask; } drm_agp_head_t;#endif
@@ -686,8 +680,10 @@extern unsigned long drm_alloc_pages (int order,int area);extern void drm_free_pages (unsigned long address,int order,int area); -extern void *drm_ioremap (unsigned long offset,unsigned long size); -extern void drm_ioremapfree (void *pt,unsigned long size); +extern void *drm_ioremap (unsigned long offset,unsigned long size, +drm_device_t *dev); +extern void drm_ioremapfree (void *pt,unsigned long size, +drm_device_t *dev);#if defined(CONFIG_AGP ) || defined(CONFIG_AGP_MODULE )extern agp_memory *drm_alloc_agp (int pages,u32 type);
@@ -838,11 +834,6 @@extern int drm_agp_free_memory (agp_memory *handle);extern int drm_agp_bind_memory (agp_memory *handle,off_t start);extern int drm_agp_unbind_memory (agp_memory *handle); -#ifdef CONFIG_AGP_PTE_FIXUPS -extern void *drm_agp_ioremap (unsigned long offset, -unsigned long size); -extern void drm_agp_iounmap (void *handle); -#endif #endif #endif #endif
drivers/char/drm-4.0/ffb_drv.c +1 -1
@@ -157,7 +157,7 @@switch (map->type) {case _DRM_REGISTERS:case _DRM_FRAME_BUFFER: -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM:
drivers/char/drm-4.0/gamma_drv.c +1 -1
@@ -257,7 +257,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/i810_dma.c +5 -4
@@ -309,7 +309,7 @@if (dev_priv->ring.virtual_start) {drm_ioremapfree ((void *) dev_priv->ring.virtual_start, - dev_priv->ring.Size); + dev_priv->ring.Size, dev); }if (dev_priv->hw_status_page !=0UL ) {i810_free_page (dev, dev_priv->hw_status_page);
@@ -323,7 +323,8 @@for (i =0 ; i < dma->buf_count; i++) {drm_buf_t *buf = dma->buflist[ i ];drm_i810_buf_priv_t *buf_priv = buf->dev_private; -drm_ioremapfree (buf_priv->kernel_virtual, buf->total); +drm_ioremapfree (buf_priv->kernel_virtual, + buf->total, dev); } }return 0 ;
@@ -397,7 +398,7 @@ *buf_priv->in_use =I810_BUF_FREE ; buf_priv->kernel_virtual =drm_ioremap (buf->bus_address, - buf->total); + buf->total, dev); }return 0 ; }
@@ -434,7 +435,7 @@ dev_priv->ring.virtual_start =drm_ioremap (dev->agp->base + init->ring_start, - init->ring_size); + init->ring_size, dev); dev_priv->ring.tail_mask = dev_priv->ring.Size -1 ;
drivers/char/drm-4.0/i810_drv.c +1 -1
@@ -285,7 +285,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/memory.c +43 -5
77 lines not on this page · raw message
drivers/char/drm-4.0/mga_dma.c +13 -4
@@ -308,7 +308,7 @@ temp = ((temp +PAGE_SIZE -1 ) /PAGE_SIZE ) *PAGE_SIZE ; dev_priv->ioremap =drm_ioremap (dev->agp->base + offset, - temp); + temp, dev);if (dev_priv->ioremap =NULL ) {DRM_ERROR ("Ioremap failed\n" );return -ENOMEM ;
@@ -635,7 +635,7 @@ dev_priv->primary_size + PAGE_SIZE - 1) / PAGE_SIZE * PAGE_SIZE; -drm_ioremapfree ((void *) dev_priv->ioremap, temp); +drm_ioremapfree ((void *) dev_priv->ioremap, temp, dev); }if (dev_priv->status_page !=NULL ) {iounmap (dev_priv->status_page);
@@ -741,9 +741,18 @@return -ENOMEM ; } -/* Write status page when secend or softrap occurs */ +/* Write status page when secend or softrap occurs +* +* Disable this on ia64 on the off chance that real status page will be +* above 4GB. +*/ +#if defined(__ia64__)MGA_WRITE (MGAREG_PRIMPTR , -virt_to_bus ((void *)dev_priv->real_status_page) |0 ); +virt_to_bus ((void *)dev_priv->real_status_page)); +#else +MGA_WRITE (MGAREG_PRIMPTR , +virt_to_bus ((void *)dev_priv->real_status_page) |0x00000003 ); +#endif /* Private is now filled in, initialize the hardware */ {
drivers/char/drm-4.0/mga_drv.c +1 -1
@@ -285,7 +285,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/r128_cce.c +12 -11
@@ -86,12 +86,13 @@ }; -#define DO_REMAP (_m) (_m)->handle = drm_ioremap((_m)->offset, (_m)->size) +#define DO_REMAP (_m, _d) (_m)->handle = drm_ioremap((_m)->offset, \ + (_m)->size, (_d)) -#define DO_REMAPFREE (_m) \ +#define DO_REMAPFREE (_m, _d) \ do { \ if ((_m)->handle && (_m)->size) \ - drm_ioremapfree((_m)->handle, (_m)->size); \ + drm_ioremapfree((_m)->handle, (_m)->size, (_d)); \ } while (0)#define DO_FIND_MAP (_m, _o) \
@@ -519,12 +520,12 @@ (drm_r128_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); -DO_REMAP ( dev_priv->cce_ring ); -DO_REMAP ( dev_priv->ring_rptr ); -DO_REMAP ( dev_priv->buffers ); +DO_REMAP ( dev_priv->cce_ring, dev ); +DO_REMAP ( dev_priv->ring_rptr, dev ); +DO_REMAP ( dev_priv->buffers, dev );#if 0 if ( !dev_priv->is_pci ) { -DO_REMAP ( dev_priv->agp_textures ); +DO_REMAP ( dev_priv->agp_textures, dev ); }#endif
@@ -559,12 +560,12 @@if ( dev->dev_private ) {drm_r128_private_t *dev_priv = dev->dev_private; -DO_REMAPFREE ( dev_priv->cce_ring ); -DO_REMAPFREE ( dev_priv->ring_rptr ); -DO_REMAPFREE ( dev_priv->buffers ); +DO_REMAPFREE ( dev_priv->cce_ring, dev ); +DO_REMAPFREE ( dev_priv->ring_rptr, dev ); +DO_REMAPFREE ( dev_priv->buffers, dev );#if 0 if ( !dev_priv->is_pci ) { -DO_REMAPFREE ( dev_priv->agp_textures ); +DO_REMAPFREE ( dev_priv->agp_textures, dev ); }#endif
drivers/char/drm-4.0/r128_drv.c +1 -1
@@ -295,7 +295,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/radeon_cp.c +12 -11
@@ -300,12 +300,13 @@ }; -#define DO_IOREMAP (_m) (_m)->handle = drm_ioremap((_m)->offset, (_m)->size) +#define DO_IOREMAP (_m, _d) (_m)->handle = drm_ioremap((_m)->offset, \ + (_m)->size, (_d)) -#define DO_IOREMAPFREE (_m) \ +#define DO_IOREMAPFREE (_m, _d) \ do { \ if ((_m)->handle && (_m)->size) \ - drm_ioremapfree((_m)->handle, (_m)->size); \ + drm_ioremapfree((_m)->handle, (_m)->size, (_d));\ } while (0)#define DO_FIND_MAP (_m, _o) \
@@ -782,12 +783,12 @@ (drm_radeon_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); -DO_IOREMAP ( dev_priv->cp_ring ); -DO_IOREMAP ( dev_priv->ring_rptr ); -DO_IOREMAP ( dev_priv->buffers ); +DO_IOREMAP ( dev_priv->cp_ring, dev ); +DO_IOREMAP ( dev_priv->ring_rptr, dev ); +DO_IOREMAP ( dev_priv->buffers, dev );#if 0 if ( !dev_priv->is_pci ) { -DO_IOREMAP ( dev_priv->agp_textures ); +DO_IOREMAP ( dev_priv->agp_textures, dev ); }#endif
@@ -853,12 +854,12 @@if ( dev->dev_private ) {drm_radeon_private_t *dev_priv = dev->dev_private; -DO_IOREMAPFREE ( dev_priv->cp_ring ); -DO_IOREMAPFREE ( dev_priv->ring_rptr ); -DO_IOREMAPFREE ( dev_priv->buffers ); +DO_IOREMAPFREE ( dev_priv->cp_ring, dev ); +DO_IOREMAPFREE ( dev_priv->ring_rptr, dev ); +DO_IOREMAPFREE ( dev_priv->buffers, dev );#if 0 if ( !dev_priv->is_pci ) { -DO_IOREMAPFREE ( dev_priv->agp_textures ); +DO_IOREMAPFREE ( dev_priv->agp_textures, dev ); }#endif
drivers/char/drm-4.0/radeon_drv.c +1 -1
@@ -293,7 +293,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/tdfx_drv.c +1 -1
@@ -263,7 +263,7 @@DRM_DEBUG ("mtrr_del = %d\n" , retcode); }#endif -drm_ioremapfree (map->handle, map->size); +drm_ioremapfree (map->handle, map->size, dev);break ;case _DRM_SHM: drm_free_pages((unsigned long)map->handle,
drivers/char/drm-4.0/vm.c +11 -7
@@ -77,6 +77,9 @@/* * Find the right map */ + +if (!dev->agp->cant_use_aperture) goto vm_nopage_error; +for (i =0 ; i < dev->map_count; i++) { map = dev->maplist[i];if (!map)continue ;
@@ -98,12 +101,7 @@break ; } -if (!agpmem) { -/* -* Oops - no memory found -*/ -return NOPAGE_SIGBUS ;/* couldn't find it */ - } +if (!agpmem) goto vm_nopage_error;/* * Get the page, inc the use count, and return it
@@ -120,8 +118,14 @@ page =virt_to_page (__va (paddr));get_page (page); - return page; + +#if LINUX_VERSION_CODE <0x020317 +return page_address (page); +#else +return page; +#endif } +vm_nopage_error:#endif return NOPAGE_SIGBUS ;/* Disallow mremap */ }
drivers/pci/pci.c +4 -4
@@ -1540,10 +1540,10 @@switch (rqst) {case PM_SAVE_STATE : - error =pci_pm_save_state ((u32 )data); + error =pci_pm_save_state ((unsigned long )data);break ;case PM_SUSPEND : - error =pci_pm_suspend ((u32 )data); + error =pci_pm_suspend ((unsigned long )data);break ;case PM_RESUME : error =pci_pm_resume ();
@@ -1860,9 +1860,9 @@int map, block;if ((page =pool_find_page (pool, dma)) =0 ) { -printk (KERN_ERR "pci_pool_free %s/%s, %p/%x (bad dma)\n" , +printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n" , pool->dev ? pool->dev->slot_name :NULL , - pool->name, vaddr, dma); + pool->name, vaddr, (unsigned long ) dma);return ; }#ifdef CONFIG_PCIPOOL_DEBUG
drivers/scsi/qla1280.c +3 -3
@@ -598,9 +598,9 @@ size =sprintf (PROC_BUF ,"SCSI Host Adapter Information: %s\n" , bdp->bdName); len += size; - size =sprintf (PROC_BUF ,"Request Queue = 0x%x, Response Queue = 0x%x\n" , - ha->request_dma, - ha->response_dma); + size =sprintf (PROC_BUF ,"Request Queue = 0x%lx, Response Queue = 0x%lx\n" , + (unsigned long ) ha->request_dma, + (unsigned long ) ha->response_dma); len += size; size = sprintf(PROC_BUF, "Request Queue count= 0x%x, Response Queue count= 0x%x\n", REQUEST_ENTRY_CNT,
drivers/sound/cs4281/cs4281pm-24.c +4 -4
@@ -38,8 +38,8 @@#define CS4281_SUSPEND_TBL cs4281_suspend_tbl #define CS4281_RESUME_TBL cs4281_resume_tbl */ -#define CS4281_SUSPEND_TBL cs4281_null -#define CS4281_RESUME_TBL cs4281_null +#define CS4281_SUSPEND_TBL (int (*) (struct pci_dev *, u32)) cs4281_null +#define CS4281_RESUME_TBL (int (*) (struct pci_dev *)) cs4281_nullint cs4281_pm_callback (struct pm_dev *dev,pm_request_t rqst,void *data) {
@@ -78,7 +78,7 @@ }#else /* CS4281_PM */ -#define CS4281_SUSPEND_TBL cs4281_null -#define CS4281_RESUME_TBL cs4281_null +#define CS4281_SUSPEND_TBL (int (*) (struct pci_dev *, u32)) cs4281_null +#define CS4281_RESUME_TBL (int (*) (struct pci_dev *)) cs4281_null#endif /* CS4281_PM */
drivers/usb/usb-ohci.c +4 -3
@@ -2326,21 +2326,22 @@ {ohci_t * ohci;struct usb_bus * bus; +dma_addr_t bus_addr; ohci = (ohci_t *)kmalloc (sizeof *ohci,GFP_KERNEL );if (!ohci)return NULL ; - +memset (ohci,0 ,sizeof (ohci_t)); - ohci->hcca =pci_alloc_consistent (dev,sizeof *ohci->hcca, - &ohci->hcca_dma); + ohci->hcca =pci_alloc_consistent (dev,sizeof *ohci->hcca, &bus_addr);if (!ohci->hcca) {kfree (ohci);return NULL ; }memset (ohci->hcca,0 ,sizeof (struct ohci_hcca )); + ohci->hcca_dma = bus_addr; ohci->disabled =1 ; ohci->sleeping =0 ; ohci->irq =-1 ;
include/asm-ia64/io.h +2 -1
@@ -43,7 +43,7 @@ }static inline void * -phys_to_virt (unsigned long address) +phys_to_virt (unsigned long address) {return (void *) (address +PAGE_OFFSET ); }
@@ -54,6 +54,7 @@*/ #define bus_to_virt phys_to_virt#define virt_to_bus virt_to_phys +#define page_to_bus page_to_phys# endif /* KERNEL */
include/asm-ia64/page.h +3 -0
@@ -55,12 +55,15 @@#ifdef CONFIG_IA64_GENERIC # include <asm/machvec.h> # define virt_to_page (kaddr) (mem_map + platform_map_nr(kaddr)) +# define page_to_phys (page) XXX fix me#elif defined (CONFIG_IA64_SGI_SN1 )# ifndef CONFIG_DISCONTIGMEM # define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# define page_to_phys (page) XXX fix me# endif #else # define virt_to_page (kaddr) (mem_map + MAP_NR_DENSE(kaddr)) +# define page_to_phys (page) ((page - mem_map) << PAGE_SHIFT)#endif #define VALID_PAGE (page) ((page - mem_map) < max_mapnr)
include/asm-ia64/sigcontext.h +3 -3
@@ -2,13 +2,13 @@#define _ASM_IA64_SIGCONTEXT_H/* -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co +* Copyright (C) 1998, 1999, 2001 David Mosberger-Tang <[email protected]> */ #include <asm/fpu.h> -#define IA64_SC_FLAG_ONSTACK_BIT 1/* is handler running on signal stack? */ +#define IA64_SC_FLAG_ONSTACK_BIT 0/* is handler running on signal stack? */ #define IA64_SC_FLAG_IN_SYSCALL_BIT 1/* did signal interrupt a syscall? */ #define IA64_SC_FLAG_FPH_VALID_BIT 2/* is state in f[32]-f[127] valid? */
include/asm-ia64/user.h +3 -2
@@ -24,11 +24,12 @@* current->start_stack, so we round each of these in order to be able * to write an integer number of pages. * -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co +* Copyright (C) 1998, 1999, 2001 David Mosberger-Tang <[email protected]> */ #include <linux/ptrace.h> +#include <linux/types.h> #include <asm/page.h>
include/linux/agp_backend.h +3 -31
@@ -88,6 +88,8 @@size_t aper_size;int max_memory;/* In pages */ int current_memory; +int cant_use_aperture; +unsigned long page_mask; } agp_kern_info;/*
@@ -110,6 +112,7 @@size_t page_count;int num_scratch_pages;unsigned long *memory; +void *vmptr;off_t pg_start;u32 type;u32 physical;
@@ -240,33 +243,6 @@* */ -#ifdef CONFIG_AGP_PTE_FIXUPS -extern void *agp_ioremap (unsigned long offset,unsigned long size); - -/* -* agp_ioremap: -* -* This function performs a standard ioremap unless offset is -* in the AGP aperture. In this case, a pointer to a portion of -* the vmalloc area is returned. This remapped chunk of the -* vmalloc area is added to the fixup list and consequently kept -* in agreement with GART state. Make this call to ensure that -* ioremaps in the AGP aperture function correctly on chipsets -* needing PTE fixups. -*/ - -extern void agp_iounmap (void *handle); - -/* -* agp_iounmap: -* -* Perform a standard iounmap unless handle is in the vmalloc area. -* In this case, free this portion of vmalloc and remove this map -* from the fixup list. -*/ - -#endif - typedef struct { void (*free_memory)(agp_memory *); agp_memory *(*allocate_memory)(size_t, u32);
@@ -276,10 +252,6 @@int (*acquire)(void );void (*release)(void );void (*copy_info)(agp_kern_info *); -#ifdef CONFIG_AGP_PTE_FIXUPS -void *(*ioremap)(unsigned long ,unsigned long ); -void (*iounmap)(void *); -#endif } drm_agp_t;extern const drm_agp_t *drm_agp_p;
Re: [Linux-ia64] kernel update (relative to 2.4.9)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> The latest IA-64 patch is available at: |> |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ |> |> in file linux-2.4.9-ia64-010820.diff*. |> |> The big news in this patch is a major cleanup of the DRM source |> tree(s) by Chris Ahna. Much of the ia64 specific code has now been |> restructured so it fits much better into the existing framework. This |> should make it a lot easier in getting the changes accepted by the DRM |> maintainers. Other changes:
The new DRM code (CONFIG_DRM_NEW) does not compile:
In file included from gamma_drv.c:92:drm_memory.h: In function `gamma_ioremap':
drm_memory.h:319: structure has no member named agp' drm_memory.h:338: structure has no member named agp'
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.9)
In reply to David MosbergerQuoted 6 lines · Andreas Schwab
The new DRM code (
CONFIG_DRM_NEW) does not compile:In file included from gamma_drv.c:92:
drm_memory.h: In function `gamma_ioremap':
drm_memory.h:319: structure has no member namedagp' drm_memory.h:338: structure has no member namedagp'
Ouch, sorry about that. Patch is appended. David, please apply.
Chris
drivers/char/drm/drm_memory.h +41 -33
@@ -309,6 +309,11 @@void *DRM (ioremap )(unsigned long offset,unsigned long size,drm_device_t *dev) {void *pt; +#if __REALLY_HAVE_AGP +drm_map_t *map =NULL ; +drm_map_list_t *r_list; +struct list_head *list; +#endif if (!size) { DRM_MEM_ERROR(DRM_MEM_MAPPINGS,
@@ -316,52 +321,51 @@return NULL ; } -if (dev->agp->cant_use_aperture =0 ) { +#if __REALLY_HAVE_AGP + if(dev->agp->cant_use_aperture = 0) goto standard_ioremap; - }else { -drm_map_t *map =NULL ; -drm_map_list_t *r_list; -struct list_head *list, *head; - -list_for_each (list, &dev->maplist->head) { - r_list = (drm_map_list_t *)list; - map = r_list->map; -if (!map)continue ; -if (map->offset <= offset && - (map->offset + map->size) >= (offset + size)) + + list_for_each(list, &dev->maplist->head) { + r_list = (drm_map_list_t *)list; + map = r_list->map; + if (!map) continue; + if (map->offset <= offset && + (map->offset + map->size) >= (offset + size)) + break; + } + + if(map && map->type = _DRM_AGP) { + struct drm_agp_mem *agpmem; + + for(agpmem = dev->agp->memory; agpmem; + agpmem = agpmem->next) { + if(agpmem->bound <= offset && + (agpmem->bound + (agpmem->pages + << PAGE_SHIFT)) >= (offset + size)) break; } - -if (map && map->type = _DRM_AGP) { -struct drm_agp_mem *agpmem; - -for (agpmem = dev->agp->memory; agpmem; - agpmem = agpmem->next) { -if (agpmem->bound <= offset && - (agpmem->bound + (agpmem->pages - <<PAGE_SHIFT )) >= (offset + size)) -break ; - } - -if (agpmem =NULL ) - goto standard_ioremap; - - pt = agpmem->memory->vmptr + (offset - agpmem->bound); - goto ioremap_success; - }else { - goto standard_ioremap; - } + + if(agpmem = NULL) + goto ioremap_failure; + + pt = agpmem->memory->vmptr + (offset - agpmem->bound); + goto ioremap_success; } standard_ioremap: +#endif if (!(pt = ioremap(offset, size))) { +#if __REALLY_HAVE_AGP +ioremap_failure: +#endif spin_lock(&DRM(mem_lock)); ++DRM(mem_stats)[DRM_MEM_MAPPINGS].fail_count; spin_unlock(&DRM(mem_lock)); return NULL; } - +#if __REALLY_HAVE_AGP ioremap_success: +#endif spin_lock(&DRM(mem_lock)); ++DRM(mem_stats)[DRM_MEM_MAPPINGS].succeed_count; DRM(mem_stats)[DRM_MEM_MAPPINGS].bytes_allocated += size;
@@ -377,7 +381,11 @@if (!pt)DRM_MEM_ERROR (DRM_MEM_MAPPINGS ,"Attempt to free NULL pointer\n" ); +#if __REALLY_HAVE_AGP else if(dev->agp->cant_use_aperture = 0) +#else + else +#endif iounmap (pt);spin_lock (&DRM (mem_lock));
drivers/char/drm/drm_vm.h +20 -18
@@ -67,11 +67,11 @@ int write_access) #endif { -#if (defined(__alpha__) || defined(__ia64__)) && __REALLY_HAVE_AGP +#if __REALLY_HAVE_AGPdrm_file_t *priv = vma->vm_file->private_data;drm_device_t *dev = priv->dev;drm_map_t *map =NULL ; -drm_map_list_t *r_list; +drm_map_list_t *r_list;struct list_head *list;/*
@@ -122,12 +122,11 @@* There isn't a convenient way to call agp_bridge.unmask_ * memory from here, so hard code it for now. */ -#if defined(__alpha__) - paddr = agpmem->memory->memory[offset] & ~1UL ; -#elif defined(__ia64__) +#if defined(__ia64__) paddr = (agpmem->memory->memory[offset] &0xffffff ) <<12 ; +#else + paddr = agpmem->memory->memory[offset] & dev->agp->page_mask;#endif - page =virt_to_page (__va (paddr));get_page (page);
@@ -515,20 +514,21 @@switch (map->type) {case _DRM_AGP: -#if defined(__alpha__) || defined(__ia64__) -/* -* On Alpha and ia64 we can't talk to bus dma address from -* the CPU, so for memory of type DRM_AGP, we'll deal with -* sorting out the real physical pages and mappings -* in nopage() -*/ - vma->vm_ops = &DRM (vm_ops); - +#if __REALLY_HAVE_AGP +if (dev->agp->cant_use_aperture =1 ) { +/* +* On some systems we can't talk to bus dma address from +* the CPU, so for memory of type DRM_AGP, we'll deal +* with sorting out the real physical pages and mappings +* in nopage() +*/ + vma->vm_ops = &DRM (vm_ops);#if defined(__ia64__) - vma->vm_page_prot =pgprot_writecombine (vma->vm_page_prot); + vma->vm_page_prot +pgprot_writecombine (vma->vm_page_prot);#endif - -break ; + goto mapswitch_out; + }#endif /* fall through to _DRM_FRAME_BUFFER... */ case _DRM_FRAME_BUFFER:
@@ -582,6 +582,9 @@default :return -EINVAL ;/* This should never happen. */ } +#if __REALLY_HAVE_AGP +mapswitch_out: +#endif vma->vm_flags |=VM_LOCKED |VM_SHM ;/* Don't swap */ #if LINUX_VERSION_CODE <0x020203 /* KERNEL_VERSION(2,2,3) */
[Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerHere is a long-awaited kernel update which brings us in sync with 2.4.10. As usual, it's available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.10-ia64-010924.diff*
The major changes this time include:
- Major ia32 subsystem update by yours truly:
- enable use of emulator prefix: for a non-directory file with path PATH, the ia32 subsystem now uses /emul/ia32-linux/PATH if the file exists
- fix a nasty bug which caused ia32 binaries to subtly corrupt page table page (this was the reason "realplay" often crashed on start up, but the bug could affect any process, not just ia32 processes)
- make the address space layout of ia32 tasks match that of a real linux/x86 task; in particular, the stack now starts at 0xc0000000 (and grows towards lower addresses)
- fix emulated mmap() and mprotect() to work when page size is 4K and work better when the page size is larger
- fix emulated ptrace() sys x86 strace() works
- fill in missing system calls (pread, pwrite, sendfile, SuS-compliant getrlimit, mmap2, {,f}truncate64, {,l,f}stat64, 32-bit uid/gid versions of lchown, getuid etc., pivot_root, mincore, madvise, getdents64, fcntl64) and drop some unsupported ones (module related syscalls, vm86, bdflush)
- support signal delivery with SA_RESTORER sigreturn
- don't align shared mmap()s to 1MB---this filled up a 32-bit address space too quickly
with these fixes in place, I'm able to successfully run the ia32 versions of realplay, OpenOffice, mozilla, netscape, acrobat, strace, Intel compilers, etc. But as usual, your mileage may vary.
- update perform to v0.3 (Stephane Eranian)
- SN updates from SGI (just a starter, more to follow...)
- be more consistent about using i-cache prefetches (use .few for branches within a routine, .many otherwise)
- fix alternate stack signal delivery (used to break if the old stack didn't have enough memory to hold the dirty stacked registers); ironically, this fix probably also speeds up this case (it's no longer necessary to do a flushrs...)
- McKinley related I/O SAPIC updates from Alex Williamson
- fix irq bug which caused console keyboard to report timeout when pressing the caps lock key (Richard Hirst)
- fix ptrace race condition (thanks to Shoichi Sakon for providing a test case that reproduced this problem)
- turn on dcr.lc by default
- many sync-ups for 2.4.10 (thanks to KOCHI Takayoshi for sending a timely ACPI update)
I should warn that this kernel has received only moderate testing so far. The remote access server I'm normally using to access a test ia64 machine crashed just shortly before making the patch, so I wasn't able to do my usual round of testing. Having said that, the kernel seems to work fine on a dual Itanium Big Sur, so there is hope. As you know, Linus and co decided to basically rewrite the VM system. As far as I can tell, this hasn't had any negative impact on ia64, but I'd recommend doing a lot of testing before declaring this kernel as ready for prime time.
Oh, and as usual, the patch below is fyi, only. The the full patch for definite answers.
Enjoy,
--david
Documentation/Configure.help +12 -1
@@ -18686,10 +18686,21 @@ so the "DIG-compliant" option is usually the right choice. HP-simulator For the HP simulator (http://software.hp.com/ia64linux/). - SN1-simulator For the SGI SN1 simulator. + SGI-SN1 For SGI SN1 Platforms. + SGI-SN2 For SGI SN2 Platforms. DIG-compliant For DIG ("Developer's Interface Guide") compliant system. If you don't know what to do, choose "generic". + +CONFIG_IA64_SGI_SN_SIM + Build a kernel that runs on both the SGI simulator AND on hardware. + There is a very slight performance penalty on hardware for including this + option. + +CONFIG_IA64_SGI_SN_DEBUG + This enables addition debug code that helps isolate + platform/kernel bugs. There is a small but measurable performance + degradation when this option is enabled. Kernel page size CONFIG_IA64_PAGE_SIZE_4KB
arch/ia64/Makefile +8 -7
@@ -17,7 +17,9 @@ AFLAGS_KERNEL := -mconstant-gp EXTRA -CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 -falign-functions2 +CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 \ + -falign-functions2 --param max-inline-insns@0 +# -ffunction-sections CFLAGS_KERNEL := -mconstant-gp GCC_VERSION=$(shell $(CROSS_COMPILE)$(HOSTCC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
@@ -32,7 +34,7 @@ ifdef CONFIG_IA64_GENERIC CORE_FILES := arch/$(ARCH)/hp/hp.a \ - arch/$(ARCH)/sn/sn.a \ + arch/$(ARCH)/sn/sn.o \ arch/$(ARCH)/dig/dig.a \ arch/$(ARCH)/sn/io/sgiio.o \ $(CORE_FILES)
@@ -52,15 +54,14 @@ $(CORE_FILES) endif -ifdef CONFIG_IA64_SGI_SN1 +ifdef CONFIG_IA64_SGI_SN CFLAGS += -DBRINGUP - SUBDIRS := arch/$(ARCH)/sn/sn1 \ - arch/$(ARCH)/sn \ + SUBDIRS := arch/$(ARCH)/sn/kernel \ arch/$(ARCH)/sn/io \ arch/$(ARCH)/sn/fprom \ $(SUBDIRS) - CORE_FILES := arch/$(ARCH)/sn/sn.a \ - arch/$(ARCH)/sn/io/sgiio.o\ + CORE_FILES := arch/$(ARCH)/sn/kernel/sn.o \ + arch/$(ARCH)/sn/io/sgiio.o \ $(CORE_FILES) endif
arch/ia64/config.in +30 -18
74 lines not on this page · raw message
arch/ia64/defconfig +79 -25
247 lines not on this page · raw message
arch/ia64/ia32/binfmt_elf32.c +60 -85
224 lines not on this page · raw message
arch/ia64/ia32/ia32_entry.S +134 -91
371 lines not on this page · raw message
arch/ia64/ia32/ia32_ioctl.c +6 -5
@@ -36,12 +36,13 @@ _ret; \ }) -#define P (i) ((void *)(long)(i)) +#define P (i) ((void *)(unsigned long)(i))asmlinkage long sys_ioctl (unsigned int fd,unsigned int cmd,unsigned long arg); -asmlinkage long ia32_ioctl (unsigned int fd,unsigned int cmd,unsigned int arg) +asmlinkage long +sys32_ioctl (unsigned int fd,unsigned int cmd,unsigned int arg) {long ret;
@@ -81,7 +82,7 @@if (copy_to_user (P (arg), &ver32,sizeof (ver32)))return -EFAULT ; } -return (ret); +return ret; }case IOCTL_NR (DRM_IOCTL_GET_UNIQUE ):
@@ -202,9 +203,9 @@case IOCTL_NR (I2OHTML ):break ;default : -return (sys_ioctl (fd, cmd, (unsigned long )arg)); +return sys_ioctl (fd, cmd, (unsigned long )arg); }printk ("%x:unimplemented IA32 ioctl system call\n" , cmd); -return (-EINVAL ); +return -EINVAL ; }
arch/ia64/ia32/ia32_ldt.c +6 -4
@@ -16,6 +16,8 @@#include <asm/uaccess.h> #include <asm/ia32.h> +#define P (p) ((void *) (unsigned long) (p)) +/* * read_ldt() is not really atomic - this is not a problem since synchronization of reads * and writes done to the LDT has to be assured by user-space anyway. Writes are atomic,
@@ -101,19 +103,19 @@ } asmlinkage int -sys32_modify_ldt (int func,void *ptr,unsigned int bytecount) +sys32_modify_ldt (int func,unsigned int ptr,unsigned int bytecount) {int ret = -ENOSYS ;switch (func) {case 0 : - ret =read_ldt (ptr, bytecount); + ret =read_ldt (P (ptr), bytecount);break ;case 1 : - ret =write_ldt (ptr, bytecount,1 ); + ret =write_ldt (P (ptr), bytecount,1 );break ;case 0x11 : - ret =write_ldt (ptr, bytecount,0 ); + ret =write_ldt (P (ptr), bytecount,0 );break ; }return ret;
arch/ia64/ia32/ia32_signal.c +300 -266
679 lines not on this page · raw message
arch/ia64/ia32/ia32_support.c +40 -21
102 lines not on this page · raw message
arch/ia64/ia32/sys_ia32.c +1319 -1800
1,180 lines not on this page · raw message
arch/ia64/kernel/entry.S +43 -42
85 lines not on this page · raw message
arch/ia64/kernel/gate.S +51 -25
76 lines not on this page · raw message
arch/ia64/kernel/head.S +21 -20
41 lines not on this page · raw message
arch/ia64/kernel/iosapic.c +67 -2
69 lines not on this page · raw message
arch/ia64/kernel/irq.c +184 -50
234 lines not on this page · raw message
arch/ia64/kernel/mca.c +28 -28
56 lines not on this page · raw message
arch/ia64/kernel/perfmon.c +706 -390
1,096 lines not on this page · raw message
arch/ia64/kernel/sys_ia64.c +27 -18
45 lines not on this page · raw message
arch/ia64/kernel/traps.c +53 -18
71 lines not on this page · raw message
arch/ia64/lib/copy_user.S +66 -70
136 lines not on this page · raw message
arch/ia64/mm/fault.c +28 -14
42 lines not on this page · raw message
drivers/acpi/acpiconf.c +57 -52
109 lines not on this page · raw message
drivers/acpi/os.c +130 -46
176 lines not on this page · raw message
drivers/acpi/osconf.c +78 -113
191 lines not on this page · raw message
drivers/acpi/osconf.h +15 -42
57 lines not on this page · raw message
drivers/char/agp/agpgart_be.c +628 -4
632 lines not on this page · raw message
drivers/char/drm/drm_memory.h +41 -33
74 lines not on this page · raw message
drivers/char/drm/drm_vm.h +32 -12
44 lines not on this page · raw message
include/asm-ia64/ia32.h +42 -5
47 lines not on this page · raw message
include/asm-ia64/pal.h +232 -231
463 lines not on this page · raw message
include/asm-ia64/processor.h +33 -27
60 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
[Linux-ia64] kernel update (relative to 2.4.10)
In reply to David Mosberger[Argh, the linux-ia64 mailer didn't like the original mail because
the patch was too big. Here follows the same without patch...]
Here is a long-awaited kernel update which brings us in sync with 2.4.10. As usual, it's available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.10-ia64-010924.diff*
The major changes this time include:
- Major ia32 subsystem update by yours truly:
- enable use of emulator prefix: for a non-directory file with path PATH, the ia32 subsystem now uses /emul/ia32-linux/PATH if the file exists
- fix a nasty bug which caused ia32 binaries to subtly corrupt page table page (this was the reason "realplay" often crashed on start up, but the bug could affect any process, not just ia32 processes)
- make the address space layout of ia32 tasks match that of a real linux/x86 task; in particular, the stack now starts at 0xc0000000 (and grows towards lower addresses)
- fix emulated mmap() and mprotect() to work when page size is 4K and work better when the page size is larger
- fix emulated ptrace() sys x86 strace() works
- fill in missing system calls (pread, pwrite, sendfile, SuS-compliant getrlimit, mmap2, {,f}truncate64, {,l,f}stat64, 32-bit uid/gid versions of lchown, getuid etc., pivot_root, mincore, madvise, getdents64, fcntl64) and drop some unsupported ones (module related syscalls, vm86, bdflush)
- support signal delivery with SA_RESTORER sigreturn
- don't align shared mmap()s to 1MB---this filled up a 32-bit address space too quickly
with these fixes in place, I'm able to successfully run the ia32 versions of realplay, OpenOffice, mozilla, netscape, acrobat, strace, Intel compilers, etc. But as usual, your mileage may vary.
- update perform to v0.3 (Stephane Eranian)
- SN updates from SGI (just a starter, more to follow...)
- be more consistent about using i-cache prefetches (use .few for branches within a routine, .many otherwise)
- fix alternate stack signal delivery (used to break if the old stack didn't have enough memory to hold the dirty stacked registers); ironically, this fix probably also speeds up this case (it's no longer necessary to do a flushrs...)
- McKinley related I/O SAPIC updates from Alex Williamson
- fix irq bug which caused console keyboard to report timeout when pressing the caps lock key (Richard Hirst)
- fix ptrace race condition (thanks to Shoichi Sakon for providing a test case that reproduced this problem)
- turn on dcr.lc by default
- many sync-ups for 2.4.10 (thanks to KOCHI Takayoshi for sending a timely ACPI update)
I should warn that this kernel has received only moderate testing so far. The remote access server I'm normally using to access a test ia64 machine crashed just shortly before making the patch, so I wasn't able to do my usual round of testing. Having said that, the kernel seems to work fine on a dual Itanium Big Sur, so there is hope. As you know, Linus and co decided to basically rewrite the VM system. As far as I can tell, this hasn't had any negative impact on ia64, but I'd recommend doing a lot of testing before declaring this kernel as ready for prime time.
Oh, and as usual, the patch below is fyi, only. The the full patch for definite answers.
Enjoy,
--david
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> Here is a long-awaited kernel update which brings us in sync with |> 2.4.10. As usual, it's available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file: |> |> linux-2.4.10-ia64-010924.diff*
The kernel does not compile with CONFIG_SMP=n and CONFIG_MODVERSIONS=n:
dec_and_lock.c:29: parse error before `1'
dec_and_lock.c:29: parse error before `atomic'
dec_and_lock.c:29: warning: type defaults to int' in declaration of _v' dec_and_lock.c:29: parse error before `atomic'
dec_and_lock.c:29: parse error before `switch'
dec_and_lock.c:32: atomic' undeclared here (not in a function) dec_and_lock.c:32: warning: type defaults to int' in declaration of _v' dec_and_lock.c:32: redefinition of _v'
dec_and_lock.c:29: `_v' previously defined here
dec_and_lock.c:32: atomic' undeclared here (not in a function) dec_and_lock.c:32: parse error before switch'
dec_and_lock.c:38: atomic_dec_and_lock' undeclared here (not in a function) dec_and_lock.c:38: initializer element is not constant dec_and_lock.c:38: (near initialization for __ksymtab_atomic_dec_and_lock.value')
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something [email protected] completely different." SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> [Argh, the linux-ia64 mailer didn't like the original mail because |> the patch was too big. Here follows the same without patch...] |> |> Here is a long-awaited kernel update which brings us in sync with |> 2.4.10. As usual, it's available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file: |> |> linux-2.4.10-ia64-010924.diff*
CONFIG_DISABLE_VHPT=y seems to be broken (does not boot). How about removing it, since we don't support anything below B3 anyway?
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something [email protected] completely different." SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> Here is a long-awaited kernel update which brings us in sync with |> 2.4.10. As usual, it's available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file: |> |> linux-2.4.10-ia64-010924.diff*
This patch is needed to get the DRM code to compile:
drivers/char/drm/drmP.h +2 -2
@@ -366,10 +366,10 @@if (len >DRM_PROC_LIMIT ) { ret; *eof =1 ;return len - offset; }/* Mapping helper macros */ -#define DRM_IOREMAP (map) \ +#define DRM_IOREMAP (map, dev) \ (map)->handle = DRM(ioremap)( (map)->offset, (map)->size, (dev) ) -#define DRM_IOREMAPFREE (map) \ +#define DRM_IOREMAPFREE (map, dev) \ do { \ if ( (map)->handle && (map)->size ) \ DRM(ioremapfree)( (map)->handle, (map)->size, (dev) ); \
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something [email protected] completely different." SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> CONFIG_DISABLE_VHPT=y seems to be broken (does not boot). Andreas> How about removing it, since we don't support anything Andreas> below B3 anyway?
It's a debugging & performance evaluation feature, so I have no plans to remove it. It is listed under the "Kernel debugging" section, so I think we can leave it there, even if it's broken at the moment.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> David Mosberger <[email protected]> writes:
Andreas> |> Here is a long-awaited kernel update which brings us in sync with Andreas> |> 2.4.10. As usual, it's available at Andreas> |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file: Andreas> |> Andreas> |> linux-2.4.10-ia64-010924.diff*
Andreas> This patch is needed to get the DRM code to compile:
Thanks.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerSome of us are still using gcc 2.96 which does not support --param max-inline-insns.
Index: 10.15/arch/ia64/Makefile
arch/ia64/Makefile Thu, 27 Sep 2001 14:42:23 +1000 kaos (linux-2.4/s/c/42_Makefile 1.1.3.1.2.4 644) renamed from arch/ia64/Makefile Thu, 27 Sep 2001 14:15:19 +1000 kaos (linux-2.4/s/c/42_Makefile 1.1.3.1.3.3 644) +4 -3
@@ -17,9 +17,10 @@ LINKFLAGS = -static -T arch/$(ARCH)/vmli AFLAGS_KERNEL := -mconstant-gp EXTRA -CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 \ - -falign-functions2 --param max-inline-insns@0 -# -ffunction-sections +CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 -falign-functions2 + +CFLAGS += $(shell if $(CC) --param max-inline-insns@0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "--param max-inline-insns@0"; fi) + CFLAGS_KERNEL := -mconstant-gp GCC_VERSION=$(shell $(CROSS_COMPILE)$(HOSTCC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> Some of us are still using gcc 2.96 which does not support Keith> --param max-inline-insns.
Oh, I didn't realize this option was added for gcc 3.x. It certainly wasn't my intention to break compilation with gcc 2.96. Anyhow, I fixed this now in my tree as well (note: option -frename-registers is already gcc 3.x specific, so there is no need to introduce yet another test for gcc 3).
Thanks,
--david
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David Mosberger2.4.10-ia64-010924 incorrectly patches include/asm-alpha/processor.h and include/asm-i386/processor.h, partially duplicating code that is already in Linus's tree. Completely delete those sections of the 2.4.10-ia64-010924 patch.
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David Mosberger2.4.10-ia64-010924 patches drivers/acpi/Makefile to add driver.o to a list of objects. That is no longer required, Linus's tree already has the required code a couple of lines below.
[Linux-ia64] kernel update (relative to 2.4.11)
In reply to David MosbergerAn updated ia64 patch for 2.4.11 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.11-ia64-011010.diff*
There are no major changes. The patch adds mostly a couple of bug fixes, addition of the gettid() system call introduced by 2.4.11, and the FPSWA control from Jesse Barnes.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.11)
In reply to David Mosberger-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Content-Type: text/plain; charset=us-ascii
Quoted 4 lines · David Mosberger
An updated ia64 patch for 2.4.11 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.11-ia64-011010.diff*
kdb v1.9-2.4.11-ia64-011010 is available in ftp://oss.sgi.com/projects/kdb/download/ia64, no major changes from 2.4.10-ia64-010924.
bfd.h and ansidecl.h are now included as part of the kdb patch instead of assuming that they exist in /usr/include, the kdb Makefiles have been changed accordingly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999
iD8DBQE7xSKci4UHNye0ZOoRAp7hAKCuyj149d93N4rQL61UMAy2IVPKUwCg+FTM z9Owfl+Q0yxyp11KovUUYhc=9Xx/
-----END PGP SIGNATURE-----
[Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerAn updated ia64 patch for 2.4.13 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.11-ia64-011010.diff*
change log:
- support readahead() syscall added by 2.4.13 (both for ia64 and ia32)
- console log level fix by Jesper Juhl
- half-hearted attempt add supporting reading of "default LDT entry" in ia32 modify_ldt() syscall; someone who understands what this is supposed to do should take a look at this...
- palinfo update by Stephane Eranian
- die() fix by Keith Owens
- unaligned handler fix for rotating fp regs by Tony Luck
- ACPI fix to get AGP bus scanned again by Chris Ahna
- implementation ia64 version of wbinvd() for ACPI; this hasn't been tested and may not work; shouldn't be an issue at the moment as this is needed only for ACPI functionality that is not supported on Itanium; still someone who knows ACPI better may want to take a look at this
- update PCI DMA interface to support page-based mapping/unmapping and the optional DAC interface
This kernel has been tested with gcc-3.0 on Big Sur, Lion, and HP simulator. Both UP and MP seem to compile fine. As usual, your mileage may vary.
Enjoy,
--david
Documentation/Configure.help +47 -48
@@ -2632,6 +2632,16 @@ the GLX component for XFree86 3.3.6, which can be downloaded from http://utah-glx.sourceforge.net/ . +Intel 460GX support +CONFIG_AGP_I460 + This option gives you AGP support for the Intel 460GX chipset. This + chipset, the first to support Intel Itanium processors, is new and + this option is correspondingly a little experimental. + + If you don't have a 460GX based machine (such as BigSur) with an AGP + slot then this option isn't going to do you much good. If you're + dying to do Direct Rendering on IA-64, this is what you're looking for. + Intel I810/I810 DC100/I810e support CONFIG_AGP_I810 This option gives you AGP support for the Xserver on the Intel 810,
@@ -12846,6 +12856,18 @@ Say Y here if you would like to be able to read the hard disk partition table format used by SGI machines. +Intel EFI GUID partition support +CONFIG_EFI_PARTITION + Say Y here if you would like to use hard disks under Linux which + were partitioned using EFI GPT. Presently only useful on the + IA-64 platform. + +/dev/guid support (EXPERIMENTAL) +CONFIG_DEVFS_GUID + Say Y here if you would like to access disks and partitions by + their Globally Unique Identifiers (GUIDs) which will appear as + symbolic links in /dev/guid. + Ultrix partition support CONFIG_ULTRIX_PARTITION Say Y here if you would like to be able to read the hard disk
@@ -18964,11 +18986,22 @@ so the "DIG-compliant" option is usually the right choice. HP-simulator For the HP simulator (http://software.hp.com/ia64linux/). - SN1-simulator For the SGI SN1 simulator. + SGI-SN1 For SGI SN1 Platforms. + SGI-SN2 For SGI SN2 Platforms. DIG-compliant For DIG ("Developer's Interface Guide") compliant system. If you don't know what to do, choose "generic". +CONFIG_IA64_SGI_SN_SIM + Build a kernel that runs on both the SGI simulator AND on hardware. + There is a very slight performance penalty on hardware for including this + option. + +CONFIG_IA64_SGI_SN_DEBUG + This enables addition debug code that helps isolate + platform/kernel bugs. There is a small but measurable performance + degradation when this option is enabled. + Kernel page size CONFIG_IA64_PAGE_SIZE_4KB
@@ -18986,56 +19019,13 @@ If you don't know what to do, choose 8KB. -Enable Itanium A-step specific code -CONFIG_ITANIUM_ASTEP_SPECIFIC - Select this option to build a kernel for an Itanium prototype system - with an A-step CPU. You have an A-step CPU if the "revision" field in - /proc/cpuinfo is 0. - Enable Itanium B-step specific code CONFIG_ITANIUM_BSTEP_SPECIFIC Select this option to build a kernel for an Itanium prototype system - with a B-step CPU. You have a B-step CPU if the "revision" field in - /proc/cpuinfo has a value in the range from 1 to 4. - -Enable Itanium B0-step specific code -CONFIG_ITANIUM_B0_SPECIFIC - Select this option to bild a kernel for an Itanium prototype system - with a B0-step CPU. You have a B0-step CPU if the "revision" field in - /proc/cpuinfo is 1. - -Force interrupt redirection -CONFIG_IA64_HAVE_IRQREDIR - Select this option if you know that your system has the ability to - redirect interrupts to different CPUs. Select N here if you're - unsure. - -Enable use of global TLB purge instruction (ptc.g) -CONFIG_ITANIUM_PTCG - Say Y here if you want the kernel to use the IA-64 "ptc.g" - instruction to flush the TLB on all CPUs. Select N here if - you're unsure. - -Enable SoftSDV hacks -CONFIG_IA64_SOFTSDV_HACKS - Say Y here to enable hacks to make the kernel work on the Intel - SoftSDV simulator. Select N here if you're unsure. - -Enable AzusA hacks -CONFIG_IA64_AZUSA_HACKS - Say Y here to enable hacks to make the kernel work on the NEC - AzusA platform. Select N here if you're unsure. - -Force socket buffers below 4GB? -CONFIG_SKB_BELOW_4GB - Most of today's network interface cards (NICs) support DMA to - the low 32 bits of the address space only. On machines with - more then 4GB of memory, this can cause the system to slow - down if there is no I/O TLB hardware. Turning this option on - avoids the slow-down by forcing socket buffers to be allocated - from memory below 4GB. The downside is that your system could - run out of memory below 4GB before all memory has been used up. - If you're unsure how to answer this question, answer Y. + with a B-step CPU. Only B3 step CPUs are supported. You have a B3-step + CPU if the "revision" field in /proc/cpuinfo is equal to 4. If the + "revision" field shows a number bigger than 4, you do not have to turn + on this option. Enable IA-64 Machine Check Abort CONFIG_IA64_MCA
@@ -19055,6 +19045,15 @@ Layer) information in /proc/pal. This contains useful information about the processors in your systems, such as cache and TLB sizes and the PAL firmware version in use. + + To use this option, you have to check that the "/proc file system + support" (CONFIG_PROC_FS) is enabled, too. + +/proc/efi/vars support +CONFIG_EFI_VARS + If you say Y here, you are able to get EFI (Extensible Firmware + Interface) variable information in /proc/efi/vars. You may read, + write, create, and destroy EFI variables through this interface. To use this option, you have to check that the "/proc file system support" (CONFIG_PROC_FS) is enabled, too.
Documentation/kernel-parameters.txt +4 -0
@@ -17,6 +17,7 @@ CD Appropriate CD support is enabled. DEVFS devfs support is enabled. DRM Direct Rendering Management support is enabled. + EFI EFI Partitioning (GPT) is enabled EIDE EIDE/ATAPI support is enabled. FB The frame buffer device is enabled. HW Appropriate hardware is enabled.
@@ -211,6 +212,9 @@ gc_3= [HW,JOY] gdth= [HW,SCSI] + + gpt [EFI] Forces disk with valid GPT signature but + invalid Protective MBR to be treated as GPT. gscd= [HW,CD]
Makefile +6 -5
@@ -88,7 +88,7 @@ CPPFLAGS := -D__KERNEL__ -I$(HPATH) -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -g -O2 \ -fomit-frame-pointer -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
@@ -137,7 +137,8 @@ drivers/net/net.o \ drivers/media/media.o DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o -DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o +DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o +DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
@@ -241,14 +242,14 @@ include arch/$(ARCH)/Makefile -export CPPFLAGS CFLAGS AFLAGS +export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS .S.s: - $(CPP) $(AFLAGS) -traditional -o $*.s $< + $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $< .S.o: - $(CC) $(AFLAGS) -traditional -c -o $*.o $< + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $< Version: dummy @rm -f include/linux/compile.h
arch/i386/lib/usercopy.c +2 -0
@@ -14,6 +14,7 @@unsigned long __generic_copy_to_user (void *to,const void *from,unsigned long n) { +prefetch (from);if (access_ok (VERIFY_WRITE , to, n)) {if (n<512 )
@@ -27,6 +28,7 @@unsigned long __generic_copy_from_user (void *to,const void *from,unsigned long n) { +prefetchw (to);if (access_ok (VERIFY_READ , from, n)) {if (n<512 )
arch/i386/mm/fault.c +0 -2
@@ -27,8 +27,6 @@extern void die (const char *,struct pt_regs *,long ); -extern int console_loglevel; -/* * Ugly, ugly, but the goto's result in better assembly.. */
arch/ia64/Makefile +10 -9
@@ -17,13 +17,15 @@ AFLAGS_KERNEL := -mconstant-gp EXTRA -CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 -falign-functions2 +CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 \ + -falign-functions2 +# -ffunction-sections CFLAGS_KERNEL := -mconstant-gp GCC_VERSION=$(shell $(CROSS_COMPILE)$(HOSTCC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') ifneq ($(GCC_VERSION),2) - CFLAGS += -frename-registers + CFLAGS += -frename-registers --param max-inline-insns@0 endif ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
@@ -32,7 +34,7 @@ ifdef CONFIG_IA64_GENERIC CORE_FILES := arch/$(ARCH)/hp/hp.a \ - arch/$(ARCH)/sn/sn.a \ + arch/$(ARCH)/sn/sn.o \ arch/$(ARCH)/dig/dig.a \ arch/$(ARCH)/sn/io/sgiio.o \ $(CORE_FILES)
@@ -52,15 +54,14 @@ $(CORE_FILES) endif -ifdef CONFIG_IA64_SGI_SN1 +ifdef CONFIG_IA64_SGI_SN CFLAGS += -DBRINGUP - SUBDIRS := arch/$(ARCH)/sn/sn1 \ - arch/$(ARCH)/sn \ + SUBDIRS := arch/$(ARCH)/sn/kernel \ arch/$(ARCH)/sn/io \ arch/$(ARCH)/sn/fprom \ $(SUBDIRS) - CORE_FILES := arch/$(ARCH)/sn/sn.a \ - arch/$(ARCH)/sn/io/sgiio.o\ + CORE_FILES := arch/$(ARCH)/sn/kernel/sn.o \ + arch/$(ARCH)/sn/io/sgiio.o \ $(CORE_FILES) endif
@@ -105,7 +106,7 @@ compressed: vmlinux $(OBJCOPY) --strip-all vmlinux vmlinux-tmp - gzip -9 vmlinux-tmp + gzip vmlinux-tmp mv vmlinux-tmp.gz vmlinux.gz rawboot:
arch/ia64/config.in +30 -44
122 lines not on this page · raw message
arch/ia64/defconfig +631 -70
875 lines not on this page · raw message
arch/ia64/ia32/binfmt_elf32.c +66 -104
245 lines not on this page · raw message
arch/ia64/ia32/ia32_entry.S +172 -111
424 lines not on this page · raw message
arch/ia64/ia32/ia32_ioctl.c +191 -164
384 lines not on this page · raw message
arch/ia64/ia32/ia32_ldt.c +33 -6
@@ -1,6 +1,6 @@/* * Copyright (C) 2001 Hewlett-Packard Co -* Copyright (C) 2001 David Mosberger-Tang <[email protected]> +* David Mosberger-Tang <[email protected]> * * Adapted from arch/i386/kernel/ldt.c */
@@ -16,6 +16,8 @@#include <asm/uaccess.h> #include <asm/ia32.h> +#define P (p) ((void *) (unsigned long) (p)) +/* * read_ldt() is not really atomic - this is not a problem since synchronization of reads * and writes done to the LDT has to be assured by user-space anyway. Writes are atomic,
@@ -58,10 +60,30 @@ }static int +read_default_ldt (void * ptr,unsigned long bytecount) +{ +unsigned long size; +int err; + +/* XXX fix me: should return equivalent of default_ldt[0] */ + err =0 ; + size =8 ; +if (size > bytecount) + size = bytecount; + + err = size; +if (clear_user (ptr, size)) + err = -EFAULT ; + +return err; +} + +static int write_ldt (void * ptr,unsigned long bytecount,int oldmode) {struct ia32_modify_ldt_ldt_s ldt_info;__u64 entry; +int ret;if (bytecount !=sizeof (ldt_info))return -EINVAL ;
@@ -97,23 +119,28 @@* memory, but we still need to guard against out-of-memory, hence we must use * put_user(). */ -return __put_user (entry, (__u64 *)IA32_LDT_OFFSET + ldt_info.entry_number); + ret =__put_user (entry, (__u64 *)IA32_LDT_OFFSET + ldt_info.entry_number); +ia32_load_segment_descriptors (current); +return ret; } asmlinkage int -sys32_modify_ldt (int func,void *ptr,unsigned int bytecount) +sys32_modify_ldt (int func,unsigned int ptr,unsigned int bytecount) {int ret = -ENOSYS ;switch (func) {case 0 : - ret =read_ldt (ptr, bytecount); + ret =read_ldt (P (ptr), bytecount);break ;case 1 : - ret =write_ldt (ptr, bytecount,1 ); + ret =write_ldt (P (ptr), bytecount,1 ); +break ; +case 2 : + ret =read_default_ldt (P (ptr), bytecount);break ;case 0x11 : - ret =write_ldt (ptr, bytecount,0 ); + ret =write_ldt (P (ptr), bytecount,0 );break ; }return ret;
arch/ia64/ia32/ia32_signal.c +560 -307
617 lines not on this page · raw message
arch/ia64/ia32/ia32_support.c +84 -25
109 lines not on this page · raw message
arch/ia64/ia32/sys_ia32.c +1951 -2625
4,576 lines not on this page · raw message
arch/ia64/kernel/acpi.c +149 -21
170 lines not on this page · raw message
arch/ia64/kernel/entry.S +54 -61
115 lines not on this page · raw message
arch/ia64/kernel/fw-emu.c +37 -5
42 lines not on this page · raw message
arch/ia64/kernel/gate.S +51 -25
76 lines not on this page · raw message
arch/ia64/kernel/head.S +24 -26
50 lines not on this page · raw message
arch/ia64/kernel/iosapic.c +127 -2
129 lines not on this page · raw message
arch/ia64/kernel/irq.c +184 -50
234 lines not on this page · raw message
arch/ia64/kernel/ivt.S +30 -48
78 lines not on this page · raw message
arch/ia64/kernel/mca.c +1269 -373
1,642 lines not on this page · raw message
arch/ia64/kernel/mca_asm.S +54 -80
134 lines not on this page · raw message
arch/ia64/kernel/pci.c +44 -0
44 lines not on this page · raw message
arch/ia64/kernel/perfmon.c +729 -388
1,117 lines not on this page · raw message
arch/ia64/kernel/process.c +46 -5
51 lines not on this page · raw message
arch/ia64/kernel/smp.c +8 -108
116 lines not on this page · raw message
arch/ia64/kernel/sys_ia64.c +27 -18
45 lines not on this page · raw message
arch/ia64/kernel/traps.c +86 -37
123 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +42 -18
60 lines not on this page · raw message
arch/ia64/lib/copy_user.S +66 -70
136 lines not on this page · raw message
arch/ia64/mm/fault.c +28 -14
42 lines not on this page · raw message
arch/ia64/mm/tlb.c +25 -96
121 lines not on this page · raw message
drivers/acpi/acpiconf.c +593 -0
593 lines not on this page · raw message
drivers/acpi/acpiconf.h +63 -0
63 lines not on this page · raw message
drivers/acpi/os.c +152 -12
164 lines not on this page · raw message
drivers/acpi/osconf.c +286 -0
286 lines not on this page · raw message
drivers/acpi/osconf.h +57 -0
57 lines not on this page · raw message
drivers/acpi/utilities/uteval.c +87 -0
87 lines not on this page · raw message
drivers/char/agp/agpgart_be.c +771 -28
799 lines not on this page · raw message
drivers/char/drm/drm_memory.h +50 -2
52 lines not on this page · raw message
drivers/char/drm/drm_vm.h +32 -15
47 lines not on this page · raw message
drivers/char/drm/r128_cce.c +64 -7
71 lines not on this page · raw message
drivers/char/drm/radeon_cp.c +48 -7
55 lines not on this page · raw message
drivers/char/drm-4.0/Makefile +104 -0
104 lines not on this page · raw message
drivers/char/drm-4.0/README.drm +46 -0
46 lines not on this page · raw message
drivers/char/drm-4.0/agpsupport.c +349 -0
349 lines not on this page · raw message
drivers/char/drm-4.0/auth.c +162 -0
162 lines not on this page · raw message
drivers/char/drm-4.0/bufs.c +543 -0
543 lines not on this page · raw message
drivers/char/drm-4.0/context.c +321 -0
321 lines not on this page · raw message
drivers/char/drm-4.0/ctxbitmap.c +85 -0
85 lines not on this page · raw message
drivers/char/drm-4.0/dma.c +546 -0
546 lines not on this page · raw message
drivers/char/drm-4.0/drawable.c +51 -0
51 lines not on this page · raw message
drivers/char/drm-4.0/drm.h +414 -0
414 lines not on this page · raw message
drivers/char/drm-4.0/drmP.h +839 -0
839 lines not on this page · raw message
drivers/char/drm-4.0/ffb_context.c +540 -0
540 lines not on this page · raw message
drivers/char/drm-4.0/ffb_drv.c +951 -0
951 lines not on this page · raw message
drivers/char/drm-4.0/ffb_drv.h +276 -0
276 lines not on this page · raw message
drivers/char/drm-4.0/fops.c +253 -0
253 lines not on this page · raw message
drivers/char/drm-4.0/gamma_dma.c +836 -0
836 lines not on this page · raw message
drivers/char/drm-4.0/gamma_drv.c +571 -0
571 lines not on this page · raw message
drivers/char/drm-4.0/gamma_drv.h +58 -0
58 lines not on this page · raw message
drivers/char/drm-4.0/i810_bufs.c +339 -0
339 lines not on this page · raw message
drivers/char/drm-4.0/i810_context.c +212 -0
212 lines not on this page · raw message
drivers/char/drm-4.0/i810_dma.c +1438 -0
1,438 lines not on this page · raw message
drivers/char/drm-4.0/i810_drm.h +194 -0
194 lines not on this page · raw message
drivers/char/drm-4.0/i810_drv.c +648 -0
648 lines not on this page · raw message
drivers/char/drm-4.0/i810_drv.h +225 -0
225 lines not on this page · raw message
drivers/char/drm-4.0/init.c +113 -0
113 lines not on this page · raw message
drivers/char/drm-4.0/ioctl.c +99 -0
99 lines not on this page · raw message
drivers/char/drm-4.0/lists.c +218 -0
218 lines not on this page · raw message
drivers/char/drm-4.0/lock.c +252 -0
252 lines not on this page · raw message
drivers/char/drm-4.0/memory.c +486 -0
486 lines not on this page · raw message
drivers/char/drm-4.0/mga_bufs.c +629 -0
629 lines not on this page · raw message
drivers/char/drm-4.0/mga_context.c +209 -0
209 lines not on this page · raw message
drivers/char/drm-4.0/mga_dma.c +168 -0
168 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
[Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerAn updated ia64 patch for 2.4.13 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.11-ia64-011010.diff*
change log:
- support readahead() syscall added by 2.4.13 (both for ia64 and ia32)
- console log level fix by Jesper Juhl
- half-hearted attempt add supporting reading of "default LDT entry" in ia32 modify_ldt() syscall; someone who understands what this is supposed to do should take a look at this...
- palinfo update by Stephane Eranian
- die() fix by Keith Owens
- unaligned handler fix for rotating fp regs by Tony Luck
- ACPI fix to get AGP bus scanned again by Chris Ahna
- implementation ia64 version of wbinvd() for ACPI; this hasn't been tested and may not work; shouldn't be an issue at the moment as this is needed only for ACPI functionality that is not supported on Itanium; still someone who knows ACPI better may want to take a look at this
- update PCI DMA interface to support page-based mapping/unmapping and the optional DAC interface
This kernel has been tested with gcc-3.0 on Big Sur, Lion, and HP simulator. Both UP and MP seem to compile fine. As usual, your mileage may vary.
Enjoy,
--david
arch/i386/mm/fault.c +0 -2
@@ -27,8 +27,6 @@extern void die (const char *,struct pt_regs *,long ); -extern int console_loglevel; -/* * Ugly, ugly, but the goto's result in better assembly.. */
arch/ia64/ia32/ia32_entry.S +1 -1
@@ -400,7 +400,7 @@ data8 sys_ni_syscall /* reserved for TUX */ data8 sys_ni_syscall /* reserved for Security */ data8 sys_gettid - data8 sys_ni_syscall /* 225 */ + data8 sys_readahead /* 225 */ data8 sys_ni_syscall data8 sys_ni_syscall data8 sys_ni_syscall
arch/ia64/ia32/ia32_ldt.c +23 -1
@@ -1,6 +1,6 @@/* * Copyright (C) 2001 Hewlett-Packard Co -* Copyright (C) 2001 David Mosberger-Tang <[email protected]> +* David Mosberger-Tang <[email protected]> * * Adapted from arch/i386/kernel/ldt.c */
@@ -60,6 +60,25 @@ }static int +read_default_ldt (void * ptr,unsigned long bytecount) +{ +unsigned long size; +int err; + +/* XXX fix me: should return equivalent of default_ldt[0] */ + err =0 ; + size =8 ; +if (size > bytecount) + size = bytecount; + + err = size; +if (clear_user (ptr, size)) + err = -EFAULT ; + +return err; +} + +static int write_ldt (void * ptr,unsigned long bytecount,int oldmode) {struct ia32_modify_ldt_ldt_s ldt_info;
@@ -116,6 +135,9 @@break ;case 1 : ret =write_ldt (P (ptr), bytecount,1 ); +break ; +case 2 : + ret =read_default_ldt (P (ptr), bytecount);break ;case 0x11 : ret =write_ldt (P (ptr), bytecount,0 );
arch/ia64/kernel/entry.S +3 -3
@@ -4,7 +4,7 @@ * Kernel entry points. * * Copyright (C) 1998-2001 Hewlett-Packard Co - * Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> + * David Mosberger-Tang <[email protected]> * Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond <[email protected]> * Copyright (C) 1999 Asit Mallick <[email protected]>
@@ -15,7 +15,7 @@ * kernel stack. This allows us to handle interrupts without changing * to physical mode. * - * Jonathan Nickin <[email protected]> + * Jonathan Nicklin <[email protected]> * Patrick O'Rourke <[email protected]> * 11/07/2000 /
@@ -1130,7 +1130,7 @@ data8 sys_clone2 data8 sys_getdents64 data8 sys_getunwind // 1215 - data8 ia64_ni_syscall + data8 sys_readahead data8 ia64_ni_syscall data8 ia64_ni_syscall data8 ia64_ni_syscall
arch/ia64/kernel/fw-emu.c +37 -0
@@ -174,6 +174,43 @@" ;;\n" " mov ar.lc=r9\n" " mov r8=r0\n" +" ;;\n" +"1: cmp.eq p6,p7,r28 /* PAL_PERF_MON_INFO */\n" +"(p7) br.cond.sptk.few 1f\n" +" mov r8=0 /* status = 0 */\n" +" movl r9 =0x12082004 /* generic=4 width2 retired=8 cycles */\n" +" mov r10=0 /* reserved */\n" +" mov r11=0 /* reserved */\n" +" mov r16=0xffff /* implemented PMC */\n" +" mov r17=0xffff /* implemented PMD */\n" +" add r18=8,r29 /* second index */\n" +" ;;\n" +" st8 [r29]=r16,16 /* store implemented PMC */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" +" st8 [r29]=r0,16 /* store implemented PMC */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" +" st8 [r29]=r17,16 /* store implemented PMD */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" mov r16=0xf0 /* cycles count capable PMC */\n" +" ;;\n" +" st8 [r29]=r0,16 /* store implemented PMC */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" mov r17=0x10 /* retired bundles capable PMC */\n" +" ;;\n" +" st8 [r29]=r16,16 /* store cycles capable */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" +" st8 [r29]=r0,16 /* store implemented PMC */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" +" st8 [r29]=r17,16 /* store retired bundle capable */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" +" st8 [r29]=r0,16 /* store implemented PMC */\n" +" st8 [r18]=r0,16 /* clear remaining bits */\n" +" ;;\n" "1: br.cond.sptk.few rp\n" "stacked:\n" " br.ret.sptk.few rp\n"
arch/ia64/kernel/palinfo.c +13 -12
@@ -6,12 +6,13 @@* Intel IA-64 Architecture Software Developer's Manual v1.0. * * -* Copyright (C) 2000 Hewlett-Packard Co -* Copyright (C) 2000 Stephane Eranian <[email protected]> +* Copyright (C) 2000-2001 Hewlett-Packard Co +* Stephane Eranian <[email protected]> * * 05/26/2000 S.Eranian initial release * 08/21/2000 S.Eranian updated to July 2000 PAL specs * 02/05/2001 S.Eranian fixed module support +* 10/23/2001 S.Eranian updated pal_perf_mon_info bug fixes */ #include <linux/config.h> #include <linux/types.h>
@@ -32,8 +33,9 @@MODULE_AUTHOR ("Stephane Eranian <[email protected]>" );MODULE_DESCRIPTION ("/proc interface to IA-64 PAL" ); +MODULE_LICENSE ("GPL" ); -#define PALINFO_VERSION "0.4" +#define PALINFO_VERSION "0.5"#ifdef CONFIG_SMP #define cpu_is_online (i) (cpu_online_map & (1UL << i))
@@ -606,15 +608,6 @@if (ia64_pal_perf_mon_info (pm_buffer, &pm_info) !=0 )return 0 ; -#ifdef IA64_PAL_PERF_MON_INFO_BUG -/* -* This bug has been fixed in PAL 2.2.9 and higher -*/ - pm_buffer[5 ]=0x3 ; - pm_info.pal_perf_mon_info_s.cycles =0x12 ; - pm_info.pal_perf_mon_info_s.retired =0x08 ; -#endif - p +=sprintf (p,"PMC/PMD pairs : %d\n" \"Counter width : %d bits\n" \ "Cycle event number : %d\n" \
@@ -636,6 +629,14 @@ p =bitregister_process (p, pm_buffer+8 ,256 ); p +=sprintf (p,"\nRetired bundles count capable : " ); + +#ifdef CONFIG_ITANIUM +/* +* PAL_PERF_MON_INFO reports that only PMC4 can be used to count CPU_CYCLES +* which is wrong, both PMC4 and PMD5 support it. +*/ +if (pm_buffer[12 ] =0x10 ) pm_buffer[12 ]=0x30 ; +#endif p =bitregister_process (p, pm_buffer+12 ,256 );
arch/ia64/kernel/process.c +1 -1
@@ -460,7 +460,7 @@if (task->thread.pfm_context)pfm_context_exit (task); -if (atomic_read (&task->thread.pfm_notifiers_check) >0 ) +if (atomic_read (&task->thread.pfm_notifiers_check) >0 ) pfm_cleanup_notifiers(task); }#endif
arch/ia64/kernel/traps.c +26 -15
49 lines not on this page · raw message
arch/ia64/kernel/unaligned.c +31 -10
88 lines not on this page · raw message
arch/parisc/kernel/traps.c +0 -1
@@ -43,7 +43,6 @@static inline void console_verbose (void ) { -extern int console_loglevel; console_loglevel =15 ; }
drivers/acpi/include/acutils.h +6 -0
@@ -383,6 +383,7 @@/* Method name strings */ #define METHOD_NAME__HID "_HID" +#define METHOD_NAME__CID "_CID"#define METHOD_NAME__UID "_UID"#define METHOD_NAME__ADR "_ADR"#define METHOD_NAME__STA "_STA"
@@ -396,6 +397,11 @@NATIVE_CHAR *object_name, acpi_namespace_node *device_node, acpi_integer *address); + +acpi_status +acpi_ut_execute_CID ( +acpi_namespace_node *device_node, +ACPI_DEVICE_ID *cid);acpi_status acpi_ut_execute_HID (
drivers/acpi/include/platform/acgcc.h +21 -0
@@ -42,11 +42,32 @@/*! [Begin] no source code translation */ +#include <linux/interrupt.h> + +#include <asm/processor.h> #include <asm/pal.h> #define halt () ia64_pal_halt_light()/* PAL_HALT[_LIGHT] */ #define safe_halt () ia64_pal_halt(1)/* PAL_HALT */ +static inline void +wbinvd (void ) +{ +unsigned long flags, vector, position =0 ; +long status; + +do { +ia64_clear_ic (flags); + status =ia64_pal_cache_flush (0x3 , (PAL_CACHE_FLUSH_INVALIDATE + |PAL_CACHE_FLUSH_CHK_INTRS ), + &position, &vector); +local_irq_restore (flags); +if (status =1 ) { +ia64_eoi (); +hw_resend_irq (NULL , vector); + } + }while (status =1 ); +}#define ACPI_ACQUIRE_GLOBAL_LOCK (GLptr, Acq) \ do { \
drivers/acpi/namespace/nsxfobj.c +12 -1
@@ -588,6 +588,7 @@acpi_namespace_node *node;u32 flags;ACPI_DEVICE_ID device_id; +ACPI_DEVICE_ID compatible_id;ACPI_GET_DEVICES_INFO *info;
@@ -628,7 +629,17 @@ }if (STRNCMP (device_id.buffer, info->hid,sizeof (device_id.buffer)) !=0 ) { -return (AE_OK ); + status =acpi_ut_execute_CID (node, &compatible_id); +if (status =AE_NOT_FOUND ) { +return (AE_OK ); + } +else if (ACPI_FAILURE (status)) { +return (AE_CTRL_DEPTH ); + } + +if (STRNCMP (compatible_id.buffer, info->hid,sizeof (compatible_id.buffer)) !=0 ) { +return (AE_OK ); + } } }
drivers/acpi/utilities/uteval.c +87 -0
93 lines not on this page · raw message
drivers/pci/pci.c +5 -5
@@ -1552,10 +1552,10 @@switch (rqst) {case PM_SAVE_STATE : - error =pci_pm_save_state ((u32 )data); + error =pci_pm_save_state ((unsigned long )data);break ;case PM_SUSPEND : - error =pci_pm_suspend ((u32 )data); + error =pci_pm_suspend ((unsigned long )data);break ;case PM_RESUME : error =pci_pm_resume ();
@@ -1873,16 +1873,16 @@int map, block;if ((page =pool_find_page (pool, dma)) =0 ) { -printk (KERN_ERR "pci_pool_free %s/%s, %p/%x (bad dma)\n" , +printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n" , pool->dev ? pool->dev->slot_name :NULL , - pool->name, vaddr, (int ) (dma &0xffffffff )); + pool->name, vaddr, (unsigned long ) dma);return ; }#ifdef CONFIG_PCIPOOL_DEBUG if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%x\n" , pool->dev ? pool->dev->slot_name :NULL , - pool->name, vaddr, (int ) (dma &0xffffffff )); + pool->name, vaddr, dma);return ; }#endif
include/asm-ia64/offsets.h +4 -4
@@ -8,7 +8,7 @@*/ #define PT_PTRACED_BIT 0#define PT_TRACESYS_BIT 1 -#define IA64_TASK_SIZE 3920/* 0xf50 */ +#define IA64_TASK_SIZE 3408/* 0xd50 */ #define IA64_PT_REGS_SIZE 400/* 0x190 */ #define IA64_SWITCH_STACK_SIZE 560/* 0x230 */ #define IA64_SIGINFO_SIZE 128/* 0x80 */
@@ -20,9 +20,9 @@#define IA64_TASK_SIGPENDING_OFFSET 16/* 0x10 */ #define IA64_TASK_NEED_RESCHED_OFFSET 40/* 0x28 */ #define IA64_TASK_PROCESSOR_OFFSET 100/* 0x64 */ -#define IA64_TASK_THREAD_OFFSET 1472/* 0x5c0 */ -#define IA64_TASK_THREAD_KSP_OFFSET 1472/* 0x5c0 */ -#define IA64_TASK_PFM_MUST_BLOCK_OFFSET 2096/* 0x830 */ +#define IA64_TASK_THREAD_OFFSET 976/* 0x3d0 */ +#define IA64_TASK_THREAD_KSP_OFFSET 976/* 0x3d0 */ +#define IA64_TASK_PFM_MUST_BLOCK_OFFSET 1600/* 0x640 */ #define IA64_TASK_PID_OFFSET 220/* 0xdc */ #define IA64_TASK_MM_OFFSET 88/* 0x58 */ #define IA64_PT_REGS_CR_IPSR_OFFSET 0/* 0x0 */
include/asm-ia64/pal.h +3 -1
@@ -776,10 +776,12 @@* initialized to zero before calling this for the first time.. */ static inline s64 -ia64_pal_cache_flush (u64 cache_type,u64 invalidate,u64 *progress) +ia64_pal_cache_flush (u64 cache_type,u64 invalidate,u64 *progress,u64 *vector) {struct ia64_pal_retval iprv;PAL_CALL_IC_OFF (iprv,PAL_CACHE_FLUSH , cache_type, invalidate, *progress); +if (vector) + *vector = iprv.v0; *progress = iprv.v1;return iprv.status; }
include/asm-ia64/pci.h +16 -3
@@ -10,9 +10,9 @@#include <asm/scatterlist.h> /* -* Can be used to override the logic in pci_scan_bus for skipping -* already-configured bus numbers - to be used for buggy BIOSes or -* architectures with incomplete PCI setup by the loader. +* Can be used to override the logic in pci_scan_bus for skipping already-configured bus +* numbers - to be used for buggy BIOSes or architectures with incomplete PCI setup by the +* loader. */ #define pcibios_assign_all_busses () 0
@@ -56,6 +56,19 @@ {return 1 ; } + +#define pci_map_page (dev,pg,off,size,dir) \ + pci_map_single((dev), page_address(pg) + (off), (size), (dir)) +#define pci_unmap_page (dev,dma_addr,size,dir) \ + pci_unmap_single((dev), (dma_addr), (size), (dir) + +/* The ia64 platform always supports 64-bit addressing. */ +#define pci_dac_dma_supported (pci_dev, mask) (1) + +#define pci_dac_page_to_dma (dev,pg,off,dir) ((dma64_addr_t) page_to_bus(pg) + (off)) +#define pci_dac_dma_to_page (dev,dma_addr) (virt_to_page(bus_to_virt(dma_addr))) +#define pci_dac_dma_to_offset (dev,dma_addr) ((dma_addr) & ~PAGE_MASK) +#define pci_dac_dma_sync_single (dev,dma_addr,len,dir) do {/* nothing */ }while (0 )/* Return the index of the PCI controller for device PDEV. */ #define pci_controller_num(PDEV) (0)
include/asm-ia64/processor.h +36 -1
@@ -170,7 +170,6 @@#define IA64_THREAD_KRBS_SYNCED (__IA64_UL(1) << 5)/* krbs synced with process vm? */ #define IA64_THREAD_FPEMU_NOPRINT (__IA64_UL(1) << 6)/* don't log any fpswa faults */ #define IA64_THREAD_FPEMU_SIGFPE (__IA64_UL(1) << 7)/* send a SIGFPE for fpswa faults */ -#define IA64_KERNEL_DEATH (__IA64_UL(1) << 63)/* see die_if_kernel()... */ #define IA64_THREAD_UAC_SHIFT 3#define IA64_THREAD_UAC_MASK (IA64_THREAD_UAC_NOPRINT | IA64_THREAD_UAC_SIGBUS)
@@ -958,6 +957,42 @@ asm ("mov %0=gp" :"=r" (val));return val; +} + +static inline void +ia64_set_ibr (__u64 regnum,__u64 value) +{ + asmvolatile ("mov ibr[%0]=%1" ::"r" (regnum),"r" (value)); +} + +static inline void +ia64_set_dbr (__u64 regnum,__u64 value) +{ + asmvolatile ("mov dbr[%0]=%1" ::"r" (regnum),"r" (value)); +#ifdef CONFIG_ITANIUM + asmvolatile (";; srlz.d" ); +#endif +} + +static inline __u64 +ia64_get_ibr (__u64 regnum) +{ +__u64 retval; + + asmvolatile ("mov %0=ibr[%1]" :"=r" (retval) :"r" (regnum)); +return retval; +} + +static inline __u64 +ia64_get_dbr (__u64 regnum) +{ +__u64 retval; + + asmvolatile ("mov %0Ûr[%1]" :"=r" (retval) :"r" (regnum)); +#ifdef CONFIG_ITANIUM + asmvolatile (";; srlz.d" ); +#endif +return retval; }/* XXX remove the handcoded version once we have a sufficiently clever compiler... */
include/asm-ia64/unistd.h +1 -0
@@ -205,6 +205,7 @@#define __NR_clone2 1213#define __NR_getdents64 1214#define __NR_getunwind 1215 +#define __NR_readahead 1216#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER )
include/linux/kernel.h +7 -2
@@ -36,6 +36,13 @@#define KERN_INFO "<6>"/* informational */ #define KERN_DEBUG "<7>"/* debug-level messages */ +extern int console_printk[]; + +#define console_loglevel (console_printk[0]) +#define default_message_loglevel (console_printk[1]) +#define minimum_console_loglevel (console_printk[2]) +#define default_console_loglevel (console_printk[3]) +# define NORET_TYPE /**/ # define ATTRIB_NORET __attribute__((noreturn))# define NORET_AND noreturn,
@@ -79,8 +86,6 @@ asmlinkage int printk(const char * fmt, ...) __attribute__ ((format (printf,1 ,2 ))); - -extern int console_loglevel;static inline void console_silent (void ) {
kernel/exec_domain.c +2 -0
@@ -196,8 +196,10 @@put_exec_domain (oep); +#if 0 printk (KERN_DEBUG "[%s:%d]: set personality to %lx\n" , current->comm, current->pid, personality); +#endif return 0 ; }
kernel/printk.c +11 -5
@@ -16,6 +16,7 @@* 01Mar01 Andrew Morton <[email protected]> */ +#include <linux/kernel.h> #include <linux/mm.h> #include <linux/tty.h> #include <linux/tty_driver.h>
@@ -27,7 +28,11 @@#include <asm/uaccess.h> +#if 0 #define LOG_BUF_LEN (16384)/* This must be a power of two */ +#else +#define LOG_BUF_LEN (65536)/* This must be a power of two */ +#endif #define LOG_BUF_MASK (LOG_BUF_LEN-1)/* printk's without a loglevel use this.. */
@@ -39,11 +44,12 @@DECLARE_WAIT_QUEUE_HEAD (log_wait); -/* Keep together for sysctl support */ -int console_loglevel =DEFAULT_CONSOLE_LOGLEVEL ; -int default_message_loglevel =DEFAULT_MESSAGE_LOGLEVEL ; -int minimum_console_loglevel =MINIMUM_CONSOLE_LOGLEVEL ; -int default_console_loglevel =DEFAULT_CONSOLE_LOGLEVEL ; +int console_printk[4 ] = { +DEFAULT_CONSOLE_LOGLEVEL ,/* console_loglevel */ +DEFAULT_MESSAGE_LOGLEVEL ,/* default_message_loglevel */ +MINIMUM_CONSOLE_LOGLEVEL ,/* minimum_console_loglevel */ +DEFAULT_CONSOLE_LOGLEVEL ,/* default_console_loglevel */ +};int oops_in_progress;
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 4 lines · David Mosberger
An updated ia64 patch for 2.4.13 is now available at This kernel has been tested with gcc-3.0 on Big Sur, Lion, and HP simulator. Both UP and MP seem to compile fine. As usual, your mileage may vary.
Not many miles for me ;)
Index: 13.3/include/asm-ia64/pci.h
include/asm-ia64/pci.h Thu, 25 Oct 2001 15:25:33 +1000 kaos (linux-2.4/t/2_pci.h 1.4 644) renamed from include/asm-ia64/pci.h Thu, 25 Oct 2001 15:06:28 +1000 kaos (linux-2.4/t/2_pci.h 1.4 644) +1 -1
@@ -60,7 +60,7 @@ pci_dma_supported (struct pci_dev *hwdev #define pci_map_page(dev,pg,off,size,dir) \ pci_map_single((dev), page_address(pg) + (off), (size), (dir)) #define pci_unmap_page(dev,dma_addr,size,dir) \ - pci_unmap_single((dev), (dma_addr), (size), (dir) + pci_unmap_single((dev), (dma_addr), (size), (dir)) /* The ia64 platform always supports 64-bit addressing. */ #define pci_dac_dma_supported(pci_dev, mask) (1)
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David Mosberger-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Content-Type: text/plain; charset=us-ascii
Quoted 3 lines · David Mosberger
An updated ia64 patch for 2.4.13 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.11-ia64-011010.diff*
kdb v1.9-2.4.13-ia64-011024 is available in ftp://oss.sgi.com/projects/kdb/download/ia64. Changelog extract.
2001-10-24 Keith Owens <[email protected]>
* Upgrade to kernel 2.4.13.
2001-10-14 Keith Owens <[email protected]>
* More use of TMPPREFIX in top level Makefile to speed up NFS compiles.
* Correct repeat calculations in md/mds commands.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999
iD8DBQE7169/i4UHNye0ZOoRArkCAJ99FG3hO3Q3uQjIWSjkTEIog2yingCg06EH EYDtZ2C8sVON+TERYHTtcL0=Yhbj
-----END PGP SIGNATURE-----
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 3 lines · David Mosberger
- half-hearted attempt add supporting reading of "default LDT entry" in ia32
modify_ldt()syscall; someone who understands what this is supposed to do should take a look at this...
This is just needed for Xenix/286 binary emulation - I doubt we want to run x286emul on ia64 anytime soon 8)
Christoph
Signature · 1 line
Of course it doesn't work. We've performed a software upgrade.
RE: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David Mosberger2.4.13 builds (with Keith's patch) and boots for me. But I'm seeing these weird messages early in boot:
ACPI 2.0 Root System Description Ptr at 0xe0000000000e2000 ACPI 2.0 XSDT at 0xe00000003ffd8030 (p=0x3ffd8030) ACPI 2.0: Intel W460GXBS 0.1
Acpi cfg:bind to Boot time Acpi OSD
ACPI attempting to access kernel owned memory at 3FFD8030. ACPI attempting to access kernel owned memory at 3FFD8030. ACPI attempting to access kernel owned memory at 3FFD8068. ACPI attempting to access kernel owned memory at 3FFD8068. ACPI attempting to access kernel owned memory at 3FFD9EC0. ACPI attempting to access kernel owned memory at 3FFD9EC0. ACPI attempting to access kernel owned memory at 3FFD9F40. ACPI attempting to access kernel owned memory at 3FFD8160. ACPI attempting to access kernel owned memory at 3FFD8160.
Running on a 2-processor (B3-stepping) BigSur with 1GB RAM.
I'm using the 3.1 version of elilo.
-Tony
RE: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Tony
Tony> 2.4.13 builds (with Keith's patch) and boots for me. But I'm Tony> seeing these weird messages early in boot:
Tony> ACPI 2.0 Root System Description Ptr at 0xe0000000000e2000
Tony> ACPI 2.0 XSDT at 0xe00000003ffd8030 (p=0x3ffd8030) ACPI 2.0:
Tony> Intel W460GXBS 0.1 Acpi cfg:bind to Boot time Acpi OSD ACPI
Tony> attempting to access kernel owned memory at 3FFD8030. ACPI Tony> attempting to access kernel owned memory at 3FFD8030. ACPI Tony> attempting to access kernel owned memory at 3FFD8068. ACPI Tony> attempting to access kernel owned memory at 3FFD8068. ACPI Tony> attempting to access kernel owned memory at 3FFD9EC0. ACPI Tony> attempting to access kernel owned memory at 3FFD9EC0. ACPI Tony> attempting to access kernel owned memory at 3FFD9F40. ACPI Tony> attempting to access kernel owned memory at 3FFD8160. ACPI
Tony> attempting to access kernel owned memory at 3FFD8160.
Don't worry about these for now. It's a known problem and on my todo list (once the book is finished...).
The warnings are due to the fact that setup_arch() is not yet registering the reserved memory regions (search for "XXX fix me" in that routine and you'll see what I mean). Given the EFI memory map, this will be easy to fix---just a small matter of programming. In the meantime, it shouldn't have any negative effect (hotplugging with dumb buses such as PCMCIA would be a problem, but since ISA isn't supported anyhow...).
--david
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> An updated ia64 patch for 2.4.13 is now available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
The patch add a definition for bust_spinlocks in arch/ia64/kernel/traps.c which is slightly different from the implementation in lib/bust_spinlocks.c. Does it make sense to merge them?
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something [email protected] completely different." SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> David Mosberger <[email protected]> writes: |> An updated Andreas> ia64 patch for 2.4.13 is now available at |> Andreas> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
Andreas> The patch add a definition for bust_spinlocks in Andreas> arch/ia64/kernel/traps.c which is slightly different from Andreas> the implementation in lib/bust_spinlocks.c. Does it make Andreas> sense to merge them?
Not unless you make them exactly the same. ;-)
The issue is global_irq_lock. It's existence depends on the platform. FYI, i386 does the same thing (just in a different place: mm/fault.c).
--david
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 10 lines · David Mosberger
Don't worry about these for now. It's a known problem and on my todo list (once the book is finished...).
The warnings are due to the fact that
setup_arch()is not yet registering the reserved memory regions (search for "XXX fix me" in that routine and you'll see what I mean). Given the EFI memory map, this will be easy to fix---just a small matter of programming. In the meantime, it shouldn't have any negative effect (hotplugging with dumb buses such as PCMCIA would be a problem, but since ISA isn't supported anyhow...).
According to my analysis this is due to acpi_os_map_memory() attempting to use the results of virt_to_page() prior to paging_init(), where virt_to_page() attempts to index off of mem_map (which is not yet initialized) and access the contents of the struct page from there (which leads to an invalid pointer dereference or returns garbage).
The following check in acpi_os_map_memory() (in drivers/acpi/os.c) was introduced somewhere after 2.4.5, and (IMHO) should be omitted:
if ((unsigned long) phys < virt_to_phys(high_memory)) {
struct page *page;
*virt = phys_to_virt((unsigned long) phys);
/* Check for stamping */
page = virt_to_page(*virt);
if(page && !test_bit(PG_reserved, &page->flags))
printk(KERN_WARNING "ACPI attempting to access kernel owned memory at %08lX.\n", (unsigned long)phys);
return AE_OK;
}mem_map is initialized by free_area_init_core(), called from paging_init().
If there is a cleaner way to repair this issue, I would be glad to adopt it.
Cheers,
Bill
------------------
[email protected]
Re: [Linux-ia64] kernel update (relative to 2.4.13)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · William Lee Irwin III
Bill> According to my analysis this is due to acpi_os_map_memory() Bill> attempting to use the results of virt_to_page() prior to Bill> paging_init(), where virt_to_page() attempts to index off of Bill> mem_map (which is not yet initialized) and access the contents Bill> of the struct page from there (which leads to an invalid Bill> pointer dereference or returns garbage).
Bill> The following check in acpi_os_map_memory() (in Bill> drivers/acpi/os.c) was introduced somewhere after 2.4.5, and Bill> (IMHO) should be omitted:
Bill> if ((unsigned long) phys < virt_to_phys(high_memory)) {
Bill> struct page *page; *virt = phys_to_virt((unsigned long) phys);You're probably right. Jung-Ik, can you make this change and send me a patch?
--david
[Linux-ia64] kernel update (relative to 2.4.14)
In reply to David MosbergerAn updated ia64 patch for 2.4.14 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.14-ia64-011105.diff*
change log:
- update for 2.4.14
- support non-legacy serial ports via ACPI
(Khalid Aziz & Alex Williamson)
- support 16MB as an alternate page size for the identity mapped region
- export flush_tlb_range to modules, by popular request
- in struct scatterlist, rename "orig_address" to "page" (yes, that's cheesy, but SCSI insists on a zeroing a member with such a name...)
- increase IO_SPACE_LIMIT from 0xffff to ~0UL
This kernel has been tested with gcc-3.0 on Big Sur. Both UP and MP seem to compile fine. As usual, your mileage may vary.
Enjoy,
--david
Documentation/Configure.help +8 -0
@@ -2589,6 +2589,14 @@ say N here to save some memory. You can also say Y if you have an "intelligent" multiport card such as Cyclades, Digiboards, etc. +Support for serial ports defined by ACPI tables +CONFIG_SERIAL_ACPI + Legacy free machines may not have serial ports at the legacy COM1, + COM2 etc addresses. Serial ports on such machines are described by + the ACPI tables SPCR (Serial Port Console Redirection) table and + DBGP (Debug Port) table. Say Y here if you want to include support + for these serial ports. + Support for sharing serial interrupts CONFIG_SERIAL_SHARE_IRQ Some serial boards have hardware support which allows multiple dumb
arch/ia64/config.in +4 -0
@@ -256,6 +256,10 @@ mainmenu_option next_comment comment 'Kernel hacking' +choice 'Physical memory granularity' \ + "16MB CONFIG_IA64_GRANULE_16MB \ + 64MB CONFIG_IA64_GRANULE_64MB" 64MB + bool 'Kernel debugging' CONFIG_DEBUG_KERNEL if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then bool ' Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS
arch/ia64/defconfig +54 -13
186 lines not on this page · raw message
arch/ia64/ia32/ia32_traps.c +1 -1
@@ -4,7 +4,7 @@* Copyright (C) 2000 Asit K. Mallick <[email protected]> * Copyright (C) 2001 Hewlett-Packard Co * David Mosberger-Tang <[email protected]> -/* +* * 06/16/00 A. Mallick added siginfo for most cases (close to IA32) * 09/29/00 D. Mosberger added ia32_intercept() */
arch/ia64/kernel/acpi.c +73 -1
100 lines not on this page · raw message
arch/ia64/kernel/efi.c +14 -11
@@ -6,8 +6,8 @@* Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond <[email protected]> * Copyright (C) 1999-2001 Hewlett-Packard Co. -* Copyright (C) 1999 David Mosberger-Tang <[email protected]> -* Copyright (C) 1999-2001 Stephane Eranian <[email protected]> +* David Mosberger-Tang <[email protected]> +* Stephane Eranian <[email protected]> * * All EFI Runtime Services are not implemented yet as EFI only * supports physical mode addressing on SoftSDV. This is to be fixed
@@ -234,7 +234,7 @@* The only ITLB entry in region 7 that is used is the one installed by * __start(). That entry covers a 64MB range. */ - mask = ~((1 <<KERNEL_PG_SHIFT ) -1 ); + mask = ~((1 <<KERNEL_TR_PAGE_SHIFT ) -1 ); vaddr =PAGE_OFFSET + md->phys_addr;/*
@@ -242,29 +242,32 @@* mapping. * * PAL code is guaranteed to be aligned on a power of 2 between 4k and -* 256KB. Also from the documentation, it seems like there is an implicit -* guarantee that you will need only ONE ITR to map it. This implies that -* the PAL code is always aligned on its size, i.e., the closest matching -* page size supported by the TLB. Therefore PAL code is guaranteed never -* to cross a 64MB unless it is bigger than 64MB (very unlikely!). So for +* 256KB and that only one ITR is needed to map it. This implies that the +* PAL code is always aligned on its size, i.e., the closest matching page +* size supported by the TLB. Therefore PAL code is guaranteed never to +* cross a 64MB unless it is bigger than 64MB (very unlikely!). So for * now the following test is enough to determine whether or not we need a * dedicated ITR for the PAL code. */ if ((vaddr & mask) = (KERNEL_START & mask)) { -printk (__FUNCTION__" : no need to install ITR for PAL code\n" ); +printk (__FUNCTION__": no need to install ITR for PAL code\n" );continue ; } +if (md->num_pages <<12 >IA64_GRANULE_SIZE ) +panic ("Woah! PAL code size bigger than a granule!" ); + + mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk ("CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n" ,smp_processor_id (), md->phys_addr, md->phys_addr + (md->num_pages <<12 ), - vaddr & mask, (vaddr & mask) +KERNEL_PG_SIZE ); + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );/* * Cannot write to CRx with PSR.ic=1 */ ia64_clear_ic (flags);ia64_itr (0x1 ,IA64_TR_PALCODE , vaddr & mask, -pte_val (mk_pte_phys (md->phys_addr,PAGE_KERNEL )),KERNEL_PG_SHIFT ); +pte_val (mk_pte_phys (md->phys_addr,PAGE_KERNEL )),IA64_GRANULE_SHIFT );local_irq_restore (flags);ia64_srlz_i (); }
arch/ia64/kernel/entry.S +5 -6
@@ -140,15 +140,14 @@ dep r20=0,in0,61,3 // physical address of "current" ;; st8 [r22]=sp // save kernel stack pointer of old task - shr.u r26=r20,KERNEL_PG_SHIFT - mov r16=KERNEL_PG_NUM + shr.u r26=r20,IA64_GRANULE_SHIFT + shr.u r17=r20,KERNEL_TR_PAGE_SHIFT ;; - cmp.ne p6,p7=r26,r16 // check whether r26 != KERNEL_PG_NUM + cmp.ne p6,p7=KERNEL_TR_PAGE_NUM,r17 adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0 ;; /* - * If we've already mapped this task's page, we can skip doing it - * again. + * If we've already mapped this task's page, we can skip doing it again. */ (p6) cmp.eq p7,p6=r26,r27 (p6) br.cond.dpnt .map
@@ -176,7 +175,7 @@ ;; srlz.d or r23=r25,r20 // construct PA | page properties - mov r25=KERNEL_PG_SHIFT<<2 + mov r25=IA64_GRANULE_SHIFT<<2 ;; mov cr.itir=r25 mov cr.ifa=in0 // VA of next task...
arch/ia64/kernel/head.S +7 -6
@@ -63,17 +63,17 @@ * that maps the kernel's text and data: */ rsm psr.i | psr.ic - mov r16=((ia64_rid(IA64_REGION_ID_KERNEL, PAGE_OFFSET) << 8) | (KERNEL_PG_SHIFT << 2)) + mov r16=((ia64_rid(IA64_REGION_ID_KERNEL, PAGE_OFFSET) << 8) | (IA64_GRANULE_SHIFT << 2)) ;; srlz.i - mov r18=KERNEL_PG_SHIFT<<2 - movl r17=PAGE_OFFSET + KERNEL_PG_NUM*KERNEL_PG_SIZE + mov r18=KERNEL_TR_PAGE_SHIFT<<2 + movl r17=KERNEL_START ;; mov rr[r17]=r16 mov cr.itir=r18 mov cr.ifa=r17 mov r16=IA64_TR_KERNEL - movl r18=(KERNEL_PG_NUM*KERNEL_PG_SIZE | PAGE_KERNEL) + movl r18=((1 << KERNEL_TR_PAGE_SHIFT) | PAGE_KERNEL) ;; srlz.i ;;
@@ -112,7 +112,7 @@ ;; #ifdef CONFIG_IA64_EARLY_PRINTK - mov r3=(6<<8) | (KERNEL_PG_SHIFT<<2) + mov r3=(6<<8) | (IA64_GRANULE_SHIFT<<2) movl r2=6<<61 ;; mov rr[r2]=r3
@@ -145,6 +145,7 @@ cmp4.ne isAP,isBP=r3,r0 ;; // RAW on r2 extr r3=r2,0,61 // r3 = phys addr of task struct + mov r16=KERNEL_TR_PAGE_NUM ;; // load the "current" pointer (r13) and ar.k6 with the current task
@@ -152,7 +153,7 @@ mov IA64_KR(CURRENT)=r3 // Physical address // initialize k4 to a safe value (64-128MB is mapped by TR_KERNEL) - mov IA64_KR(CURRENT_STACK)=1 + mov IA64_KR(CURRENT_STACK)=r16 /* * Reserve space at the top of the stack for "struct pt_regs". Kernel threads * don't store interesting values in that structure, but the space still needs
arch/ia64/kernel/ia64_ksyms.c +2 -0
@@ -69,6 +69,8 @@#include <asm/pgalloc.h> +EXPORT_SYMBOL (flush_tlb_range); +#ifdef CONFIG_SMP EXPORT_SYMBOL (smp_flush_tlb_all);
arch/ia64/kernel/mca.c +2 -0
@@ -1575,7 +1575,9 @@ia64_log_proc_dev_err_info_print (sal_log_processor_info_t *slpi, prfunc_t prfunc) { +#ifdef MCA_PRT_XTRA_DATA size_t d_len = slpi->header.len -sizeof (sal_log_section_hdr_t); +#endif sal_processor_static_info_t *spsi;int i;sal_log_mod_error_info_t *p_data;
arch/ia64/lib/swiotlb.c +4 -4
@@ -398,7 +398,7 @@BUG ();for (i =0 ; i < nelems; i++, sg++) { - sg->orig_address = sg->address; + sg->page = sg->address;if ((virt_to_phys (sg->address) & ~hwdev->dma_mask) !=0 ) { sg->address =map_single (hwdev, sg->address, sg->length, direction); }
@@ -419,9 +419,9 @@BUG ();for (i =0 ; i < nelems; i++, sg++) -if (sg->orig_address != sg->address) { +if (sg->page != sg->address) {unmap_single (hwdev, sg->address, sg->length, direction); - sg->address = sg->orig_address; + sg->address = sg->page; }else if (direction =PCI_DMA_FROMDEVICE )mark_clean (sg->address, sg->length); }
@@ -442,7 +442,7 @@BUG ();for (i =0 ; i < nelems; i++, sg++) -if (sg->orig_address != sg->address) +if (sg->page != sg->address)sync_single (hwdev, sg->address, sg->length, direction); }
arch/ia64/mm/init.c +1 -1
@@ -276,7 +276,7 @@ia64_clear_ic (flags); rid =ia64_rid (IA64_REGION_ID_KERNEL , __IA64_UNCACHED_OFFSET); -ia64_set_rr (__IA64_UNCACHED_OFFSET, (rid <<8 ) | (KERNEL_PG_SHIFT <<2 )); +ia64_set_rr (__IA64_UNCACHED_OFFSET, (rid <<8 ) | (IA64_GRANULE_SHIFT <<2 )); rid =ia64_rid (IA64_REGION_ID_KERNEL ,VMALLOC_START );ia64_set_rr (VMALLOC_START , (rid <<8 ) | (PAGE_SHIFT <<2 ) |1 );
arch/ia64/mm/tlb.c +1 -1
@@ -79,7 +79,7 @@flush_tlb_all (); } -static void +static inline void ia64_global_tlb_purge (unsigned long start,unsigned long end,unsigned long nbits) {static spinlock_t ptcg_lock =SPIN_LOCK_UNLOCKED ;
drivers/acpi/hardware/hwacpi.c +7 -4
@@ -221,11 +221,14 @@/* Give the platform some time to react */ -acpi_os_stall (20000 ); +while (retries-- >0 ) { +acpi_os_stall (20000 ); -if (acpi_hw_get_mode () = mode) { -ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Mode %X successfully enabled\n" , mode)); - status =AE_OK ; +if (acpi_hw_get_mode () = mode) { +ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Mode %X successfully enabled\n" , mode)); + status =AE_OK ; +break ; + } }return_ACPI_STATUS (status);
drivers/acpi/include/acutils.h +1 -1
@@ -402,7 +402,7 @@acpi_status acpi_ut_execute_CID (acpi_namespace_node *device_node, -ACPI_DEVICE_ID *cid); +acpi_device_id *cid);acpi_status acpi_ut_execute_HID (
drivers/acpi/namespace/nsxfobj.c +1 -0
@@ -548,6 +548,7 @@acpi_namespace_node *node;u32 flags;acpi_device_id device_id; +acpi_device_id compatible_id;acpi_get_devices_info *info;
drivers/acpi/utilities/uteval.c +1 -1
@@ -132,7 +132,7 @@acpi_status acpi_ut_execute_CID (acpi_namespace_node *device_node, -ACPI_DEVICE_ID *cid) +acpi_device_id *cid) {acpi_operand_object *obj_desc;acpi_status status;
drivers/block/loop.c +0 -2
@@ -207,7 +207,6 @@ index++; pos += size;UnlockPage (page); -deactivate_page (page);page_cache_release (page); }return 0 ;
@@ -218,7 +217,6 @@kunmap (page); unlock:UnlockPage (page); -deactivate_page (page);page_cache_release (page); fail:return -1 ;
drivers/char/Config.in +3 -0
@@ -16,6 +16,9 @@ tristate ' Dual serial port support' CONFIG_DUALSP_SERIAL fi fi +if [ "$CONFIG_ACPI" = "y" ]; then + bool ' Support for serial ports defined by ACPI tables' CONFIG_SERIAL_ACPI +fi dep_mbool 'Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED $CONFIG_SERIAL if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then bool ' Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
drivers/char/Makefile +1 -0
@@ -126,6 +126,7 @@ obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o $(CONSOLE) selection.o obj-$(CONFIG_SERIAL) += $(SERIAL) +obj-$(CONFIG_SERIAL_ACPI) += acpi_serial.o obj-$(CONFIG_SERIAL_21285) += serial_21285.o obj-$(CONFIG_SERIAL_SA1100) += serial_sa1100.o obj-$(CONFIG_SERIAL_AMBA) += serial_amba.o
drivers/char/acpi_serial.c +194 -0
194 lines not on this page · raw message
drivers/char/serial.c +29 -7
@@ -85,6 +85,11 @@* SERIAL_PARANOIA_CHECK * Check the magic number for the async_structure where * ever possible. +* +* CONFIG_SERIAL_ACPI +* Enable support for serial console port and serial +* debug port as defined by the SPCR and DBGP tables in +* ACPI 2.0. */ #include <linux/config.h>
@@ -113,6 +118,10 @@#endif #endif +#ifdef CONFIG_SERIAL_ACPI +#define ENABLE_SERIAL_ACPI +#endif +#if defined(CONFIG_ISAPNP )|| (defined(CONFIG_ISAPNP_MODULE ) && defined(MODULE ))#ifndef ENABLE_SERIAL_PNP #define ENABLE_SERIAL_PNP
@@ -2355,7 +2364,7 @@autoconfig (info->state);if ((info->state->flags &ASYNC_AUTO_IRQ ) && - (info->state->port !=0 ) && + (info->state->port !=0 || info->state->iomem_base !=0 ) && (info->state->type !=PORT_UNKNOWN )) { irq =detect_uart_irq (info->state);if (irq >0 )
@@ -3384,6 +3393,10 @@ " ISAPNP"#define SERIAL_OPT #endif +#ifdef ENABLE_SERIAL_ACPI + " SERIAL_ACPI" +#define SERIAL_OPT +#endif #ifdef SERIAL_OPT " enabled\n" ;#else
@@ -5475,13 +5488,22 @@continue ;if ( (state->flags &ASYNC_BOOT_AUTOCONF ) && (state->flags &ASYNC_AUTO_IRQ ) - && (state->port !=0 )) + && (state->port !=0 || state->iomem_base !=0 )) state->irq =detect_uart_irq (state); -printk (KERN_INFO "ttyS%02d%s at 0x%04lx (irq = %d) is a %s\n" , - state->line +SERIAL_DEV_OFFSET , - (state->flags &ASYNC_FOURPORT ) ?" FourPort" :"" , - state->port, state->irq, - uart_config[state->type].name); +if (state->io_type =SERIAL_IO_MEM ) { +printk (KERN_INFO "ttyS%02d%s at 0x%px (irq = %d) is a %s\n" , + state->line +SERIAL_DEV_OFFSET , + (state->flags &ASYNC_FOURPORT ) ?" FourPort" :"" , + state->iomem_base, state->irq, + uart_config[state->type].name); + } +else { +printk (KERN_INFO "ttyS%02d%s at 0x%04lx (irq = %d) is a %s\n" , + state->line +SERIAL_DEV_OFFSET , + (state->flags &ASYNC_FOURPORT ) ?" FourPort" :"" , + state->port, state->irq, + uart_config[state->type].name); + }tty_register_devfs (&serial_driver,0 , serial_driver.minor_start + state->line); tty_register_devfs(&callout_driver, 0,
drivers/scsi/scsi_merge.c +1 -0
@@ -942,6 +942,7 @@ } } count++; +memset (sgpnt + count -1 ,0 ,sizeof (*sgpnt)); sgpnt[count -1 ].address = bh->b_data; sgpnt[count -1 ].page =NULL ; sgpnt[count -1 ].length += bh->b_size;
drivers/video/fbmem.c +2 -0
@@ -609,6 +609,8 @@ vma->vm_flags |=VM_IO ;#elif defined(__sh__)pgprot_val (vma->vm_page_prot) &= ~_PAGE_CACHABLE; +#elif defined(__ia64__) + vma->vm_page_prot =pgprot_writecombine (vma->vm_page_prot);#else #warning What do we have to do here??#endif
include/asm-ia64/io.h +7 -2
@@ -14,7 +14,7 @@* mistake somewhere. * * Copyright (C) 1998-2001 Hewlett-Packard Co -* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> +* David Mosberger-Tang <[email protected]> * Copyright (C) 1999 Asit Mallick <[email protected]> * Copyright (C) 1999 Don Dugger <[email protected]> */
@@ -25,7 +25,12 @@#define __IA64_UNCACHED_OFFSET 0xc000000000000000/* region 6 */ -#define IO_SPACE_LIMIT 0xffff +/* +* The legacy I/O space defined by the ia64 architecture supports only 65536 ports, but +* large machines may have multiple other I/O spaces so we can't place any a priori limit +* on IO_SPACE_LIMIT. These additional spaces are described in ACPI. +*/ +#define IO_SPACE_LIMIT 0xffffffffffffffffUL# ifdef __KERNEL__
include/asm-ia64/pci.h +1 -1
@@ -60,7 +60,7 @@#define pci_map_page (dev,pg,off,size,dir) \ pci_map_single((dev), page_address(pg) + (off), (size), (dir))#define pci_unmap_page (dev,dma_addr,size,dir) \ - pci_unmap_single((dev), (dma_addr), (size), (dir) + pci_unmap_single((dev), (dma_addr), (size), (dir))/* The ia64 platform always supports 64-bit addressing. */ #define pci_dac_dma_supported (pci_dev, mask) (1)
include/asm-ia64/pgtable.h +16 -6
@@ -9,7 +9,7 @@* in <asm/page.h> (currently 8192). * * Copyright (C) 1998-2001 Hewlett-Packard Co -* Copyright (C) 1998-2001 David Mosberger-Tang <[email protected]> +* David Mosberger-Tang <[email protected]> */ #include <linux/config.h>
@@ -466,11 +466,21 @@# endif /* !__ASSEMBLY__ */ /* -* Identity-mapped regions use a large page size. KERNEL_PG_NUM is the -* number of the (large) page frame that mapps the kernel. +* Identity-mapped regions use a large page size. We'll call such large pages +* "granules". If you can think of a better name that's unambiguous, let me +* know... +*/ +#if defined(CONFIG_IA64_GRANULE_64MB ) +# define IA64_GRANULE_SHIFT _PAGE_SIZE_64M +#elif defined(CONFIG_IA64_GRANULE_16MB ) +# define IA64_GRANULE_SHIFT _PAGE_SIZE_16M +#endif +#define IA64_GRANULE_SIZE (1 << IA64_GRANULE_SHIFT) +/* +* log2() of the page size we use to map the kernel image (IA64_TR_KERNEL): */ -#define KERNEL_PG_SHIFT _PAGE_SIZE_64M -#define KERNEL_PG_SIZE (1 << KERNEL_PG_SHIFT) -#define KERNEL_PG_NUM ((KERNEL_START - PAGE_OFFSET) / KERNEL_PG_SIZE) +#define KERNEL_TR_PAGE_SHIFT _PAGE_SIZE_64M +#define KERNEL_TR_PAGE_SIZE (1 << KERNEL_TR_PAGE_SHIFT) +#define KERNEL_TR_PAGE_NUM ((KERNEL_START - PAGE_OFFSET) / KERNEL_TR_PAGE_SIZE)#endif /* _ASM_IA64_PGTABLE_H */
include/asm-ia64/scatterlist.h +3 -3
@@ -2,13 +2,13 @@#define _ASM_IA64_SCATTERLIST_H/* -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co +* David Mosberger-Tang <[email protected]> */ struct scatterlist {char *address;/* location data is to be transferred to */ -char *orig_address;/* Save away the original buffer address (used by pci-dma.c) */ +void *page;/* stupid: SCSI code insists on a member of this name... */ unsigned int length;/* buffer length */ };
include/linux/acpi_serial.h +103 -0
103 lines not on this page · raw message
include/linux/serial.h +6 -0
@@ -182,5 +182,11 @@/* Allow complicated architectures to specify rs_table[] at run time */ extern int early_serial_setup (struct serial_struct *req); +#ifdef CONFIG_ACPI +/* tty ports reserved for the ACPI serial console port and debug port */ +#define ACPI_SERIAL_CONSOLE_PORT 4 +#define ACPI_SERIAL_DEBUG_PORT 5 +#endif +#endif /* __KERNEL__ */ #endif /* _LINUX_SERIAL_H */
kernel/printk.c +1 -2
@@ -25,11 +25,10 @@#include <linux/init.h> #include <linux/module.h> #include <linux/interrupt.h> /* For in_interrupt() */ -#include <linux/config.h> #include <asm/uaccess.h> -#ifdef CONFIG_MULTIQUAD +#if defined(CONFIG_MULTIQUAD ) || defined(CONFIG_IA64 )#define LOG_BUF_LEN (65536)#elif defined(CONFIG_SMP )#define LOG_BUF_LEN (32768)
mm/memory.c +1 -1
@@ -1338,7 +1338,7 @@if (pmd) {pte_t * pte =pte_alloc (mm, pmd, address);if (pte) -return handle_pte_fault (mm, vma, address, write_access, pte); +return handle_pte_fault (mm, vma, address, access_type, pte); }spin_unlock (&mm->page_table_lock);return -1 ;
Re: [Linux-ia64] kernel update (relative to 2.4.14)
In reply to David MosbergerQuoted 2 lines · David Mosberger
linux-2.4.14-ia64-011105.diff*
- support non-legacy serial ports via ACPI
Select CONFIG_SERIAL_ACPI, get these errors.
acpi.c: In function `acpi20_parse':
acpi.c:462: `ACPI_SPCRT_SIG' undeclared (first use in this function) acpi.c:462: (Each undeclared identifier is reported only once acpi.c:462: for each function it appears in.)
acpi.c:462: ACPI_SPCRT_SIG_LEN' undeclared (first use in this function) acpi.c:463: ACPI_DBGPT_SIG' undeclared (first use in this function) acpi.c:463: ACPI_DBGPT_SIG_LEN' undeclared (first use in this function) acpi.c:404: warning: madt' might be used uninitialized in this function
Re: [Linux-ia64] kernel update (relative to 2.4.14)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> On Mon, 5 Nov 2001 22:59:53 -0800,
Quoted 2 lines · Keith> David Mosberger <[email protected]> wrote:
Quoted 2 lines
linux-2.4.14-ia64-011105.diff*
- support non-legacy serial ports via ACPI
Keith> Select CONFIG_SERIAL_ACPI, get these errors.
Keith> acpi.c: In function `acpi20_parse':
Keith> acpi.c:462: `ACPI_SPCRT_SIG' undeclared (first use in this function) Keith> acpi.c:462: (Each undeclared identifier is reported only once Keith> acpi.c:462: for each function it appears in.)
Keith> acpi.c:462: ACPI_SPCRT_SIG_LEN' undeclared (first use in this function) Keith> acpi.c:463: ACPI_DBGPT_SIG' undeclared (first use in this function) Keith> acpi.c:463: ACPI_DBGPT_SIG_LEN' undeclared (first use in this function) Keith> acpi.c:404: warning: madt' might be used uninitialized in this function
Yes, the patch that was mailed to me had the attached hunk missing. If you apply it, it should compile.
--david
include/asm-ia64/acpi-ext.h +6 -0
@@ -195,6 +195,12 @@#define ACPI20_ENTRY_PIS_CPEI 3#define ACPI_MAX_PLATFORM_IRQS 4 +#define ACPI_SPCRT_SIG "SPCR" +#define ACPI_SPCRT_SIG_LEN 4 + +#define ACPI_DBGPT_SIG "DBGP" +#define ACPI_DBGPT_SIG_LEN 4 +extern int acpi20_parse (acpi20_rsdp_t *);extern int acpi_parse (acpi_rsdp_t *);extern const char *acpi_get_sysname (void );
[Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerAn updated ia64 patch for 2.4.16 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file:
linux-2.4.16-ia64-011126.diff*
change log:
- update for 2.4.15/2.4.16:
- add show_trace_task()
- lots of SGI SN updates (most in "sn" subdirectories)
- IA-32 brk() fix by Don Dugger
- drop some of the more cosmetic fixes (they will be in the 2.5 tree instead)
- fix EARLY_PRINTK (Tony Luck, I think)
- in iosapic.c, move RTE programming to a saner place (Alex Williamson)
- fix alignment of bootmap
- move machvec_init() a little earlier and call platform_cpu_init() at end of cpu_init() (Jack Steiner)
- swiotlb.c: support "page" member in scatterlist
- fix asm clobbers in spinlock.h
- add more ACPI tables to asm-ia64/acpi-ext.h
This kernel has been tested with gcc-3.0 on Big Sur and HP Ski simulator. As usual, your mileage may vary.
Enjoy,
--david
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerDavid Mosberger <[email protected]> writes:
|> An updated ia64 patch for 2.4.16 is now available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file: |> |> linux-2.4.16-ia64-011126.diff* |> |> change log: |> |> - update for 2.4.15/2.4.16: |> - add show_trace_task() |> - lots of SGI SN updates (most in "sn" subdirectories) |> - IA-32 brk() fix by Don Dugger |> - drop some of the more cosmetic fixes (they will be in the 2.5 tree |> instead) |> - fix EARLY_PRINTK (Tony Luck, I think) |> - in iosapic.c, move RTE programming to a saner place (Alex Williamson) |> - fix alignment of bootmap |> - move machvec_init() a little earlier and call platform_cpu_init() at |> end of cpu_init() (Jack Steiner) |> - swiotlb.c: support "page" member in scatterlist |> - fix asm clobbers in spinlock.h |> - add more ACPI tables to asm-ia64/acpi-ext.h |> |> This kernel has been tested with gcc-3.0 on Big Sur and HP Ski |> simulator. As usual, your mileage may vary.
You have renamed numnodes in mm/numa.c, but not in include/linux/mmzone.h, and there are many occurences of "extern int num_compact_nodes" all over the place. I'm wondering why it was renamed in the first place.
Andreas.
Signature · 4 lines
Andreas Schwab "And now for something [email protected] completely different." SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerQuoted 27 lines · Andreas Schwab
David Mosberger <[email protected]> writes:
|> An updated ia64 patch for 2.4.16 is now available at |> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file: |> |> linux-2.4.16-ia64-011126.diff* |> |> change log: |> |> - update for 2.4.15/2.4.16: |> - add show_trace_task() |> - lots of SGI SN updates (most in "sn" subdirectories) |> - IA-32 brk() fix by Don Dugger |> - drop some of the more cosmetic fixes (they will be in the 2.5 tree |> instead) |> - fix EARLY_PRINTK (Tony Luck, I think) |> - in iosapic.c, move RTE programming to a saner place (Alex Williamson) |> - fix alignment of bootmap |> - move machvec_init() a little earlier and call platform_cpu_init() at |> end of cpu_init() (Jack Steiner) |> - swiotlb.c: support "page" member in scatterlist |> - fix asm clobbers in spinlock.h |> - add more ACPI tables to asm-ia64/acpi-ext.h |> |> This kernel has been tested with gcc-3.0 on Big Sur and HP Ski |> simulator. As usual, your mileage may vary.
Quoted 5 lines
You have renamed numnodes in
mm/numa.c, but not ininclude/linux/mmzone.h, and there are many occurences of "extern intnum_compact_nodes" all over the place. I'm wondering why it was renamed in the first place.Andreas.
It was changed because numnodes is ambiguous. This is part of a significant numa/discontig memory change that will be submitted to the ia64 2.5 tree. This little piece came in as part of the SGI SN updates, since it's more clear, and the SN code has lots of references to it, and only a couple in the non-SN code. Of course, as you point out, I didn't get the mmzone.h change in right, I'll send an update for that.
The numa/discontig work is part of the Linux Scalability Effort that is on sourceforge. For details, see:
http://sourceforge.net/projects/discontig
The latest patch is:
http://prdownloads.sourceforge.net/discontig/discontig-2.4.14.gz
John
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerQuoted 11 lines
Quoted 5 lines
You have renamed numnodes in
mm/numa.c, but not ininclude/linux/mmzone.h, and there are many occurences of "extern intnum_compact_nodes" all over the place. I'm wondering why it was renamed in the first place.Andreas.
It was changed because numnodes is ambiguous. This is part of a significant numa/discontig memory change that will be submitted to the ia64 2.5 tree. This little piece came in as part of the SGI SN updates, since it's more clear, and the SN code has lots of references to it, and only a couple in the non-SN code.
Shoot. I didn't notice that other platforms also use this. I didn't mean to bite off that much. Below is a patch putting numnodes back in the non-SN files, and I'll let the numa/discontig effort sort out if they really want to change the name.
John
include/asm-ia64/acpi-ext.h +1 -1
@@ -297,7 +297,7 @@extern int pxm_to_nid_map[MAX_PXM_DOMAINS ];/* _PXM to logical node ID map */ extern int nid_to_pxm_map[PLAT_MAX_COMPACT_NODES ];/* logical node ID to _PXM map */ -extern int num_compact_nodes;/* total number of nodes in system */ +extern int numnodes;/* total number of nodes in system */ extern int num_memory_chunks;/* total number of memory chunks */ /*
mm/numa.c +1 -1
@@ -9,7 +9,7 @@#include <linux/mmzone.h> #include <linux/spinlock.h> -int num_compact_nodes =1 ;/* Initialized for UMA platforms */ +int numnodes =1 ;/* Initialized for UMA platforms */ static bootmem_data_t contig_bootmem_data;pg_data_t contig_page_data = { bdata: &contig_bootmem_data };
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerThe ia64 patch for 2.4.16 has been updated (in the usual place). The patch fixes the NUMA issue reported by Andreas. Also, there were a couple of cleanups which should make it in theory possible to use this source tree for building both x86 and ia64 kernels. Thanks to John Hesterberg for some of those patches. I suspect this will make some people happy and others unhappy (since it increases the patch size, slightly). But the additional changes required to the x86 specific files are so small that it shouldn't be a major issue.
--david
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerSorry about this out of date message. Due to my job upheaval at VA there was a period when there was no administrator for this list. That got resolved today and I've been clearing out old administrivia. I probably should have just deep six'd this message, oh well.
Quoted 6 lines · David Mosberger
Here is a long-awaited kernel update which brings us in sync with 2.4.10. As usual, it's available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.10-ia64-010924.diff*
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/652-0870x117
[Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerAn updated ia64 patch for 2.4.16 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.16-ia64-011214.diff*
change log (relative to 2.4.16+ia64-011128):
- Add /proc/sal/ support (Jesse Barnes)
- Add memory barrier before releasing a lock with clear_bit (Jack Steiner).
- Cache-align BKL (Jack Steiner).
- Fix kernel exit path to deliver only one signal at a time.
- Disable interrupts during re-scheduling & signal delivery checking.
- Fix performance bug in SW I/O TLB (Tony Luck)
- Fix couple of buglets in simeth and simserial (Stephane & me)
- Don't call consoles on APs until CPU is fully initialized (Andrew Morton, NOMURA, Jun'ichi, me)
Enjoy,
--david
arch/ia64/kernel/Makefile +1 -1
@@ -14,7 +14,7 @@ export-objs := ia64_ksyms.o obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o irq.o irq_ia64.o irq_lsapic.o ivt.o \ - machvec.o pal.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ + machvec.o pal.o process.o perfmon.o ptrace.o sal.o salinfo.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += iosapic.o obj-$(CONFIG_IA64_DIG) += iosapic.o
arch/ia64/kernel/entry.S +8 -5
@@ -521,6 +521,8 @@ ;; mov.ret.sptk rp=r14,.restart .restart: + // need_resched and signals atomic test +(pUser) rsm psr.i adds r17=IA64_TASK_NEED_RESCHED_OFFSET,r13 adds r18=IA64_TASK_SIGPENDING_OFFSET,r13 #ifdef CONFIG_PERFMON
@@ -539,8 +541,6 @@ (pUser) cmp.ne.unc p7,p0=r17,r0 // current->need_resched != 0? (pUser) cmp.ne.unc p8,p0=r18,r0 // current->sigpending != 0? ;; - adds r2=PT(R8)+16,r12 - adds r3=PT(R9)+16,r12 #ifdef CONFIG_PERFMON (p9) br.call.spnt.many b7=pfm_block_on_overflow #endif
@@ -549,7 +549,10 @@ #else (p7) br.call.spnt.many b7=schedule #endif -(p8) br.call.spnt.many b7=handle_signal_delivery // check & deliver pending signals +(p8) br.call.spnt.many rp=handle_signal_delivery // check & deliver pending signals (once) + ;; +.ret9: adds r2=PT(R8)+16,r12 + adds r3=PT(R9)+16,r12 ;; // start restoring the state saved on the kernel stack (struct pt_regs): ld8.fill r8=[r2],16
@@ -582,7 +585,7 @@ ld8.fill r30=[r2],16 ld8.fill r31=[r3],16 ;; - rsm psr.i | psr.ic // initiate turning off of interrupts & interruption collection + rsm psr.i | psr.ic // initiate turning off of interrupt and interruption collection invala // invalidate ALAT ;; ld8 r1=[r2],16 // ar.ccv
@@ -601,7 +604,7 @@ mov ar.fpsr=r13 mov b0=r14 ;; - srlz.i // ensure interrupts & interruption collection are off + srlz.i // ensure interruption collection is off mov b7=r15 ;; bsw.0 // switch back to bank 0
arch/ia64/kernel/irq.c +1 -0
@@ -291,6 +291,7 @@break ;/* Duh, we have to loop. Release the lock to avoid deadlocks */ +smp_mb__before_clear_bit ();/* need barrier before releasing lock... */ clear_bit (0 ,&global_irq_lock);for (;;) {
arch/ia64/kernel/sal.c +11 -8
@@ -18,7 +18,8 @@#include <asm/sal.h> #include <asm/pal.h> -spinlock_t sal_lock =SPIN_LOCK_UNLOCKED ; +spinlock_t sal_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; +unsigned long sal_platform_features; static struct { void *addr; /* function entry point */
@@ -76,7 +77,7 @@return str; } -static void __init +static void __init ia64_sal_handler_init (void *entry_point,void *gpval) {/* fill in the SAL procedure descriptor and point ia64_sal to it: */
@@ -102,7 +103,7 @@if (strncmp (systab->signature,"SST_" ,4 ) !=0 )printk ("bad signature in system table!" ); -/* +/* * revisions are coded in BCD, so %x does the job for us */ printk("SAL v%x.%02x: oem=%.32s, product=%.32s\n",
@@ -152,12 +153,12 @@case SAL_DESC_PLATFORM_FEATURE : {struct ia64_sal_desc_platform_feature *pf = (void *) p; + sal_platform_features = pf->feature_mask;printk ("SAL: Platform features " ); -if (pf->feature_mask & (1 <<0 )) +if (pf->feature_mask &IA64_SAL_PLATFORM_FEATURE_BUS_LOCK )printk ("BusLock " ); - -if (pf->feature_mask & (1 <<1 )) { +if (pf->feature_mask &IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT ) {printk ("IRQ_Redirection " );#ifdef CONFIG_SMP if (no_int_routing)
@@ -166,15 +167,17 @@ smp_int_redirect |=SMP_IRQ_REDIRECTION ;#endif } -if (pf->feature_mask & (1 <<2 )) { +if (pf->feature_mask &IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT ) {printk ("IPI_Redirection " );#ifdef CONFIG_SMP -if (no_int_routing) +if (no_int_routing) smp_int_redirect &= ~SMP_IPI_REDIRECTION ;else smp_int_redirect |=SMP_IPI_REDIRECTION ;#endif } +if (pf->feature_mask &IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT ) +printk ("ITC_Drift " );printk ("\n" );break ; }
arch/ia64/kernel/salinfo.c +105 -0
105 lines not on this page · raw message
arch/ia64/kernel/smp.c +1 -1
@@ -51,7 +51,7 @@#include <asm/mca.h> /* The 'big kernel lock' */ -spinlock_t kernel_flag =SPIN_LOCK_UNLOCKED ; +spinlock_t kernel_flag __cacheline_aligned = SPIN_LOCK_UNLOCKED;/* * Structure and data for smp_call_function(). This is designed to minimise static memory
arch/ia64/lib/swiotlb.c +25 -7
@@ -27,6 +27,16 @@#define ALIGN (val, align) ((unsigned long) \ (((unsigned long) (val) + ((align) - 1)) & ~((align) - 1))) +#define OFFSET (val,align) ((unsigned long) \ + ( (val) & ( (align) - 1))) + +/* +* Maximum allowable number of contiguous slabs to map, +* must be a power of 2. What is the appropriate value ? +* The complexity of {map,unmap}_single is linearly dependent on this value. +*/ +#define IO_TLB_SEGSIZE 128 +/* * log of the size of each IO TLB slab. The number of slabs is command line controllable. */
@@ -65,10 +75,15 @@ setup_io_tlb_npages (char *str) { io_tlb_nslabs =simple_strtoul (str,NULL ,0 ) << (PAGE_SHIFT -IO_TLB_SHIFT ); + +/* avoid tail segment of size < IO_TLB_SEGSIZE */ + io_tlb_nslabs =ALIGN (io_tlb_nslabs,IO_TLB_SEGSIZE ); +return 1 ; }__setup ("swiotlb=" , setup_io_tlb_npages); +/* * Statically reserve bounce buffer space and initialize bounce buffer data structures for * the software IO TLB used to implement the PCI DMA API.
@@ -88,12 +103,12 @@/* * Allocate and initialize the free list array. This array is used -* to find contiguous free memory regions of size 2^IO_TLB_SHIFT between -* io_tlb_start and io_tlb_end. +* to find contiguous free memory regions of size up to IO_TLB_SEGSIZE +* between io_tlb_start and io_tlb_end. */ io_tlb_list =alloc_bootmem (io_tlb_nslabs *sizeof (int ));for (i =0 ; i < io_tlb_nslabs; i++) - io_tlb_list[i] = io_tlb_nslabs - i; + io_tlb_list[i] =IO_TLB_SEGSIZE -OFFSET (i,IO_TLB_SEGSIZE ); io_tlb_index =0 ; io_tlb_orig_addr =alloc_bootmem (io_tlb_nslabs *sizeof (char *));
@@ -120,7 +135,7 @@if (size > (1 <<PAGE_SHIFT )) stride = (1 << (PAGE_SHIFT -IO_TLB_SHIFT ));else - stride = nslots; + stride =1 ;if (!nslots)BUG ();
@@ -147,7 +162,8 @@for (i = index; i < index + nslots; i++) io_tlb_list[i] =0 ; -for (i = index -1 ; (i >=0 ) && io_tlb_list[i]; i--) +for (i = index -1 ; (OFFSET (i,IO_TLB_SEGSIZE ) !=IO_TLB_SEGSIZE -1 ) + && io_tlb_list[i]; i--) io_tlb_list[i] = ++count; dma_addr = io_tlb_start + (index <<IO_TLB_SHIFT );
@@ -213,7 +229,8 @@*/ spin_lock_irqsave (&io_tlb_lock, flags); { -int count = ((index + nslots) < io_tlb_nslabs ? io_tlb_list[index + nslots] :0 ); +int count = ((index + nslots) <ALIGN (index +1 ,IO_TLB_SEGSIZE ) ? + io_tlb_list[index + nslots] :0 );/* * Step 1: return the slots to the free list, merging the slots with * superceeding slots
@@ -224,7 +241,8 @@* Step 2: merge the returned slots with the preceeding slots, if * available (non zero) */ -for (i = index -1 ; (i >=0 ) && io_tlb_list[i]; i--) +for (i = index -1 ; (OFFSET (i,IO_TLB_SEGSIZE ) !=IO_TLB_SEGSIZE -1 ) && + io_tlb_list[i]; i--) io_tlb_list[i] = ++count; }spin_unlock_irqrestore (&io_tlb_lock, flags);
drivers/char/simserial.c +1 -1
@@ -958,7 +958,7 @@ state->port, state->irq); } -int rs_read_proc (char *page,char **start,off_t off,int count, +static int rs_read_proc (char *page,char **start,off_t off,int count,int *eof,void *data) {int i, len =0 , l;
drivers/net/simeth.c +15 -78
176 lines not on this page · raw message
include/asm-ia64/bitops.h +2 -2
@@ -57,10 +57,10 @@ }/* -* clear_bit() doesn't provide any barrier for the compiler. +* clear_bit() has "acquire" semantics. */ #define smp_mb__before_clear_bit () smp_mb() -#define smp_mb__after_clear_bit () smp_mb() +#define smp_mb__after_clear_bit () do {/* skip */ ; }while (0 )/** * clear_bit - Clears a bit in memory
include/asm-ia64/hardirq.h +1 -0
@@ -70,6 +70,7 @@/* if we didn't own the irq lock, just ignore.. */ if (global_irq_holder = cpu) { global_irq_holder =NO_PROC_ID ; +smp_mb__before_clear_bit ();/* need barrier before releasing lock... */ clear_bit (0 ,&global_irq_lock); } }
include/asm-ia64/sal.h +3 -0
@@ -149,6 +149,7 @@#define IA64_SAL_PLATFORM_FEATURE_BUS_LOCK (1 << 0)#define IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT (1 << 1)#define IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT (1 << 2) +#define IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT (1 << 3) typedef struct ia64_sal_desc_platform_feature { u8 type;
@@ -775,5 +776,7 @@ *scratch_buf_size_needed = isrv.v1; return isrv.status; } + +extern unsigned long sal_platform_features;#endif /* _ASM_IA64_PAL_H */
include/asm-ia64/spinlock.h +5 -5
@@ -159,10 +159,10 @@ :: "r"(rw) : "ar.ccv", "p7", "r2", "r29", "memory"); \ } while(0) -/* -* clear_bit() has "acq" semantics; we're really need "rel" semantics, -* but for simplicity, we simply do a fence for now... - */ -#define write_unlock (x) ({clear_bit(31, (x)); mb();}) +#define write_unlock(x) \ +({ \ +smp_mb__before_clear_bit ();/* need barrier before releasing lock... */ \ +clear_bit (31 , (x)); \ +})#endif /* _ASM_IA64_SPINLOCK_H */
include/asm-ia64/system.h +4 -0
@@ -405,6 +405,10 @@ia64_psr (ia64_task_regs (prev))->dfh =1 ; \__switch_to (prev,next,last); \ } while (0) + +/* Return true if this CPU can call the console drivers in printk() */ +#define arch_consoles_callable () (cpu_online_map & (1UL << smp_processor_id())) +#else # define switch_to (prev,next,last) do { \ ia64_psr(ia64_task_regs(next))->dfh = (ia64_get_fpu_owner() != (next)); \
kernel/printk.c +13 -0
@@ -38,6 +38,10 @@#define LOG_BUF_MASK (LOG_BUF_LEN-1) +#ifndef arch_consoles_callable +#define arch_consoles_callable () (1) +#endif +/* printk's without a loglevel use this.. */ #define DEFAULT_MESSAGE_LOGLEVEL 4/* KERN_WARNING */
@@ -445,6 +449,14 @@ log_level_unknown =1 ; } +if (!arch_consoles_callable ()) { +/* +* On some architectures, the consoles are not usable +* on secondary CPUs early in the boot process. +*/ +spin_unlock_irqrestore (&logbuf_lock, flags); + goto out; + }if (!down_trylock (&console_sem)) {/* * We own the drivers. We can drop the spinlock and let
@@ -461,6 +473,7 @@*/ spin_unlock_irqrestore (&logbuf_lock, flags); } +out:return printed_len; }EXPORT_SYMBOL (printk);
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerQuoted 4 lines · David Mosberger
An updated ia64 patch for 2.4.16 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.16-ia64-011214.diff*
David, any reason you did not put that diff under /v2.4?
RE: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerQuoted 2 lines · David Mosberger
Here is a long-awaited kernel update which brings us in sync with 2.4.10. As usual, it's available at
...
Quoted 3 lines
with these fixes in place, I'm able to successfully run the ia32 versions of realplay, OpenOffice, mozilla, netscape, acrobat, strace, Intel compilers, etc. But as usual, your mileage may vary.
I'm trying to run the Intel compiler for IA32 on an IA64 machine, kernel version 2.4.10. Compilation works fine, but on the link stage I get errors which indicate that the linker is trying to link IA64 libraries with the IA32 object file created at the compilation stage. For instance -
/opt/intel/compiler60/ia32/lib/libcxa.so.1(*ABS*+0x722f0): multiple definition of `_DYNAMIC'
/usr/lib/crt1.o(.dynamic+0x0): first defined here
and, more explicitly put -
ld: hello.o: linking 64-bit files with 32-bit files Bad value: failed to merge target specific data of file hello.o
I guess it only an environment variable or command line switch that fixes the problem. Does anyone know how to fix it ?
TIA,
Yoav.
-----------------------------------------------
Yoav Zach
Phone: 972 4 865 5112 Mail: [email protected]
Re: [Linux-ia64] kernel update (relative to 2.4.10)
In reply to David MosbergerYoav-
It looks to me like your Intel compile thinks it's the default compiler and it is therefore going to the default places to find things, like libraries and what not. I know how to fix this for GCC but I'm not that familiar with the Intel compiler anymore.
The best solution is to install the Intel compile in such a way that it finds the appropriate IA32 objects. You'll probably have to talk to your Intel compiler supplier about that. (I just noticed that you have an Intel address. Talk to the compiler group, they can tell you how to do this.)
As an interim solution I believe that the Intel compiler driver program, cc', merely spawns off different programs to do the different phases of the compilation process, passing appropriate parameters to the different programs. If memory serves the parameter -#' will print out each command and its arguments. You can do this, see what the actual link command is and then manually execute the linker with parameters that point to IA32 objects.
Quoted 41 lines · Yoav
Quoted 2 lines · David Mosberger
Here is a long-awaited kernel update which brings us in sync with 2.4.10. As usual, it's available at
...
Quoted 3 lines
with these fixes in place, I'm able to successfully run the ia32 versions of realplay, OpenOffice, mozilla, netscape, acrobat, strace, Intel compilers, etc. But as usual, your mileage may vary.
I'm trying to run the Intel compiler for IA32 on an IA64 machine, kernel version 2.4.10. Compilation works fine, but on the link stage I get errors which indicate that the linker is trying to link IA64 libraries with the IA32 object file created at the compilation stage. For instance -
/opt/intel/compiler60/ia32/lib/libcxa.so.1(*ABS*+0x722f0): multiple definition of `_DYNAMIC'
/usr/lib/crt1.o(.dynamic+0x0): first defined hereand, more explicitly put -
ld: hello.o: linking 64-bit files with 32-bit files Bad value: failed to merge target specific data of file hello.o
I guess it only an environment variable or command line switch that fixes the problem. Does anyone know how to fix it ?
TIA,
Yoav.-----------------------------------------------
Yoav ZachPhone: 972 4 865 5112 Mail: [email protected]_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/652-0870x117
Re: [Linux-ia64] kernel update (relative to 2.4.16)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens
Keith> On Fri, 14 Dec 2001 21:13:46 -0800, David Mosberger
Quoted 4 lines · Keith> <[email protected]> wrote:
Quoted 4 lines
An updated ia64 patch for 2.4.16 is now available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/ in file:
linux-2.4.16-ia64-011214.diff*
Keith> David, any reason you did not put that diff under /v2.4?
Old habits + lack of sleep. ;-}
It's fixed now.
Thanks,
--david
[Linux-ia64] kernel update (relative to v2.4.17)
In reply to David MosbergerThe ia64 patch for v2.4.17 is now at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file:
linux-2.4.17-ia64-011226.diff*
This is mostly a sync up with 2.4.17 and has few other changes (as far as I recall, anyhow...). The patch has been tested only on Big Sur, but I don't expect any major problems with Lion (or HP simulator). (Yeah, famous last words...).
Happy New Year,
--david
Re: [Linux-ia64] kernel update (relative to v2.4.17)
In reply to David MosbergerHi,
Quoted 2 lines
The ia64 patch for v2.4.17 is now at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file:
I had to apply the patch below to compile with CONFIG_DEVFS_GUID.
Index: fs/devfs/base.c
=================================RCS file: /home/cvsadm/cvsroot/linux/fs/devfs/base.c,v retrieving revision 1.1.1.16.2.1
devfs/base.c +1 -1
@@ -2186,7 +2186,7 @@ slave = master->slave;if (slave) { master->slave =NULL ; -unregister (slave); +unregister (slave->parent, slave); }; }#endif /* CONFIG_DEVFS_GUID */
Best regards.
--
NOMURA, Jun'ichi <[email protected], [email protected]> HPC Operating System Group, 1st Computers Software Division, Computers Software Operations Unit, NEC Solutions.
[Linux-ia64] kernel update (relative to v2.4.17)
In reply to David MosbergerHi,
I had to make the following change for it to compile on UP:
ia64/kernel/setup.c Thu Dec 27 22:49:45 2001 renamed from ia64/kernel/setup.c.org Thu Dec 27 22:39:49 2001 +2 -0
@@ -488,7 +488,9 @@ identify_cpu (struct cpuinfo_ia64 *c) cpuid.bits[i] = ia64_get_cpuid(i); memcpy(c->vendor, cpuid.field.vendor, 16); +#ifdef CONFIG_SMP c->processor = smp_processor_id(); +#endif c->ppn = cpuid.field.ppn; c->number = cpuid.field.number; c->revision = cpuid.field.revision;
regards,
chris
RE: [Linux-ia64] kernel update (relative to v2.4.17)
In reply to David MosbergerQuoted 1 line
I had to apply the patch below to compile with
CONFIG_DEVFS_GUID.
For what aer you using CONFIG_DEVFS_GUID? It's going to go away soon by agreement of the author...
-Matt
Signature · 5 lines
Matt Domsch Sr. Software Engineer Dell Linux Solutions www.dell.com/linux #1 US Linux Server provider with 24.5% (IDC Dec 2001) #2 Worldwide Linux Server provider with 18.5% (IDC Dec 2001)
Re: [Linux-ia64] kernel update (relative to v2.4.17)
In reply to David MosbergerQuoted 2 lines
For what aer you using
CONFIG_DEVFS_GUID? It's going to go away soon by agreement of the author...
I used it for GPT related testing/trouble-shooting as an easy way to see whether linux takes the broken partition table as GPT or not. I'm ok if it'll be removed.
Best regards.
--
NOMURA, Jun'ichi <[email protected], [email protected]> HPC Operating System Group, 1st Computers Software Division, Computers Software Operations Unit, NEC Solutions.
[Linux-ia64] kernel update (relative to 2.5.3)
In reply to David MosbergerA quick patch relative to v2.5.3 is now at ftp.CC.kernel.org in /pub/linux/kernel/ports/ia64/v2.5/:
linux-2.5.3-ia64-020207.gz
It's mostly a sync up with the many v2.5.3 changes plus assorted other patches folks have sent me over the last couple of days and weeks (including a large perfmon update from Stephane).
Caveats: this should give you a working kernel for the HP simulator and Big Sur, but I have tried SMP only and haven't done a lot of testing. I think NFS may be broken at the moment. Also, this kernel by default turns off execute permission on the stack and data segments. For applications that (incorrectly) assume that data is executable by default, a workaround can be enabled by turning on a bit in the ELF executable header. The attached program can be used to manipulate the bit in question.
IMPORTANT: The current XFree86 server suffers from the problem of assuming data is executable. To fix this, run the command:
# chatr -E /usr/X11R6/bin/XFree86
and you should be all set.
Enjoy,
--david
<-- chatr.c --><-- chatr.c --><-- chatr.c --><-- chatr.c --> #include <elf.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#ifndef EF_IA_64_LINUX_EXECUTABLE_STACK
# define EF_IA_64_LINUX_EXECUTABLE_STACK 0x1 #endif
static struct option long_options[] = {
{"executable-stack", 0, 0, 'E'},
{"help", 0, 0, 'h'},
{"no-executable-stack", 0, 0, 'e'},
};
static const char *prog_name;
static void
usage (FILE *fp)
{
fprintf (fp, "Usage: %s [-eEh] files...\n"
"\t-e: mark stack and data of image as not executable\n" "\t-E: mark stack and data of image as executable\n" "\t-h: print this help message\n", prog_name);
}
static voidupdate_file (const char *filename, int executable_stack) {
Elf64_Ehdr ehdr;
ssize_t ret;
int fd;
fd = open (filename, executable_stack ? O_RDWR : O_RDONLY);
if (fd < 0)
{
perror (filename);
exit (-1);
} ret = read (fd, &ehdr, sizeof (ehdr));
if (ret != sizeof (ehdr))
{
if (ret < 0)
perror (filename);
else
fprintf (stderr, "%s: short read\n", filename);
exit (-1);
} if (executable_stack = 0)
{
printf ("%s:\n\tstack and data executable: %s\n", filename,
(ehdr.e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) ? "yes" : "no");
return;
} if (executable_stack = 1)
ehdr.e_flags |= EF_IA_64_LINUX_EXECUTABLE_STACK;
else
ehdr.e_flags &= ~EF_IA_64_LINUX_EXECUTABLE_STACK;
if (lseek (fd, 0, SEEK_SET) < 0)
{
perror ("lseek");
exit (-1);
} ret = write (fd, &ehdr, sizeof (ehdr));
if (ret != sizeof (ehdr))
{
perror ("write");
exit (-1);
}
}int
main (int argc, char **argv)
{
int ch, executable_stack = 0;
extern int optind;
prog_name = argv[0];
if (argc < 2)
{
usage (stderr);
exit (-1);
}while (1)
{
ch = getopt_long (argc, argv, "eEh", long_options, NULL);
if (ch = -1)
break;
switch (ch)
{
case 'e': executable_stack = -1; break;
case 'E': executable_stack = 1; break;
case 'h': usage (stdout); exit (0);
}
} while (optind < argc)
update_file (argv[optind++], executable_stack); return 0;
}
[Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerThe latest ia64 patch is now availabe at ftp.CC.kernel.org in /pub/linux/kernel/ports/ia64/v2.4/:
linux-2.4.18-ia64-020226.gz
IMPORTANT:
Starting with this patch, the stack and and pages are no longer executable by default! This will hopefully increase resilience against buffer-overflow attacks (though it's no guarantee) and also has the benefit that it lets us drop the lazy-execute bit support. The latter has two implications: we can use the standard page-fault handler again and applications that generate code on the fly are no longer penalized with extra page faults. On the downside, there is currently a known bug in the XFree86 server where it incorrectly assumes that data pages are executable by default. For this reason, you'll need to use the chatr utility which I posted earlier to mark the XFree86 server as having executable data. A command of the form:
$ chatr --executable-stack /usr/X11R6/bin/XFree86
should do the trick (source code for chatr is appended). You must do this as otherwise XFree86 will die while trying to load some of its modules (it normally dies in the scanpci module).
Other than that, here is a summary of changes (my apologies if I missed anything or misattributed a patch):
- better ia64 IRQ affinity support (Erich Focht)
- include Firewire configuration for ia64 (Bdale Garbee/Grant Grundler)
- fix ia32 GDT initialization (Don Dugger)
- implement ia32 emulation for SIOCGIFCONF (Don Dugger)
- make page fault handler pass reason for a SIGSEGV/SIGILL in siginfo.si_isr (see include/asm-ia64/siginfo.h for details)
- /proc/efivars update (Matt Domsch)
- fix I/O SAPIC irq routing (makes ACPI power button events work) (J.I. Lee)
- fix exception handler to not assume that archdata_start is non-NULL for all modules (Bjorn Helgaas)
- don't define _HAVE_ARCH_IPV6_CSUM as we don't really have it (Bdale Garbee/Grant Grunderl)
- drop .bias from ld4.bias instruction in spinlock code to avoid CPU errata (Asit Mallick)
- MCA update (Jenna Hall)
- update perfmon to v1.0 (Stephane Eranian)
- add PTRACE_GETREGS/PTRACE_SETREGS (Yoav Zach)
- fix handling of .label_state/.copy_state in kernel unwinder
- move initial kernel stack from region 4 down to region 3
- bump gcc3.x inlining threshold to 2000 to get things to compile with gcc3.1
- don't make ia64 stack and data executable by default and drop lazy-execute bit support; restore original interface for page-fault handler
- fix clone2() stack initialization bug found by Asit Mallick
- fix siginfo kernel data leaking
- fix alternate TLB miss handlers to not lose Exception Deferral bit
This patch has been tested on Big Sur and HP Ski simulator in SMP and UP and with gcc3.0 and gcc2.96. YMMV.
Oh, I also included in the ia64 patch the personality fix which was accidentally got dropped from 2.4.18 (it was in -rc4). Also, I synced the drm-4.0 code with Marcelo's tree, but I haven't done any testing on it.
Enjoy,
--david
<-- chatr.c -->
#include <elf.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#ifndef EF_IA_64_LINUX_EXECUTABLE_STACK
# define EF_IA_64_LINUX_EXECUTABLE_STACK 0x1 #endif
static struct option long_options[] = {
{"executable-stack", 0, 0, 'E'},
{"help", 0, 0, 'h'},
{"no-executable-stack", 0, 0, 'e'},
};
static const char *prog_name;
static void
usage (FILE *fp)
{
fprintf (fp, "Usage: %s [-eEh] files...\n"
"\t-e: mark stack and data of image as not executable\n" "\t-E: mark stack and data of image as executable\n" "\t-h: print this help message\n", prog_name);
}
static voidupdate_file (const char *filename, int executable_stack) {
Elf64_Ehdr ehdr;
ssize_t ret;
int fd;
fd = open (filename, executable_stack ? O_RDWR : O_RDONLY);
if (fd < 0)
{
perror (filename);
exit (-1);
} ret = read (fd, &ehdr, sizeof (ehdr));
if (ret != sizeof (ehdr))
{
if (ret < 0)
perror (filename);
else
fprintf (stderr, "%s: short read\n", filename);
exit (-1);
} if (executable_stack = 0)
{
printf ("%s:\n\tstack and data executable: %s\n", filename,
(ehdr.e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) ? "yes" : "no");
return;
} if (executable_stack = 1)
ehdr.e_flags |= EF_IA_64_LINUX_EXECUTABLE_STACK;
else
ehdr.e_flags &= ~EF_IA_64_LINUX_EXECUTABLE_STACK;
if (lseek (fd, 0, SEEK_SET) < 0)
{
perror ("lseek");
exit (-1);
} ret = write (fd, &ehdr, sizeof (ehdr));
if (ret != sizeof (ehdr))
{
perror ("write");
exit (-1);
}
}int
main (int argc, char **argv)
{
int ch, executable_stack = 0;
extern int optind;
prog_name = argv[0];
if (argc < 2)
{
usage (stderr);
exit (-1);
}while (1)
{
ch = getopt_long (argc, argv, "eEh", long_options, NULL);
if (ch = -1)
break;
switch (ch)
{
case 'e': executable_stack = -1; break;
case 'E': executable_stack = 1; break;
case 'h': usage (stdout); exit (0);
}
} while (optind < argc)
update_file (argv[optind++], executable_stack); return 0;
}
[Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"David" = David Mosberger <[email protected]> writes:
David> The latest ia64 patch is now availabe at ftp.CC.kernel.org in David> /pub/linux/kernel/ports/ia64/v2.4/:
With this patched kernel, one cannot configure the loop device when using the HP simulator.
I moved the line that sourced the block-device config script outside the HP_SIM guards, as in the appended patch.
ia64/config.in renamed from usr/src/linux-2.4.18/arch/ia64/config.in +1 -1
@@ -134,7 +134,7 @@ source drivers/mtd/Config.in source drivers/pnp/Config.in -source drivers/block/Config.in source drivers/message/i2o/Config.in source drivers/md/Config.in
@@ -152,6 +152,7 @@ endmenu fi # !HP_SIM +source drivers/block/Config.in mainmenu_option next_comment comment 'SCSI support'
Re: [Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Peter Chubb
"David" = David Mosberger <[email protected]> writes:
David> The latest ia64 patch is now availabe at ftp.CC.kernel.org in David> /pub/linux/kernel/ports/ia64/v2.4/:
Peter> With this patched kernel, one cannot configure the loop device when Peter> using the HP simulator.
Peter> I moved the line that sourced the block-device config script outside Peter> the HP_SIM guards, as in the appended patch.
Hmmh, I'm a bit reluctant to do this, as it will pull in all the other drivers, 99% of which won't build. How about just including the loopback prompt directly in the ia64 config? If this works, send me a patch and I'll include it. (Yes, I realize that's kludgy, but presumably this will all get cleaned up if and when the new kernel configuration makes it into 2.5).
--david
Re: [Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"David" = David Mosberger <[email protected]> writes:
David> The latest ia64 patch is now availabe at ftp.CC.kernel.org in David> /pub/linux/kernel/ports/ia64/v2.4/:
Peter> With this patched kernel, one cannot configure the loop device Peter> when using the HP simulator.
Peter> I moved the line that sourced the block-device config script Peter> outside the HP_SIM guards, as in the appended patch.
David> Hmmh, I'm a bit reluctant to do this, as it will pull in all David> the other drivers, 99% of which won't build. How about just David> including the loopback prompt directly in the ia64 config? If David> this works, send me a patch and I'll include it. (Yes, I David> realize that's kludgy, but presumably this will all get cleaned David> up if and when the new kernel configuration makes it into 2.5).
OK, Here it is. We probably need to do something similar for the scsi config. This patch is against a 2.4.18 kernel with the IA64 patch.
arch/ia64/config.in +11 -0
@@ -152,6 +152,17 @@ fi endmenu +else # ! HP_SIM +mainmenu_option next_comment +comment 'Block devices' +tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP +dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET + +tristate 'RAM disk support' CONFIG_BLK_DEV_RAM +if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then + int ' Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096 +fi +endmenu fi # !HP_SIM mainmenu_option next_comment
[Linux-ia64] kernel update (relative to 2.5.5)
In reply to David MosbergerOK, I finally got around to take another stab at 2.5.5. The result can be found at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.5/ in file:
linux-2.5.5-ia64-020307.diff.gz
This is mostly a sync up with 2.5.5, though all the changes that made it into 2.4.18 should be there as well. With this patch, the task memory has the following layout:
- "current" points to "struct task_struct"
- "struct thread_info" follows directly above "struct task_struct"
- rest of the memory is used for the kernel stack
I tested this on a dual Big Sur and the HP Ski simulator (SMP only).
--david
Re: [Linux-ia64] kernel update (relative to 2.5.5)
In reply to David MosbergerQuoted 5 lines · David Mosberger
OK, I finally got around to take another stab at 2.5.5. The result can be found at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.5/ in file:
linux-2.5.5-ia64-020307.diff.gz
# bzcat linux-2.5.5-ia64-020307.diff.bz2 | patch -p1 -E --quiet The next patch would create the file arch/mips/.gdbinit, which already exists! Assume -R? [n] Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file arch/mips/.gdbinit.rej
No big deal, the rejected patch is just trying to create exactly the same contents.
[Linux-ia64] kernel update (relative to v2.5.10)
In reply to David MosbergerThe latest ia64 kernel patch is at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.5/ in file:
linux-2.5.10-ia64-020426.diff.gz
This hasn't been tested very thoroughly but assuming bitkeeper didn't let me down, the patch should work. A summary of changes is below.
--david
<[email protected]> (02/04/25 1.531.11.11)
ia64: Fix merge errors in do_csum().
<[email protected]> (02/04/25 1.531.11.10)
ia64: Revert compile-time optimization for bzero().
<[email protected]> (02/04/25 1.531.11.9)
ia64: Add missing .prologue directive to ip_fast_csum().
<[email protected]> (02/04/25 1.531.11.8)
ia64: Add IA64_ISR_CODE_* macros from Ken's patch.
<[email protected]> (02/04/25 1.531.11.7)
ia64: Treat lfetch.fault like speculative loads as is required by the
architecture definition. Patch by Ken Chen.
<[email protected]> (02/04/25 1.531.11.6)
ia64: Change "McKinley" to "Itanium 2" for user-visible strings.
<[email protected]> (02/04/25 1.531.11.5)
ia64: Add optimized ip_fast_csum() by Ken Chen and merge his cleanups
to do_csum.S.
<[email protected]> (02/04/25 1.531.11.4)
[PATCH] This patch adds a help text for CONFIG_IA64_GRANULE_16MB.
<[email protected]> (02/04/25 1.531.11.3)
ia64: Make default behavior of SIGURG to ignore the signal, as per SUS.
<[email protected]> (02/04/24 1.531.11.2)
ia64: Update comments for E2BIG and TCSETS like for x86.
<[email protected]> (02/04/24 1.531.11.1)
ia64: Correct unwind info for signal trampoline.
<[email protected]> (02/04/23 1.489.12.3)
mpi_raid.h:
Rename: drivers/message/fusion/mpi_raid.h -> drivers/message/fusion/lsi/mpi_raid.h
<[email protected]> (02/04/23 1.489.12.2)
Make fusion driver work on 2.5.
<[email protected]> (02/04/23 1.489.11.5)
ia64: Make ACPI work again.
<[email protected]> (02/04/23 1.489.3.8)
ia64: Send SIGILL for break operands in range 0x3f000 to 0x3ffff to simplify dynamic bundle patching.
<[email protected]> (02/04/19 1.489.11.4)
Misc. ACPI and merge fixes.
<[email protected]> (02/04/19 1.489.3.7)
ia64: Fix ACPI/IOSAPIC breakage introduced by big ACPI update.
<[email protected]> (02/04/19 1.489.3.6)
[PATCH] The attached patch cleans up IA32 support a little. As it's impossible at present to compile and use IA32 support as a module, disallow that; and also provide dummy functions to remove compilation warnings if CONFIG_IA32_SUPPORT is off.
<[email protected]> (02/04/19 1.489.3.5)
[PATCH] Don't prefetch beyond end of patch to avoid bringing in cache-lines needlessly.
<[email protected]> (02/04/19 1.489.11.3)
Cset exclude: [email protected]|ChangeSet|20020315234532|54616
<[email protected]> (02/04/19 1.456.7.6)
agpgart_be.c:
ia64: Add missing parenthesis for the pdev
argument in "unused" attribute of the setup
routines.
<[email protected]> (02/04/19 1.489.12.1)
Update with latest version.
<[email protected]> (02/04/18 1.489.11.2)
ia64: Fix typo that prevented _PRT from being found on zx1.
<[email protected]> (02/04/18 1.489.3.4)
ia64: Include config file for fusion driver in arch/ia64/config.in.
<[email protected]> (02/04/16 1.489.3.3)
[PATCH] ia64: Correct copyright message in shub_md.h.
<[email protected]> (02/04/16 1.489.3.2)
ia64: Fix alloc_consistent() for zx1 platform to return <4GB memory as per DMA-mapping.txt. Patch by Alex Williamson.
[Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerThe latest ia64 kernel patch is at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.5/ in file:
linux-2.5.18-ia64-020530.diff.gz
This kernel seems to work quite well both on Itanium 1 and 2 and the HP simulator. I didn't move all the way to 2.5.19 since it seems to have some (small) problems which I expect Linus to fix quickly.
Enjoy,
--david
[Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"David" = David Mosberger <[email protected]> writes:
David> The latest ia64 kernel patch is at
David> ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.5/ in file:
David> linux-2.5.18-ia64-020530.diff.gz
Thanks David, but it doesn't compile for me. I'm seeing these problems
-- perfmon_itanium.h is missing. I used the one from the 2.4
tree.
-- With CONFIG_GENERIC, sba_iommu.c still doesn't compile because of the removal of the address field from the scatterlist. -- Again with CONFIG_GENERIC, there are problems:
include/asm/machvec.h:83:12: warning: pasting "machvec_hpsim" and "." does not give a valid preprocessing tokeninclude/asm/machvec_init.h:26: initializer element is not constant include/asm/machvec_init.h:26: (near initialization for machvec_hpsim.dma_supported') include/asm/machvec_init.h:26: __ia64_mmiob' undeclared here (not in a function) include/asm/machvec_init.h:26: initializer element is not constant
etc.
-- I think you need this little patch in ia64/kernel/signal.c otherwise the usual case will fall off the bottom of the function without a return value.
arch/ia64/kernel/signal.c renamed from tmp/geta23662 +1 -0
@@ -146,6 +146,7 @@if (from->si_code <0 ) {if (__copy_to_user (to, from,sizeof (siginfo_t)))return -EFAULT ; +return 0 ; }else {int err;
-- asm/suspend.h doesn't exist, so do_mounts.c won't compile. I just created an empty file.
-- With CONFIG_DIG I managed to get a compile, but haven;t yet had a chance to try it.
--
Peter C [email protected]
You are lost in a maze of BitKeeper repositories, all almost the same.
Re: [Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Peter Chubb
Peter> -- perfmon_itanium.h is missing. I used the one from the 2.4 Peter> tree.
My mistake. I added it now.
Peter> -- With CONFIG_GENERIC, sba_iommu.c still doesn't Peter> compile because of the removal of the address field from the Peter> scatterlist.
Yes. Grant said he's going to work on this.
Peter> -- Again with CONFIG_GENERIC, there are problems:
Peter> include/asm/machvec.h:83:12: warning: pasting "machvec_hpsim" Peter> and "." does not give a valid preprocessing token Peter> include/asm/machvec_init.h:26: initializer element is not Peter> constant include/asm/machvec_init.h:26: (near initialization Peter> for `machvec_hpsim.dma_supported')
Peter> include/asm/machvec_init.h:26: `__ia64_mmiob' undeclared here Peter> (not in a function) include/asm/machvec_init.h:26:
Peter> initializer element is not constant
I don't use GENERIC myself usually. A patch is always welcome, of course.
Peter> -- I think you need this little patch in
Peter> ia64/kernel/signal.c otherwise the usual case will fall off Peter> the bottom of the function without a return value.
Yes, indeed. Thanks for catching that.
Peter> -- asm/suspend.h doesn't exist, so do_mounts.c won't
Peter> compile. I just created an empty file.
Ah, yes. It's arguably a bug in 2.5, but it seems like Linus wants each arch to add that file, even if it's unused. I'll re-check next time I work on 2.5 and add it if it's still needed.
--david
Re: [Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerQuoted 9 lines
-- Again with
CONFIG_GENERIC, there are problems:
include/asm/machvec.h:83:12: warning: pasting "machvec_hpsim" and "." does not give a valid preprocessing tokeninclude/asm/machvec_init.h:26: initializer element is not constantinclude/asm/machvec_init.h:26: (near initialization for `machvec_hpsim.dma_supported')include/asm/machvec_init.h:26:
`__ia64_mmiob' undeclared here (not in a function)include/asm/machvec_init.h:26: initializer element is not constant
I forgot that you had run into these problems too. If you haven't alread fixed them, you can try the attached patch which I sent to David this morning.
Grant also fixed the sba_iommu.c problems, that patch is coming soon. Both are required to make the generic kernel build.
Signature · 82 lines
Bjorn Helgaas - bjorn_helgaas at hp.com
Linux Systems Operation R&D
Hewlett-Packard Company
diff -u -r -X /home/helgaas/exclude linux-2.5.18-ia64-020530.orig/arch/ia64/hp/zx1/hpzx1_machvec.c linux-2.5.18-ia64-020530/arch/ia64/hp/zx1/hpzx1_machvec.c
--- linux-2.5.18-ia64-020530.orig/arch/ia64/hp/zx1/hpzx1_machvec.c Fri May 24 19:55:24 2002
+++ linux-2.5.18-ia64-020530/arch/ia64/hp/zx1/hpzx1_machvec.c Thu Jun 6 10:37:14 2002
@@ -1,4 +1,2 @@
#define MACHVEC_PLATFORM_NAME hpzx1
#include <asm/machvec_init.h>
-#define MACHVEC_PLATFORM_NAME hpzx1
-#include <asm/machvec_init.h>
diff -u -r -X /home/helgaas/exclude linux-2.5.18-ia64-020530.orig/arch/ia64/lib/io.c linux-2.5.18-ia64-020530/arch/ia64/lib/io.c
--- linux-2.5.18-ia64-020530.orig/arch/ia64/lib/io.c Fri May 24 19:55:16 2002
+++ linux-2.5.18-ia64-020530/arch/ia64/lib/io.c Thu Jun 6 11:07:16 2002
@@ -87,6 +87,12 @@
__ia64_outl(val, port);
}
+void
+ia64_mmiob (void)
+{
+ __ia64_mmiob();
+}
+
/* define aliases: */
asm (".global __ia64_inb, __ia64_inw, __ia64_inl");
@@ -98,5 +104,8 @@
asm ("__ia64_outb = ia64_outb");
asm ("__ia64_outw = ia64_outw");
asm ("__ia64_outl = ia64_outl");
+
+asm (".global __ia64_mmiob");
+asm ("__ia64_mmiob = ia64_mmiob");
#endif /* CONFIG_IA64_GENERIC */
diff -u -r -X /home/helgaas/exclude linux-2.5.18-ia64-020530.orig/include/asm-ia64/machvec.h linux-2.5.18-ia64-020530/include/asm-ia64/machvec.h
--- linux-2.5.18-ia64-020530.orig/include/asm-ia64/machvec.h Thu Jun 6 10:11:46 2002
+++ linux-2.5.18-ia64-020530/include/asm-ia64/machvec.h Fri Jun 7 10:49:22 2002
@@ -210,6 +210,7 @@
extern ia64_mv_pci_dma_sync_single swiotlb_sync_single;
extern ia64_mv_pci_dma_sync_sg swiotlb_sync_sg;
extern ia64_mv_pci_dma_address swiotlb_dma_address;
+extern ia64_mv_pci_dma_supported swiotlb_pci_dma_supported;
/*
* Define default versions so we can extend machvec for new platforms without having
diff -u -r -X /home/helgaas/exclude linux-2.5.18-ia64-020530.orig/include/asm-ia64/machvec_init.h linux-2.5.18-ia64-020530/include/asm-ia64/machvec_init.h
--- linux-2.5.18-ia64-020530.orig/include/asm-ia64/machvec_init.h Thu Jun 6 10:22:38 2002
+++ linux-2.5.18-ia64-020530/include/asm-ia64/machvec_init.h Fri Jun 7 10:49:29 2002
@@ -16,6 +16,7 @@
extern ia64_mv_outb_t __ia64_outb;
extern ia64_mv_outw_t __ia64_outw;
extern ia64_mv_outl_t __ia64_outl;
+extern ia64_mv_mmiob_t __ia64_mmiob;
#define MACHVEC_HELPER(name) \
struct ia64_machine_vector machvec_##name __attribute__ ((unused, __section__ (".machvec"))) \
diff -u -r -X /home/helgaas/exclude linux-2.5.18-ia64-020530.orig/include/asm-ia64/page.h linux-2.5.18-ia64-020530/include/asm-ia64/page.h
--- linux-2.5.18-ia64-020530.orig/include/asm-ia64/page.h Thu Jun 6 09:54:16 2002
+++ linux-2.5.18-ia64-020530/include/asm-ia64/page.h Thu Jun 6 14:35:21 2002
@@ -56,6 +56,18 @@
flush_dcache_page(page); \
} while (0)
+/*
+ * Note: the MAP_NR_*() macro can't use __pa() because MAP_NR_*(X) MUST
+ * map to something >= max_mapnr if X is outside the identity mapped
+ * kernel space.
+ */
+
+/*
+ * The dense variant can be used as long as the size of memory holes isn't
+ * very big.
+ */
+#define MAP_NR_DENSE(addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)Re: [Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerQuoted 2 lines
-- With
CONFIG_GENERIC,sba_iommu.cstill doesn't compile because of the removal of the address field from the scatterlist.
Here's a patch to make sba_iommu work again.
I added dma_address and dma_length to struct scatterlist and removed orig_address. This brings IA64 in line with most other architectures, but required a few changes to swiotlb.
Grant Grundler did the sba_iommu.c updates.
Note that this isn't *quite* enough to make the generic kernel work on ZX1 boxes, because the ACPI in 2.5.18 barfs on a ZX1 _CRS method.
David, I've tested both the swiotlb (on i2000 and ZX1) and sba_iommu (on ZX1, with a kludge for the ACPI problem), and they seem to work fine.
--
Bjorn Helgaas - bjorn_helgaas at hp.com
Linux Systems Operation R&D
Hewlett-Packard Company
arch/ia64/hp/common/sba_iommu.c +157 -330
@@ -2,6 +2,7 @@ ** IA64 System Bus Adapter (SBA) I/O MMU manager ** ** (c) Copyright 2002 Alex Williamson +** (c) Copyright 2002 Grant Grundler ** (c) Copyright 2002 Hewlett-Packard Company ** ** Portions (c) 2000 Grant Grundler (from parisc I/O MMU code)
@@ -110,7 +111,7 @@*/ #define DELAYED_RESOURCE_CNT 16 -#define DEFAULT_DMA_HINT_REG 0 +#define DEFAULT_DMA_HINT_REG (d) 0#define ZX1_FUNC_ID_VALUE ((PCI_DEVICE_ID_HP_ZX1_SBA << 16) | PCI_VENDOR_ID_HP)#define ZX1_MC_ID ((PCI_DEVICE_ID_HP_ZX1_MC << 16) | PCI_VENDOR_ID_HP)
@@ -216,9 +217,10 @@static int reserve_sba_gart =1 ;static struct pci_dev sac_only_dev; -#define sba_sg_iova (sg) (sg->address) +#define sba_sg_address (sg) (page_address((sg)->page) + (sg)->offset)#define sba_sg_len (sg) (sg->length) -#define sba_sg_buffer (sg) (sg->orig_address) +#define sba_sg_iova (sg) (sg->dma_address) +#define sba_sg_iova_len (sg) (sg->dma_length)/* REVISIT - fix me for multiple SBAs/IOCs */ #define GET_IOC (dev) (sba_list->ioc)
@@ -232,7 +234,7 @@** rather than the HW. I/O MMU allocation alogorithms can be ** faster with smaller size is (to some degree). */ -#define DMA_CHUNK_SIZE (BITS_PER_LONG*PAGE_SIZE) +#define DMA_CHUNK_SIZE (BITS_PER_LONG*IOVP_SIZE)/* Looks nice and keeps the compiler happy */ #define SBA_DEV (d) ((struct sba_device *) (d))
@@ -255,7 +257,7 @@* sba_dump_tlb - debugging only - print IOMMU operating parameters * @hpa: base address of the IOMMU * -* Print the size/location of the IO MMU PDIR. +* Print the size/location of the IO MMU Pdir. */ static void sba_dump_tlb (char *hpa)
@@ -273,12 +275,12 @@#ifdef ASSERT_PDIR_SANITY /** -* sba_dump_pdir_entry - debugging only - print one IOMMU PDIR entry +* sba_dump_pdir_entry - debugging only - print one IOMMU Pdir entry * @ioc: IO MMU structure which owns the pdir we are interested in. * @msg: text to print ont the output line. * @pide: pdir index. * -* Print one entry of the IO MMU PDIR in human readable form. +* Print one entry of the IO MMU Pdir in human readable form. */ static void sba_dump_pdir_entry (struct ioc *ioc,char *msg,uint pide)
@@ -360,25 +362,25 @@* print the SG list so we can verify it's correct by hand. */ static void -sba_dump_sg (struct ioc *ioc,struct scatterlist *startsg,int nents) +sba_dump_sg (struct ioc *ioc,struct scatterlist *startsg,int nents) {while (nents-- >0 ) { -printk (" %d : %08lx/%05x %p\n" , +printk (" %d : DMA %08lx/%05x CPU %p\n" , nents, (unsigned long )sba_sg_iova (startsg), -sba_sg_len (startsg), -sba_sg_buffer (startsg)); +sba_sg_iova_len (startsg), +sba_sg_address (startsg)); startsg++; } }static void -sba_check_sg (struct ioc *ioc,struct scatterlist *startsg,int nents) +sba_check_sg (struct ioc *ioc,struct scatterlist *startsg,int nents) {struct scatterlist *the_sg = startsg;int the_nents = nents;while (the_nents-- >0 ) { -if (sba_sg_buffer (the_sg) =0x0UL ) +if (sba_sg_address (the_sg) =0x0UL )sba_dump_sg (NULL , startsg, nents); the_sg++; }
@@ -404,7 +406,6 @@#define SBA_IOVA (ioc,iovp,offset,hint_reg) ((ioc->ibase) | (iovp) | (offset) | ((hint_reg)<<(ioc->hint_shift_pdir)))#define SBA_IOVP (ioc,iova) (((iova) & ioc->hint_mask_pdir) & ~(ioc->ibase)) -/* FIXME : review these macros to verify correctness and usage */ #define PDIR_INDEX (iovp) ((iovp)>>IOVP_SHIFT)#define RESMAP_MASK (n) ~(~0UL << (n))
@@ -412,7 +413,7 @@/** -* sba_search_bitmap - find free space in IO PDIR resource bitmap +* sba_search_bitmap - find free space in IO Pdir resource bitmap * @ioc: IO MMU structure which owns the pdir we are interested in. * @bits_wanted: number of entries we need. *
@@ -449,7 +450,7 @@** We need the alignment to invalidate I/O TLB using ** SBA HW features in the unmap path. */ -unsigned long o =1 <<get_order (bits_wanted <<PAGE_SHIFT ); +unsigned long o =1 <<get_order (bits_wanted <<IOVP_SHIFT );uint bitshiftcnt =ROUNDUP (ioc->res_bitshift, o);unsigned long mask;
@@ -495,7 +496,7 @@/** -* sba_alloc_range - find free bits and mark them in IO PDIR resource bitmap +* sba_alloc_range - find free bits and mark them in IO Pdir resource bitmap * @ioc: IO MMU structure which owns the pdir we are interested in. * @size: number of bytes to create a mapping for *
@@ -557,7 +558,7 @@/** -* sba_free_range - unmark bits in IO PDIR resource bitmap +* sba_free_range - unmark bits in IO Pdir resource bitmap * @ioc: IO MMU structure which owns the pdir we are interested in. * @iova: IO virtual address which was previously allocated. * @size: number of bytes to create a mapping for
@@ -604,14 +605,14 @@/** -* sba_io_pdir_entry - fill in one IO PDIR entry -* @pdir_ptr: pointer to IO PDIR entry -* @vba: Virtual CPU address of buffer to map +* sba_io_pdir_entry - fill in one IO Pdir entry +* @pdir_ptr: pointer to IO Pdir entry +* @phys_page: phys CPU address of page to map * * SBA Mapping Routine * -* Given a virtual address (vba, arg1) sba_io_pdir_entry() -* loads the I/O PDIR entry pointed to by pdir_ptr (arg0). +* Given a physical address (phys_page, arg1) sba_io_pdir_entry() +* loads the I/O Pdir entry pointed to by pdir_ptr (arg0). * Each IO Pdir entry consists of 8 bytes as shown below * (LSB = bit 0): *
@@ -623,20 +624,12 @@* V = Valid Bit * U = Unused * PPN = Physical Page Number -* -* The physical address fields are filled with the results of virt_to_phys() -* on the vba. */ -#if 1 -#define sba_io_pdir_entry (pdir_ptr, vba) *pdir_ptr = ((vba & ~0xE000000000000FFFULL) | 0x80000000000000FFULL) -#else -void SBA_INLINE -sba_io_pdir_entry (u64 *pdir_ptr,unsigned long vba) -{ - *pdir_ptr = ((vba & ~0xE000000000000FFFULL ) |0x80000000000000FFULL ); -} -#endif +#define SBA_VALID_MASK 0x80000000000000FFULL +#define sba_io_pdir_entry (pdir_ptr, phys_page) *pdir_ptr = (phys_page | SBA_VALID_MASK) +#define sba_io_page (pdir_ptr) (*pdir_ptr & ~SBA_VALID_MASK) +#ifdef ENABLE_MARK_CLEAN /**
@@ -660,12 +653,12 @@#endif /** -* sba_mark_invalid - invalidate one or more IO PDIR entries +* sba_mark_invalid - invalidate one or more IO Pdir entries * @ioc: IO MMU structure which owns the pdir we are interested in. * @iova: IO Virtual Address mapped earlier * @byte_cnt: number of bytes this mapping covers. * -* Marking the IO PDIR entry(ies) as Invalid and invalidate +* Marking the IO Pdir entry(ies) as Invalid and invalidate * corresponding IO TLB entry. The PCOM (Purge Command Register) * is to purge stale entries in the IO TLB when unmapping entries. *
@@ -700,14 +693,14 @@ iovp |=IOVP_SHIFT ;/* set "size" field for PCOM */ /* -** clear I/O PDIR entry "valid" bit +** clear I/O Pdir entry "valid" bit ** Do NOT clear the rest - save it for debugging. ** We should only clear bits that have previously ** been enabled. */ - ioc->pdir_base[off] &= ~(0x80000000000000FFULL ); + ioc->pdir_base[off] &= ~SBA_VALID_MASK ; }else { -u32 t =get_order (byte_cnt) +PAGE_SHIFT ; +u32 t =get_order (byte_cnt) +IOVP_SHIFT ; iovp |= t;ASSERT (t <=31 );/* 2GB! Max value of "size" field */
@@ -716,7 +709,7 @@/* verify this pdir entry is enabled */ ASSERT (ioc->pdir_base[off] >>63 );/* clear I/O Pdir entry "valid" bit first */ - ioc->pdir_base[off] &= ~(0x80000000000000FFULL ); + ioc->pdir_base[off] &= ~SBA_VALID_MASK ; off++; byte_cnt -=IOVP_SIZE ; }while (byte_cnt >0 );
@@ -744,7 +737,7 @@u64 *pdir_start;int pide;#ifdef ALLOW_IOV_BYPASS -unsigned long pci_addr =virt_to_phys (addr); +unsigned long phys_addr =virt_to_phys (addr);#endif ioc =GET_IOC (dev);
@@ -754,7 +747,7 @@/* ** Check if the PCI device can DMA to ptr... if so, just return ptr */ -if ((pci_addr & ~dev->dma_mask) =0 ) { +if ((phys_addr & ~dev->dma_mask) =0 ) {/* ** Device is bit capable of DMA'ing to the buffer... ** just return the PCI address of ptr
@@ -765,8 +758,8 @@spin_unlock_irqrestore (&ioc->res_lock, flags);#endif DBG_BYPASS ("sba_map_single() bypass mask/addr: 0x%lx/0x%lx\n" , - dev->dma_mask, pci_addr); - return pci_addr; + dev->dma_mask, phys_addr); + return phys_addr; }#endif
@@ -799,7 +792,8 @@while (size >0 ) {ASSERT (((u8 *)pdir_start)[7 ] =0 );/* verify availability */ -sba_io_pdir_entry (pdir_start, (unsigned long ) addr); + +sba_io_pdir_entry (pdir_start,virt_to_phys (addr));DBG_RUN (" pdir 0x%p %lx\n" , pdir_start, *pdir_start);
@@ -812,7 +806,7 @@sba_check_pdir (ioc,"Check after sba_map_single()" );#endif spin_unlock_irqrestore (&ioc->res_lock, flags); -return SBA_IOVA (ioc, iovp, offset,DEFAULT_DMA_HINT_REG ); +return SBA_IOVA (ioc, iovp, offset,DEFAULT_DMA_HINT_REG (direction)); }/**
@@ -866,6 +860,29 @@ size += offset; size =ROUNDUP (size,IOVP_SIZE ); +#ifdef ENABLE_MARK_CLEAN +/* +** Don't need to hold the spinlock while telling VM pages are "clean". +** The pages are "busy" in the resource map until we mark them free. +** But tell VM pages are clean *before* releasing the resource +** in order to avoid race conditions. +*/ +if (direction =PCI_DMA_FROMDEVICE ) { +u32 iovp = (u32 )SBA_IOVP (ioc,iova); +unsigned int pide =PDIR_INDEX (iovp); +u64 *pdirp = &(ioc->pdir_base[pide]); +size_t byte_cnt = size; +void *addr; + +do { + addr =phys_to_virt (sba_io_page (pdirp)); +mark_clean (addr,min (byte_cnt,IOVP_SIZE )); + pdirp++; + byte_cnt -=IOVP_SIZE ; + }while (byte_cnt >0 ); + } +#endif +spin_lock_irqsave (&ioc->res_lock, flags);#ifdef CONFIG_PROC_FS ioc->usingle_calls++;
@@ -891,40 +908,7 @@sba_free_range (ioc, iova, size);READ_REG (ioc->ioc_hpa+IOC_PCOM );/* flush purges */ #endif /* DELAYED_RESOURCE_CNT = 0 */ -#ifdef ENABLE_MARK_CLEAN -if (direction =PCI_DMA_FROMDEVICE ) { -u32 iovp = (u32 )SBA_IOVP (ioc,iova); -int off =PDIR_INDEX (iovp); -void *addr; - -if (size <=IOVP_SIZE ) { - addr =phys_to_virt (ioc->pdir_base[off] & - ~0xE000000000000FFFULL ); -mark_clean (addr, size); - }else { -size_t byte_cnt = size; - -do { - addr =phys_to_virt (ioc->pdir_base[off] & - ~0xE000000000000FFFULL ); -mark_clean (addr,min (byte_cnt,IOVP_SIZE )); - off++; - byte_cnt -=IOVP_SIZE ; - - }while (byte_cnt >0 ); - } - } -#endif spin_unlock_irqrestore (&ioc->res_lock, flags); - -/* XXX REVISIT for 2.5 Linux - need syncdma for zero-copy support. -** For Astro based systems this isn't a big deal WRT performance. -** As long as 2.4 kernels copyin/copyout data from/to userspace, -** we don't need the syncdma. The issue here is I/O MMU cachelines -** are *not* coherent in all cases. May be hwrev dependent. -** Need to investigate more. -asm volatile("syncdma"); -*/ }
@@ -980,242 +964,109 @@ } -/* -** Since 0 is a valid pdir_base index value, can't use that -** to determine if a value is valid or not. Use a flag to indicate -** the SG list entry contains a valid pdir index. -*/ -#define PIDE_FLAG 0x1UL -#ifdef DEBUG_LARGE_SG_ENTRIES int dump_run_sg =0 ;#endif - -/** -* sba_fill_pdir - write allocated SG entries into IO PDIR -* @ioc: IO MMU structure which owns the pdir we are interested in. -* @startsg: list of IOVA/size pairs -* @nents: number of entries in startsg list -* -* Take preprocessed SG list and write corresponding entries -* in the IO PDIR. -*/ - -static SBA_INLINE int -sba_fill_pdir ( -struct ioc *ioc, -struct scatterlist *startsg, -int nents) -{ -struct scatterlist *dma_sg = startsg;/* pointer to current DMA */ -int n_mappings =0 ; -u64 *pdirp =0 ; -unsigned long dma_offset =0 ; - - dma_sg--; -while (nents-- >0 ) { -int cnt =sba_sg_len (startsg); -sba_sg_len (startsg) =0 ; - -#ifdef DEBUG_LARGE_SG_ENTRIES -if (dump_run_sg) -printk (" %2d : %08lx/%05x %p\n" , - nents, - (unsigned long )sba_sg_iova (startsg), cnt, -sba_sg_buffer (startsg) - ); -#else -DBG_RUN_SG (" %d : %08lx/%05x %p\n" , - nents, - (unsigned long )sba_sg_iova (startsg), cnt, -sba_sg_buffer (startsg) - ); -#endif -/* -** Look for the start of a new DMA stream -*/ -if ((u64 )sba_sg_iova (startsg) &PIDE_FLAG ) { -u32 pide = (u64 )sba_sg_iova (startsg) & ~PIDE_FLAG ; - dma_offset = (unsigned long ) pide & ~IOVP_MASK ; -sba_sg_iova (startsg) =0 ; - dma_sg++; -sba_sg_iova (dma_sg) = (char *)(pide | ioc->ibase); - pdirp = &(ioc->pdir_base[pide >>IOVP_SHIFT ]); - n_mappings++; - } - -/* -** Look for a VCONTIG chunk -*/ -if (cnt) { -unsigned long vaddr = (unsigned long )sba_sg_buffer (startsg); -ASSERT (pdirp); - -/* Since multiple Vcontig blocks could make up -** one DMA stream, *add* cnt to dma_len. -*/ -sba_sg_len (dma_sg) += cnt; - cnt += dma_offset; - dma_offset=0 ;/* only want offset on first chunk */ - cnt =ROUNDUP (cnt,IOVP_SIZE ); -#ifdef CONFIG_PROC_FS - ioc->msg_pages += cnt >>IOVP_SHIFT ; -#endif -do { -sba_io_pdir_entry (pdirp, vaddr); - vaddr +=IOVP_SIZE ; - cnt -=IOVP_SIZE ; - pdirp++; - }while (cnt >0 ); - } - startsg++; - } -#ifdef DEBUG_LARGE_SG_ENTRIES - dump_run_sg =0 ; -#endif -return (n_mappings); -} - - -/* -** Two address ranges are DMA contiguous *iff* "end of prev" and -** "start of next" are both on a page boundry. -** -** (shift left is a quick trick to mask off upper bits) -*/ -#define DMA_CONTIG (__X, __Y) \ - (((((unsigned long) __X) | ((unsigned long) __Y)) << (BITS_PER_LONG - PAGE_SHIFT)) = 0UL) +#define SG_ENT_VIRT_PAGE (sg) page_address((sg)->page) +#define SG_ENT_PHYS_PAGE (SG ) virt_to_phys(SG_ENT_VIRT_PAGE(SG))/** * sba_coalesce_chunks - preprocess the SG list * @ioc: IO MMU structure which owns the pdir we are interested in. -* @startsg: list of IOVA/size pairs +* @startsg: input=SG list output=DMA addr/len pairs filled in * @nents: number of entries in startsg list +* @direction: R/W or both. * -* First pass is to walk the SG list and determine where the breaks are -* in the DMA stream. Allocates PDIR entries but does not fill them. -* Returns the number of DMA chunks. -* -* Doing the fill seperate from the coalescing/allocation keeps the -* code simpler. Future enhancement could make one pass through -* the sglist do both. +* Walk the SG list and determine where the breaks are in the DMA stream. +* Allocate IO Pdir resources and fill them in separate loop. +* Returns the number of DMA streams used for output IOVA list. +* Note each DMA stream can consume multiple IO Pdir entries. +* +* Code is written assuming some coalescing is possible. */ static SBA_INLINE int -sba_coalesce_chunks (struct ioc *ioc, -struct scatterlist *startsg, -int nents) -{ -struct scatterlist *vcontig_sg;/* VCONTIG chunk head */ -unsigned long vcontig_len;/* len of VCONTIG chunk */ -unsigned long vcontig_end; -struct scatterlist *dma_sg;/* next DMA stream head */ -unsigned long dma_offset, dma_len;/* start/len of DMA stream */ +sba_coalesce_chunks (struct ioc *ioc,struct scatterlist *startsg, +int nents,int direction) +{ +struct scatterlist *dma_sg = startsg;/* return array */ int n_mappings =0 ; -while (nents >0 ) { -unsigned long vaddr = (unsigned long ) (startsg->address); +ASSERT (nents >1 ); + +do { +unsigned int dma_cnt =1 ;/* number of pages in DMA stream */ +unsigned int pide;/* index into IO Pdir array */ +u64 *pdirp;/* pointer into IO Pdir array */ +unsigned long dma_offset, dma_len;/* cumulative DMA stream */ /* ** Prepare for first/next DMA stream */ - dma_sg = vcontig_sg = startsg; - dma_len = vcontig_len = vcontig_end =sba_sg_len (startsg); - vcontig_end += vaddr; - dma_offset = vaddr & ~IOVP_MASK ; - -/* PARANOID: clear entries */ -sba_sg_buffer (startsg) =sba_sg_iova (startsg); -sba_sg_iova (startsg) =0 ; -sba_sg_len (startsg) =0 ; + dma_len =sba_sg_len (startsg); + dma_offset =sba_sg_address (startsg); + startsg++; + nents--;/* -** This loop terminates one iteration "early" since -** it's always looking one "ahead". +** We want to know how many entries can be coalesced +** before trying to allocate IO Pdir space. +** IOVAs can then be allocated "naturally" aligned +** to take advantage of the block IO TLB flush. */ -while (--nents >0 ) { -unsigned long vaddr;/* tmp */ - - startsg++; +while (nents) { +unsigned int end_offset = dma_offset + dma_len; -/* catch brokenness in SCSI layer */ -ASSERT (startsg->length <=DMA_CHUNK_SIZE ); +/* prev entry must end on a page boundary */ +if (end_offset &IOVP_MASK ) +break ; -/* -** First make sure current dma stream won't -** exceed DMA_CHUNK_SIZE if we coalesce the -** next entry. -*/ -if (((dma_len + dma_offset + startsg->length + ~IOVP_MASK ) &IOVP_MASK ) >DMA_CHUNK_SIZE ) +/* next entry start on a page boundary? */ +if (startsg->offset)break ;/* -** Then look for virtually contiguous blocks. -** -** append the next transaction? +** make sure current dma stream won't exceed +** DMA_CHUNK_SIZE if coalescing entries. */ - vaddr = (unsigned long )sba_sg_iova (startsg); -if (vcontig_end = vaddr) - { - vcontig_len +=sba_sg_len (startsg); - vcontig_end +=sba_sg_len (startsg); - dma_len +=sba_sg_len (startsg); -sba_sg_buffer (startsg) = (char *)vaddr; -sba_sg_iova (startsg) =0 ; -sba_sg_len (startsg) =0 ; -continue ; - } +if (((end_offset + startsg->length + ~IOVP_MASK ) + &IOVP_MASK ) + >DMA_CHUNK_SIZE ) +break ; -#ifdef DEBUG_LARGE_SG_ENTRIES - dump_run_sg = (vcontig_len >IOVP_SIZE ); -#endif + dma_len +=sba_sg_len (startsg); + startsg++; + nents--; + dma_cnt++; + } -/* -** Not virtually contigous. -** Terminate prev chunk. -** Start a new chunk. -** -** Once we start a new VCONTIG chunk, dma_offset -** can't change. And we need the offset from the first -** chunk - not the last one. Ergo Successive chunks -** must start on page boundaries and dove tail -** with it's predecessor. -*/ -sba_sg_len (vcontig_sg) = vcontig_len; +ASSERT (dma_len <=DMA_CHUNK_SIZE ); - vcontig_sg = startsg; - vcontig_len =sba_sg_len (startsg); +/* allocate IO Pdir resource. +** returns index into (u64) IO Pdir array. +** IOVA is formed from this. +*/ + pide =sba_alloc_range (ioc, dma_cnt <<IOVP_SHIFT ); + pdirp = &(ioc->pdir_base[pide]); -/* -** 3) do the entries end/start on page boundaries? -** Don't update vcontig_end until we've checked. -*/ -if (DMA_CONTIG (vcontig_end, vaddr)) - { - vcontig_end = vcontig_len + vaddr; - dma_len += vcontig_len; -sba_sg_buffer (startsg) = (char *)vaddr; -sba_sg_iova (startsg) =0 ; -continue ; - }else { -break ; - } +/* fill_pdir: write stream into IO Pdir */ +while (dma_cnt--) { +sba_io_pdir_entry (pdirp,SG_ENT_PHYS_PAGE (startsg)); + startsg++; + pdirp++; } -/* -** End of DMA Stream -** Terminate last VCONTIG block. -** Allocate space for DMA stream. -*/ -sba_sg_len (vcontig_sg) = vcontig_len; - dma_len = (dma_len + dma_offset + ~IOVP_MASK ) &IOVP_MASK ; -ASSERT (dma_len <=DMA_CHUNK_SIZE ); -sba_sg_iova (dma_sg) = (char *) (PIDE_FLAG - | (sba_alloc_range (ioc, dma_len) <<IOVP_SHIFT ) - | dma_offset); +/* "output" IOVA */ +sba_sg_iova (dma_sg) =SBA_IOVA (ioc, + ((dma_addr_t ) pide <<IOVP_SHIFT ), + dma_offset, +DEFAULT_DMA_HINT_REG (direction)); +sba_sg_iova_len (dma_sg) = dma_len; + + dma_sg++; n_mappings++; - } + }while (nents);return n_mappings; }
@@ -1223,7 +1074,7 @@/** * sba_map_sg - map Scatter/Gather list -* @dev: instance of PCI owned by the driver that's asking. +* @dev: instance of PCI device owned by the driver that's asking. * @sglist: array of buffer/length pairs * @nents: number of entries in list * @direction: R/W or both.
@@ -1234,42 +1085,46 @@ int direction) {struct ioc *ioc; -int coalesced, filled =0 ; +int filled =0 ;unsigned long flags;#ifdef ALLOW_IOV_BYPASS struct scatterlist *sg;#endif -DBG_RUN_SG ("%s() START %d entries\n" , __FUNCTION__, nents); +DBG_RUN_SG ("%s() START %d entries, 0x%p,0x%x\n" , __FUNCTION__, nents, +sba_sg_address (sglist),sba_sg_len (sglist)); + ioc =GET_IOC (dev);ASSERT (ioc);#ifdef ALLOW_IOV_BYPASS if (dev->dma_mask >= ioc->dma_mask) { -for (sg = sglist ; filled < nents ; filled++, sg++){ -sba_sg_buffer (sg) =sba_sg_iova (sg); -sba_sg_iova (sg) = (char *)virt_to_phys (sba_sg_buffer (sg)); +for (sg = sglist ; filled < nents ; filled++, sg++) { +sba_sg_iova (sg) =virt_to_phys (sba_sg_address (sg)); +sba_sg_iova_len (sg) =sba_sg_len (sg); }#ifdef CONFIG_PROC_FS spin_lock_irqsave (&ioc->res_lock, flags); ioc->msg_bypass++;spin_unlock_irqrestore (&ioc->res_lock, flags);#endif +DBG_RUN_SG ("%s() DONE %d mappings bypassed\n" , __FUNCTION__, filled);return filled; }#endif /* Fast path single entry scatterlists. */ if (nents =1 ) { -sba_sg_buffer (sglist) =sba_sg_iova (sglist);sba_sg_iova (sglist) = (char *)sba_map_single (dev, -sba_sg_buffer (sglist), +sba_sg_iova (sglist),sba_sg_len (sglist), direction); +sba_sg_iova_len (sglist) =sba_sg_len (sglist);#ifdef CONFIG_PROC_FS /* ** Should probably do some stats counting, but trying to ** be precise quickly starts wasting CPU time. */ #endif +DBG_RUN_SG ("%s() DONE 1 mapping\n" , __FUNCTION__);return 1 ; }
@@ -1286,26 +1141,11 @@#ifdef CONFIG_PROC_FS ioc->msg_calls++;#endif - -/* -** First coalesce the chunks and allocate I/O pdir space -** -** If this is one DMA stream, we can properly map using the -** correct virtual address associated with each DMA page. -** w/o this association, we wouldn't have coherent DMA! -** Access to the virtual address is what forces a two pass algorithm. -*/ - coalesced =sba_coalesce_chunks (ioc, sglist, nents);/* -** Program the I/O Pdir -** -** map the virtual addresses to the I/O Pdir -** o dma_address will contain the pdir index -** o dma_len will contain the number of bytes to map -** o address contains the virtual address. +** coalesce and program the I/O Pdir */ - filled =sba_fill_pdir (ioc, sglist, nents); + filled =sba_coalesce_chunks (ioc, sglist, nents, direction);#ifdef ASSERT_PDIR_SANITY if (sba_check_pdir (ioc,"Check after sba_map_sg()" ))
@@ -1317,7 +1157,6 @@spin_unlock_irqrestore (&ioc->res_lock, flags); -ASSERT (coalesced = filled);DBG_RUN_SG ("%s() DONE %d mappings\n" , __FUNCTION__, filled);return filled;
@@ -1341,8 +1180,8 @@unsigned long flags;#endif -DBG_RUN_SG ("%s() START %d entries, %p,%x\n" , - __FUNCTION__, nents,sba_sg_buffer (sglist), sglist->length); +DBG_RUN_SG ("%s() START %d entries, 0x%p,0x%x\n" , + __FUNCTION__, nents,sba_sg_address (sglist),sba_sg_len (sglist)); ioc =GET_IOC (dev);ASSERT (ioc);
@@ -1360,7 +1199,7 @@while (sba_sg_len (sglist) && nents--) {sba_unmap_single (dev, (dma_addr_t )sba_sg_iova (sglist), -sba_sg_len (sglist), direction); +sba_sg_iova_len (sglist), direction);#ifdef CONFIG_PROC_FS /* ** This leaves inconsistent data in the stats, but we can't
@@ -1368,7 +1207,7 @@** were coalesced to a single entry. The stats are fun, ** but speed is more important. */ - ioc->usg_pages += (((u64 )sba_sg_iova (sglist) & ~IOVP_MASK ) +sba_sg_len (sglist) +IOVP_SIZE -1 ) >>PAGE_SHIFT ; + ioc->usg_pages += (((u64 )sba_sg_iova (sglist) & ~IOVP_MASK ) +sba_sg_len (sglist) +IOVP_SIZE -1 ) >>IOVP_SHIFT ;#endif ++sglist; }
@@ -1429,12 +1268,12 @@ __FUNCTION__, ioc->ioc_hpa, iova_space_size>>20 , iov_order + PAGE_SHIFT, ioc->pdir_size); -/* FIXME : DMA HINTs not used */ +/* XXX DMA HINTs not used */ ioc->hint_shift_pdir = iov_order +PAGE_SHIFT ; ioc->hint_mask_pdir = ~(0x3 << (iov_order +PAGE_SHIFT )); - ioc->pdir_base - pdir_base = (void *)__get_free_pages (GFP_KERNEL ,get_order (pdir_size)); + ioc->pdir_base = pdir_base + (void *)__get_free_pages (GFP_KERNEL ,get_order (pdir_size)); if (NULL = pdir_base) {panic (__FILE__":%s() could not allocate I/O Page Table\n" , __FUNCTION__);
@@ -1452,20 +1291,8 @@/* build IMASK for IOC and Elroy */ iova_space_mask =0xffffffff ; - iova_space_mask <<= (iov_order +PAGE_SHIFT ); + iova_space_mask <<= (iov_order +IOVP_SHIFT ); -#ifdef CONFIG_IA64_HP_PROTO -/* -** REVISIT - this is a kludge, but we won't be supporting anything but -** zx1 2.0 or greater for real. When fw is in shape, ibase will -** be preprogrammed w/ the IOVA hole base and imask will give us -** the size. -*/ -if ((sba_dev->hw_rev &0xFF ) <0x20 ) { -DBG_INIT ("%s() Found SBA rev < 2.0, setting IOVA base to 0. This device will not be supported in the future.\n" , __FUNCTION__); - ioc->ibase =0x0 ; - } else -#endif ioc->ibase =READ_REG (ioc->ioc_hpa +IOC_IBASE ) &0xFFFFFFFEUL ; ioc->imask = iova_space_mask;/* save it */
@@ -1474,7 +1301,7 @@ __FUNCTION__, ioc->ibase, ioc->imask);/* -** FIXME: Hint registers are programmed with default hint +** XXX DMA HINT registers are programmed with default hint ** values during boot, so hints should be sane even if we ** can't reprogram them the way drivers want. */
@@ -1487,8 +1314,8 @@*/ ioc->imask |=0xFFFFFFFF00000000UL ; -/* Set I/O PDIR Page size to system page size */ -switch (PAGE_SHIFT ) { +/* Set I/O Pdir page size to system page size */ +switch (IOVP_SHIFT ) {case 12 :/* 4K */ tcnfg =0 ;break ;
@@ -1636,7 +1463,7 @@ res_word = (int )(index /BITS_PER_LONG ); mask =0x1UL << (index - (res_word *BITS_PER_LONG )); res_ptr[res_word] |= mask; - sba_dev->ioc[i].pdir_base[PDIR_INDEX (reserved_iov)] = (0x80000000000000FFULL | reserved_iov); + sba_dev->ioc[i].pdir_base[PDIR_INDEX (reserved_iov)] = (SBA_VALID_MASK | reserved_iov); } }
arch/ia64/lib/swiotlb.c +15 -15
@@ -415,18 +415,20 @@ swiotlb_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction) { void *addr; +unsigned long pci_addr;int i;if (direction =PCI_DMA_NONE )BUG ();for (i =0 ; i < nelems; i++, sg++) { - sg->orig_address =SG_ENT_VIRT_ADDRESS (sg); -if ((SG_ENT_PHYS_ADDRESS (sg) & ~hwdev->dma_mask) !=0 ) { - addr =map_single (hwdev, sg->orig_address, sg->length, direction); - sg->page =virt_to_page (addr); - sg->offset = (u64 ) addr & ~PAGE_MASK ; - } + addr =SG_ENT_VIRT_ADDRESS (sg); + pci_addr =virt_to_phys (addr); +if ((pci_addr & ~hwdev->dma_mask) !=0 ) + sg->dma_address =map_single (hwdev, addr, sg->length, direction); +else + sg->dma_address = pci_addr; + sg->dma_length = sg->length; }return nelems; }
@@ -444,12 +446,10 @@BUG ();for (i =0 ; i < nelems; i++, sg++) -if (sg->orig_address !=SG_ENT_VIRT_ADDRESS (sg)) { -unmap_single (hwdev,SG_ENT_VIRT_ADDRESS (sg), sg->length, direction); - sg->page =virt_to_page (sg->orig_address); - sg->offset = (u64 ) sg->orig_address & ~PAGE_MASK ; - }else if (direction =PCI_DMA_FROMDEVICE ) -mark_clean (SG_ENT_VIRT_ADDRESS (sg), sg->length); +if (sg->dma_address !=SG_ENT_PHYS_ADDRESS (sg)) +unmap_single (hwdev, sg->dma_address, sg->dma_length, direction); +else if (direction =PCI_DMA_FROMDEVICE ) +mark_clean (SG_ENT_VIRT_ADDRESS (sg), sg->dma_length); }/*
@@ -468,14 +468,14 @@BUG ();for (i =0 ; i < nelems; i++, sg++) -if (sg->orig_address !=SG_ENT_VIRT_ADDRESS (sg)) -sync_single (hwdev,SG_ENT_VIRT_ADDRESS (sg), sg->length, direction); +if (sg->dma_address !=SG_ENT_PHYS_ADDRESS (sg)) +sync_single (hwdev, sg->dma_address, sg->dma_length, direction); }unsigned long swiotlb_dma_address (struct scatterlist *sg) { -return SG_ENT_PHYS_ADDRESS (sg); +return sg->dma_address; }/*
include/asm-ia64/pci.h +1 -1
@@ -90,7 +90,7 @@/* Return the index of the PCI controller for device PDEV. */ #define pci_controller_num (PDEV ) (0) -#define sg_dma_len (sg) ((sg)->length) +#define sg_dma_len (sg) ((sg)->dma_length)#define HAVE_PCI_MMAP extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
include/asm-ia64/scatterlist.h +3 -3
@@ -7,12 +7,12 @@*/ struct scatterlist { -char *orig_address;/* for use by swiotlb */ - -/* These two are only valid if ADDRESS member of this struct is NULL. */ struct page *page;unsigned int offset;unsigned int length;/* buffer length */ + +dma_addr_t dma_address; +unsigned int dma_length; };#define ISA_DMA_THRESHOLD (~0UL)
Re: [Linux-ia64] kernel update (relative to v2.5.18)
In reply to David MosbergerQuoted 11 lines · Bjorn Helgaas
Quoted 2 lines
-- With
CONFIG_GENERIC,sba_iommu.cstill doesn't compile because of the removal of the address field from the scatterlist.Here's a patch to make
sba_iommuwork again.I added
dma_addressanddma_lengthto struct scatterlist and removedorig_address. This brings IA64 in line with most other architectures, but required a few changes to swiotlb.Grant Grundler did the
sba_iommu.cupdates.
Quoted 7 lines
Note that this isn't *quite* enough to make the generic kernel work on ZX1 boxes, because the ACPI in 2.5.18 barfs on a ZX1
_CRSmethod.David, I've tested both the swiotlb (on i2000 and ZX1) and
sba_iommu(on ZX1, with a kludge for the ACPI problem), and they seem to work fine.
Hi Bjorn,
Do you have any estimate when this kludge for the ACPI problem on ZX1 is available to the public ? Do the DIG version work on ZX1 now, or does it barf on the same ACPI problem ?
Regards,
--
Steffen Persvold | Scalable Linux Systems | Try out the world's best mailto:[email protected] | http://www.scali.com | performing MPI implementation: Tel: (+47) 2262 8950 | Olaf Helsets vei 6 | - ScaMPI 1.13.8 - Fax: (+47) 2262 8951 | N0621 Oslo, NORWAY | >320MBytes/s and <4uS latency
Re: [Linux-ia64] kernel update (relative to v2.5.18)
In reply to David Mosberger+/*
+ * Note: the MAP_NR_*() macro can't use __pa() because MAP_NR_*(X) MUST
+ * map to something >= max_mapnr if X is outside the identity mapped
+ * kernel space.
+ */
+
+/*
+ * The dense variant can be used as long as the size of memory holes isn't
+ * very big.
+ */
+#define MAP_NR_DENSE(addr) (((unsigned long) (addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+
Bjorn,
Given that the only current use of MAP_NR_DENSE is inmachvec.c: map_nr_dense() why not open-code it there, instead of using the MACRO? (So
unsigned long
map_nr_dense(unsigned long addr) {
return (addr - PAGE_OFFSET) >> PAGE_SHIFT;
})
And move the comment there too instead of in page.h. It might make things a little cleaner that way.
Peter C
[Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerThe latest ia64 kernel patch for 2.4.18 is at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file:
linux-2.4.18-ia64-020622.diff.gz
There are some important bug fixes in this patch:
- munmap near end of per-region mappable address space no longer causes virtual memory corruption
- the kernel used to inherit all PSR bits across fork/exec, which is a Bad Thing; this has been fixed
A more detailed changelog is below.
The kernel should work well both on Itanium 1 and Itanium 2. One important change is that the kernel now ignores all memory that lies on a granule ("large kernel page") that contains a hole or something other than normal memory (e.g., memory-mapped I/O registers). The net effect of this is that on most of today's machines, about 64MB of memory get thrown away because of the stupid <64MB legacy memory region (which contains a hole due to ISA BIOS space). With 1GB of memory, 64MB is about 6% which is more than some of you might be willing to throw away. If this is an issue, you can select a granule size of 16MB (CONFIG_IA64_GRANULE_16MB) and then correspondingly less memory will be thrown away. Reasonably well-designed (i.e., 100% legacy-free machines) won't throw away any memory, so in the long term, this issue should go away. In the meantime, buy some stock of DRAM companies... ;-)
Support for the hp zx1-based machines should be pretty much complete now. The virtual memory map works well, as does the 64KB page size. Two formerly missing drivers (bcm5700 gig ethernet and fm801 sound chip) have been added.
I have tested this kernel on hp zx1, big sur, and hp ski simulator. As usual, you're mileage will vary. Especially the new code for ignoring memory due to holes is a potential source of nervousness. I tried to be careful about getting all the corner-cases correct, but be sure to test this out before letting it lose on someone else...
Enjoy,
--david
PS: Sorry, still no perfmon_mckinley.h. Hopefully it won't be long before
we can release that...
PPS: I'll be at the kernel workshop/OLS next week, so I won't be able to
do much while on travel.
ChangeLog
- Install NaT-page at address zero to speed up speculation across NULL pointers (Ken Chen).
- Update hp zx1 specific code (Bjorn Helgaas, Alex Williamson, Matthew Willcox)
- ACPI sync up (Matthew Willcox, Bjorn Helgaas)
- Ignore memory that's on a granule (large kernel page) that contains holes or non-memory regions (e.g., uncached/writecombine regions).
- Widen I/O SAPIC base irq numbers to 32 bits (KOCHI Takayoshi)
- Sync with latest perfmon (Stephane Eranian)
- Stop inheriting certain PSR bits (e.g., PSR.DB) across clone2() and fork() (Stephane Eranian & yours truly)
- Pass Don't clear siginfo.si_addr for SIGTRAP caused by debug breakpoint
- McKinley-tuned copy_user(), merged with McKinley-tuned memcpy() (Ken Chen)
- Fix linker script so GOT gets properly aligned (not just __gp). This avoids spurios "gp out-of-range" errors.
- Clean up fusion driver (based on suggestion by Keith Owens & Grant Grundler)
- Add bcm5700 gig ethernet driver
- Add preliminary driver for ForteMedia FM801 sound chip (Martin Petersen).
- Fix bootmem so machine boots much faster if there are large holes in the physical memory map.
- Fix vm-corruption due to munmap() near end of mappable address space
- Finish virtual mem_map integration.
[Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerThe latest patch is available at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4 in file:
linux-2.4.18-ia64-020622.diff.gz
This kernel should work well both on Itanium 1 and Itanium 2, including hp zx1-based machines. 64KB page size should also work well as does the virtual mem_map, which is needed for zx1-based machines with >1GB of memory. This patch also fixes the munmap-near-end-of-mappable-space bug.
IMPORTANT: To avoid memory attribute aliasing issues and the risk of triggering prefetches on memory holes, the kernel now ignores all memory inside granules ("large kernel pages") that contain holes or something other than normal memory (e.g., memory-mapped I/O regions). On today's systems, this means that the kernel tends to throw away ~64MB of memory (or about 6% on a 1GB machine). If you want to minimize the amount of memory being thrown away, you can choose a granule size of 16MB instead (this will increase alternate TLB miss handling overhead, however).
Enjoy,
--david
PS: I'll be at the kernel workshop/OLS next week, so don't expect quick
responses.
ChangeLog
- Install NaT-page at address zero to speed up speculation across NULL pointers (Ken Chen).
- Update hp zx1 specific code (Bjorn Helgaas, Alex Williamson, Matthew Willcox)
- ACPI sync up (Matthew Willcox, Bjorn Helgaas)
- Ignore memory that's on a granule (large kernel page) that contains holes or non-memory regions (e.g., uncached/writecombine regions).
- Widen I/O SAPIC base irq numbers to 32 bits (KOCHI Takayoshi)
- Sync with latest perfmon (Stephane Eranian)
- Stop inheriting certain PSR bits (e.g., PSR.DB) across clone2() and fork() (Stephane Eranian & yours truly)
- Don't clear siginfo.si_addr for SIGTRAP caused by debug breakpoint
- McKinley-tuned copy_user(), merged with McKinley-tuned memcpy() (Ken Chen)
- Fix linker script so GOT gets properly aligned (not just __gp). This avoids spurios "gp out-of-range" errors.
- Clean up fusion driver (based on suggestion by Keith Owens & Grant Grundler)
- Add bcm5700 gig ethernet driver
- Add preliminary driver for ForteMedia FM801 sound chip (Martin Petersen).
- Fix bootmem so machine boots much faster if there are large holes in the physical memory map.
- Fix vm-corruption due to munmap() near end of mappable address space
- Finish virtual mem_map integration.
Re: [Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerQuoted 12 lines · David Mosberger
The latest ia64 kernel patch for 2.4.18 is at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ in file:
linux-2.4.18-ia64-020622.diff.gzThere are some important bug fixes in this patch:
- munmap near end of per-region mappable address space no longer causes virtual memory corruption
- the kernel used to inherit all PSR bits across fork/exec, which is a Bad Thing; this has been fixed
Hi David,
Have you tried CONFIG_IA64_GENERIC=y ? This is what I get :
gcc -D__KERNEL__ -I/usr/src/linux-2.4.18-020622/include -Wall -Wstrict-prototypes -Wno-trigraphs -g -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 -falign-functions2 -mconstant-gp -D__KERNEL__ -I/usr/src/linux-2.4.18-020622/include -c -o bootloader.o bootloader.c
In file included from bootloader.c:54:../kernel/fw-emu.c:246:9: #error Not implemented yet... ../kernel/fw-emu.c:257:9: #error Not implemented yet... bootloader.c: In function `cons_write':
bootloader.c:62: warning: implicit declaration of function `ssc' make[1]: *** [bootloader.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.18-020622/arch/ia64/boot'
make: *** [boot] Error 2
Seems to be related to efi_get_time() and efi_reset_system() for all other platforms than CONFIG_IA64_HP_SIM. Is this intended ?
Regards,
Signature · 4 lines
Steffen Persvold | Scalable Linux Systems | Try out the world's best mailto:[email protected] | http://www.scali.com | performing MPI implementation: Tel: (+47) 2262 8950 | Olaf Helsets vei 6 | - ScaMPI 1.13.8 - Fax: (+47) 2262 8951 | N0621 Oslo, NORWAY | >320MBytes/s and <4uS latency
Re: [Linux-ia64] kernel update (relative to 2.4.18)
In reply to David MosbergerQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Steffen Persvold
Steffen> Have you tried CONFIG_IA64_GENERIC=y ?
No, I don't test GENERIC myself and need the help of others for testing all reasonable configurations. Patches welcome, of course.
--david