Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298956
b: refs/heads/master
c: d164013
h: refs/heads/master
v: v3
  • Loading branch information
Srivatsa S. Bhat authored and Chris Metcalf committed Apr 9, 2012
1 parent da8d2d8 commit 029d150
Show file tree
Hide file tree
Showing 71 changed files with 617 additions and 643 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: a1ada086062101533eb0f841d3884137688091ec
refs/heads/master: d1640130cda146ed925f12434bfe579ee7d80a1c
4 changes: 2 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4803,7 +4803,6 @@ F: arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
F: arch/arm/mach-omap2/clockdomain44xx.c

OMAP AUDIO SUPPORT
M: Peter Ujfalusi <peter.ujfalusi@ti.com>
M: Jarkko Nikula <jarkko.nikula@bitmer.com>
L: alsa-devel@alsa-project.org (subscribers-only)
L: linux-omap@vger.kernel.org
Expand Down Expand Up @@ -7462,7 +7461,8 @@ F: include/linux/wm97xx.h

WOLFSON MICROELECTRONICS DRIVERS
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
L: patches@opensource.wolfsonmicro.com
M: Ian Lartey <ian@opensource.wolfsonmicro.com>
M: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
Expand Down
13 changes: 13 additions & 0 deletions trunk/arch/sparc/kernel/leon_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info)

void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
{
struct leon_pci_info *info = pbus->sysdata;
struct pci_dev *dev;
int i, has_io, has_mem;
u16 cmd;
Expand Down Expand Up @@ -110,6 +111,18 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
return pci_enable_resources(dev, mask);
}

struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
{
/*
* Currently the OpenBoot nodes are not connected with the PCI device,
* this is because the LEON PROM does not create PCI nodes. Eventually
* this will change and the same approach as pcic.c can be used to
* match PROM nodes with pci devices.
*/
return NULL;
}
EXPORT_SYMBOL(pci_device_to_OF_node);

void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{
#ifdef CONFIG_PCI_DEBUG
Expand Down
37 changes: 7 additions & 30 deletions trunk/arch/sparc/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
unsigned long g2;
int from_user = !(regs->psr & PSR_PS);
int fault, code;
unsigned int flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
(write ? FAULT_FLAG_WRITE : 0));

if(text_fault)
address = regs->pc;
Expand All @@ -253,7 +251,6 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,

perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);

retry:
down_read(&mm->mmap_sem);

/*
Expand Down Expand Up @@ -292,41 +289,21 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
* make sure we exit gracefully rather than endlessly redo
* the fault.
*/
fault = handle_mm_fault(mm, vma, address, flags);

if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
return;

fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
if (unlikely(fault & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM)
goto out_of_memory;
else if (fault & VM_FAULT_SIGBUS)
goto do_sigbus;
BUG();
}

if (flags & FAULT_FLAG_ALLOW_RETRY) {
if (fault & VM_FAULT_MAJOR) {
current->maj_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
1, regs, address);
} else {
current->min_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
1, regs, address);
}
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;
}
if (fault & VM_FAULT_MAJOR) {
current->maj_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
} else {
current->min_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
}

up_read(&mm->mmap_sem);
return;

Expand Down
37 changes: 7 additions & 30 deletions trunk/arch/sparc/mm/fault_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
unsigned int insn = 0;
int si_code, fault_code, fault;
unsigned long address, mm_rss;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;

fault_code = get_thread_fault_code();

Expand Down Expand Up @@ -334,8 +333,6 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
insn = get_fault_insn(regs, insn);
goto handle_kernel_fault;
}

retry:
down_read(&mm->mmap_sem);
}

Expand Down Expand Up @@ -426,40 +423,20 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
goto bad_area;
}

flags |= ((fault_code & FAULT_CODE_WRITE) ? FAULT_FLAG_WRITE : 0);
fault = handle_mm_fault(mm, vma, address, flags);

if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
return;

