Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64458
b: refs/heads/master
c: dfa70f8
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson authored and Paul Mackerras committed Aug 25, 2007
1 parent 06b3d2e commit 54229e3
Show file tree
Hide file tree
Showing 91 changed files with 694 additions and 841 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: d96a2a5c6479342229416565944b56bc7a2b1a60
refs/heads/master: dfa70f81a05fa857fb1428ac2a88da84ecd50dd9
8 changes: 0 additions & 8 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@ Who: Len Brown <len.brown@intel.com>

---------------------------

What: /proc/acpi/event
When: February 2008
Why: /proc/acpi/event has been replaced by events via the input layer
and netlink since 2.6.23.
Who: Len Brown <len.brown@intel.com>

---------------------------

What: Compaq touchscreen device emulation
When: Oct 2007
Files: drivers/input/tsdev.c
Expand Down
19 changes: 9 additions & 10 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -952,10 +952,14 @@ and is between 256 and 4096 characters. It is defined in the file
Format: <1-256>

maxcpus= [SMP] Maximum number of processors that an SMP kernel
should make use of. maxcpus=n : n >= 0 limits the
kernel to using 'n' processors. n=0 is a special case,
it is equivalent to "nosmp", which also disables
the IO APIC.
should make use of.
Using "nosmp" or "maxcpus=0" will disable SMP
entirely (the MPS table probe still happens, though).
A command-line option of "maxcpus=<NUM>", where <NUM>
is an integer greater than 0, limits the maximum number
of CPUs activated in SMP mode to <NUM>.
Using "maxcpus=1" on an SMP kernel is the trivial
case of an SMP kernel with only one CPU.

max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or
equal to this physical address is ignored.
Expand Down Expand Up @@ -1180,8 +1184,7 @@ and is between 256 and 4096 characters. It is defined in the file

nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support.

nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
and disable the IO APIC. legacy for "maxcpus=0".
nosmp [SMP] Tells an SMP kernel to act as a UP kernel.

nosoftlockup [KNL] Disable the soft-lockup detector.

Expand Down Expand Up @@ -1823,10 +1826,6 @@ and is between 256 and 4096 characters. It is defined in the file
-1: disable all active trip points in all thermal zones
<degrees C>: override all lowest active trip points

thermal.crt= [HW,ACPI]
-1: disable all critical trip points in all thermal zones
<degrees C>: lower all critical trip points

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
Expand Down
24 changes: 12 additions & 12 deletions trunk/arch/i386/boot/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static inline void set_fs(u16 seg)
static inline u16 fs(void)
{
u16 seg;
asm volatile("movw %%fs,%0" : "=rm" (seg));
asm("movw %%fs,%0" : "=rm" (seg));
return seg;
}

Expand All @@ -98,7 +98,7 @@ static inline void set_gs(u16 seg)
static inline u16 gs(void)
{
u16 seg;
asm volatile("movw %%gs,%0" : "=rm" (seg));
asm("movw %%gs,%0" : "=rm" (seg));
return seg;
}

