Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96050
b: refs/heads/master
c: bb896af
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 6, 2008
1 parent 8345a20 commit 180736b
Show file tree
Hide file tree
Showing 29 changed files with 203 additions and 191 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: aac6abca858386438d9a7233c3471d2ecfa2f704
refs/heads/master: bb896afe2089575ca1bb1fbf3f07b934e1ba999b
5 changes: 2 additions & 3 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,6 @@ and is between 256 and 4096 characters. It is defined in the file
mac5380= [HW,SCSI] Format:
<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>

mac53c9x= [HW,SCSI] Format:
<num_esps>,<disconnect>,<nosync>,<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>

machvec= [IA64] Force the use of a particular machine-vector
(machvec) in a generic kernel.
Example: machvec=hpzx1_swiotlb
Expand Down Expand Up @@ -1525,6 +1522,8 @@ and is between 256 and 4096 characters. It is defined in the file
This is normally done in pci_enable_device(),
so this option is a temporary workaround
for broken drivers that don't call it.
skip_isa_align [X86] do not align io start addr, so can
handle more pci cards
firmware [ARM] Do not re-enumerate the bus but instead
just use the configuration from the
bootloader. This is currently used on
Expand Down
17 changes: 14 additions & 3 deletions trunk/arch/m68k/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,26 @@ static inline void access_error040(struct frame *fp)
* (if do_page_fault didn't fix the mapping,
* the writeback won't do good)
*/
disable_wb:
#ifdef DEBUG
printk(".. disabling wb2\n");
#endif
if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr)
fp->un.fmt7.wb2s &= ~WBV_040;
if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr)
fp->un.fmt7.wb3s &= ~WBV_040;
}
} else if (send_fault_sig(&fp->ptregs) > 0) {
printk("68040 access error, ssw=%x\n", ssw);
trap_c(fp);
} else {
/* In case of a bus error we either kill the process or expect
* the kernel to catch the fault, which then is also responsible
* for cleaning up the mess.
*/
current->thread.signo = SIGBUS;
current->thread.faddr = fp->un.fmt7.faddr;
if (send_fault_sig(&fp->ptregs) >= 0)
printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw,
fp->un.fmt7.faddr);
goto disable_wb;
}

do_040writebacks(fp);
Expand Down
24 changes: 0 additions & 24 deletions trunk/arch/m68k/mac/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
struct mac_booter_data mac_bi_data;
int mac_bisize = sizeof mac_bi_data;

struct mac_hw_present mac_hw_present;
EXPORT_SYMBOL(mac_hw_present);

/* New m68k bootinfo stuff and videobase */

extern int m68k_num_memory;
Expand Down Expand Up @@ -817,27 +814,6 @@ void __init mac_identify(void)
m68k_ramdisk.addr, m68k_ramdisk.size);
#endif

/*
* TODO: set the various fields in macintosh_config->hw_present here!
*/
switch (macintosh_config->scsi_type) {
case MAC_SCSI_OLD:
MACHW_SET(MAC_SCSI_80);
break;
case MAC_SCSI_QUADRA:
case MAC_SCSI_QUADRA2:
case MAC_SCSI_QUADRA3:
MACHW_SET(MAC_SCSI_96);
if ((macintosh_config->ident == MAC_MODEL_Q900) ||
(macintosh_config->ident == MAC_MODEL_Q950))
MACHW_SET(MAC_SCSI_96_2);
break;
default:
printk(KERN_WARNING "config.c: wtf: unknown scsi, using 53c80\n");
MACHW_SET(MAC_SCSI_80);
break;
}

iop_init();
via_init();
oss_init();
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ obj-$(CONFIG_SMP) += locks.o
endif

obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
obj-$(CONFIG_HAS_IOMEM) += devres.o
42 changes: 42 additions & 0 deletions trunk/arch/powerpc/lib/devres.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (C) 2008 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

#include <linux/device.h> /* devres_*(), devm_ioremap_release() */
#include <linux/io.h> /* ioremap_flags() */
#include <linux/module.h> /* EXPORT_SYMBOL() */

/**
* devm_ioremap_prot - Managed ioremap_flags()
* @dev: Generic device to remap IO address for
* @offset: BUS offset to map
* @size: Size of map
* @flags: Page flags
*
* Managed ioremap_prot(). Map is automatically unmapped on driver
* detach.
*/
void __iomem *devm_ioremap_prot(struct device *dev, resource_size_t offset,
size_t size, unsigned long flags)
{
void __iomem **ptr, *addr;

ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
if (!ptr)
return NULL;

addr = ioremap_flags(offset, size, flags);
if (addr) {
*ptr = addr;
devres_add(dev, ptr);
} else
devres_free(ptr);

return addr;
}
EXPORT_SYMBOL(devm_ioremap_prot);
19 changes: 2 additions & 17 deletions trunk/arch/powerpc/platforms/pseries/scanlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ static ssize_t scanlog_read(struct file *file, char __user *buf,
dp = PDE(inode);
data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: read failed no data\n");
return -EIO;
}

if (count > RTAS_DATA_BUF_SIZE)
count = RTAS_DATA_BUF_SIZE;

Expand Down Expand Up @@ -146,11 +141,6 @@ static int scanlog_open(struct inode * inode, struct file * file)
struct proc_dir_entry *dp = PDE(inode);
unsigned int *data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: open failed no data\n");
return -EIO;
}

