Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26564
b: refs/heads/master
c: d08d389
h: refs/heads/master
v: v3
  • Loading branch information
Nathan Scott committed May 8, 2006
1 parent 2239710 commit 73ea90d
Show file tree
Hide file tree
Showing 29 changed files with 99 additions and 213 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: 601e7f024edbea8018de34c83a7398623214e636
refs/heads/master: d08d389d5aef0509edba7ee42cd6c6a3998fee22
20 changes: 11 additions & 9 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,16 @@ scripts_basic:
scripts/basic/%: scripts_basic ;

PHONY += outputmakefile
# outputmakefile generates a Makefile in the output directory, if using a
# separate output directory. This allows convenient use of make in the
# output directory.
# outputmakefile generate a Makefile to be placed in output directory, if
# using a seperate output directory. This allows convinient use
# of make in output directory
outputmakefile:
ifneq ($(KBUILD_SRC),)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif
$(Q)if test ! $(srctree) -ef $(objtree); then \
$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \
> $(objtree)/Makefile; \
echo ' GEN $(objtree)/Makefile'; \
fi

# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
Expand Down Expand Up @@ -794,8 +796,8 @@ prepare2: prepare3 outputmakefile
prepare1: prepare2 include/linux/version.h include/asm \
include/config/MARKER
ifneq ($(KBUILD_MODULES),)
$(Q)rm -rf $(MODVERDIR)
$(Q)mkdir -p $(MODVERDIR)
$(Q)rm -f $(MODVERDIR)/*
endif

archprepare: prepare1 scripts_basic
Expand Down Expand Up @@ -1084,8 +1086,8 @@ else # KBUILD_EXTMOD
KBUILD_MODULES := 1
PHONY += crmodverdir
crmodverdir:
$(Q)rm -rf $(MODVERDIR)
$(Q)mkdir -p $(MODVERDIR)
$(Q)rm -f $(MODVERDIR)/*

PHONY += $(objtree)/Module.symvers
$(objtree)/Module.symvers:
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,8 +2238,6 @@ static inline void unlock_ExtINT_logic(void)
spin_unlock_irqrestore(&ioapic_lock, flags);
}

int timer_uses_ioapic_pin_0;

/*
* This code may look a bit paranoid, but it's supposed to cooperate with
* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ
Expand Down Expand Up @@ -2276,9 +2274,6 @@ static inline void check_timer(void)
pin2 = ioapic_i8259.pin;
apic2 = ioapic_i8259.apic;

if (pin1 == 0)
timer_uses_ioapic_pin_0 = 1;

printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
vector, apic1, pin1, apic2, pin2);

Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/i386/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,17 +1130,7 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity)
*/
int irq = gsi;
if (gsi < MAX_GSI_NUM) {
/*
* Retain the VIA chipset work-around (gsi > 15), but
* avoid a problem where the 8254 timer (IRQ0) is setup
* via an override (so it's not on pin 0 of the ioapic),
* and at the same time, the pin 0 interrupt is a PCI
* type. The gsi > 15 test could cause these two pins
* to be shared as IRQ0, and they are not shareable.
* So test for this condition, and if necessary, avoid
* the pin collision.
*/
if (gsi > 15 || (gsi == 0 && !timer_uses_ioapic_pin_0))
if (gsi > 15)
gsi = pci_irq++;
/*
* Don't assign IRQ used by ACPI SCI
Expand Down
9 changes: 3 additions & 6 deletions trunk/arch/ia64/lib/memcpy_mck.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
* in1: source address
* in2: number of bytes to copy
* Output:
* for memcpy: return dest
* for copy_user: return 0 if success,
* or number of byte NOT copied if error occurred.
* 0 if success, or number of byte NOT copied if error occurred.
*
* Copyright (C) 2002 Intel Corp.
* Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com>
Expand Down Expand Up @@ -75,7 +73,6 @@ GLOBAL_ENTRY(memcpy)
and r28=0x7,in0
and r29=0x7,in1
mov f6=f0
mov retval=in0
br.cond.sptk .common_code
;;
END(memcpy)
Expand All @@ -87,15 +84,15 @@ GLOBAL_ENTRY(__copy_user)
mov f6=f1
mov saved_in0=in0 // save dest pointer
mov saved_in1=in1 // save src pointer
mov retval=r0 // initialize return value
mov saved_in2=in2 // save len
;;
.common_code:
cmp.gt p15,p0=8,in2 // check for small size
cmp.ne p13,p0=0,r28 // check dest alignment
cmp.ne p14,p0=0,r29 // check src alignment
add src0=0,in1
sub r30=8,r28 // for .align_dest
mov saved_in2=in2 // save len
mov retval=r0 // initialize return value
;;
add dst0=0,in0
add dst1=1,in0 // dest odd index
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86_64/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
*addrp = __pa_symbol(&_end);
return 1;
}

if (last >= ebda_addr && addr < ebda_addr + ebda_size) {
*addrp = ebda_addr + ebda_size;
return 1;
}

/* XXX ramdisk image here? */
return 0;
}
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86_64/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1777,8 +1777,6 @@ static inline void unlock_ExtINT_logic(void)
spin_unlock_irqrestore(&ioapic_lock, flags);
}