Expand All @@ -107,19 +107,19 @@ typedef unsigned int addr_t;
static inline u8 rdfs8(addr_t addr)
{
u8 v;
asm volatile("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
asm("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
return v;
}
static inline u16 rdfs16(addr_t addr)
{
u16 v;
asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
asm("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
return v;
}
static inline u32 rdfs32(addr_t addr)
{
u32 v;
asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
asm("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
return v;
}

Expand All @@ -139,19 +139,19 @@ static inline void wrfs32(u32 v, addr_t addr)
static inline u8 rdgs8(addr_t addr)
{
u8 v;
asm volatile("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
asm("movb %%gs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr));
return v;
}
static inline u16 rdgs16(addr_t addr)
{
u16 v;
asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
asm("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
return v;
}
static inline u32 rdgs32(addr_t addr)
{
u32 v;
asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
asm("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
return v;
}

Expand Down Expand Up @@ -180,15 +180,15 @@ static inline int memcmp(const void *s1, const void *s2, size_t len)
static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
{
u8 diff;
asm volatile("fs; repe; cmpsb; setnz %0"
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
asm("fs; repe; cmpsb; setnz %0"
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
{
u8 diff;
asm volatile("gs; repe; cmpsb; setnz %0"
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
asm("gs; repe; cmpsb; setnz %0"
: "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/i386/boot/cpucheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ static int has_fpu(void)
asm volatile("movl %0,%%cr0" : : "r" (cr0));
}

asm volatile("fninit ; fnstsw %0 ; fnstcw %1"
: "+m" (fsw), "+m" (fcw));
asm("fninit ; fnstsw %0 ; fnstcw %1" : "+m" (fsw), "+m" (fcw));

return fsw == 0 && (fcw & 0x103f) == 0x003f;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/i386/boot/edd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ static int read_mbr(u8 devno, void *buf)
cx = 0x0001; /* Sector 0-0-1 */
dx = devno;
bx = (size_t)buf;
asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
: : "esi", "edi", "memory");
asm("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
: : "esi", "edi", "memory");

return -(u8)ax; /* 0 or -1 */
}
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/i386/boot/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ static u8 gettime(void)
u16 ax = 0x0200;
u16 cx, dx;

asm volatile("int $0x1a"
: "+a" (ax), "=c" (cx), "=d" (dx)
: : "ebx", "esi", "edi");
asm("int $0x1a"
: "+a" (ax), "=c" (cx), "=d" (dx)
: : "ebx", "esi", "edi");

return dx >> 8;
}
Expand All @@ -67,17 +67,17 @@ static u8 gettime(void)
int getchar(void)
{
u16 ax = 0;
asm volatile("int $0x16" : "+a" (ax));
asm("int $0x16" : "+a" (ax));

return ax & 0xff;
}

static int kbd_pending(void)
{
u8 pending;
asm volatile("int $0x16; setnz %0"
: "=rm" (pending)
: "a" (0x0100));
asm("int $0x16; setnz %0"
: "=rm" (pending)
: "a" (0x0100));
return pending;
}

Expand Down
17 changes: 8 additions & 9 deletions trunk/arch/i386/boot/video-vga.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ static u8 vga_set_basic_mode(void)

#ifdef CONFIG_VIDEO_400_HACK
if (adapter >= ADAPTER_VGA) {
asm volatile(INT10
: : "a" (0x1202), "b" (0x0030)
: "ecx", "edx", "esi", "edi");
asm(INT10
: : "a" (0x1202), "b" (0x0030)
: "ecx", "edx", "esi", "edi");
}
#endif

ax = 0x0f00;
asm volatile(INT10
: "+a" (ax)
: : "ebx", "ecx", "edx", "esi", "edi");
asm(INT10
: "+a" (ax)
: : "ebx", "ecx", "edx", "esi", "edi");

mode = (u8)ax;

Expand All @@ -73,10 +73,9 @@ static u8 vga_set_basic_mode(void)
mode = 3;

/* Set the mode */
ax = mode;
asm volatile(INT10
: "+a" (ax)
: : "ebx", "ecx", "edx", "esi", "edi");
: : "a" (mode)
: "ebx", "ecx", "edx", "esi", "edi");
do_restore = 1;
return mode;
}
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,14 @@ static int pirq_entries [MAX_PIRQS];
static int pirqs_enabled;
int skip_ioapic_setup;

static int __init ioapic_setup(char *str)
{
skip_ioapic_setup = 1;
return 1;
}

__setup("noapic", ioapic_setup);

static int __init ioapic_pirq_setup(char *str)
{
int i, max;
Expand Down
141 changes: 141 additions & 0 deletions trunk/arch/parisc/kernel/sys_parisc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,147 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
return err;
}

struct linux32_dirent {
u32 d_ino;
compat_off_t d_off;
u16 d_reclen;
char d_name[1];
};

struct old_linux32_dirent {
u32 d_ino;
u32 d_offset;
u16 d_namlen;
char d_name[1];
};

struct getdents32_callback {
struct linux32_dirent __user * current_dir;
struct linux32_dirent __user * previous;
int count;
int error;
};

struct readdir32_callback {
struct old_linux32_dirent __user * dirent;
int count;
};

#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
static int filldir32 (void *__buf, const char *name, int namlen,
loff_t offset, u64 ino, unsigned int d_type)
{
struct linux32_dirent __user * dirent;
struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4);
u32 d_ino;

buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
d_ino = ino;
if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
return -EOVERFLOW;
dirent = buf->previous;
if (dirent)
put_user(offset, &dirent->d_off);
dirent = buf->current_dir;
buf->previous = dirent;
put_user(d_ino, &dirent->d_ino);
put_user(reclen, &dirent->d_reclen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
dirent = ((void __user *)dirent) + reclen;
buf->current_dir = dirent;
buf->count -= reclen;
return 0;
}

asmlinkage long
sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count)
{
struct file * file;
struct linux32_dirent __user * lastdirent;
struct getdents32_callback buf;
int error;

error = -EFAULT;
if (!access_ok(VERIFY_WRITE, dirent, count))
goto out;

error = -EBADF;
file = fget(fd);
if (!file)
goto out;

buf.current_dir = (struct linux32_dirent __user *) dirent;
buf.previous = NULL;
buf.count = count;
buf.error = 0;

error = vfs_readdir(file, filldir32, &buf);
if (error < 0)
goto out_putf;
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
if (put_user(file->f_pos, &lastdirent->d_off))
error = -EFAULT;
else
error = count - buf.count;
}

out_putf:
fput(file);
out:
return error;
}

static int fillonedir32(void * __buf, const char * name, int namlen,
loff_t offset, u64 ino, unsigned int d_type)
{
struct readdir32_callback * buf = (struct readdir32_callback *) __buf;
struct old_linux32_dirent __user * dirent;
u32 d_ino;

if (buf->count)
return -EINVAL;
d_ino = ino;
if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
return -EOVERFLOW;
buf->count++;
dirent = buf->dirent;
put_user(d_ino, &dirent->d_ino);
put_user(offset, &dirent->d_offset);
put_user(namlen, &dirent->d_namlen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
return 0;
}

asmlinkage long
sys32_readdir (unsigned int fd, void __user * dirent, unsigned int count)
{
int error;
struct file * file;
struct readdir32_callback buf;

error = -EBADF;
file = fget(fd);
if (!file)
goto out;

buf.count = 0;
buf.dirent = dirent;

error = vfs_readdir(file, fillonedir32, &buf);
if (error >= 0)
error = buf.count;
fput(file);
out:
return error;
}

/*** copied from mips64 ***/
/*
* Ooo, nasty. We need here to frob 32-bit unsigned longs to
Expand Down
Loading

0 comments on commit 54229e3

Please sign in to comment.