Navigation Menu

Skip to content

Commit

Permalink
3.0.51...useless patches but users like version increments...
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscofranco committed Nov 9, 2012
1 parent f08871e commit e47e513
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 90 deletions.
8 changes: 0 additions & 8 deletions Documentation/feature-removal-schedule.txt
Expand Up @@ -6,14 +6,6 @@ be removed from this file.

---------------------------

What: x86 floppy disable_hlt
When: 2012
Why: ancient workaround of dubious utility clutters the
code used by everybody else.
Who: Len Brown <len.brown@intel.com>

---------------------------

What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
When: 2012
Why: This optional sub-feature of APM is of dubious reliability,
Expand Down
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 50
SUBLEVEL = 51
EXTRAVERSION =
NAME = Sneaky Weasel

Expand Down
7 changes: 0 additions & 7 deletions arch/x86/include/asm/system.h
Expand Up @@ -93,10 +93,6 @@ do { \
"memory"); \
} while (0)

/*
* disable hlt during certain critical i/o operations
*/
#define HAVE_DISABLE_HLT
#else

/* frame pointer must be last for get_wchan */
Expand Down Expand Up @@ -392,9 +388,6 @@ static inline void clflush(volatile void *__p)

#define nop() asm volatile ("nop")

void disable_hlt(void);
void enable_hlt(void);

void cpu_idle_wait(void);

extern unsigned long arch_align_stack(unsigned long sp);
Expand Down
24 changes: 0 additions & 24 deletions arch/x86/kernel/process.c
Expand Up @@ -341,34 +341,10 @@ void (*pm_idle)(void);
EXPORT_SYMBOL(pm_idle);
#endif

#ifdef CONFIG_X86_32
/*
* This halt magic was a workaround for ancient floppy DMA
* wreckage. It should be safe to remove.
*/
static int hlt_counter;
void disable_hlt(void)
{
hlt_counter++;
}
EXPORT_SYMBOL(disable_hlt);

void enable_hlt(void)
{
hlt_counter--;
}
EXPORT_SYMBOL(enable_hlt);

static inline int hlt_use_halt(void)
{
return (!hlt_counter && boot_cpu_data.hlt_works_ok);
}
#else
static inline int hlt_use_halt(void)
{
return 1;
}
#endif

/*
* We use this if we don't have any better
Expand Down
37 changes: 1 addition & 36 deletions drivers/block/floppy.c
Expand Up @@ -1032,37 +1032,6 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
return 0;
}

static DEFINE_SPINLOCK(floppy_hlt_lock);
static int hlt_disabled;
static void floppy_disable_hlt(void)
{
unsigned long flags;

WARN_ONCE(1, "floppy_disable_hlt() scheduled for removal in 2012");
spin_lock_irqsave(&floppy_hlt_lock, flags);
if (!hlt_disabled) {
hlt_disabled = 1;
#ifdef HAVE_DISABLE_HLT
disable_hlt();
#endif
}
spin_unlock_irqrestore(&floppy_hlt_lock, flags);
}

static void floppy_enable_hlt(void)
{
unsigned long flags;

spin_lock_irqsave(&floppy_hlt_lock, flags);
if (hlt_disabled) {
hlt_disabled = 0;
#ifdef HAVE_DISABLE_HLT
enable_hlt();
#endif
}
spin_unlock_irqrestore(&floppy_hlt_lock, flags);
}

static void setup_DMA(void)
{
unsigned long f;
Expand Down Expand Up @@ -1107,7 +1076,6 @@ static void setup_DMA(void)
fd_enable_dma();
release_dma_lock(f);
#endif
floppy_disable_hlt();
}

static void show_floppy(void);
Expand Down Expand Up @@ -1709,7 +1677,6 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
fd_disable_dma();
release_dma_lock(f);

floppy_enable_hlt();
do_floppy = NULL;
if (fdc >= N_FDC || FDCS->address == -1) {
/* we don't even know which FDC is the culprit */
Expand Down Expand Up @@ -1858,8 +1825,6 @@ static void floppy_shutdown(unsigned long data)
show_floppy();
cancel_activity();

floppy_enable_hlt();

flags = claim_dma_lock();
fd_disable_dma();
release_dma_lock(flags);
Expand Down Expand Up @@ -4198,6 +4163,7 @@ static int __init floppy_init(void)

disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!disks[dr]->queue) {
put_disk(disks[dr]);
err = -ENOMEM;
goto out_put_disk;
}
Expand Down Expand Up @@ -4504,7 +4470,6 @@ static void floppy_release_irq_and_dma(void)
#if N_FDC > 1
set_dor(1, ~8, 0);
#endif
floppy_enable_hlt();

