Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5417
b: refs/heads/master
c: 6192b54
h: refs/heads/master
i:
  5415: 7279580
v: v3
  • Loading branch information
David S. Miller committed Jul 28, 2005
1 parent 1b0956f commit a861c09
Show file tree
Hide file tree
Showing 63 changed files with 658 additions and 915 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: 911656f8a630e36b22c7e2bba3317dec9174209c
refs/heads/master: 6192b54b845ed05cb838f86ca588cc625c703a09
10 changes: 4 additions & 6 deletions trunk/Documentation/x86_64/boot-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Timing
notsc
Don't use the CPU time stamp counter to read the wall time.
This can be used to work around timing problems on multiprocessor systems
with not properly synchronized CPUs.
with not properly synchronized CPUs. Only useful with a SMP kernel

report_lost_ticks
Report when timer interrupts are lost because some code turned off
Expand All @@ -74,9 +74,6 @@ Idle loop
event. This will make the CPUs eat a lot more power, but may be useful
to get slightly better performance in multiprocessor benchmarks. It also
makes some profiling using performance counters more accurate.
Please note that on systems with MONITOR/MWAIT support (like Intel EM64T
CPUs) this option has no performance advantage over the normal idle loop.
It may also interact badly with hyperthreading.

Rebooting

Expand Down Expand Up @@ -181,5 +178,6 @@ Debugging
Misc

noreplacement Don't replace instructions with more appropiate ones
for the CPU. This may be useful on asymmetric MP systems
where some CPU have less capabilities than the others.
for the CPU. This may be useful on asymmetric MP systems
where some CPU have less capabilities than the others.

2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 13
EXTRAVERSION =-rc4
EXTRAVERSION =-rc3
NAME=Woozy Numbat

# *DOCUMENTATION*
Expand Down
20 changes: 6 additions & 14 deletions trunk/arch/i386/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
cpuid_count(4, index, &eax, &ebx, &ecx, &edx);
cache_eax.full = eax;
if (cache_eax.split.type == CACHE_TYPE_NULL)
return -EIO; /* better error ? */
return -1;

this_leaf->eax.full = eax;
this_leaf->ebx.full = ebx;
Expand Down Expand Up @@ -334,7 +334,6 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
struct _cpuid4_info *this_leaf;
unsigned long j;
int retval;
cpumask_t oldmask;

if (num_cache_leaves == 0)
return -ENOENT;
Expand All @@ -346,26 +345,19 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
memset(cpuid4_info[cpu], 0,
sizeof(struct _cpuid4_info) * num_cache_leaves);

oldmask = current->cpus_allowed;
retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
if (retval)
goto out;

/* Do cpuid and store the results */
retval = 0;
for (j = 0; j < num_cache_leaves; j++) {
this_leaf = CPUID4_INFO_IDX(cpu, j);
retval = cpuid4_cache_lookup(j, this_leaf);
if (unlikely(retval < 0))
break;
goto err_out;
cache_shared_cpu_map_setup(cpu, j);
}
set_cpus_allowed(current, oldmask);
return 0;

out:
if (retval)
free_cache_attributes(cpu);
return retval;
err_out:
free_cache_attributes(cpu);
return -ENOMEM;
}

#ifdef CONFIG_SYSFS
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/i386/kernel/numaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/nodemask.h>
#include <asm/numaq.h>
#include <asm/topology.h>
#include <asm/processor.h>

#define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))

Expand Down Expand Up @@ -78,11 +77,3 @@ int __init get_memcfg_numaq(void)
smp_dump_qct();
return 1;
}

static int __init numaq_dsc_disable(void)
{
printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
tsc_disable = 1;
return 0;
}
core_initcall(numaq_dsc_disable);
4 changes: 1 addition & 3 deletions trunk/arch/um/drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ harddog-objs := harddog_kern.o harddog_user.o

LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a)

targets := pcap_kern.o pcap_user.o

