Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74205
b: refs/heads/master
c: b52f219
h: refs/heads/master
i:
  74203: 2e24e9d
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 20, 2007
1 parent 700a648 commit 16ece69
Show file tree
Hide file tree
Showing 48 changed files with 247 additions and 123 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: 1f305323ff5b9ddc1a4346d36072bcdb58f3f68a
refs/heads/master: b52f2198ac889561d341c6990d669a671f93f450
11 changes: 9 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ SRCARCH := $(ARCH)
# Additional ARCH settings for x86
ifeq ($(ARCH),i386)
SRCARCH := x86
K64BIT := n
endif
ifeq ($(ARCH),x86_64)
SRCARCH := x86
K64BIT := y
endif

KCONFIG_CONFIG ?= .config
Expand Down Expand Up @@ -339,7 +341,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export ARCH SRCARCH K64BIT CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS

Expand Down Expand Up @@ -1332,7 +1334,12 @@ else
ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
endif

ALLSOURCE_ARCHS := $(SRCARCH)
# Take care of arch/x86
ifeq ($(ARCH), $(SRCARCH))
ALLSOURCE_ARCHS := $(ARCH)
else
ALLSOURCE_ARCHS := $(ARCH) $(SRCARCH)
endif

define find-sources
( for arch in $(ALLSOURCE_ARCHS) ; do \
Expand Down
2 changes: 2 additions & 0 deletions trunk/README
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ CONFIGURING the kernel:
"make *config" checks for a file named "all{yes/mod/no/random}.config"
for symbol values that are to be forced. If this file is not found,
it checks for a file named "all.config" to contain forced values.
Finally it checks the environment variable K64BIT and if found, sets
the config symbol "64BIT" to the value of the K64BIT variable.

NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ mainmenu "Linux Kernel Configuration for x86"

# Select 32 or 64 bit
config 64BIT
bool "64-bit kernel" if ARCH = "x86"
default ARCH = "x86_64"
bool "64-bit kernel"
default n
help
Say yes to build a 64-bit kernel - formerly known as x86_64
Say no to build a 32-bit kernel - formerly known as i386
Expand Down
32 changes: 0 additions & 32 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,38 +637,6 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
}

hpet_address = hpet_tbl->address.address;

/*
* Some broken BIOSes advertise HPET at 0x0. We really do not
* want to allocate a resource there.
*/
if (!hpet_address) {
printk(KERN_WARNING PREFIX
"HPET id: %#x base: %#lx is invalid\n",
hpet_tbl->id, hpet_address);
return 0;
}
#ifdef CONFIG_X86_64
/*
* Some even more broken BIOSes advertise HPET at
* 0xfed0000000000000 instead of 0xfed00000. Fix it up and add
* some noise:
*/
if (hpet_address == 0xfed0000000000000UL) {
if (!hpet_force_user) {
printk(KERN_WARNING PREFIX "HPET id: %#x "
"base: 0xfed0000000000000 is bogus\n "
"try hpet=force on the kernel command line to "
"fix it up to 0xfed00000.\n", hpet_tbl->id);
hpet_address = 0;
return 0;
}
printk(KERN_WARNING PREFIX
"HPET id: %#x base: 0xfed0000000000000 fixed up "
"to 0xfed00000.\n", hpet_tbl->id);
hpet_address >>= 32;
}
#endif
printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
hpet_tbl->id, hpet_address);

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ static __cpuinit int mce_create_device(unsigned int cpu)
int err;
int i;

if (!mce_available(&boot_cpu_data))
if (!mce_available(&cpu_data(cpu)))
return -EIO;

memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject));
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/x86/kernel/cpu/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
int fpu_exception;

