Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180215
b: refs/heads/master
c: c1c0cbb
h: refs/heads/master
i:
  180213: ec2bd07
  180211: 9e00c77
  180207: 30d804b
v: v3
  • Loading branch information
Linus Torvalds committed Feb 3, 2010
1 parent 2ffc157 commit 2ed11fe
Show file tree
Hide file tree
Showing 148 changed files with 4,641 additions and 1,998 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: 3256a05531b1164a9c138da701b922a113bddf82
refs/heads/master: c1c0cbb8781e4b684a3d902d05b01912b3a545d9
4 changes: 2 additions & 2 deletions trunk/Documentation/fault-injection/fault-injection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ o provide a way to configure fault attributes
failslab, fail_page_alloc, and fail_make_request use this way.
Helper functions:

init_fault_attr_entries(entries, attr, name);
void cleanup_fault_attr_entries(entries);
init_fault_attr_dentries(entries, attr, name);
void cleanup_fault_attr_dentries(entries);

- module parameters

Expand Down
26 changes: 23 additions & 3 deletions trunk/Documentation/trace/ftrace-design.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function tracer guts
====================
By Mike Frysinger

Introduction
------------
Expand Down Expand Up @@ -173,14 +174,16 @@ void ftrace_graph_caller(void)

unsigned long *frompc = &...;
unsigned long selfpc = <return address> - MCOUNT_INSN_SIZE;
prepare_ftrace_return(frompc, selfpc);
/* passing frame pointer up is optional -- see below */
prepare_ftrace_return(frompc, selfpc, frame_pointer);

/* restore all state needed by the ABI */
}
#endif

For information on how to implement prepare_ftrace_return(), simply look at
the x86 version. The only architecture-specific piece in it is the setup of
For information on how to implement prepare_ftrace_return(), simply look at the
x86 version (the frame pointer passing is optional; see the next section for
more information). The only architecture-specific piece in it is the setup of
the fault recovery table (the asm(...) code). The rest should be the same
across architectures.

Expand All @@ -205,6 +208,23 @@ void return_to_handler(void)
#endif


HAVE_FUNCTION_GRAPH_FP_TEST
---------------------------

An arch may pass in a unique value (frame pointer) to both the entering and
exiting of a function. On exit, the value is compared and if it does not
match, then it will panic the kernel. This is largely a sanity check for bad
code generation with gcc. If gcc for your port sanely updates the frame
pointer under different opitmization levels, then ignore this option.

However, adding support for it isn't terribly difficult. In your assembly code
that calls prepare_ftrace_return(), pass the frame pointer as the 3rd argument.
Then in the C version of that function, do what the x86 port does and pass it
along to ftrace_push_return_trace() instead of a stub value of 0.

Similarly, when you call ftrace_return_to_handler(), pass it the frame pointer.


HAVE_FTRACE_NMI_ENTER
---------------------

Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/trace/ftrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ If I am only interested in sys_nanosleep and hrtimer_interrupt:

# echo sys_nanosleep hrtimer_interrupt \
> set_ftrace_filter
# echo ftrace > current_tracer
# echo function > current_tracer
# echo 1 > tracing_enabled
# usleep 1
# echo 0 > tracing_enabled
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/mips/alchemy/common/dbdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,11 @@ u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries)
if (desc_base == 0)
return 0;

ctp->cdb_membase = desc_base;
desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));
}
} else
ctp->cdb_membase = desc_base;

dp = (au1x_ddma_desc_t *)desc_base;

/* Keep track of the base descriptor. */
Expand Down Expand Up @@ -831,7 +834,7 @@ void au1xxx_dbdma_chan_free(u32 chanid)

au1xxx_dbdma_stop(chanid);

kfree((void *)ctp->chan_desc_base);
kfree((void *)ctp->cdb_membase);

stp->dev_flags &= ~DEV_FLAGS_INUSE;
dtp->dev_flags &= ~DEV_FLAGS_INUSE;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static struct resource usb_res[] = {
.name = "mem",
.flags = IORESOURCE_MEM,
.start = 0x03400000,
.end = 0x034001fff,
.end = 0x03401fff,
},
};

Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
# ifndef cpu_has_64bit_addresses
# define cpu_has_64bit_addresses 0
# endif
# ifndef cpu_vmbits
# define cpu_vmbits 31
# endif
#endif

#ifdef CONFIG_64BIT
Expand All @@ -209,6 +212,10 @@
# ifndef cpu_has_64bit_addresses
# define cpu_has_64bit_addresses 1
# endif
# ifndef cpu_vmbits
# define cpu_vmbits cpu_data[0].vmbits
# define __NEED_VMBITS_PROBE
# endif
#endif

#if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint)
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/mips/include/asm/cpu-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ struct cpuinfo_mips {
struct cache_desc tcache; /* Tertiary/split secondary cache */
int srsets; /* Shadow register sets */
int core; /* physical core number */
#ifdef CONFIG_64BIT
int vmbits; /* Virtual memory size in bits */
#endif
#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
/*
* In the MIPS MT "SMTC" model, each TC is considered
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ typedef struct dbdma_chan_config {
dbdev_tab_t *chan_dest;
au1x_dma_chan_t *chan_ptr;
au1x_ddma_desc_t *chan_desc_base;
u32 cdb_membase; /* kmalloc base of above */
au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr;
void *chan_callparam;
void (*chan_callback)(int, void *);
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/mips/include/asm/pgtable-64.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
#define VMALLOC_START MAP_BASE
#define VMALLOC_END \
(VMALLOC_START + \
PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE - (1UL << 32))
min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \
(1UL << cpu_vmbits)) - (1UL << 32))

#if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \
VMALLOC_START != CKSSEG
/* Load modules into 32bit-compatible segment. */
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ static inline int __cpu_has_fpu(void)
return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE);
}

static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
{
#ifdef __NEED_VMBITS_PROBE
write_c0_entryhi(0x3ffffffffffff000ULL);
back_to_back_c0_hazard();
c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL);
#endif
}

#define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \
| MIPS_CPU_COUNTER)

Expand Down Expand Up @@ -969,6 +978,8 @@ __cpuinit void cpu_probe(void)
c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
else
c->srsets = 1;

cpu_probe_vmbits(c);
}

__cpuinit void cpu_report(void)
Expand Down
Loading

0 comments on commit 2ed11fe

Please sign in to comment.