You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] BCM47XX: Use new SSB SPROM data structure [MIPS] WGT634U: Register MTD as platform device. [MIPS] BCM47xx: Add defconfig file. [MIPS] RM: fix EISA=n compilation [MIPS] PCI: Coding style fixes for pcibios_enable_resources. [MIPS] PCI: Port i386 PCI fixes. [MIPS] Qemu: finish platform removal [MIPS] Wire up the timerfd_*() o32 system calls [MIPS] IP28: Add defconfig file [MIPS] SB1: Fix CONFIG_SIBYTE_DMA_PAGEOPS build failure. [MIPS] BCM1480: Remove stray function call resulting in infinite recursion [MIPS] Fix buggy invocations of kmap_coherent() [MIPS] Fix broken rm7000/rm9000 interrupt handling [MIPS] Handle I-cache coherency in flush_cache_range() [MIPS] IP27: Add missing ~ in DMA code. [MIPS] Use find_task_by_vpid in system calls
This commit is contained in:
@@ -92,17 +92,17 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
|
||||
iv->sprom.revision = 3;
|
||||
|
||||
if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
|
||||
str2eaddr(buf, iv->sprom.r1.et0mac);
|
||||
str2eaddr(buf, iv->sprom.et0mac);
|
||||
if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
|
||||
str2eaddr(buf, iv->sprom.r1.et1mac);
|
||||
str2eaddr(buf, iv->sprom.et1mac);
|
||||
if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.r1.et0phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.r1.et1phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
|
||||
if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.r1.et0mdcport = simple_strtoul(buf, NULL, 10);
|
||||
iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
||||
if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
||||
iv->sprom.r1.et1mdcport = simple_strtoul(buf, NULL, 10);
|
||||
iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
|
||||
@@ -43,6 +44,61 @@ static struct platform_device wgt634u_gpio_leds = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* 8MiB flash. The struct mtd_partition matches original Netgear WGT634U
|
||||
firmware. */
|
||||
static struct mtd_partition wgt634u_partitions[] = {
|
||||
{
|
||||
.name = "cfe",
|
||||
.offset = 0,
|
||||
.size = 0x60000, /* 384k */
|
||||
.mask_flags = MTD_WRITEABLE /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "config",
|
||||
.offset = 0x60000,
|
||||
.size = 0x20000 /* 128k */
|
||||
},
|
||||
{
|
||||
.name = "linux",
|
||||
.offset = 0x80000,
|
||||
.size = 0x140000 /* 1280k */
|
||||
},
|
||||
{
|
||||
.name = "jffs",
|
||||
.offset = 0x1c0000,
|
||||
.size = 0x620000 /* 6272k */
|
||||
},
|
||||
{
|
||||
.name = "nvram",
|
||||
.offset = 0x7e0000,
|
||||
.size = 0x20000 /* 128k */
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data wgt634u_flash_data = {
|
||||
.parts = wgt634u_partitions,
|
||||
.nr_parts = ARRAY_SIZE(wgt634u_partitions)
|
||||
};
|
||||
|
||||
static struct resource wgt634u_flash_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device wgt634u_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = 0,
|
||||
.dev = { .platform_data = &wgt634u_flash_data, },
|
||||
.resource = &wgt634u_flash_resource,
|
||||
.num_resources = 1,
|
||||
};
|
||||
|
||||
/* Platform devices */
|
||||
static struct platform_device *wgt634u_devices[] __initdata = {
|
||||
&wgt634u_flash,
|
||||
&wgt634u_gpio_leds,
|
||||
};
|
||||
|
||||
static int __init wgt634u_init(void)
|
||||
{
|
||||
/* There is no easy way to detect that we are running on a WGT634U
|
||||
@@ -50,13 +106,20 @@ static int __init wgt634u_init(void)
|
||||
* been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx.
|
||||
*/
|
||||
|
||||
u8 *et0mac = ssb_bcm47xx.sprom.r1.et0mac;
|
||||
u8 *et0mac = ssb_bcm47xx.sprom.et0mac;
|
||||
|
||||
if (et0mac[0] == 0x00 &&
|
||||
((et0mac[1] == 0x09 && et0mac[2] == 0x5b) ||
|
||||
(et0mac[1] == 0x0f && et0mac[2] == 0xb5)))
|
||||
return platform_device_register(&wgt634u_gpio_leds);
|
||||
else
|
||||
(et0mac[1] == 0x0f && et0mac[2] == 0xb5))) {
|
||||
struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
|
||||
wgt634u_flash_data.width = mcore->flash_buswidth;
|
||||
wgt634u_flash_resource.start = mcore->flash_window;
|
||||
wgt634u_flash_resource.end = mcore->flash_window
|
||||
+ mcore->flash_window_size
|
||||
- 1;
|
||||
return platform_add_devices(wgt634u_devices,
|
||||
ARRAY_SIZE(wgt634u_devices));
|
||||
} else
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -33,6 +33,7 @@ static struct irq_chip rm7k_irq_controller = {
|
||||
.mask = mask_rm7k_irq,
|
||||
.mask_ack = mask_rm7k_irq,
|
||||
.unmask = unmask_rm7k_irq,
|
||||
.eoi = unmask_rm7k_irq
|
||||
};
|
||||
|
||||
void __init rm7k_cpu_irq_init(void)
|
||||
|
||||
@@ -75,6 +75,7 @@ static struct irq_chip rm9k_irq_controller = {
|
||||
.mask = mask_rm9k_irq,
|
||||
.mask_ack = mask_rm9k_irq,
|
||||
.unmask = unmask_rm9k_irq,
|
||||
.eoi = unmask_rm9k_irq
|
||||
};
|
||||
|
||||
static struct irq_chip rm9k_perfcounter_irq = {
|
||||
|
||||
@@ -36,7 +36,7 @@ unsigned long mt_fpemul_threshold = 0;
|
||||
*/
|
||||
static inline struct task_struct *find_process_by_pid(pid_t pid)
|
||||
{
|
||||
return pid ? find_task_by_pid(pid) : current;
|
||||
return pid ? find_task_by_vpid(pid) : current;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -663,6 +663,9 @@ einval: li v0, -EINVAL
|
||||
sys sys_ni_syscall 0
|
||||
sys sys_eventfd 1
|
||||
sys sys_fallocate 6 /* 4320 */
|
||||
sys sys_timerfd_create 2
|
||||
sys sys_timerfd_gettime 2
|
||||
sys sys_timerfd_settime 4
|
||||
.endm
|
||||
|
||||
/* We pre-compute the number of _instruction_ bytes needed to
|
||||
|
||||
@@ -478,4 +478,7 @@ sys_call_table:
|
||||
PTR sys_ni_syscall
|
||||
PTR sys_eventfd
|
||||
PTR sys_fallocate
|
||||
PTR sys_timerfd_create /* 5280 */
|
||||
PTR sys_timerfd_gettime
|
||||
PTR sys_timerfd_settime
|
||||
.size sys_call_table,.-sys_call_table
|
||||
|
||||
@@ -404,4 +404,7 @@ EXPORT(sysn32_call_table)
|
||||
PTR sys_ni_syscall
|
||||
PTR sys_eventfd
|
||||
PTR sys_fallocate
|
||||
PTR sys_timerfd_create
|
||||
PTR sys_timerfd_gettime /* 5285 */
|
||||
PTR sys_timerfd_settime
|
||||
.size sysn32_call_table,.-sysn32_call_table
|
||||
|
||||
@@ -526,4 +526,7 @@ sys_call_table:
|
||||
PTR sys_ni_syscall
|
||||
PTR sys_eventfd
|
||||
PTR sys32_fallocate /* 4320 */
|
||||
PTR sys_timerfd_create
|
||||
PTR sys_timerfd_gettime
|
||||
PTR sys_timerfd_settime
|
||||
.size sys_call_table,.-sys_call_table
|
||||
|
||||
@@ -111,7 +111,7 @@ asmlinkage int irix_prctl(unsigned option, ...)
|
||||
printk("irix_prctl[%s:%d]: Wants PR_ISBLOCKED\n",
|
||||
current->comm, current->pid);
|
||||
read_lock(&tasklist_lock);
|
||||
task = find_task_by_pid(va_arg(args, pid_t));
|
||||
task = find_task_by_vpid(va_arg(args, pid_t));
|
||||
error = -ESRCH;
|
||||
if (error)
|
||||
error = (task->run_list.next != NULL);
|
||||
|
||||
@@ -364,20 +364,23 @@ static inline int has_valid_asid(const struct mm_struct *mm)
|
||||
static inline void local_r4k_flush_cache_range(void * args)
|
||||
{
|
||||
struct vm_area_struct *vma = args;
|
||||
int exec = vma->vm_flags & VM_EXEC;
|
||||
|
||||
if (!(has_valid_asid(vma->vm_mm)))
|
||||
return;
|
||||
|
||||
r4k_blast_dcache();
|
||||
if (exec)
|
||||
r4k_blast_icache();
|
||||
}
|
||||
|
||||
static void r4k_flush_cache_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
if (!cpu_has_dc_aliases)
|
||||
return;
|
||||
int exec = vma->vm_flags & VM_EXEC;
|
||||
|
||||
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
|
||||
if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc))
|
||||
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
|
||||
}
|
||||
|
||||
static inline void local_r4k_flush_cache_mm(void * args)
|
||||
|
||||
+10
-5
@@ -92,12 +92,17 @@ EXPORT_SYMBOL(__flush_dcache_page);
|
||||
|
||||
void __flush_anon_page(struct page *page, unsigned long vmaddr)
|
||||
{
|
||||
if (pages_do_alias((unsigned long)page_address(page), vmaddr)) {
|
||||
void *kaddr;
|
||||
unsigned long addr = (unsigned long) page_address(page);
|
||||
|
||||
kaddr = kmap_coherent(page, vmaddr);
|
||||
flush_data_cache_page((unsigned long)kaddr);
|
||||
kunmap_coherent();
|
||||
if (pages_do_alias(addr, vmaddr)) {
|
||||
if (page_mapped(page) && !Page_dcache_dirty(page)) {
|
||||
void *kaddr;
|
||||
|
||||
kaddr = kmap_coherent(page, vmaddr);
|
||||
flush_data_cache_page((unsigned long)kaddr);
|
||||
kunmap_coherent();
|
||||
} else
|
||||
flush_data_cache_page(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -211,7 +211,8 @@ void copy_user_highpage(struct page *to, struct page *from,
|
||||
void *vfrom, *vto;
|
||||
|
||||
vto = kmap_atomic(to, KM_USER1);
|
||||
if (cpu_has_dc_aliases && page_mapped(from)) {
|
||||
if (cpu_has_dc_aliases &&
|
||||
page_mapped(from) && !Page_dcache_dirty(from)) {
|
||||
vfrom = kmap_coherent(from, vaddr);
|
||||
copy_page(vto, vfrom);
|
||||
kunmap_coherent();
|
||||
@@ -234,7 +235,8 @@ void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
if (cpu_has_dc_aliases && page_mapped(page)) {
|
||||
if (cpu_has_dc_aliases &&
|
||||
page_mapped(page) && !Page_dcache_dirty(page)) {
|
||||
void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(vto, src, len);
|
||||
kunmap_coherent();
|
||||
@@ -253,7 +255,8 @@ void copy_from_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
if (cpu_has_dc_aliases && page_mapped(page)) {
|
||||
if (cpu_has_dc_aliases &&
|
||||
page_mapped(page) && !Page_dcache_dirty(page)) {
|
||||
void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(dst, vfrom, len);
|
||||
kunmap_coherent();
|
||||
|
||||
@@ -216,7 +216,7 @@ void sb1_dma_init(void)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DM_NUM_CHANNELS; i++) {
|
||||
const u64 base_val = CPHYSADDR(&page_descr[i]) |
|
||||
const u64 base_val = CPHYSADDR((unsigned long)&page_descr[i]) |
|
||||
V_DM_DSCR_BASE_RINGSZ(1);
|
||||
void *base_reg = IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE));
|
||||
|
||||
@@ -228,11 +228,11 @@ void sb1_dma_init(void)
|
||||
|
||||
void clear_page(void *page)
|
||||
{
|
||||
u64 to_phys = CPHYSADDR(page);
|
||||
u64 to_phys = CPHYSADDR((unsigned long)page);
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
/* if the page is not in KSEG0, use old way */
|
||||
if ((long)KSEGX(page) != (long)CKSEG0)
|
||||
if ((long)KSEGX((unsigned long)page) != (long)CKSEG0)
|
||||
return clear_page_cpu(page);
|
||||
|
||||
page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_ZERO_MEM |
|
||||
@@ -252,13 +252,13 @@ void clear_page(void *page)
|
||||
|
||||
void copy_page(void *to, void *from)
|
||||
{
|
||||
u64 from_phys = CPHYSADDR(from);
|
||||
u64 to_phys = CPHYSADDR(to);
|
||||
u64 from_phys = CPHYSADDR((unsigned long)from);
|
||||
u64 to_phys = CPHYSADDR((unsigned long)to);
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
/* if any page is not in KSEG0, use old way */
|
||||
if ((long)KSEGX(to) != (long)CKSEG0
|
||||
|| (long)KSEGX(from) != (long)CKSEG0)
|
||||
if ((long)KSEGX((unsigned long)to) != (long)CKSEG0
|
||||
|| (long)KSEGX((unsigned long)from) != (long)CKSEG0)
|
||||
return copy_page_cpu(to, from);
|
||||
|
||||
page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_L2C_DEST |
|
||||
|
||||
+10
-4
@@ -177,8 +177,15 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask)
|
||||
continue;
|
||||
|
||||
r = &dev->resource[idx];
|
||||
if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
|
||||
continue;
|
||||
if ((idx == PCI_ROM_RESOURCE) &&
|
||||
(!(r->flags & IORESOURCE_ROM_ENABLE)))
|
||||
continue;
|
||||
if (!r->start && r->end) {
|
||||
printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
|
||||
printk(KERN_ERR "PCI: Device %s not available "
|
||||
"because of resource collisions\n",
|
||||
pci_name(dev));
|
||||
return -EINVAL;
|
||||
}
|
||||
if (r->flags & IORESOURCE_IO)
|
||||
@@ -186,10 +193,9 @@ static int pcibios_enable_resources(struct pci_dev *dev, int mask)
|
||||
if (r->flags & IORESOURCE_MEM)
|
||||
cmd |= PCI_COMMAND_MEMORY;
|
||||
}
|
||||
if (dev->resource[PCI_ROM_RESOURCE].start)
|
||||
cmd |= PCI_COMMAND_MEMORY;
|
||||
if (cmd != old_cmd) {
|
||||
printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
|
||||
printk("PCI: Enabling device %s (%04x -> %04x)\n",
|
||||
pci_name(dev), old_cmd, cmd);
|
||||
pci_write_config_word(dev, PCI_COMMAND, cmd);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -110,7 +110,6 @@ static void __cpuinit bcm1480_smp_finish(void)
|
||||
|
||||
sb1480_clockevent_init();
|
||||
local_irq_enable();
|
||||
bcm1480_smp_finish();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
|
||||
|
||||
static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)
|
||||
{
|
||||
return dma_addr & (0xffUL << 56);
|
||||
return dma_addr & ~(0xffUL << 56);
|
||||
}
|
||||
|
||||
static inline void plat_unmap_dma_mem(dma_addr_t dma_addr)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user