Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108221
b: refs/heads/master
c: 40c4207
h: refs/heads/master
i:
  108219: bf0ef60
v: v3
  • Loading branch information
Rusty Russell committed Aug 12, 2008
1 parent 9ecf65b commit 573cccf
Show file tree
Hide file tree
Showing 56 changed files with 521 additions and 826 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88fa08f67bee1a0c765237bdac106a32872f57d2
refs/heads/master: 40c42076ebd362dc69210cccea101ac80b6d4bd4
23 changes: 1 addition & 22 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,21 +1447,6 @@ static void configure_device(int fd, const char *tapif, u32 ipaddr)
err(1, "Bringing interface %s up", tapif);
}

static void get_mac(int fd, const char *tapif, unsigned char hwaddr[6])
{
struct ifreq ifr;

memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, tapif);

/* SIOC stands for Socket I/O Control. G means Get (vs S for Set
* above). IF means Interface, and HWADDR is hardware address.
* Simple! */
if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0)
err(1, "getting hw address for %s", tapif);
memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6);
}

static int get_tun_device(char tapif[IFNAMSIZ])
{
struct ifreq ifr;
Expand Down Expand Up @@ -1531,11 +1516,8 @@ static void setup_tun_net(char *arg)
p = strchr(arg, ':');
if (p) {
str2mac(p+1, conf.mac);
add_feature(dev, VIRTIO_NET_F_MAC);
*p = '\0';
} else {
p = arg + strlen(arg);
/* None supplied; query the randomly assigned mac. */
get_mac(ipfd, tapif, conf.mac);
}

/* arg is now either an IP address or a bridge name */
Expand All @@ -1547,13 +1529,10 @@ static void setup_tun_net(char *arg)
/* Set up the tun device. */
configure_device(ipfd, tapif, ip);

/* Tell Guest what MAC address to use. */
add_feature(dev, VIRTIO_NET_F_MAC);
add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
/* Expect Guest to handle everything except UFO */
add_feature(dev, VIRTIO_NET_F_CSUM);
add_feature(dev, VIRTIO_NET_F_GUEST_CSUM);
add_feature(dev, VIRTIO_NET_F_MAC);
add_feature(dev, VIRTIO_NET_F_GUEST_TSO4);
add_feature(dev, VIRTIO_NET_F_GUEST_TSO6);
add_feature(dev, VIRTIO_NET_F_GUEST_ECN);
Expand Down
14 changes: 5 additions & 9 deletions trunk/arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,19 +1720,15 @@ static int __init parse_lapic_timer_c2_ok(char *arg)
}
early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);

static int __init apic_set_verbosity(char *arg)
static int __init apic_set_verbosity(char *str)
{
if (!arg)
return -EINVAL;

if (strcmp(arg, "debug") == 0)
if (strcmp("debug", str) == 0)
apic_verbosity = APIC_DEBUG;
else if (strcmp(arg, "verbose") == 0)
else if (strcmp("verbose", str) == 0)
apic_verbosity = APIC_VERBOSE;

return 0;
return 1;
}
early_param("apic", apic_set_verbosity);
__setup("apic=", apic_set_verbosity);

static int __init lapic_insert_resource(void)
{
Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/x86/kernel/cpu/bugs.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static double __initdata y = 3145727.0;
*/
static void __init check_fpu(void)
{
s32 fdiv_bug;

if (!boot_cpu_data.hard_math) {
#ifndef CONFIG_MATH_EMULATION
printk(KERN_EMERG "No coprocessor found and no math emulation present.\n");
Expand All @@ -76,10 +74,8 @@ static void __init check_fpu(void)
"fistpl %0\n\t"
"fwait\n\t"
"fninit"
: "=m" (*&fdiv_bug)
: "=m" (*&boot_cpu_data.fdiv_bug)
: "m" (*&x), "m" (*&y));

boot_cpu_data.fdiv_bug = fdiv_bug;
if (boot_cpu_data.fdiv_bug)
printk("Hmm, FPU with FDIV bug.\n");
}
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/x86/kernel/io_apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ atomic_t irq_mis_count;
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };

static DEFINE_SPINLOCK(ioapic_lock);
DEFINE_SPINLOCK(vector_lock);
static DEFINE_SPINLOCK(vector_lock);

int timer_through_8259 __initdata;

Expand Down Expand Up @@ -1209,6 +1209,10 @@ static int assign_irq_vector(int irq)
return vector;
}

void setup_vector_irq(int cpu)
{
}

