Commit 3a81a6e7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "What's in there: a number of MIPS fixes and touchups.  The most
  important change in this pull request is Kautuk Consul's port of
  changes to do_page_fault which fix a hang that affects some
  configurations.  Still not quite ready for a release, there are
  problems with 64-bit platforms."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: traps.c: Fix typo
  MIPS: PowerTV: Fix defconfigs for coverage builds
  MIPS: Netlogic: Fix defconfigs for coverage builds
  MIPS: ATH79: Avoid a kernel bug on AR913X
  MIPS: PCI: use list_for_each_entry() for bus->devices traversal
  MIPS: fault.c: Port OOM changes to do_page_fault
  MIPS: vmlinux.lds.S: remove duplicate _sdata symbol
  MIPS: Alchemy: Increase minimum timeout for 32kHz timer.
  MIPS: txx9 7segled fix struct device has no member
  MIPS: Alchemy: Update Au1300 inlined GPIO macros
  MIPS: Remove temporary kludge from <asm/page.h>
  MIPS: BMIPS: smp-bmips.c does not need to include version.h
parents cd2934a3 f232c7e8
...@@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int) ...@@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int)
cd->shift = 32; cd->shift = 32;
cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift);
cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd);
cd->min_delta_ns = clockevent_delta2ns(8, cd); /* ~0.25ms */ cd->min_delta_ns = clockevent_delta2ns(9, cd); /* ~0.28ms */
clockevents_register_device(cd); clockevents_register_device(cd);
setup_irq(m2int, &au1x_rtcmatch2_irqaction); setup_irq(m2int, &au1x_rtcmatch2_irqaction);
......
...@@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data) ...@@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data)
{ {
if (soc_is_ar913x()) if (soc_is_ar913x())
ar913x_wmac_setup(); ar913x_wmac_setup();
if (soc_is_ar933x()) else if (soc_is_ar933x())
ar933x_wmac_setup(); ar933x_wmac_setup();
else else
BUG(); BUG();
......
...@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y ...@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
# CONFIG_SECCOMP is not set # CONFIG_SECCOMP is not set
CONFIG_USE_OF=y CONFIG_USE_OF=y
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_CROSS_COMPILE="mips-linux-gnu-" CONFIG_CROSS_COMPILE=""
# CONFIG_LOCALVERSION_AUTO is not set # CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE=y
...@@ -22,7 +22,7 @@ CONFIG_AUDIT=y ...@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
CONFIG_CGROUPS=y CONFIG_CGROUPS=y
CONFIG_NAMESPACES=y CONFIG_NAMESPACES=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp" CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y CONFIG_RD_LZMA=y
CONFIG_INITRAMFS_COMPRESSION_LZMA=y CONFIG_INITRAMFS_COMPRESSION_LZMA=y
......
...@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y ...@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT_VOLUNTARY=y CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_CROSS_COMPILE="mips-linux-gnu-" CONFIG_CROSS_COMPILE=""
# CONFIG_LOCALVERSION_AUTO is not set # CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE=y
...@@ -22,7 +22,7 @@ CONFIG_AUDIT=y ...@@ -22,7 +22,7 @@ CONFIG_AUDIT=y
CONFIG_NAMESPACES=y CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y CONFIG_SCHED_AUTOGROUP=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr" CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_BZIP2=y CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y CONFIG_RD_LZMA=y
CONFIG_INITRAMFS_COMPRESSION_GZIP=y CONFIG_INITRAMFS_COMPRESSION_GZIP=y
......
...@@ -6,7 +6,7 @@ CONFIG_HZ_1000=y ...@@ -6,7 +6,7 @@ CONFIG_HZ_1000=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
# CONFIG_SECCOMP is not set # CONFIG_SECCOMP is not set
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_CROSS_COMPILE="mips-linux-" CONFIG_CROSS_COMPILE=""
# CONFIG_SWAP is not set # CONFIG_SWAP is not set
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=16 CONFIG_LOG_BUF_SHIFT=16
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
struct gpio;
struct gpio_chip;
/* with the current GPIC design, up to 128 GPIOs are possible. /* with the current GPIC design, up to 128 GPIOs are possible.
* The only implementation so far is in the Au1300, which has 75 externally * The only implementation so far is in the Au1300, which has 75 externally
* available GPIOs. * available GPIOs.
...@@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label) ...@@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label)
return 0; return 0;
} }
static inline void gpio_free(unsigned int gpio) static inline int gpio_request_one(unsigned gpio,
unsigned long flags, const char *label)
{
return 0;
}
static inline int gpio_request_array(struct gpio *array, size_t num)
{
return 0;
}
static inline void gpio_free(unsigned gpio)
{
}
static inline void gpio_free_array(struct gpio *array, size_t num)
{ {
} }
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#define HPAGE_MASK (~(HPAGE_SIZE - 1)) #define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#else /* !CONFIG_HUGETLB_PAGE */ #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_SHIFT ({BUILD_BUG(); 0; })
#define HPAGE_SIZE ({BUILD_BUG(); 0; }) #define HPAGE_SIZE ({BUILD_BUG(); 0; })
#define HPAGE_MASK ({BUILD_BUG(); 0; }) #define HPAGE_MASK ({BUILD_BUG(); 0; })
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
* SMP support for BMIPS * SMP support for BMIPS
*/ */
#include <linux/version.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
......
...@@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs) ...@@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs)
printk(KERN_DEBUG "YIELD Scheduler Exception\n"); printk(KERN_DEBUG "YIELD Scheduler Exception\n");
break; break;
case 5: case 5:
printk(KERN_DEBUG "Gating Storage Schedulier Exception\n"); printk(KERN_DEBUG "Gating Storage Scheduler Exception\n");
break; break;
default: default:
printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n",
......
...@@ -69,7 +69,6 @@ SECTIONS ...@@ -69,7 +69,6 @@ SECTIONS
RODATA RODATA
/* writeable */ /* writeable */
_sdata = .; /* Start of data section */
.data : { /* Data */ .data : { /* Data */
. = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
......
...@@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ ...@@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
const int field = sizeof(unsigned long) * 2; const int field = sizeof(unsigned long) * 2;
siginfo_t info; siginfo_t info;
int fault; int fault;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
(write ? FAULT_FLAG_WRITE : 0);
#if 0 #if 0
printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
...@@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ ...@@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
if (in_atomic() || !mm) if (in_atomic() || !mm)
goto bad_area_nosemaphore; goto bad_area_nosemaphore;
retry:
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
vma = find_vma(mm, address); vma = find_vma(mm, address);
if (!vma) if (!vma)
...@@ -144,7 +147,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ ...@@ -144,7 +147,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
* make sure we exit gracefully rather than endlessly redo * make sure we exit gracefully rather than endlessly redo
* the fault. * the fault.
*/ */
fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); fault = handle_mm_fault(mm, vma, address, flags);
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
return;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
if (unlikely(fault & VM_FAULT_ERROR)) { if (unlikely(fault & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM) if (fault & VM_FAULT_OOM)
...@@ -153,12 +160,27 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ ...@@ -153,12 +160,27 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ
goto do_sigbus; goto do_sigbus;
BUG(); BUG();
} }
if (fault & VM_FAULT_MAJOR) { if (flags & FAULT_FLAG_ALLOW_RETRY) {
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); if (fault & VM_FAULT_MAJOR) {
tsk->maj_flt++; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
} else { regs, address);
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); tsk->maj_flt++;
tsk->min_flt++; } else {
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1,
regs, address);
tsk->min_flt++;
}
if (fault & VM_FAULT_RETRY) {
flags &= ~FAULT_FLAG_ALLOW_RETRY;
/*
* No need to up_read(&mm->mmap_sem) as we would
* have already released it in __lock_page_or_retry
* in mm/filemap.c.
*/
goto retry;
}
} }
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
......
...@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) ...@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
{ {
/* Propagate hose info into the subordinate devices. */ /* Propagate hose info into the subordinate devices. */
struct list_head *ln;
struct pci_dev *dev = bus->self; struct pci_dev *dev = bus->self;
if (pci_probe_only && dev && if (pci_probe_only && dev &&
...@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) ...@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
pcibios_fixup_device_resources(dev, bus); pcibios_fixup_device_resources(dev, bus);
} }
for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { list_for_each_entry(dev, &bus->devices, bus_list) {
dev = pci_dev_b(ln);
if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
pcibios_fixup_device_resources(dev, bus); pcibios_fixup_device_resources(dev, bus);
} }
......
...@@ -35,16 +35,6 @@ ...@@ -35,16 +35,6 @@
*/ */
void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus)
{ {
struct pci_bus *current_bus = bus;
struct pci_dev *devices;
struct list_head *devices_link;
list_for_each(devices_link, &(current_bus->devices)) {
devices = pci_dev_b(devices_link);
if (devices == NULL)
continue;
}
/* /*
* PLX and SPKT related changes go here * PLX and SPKT related changes go here
*/ */
......
...@@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void) ...@@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void)
break; break;
} }
dev->id = i; dev->id = i;
dev->dev = &tx_7segled_subsys; dev->bus = &tx_7segled_subsys;
error = device_register(dev); error = device_register(dev);
if (!error) { if (!error) {
device_create_file(dev, &dev_attr_ascii); device_create_file(dev, &dev_attr_ascii);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment