ia64/xen-unstable

changeset 134:dcbfc020bfa9

bitkeeper revision 1.22.2.10 (3e464021ENDSDzm_b9aKHVld8d-Hqw)

if_vlan.h, tg3.c, e1000_main.c, apic.c:
Minor cleanups.
author kaf24@labyrinth.cl.cam.ac.uk
date Sun Feb 09 11:48:49 2003 +0000 (2003-02-09)
parents c6a174401978
children d3aad71a5893
files xen-2.4.16/arch/i386/apic.c xen-2.4.16/drivers/net/e1000/e1000_main.c xen-2.4.16/drivers/net/tg3.c xen-2.4.16/include/xeno/if_vlan.h
line diff
     1.1 --- a/xen-2.4.16/arch/i386/apic.c	Sun Feb 09 00:29:16 2003 +0000
     1.2 +++ b/xen-2.4.16/arch/i386/apic.c	Sun Feb 09 11:48:49 2003 +0000
     1.3 @@ -200,35 +200,16 @@ void __init sync_Arb_IDs(void)
     1.4  extern void __error_in_apic_c (void);
     1.5  
     1.6  /*
     1.7 - * An initial setup of the virtual wire mode.
     1.8 + * WAS: An initial setup of the virtual wire mode.
     1.9 + * NOW: We don't bother doing anything. All we need at this point
    1.10 + * is to receive timer ticks, so that 'jiffies' is incremented.
    1.11 + * If we're SMP, then we can assume BIOS did setup for us.
    1.12 + * If we're UP, then the APIC should be disabled (it is at reset).
    1.13 + * If we're UP and APIC is enabled, then BIOS is clever and has 
    1.14 + * probably done initial interrupt routing for us.
    1.15   */
    1.16  void __init init_bsp_APIC(void)
    1.17  {
    1.18 -    unsigned long l, h;
    1.19 -
    1.20 -    /*
    1.21 -     * Don't do the setup now if we have a SMP BIOS as the
    1.22 -     * through-I/O-APIC virtual wire mode might be active.
    1.23 -     */
    1.24 -    if (smp_found_config || !cpu_has_apic)
    1.25 -        return;
    1.26 -
    1.27 -    /*
    1.28 -     * Our best bet here is to disable the APIC. This should be safe, as it
    1.29 -     * ought to be a uniprocessor box (we tested for an SMP configuration
    1.30 -     * already), so we shouldn't be getting interrupt messages in serial-bus
    1.31 -     * form from an IO APIC. The APIC will be enabled again later, so don't
    1.32 -     * worry :-) Doing the easy thing here should make boot-time more reliable.
    1.33 -     */
    1.34 -    printk("Disabling local APIC during early boot sequence...\n");
    1.35 -    rdmsr(MSR_IA32_APICBASE, l, h);
    1.36 -    l &= ~MSR_IA32_APICBASE_BASE;
    1.37 -    wrmsr(MSR_IA32_APICBASE, l, h);
    1.38 -
    1.39 -    /* We should now be in non-APIC mode. */
    1.40 -    l = cpuid_edx(1);
    1.41 -    if ( test_bit(X86_FEATURE_APIC, &l) ) BUG();
    1.42 -    clear_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability);
    1.43  }
    1.44  
    1.45  void __init setup_local_APIC (void)
     2.1 --- a/xen-2.4.16/drivers/net/e1000/e1000_main.c	Sun Feb 09 00:29:16 2003 +0000
     2.2 +++ b/xen-2.4.16/drivers/net/e1000/e1000_main.c	Sun Feb 09 11:48:49 2003 +0000
     2.3 @@ -210,10 +210,13 @@ static int __init
     2.4  e1000_init_module(void)
     2.5  {
     2.6  	int ret;
     2.7 +
     2.8 +#if 0 /* Avoid disconcerting noise. */
     2.9  	printk(KERN_INFO "%s - version %s\n",
    2.10  	       e1000_driver_string, e1000_driver_version);
    2.11  
    2.12  	printk(KERN_INFO "%s\n", e1000_copyright);
    2.13 +#endif
    2.14  
    2.15  	ret = pci_module_init(&e1000_driver);
    2.16  //	if(ret >= 0)
    2.17 @@ -1470,7 +1473,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
    2.18  static void
    2.19  e1000_tx_timeout(struct net_device *netdev)
    2.20  {
    2.21 -	struct e1000_adapter *adapter = netdev->priv;
    2.22 +    //struct e1000_adapter *adapter = netdev->priv;
    2.23  
    2.24  	/* Do the reset outside of interrupt context */
    2.25  	//schedule_task(&adapter->tx_timeout_task); XXXX Not in Xen!!!
     3.1 --- a/xen-2.4.16/drivers/net/tg3.c	Sun Feb 09 00:29:16 2003 +0000
     3.2 +++ b/xen-2.4.16/drivers/net/tg3.c	Sun Feb 09 11:48:49 2003 +0000
     3.3 @@ -2000,9 +2000,9 @@ static int tg3_poll(struct net_device *n
     3.4  {
     3.5  	struct tg3 *tp = netdev->priv;
     3.6  	struct tg3_hw_status *sblk = tp->hw_status;
     3.7 -	unsigned long flags;
     3.8  	int done;
     3.9  #ifdef NAPI
    3.10 +	unsigned long flags;
    3.11  	spin_lock_irqsave(&tp->lock, flags);
    3.12  #endif
    3.13  	if (!(tp->tg3_flags &
    3.14 @@ -2023,10 +2023,9 @@ static int tg3_poll(struct net_device *n
    3.15  
    3.16  	done = 1;
    3.17  	if (sblk->idx[0].rx_producer != tp->rx_rcb_ptr) {
    3.18 +		int work_done;
    3.19 +#ifdef NAPI
    3.20  		int orig_budget = *budget;
    3.21 -		int work_done;
    3.22 -
    3.23 -#ifdef NAPI
    3.24  		if (orig_budget > netdev->quota)
    3.25  			orig_budget = netdev->quota;
    3.26  
    3.27 @@ -2075,7 +2074,9 @@ static void tg3_interrupt(int irq, void 
    3.28  {
    3.29  	struct net_device *dev = dev_id;
    3.30  	struct tg3 *tp = dev->priv;
    3.31 +#ifdef NAPI
    3.32  	struct tg3_hw_status *sblk = tp->hw_status;
    3.33 +#endif
    3.34  	unsigned long flags;
    3.35  
    3.36  	spin_lock_irqsave(&tp->lock, flags);
     4.1 --- a/xen-2.4.16/include/xeno/if_vlan.h	Sun Feb 09 00:29:16 2003 +0000
     4.2 +++ b/xen-2.4.16/include/xeno/if_vlan.h	Sun Feb 09 11:48:49 2003 +0000
     4.3 @@ -183,7 +183,11 @@ static inline int __vlan_hwaccel_rx(stru
     4.4  		break;
     4.5  	};
     4.6  
     4.7 +#ifdef NAPI
     4.8  	return (polling ? netif_receive_skb(skb) : netif_rx(skb));
     4.9 +#else
    4.10 +        return netif_rx(skb);
    4.11 +#endif
    4.12  }
    4.13  
    4.14  static inline int vlan_hwaccel_rx(struct sk_buff *skb,