$(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o
$(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o)
#XXX: The call below does not work because the flags are added before the
# object name, so nothing from the library gets linked.
#$(call if_changed,ld)

# When the above is fixed, don't forget to add this too!
#targets += $(obj)/pcap.o
#targets := $(obj)/pcap.o

obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o
obj-$(CONFIG_SSL) += ssl.o
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/drivers/mconsole_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static int create_proc_mconsole(void)

ent = create_proc_entry("mconsole", S_IFREG | 0200, NULL);
if(ent == NULL){
printk(KERN_INFO "create_proc_mconsole : create_proc_entry failed\n");
printk("create_proc_mconsole : create_proc_entry failed\n");
return(0);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/exitcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int make_proc_exitcode(void)

ent = create_proc_entry("exitcode", 0600, &proc_root);
if(ent == NULL){
printk(KERN_WARNING "make_proc_exitcode : Failed to register "
printk("make_proc_exitcode : Failed to register "
"/proc/exitcode\n");
return(0);
}
Expand Down
48 changes: 19 additions & 29 deletions trunk/arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int start_fork_tramp(void *thread_arg, unsigned long temp_stack,
return(arg.pid);
}

static int ptrace_child(void *arg)
static int ptrace_child(void)
{
int ret;
int pid = os_getpid(), ppid = getppid();
Expand Down Expand Up @@ -160,41 +160,36 @@ static int ptrace_child(void *arg)
_exit(ret);
}

static int start_ptraced_child(void **stack_out)
static int start_ptraced_child(void)
{
void *stack;
unsigned long sp;
int pid, n, status;

stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if(stack == MAP_FAILED)
panic("check_ptrace : mmap failed, errno = %d", errno);
sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
pid = fork();
if(pid == 0)
ptrace_child();

if(pid < 0)
panic("check_ptrace : clone failed, errno = %d", errno);
panic("check_ptrace : fork failed, errno = %d", errno);
CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
if(n < 0)
panic("check_ptrace : wait failed, errno = %d", errno);
if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP))
panic("check_ptrace : expected SIGSTOP, got status = %d",
status);

*stack_out = stack;
return(pid);
}

/* When testing for SYSEMU support, if it is one of the broken versions, we must
* just avoid using sysemu, not panic, but only if SYSEMU features are broken.
* So only for SYSEMU features we test mustpanic, while normal host features
* must work anyway!*/
static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
static int stop_ptraced_child(int pid, int exitcode, int mustexit)
{
int status, n, ret = 0;

if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
panic("check_ptrace : ptrace failed, errno = %d", errno);
panic("stop_ptraced_child : ptrace failed, errno = %d", errno);
CATCH_EINTR(n = waitpid(pid, &status, 0));
if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
int exit_with = WEXITSTATUS(status);
Expand All @@ -205,15 +200,13 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
printk("check_ptrace : child exited with exitcode %d, while "
"expecting %d; status 0x%x", exit_with,
exitcode, status);
if (mustpanic)
if (mustexit)
panic("\n");
else
printk("\n");
ret = -1;
}

if(munmap(stack, PAGE_SIZE) < 0)
panic("check_ptrace : munmap failed, errno = %d", errno);
return ret;
}

Expand Down Expand Up @@ -249,12 +242,11 @@ __uml_setup("nosysemu", nosysemu_cmd_param,

static void __init check_sysemu(void)
{
void *stack;
int pid, syscall, n, status, count=0;

printk("Checking syscall emulation patch for ptrace...");
sysemu_supported = 0;
pid = start_ptraced_child(&stack);
pid = start_ptraced_child();

if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
goto fail;
Expand All @@ -272,15 +264,15 @@ static void __init check_sysemu(void)
panic("check_sysemu : failed to modify system "
"call return, errno = %d", errno);

if (stop_ptraced_child(pid, stack, 0, 0) < 0)
if (stop_ptraced_child(pid, 0, 0) < 0)
goto fail_stopped;

sysemu_supported = 1;
printk("OK\n");
set_using_sysemu(!force_sysemu_disabled);

printk("Checking advanced syscall emulation patch for ptrace...");
pid = start_ptraced_child(&stack);
pid = start_ptraced_child();
while(1){
count++;
if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
Expand All @@ -305,7 +297,7 @@ static void __init check_sysemu(void)
break;
}
}
if (stop_ptraced_child(pid, stack, 0, 0) < 0)
if (stop_ptraced_child(pid, 0, 0) < 0)
goto fail_stopped;

sysemu_supported = 2;
Expand All @@ -316,18 +308,17 @@ static void __init check_sysemu(void)
return;

fail:
stop_ptraced_child(pid, stack, 1, 0);
stop_ptraced_child(pid, 1, 0);
fail_stopped:
printk("missing\n");
}