#ifdef CONFIG_SMP
if (!cpu_online(n))
return 0;
n = c->cpu_index;
#endif
seq_printf(m, "processor\t: %d\n"
Expand Down Expand Up @@ -175,14 +177,14 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos)
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_online_map);
if ((*pos) < NR_CPUS && cpu_online(*pos))
*pos = first_cpu(cpu_possible_map);
if ((*pos) < NR_CPUS && cpu_possible(*pos))
return &cpu_data(*pos);
return NULL;
}
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
*pos = next_cpu(*pos, cpu_online_map);
*pos = next_cpu(*pos, cpu_possible_map);
return c_start(m, pos);
}
static void c_stop(struct seq_file *m, void *v)
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/reboot_fixups_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ struct device_fixup {
static struct device_fixup fixups_table[] = {
{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset },
};

/*
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)

#ifdef CONFIG_SMP
c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff;
c->cpu_index = 0;
#endif
}

Expand Down Expand Up @@ -1077,6 +1078,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)


#ifdef CONFIG_SMP
if (!cpu_online(c->cpu_index))
return 0;
cpu = c->cpu_index;
#endif

Expand Down Expand Up @@ -1168,15 +1171,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
static void *c_start(struct seq_file *m, loff_t *pos)
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_online_map);
if ((*pos) < NR_CPUS && cpu_online(*pos))
*pos = first_cpu(cpu_possible_map);
if ((*pos) < NR_CPUS && cpu_possible(*pos))
return &cpu_data(*pos);
return NULL;
}

static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
*pos = next_cpu(*pos, cpu_online_map);
*pos = next_cpu(*pos, cpu_possible_map);
return c_start(m, pos);
}

Expand Down
41 changes: 19 additions & 22 deletions trunk/arch/x86/kernel/time_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,18 @@ static int set_rtc_mmss(unsigned long nowtime)
int retval = 0;
int real_seconds, real_minutes, cmos_minutes;
unsigned char control, freq_select;
unsigned long flags;

/*
* set_rtc_mmss is called when irqs are enabled, so disable irqs here
* IRQs are disabled when we're called from the timer interrupt,
* no need for spin_lock_irqsave()
*/
spin_lock_irqsave(&rtc_lock, flags);

spin_lock(&rtc_lock);

/*
* Tell the clock it's being set and stop it.
*/

control = CMOS_READ(RTC_CONTROL);
CMOS_WRITE(control | RTC_SET, RTC_CONTROL);

Expand Down Expand Up @@ -135,7 +138,7 @@ static int set_rtc_mmss(unsigned long nowtime)
CMOS_WRITE(control, RTC_CONTROL);
CMOS_WRITE(freq_select, RTC_FREQ_SELECT);

spin_unlock_irqrestore(&rtc_lock, flags);
spin_unlock(&rtc_lock);

return retval;
}
Expand All @@ -161,27 +164,21 @@ unsigned long read_persistent_clock(void)
unsigned century = 0;

spin_lock_irqsave(&rtc_lock, flags);
/*
* if UIP is clear, then we have >= 244 microseconds before RTC
* registers will be updated. Spec sheet says that this is the
* reliable way to read RTC - registers invalid (off bus) during update
*/
while ((CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
cpu_relax();


/* now read all RTC registers while stable with interrupts disabled */
sec = CMOS_READ(RTC_SECONDS);
min = CMOS_READ(RTC_MINUTES);
hour = CMOS_READ(RTC_HOURS);
day = CMOS_READ(RTC_DAY_OF_MONTH);
mon = CMOS_READ(RTC_MONTH);
year = CMOS_READ(RTC_YEAR);
do {
sec = CMOS_READ(RTC_SECONDS);
min = CMOS_READ(RTC_MINUTES);
hour = CMOS_READ(RTC_HOURS);
day = CMOS_READ(RTC_DAY_OF_MONTH);
mon = CMOS_READ(RTC_MONTH);
year = CMOS_READ(RTC_YEAR);
#ifdef CONFIG_ACPI
if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
acpi_gbl_FADT.century)
century = CMOS_READ(acpi_gbl_FADT.century);
if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
acpi_gbl_FADT.century)
century = CMOS_READ(acpi_gbl_FADT.century);
#endif
} while (sec != CMOS_READ(RTC_SECONDS));

spin_unlock_irqrestore(&rtc_lock, flags);

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-voyager/voyager_cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ static voyager_module_t *voyager_initial_module;
* boot cpu *after* all memory initialisation has been done (so we can
* use kmalloc) but before smp initialisation, so we can probe the SMP
* configuration and pick up necessary information. */
void __init
void
voyager_cat_init(void)
{
voyager_module_t **modpp = &voyager_initial_module;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/mach-voyager/voyager_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ voyager_smp_prepare_cpus(unsigned int max_cpus)
smp_boot_cpus();
}

