Skip to content

Commit 7fc7693

Browse files
committed
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing ARM: 6987/1: l2x0: fix disabling function to avoid deadlock ARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1 ARM: 6980/1: mmci: use StartBitErr to detect bad connections ARM: 6979/1: mach-vt8500: add forgotten irq_data conversion ARM: move memory layout sanity checking before meminfo initialization ARM: 6990/1: MAINTAINERS: add entry for ARM PMU profiling and debugging ARM: 6989/1: perf: do not start the PMU when no events are present ARM: dmabounce: fix map_single() error return value
2 parents 8733449 + 90c5ffe commit 7fc7693

File tree

12 files changed

+58
-24
lines changed

12 files changed

+58
-24
lines changed

MAINTAINERS

+10
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,16 @@ S: Maintained
594594
F: arch/arm/lib/floppydma.S
595595
F: arch/arm/include/asm/floppy.h
596596

597+
ARM PMU PROFILING AND DEBUGGING
598+
M: Will Deacon <[email protected]>
599+
S: Maintained
600+
F: arch/arm/kernel/perf_event*
601+
F: arch/arm/oprofile/common.c
602+
F: arch/arm/kernel/pmu.c
603+
F: arch/arm/include/asm/pmu.h
604+
F: arch/arm/kernel/hw_breakpoint.c
605+
F: arch/arm/include/asm/hw_breakpoint.h
606+
597607
ARM PORT
598608
M: Russell King <[email protected]>
599609
L: [email protected] (moderated for non-subscribers)

arch/arm/common/dmabounce.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
255255
if (buf == 0) {
256256
dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
257257
__func__, ptr);
258-
return 0;
258+
return ~0;
259259
}
260260

261261
dev_dbg(dev,

arch/arm/kernel/perf_event.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static int armpmu_event_init(struct perf_event *event)
583583
static void armpmu_enable(struct pmu *pmu)
584584
{
585585
/* Enable all of the perf events on hardware. */
586-
int idx;
586+
int idx, enabled = 0;
587587
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
588588

589589
if (!armpmu)
@@ -596,9 +596,11 @@ static void armpmu_enable(struct pmu *pmu)
596596
continue;
597597

598598
armpmu->enable(&event->hw, idx);
599+
enabled = 1;
599600
}
600601

601-
armpmu->start();
602+
if (enabled)
603+
armpmu->start();
602604
}
603605

604606
static void armpmu_disable(struct pmu *pmu)

arch/arm/kernel/setup.c

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ __setup("fpe=", fpe_setup);
7373
#endif
7474

7575
extern void paging_init(struct machine_desc *desc);
76+
extern void sanity_check_meminfo(void);
7677
extern void reboot_setup(char *str);
7778

7879
unsigned int processor_id;
@@ -900,6 +901,7 @@ void __init setup_arch(char **cmdline_p)
900901

901902
parse_early_param();
902903

904+
sanity_check_meminfo();
903905
arm_memblock_init(&meminfo, mdesc);
904906

905907
paging_init(mdesc);

arch/arm/kernel/smp_twd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void __cpuinit twd_calibrate_rate(void)
115115
twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
116116

117117
printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
118-
(twd_timer_rate / 1000000) % 100);
118+
(twd_timer_rate / 10000) % 100);
119119
}
120120
}
121121

arch/arm/mach-ep93xx/core.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ static void ep93xx_uart_set_mctrl(struct amba_device *dev,
251251
unsigned int mcr;
252252

253253
mcr = 0;
254-
if (!(mctrl & TIOCM_RTS))
254+
if (mctrl & TIOCM_RTS)
255255
mcr |= 2;
256-
if (!(mctrl & TIOCM_DTR))
256+
if (mctrl & TIOCM_DTR)
257257
mcr |= 1;
258258

259259
__raw_writel(mcr, base + EP93XX_UART_MCR_OFFSET);

arch/arm/mach-vt8500/irq.c

+12-9
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@
3939
static void __iomem *ic_regbase;
4040
static void __iomem *sic_regbase;
4141

42-
static void vt8500_irq_mask(unsigned int irq)
42+
static void vt8500_irq_mask(struct irq_data *d)
4343
{
4444
void __iomem *base = ic_regbase;
45+
unsigned irq = d->irq;
4546
u8 edge;
4647

4748
if (irq >= 64) {
@@ -64,9 +65,10 @@ static void vt8500_irq_mask(unsigned int irq)
6465
}
6566
}
6667

67-
static void vt8500_irq_unmask(unsigned int irq)
68+
static void vt8500_irq_unmask(struct irq_data *d)
6869
{
6970
void __iomem *base = ic_regbase;
71+
unsigned irq = d->irq;
7072
u8 dctr;
7173

7274
if (irq >= 64) {
@@ -78,10 +80,11 @@ static void vt8500_irq_unmask(unsigned int irq)
7880
writeb(dctr, base + VT8500_IC_DCTR + irq);
7981
}
8082

81-
static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type)
83+
static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type)
8284
{
8385
void __iomem *base = ic_regbase;
84-
unsigned int orig_irq = irq;
86+
unsigned irq = d->irq;
87+
unsigned orig_irq = irq;
8588
u8 dctr;
8689

8790
if (irq >= 64) {
@@ -114,11 +117,11 @@ static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type)
114117
}
115118

116119
static struct irq_chip vt8500_irq_chip = {
117-
.name = "vt8500",
118-
.ack = vt8500_irq_mask,
119-
.mask = vt8500_irq_mask,
120-
.unmask = vt8500_irq_unmask,
121-
.set_type = vt8500_irq_set_type,
120+
.name = "vt8500",
121+
.irq_ack = vt8500_irq_mask,
122+
.irq_mask = vt8500_irq_mask,
123+
.irq_unmask = vt8500_irq_unmask,
124+
.irq_set_type = vt8500_irq_set_type,
122125
};
123126

