Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276709
b: refs/heads/master
c: b288809
h: refs/heads/master
i:
  276707: 8209837
v: v3
  • Loading branch information
Rob Herring authored and Grant Likely committed Dec 13, 2011
1 parent f88d05d commit 121ee9a
Show file tree
Hide file tree
Showing 88 changed files with 882 additions and 973 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: 3f5fcf60e912a79721cbbd63704a03bbfb92eac2
refs/heads/master: b2888095feb3c651cba5904b0227622e82777b34
7 changes: 7 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-bus-rbd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ create_snap

$ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_create

rollback_snap

Rolls back data to the specified snapshot. This goes over the entire
list of rados blocks and sends a rollback command to each.

$ echo <snap-name> > /sys/bus/rbd/devices/<dev-id>/snap_rollback

snap_*

A directory per each snapshot
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@ config NEED_MACH_MEMORY_H
be avoided when possible.

config PHYS_OFFSET
hex "Physical address of main memory" if MMU
hex "Physical address of main memory"
depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
default DRAM_BASE if !MMU
help
Please provide the physical address corresponding to the
location of main memory in your system.
Expand Down
16 changes: 12 additions & 4 deletions trunk/arch/arm/include/asm/unwind.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ enum unwind_reason_code {
};

struct unwind_idx {
unsigned long addr_offset;
unsigned long addr;
unsigned long insn;
};

struct unwind_table {
struct list_head list;
const struct unwind_idx *start;
const struct unwind_idx *origin;
const struct unwind_idx *stop;
struct unwind_idx *start;
struct unwind_idx *stop;
unsigned long begin_addr;
unsigned long end_addr;
};
Expand All @@ -50,6 +49,15 @@ extern struct unwind_table *unwind_table_add(unsigned long start,
extern void unwind_table_del(struct unwind_table *tab);
extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk);

#ifdef CONFIG_ARM_UNWIND
extern int __init unwind_init(void);
#else
static inline int __init unwind_init(void)
{
return 0;
}
#endif

#endif /* !__ASSEMBLY__ */

#ifdef CONFIG_ARM_UNWIND
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,6 @@ static struct platform_device_id armpmu_plat_device_ids[] = {

static int __devinit armpmu_device_probe(struct platform_device *pdev)
{
if (!cpu_pmu)
return -ENODEV;

cpu_pmu->plat_device = pdev;
return 0;
}
Expand Down
14 changes: 8 additions & 6 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,19 +895,15 @@ void __init setup_arch(char **cmdline_p)
{
struct machine_desc *mdesc;

unwind_init();

setup_processor();
mdesc = setup_machine_fdt(__atags_pointer);
if (!mdesc)
mdesc = setup_machine_tags(machine_arch_type);
machine_desc = mdesc;
machine_name = mdesc->name;

#ifdef CONFIG_ZONE_DMA
if (mdesc->dma_zone_size) {
extern unsigned long arm_dma_zone_size;
arm_dma_zone_size = mdesc->dma_zone_size;
}
#endif
if (mdesc->soft_reboot)
reboot_setup("s");

Expand Down Expand Up @@ -938,6 +934,12 @@ void __init setup_arch(char **cmdline_p)

tcm_init();

#ifdef CONFIG_ZONE_DMA
if (mdesc->dma_zone_size) {
extern unsigned long arm_dma_zone_size;
arm_dma_zone_size = mdesc->dma_zone_size;
}
#endif
#ifdef CONFIG_MULTI_IRQ_HANDLER
handle_arch_irq = mdesc->handle_irq;
#endif
Expand Down
129 changes: 45 additions & 84 deletions trunk/arch/arm/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ EXPORT_SYMBOL(__aeabi_unwind_cpp_pr2);

struct unwind_ctrl_block {
unsigned long vrs[16]; /* virtual register set */
const unsigned long *insn; /* pointer to the current instructions word */
unsigned long *insn; /* pointer to the current instructions word */
int entries; /* number of entries left to interpret */
int byte; /* current byte number in the instructions word */
};
Expand All @@ -83,9 +83,8 @@ enum regs {
PC = 15
};

extern const struct unwind_idx __start_unwind_idx[];
static const struct unwind_idx *__origin_unwind_idx;
extern const struct unwind_idx __stop_unwind_idx[];
extern struct unwind_idx __start_unwind_idx[];
extern struct unwind_idx __stop_unwind_idx[];

static DEFINE_SPINLOCK(unwind_lock);
static LIST_HEAD(unwind_tables);
Expand All @@ -99,99 +98,45 @@ static LIST_HEAD(unwind_tables);
})