int timer_uses_ioapic_pin_0;

/*
* This code may look a bit paranoid, but it's supposed to cooperate with
* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ
Expand Down Expand Up @@ -1816,9 +1814,6 @@ static inline void check_timer(void)
pin2 = ioapic_i8259.pin;
apic2 = ioapic_i8259.apic;

if (pin1 == 0)
timer_uses_ioapic_pin_0 = 1;

apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
vector, apic1, pin1, apic2, pin2);

Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/x86_64/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,17 +968,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
*/
int irq = gsi;
if (gsi < MAX_GSI_NUM) {
/*
* Retain the VIA chipset work-around (gsi > 15), but
* avoid a problem where the 8254 timer (IRQ0) is setup
* via an override (so it's not on pin 0 of the ioapic),
* and at the same time, the pin 0 interrupt is a PCI
* type. The gsi > 15 test could cause these two pins
* to be shared as IRQ0, and they are not shareable.
* So test for this condition, and if necessary, avoid
* the pin collision.
*/
if (gsi > 15 || (gsi == 0 && !timer_uses_ioapic_pin_0))
if (gsi > 15)
gsi = pci_irq++;
/*
* Don't assign IRQ used by ACPI SCI
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/x86_64/kernel/pci-gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,6 @@ static int __init pci_iommu_init(void)
return -1;
}

i = 0;
for_all_nb(dev)
i++;
if (i > MAX_NB) {
printk(KERN_ERR "PCI-GART: Too many northbridges (%ld). Disabled\n", i);
return -1;
}

printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
aper_size = info.aper_size * 1024 * 1024;
iommu_size = check_iommu_size(info.aper_base, aper_size);
Expand Down
30 changes: 8 additions & 22 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,28 +571,17 @@ static inline void copy_edd(void)
#endif

#define EBDA_ADDR_POINTER 0x40E

unsigned __initdata ebda_addr;
unsigned __initdata ebda_size;

static void discover_ebda(void)
static void __init reserve_ebda_region(void)
{
/*
unsigned int addr;
/**
* there is a real-mode segmented pointer pointing to the
* 4K EBDA area at 0x40E
*/
ebda_addr = *(unsigned short *)EBDA_ADDR_POINTER;
ebda_addr <<= 4;

ebda_size = *(unsigned short *)(unsigned long)ebda_addr;

/* Round EBDA up to pages */
if (ebda_size == 0)
ebda_size = 1;
ebda_size <<= 10;
ebda_size = round_up(ebda_size + (ebda_addr & ~PAGE_MASK), PAGE_SIZE);
if (ebda_size > 64*1024)
ebda_size = 64*1024;
addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER);
addr <<= 4;
if (addr)
reserve_bootmem_generic(addr, PAGE_SIZE);
}

void __init setup_arch(char **cmdline_p)
Expand Down Expand Up @@ -638,8 +627,6 @@ void __init setup_arch(char **cmdline_p)

check_efer();

discover_ebda();

init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));

dmi_scan_machine();
Expand Down Expand Up @@ -682,8 +669,7 @@ void __init setup_arch(char **cmdline_p)
reserve_bootmem_generic(0, PAGE_SIZE);

/* reserve ebda region */
if (ebda_addr)
reserve_bootmem_generic(ebda_addr, ebda_size);
reserve_ebda_region();

