Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40139
b: refs/heads/master
c: 5d6aaf3
h: refs/heads/master
i:
  40137: 99a64ce
  40135: b8b0604
v: v3
  • Loading branch information
Linus Torvalds committed Oct 21, 2006
1 parent 5d776a9 commit f2b09d5
Show file tree
Hide file tree
Showing 29 changed files with 403 additions and 147 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: e70ea8c09db0e25ab58f84ba7f393e5c9125a8ee
refs/heads/master: 5d6aaf3f6d50f0e12dac42432ceb1c86cd860de6
9 changes: 9 additions & 0 deletions trunk/arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,15 @@ config ARCH_MEMORY_PROBE
def_bool y
depends on MEMORY_HOTPLUG

# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
# reside on that node. See memmap_init_zone()
# for details.
config NODES_SPAN_OTHER_NODES
def_bool y
depends on NEED_MULTIPLE_NODES

config PPC_64K_PAGES
bool "64k page size"
depends on PPC64
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/configs/pseries_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_NODES_SPAN_OTHER_NODES=y
# CONFIG_PPC_64K_PAGES is not set
CONFIG_SCHED_SMT=y
CONFIG_PROC_DEVICETREE=y
Expand Down
22 changes: 9 additions & 13 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,6 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
{
int return_code;
unsigned long t;
unsigned long rem;

memset(inq_buff, 0, sizeof(InquiryData_struct));
if (withirq)
Expand All @@ -1939,26 +1938,23 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
printk(KERN_WARNING
"cciss: reading geometry failed, volume "
"does not support reading geometry\n");
drv->block_size = block_size;
drv->nr_blocks = total_size;
drv->heads = 255;
drv->sectors = 32; // Sectors per track
t = drv->heads * drv->sectors;
drv->cylinders = total_size;
rem = do_div(drv->cylinders, t);
} else {
drv->block_size = block_size;
drv->nr_blocks = total_size;
drv->heads = inq_buff->data_byte[6];
drv->sectors = inq_buff->data_byte[7];
drv->cylinders = (inq_buff->data_byte[4] & 0xff) << 8;
drv->cylinders += inq_buff->data_byte[5];
drv->raid_level = inq_buff->data_byte[8];
t = drv->heads * drv->sectors;
if (t > 1) {
drv->cylinders = total_size;
rem = do_div(drv->cylinders, t);
}
}
drv->block_size = block_size;
drv->nr_blocks = total_size;
t = drv->heads * drv->sectors;
if (t > 1) {
unsigned rem = sector_div(total_size, t);
if (rem)
total_size++;
drv->cylinders = total_size;
}
} else { /* Get geometry failed */
printk(KERN_WARNING "cciss: reading geometry failed\n");
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/char/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static moxa_isa_board_conf moxa_isa_boards[] =
typedef struct _moxa_pci_devinfo {
ushort busNum;
ushort devNum;
struct pci_dev *pdev;
} moxa_pci_devinfo;

typedef struct _moxa_board_conf {
Expand Down Expand Up @@ -324,6 +325,9 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf
board->busType = MOXA_BUS_TYPE_PCI;
board->pciInfo.busNum = p->bus->number;
board->pciInfo.devNum = p->devfn >> 3;
board->pciInfo.pdev = p;
/* don't lose the reference in the next pci_get_device iteration */
pci_dev_get(p);

return (0);
}
Expand Down Expand Up @@ -493,6 +497,11 @@ static void __exit moxa_exit(void)
if (tty_unregister_driver(moxaDriver))
printk("Couldn't unregister MOXA Intellio family serial driver\n");
put_tty_driver(moxaDriver);

for (i = 0; i < MAX_BOARDS; i++)
if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI)
pci_dev_put(moxa_boards[i].pciInfo.pdev);

