Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72693
b: refs/heads/master
c: 9340070
h: refs/heads/master
i:
  72691: 40fe7a0
v: v3
  • Loading branch information
Linus Torvalds committed Oct 29, 2007
1 parent 6120ed2 commit ac9e417
Show file tree
Hide file tree
Showing 31 changed files with 205 additions and 198 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: edfed66e17854c312e81a2218f9b0592a555c9a3
refs/heads/master: 93400708dba888d45b4da01e1753a3a743f44496
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
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
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
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
39 changes: 17 additions & 22 deletions trunk/drivers/scsi/arcmsr/arcmsr.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ struct CMD_MESSAGE_FIELD
#define IS_SG64_ADDR 0x01000000 /* bit24 */
struct SG32ENTRY
{
uint32_t length;
uint32_t address;
__le32 length;
__le32 address;
};
struct SG64ENTRY
{
uint32_t length;
uint32_t address;
uint32_t addresshigh;
__le32 length;
__le32 address;
__le32 addresshigh;
};
struct SGENTRY_UNION
{
Expand Down Expand Up @@ -339,23 +339,15 @@ struct MessageUnit_B
uint32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE];
uint32_t postq_index;
uint32_t doneq_index;
uint32_t *drv2iop_doorbell_reg;
uint32_t *drv2iop_doorbell_mask_reg;
uint32_t *iop2drv_doorbell_reg;
uint32_t *iop2drv_doorbell_mask_reg;
uint32_t *msgcode_rwbuffer_reg;
uint32_t *ioctl_wbuffer_reg;
uint32_t *ioctl_rbuffer_reg;
uint32_t __iomem *drv2iop_doorbell_reg;
uint32_t __iomem *drv2iop_doorbell_mask_reg;
uint32_t __iomem *iop2drv_doorbell_reg;
uint32_t __iomem *iop2drv_doorbell_mask_reg;
uint32_t __iomem *msgcode_rwbuffer_reg;
uint32_t __iomem *ioctl_wbuffer_reg;
uint32_t __iomem *ioctl_rbuffer_reg;
};

struct MessageUnit
{
union
{
struct MessageUnit_A pmu_A;
struct MessageUnit_B pmu_B;
} u;
};
/*
*******************************************************************************
** Adapter Control Block
Expand All @@ -374,7 +366,10 @@ struct AdapterControlBlock
/* Offset is used in making arc cdb physical to virtual calculations */
uint32_t outbound_int_enable;

struct MessageUnit * pmu;
union {
struct MessageUnit_A __iomem * pmuA;
struct MessageUnit_B * pmuB;
};
/* message unit ATU inbound base address0 */

uint32_t acb_flags;
Expand Down Expand Up @@ -558,7 +553,7 @@ struct SENSE_DATA

extern void arcmsr_post_ioctldata2iop(struct AdapterControlBlock *);
extern void arcmsr_iop_message_read(struct AdapterControlBlock *);
extern struct QBUFFER *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *);
extern struct QBUFFER __iomem *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *);
extern struct class_device_attribute *arcmsr_host_attrs[];
extern int arcmsr_alloc_sysfs_attr(struct AdapterControlBlock *);
void arcmsr_free_sysfs_attr(struct AdapterControlBlock *acb);
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/arcmsr/arcmsr_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ static ssize_t arcmsr_sysfs_iop_message_read(struct kobject *kobj,
allxfer_len++;
}
if (acb->acb_flags & ACB_F_IOPDATA_OVERFLOW) {
struct QBUFFER *prbuffer;
uint8_t *iop_data;
struct QBUFFER __iomem *prbuffer;
uint8_t __iomem *iop_data;
int32_t iop_len;

acb->acb_flags &= ~ACB_F_IOPDATA_OVERFLOW;
prbuffer = arcmsr_get_iop_rqbuffer(acb);
iop_data = (uint8_t *)prbuffer->data;
iop_data = prbuffer->data;
iop_len = readl(&prbuffer->data_len);
while (iop_len > 0) {
acb->rqbuffer[acb->rqbuf_lastindex] = readb(iop_data);
Expand Down
Loading

0 comments on commit ac9e417

Please sign in to comment.