Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154388
b: refs/heads/master
c: 6f0b1c6
h: refs/heads/master
v: v3
  • Loading branch information
Michael Ellerman authored and Benjamin Herrenschmidt committed Jun 26, 2009
1 parent ddb8ebd commit ec5cfa8
Show file tree
Hide file tree
Showing 24 changed files with 319 additions and 517 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: cf2acfb2051fc67804162eebc5ebc8f55d3b7e2c
refs/heads/master: 6f0b1c6094b3e8eeeb13f8f16c1b2ef452a6f519
24 changes: 18 additions & 6 deletions trunk/arch/powerpc/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ static inline void dma_sync_single_for_cpu(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0,

if (dma_ops->sync_single_range_for_cpu)
dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0,
size, direction);
}

Expand All @@ -320,7 +322,9 @@ static inline void dma_sync_single_for_device(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_single_range_for_device(dev, dma_handle,

if (dma_ops->sync_single_range_for_device)
dma_ops->sync_single_range_for_device(dev, dma_handle,
0, size, direction);
}

Expand All @@ -331,7 +335,9 @@ static inline void dma_sync_sg_for_cpu(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction);

if (dma_ops->sync_sg_for_cpu)
dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction);
}

static inline void dma_sync_sg_for_device(struct device *dev,
Expand All @@ -341,7 +347,9 @@ static inline void dma_sync_sg_for_device(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_sg_for_device(dev, sgl, nents, direction);

if (dma_ops->sync_sg_for_device)
dma_ops->sync_sg_for_device(dev, sgl, nents, direction);
}

static inline void dma_sync_single_range_for_cpu(struct device *dev,
Expand All @@ -351,7 +359,9 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_single_range_for_cpu(dev, dma_handle,

if (dma_ops->sync_single_range_for_cpu)
dma_ops->sync_single_range_for_cpu(dev, dma_handle,
offset, size, direction);
}

Expand All @@ -362,7 +372,9 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

BUG_ON(!dma_ops);
dma_ops->sync_single_range_for_device(dev, dma_handle, offset,

if (dma_ops->sync_single_range_for_device)
dma_ops->sync_single_range_for_device(dev, dma_handle, offset,
size, direction);
}
#else /* CONFIG_PPC_NEED_DMA_SYNC_OPS */
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sparc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ quiet_cmd_elftoaout = ELFTOAOUT $@

ifeq ($(CONFIG_SPARC32),y)
quiet_cmd_piggy = PIGGY $@
cmd_piggy = $(obj)/piggyback_32 $@ System.map $(ROOT_IMG)
cmd_piggy = $(obj)/piggyback_32 $@ $(obj)/System.map $(ROOT_IMG)
quiet_cmd_btfix = BTFIX $@
cmd_btfix = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
quiet_cmd_sysmap = SYSMAP $(obj)/System.map
Expand Down Expand Up @@ -58,7 +58,7 @@ $(obj)/image: $(obj)/btfix.o FORCE
$(obj)/zImage: $(obj)/image
$(call if_changed,strip)

$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_32 System.map $(ROOT_IMG) FORCE
$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
$(call if_changed,elftoaout)
$(call if_changed,piggy)

Expand All @@ -79,7 +79,7 @@ $(obj)/image: vmlinux FORCE
$(call if_changed,strip)
@echo ' kernel: $@ is ready'

$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
$(call if_changed,elftoaout)
$(call if_changed,piggy)
@echo ' kernel: $@ is ready'
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc/boot/piggyback_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void die(char *str)
int main(int argc,char **argv)
{
static char aout_magic[] = { 0x01, 0x03, 0x01, 0x07 };
char buffer[1024], *q, *r;
unsigned char buffer[1024], *q, *r;
unsigned int i, j, k, start, end, offset;
FILE *map;
struct stat s;
Expand All @@ -84,7 +84,7 @@ int main(int argc,char **argv)
while (fgets (buffer, 1024, map)) {
if (!strcmp (buffer + 8, " T start\n") || !strcmp (buffer + 16, " T start\n"))
start = strtoul (buffer, NULL, 16);
else if (!strcmp (buffer + 8, " A _end\n") || !strcmp (buffer + 16, " A _end\n"))
else if (!strcmp (buffer + 8, " A end\n") || !strcmp (buffer + 16, " A end\n"))
end = strtoul (buffer, NULL, 16);
}
fclose (map);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc/boot/piggyback_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ int main(int argc,char **argv)
struct stat s;
int image, tail;

start = end = 0;
if (stat (argv[3], &s) < 0) die (argv[3]);
map = fopen (argv[2], "r");
if (!map) die(argv[2]);
Expand Down
45 changes: 26 additions & 19 deletions trunk/arch/sparc/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/bootmem.h>
#include <linux/irq.h>

#include <asm/ptrace.h>
Expand Down Expand Up @@ -913,19 +914,25 @@ void __cpuinit notrace sun4v_register_mondo_queues(int this_cpu)
tb->nonresum_qmask);
}

/* Each queue region must be a power of 2 multiple of 64 bytes in
* size. The base real address must be aligned to the size of the
* region. Thus, an 8KB queue must be 8KB aligned, for example.
*/
static void __init alloc_one_queue(unsigned long *pa_ptr, unsigned long qmask)
static void __init alloc_one_mondo(unsigned long *pa_ptr, unsigned long qmask)
{
unsigned long size = PAGE_ALIGN(qmask + 1);
void *p = __alloc_bootmem(size, size, 0);
if (!p) {
prom_printf("SUN4V: Error, cannot allocate mondo queue.\n");
prom_halt();
}

*pa_ptr = __pa(p);
}

static void __init alloc_one_kbuf(unsigned long *pa_ptr, unsigned long qmask)
{
unsigned long size = PAGE_ALIGN(qmask + 1);
unsigned long order = get_order(size);
unsigned long p;
void *p = __alloc_bootmem(size, size, 0);

p = __get_free_pages(GFP_KERNEL, order);
if (!p) {
prom_printf("SUN4V: Error, cannot allocate queue.\n");
prom_printf("SUN4V: Error, cannot allocate kbuf page.\n");
prom_halt();
}

Expand All @@ -935,11 +942,11 @@ static void __init alloc_one_queue(unsigned long *pa_ptr, unsigned long qmask)
static void __init init_cpu_send_mondo_info(struct trap_per_cpu *tb)
{
#ifdef CONFIG_SMP
unsigned long page;
void *page;

BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64));

page = get_zeroed_page(GFP_KERNEL);
page = alloc_bootmem_pages(PAGE_SIZE);
if (!page) {
prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n");
prom_halt();
Expand All @@ -958,13 +965,13 @@ static void __init sun4v_init_mondo_queues(void)
for_each_possible_cpu(cpu) {
struct trap_per_cpu *tb = &trap_block[cpu];

alloc_one_queue(&tb->cpu_mondo_pa, tb->cpu_mondo_qmask);
alloc_one_queue(&tb->dev_mondo_pa, tb->dev_mondo_qmask);
alloc_one_queue(&tb->resum_mondo_pa, tb->resum_qmask);
alloc_one_queue(&tb->resum_kernel_buf_pa, tb->resum_qmask);
alloc_one_queue(&tb->nonresum_mondo_pa, tb->nonresum_qmask);
alloc_one_queue(&tb->nonresum_kernel_buf_pa,
tb->nonresum_qmask);
alloc_one_mondo(&tb->cpu_mondo_pa, tb->cpu_mondo_qmask);
alloc_one_mondo(&tb->dev_mondo_pa, tb->dev_mondo_qmask);
alloc_one_mondo(&tb->resum_mondo_pa, tb->resum_qmask);
alloc_one_kbuf(&tb->resum_kernel_buf_pa, tb->resum_qmask);
alloc_one_mondo(&tb->nonresum_mondo_pa, tb->nonresum_qmask);
alloc_one_kbuf(&tb->nonresum_kernel_buf_pa,
tb->nonresum_qmask);
}
}

Expand Down Expand Up @@ -992,7 +999,7 @@ void __init init_IRQ(void)
kill_prom_timer();

size = sizeof(struct ino_bucket) * NUM_IVECS;
ivector_table = kzalloc(size, GFP_KERNEL);
ivector_table = alloc_bootmem(size);
if (!ivector_table) {
prom_printf("Fatal error, cannot allocate ivector_table\n");
prom_halt();
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
fn = adr & 0xffff;

pdev = pci_get_slot(pbus, PCI_DEVFN(dev, fn));
if (!pdev || hnd == handle)
if (hnd == handle)
break;

pbus = pdev->subordinate;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ config EEEPC_LAPTOP
depends on RFKILL || RFKILL = n
select BACKLIGHT_CLASS_DEVICE
select HWMON
select HOTPLUG
select HOTPLUG_PCI if PCI
---help---
This driver supports the Fn-Fx keys on Eee PC laptops.

Expand Down
Loading

0 comments on commit ec5cfa8

Please sign in to comment.