if (floppy_track_buffer && max_buffer_sectors) {
tmpsize = max_buffer_sectors * 1024;
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/nouveau/nv04_dac.c
Expand Up @@ -209,7 +209,7 @@ static enum drm_connector_status nv04_dac_detect(struct drm_encoder *encoder,
NVWriteVgaCrtc(dev, 0, NV_CIO_CR_MODE_INDEX, saved_cr_mode);

if (blue == 0x18) {
NV_INFO(dev, "Load detected on head A\n");
NV_DEBUG(dev, "Load detected on head A\n");
return connector_status_connected;
}

Expand Down Expand Up @@ -323,7 +323,7 @@ nv17_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)

if (nv17_dac_sample_load(encoder) &
NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI) {
NV_INFO(dev, "Load detected on output %c\n",
NV_DEBUG(dev, "Load detected on output %c\n",
'@' + ffs(dcb->or));
return connector_status_connected;
} else {
Expand Down Expand Up @@ -398,7 +398,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder)

helper->dpms(encoder, DRM_MODE_DPMS_ON);

NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
}
Expand Down Expand Up @@ -447,7 +447,7 @@ static void nv04_dac_dpms(struct drm_encoder *encoder, int mode)
return;
nv_encoder->last_dpms = mode;

NV_INFO(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
NV_DEBUG(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
mode, nv_encoder->dcb->index);

nv04_dac_update_dacclk(encoder, mode == DRM_MODE_DPMS_ON);
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/nouveau/nv04_dfp.c
Expand Up @@ -468,7 +468,7 @@ static void nv04_dfp_commit(struct drm_encoder *encoder)

helper->dpms(encoder, DRM_MODE_DPMS_ON);

NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
}
Expand Down Expand Up @@ -511,7 +511,7 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode)
return;
nv_encoder->last_dpms = mode;

NV_INFO(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
NV_DEBUG(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
mode, nv_encoder->dcb->index);

if (was_powersaving && is_powersaving_dpms(mode))
Expand Down Expand Up @@ -556,7 +556,7 @@ static void nv04_tmds_dpms(struct drm_encoder *encoder, int mode)
return;
nv_encoder->last_dpms = mode;

NV_INFO(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
NV_DEBUG(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
mode, nv_encoder->dcb->index);

nv04_dfp_update_backlight(encoder, mode);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/nv04_tv.c
Expand Up @@ -69,7 +69,7 @@ static void nv04_tv_dpms(struct drm_encoder *encoder, int mode)
struct nv04_mode_state *state = &dev_priv->mode_reg;
uint8_t crtc1A;

NV_INFO(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
NV_DEBUG(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
mode, nv_encoder->dcb->index);

state->pllsel &= ~(PLLSEL_TV_CRTC1_MASK | PLLSEL_TV_CRTC2_MASK);
Expand Down Expand Up @@ -162,7 +162,7 @@ static void nv04_tv_commit(struct drm_encoder *encoder)

helper->dpms(encoder, DRM_MODE_DPMS_ON);

NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index,
'@' + ffs(nv_encoder->dcb->or));
}
Expand Down
21 changes: 16 additions & 5 deletions mm/rmap.c
Expand Up @@ -57,6 +57,7 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
#include <linux/hugetlb.h>
#include <linux/backing-dev.h>

#include <asm/tlbflush.h>

Expand Down Expand Up @@ -936,11 +937,8 @@ int page_mkclean(struct page *page)

if (page_mapped(page)) {
struct address_space *mapping = page_mapping(page);
if (mapping) {
if (mapping)
ret = page_mkclean_file(mapping, page);
if (page_test_and_clear_dirty(page_to_pfn(page), 1))
ret = 1;
}
}

return ret;
Expand Down Expand Up @@ -1121,6 +1119,8 @@ void page_add_file_rmap(struct page *page)
*/
void page_remove_rmap(struct page *page)
{
struct address_space *mapping = page_mapping(page);

/* page still mapped by someone else? */
if (!atomic_add_negative(-1, &page->_mapcount))
return;
Expand All @@ -1131,8 +1131,19 @@ void page_remove_rmap(struct page *page)
* this if the page is anon, so about to be freed; but perhaps
* not if it's in swapcache - there might be another pte slot
* containing the swap entry, but page not yet written to swap.
*
* And we can skip it on file pages, so long as the filesystem
* participates in dirty tracking; but need to catch shm and tmpfs
* and ramfs pages which have been modified since creation by read
* fault.
*
* Note that mapping must be decided above, before decrementing
* mapcount (which luckily provides a barrier): once page is unmapped,
* it could be truncated and page->mapping reset to NULL at any moment.
* Note also that we are relying on page_mapping(page) to set mapping
* to &swapper_space when PageSwapCache(page).
*/
if ((!PageAnon(page) || PageSwapCache(page)) &&
if (mapping && !mapping_cap_account_dirty(mapping) &&
page_test_and_clear_dirty(page_to_pfn(page), 1))
set_page_dirty(page);
/*
Expand Down

0 comments on commit e47e513

Please sign in to comment.