Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57174
b: refs/heads/master
c: 1acf6ba
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed May 31, 2007
1 parent 263bf0d commit eaa5cf7
Show file tree
Hide file tree
Showing 208 changed files with 3,915 additions and 1,523 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: 91fa558ba28b0014205f2c1a75b1cceb4298aa04
refs/heads/master: 1acf6ba085777f91e9a815bb6b4dbe0fe62823b0
2 changes: 1 addition & 1 deletion trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
What: old NCR53C9x driver
When: October 2007
Why: Replaced by the much better esp_scsi driver. Actual low-level
driver can ported over almost trivially.
driver can be ported over almost trivially.
Who: David Miller <davem@davemloft.net>
Christoph Hellwig <hch@lst.de>

Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2334,7 +2334,7 @@ S: Maintained

MEGARAID SCSI DRIVERS
P: Neela Syam Kolli
M: Neela.Kolli@engenio.com
M: megaraidlinux@lsi.com
S: linux-scsi@vger.kernel.org
W: http://megaraid.lsilogic.com
S: Maintained
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/alpha/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,10 @@ $work_resched:
bne $2, $work_resched

$work_notifysig:
mov $sp, $17
mov $sp, $16
br $1, do_switch_stack
mov $5, $21
mov $sp, $18
mov $31, $16
mov $sp, $17
mov $5, $18
jsr $26, do_notify_resume
bsr $1, undo_switch_stack
br restore_all
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/alpha/kernel/pci_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/bootmem.h>
#include <linux/log2.h>

#include <asm/io.h>
#include <asm/hwrpb.h>
Expand Down Expand Up @@ -53,7 +54,7 @@ size_for_memory(unsigned long max)
{
unsigned long mem = max_low_pfn << PAGE_SHIFT;
if (mem < max)
max = 1UL << ceil_log2(mem);
max = roundup_pow_of_two(mem);
return max;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/alpha/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <linux/notifier.h>
#include <asm/setup.h>
#include <asm/io.h>
#include <linux/log2.h>

extern struct atomic_notifier_head panic_notifier_list;
static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
Expand Down Expand Up @@ -1303,7 +1304,7 @@ external_cache_probe(int minsize, int width)
long size = minsize, maxsize = MAX_BCACHE_SIZE * 2;

if (maxsize > (max_low_pfn + 1) << PAGE_SHIFT)
maxsize = 1 << (floor_log2(max_low_pfn + 1) + PAGE_SHIFT);
maxsize = 1 << (ilog2(max_low_pfn + 1) + PAGE_SHIFT);

/* Get the first block cached. */
read_mem_block(__va(0), stride, size);
Expand Down
110 changes: 63 additions & 47 deletions trunk/arch/alpha/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

asmlinkage void ret_from_sys_call(void);
static int do_signal(sigset_t *, struct pt_regs *, struct switch_stack *,
unsigned long, unsigned long);
static void do_signal(struct pt_regs *, struct switch_stack *,
unsigned long, unsigned long);


/*
Expand Down Expand Up @@ -146,11 +146,9 @@ sys_rt_sigaction(int sig, const struct sigaction __user *act,
asmlinkage int
do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw)
{
sigset_t oldset;

mask &= _BLOCKABLE;
spin_lock_irq(&current->sighand->siglock);
oldset = current->blocked;
current->saved_sigmask = current->blocked;
siginitset(&current->blocked, mask);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
Expand All @@ -160,19 +158,17 @@ do_sigsuspend(old_sigset_t mask, struct pt_regs *regs, struct switch_stack *sw)
regs->r0 = EINTR;
regs->r19 = 1;

while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
if (do_signal(&oldset, regs, sw, 0, 0))
return -EINTR;
}
current->state = TASK_INTERRUPTIBLE;
schedule();
set_thread_flag(TIF_RESTORE_SIGMASK);
return -ERESTARTNOHAND;
}

asmlinkage int
do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,
struct pt_regs *regs, struct switch_stack *sw)
{
sigset_t oldset, set;
sigset_t set;

/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
Expand All @@ -182,7 +178,7 @@ do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,

sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock);
oldset = current->blocked;
current->saved_sigmask = current->blocked;
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
Expand All @@ -192,12 +188,10 @@ do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize,
regs->r0 = EINTR;
regs->r19 = 1;

while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
if (do_signal(&oldset, regs, sw, 0, 0))
return -EINTR;
}
current->state = TASK_INTERRUPTIBLE;
schedule();
set_thread_flag(TIF_RESTORE_SIGMASK);
return -ERESTARTNOHAND;
}

asmlinkage int
Expand Down Expand Up @@ -436,7 +430,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
return err;
}

static void
static int
setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
struct pt_regs *regs, struct switch_stack * sw)
{
Expand Down Expand Up @@ -481,13 +475,14 @@ setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
current->comm, current->pid, frame, regs->pc, regs->r26);
#endif

return;
return 0;

give_sigsegv:
force_sigsegv(sig, current);
return -EFAULT;
}

static void
static int
setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs, struct switch_stack * sw)
{
Expand Down Expand Up @@ -543,34 +538,38 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
current->comm, current->pid, frame, regs->pc, regs->r26);
#endif

return;
return 0;

give_sigsegv:
force_sigsegv(sig, current);
return -EFAULT;
}


/*
* OK, we're invoking a handler.
*/
static inline void
static inline int
handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *oldset, struct pt_regs * regs, struct switch_stack *sw)
{
int ret;

if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame(sig, ka, info, oldset, regs, sw);
ret = setup_rt_frame(sig, ka, info, oldset, regs, sw);
else
setup_frame(sig, ka, oldset, regs, sw);
ret = setup_frame(sig, ka, oldset, regs, sw);

if (ka->sa.sa_flags & SA_RESETHAND)
ka->sa.sa_handler = SIG_DFL;
if (ret == 0) {
spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
}

spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
return ret;
}

