Archived
14
0
Fork 0

Merge branch 'linus' into perf/core

Merge reason: pick up fixes that are upstream, we need them
              because we'll apply dependent patches.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar 2012-01-27 12:01:41 +01:00
commit 801493c2e2
28 changed files with 145 additions and 114 deletions

View file

@ -414,9 +414,9 @@ void __init config_atari(void)
* FDC val = 4 -> Supervisor only */ * FDC val = 4 -> Supervisor only */
asm volatile ("\n" asm volatile ("\n"
" .chip 68030\n" " .chip 68030\n"
" pmove %0@,%/tt1\n" " pmove %0,%/tt1\n"
" .chip 68k" " .chip 68k"
: : "a" (&tt1_val)); : : "m" (tt1_val));
} else { } else {
asm volatile ("\n" asm volatile ("\n"
" .chip 68040\n" " .chip 68040\n"
@ -569,10 +569,10 @@ static void atari_reset(void)
: "d0"); : "d0");
} else } else
asm volatile ("\n" asm volatile ("\n"
" pmove %0@,%%tc\n" " pmove %0,%%tc\n"
" jmp %1@" " jmp %1@"
: /* no outputs */ : /* no outputs */
: "a" (&tc_val), "a" (reset_addr)); : "m" (tc_val), "a" (reset_addr));
} }

View file

@ -50,19 +50,6 @@
#define IRQ_USER 8 #define IRQ_USER 8
/*
* various flags for request_irq() - the Amiga now uses the standard
* mechanism like all other architectures - IRQF_DISABLED and
* IRQF_SHARED are your friends.
*/
#ifndef MACH_AMIGA_ONLY
#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
#define IRQ_FLG_FAST (0x0004)
#define IRQ_FLG_SLOW (0x0008)
#define IRQ_FLG_STD (0x8000) /* internally used */
#endif
struct irq_data; struct irq_data;
struct irq_chip; struct irq_chip;
struct irq_desc; struct irq_desc;

View file

@ -172,7 +172,7 @@ void flush_thread(void)
current->thread.fs = __USER_DS; current->thread.fs = __USER_DS;
if (!FPU_IS_EMU) if (!FPU_IS_EMU)
asm volatile ("frestore %0@" : : "a" (&zero) : "memory"); asm volatile("frestore %0": :"m" (zero));
} }
/* /*

View file

@ -163,8 +163,8 @@ void flush_thread(void)
#ifdef CONFIG_FPU #ifdef CONFIG_FPU
if (!FPU_IS_EMU) if (!FPU_IS_EMU)
asm volatile (".chip 68k/68881\n\t" asm volatile (".chip 68k/68881\n\t"
"frestore %0@\n\t" "frestore %0\n\t"
".chip 68k" : : "a" (&zero)); ".chip 68k" : : "m" (zero));
#endif #endif
} }

View file

@ -552,13 +552,13 @@ static inline void bus_error030 (struct frame *fp)
#ifdef DEBUG #ifdef DEBUG
asm volatile ("ptestr %3,%2@,#7,%0\n\t" asm volatile ("ptestr %3,%2@,#7,%0\n\t"
"pmove %%psr,%1@" "pmove %%psr,%1"
: "=a&" (desc) : "=a&" (desc), "=m" (temp)
: "a" (&temp), "a" (addr), "d" (ssw)); : "a" (addr), "d" (ssw));
#else #else
asm volatile ("ptestr %2,%1@,#7\n\t" asm volatile ("ptestr %2,%1@,#7\n\t"
"pmove %%psr,%0@" "pmove %%psr,%0"
: : "a" (&temp), "a" (addr), "d" (ssw)); : "=m" (temp) : "a" (addr), "d" (ssw));
#endif #endif
mmusr = temp; mmusr = temp;
@ -605,20 +605,18 @@ static inline void bus_error030 (struct frame *fp)
!(ssw & RW) ? "write" : "read", addr, !(ssw & RW) ? "write" : "read", addr,
fp->ptregs.pc, ssw); fp->ptregs.pc, ssw);
asm volatile ("ptestr #1,%1@,#0\n\t" asm volatile ("ptestr #1,%1@,#0\n\t"
"pmove %%psr,%0@" "pmove %%psr,%0"
: /* no outputs */ : "=m" (temp)
: "a" (&temp), "a" (addr)); : "a" (addr));
mmusr = temp; mmusr = temp;
printk ("level 0 mmusr is %#x\n", mmusr); printk ("level 0 mmusr is %#x\n", mmusr);
#if 0 #if 0
asm volatile ("pmove %%tt0,%0@" asm volatile ("pmove %%tt0,%0"
: /* no outputs */ : "=m" (tlong));
: "a" (&tlong));
printk("tt0 is %#lx, ", tlong); printk("tt0 is %#lx, ", tlong);
asm volatile ("pmove %%tt1,%0@" asm volatile ("pmove %%tt1,%0"
: /* no outputs */ : "=m" (tlong));
: "a" (&tlong));
printk("tt1 is %#lx\n", tlong); printk("tt1 is %#lx\n", tlong);
#endif #endif
#ifdef DEBUG #ifdef DEBUG
@ -668,13 +666,13 @@ static inline void bus_error030 (struct frame *fp)
#ifdef DEBUG #ifdef DEBUG
asm volatile ("ptestr #1,%2@,#7,%0\n\t" asm volatile ("ptestr #1,%2@,#7,%0\n\t"
"pmove %%psr,%1@" "pmove %%psr,%1"
: "=a&" (desc) : "=a&" (desc), "=m" (temp)
: "a" (&temp), "a" (addr)); : "a" (addr));
#else #else
asm volatile ("ptestr #1,%1@,#7\n\t" asm volatile ("ptestr #1,%1@,#7\n\t"
"pmove %%psr,%0@" "pmove %%psr,%0"
: : "a" (&temp), "a" (addr)); : "=m" (temp) : "a" (addr));
#endif #endif
mmusr = temp; mmusr = temp;