#ifdef CONFIG_SMP
/*
Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/x86_64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ void out_of_line_bug(void)

static DEFINE_SPINLOCK(die_lock);
static int die_owner = -1;
static unsigned int die_nest_count;

unsigned __kprobes long oops_begin(void)
{
Expand All @@ -400,7 +399,6 @@ unsigned __kprobes long oops_begin(void)
else
spin_lock(&die_lock);
}
die_nest_count++;
die_owner = cpu;
console_verbose();
bust_spinlocks(1);
Expand All @@ -411,13 +409,7 @@ void __kprobes oops_end(unsigned long flags)
{
die_owner = -1;
bust_spinlocks(0);
die_nest_count--;
if (die_nest_count)
/* We still own the lock */
local_irq_restore(flags);
else
/* Nest count reaches zero, release the lock. */
spin_unlock_irqrestore(&die_lock, flags);
spin_unlock_irqrestore(&die_lock, flags);
if (panic_on_oops)
panic("Oops");
}
Expand Down Expand Up @@ -472,8 +464,6 @@ void __kprobes die_nmi(char *str, struct pt_regs *regs)
panic("nmi watchdog");
printk("console shuts up ...\n");
oops_end(flags);
nmi_exit();
local_irq_enable();
do_exit(SIGSEGV);
}

Expand Down
32 changes: 0 additions & 32 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,35 +456,6 @@ static void class_device_remove_attrs(struct class_device * cd)
}
}

static int class_device_add_groups(struct class_device * cd)
{
int i;
int error = 0;

if (cd->groups) {
for (i = 0; cd->groups[i]; i++) {
error = sysfs_create_group(&cd->kobj, cd->groups[i]);
if (error) {
while (--i >= 0)
sysfs_remove_group(&cd->kobj, cd->groups[i]);
goto out;
}
}
}
out:
return error;
}

static void class_device_remove_groups(struct class_device * cd)
{
int i;
if (cd->groups) {
for (i = 0; cd->groups[i]; i++) {
sysfs_remove_group(&cd->kobj, cd->groups[i]);
}
}
}

static ssize_t show_dev(struct class_device *class_dev, char *buf)
{
return print_dev_t(buf, class_dev->devt);
Expand Down Expand Up @@ -588,8 +559,6 @@ int class_device_add(struct class_device *class_dev)
class_name);
}

class_device_add_groups(class_dev);

kobject_uevent(&class_dev->kobj, KOBJ_ADD);

/* notify any interfaces this device is now here */
Expand Down Expand Up @@ -703,7 +672,6 @@ void class_device_del(struct class_device *class_dev)
if (class_dev->devt_attr)
class_device_remove_file(class_dev, class_dev->devt_attr);
class_device_remove_attrs(class_dev);
class_device_remove_groups(class_dev);

kobject_uevent(&class_dev->kobj, KOBJ_REMOVE);
kobject_del(&class_dev->kobj);
Expand Down
28 changes: 8 additions & 20 deletions trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
static DEFINE_MUTEX (dbs_mutex);
static DECLARE_WORK (dbs_work, do_dbs_timer, NULL);

static struct workqueue_struct *dbs_workq;

struct dbs_tuners {
unsigned int sampling_rate;
unsigned int sampling_down_factor;
Expand Down Expand Up @@ -366,29 +364,23 @@ static void do_dbs_timer(void *data)
mutex_lock(&dbs_mutex);
for_each_online_cpu(i)
dbs_check_cpu(i);
queue_delayed_work(dbs_workq, &dbs_work,
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
schedule_delayed_work(&dbs_work,
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
mutex_unlock(&dbs_mutex);
}

static inline void dbs_timer_init(void)
{
INIT_WORK(&dbs_work, do_dbs_timer, NULL);
if (!dbs_workq)
dbs_workq = create_singlethread_workqueue("ondemand");
if (!dbs_workq) {
printk(KERN_ERR "ondemand: Cannot initialize kernel thread\n");
return;
}
queue_delayed_work(dbs_workq, &dbs_work,
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
schedule_delayed_work(&dbs_work,
usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
return;
}

static inline void dbs_timer_exit(void)
{
if (dbs_workq)
cancel_rearming_delayed_workqueue(dbs_workq, &dbs_work);
cancel_delayed_work(&dbs_work);
return;
}

static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
Expand Down Expand Up @@ -497,12 +489,8 @@ static int __init cpufreq_gov_dbs_init(void)

static void __exit cpufreq_gov_dbs_exit(void)
{
/* Make sure that the scheduled work is indeed not running.
Assumes the timer has been cancelled first. */
if (dbs_workq) {
flush_workqueue(dbs_workq);
destroy_workqueue(dbs_workq);
}
/* Make sure that the scheduled work is indeed not running */
flush_scheduled_work();

cpufreq_unregister_governor(&cpufreq_gov_dbs);
}
Expand Down
Loading

0 comments on commit 73ea90d

Please sign in to comment.