Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26549
b: refs/heads/master
c: 1498221
h: refs/heads/master
i:
  26547: ef19b66
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed May 7, 2006
1 parent 2cf2c90 commit 3e3eaf3
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 116 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: bed7a560333d40269a886c4421d4c8f964a32177
refs/heads/master: 1498221d51a43d5fa1a580618591497d90f957d9
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
7 changes: 1 addition & 6 deletions trunk/arch/arm/mach-aaec2000/aaed2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ static void __init aaed2000_init(void)
}

static struct map_desc aaed2000_io_desc[] __initdata = {
{
.virtual = EXT_GPIO_VBASE,
.pfn = __phys_to_pfn(EXT_GPIO_PBASE),
.length = EXT_GPIO_LENGTH,
.type = MT_DEVICE
},
{ EXT_GPIO_VBASE, EXT_GPIO_PBASE, EXT_GPIO_LENGTH, MT_DEVICE }, /* Ext GPIO */
};

static void __init aaed2000_map_io(void)
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/arm/mach-aaec2000/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/signal.h>
#include <linux/amba/bus.h>

#include <asm/hardware.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -49,12 +50,12 @@
static struct map_desc standard_io_desc[] __initdata = {
{
.virtual = VIO_APB_BASE,
.pfn = __phys_to_pfn(PIO_APB_BASE),
.physical = __phys_to_pfn(PIO_APB_BASE),
.length = IO_APB_LENGTH,
.type = MT_DEVICE
}, {
.virtual = VIO_AHB_BASE,
.pfn = __phys_to_pfn(PIO_AHB_BASE),
.physical = __phys_to_pfn(PIO_AHB_BASE),
.length = IO_AHB_LENGTH,
.type = MT_DEVICE
}
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-aaec2000/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
*/

#include <linux/amba/bus.h>
#include <linux/amba/clcd.h>

struct sys_timer;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/mx1ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ mx1ads_map_io(void)
MACHINE_START(MX1ADS, "Motorola MX1ADS")
/* Maintainer: Sascha Hauer, Pengutronix */
.phys_io = 0x00200000,
.io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
.io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
.boot_params = 0x08000100,
.map_io = mx1ads_map_io,
.init_irq = imx_init_irq,
Expand Down
16 changes: 0 additions & 16 deletions trunk/arch/arm/mach-sa1100/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,26 +199,10 @@ static void sa1100_unmask_irq(unsigned int irq)
ICMR |= (1 << irq);
}

/*
* Apart form GPIOs, only the RTC alarm can be a wakeup event.
*/
static int sa1100_set_wake(unsigned int irq, unsigned int on)
{
if (irq == IRQ_RTCAlrm) {
if (on)
PWER |= PWER_RTC;
else
PWER &= ~PWER_RTC;
return 0;
}
return -EINVAL;
}

static struct irqchip sa1100_normal_chip = {
.ack = sa1100_mask_irq,
.mask = sa1100_mask_irq,
.unmask = sa1100_unmask_irq,
.set_wake = sa1100_set_wake,
};

static struct resource irq_resource = {
Expand Down
32 changes: 32 additions & 0 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,35 @@ 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 @@ -559,6 +588,8 @@ 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 @@ -672,6 +703,7 @@ 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
6 changes: 3 additions & 3 deletions trunk/drivers/rtc/rtc-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ static int sa1100_rtc_open(struct device *dev)
return 0;

fail_pi:
free_irq(IRQ_RTCAlrm, dev);
free_irq(IRQ_RTCAlrm, NULL);
fail_ai:
free_irq(IRQ_RTC1Hz, dev);
free_irq(IRQ_RTC1Hz, NULL);
fail_ui:
return ret;
}
Expand Down Expand Up @@ -295,7 +295,7 @@ static int sa1100_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)

