Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231962
b: refs/heads/master
c: 8aeb36e
h: refs/heads/master
v: v3
  • Loading branch information
Philip Sanderson authored and Rusty Russell committed Jan 20, 2011
1 parent f1aecff commit 881d76a
Show file tree
Hide file tree
Showing 578 changed files with 5,478 additions and 11,107 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: c522682d7433d27461d631d03a2a1a3b741e9c91
refs/heads/master: 8aeb36e8f6d7eaa9cafc970b700414205743b258
3 changes: 2 additions & 1 deletion trunk/Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ata *);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
void (*truncate_range)(struct inode *, loff_t, loff_t);
long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len);
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);

locking rules:
Expand Down Expand Up @@ -87,6 +88,7 @@ getxattr: no
listxattr: no
removexattr: yes
truncate_range: yes
fallocate: no
fiemap: no
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim.
Expand Down Expand Up @@ -435,7 +437,6 @@ prototypes:
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *,
size_t, unsigned int);
int (*setlease)(struct file *, long, struct file_lock **);
long (*fallocate)(struct file *, int, loff_t, loff_t);
};

locking rules:
Expand Down
7 changes: 0 additions & 7 deletions trunk/Documentation/hwmon/lm93
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ Supported chips:
Prefix 'lm93'
Addresses scanned: I2C 0x2c-0x2e
Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf
* National Semiconductor LM94
Prefix 'lm94'
Addresses scanned: I2C 0x2c-0x2e
Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf

Authors:
Mark M. Hoffman <mhoffman@lightlink.com>
Expand Down Expand Up @@ -60,9 +56,6 @@ previous motherboard management ASICs and uses some of the LM85's features
for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual
processor Xeon class motherboard with a minimum of external components.

LM94 is also supported in LM93 compatible mode. Extra sensors and features of
LM94 are not supported.


User Interface
--------------
Expand Down
50 changes: 50 additions & 0 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#include <limits.h>
#include <stddef.h>
#include <signal.h>
#include <pwd.h>
#include <grp.h>

#include <linux/virtio_config.h>
#include <linux/virtio_net.h>
#include <linux/virtio_blk.h>
Expand Down Expand Up @@ -1872,6 +1875,8 @@ static struct option opts[] = {
{ "block", 1, NULL, 'b' },
{ "rng", 0, NULL, 'r' },
{ "initrd", 1, NULL, 'i' },
{ "username", 1, NULL, 'u' },
{ "chroot", 1, NULL, 'c' },
{ NULL },
};
static void usage(void)
Expand All @@ -1894,6 +1899,12 @@ int main(int argc, char *argv[])
/* If they specify an initrd file to load. */
const char *initrd_name = NULL;

/* Password structure for initgroups/setres[gu]id */
struct passwd *user_details = NULL;

/* Directory to chroot to */
char *chroot_path = NULL;

/* Save the args: we "reboot" by execing ourselves again. */
main_args = argv;

Expand Down Expand Up @@ -1950,6 +1961,14 @@ int main(int argc, char *argv[])
case 'i':
initrd_name = optarg;
break;
case 'u':
user_details = getpwnam(optarg);
if (!user_details)
err(1, "getpwnam failed, incorrect username?");
break;
case 'c':
chroot_path = optarg;
break;
default:
warnx("Unknown argument %s", argv[optind]);
usage();
Expand Down Expand Up @@ -2021,6 +2040,37 @@ int main(int argc, char *argv[])
/* If we exit via err(), this kills all the threads, restores tty. */
atexit(cleanup_devices);

/* If requested, chroot to a directory */
if (chroot_path) {
if (chroot(chroot_path) != 0)
err(1, "chroot(\"%s\") failed", chroot_path);

if (chdir("/") != 0)
err(1, "chdir(\"/\") failed");

verbose("chroot done\n");
}

/* If requested, drop privileges */
if (user_details) {
uid_t u;
gid_t g;

u = user_details->pw_uid;
g = user_details->pw_gid;

if (initgroups(user_details->pw_name, g) != 0)
err(1, "initgroups failed");

if (setresgid(g, g, g) != 0)
err(1, "setresgid failed");

if (setresuid(u, u, u) != 0)
err(1, "setresuid failed");

verbose("Dropping privileges completed\n");
}

/* Finally, run the Guest. This doesn't return. */
run_guest();
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 38
EXTRAVERSION = -rc1
SUBLEVEL = 37
EXTRAVERSION =
NAME = Flesh-Eating Bats with Fangs

# *DOCUMENTATION*
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ config GENERIC_IOMAP
bool
default n

config GENERIC_HARDIRQS_NO__DO_IRQ
def_bool y

config GENERIC_HARDIRQS
bool
default y
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/alpha/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@
*/
extern inline void __set_hae(unsigned long new_hae)
{
unsigned long flags = swpipl(IPL_MAX);

barrier();
unsigned long flags;
local_irq_save(flags);

alpha_mv.hae_cache = new_hae;
*alpha_mv.hae_register = new_hae;
mb();
/* Re-read to make sure it was written. */
new_hae = *alpha_mv.hae_register;

setipl(flags);
barrier();
local_irq_restore(flags);
}

extern inline void set_hae(unsigned long new_hae)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/alpha/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#

extra-y := head.o vmlinux.lds
asflags-y := $(KBUILD_CFLAGS)
ccflags-y := -Werror -Wno-sign-compare
EXTRA_AFLAGS := $(KBUILD_CFLAGS)
EXTRA_CFLAGS := -Werror -Wno-sign-compare

obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o \
Expand Down
31 changes: 11 additions & 20 deletions trunk/arch/alpha/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ static char irq_user_affinity[NR_IRQS];

int irq_select_affinity(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc[irq];
static int last_cpu;
int cpu = last_cpu + 1;

if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
return 1;

while (!cpu_possible(cpu) ||
!cpumask_test_cpu(cpu, irq_default_affinity))
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu;

cpumask_copy(desc->affinity, cpumask_of(cpu));
get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
return 0;
}
#endif /* CONFIG_SMP */
Expand All @@ -68,7 +67,6 @@ show_interrupts(struct seq_file *p, void *v)
int j;
int irq = *(loff_t *) v;
struct irqaction * action;
struct irq_desc *desc;
unsigned long flags;

#ifdef CONFIG_SMP
Expand All @@ -81,13 +79,8 @@ show_interrupts(struct seq_file *p, void *v)
#endif

if (irq < ACTUAL_NR_IRQS) {
desc = irq_to_desc(irq);

if (!desc)
return 0;

raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
action = irq_desc[irq].action;
if (!action)
goto unlock;
seq_printf(p, "%3d: ", irq);
Expand All @@ -97,7 +90,7 @@ show_interrupts(struct seq_file *p, void *v)
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
#endif
seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
seq_printf(p, " %14s", irq_desc[irq].chip->name);
seq_printf(p, " %c%s",
(action->flags & IRQF_DISABLED)?'+':' ',
action->name);
Expand All @@ -110,7 +103,7 @@ show_interrupts(struct seq_file *p, void *v)

seq_putc(p, '\n');
unlock:
raw_spin_unlock_irqrestore(&desc->lock, flags);
raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
} else if (irq == ACTUAL_NR_IRQS) {
#ifdef CONFIG_SMP
seq_puts(p, "IPI: ");
Expand Down Expand Up @@ -149,25 +142,23 @@ handle_irq(int irq)
* handled by some other CPU. (or is disabled)
*/
static unsigned int illegal_count=0;
struct irq_desc *desc = irq_to_desc(irq);

if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
illegal_count < MAX_ILLEGAL_IRQS)) {
if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) {
irq_err_count++;
illegal_count++;
printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
irq);
return;
}

irq_enter();
/*
* From here we must proceed with IPL_MAX. Note that we do not
* __do_IRQ() must be called with IPL_MAX. Note that we do not
* explicitly enable interrupts afterwards - some MILO PALcode
* (namely LX164 one) seems to have severe problems with RTI
* at IPL 0.
*/
local_irq_disable();
irq_enter();
generic_handle_irq_desc(irq, desc);
__do_IRQ(irq);
irq_exit();
}
24 changes: 16 additions & 8 deletions trunk/arch/alpha/kernel/irq_alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,31 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
* processed by PALcode, and comes in via entInt vector 1.
*/

static void rtc_enable_disable(unsigned int irq) { }
static unsigned int rtc_startup(unsigned int irq) { return 0; }

struct irqaction timer_irqaction = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED,
.name = "timer",
};

static struct irq_chip rtc_irq_type = {
.name = "RTC",
.startup = rtc_startup,
.shutdown = rtc_enable_disable,
.enable = rtc_enable_disable,
.disable = rtc_enable_disable,
.ack = rtc_enable_disable,
.end = rtc_enable_disable,
};

void __init
init_rtc_irq(void)
{
struct irq_desc *desc = irq_to_desc(RTC_IRQ);

if (desc) {
desc->status |= IRQ_DISABLED;
set_irq_chip_and_handler_name(RTC_IRQ, &no_irq_chip,
handle_simple_irq, "RTC");
setup_irq(RTC_IRQ, &timer_irqaction);
}
irq_desc[RTC_IRQ].status = IRQ_DISABLED;
irq_desc[RTC_IRQ].chip = &rtc_irq_type;
setup_irq(RTC_IRQ, &timer_irqaction);
}

/* Dummy irqactions. */
Expand Down
26 changes: 22 additions & 4 deletions trunk/arch/alpha/kernel/irq_i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,28 @@ i8259a_mask_and_ack_irq(unsigned int irq)
spin_unlock(&i8259_irq_lock);
}

unsigned int
i8259a_startup_irq(unsigned int irq)
{
i8259a_enable_irq(irq);
return 0; /* never anything pending */
}

void
i8259a_end_irq(unsigned int irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
i8259a_enable_irq(irq);
}

struct irq_chip i8259a_irq_type = {
.name = "XT-PIC",
.unmask = i8259a_enable_irq,
.mask = i8259a_disable_irq,
.mask_ack = i8259a_mask_and_ack_irq,
.startup = i8259a_startup_irq,
.shutdown = i8259a_disable_irq,
.enable = i8259a_enable_irq,
.disable = i8259a_disable_irq,
.ack = i8259a_mask_and_ack_irq,
.end = i8259a_end_irq,
};

void __init
Expand All @@ -90,7 +107,8 @@ init_i8259a_irqs(void)
outb(0xff, 0xA1); /* mask all of 8259A-2 */

for (i = 0; i < 16; i++) {
set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq);
irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].chip = &i8259a_irq_type;
}

setup_irq(2, &cascade);
Expand Down
Loading

0 comments on commit 881d76a

Please sign in to comment.