static void __cpuinit voyager_smp_prepare_boot_cpu(void)
static void __devinit voyager_smp_prepare_boot_cpu(void)
{
init_gdt(smp_processor_id());
switch_to_new_gdt();
Expand All @@ -1911,7 +1911,7 @@ static void __cpuinit voyager_smp_prepare_boot_cpu(void)
cpu_set(smp_processor_id(), cpu_present_map);
}

static int __cpuinit
static int __devinit
voyager_cpu_up(unsigned int cpu)
{
/* This only works at boot for x86. See "rewrite" above. */
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ count_resource(struct acpi_resource *acpi_res, void *data)
struct acpi_resource_address64 addr;
acpi_status status;

if (info->res_num >= PCI_BUS_NUM_RESOURCES)
return AE_OK;

status = resource_to_addr(acpi_res, &addr);
if (ACPI_SUCCESS(status))
info->res_num++;
Expand All @@ -96,9 +93,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
unsigned long flags;
struct resource *root;

if (info->res_num >= PCI_BUS_NUM_RESOURCES)
return AE_OK;

status = resource_to_addr(acpi_res, &addr);
if (!ACPI_SUCCESS(status))
return AE_OK;
Expand Down
19 changes: 17 additions & 2 deletions trunk/arch/x86/vdso/vgetcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,32 @@
#include <asm/vgtod.h>
#include "vextern.h"

long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
{
unsigned int dummy, p;
unsigned long j = 0;

if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) {
/* Fast cache - only recompute value once per jiffies and avoid
relatively costly rdtscp/cpuid otherwise.
This works because the scheduler usually keeps the process
on the same CPU and this syscall doesn't guarantee its
results anyways.
We do this here because otherwise user space would do it on
its own in a likely inferior way (no access to jiffies).
If you don't like it pass NULL. */
if (tcache && tcache->blob[0] == (j = *vdso_jiffies)) {
p = tcache->blob[1];
} else if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) {
/* Load per CPU data from RDTSCP */
rdtscp(dummy, dummy, p);
} else {
/* Load per CPU data from GDT */
asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
}
if (tcache) {
tcache->blob[0] = j;
tcache->blob[1] = p;
}
if (cpu)
*cpu = p & 0xfff;
if (node)
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
}

static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev,
struct sk_buff *skb)
int maxpacket, struct sk_buff *skb)
{
int length;

Expand All @@ -1041,7 +1041,7 @@ static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev,
* but it must _not_ be a multiple of the USB packet size.
*/
length = roundup(skb->len, 2);
length += (2 * !(length % rt2x00dev->usb_maxpacket));
length += (2 * !(length % maxpacket));

return length;
}
Expand Down Expand Up @@ -1643,6 +1643,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw,
struct data_entry *beacon;
struct data_entry *guardian;
int pipe = usb_sndbulkpipe(usb_dev, 1);
int max_packet = usb_maxpacket(usb_dev, pipe, 1);
int length;

/*
Expand Down Expand Up @@ -1671,7 +1672,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw,
ring->desc_size),
skb->len - ring->desc_size, control);

length = rt2500usb_get_tx_data_len(rt2x00dev, skb);
length = rt2500usb_get_tx_data_len(rt2x00dev, max_packet, skb);

usb_fill_bulk_urb(beacon->priv, usb_dev, pipe,
skb->data, length, rt2500usb_beacondone, beacon);
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ struct rt2x00lib_ops {
int (*write_tx_data) (struct rt2x00_dev *rt2x00dev,
struct data_ring *ring, struct sk_buff *skb,
struct ieee80211_tx_control *control);
int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev,
int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, int maxpacket,
struct sk_buff *skb);
void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev,
unsigned int queue);
Expand Down Expand Up @@ -598,11 +598,6 @@ struct rt2x00_dev {
*/
u32 *rf;

/*
* USB Max frame size (for rt2500usb & rt73usb).
*/
u16 usb_maxpacket;

/*
* Current TX power value.
*/
Expand Down
Loading

0 comments on commit 16ece69

Please sign in to comment.