Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26553
b: refs/heads/master
c: 96b8eaa
h: refs/heads/master
i:
  26551: fc67830
v: v3
  • Loading branch information
Linus Torvalds committed May 8, 2006
1 parent 008c1e4 commit 3186a94
Show file tree
Hide file tree
Showing 18 changed files with 116 additions and 56 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: 0eb1bd210d94e9f2c87551d794bb2755e5e24eed
refs/heads/master: 96b8eaa14a20771997b501a049e418b871bf9def
20 changes: 9 additions & 11 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,14 @@ scripts_basic:
scripts/basic/%: scripts_basic ;

PHONY += outputmakefile
# 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 generates a Makefile in the output directory, if using a
# separate output directory. This allows convenient use of make in the
# output directory.
outputmakefile:
$(Q)if test ! $(srctree) -ef $(objtree); then \
$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \
> $(objtree)/Makefile; \
echo ' GEN $(objtree)/Makefile'; \
fi
ifneq ($(KBUILD_SRC),)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif

# 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 @@ -796,8 +794,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 @@ -1086,8 +1084,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: 6 additions & 1 deletion trunk/arch/arm/mach-aaec2000/aaed2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ static void __init aaed2000_init(void)
}

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

static void __init aaed2000_map_io(void)
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/arm/mach-aaec2000/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#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 @@ -50,12 +49,12 @@
static struct map_desc standard_io_desc[] __initdata = {
{
.virtual = VIO_APB_BASE,
.physical = __phys_to_pfn(PIO_APB_BASE),
.pfn = __phys_to_pfn(PIO_APB_BASE),
.length = IO_APB_LENGTH,
.type = MT_DEVICE
}, {
.virtual = VIO_AHB_BASE,
.physical = __phys_to_pfn(PIO_AHB_BASE),
.pfn = __phys_to_pfn(PIO_AHB_BASE),
.length = IO_AHB_LENGTH,
.type = MT_DEVICE
}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-aaec2000/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
*/

#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 = ((0xe0200000) >> 18) & 0xfffc,
.io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
.boot_params = 0x08000100,
.map_io = mx1ads_map_io,
.init_irq = imx_init_irq,
Expand Down
16 changes: 16 additions & 0 deletions trunk/arch/arm/mach-sa1100/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,26 @@ 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
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, NULL);
free_irq(IRQ_RTCAlrm, dev);
fail_ai:
free_irq(IRQ_RTC1Hz, NULL);
free_irq(IRQ_RTC1Hz, dev);
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%08x\n", RTTR);
seq_printf(seq, "trim/divider\t: 0x%08lx\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: 12 additions & 9 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,15 +446,14 @@ 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 @@ -466,16 +465,19 @@ 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;
int error = -ENOMEM;

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

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

/* Check if two locks overlap each other.
Expand Down Expand Up @@ -1372,6 +1374,7 @@ 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: 1 addition & 0 deletions trunk/include/asm-arm/arch-aaec2000/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* 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: 1 addition & 0 deletions trunk/include/asm-arm/arch-aaec2000/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* 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
orr \rx, \rx, #0x00200000
orreq \rx, \rx, #0x00200000 @ physical
orr \rx, \rx, #0x00006000 @ UART1 offset
.endm

Expand Down
39 changes: 21 additions & 18 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ 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 bad;
goto out;
if (task->tgid == current->tgid)
goto bad;
goto out;

write_lock_irq(&tasklist_lock);
task_lock(task);

/* the same process cannot be attached many times */
if (task->ptrace & PT_PTRACED)
goto bad;
Expand All @@ -166,17 +170,15 @@ 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 @@ -417,21 +419,22 @@ int ptrace_request(struct task_struct *child, long request,
*/
int ptrace_traceme(void)
{
int ret;
int ret = -EPERM;

/*
* Are we already being traced?
*/
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;
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;
}

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


cat << EOF
test ! -r $2/Makefile -o -O $2/Makefile || exit 0
echo " GEN $2/Makefile"

cat << EOF > $2/Makefile
# Automatically generated by $0: don't edit
VERSION = $3
Expand Down
17 changes: 12 additions & 5 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,22 +487,22 @@ static int strrcmp(const char *s, const char *sub)
* atsym =__param*
*
* Pattern 2:
* Many drivers utilise a *_driver container with references to
* Many drivers utilise a *driver container with references to
* add, remove, probe functions etc.
* These functions may often be marked __init and we do not want to
* warn here.
* the pattern is identified by:
* tosec = .init.text | .exit.text | .init.data
* fromsec = .data
* atsym = *_driver, *_template, *_sht, *_ops, *_probe, *probe_one
* atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
**/
static int secref_whitelist(const char *tosec, const char *fromsec,
const char *atsym)
{
int f1 = 1, f2 = 1;
const char **s;
const char *pat2sym[] = {
"_driver",
"driver",
"_template", /* scsi uses *_template a lot */
"_sht", /* scsi also used *_sht to some extent */
"_ops",
Expand Down Expand Up @@ -709,10 +709,17 @@ static void check_sec_ref(struct module *mod, const char *modname,
for (rela = start; rela < stop; rela++) {
Elf_Rela r;
const char *secname;
unsigned int r_sym;
r.r_offset = TO_NATIVE(rela->r_offset);
r.r_info = TO_NATIVE(rela->r_info);
if (hdr->e_ident[EI_CLASS] == ELFCLASS64 &&
hdr->e_machine == EM_MIPS) {
r_sym = ELF64_MIPS_R_SYM(rela->r_info);
r_sym = TO_NATIVE(r_sym);
} else {
r_sym = ELF_R_SYM(TO_NATIVE(rela->r_info));
}
r.r_addend = TO_NATIVE(rela->r_addend);
sym = elf->symtab_start + ELF_R_SYM(r.r_info);
sym = elf->symtab_start + r_sym;
/* Skip special sections */
if (sym->st_shndx >= SHN_LORESERVE)
continue;
Expand Down
Loading

0 comments on commit 3186a94

Please sign in to comment.