Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132265
b: refs/heads/master
c: 8980a7b
h: refs/heads/master
i:
  132263: b0a709d
v: v3
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Mar 13, 2009
1 parent 1506c22 commit 85a1f39
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 65 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: 6d71135d635f84b584df55096627ed750c069e61
refs/heads/master: 8980a7baf93e478205e32ec7d6ef3bfb6c0bdfa7
5 changes: 1 addition & 4 deletions trunk/arch/parisc/kernel/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,7 @@ void flush_cache_range(struct vm_area_struct *vma,
{
int sr3;

if (!vma->vm_mm->context) {
BUG();
return;
}
BUG_ON(!vma->vm_mm->context);

sr3 = mfsp(3);
if (vma->vm_mm->context == sr3) {
Expand Down
22 changes: 6 additions & 16 deletions trunk/arch/parisc/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,21 +447,15 @@ static void pa11_dma_free_consistent (struct device *dev, size_t size, void *vad

static dma_addr_t pa11_dma_map_single(struct device *dev, void *addr, size_t size, enum dma_data_direction direction)
{
if (direction == DMA_NONE) {
printk(KERN_ERR "pa11_dma_map_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0));
BUG();
}
BUG_ON(direction == DMA_NONE);

flush_kernel_dcache_range((unsigned long) addr, size);
return virt_to_phys(addr);
}

static void pa11_dma_unmap_single(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction)
{
if (direction == DMA_NONE) {
printk(KERN_ERR "pa11_dma_unmap_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0));
BUG();
}
BUG_ON(direction == DMA_NONE);

if (direction == DMA_TO_DEVICE)
return;
Expand All @@ -480,8 +474,7 @@ static int pa11_dma_map_sg(struct device *dev, struct scatterlist *sglist, int n
{
int i;

if (direction == DMA_NONE)
BUG();
BUG_ON(direction == DMA_NONE);

for (i = 0; i < nents; i++, sglist++ ) {
unsigned long vaddr = sg_virt_addr(sglist);
Expand All @@ -496,8 +489,7 @@ static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in
{
int i;

if (direction == DMA_NONE)
BUG();
BUG_ON(direction == DMA_NONE);

if (direction == DMA_TO_DEVICE)
return;
Expand All @@ -511,16 +503,14 @@ static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in

static void pa11_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction)
{
if (direction == DMA_NONE)
BUG();
BUG_ON(direction == DMA_NONE);

flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size);
}

static void pa11_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction)
{
if (direction == DMA_NONE)
BUG();
BUG_ON(direction == DMA_NONE);

flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size);
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/parisc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,8 @@ static void __init setup_bootmem(void)
*/
max_low_pfn = max_pfn;

if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) {
printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n");
BUG();
}
/* bootmap sizing messed up? */
BUG_ON((bootmap_pfn - bootmap_start_pfn) != bootmap_pages);

/* reserve PAGE0 pdc memory, kernel text/data/bss & bootmap */

Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ static void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk,
rq->cmd_flags |= REQ_PREEMPT;
rq->buffer = (char *)pc;
rq->rq_disk = disk;

if (pc->req_xfer) {
rq->data = pc->buf;
rq->data_len = pc->req_xfer;
}

memcpy(rq->cmd, pc->c, 12);
if (drive->media == ide_tape)
rq->cmd[13] = REQ_IDETAPE_PC1;
Expand All @@ -165,12 +159,6 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_SPECIAL;
rq->buffer = (char *)pc;

if (pc->req_xfer) {
rq->data = pc->buf;
rq->data_len = pc->req_xfer;
}

memcpy(rq->cmd, pc->c, 12);
if (drive->media == ide_tape)
rq->cmd[13] = REQ_IDETAPE_PC1;
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
{
ide_hwif_t *hwif = drive->hwif;
struct scatterlist *sg = hwif->sg_table;
int i;

ide_map_sg(drive, rq);

Expand All @@ -137,13 +136,8 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
else
hwif->sg_dma_direction = DMA_TO_DEVICE;

i = dma_map_sg(hwif->dev, sg, hwif->sg_nents, hwif->sg_dma_direction);
if (i) {
hwif->orig_sg_nents = hwif->sg_nents;
hwif->sg_nents = i;
}

return i;
return dma_map_sg(hwif->dev, sg, hwif->sg_nents,
hwif->sg_dma_direction);
}
EXPORT_SYMBOL_GPL(ide_build_sglist);

Expand All @@ -162,7 +156,7 @@ void ide_destroy_dmatable(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;

dma_unmap_sg(hwif->dev, hwif->sg_table, hwif->orig_sg_nents,
dma_unmap_sg(hwif->dev, hwif->sg_table, hwif->sg_nents,
hwif->sg_dma_direction);
}
EXPORT_SYMBOL_GPL(ide_destroy_dmatable);
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
return ide_stopped;
}

if (blk_fs_request(rq) || pc->req_xfer) {
ide_init_sg_cmd(drive, rq);
ide_map_sg(drive, rq);
}
ide_init_sg_cmd(drive, rq);
ide_map_sg(drive, rq);

pc->sg = hwif->sg_table;
pc->sg_cnt = hwif->sg_nents;
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,6 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs(
list_for_each_entry(global_auth_tok,
&mount_crypt_stat->global_auth_tok_list,
mount_crypt_stat_list) {
if (global_auth_tok->flags & ECRYPTFS_AUTH_TOK_FNEK)
continue;
rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig);
if (rc) {
printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/ecryptfs/ecryptfs_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ struct ecryptfs_dentry_info {
*/
struct ecryptfs_global_auth_tok {
#define ECRYPTFS_AUTH_TOK_INVALID 0x00000001
#define ECRYPTFS_AUTH_TOK_FNEK 0x00000002
u32 flags;
struct list_head mount_crypt_stat_list;
struct key *global_auth_tok_key;
Expand Down Expand Up @@ -697,7 +696,7 @@ ecryptfs_write_header_metadata(char *virt,
int ecryptfs_add_keysig(struct ecryptfs_crypt_stat *crypt_stat, char *sig);
int
ecryptfs_add_global_auth_tok(struct ecryptfs_mount_crypt_stat *mount_crypt_stat,
char *sig, u32 global_auth_tok_flags);
char *sig);
int ecryptfs_get_global_auth_tok_for_sig(
struct ecryptfs_global_auth_tok **global_auth_tok,
struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *sig);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@ struct kmem_cache *ecryptfs_global_auth_tok_cache;

int
ecryptfs_add_global_auth_tok(struct ecryptfs_mount_crypt_stat *mount_crypt_stat,
char *sig, u32 global_auth_tok_flags)
char *sig)
{
struct ecryptfs_global_auth_tok *new_auth_tok;
int rc = 0;
Expand All @@ -2389,7 +2389,6 @@ ecryptfs_add_global_auth_tok(struct ecryptfs_mount_crypt_stat *mount_crypt_stat,
goto out;
}
memcpy(new_auth_tok->sig, sig, ECRYPTFS_SIG_SIZE_HEX);
new_auth_tok->flags = global_auth_tok_flags;
new_auth_tok->sig[ECRYPTFS_SIG_SIZE_HEX] = '\0';
mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex);
list_add(&new_auth_tok->mount_crypt_stat_list,
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/ecryptfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
case ecryptfs_opt_ecryptfs_sig:
sig_src = args[0].from;
rc = ecryptfs_add_global_auth_tok(mount_crypt_stat,
sig_src, 0);
sig_src);
if (rc) {
printk(KERN_ERR "Error attempting to register "
"global sig; rc = [%d]\n", rc);
Expand Down Expand Up @@ -370,8 +370,7 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
ECRYPTFS_SIG_SIZE_HEX] = '\0';
rc = ecryptfs_add_global_auth_tok(
mount_crypt_stat,
mount_crypt_stat->global_default_fnek_sig,
ECRYPTFS_AUTH_TOK_FNEK);
mount_crypt_stat->global_default_fnek_sig);
if (rc) {
printk(KERN_ERR "Error attempting to register "
"global fnek sig [%s]; rc = [%d]\n",
Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
if (!pagevec_add(&lru_pvec, page))
__pagevec_lru_add_file(&lru_pvec);

/* prevent the page from being discarded on memory pressure */
SetPageDirty(page);

unlock_page(page);
}

Expand All @@ -129,7 +126,6 @@ int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
return -EFBIG;

add_error:
pagevec_lru_add_file(&lru_pvec);
page_cache_release(pages + loop);
for (loop++; loop < npages; loop++)
__free_page(pages + loop);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,6 @@ typedef struct hwif_s {
struct scatterlist *sg_table;
int sg_max_nents; /* Maximum number of entries in it */
int sg_nents; /* Current number of entries in it */
int orig_sg_nents;
int sg_dma_direction; /* dma transfer direction */

/* data phase of the active command (currently only valid for PIO/DMA) */
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
* Move the pages to the [file or anon] inactive list.
*/
pagevec_init(&pvec, 1);
pgmoved = 0;
lru = LRU_BASE + file * LRU_FILE;

spin_lock_irq(&zone->lru_lock);
Expand All @@ -1273,7 +1274,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
*/
reclaim_stat->recent_rotated[!!file] += pgmoved;

pgmoved = 0;
while (!list_empty(&l_inactive)) {
page = lru_to_page(&l_inactive);
prefetchw_prev_lru_page(page, &l_inactive, flags);
Expand Down

0 comments on commit 85a1f39

Please sign in to comment.