fault = handle_mm_fault(mm, vma, address, (fault_code & FAULT_CODE_WRITE) ? FAULT_FLAG_WRITE : 0);
if (unlikely(fault & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM)
goto out_of_memory;
else if (fault & VM_FAULT_SIGBUS)
goto do_sigbus;
BUG();
}

if (flags & FAULT_FLAG_ALLOW_RETRY) {
if (fault & VM_FAULT_MAJOR) {
current->maj_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
1, regs, address);
} else {
current->min_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
1, regs, address);
}
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;
}
if (fault & VM_FAULT_MAJOR) {
current->maj_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
} else {
current->min_flt++;
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
}
up_read(&mm->mmap_sem);

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/tile/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ void __cpuinit online_secondary(void)
/* This must be done before setting cpu_online_mask */
wmb();

notify_cpu_starting(smp_processor_id());

/*
* We need to hold call_lock, so there is no inconsistency
* between the time smp_call_function() determines number of
Expand Down
35 changes: 35 additions & 0 deletions trunk/arch/um/drivers/cow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@

#include <asm/types.h>

#if defined(__KERNEL__)

# include <asm/byteorder.h>

# if defined(__BIG_ENDIAN)
# define ntohll(x) (x)
# define htonll(x) (x)
# elif defined(__LITTLE_ENDIAN)
# define ntohll(x) be64_to_cpu(x)
# define htonll(x) cpu_to_be64(x)
# else
# error "Could not determine byte order"
# endif

#else
/* For the definition of ntohl, htonl and __BYTE_ORDER */
#include <endian.h>
#include <netinet/in.h>
#if defined(__BYTE_ORDER)

# if __BYTE_ORDER == __BIG_ENDIAN
# define ntohll(x) (x)
# define htonll(x) (x)
# elif __BYTE_ORDER == __LITTLE_ENDIAN
# define ntohll(x) bswap_64(x)
# define htonll(x) bswap_64(x)
# else
# error "Could not determine byte order: __BYTE_ORDER uncorrectly defined"
# endif

#else /* ! defined(__BYTE_ORDER) */
# error "Could not determine byte order: __BYTE_ORDER not defined"
#endif
#endif /* ! defined(__KERNEL__) */

extern int init_cow_file(int fd, char *cow_file, char *backing_file,
int sectorsize, int alignment, int *bitmap_offset_out,
unsigned long *bitmap_len_out, int *data_offset_out);
Expand Down
43 changes: 22 additions & 21 deletions trunk/arch/um/drivers/cow_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
* that.
*/
#include <unistd.h>
#include <byteswap.h>
#include <errno.h>
#include <string.h>
#include <arpa/inet.h>
#include <endian.h>
#include <asm/types.h>
#include "cow.h"
#include "cow_sys.h"

Expand Down Expand Up @@ -213,8 +214,8 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
"header\n");
goto out;
}
header->magic = htobe32(COW_MAGIC);
header->version = htobe32(COW_VERSION);
header->magic = htonl(COW_MAGIC);
header->version = htonl(COW_VERSION);

err = -EINVAL;
if (strlen(backing_file) > sizeof(header->backing_file) - 1) {
Expand Down Expand Up @@ -245,10 +246,10 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
goto out_free;
}

header->mtime = htobe32(modtime);
header->size = htobe64(*size);
header->sectorsize = htobe32(sectorsize);
header->alignment = htobe32(alignment);
header->mtime = htonl(modtime);
header->size = htonll(*size);
header->sectorsize = htonl(sectorsize);
header->alignment = htonl(alignment);
header->cow_format = COW_BITMAP;

err = cow_write_file(fd, header, sizeof(*header));
Expand Down Expand Up @@ -300,8 +301,8 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
magic = header->v1.magic;
if (magic == COW_MAGIC)
version = header->v1.version;
else if (magic == be32toh(COW_MAGIC))
version = be32toh(header->v1.version);
else if (magic == ntohl(COW_MAGIC))
version = ntohl(header->v1.version);
/* No error printed because the non-COW case comes through here */
else goto out;

