Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72712
b: refs/heads/master
c: cbf6781
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 29, 2007
1 parent 9216a90 commit e34a9be
Show file tree
Hide file tree
Showing 40 changed files with 224 additions and 210 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: 33013a881104304fcffe817f17f22a1588908037
refs/heads/master: cbf67812b2f1431c5e432ddecd202984c6882f2a
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/i386/Kconfig.cpu"
source "arch/x86/Kconfig.cpu"

endmenu

Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/um/Makefile-i386
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ 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 @@ -26,10 +27,8 @@ 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/i386/Makefile.cpu
include $(srctree)/arch/x86/Makefile_32.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: 1 addition & 4 deletions trunk/arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ 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
CHECKFLAGS += -m64 -D__x86_64__
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_highmem(void)
static void __init 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((void *) buf, fpregs, sizeof(fpregs));
n = copy_to_user(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, (void *) buf, sizeof(fpregs));
n = copy_from_user(fpregs, 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((void *) buf, fpregs, sizeof(fpregs));
n = copy_to_user(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, (void *) buf, sizeof(fpregs));
n = copy_from_user(fpregs, 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((void *) buf, fpregs, sizeof(fpregs));
n = copy_to_user(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, (void *) buf, sizeof(fpregs));
n = copy_from_user(fpregs, 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, nents, dir);
gart_unmap_sg(dev, sg, out, 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
1 change: 1 addition & 0 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4689,6 +4689,7 @@ 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__)
#if defined(__i386__) && !defined(__arch_um__)
/*
* 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__)
#elif defined(__x86_64__) && !defined(__arch_um__)
/*
* 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__)
#if defined(__i386__) && !defined(__arch_um__)
&raid6_mmxx1,
&raid6_mmxx2,
&raid6_sse1x1,
&raid6_sse1x2,
&raid6_sse2x1,
&raid6_sse2x2,
#endif
#if defined(__x86_64__)
#if defined(__x86_64__) && !defined(__arch_um__)
&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__)
#if defined(__i386__) && !defined(__arch_um__)

#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__)
#if defined(__i386__) && !defined(__arch_um__)

#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__)
#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)

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

#endif

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

/*
* 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__)
#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)

#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(sg);
host->data_ptr = (u16*)sg_virt(data->sg);
host->data_cnt = 0;

clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events);
Expand Down
7 changes: 3 additions & 4 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)
#define MAX_FAULT_REASON_IDX ARRAY_SIZE(fault_reason_strings) - 1

char *dmar_get_fault_reason(u8 fault_reason)
{
Expand Down Expand Up @@ -995,7 +995,6 @@ 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 @@ -1808,7 +1807,7 @@ get_valid_domain_for_dev(struct pci_dev *pdev)
if (!domain) {
printk(KERN_ERR
"Allocating domain for %s failed", pci_name(pdev));
return 0;
return NULL;
}

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

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 *addr)
static inline u64 dmar_readq(void __iomem *addr)
{
u32 lo, hi;
lo = readl(addr);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ 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)
zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
{
sg_set_buf(list, address, 0);
sg_set_buf(list, address, size);
}

#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)(ptrdiff_t)arg) /* We found a winner */
if (fibctx->unique == (u32)(uintptr_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 *)(ptrdiff_t)addr;
sg_user[i] = (void __user *)(uintptr_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 *)(ptrdiff_t)usg->sg[i].addr;
sg_user[i] = (void __user *)(uintptr_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++) {
u64 addr;
uintptr_t 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 *)(ptrdiff_t)addr;
sg_user[i] = (void __user *)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 *)(ptrdiff_t)upsg->sg[i].addr;
sg_user[i] = (void __user *)(uintptr_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 - ((ptrdiff_t)(base) & (commalign - 1)));
align = (commalign - ((uintptr_t)(base) & (commalign - 1)));
base = base + align;
phys = phys + align;
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/dpcsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index)
kfree (fib);
return 1;
}
memcpy(hw_fib, (struct hw_fib *)(((ptrdiff_t)(dev->regs.sa)) +
memcpy(hw_fib, (struct hw_fib *)(((uintptr_t)(dev->regs.sa)) +
(index & ~0x00000002L)), sizeof(struct hw_fib));
INIT_LIST_HEAD(&fib->fiblink);
fib->type = FSAFS_NTC_FIB_CONTEXT;
Expand Down
Loading

0 comments on commit e34a9be

Please sign in to comment.