static inline void
Expand Down Expand Up @@ -611,30 +610,42 @@ syscall_restart(unsigned long r0, unsigned long r19,
* restart. "r0" is also used as an indicator whether we can restart at
* all (if we get here from anything but a syscall return, it will be 0)
*/
static int
do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
static void
do_signal(struct pt_regs * regs, struct switch_stack * sw,
unsigned long r0, unsigned long r19)
{
siginfo_t info;
int signr;
unsigned long single_stepping = ptrace_cancel_bpt(current);
struct k_sigaction ka;
sigset_t *oldset;

if (!oldset)
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;
else
oldset = &current->blocked;

/* This lets the debugger run, ... */
signr = get_signal_to_deliver(&info, &ka, regs, NULL);

/* ... so re-check the single stepping. */
single_stepping |= ptrace_cancel_bpt(current);

if (signr > 0) {
/* Whee! Actually deliver the signal. */
if (r0) syscall_restart(r0, r19, regs, &ka);
handle_signal(signr, &ka, &info, oldset, regs, sw);
if (r0)
syscall_restart(r0, r19, regs, &ka);
if (handle_signal(signr, &ka, &info, oldset, regs, sw) == 0) {
/* A signal was successfully delivered, and the
saved sigmask was stored on the signal frame,
and will be restored by sigreturn. So we can
simply clear the restore sigmask flag. */
if (test_thread_flag(TIF_RESTORE_SIGMASK))
clear_thread_flag(TIF_RESTORE_SIGMASK);
}
if (single_stepping)
ptrace_set_bpt(current); /* re-set bpt */
return 1;
return;
}

if (r0) {
Expand All @@ -654,17 +665,22 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
break;
}
}

/* If there's no signal to deliver, we just restore the saved mask. */
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
clear_thread_flag(TIF_RESTORE_SIGMASK);
sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
}

if (single_stepping)
ptrace_set_bpt(current); /* re-set breakpoint */

return 0;
}

void
do_notify_resume(sigset_t *oldset, struct pt_regs *regs,
struct switch_stack *sw, unsigned long r0,
unsigned long r19, unsigned long thread_info_flags)
do_notify_resume(struct pt_regs *regs, struct switch_stack *sw,
unsigned long thread_info_flags,
unsigned long r0, unsigned long r19)
{
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(oldset, regs, sw, r0, r19);
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs, sw, r0, r19);
}
32 changes: 32 additions & 0 deletions trunk/arch/alpha/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,38 @@ sys_call_table:
.quad sys_inotify_init
.quad sys_inotify_add_watch /* 445 */
.quad sys_inotify_rm_watch
.quad sys_fdatasync
.quad sys_kexec_load
.quad sys_migrate_pages
.quad sys_openat /* 450 */
.quad sys_mkdirat
.quad sys_mknodat
.quad sys_fchownat
.quad sys_futimesat
.quad sys_fstatat64 /* 455 */
.quad sys_unlinkat
.quad sys_renameat
.quad sys_linkat
.quad sys_symlinkat
.quad sys_readlinkat /* 460 */
.quad sys_fchmodat
.quad sys_faccessat
.quad sys_pselect6
.quad sys_ppoll
.quad sys_unshare /* 465 */
.quad sys_set_robust_list
.quad sys_get_robust_list
.quad sys_splice
.quad sys_sync_file_range
.quad sys_tee /* 470 */
.quad sys_vmsplice
.quad sys_move_pages
.quad sys_getcpu
.quad sys_epoll_pwait
.quad sys_utimensat /* 475 */
.quad sys_signalfd
.quad sys_timerfd
.quad sys_eventfd

.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/alpha/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
$(ev6-y)clear_page.o \
$(ev6-y)copy_page.o \
fpreg.o \
callback_srm.o srm_puts.o srm_printk.o
callback_srm.o srm_puts.o srm_printk.o \
fls.o

lib-$(CONFIG_SMP) += dec_and_lock.o

Expand Down
38 changes: 38 additions & 0 deletions trunk/arch/alpha/lib/fls.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* arch/alpha/lib/fls.c
*/

#include <linux/module.h>
#include <asm/bitops.h>

/* This is fls(x)-1, except zero is held to zero. This allows most
efficent input into extbl, plus it allows easy handling of fls(0)=0. */

const unsigned char __flsm1_tab[256] =
{
0,
0,
1, 1,
2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,

5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,

6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,

7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
};

EXPORT_SYMBOL(__flsm1_tab);
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/armksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern void fp_enter(void);
#define EXPORT_SYMBOL_ALIAS(sym,orig) \
EXPORT_CRC_ALIAS(sym) \
static const struct kernel_symbol __ksymtab_##sym \
__attribute_used__ __attribute__((section("__ksymtab"))) = \
__used __attribute__((section("__ksymtab"))) = \
{ (unsigned long)&orig, #sym };

/*
Expand Down
Loading

0 comments on commit eaa5cf7

Please sign in to comment.