static struct irq_chip ioapic_chip;

#define IOAPIC_AUTO -1
Expand Down
25 changes: 10 additions & 15 deletions trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int timer_through_8259 __initdata;
static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };

static DEFINE_SPINLOCK(ioapic_lock);
static DEFINE_SPINLOCK(vector_lock);
DEFINE_SPINLOCK(vector_lock);

/*
* # of IRQ routing registers
Expand Down Expand Up @@ -697,19 +697,6 @@ static int pin_2_irq(int idx, int apic, int pin)
return irq;
}

void lock_vector_lock(void)
{
/* Used to the online set of cpus does not change
* during assign_irq_vector.
*/
spin_lock(&vector_lock);
}

void unlock_vector_lock(void)
{
spin_unlock(&vector_lock);
}

static int __assign_irq_vector(int irq, cpumask_t mask)
{
/*
Expand Down Expand Up @@ -815,7 +802,7 @@ static void __clear_irq_vector(int irq)
cpus_clear(cfg->domain);
}

void __setup_vector_irq(int cpu)
static void __setup_vector_irq(int cpu)
{
/* Initialize vector_irq on a new cpu */
/* This function must be called with vector_lock held */
Expand All @@ -838,6 +825,14 @@ void __setup_vector_irq(int cpu)
}
}

void setup_vector_irq(int cpu)
{
spin_lock(&vector_lock);
__setup_vector_irq(smp_processor_id());
spin_unlock(&vector_lock);
}


static struct irq_chip ioapic_chip;

static void ioapic_register_intr(int irq, unsigned long trigger)
Expand Down
11 changes: 5 additions & 6 deletions trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void __init MP_bus_info(struct mpc_config_bus *m)
if (x86_quirks->mpc_oem_bus_info)
x86_quirks->mpc_oem_bus_info(m, str);
else
apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->mpc_busid, str);
printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str);

