Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135744
b: refs/heads/master
c: fdcedf7
h: refs/heads/master
v: v3
  • Loading branch information
john stultz authored and Ingo Molnar committed Feb 19, 2009
1 parent 1416787 commit ef728cf
Show file tree
Hide file tree
Showing 77 changed files with 1,011 additions and 299 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: 74019224ac34b044b44a31dd89a54e3477db4896
refs/heads/master: fdcedf7b75808dd72c3cc0b931be11b04d75c60a
1 change: 0 additions & 1 deletion trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,6 @@ D: Initial implementation of VC's, pty's and select()

N: Pavel Machek
E: pavel@ucw.cz
E: pavel@suse.cz
D: Softcursor for vga, hypertech cdrom support, vcsa bugfix, nbd
D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB,
D: work on suspend-to-ram/disk, killing duplicates from ioctl32
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/ABI/testing/sysfs-firmware-memmap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
What: /sys/firmware/memmap/
Date: June 2008
Contact: Bernhard Walle <bwalle@suse.de>
Contact: Bernhard Walle <bernhard.walle@gmx.de>
Description:
On all platforms, the firmware provides a memory map which the
kernel reads. The resources from that memory map are registered
Expand Down
6 changes: 2 additions & 4 deletions trunk/Documentation/cgroups/cgroups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,8 @@ cgroup file system directories.
When a task is moved from one cgroup to another, it gets a new
css_set pointer - if there's an already existing css_set with the
desired collection of cgroups then that group is reused, else a new
css_set is allocated. Note that the current implementation uses a
linear search to locate an appropriate existing css_set, so isn't
very efficient. A future version will use a hash table for better
performance.
css_set is allocated. The appropriate existing css_set is located by
looking into a hash table.

To allow access from a cgroup to the css_sets (and hence tasks)
that comprise it, a set of cg_cgroup_link objects form a lattice;
Expand Down
101 changes: 101 additions & 0 deletions trunk/Documentation/hwmon/hpfall.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/* Disk protection for HP machines.
*
* Copyright 2008 Eric Piel
* Copyright 2009 Pavel Machek <pavel@suse.cz>
*
* GPLv2.
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <signal.h>

void write_int(char *path, int i)
{
char buf[1024];
int fd = open(path, O_RDWR);
if (fd < 0) {
perror("open");
exit(1);
}
sprintf(buf, "%d", i);
if (write(fd, buf, strlen(buf)) != strlen(buf)) {
perror("write");
exit(1);
}
close(fd);
}

void set_led(int on)
{
write_int("/sys/class/leds/hp::hddprotect/brightness", on);
}

void protect(int seconds)
{
write_int("/sys/block/sda/device/unload_heads", seconds*1000);
}

int on_ac(void)
{
// /sys/class/power_supply/AC0/online
}

int lid_open(void)
{
// /proc/acpi/button/lid/LID/state
}

void ignore_me(void)
{
protect(0);
set_led(0);

}

int main(int argc, char* argv[])
{
int fd, ret;

fd = open("/dev/freefall", O_RDONLY);
if (fd < 0) {
perror("open");
return EXIT_FAILURE;
}

signal(SIGALRM, ignore_me);

for (;;) {
unsigned char count;

ret = read(fd, &count, sizeof(count));
alarm(0);
if ((ret == -1) && (errno == EINTR)) {
/* Alarm expired, time to unpark the heads */
continue;
}

if (ret != sizeof(count)) {
perror("read");
break;
}

protect(21);
set_led(1);
if (1 || on_ac() || lid_open()) {
alarm(2);
} else {
alarm(20);
}
}

close(fd);
return EXIT_SUCCESS;
}
8 changes: 8 additions & 0 deletions trunk/Documentation/hwmon/lis3lv02d
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ rate - reports the sampling rate of the accelerometer device in HZ
This driver also provides an absolute input class device, allowing
the laptop to act as a pinball machine-esque joystick.

Another feature of the driver is misc device called "freefall" that
acts similar to /dev/rtc and reacts on free-fall interrupts received
from the device. It supports blocking operations, poll/select and
fasync operation modes. You must read 1 bytes from the device. The
result is number of free-fall interrupts since the last successful
read (or 255 if number of interrupts would not fit).


Axes orientation
----------------

Expand Down
4 changes: 2 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ S: Maintained

HIBERNATION (aka Software Suspend, aka swsusp)
P: Pavel Machek
M: pavel@suse.cz
M: pavel@ucw.cz
P: Rafael J. Wysocki
M: rjw@sisk.pl
L: linux-pm@lists.linux-foundation.org
Expand Down Expand Up @@ -4172,7 +4172,7 @@ SUSPEND TO RAM
P: Len Brown
M: len.brown@intel.com
P: Pavel Machek
M: pavel@suse.cz
M: pavel@ucw.cz
P: Rafael J. Wysocki
M: rjw@sisk.pl
L: linux-pm@lists.linux-foundation.org
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/ia64/include/asm/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ static inline int pfn_to_nid(unsigned long pfn)
#endif
}

#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
extern int early_pfn_to_nid(unsigned long pfn);
#endif

#ifdef CONFIG_IA64_DIG /* DIG systems are small */
# define MAX_PHYSNODE_ID 8
# define NR_NODE_MEMBLKS (MAX_NUMNODES * 8)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ paddr_to_nid(unsigned long paddr)
* SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where
* the section resides.
*/
int early_pfn_to_nid(unsigned long pfn)
int __meminit __early_pfn_to_nid(unsigned long pfn)
{
int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;

Expand All @@ -70,7 +70,7 @@ int early_pfn_to_nid(unsigned long pfn)
return node_memblk[i].nid;
}