void __init check_ptrace(void)
{
void *stack;
int pid, syscall, n, status;

printk("Checking that ptrace can change system call numbers...");
pid = start_ptraced_child(&stack);
pid = start_ptraced_child();

if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
Expand All @@ -354,7 +345,7 @@ void __init check_ptrace(void)
break;
}
}
stop_ptraced_child(pid, stack, 0, 1);
stop_ptraced_child(pid, 0, 1);
printk("OK\n");
check_sysemu();
}
Expand Down Expand Up @@ -389,11 +380,10 @@ extern void *__syscall_stub_start, __syscall_stub_end;
static inline void check_skas3_ptrace_support(void)
{
struct ptrace_faultinfo fi;
void *stack;
int pid, n;

printf("Checking for the skas3 patch in the host...");
pid = start_ptraced_child(&stack);
pid = start_ptraced_child();

n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
if (n < 0) {
Expand All @@ -412,7 +402,7 @@ static inline void check_skas3_ptrace_support(void)
}

init_registers(pid);
stop_ptraced_child(pid, stack, 1, 1);
stop_ptraced_child(pid, 1, 1);
}

int can_do_skas(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ int __init make_proc_sysemu(void)

if (ent == NULL)
{
printk(KERN_WARNING "Failed to register /proc/sysemu\n");
printk("Failed to register /proc/sysemu\n");
return(0);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/skas/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void wait_stub_done(int pid, int sig, char * fname)
(WSTOPSIG(status) == SIGVTALRM));

if((n < 0) || !WIFSTOPPED(status) ||
(WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
(WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status != SIGTRAP))){
panic("%s : failed to wait for SIGUSR1/SIGTRAP, "
"pid = %d, n = %d, errno = %d, status = 0x%x\n",
fname, pid, n, errno, status);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/um/kernel/skas/trap_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ void user_signal(int sig, union uml_pt_regs *regs, int pid)
int segv = ((sig == SIGFPE) || (sig == SIGSEGV) || (sig == SIGBUS) ||
(sig == SIGILL) || (sig == SIGTRAP));

regs->skas.is_user = 1;
if (segv)
get_skas_faultinfo(pid, &regs->skas.faultinfo);
info = &sig_info[sig];
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/um/kernel/time_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ long um_stime(int __user *tptr)
void timer_handler(int sig, union uml_pt_regs *regs)
{
local_irq_disable();
irq_enter();
update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)),
(regs)->skas.is_user));
irq_exit();
update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user));
local_irq_enable();
if(current_thread->cpu == 0)
timer_irq(regs);
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/um/os-Linux/user_syms.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ EXPORT_SYMBOL_PROTO(statfs64);

EXPORT_SYMBOL_PROTO(getuid);

EXPORT_SYMBOL_PROTO(fsync);
EXPORT_SYMBOL_PROTO(fdatasync);

/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/um/sys-i386/stub_segv.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ stub_segv_handler(int sig)
__asm__("movl %0, %%eax ; int $0x80": : "g" (__NR_getpid));
__asm__("movl %%eax, %%ebx ; movl %0, %%eax ; movl %1, %%ecx ;"
"int $0x80": : "g" (__NR_kill), "g" (SIGUSR1));
/* Load pointer to sigcontext into esp, since we need to leave
/* Pop the frame pointer and return address since we need to leave
* the stack in its original form when we do the sigreturn here, by
* hand.
*/
__asm__("mov %0,%%esp ; movl %1, %%eax ; "
"int $0x80" : : "a" (sc), "g" (__NR_sigreturn));
__asm__("popl %%eax ; popl %%eax ; popl %%eax ; movl %0, %%eax ; "
"int $0x80" : : "g" (__NR_sigreturn));
}
5 changes: 1 addition & 4 deletions trunk/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,12 @@ config HPET_EMULATE_RTC

config GART_IOMMU
bool "IOMMU support"
default y
depends on PCI
help
Support the IOMMU. Needed to run systems with more than 3GB of memory
Support the K8 IOMMU. Needed to run systems with more than 4GB of memory
properly with 32-bit PCI devices that do not support DAC (Double Address
Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter.
Normally the kernel will take the right choice by itself.
This option includes a driver for the AMD Opteron/Athlon64 IOMMU
and a software emulation used on some other systems.
If unsure, say Y.

# need this always enabled with GART_IOMMU for the VIA workaround
Expand Down
Loading

0 comments on commit a861c09

Please sign in to comment.