Skip to content

Commit

Permalink
Merge branch 'next/generic' into mips-for-linux-next
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbaechle committed Jan 11, 2012
2 parents 5b0ec2e + d7a887a commit 39b7414
Show file tree
Hide file tree
Showing 52 changed files with 990 additions and 174 deletions.
3 changes: 1 addition & 2 deletions arch/mips/alchemy/common/dbdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,7 @@ static int __init dbdma_setup(unsigned int irq, dbdev_tab_t *idtable)
dbdma_gptr->ddma_inten = 0xffff;
au_sync();

ret = request_irq(irq, dbdma_interrupt, IRQF_DISABLED, "dbdma",
(void *)dbdma_gptr);
ret = request_irq(irq, dbdma_interrupt, 0, "dbdma", (void *)dbdma_gptr);
if (ret)
printk(KERN_ERR "Cannot grab DBDMA interrupt!\n");
else {
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/alchemy/common/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {

static struct irqaction au1x_rtcmatch2_irqaction = {
.handler = au1x_rtcmatch2_irq,
.flags = IRQF_DISABLED | IRQF_TIMER,
.flags = IRQF_TIMER,
.name = "timer",
.dev_id = &au1x_rtcmatch2_clockdev,
};
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/alchemy/devboards/db1200/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ static int db1200_mmc_cd_setup(void *mmc_host, int en)

if (en) {
ret = request_irq(DB1200_SD0_INSERT_INT, db1200_mmc_cd,
IRQF_DISABLED, "sd_insert", mmc_host);
0, "sd_insert", mmc_host);
if (ret)
goto out;

ret = request_irq(DB1200_SD0_EJECT_INT, db1200_mmc_cd,
IRQF_DISABLED, "sd_eject", mmc_host);
0, "sd_eject", mmc_host);
if (ret) {
free_irq(DB1200_SD0_INSERT_INT, mmc_host);
goto out;
Expand Down
8 changes: 0 additions & 8 deletions arch/mips/cavium-octeon/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,14 +642,6 @@ void __init plat_mem_setup(void)

total = 0;

/* First add the init memory we will be returning. */
memory = __pa_symbol(&__init_begin) & PAGE_MASK;
mem_alloc_size = (__pa_symbol(&__init_end) & PAGE_MASK) - memory;
if (mem_alloc_size > 0) {
add_memory_region(memory, mem_alloc_size, BOOT_MEM_RAM);
total += mem_alloc_size;
}

/*
* The Mips memory init uses the first memory location for
* some memory vectors. When SPARSEMEM is in use, it doesn't
Expand Down
1 change: 0 additions & 1 deletion arch/mips/dec/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ static struct irqaction fpuirq = {
};

static struct irqaction busirq = {
.flags = IRQF_DISABLED,
.name = "bus error",
.flags = IRQF_NO_THREAD,
};
Expand Down
1 change: 1 addition & 0 deletions arch/mips/include/asm/bootinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ extern unsigned long mips_machtype;
#define BOOT_MEM_RAM 1
#define BOOT_MEM_ROM_DATA 2
#define BOOT_MEM_RESERVED 3
#define BOOT_MEM_INIT_RAM 4

/*
* A memory map that's built upon what was determined
Expand Down
56 changes: 56 additions & 0 deletions arch/mips/include/asm/gio_device.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include <linux/device.h>
#include <linux/mod_devicetable.h>

struct gio_device_id {
__u8 id;
};

struct gio_device {
struct device dev;
struct resource resource;
unsigned int irq;
unsigned int slotno;

const char *name;
struct gio_device_id id;
unsigned id32:1;
unsigned gio64:1;
};
#define to_gio_device(d) container_of(d, struct gio_device, dev)

struct gio_driver {
const char *name;
struct module *owner;
const struct gio_device_id *id_table;

int (*probe)(struct gio_device *, const struct gio_device_id *);
void (*remove)(struct gio_device *);
int (*suspend)(struct gio_device *, pm_message_t);
int (*resume)(struct gio_device *);
void (*shutdown)(struct gio_device *);

struct device_driver driver;
};
#define to_gio_driver(drv) container_of(drv, struct gio_driver, driver)

extern const struct gio_device_id *gio_match_device(const struct gio_device_id *,
const struct gio_device *);
extern struct gio_device *gio_dev_get(struct gio_device *);
extern void gio_dev_put(struct gio_device *);

extern int gio_device_register(struct gio_device *);
extern void gio_device_unregister(struct gio_device *);
extern void gio_release_dev(struct device *);

static inline void gio_device_free(struct gio_device *dev)
{
gio_release_dev(&dev->dev);
}

extern int gio_register_driver(struct gio_driver *);
extern void gio_unregister_driver(struct gio_driver *);

#define gio_get_drvdata(_dev) drv_get_drvdata(&(_dev)->dev)
#define gio_set_drvdata(_dev, data) drv_set_drvdata(&(_dev)->dev, (data))

extern void gio_set_master(struct gio_device *);
2 changes: 1 addition & 1 deletion arch/mips/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
flush_tlb_mm(vma->vm_mm);
flush_tlb_page(vma, addr & huge_page_mask(hstate_vma(vma)));
}

static inline int huge_pte_none(pte_t pte)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/mach-generic/floppy.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static inline void fd_disable_irq(void)
static inline int fd_request_irq(void)
{
return request_irq(FLOPPY_IRQ, floppy_interrupt,
IRQF_DISABLED, "floppy", NULL);
0, "floppy", NULL);
}

static inline void fd_free_irq(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/mach-jazz/floppy.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static inline void fd_disable_irq(void)
static inline int fd_request_irq(void)
{
return request_irq(FLOPPY_IRQ, floppy_interrupt,
IRQF_DISABLED, "floppy", NULL);
0, "floppy", NULL);
}

static inline void fd_free_irq(void)
Expand Down
8 changes: 8 additions & 0 deletions arch/mips/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
#define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#else /* !CONFIG_HUGETLB_PAGE */
# ifndef BUILD_BUG
# define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0)
# endif
#define HPAGE_SHIFT ({BUILD_BUG(); 0; })
#define HPAGE_SIZE ({BUILD_BUG(); 0; })
#define HPAGE_MASK ({BUILD_BUG(); 0; })
#define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; })
#endif /* CONFIG_HUGETLB_PAGE */

#ifndef __ASSEMBLY__
Expand Down
12 changes: 1 addition & 11 deletions arch/mips/include/asm/pgtable-32.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@
#include <asm-generic/pgtable-nopmd.h>

/*
* - add_temporary_entry() add a temporary TLB entry. We use TLB entries
* starting at the top and working down. This is for populating the
* TLB before trap_init() puts the TLB miss handler in place. It
* should be used only for entries matching the actual page tables,
* to prevent inconsistencies.
*/
extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
unsigned long entryhi, unsigned long pagemask);


/* Basically we have the same two-level (which is the logical three level
* Basically we have the same two-level (which is the logical three level
* Linux page table layout folded) page tables as the i386. Some day
* when we have proper page coloring support we can have a 1% quicker
* tlb refill handling mechanism, but for now it is a bit slower but
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/jazz/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)

static struct irqaction r4030_timer_irqaction = {
.handler = r4030_timer_interrupt,
.flags = IRQF_DISABLED | IRQF_TIMER,
.flags = IRQF_TIMER,
.name = "R4030 timer",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-bcm1480.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void __cpuinit sb1480_clockevent_init(void)
bcm1480_unmask_irq(cpu, irq);

action->handler = sibyte_counter_handler;
action->flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
action->flags = IRQF_PERCPU | IRQF_TIMER;
action->name = name;
action->dev_id = cd;

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-ds1287.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static irqreturn_t ds1287_interrupt(int irq, void *dev_id)

static struct irqaction ds1287_irqaction = {
.handler = ds1287_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
.flags = IRQF_PERCPU | IRQF_TIMER,
.name = "ds1287",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-gt641xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static irqreturn_t gt641xx_timer0_interrupt(int irq, void *dev_id)

static struct irqaction gt641xx_timer0_irqaction = {
.handler = gt641xx_timer0_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
.flags = IRQF_PERCPU | IRQF_TIMER,
.name = "gt641xx_timer0",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id)

struct irqaction c0_compare_irqaction = {
.handler = c0_compare_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
.flags = IRQF_PERCPU | IRQF_TIMER,
.name = "timer",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-sb1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void __cpuinit sb1250_clockevent_init(void)
sb1250_unmask_irq(cpu, irq);

action->handler = sibyte_counter_handler;
action->flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
action->flags = IRQF_PERCPU | IRQF_TIMER;
action->name = name;
action->dev_id = cd;

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static irqreturn_t txx9tmr_interrupt(int irq, void *dev_id)

static struct irqaction txx9tmr_irq = {
.handler = txx9tmr_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
.flags = IRQF_PERCPU | IRQF_TIMER,
.name = "txx9tmr",
.dev_id = &txx9_clock_event_device,
};
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/i8253.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)

static struct irqaction irq0 = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
.flags = IRQF_NOBALANCING | IRQF_TIMER,
.name = "timer"
};

Expand Down
1 change: 0 additions & 1 deletion arch/mips/kernel/rtlx.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ static const struct file_operations rtlx_fops = {

static struct irqaction rtlx_irq = {
.handler = rtlx_interrupt,
.flags = IRQF_DISABLED,
.name = "RTLX",
};

Expand Down
43 changes: 39 additions & 4 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ static void __init print_memory_map(void)
case BOOT_MEM_RAM:
printk(KERN_CONT "(usable)\n");
break;
case BOOT_MEM_INIT_RAM:
printk(KERN_CONT "(usable after init)\n");
break;
case BOOT_MEM_ROM_DATA:
printk(KERN_CONT "(ROM data)\n");
break;
Expand Down Expand Up @@ -361,15 +364,24 @@ static void __init bootmem_init(void)
for (i = 0; i < boot_mem_map.nr_map; i++) {
unsigned long start, end, size;

start = PFN_UP(boot_mem_map.map[i].addr);
end = PFN_DOWN(boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size);

/*
* Reserve usable memory.
*/
if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
switch (boot_mem_map.map[i].type) {
case BOOT_MEM_RAM:
break;
case BOOT_MEM_INIT_RAM:
memory_present(0, start, end);
continue;
default:
/* Not usable memory */
continue;
}

start = PFN_UP(boot_mem_map.map[i].addr);
end = PFN_DOWN(boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size);
/*
* We are rounding up the start address of usable memory
* and at the end of the usable range downwards.
Expand Down Expand Up @@ -455,11 +467,33 @@ early_param("mem", early_parse_mem);

static void __init arch_mem_init(char **cmdline_p)
{
phys_t init_mem, init_end, init_size;

extern void plat_mem_setup(void);

/* call board setup routine */
plat_mem_setup();

init_mem = PFN_UP(__pa_symbol(&__init_begin)) << PAGE_SHIFT;
init_end = PFN_DOWN(__pa_symbol(&__init_end)) << PAGE_SHIFT;
init_size = init_end - init_mem;
if (init_size) {
/* Make sure it is in the boot_mem_map */
int i, found;
found = 0;
for (i = 0; i < boot_mem_map.nr_map; i++) {
if (init_mem >= boot_mem_map.map[i].addr &&
init_mem < (boot_mem_map.map[i].addr +
boot_mem_map.map[i].size)) {
found = 1;
break;
}
}
if (!found)
add_memory_region(init_mem, init_size,
BOOT_MEM_INIT_RAM);
}

pr_info("Determined physical RAM map:\n");
print_memory_map();

Expand Down Expand Up @@ -523,6 +557,7 @@ static void __init resource_init(void)
res = alloc_bootmem(sizeof(struct resource));
switch (boot_mem_map.map[i].type) {
case BOOT_MEM_RAM:
case BOOT_MEM_INIT_RAM:
case BOOT_MEM_ROM_DATA:
res->name = "System RAM";
break;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ static void ipi_irq_dispatch(void)

static struct irqaction irq_ipi = {
.handler = ipi_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU,
.flags = IRQF_PERCPU,
.name = "SMTC_IPI"
};

Expand Down
1 change: 0 additions & 1 deletion arch/mips/lantiq/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ asmlinkage void plat_irq_dispatch(void)

static struct irqaction cascade = {
.handler = no_action,
.flags = IRQF_DISABLED,
.name = "cascade",
};

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)

static struct irqaction irq5 = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
.flags = IRQF_NOBALANCING | IRQF_TIMER,
.name = "timer"
};

Expand Down
4 changes: 2 additions & 2 deletions arch/mips/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#

obj-y += cache.o dma-default.o extable.o fault.o \
init.o mmap.o tlbex.o tlbex-fault.o uasm.o \
page.o
gup.o init.o mmap.o page.o tlbex.o \
tlbex-fault.o uasm.o

obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o
obj-$(CONFIG_64BIT) += pgtable-64.o
Expand Down
Loading

0 comments on commit 39b7414

Please sign in to comment.