Skip to content

Commit

Permalink
Merge branch 'master' into upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Apr 27, 2006
2 parents 9f1da23 + 2be4d50 commit 1a2e8a6
Show file tree
Hide file tree
Showing 51 changed files with 450 additions and 226 deletions.
5 changes: 5 additions & 0 deletions Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class/
devices/
firmware/
net/
fs/

devices/ contains a filesystem representation of the device tree. It maps
directly to the internal kernel device tree, which is a hierarchy of
Expand All @@ -264,6 +265,10 @@ drivers/ contains a directory for each device driver that is loaded
for devices on that particular bus (this assumes that drivers do not
span multiple bus types).

fs/ contains a directory for some filesystems. Currently each
filesystem wanting to export attributes must create its own hierarchy
below fs/ (see ./fuse.txt for an example).


More information can driver-model specific features can be found in
Documentation/driver-model/.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 17
EXTRAVERSION =-rc2
EXTRAVERSION =-rc3
NAME=Sliding Snow Leopard

# *DOCUMENTATION*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -
tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)

ifeq ($(CONFIG_AEABI),y)
CFLAGS_ABI :=-mabi=aapcs -mno-thumb-interwork
CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork
else
CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ifneq ($(CONFIG_ARCH_EBSA110),y)
obj-y += io.o
endif

head-y := head.o
head-y := head$(MMUEXT).o
obj-$(CONFIG_DEBUG_LL) += debug.o

extra-y := $(head-y) init_task.o vmlinux.lds
4 changes: 3 additions & 1 deletion arch/arm/kernel/head-nommu.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
#include <asm/mach-types.h>
#include <asm/procinfo.h>
#include <asm/ptrace.h>
#include <asm/constants.h>
#include <asm/thread_info.h>
#include <asm/system.h>

#define PROCINFO_INITFUNC 12
#define MACHINFO_TYPE 0

/*
* Kernel startup entry point.
Expand Down Expand Up @@ -79,5 +80,6 @@ __after_proc_init:

mov pc, r13 @ clear the BSS and jump
@ to start_kernel
.ltorg

#include "head-common.S"
2 changes: 1 addition & 1 deletion arch/arm/vfp/vfpdouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce
dd, d, exceptions);
vfp_put_double(dd, d);
}
return exceptions & ~VFP_NAN_FLAG;
return exceptions;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs)
* emulate it.
*/
}
return exceptions;
return exceptions & ~VFP_NAN_FLAG;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/vfp/vfpsingle.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce
vfp_put_float(sd, d);
}

return exceptions & ~VFP_NAN_FLAG;
return exceptions;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev)
return;
}

static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb,
static int cacheinfo_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1610,5 +1610,6 @@ sys_call_table:
data8 sys_get_robust_list
data8 sys_sync_file_range // 1300
data8 sys_tee
data8 sys_vmsplice

.org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
2 changes: 1 addition & 1 deletion arch/ia64/kernel/palinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu)
}
}

static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
static int palinfo_cpu_callback(struct notifier_block *nfb,
unsigned long action,
void *hcpu)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = {
};

#ifdef CONFIG_HOTPLUG_CPU
static int __devinit
static int
salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
{
unsigned int i, cpu = (unsigned long)hcpu;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
* When a cpu is hot-plugged, do a check and initiate
* cache kobject if necessary
*/
static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
static int cache_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
Expand Down
64 changes: 2 additions & 62 deletions arch/mips/kernel/linux32.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,73 +356,13 @@ asmlinkage int sys32_llseek(unsigned int fd, unsigned int offset_high,
asmlinkage ssize_t sys32_pread(unsigned int fd, char __user * buf,
size_t count, u32 unused, u64 a4, u64 a5)
{
ssize_t ret;
struct file * file;
ssize_t (*read)(struct file *, char __user *, size_t, loff_t *);
loff_t pos;

ret = -EBADF;
file = fget(fd);
if (!file)
goto bad_file;
if (!(file->f_mode & FMODE_READ))
goto out;
pos = merge_64(a4, a5);
ret = rw_verify_area(READ, file, &pos, count);
if (ret < 0)
goto out;
ret = -EINVAL;
if (!file->f_op || !(read = file->f_op->read))
goto out;
if (pos < 0)
goto out;
ret = -ESPIPE;
if (!(file->f_mode & FMODE_PREAD))
goto out;
ret = read(file, buf, count, &pos);
if (ret > 0)
dnotify_parent(file->f_dentry, DN_ACCESS);
out:
fput(file);
bad_file:
return ret;
return sys_pread64(fd, buf, count, merge_64(a4, a5));
}

asmlinkage ssize_t sys32_pwrite(unsigned int fd, const char __user * buf,
size_t count, u32 unused, u64 a4, u64 a5)
{
ssize_t ret;
struct file * file;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *);
loff_t pos;

ret = -EBADF;
file = fget(fd);
if (!file)
goto bad_file;
if (!(file->f_mode & FMODE_WRITE))
goto out;
pos = merge_64(a4, a5);
ret = rw_verify_area(WRITE, file, &pos, count);
if (ret < 0)
goto out;
ret = -EINVAL;
if (!file->f_op || !(write = file->f_op->write))
goto out;
if (pos < 0)
goto out;

ret = -ESPIPE;
if (!(file->f_mode & FMODE_PWRITE))
goto out;

ret = write(file, buf, count, &pos);
if (ret > 0)
dnotify_parent(file->f_dentry, DN_MODIFY);
out:
fput(file);
bad_file:
return ret;
return sys_pwrite64(fd, buf, count, merge_64(a4, a5));
}

asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid,
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu)
}
#endif /* CONFIG_HOTPLUG_CPU */