Expand All @@ -326,9 +327,9 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
"header\n");
goto out;
}
*mtime_out = be32toh(header->v2.mtime);
*size_out = be64toh(header->v2.size);
*sectorsize_out = be32toh(header->v2.sectorsize);
*mtime_out = ntohl(header->v2.mtime);
*size_out = ntohll(header->v2.size);
*sectorsize_out = ntohl(header->v2.sectorsize);
*bitmap_offset_out = sizeof(header->v2);
*align_out = *sectorsize_out;
file = header->v2.backing_file;
Expand All @@ -340,10 +341,10 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
"header\n");
goto out;
}
*mtime_out = be32toh(header->v3.mtime);
*size_out = be64toh(header->v3.size);
*sectorsize_out = be32toh(header->v3.sectorsize);
*align_out = be32toh(header->v3.alignment);
*mtime_out = ntohl(header->v3.mtime);
*size_out = ntohll(header->v3.size);
*sectorsize_out = ntohl(header->v3.sectorsize);
*align_out = ntohl(header->v3.alignment);
if (*align_out == 0) {
cow_printf("read_cow_header - invalid COW header, "
"align == 0\n");
Expand All @@ -365,16 +366,16 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
* this was used until Dec2005 - 64bits are needed to represent
* 2038+. I.e. we can safely do this truncating cast.
*
* Additionally, we must use be32toh() instead of be64toh(), since
* Additionally, we must use ntohl() instead of ntohll(), since
* the program used to use the former (tested - I got mtime
* mismatch "0 vs whatever").
*
* Ever heard about bug-to-bug-compatibility ? ;-) */
*mtime_out = (time32_t) be32toh(header->v3_b.mtime);
*mtime_out = (time32_t) ntohl(header->v3_b.mtime);

*size_out = be64toh(header->v3_b.size);
*sectorsize_out = be32toh(header->v3_b.sectorsize);
*align_out = be32toh(header->v3_b.alignment);
*size_out = ntohll(header->v3_b.size);
*sectorsize_out = ntohl(header->v3_b.sectorsize);
*align_out = ntohl(header->v3_b.alignment);
if (*align_out == 0) {
cow_printf("read_cow_header - invalid COW header, "
"align == 0\n");
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/drivers/mconsole_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <asm/uaccess.h>
#include <asm/switch_to.h>

#include "init.h"
#include "irq_kern.h"
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/um/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
generic-y += switch_to.h
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h
7 changes: 3 additions & 4 deletions trunk/arch/um/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# Licensed under the GPL
#

CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
-DELF_ARCH=$(LDS_ELF_ARCH) \
-DELF_FORMAT=$(LDS_ELF_FORMAT) \
$(LDS_EXTRA)
CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
-DELF_ARCH=$(LDS_ELF_ARCH) \
-DELF_FORMAT=$(LDS_ELF_FORMAT)
extra-y := vmlinux.lds
clean-files :=

Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ static inline void set_current(struct task_struct *task)

extern void arch_switch_to(struct task_struct *to);

void *__switch_to(struct task_struct *from, struct task_struct *to)
void *_switch_to(void *prev, void *next, void *last)
{
struct task_struct *from = prev;
struct task_struct *to = next;

to->thread.prev_sched = from;
set_current(to);

Expand All @@ -108,6 +111,7 @@ void *__switch_to(struct task_struct *from, struct task_struct *to)
} while (current->thread.saved_task);

return current->thread.prev_sched;

}

void interrupt_end(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/um/kernel/skas/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)

void uml_setup_stubs(struct mm_struct *mm)
{
struct page **pages;
int err, ret;

if (!skas_needs_stub)
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/Makefile.um
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ LINK-y += $(call cc-option,-m32)

export LDFLAGS

LDS_EXTRA := -Ui386
export LDS_EXTRA

# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
include $(srctree)/arch/x86/Makefile_32.cpu

Expand Down
Loading

0 comments on commit 029d150

Please sign in to comment.