View file

@ -52,9 +52,9 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)
unsigned long *descaddr; unsigned long *descaddr;
asm volatile ("ptestr %3,%2@,#7,%0\n\t" asm volatile ("ptestr %3,%2@,#7,%0\n\t"
"pmove %%psr,%1@" "pmove %%psr,%1"
: "=a&" (descaddr) : "=a&" (descaddr), "=m" (mmusr)
: "a" (&mmusr), "a" (vaddr), "d" (get_fs().seg)); : "a" (vaddr), "d" (get_fs().seg));
if (mmusr & (MMU_I|MMU_B|MMU_L)) if (mmusr & (MMU_I|MMU_B|MMU_L))
return 0; return 0;
descaddr = phys_to_virt((unsigned long)descaddr); descaddr = phys_to_virt((unsigned long)descaddr);

View file

@ -399,6 +399,9 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
timers_global = (void __iomem *) timers_global = (void __iomem *)
(unsigned long) addr[num_cpu_timers]; (unsigned long) addr[num_cpu_timers];
/* Every per-cpu timer works in timer mode */
sbus_writel(0x00000000, &timers_global->timer_config);
sbus_writel((((1000000/HZ) + 1) << 10), &timers_global->l10_limit); sbus_writel((((1000000/HZ) + 1) << 10), &timers_global->l10_limit);
master_l10_counter = &timers_global->l10_count; master_l10_counter = &timers_global->l10_count;

View file

@ -360,7 +360,6 @@ config X86_NUMACHIP
depends on NUMA depends on NUMA
depends on SMP depends on SMP
depends on X86_X2APIC depends on X86_X2APIC
depends on !EDAC_AMD64
---help--- ---help---
Adds support for Numascale NumaChip large-SMP systems. Needed to Adds support for Numascale NumaChip large-SMP systems. Needed to
enable more than ~168 cores. enable more than ~168 cores.

View file

