Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72703
b: refs/heads/master
c: b238b3d
h: refs/heads/master
i:
  72701: 84bc925
  72699: 695d463
  72695: 934fa70
  72687: 378d1de
  72671: ae5f383
  72639: bb32bf1
  72575: 2fc1927
  72447: 19cd743
  72191: 8b96984
  71679: f5fb021
v: v3
  • Loading branch information
Jerome Marchand authored and Jens Axboe committed Oct 29, 2007
1 parent fa369df commit 95b9ede
Show file tree
Hide file tree
Showing 41 changed files with 216 additions and 230 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: 20dc9f01a867318ac0bc3ea9185d71f05076aeb0
refs/heads/master: b238b3d4be04d3acf1f86ff8ad0b0e803def67ff
2 changes: 1 addition & 1 deletion trunk/arch/um/Kconfig.i386
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
menu "Host processor type and features"

source "arch/x86/Kconfig.cpu"
source "arch/i386/Kconfig.cpu"

endmenu

Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/um/Makefile-i386
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ELF_ARCH := $(SUBARCH)
ELF_FORMAT := elf32-$(SUBARCH)
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
HEADER_ARCH := x86
CHECKFLAGS += -D__i386__

ifeq ("$(origin SUBARCH)", "command line")
ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)")
Expand All @@ -27,8 +26,10 @@ AFLAGS += -DCONFIG_X86_32
CONFIG_X86_32 := y
export CONFIG_X86_32

ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH)

# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
include $(srctree)/arch/x86/Makefile_32.cpu
include $(srctree)/arch/i386/Makefile.cpu

# prevent gcc from keeping the stack 16 byte aligned. Taken from i386.
cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ START := 0x60000000

_extra_flags_ = -fno-builtin -m64

#We #undef __x86_64__ for kernelspace, not for userspace where
#it's needed for headers to work!
ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__
KBUILD_CFLAGS += $(_extra_flags_)

CHECKFLAGS += -m64 -D__x86_64__
CHECKFLAGS += -m64
KBUILD_AFLAGS += -m64
LDFLAGS += -m elf_x86_64
KBUILD_CPPFLAGS += -m64
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void __init kmap_init(void)
kmap_prot = PAGE_KERNEL;
}