/*
* Binary search in the unwind index. The entries are
* Binary search in the unwind index. The entries entries are
* guaranteed to be sorted in ascending order by the linker.
*
* start = first entry
* origin = first entry with positive offset (or stop if there is no such entry)
* stop - 1 = last entry
*/
static const struct unwind_idx *search_index(unsigned long addr,
const struct unwind_idx *start,
const struct unwind_idx *origin,
const struct unwind_idx *stop)
static struct unwind_idx *search_index(unsigned long addr,
struct unwind_idx *first,
struct unwind_idx *last)
{
unsigned long addr_prel31;

pr_debug("%s(%08lx, %p, %p, %p)\n",
__func__, addr, start, origin, stop);

/*
* only search in the section with the matching sign. This way the
* prel31 numbers can be compared as unsigned longs.
*/
if (addr < (unsigned long)start)
/* negative offsets: [start; origin) */
stop = origin;
else
/* positive offsets: [origin; stop) */
start = origin;

/* prel31 for address relavive to start */
addr_prel31 = (addr - (unsigned long)start) & 0x7fffffff;
pr_debug("%s(%08lx, %p, %p)\n", __func__, addr, first, last);

while (start < stop - 1) {
const struct unwind_idx *mid = start + ((stop - start) >> 1);

/*
* As addr_prel31 is relative to start an offset is needed to
* make it relative to mid.
*/
if (addr_prel31 - ((unsigned long)mid - (unsigned long)start) <
mid->addr_offset)
stop = mid;
else {
/* keep addr_prel31 relative to start */
addr_prel31 -= ((unsigned long)mid -
(unsigned long)start);
start = mid;
}
}

if (likely(start->addr_offset <= addr_prel31))
return start;
else {
if (addr < first->addr) {
pr_warning("unwind: Unknown symbol address %08lx\n", addr);
return NULL;
}
}
} else if (addr >= last->addr)
return last;