@ -321,6 +321,8 @@ static void parse_elf(void *output)
default: /* Ignore other PT_* */ break; default: /* Ignore other PT_* */ break;
} }
} }
free(phdrs);
} }
asmlinkage void decompress_kernel(void *rmode, memptr heap, asmlinkage void decompress_kernel(void *rmode, memptr heap,

View file

@ -159,6 +159,7 @@
#define X86_FEATURE_WDT (6*32+13) /* Watchdog timer */ #define X86_FEATURE_WDT (6*32+13) /* Watchdog timer */
#define X86_FEATURE_LWP (6*32+15) /* Light Weight Profiling */ #define X86_FEATURE_LWP (6*32+15) /* Light Weight Profiling */
#define X86_FEATURE_FMA4 (6*32+16) /* 4 operands MAC instructions */ #define X86_FEATURE_FMA4 (6*32+16) /* 4 operands MAC instructions */
#define X86_FEATURE_TCE (6*32+17) /* translation cache extension */
#define X86_FEATURE_NODEID_MSR (6*32+19) /* NodeId MSR */ #define X86_FEATURE_NODEID_MSR (6*32+19) /* NodeId MSR */
#define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */ #define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */
#define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */ #define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */

View file

@ -318,13 +318,13 @@ uv_gpa_in_mmr_space(unsigned long gpa)
/* UV global physical address --> socket phys RAM */ /* UV global physical address --> socket phys RAM */
static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa) static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
{ {
unsigned long paddr = gpa & uv_hub_info->gpa_mask; unsigned long paddr;
unsigned long remap_base = uv_hub_info->lowmem_remap_base; unsigned long remap_base = uv_hub_info->lowmem_remap_base;
unsigned long remap_top = uv_hub_info->lowmem_remap_top; unsigned long remap_top = uv_hub_info->lowmem_remap_top;
gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) | gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) |
((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val); ((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val);
gpa = gpa & uv_hub_info->gpa_mask; paddr = gpa & uv_hub_info->gpa_mask;
if (paddr >= remap_base && paddr < remap_base + remap_top) if (paddr >= remap_base && paddr < remap_base + remap_top)
paddr -= remap_base; paddr -= remap_base;
return paddr; return paddr;

View file

@ -311,13 +311,33 @@ out:
return state; return state;
} }
/*
* AMD microcode firmware naming convention, up to family 15h they are in
* the legacy file:
*
* amd-ucode/microcode_amd.bin
*
* This legacy file is always smaller than 2K in size.
*
* Starting at family 15h they are in family specific firmware files:
*
* amd-ucode/microcode_amd_fam15h.bin
* amd-ucode/microcode_amd_fam16h.bin
* ...
*
* These might be larger than 2K.
*/
static enum ucode_state request_microcode_amd(int cpu, struct device *device) static enum ucode_state request_microcode_amd(int cpu, struct device *device)
{ {
const char *fw_name = "amd-ucode/microcode_amd.bin"; char fw_name[36] = "amd-ucode/microcode_amd.bin";
const struct firmware *fw; const struct firmware *fw;
enum ucode_state ret = UCODE_NFOUND; enum ucode_state ret = UCODE_NFOUND;
struct cpuinfo_x86 *c = &cpu_data(cpu);
if (request_firmware(&fw, fw_name, device)) { if (c->x86 >= 0x15)
snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
if (request_firmware(&fw, (const char *)fw_name, device)) {
pr_err("failed to load file %s\n", fw_name); pr_err("failed to load file %s\n", fw_name);
goto out; goto out;
} }

View file

@ -1851,6 +1851,8 @@ static void __init init_per_cpu_tunables(void)
bcp->cong_reps = congested_reps; bcp->cong_reps = congested_reps;
bcp->cong_period = congested_period; bcp->cong_period = congested_period;
bcp->clocks_per_100_usec = usec_2_cycles(100); bcp->clocks_per_100_usec = usec_2_cycles(100);
spin_lock_init(&bcp->queue_lock);
spin_lock_init(&bcp->uvhub_lock);
} }
} }

View file

@ -25,7 +25,7 @@ struct uv_irq_2_mmr_pnode{
int irq; int irq;
}; };
static spinlock_t uv_irq_lock; static DEFINE_SPINLOCK(uv_irq_lock);
static struct rb_root uv_irq_root; static struct rb_root uv_irq_root;
static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool); static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool);