static void __init init_highmem(void)
static void init_highmem(void)
{
pgd_t *pgd;
pud_t *pud;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/um/sys-i386/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -168,7 +168,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
long fpregs[HOST_FP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand All @@ -185,7 +185,7 @@ int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -198,7 +198,7 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child)
long fpregs[HOST_XFP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/sys-x86_64/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
if (err)
return err;

n = copy_to_user(buf, fpregs, sizeof(fpregs));
n = copy_to_user((void *) buf, fpregs, sizeof(fpregs));
if(n > 0)
return -EFAULT;

Expand All @@ -167,7 +167,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child)
long fpregs[HOST_FP_SIZE];

BUG_ON(sizeof(*buf) != sizeof(fpregs));
n = copy_from_user(fpregs, buf, sizeof(fpregs));
n = copy_from_user(fpregs, (void *) buf, sizeof(fpregs));
if (n > 0)
return -EFAULT;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ static int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents,

error:
flush_gart();
gart_unmap_sg(dev, sg, out, dir);
gart_unmap_sg(dev, sg, nents, dir);
/* When it was forced or merged try again in a dumb way */
if (force_iommu || iommu_merge) {
out = dma_map_sg_nonforce(dev, sg, nents, dir);
Expand Down
12 changes: 6 additions & 6 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

static void blk_unplug_work(struct work_struct *work);
static void blk_unplug_timeout(unsigned long data);
static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io);
static void drive_stat_acct(struct request *rq, int new_io);
static void init_request_from_bio(struct request *req, struct bio *bio);
static int __make_request(struct request_queue *q, struct bio *bio);
static struct io_context *current_io_context(gfp_t gfp_flags, int node);
Expand Down Expand Up @@ -2341,7 +2341,7 @@ void blk_insert_request(struct request_queue *q, struct request *rq,
if (blk_rq_tagged(rq))
blk_queue_end_tag(q, rq);

drive_stat_acct(rq, rq->nr_sectors, 1);
drive_stat_acct(rq, 1);
__elv_add_request(q, rq, where, 0);
blk_start_queueing(q);
spin_unlock_irqrestore(q->queue_lock, flags);
Expand Down Expand Up @@ -2736,7 +2736,7 @@ int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector)

EXPORT_SYMBOL(blkdev_issue_flush);

static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
static void drive_stat_acct(struct request *rq, int new_io)
{
int rw = rq_data_dir(rq);

Expand All @@ -2758,7 +2758,7 @@ static void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
*/
static inline void add_request(struct request_queue * q, struct request * req)
{
drive_stat_acct(req, req->nr_sectors, 1);
drive_stat_acct(req, 1);

/*
* elevator indicated where it wants this request to be
Expand Down Expand Up @@ -3015,7 +3015,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
req->biotail = bio;
req->nr_sectors = req->hard_nr_sectors += nr_sectors;
req->ioprio = ioprio_best(req->ioprio, prio);
drive_stat_acct(req, nr_sectors, 0);
drive_stat_acct(req, 0);
if (!attempt_back_merge(q, req))
elv_merged_request(q, req, el_ret);
goto out;
Expand All @@ -3042,7 +3042,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
req->sector = req->hard_sector = bio->bi_sector;
req->nr_sectors = req->hard_nr_sectors += nr_sectors;
req->ioprio = ioprio_best(req->ioprio, prio);
drive_stat_acct(req, nr_sectors, 0);
drive_stat_acct(req, 0);
if (!attempt_front_merge(q, req))
elv_merged_request(q, req, el_ret);
goto out;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4689,7 +4689,6 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
* data in this function or read data in ata_sg_clean.
*/
offset = lsg->offset + lsg->length - qc->pad_len;
sg_init_table(psg, 1);
sg_set_page(psg, nth_page(sg_page(lsg), offset >> PAGE_SHIFT),
qc->pad_len, offset_in_page(offset));

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*/
static inline int uncached_access(struct file *file, unsigned long addr)
{
#if defined(__i386__) && !defined(__arch_um__)
#if defined(__i386__)
/*
* On the PPro and successors, the MTRRs are used to set
* memory types for physical addresses outside main memory,
Expand All @@ -57,7 +57,7 @@ static inline int uncached_access(struct file *file, unsigned long addr)
test_bit(X86_FEATURE_CYRIX_ARR, boot_cpu_data.x86_capability) ||
test_bit(X86_FEATURE_CENTAUR_MCR, boot_cpu_data.x86_capability) )
&& addr >= __pa(high_memory);
#elif defined(__x86_64__) && !defined(__arch_um__)
#elif defined(__x86_64__)
/*
* This is broken because it can generate memory type aliases,
* which can cause cache corruptions
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/raid6algos.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ const struct raid6_calls * const raid6_algos[] = {
&raid6_intx16,
&raid6_intx32,
#endif
#if defined(__i386__) && !defined(__arch_um__)
#if defined(__i386__)
&raid6_mmxx1,
&raid6_mmxx2,
&raid6_sse1x1,
&raid6_sse1x2,
&raid6_sse2x1,
&raid6_sse2x2,
#endif
#if defined(__x86_64__) && !defined(__arch_um__)
#if defined(__x86_64__)
&raid6_sse2x1,
&raid6_sse2x2,
&raid6_sse2x4,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/raid6mmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* MMX implementation of RAID-6 syndrome functions
*/

#if defined(__i386__) && !defined(__arch_um__)
#if defined(__i386__)

#include "raid6.h"
#include "raid6x86.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/raid6sse1.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* worthwhile as a separate implementation.
*/

#if defined(__i386__) && !defined(__arch_um__)
#if defined(__i386__)

#include "raid6.h"
#include "raid6x86.h"
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/raid6sse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
#if defined(__i386__) || defined(__x86_64__)

#include "raid6.h"
#include "raid6x86.h"
Expand Down Expand Up @@ -161,7 +161,7 @@ const struct raid6_calls raid6_sse2x2 = {

#endif

#if defined(__x86_64__) && !defined(__arch_um__)
#ifdef __x86_64__

/*
* Unrolled-by-4 SSE2 implementation
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/raid6x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef LINUX_RAID_RAID6X86_H
#define LINUX_RAID_RAID6X86_H

#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
#if defined(__i386__) || defined(__x86_64__)

#ifdef __KERNEL__ /* Real code */

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/host/imxmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data)
}

/* Convert back to virtual address */
host->data_ptr = (u16*)sg_virt(data->sg);
host->data_ptr = (u16*)sg_virt(sg);
host->data_cnt = 0;

clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events);
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ static char *fault_reason_strings[] =
"non-zero reserved fields in PTE",
"Unknown"
};
#define MAX_FAULT_REASON_IDX ARRAY_SIZE(fault_reason_strings) - 1
#define MAX_FAULT_REASON_IDX ARRAY_SIZE(fault_reason_strings)

char *dmar_get_fault_reason(u8 fault_reason)
{
Expand Down Expand Up @@ -995,6 +995,7 @@ static struct intel_iommu *alloc_iommu(struct dmar_drhd_unit *drhd)
return iommu;
error_unmap:
iounmap(iommu->reg);
iommu->reg = 0;
error:
kfree(iommu);
return NULL;
Expand Down Expand Up @@ -1807,7 +1808,7 @@ get_valid_domain_for_dev(struct pci_dev *pdev)
if (!domain) {
printk(KERN_ERR
"Allocating domain for %s failed", pci_name(pdev));
return NULL;
return 0;
}

/* make sure context mapping is ok */
Expand All @@ -1817,7 +1818,7 @@ get_valid_domain_for_dev(struct pci_dev *pdev)
printk(KERN_ERR
"Domain context map for %s failed",
pci_name(pdev));
return NULL;
return 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/intel-iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
hi = readl(dmar + reg + 4); \
(((u64) hi) << 32) + lo; })
*/
static inline u64 dmar_readq(void __iomem *addr)
static inline u64 dmar_readq(void *addr)
{
u32 lo, hi;
lo = readl(addr);
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ zfcp_sg_to_address(struct scatterlist *list)
* zfcp_address_to_sg - set up struct scatterlist from kernel address
* @address: kernel address
* @list: struct scatterlist
* @size: buffer size
*/
static inline void
zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
zfcp_address_to_sg(void *address, struct scatterlist *list)
{
sg_set_buf(list, address, size);
sg_set_buf(list, address, 0);
}

#define REQUEST_LIST_SIZE 128
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/scsi/aacraid/commctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static int close_getadapter_fib(struct aac_dev * dev, void __user *arg)
/*
* Extract the fibctx from the input parameters
*/
if (fibctx->unique == (u32)(uintptr_t)arg) /* We found a winner */
if (fibctx->unique == (u32)(ptrdiff_t)arg) /* We found a winner */
break;
entry = entry->next;
fibctx = NULL;
Expand Down Expand Up @@ -590,7 +590,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
}
addr = (u64)upsg->sg[i].addr[0];
addr += ((u64)upsg->sg[i].addr[1]) << 32;
sg_user[i] = (void __user *)(uintptr_t)addr;
sg_user[i] = (void __user *)(ptrdiff_t)addr;
sg_list[i] = p; // save so we can clean up later
sg_indx = i;