if (data[0] != 0) {
/* This imperfect test stops a second copy of the
* data (or a reset while data is being copied)
Expand All @@ -168,10 +158,6 @@ static int scanlog_release(struct inode * inode, struct file * file)
struct proc_dir_entry *dp = PDE(inode);
unsigned int *data = (unsigned int *)dp->data;

if (!data) {
printk(KERN_ERR "scanlog: release failed no data\n");
return -EIO;
}
data[0] = 0;

return 0;
Expand Down Expand Up @@ -200,12 +186,11 @@ static int __init scanlog_init(void)
if (!data)
goto err;

ent = proc_create("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
&scanlog_fops);
ent = proc_create_data("ppc64/rtas/scan-log-dump", S_IRUSR, NULL,
&scanlog_fops, data);
if (!ent)
goto err;

ent->data = data;
proc_ppc64_scan_log_dump = ent;

return 0;
Expand Down
41 changes: 0 additions & 41 deletions trunk/arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,6 @@
#include <asm/numa.h>
#include "pci.h"

static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
{
pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
return 0;
}

static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = {
/*
* Systems where PCI IO resource ISA alignment can be skipped
* when the ISA enable bit in the bridge control is not set
*/
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3800",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3800"),
},
},
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3850",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3850"),
},
},
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3950",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3950"),
},
},
{}
};

struct pci_root_info {
char *name;
unsigned int res_num;
Expand Down Expand Up @@ -196,8 +157,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
int pxm;
#endif

dmi_check_system(acpi_pciprobe_dmi_table);

if (domain && !pci_domains_supported) {
printk(KERN_WARNING "PCI: Multiple domains not supported "
"(dom %d, bus %d)\n", domain, busnum);
Expand Down
58 changes: 54 additions & 4 deletions trunk/arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,50 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
rom_r->start = rom_r->end = rom_r->flags = 0;
}

static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
{
pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
return 0;
}

static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = {
/*
* Systems where PCI IO resource ISA alignment can be skipped
* when the ISA enable bit in the bridge control is not set
*/
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3800",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3800"),
},
},
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3850",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3850"),
},
},
{
.callback = can_skip_ioresource_align,
.ident = "IBM System x3950",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
DMI_MATCH(DMI_PRODUCT_NAME, "x3950"),
},
},
{}
};

void __init dmi_check_skip_isa_align(void)
{
dmi_check_system(can_skip_pciprobe_dmi_table);
}

/*
* Called after each bus is probed, but before its children
* are examined.
Expand Down Expand Up @@ -318,13 +362,16 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
{}
};

void __init dmi_check_pciprobe(void)
{
dmi_check_system(pciprobe_dmi_table);
}

struct pci_bus * __devinit pcibios_scan_root(int busnum)
{
struct pci_bus *bus = NULL;
struct pci_sysdata *sd;

dmi_check_system(pciprobe_dmi_table);

while ((bus = pci_find_next_bus(bus)) != NULL) {
if (bus->number == busnum) {
/* Already scanned */
Expand Down Expand Up @@ -462,6 +509,9 @@ char * __devinit pcibios_setup(char *str)
} else if (!strcmp(str, "routeirq")) {
pci_routeirq = 1;
return NULL;
} else if (!strcmp(str, "skip_isa_align")) {
pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
return NULL;
}
return str;
}
Expand Down Expand Up @@ -489,7 +539,7 @@ void pcibios_disable_device (struct pci_dev *dev)
pcibios_disable_irq(dev);
}

struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
{
struct pci_bus *bus = NULL;
struct pci_sysdata *sd;
Expand All @@ -512,7 +562,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
return bus;
}

struct pci_bus *pci_scan_bus_with_sysdata(int busno)
struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno)
{
return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
}
2 changes: 1 addition & 1 deletion trunk/arch/x86/pci/fixup.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015,
*/
static void fam10h_pci_cfg_space_size(struct pci_dev *dev)
{
dev->cfg_size = pci_cfg_space_size_ext(dev, 0);
dev->cfg_size = pci_cfg_space_size_ext(dev);
}

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/pci/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ static __init int pci_access_init(void)
printk(KERN_ERR
"PCI: Fatal: No config space access function found\n");

dmi_check_pciprobe();

dmi_check_skip_isa_align();

return 0;
}
arch_initcall(pci_access_init);
3 changes: 3 additions & 0 deletions trunk/arch/x86/pci/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ enum pci_bf_sort_state {
pci_dmi_bf,
};

extern void __init dmi_check_pciprobe(void);
extern void __init dmi_check_skip_isa_align(void);

/* pci-i386.c */

extern unsigned int pcibios_max_latency;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/serial167.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ static int cy_put_char(struct tty_struct *tty, unsigned char ch)
return 0;

if (!info->xmit_buf)
return;
return 0;

local_irq_save(flags);
if (info->xmit_cnt >= PAGE_SIZE - 1) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/edac/edac_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extern int edac_debug_level;
#define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \
PCI_DEVICE_ID_ ## vend ## _ ## dev

#define dev_name(dev) (dev)->dev_name
#define edac_dev_name(dev) (dev)->dev_name

/* memory devices */
enum dev_type {
Expand Down
Loading

0 comments on commit 180736b

Please sign in to comment.