View file

@ -887,8 +887,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap)
/* attach demod */ /* attach demod */
adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach, adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach,
&anysee_cxd2820r_config, &adap->dev->i2c_adap, &anysee_cxd2820r_config, &adap->dev->i2c_adap);
NULL);
state->has_ci = true; state->has_ci = true;
@ -1189,6 +1188,14 @@ static int anysee_ci_init(struct dvb_usb_device *d)
if (ret) if (ret)
return ret; return ret;
ret = anysee_wr_reg_mask(d, REG_IOD, (0 << 2)|(0 << 1)|(0 << 0), 0x07);
if (ret)
return ret;
ret = anysee_wr_reg_mask(d, REG_IOD, (1 << 2)|(1 << 1)|(1 << 0), 0x07);
if (ret)
return ret;
ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1); ret = dvb_ca_en50221_init(&d->adapter[0].dvb_adap, &state->ci, 0, 1);
if (ret) if (ret)
return ret; return ret;

View file

@ -276,14 +276,15 @@ static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe)
param.flags = 0; param.flags = 0;
switch (fep->bandwidth_hz) { switch (fep->bandwidth_hz) {
default:
case 8000000: case 8000000:
param.bandwidth = 0; param.bandwidth = 8;
break; break;
case 7000000: case 7000000:
param.bandwidth = 1; param.bandwidth = 7;
break; break;
case 6000000: case 6000000:
param.bandwidth = 2; param.bandwidth = 6;
break; break;
} }

View file

@ -77,14 +77,12 @@ struct cxd2820r_config {
(defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE)) (defined(CONFIG_DVB_CXD2820R_MODULE) && defined(MODULE))
extern struct dvb_frontend *cxd2820r_attach( extern struct dvb_frontend *cxd2820r_attach(
const struct cxd2820r_config *config, const struct cxd2820r_config *config,
struct i2c_adapter *i2c, struct i2c_adapter *i2c
struct dvb_frontend *fe
); );
#else #else
static inline struct dvb_frontend *cxd2820r_attach( static inline struct dvb_frontend *cxd2820r_attach(
const struct cxd2820r_config *config, const struct cxd2820r_config *config,
struct i2c_adapter *i2c, struct i2c_adapter *i2c
struct dvb_frontend *fe
) )
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);

View file