static int sa1100_rtc_proc(struct device *dev, struct seq_file *seq)
{
seq_printf(seq, "trim/divider\t: 0x%08lx\n", RTTR);
seq_printf(seq, "trim/divider\t: 0x%08x\n", RTTR);
seq_printf(seq, "alarm_IRQ\t: %s\n",
(RTSR & RTSR_ALE) ? "yes" : "no" );
seq_printf(seq, "update_IRQ\t: %s\n",
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/logo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extra-y += $(call logo-cfiles,_clut224,ppm)
extra-y += $(call logo-cfiles,_gray256,pgm)

# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
quiet_cmd_logo = LOGO $@
quiet_cmd_logo = LOGO $@
cmd_logo = scripts/pnmtologo \
-t $(patsubst $*_%,%,$(notdir $(basename $<))) \
-n $(notdir $(basename $<)) -o $@ $<
Expand Down
21 changes: 9 additions & 12 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,15 @@ static struct lock_manager_operations lease_manager_ops = {
*/
static int lease_init(struct file *filp, int type, struct file_lock *fl)
{
if (assign_type(fl, type) != 0)
return -EINVAL;

fl->fl_owner = current->files;
fl->fl_pid = current->tgid;

fl->fl_file = filp;
fl->fl_flags = FL_LEASE;
if (assign_type(fl, type) != 0) {
locks_free_lock(fl);
return -EINVAL;
}
fl->fl_start = 0;
fl->fl_end = OFFSET_MAX;
fl->fl_ops = NULL;
Expand All @@ -465,19 +466,16 @@ static int lease_init(struct file *filp, int type, struct file_lock *fl)
static int lease_alloc(struct file *filp, int type, struct file_lock **flp)
{
struct file_lock *fl = locks_alloc_lock();
int error = -ENOMEM;
int error;

if (fl == NULL)
goto out;
return -ENOMEM;

error = lease_init(filp, type, fl);
if (error) {
locks_free_lock(fl);
fl = NULL;
}
out:
if (error)
return error;
*flp = fl;
return error;
return 0;
}

/* Check if two locks overlap each other.
Expand Down Expand Up @@ -1374,7 +1372,6 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
goto out;

if (my_before != NULL) {
*flp = *my_before;
error = lease->fl_lmops->fl_change(my_before, arg);
goto out;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-arm/arch-aaec2000/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* published by the Free Software Foundation.
*/

#include "hardware.h"
.macro addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-arm/arch-aaec2000/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* published by the Free Software Foundation.
*
*/
#include <asm/arch/irqs.h>

.macro disable_fiq
.endm
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-arm/arch-imx/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
tst \rx, #1 @ MMU enabled?
moveq \rx, #0x00000000 @ physical
movne \rx, #0xe0000000 @ virtual
orreq \rx, \rx, #0x00200000 @ physical
orr \rx, \rx, #0x00200000
orr \rx, \rx, #0x00006000 @ UART1 offset
.endm

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ extern int class_device_create_file(struct class_device *,
* @node: for internal use by the driver core only.
* @kobj: for internal use by the driver core only.
* @devt_attr: for internal use by the driver core only.
* @groups: optional additional groups to be created
* @dev: if set, a symlink to the struct device is created in the sysfs
* directory for this struct class device.
* @class_data: pointer to whatever you want to store here for this struct
Expand Down Expand Up @@ -228,6 +229,7 @@ struct class_device {
struct device * dev; /* not necessary, but nice to have */
void * class_data; /* class-specific data */
struct class_device *parent; /* parent of this child device, if there is one */
struct attribute_group ** groups; /* optional groups */

void (*release)(struct class_device *dev);
int (*uevent)(struct class_device *dev, char **envp,
Expand Down
39 changes: 18 additions & 21 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,12 @@ int ptrace_may_attach(struct task_struct *task)
int ptrace_attach(struct task_struct *task)
{
int retval;

task_lock(task);
retval = -EPERM;
if (task->pid <= 1)
goto out;
goto bad;
if (task->tgid == current->tgid)
goto out;

write_lock_irq(&tasklist_lock);
task_lock(task);

goto bad;
/* the same process cannot be attached many times */
if (task->ptrace & PT_PTRACED)
goto bad;
Expand All @@ -170,15 +166,17 @@ int ptrace_attach(struct task_struct *task)
? PT_ATTACHED : 0);
if (capable(CAP_SYS_PTRACE))
task->ptrace |= PT_PTRACE_CAP;
task_unlock(task);

write_lock_irq(&tasklist_lock);
__ptrace_link(task, current);
write_unlock_irq(&tasklist_lock);

force_sig_specific(SIGSTOP, task);
return 0;

bad:
write_unlock_irq(&tasklist_lock);
task_unlock(task);
out:
return retval;
}

Expand Down Expand Up @@ -419,22 +417,21 @@ int ptrace_request(struct task_struct *child, long request,
*/
int ptrace_traceme(void)
{
int ret = -EPERM;
int ret;

/*
* Are we already being traced?
*/
task_lock(current);
if (!(current->ptrace & PT_PTRACED)) {
ret = security_ptrace(current->parent, current);
/*
* Set the ptrace bit in the process ptrace flags.
*/
if (!ret)
current->ptrace |= PT_PTRACED;
}
task_unlock(current);
return ret;
if (current->ptrace & PT_PTRACED)
return -EPERM;
ret = security_ptrace(current->parent, current);
if (ret)
return -EPERM;
/*
* Set the ptrace bit in the process ptrace flags.
*/
current->ptrace |= PT_PTRACED;
return 0;
}

/**
Expand Down
6 changes: 1 addition & 5 deletions trunk/scripts/gen_initramfs_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,7 @@ input_file() {
print_mtime "$1" >> ${output}
cat "$1" >> ${output}
else
cat "$1" | while read type dir file perm ; do
if [ "$type" == "file" ]; then
echo "$file \\";
fi
done
grep ^file "$1" | cut -d ' ' -f 3
fi
elif [ -d "$1" ]; then
dir_filelist "$1"
Expand Down
Loading

0 comments on commit 3e3eaf3

Please sign in to comment.