#if MAX_MP_BUSSES < 256
if (m->mpc_busid >= MAX_MP_BUSSES) {
Expand Down Expand Up @@ -154,7 +154,7 @@ static void __init MP_ioapic_info(struct mpc_config_ioapic *m)

static void print_MP_intsrc_info(struct mpc_config_intsrc *m)
{
apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x,"
" IRQ %02x, APIC ID %x, APIC INT %02x\n",
m->mpc_irqtype, m->mpc_irqflag & 3,
(m->mpc_irqflag >> 2) & 3, m->mpc_srcbus,
Expand All @@ -163,7 +163,7 @@ static void print_MP_intsrc_info(struct mpc_config_intsrc *m)

static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq)
{
apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x,"
" IRQ %02x, APIC ID %x, APIC INT %02x\n",
mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3,
(mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus,
Expand Down Expand Up @@ -235,7 +235,7 @@ static void __init MP_intsrc_info(struct mpc_config_intsrc *m)

static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m)
{
apic_printk(APIC_VERBOSE, "Lint: type %d, pol %d, trig %d, bus %02x,"
printk(KERN_INFO "Lint: type %d, pol %d, trig %d, bus %02x,"
" IRQ %02x, APIC ID %x, APIC LINT %02x\n",
m->mpc_irqtype, m->mpc_irqflag & 3,
(m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid,
Expand Down Expand Up @@ -695,8 +695,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
unsigned int *bp = phys_to_virt(base);
struct intel_mp_floating *mpf;

apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n",
bp, length);
printk(KERN_DEBUG "Scan SMP from %p for %ld bytes.\n", bp, length);
BUILD_BUG_ON(sizeof(*mpf) != 16);

while (length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/pci-calgary_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl)
* Function for kdump case. Get the tce tables from first kernel
* by reading the contents of the base adress register of calgary iommu
*/
static void get_tce_space_from_tar(void)
static void get_tce_space_from_tar()
{
int bus;
void __iomem *target;
Expand Down
22 changes: 14 additions & 8 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,6 @@ void __init setup_arch(char **cmdline_p)
early_cpu_init();
early_ioremap_init();

#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
/*
* Must be before kernel pagetables are setup
* or fixmap area is touched.
*/
vmi_init();
#endif

ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
screen_info = boot_params.screen_info;
edid_info = boot_params.edid_info;
Expand Down Expand Up @@ -825,6 +817,14 @@ void __init setup_arch(char **cmdline_p)
kvmclock_init();
#endif

#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
/*
* Must be after max_low_pfn is determined, and before kernel
* pagetables are setup.
*/
vmi_init();
#endif

paravirt_pagetable_setup_start(swapper_pg_dir);
paging_init();
paravirt_pagetable_setup_done(swapper_pg_dir);
Expand Down Expand Up @@ -861,6 +861,12 @@ void __init setup_arch(char **cmdline_p)
init_apic_mappings();
ioapic_init_mappings();

#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
if (def_to_bigsmp)
printk(KERN_WARNING "More than 8 CPUs detected and "
"CONFIG_X86_PC cannot handle it.\nUse "
"CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
#endif
kvm_guest_init();

e820_reserve_resources();
Expand Down
22 changes: 3 additions & 19 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,12 @@ static void __cpuinit start_secondary(void *unused)
* for which cpus receive the IPI. Holding this
* lock helps us to not include this cpu in a currently in progress
* smp_call_function().
*
* We need to hold vector_lock so there the set of online cpus
* does not change while we are assigning vectors to cpus. Holding
* this lock ensures we don't half assign or remove an irq from a cpu.
*/
ipi_call_lock_irq();
lock_vector_lock();
__setup_vector_irq(smp_processor_id());
#ifdef CONFIG_X86_IO_APIC
setup_vector_irq(smp_processor_id());
#endif
cpu_set(smp_processor_id(), cpu_online_map);
unlock_vector_lock();
ipi_call_unlock_irq();
per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;

Expand Down Expand Up @@ -994,17 +990,7 @@ int __cpuinit native_cpu_up(unsigned int cpu)
flush_tlb_all();
low_mappings = 1;

#ifdef CONFIG_X86_PC
if (def_to_bigsmp && apicid > 8) {
printk(KERN_WARNING
"More than 8 CPUs detected - skipping them.\n"
"Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");
err = -1;
} else
err = do_boot_cpu(apicid, cpu);
#else
err = do_boot_cpu(apicid, cpu);
#endif

zap_low_mappings();
low_mappings = 0;
Expand Down Expand Up @@ -1350,9 +1336,7 @@ int __cpu_disable(void)
remove_siblinginfo(cpu);

/* It's now safe to remove this processor from the online map */
lock_vector_lock();
remove_cpu_from_maps(cpu);
unlock_vector_lock();
fixup_irqs(cpu_online_map);
return 0;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/kernel/vmi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <asm/timer.h>
#include <asm/vmi_time.h>
#include <asm/kmap_types.h>
#include <asm/setup.h>

/* Convenient for calling VMI functions indirectly in the ROM */
typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void);
Expand Down Expand Up @@ -684,7 +683,7 @@ void vmi_bringup(void)
{
/* We must establish the lowmem mapping for MMU ops to work */
if (vmi_ops.set_linear_mapping)
vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, MAXMEM_PFN, 0);
vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, max_low_pfn, 0);
}

/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
unsigned long addr;
int i;

if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
return;

pud = pud_offset(pgd, 0);

for (addr = i = 0; i < PREALLOCATED_PMDS;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/char/agp/agp.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ struct agp_bridge_data {
char minor_version;
struct list_head list;
u32 apbase_config;
/* list of agp_memory mapped to the aperture */
struct list_head mapped_list;
spinlock_t mapped_lock;
};

#define KB(x) ((x) * 1024)
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/char/agp/ali-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ static int ali_configure(void)

nlvm_addr+= agp_bridge->gart_bus_addr;
nlvm_addr|=(agp_bridge->gart_bus_addr>>12);
dev_info(&agp_bridge->dev->dev, "nlvm top &base = %8x\n",
nlvm_addr);
printk(KERN_INFO PFX "nlvm top &base = %8x\n",nlvm_addr);
}
#endif

Expand Down Expand Up @@ -316,8 +315,8 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev,
goto found;
}

dev_err(&pdev->dev, "unsupported ALi chipset [%04x/%04x])\n",
pdev->vendor, pdev->device);
printk(KERN_ERR PFX "Unsupported ALi chipset (device id: %04x)\n",
pdev->device);
return -ENODEV;


Expand Down Expand Up @@ -362,7 +361,8 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev,
bridge->driver = &ali_generic_bridge;
}

dev_info(&pdev->dev, "ALi %s chipset\n", devs[j].chipset_name);
printk(KERN_INFO PFX "Detected ALi %s chipset\n",
devs[j].chipset_name);

/* Fill in the mode register */
pci_read_config_dword(pdev,
Expand Down
Loading

0 comments on commit 573cccf

Please sign in to comment.