@ -482,10 +482,19 @@ static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
/* switch between DVB-T and DVB-T2 when tune fails */ /* switch between DVB-T and DVB-T2 when tune fails */
if (priv->last_tune_failed) { if (priv->last_tune_failed) {
if (priv->delivery_system == SYS_DVBT) if (priv->delivery_system == SYS_DVBT) {
ret = cxd2820r_sleep_t(fe);
if (ret)
goto error;
c->delivery_system = SYS_DVBT2; c->delivery_system = SYS_DVBT2;
else if (priv->delivery_system == SYS_DVBT2) } else if (priv->delivery_system == SYS_DVBT2) {
ret = cxd2820r_sleep_t2(fe);
if (ret)
goto error;
c->delivery_system = SYS_DVBT; c->delivery_system = SYS_DVBT;
}
} }
/* set frontend */ /* set frontend */
@ -562,7 +571,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
.delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A }, .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },
/* default: DVB-T/T2 */ /* default: DVB-T/T2 */
.info = { .info = {
.name = "Sony CXD2820R (DVB-T/T2)", .name = "Sony CXD2820R",
.caps = FE_CAN_FEC_1_2 | .caps = FE_CAN_FEC_1_2 |
FE_CAN_FEC_2_3 | FE_CAN_FEC_2_3 |
@ -572,7 +581,9 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
FE_CAN_FEC_AUTO | FE_CAN_FEC_AUTO |
FE_CAN_QPSK | FE_CAN_QPSK |
FE_CAN_QAM_16 | FE_CAN_QAM_16 |
FE_CAN_QAM_32 |
FE_CAN_QAM_64 | FE_CAN_QAM_64 |
FE_CAN_QAM_128 |
FE_CAN_QAM_256 | FE_CAN_QAM_256 |
FE_CAN_QAM_AUTO | FE_CAN_QAM_AUTO |
FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
@ -602,8 +613,7 @@ static const struct dvb_frontend_ops cxd2820r_ops = {
}; };
struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg, struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *cfg,
struct i2c_adapter *i2c, struct i2c_adapter *i2c)
struct dvb_frontend *fe)
{ {
struct cxd2820r_priv *priv = NULL; struct cxd2820r_priv *priv = NULL;
int ret; int ret;

View file

@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev)
isi->fb_descriptors_phys); isi->fb_descriptors_phys);
iounmap(isi->regs); iounmap(isi->regs);
clk_unprepare(isi->mck);
clk_put(isi->mck); clk_put(isi->mck);
clk_unprepare(isi->pclk);
clk_put(isi->pclk); clk_put(isi->pclk);
kfree(isi); kfree(isi);
@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
if (IS_ERR(pclk)) if (IS_ERR(pclk))
return PTR_ERR(pclk); return PTR_ERR(pclk);
ret = clk_prepare(pclk);
if (ret)
goto err_clk_prepare_pclk;
isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL); isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL);
if (!isi) { if (!isi) {
ret = -ENOMEM; ret = -ENOMEM;
@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
goto err_clk_get; goto err_clk_get;
} }
ret = clk_prepare(isi->mck);
if (ret)
goto err_clk_prepare_mck;
/* Set ISI_MCK's frequency, it should be faster than pixel clock */ /* Set ISI_MCK's frequency, it should be faster than pixel clock */
ret = clk_set_rate(isi->mck, pdata->mck_hz); ret = clk_set_rate(isi->mck, pdata->mck_hz);
if (ret < 0) if (ret < 0)
@ -1059,10 +1069,14 @@ err_alloc_ctx:
isi->fb_descriptors_phys); isi->fb_descriptors_phys);
err_alloc_descriptors: err_alloc_descriptors:
err_set_mck_rate: err_set_mck_rate:
clk_unprepare(isi->mck);
err_clk_prepare_mck:
clk_put(isi->mck); clk_put(isi->mck);
err_clk_get: err_clk_get:
kfree(isi); kfree(isi);
err_alloc_isi: err_alloc_isi:
clk_unprepare(pclk);
err_clk_prepare_pclk:
clk_put(pclk); clk_put(pclk);
return ret; return ret;

View file