124127
void __init vt8500_init_irq(void)

arch/arm/mm/cache-l2x0.c

+13-6
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,22 @@ static void l2x0_cache_sync(void)
120120
spin_unlock_irqrestore(&l2x0_lock, flags);
121121
}
122122

123-
static void l2x0_flush_all(void)
123+
static void __l2x0_flush_all(void)
124124
{
125-
unsigned long flags;
126-
127-
/* clean all ways */
128-
spin_lock_irqsave(&l2x0_lock, flags);
129125
debug_writel(0x03);
130126
writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_INV_WAY);
131127
cache_wait_way(l2x0_base + L2X0_CLEAN_INV_WAY, l2x0_way_mask);
132128
cache_sync();
133129
debug_writel(0x00);
130+
}
131+
132+
static void l2x0_flush_all(void)
133+
{
134+
unsigned long flags;
135+
136+
/* clean all ways */
137+
spin_lock_irqsave(&l2x0_lock, flags);
138+
__l2x0_flush_all();
134139
spin_unlock_irqrestore(&l2x0_lock, flags);
135140
}
136141

@@ -266,7 +271,9 @@ static void l2x0_disable(void)
266271
unsigned long flags;
267272

268273
spin_lock_irqsave(&l2x0_lock, flags);
269-
writel(0, l2x0_base + L2X0_CTRL);
274+
__l2x0_flush_all();
275+
writel_relaxed(0, l2x0_base + L2X0_CTRL);
276+
dsb();
270277
spin_unlock_irqrestore(&l2x0_lock, flags);
271278
}
272279

arch/arm/mm/mmu.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ early_param("vmalloc", early_vmalloc);
759759

760760
static phys_addr_t lowmem_limit __initdata = 0;
761761

762-
static void __init sanity_check_meminfo(void)
762+
void __init sanity_check_meminfo(void)
763763
{
764764
int i, j, highmem = 0;
765765

@@ -1032,8 +1032,9 @@ void __init paging_init(struct machine_desc *mdesc)
10321032
{
10331033
void *zero_page;
10341034

1035+
memblock_set_current_limit(lowmem_limit);
1036+
10351037
build_mem_type_table();
1036-
sanity_check_meminfo();
10371038
prepare_page_table();
10381039
map_lowmem();
10391040
devicemaps_init(mdesc);

arch/arm/mm/nommu.c

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ void __init arm_mm_memblock_reserve(void)
2727
memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE);
2828
}
2929

30+
void __init sanity_check_meminfo(void)
31+
{
32+
}
33+
3034
/*
3135
* paging_init() sets up the page tables, initialises the zone memory
3236
* maps, and sets up the zero page, bad page and bad page tables.

drivers/mmc/host/mmci.c

+2
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
582582
data->error = -EILSEQ;
583583
} else if (status & MCI_DATATIMEOUT) {
584584
data->error = -ETIMEDOUT;
585+
} else if (status & MCI_STARTBITERR) {
586+
data->error = -ECOMM;
585587
} else if (status & MCI_TXUNDERRUN) {
586588
data->error = -EIO;
587589
} else if (status & MCI_RXOVERRUN) {

drivers/mmc/host/mmci.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
#define MCI_CMDRESPEND (1 << 6)
8787
#define MCI_CMDSENT (1 << 7)
8888
#define MCI_DATAEND (1 << 8)
89+
#define MCI_STARTBITERR (1 << 9)
8990
#define MCI_DATABLOCKEND (1 << 10)
9091
#define MCI_CMDACTIVE (1 << 11)
9192
#define MCI_TXACTIVE (1 << 12)
@@ -112,6 +113,7 @@
112113
#define MCI_CMDRESPENDCLR (1 << 6)
113114
#define MCI_CMDSENTCLR (1 << 7)
114115
#define MCI_DATAENDCLR (1 << 8)
116+
#define MCI_STARTBITERRCLR (1 << 9)
115117
#define MCI_DATABLOCKENDCLR (1 << 10)
116118
/* Extended status bits for the ST Micro variants */
117119
#define MCI_ST_SDIOITC (1 << 22)
@@ -127,6 +129,7 @@
127129
#define MCI_CMDRESPENDMASK (1 << 6)
128130
#define MCI_CMDSENTMASK (1 << 7)
129131
#define MCI_DATAENDMASK (1 << 8)
132+
#define MCI_STARTBITERRMASK (1 << 9)
130133
#define MCI_DATABLOCKENDMASK (1 << 10)
131134
#define MCI_CMDACTIVEMASK (1 << 11)
132135
#define MCI_TXACTIVEMASK (1 << 12)
@@ -150,7 +153,7 @@
150153
#define MCI_IRQENABLE \
151154
(MCI_CMDCRCFAILMASK|MCI_DATACRCFAILMASK|MCI_CMDTIMEOUTMASK| \
152155
MCI_DATATIMEOUTMASK|MCI_TXUNDERRUNMASK|MCI_RXOVERRUNMASK| \
153-
MCI_CMDRESPENDMASK|MCI_CMDSENTMASK)
156+
MCI_CMDRESPENDMASK|MCI_CMDSENTMASK|MCI_STARTBITERRMASK)
154157

155158
/* These interrupts are directed to IRQ1 when two IRQ lines are available */
156159
#define MCI_IRQ1MASK \

0 commit comments

Comments
 (0)