if (verbose)
printk("Done\n");
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/rio/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
** the host.
*/
struct Host {
struct pci_dev *pdev;
unsigned char Type; /* RIO_EISA, RIO_MCA, ... */
unsigned char Ivec; /* POLLED or ivec number */
unsigned char Mode; /* Control stuff */
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/char/rio/rio_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,10 @@ static int __init rio_init(void)
rio_dprintk(RIO_DEBUG_PROBE, "Hmm Tested ok, uniqid = %x.\n", p->RIOHosts[p->RIONumHosts].UniqueNum);

fix_rio_pci(pdev);

p->RIOHosts[p->RIONumHosts].pdev = pdev;
pci_dev_get(pdev);

p->RIOLastPCISearch = 0;
p->RIONumHosts++;
found++;
Expand Down Expand Up @@ -1066,6 +1070,9 @@ static int __init rio_init(void)
((readb(&p->RIOHosts[p->RIONumHosts].Unique[1]) & 0xFF) << 8) | ((readb(&p->RIOHosts[p->RIONumHosts].Unique[2]) & 0xFF) << 16) | ((readb(&p->RIOHosts[p->RIONumHosts].Unique[3]) & 0xFF) << 24);
rio_dprintk(RIO_DEBUG_PROBE, "Hmm Tested ok, uniqid = %x.\n", p->RIOHosts[p->RIONumHosts].UniqueNum);

p->RIOHosts[p->RIONumHosts].pdev = pdev;
pci_dev_get(pdev);

p->RIOLastPCISearch = 0;
p->RIONumHosts++;
found++;
Expand Down Expand Up @@ -1181,6 +1188,8 @@ static void __exit rio_exit(void)
}
/* It is safe/allowed to del_timer a non-active timer */
del_timer(&hp->timer);
if (hp->Type == RIO_PCI)
pci_dev_put(hp->pdev);
}

if (misc_deregister(&rio_fw_device) < 0) {
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/clocksource/acpi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static cycle_t acpi_pm_read_verified(void)
v1 = read_pmtmr();
v2 = read_pmtmr();
v3 = read_pmtmr();
} while ((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1)
|| (v3 > v1 && v3 < v2));
} while (unlikely((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1)
|| (v3 > v1 && v3 < v2)));

return (cycle_t)v2;
}
Expand Down Expand Up @@ -138,6 +138,8 @@ static void __devinit acpi_pm_check_graylist(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
acpi_pm_check_graylist);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE,
acpi_pm_check_graylist);
#endif


Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/ide/pci/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@

static int ide_generic_all; /* Set to claim all devices */

/*
* the module_param_named() was added for the modular case
* the __setup() is left as compatibility for existing setups
*/
#ifndef MODULE
static int __init ide_generic_all_on(char *unused)
{
ide_generic_all = 1;
printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.");
return 1;
}
__setup("all-generic-ide", ide_generic_all_on);
#endif
module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,19 +536,19 @@ static int bitmap_read_sb(struct bitmap *bitmap)
printk(KERN_INFO "%s: bitmap file is out of date (%llu < %llu) "
"-- forcing full recovery\n", bmname(bitmap), events,
(unsigned long long) bitmap->mddev->events);
sb->state |= BITMAP_STALE;
sb->state |= cpu_to_le32(BITMAP_STALE);
}
success:
/* assign fields using values from superblock */
bitmap->chunksize = chunksize;
bitmap->daemon_sleep = daemon_sleep;
bitmap->daemon_lastrun = jiffies;
bitmap->max_write_behind = write_behind;
bitmap->flags |= sb->state;
bitmap->flags |= le32_to_cpu(sb->state);
if (le32_to_cpu(sb->version) == BITMAP_MAJOR_HOSTENDIAN)
bitmap->flags |= BITMAP_HOSTENDIAN;
bitmap->events_cleared = le64_to_cpu(sb->events_cleared);
if (sb->state & BITMAP_STALE)
if (sb->state & cpu_to_le32(BITMAP_STALE))
bitmap->events_cleared = bitmap->mddev->events;
err = 0;
out:
Expand Down Expand Up @@ -578,9 +578,9 @@ static void bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits,
spin_unlock_irqrestore(&bitmap->lock, flags);
sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0);
switch (op) {
case MASK_SET: sb->state |= bits;
case MASK_SET: sb->state |= cpu_to_le32(bits);
break;
case MASK_UNSET: sb->state &= ~bits;
case MASK_UNSET: sb->state &= cpu_to_le32(~bits);
break;
default: BUG();
}
Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,12 +974,13 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
* version 1 superblock
*/