static int __devinit sysfs_cpu_notify(struct notifier_block *self,
static int sysfs_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned int)(long)hcpu;
Expand All @@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}

static struct notifier_block __devinitdata sysfs_cpu_nb = {
static struct notifier_block sysfs_cpu_nb = {
.notifier_call = sysfs_cpu_notify,
};

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/systbl.S
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ COMPAT_SYS(ppoll)
SYSCALL(unshare)
SYSCALL(splice)
SYSCALL(tee)
SYSCALL(vmsplice)

/*
* please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/cell/spu_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ void *spu_syscall_table[] = {
[__NR_unshare] sys_unshare,
[__NR_splice] sys_splice,
[__NR_tee] sys_tee,
[__NR_vmsplice] sys_vmsplice,
};

long spu_sys_callback(struct spu_syscall_block *s)
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ appldata_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}

static struct notifier_block __devinitdata appldata_nb = {
static struct notifier_block appldata_nb = {
.notifier_call = appldata_cpu_notify,
};

Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
#endif

/* Get notified when a cpu comes on/off. Be hotplug friendly. */
static __cpuinit int
static int
mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu)
#endif

/* get notified when a cpu comes on/off */
static __cpuinit int threshold_cpu_callback(struct notifier_block *nfb,
static int threshold_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
/* cpu was unsigned int to begin with */
Expand Down
2 changes: 1 addition & 1 deletion block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3385,7 +3385,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action,
}


static struct notifier_block __devinitdata blk_cpu_notifier = {
static struct notifier_block blk_cpu_notifier = {
.notifier_call = blk_cpu_notify,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
return 0;
}

static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
static int topology_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
Expand Down
14 changes: 14 additions & 0 deletions drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/crash_dump.h>
#include <linux/backing-dev.h>
#include <linux/bootmem.h>
#include <linux/pipe_fs_i.h>

#include <asm/uaccess.h>
#include <asm/io.h>
Expand Down Expand Up @@ -578,6 +579,18 @@ static ssize_t write_null(struct file * file, const char __user * buf,
return count;
}

static int pipe_to_null(struct pipe_inode_info *info, struct pipe_buffer *buf,
struct splice_desc *sd)
{
return sd->len;
}

static ssize_t splice_write_null(struct pipe_inode_info *pipe,struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
{
return splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_null);
}

#ifdef CONFIG_MMU
/*
* For fun, we are using the MMU for this.
Expand Down Expand Up @@ -785,6 +798,7 @@ static struct file_operations null_fops = {
.llseek = null_lseek,
.read = read_null,
.write = write_null,
.splice_write = splice_write_null,
};

#if defined(CONFIG_ISA) || !defined(__mc68000__)
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ int cpufreq_update_policy(unsigned int cpu)
}
EXPORT_SYMBOL(cpufreq_update_policy);

static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
static int cpufreq_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
Expand Down
10 changes: 4 additions & 6 deletions drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ struct pxamci_host {
unsigned int dma_dir;
};

static inline unsigned int ns_to_clocks(unsigned int ns)
{
return (ns * (CLOCKRATE / 1000000) + 999) / 1000;
}

static void pxamci_stop_clock(struct pxamci_host *host)
{
if (readl(host->base + MMC_STAT) & STAT_CLK_EN) {
Expand Down Expand Up @@ -113,6 +108,7 @@ static void pxamci_disable_irq(struct pxamci_host *host, unsigned int mask)
static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
{
unsigned int nob = data->blocks;
unsigned long long clks;
unsigned int timeout;
u32 dcmd;
int i;
Expand All @@ -125,7 +121,9 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
writel(nob, host->base + MMC_NOB);
writel(1 << data->blksz_bits, host->base + MMC_BLKLEN);

timeout = ns_to_clocks(data->timeout_ns) + data->timeout_clks;
clks = (unsigned long long)data->timeout_ns * CLOCKRATE;
do_div(clks, 1000000000UL);
timeout = (unsigned int)clks + (data->timeout_clks << host->clkrt);
writel((timeout + 255) / 256, host->base + MMC_RDTO);

if (data->flags & MMC_DATA_READ) {
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ static int activate_ep_files (struct dev_data *dev)
data, &ep_config_operations,
&data->dentry);
if (!data->inode) {
usb_ep_free_request(ep, data->req);
kfree (data);
goto enomem;
}
Expand Down
4 changes: 4 additions & 0 deletions fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,10 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
if (ret < 0)
goto out;

ret = security_file_permission(file, type == READ ? MAY_READ:MAY_WRITE);
if (ret)
goto out;

fnv = NULL;
if (type == READ) {
fn = file->f_op->read;
Expand Down
Loading

0 comments on commit 1a2e8a6

Please sign in to comment.