Expand Down Expand Up @@ -633,7 +633,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
rcode = -ENOMEM;
goto cleanup;
}
sg_user[i] = (void __user *)(uintptr_t)usg->sg[i].addr;
sg_user[i] = (void __user *)(ptrdiff_t)usg->sg[i].addr;
sg_list[i] = p; // save so we can clean up later
sg_indx = i;

Expand Down Expand Up @@ -664,7 +664,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
if (actual_fibsize64 == fibsize) {
struct user_sgmap64* usg = (struct user_sgmap64 *)upsg;
for (i = 0; i < upsg->count; i++) {
uintptr_t addr;
u64 addr;
void* p;
/* Does this really need to be GFP_DMA? */
p = kmalloc(usg->sg[i].count,GFP_KERNEL|__GFP_DMA);
Expand All @@ -676,7 +676,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
}
addr = (u64)usg->sg[i].addr[0];
addr += ((u64)usg->sg[i].addr[1]) << 32;
sg_user[i] = (void __user *)addr;
sg_user[i] = (void __user *)(ptrdiff_t)addr;
sg_list[i] = p; // save so we can clean up later
sg_indx = i;

Expand Down Expand Up @@ -704,7 +704,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
rcode = -ENOMEM;
goto cleanup;
}
sg_user[i] = (void __user *)(uintptr_t)upsg->sg[i].addr;
sg_user[i] = (void __user *)(ptrdiff_t)upsg->sg[i].addr;
sg_list[i] = p; // save so we can clean up later
sg_indx = i;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/comminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co
/*
* Align the beginning of Headers to commalign
*/
align = (commalign - ((uintptr_t)(base) & (commalign - 1)));
align = (commalign - ((ptrdiff_t)(base) & (commalign - 1)));
base = base + align;
phys = phys + align;
/*
Expand Down
Loading

0 comments on commit 95b9ede

Please sign in to comment.