return 0;
return -1;
}

#ifdef CONFIG_MEMORY_HOTPLUG
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static void __spu_add_to_rq(struct spu_context *ctx)
list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
set_bit(ctx->prio, spu_prio->bitmap);
if (!spu_prio->nr_waiting++)
mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
__mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
}
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/mmzone_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ static inline void get_memcfg_numa(void)
get_memcfg_numa_flat();
}

extern int early_pfn_to_nid(unsigned long pfn);

extern void resume_map_numa_kva(pgd_t *pgd);

#else /* !CONFIG_NUMA */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/mmzone_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
NODE_DATA(nid)->node_spanned_pages)

extern int early_pfn_to_nid(unsigned long pfn);

#ifdef CONFIG_NUMA_EMU
#define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024)
#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int __init compute_hash_shift(struct bootnode *nodes, int numnodes,
return shift;
}

int early_pfn_to_nid(unsigned long pfn)
int __meminit __early_pfn_to_nid(unsigned long pfn)
{
return phys_to_nid(pfn << PAGE_SHIFT);
}
Expand Down
9 changes: 8 additions & 1 deletion trunk/block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,19 @@ void blk_abort_queue(struct request_queue *q)
{
unsigned long flags;
struct request *rq, *tmp;
LIST_HEAD(list);

spin_lock_irqsave(q->queue_lock, flags);

elv_abort_queue(q);

list_for_each_entry_safe(rq, tmp, &q->timeout_list, timeout_list)
/*
* Splice entries to local list, to avoid deadlocking if entries
* get readded to the timeout list by error handling
*/
list_splice_init(&q->timeout_list, &list);

list_for_each_entry_safe(rq, tmp, &list, timeout_list)
blk_abort_request(rq);

spin_unlock_irqrestore(q->queue_lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion trunk/block/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,

what |= ddir_act[rw & WRITE];
what |= MASK_TC_BIT(rw, BARRIER);
what |= MASK_TC_BIT(rw, SYNC);
what |= MASK_TC_BIT(rw, SYNCIO);
what |= MASK_TC_BIT(rw, AHEAD);
what |= MASK_TC_BIT(rw, META);
what |= MASK_TC_BIT(rw, DISCARD);
Expand Down
17 changes: 10 additions & 7 deletions trunk/block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)
* map sg_io_v4 to a request.
*/
static struct request *
bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm)
bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
u8 *sense)
{
struct request_queue *q = bd->queue;
struct request *rq, *next_rq = NULL;
Expand Down Expand Up @@ -306,6 +307,10 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm)
if (ret)
goto out;
}

rq->sense = sense;
rq->sense_len = 0;

return rq;
out:
if (rq->cmd != rq->__cmd)
Expand Down Expand Up @@ -348,9 +353,6 @@ static void bsg_rq_end_io(struct request *rq, int uptodate)
static void bsg_add_command(struct bsg_device *bd, struct request_queue *q,
struct bsg_command *bc, struct request *rq)
{
rq->sense = bc->sense;
rq->sense_len = 0;

/*
* add bc command to busy queue and submit rq for io
*/
Expand Down Expand Up @@ -419,7 +421,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
{
int ret = 0;

dprintk("rq %p bio %p %u\n", rq, bio, rq->errors);
dprintk("rq %p bio %p 0x%x\n", rq, bio, rq->errors);
/*
* fill in all the output members
*/
Expand Down Expand Up @@ -635,7 +637,7 @@ static int __bsg_write(struct bsg_device *bd, const char __user *buf,
/*
* get a request, fill in the blanks, and add to request queue
*/
rq = bsg_map_hdr(bd, &bc->hdr, has_write_perm);
rq = bsg_map_hdr(bd, &bc->hdr, has_write_perm, bc->sense);
if (IS_ERR(rq)) {
ret = PTR_ERR(rq);
rq = NULL;
Expand Down Expand Up @@ -922,11 +924,12 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct request *rq;
struct bio *bio, *bidi_bio = NULL;
struct sg_io_v4 hdr;
u8 sense[SCSI_SENSE_BUFFERSIZE];

if (copy_from_user(&hdr, uarg, sizeof(hdr)))
return -EFAULT;

rq = bsg_map_hdr(bd, &hdr, file->f_mode & FMODE_WRITE);
rq = bsg_map_hdr(bd, &hdr, file->f_mode & FMODE_WRITE, sense);
if (IS_ERR(rq))
return PTR_ERR(rq);

Expand Down
8 changes: 8 additions & 0 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,14 @@ dev_t blk_lookup_devt(const char *name, int partno)
if (strcmp(dev_name(dev), name))
continue;

if (partno < disk->minors) {
/* We need to return the right devno, even
* if the partition doesn't exist yet.
*/
devt = MKDEV(MAJOR(dev->devt),
MINOR(dev->devt) + partno);
break;
}
part = disk_get_part(disk, partno);
if (part) {
devt = part_devt(part);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/block/aoe/aoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
enum {
AOECMD_ATA,
AOECMD_CFG,
AOECMD_VEND_MIN = 0xf0,

AOEFL_RSP = (1<<3),
AOEFL_ERR = (1<<2),
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/block/aoe/aoenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
aoecmd_cfg_rsp(skb);
break;
default:
if (h->cmd >= AOECMD_VEND_MIN)
break; /* don't complain about vendor commands */
printk(KERN_INFO "aoe: unknown cmd %d\n", h->cmd);
}
exit:
Expand Down
Loading

0 comments on commit ef728cf

Please sign in to comment.