static const struct unwind_idx *unwind_find_origin(
const struct unwind_idx *start, const struct unwind_idx *stop)
{
pr_debug("%s(%p, %p)\n", __func__, start, stop);
while (start < stop) {
const struct unwind_idx *mid = start + ((stop - start) >> 1);
while (first < last - 1) {
struct unwind_idx *mid = first + ((last - first + 1) >> 1);

if (mid->addr_offset >= 0x40000000)
/* negative offset */
start = mid + 1;
if (addr < mid->addr)
last = mid;
else
/* positive offset */
stop = mid;
first = mid;
}
pr_debug("%s -> %p\n", __func__, stop);
return stop;

return first;
}

static const struct unwind_idx *unwind_find_idx(unsigned long addr)
static struct unwind_idx *unwind_find_idx(unsigned long addr)
{
const struct unwind_idx *idx = NULL;
struct unwind_idx *idx = NULL;
unsigned long flags;

pr_debug("%s(%08lx)\n", __func__, addr);

if (core_kernel_text(addr)) {
if (unlikely(!__origin_unwind_idx))
__origin_unwind_idx =
unwind_find_origin(__start_unwind_idx,
__stop_unwind_idx);

if (core_kernel_text(addr))
/* main unwind table */
idx = search_index(addr, __start_unwind_idx,
__origin_unwind_idx,
__stop_unwind_idx);
} else {
__stop_unwind_idx - 1);
else {
/* module unwind tables */
struct unwind_table *table;

Expand All @@ -200,8 +145,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
if (addr >= table->begin_addr &&
addr < table->end_addr) {
idx = search_index(addr, table->start,
table->origin,
table->stop);
table->stop - 1);
/* Move-to-front to exploit common traces */
list_move(&table->list, &unwind_tables);
break;
Expand Down Expand Up @@ -330,7 +274,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl)
int unwind_frame(struct stackframe *frame)
{
unsigned long high, low;
const struct unwind_idx *idx;
struct unwind_idx *idx;
struct unwind_ctrl_block ctrl;

/* only go to a higher address on the stack */
Expand Down Expand Up @@ -455,6 +399,7 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
unsigned long text_size)
{
unsigned long flags;
struct unwind_idx *idx;
struct unwind_table *tab = kmalloc(sizeof(*tab), GFP_KERNEL);

pr_debug("%s(%08lx, %08lx, %08lx, %08lx)\n", __func__, start, size,
Expand All @@ -463,12 +408,15 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
if (!tab)
return tab;

tab->start = (const struct unwind_idx *)start;
tab->stop = (const struct unwind_idx *)(start + size);
tab->origin = unwind_find_origin(tab->start, tab->stop);
tab->start = (struct unwind_idx *)start;
tab->stop = (struct unwind_idx *)(start + size);
tab->begin_addr = text_addr;
tab->end_addr = text_addr + text_size;

/* Convert the symbol addresses to absolute values */
for (idx = tab->start; idx < tab->stop; idx++)
idx->addr = prel31_to_addr(&idx->addr);

spin_lock_irqsave(&unwind_lock, flags);
list_add_tail(&tab->list, &unwind_tables);
spin_unlock_irqrestore(&unwind_lock, flags);
Expand All @@ -489,3 +437,16 @@ void unwind_table_del(struct unwind_table *tab)

kfree(tab);
}

int __init unwind_init(void)
{
struct unwind_idx *idx;

/* Convert the symbol addresses to absolute values */
for (idx = __start_unwind_idx; idx < __stop_unwind_idx; idx++)
idx->addr = prel31_to_addr(&idx->addr);

pr_debug("unwind: ARM stack unwinding initialised\n");

return 0;
}
13 changes: 3 additions & 10 deletions trunk/arch/arm/mach-exynos/mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ struct mct_clock_event_device {
char name[10];
};

static DEFINE_PER_CPU(struct mct_clock_event_device, percpu_mct_tick);

static void exynos4_mct_write(unsigned int value, void *addr)
{
void __iomem *stat_addr;
Expand Down Expand Up @@ -262,9 +264,6 @@ static void exynos4_clockevent_init(void)
}

#ifdef CONFIG_LOCAL_TIMERS

static DEFINE_PER_CPU(struct mct_clock_event_device, percpu_mct_tick);

/* Clock event handling */
static void exynos4_mct_tick_stop(struct mct_clock_event_device *mevt)
{
Expand Down Expand Up @@ -429,13 +428,9 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt)

void local_timer_stop(struct clock_event_device *evt)
{
unsigned int cpu = smp_processor_id();
evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
if (mct_int_type == MCT_INT_SPI)
if (cpu == 0)
remove_irq(evt->irq, &mct_tick0_event_irq);
else
remove_irq(evt->irq, &mct_tick1_event_irq);
disable_irq(evt->irq);
else
disable_percpu_irq(IRQ_MCT_LOCALTIMER);
}
Expand All @@ -448,7 +443,6 @@ static void __init exynos4_timer_resources(void)

clk_rate = clk_get_rate(mct_clk);

#ifdef CONFIG_LOCAL_TIMERS
if (mct_int_type == MCT_INT_PPI) {
int err;

Expand All @@ -458,7 +452,6 @@ static void __init exynos4_timer_resources(void)
WARN(err, "MCT: can't request IRQ %d (%d)\n",
IRQ_MCT_LOCALTIMER, err);
}
#endif /* CONFIG_LOCAL_TIMERS */
}

static void __init exynos4_timer_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/board-mx51_babbage.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static void __init mx51_babbage_init(void)
{
iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21,
PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH);
PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);

imx51_soc_init();

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/board-mx53_evk.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static inline void mx53_evk_fec_reset(void)
gpio_set_value(MX53_EVK_FEC_PHY_RST, 1);
}

static const struct fec_platform_data mx53_evk_fec_pdata __initconst = {
static struct fec_platform_data mx53_evk_fec_pdata = {
.phy = PHY_INTERFACE_MODE_RMII,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/board-mx53_loco.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static inline void mx53_loco_fec_reset(void)
gpio_set_value(LOCO_FEC_PHY_RST, 1);
}

static const struct fec_platform_data mx53_loco_fec_data __initconst = {
static struct fec_platform_data mx53_loco_fec_data = {
.phy = PHY_INTERFACE_MODE_RMII,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx5/board-mx53_smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static inline void mx53_smd_fec_reset(void)
gpio_set_value(SMD_FEC_PHY_RST, 1);
}

static const struct fec_platform_data mx53_smd_fec_data __initconst = {
static struct fec_platform_data mx53_smd_fec_data = {
.phy = PHY_INTERFACE_MODE_RMII,
};

Expand Down
Loading

0 comments on commit 121ee9a

Please sign in to comment.