@ -853,8 +853,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
case EM28174_BOARD_PCTV_290E: case EM28174_BOARD_PCTV_290E:
dvb->fe[0] = dvb_attach(cxd2820r_attach, dvb->fe[0] = dvb_attach(cxd2820r_attach,
&em28xx_cxd2820r_config, &em28xx_cxd2820r_config,
&dev->i2c_adap, &dev->i2c_adap);
NULL);
if (dvb->fe[0]) { if (dvb->fe[0]) {
/* FE 0 attach tuner */ /* FE 0 attach tuner */
if (!dvb_attach(tda18271_attach, if (!dvb_attach(tda18271_attach,

View file

@ -565,8 +565,7 @@ static int __devinit esp_mac_probe(struct platform_device *dev)
esp_chips[dev->id] = esp; esp_chips[dev->id] = esp;
mb(); mb();
if (esp_chips[!dev->id] == NULL) { if (esp_chips[!dev->id] == NULL) {
err = request_irq(host->irq, mac_scsi_esp_intr, 0, err = request_irq(host->irq, mac_scsi_esp_intr, 0, "ESP", NULL);
"Mac ESP", NULL);
if (err < 0) { if (err < 0) {
esp_chips[dev->id] = NULL; esp_chips[dev->id] = NULL;
goto fail_free_priv; goto fail_free_priv;

View file

@ -339,9 +339,6 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance)
printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." ); printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." );
/* switch off SCSI IRQ - catch an interrupt without IRQ bit set else */
disable_irq(IRQ_MAC_SCSI);
/* get in phase */ /* get in phase */
NCR5380_write( TARGET_COMMAND_REG, NCR5380_write( TARGET_COMMAND_REG,
PHASE_SR_TO_TCR( NCR5380_read(STATUS_REG) )); PHASE_SR_TO_TCR( NCR5380_read(STATUS_REG) ));
@ -357,9 +354,6 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance)
for( end = jiffies + AFTER_RESET_DELAY; time_before(jiffies, end); ) for( end = jiffies + AFTER_RESET_DELAY; time_before(jiffies, end); )
barrier(); barrier();
/* switch on SCSI IRQ again */
enable_irq(IRQ_MAC_SCSI);
printk(KERN_INFO " done\n" ); printk(KERN_INFO " done\n" );
} }
#endif #endif

View file

@ -592,12 +592,12 @@ static int __init macfb_init(void)
if (!fb_info.screen_base) if (!fb_info.screen_base)
return -ENODEV; return -ENODEV;
printk("macfb: framebuffer at 0x%08lx, mapped to 0x%p, size %dk\n", pr_info("macfb: framebuffer at 0x%08lx, mapped to 0x%p, size %dk\n",
macfb_fix.smem_start, fb_info.screen_base, macfb_fix.smem_start, fb_info.screen_base,
macfb_fix.smem_len / 1024); macfb_fix.smem_len / 1024);
printk("macfb: mode is %dx%dx%d, linelength=%d\n", pr_info("macfb: mode is %dx%dx%d, linelength=%d\n",
macfb_defined.xres, macfb_defined.yres, macfb_defined.xres, macfb_defined.yres,
macfb_defined.bits_per_pixel, macfb_fix.line_length); macfb_defined.bits_per_pixel, macfb_fix.line_length);
/* Fill in the available video resolution */ /* Fill in the available video resolution */
macfb_defined.xres_virtual = macfb_defined.xres; macfb_defined.xres_virtual = macfb_defined.xres;
@ -613,14 +613,10 @@ static int __init macfb_init(void)
switch (macfb_defined.bits_per_pixel) { switch (macfb_defined.bits_per_pixel) {
case 1: case 1:
/*
* XXX: I think this will catch any program that tries
* to do FBIO_PUTCMAP when the visual is monochrome.
*/
macfb_defined.red.length = macfb_defined.bits_per_pixel; macfb_defined.red.length = macfb_defined.bits_per_pixel;
macfb_defined.green.length = macfb_defined.bits_per_pixel; macfb_defined.green.length = macfb_defined.bits_per_pixel;
macfb_defined.blue.length = macfb_defined.bits_per_pixel; macfb_defined.blue.length = macfb_defined.bits_per_pixel;
video_cmap_len = 0; video_cmap_len = 2;
macfb_fix.visual = FB_VISUAL_MONO01; macfb_fix.visual = FB_VISUAL_MONO01;
break; break;
case 2: case 2:
@ -660,11 +656,10 @@ static int __init macfb_init(void)
macfb_fix.visual = FB_VISUAL_TRUECOLOR; macfb_fix.visual = FB_VISUAL_TRUECOLOR;
break; break;
default: default:
video_cmap_len = 0; pr_err("macfb: unknown or unsupported bit depth: %d\n",
macfb_fix.visual = FB_VISUAL_MONO01;
printk("macfb: unknown or unsupported bit depth: %d\n",
macfb_defined.bits_per_pixel); macfb_defined.bits_per_pixel);
break; err = -EINVAL;
goto fail_unmap;
} }
/* /*
@ -734,8 +729,8 @@ static int __init macfb_init(void)
case MAC_MODEL_Q950: case MAC_MODEL_Q950:
strcpy(macfb_fix.id, "DAFB"); strcpy(macfb_fix.id, "DAFB");
macfb_setpalette = dafb_setpalette; macfb_setpalette = dafb_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000); dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
/* /*
@ -744,8 +739,8 @@ static int __init macfb_init(void)
case MAC_MODEL_LCII: case MAC_MODEL_LCII:
strcpy(macfb_fix.id, "V8"); strcpy(macfb_fix.id, "V8");
macfb_setpalette = v8_brazil_setpalette; macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
/* /*
@ -758,8 +753,8 @@ static int __init macfb_init(void)
case MAC_MODEL_P600: case MAC_MODEL_P600:
strcpy(macfb_fix.id, "Brazil"); strcpy(macfb_fix.id, "Brazil");
macfb_setpalette = v8_brazil_setpalette; macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
/* /*
@ -773,10 +768,10 @@ static int __init macfb_init(void)
case MAC_MODEL_P520: case MAC_MODEL_P520:
case MAC_MODEL_P550: case MAC_MODEL_P550:
case MAC_MODEL_P460: case MAC_MODEL_P460:
macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
strcpy(macfb_fix.id, "Sonora"); strcpy(macfb_fix.id, "Sonora");
macfb_setpalette = v8_brazil_setpalette;
v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000); v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
/* /*
@ -786,10 +781,10 @@ static int __init macfb_init(void)
*/ */
case MAC_MODEL_IICI: case MAC_MODEL_IICI:
case MAC_MODEL_IISI: case MAC_MODEL_IISI:
macfb_setpalette = rbv_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
strcpy(macfb_fix.id, "RBV"); strcpy(macfb_fix.id, "RBV");
macfb_setpalette = rbv_setpalette;
rbv_cmap_regs = ioremap(DAC_BASE, 0x1000); rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
/* /*
@ -797,10 +792,10 @@ static int __init macfb_init(void)
*/ */
case MAC_MODEL_Q840: case MAC_MODEL_Q840:
case MAC_MODEL_C660: case MAC_MODEL_C660:
macfb_setpalette = civic_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
strcpy(macfb_fix.id, "Civic"); strcpy(macfb_fix.id, "Civic");
macfb_setpalette = civic_setpalette;
civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000); civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
@ -809,26 +804,26 @@ static int __init macfb_init(void)
* We think this may be like the LC II * We think this may be like the LC II
*/ */
case MAC_MODEL_LC: case MAC_MODEL_LC:
strcpy(macfb_fix.id, "LC");
if (vidtest) { if (vidtest) {
macfb_setpalette = v8_brazil_setpalette; macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = v8_brazil_cmap_regs =
ioremap(DAC_BASE, 0x1000); ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
} }
strcpy(macfb_fix.id, "LC");
break; break;
/* /*
* We think this may be like the LC II * We think this may be like the LC II
*/ */
case MAC_MODEL_CCL: case MAC_MODEL_CCL:
strcpy(macfb_fix.id, "Color Classic");
if (vidtest) { if (vidtest) {
macfb_setpalette = v8_brazil_setpalette; macfb_setpalette = v8_brazil_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
v8_brazil_cmap_regs = v8_brazil_cmap_regs =
ioremap(DAC_BASE, 0x1000); ioremap(DAC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
} }
strcpy(macfb_fix.id, "Color Classic");
break; break;
/* /*
@ -893,10 +888,10 @@ static int __init macfb_init(void)
case MAC_MODEL_PB270C: case MAC_MODEL_PB270C:
case MAC_MODEL_PB280: case MAC_MODEL_PB280:
case MAC_MODEL_PB280C: case MAC_MODEL_PB280C:
macfb_setpalette = csc_setpalette;
macfb_defined.activate = FB_ACTIVATE_NOW;
strcpy(macfb_fix.id, "CSC"); strcpy(macfb_fix.id, "CSC");
macfb_setpalette = csc_setpalette;
csc_cmap_regs = ioremap(CSC_BASE, 0x1000); csc_cmap_regs = ioremap(CSC_BASE, 0x1000);
macfb_defined.activate = FB_ACTIVATE_NOW;
break; break;
default: default:
@ -918,8 +913,9 @@ static int __init macfb_init(void)
if (err) if (err)
goto fail_dealloc; goto fail_dealloc;
printk("fb%d: %s frame buffer device\n", pr_info("fb%d: %s frame buffer device\n",
fb_info.node, fb_info.fix.id); fb_info.node, fb_info.fix.id);
return 0; return 0;
fail_dealloc: fail_dealloc:

View file

@ -2090,7 +2090,7 @@ extern struct task_struct *idle_task(int cpu);
* is_idle_task - is the specified task an idle task? * is_idle_task - is the specified task an idle task?
* @p: the task in question. * @p: the task in question.
*/ */
static inline bool is_idle_task(struct task_struct *p) static inline bool is_idle_task(const struct task_struct *p)
{ {
return p->pid == 0; return p->pid == 0;
} }

View file

@ -115,8 +115,6 @@ int get_callchain_buffers(void)
} }
err = alloc_callchain_buffers(); err = alloc_callchain_buffers();
if (err)
release_callchain_buffers();
exit: exit:
mutex_unlock(&callchain_mutex); mutex_unlock(&callchain_mutex);

View file

@ -815,7 +815,7 @@ static void update_event_times(struct perf_event *event)
* here. * here.
*/ */
if (is_cgroup_event(event)) if (is_cgroup_event(event))
run_end = perf_event_time(event); run_end = perf_cgroup_event_time(event);
else if (ctx->is_active) else if (ctx->is_active)
run_end = ctx->time; run_end = ctx->time;
else else

View file

@ -56,8 +56,8 @@ static int nreaders = -1; /* # reader threads, defaults to 2*ncpus */
static int nfakewriters = 4; /* # fake writer threads */ static int nfakewriters = 4; /* # fake writer threads */
static int stat_interval; /* Interval between stats, in seconds. */ static int stat_interval; /* Interval between stats, in seconds. */
/* Defaults to "only at end of test". */ /* Defaults to "only at end of test". */
static int verbose; /* Print more debug info. */ static bool verbose; /* Print more debug info. */
static int test_no_idle_hz; /* Test RCU's support for tickless idle CPUs. */ static bool test_no_idle_hz; /* Test RCU's support for tickless idle CPUs. */
static int shuffle_interval = 3; /* Interval between shuffles (in sec)*/ static int shuffle_interval = 3; /* Interval between shuffles (in sec)*/
static int stutter = 5; /* Start/stop testing interval (in sec) */ static int stutter = 5; /* Start/stop testing interval (in sec) */
static int irqreader = 1; /* RCU readers from irq (timers). */ static int irqreader = 1; /* RCU readers from irq (timers). */
@ -1399,7 +1399,7 @@ rcu_torture_shutdown(void *arg)
* Execute random CPU-hotplug operations at the interval specified * Execute random CPU-hotplug operations at the interval specified
* by the onoff_interval. * by the onoff_interval.
*/ */
static int static int __cpuinit
rcu_torture_onoff(void *arg) rcu_torture_onoff(void *arg)
{ {
int cpu; int cpu;
@ -1447,7 +1447,7 @@ rcu_torture_onoff(void *arg)
return 0; return 0;
} }
static int static int __cpuinit
rcu_torture_onoff_init(void) rcu_torture_onoff_init(void)
{ {
if (onoff_interval <= 0) if (onoff_interval <= 0)

View file

@ -106,14 +106,17 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start,
if (end == MEMBLOCK_ALLOC_ACCESSIBLE) if (end == MEMBLOCK_ALLOC_ACCESSIBLE)
end = memblock.current_limit; end = memblock.current_limit;
/* adjust @start to avoid underflow and allocating the first page */ /* avoid allocating the first page */
start = max3(start, size, (phys_addr_t)PAGE_SIZE); start = max_t(phys_addr_t, start, PAGE_SIZE);
end = max(start, end); end = max(start, end);
for_each_free_mem_range_reverse(i, nid, &this_start, &this_end, NULL) { for_each_free_mem_range_reverse(i, nid, &this_start, &this_end, NULL) {
this_start = clamp(this_start, start, end); this_start = clamp(this_start, start, end);
this_end = clamp(this_end, start, end); this_end = clamp(this_end, start, end);
if (this_end < size)
continue;
cand = round_down(this_end - size, align); cand = round_down(this_end - size, align);
if (cand >= this_start) if (cand >= this_start)
return cand; return cand;