static unsigned int calc_sb_1_csum(struct mdp_superblock_1 * sb)
static __le32 calc_sb_1_csum(struct mdp_superblock_1 * sb)
{
unsigned int disk_csum, csum;
__le32 disk_csum;
u32 csum;
unsigned long long newcsum;
int size = 256 + le32_to_cpu(sb->max_dev)*2;
unsigned int *isuper = (unsigned int*)sb;
__le32 *isuper = (__le32*)sb;
int i;

disk_csum = sb->sb_csum;
Expand All @@ -989,7 +990,7 @@ static unsigned int calc_sb_1_csum(struct mdp_superblock_1 * sb)
newcsum += le32_to_cpu(*isuper++);

if (size == 2)
newcsum += le16_to_cpu(*(unsigned short*) isuper);
newcsum += le16_to_cpu(*(__le16*) isuper);

csum = (newcsum & 0xffffffff) + (newcsum >> 32);
sb->sb_csum = disk_csum;
Expand Down Expand Up @@ -1106,7 +1107,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
if (le32_to_cpu(sb->chunksize))
rdev->size &= ~((sector_t)le32_to_cpu(sb->chunksize)/2 - 1);

if (le32_to_cpu(sb->size) > rdev->size*2)
if (le64_to_cpu(sb->size) > rdev->size*2)
return -EINVAL;
return ret;
}
Expand Down Expand Up @@ -1228,7 +1229,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
else
sb->resync_offset = cpu_to_le64(0);

sb->cnt_corrected_read = atomic_read(&rdev->corrected_errors);
sb->cnt_corrected_read = cpu_to_le32(atomic_read(&rdev->corrected_errors));

sb->raid_disks = cpu_to_le32(mddev->raid_disks);
sb->size = cpu_to_le64(mddev->size<<1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ static int multipath_run (mddev_t *mddev)
mdname(mddev));
goto out_free_conf;
}
mddev->degraded = conf->raid_disks = conf->working_disks;
mddev->degraded = conf->raid_disks - conf->working_disks;

conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS,
sizeof(struct multipath_bh));
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + i;

if (!disk->rdev ||
!test_bit(In_sync, &rdev->flags)) {
!test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/message/i2o/exec-osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, struct i2o_message *msg,
DECLARE_WAIT_QUEUE_HEAD(wq);
struct i2o_exec_wait *wait;
static u32 tcntxt = 0x80000000;
long flags;
unsigned long flags;
int rc = 0;

wait = i2o_exec_wait_alloc();
Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
break;
}

free_index = pool->consumer_index++ % pool->size;
pool->consumer_index = free_index;
free_index = pool->consumer_index;
pool->consumer_index = (pool->consumer_index + 1) % pool->size;
index = pool->free_map[free_index];

ibmveth_assert(index != IBM_VETH_INVALID_MAP);
Expand Down Expand Up @@ -329,8 +329,10 @@ static void ibmveth_remove_buffer_from_pool(struct ibmveth_adapter *adapter, u64
adapter->rx_buff_pool[pool].buff_size,
DMA_FROM_DEVICE);

free_index = adapter->rx_buff_pool[pool].producer_index++ % adapter->rx_buff_pool[pool].size;
adapter->rx_buff_pool[pool].producer_index = free_index;
free_index = adapter->rx_buff_pool[pool].producer_index;
adapter->rx_buff_pool[pool].producer_index
= (adapter->rx_buff_pool[pool].producer_index + 1)
% adapter->rx_buff_pool[pool].size;
adapter->rx_buff_pool[pool].free_map[free_index] = index;

mb();
Expand Down
Loading

0 comments on commit f2b09d5

Please sign in to comment.